胶州空管前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

5889 lines
294 KiB

var Glodon = window.Glodon || {};
window.Glodon = Glodon;
var BimfaceNS = Glodon.Bimface = Glodon.Bimface || {};
var ModuleNS = BimfaceNS.Module = BimfaceNS.Module || {};
!function(l){var a,c,h,t,p,i,d='<svg><symbol id="bf-map1" viewBox="0 0 1024 1024"><path d="M64 64h896v896H64z" fill="#EEEEEE" ></path><path d="M960 64v896H64V64h896z m-64 64H128v768h768V128z" fill="#999999" ></path><path d="M112.448 388.544l800 480-32.896 54.912-800-480z" fill="#979797" ></path><path d="M514.944 82.56l58.112 26.88-384 832-58.112-26.88 384-832zM704 256a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m0 64a64 64 0 1 0 0 128 64 64 0 0 0 0-128z" fill="#979797" ></path></symbol><symbol id="bf-terrain" viewBox="0 0 1024 1024"><path d="M960 871.04l-194.816-633.28a64 64 0 0 0-122.368 0L448 871.04h512z" fill="#EEEEEE" ></path><path d="M685.184 195.456a64 64 0 0 1 77.44 35.328l2.56 7.04L960 871.04H448l194.816-633.216a64 64 0 0 1 42.368-42.24zM704 256.64l-169.408 550.4h338.752L704 256.64z" fill="#999999" ></path><path d="M704 871.04L438.272 445.76a64 64 0 0 0-108.544 0L64 871.04h640z" fill="#EEEEEE" ></path><path d="M350.08 425.472a64 64 0 0 1 83.84 14.208l4.352 6.144L704 871.04H64l265.728-425.152a64 64 0 0 1 20.352-20.352z m33.92 54.272L179.392 807.04h409.152L384 479.744z" fill="#999999" ></path></symbol><symbol id="bf-file" viewBox="0 0 1024 1024"><path d="M128 64h512l256 256v640H128z" fill="#EEEEEE" ></path><path d="M640 64l256 256v640H128V64h512z m-26.56 64H192v768h640V346.56L613.44 128z" fill="#999999" ></path><path d="M640 64l256 256v64H576V64h64z m0 90.56V320h165.44L640 154.56z" fill="#979797" ></path></symbol><symbol id="bf-file-md-c" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248A32 32 0 0 1 896 205.248V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248A32 32 0 0 1 896 205.248V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224H704a32 32 0 0 1-32-32V32z" fill="#C8C8C8" ></path></symbol><symbol id="bf-folder-open-sm" viewBox="0 0 1024 1024"><path d="M384 128l64 64 482.112 4.928C945.6 196.928 960 209.088 960 224v580.928A27.52 27.52 0 0 1 931.968 832H92.032A27.52 27.52 0 0 1 64 804.928V155.072A27.52 27.52 0 0 1 92.032 128H384z m64 128l-64-64H128v576h768V256H448z" fill="#FACB66" ></path><path d="M448 256l-64-64H128v576h768V256z" fill="#FFFFFF" ></path><path d="M482.24 679.808h64v64h-64z" fill="#FFFFFF" ></path><path d="M72.512 384h878.976a64 64 0 0 1 63.488 71.936l-48 384A64 64 0 0 1 903.488 896H120.512a64 64 0 0 1-63.488-56.064l-48-384A64 64 0 0 1 72.512 384z" fill="#FACB66" ></path></symbol><symbol id="bf-folder-close-sm" viewBox="0 0 1024 1024"><path d="M384 128l64 64 482.112 4.928C945.6 196.928 960 209.088 960 224v580.928A27.52 27.52 0 0 1 931.968 832H92.032A27.52 27.52 0 0 1 64 804.928V155.072A27.52 27.52 0 0 1 92.032 128H384z m64 128l-64-64H128v576h768V256H448z" fill="#FACB66" ></path><path d="M448 256l-64-64H128v576h768V256z" fill="#FFFFFF" ></path><path d="M128 320h768q64 0 64 64v448q0 64-64 64H128q-64 0-64-64V384q0-64 64-64z" fill="#FACB66" ></path></symbol><symbol id="bf-folder-md" viewBox="0 0 1024 1024"><path d="M345.856 96L448 160h512c16.576 0 32 14.336 32 32v704c0 17.664-13.44 32-30.016 32H62.016C45.44 928 32 913.664 32 896V128c0-17.664 13.44-32 30.016-32h283.84z" fill="#FFFFFF" ></path><path d="M345.856 96L448 160h512c16.576 0 32 14.336 32 32v704c0 17.664-13.44 32-30.016 32H62.016C45.44 928 32 913.664 32 896V128c0-17.664 13.44-32 30.016-32h283.84zM448 192l-110.592-64H64v768h896V192H448z" fill="#FACB66" ></path><path d="M482.272 679.776h60v34.976h-60z" fill="#FFFFFF" ></path><path d="M64 320h896v576H64z" fill="#FACB66" ></path></symbol><symbol id="bf-model" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248A32 32 0 0 1 896 205.248V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M751.968 463.488v258.656L528 851.424V592.832z m-479.968 0l224 129.344v258.592l-224-129.28z m240-157.024l223.968 129.312L512 565.088 288 435.776z" fill="#00B0DC" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248A32 32 0 0 1 896 205.248V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224H704a32 32 0 0 1-32-32V32z" fill="#00B0DC" ></path></symbol><symbol id="bf-zip" viewBox="0 0 1024 1024"><path d="M864 0a32 32 0 0 1 32 32v960a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h704z" fill="#FFFFFF" ></path><path d="M864 0a32 32 0 0 1 32 32v960a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h704z m0 32H160v960h704V32z" fill="#7C00AC" ></path><path d="M448 32h64v96h-64zM512 128h64v96h-64zM448 224h64v96h-64zM512 320h64v96h-64zM448 416h64v96h-64z" fill="#C18EC9" ></path><path d="M448 512h128v128a32 32 0 0 1-32 32h-64a32 32 0 0 1-32-32v-128z" fill="#7C00AC" ></path></symbol><symbol id="bf-dwf" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#0092D0" ></path><path d="M765.568 410.752l0.704 1.888 25.504 105.6a8 8 0 0 1-8.224 9.856l-1.984-0.384-22.272-7.072-5.888 11.2-5.76 10.592c-1.792 3.2-3.456 6.08-5.12 8.832l-4.896 7.744a210.816 210.816 0 0 1-5.216 7.456l-15.136 22.08-17.6 21.248a155.744 155.744 0 0 1-6.432 7.808l-7.616 8.192-10.752 10.688-11.424 11.072-6.88 6.784-22.208 17.952c-11.744 9.472-19.84 15.36-28.8 20.8l-6.944 4.8-7.232 4.608-8.192 4.8-4.672 2.56-31.328 16.64-20.8 8.736-13.44 5.408a235.776 235.776 0 0 1-27.072 8.96c-6.08 2.144-12.416 4-19.488 5.76l-16.64 3.712-26.912 5.376-9.92 0.96-26.24 2.88-8.512 0.64-7.232 0.256h-3.456l-3.52-0.128-27.648 0.064-16.768-1.536a1125.792 1125.792 0 0 1-7.936-0.8 187.648 187.648 0 0 1-14.88-1.344l-10.304-1.6-37.952-7.456-42.88-13.152a8 8 0 0 1-5.6-7.584l0.256-2.048 1.184-4.672a8 8 0 0 1 9.472-5.792l27.712 6.24 13.792 3.072 22.336 2.688c12.864 1.6 21.568 2.432 30.56 2.528h5.44l23.104 0.384 17.664-1.44 14.272-0.928 6.24-0.704c1.12-0.128 2.272-0.32 3.52-0.512l8.416-1.44 22.624-4.256 5.376-0.832 5.696-1.6 31.04-7.36c4.224-1.024 8.064-1.92 11.552-2.848l9.6-2.624c5.76-1.664 10.464-3.296 14.4-5.024l3.68-1.28 7.232-2.912 7.84-3.488 14.56-7.104 19.328-9.664 23.936-15.232 8.48-5.632 7.104-5.024 6.4-4.928 3.168-2.56 3.456-2.56 6.912-5.44a247.04 247.04 0 0 0 7.424-6.528l22.144-20.8a42.24 42.24 0 0 1 1.44-1.28l5.088-5.952 13.088-14.784a161.28 161.28 0 0 0 15.488-20.032l13.856-19.296 11.616-20.224c3.456-5.44 6.496-11.072 9.536-17.536l5.696-12.64-22.272-5.248a8 8 0 0 1-5.056-11.904l1.28-1.6 77.216-76.032a8 8 0 0 1 12.672 1.952z" fill="#FFE600" ></path><path d="M564 249.376l1.536 1.376 3.2 3.616a8 8 0 0 1 0.704 9.6l-1.376 1.6-30.08 27.52-1.28 1.152-24.64 27.808-1.184 1.408a199.68 199.68 0 0 0-8.128 10.4l-3.68 5.28-13.536 18.752-10.08 17.216-3.104 5.184a125.696 125.696 0 0 0-7.552 13.44l-4.224 8.96-9.6 21.344-1.856 3.712-2.24 6.496-14.496 36.832-3.872 10.688c-2.24 6.496-3.776 11.84-4.704 16.512a168.512 168.512 0 0 0-2.08 8l-1.824 8.64a282.656 282.656 0 0 0-0.832 4.8l-3.2 21.504-1.76 12.128a161.088 161.088 0 0 1-0.32 2.016l-1.344 33.536a350.72 350.72 0 0 0-0.096 4.928l0.064 8.736 0.16 4.032 0.576 8.096 0.256 8 0.288 4.064 0.96 8.992 1.504 11.008 2.976 19.712 0.352 3.2 8.48 33.984 2.144 7.328 2.24 6.4 1.28 3.104 8 22.464 9.888 21.056c1.728 4.096 3.648 8.064 5.824 12.16l4.832 8.704 6.048 10.08 20.288-13.056a8 8 0 0 1 11.68 3.52l0.576 2.016 15.296 102.592a8 8 0 0 1-8.896 9.12l-1.92-0.48-101.152-39.424a8 8 0 0 1-3.52-12.224l1.568-1.6 18.496-14.176-8.992-17.568a265.568 265.568 0 0 1-11.136-24.896l-2.048-5.792-9.472-25.024-7.328-26.624-2.08-7.072a157.376 157.376 0 0 1-0.928-3.648l-1.728-7.936-1.728-9.472-5.44-32.608-2.624-36.544-0.416-10.112a209.216 209.216 0 0 1-0.064-4.512l0.192-8.576 0.256-4.288a217.408 217.408 0 0 1 0.288-14.656l0.8-11.296 0.704-7.04 4.16-34.016 7.36-33.44 2.464-9.92 1.216-4.416 2.432-8.032c0.832-2.592 1.728-5.12 2.688-7.712l1.312-4.544 2.976-9.088 1.728-4.704 4.16-10.432 13.664-31.456 17.536-31.808 2.592-4.48 4.896-7.808c0.8-1.216 1.6-2.368 2.432-3.52l2.464-3.328 15.744-22.72 16.032-19.04c3.68-4.672 7.648-9.216 11.936-13.76l4.48-4.704 4.8-4.736 9.792-9.28 13.6-13.184 35.232-27.776a8 8 0 0 1 9.408-0.32z" fill="#DC232D" ></path><path d="M343.04 368.32l0.512 1.92 2.944 23.136 5.472 0.32c11.936 0.32 23.872 1.28 35.648 2.944l11.744 1.856 26.464 4.48 26.688 7.04c3.04 0.704 6.176 1.504 9.44 2.464l8.224 2.56 5.984 2.112 34.848 13.184 24 11.744c13.952 6.816 23.744 12.192 32.64 18.24 5.6 3.136 10.624 6.272 16.256 10.112l8.96 6.368 5.12 3.744 24.512 18.656 22.592 20.8 8.32 7.968 6.912 7.072c3.2 3.424 6.08 6.72 8.896 10.144 6.848 6.944 12.896 14.176 20.416 24.16l19.648 26.752 5.6 9.6 11.84 19.488c3.744 6.4 6.752 11.968 9.184 17.216l2.272 5.12 11.712 25.12 8.416 23.584c5.28 14.08 9.472 28.576 12.416 42.976l4.608 18.4 2.24 15.456 3.968 28.992a8 8 0 0 1-4.448 8.32l-1.952 0.64-4.8 0.896a8 8 0 0 1-9.312-6.144l-5.92-27.712-1.568-6.72-1.44-7.104-10.88-33.12-2.88-8.032a168.32 168.32 0 0 0-1.44-3.552l-3.008-6.88-1.696-3.584-9.376-21.184-10.464-18.56-2.24-4.032a143.2 143.2 0 0 0-9.76-16.288l-16.192-22.72-3.328-4.96-4.8-5.6-23.008-29.216c-8.352-10.4-14.72-17.6-20.416-22.592l-5.44-5.44-5.952-5.44-7.04-5.952-25.824-20.608-26.144-16.768-4.608-2.816-8.384-4.864a189.984 189.984 0 0 0-11.84-6.016 182.08 182.08 0 0 0-19.392-9.504l-10.24-4.224-18.816-7.488a94.56 94.56 0 0 1-2.144-0.96l-10.944-3.104-20.608-6.144-5.152-1.408-4.608-1.056-5.952-1.12-3.808-0.576-23.424-4.416-23.168-2.016-8.32-0.864-8.512-0.416a244.672 244.672 0 0 0-4.8-0.032l-12.96 0.16 2.368 18.432a8 8 0 0 1-8.64 8.992l-1.888-0.416-98.336-33.472a8 8 0 0 1-3.84-12.384l1.44-1.44 85.024-67.52a8 8 0 0 1 12.416 3.296z" fill="#F9AE17" ></path></symbol><symbol id="bf-dwg" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M416 32l-0.032 512H512v96h352v32H512v96h-96v224h-32v-224H288v-96H160v-32h128v-96h95.968L384 32h32z m32 576h-96v96h96v-96z" fill="#3D69B0" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#3D69B0" ></path></symbol><symbol id="bf-dgn" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M697.472 738.976c-5.76 23.456-91.488 50.112-94.048-26.112v-43.2c-88.896 104.864-136.576 117.536-206.88 74.848l-39.84 151.52H269.216l143.232-576h87.552L412.48 683.84c36.64 43.712 106.56 27.808 191.04-60.608L667.2 320h79.552l-73.824 378.944c0.896 14.688 14.688 16.256 34.144 5.664" fill="#49BDCA" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#49BDCA" ></path></symbol><symbol id="bf-rvm" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M468.288 638.4l64.416-149.056a6.112 6.112 0 0 1 11.2 0l65.184 149.088h-140.8z m306.432 185.184L543.904 291.872a6.144 6.144 0 0 0-11.2 0L383.36 638.4H229.44a5.44 5.44 0 0 0-4.992 7.584l28.736 66.464c0.768 1.792 2.56 2.944 4.48 2.944h92.48l-46.528 108.096a6.144 6.144 0 0 0 5.568 8.736h71.36a6.112 6.112 0 0 0 5.6-3.648l48.864-113.184h207.68l49.472 113.12c0.96 2.208 3.2 3.648 5.6 3.648h71.296a6.144 6.144 0 0 0 5.6-8.64" fill="#3D1152" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#3D1152" ></path></symbol><symbol id="bf-osgb" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M512 288a288 288 0 1 1 0 576 288 288 0 0 1 0-576z m0 32a256 256 0 1 0 0 512 256 256 0 0 0 0-512z" fill="#3A8EC9" ></path><path d="M512 288c88.352 0 160 128.96 160 288s-71.648 288-160 288-160-128.96-160-288 71.648-288 160-288z m0 32c-65.632 0-128 112.256-128 256s62.368 256 128 256 128-112.256 128-256-62.368-256-128-256z" fill="#3A8EC9" ></path><path d="M735.488 394.336c6.656 8.192 12.896 16.768 18.624 25.664-51.264 39.712-140.544 66.016-242.112 66.016-101.568 0-190.848-26.304-242.144-66.016a288.96 288.96 0 0 1 18.656-25.664c43.392 33.92 126.272 59.68 223.488 59.68 95.776 0 177.6-24.96 221.568-58.176l1.92-1.504zM289.184 744.096a288.96 288.96 0 0 1-18.656-25.632c51.296-39.744 140.576-66.016 242.144-66.016 101.568 0 190.848 26.272 242.144 65.984a288.96 288.96 0 0 1-18.656 25.664c-43.392-33.92-126.272-59.648-223.488-59.648-95.776 0-177.6 24.96-221.568 58.144l-1.92 1.504z" fill="#3A8EC9" ></path><path d="M528 290.016v571.968h-32V290.016z" fill="#3A8EC9" ></path><path d="M784 560v32h-544v-32z" fill="#3A8EC9" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#3A8EC9" ></path></symbol><symbol id="bf-igms" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M491.712 352c-121.856 0-198.432 37.664-225.76 154.784l-21.312 92.224c-26.56 114.656 65.216 164.352 155.392 164.352h288.736c20.16 0 37.632-13.824 42.24-33.472l34.816-148.512c6.4-27.232-14.272-53.28-42.24-53.28h-73.856v0.192H556.48l-11.744 22.144a32.544 32.544 0 0 0 28.768 47.744h59.52l-21.056 90.848h-117.12c-83.04 0-107.584-26.56-94.848-81.152l23.488-102.624c11.776-49.952 54.432-78.304 146.432-78.304h194.272c20.16 0 37.664-13.92 42.24-33.6l9.568-41.184L491.712 352z" fill="#0082DC" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#0082DC" ></path></symbol><symbol id="bf-catia" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#005386" ></path><path d="M508.992 288.32c46.656-2.24 101.888 7.68 112.16 40.64 16.864 53.952-68.576 132.608-143.04 171.232-18.24 9.472-29.312 12.064-33.92 11.424-4.416-0.608-5.088-4.992-3.648-8 2.656-5.696 14.656-17.248 30.72-29.824 83.84-65.44 111.072-113.472 95.264-132.928-10.176-12.48-52.64-21.12-96.768-21.12-11.968 0-43.456 2.752-46.688-8.32-2.624-9.088 39.616-20.928 85.92-23.136M410.304 535.68c40-2.336 88.64 4.672 115.904 25.536 13.568 10.368 23.104 29.472 17.6 51.36-15.776 62.144-74.56 137.28-205.216 195.04-41.536 18.368-74.24 25.408-81.056 20.48-7.36-5.312 14.048-46.304 20.48-59.904 20.864-44.064 46.912-86.976 72.32-126.272 9.376-14.432 23.808-39.52 36.896-37.504 11.712 1.792-2.016 28.448-11.04 45.376-15.136 28.448-56.896 107.424-43.136 112.128 30.464 10.464 173.312-98.24 152.256-158.752-9.76-28.096-71.808-30.752-110.848-30.752-17.792 0-56.576 4.16-58.752-9.408-2.304-12.576 58.976-25.216 94.592-27.328" fill="#005386" ></path><path d="M719.296 469.12c24 4.352 43.584 7.712 48.064 17.856 5.056 11.488-21.12 12.16-34.272 12.48-63.168 1.184-101.28 2.432-103.168 23.904-2.496 27.616 26.976 55.456 56.096 94.432 26.56 35.616 56.8 70.72 48.096 103.52-10.88 40.8-60.896 49.44-108.512 49.44a581.696 581.696 0 0 1-107.04-10.88c-22.624-4.48-19.264-15.648-13.216-19.232 6.72-4.032 45.184-4.128 71.904-5.696 22.016-1.28 85.888-1.28 95.84-17.632 12.224-20.032-17.696-54.336-45.12-90.24-34.272-44.8-71.936-91.072-52-124.832 25.76-43.712 101.184-40.736 143.328-33.088" fill="#005386" ></path></symbol><symbol id="bf-ifc" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M568.384 611.488l138.56-138.56c-38.464-38.4-76.736-76.704-115.104-115.072l-35.328 35.84-45.536-45.568c0.16-0.192 0.992-1.152 1.92-2.048 13.792-13.856 27.648-27.712 41.504-41.536 21.984-21.952 54.208-22.08 76.224-0.16a73285.12 73285.12 0 0 1 130.112 130.112c21.632 21.696 21.504 54.08-0.064 75.648l-109.504 109.504a52.48 52.48 0 0 1-73.952 0.288c-2.816-2.752-5.696-5.44-8.832-8.448" fill="#DD0224" ></path><path d="M455.744 509.28l-138.4 138.368 114.816 114.816 35.968-36.032 45.536 45.536c-0.512 0.512-1.344 1.472-2.24 2.368-14.304 14.304-28.64 28.576-42.88 42.944a50.24 50.24 0 0 1-36.384 15.168 48.864 48.864 0 0 1-35.936-14.272c-44.832-44.704-89.6-89.44-134.304-134.272-19.424-19.488-18.912-52.576 1.12-72.736 36.576-36.8 73.344-73.408 110.016-110.08a51.52 51.52 0 0 1 35.488-15.584c13.696-0.48 26.048 3.968 36.416 13.12 3.744 3.296 7.104 7.008 10.784 10.656" fill="#AB007C" ></path><path d="M563.008 504.064l-138.56-138.592-114.784 114.784 36.032 36-45.312 45.344c0.192 0.128-0.192-0.032-0.448-0.32-15.68-15.712-31.776-31.04-46.848-47.296-18.208-19.616-17.216-51.232 1.728-70.272 44.288-44.512 88.704-88.896 133.184-133.216a52.032 52.032 0 0 1 72.448 0 28848.32 28848.32 0 0 1 111.776 111.68c19.968 20.128 19.392 52.384-1.024 73.728-2.432 2.56-5.024 4.992-8.192 8.16" fill="#004D95" ></path><path d="M679.52 603.712l44.352-44.384c0.8 0.736 1.856 1.664 2.848 2.656 13.76 13.76 27.52 27.488 41.216 41.248 21.376 21.408 21.44 53.344 0.096 74.688l-130.72 130.688c-21.184 21.216-53.12 21.184-74.336-0.032l-109.792-109.792a51.456 51.456 0 0 1 0.032-73.28c2.56-2.56 5.472-6.976 8.032-6.848 2.944 0.16 5.824 4.288 8.48 6.944l127.104 127.04c1.088 1.12 2.272 2.144 3.68 3.424 1.408-1.28 2.688-2.336 3.872-3.52 36.16-36.096 72.256-72.288 108.48-108.32 2.848-2.816 2.848-4.416 0-7.168-10.272-9.984-20.32-20.192-30.432-30.336-1.024-0.992-1.984-2.048-2.912-3.008" fill="#0093A8" ></path><path d="M357.6 619.872l103.712-103.712 44.704 44.8c-0.192 0.192-0.768 0.896-1.408 1.536-21.056 21.056-42.144 42.112-63.168 63.2-10.432 10.496-22.848 16.64-37.696 16.864a51.552 51.552 0 0 1-37.888-15.264c-2.72-2.624-5.632-5.056-8.256-7.424" fill="#004D95" ></path><path d="M452.896 405.888l103.616 103.616-45.664 45.664c-0.32-0.64-0.704-2.24-1.696-3.2-21.024-21.12-42.112-42.176-63.168-63.264-21.664-21.696-21.6-54.144 0.128-75.904l6.784-6.912" fill="#DD0224" ></path><path d="M512.416 566.08l1.344 1.152c22.08 22.112 44.288 44.096 66.208 66.368a51.84 51.84 0 0 1-0.704 72.896c-2.656 2.688-5.248 5.44-7.648 7.904l-103.776-103.808 44.576-44.512" fill="#AB007C" ></path><path d="M665.92 500.512l-103.04 102.976-44.576-44.576c1.12-0.736 2.912-1.504 4.192-2.784 21.056-20.928 42.016-41.92 63.008-62.912a51.744 51.744 0 0 1 71.84-0.608c2.912 2.816 5.92 5.472 8.576 7.904" fill="#0093A8" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#004D95" ></path></symbol><symbol id="bf-rvt" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M765.12 841.824l-0.736-0.544c-0.224-0.192-0.512-0.32-0.768-0.576-0.576-0.448-1.216-0.832-1.792-1.312l-2.048-1.472a734.976 734.976 0 0 1-22.624-16.224l-0.96-0.736c-2.624-1.888-5.248-3.84-7.904-5.824l-0.096-0.064-0.512-0.384a20.864 20.864 0 0 0-1.28-0.928l-7.168-5.44c-15.936-12.288-31.552-24.96-46.848-38.016-30.4-26.24-60.256-53.312-87.232-83.04-13.056-15.104-25.344-31.264-39.456-45.76-14.048-14.56-29.44-28.16-47.36-38.016a137.92 137.92 0 0 0-28.608-10.976 325.28 325.28 0 0 0-29.6-6.72c-12.096-2.24-24.256-4-36.48-5.44a606.848 606.848 0 0 0 61.312-10.72c27.904-6.496 55.488-15.648 80.768-29.632 12.576-7.04 24.544-15.616 34.24-26.624a80.064 80.064 0 0 0 19.104-39.04c2.56-14.464 1.6-29.12-0.48-43.328a154.592 154.592 0 0 0-12.672-41.408c-6.272-13.024-14.816-25.28-26.368-34.4-3.2-2.56-6.624-4.928-10.112-7.04a115.744 115.744 0 0 0-28.64-12.064 169.376 169.376 0 0 0-42.72-5.76c-14.4-0.224-28.64 0.608-42.976 2.4-7.104 1.088-14.304 2.88-20.704 6.592-6.4 3.648-11.584 9.536-14.4 16.256a66.528 66.528 0 0 0-4.544 21.12c-0.64 7.2-1.056 14.304-1.184 21.44-0.224 14.336 0.736 28.704 3.424 42.752 1.376 7.008 2.912 14.08 5.888 20.576a43.008 43.008 0 0 0 10.88 15.104l-0.736-0.64a41.6 41.6 0 0 1-9.28-13.472c-0.224-0.384-0.416-0.736-0.576-1.12l-0.032-0.16a94.592 94.592 0 0 1-5.44-20.448 207.168 207.168 0 0 1-2.688-42.528c0.192-7.104 0.768-14.208 1.44-21.28 0.736-7.04 1.92-14.144 4.736-20.48a31.616 31.616 0 0 1 13.76-14.976c5.952-3.456 12.896-5.184 19.84-6.08 28.064-2.976 57.152-3.84 84.32 4.032 5.856 1.696 11.616 3.744 17.12 6.336 7.232 3.264 14.112 7.392 20.256 12.416 10.88 8.768 18.88 20.608 24.96 33.216 5.952 12.704 9.952 26.368 12.192 40.288 2.048 13.888 2.944 28.16 0.384 41.824-0.64 3.584-1.536 7.072-2.72 10.432 0.064 0.064 0 0.096 0 0.096a75.264 75.264 0 0 1-15.36 26.368l-1.632 1.696c-8.96 9.632-19.936 17.408-31.552 23.808-24.768 13.664-52 22.528-79.552 28.992-27.328 6.24-55.136 11.008-83.072 13.056 0.192 0.192 0.416 0.32 0.608 0.544l1.024 0.864-0.096 0.736-0.064 0.384v0.16l-0.256 2.176c19.2 1.536 38.4 3.904 57.28 7.264 9.856 1.792 19.648 3.904 29.28 6.528 9.568 2.72 19.104 5.856 27.68 10.528 17.376 9.6 32.64 22.784 46.656 37.024 14.08 14.272 26.4 30.048 39.744 45.28 11.264 12.352 23.136 24 35.296 35.424l0.416 0.448 2.112 2.144 1.408 1.408 2.528 2.432c3.648 3.456 10.272 9.344 18.08 16.128l2.336 2.048 2.432 2.08c4.096 3.52 8.32 7.168 12.576 10.72l2.528 2.208 2.464 2.08 2.496 2.112 3.744 3.168 3.36 2.752 2.4 1.952 14.464 11.616c0.928 0.704 1.92 1.44 2.816 2.24l0.48 0.384c6.016 4.672 12.032 9.28 18.144 13.824l1.28 0.96c1.504 1.248 3.04 2.368 4.608 3.52 15.648 11.584 31.616 22.656 47.68 33.6l-1.216-0.864z" fill="#3DBBD8" ></path><path d="M768 843.872h-149.504c-11.04 0-21.376-5.664-27.328-15.008l-37.76-59.2-7.36-11.296a347.296 347.296 0 0 1-3.616-5.408l-3.36-5.056v-0.032a854.08 854.08 0 0 0-30.496-42.336c-26.944-34.784-46.336-52.48-56.64-56.704-0.16-0.096-0.32-0.192-0.448-0.192l-0.704-0.32h-0.128c-18.56-6.368-18.144 5.632-19.936 22.272l-0.032 0.704c-0.32 2.976-0.544 8.64-0.704 16.224a86.656 86.656 0 0 0-0.096 3.584l-0.096 3.36-0.096 5.024-0.032 3.072a7539.808 7539.808 0 0 0-0.64 73.696c-0.096 28.32-0.096 49.408-0.096 49.408l-80.032 28.192c6.176-45.504 11.776-91.008 17.344-136.544l6.944-58.432v-0.224l1.12-9.664 7.744-66.176c19.2 1.536 38.4 3.904 57.28 7.264 9.856 1.792 19.648 3.904 29.28 6.528 9.568 2.72 19.104 5.856 27.68 10.528 17.376 9.6 32.64 22.784 46.656 37.024 14.08 14.272 26.4 30.048 39.744 45.312 11.264 12.32 23.168 24 35.296 35.392l0.416 0.448 2.112 2.144 1.408 1.408 2.528 2.432c3.648 3.456 10.272 9.344 18.08 16.128l2.336 2.048 2.432 2.08c4.096 3.52 8.32 7.168 12.576 10.72l2.528 2.208 2.464 2.08 2.496 2.112 3.744 3.168 3.36 2.752 2.4 1.952c3.552 3.04 6.816 5.664 9.504 7.84a162.624 162.624 0 0 0 4.16 3.328l0.064 0.032c0.256 0.096 0.48 0.256 0.736 0.416 0.928 0.704 1.92 1.44 2.816 2.24l0.512 0.384c5.984 4.672 12.032 9.28 18.112 13.824l1.28 0.96c1.504 1.248 3.04 2.368 4.608 3.52 15.648 11.584 31.616 22.656 47.68 33.6 0.064 0 0.064 0.064 0.096 0.096 0.512 0.352 0.96 0.704 1.472 0.96l0.032 0.064 0.064 0.064z" fill="#2390AD" ></path><path d="M768 843.872h-149.504c-11.04 0-21.376-5.664-27.328-15.008l-37.76-59.2-7.36-11.296a347.296 347.296 0 0 1-3.616-5.408 196.064 196.064 0 0 0-3.584-5.184 0.384 0.384 0 0 0 0.224 0.096v0.032l0.96 0.64 0.064 0.032c65.696 43.808 121.12 25.44 150.464 39.136l0.032 0.032c0.256 0.096 0.48 0.256 0.736 0.416 0.928 0.704 1.92 1.44 2.816 2.24l0.512 0.384c5.984 4.672 12.032 9.28 18.112 13.824l1.28 0.96c1.504 1.248 3.04 2.368 4.608 3.52 15.648 11.584 31.616 22.656 47.68 33.6 0.064 0 0.064 0.064 0.096 0.096 0.512 0.352 0.96 0.704 1.472 0.96l0.032 0.064 0.064 0.064z" fill="#3AB9DB" ></path><path d="M609.28 350.752c-18.784 7.968-44.224 2.4-59.84-2.56a115.744 115.744 0 0 0-28.64-12.096 169.376 169.376 0 0 0-42.72-5.76c-14.4-0.224-28.64 0.608-42.976 2.4-7.104 1.088-14.304 2.88-20.704 6.592-6.4 3.648-11.584 9.536-14.4 16.256a66.528 66.528 0 0 0-4.544 21.12c-0.64 7.2-1.056 14.304-1.152 21.44-0.256 14.336 0.704 28.704 3.392 42.752 1.376 7.008 2.912 14.08 5.888 20.576a43.008 43.008 0 0 0 11.104 15.424c1.76 1.792 3.68 3.456 5.76 5.056 13.408 10.176 30.08 14.752 46.656 15.776 28.224 1.664 61.472-2.624 81.344-25.088 3.904-4.384 6.688-9.152 8.832-14.208 0.672-1.024 11.04-17.12 19.68-16.288 13.92 1.472 17.536 21.056 15.04 41.792 0.064 0.064 0 0.096 0 0.096a75.264 75.264 0 0 1-15.36 26.368l-1.632 1.696c-1.504 0.928-3.008 1.76-4.48 2.56a140.704 140.704 0 0 1-4.448 2.496 181.888 181.888 0 0 1-10.528 5.504c-3.104 1.6-6.176 3.072-9.248 4.48-1.536 0.704-3.104 1.44-4.672 2.048l-1.12 0.512-3.296 1.408-5.216 2.08a139.52 139.52 0 0 1-6.688 2.432c-1.696 0.64-3.392 1.216-5.12 1.76-0.864 0.32-1.792 0.576-2.624 0.896l-5.152 1.536a204.288 204.288 0 0 1-52.8 8.32 181.76 181.76 0 0 1-59.488-8.64c-34.336-10.112-59.36-39.264-76.224-67.2a287.36 287.36 0 0 1-23.712-49.824c0-0.032-0.064-0.032-0.064-0.096a588.16 588.16 0 0 1-5.248-29.12 605.984 605.984 0 0 1-5.184-41.984l-0.032-0.64c0-0.256 0-0.544-0.064-0.768-0.416-5.376-1.12-18.24-1.12-18.24-0.192-2.656-0.32-5.344-0.48-8v-65.28c0.64 0 1.312-0.064 1.92-0.128l2.368-0.128 2.08-0.096c1.088-0.064 2.208-0.16 3.264-0.16l2.24-0.096a891.104 891.104 0 0 1 6.624-0.32 1133.76 1133.76 0 0 1 80.384-1.184c12.096 0.224 24.16 0.384 36.192 0.672 6.72 0.192 13.44 0.384 20.16 0.672 45.504 2.016 92.992 6.944 134.592 26.88 0 0 31.296 27.936 38.016 48.192l0.032 0.064c2.56 7.872 1.504 14.592-6.624 18.048" fill="#0070B7" ></path><path d="M767.904 843.776a25.376 25.376 0 0 1-1.472-0.96c-0.032-0.064-0.032-0.128-0.096-0.128l-1.216-0.864-0.736-0.544c-0.224-0.192-0.512-0.32-0.768-0.576-0.576-0.448-1.216-0.832-1.792-1.312l-2.048-1.472a734.976 734.976 0 0 1-22.624-16.224l-0.96-0.736c-2.624-1.888-5.248-3.84-7.904-5.824l-0.096-0.064-0.512-0.384a20.864 20.864 0 0 0-1.28-0.928l-7.168-5.44c-15.936-12.288-31.552-24.96-46.848-38.016-30.4-26.24-60.256-53.312-87.232-83.04-13.056-15.104-25.344-31.264-39.456-45.76-14.048-14.56-29.44-28.16-47.36-38.016a137.92 137.92 0 0 0-28.608-10.976 325.28 325.28 0 0 0-29.6-6.72c-12.096-2.24-24.256-4-36.48-5.44a606.848 606.848 0 0 0 61.312-10.72c27.904-6.496 55.488-15.648 80.768-29.632 12.576-7.04 24.544-15.616 34.24-26.624 7.808-8.672 13.696-19.168 17.056-30.368 7.936-12.48 20.864-30.4 36.864-43.456 10.144-8.256 16.416-4.512 20.32 3.424v0.064c6.272 12.736 6.4 36.288 6.4 38.56a210.368 210.368 0 0 1-22.08 55.136c-5.76 9.92-11.776 19.648-18.176 29.12-5.696 8.48-11.232 15.072-13.248 25.28-3.296 16.832 3.936 26.88 11.52 40.416 13.472 24 51.84 77.888 75.776 110.912 1.152 1.696 2.336 3.296 3.52 4.864 2.08 2.88 3.968 5.536 5.76 7.936l1.248 1.664c0.736 1.024 1.44 2.048 2.24 3.072l3.744 5.152 1.312 1.792 2.24 3.072 23.2 31.968 5.824 8.032 2.784 3.808 5.12 7.04 2.336 3.264 2.976 4.096 2.688 3.712 2.336 3.2 1.984 2.784 4.192 5.856z" fill="#0070B7" ></path><path d="M594.72 473.536c-0.64 3.52-1.536 7.04-2.72 10.4 2.496-20.736-1.12-40.32-15.04-41.792-8.64-0.832-19.008 15.264-19.68 16.288 2.08-5.024 3.552-10.4 4.672-16 3.072-14.944 4.544-31.552 2.496-46.72a86.304 86.304 0 0 0-2.112-10.56c-3.84-14.72-12.704-30.048-25.408-39.392 7.232 3.264 14.112 7.392 20.256 12.416 10.88 8.768 18.88 20.608 24.96 33.216 5.952 12.704 9.952 26.368 12.192 40.288 2.048 13.888 2.944 28.16 0.384 41.856" fill="#1D4D78" ></path><path d="M575.008 512.096c-8.96 9.664-19.936 17.408-31.552 23.808-24.768 13.664-52 22.528-79.552 28.992-27.328 6.24-55.136 11.008-83.072 13.056a234.24 234.24 0 0 1-42.752-53.12l-0.96-1.6a270.048 270.048 0 0 1-24.704-54.752c-0.064-0.224-0.096-0.48-0.192-0.704a258.368 258.368 0 0 1-2.08-6.4c-3.968-12.832-7.232-25.792-9.952-38.912a308.896 308.896 0 0 0 20.48 44.32l3.2 5.504c16.896 27.936 41.92 57.088 76.256 67.2a230.528 230.528 0 0 0 25.28 6.112c9.664 1.6 21.12 2.848 34.208 2.56l3.2-0.096a187.712 187.712 0 0 0 33.536-4.192c5.184-1.088 10.56-2.464 16.064-4.064l5.152-1.536c0.832-0.32 1.76-0.544 2.624-0.896 1.728-0.544 3.424-1.12 5.12-1.76a139.52 139.52 0 0 0 6.688-2.432l5.216-2.08 3.296-1.408 1.12-0.512a228.672 228.672 0 0 0 13.92-6.528c2.048-0.96 4.096-2.048 6.144-3.104 1.472-0.768 2.944-1.568 4.384-2.4 1.472-0.768 2.944-1.6 4.448-2.464l4.48-2.56" fill="#0086C9" ></path><path d="M429.152 755.712l-0.128 20.544c-0.096 28.32-0.096 49.408-0.096 49.408l-80.032 28.192c6.176-45.504 11.776-91.008 17.344-136.544l6.944-58.432c1.824 16.64 7.168 48.96 21.76 71.68 9.44 14.656 26.56 27.392 33.984 25.184l0.224-0.032" fill="#35ABCD" ></path><path d="M666.432 433.76a283.008 283.008 0 0 1-0.32 11.264c-0.704 12.288-2.592 24.544-5.536 36.576 0-2.272-0.096-25.824-6.368-38.56v-0.064c-3.904-7.936-10.176-11.68-20.32-3.424-16 13.056-28.928 30.944-36.864 43.456 0.832-2.88 1.504-5.76 2.048-8.64 2.56-14.496 1.6-29.12-0.48-43.36a154.592 154.592 0 0 0-12.672-41.408c-6.272-13.024-14.816-25.28-26.368-34.4-3.2-2.56-6.624-4.928-10.112-7.04 15.616 4.992 41.056 10.56 59.84 2.592 8.096-3.456 9.184-10.176 6.592-18.048l-0.032-0.064c-6.72-20.256-38.016-48.224-38.016-48.224 37.856 18.176 65.92 53.344 79.488 93.056 0.8 2.272 1.536 4.512 2.144 6.816a89.536 89.536 0 0 1 2.24 8.512c0.64 2.496 1.184 5.024 1.6 7.52 0.32 1.44 0.608 2.944 0.8 4.48 0.096 0.224 0.096 0.512 0.16 0.768 0.32 2.24 0.672 4.544 0.928 6.816 0.032 0.256 0.096 0.48 0.096 0.768a118.688 118.688 0 0 1 0.704 7.808 173.184 173.184 0 0 1 0.448 12.8" fill="#0079BC" ></path><path d="M459.2 492.384c-13.024 0.512-28.96-1.824-35.68-14.496a52.704 52.704 0 0 1-4.8-17.472c-2.88-21.568-9.024-68.64 23.552-71.264 22.976-1.856 68.544-11.68 78.816 26.304 10.336 37.984 2.816 74.368-61.92 76.928m105.28-96.64a86.304 86.304 0 0 0-2.112-10.56c-3.84-14.72-12.704-30.08-25.408-39.424a117.984 117.984 0 0 0-17.12-6.336c-27.2-7.84-56.256-7.04-84.32-4.064a53.696 53.696 0 0 0-19.84 6.08 31.616 31.616 0 0 0-13.76 15.04 67.04 67.04 0 0 0-4.736 20.448c-0.672 7.04-1.28 14.176-1.44 21.28-0.512 14.24 0.224 28.48 2.656 42.528 1.28 6.976 2.688 13.984 5.44 20.48l0.064 0.128 0.544 1.12c2.336 4.8 5.376 9.344 9.28 13.44l0.768 0.672 0.128 0.192a52.704 52.704 0 0 0 5.856 5.152c13.408 10.208 30.08 14.784 46.656 15.808 28.224 1.664 61.472-2.624 81.344-25.088 3.904-4.384 6.688-9.152 8.832-14.208 2.08-5.024 3.552-10.4 4.672-16 3.072-14.944 4.544-31.552 2.496-46.72" fill="#283558" ></path><path d="M377.344 581.28l-7.424 67.2-7.392 68.384a10769.6 10769.6 0 0 0-13.632 136.992L288 830.24V327.008c0 6.4 0.16 12.8 0.448 19.2v3.296c0.736 14.816 2.144 29.376 4.032 44.064 3.104 23.2 7.584 46.24 14.016 68.832 6.496 22.56 15.648 44.48 27.744 64.704 11.84 19.84 25.792 38.4 43.104 54.176" fill="#18426F" ></path><path d="M382.464 579.36l-0.096 0.736-0.064 0.384v0.16l-0.256 2.176-7.744 66.176-1.12 9.664v0.224l-6.944 58.432a9954.464 9954.464 0 0 1-17.344 136.544c4.16-45.696 8.864-91.328 13.632-136.96l7.392-68.416 7.424-67.2c-17.28-15.808-31.264-34.368-43.104-54.176a273.12 273.12 0 0 1-27.744-64.704c-6.4-22.592-10.88-45.632-14.016-68.8-1.92-14.72-3.296-29.28-4.032-44.096v-3.264c-0.32-6.432-0.448-12.8-0.448-19.232v-3.36c0.16 2.624 1.184 20.832 1.6 26.208 0.064 0.224 0.064 0.512 0.064 0.768l0.032 0.64c1.216 14.08 2.976 28.064 5.184 41.984 1.504 9.728 3.264 19.488 5.248 29.12 0 0.064 0.064 0.064 0.064 0.096a428.736 428.736 0 0 0 11.776 44.576c0.032 0.256 0.16 0.48 0.256 0.736l0.224 0.736a270.048 270.048 0 0 0 24.704 54.72l1.696 3.04c-0.224-0.48-0.544-0.96-0.768-1.472a234.24 234.24 0 0 0 42.752 53.152c0.192 0.192 0.416 0.32 0.608 0.544l1.024 0.864z" fill="#3DBBD8" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#0070B7" ></path></symbol><symbol id="bf-nwd" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M630.912 826.464h-5.952s-52.704-63.808-100.544-126.848c-38.816-51.2-72.832-110.208-93.76-102.016-12.576 4.992-12.8 47.456-12.64 89.6 0.224 55.68 0.768 113.888 0.768 113.888l-27.744 25.376H288V310.4l0.192 1.504c0 0.224 0 0.416 0.064 0.64 0.032 0.512 0.064 1.12 0.16 1.632l0.224 2.112c0 0.384 0.032 0.8 0.128 1.184l0.128 1.152 0.16 1.216 0.064 0.896c0.16 0.896 0.224 1.76 0.32 2.784 1.728 17.504 3.744 34.976 5.888 52.416 2.72 21.76 5.632 43.584 8.8 65.312 6.272 43.52 13.12 86.944 21.024 130.176 8.224 43.2 16.928 86.304 27.616 128.96 8.128 32.768 17.184 65.28 28.128 97.28l0.128 0.416 2.88 8.576c0.992 2.912 2.016 5.824 3.072 8.704l3.136 8.544-0.064-0.256v-0.256a3046.432 3046.432 0 0 1-9.088-97.152 2405.504 2405.504 0 0 1-6.08-97.984 1060.704 1060.704 0 0 1 0.096-98.144c0.96-16.32 2.496-32.576 5.92-48.48 1.824-7.872 4.032-15.808 8-22.752a26.368 26.368 0 0 1 7.68-8.736 15.36 15.36 0 0 1 10.88-2.304c7.616 1.28 14.4 6.368 20.416 11.68 5.952 5.44 11.392 11.52 16.512 17.824 10.208 12.736 19.264 26.368 27.968 40.224 17.216 27.776 32.704 56.64 47.712 85.696 29.952 58.176 56.96 117.888 86.592 176.32a748.736 748.736 0 0 1 4.544 9.024l2.272 4.48 8.544 16.544 1.824 3.456c0.288 0.512 0.544 0.96 0.768 1.472l0.768 1.44c1.984 3.776 3.52 6.752 4.512 8.544l0.384 0.64 0.48 0.96 0.16 0.32M736 555.008v271.456l-20.96-31.392-0.32-0.448-1.12-1.664-0.224-0.32-0.64-0.96-0.096-0.192-0.16-0.16-0.384-0.64-0.96-1.44-0.32-0.416-0.096-0.192-0.128-0.224-0.224-0.32-0.448-0.704-0.128-0.16-0.448-0.672-0.288-0.384-0.32-0.416-0.256-0.448-0.8-1.248-23.36-35.968-27.168-40.864c0.416-0.096 0.8-0.128 1.216-0.352 0.32-0.16 0.736-0.288 1.152-0.512l0.16-0.032a15.584 15.584 0 0 0 6.56-5.344c2.432-3.424 4.096-7.392 5.248-11.392 2.24-8.096 3.2-16.48 3.872-24.768 1.12-16.64 0.96-33.344 0.32-49.92-0.32-8.32-0.704-16.544-1.28-24.832v-0.128l0.16-2.24 0.256-4.96 0.32-5.344 0.544-8.768 0.32-4.64 0.32-4.768 0.48-5.92v-0.128l0.416-5.888 0.512-6.176 0.384-4.608 0.32-3.36 0.32-3.424 0.64-6.88c0.16-1.088 0.256-2.24 0.384-3.424a349.248 349.248 0 0 1 1.504-13.568 1186625.472 1186625.472 0 0 1 1.248-9.92l0.64-4.864 0.736-4.768 0.48-3.072c0.384-2.048 0.672-4.064 1.024-6.016a44.48 44.48 0 0 1 0.448-2.56l0.064-0.32c0.224-1.088 0.384-2.112 0.64-3.168 0.096-0.832 0.288-1.632 0.48-2.464 0.32-1.664 0.704-3.328 1.056-4.928 0.576-2.368 1.152-4.64 1.728-6.752l0.576-2.112c0.192-0.64 0.416-1.344 0.576-2.048l0.64-1.824c0.224-0.576 0.384-1.152 0.64-1.728l0.384-1.088 0.64-1.664a18.048 18.048 0 0 1 3.744-6.496l0.64-0.736c0.352-0.32 0.672-0.64 1.024-0.832a4.16 4.16 0 0 1 0.8-0.544 4.8 4.8 0 0 1 1.696-0.576C722.88 434.752 736 555.008 736 555.008" fill="#08723A" ></path><path d="M736 826.464h-105.056l-0.192-0.32-0.48-0.96-0.352-0.64c-0.992-1.792-2.56-4.768-4.544-8.544l-0.768-1.44-0.768-1.472-1.824-3.456-8.544-16.576-2.24-4.448a748.8 748.8 0 0 0-4.544-9.024c-14.624-29.312-28.128-59.136-42.112-88.8-13.952-29.536-28.16-59.072-43.008-88.288a910.304 910.304 0 0 0-7.552-14.624c-2.56-4.896-5.088-9.76-7.68-14.624-1.184-2.112-2.304-4.32-3.52-6.432a871.648 871.648 0 0 0-28.704-50.368c-8.64-13.92-17.664-27.648-27.904-40.512a157.888 157.888 0 0 0-16.736-18.24c-6.144-5.408-12.992-10.848-21.696-12.32a17.408 17.408 0 0 0-12.544 2.72 28.832 28.832 0 0 0-8.416 9.6c-4.16 7.328-6.368 15.36-8.16 23.456a322.624 322.624 0 0 0-5.76 48.864c-1.696 32.768-0.992 65.536 0.32 98.272a2337.28 2337.28 0 0 0 12.896 159.744l0.128 1.152v0.224l0.448 4.064 0.256 2.56 0.352 3.36c0.096 1.184 0.224 2.368 0.416 3.552l0.032 0.416 0.416 3.584c0.032 0.576 0.064 1.152 0.16 1.76 0.224 1.856 0.448 3.52 0.576 5.12 0.096 1.088 0.224 2.176 0.416 3.296l0.16 1.376 0.544 4.896-9.472-28.16c-3.424-10.4-6.24-21.056-9.408-31.552-3.232-10.496-5.856-21.12-8.672-31.776-2.816-10.624-5.664-21.216-8.064-31.936a2308.64 2308.64 0 0 1-26.784-128.96 3578.88 3578.88 0 0 1-21.824-129.984c-3.296-21.728-6.336-43.52-9.28-65.28-2.912-21.28-5.76-42.496-8.32-63.84L288.032 310.4h103.2l0.256 0.448 72.48 108.48-20.576-30.08 33.856 51.648 34.144 51.456 68.32 102.848 69.024 102.4 34.56 51.168 25.472 36.992 0.32 0.416 0.256 0.384 0.448 0.64 0.128 0.224 0.448 0.64 0.224 0.32v0.064l0.128 0.192 0.128 0.192 0.256 0.416 0.96 1.44 0.416 0.64 0.16 0.192 0.128 0.16 0.64 0.96 0.192 0.32 1.12 1.664 0.32 0.448 20.96 31.36z" fill="#65B184" ></path><path d="M673.344 664.704a129.344 129.344 0 0 1-3.104 24.544 38.4 38.4 0 0 1-4.544 11.392 14.304 14.304 0 0 1-8 6.176c0.224-0.128 0.384-0.32 0.576-0.48a4.704 4.704 0 0 0 1.024-1.664 5.248 5.248 0 0 0 0.32-0.864 8.064 8.064 0 0 0 0.416-1.92 2.88 2.88 0 0 0 0.16-0.896l0.128-1.568a31.808 31.808 0 0 0-0.064-4.096c-0.032-0.576-0.064-1.184-0.16-1.856a46.784 46.784 0 0 0-1.12-7.296 65.152 65.152 0 0 0-3.488-12.608 83.072 83.072 0 0 0-1.824-4.896c-13.248-33.088-27.36-63.84-47.232-82.112l-0.64-0.512 1.152-0.224c7.424-2.4 8.224-25.6 7.776-55.808 0 0 0.96-5.76 2.624-14.016v-0.096c3.872-19.712 11.52-53.6 18.72-58.24 7.584-4.96 18.112 11.84 21.568 17.952 2.272 13.408 4.416 26.816 6.4 40.256 2.336 16.416 4.64 32.896 6.208 49.408 1.728 16.48 2.496 33.088 2.976 49.696 0.544 16.608 0.96 33.216 0.128 49.728" fill="#24713C" ></path><path d="M660.32 699.424l-0.128 1.568a2.88 2.88 0 0 1-0.16 0.896 8.064 8.064 0 0 1-0.416 1.92 5.248 5.248 0 0 1-0.32 0.864 4.704 4.704 0 0 1-1.6 2.144l-0.064 0.064-0.064 0.032-0.544 0.128-6.848-10.368-68.352-102.848-69.056-102.4-34.496-51.2-12.384-18.112c28.928 40.864 87.072 118.912 139.744 163.776l0.192 0.16 0.64 0.512c19.84 18.24 33.92 49.024 47.2 82.112a83.072 83.072 0 0 1 3.264 9.376 70.24 70.24 0 0 1 2.048 8.128 46.784 46.784 0 0 1 1.12 7.296c0.096 0.64 0.128 1.28 0.16 1.856a31.808 31.808 0 0 1 0.064 4.096" fill="#509970" ></path><path d="M736 555.008v271.456l-20.96-31.392-0.32-0.448-1.12-1.664-0.224-0.32-0.64-0.96-0.096-0.192-0.16-0.16-0.384-0.64-0.96-1.44-0.32-0.416-0.096-0.192-0.128-0.224-0.224-0.32-0.448-0.704-0.128-0.16-0.448-0.672-0.288-0.384-0.32-0.416-0.256-0.448-0.8-1.248-23.36-35.968-27.168-40.864c0.416-0.096 0.8-0.128 1.216-0.352 0.32-0.16 0.736-0.288 1.152-0.512l0.16-0.032a15.584 15.584 0 0 0 6.56-5.344c2.432-3.424 4.096-7.392 5.248-11.392 2.24-8.096 3.2-16.48 3.872-24.768 1.12-16.64 0.96-33.344 0.32-49.92-0.32-8.32-0.704-16.544-1.28-24.832v-0.128l0.16-2.24 0.256-4.96 0.32-5.344 0.544-8.768 0.32-4.64 0.32-4.768 0.48-5.92v-0.128l0.416-5.888 0.512-6.176 0.384-4.608 0.32-3.36 0.32-3.424 0.64-6.88c0.16-1.088 0.256-2.24 0.384-3.424a349.248 349.248 0 0 1 1.504-13.568 1186625.472 1186625.472 0 0 1 1.248-9.92l0.64-4.864 0.736-4.768 0.48-3.072c0.384-2.048 0.672-4.064 1.024-6.016a44.48 44.48 0 0 1 0.448-2.56l0.064-0.32c0.224-1.088 0.384-2.112 0.64-3.168 0.096-0.832 0.288-1.632 0.48-2.464 0.32-1.664 0.704-3.328 1.056-4.928 0.544-2.4 1.12-4.672 1.728-6.752l0.576-2.112c0.192-0.64 0.416-1.344 0.576-2.048l0.64-1.824c0.224-0.576 0.384-1.152 0.64-1.728l0.384-1.088 0.64-1.664a18.048 18.048 0 0 1 3.744-6.496l0.64-0.736c0.352-0.32 0.672-0.64 1.024-0.832a4.16 4.16 0 0 1 0.8-0.544 4.8 4.8 0 0 1 1.696-0.576C722.88 434.752 736 555.008 736 555.008" fill="#299555" ></path><path d="M736 319.744v235.264s-13.12-120.256-34.816-117.632a4.8 4.8 0 0 0-1.696 0.576 4.16 4.16 0 0 0-0.8 0.544c-0.352 0.224-0.64 0.512-1.024 0.832l-0.64 0.704a18.048 18.048 0 0 0-2.24 3.488 26.016 26.016 0 0 0-1.472 3.04l-0.672 1.664-0.416 1.088c-0.224 0.576-0.384 1.152-0.64 1.728l-0.608 1.824c-0.16 0.704-0.384 1.376-0.576 2.048l-0.576 2.112c-0.64 2.08-1.184 4.352-1.728 6.752l-1.056 4.928c-0.192 0.832-0.384 1.6-0.512 2.464-0.224 1.056-0.384 2.08-0.64 3.168v0.32a44.48 44.48 0 0 0-0.48 2.56 120.64 120.64 0 0 0-1.024 6.016l-0.48 3.072-0.704 4.768c-0.256 1.6-0.448 3.232-0.672 4.864a295.232 295.232 0 0 0-1.248 9.92 349.248 349.248 0 0 0-1.504 13.568l-0.352 3.424-0.672 6.88-0.32 3.424-0.32 3.36-0.384 4.608-0.512 6.176c-0.16 1.952-0.32 3.968-0.416 5.888v0.128c-0.192 2.016-0.32 3.968-0.448 5.92-0.16 1.6-0.224 3.2-0.352 4.768l-0.32 4.64-0.544 8.768-0.32 5.344a1162.88 1162.88 0 0 1-0.256 4.96l-0.128 2.24a669.28 669.28 0 0 0-2.048-24.896 1022.144 1022.144 0 0 0-6.56-49.44 1131.296 1131.296 0 0 0-3.36-20.896l-0.64-3.968a1489.184 1489.184 0 0 0-2.368-13.792v-0.064c-2.528-14.72-5.184-29.312-7.968-44.032l-0.384-1.92c-5.888-31.04-12.288-61.856-19.008-92.704l-1.28-6.016a71.04 71.04 0 0 0-0.64-2.976c-0.576-2.72-1.152-5.504-1.792-8.192l-0.128-0.736-0.032-0.224-0.064-0.064-0.032-0.288H736z" fill="#65B184" ></path><path d="M657.632 475.616c-3.456-6.144-13.984-22.912-21.6-17.984-7.2 4.672-14.816 38.56-18.688 58.272v0.096c-1.632 8.288-2.624 14.016-2.624 14.016l-0.096-5.76-0.032-2.336c0-0.8 0-1.632-0.064-2.56v-2.72c0-1.984 0-4.064-0.064-6.336l-0.288-23.872-0.064-6.016-0.096-7.872c-0.064-1.6-0.064-3.2-0.064-4.8l-0.128-9.76-0.032-4.928c0-0.864 0-1.696-0.064-2.56 0-2.432 0-4.896-0.064-7.36-0.064-2.592-0.064-5.216-0.096-7.84l-0.096-6.72-0.096-8-0.064-4.704-0.384-31.36a6.272 6.272 0 0 0 0-1.312v-6.4l0.064-0.288v-0.096a38.72 38.72 0 0 0-0.096-2.24v-0.288c0-14.784 6.56-33.44 11.072-44.512l1.792-4.288a0.64 0.64 0 0 1 0.096-0.32c0.48-1.152 0.96-2.08 1.28-2.88l0.64-1.28c0.064-0.288 0.224-0.512 0.32-0.768v-0.096l0.064 0.288 0.064 0.256 0.032 0.032 0.128 0.736a3956.416 3956.416 0 0 1 18.976 96.544l3.648 19.776c2.24 12.736 4.544 25.472 6.624 38.24" fill="#056737" ></path><path d="M288 663.232s10.592-68.672 19.328-36.736c8.704 32 48.704 132.768 83.712 200-35.712 0.064-103.04 0-103.04 0v-163.264z" fill="#0F8640" ></path><path d="M708.48 785.312l-0.8-1.248-23.36-35.968-27.168-40.864-0.032-0.096-0.064-0.032c0.128-0.064 0.288-0.064 0.416-0.096h0.032l0.032-0.096-0.512 0.128-6.848-10.368-68.352-102.848-69.056-102.4-34.496-51.2-12.384-18.112-0.704-0.96-1.216-1.792-20.576-30.112 33.856 51.648 34.144 51.456 68.32 102.848 69.024 102.4 34.56 51.168 25.472 36.992-0.288-0.448zM390.08 823.904l-3.072-8.544a288.832 288.832 0 0 1-3.072-8.704c-0.992-2.816-1.92-5.728-2.88-8.576l-0.16-0.448a1172.384 1172.384 0 0 1-28.16-97.28 2312.832 2312.832 0 0 1-27.584-128.928 3473.6 3473.6 0 0 1-21.024-130.176c-3.168-21.728-6.08-43.52-8.8-65.312a2299.008 2299.008 0 0 1-6.208-55.2l-0.064-0.896-0.16-1.216a88.64 88.64 0 0 1-0.48-4.448c-0.096-0.512-0.128-1.12-0.16-1.632-0.064-0.224-0.064-0.416-0.064-0.64 2.56 21.344 5.408 42.56 8.32 63.84 2.944 21.76 5.984 43.552 9.28 65.28 6.592 43.424 13.632 86.784 21.824 129.952 7.968 43.2 16.384 86.336 26.784 128.96 2.4 10.752 5.248 21.344 8.064 31.968 2.816 10.624 5.44 21.28 8.672 31.776 3.168 10.496 5.984 21.12 9.408 31.552l9.472 28.16 0.064 0.064v0.448M606.656 779.584c-29.632-58.432-56.64-118.144-86.592-176.32a1247.168 1247.168 0 0 0-47.712-85.696 425.92 425.92 0 0 0-27.968-40.224 161.12 161.12 0 0 0-16.512-17.856c-6.016-5.28-12.8-10.368-20.448-11.648a15.36 15.36 0 0 0-10.88 2.304 26.368 26.368 0 0 0-7.648 8.736 83.808 83.808 0 0 0-8 22.72 321.824 321.824 0 0 0-5.92 48.512 1060.704 1060.704 0 0 0-0.096 98.144c1.28 32.64 3.424 65.344 6.08 97.984 2.368 30.816 5.184 61.536 8.512 92.256l-0.16-1.408a41.568 41.568 0 0 1-0.416-3.264c-0.128-1.6-0.32-3.264-0.576-5.12a446.144 446.144 0 0 1-0.576-5.344l-0.032-0.416a48.416 48.416 0 0 1-0.416-3.552l-0.32-3.36-0.32-2.56c-0.096-1.344-0.288-2.72-0.416-4.064v-0.224l-0.128-1.152a2337.28 2337.28 0 0 1-12.864-159.744c-1.344-32.736-2.048-65.504-0.384-98.24a323.2 323.2 0 0 1 5.792-48.896c1.792-8.064 4.032-16.128 8.16-23.488a28.832 28.832 0 0 1 8.416-9.568 17.408 17.408 0 0 1 12.544-2.72c8.704 1.472 15.552 6.912 21.696 12.352 6.144 5.568 11.584 11.808 16.736 18.208 10.24 12.864 19.264 26.56 27.904 40.512 9.44 15.36 18.336 30.976 26.816 46.88a434.08 434.08 0 0 1 5.376 9.92c2.624 4.864 5.184 9.728 7.68 14.624 2.624 4.832 5.12 9.728 7.584 14.624 14.848 29.216 29.056 58.72 43.008 88.32 13.984 29.632 27.488 59.456 42.08 88.768" fill="#A3CCEF" ></path><path d="M675.36 664.832c-0.64 8.288-1.6 16.64-3.872 24.768a37.376 37.376 0 0 1-5.248 11.392 15.584 15.584 0 0 1-6.56 5.344l-0.16 0.032a14.944 14.944 0 0 1-2.016 0.64l0.032-0.096 0.096-0.032 0.064-0.064a14.336 14.336 0 0 0 8-6.176 38.4 38.4 0 0 0 4.544-11.392 129.28 129.28 0 0 0 3.104-24.544c0.864-16.512 0.416-33.12-0.128-49.728a659.68 659.68 0 0 0-2.976-49.696 1025.248 1025.248 0 0 0-6.24-49.408 2743.232 2743.232 0 0 0-12.992-78.496l-3.648-19.776a3956.416 3956.416 0 0 0-18.976-96.576c0.64 2.72 1.216 5.504 1.792 8.224l0.64 2.976 1.28 6.016c6.72 30.848 13.12 61.696 19.008 92.672l0.384 1.984c2.784 14.688 5.44 29.28 8 44.032 0.768 4.608 1.6 9.248 2.336 13.824l0.64 3.968c1.184 6.944 2.304 13.952 3.36 20.864 2.464 16.448 4.896 32.928 6.56 49.472 0.832 8.32 1.504 16.64 2.048 24.896v0.128c0.512 8.288 0.928 16.512 1.248 24.8 0.64 16.64 0.8 33.28-0.32 49.952" fill="#A3CCEF" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#299555" ></path></symbol><symbol id="bf-max" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#00ACAC" ></path><path d="M644.448 715.456c-0.64 1.728-1.28 3.456-2.016 5.184a106.528 106.528 0 0 1-13.408 24.96c-5.44 7.744-11.904 14.784-19.008 21.056l-0.128 0.192a7.744 7.744 0 0 0-0.64 0.512l-0.128 0.096c-14.208 12.256-30.752 21.76-48.48 28.16a161.824 161.824 0 0 1-55.296 9.728 126.048 126.048 0 0 1-40.416-6.72c-9.696-20.8-8.384-67.712 36.16-80.448h0.032c2.016 0.064 4 0 5.984-0.064 8.096-0.32 16.32-1.824 23.872-5.056a77.568 77.568 0 0 0 28.416-21.504c5.632-1.856 58.656-18.24 85.056 23.904" fill="#00848C" ></path><path d="M573.248 658.88v0.608c0.032 0.672 0 1.28-0.096 1.92v0.32c-0.032 0.576-0.224 1.152-0.256 1.664l-0.256 1.472c-1.152 5.6-3.552 10.88-6.496 15.808a79.936 79.936 0 0 1-35.84 30.816c-7.328 3.168-15.264 4.48-23.264 4.8a92.096 92.096 0 0 1-46.4-9.664 61.76 61.76 0 0 1-18.624-14.88 64.192 64.192 0 0 1-10.976-21.12l-0.032-0.16v-0.192a42.976 42.976 0 0 1 0-10.656l0.032-0.384c0.032-0.128 0.032-0.288 0.096-0.416l0.032-0.128v-0.128l0.096-0.256v-0.128a2.24 2.24 0 0 1 0.096-0.544l0.032-0.128a1.6 1.6 0 0 1 0.096-0.512l0.032-0.064v-0.096a7.744 7.744 0 0 1 0.32-1.472l0.224-0.896 0.32-1.056c0.064-0.352 0.16-0.768 0.32-1.12a4.832 4.832 0 0 1 4.48 4.32c0.416 3.008 1.152 5.984 2.112 8.896 1.664 3.936 3.552 7.808 5.824 11.456 5.856 9.728 14.624 19.072 25.216 23.52 23.648 9.856 52.384 8.64 74.944-4 22.944-12.8 26.944-28.096 27.744-34.624v-0.192l0.096-0.96v-0.096c0.096-0.576 0.096-1.024 0.096-1.344l0.032-0.384" fill="#008089" ></path><path d="M681.024 353.792c-9.312 50.016-33.856 89.056-67.2 116.416l0.992-1.344c2.88-3.936 5.6-8 8.128-12.16 5.12-8.32 9.408-17.152 12.672-26.4l0.032-0.064 0.192-0.576c3.936-11.584 6.112-23.904 5.984-36.192a105.888 105.888 0 0 0-7.04-36.16 117.312 117.312 0 0 0-9.024-18.752l-1.184-1.92a104.032 104.032 0 0 0-6.144-9.28c-0.448-0.8-0.992-1.504-1.536-2.208l-0.64-0.832a72.416 72.416 0 0 0-3.616-4.672l-0.128-0.192a160.448 160.448 0 0 0-20.512-21.28l0.032 0.096a97.12 97.12 0 0 0-8.576-6.528c-2.912-2.016-5.728-4.256-8.736-6.112-6.208-3.456-12.32-7.2-18.976-9.728-6.432-3.104-13.312-4.992-20.064-7.168l-10.4-2.368c-3.424-0.864-6.976-1.184-10.464-1.76a182.912 182.912 0 0 0-42.432-0.8c-14.016 1.344-28.064 3.872-41.472 8.288A182.784 182.784 0 0 1 507.136 256c10.56 0.064 21.088 0.832 31.552 2.56 62.976 9.888 114.432 46.656 142.368 95.232" fill="#03C7CB" ></path><path d="M649.984 693.248c-1.184 7.552-2.976 15.008-5.536 22.208-26.4-42.144-79.424-25.76-85.056-23.904 0.64-0.736 1.248-1.504 1.824-2.304l0.576-0.704a65.12 65.12 0 0 0 6.432-10.496 48.608 48.608 0 0 0 4-10.688c0.128-0.672 0.32-1.28 0.416-1.952 0.256-1.216 0.384-2.464 0.512-3.68v-0.32a9.024 9.024 0 0 0 0.096-1.92v-0.608l-0.032 0.384v-0.256a130.56 130.56 0 0 0-0.064-8.32 51.616 51.616 0 0 0-2.048-12.544l-0.512-1.664a52.928 52.928 0 0 0-0.704-1.92c-4.064-11.136-11.52-20.48-19.616-25.664a171.04 171.04 0 0 0 18.656-4.032c1.28-0.32 2.496-0.64 3.744-1.024 1.952-0.544 3.84-1.152 5.824-1.728a183.68 183.68 0 0 0 25.856-10.4c5.664-2.784 11.2-5.856 16.672-9.184l0.096 0.128 0.864 1.408 7.04 12.544c2.688 4.576 4.864 9.408 7.04 14.208 3.84 8.512 7.168 17.312 9.696 26.304 1.28 4.512 2.368 9.056 3.264 13.632 0.896 4.512 1.408 9.184 1.92 13.76v0.32c0.608 9.44 0.48 19.04-0.96 28.416" fill="#006570" ></path><path d="M638.848 393.504c0.128 7.648-0.64 15.328-2.24 22.784l-0.704 2.88a145.6 145.6 0 0 1-1.216 4.704c-0.096 0.32-0.192 0.576-0.224 0.896l-1.344 4.096-0.032 0.096-0.16 0.48a135.264 135.264 0 0 1-12.256 25.888 193.888 193.888 0 0 1-8 12c-1.088 1.504-2.208 2.976-3.392 4.448-62.144 46.752-92.832 31.488-103.104 22.848a214.496 214.496 0 0 0 51.584-33.44 52.256 52.256 0 0 0 13.12-15.392c1.92-3.168 3.2-6.592 4.064-10.176 3.424-14.944-1.6-28.48-12.896-40.096a66.56 66.56 0 0 0-21.696-15.04l-2.336-0.864c-0.736-0.288-1.536-0.544-2.336-0.8a109.76 109.76 0 0 0-1.92-0.544l-0.448-0.128a101.952 101.952 0 0 0-27.168-3.072h-0.128c-49.216-3.072-165.568 25.984-149.824-43.84a193.024 193.024 0 0 1 74.464-59.072l0.256-0.064c6.624-2.016 13.312-3.552 20.16-4.736l0.448-0.064c0.032 0 0.096 0 0.128-0.064l0.768-0.128a233.28 233.28 0 0 1 20.064-2.304 195.776 195.776 0 0 1 44.672 1.984c1.504 0.224 3.04 0.448 4.48 0.736 1.12 0.224 2.176 0.416 3.264 0.704l5.792 1.408 4.48 1.088c5.088 1.728 10.24 3.264 15.2 5.312 0.192 0.032 0.32 0.128 0.512 0.192 1.312 0.576 2.656 1.152 3.936 1.824a60.8 60.8 0 0 1 5.984 2.752c4.288 2.176 8.352 4.704 12.544 7.04 2.976 1.824 5.728 4 8.576 6.016 2.848 2.016 5.728 4.128 8.256 6.304l0.032 0.064c9.152 7.872 17.344 16.896 24.448 26.624 7.104 9.728 13.088 20.288 17.344 31.52 4.16 11.232 6.624 23.136 6.848 35.136" fill="#00ACAC" ></path><path d="M609.28 471.744c-1.728 2.272-3.616 4.544-5.44 6.816-5.856 6.72-11.904 13.12-18.304 19.2-1.152 1.056-2.304 2.08-3.52 3.104-1.344 1.152-2.688 2.336-4.096 3.456l-5.44 4.384c0 0.096-0.128 0.128-0.192 0.224l-0.672 0.48a297.472 297.472 0 0 1-9.632 7.296l-1.28 0.896-1.888 1.312c-2.304 1.664-4.672 3.296-7.04 4.896l-3.808 2.56-1.92 1.28c-0.64 0.48-1.312 0.864-1.92 1.28H544l-3.84 2.464c-1.312 0.864-2.592 1.696-3.904 2.496h-0.064a625.984 625.984 0 0 1-23.776 13.92c-0.096 0-0.224 0.064-0.352 0.16l-3.84 2.08c-1.344 0.768-2.72 1.536-4.128 2.24l-0.192 0.064c-5.472 2.88-11.04 5.664-16.576 8.352l-0.128 0.064-8.064 3.84-2.432 1.184-5.312 2.432a282.88 282.88 0 0 1-6.464 2.88l-1.376 0.64-0.64 0.256c-1.472 0.64-2.976 1.344-4.48 1.952-1.28 0.544-2.464 1.024-3.712 1.6l-0.8 0.32a531.2 531.2 0 0 1-7.456 3.104l-1.6 0.64c-0.448 0.16-0.96 0.32-1.376 0.544a10.848 10.848 0 0 0-1.056 0.448l-1.44 0.544-6.304 2.496-4.736 1.792-4.096 1.536-2.144 0.736-2.112 0.8-0.096 0.064v-61.664s11.904-3.36 29.216-9.408a538.24 538.24 0 0 0 52.96-21.728c0.832-0.32 1.664-0.8 2.464-1.152 10.24 8.64 40.96 23.904 103.104-22.88" fill="#00ACAC" ></path><path d="M574.944 435.616a33.696 33.696 0 0 1-4.64 11.104c-0.576 0.864-1.152 1.856-1.76 2.688a31.264 31.264 0 0 0-0.96-7.328c-2.688-11.04-10.976-19.84-20.352-25.824a79.488 79.488 0 0 0-8.736-4.768l-0.64-0.256a72.64 72.64 0 0 0-11.136-3.904c-0.544-0.192-1.088-0.32-1.6-0.448l-2.24-0.544c-0.128-0.032-0.224-0.032-0.32-0.096a86.496 86.496 0 0 0-19.584-2.08 84.288 84.288 0 0 0-40.576 9.824 56.064 56.064 0 0 0-15.648 12.288c-3.68 4.224-6.336 8.96-7.936 14.368a29.76 29.76 0 0 0-1.344 7.904l-2.784 2.336a89.664 89.664 0 0 1 1.92-30.08l0.416-2.368c0.352-1.6 0.8-3.168 1.344-4.672l0.768-2.016c0.032-0.064 0.032-0.16 0.128-0.256 0.32-0.736 0.64-1.504 1.024-2.24a50.24 50.24 0 0 1 10.56-14.176c2.56-2.464 5.44-4.736 8.512-6.752l0.224-0.192 2.144-1.344a79.808 79.808 0 0 1 13.12-6.304l0.48-0.16 2.432-0.8 2.72-0.864h0.224a4.352 4.352 0 0 1 0.704-0.256 4.352 4.352 0 0 1 0.704-0.224l1.472-0.384h0.096a16.64 16.64 0 0 1 1.408-0.352 74.272 74.272 0 0 1 4.672-0.96h0.096c2.016-0.32 4.064-0.64 6.208-0.864a39.04 39.04 0 0 1 3.424-0.32l1.184-0.032c0-0.064 0.064-0.064 0.064-0.064h0.832l1.056-0.096H506.144c9.056 0 18.4 0.576 27.2 3.04l0.416 0.128 1.92 0.544a35.552 35.552 0 0 1 4.672 1.696l2.304 0.96c7.264 3.36 13.792 8.32 19.392 14.016 11.296 11.648 16.32 25.184 12.896 40.128" fill="#006368" ></path><path d="M654.4 556.32a167.968 167.968 0 0 1-9.248 8.512h-0.032a246.176 246.176 0 0 1-23.68 17.44l-0.32 0.192h-0.096v0.064c-5.44 3.328-11.008 6.4-16.672 9.184a209.376 209.376 0 0 1-25.856 10.4c-1.952 0.576-3.84 1.184-5.824 1.728l-3.744 1.024a186.432 186.432 0 0 1-18.656 4.032 208.32 208.32 0 0 1-66.816 0.192l-0.672-0.128a208.16 208.16 0 0 1-61.12-19.776v-0.64c1.44-0.512 2.848-0.992 4.224-1.6l4.096-1.504 4.736-1.792 3.648-1.376 4.096-1.664a10.848 10.848 0 0 1 1.056-0.448c0.448-0.224 0.96-0.384 1.376-0.576a190.208 190.208 0 0 0 9.856-4.032l3.68-1.6c1.728-0.64 3.488-1.408 5.152-2.24a282.88 282.88 0 0 0 7.808-3.52c1.792-0.736 3.584-1.536 5.344-2.4l2.464-1.152 8.16-3.872h0.032a199.232 199.232 0 0 0 5.056 3.456l0.544 0.32c3.104 1.984 6.272 3.84 9.504 5.536l0.224 0.128 0.224 0.16 1.376 0.64c0.096 0.064 0.224 0.096 0.32 0.192l1.6 0.8 0.8 0.352a1.6 1.6 0 0 0 0.384 0.192l2.368 1.088c1.376 0.672 2.752 1.28 4.16 1.824 1.376 0.64 2.816 1.152 4.224 1.664a49.376 49.376 0 0 0 3.456 1.216l0.8 0.288c1.472 0.512 2.88 0.96 4.352 1.376a141.184 141.184 0 0 0 91.744-3.2l0.608-0.224c1.184-0.448 2.4-0.896 3.52-1.44 1.408-0.512 2.784-1.152 4.096-1.76l1.28-0.64 2.688-1.216c1.792-0.896 3.52-1.824 5.248-2.752l0.032-0.064c2.88-1.6 5.696-3.264 8.384-5.12 0.384-0.16 0.736-0.416 1.088-0.64l0.224-0.192c0.448-0.32 0.832-0.64 1.248-0.864 1.024-0.672 2.08-1.44 3.04-2.24 0.288-0.16 0.512-0.352 0.768-0.544l1.248-0.96c0.8-0.544 1.6-1.216 2.4-1.824" fill="#007278" ></path><path d="M464.928 798.624a89.92 89.92 0 0 1-13.856-6.208 81.888 81.888 0 0 1-21.824-17.6 93.376 93.376 0 0 1-15.264-23.744c-1.696-3.424-2.88-7.2-4.352-10.784-0.256-0.96-0.544-1.792-0.8-2.624a29.92 29.92 0 0 1-0.768-2.656l-0.736-2.72-0.064-0.256v-0.16l-0.608-2.208v-0.032l-0.032-0.16-0.448-2.016-0.192-0.768-0.16-0.96c-0.064-0.288-0.128-0.608-0.128-0.896-0.064-0.096-0.064-0.128-0.064-0.224v-0.192l-0.032-0.32-0.192-0.832-0.032-0.352-0.128-0.96-0.16-0.992c0-0.352 0-0.704-0.064-1.056v-0.064a49.92 49.92 0 0 1-0.032-7.328 47.104 47.104 0 0 1 0.768-5.984 46.912 46.912 0 0 1 3.072-10.24 62.336 62.336 0 0 1 5.6-10.24c0-0.096 0.096-0.16 0.16-0.224a14.592 14.592 0 0 1 1.696-2.304 54.848 54.848 0 0 1 11.52-11.072l1.504-0.96 0.032-0.064 0.064 0.064 1.6-1.024 0.032 0.16V670.944l0.128 0.352 0.064 0.064 0.064 0.32a3.68 3.68 0 0 0 0.416 1.088l0.032 0.224c0 0.032 0 0.096 0.064 0.128l0.032 0.192c1.024 3.2 2.176 6.304 3.584 9.312l0.064 0.064c1.6 3.36 3.52 6.592 5.76 9.6 5.024 6.464 11.552 11.616 18.624 15.68 12.64 6.72 26.944 10.016 41.216 10.208-44.544 12.736-45.856 59.68-36.16 80.448" fill="#006570" ></path><path d="M674.336 776.064c-15.68 28.16-36.864 48.96-63.808 66.56a167.552 167.552 0 0 1-54.944 23.424c-32.832 7.744-61.376 6.976-87.232 1.216a187.488 187.488 0 0 1-88.832-46.944c-12.16-19.648-17.536-62.176 28.608-83.584a14.432 14.432 0 0 1 0.32 1.024l0.736 2.592v0.096l0.128 0.32a92.288 92.288 0 0 0 10.496 23.328 84 84 0 0 0 45.76 37.024l0.928 0.352c12.416 4.32 25.696 6.272 38.816 6.496a162.816 162.816 0 0 0 54.912-9.12l1.44-0.48a152.128 152.128 0 0 0 49.44-28.704l1.024-0.96-0.16 0.16c7.264-6.464 13.76-13.696 19.36-21.664 5.536-7.936 10.304-16.48 13.6-25.6 3.744-8.96 6.08-18.4 7.424-28 1.344-9.6 1.344-19.328 0.544-28.96v-0.224a163.584 163.584 0 0 0-2.176-13.984 140.928 140.928 0 0 0-3.488-13.728l-0.064-0.352a184.032 184.032 0 0 0-10.368-25.92h0.064c-1.12-2.144-2.176-4.384-3.36-6.496l-2.112-4.096a236.8 236.8 0 0 0-6.72-11.584c-0.736-1.344-1.6-2.624-2.432-3.904l-0.768-1.216-0.224-0.32-0.128-0.16-0.096-0.128v-0.064h0.096l0.32-0.192c8.256-5.344 16.128-11.2 23.68-17.472l0.032 0.032a314.144 314.144 0 0 1 24.736 33.024c1.472 2.24 2.88 4.512 4.224 6.784 0.64 1.152 1.344 2.24 1.984 3.424l2.368 4.256 1.856 3.552a132.416 132.416 0 0 1 3.488 7.04c25.76 55.328 17.12 105.344-9.472 153.152" fill="#00ABB6" ></path><path d="M506.016 375.072H504.32l-0.128 0.032h-1.536l-1.504 0.096h-0.416c-0.416 0.064-0.864 0.064-1.28 0.096a39.04 39.04 0 0 0-2.24 0.224 70.528 70.528 0 0 0-7.36 0.96h-0.096a74.272 74.272 0 0 0-3.072 0.608h-0.128l-1.472 0.32a16.64 16.64 0 0 0-1.408 0.384h-0.096l-1.472 0.384a3.968 3.968 0 0 0-0.704 0.224 3.68 3.68 0 0 0-0.96 0.288c-0.096 0-0.192 0-0.32 0.064a3.264 3.264 0 0 0-0.64 0.192c-0.64 0.128-1.184 0.32-1.76 0.512l-2.4 0.864-0.448 0.16a33.12 33.12 0 0 0-3.168 1.216l-2.432 1.056a74.976 74.976 0 0 0-7.232 3.84c-0.128 0-0.224 0.128-0.352 0.16a33.824 33.824 0 0 0-2.112 1.376c-0.064 0.064-0.224 0.096-0.32 0.192a68.288 68.288 0 0 0-4.416 3.2c-0.96 0.8-1.92 1.536-2.816 2.4a3.328 3.328 0 0 0-0.704 0.64 13.856 13.856 0 0 0-6.528 7.2 29.952 29.952 0 0 0-1.984 2.848l-0.192 0.256c-0.576 0.896-1.056 1.824-1.536 2.72a11.52 11.52 0 0 0-0.8 1.696 9.312 9.312 0 0 0-0.672 1.312l-0.352 0.896c-0.096 0.096-0.096 0.192-0.128 0.256l-0.16 0.32a40.192 40.192 0 0 0-1.952 6.336l-0.448 2.432a89.664 89.664 0 0 0-1.92 30.08l-0.16 0.16s-86.656-7.904-93.888-9.728a132.8 132.8 0 0 1-2.176-0.672 10.848 10.848 0 0 1-1.056-0.448 21.824 21.824 0 0 1-8.32-5.44 21.888 21.888 0 0 1-3.328-4.16 25.248 25.248 0 0 1-2.944-23.264l0.32-1.248 0.288-1.184 0.032-0.096 0.224-0.96 0.256-1.088 0.576-2.4 0.16-0.48 0.32-1.408 0.864-3.168c0.96-3.104 2.08-7.104 3.616-11.776l1.792-5.44c0.384-0.896 0.736-1.888 1.088-2.88l1.92-4.896c0.64-1.664 1.344-3.296 2.016-4.896l2.176-4.896 1.728-3.584 1.152-2.304a144.704 144.704 0 0 1 14.88-23.424c-15.744 69.824 100.608 40.768 149.824 43.84" fill="#008B92" ></path><path d="M574.944 435.616a33.696 33.696 0 0 1-4.64 11.104c-0.576 0.864-1.152 1.856-1.76 2.688a31.264 31.264 0 0 0-0.96-7.328c-2.688-11.04-10.976-19.84-20.352-25.824a79.488 79.488 0 0 0-8.736-4.768l-0.64-0.256a72.64 72.64 0 0 0-11.136-3.904c-0.544-0.192-1.088-0.32-1.6-0.448l-2.24-0.544c-0.128-0.032-0.224-0.032-0.32-0.096 6.816-0.224 21.504-0.736 23.68-9.984 1.568-6.656-3.136-12.032-7.424-15.2h-0.032a22.368 22.368 0 0 0-5.024-2.784l1.92 0.544a35.552 35.552 0 0 1 4.672 1.696l2.304 0.96c7.264 3.36 13.792 8.32 19.392 14.016 11.296 11.648 16.32 25.184 12.896 40.128" fill="#048188" ></path><path d="M609.28 471.744c-1.728 2.272-3.616 4.544-5.44 6.816-5.856 6.72-11.904 13.12-18.304 19.2-1.152 1.056-2.304 2.08-3.52 3.104-1.344 1.152-2.688 2.336-4.096 3.456l-5.44 4.384c0 0.096-0.128 0.128-0.192 0.224l-0.672 0.48a297.472 297.472 0 0 1-9.632 7.296l-1.28 0.896-1.888 1.312c-0.832 0.64-1.696 1.216-2.56 1.824l-4.48 3.072-3.808 2.56-1.92 1.28c-0.64 0.48-1.312 0.864-1.92 1.28H544l-3.84 2.464c-1.312 0.864-2.592 1.696-3.904 2.496h-0.064a625.984 625.984 0 0 1-23.776 13.92c-0.096 0-0.224 0.064-0.352 0.16l-3.84 2.08c-1.344 0.768-2.72 1.536-4.128 2.24l-0.192 0.064c-5.472 2.88-11.04 5.664-16.576 8.352l-0.128 0.064-8.064 3.84-2.432 1.184-5.312 2.432a282.88 282.88 0 0 1-6.464 2.88l-1.376 0.64-0.64 0.256c-1.472 0.64-2.976 1.344-4.48 1.952-1.28 0.544-2.464 1.024-3.712 1.6l-0.8 0.32c-3.008 1.28-6.048 2.528-9.056 3.712-0.448 0.192-0.96 0.352-1.376 0.576a10.848 10.848 0 0 0-1.056 0.448l-1.44 0.544a67.776 67.776 0 0 1-2.656 1.12l-3.648 1.376-4.736 1.792-4.096 1.536-2.144 0.736-2.112 0.8-0.096-5.184v-56.416s11.904-3.36 29.216-9.408a538.24 538.24 0 0 0 52.96-21.728c0.832-0.32 1.664-0.8 2.464-1.152 10.24 8.64 40.96 23.904 103.104-22.88" fill="#008B92" ></path><path d="M572.64 664.864c-1.152 5.6-3.552 10.88-6.496 15.808a79.936 79.936 0 0 1-35.84 30.816c-7.328 3.168-15.264 4.48-23.264 4.8a92.16 92.16 0 0 1-46.4-9.664 61.824 61.824 0 0 1-18.624-14.88 64.192 64.192 0 0 1-10.976-21.12l0.64 2.048v0.096l0.064 0.224 0.064 0.032 0.64 1.92c-0.16-0.544-0.416-1.056-0.608-1.632 1.024 3.2 2.176 6.304 3.584 9.312l0.064 0.064c1.6 3.36 3.52 6.592 5.76 9.6 5.024 6.464 11.552 11.616 18.624 15.68 12.64 6.72 26.944 10.016 41.216 10.208h0.032c2.016 0.064 4 0.032 5.984-0.064 8.096-0.32 16.32-1.824 23.872-5.056a77.568 77.568 0 0 0 28.416-21.504c0.64-0.736 1.248-1.504 1.824-2.304l0.576-0.704a65.12 65.12 0 0 0 6.432-10.496 48.608 48.608 0 0 0 4-10.688c0.224-0.96 0.352-1.952 0.544-2.976a53.952 53.952 0 0 0-0.128 0.48" fill="#0AE0DA" ></path><path d="M652.896 664.64v-0.224a163.616 163.616 0 0 0-2.176-13.984 140.928 140.928 0 0 0-3.488-13.728l-0.064-0.32a184.032 184.032 0 0 0-10.368-25.92h0.064c-1.12-2.176-2.176-4.384-3.36-6.528l-2.112-4.096a236.8 236.8 0 0 0-5.12-8.896l-1.6-2.688c-0.736-1.344-1.6-2.624-2.432-3.904l-0.768-1.216 0.512 0.96 7.04 12.48c2.688 4.608 4.864 9.44 7.04 14.24 3.84 8.544 7.168 17.312 9.696 26.304 1.28 4.512 2.368 9.056 3.264 13.632 0.896 4.512 1.408 9.184 1.92 13.76v0.32c0.608 9.44 0.48 19.04-0.96 28.416a123.104 123.104 0 0 1-7.552 27.392 106.624 106.624 0 0 1-13.408 24.96c-5.44 7.744-11.904 14.784-19.008 21.056l-0.128 0.192-0.64 0.512-0.128 0.096c-14.208 12.256-30.752 21.76-48.48 28.16a161.728 161.728 0 0 1-55.296 9.728 126.048 126.048 0 0 1-40.416-6.72 89.92 89.92 0 0 1-13.856-6.208 81.888 81.888 0 0 1-21.824-17.6 93.376 93.376 0 0 1-15.264-23.744c-1.696-3.424-2.88-7.2-4.352-10.784-0.256-0.96-0.544-1.792-0.8-2.624a30.368 30.368 0 0 1-0.768-2.656l-0.736-2.72a56.928 56.928 0 0 0 1.184 5.056l-0.256-0.896-0.256-1.056a72.896 72.896 0 0 1-0.768-2.944l-0.448-1.984-0.032-0.32-0.224-0.64 0.032 0.416c0.064 0.16 0.064 0.32 0.096 0.512a81.536 81.536 0 0 0 1.792 7.328l0.736 2.624v0.064l0.128 0.32c1.28 3.552 2.368 7.136 3.968 10.656a95.904 95.904 0 0 0 6.528 12.672 84 84 0 0 0 45.76 37.024l0.928 0.352c12.416 4.32 25.696 6.272 38.816 6.496a162.816 162.816 0 0 0 54.912-9.12l1.44-0.48a152.128 152.128 0 0 0 49.44-28.672l0.992-0.992-0.128 0.192c7.264-6.496 13.76-13.76 19.36-21.696 5.536-7.936 10.304-16.48 13.6-25.6 3.744-8.96 6.08-18.4 7.424-28 1.344-9.6 1.344-19.328 0.544-28.96M641.824 393.472c0.128 12.288-2.048 24.608-5.984 36.16l-0.192 0.608-0.032 0.064a137.152 137.152 0 0 1-12.672 26.4 171.52 171.52 0 0 1-8.128 12.16c-0.352 0.448-0.64 0.896-1.024 1.344a227.84 227.84 0 0 1-8.064 10.048l-0.096 0.064a242.112 242.112 0 0 1-25.728 25.248c-9.184 7.808-18.88 14.944-28.864 21.632-20.064 13.28-41.536 24.32-63.648 33.568h-0.032v-0.064c2.784-1.312 5.6-2.688 8.32-4.064l8.32-4.256 0.128-0.096c1.408-0.704 2.784-1.472 4.16-2.24 1.312-0.64 2.592-1.376 3.904-2.08a290.464 290.464 0 0 0 24-14.08h0.096l3.872-2.496c1.28-0.8 2.56-1.6 3.84-2.464h0.128c0.608-0.416 1.28-0.8 1.92-1.28l5.888-3.84c1.472-0.96 2.912-1.984 4.352-3.072a109.056 109.056 0 0 0 5.696-4.032 297.472 297.472 0 0 0 9.6-7.296l0.704-0.48c0.064-0.096 0.16-0.128 0.192-0.224l5.44-4.384c1.408-1.12 2.752-2.304 4.128-3.456l3.52-3.072c6.4-6.144 12.416-12.48 18.272-19.232 1.824-2.24 3.712-4.544 5.44-6.784a193.888 193.888 0 0 0 11.424-16.448c4.96-8.224 9.12-16.864 12.224-25.92l0.16-0.448v-0.096l1.376-4.096c0.032-0.32 0.128-0.576 0.224-0.896a81.28 81.28 0 0 0 1.216-4.704l0.672-2.88a100.672 100.672 0 0 0-4.576-57.92 134.816 134.816 0 0 0-17.344-31.52 157.696 157.696 0 0 0-24.448-26.624l-0.032-0.064a122.272 122.272 0 0 0-8.256-6.304c-2.88-2.016-5.6-4.16-8.576-6.016-4.16-2.336-8.256-4.864-12.544-7.04a60.8 60.8 0 0 0-5.984-2.752c-1.28-0.672-2.624-1.28-3.936-1.824-0.192-0.064-0.32-0.16-0.512-0.192-4.96-2.048-10.112-3.584-15.232-5.312l-4.448-1.088-5.792-1.408a75.648 75.648 0 0 0-7.744-1.44 195.776 195.776 0 0 0-44.672-1.984c-6.72 0.48-13.44 1.248-20.064 2.304l-0.768 0.128c-0.032 0.064-0.096 0.064-0.128 0.064l-0.448 0.064a164 164 0 0 0-20.16 4.736c13.408-4.416 27.456-6.944 41.472-8.288 14.08-1.312 28.352-1.152 42.432 0.8 3.52 0.576 7.04 0.896 10.464 1.76l10.4 2.368c6.72 2.176 13.632 4.064 20.064 7.168 6.656 2.528 12.768 6.272 18.976 9.728 3.008 1.856 5.824 4.096 8.736 6.112 2.944 2.048 5.76 4.096 8.576 6.528L592 298.24c7.488 6.4 14.336 13.568 20.512 21.248l0.128 0.192c1.248 1.568 2.432 3.072 3.616 4.672l0.64 0.832a104.032 104.032 0 0 1 6.88 10.24c1.28 2.08 2.464 4.16 3.616 6.336l-0.8-1.6c3.2 5.504 5.952 11.2 8.224 17.184 4.384 11.52 6.816 23.808 7.008 36.16" fill="#0AE0DA" ></path><path d="M432.672 652.288l-0.32 1.12-0.288 1.056-0.224 0.896a7.744 7.744 0 0 0-0.32 1.472v0.096l-0.032 0.064a1.6 1.6 0 0 0-0.096 0.512l-0.032 0.128a2.24 2.24 0 0 0-0.096 0.544 1.28 1.28 0 0 0-0.096 0.384v0.128l-0.032 0.128-0.128 0.8a30.08 30.08 0 0 0-0.352 5.344c0 1.76 0.128 3.52 0.32 5.312v0.16l-0.288 0.16a6.528 6.528 0 0 0-0.64 0.416l-0.16 0.128-0.544 0.32h-0.032c-0.48 0.32-0.96 0.704-1.472 0.992a54.848 54.848 0 0 0-12.032 11.68c-0.384 0.544-0.832 1.088-1.184 1.696a27.104 27.104 0 0 0-2.56 3.968 62.336 62.336 0 0 0-4.544 10.048 46.912 46.912 0 0 0-2.144 9.184 47.104 47.104 0 0 0-0.352 10.816v0.064l0.096 1.056c0 0.352 0 0.704 0.064 1.056l0.32 2.048 0.032 0.352 0.384 2.272v0.48c0.064 0.096 0.064 0.192 0.064 0.288l0.448 2.016 0.064 0.096v0.128l0.16 0.736a81.536 81.536 0 0 0 1.472 6.304c-46.144 21.408-40.768 63.936-28.608 83.584a202.304 202.304 0 0 1-13.216-13.632c-26.944-30.656-42.112-66.688-46.112-107.328a29.92 29.92 0 0 1 2.496-16.224c3.328-6.176 7.136-12 11.52-17.504l98.464-13.344z" fill="#05D8D8" ></path><path d="M704 438.24a162.56 162.56 0 0 1-13.76 65.824 166.816 166.816 0 0 1-35.84 52.16l-2.4 1.92-1.28 0.96c-0.224 0.192-0.448 0.384-0.736 0.544l-3.04 2.24-1.28 0.864-0.192 0.128-1.088 0.736c-2.688 1.824-5.504 3.52-8.384 5.12h-0.032c-1.728 0.96-3.456 1.888-5.248 2.784-0.896 0.384-1.792 0.832-2.656 1.248l-1.28 0.608a56.544 56.544 0 0 1-5.152 2.176l-2.496 1.024-0.576 0.224a141.184 141.184 0 0 1-91.744 3.2l-4.384-1.376-0.8-0.288H521.6c-0.032 0-0.096 0-0.096-0.064a98.72 98.72 0 0 1-3.328-1.152l-4.224-1.664c-1.408-0.64-2.784-1.184-4.16-1.824a38.208 38.208 0 0 1-2.752-1.28l-0.8-0.352-1.6-0.8c-0.096-0.096-0.224-0.128-0.32-0.192a13.376 13.376 0 0 1-1.6-0.8c-0.096 0-0.128-0.064-0.224-0.128a135.904 135.904 0 0 1-9.504-5.536l-0.544-0.32v-0.032a199.232 199.232 0 0 1-5.056-3.424 382.016 382.016 0 0 0 63.68-33.6c9.952-6.656 19.648-13.792 28.832-21.6 9.216-7.744 17.856-16.32 25.728-25.248l0.096-0.064a227.84 227.84 0 0 0 8.064-10.048c33.376-27.36 57.92-66.4 67.232-116.416a178.304 178.304 0 0 1 8.576 16.96c0.416 0.96 0.864 1.888 1.216 2.816 0.32 0.64 0.576 1.312 0.8 1.984l1.472 3.648 1.376 3.84 1.28 3.84a132.96 132.96 0 0 1 3.232 11.2c0.32 1.248 0.64 2.432 0.896 3.68a119.712 119.712 0 0 1 1.92 9.696 96.032 96.032 0 0 1 1.056 7.552l0.32 2.752c0.32 3.36 0.64 6.816 0.704 10.24 0.096 2.048 0.128 4.16 0.128 6.24" fill="#00B9B9" ></path><path d="M683.808 622.944c-16.32-11.072-34.528-7.04-36.64 13.408a184.032 184.032 0 0 0-10.368-25.92h0.064c-1.12-2.144-2.176-4.384-3.36-6.496l-2.112-4.096a236.8 236.8 0 0 0-6.72-11.584c-0.736-1.344-1.6-2.624-2.432-3.904l-0.768-1.216-0.224-0.32-0.128-0.16-0.096-0.128v-0.064h0.096l0.32-0.192c8.256-5.344 16.128-11.2 23.68-17.472l0.032 0.032a314.144 314.144 0 0 1 22.464 29.536l2.272 3.488c1.472 2.24 2.848 4.512 4.224 6.784 0.64 1.152 1.344 2.24 1.984 3.424l2.368 4.256 1.856 3.552a132.416 132.416 0 0 1 3.488 7.04" fill="#03C7CB" ></path></symbol><symbol id="bf-skp" viewBox="0 0 1024 1024"><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752z" fill="#FFFFFF" ></path><path d="M690.752 0a32 32 0 0 1 22.624 9.376l173.248 173.248a32 32 0 0 1 9.376 22.624V992a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V32a32 32 0 0 1 32-32h530.752zM672 32H160v960h704V224h-160a32 32 0 0 1-32-32V32z" fill="#E8445A" ></path><path d="M597.824 323.136l169.472 137.184-35.68 314.88-342.56 96.768-85.6-232.224-48.16-274.4 342.528-42.208z m-129.056 331.84l-98.688 22.304 21.44 69.12 98.656-28.096-21.44-63.36z m63.04-150.08l-200.416 27.008 12.512 57.408 124.864-17.6 15.488 43.392 129.6-23.456-82.048-86.784z m68.992-151.264l-300.288 36.352 12.48 57.408 233.088-28.128 73.856 76.224 128.384-23.456-147.52-118.4z" fill="#E8445A" ></path></symbol></svg>',v=(v=document.getElementsByTagName("script"))[v.length-1].getAttribute("data-injectcss");if(v&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>");}catch(l){console&&console.log(l);}}function f(){p||(p=!0,h());}a=function(){var l,a,c;(c=document.createElement("div")).innerHTML=d,d=null,(a=c.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",l=a,(c=document.body).firstChild?(a=c.firstChild).parentNode.insertBefore(l,a):c.appendChild(l));},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(c=function(){document.removeEventListener("DOMContentLoaded",c,!1),a();},document.addEventListener("DOMContentLoaded",c,!1)):document.attachEvent&&(h=a,t=l.document,p=!1,(i=function(){try{t.documentElement.doScroll("left");}catch(l){return void setTimeout(i,50)}f();})(),t.onreadystatechange=function(){"complete"==t.readyState&&(t.onreadystatechange=null,f());});}(window);
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
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.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
/** @deprecated */
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
}
// 事件处理基类
var EventManager = /** @class */ (function () {
function EventManager() {
this._eventContainer = {};
}
// 添加监听事件
EventManager.prototype.addEvent = function (type, fn) {
this._eventContainer[type] = this._eventContainer[type] || [];
this._eventContainer[type].push(fn);
return this;
};
// 删除监听事件
EventManager.prototype.removeEvent = function (type, fn) {
if (this._eventContainer[type]) {
var index = this._eventContainer[type].indexOf(fn);
index >= 0 && this._eventContainer[type].splice(index, 1);
}
return this;
};
// 触发监听事件
EventManager.prototype.fireEvent = function (type) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
if (type && this._eventContainer[type]) {
__spreadArrays(this._eventContainer[type]).forEach(function (fn) {
fn.apply(null, args);
});
}
return this;
};
// reset
EventManager.prototype.reset = function () {
this._eventContainer = {};
};
return EventManager;
}());
// 事件处理类
var EventEmmiter = /** @class */ (function (_super) {
__extends(EventEmmiter, _super);
function EventEmmiter() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._onceEvents = {};
_this._pausedEvents = {};
return _this;
}
// 增加监听事件
EventEmmiter.prototype.on = function (type, fn) {
return this.addEvent(type, fn);
};
// 删除监听事件
EventEmmiter.prototype.off = function (type, fn) {
var index;
if (this._onceEvents[type]) { // once列表中查找并删除此事件
(index = this._onceEvents[type].indexOf(fn)) >= 0 && this._onceEvents[type].splice(index, 1);
this._onceEvents[type].length === 0 && delete this._onceEvents[type];
}
if (this._pausedEvents[type]) { // pause列表中查找并删除此事件
(index = this._pausedEvents[type].indexOf(fn)) >= 0 && this._pausedEvents[type].splice(index, 1);
this._pausedEvents[type].length === 0 && delete this._pausedEvents[type];
}
return this.removeEvent(type, fn);
};
// 触发一类监听事件
EventEmmiter.prototype.trigger = function (type) {
var _this = this;
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
if (!this._eventContainer[type])
return this;
var originEvents = __spreadArrays(this._eventContainer[type]);
if (this._pausedEvents[type]) { // 此类监听事件中存在pause项时,另外记录完整的事件数组,并在现有的数组中删除pause项
this._pausedEvents[type].forEach(function (fn) {
_this.removeEvent(type, fn);
});
}
this.fireEvent.apply(this, __spreadArrays([type], args));
this._eventContainer[type] = originEvents; // 恢复完整的事件数组
if (this._onceEvents[type]) { // 单次执行的事件,执行后从数组中删除
this._onceEvents[type].forEach(function (fn) {
(!_this._pausedEvents[type] || _this._pausedEvents[type].indexOf(fn) < 0) && _this.off(type, fn); // 排除once事件pause状态
});
}
return this;
};
// 增加单次执行的事件
EventEmmiter.prototype.once = function (type, fn) {
this.on(type, fn);
this._onceEvents[type] = this._onceEvents[type] || [];
this._onceEvents[type].indexOf(fn) < 0 && this._onceEvents[type].push(fn);
return this;
};
// 暂停事件
EventEmmiter.prototype.pause = function (type, fn) {
this._pausedEvents[type] = this._pausedEvents[type] || [];
this._pausedEvents[type].indexOf(fn) < 0 && this._pausedEvents[type].push(fn);
return this;
};
// 恢复事件
EventEmmiter.prototype.resume = function (type, fn) {
if (!this._pausedEvents[type])
return this;
var index = this._pausedEvents[type].indexOf(fn);
index >= 0 && this._pausedEvents[type].splice(index, 1);
this._pausedEvents[type].length === 0 && delete this._pausedEvents[type];
return this;
};
EventEmmiter.prototype.reset = function () {
this._onceEvents = {};
this._pausedEvents = {};
_super.prototype.reset.call(this);
};
return EventEmmiter;
}(EventManager));
// 此对象用于简化处理各类数据,包括判断数据类型、判断属性、及数据的各类其他操作等,待丰富
var DataUtil = {
// 用于判断数据类型
assertType: function (param, typeName) {
var assert = function (fullTypeName) { return Object.prototype.toString.call(param) === "[object " + fullTypeName + "]"; };
switch (typeName) {
case 'obj':
case 'Obj':
case 'object':
case 'Object':
return assert('Object');
case 'arr':
case 'Arr':
case 'array':
case 'Array':
return assert('Array');
case 'num':
case 'Num':
case 'number':
case 'Number':
return assert('Number');
case 'func':
case 'Func':
case 'function':
case 'Function':
return assert('Function');
case 'str':
case 'Str':
case 'string':
case 'String':
return assert('String');
default:
return assert(typeName);
}
},
// 判断多个参数是否都是某个数据类型(参数平铺传入,最后一个参数是类型名)
assertParamsType: function () {
var _this = this;
var params = [];
for (var _i = 0; _i < arguments.length; _i++) {
params[_i] = arguments[_i];
}
if (params.length > 1) {
var typeName_1 = params.splice(params.length - 1, 1)[0];
var result_1 = true;
params.every(function (param) {
result_1 = _this.assertType(param, typeName_1);
return result_1;
});
return result_1;
}
},
// 判断对象是否包含某属性
hasProperty: function (param, propertyName) {
if (this.assertType(param, 'obj')) {
return param[propertyName] !== undefined;
}
},
// 颜色转换 hex to rgb
hexToRgb: function (hex) {
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
red: parseInt(result[1], 16),
green: parseInt(result[2], 16),
blue: parseInt(result[3], 16)
} : null;
},
componentToHex: function (c) {
var hex = c.toString(16);
return hex.length == 1 ? "0" + hex : hex;
},
// 颜色转换 rgb to hex
rgbToHex: function (r, g, b) {
return "#" + this.componentToHex(r) + this.componentToHex(g) + this.componentToHex(b);
}
};
// DomElement操作工具类
var Dom = /** @class */ (function () {
function Dom(element) {
this.eventMap = {};
this.element = element;
}
// 创建DomElement对象(使用空的Dom对象初始化时调用)
Dom.prototype.createElement = function (param) {
var element = document.createElement(param.elementType);
var className = param.className;
if (className) {
DataUtil.assertType(className, 'arr') && (className = className.join(' '));
element.className = className;
}
param.id && (element.id = param.id);
var domObject = new Dom(element);
if (param.parent) {
var parent_1 = param.parent instanceof Dom ? param.parent : new Dom(param.parent);
parent_1.append(domObject);
}
domObject.visible = true;
return domObject; // 返回一个新的以DomElement为参数创建的Dom对象以进行后续的链式操作
};
// 获取HTTPElement对象
Dom.prototype.getElement = function () {
return this.element;
};
// 获取父元素HTTPElement对象
Dom.prototype.getParent = function () {
return this.element.parentElement;
};
// 末尾附加一个子元素
Dom.prototype.append = function (childElement) {
this.element.appendChild(childElement.element);
return this;
};
// 附加一个子元素到指定位置
Dom.prototype.insert = function (childElement, index) {
if (index !== undefined && this.element.childNodes.length > index) {
this.element.insertBefore(childElement.element, this.element.childNodes[index]);
}
else {
this.append(childElement);
}
return this;
};
// 删除一个子元素
Dom.prototype.remove = function (childElement) {
this.element.removeChild(childElement.element);
return this;
};
// 删除所有子元素
Dom.prototype.clear = function () {
while (this.element.childNodes.length > 0) {
this.element.removeChild(this.element.childNodes[0]);
}
return this;
};
// 替换元素
Dom.prototype.replace = function (newElement, oldElement) {
this.element.replaceChild(newElement.getElement(), oldElement.getElement());
return this;
};
// 显示对象
Dom.prototype.show = function () {
if (this.visible)
return this;
this.element.style.display = this.displayType;
this.visible = true;
return this;
};
// 隐藏对象
Dom.prototype.hide = function () {
if (!this.visible)
return this;
if (this.element) {
this.displayType = this.element.style.display;
this.displayType === 'none' && (this.displayType = undefined);
this.element.style.display = 'none';
this.visible = false;
}
return this;
};
// 获取可见性
Dom.prototype.isVisible = function () {
return this.visible;
};
// 添加dom事件监听
Dom.prototype.on = function (eventType, fn, option) {
if (option === void 0) { option = null; }
this.element.addEventListener(eventType, fn, option);
this.eventMap[eventType] = this.eventMap[eventType] || [];
this.eventMap[eventType].push(fn);
return this;
};
// 删除dom事件监听
Dom.prototype.off = function (eventType, fn) {
this.element.removeEventListener(eventType, fn);
if (this.eventMap[eventType]) {
var index = this.eventMap[eventType].indexOf(fn);
index >= 0 && this.eventMap[eventType].splice(index, 1);
}
return this;
};
// 销毁对象
Dom.prototype.destroy = function () {
var _this = this;
var _loop_1 = function (eventType) {
this_1.eventMap[eventType].forEach(function (fn) {
_this.off(eventType, fn);
});
};
var this_1 = this;
for (var eventType in this.eventMap) {
_loop_1(eventType);
}
this.element.parentElement && this.element.parentElement.removeChild(this.element);
this.eventMap = undefined;
this.displayType = undefined;
this.themeType = undefined;
this.element = undefined;
};
Dom.prototype.getClass = function () {
return this.getElement().getAttribute('class');
};
Dom.prototype.hasClass = function (className) {
var currentClassName = this.getClass();
if (!currentClassName)
return false;
var arr = currentClassName && currentClassName.split(' ');
if (arr.indexOf(className) > -1) {
return true;
}
else {
return false;
}
};
// 添加一个或多个css class
Dom.prototype.addClass = function () {
var _a;
var classes = [];
for (var _i = 0; _i < arguments.length; _i++) {
classes[_i] = arguments[_i];
}
(_a = this.element.classList).add.apply(_a, classes);
return this;
};
// 删除一个或多个css class
Dom.prototype.removeClass = function () {
var _a;
var classes = [];
for (var _i = 0; _i < arguments.length; _i++) {
classes[_i] = arguments[_i];
}
(_a = this.element.classList).remove.apply(_a, classes);
return this;
};
Dom.prototype.toggleClass = function (className, enable) {
this.getClass(); var hasClassName = this.hasClass(className);
if (enable != undefined) {
if (enable && !hasClassName) {
this.addClass(className);
}
if (!enable) {
this.removeClass(className);
}
}
else {
if (hasClassName) {
this.removeClass(className);
}
else {
this.addClass(className);
}
}
return !hasClassName;
};
// toggle一个css class
Dom.prototype.toggle = function (classname) {
this.element.classList.toggle(classname);
return this;
};
// 获取元素当前在页面中的位置
Dom.prototype.getPosition = function () {
var _a = this.element.getBoundingClientRect(), top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom;
return { top: top, left: left, right: right, bottom: bottom };
};
// 获取元素的尺寸信息
Dom.prototype.getDimensions = function () {
var _a = this.element.getBoundingClientRect(), width = _a.width, height = _a.height;
return { width: width, height: height };
};
// 获取元素宽度
Dom.prototype.getWidth = function () {
var width = this.element.getBoundingClientRect().width;
return width;
};
// 获取元素高度
Dom.prototype.getHeight = function () {
var height = this.element.getBoundingClientRect().height;
return height;
};
// 获取或设置元素的内容
Dom.prototype.html = function (htmlContent) {
if (htmlContent != undefined) {
this.element.innerHTML = htmlContent;
return this;
}
else {
return this.element.innerHTML;
}
};
// 获取单个css属性或设置单个/多个css属性
Dom.prototype.css = function (key, value) {
if (DataUtil.assertType(key, 'str')) {
if (value) {
this.element.style[key] = value;
return this;
}
else {
return this.element.style[key];
}
}
else if (DataUtil.assertType(key, 'obj')) {
var cssOptions = key;
for (var cssKey in cssOptions) {
this.element.style[cssKey] = cssOptions[cssKey];
}
return this;
}
};
// 获取单个attribute属性或设置单个/多个attribute属性
Dom.prototype.attribute = function (key, value) {
if (DataUtil.assertType(key, 'str')) {
if (value != undefined) {
this.element[key] = value;
return this;
}
else {
return this.element[key];
}
}
else if (DataUtil.assertType(key, 'obj')) {
var attrOptions = key;
for (var attrKey in attrOptions) {
this.element[attrKey] = attrOptions[attrKey];
}
return this;
}
};
// 获取或设置元素的主题
Dom.prototype.theme = function (themeType) {
if (themeType) {
this.themeType && this.removeClass(this.themeType);
this.themeType = themeType;
this.addClass(themeType);
return this;
}
else {
return this.themeType;
}
};
// 点击组件
Dom.prototype.click = function () {
this.element.click();
return this;
};
return Dom;
}());
var BaseModule = /** @class */ (function () {
function BaseModule(config) {
this.data = {};
this._config = config;
this.domElement = new Dom().createElement({ elementType: 'div', className: 'bfui-app' });
if (config.webApplication3D) {
this.domElement.hide();
var appDom = config.webApplication3D.getViewer()._opt.domElement;
var parentDom = appDom.parentElement;
this._originAppInfo = {
replaced: false,
parentDom: parentDom,
app: config.webApplication3D,
};
config.domElement = config.domElement || parentDom;
}
config.domElement.appendChild(this.domElement.getElement());
this._eventEmmiter = new EventEmmiter();
this._moduleData = BaseModule.getCurrentModuleData();
}
BaseModule.prototype.getDomElement = function () {
return this.domElement;
};
BaseModule.prototype.getConfig = function () {
return this._config;
};
BaseModule.prototype.getModuleData = function () {
return this._moduleData;
};
BaseModule.prototype.getApp3D = function () {
return this._app3d;
};
BaseModule.prototype.getViewer3D = function () {
return this._viewer3d;
};
BaseModule.prototype.getModelType = function () {
return this._modelType;
};
BaseModule.prototype._initApp = function (options) {
var _this = this;
return new Promise(function (resolve, reject) {
var app = _this.getConfig().webApplication3D;
var successCb = function (viewMetaData) {
viewMetaData.viewType = viewMetaData.viewType || (viewMetaData.renderType == "bimView" ? "3DView" : viewMetaData.renderType);
var replaceAppDom = function () {
if (!_this._originAppInfo)
return;
_this.domElement.show();
_this._originAppInfo.replaced = true;
var currentApp = _this._originAppInfo.app;
currentApp.setDomElement(options.domElement);
};
if (viewMetaData.viewType === "drawingView") {
if (!app || app.getViewer().getViewerType() !== 'ViewerDrawing') {
var WebAppConfig = new Glodon.Bimface.Application.WebApplicationDrawingConfig();
WebAppConfig.domElement = options.domElement;
app = new Glodon.Bimface.Application.WebApplicationDrawing(WebAppConfig);
}
else {
replaceAppDom();
}
app.getViewer().loadDrawing({ viewMetaData: viewMetaData });
app.addEventListener(Glodon.Bimface.Application.WebApplicationDrawingEvent.ViewAdded, function () {
_this._eventEmmiter.trigger('ModuleInitialized');
resolve(app); // 返回具体的app对象,可在各个具体的子类中管理app
});
}
else if (viewMetaData.viewType === "3DView") {
if (!app || app.getViewer().getViewerType() !== 'Viewer3D') {
var WebAppConfig = new Glodon.Bimface.Application.WebApplication3DConfig();
WebAppConfig.domElement = options.domElement;
options.modelButtons && (WebAppConfig.Buttons = options.modelButtons);
app = new Glodon.Bimface.Application.WebApplication3D(WebAppConfig);
}
else {
replaceAppDom();
}
_this._app3d = app;
_this._viewer3d = app.getViewer();
_this._modelId = viewMetaData.modelId;
_this._modelType = viewMetaData.modelType;
var setConfigs_1 = function () {
// 配置信息,初始化保存在app下,便于后续统一维护
app.linkConfig = {
name: _this._viewer3d.getModels()[0]._data.name,
displayType: "Parallel",
showDrawingMaintoolbar: true,
showDrawingList: true,
showDrawingSearchTool: true,
showModelMaintoolbar: true,
showModelTreeToolbar: true,
showModelViewHouse: true,
};
// 链接的图纸信息
app.linkList = [];
};
// 预览时没有加载的模型,先加载模型
if (_this._viewer3d.getModels().length == 0) {
_this._viewer3d.loadModel({ viewMetaData: viewMetaData });
app.addEventListener("ModelAdded", function () {
setConfigs_1();
});
}
else {
setConfigs_1();
}
if (app.getViewer().getModels().filter(function (model) { return model.modelId == viewMetaData.modelId; }).length === 0) {
app.getViewer().loadModel({ viewMetaData: viewMetaData });
app.addEventListener(Glodon.Bimface.Application.WebApplication3DEvent.ModelAdded, function (modelId) {
if (viewMetaData.modelId == modelId) {
_this._eventEmmiter.trigger('ModuleInitialized');
_this._getFloors(modelId);
resolve(app);
}
});
}
else {
_this._getFloors(viewMetaData.modelId);
requestAnimationFrame(function () { return _this._eventEmmiter.trigger('ModuleInitialized'); });
resolve(app);
}
}
};
var errorCb = function (e) {
console.log(e);
reject();
};
if (options.viewMetaData) {
var metaData = __assign(__assign({}, options.viewMetaData), { viewToken: BaseModule._currentModuleData.viewToken });
successCb(metaData);
}
else if (app) {
successCb({
viewType: "3DView",
modelId: app.getViewer().getModel()._data.modelId,
modelType: app.getViewer().getModel()._data.modelType,
});
}
else {
var loaderConfig = new window.BimfaceSDKLoaderConfig();
loaderConfig = __assign(__assign({}, loaderConfig), _this.getConfig());
loaderConfig.viewToken = loaderConfig.viewToken || options.viewToken;
window.BimfaceSDKLoader.load(loaderConfig).then(successCb).catch(errorCb);
}
});
};
BaseModule.prototype._getFloors = function (modelId) {
var _this = this;
this.getViewer3D().getModel(modelId).getFloors(function (data) {
if (data) {
_this.floors = data;
}
});
};
BaseModule.prototype.getFloors = function () {
return this.floors;
};
BaseModule.prototype.addEventListener = function (type, fn) {
this._eventEmmiter.on(type, fn);
};
BaseModule.prototype.removeEventListener = function (type, fn) {
this._eventEmmiter.off(type, fn);
};
BaseModule.prototype.destroy = function () {
if (this._destroyed)
return;
this._config = null;
if (this._originAppInfo) {
if (this._originAppInfo.replaced) {
var _a = this._originAppInfo, parentDom = _a.parentDom, app = _a.app;
app.setDomElement(parentDom);
}
}
this.domElement.destroy();
this._eventEmmiter.trigger('ModuleDestroyed');
this._destroyed = true;
};
return BaseModule;
}());
BaseModule.setCurrentModuleData = function (moduleData) {
BaseModule._currentModuleData = moduleData;
};
BaseModule.getCurrentModuleData = function () { return BaseModule._currentModuleData; };
var ajax = function (options) {
return new Promise(function (resolve, reject) {
var defaults = {
type: 'get',
data: null,
};
var _opt = __assign(__assign({}, defaults), options);
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
var status = xmlhttp.status;
if (status >= 200 && status < 300 || status == 304 || (status === 0 && window.location.protocol === 'file:')) {
var json = void 0;
try {
json = JSON.parse(xmlhttp.responseText);
}
catch (error) {
throw error;
}
resolve({
json: json,
responseText: xmlhttp.responseText,
responseXML: xmlhttp.responseXML,
});
}
else {
reject(status);
}
}
};
xmlhttp.open(_opt.type, _opt.url, _opt.async);
xmlhttp.send(_opt.data);
});
};
var ClashDetectiveModule = /** @class */ (function (_super) {
__extends(ClashDetectiveModule, _super);
function ClashDetectiveModule(config) {
return _super.call(this, config) || this;
}
ClashDetectiveModule.prototype._initApp = function (options) {
var _this = this;
var _a, _b, _c;
this._clashDetectiveId = options.clashDetectiveId;
var viewMetaData = options.viewMetaData;
this._modelId = viewMetaData.modelId;
this._modelType = viewMetaData.modelType;
this._clashDetectiveViewToken = viewMetaData.viewToken;
var selectionInfo = (_c = (_b = (_a = BaseModule._currentModuleData) === null || _a === void 0 ? void 0 : _a.multiModelClashDetectiveList) === null || _b === void 0 ? void 0 : _b.items[0]) === null || _c === void 0 ? void 0 : _c.selectionA[0];
var fileType = selectionInfo.fileType, fileName = selectionInfo.fileName;
return new Promise(function (resolve, reject) {
var successCb = function (viewMetaData) {
var WebAppConfig = new Glodon.Bimface.Application.WebApplication3DConfig();
WebAppConfig.domElement = options.domElement;
var app = new Glodon.Bimface.Application.WebApplication3D(WebAppConfig);
_this._app3d = app;
_this._viewer3d = app.getViewer();
var setConfigs = function () {
var unitType = _this._viewer3d.getUnit();
var modelUnit = unitType;
var models = _this._viewer3d.getModels();
if (models === null || models === void 0 ? void 0 : models.length) {
modelUnit = models[0]._manifest.Metadata.Unit === 'm' ? 'Meter' : 'Millimeter';
}
app.clashDetectiveConfig = {
unitType: unitType,
modelUnit: modelUnit,
makeOthersTranslucent: window.Glodon.Bimface.Viewer.IsolateOption.MakeOthersTranslucent
};
var getFilesInfo = function (viewer) {
var modelType = viewMetaData.modelType;
var filesInfo = new Map();
if (modelType === 'INTEGRATE') {
viewer.getModel().getFiles(function (f) {
f.map(function (data) { return filesInfo.set(String(data.fileId), { fileName: data.fileName, fileType: data.fileType }); });
app.clashDetectiveConfig.filesInfo = filesInfo;
_this._eventEmmiter.trigger(Glodon.Bimface.Module.ClashDetective.WebApplicationEvent.FilesInfoAdded);
});
}
else {
filesInfo.set(String(viewMetaData.modelId), { fileName: fileName, fileType: fileType });
app.clashDetectiveConfig.filesInfo = filesInfo;
_this._eventEmmiter.trigger(Glodon.Bimface.Module.ClashDetective.WebApplicationEvent.FilesInfoAdded);
}
};
getFilesInfo(_this._viewer3d);
};
// 预览时没有加载的模型,先加载模型
if (_this._viewer3d.getModels().length == 0) {
_this._viewer3d.loadModel({ viewMetaData: viewMetaData });
app.addEventListener(Glodon.Bimface.Application.WebApplication3DEvent.ModelAdded, function () {
setConfigs();
_this._eventEmmiter.trigger(Glodon.Bimface.Module.ClashDetective.WebApplicationEvent.ModelAdded);
resolve(app);
});
}
else {
setConfigs();
requestAnimationFrame(function () { return _this._eventEmmiter.trigger(Glodon.Bimface.Module.ClashDetective.WebApplicationEvent.ModelAdded); });
resolve(app);
}
};
var errorCb = function (e) {
console.log(e);
reject();
};
if (viewMetaData) {
successCb(viewMetaData);
}
else {
var loaderConfig = new window.BimfaceSDKLoaderConfig();
loaderConfig = __assign(__assign({}, loaderConfig), _this.getConfig());
window.BimfaceSDKLoader.load(loaderConfig).then(successCb).catch(errorCb);
}
});
};
ClashDetectiveModule.prototype._getClashResults = function () {
var _this = this;
return new Promise(function (resolve, reject) {
_this.fetchClashResults(_this._clashDetectiveId, _this._clashDetectiveViewToken).then(function (res) {
var _a;
_this._clashResults = (_a = res === null || res === void 0 ? void 0 : res.json) === null || _a === void 0 ? void 0 : _a.results;
resolve(res === null || res === void 0 ? void 0 : res.json);
}).catch(function (e) {
reject(e);
});
});
};
ClashDetectiveModule.prototype._getClashGroups = function () {
var _this = this;
return new Promise(function (resolve, reject) {
_this.fetchClashGroups(_this._clashDetectiveId, _this._clashDetectiveViewToken).then(function (res) {
_this._clashGroups = res === null || res === void 0 ? void 0 : res.groups;
resolve(res === null || res === void 0 ? void 0 : res.groups);
}).catch(function (e) {
reject(e);
});
});
};
ClashDetectiveModule.prototype.fetchClashResults = function (clashDetectiveId, viewToken) {
return new Promise(function (resolve, reject) {
ajax({
type: 'get',
url: window.hostConfig.APIHost + "/data/v2/clash-detective/" + clashDetectiveId + "/result?view_token=" + viewToken,
}).then(function (res) {
if (res.json.code === 'bimfaceservice-0000' || res.json.code === 'success') {
var data = res.json.data;
ajax({
type: 'get',
dataType: 'json',
url: data
}).then(function (res1) {
resolve(res1);
});
}
else {
reject(res.json);
}
});
});
};
ClashDetectiveModule.prototype.fetchClashGroups = function (clashDetectiveId, viewToken) {
return new Promise(function (resolve, reject) {
ajax({
type: 'get',
url: window.hostConfig.APIHost + "/data/v2/clash-detective/" + clashDetectiveId + "/result-groups?view_token=" + viewToken,
}).then(function (res) {
if (res.json.code === 'bimfaceservice-0000' || res.json.code === 'success') {
resolve(res.json.data);
}
else {
reject(res.json);
}
});
});
};
return ClashDetectiveModule;
}(BaseModule));
var UIEvents;
(function (UIEvents) {
UIEvents["ValueChanged"] = "ValueChanged";
UIEvents["Clicked"] = "Clicked";
UIEvents["RightClicked"] = "RightClicked";
UIEvents["MouseOver"] = "MouseOver";
UIEvents["MouseOut"] = "MouseOut";
UIEvents["CheckedChanged"] = "CheckedChanged";
UIEvents["SelectionChanged"] = "SelectionChanged";
UIEvents["ExpendChanged"] = "ExpendChanged";
UIEvents["IsolateChanged"] = "IsolateChanged"; // 是否隔离
})(UIEvents || (UIEvents = {}));
var UIEvents$1 = UIEvents;
/**
* @namespace Glodon.Bimface.Tiles.UI.ControlAnchor
* @classdesc 常量:UI锚点(用以进行控件定位)
* @description Glodon.Bimface.Tiles.UI.ControlAnchor
* @property {String} TopLeft 视图左上角
* @property {String} TopCenter 视图中上侧
* @property {String} TopRight 视图右上角
* @property {String} MiddleLeft 视图左中侧
* @property {String} MiddleRight 视图右中侧
* @property {String} BottomLeft 视图左下角
* @property {String} BottomCenter 视图中下侧
* @property {String} BottomRight 视图右下角
* @property {String} MiddleCenter 视图中心
*/
var ControlAnchor;
(function (ControlAnchor) {
ControlAnchor["TopLeft"] = "TopLeft";
ControlAnchor["TopCenter"] = "TopCenter";
ControlAnchor["TopRight"] = "TopRight";
ControlAnchor["MiddleLeft"] = "MiddleLeft";
ControlAnchor["MiddleRight"] = "MiddleRight";
ControlAnchor["BottomLeft"] = "BottomLeft";
ControlAnchor["BottomCenter"] = "BottomCenter";
ControlAnchor["BottomRight"] = "BottomRight";
ControlAnchor["MiddleCenter"] = "MiddleCenter";
})(ControlAnchor || (ControlAnchor = {}));
var ControlAnchor$1 = ControlAnchor;
// UI组件基类
var Control = /** @class */ (function (_super) {
__extends(Control, _super);
function Control(param) {
var _this = _super.call(this) || this;
if (param.className) {
param.elementParam.className = (param.elementParam.className || '') + ' ' + param.className;
}
_this._domElement = param.element || new Dom().createElement(param.elementParam);
if (param.parent) {
var parentElement = param.parent instanceof Control ? param.parent._domElement
: param.parent instanceof Dom ? param.parent : new Dom(param.parent);
parentElement.append(_this._domElement);
param.parent instanceof Control && (_this._parent = param.parent);
}
_this.id = param.id || param.ref; // || uuid
_this.type = param.type;
_this.position = { anchor: 'TopLeft', offset: { x: 0, y: 0 } };
return _this;
}
//
Control.prototype.getParent = function () {
return this._parent;
};
// 设置本对象的父级Control对象
Control.prototype.setParent = function (control) {
this._parent = control;
};
// 获取DomElement对象
Control.prototype.getDomElement = function () {
return this._domElement;
};
// 设置点击事件
Control.prototype.onClick = function (fn) {
var _this = this;
this._domElement.on('click', function (eventData) {
fn(eventData);
_this.trigger(UIEvents$1.Clicked, _this);
});
return this;
};
// 设置鼠标移入事件
Control.prototype.onMouseOver = function (fn) {
var _this = this;
this._domElement.on('mouseover', function (eventData) {
fn(eventData);
_this.trigger(UIEvents$1.MouseOver, _this);
});
return this;
};
// 设置鼠标移出事件
Control.prototype.onMouseOut = function (fn) {
var _this = this;
this._domElement.on('mouseout', function (eventData) {
fn(eventData);
_this.trigger(UIEvents$1.MouseOut, _this);
});
return this;
};
/**
* 显示
* @function Glodon.Bimface.Tiles.UI.Control.prototype.show
*/
Control.prototype.show = function () {
this._domElement.show();
return this;
};
/**
* 隐藏
* @function Glodon.Bimface.Tiles.UI.Control.prototype.hide
*/
Control.prototype.hide = function () {
this._domElement.hide();
return this;
};
/**
* 获取可见性状态
* @function Glodon.Bimface.Tiles.UI.Control.prototype.isVisible
* @returns {Boolean} 可见性状态
*/
Control.prototype.isVisible = function () {
return this._domElement.isVisible();
};
// 销毁
Control.prototype.destroy = function () {
this._domElement.destroy();
};
/**
* 对组件增加CSS样式
* @function Glodon.Bimface.Tiles.UI.Control.prototype.addClass
* @param {String} class CSS类名
*/
Control.prototype.addClass = function () {
var _a;
var classes = [];
for (var _i = 0; _i < arguments.length; _i++) {
classes[_i] = arguments[_i];
}
(_a = this._domElement).addClass.apply(_a, classes);
return this;
};
/**
* 对组件移除CSS样式
* @function Glodon.Bimface.Tiles.UI.Control.prototype.removeClass
* @param {String} class CSS类名
*/
Control.prototype.removeClass = function () {
var _a;
var classes = [];
for (var _i = 0; _i < arguments.length; _i++) {
classes[_i] = arguments[_i];
}
(_a = this._domElement).removeClass.apply(_a, classes);
return this;
};
// 删除一个或多个css class
Control.prototype.toggleClass = function (className) {
this._domElement.toggleClass(className);
return this;
};
/**
* 设置组件的位置信息
* @function Glodon.Bimface.Tiles.UI.Control.prototype.setPosition
* @param {Object} position 组件的位置信息
* @param {Glodon.Bimface.Tiles.UI.ControlAnchor} position.anchor 定位组件位置的锚点
* @param {Object} position.offset 基于锚点的偏移值
* @param {Number} position.offset.x X方向偏移值,单位为px
* @param {Number} position.offset.y Y方向偏移值,单位为px
*/
Control.prototype.setPosition = function (position) {
if (position.anchor && ControlAnchor$1.hasOwnProperty(position.anchor)) {
for (var key in ControlAnchor$1) {
this.removeClass("bfui-anchor-" + key.toLowerCase());
}
var anchor = position.anchor.toLowerCase();
this.addClass("bfui-anchor-" + anchor);
this.position.anchor = position.anchor;
}
this.setOffset(position.offset);
return this;
};
Control.prototype.setOffset = function (offset) {
if (offset) {
var offsetX = offset.x || 0;
var offsetY = offset.y || 0;
var anchor = this.position.anchor.toLowerCase();
this.setStyle(anchor.indexOf('right') >= 0 ? { marginRight: -offsetX + "px" } : { marginLeft: offsetX + "px" })
.setStyle(anchor.indexOf('bottom') >= 0 ? { marginBottom: -offsetY + "px" } : { marginTop: offsetY + "px" });
this.position.offset.x = offsetX;
this.position.offset.y = offsetY;
}
return this;
};
Control.prototype.getPositionParam = function () {
return this.position;
};
/**
* 获取ID
* @function Glodon.Bimface.Tiles.UI.Control.prototype.getId
* @returns {String} ID
*/
Control.prototype.getId = function () {
return this.id;
};
// 获取Control类型
Control.prototype.getType = function () {
return this.type;
};
/**
* 获取组件的位置信息
* @function Glodon.Bimface.Tiles.UI.Control.prototype.getPosition
* @returns {Object} 组件的位置信息
*/
Control.prototype.getPosition = function () {
return this._domElement.getPosition();
};
/**
* 获取组件的尺寸信息
* @function Glodon.Bimface.Tiles.UI.Control.prototype.getDimensions
* @returns {Object} 组件的尺寸信息
*/
Control.prototype.getDimensions = function () {
return this._domElement.getDimensions();
};
// 获取元素宽度
Control.prototype.getWidth = function () {
return this._domElement.getWidth();
};
// 获取元素高度
Control.prototype.getHeight = function () {
return this._domElement.getHeight();
};
// 设置css style(传入多个键值对组成的对象参数)
Control.prototype.setStyle = function (style) {
this._domElement.css(style);
return this;
};
Control.prototype.getTooltip = function () {
return this.tooltip;
};
Control.prototype.setTooltip = function (tooltip) {
this.tooltip = tooltip;
this.getDomElement().attribute('title', tooltip);
return this;
};
/**
* 通过HTML字符串初始化Control内容,支持在字符串中插入Control对象标记,配合controlMap实现html与Control混合结构的整体初始化
* @param {string} html Control的内容html字符串。如需插入Control对象,则在插入的位置写入<Control id="abc"></Control>作为标记,id与controlMap中的key对应
* @param {IControlMap} controlMap 通过key、value方式提供需插入html中的各个Control对象,key与html字符串中标记处的id对应
*/
Control.prototype.setHTML = function (html, controlMap) {
var controlReg = /<[C,c]ontrol id="(.*?)".*?>.*?<\/[C,c]ontrol>/g;
var computedHtml = html.replace(controlReg, function (value) {
var execResult = controlReg.exec(value);
controlReg.lastIndex = 0;
var id = execResult[1];
var replaceHtml = "<div class=\"BFUI_Control_" + id + "\"></div>";
return replaceHtml;
});
var dom = this.getDomElement();
dom.html(computedHtml);
for (var id in controlMap) {
var elements = dom.getElement().getElementsByClassName("BFUI_Control_" + id);
if (elements.length === 1) {
var element = elements[0];
var parent_1 = new Dom(element.parentElement);
parent_1.replace(controlMap[id].getDomElement && controlMap[id].getDomElement() || controlMap[id], new Dom(element));
}
}
return this;
};
/**
* 点击组件
*/
Control.prototype.click = function () {
this.getDomElement().click();
return this;
};
return Control;
}(EventEmmiter));
/**
* 基于tsx的响应式动态渲染模式
* 此文件是运行时部分,配合tsx编译结果,实现界面元素的递归渲染,以及响应式参数的触发和监听等
*/
var entityMap = {
"&": "amp",
"<": "lt",
">": "gt",
'"': "quot",
"'": "#39",
"/": "#x2F",
};
// 特殊字符转义
var escapeHtml = function (str) {
return String(str).replace(/[&<>"'\/\\]/g, function (s) { return "&" + entityMap[s] + ";"; });
};
// 设置element属性
var setElementAttrs = function (elm, name, val) {
if (name === "bf-show") {
elm.style.display = val ? "block" : "none";
return;
}
if (name === "style") {
if (typeof val === "string") {
val = val.split(";").reduce(function (prev, item) {
var _a = item.split(":"), key = _a[0], value = _a[1];
if (!key)
return prev;
prev[key.trim()] = value.trim();
return prev;
}, {});
}
Object.assign(elm.style, val);
}
else if (val === true) {
elm.setAttribute(name, name);
}
else if (val !== false && val != null) {
elm.setAttribute(name, escapeHtml(val));
}
else if (val === false) {
elm.removeAttribute(name);
}
};
// 单个节点的渲染函数
function __bf_h(tag, attrs) {
var children = [];
for (var _i = 2; _i < arguments.length; _i++) {
children[_i - 2] = arguments[_i];
}
attrs = attrs || {};
var stack = __spreadArrays(children); // 收集本节点的下一级子节点
var createdHandler = null; // 本节点的onCreated事件监听函数
// 如果handler不是function type,且包含__bf_render方法,就执行__bf_render方法得到真实的handler
var getRealHandler = function (handler) {
if (!handler)
return null;
if (typeof handler !== "function" && handler.__bf_render) {
handler = handler.__bf_render();
}
return handler;
};
var beforeDestroyHandlers = []; // 用于存储本节点以及所有子节点上需要监听onBeforeDestroy事件的handler,当本节点渲染为空时,触发这些handler
var destroyedHandlers = []; // 用于存储本节点以及所有子节点上需要监听onDestroy事件的handler,当本节点渲染为空时,触发这些handler
var beforeDestroyHandler = getRealHandler(attrs["on-before-destroy"] || attrs["onBeforeDestroy"]);
beforeDestroyHandler && beforeDestroyHandlers.push(beforeDestroyHandler);
var destroyedHandler = getRealHandler(attrs["on-destroyed"] || attrs["onDestroyed"]);
destroyedHandler && destroyedHandlers.push(destroyedHandler);
// tag为函数类型,表示是BFUI的Control构造函数,或者是自定义组件的渲染函数
if (typeof tag === "function") {
var resultAttrs_1 = {};
Object.entries(attrs).forEach(function (_a) {
var key = _a[0], val = _a[1];
resultAttrs_1[key] = (val && val.__bf_render) ? val.__bf_render() : val;
});
// 判断是否是BFUI的Control组件
var isControl = false, currentProto = tag.__proto__;
while (currentProto && !isControl) {
if (currentProto === Control) {
isControl = true;
}
else {
currentProto = currentProto.__proto__;
}
}
// tag是BFUI的Control构造函数,生成对应的Control组件并返回
if (isControl) {
var control = new tag(resultAttrs_1);
// 属性中有ref,则将此control对象赋值给传入的refItem
if (attrs.ref && attrs.ref._isBfRef) {
attrs.ref.value = control;
}
// 属性中有onCreated,判断是方法则在创建对象后触发onCreated监听事件
if (attrs.onCreated) {
var handler = attrs.onCreated;
if (typeof handler !== "function" && attrs.onCreated.__bf_render) {
handler = attrs.onCreated.__bf_render();
}
if (typeof handler === "function") {
handler(control);
}
}
return {
control: control,
};
}
else { // 自定义组件的渲染函数,返回该函数的执行结果
return tag(attrs);
}
}
// tag为string类型,表示是常规的dom节点,生成对应的Dom对象
var domElement = new Dom().createElement({ elementType: tag, className: attrs.class });
var elm = domElement.getElement();
var _loop_1 = function (name_1, val) {
name_1 = escapeHtml(name_1);
// on开头的属性名,认为是事件,绑定对应的事件
if (name_1.startsWith("on")) {
var handler = getRealHandler(val);
if (typeof handler === "function") {
var listenerName = name_1.toLowerCase().replace('-', '').substring(2);
if (listenerName === "created") {
// 属性名为onCreated || on-created,在创建对象后触发onCreated监听事件
createdHandler = handler;
}
else if ("on" + listenerName in window) {
// 其他事件认为是标准dom监听事件(click,mouseup等),绑定对应的监听事件
elm.addEventListener(listenerName, handler);
}
}
}
else if (name_1 === "ref") {
// 属性名为ref,将当前domElement对象赋值给传入的refItem
if (val && val._isBfRef) {
val.value = domElement;
}
}
else {
// 其他属性按照不同属性类型,调用setElementAttrs()进行设置
if (val.hasOwnProperty('__bf_refItems')) {
// val为 {__bf_render: () => xxx, ___bf_refItems: [x, y]},认为是包含需要动态响应的属性,在相关的refItem上添加监听事件,refItem更新时重新设置该属性
val.__bf_refItems.forEach(function (item) {
item && item._isBfRef && item._onChangeHandlers.push(function () { return setElementAttrs(elm, name_1, val.__bf_render()); });
});
setElementAttrs(elm, name_1, val.__bf_render());
}
else {
setElementAttrs(elm, name_1, val);
}
}
};
// 设置节点上的各个属性
for (var _a = 0, _b = Object.entries(attrs); _a < _b.length; _a++) {
var _c = _b[_a], name_1 = _c[0], val = _c[1];
_loop_1(name_1, val);
}
// 递归处理子节点的方法
var append = function (childItem) {
// 普通字符节点,不含响应式元素,直接渲染TextNode并返回
if (['[object String]', '[object Number]'].indexOf(Object.prototype.toString.call(childItem)) >= 0) {
domElement.element.appendChild(document.createTextNode(childItem.toString()));
return;
}
// 获取子节点的渲染结果,即实际需要渲染的指定类型的HTMLElement元素;isUpdate为true时,表示是更新操作,false表示是首次渲染操作
var getChildElement = function (data, isUpdate) {
// 判断是已经渲染过的节点,直接返回(data为Array时会进入此种情况)
if (!data.hasOwnProperty('__bf_refItems') || !data.hasOwnProperty('__bf_render')) {
return data.control ? data.control.getDomElement().getElement() : data.domElement.getElement();
}
// 使用__bf_render方法获取子节点的渲染结果,有可能是最终要渲染的HTMElement元素,也可能是一个或多个需要动态渲染的子节点,需遍历处理
var result = data.__bf_render();
var childElement;
if (['[object String]', '[object Number]'].includes(Object.prototype.toString.call(result))) { // string格式,认为是节点内容,创建一个TextNode
childElement = document.createTextNode(result);
}
else if (result === false || result === null || result === undefined) { // false/null/undefined,认为是条件语句未满足条件的情况,创建一个comment用于占位
childElement = document.createComment('');
}
else if (Object.prototype.toString.call(result) === '[object Object]') { // 对象形式,认为是需要渲染的HTMLElement元素
if (result._isBfRef) {
childElement = getChildElement(result.value); // 递归处理需要动态渲染的子节点
}
else {
childElement = result.control ? result.control.getDomElement().getElement() : result.domElement.getElement();
if (!isUpdate) { // 首次渲染时,收集子节点的onBeforeDestroy和onDestroyed事件监听函数
result.destroyedHandlers && (destroyedHandlers.push.apply(destroyedHandlers, result.destroyedHandlers));
result.beforeDestroyHandlers && (beforeDestroyHandlers.push.apply(beforeDestroyHandlers, result.beforeDestroyHandlers));
}
}
}
else if (Object.prototype.toString.call(result) === '[object Array]') { // 数组形式,认为是需要动态渲染的多个同级子节点,来源于jsx中array.map的循环渲染语句
if (result.length === 0) {
childElement = document.createComment(''); // 数组长度为0,创建一个comment用于占位
}
else {
childElement = result.map(function (item) {
return getChildElement(item);
});
}
}
return childElement;
};
var element = getChildElement(childItem);
var getIsEmptyElement = function (elm) { return elm instanceof Comment; }; // 判断是否为空元素(空元素实际也会渲染一个占位的Comment元素)
if (element) {
// 首次渲染时,将子节点的渲染结果挂载到父节点上
if (!childItem._element) {
Object.prototype.toString.call(element) === '[object Array]' ? element.forEach(function (item) { return domElement.getElement().appendChild(item); }) : domElement.getElement().appendChild(element);
childItem._element = element;
}
// 首次渲染时,判断是否有需要监听的响应式参数,如果有则添加监听事件,参数发生变化时更新子节点的渲染结果
if (!childItem._handler && childItem.__bf_refItems && childItem.__bf_refItems.length > 0) {
childItem._handler = function () {
var newElement = getChildElement(childItem, true); // 获取子节点更新的渲染结果
var isEmptyElement = getIsEmptyElement(newElement); // 判断本次渲染结果是否为空,为空则触发destroy相关监听
isEmptyElement && beforeDestroyHandlers.forEach(function (handler) { return handler && handler(); });
var referenceNode; // 原有节点元素的后一个HTML元素,用于插入新元素时作为标记,仍然插入在此元素之前
// 删除原有节点渲染结果
if (Object.prototype.toString.call(childItem._element) === '[object Array]') { // 原有节点渲染结果为数组形式,删除数组中的所有HTMLElement元素
var lastIndex = __spreadArrays(domElement.getElement().childNodes).indexOf(childItem._element[childItem._element.length - 1]);
domElement.getElement().childNodes.length > (lastIndex + 1) && (referenceNode = domElement.getElement().childNodes[lastIndex + 1]);
childItem._element.forEach(function (item) {
domElement.getElement().removeChild(item);
});
}
else { // 原有节点渲染结果为单个HTMLElement元素,删除该元素
var lastIndex = __spreadArrays(domElement.getElement().childNodes).indexOf(childItem._element);
domElement.getElement().childNodes.length > (lastIndex + 1) && (referenceNode = domElement.getElement().childNodes[lastIndex + 1]);
domElement.getElement().removeChild(childItem._element);
}
// 插入更新的节点渲染结果
if (Object.prototype.toString.call(newElement) === '[object Array]') {
newElement.forEach(function (item) {
domElement.getElement().insertBefore(item, referenceNode);
});
}
else {
domElement.getElement().insertBefore(newElement, referenceNode);
}
childItem._element = newElement;
isEmptyElement && destroyedHandlers.forEach(function (handler) { return handler && handler(); });
};
// 在需要监听的各个响应参数上添加监听事件,参数发生变化时更新子节点的渲染结果
childItem.__bf_refItems.forEach(function (item) {
item && item._isBfRef && item.onChange(childItem._handler);
});
}
}
};
// 遍历处理节点下一级的子节点
while (stack.length) {
var child = stack.shift();
if (!Array.isArray(child)) {
append(child);
}
else {
child.forEach(function (item) {
append(item);
});
}
}
// 触发此节点的created事件监听函数
createdHandler && createdHandler(domElement);
return {
domElement: domElement,
beforeDestroyHandlers: beforeDestroyHandlers,
destroyedHandlers: destroyedHandlers,
};
}
// 如果是refItem,则返回其value值,否则返回本身
var __bf_getRefValue = function (refItem) {
if (refItem && refItem._isBfRef) {
return refItem.value;
}
return refItem;
};
// ref函数,返回一个ref实例
var _refIndex = 0;
var _refMap = new Map();
var ref = function (value) {
var data = {
value: value,
_refIndex: _refIndex++,
_isBfRef: true,
_onChangeHandlers: [],
onChange: function (handler) { return data._onChangeHandlers.push(handler); },
offChange: function (handler) {
var index = data._onChangeHandlers.indexOf(handler);
if (index > -1) {
data._onChangeHandlers.splice(index, 1);
}
},
};
var proxy = new Proxy(data, {
set: function (obj, prop, value) {
if (prop === 'value') {
var formerValue_1 = obj[prop];
obj[prop] = value;
// refItem.value发生变化时,触发所有监听此refItem的事件
proxy._onChangeHandlers && proxy._onChangeHandlers.forEach(function (handler) {
typeof handler === 'function' && handler(value, formerValue_1);
});
}
return true;
}
});
_refMap.set(proxy._refIndex, proxy);
return proxy;
};
Glodon.__bf_getRefValue = __bf_getRefValue;
// 将渲染结果挂载到指定的HTMLElement容器上
var render = function (renderFunc, container) {
var domElement = renderFunc instanceof Function ? renderFunc().domElement : renderFunc.domElement;
domElement && container.append(domElement);
};
Glodon.__bf_h = __bf_h;
var app = ref(null);
var viewer = ref(null);
var modelId = ref(null);
var modelType = ref(null);
ref(null);
var clashData = ref(null);
var clashResults = ref([]);
var clashGroups = ref([]);
var selectedGroupIndex = ref(null);
var currentClashGroup = ref([]);
var showGroupItemPanel = ref(false);
var showFilterModal = ref(false);
function getTreeInfo(source, keys, parent) {
var _a, _b;
var parentId = parent.parentId, filterName = parent.filterName;
var pointerObj = {};
var tree = [];
var platTreeMap = {};
for (var i = 0; i < source.length; i++) {
var arr = tree;
var cur = pointerObj; // arr和cur都是指针的作用
var pId = parentId || 'all';
var pFilters = parentId && parentId !== 'all' ? (_a = {}, _a[filterName] = parentId, _a) : {};
for (var j = 0; j < keys.length; j++) {
var key = keys[j];
var originName = source[i][key];
if (!cur[originName]) {
var pusher = {
originName: originName,
name: originName === '' ? '未命名' : originName,
id: null,
};
var tmp = [];
if (j !== (keys.length - 1)) {
tmp = [];
pusher.children = tmp;
}
var index = arr.push(pusher) - 1;
pusher.pId = pId;
pusher.id = pId !== 'all' ? pId + "-" + index : "" + index;
var filters = {};
if (!pId) {
filters[key] = originName;
}
else {
filters = __assign(__assign({}, pFilters), (_b = {}, _b[key] = originName, _b));
}
cur[originName] = { position: index, id: pusher.id, filters: filters };
platTreeMap[pusher.id] = { filters: filters, pId: pId };
cur = cur[originName]; // cur指向到cur[field]对应的子节点
arr = tmp; // arr指向pusher.children这个节点
}
else {
cur = cur[originName];
arr = arr[cur.position].children;
}
pId = cur.id;
pFilters = cur.filters;
}
}
return { platTreeMap: platTreeMap, tree: tree };
}
var fileToKeys = {
rvt: ['specialty', 'levelName', 'categoryName', 'family', 'familyType'],
ifc: ['IfcProject', 'IfcSite', 'IfcBuilding', 'IfcBuildingStorey', 'IfcEntity'],
};
var EFileType;
(function (EFileType) {
EFileType["rvt"] = "rvt";
EFileType["ifc"] = "ifc";
})(EFileType || (EFileType = {}));
function handleTreeKeys(source, fileType) {
var keys = fileToKeys[fileType];
var keysRes = [];
var keysLength = keys.length;
var _loop_1 = function (i) {
var key = keys[i];
var isKeyWidthVal = source.find(function (s) { return s[key] && s[key] !== ''; });
isKeyWidthVal && keysRes.push(key);
};
for (var i = 0; i < keysLength; i++) {
_loop_1(i);
}
return keysRes;
}
var EFilterType;
(function (EFilterType) {
EFilterType["A"] = "A";
EFilterType["B"] = "B";
})(EFilterType || (EFilterType = {}));
var transMultiplyingMap = {
'Millimeter-Millimeter': 1,
'Millimeter-Centimeter': 0.1,
'Millimeter-Meter': 0.001,
'Millimeter-Kilometer': 0.0000001,
'Meter-Millimeter': 1000,
'Meter-Centimeter': 100,
'Meter-Meter': 1,
'Meter-Kilometer': 0.001,
};
var bBoxBorderMap = {
Millimeter: 1000 * 2,
Centimeter: 100 * 2,
Meter: 1 * 2,
Kilometer: 0.001 * 2,
};
var detailDisplayKeys = {
rvt: ['family'],
ifc: ['Name'],
};
var overrideAllColor = function () {
viewer.value.getModel(modelId.value).overrideAllComponentsColor(new window.Glodon.Web.Graphics.Color(200, 200, 200, 0.5));
viewer.value.getModel(modelId.value).overrideComponentsFrameColor({ all: true }, new window.Glodon.Web.Graphics.Color(150, 150, 150, 1));
};
var overrideColor = function (results) {
viewer.value.getModel(modelId.value).clearIsolation();
var objectIdACollector = new Map();
var objectIdsA = results.reduce(function (prev, cur) {
if (!objectIdACollector.get(cur.objectIdA)) {
objectIdACollector.set(cur.objectIdA, true);
prev.push(cur.objectIdA);
}
return prev;
}, []);
var objectIdBCollector = new Map();
var objectIdsB = results.reduce(function (prev, cur) {
if (!objectIdBCollector.get(cur.objectIdB)) {
objectIdBCollector.set(cur.objectIdB, true);
prev.push(cur.objectIdB);
}
return prev;
}, []);
// 构件A的集合和B的集合分别设置颜色
viewer.value.getModel(modelId.value).overrideComponentsColorById(objectIdsA, new window.Glodon.Web.Graphics.Color(255, 96, 88, 0.5));
viewer.value.getModel(modelId.value).overrideComponentsFrameColor({ ids: objectIdsA }, new window.Glodon.Web.Graphics.Color(255, 96, 88, 1));
viewer.value.getModel(modelId.value).overrideComponentsColorById(objectIdsB, new window.Glodon.Web.Graphics.Color(75, 217, 82, 0.5));
viewer.value.getModel(modelId.value).overrideComponentsFrameColor({ ids: objectIdsB }, new window.Glodon.Web.Graphics.Color(75, 217, 82, 1));
};
var clashEffectOnModel = function (results) {
if (results === void 0) { results = []; }
overrideAllColor();
overrideColor(results);
};
var handleClashName = function (clash, type) {
var _a, _b;
var filesInfo = app.value.clashDetectiveConfig.filesInfo;
var objectData = "objectData" + type;
var id = "fileId" + type;
var fileId = modelType.value === 'INTEGRATE' ? (_a = clash[objectData]) === null || _a === void 0 ? void 0 : _a.fileId : clash[id]; // 非集成模型 fileId不会在objectData中解析
var fileType = (_b = filesInfo.get(String(fileId))) === null || _b === void 0 ? void 0 : _b.fileType;
var objectId = "objectId" + type;
var showKeys = detailDisplayKeys[fileType];
var displayName;
if (showKeys) {
displayName = showKeys.map(function (k) { return clash[objectData][k]; }).join('');
if (fileType === 'rvt') {
displayName = displayName + "[" + clash[objectId] + "]";
}
}
else {
displayName = clash[objectId];
}
return displayName;
};
var getGroupClashResults = function (group) {
var filterA = group.filterA, filterB = group.filterB;
var results = clashResults.value;
// 展示的名称需要根据文件类型处理
results.forEach(function (r) {
r.nameA = handleClashName(r, EFilterType.A);
r.nameB = handleClashName(r, EFilterType.B);
});
if (filterA && filterB) {
var resA = [];
var _loop_1 = function (i) {
var filter = filterA[i];
if ((filter === null || filter === void 0 ? void 0 : filter.id) === 'all') {
resA = results;
return "break";
}
else {
var filteredRes = results.filter(function (cur) { return Object.keys(filter).every(function (k) { return (cur === null || cur === void 0 ? void 0 : cur.objectDataA[k]) === filter[k]; }); });
resA.push.apply(resA, filteredRes);
}
};
for (var i = 0; i < filterA.length; i++) {
var state_1 = _loop_1(i);
if (state_1 === "break")
break;
}
var resB = [];
var _loop_2 = function (j) {
var filter = filterB[j];
if ((filter === null || filter === void 0 ? void 0 : filter.id) === 'all') {
resB = resA;
return "break";
}
else {
var filteredRes = resA.filter(function (cur) { return Object.keys(filter).every(function (k) { return (cur === null || cur === void 0 ? void 0 : cur.objectDataB[k]) === filter[k]; }); });
resB.push.apply(resB, filteredRes);
}
};
for (var j = 0; j < filterB.length; j++) {
var state_2 = _loop_2(j);
if (state_2 === "break")
break;
}
return resB;
}
return [];
};
/** 处理点击碰撞检测结果后触发的模型交互 */
var clearIsolation = function () {
// eslint-disable-next-line no-underscore-dangle
var model = viewer.value.getModels().find(function (m) { return String(m._data.modelId) === String(modelId.value); });
if (model) {
model.clearOverrideColorComponents();
model.restoreComponentsFrameColor({ all: true });
model.clearIsolation();
}
viewer.value.render();
};
var isolateComponentsById = function (currentItem) {
var _a, _b;
clearIsolation();
// eslint-disable-next-line no-underscore-dangle
var model = viewer.value.getModel(modelId.value);
if (model) {
model.isolateComponentsById([currentItem === null || currentItem === void 0 ? void 0 : currentItem.objectIdA, currentItem === null || currentItem === void 0 ? void 0 : currentItem.objectIdB], (_b = (_a = app.value) === null || _a === void 0 ? void 0 : _a.clashDetectiveConfig) === null || _b === void 0 ? void 0 : _b.makeOthersTranslucent);
model.overrideComponentsColorById([currentItem === null || currentItem === void 0 ? void 0 : currentItem.objectIdA], new window.Glodon.Web.Graphics.Color(229, 120, 115, 1));
model.overrideComponentsFrameColor({
ids: [[
currentItem === null || currentItem === void 0 ? void 0 : currentItem.objectIdA
]],
}, new window.Glodon.Web.Graphics.Color(255, 96, 88, 1));
model.overrideComponentsColorById([currentItem === null || currentItem === void 0 ? void 0 : currentItem.objectIdB], new window.Glodon.Web.Graphics.Color(105, 205, 112, 1));
model.overrideComponentsFrameColor({
ids: [[
currentItem === null || currentItem === void 0 ? void 0 : currentItem.objectIdB
]],
}, new window.Glodon.Web.Graphics.Color(75, 217, 82, 1));
}
viewer.value.render();
};
var transformToBoundingBox = function (position, unitTypeParam, modelUnitParam) {
var transMultiplying = viewer.value.getGlobalUnit() ? 1 : transMultiplyingMap[modelUnitParam + "-" + unitTypeParam];
var bBoxBorder = bBoxBorderMap[unitTypeParam];
return {
max: {
x: position.x * transMultiplying + bBoxBorder,
y: position.y * transMultiplying + bBoxBorder,
z: position.z * transMultiplying + bBoxBorder,
},
min: {
x: position.x * transMultiplying - bBoxBorder,
y: position.y * transMultiplying - bBoxBorder,
z: position.z * transMultiplying - bBoxBorder,
},
};
};
var zoomToBoundingBox = function (position) {
var _a;
var _b = (_a = app.value) === null || _a === void 0 ? void 0 : _a.clashDetectiveConfig, unitType = _b.unitType, modelUnit = _b.modelUnit;
var boundingbox = transformToBoundingBox(position, unitType, modelUnit);
viewer.value.zoomToBoundingBox(boundingbox);
};
var resetHomeView = function () {
viewer.value.setView(window.Glodon.Bimface.Viewer.ViewOption.Home);
};
var handleObjectData = function (results, type) {
var objectIdsMap = new Map();
var objectId = "objectId" + type;
var objectData = "objectData" + type;
var res = [];
for (var i = 0, l = results.length; i < l; i++) {
var cur = results[i];
var objectIdValue = cur[objectId];
if (!objectIdsMap.get(objectIdValue)) {
objectIdsMap.set(cur[objectId], true);
res.push(cur[objectData]);
}
}
return res;
};
var isResultsWithProperty = function (results, property) { return results.findIndex(function (r) { return r[property] && r[property] !== ''; }) !== -1; };
var getObjectTree = function (type) {
var isIntegrateModel = modelType.value === 'INTEGRATE';
var objectData = handleObjectData(clashResults.value, type);
var filterMap = { all: { filters: { id: 'all' }, pId: null } };
var rootTreeItem = {
id: 'all',
name: '全部构件',
children: [],
pId: null,
};
var filesInfo = app.value.clashDetectiveConfig.filesInfo;
var fileIds = Array.from(filesInfo.keys());
// 集成模型 如果数据上有specialty 则去除文件 否则仍保留文件
if (isIntegrateModel) {
var hasSpecialty = isResultsWithProperty(objectData, 'specialty');
if (hasSpecialty) {
var _a = getTreeInfo(objectData, fileToKeys.rvt, { parentId: 'all', filterName: '' }), tree_1 = _a.tree, platTreeMap = _a.platTreeMap;
return {
filterMap: __assign(__assign({}, filterMap), platTreeMap),
tree: [__assign(__assign({}, rootTreeItem), { children: tree_1 })],
};
}
var trees = fileIds.reduce(function (prev, cur) {
var _a, _b;
var _c = filesInfo.get(cur), fileName = _c.fileName, fileType = _c.fileType;
var fileTreeItem;
if (!['ifc', 'rvt'].includes(fileType)) {
fileTreeItem = {
id: cur, name: fileName, children: [], pId: 'all',
};
filterMap = __assign(__assign({}, filterMap), (_a = {}, _a[cur] = { filters: { fileId: cur }, pId: 'all' }, _a));
}
else {
var keys_1 = handleTreeKeys(objectData, fileType);
var _d = getTreeInfo(objectData, keys_1, { parentId: cur, filterName: 'fileId' }), tree_2 = _d.tree, idFilterMap = _d.platTreeMap;
fileTreeItem = {
id: cur, name: fileName, children: tree_2, pId: 'all',
};
filterMap = __assign(__assign(__assign({}, filterMap), idFilterMap), (_b = {}, _b[cur] = { filters: { fileId: cur }, pId: 'all' }, _b));
}
prev.push(fileTreeItem);
return prev;
}, []);
return {
filterMap: filterMap,
tree: [__assign(__assign({}, rootTreeItem), { children: trees })],
};
}
var fileType = filesInfo.get(fileIds[0]).fileType;
if (!['ifc', 'rvt'].includes(fileType)) {
return {
filterMap: filterMap,
tree: [rootTreeItem],
};
}
var keys = handleTreeKeys(objectData, fileType);
var _b = getTreeInfo(objectData, keys, { parentId: 'all', filterName: '' }), tree = _b.tree, filterMap1 = _b.platTreeMap;
return {
filterMap: __assign(__assign({}, filterMap), filterMap1),
tree: [__assign(__assign({}, rootTreeItem), { children: tree })],
};
};
var isObjectEqual = function (obj1, obj2) {
var obj1Keys = Object.keys(obj1);
var obj2Keys = Object.keys(obj2);
if (obj1Keys.length !== obj2Keys.length) {
return false;
}
// eslint-disable-next-line no-restricted-syntax
for (var _i = 0, obj1Keys_1 = obj1Keys; _i < obj1Keys_1.length; _i++) {
var key = obj1Keys_1[_i];
if (obj1[key] !== obj2[key]) {
return false;
}
}
return true;
};
var getCheckedKeys = function (filterType, hashTreeMap, filters) {
var keys = filters.reduce(function (acc, cur) {
var someId = Object.keys(hashTreeMap).find(function (k) { return isObjectEqual(hashTreeMap[k].filters, cur); });
if (someId) {
acc.push(someId);
}
return acc;
}, []);
return keys;
};
// 异步处理 根据分组信息得到碰撞列表和目录树信息
var hanldeClashResults = function () {
return new Promise(function (resolve, reject) {
var groups = clashGroups.value;
if (Array.isArray(groups) && groups.length) {
groups.forEach(function (group) {
group.clashList = getGroupClashResults(group);
var treeSourceA = getObjectTree(EFilterType.A);
group.treeA = treeSourceA.tree;
group.platTreeMapA = treeSourceA.filterMap;
group.checkedTreeIdsA = getCheckedKeys(EFilterType.A, treeSourceA.filterMap, group["filter" + EFilterType.A]);
var treeSourceB = getObjectTree(EFilterType.B);
group.treeB = treeSourceB.tree;
group.platTreeMapB = treeSourceB.filterMap;
group.checkedTreeIdsB = getCheckedKeys(EFilterType.B, treeSourceB.filterMap, group["filter" + EFilterType.B]);
});
resolve();
}
else {
reject();
}
});
};
var handleClickGroup = function (index) {
var _a;
selectedGroupIndex.value = index;
currentClashGroup.value = clashGroups.value[index];
resetHomeView();
clashEffectOnModel((_a = currentClashGroup.value) === null || _a === void 0 ? void 0 : _a.clashList);
showGroupItemPanel.value = true;
};
var ClashGroup = (function () {
return window.Glodon.__bf_h("div", {
class: "bf-clashdetective-group"
}, window.Glodon.__bf_h("div", {
class: "bf-clashdetective-title"
}, window.Glodon.__bf_h("span", null, "\u78B0\u649E\u5206\u7EC4")), window.Glodon.__bf_h("div", {
class: "bf-clashdetective-group-list"
}, window.Glodon.__bf_h("div", {
class: "bf-clashdetective-group-header bf-clashdetective-title"
}, window.Glodon.__bf_h("div", {
class: "bf-clashdetective-group-column-1-name"
}, "\u5206\u7EC4\u540D\u79F0"), window.Glodon.__bf_h("div", {
class: "bf-clashdetective-group-column-2-name"
}, "\u78B0\u649E\u70B9")), window.Glodon.__bf_h("ul", {
class: "bf-clashdetective-group-main"
}, {
__bf_render: () => clashGroups.value.map(function (group, index) {
return window.Glodon.__bf_h("li", {
class: "bf-clashdetective-row bf-clashdetective-group-row",
onClick: function () {
return handleClickGroup(index);
}
}, window.Glodon.__bf_h("span", {
class: {
__bf_render: () => index === selectedGroupIndex.value ? 'bf-clashdetective-group-column-1 bf-clashdetective-group-column-selected' : 'bf-clashdetective-group-column-1',
__bf_refItems: [(() => {
try {
return selectedGroupIndex;
} catch {}
})()]
}
}, group.name), window.Glodon.__bf_h("span", {
class: "bf-clashdetective-group-column-2"
}, group.count || 0));
}),
__bf_refItems: [(() => {
try {
return clashGroups;
} catch {}
})()]
})));
});
var Modal = (function (_a) {
var slot = _a.slot,
title = _a.title,
closeHandler = _a.closeHandler;
var modalContainer = ref(null);
var showModal = ref(false);
var open = function () {
showModal.value = true;
};
var close = function (handler) {
handler && handler();
showModal.value = false;
};
return window.Glodon.__bf_h("div", {
ref: modalContainer,
onCreated: open,
class: {
__bf_render: () => showModal.value ? 'bf-clashdetective-modal bf-clashdetective-modal-show' : 'bf-clashdetective-modal',
__bf_refItems: [(() => {
try {
return showModal;
} catch {}
})()]
}
}, window.Glodon.__bf_h("div", {
class: "modal-main"
}, window.Glodon.__bf_h("div", {
class: "modal-header"
}, window.Glodon.__bf_h("span", {
class: "modal-title"
}, title), window.Glodon.__bf_h("i", {
class: "bficon bf-gld-del-sm modal-close",
onClick: function () {
return close(closeHandler);
}
})), window.Glodon.__bf_h("div", {
class: "modal-content"
}, slot && slot())));
});
var SyleUtil = /** @class */ (function () {
function SyleUtil() {
}
SyleUtil.formatElementParam = function (defaultParam, customParam) {
if (typeof customParam == 'undefined')
return defaultParam;
var className = defaultParam.className, customClassName = customParam.className;
// style = customParam.style;
// 默认类名 自定义类名
if (customClassName) {
className = className + " " + customClassName;
}
// // 类型类名
// if(style) {
// className = `${className} is-${customClassName}`;
// }
var elementParam = window.Object.assign(defaultParam, customParam);
elementParam.className = className;
return elementParam;
};
return SyleUtil;
}());
var _a, _b, _c, _d;
var SDM = (_d = (_c = (_b = (_a = window.Glodon) === null || _a === void 0 ? void 0 : _a.Bimface) === null || _b === void 0 ? void 0 : _b.Data) === null || _c === void 0 ? void 0 : _c.StatisticsDataManager) === null || _d === void 0 ? void 0 : _d.getInstance();
var UINamespace = 'Gldon.Bimface.Tiles.UI';
var getUINamespace = function (className) {
if (DataUtil.assertType(className, 'str') && className.length > 0) {
className[0] !== '.' && (className = "." + className);
return "" + UINamespace + className;
}
else {
return UINamespace;
}
};
var SNS$9 = getUINamespace('Button');
/**
* @classdesc 类:Button组件类
* @class Glodon.Bimface.Tiles.UI.Button
* @constructs Glodon.Bimface.Tiles.UI.Button
* @description 构造按钮组件对象
* @extends Glodon.Bimface.Tiles.UI.Control
* @param {Object} option 构造按钮对象的配置项
* @param {String} option.id 按钮对象ID
* @param {Boolean} option.selectable 按钮是否有选中状态
* @param {String} option.iconClass 按钮图标样式
* @param {String} option.text 按钮对象的文本内容
*/
/** @class */ ((function (_super) {
__extends(Button, _super);
function Button(param) {
var _this = this;
SDM && (!param || !param.isInside) && SDM.send(SNS$9, "bf_c_UIButton_new");
param = param || {};
var elementParam = SyleUtil.formatElementParam({
elementType: 'div',
className: 'bfui-button'
}, param.elementParam);
var controlParam = {
elementParam: elementParam,
type: 'Button',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
param.text && _this.setText(param.text);
_this.selectable = param.selectable === true;
_this.selectable && (_this.select = false);
param.iconClass && _this.setIcon(param.iconClass);
param.tooltip && _this.setTooltip(param.tooltip);
param.clickCallback instanceof Function && _this.onClick(param.clickCallback);
return _this;
}
/**
* 获取按钮文字内容
* @function Glodon.Bimface.Tiles.UI.Button.prototype.getText
* @returns {String} 按钮文字内容
*/
Button.prototype.getText = function () {
return this._domElement.html();
};
/**
* 设置按钮文字内容
* @function Glodon.Bimface.Tiles.UI.Button.prototype.setText
* @param {String} test 按钮文字内容
*/
Button.prototype.setText = function (text) {
this._domElement.html(text);
return this;
};
/*
* 设置按钮的图标
* @function Glodon.Bimface.Tiles.UI.Button.prototype.setIcon
* @param {String} class 按钮图标样式类名
*/
Button.prototype.setIcon = function (iconClass) {
if (!iconClass)
return this;
if (!this.icon) {
this.icon = new Dom().createElement({ elementType: 'div', className: 'bfui-button-icon' });
this._domElement.append(this.icon);
}
else {
this.icon.removeClass(this.iconClass);
}
this.iconClass = iconClass;
this.icon.addClass(iconClass);
return this;
};
/**
* 获取按钮是否允许选中
* @function Glodon.Bimface.Tiles.UI.Button.prototype.isSelectable
* @returns {Boolean} 按钮是否允许选中
*/
Button.prototype.isSelectable = function () {
return this.selectable;
};
/**
* 获取按钮当前的选中状态
* @function Glodon.Bimface.Tiles.UI.Button.prototype.isSelected
* @returns {Boolean} 按钮当前的选中状态
*/
Button.prototype.isSelected = function () {
return this.select;
};
/**
* 设置按钮当前的选中状态
* @function Glodon.Bimface.Tiles.UI.Button.prototype.setSelected
* @param {Boolean} select 按钮当前的选中状态
*/
Button.prototype.setSelected = function (select) {
if (!this.selectable)
return this;
select = select === true;
if (select) {
this._domElement.addClass('bfui-button-select');
}
else {
this._domElement.removeClass('bfui-button-select');
}
this.select = select;
return this;
};
return Button;
})(Control));
var SNS$8 = getUINamespace('Label');
/**
* @classdesc 类:Label组件类
* @class Glodon.Bimface.Tiles.UI.Label
* @constructs Glodon.Bimface.Tiles.UI.Label
* @description 构造标签组件
* @extends Glodon.Bimface.Tiles.UI.Control
* @param {Object} option 构造标签的配置项
* @param {String} option.id 标签组件ID
* @param {String} option.text 标签的文字内容
*/
/** @class */ ((function (_super) {
__extends(Label, _super);
function Label(param) {
var _this = this;
SDM && (!param || !param.isInside) && SDM.send(SNS$8, "bf_c_UILabel_new");
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-label'
};
var controlParam = {
elementParam: elementParam,
type: 'Label',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
param.text && _this.setText(param.text);
param.onClick && _this.onClick(param.onClick);
param.className && _this.addClass(param.className);
return _this;
}
/**
* 获取文字内容
* @function Glodon.Bimface.Tiles.UI.Label.prototype.getText
* @returns {String} 文字内容
*/
Label.prototype.getText = function () {
return this._domElement.html();
};
/**
* 设置文字内容
* @function Glodon.Bimface.Tiles.UI.Label.prototype.setText
* @param {String} text 文字内容
*/
Label.prototype.setText = function (text) {
this._domElement.html(text);
return this;
};
return Label;
})(Control));
getUINamespace('Link');
//Link组件类
/** @class */ ((function (_super) {
__extends(Link, _super);
function Link(param) {
// SDM && SDM.send(SNS, "bf_c_UILink_new");
var _this = this;
param = param || {};
var elementParam = {
elementType: 'a',
className: 'bfui-link'
};
var controlParam = {
elementParam: elementParam,
type: 'Link',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
param.text && _this.setText(param.text);
_this.setHref(param.href);
param.onClick && _this.onClick(param.onClick);
return _this;
}
// 获取文本
Link.prototype.getText = function () {
return this._domElement.html();
};
// 设置文本
Link.prototype.setText = function (text) {
this._domElement.html(text);
return this;
};
Link.prototype.getHref = function () {
return this.href;
};
Link.prototype.setHref = function (href) {
this.href = href || 'javascript:void(0)';
this._domElement.attribute('href', this.href);
return this;
};
return Link;
})(Control));
/**
* @classdesc 类:Tooltip组件类
* @class Glodon.Bimface.Tiles.UI.Tooltip
* @constructs Glodon.Bimface.Tiles.UI.Tooltip
* @description 构造提示框组件
* @extends Glodon.Bimface.Tiles.UI.Control
* @param {Object} option 构造提示框的配置项
* @param {String} option.id 提示框组件ID
* @param {String} option.content 提示框的文字内容
*/
var Tooltip = /** @class */ (function (_super) {
__extends(Tooltip, _super);
function Tooltip(param) {
var _this = this;
var elementParam = {
elementType: 'div',
className: 'bfui-tooltip'
};
var controlParam = {
elementParam: elementParam,
type: 'Tooltip',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
_this.hostDom = param.hostDom;
_this.placement = param.placement || 'right';
_this.isFixed = param.isFixed || false;
_this.addClass("bfui-tooltip-" + _this.placement).setHTML(param.content).hide();
if (param.theme === 'dark') {
_this.addClass('bfui-tooltip-dark');
}
param.className && _this.addClass(param.className);
param.width && _this.getDomElement().css({ width: param.width + "px" });
var onHover = false;
var duration = 500;
var hideTimeout = null;
var hideWhenLeave = function () {
// dom元素被删除后取消监听
if (_this._domElement.displayType == undefined) {
param.hostDom.off('mouseleave', hideWhenLeave);
return;
}
onHover = false;
if (_this.enableAlwaysShow)
return;
if (hideTimeout) {
clearTimeout(hideTimeout);
hideTimeout = null;
}
hideTimeout = setTimeout(function () {
onHover || _this.hide();
}, duration);
};
var mouseEnterFn = function () {
// dom元素被删除后取消监听
if (_this._domElement.displayType == undefined) {
param.hostDom.off('mouseenter', mouseEnterFn);
return;
}
onHover = true;
_this.show();
requestAnimationFrame(function () {
!_this.isFixed && _this.updatePosition();
});
};
param.hostDom.on('mouseenter', mouseEnterFn).on('mouseleave', hideWhenLeave);
_this.getDomElement().on('mouseenter', function () {
onHover = true;
}).on('mouseleave', hideWhenLeave);
document.body.appendChild(_this.getDomElement().getElement());
return _this;
}
Tooltip.prototype.setEnableAlwaysShow = function (enable) {
this.enableAlwaysShow = enable;
if (enable) {
this.show();
}
else {
this.hide();
}
this.updatePosition();
};
Tooltip.prototype.setToolTipPosition = function (position) {
this.newLeft = position.left;
this.newTop = position.top;
this.getDomElement().css({ left: this.hostDom.getPosition().left + this.newLeft + "px",
top: this.hostDom.getPosition().top + position.top + "px" });
};
Tooltip.prototype.updatePosition = function () {
var _this = this;
var _a = this.hostDom.getPosition(), top = _a.top, right = _a.right; _a.bottom; var left = _a.left;
var _b = this.hostDom.getDimensions(), parentHeight = _b.height, parentWidth = _b.width;
var _c = this.getDimensions(), width = _c.width, height = _c.height;
switch (this.placement) {
case 'right':
(function () {
var computedTop = top + parentHeight / 2 - height / 2;
var computedLeft = right + 10;
_this.getDomElement().css({ left: computedLeft + "px", top: computedTop + "px" });
})();
break;
case 'top':
(function () {
var computedTop = top - height - 10;
var computedLeft = left + parentWidth / 2 - width / 2;
_this.getDomElement().css({ left: computedLeft + "px", top: computedTop + "px" });
})();
break;
case 'bottom':
(function () {
var computedTop = top + (typeof _this.newTop !== 'undefined' ? _this.newTop : 30);
var computedLeft = left - (typeof _this.newTop !== 'undefined' ? _this.newLeft : parentWidth - 10);
_this.getDomElement().css({ left: computedLeft + "px", top: computedTop + "px" });
})();
}
};
return Tooltip;
}(Control));
var SNS$7 = getUINamespace('Input');
/**
* @classdesc 类:Input组件类
* @class Glodon.Bimface.Tiles.UI.Input
* @constructs Glodon.Bimface.Tiles.UI.Input
* @description 构造输入框组件
* @extends Glodon.Bimface.Tiles.UI.Control
* @param {Object} option 构造输入框的配置项
* @param {String} option.id 输入框ID
*/
var Input = /** @class */ (function (_super) {
__extends(Input, _super);
function Input(param) {
var _this = this;
SDM && (!param || !param.isInside) && SDM.send(SNS$7, "bf_c_UIInput_new");
param = param || {};
var elementParam = {
elementType: 'input',
className: 'bfui-input'
};
var controlParam = __assign(__assign({}, param), { elementParam: elementParam, type: 'Input', id: param.id, parent: param.parent });
_this = _super.call(this, controlParam) || this;
_this._domElement.attribute('type', 'text');
param.value != undefined && _this.setValue(param.value);
param.onChange && _this.onChange(param.onChange);
param.onClick && _this.onClick(param.onClick);
param.onBlur && _this.onBlur(param.onBlur);
return _this;
}
/**
* 获取输入框的值
* @function Glodon.Bimface.Tiles.UI.Input.prototype.getValue
* @returns {String} 输入框的值
*/
Input.prototype.getValue = function () {
return this._domElement.attribute('value');
};
/**
* 设置输入框的值
* @function Glodon.Bimface.Tiles.UI.Input.prototype.setValue
* @param {String} value 输入框的值
*/
Input.prototype.setValue = function (value) {
return this._domElement.attribute('value', value);
};
/**
* 输入框的值发生变化的事件
* @function Glodon.Bimface.Tiles.UI.Input.prototype.onChange
* @param {Function} event 输入框值发生变化时执行的函数
*/
Input.prototype.onChange = function (fn) {
var _this = this;
this.onChangeFn && this._domElement.off('change', this.onChangeFn);
this._domElement.on('change', function (evt) {
_this.onChangeFn(evt.target.value);
});
this.onChangeFn = fn;
return this;
};
Input.prototype.onBlur = function (fn) {
this.onBlurFn && this._domElement.off('blur', this.onBlurFn);
this._domElement.on('blur', fn);
this.onBlurFn = fn;
return this;
};
Input.prototype.onFocus = function (fn) {
this._domElement.on('focus', fn);
return this;
};
Input.prototype.onInput = function (fn) {
this._domElement.on('input', fn);
return this;
};
Input.prototype.enabled = function (isEnabled) {
this._domElement.attribute('disabled', isEnabled ? '' : true);
return this;
};
Input.prototype.setPlaceholder = function (placeholder) {
this._domElement.attribute('placeholder', placeholder);
};
// 开启状态组件
Input.prototype.enableStatus = function (isEnable) {
if (isEnable === void 0) { isEnable = true; }
if (isEnable) {
this._domElement.addClass('bfui-input-status');
}
else {
this._domElement.removeClass('bfui-input-status');
}
};
// 组件出错状态
Input.prototype.enableErrorStatus = function (isEnable, errorMessage, width, left, top) {
if (isEnable === void 0) { isEnable = true; }
if (width === void 0) { width = 220; }
if (left === void 0) { left = 0; }
if (top === void 0) { top = 40; }
if (isEnable) {
this._domElement.addClass('bfui-input-error');
if (!this._toolTip && errorMessage) {
this._toolTip = new Tooltip({
hostDom: this._domElement,
placement: 'bottom',
width: width,
content: errorMessage,
isFixed: false,
});
this._toolTip.setToolTipPosition({ left: left, top: top });
this._toolTip.show();
}
}
else {
this._domElement.removeClass('bfui-input-error');
if (this._toolTip) {
this._toolTip.destroy();
this._toolTip = null;
}
}
};
return Input;
}(Control));
// 组件Group
var ControlGroup = /** @class */ (function (_super) {
__extends(ControlGroup, _super);
function ControlGroup(param) {
var _this = _super.call(this, param) || this;
_this._children = [];
return _this;
}
/**
* 添加组件
* @function Glodon.Bimface.Tiles.UI.ControlGroup.prototype.addControl
* @param {Object} control UI控件,对应Glodon.Bimface.Tiles.UI下的组件相关类
* @param {Object} option 添加组件的选项
* @param {Object} option.position 组件添加的位置
* @param {Glodon.Bimface.Tiles.UI.ControlAnchor} option.position.anchor 组件添加的锚点位置
* @param {Object} option.position.offset 基于锚点的偏移值
* @param {Number} option.position.offset.x X方向偏移值,单位为px
* @param {Number} option.position.offset.y Y方向偏移值,单位为px
*/
ControlGroup.prototype.addControl = function (control, option) {
if (!option || isNaN(option.index) || option.index === -1) {
this._children.push(control);
control.setParent(this);
this._domElement.append(control.getDomElement());
}
else {
var index = option.index;
if (index < -1) {
index = this.getControlCount() + index + 1;
}
this.insertControl(control, index);
}
return this;
};
// 插入子组件到指定index
ControlGroup.prototype.insertControl = function (control, index) {
if (!isNaN(index) && index < this._children.length) {
this._children.splice(index, 0, control);
control.setParent(this);
this._domElement.insert(control.getDomElement(), index);
}
else {
this.addControl(control);
}
return this;
};
/**
* 移除指定组件
* @function Glodon.Bimface.Tiles.UI.ControlGroup.prototype.removeControl
* @param {Object} control UI控件,对应Glodon.Bimface.Tiles.UI下的组件相关类
*/
ControlGroup.prototype.removeControl = function (control) {
var index = this.indexOf(control);
if (index >= 0) {
this._children.splice(index, 1);
control.setParent(undefined);
this._domElement.remove(control.getDomElement());
}
return this;
};
ControlGroup.prototype.clearControls = function (destroy) {
if (destroy === void 0) { destroy = false; }
while (this.getControlCount() > 0) {
var control = this.getControl({ index: 0 });
this.removeControl(control);
destroy && control.destroy();
}
return this;
};
/**
* 根据筛选条件获取组件对象
* @function Glodon.Bimface.Tiles.UI.ControlGroup.prototype.getControl
* @param {Object} condition 筛选条件
* @param {String} condition.id 组件ID
* @returns {Object} UI控件,对应Glodon.Bimface.Tiles.UI下的组件相关类
*/
ControlGroup.prototype.getControl = function (condition) {
var resultControl;
if (!condition)
return;
if (condition.id) {
this.getAllControls().some(function (control) {
if (control.getId() === condition.id) {
resultControl = control;
return true;
}
});
}
else if (!isNaN(condition.index) && condition.index < this.getControlCount()) {
resultControl = this._children[condition.index];
}
return resultControl;
};
/**
* 获取所有组件
* @function Glodon.Bimface.Tiles.UI.ControlGroup.prototype.getAllControls
* @returns {Array} 组件对象列表
*/
ControlGroup.prototype.getAllControls = function () {
return this._children;
};
// 根据子组件获取index
ControlGroup.prototype.indexOf = function (control) {
return this._children.indexOf(control);
};
// 获取当前已有子组件数量
ControlGroup.prototype.getControlCount = function () {
return this._children.length;
};
return ControlGroup;
}(Control));
var SNS$6 = getUINamespace('Panel');
/**
* @classdesc 类:Panel组件类
* @class Glodon.Bimface.Tiles.UI.Panel
* @constructs Glodon.Bimface.Tiles.UI.Panel
* @description 构造面板组件
* @extends Glodon.Bimface.Tiles.UI.Control
* @param {Object} option 构造标签的配置项
* @param {String} option.id 标签组件ID
* @param {String} option.title 标签标题的文字内容
* @param {Boolean} option.sizeFixed 面板大小是否固定,默认为false
* @param {Number} option.width 面板宽度,单位为px,默认为300
* @param {Number} option.height 面板宽度,单位为px,默认为200
* @param {Boolean} option.draggable 面板是否可拖动,默认为true
* @param {Object} option.position 面板位置
* @param {Glodon.Bimface.Tiles.UI.ControlAnchor} option.position.anchor 描述面板位置的锚点
* @param {Object} option.position.offset 面板基于锚点的偏移量,单位为px,默认值为{x: 0, y: 0}
*/
//Panel组件类
/** @class */ ((function (_super) {
__extends(Panel, _super);
function Panel(param) {
var _this = this;
SDM && (!param || !param.isInside) && SDM.send(SNS$6, "bf_c_UIPanel_new");
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-panel'
};
var controlParam = {
elementParam: elementParam,
type: 'Panel',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
param.onClick && _this.onClick(param.onClick);
var header = _this.header = new Dom().createElement({ elementType: 'div', className: 'bfui-panel-header' });
var contentElementParam = {
elementType: 'div',
className: 'bfui-panel-content'
};
var contentControlParam = {
elementParam: contentElementParam,
type: 'ControlGroup',
};
var content = _this.content = new ControlGroup(contentControlParam);
_this._domElement.append(header).append(content.getDomElement());
var title = _this.title = new Dom().createElement({ elementType: 'div', className: 'bfui-panel-title' });
var headerCloseButton = _this.headerCloseButton = new Dom().createElement({ elementType: 'div', className: 'bfui-button bfui-panel-headerclosebutton gld-bf-close-sm' });
header.append(title).append(headerCloseButton);
_this.onCloseFn = function () { _this.hide(); };
headerCloseButton.on('click', _this.onCloseFn);
param.title && _this.setTitle(param.title);
_this.sizeFixed = param.sizeFixed === true;
_this.draggable = param.draggable !== false;
_this.footerDisabled = param.footerDisabled === true;
param.position && _this.setPosition(param.position);
if (!isNaN(param.width)) {
_this.width = param.width;
if (!isNaN(param.minWidth) && param.minWidth > _this.width) {
param.minWidth = _this.width;
}
}
else {
_this.width = 300;
}
param.minWidth = param.minWidth || 100;
_this.getDomElement().css({ 'width': _this.width + "px" });
if (!isNaN(param.height)) {
_this.height = param.height;
if (!isNaN(param.minHeight) && param.minHeight > _this.height) {
param.minHeight = _this.height;
}
_this.getDomElement().css('height', _this.height + "px");
}
else { // 根据产品定义,用户未定义高度时,默认最小高度200px,最大高度420px,中间根据内容浮动
_this.height = 200;
_this.getDomElement().css({ 'minHeight': "200px", 'maxHeight': "420px" });
}
param.minHeight = param.minHeight || 80;
// 鼠标按下时此panel移到最上层
_this.getDomElement().on('mousedown', function () {
_this.topShow();
});
// 设置拖动位置事件
if (_this.draggable) {
var dragging_1 = false, startX_1, startY_1, startOffsetX_1, startOffsetY_1, parentDom_1, parentDimensions_1, selfDimensions_1, selfAnchor_1;
var mousemove_1 = function (event) {
if (!dragging_1)
return;
var x = event.clientX - startX_1 + startOffsetX_1;
var y = event.clientY - startY_1 + startOffsetY_1;
// 控制panel不超出父级div范围
var parentWidth = parentDimensions_1.width, parentHeight = parentDimensions_1.height;
var selfWidth = selfDimensions_1.width, selfHeight = selfDimensions_1.height;
var minX, minY, maxX, maxY;
if (selfAnchor_1.indexOf('left') >= 0) {
minX = 0;
maxX = parentWidth - selfWidth;
}
else if (selfAnchor_1.indexOf('right') >= 0) {
minX = -parentWidth + selfWidth;
maxX = 0;
}
else if (selfAnchor_1.indexOf('center') >= 0) {
minX = -(parentWidth - selfWidth) / 2;
maxX = (parentWidth - selfWidth) / 2;
}
if (selfAnchor_1.indexOf('top') >= 0) {
minY = 0;
maxY = parentHeight - selfHeight;
}
else if (selfAnchor_1.indexOf('bottom') >= 0) {
minY = -parentHeight + selfHeight;
maxY = 0;
}
else if (selfAnchor_1.indexOf('middle') >= 0) {
minY = -(parentHeight - selfHeight) / 2;
maxY = (parentHeight - selfHeight) / 2;
}
x = Math.max(x, minX);
x = Math.min(x, maxX);
y = Math.max(y, minY);
y = Math.min(y, maxY);
_this.setOffset({ x: x, y: y });
};
var mouseup_1 = function (event) {
dragging_1 = false;
parentDom_1.off('mousemove', mousemove_1).off('mouseup', mouseup_1);
};
header.on('mousedown', function (event) {
dragging_1 = true;
startX_1 = event.clientX;
startY_1 = event.clientY;
var _a = _this.getPositionParam(), anchor = _a.anchor, _b = _a.offset, x = _b.x, y = _b.y;
selfAnchor_1 = anchor.toLowerCase();
startOffsetX_1 = x;
startOffsetY_1 = y;
parentDom_1 = parentDom_1 || new Dom(_this.getDomElement().getElement().parentElement);
parentDom_1.on('mousemove', mousemove_1).on('mouseup', mouseup_1);
parentDimensions_1 = parentDom_1.getDimensions();
selfDimensions_1 = _this.getDimensions();
}).on('mousemove', mousemove_1).on('mouseup', mouseup_1).addClass('bfui-panel-header-dragable');
}
// 设置拖动大小事件
if (!_this.sizeFixed) {
var minWidth_1 = param.minWidth, minHeight_1 = param.minHeight;
_this.sizeFixedDom = new Dom().createElement({ elementType: 'div', className: 'bfui-panel-sizefixed' });
_this.getDomElement().append(_this.sizeFixedDom);
var dragging_2 = false, startX_2, startY_2, startWidth_1, startHeight_1, parentDom_2;
var mousemove_2 = function (event) {
if (!dragging_2)
return;
var formerWidth = _this.width, formerHeight = _this.height;
_this.width = event.clientX - startX_2 + startWidth_1;
_this.height = event.clientY - startY_2 + startHeight_1;
_this.width < minWidth_1 && (_this.width = minWidth_1);
_this.height < minHeight_1 && (_this.height = minHeight_1);
_this.getDomElement().css({ width: _this.width + "px", height: _this.height + "px" });
var _a = _this.getPositionParam(), _b = _a.offset, x = _b.x, y = _b.y, anchor = _a.anchor;
var deltaX = _this.width - formerWidth, deltaY = _this.height - formerHeight;
if (anchor.indexOf('Center') >= 0) {
x += deltaX / 2;
}
if (anchor.indexOf('Middle') >= 0) {
y += deltaY / 2;
}
if (anchor.indexOf('Right') >= 0) {
x += deltaX;
}
if (anchor.indexOf('Bottom') >= 0) {
y += deltaY;
}
_this.setOffset({ x: x, y: y });
};
var mouseup_2 = function (event) {
dragging_2 = false;
parentDom_2.off('mousemove', mousemove_2).off('mouseup', mouseup_2);
};
_this.sizeFixedDom.on('mousedown', function (event) {
_this.getDomElement().css({ height: _this.getHeight() + "px" }).css({ minWidth: minWidth_1 + "px", minHeight: minHeight_1 + "px", maxHeight: '' });
dragging_2 = true;
startX_2 = event.clientX;
startY_2 = event.clientY;
startWidth_1 = _this.getWidth();
startHeight_1 = _this.getHeight();
parentDom_2 = parentDom_2 || new Dom(_this.getDomElement().getElement().parentElement);
parentDom_2.on('mousemove', mousemove_2).on('mouseup', mouseup_2);
}).on('mousemove', mousemove_2).on('mouseup', mouseup_2);
}
// 设置footer
if (_this.footerDisabled) {
var footerElementParam = {
elementType: 'div',
className: 'bfui-panel-footer'
};
var footerControlParam = {
elementParam: footerElementParam,
type: 'ControlGroup',
};
_this.footer = new ControlGroup(footerControlParam);
_this._domElement.append(_this.footer.getDomElement());
}
return _this;
}
Panel.prototype.setTips = function (tips, type) {
if (this.tipsElement) {
this.tipsElement.destroy();
}
var classMap = {
default: "bfui-panel-tips",
loading: "bfui-panel-loading"
};
var className = classMap[type] || classMap.default;
var tipsElement = new Dom().createElement({ elementType: 'div', className: className });
tipsElement.html(tips);
this.tipsElement = tipsElement;
this.showTips();
};
Panel.prototype.showTips = function () {
if (this.tipsElement) {
this.content.getDomElement().html('');
this.content.getDomElement().append(this.tipsElement);
return this;
}
};
Panel.prototype.getContent = function () {
return this.content;
};
Panel.prototype.clearContent = function () {
this.content.getDomElement().html('');
return this;
};
Panel.prototype.getFooter = function () {
return this.footer;
};
Panel.prototype.clearFooter = function () {
this.footerDisabled && this.footer.getDomElement().html('');
return this;
};
/**
* 设置面板标题文字内容
* @function Glodon.Bimface.Tiles.UI.Panel.prototype.setTitle
* @param {String} text 面板标题文字内容
*/
Panel.prototype.setTitle = function (text) {
this.title.html(text);
return this;
};
/**
* 获取面板标题文字内容
* @function Glodon.Bimface.Tiles.UI.Panel.prototype.getTitle
* @returns {String} 面板标题文字内容
*/
Panel.prototype.getTitle = function () {
return this.title.html();
};
/**
* 添加控件
* @function Glodon.Bimface.Tiles.UI.Panel.prototype.addControl
* @param {Object} control UI控件,对应Glodon.Bimface.Tiles.UI下的组件相关类
* @param {Object} option 添加控件的选项(选填)
* @param {Number} index 控件插入位置,index为0时控件插入至面板第一个位置,1为第二个位置,以此类推,为-1时则将该控件放至面板最后
*/
Panel.prototype.addControl = function (control, option) {
this.content.addControl(control, option);
return this;
};
/**
* 移除控件
* @function Glodon.Bimface.Tiles.UI.Panel.prototype.removeControl
* @param {Object} control UI控件,对应Glodon.Bimface.Tiles.UI下的组件相关类
*/
Panel.prototype.removeControl = function (control) {
this.content.removeControl(control);
return this;
};
/**
* 获取指定控件的序号
* @function Glodon.Bimface.Tiles.UI.Panel.prototype.indexOf
* @param {Object} control UI控件,对应Glodon.Bimface.Tiles.UI下的组件相关类
* @returns {Number} 控件在面板中的序号
*/
Panel.prototype.indexOf = function (control) {
return this.content.indexOf(control);
};
/**
* 根据筛选条件获取控件对象
* @function Glodon.Bimface.Tiles.UI.Panel.prototype.getControl
* @param {Object} condition 筛选条件
* @param {String} condition.id 控件ID
* @param {Number} condition.index 控件在面板中的序号
* @returns {Object} UI控件,对应Glodon.Bimface.Tiles.UI下的组件相关类
*/
Panel.prototype.getControl = function (condition) {
return this.content.getControl(condition);
};
/**
* 根据筛选条件获取控件对象
* @function Glodon.Bimface.Tiles.UI.Panel.prototype.getAllControls
* @returns {Array} 由控件对象组成的列表
*/
Panel.prototype.getAllControls = function () {
return this.content.getAllControls();
};
/**
* 面板关闭的事件
* @function Glodon.Bimface.Tiles.UI.Panel.prototype.onClose
* @param {Function} event 面板关闭时执行的函数
*/
Panel.prototype.onClose = function (fn, hide) {
var _this = this;
if (hide === void 0) { hide = true; }
this.headerCloseButton.off('click', this.onCloseFn);
this.onCloseFn = function (data) {
fn(data);
hide && _this.hide();
};
this.headerCloseButton.on('click', this.onCloseFn);
return this;
};
Panel.prototype.topShow = function () {
var list = document.querySelectorAll('.bfui-panel');
list.forEach(function (element) {
var dom = new Dom(element);
dom.removeClass('bfui-panel-topshow');
});
this.getDomElement().addClass('bfui-panel-topshow');
};
return Panel;
})(Control));
/**
* SelectOption组件类,作为Select组件的单条option
*/
var SelectOption = /** @class */ (function (_super) {
__extends(SelectOption, _super);
function SelectOption(param) {
var _this = this;
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-select-option'
};
var controlParam = {
elementParam: elementParam,
type: 'SelectOption',
};
_this = _super.call(this, controlParam) || this;
_this.setTooltip(param.text).getDomElement().html(param.text);
_this.disabled = param.disabled === true;
_this.selected = param.selected === true;
_this.value = param.value;
_this.setDisabled(_this.disabled).setSelected(_this.selected);
param.visible === false && _this.hide();
// 点击本条option时,调用SelectOptionGroup的setSelected事件,将本条option设置为选中,其他option取消选中
_this.onClick(function () {
if (!_this.selected && !_this.disabled) {
_this._parent.setSelected(_this);
}
_this.trigger(UIEvents$1.Clicked);
});
return _this;
}
/**
* 设置选中状态
* @param {Boolean} selected 选中状态
*/
SelectOption.prototype.setSelected = function (selected) {
if (!this.disabled && this.selected !== selected) {
this.selected = selected;
selected ? this.addClass('bfui-select-option-selected') : this.removeClass('bfui-select-option-selected');
}
return this;
};
/**
* 设置不可用状态
* @param {Boolean} disabled 不可用状态
*/
SelectOption.prototype.setDisabled = function (disabled) {
if (this.disabled !== disabled) {
this.setSelected(false);
this.disabled = disabled;
disabled ? this.addClass('bfui-select-option-disabled') : this.removeClass('bfui-select-option-disabled');
}
return this;
};
/**
* 获取option的文本内容
*/
SelectOption.prototype.getText = function () {
return this.getDomElement().html();
};
/**
* 获取option的实际value,如未设置value则返回option的text文本内容
*/
SelectOption.prototype.getValue = function () {
return this.value === undefined ? this.getText() : this.value;
};
return SelectOption;
}(Control));
/**
* SelectOptionGroup组件类,管理多条SelectOption
*/
var SelectOptionGroup = /** @class */ (function (_super) {
__extends(SelectOptionGroup, _super);
function SelectOptionGroup(config) {
var _this = this;
var contentElementParam = {
elementType: 'div',
className: 'bfui-select-content'
};
var contentControlParam = {
// parent: document.getElementsByTagName('body')[0],
elementParam: contentElementParam,
type: 'ControlGroup',
};
_this = _super.call(this, contentControlParam) || this;
_this.enableAnimation = config.enableAnimation !== false;
_this.enableAnimation && _this.addClass('bfui-select-animation');
_this._maxHeight = config.maxHeight || 125;
_this._showTop = false;
_this.getDomElement().css('maxHeight', _this._maxHeight + "px");
config.values && _this.setValues(config.values);
_this.hide();
return _this;
}
/**
* 设置option内容
* @param {Array<string | IOptionParam>} values option内容
*/
SelectOptionGroup.prototype.setValues = function (values) {
var _this = this;
this.clearControls();
this.values = [];
values.forEach(function (value) {
var param;
if (!DataUtil.assertType(value, 'obj')) {
param = { text: value.toString() };
}
else {
param = value;
}
_this.values.push(param);
var option = new SelectOption(param);
_this.addControl(option);
option.on(UIEvents$1.Clicked, function () {
_this.trigger(UIEvents$1.Clicked, option);
});
});
this._height = 0;
return this;
};
/**
* 获取当前显示/隐藏状态
*/
SelectOptionGroup.prototype.isVisible = function () {
return this.enableAnimation ? this._visible : _super.prototype.isVisible.call(this);
};
SelectOptionGroup.prototype.getOptionsHeight = function () {
if (!this._height) {
var height_1 = 2;
this._children && this._children.forEach(function (child) {
if (child.isVisible()) {
height_1 += child.getHeight();
}
});
this._height = height_1;
}
return this._height;
};
SelectOptionGroup.prototype.setFixedPosition = function (position) {
var pageHeight = window.innerHeight, maxHeight = this._maxHeight, dom = this.getDomElement().getElement(), minHeight = Math.min(maxHeight, this.getOptionsHeight());
if (position.bottom + minHeight > pageHeight) {
dom.style.top = '';
dom.style.bottom = pageHeight - position.top + 'px';
}
else {
dom.style.top = position.bottom + 'px';
dom.style.bottom = '';
}
dom.style.left = position.left + 'px';
dom.style.width = position.right - position.left + 'px';
};
SelectOptionGroup.prototype.setTop = function (value) {
this._showTop = value;
if (value) {
this.removeClass('bfui-select-animation');
}
else {
this.addClass('bfui-select-animation');
}
};
/**
* 显示组件
*/
SelectOptionGroup.prototype.show = function () {
var _this = this;
if (this.enableAnimation) { // 支持动画状态时,通过height变化显示组件
this._visible = true;
var transitionEndFn_1 = function () {
if (_this._inTransition) {
_this.getDomElement().removeClass('bfui-select-overflow-hidden').off('transitionend', transitionEndFn_1);
_this._inTransition = false;
}
};
this._inTransition = true;
this.getDomElement().addClass('bfui-select-overflow-hidden').css({ 'border-width': '1px', 'height': this.getOptionsHeight() + 'px' }).on('transitionend', transitionEndFn_1);
if (this._showTop) {
var topMargin = 27 + this.getOptionsHeight();
this.getDomElement().css({ 'margin-top': '-' + topMargin + 'px' });
}
}
else {
_super.prototype.show.call(this);
}
return this;
};
/**
* 隐藏组件
*/
SelectOptionGroup.prototype.hide = function () {
if (this.enableAnimation) { // 支持动画状态时,通过height变化隐藏组件
this._visible = false;
this.getDomElement().addClass('bfui-select-overflow-hidden').css({ 'border-width': '0px', 'height': '0px' });
}
else {
_super.prototype.hide.call(this);
}
return this;
};
/**
* 设置某条option为选中状态,其他option取消选中
* @param {SelectOption | string} option 选中的内容
*/
SelectOptionGroup.prototype.setSelected = function (option) {
if (option === undefined)
return;
var isValidOption = false;
if (!(option instanceof SelectOption)) {
this.getAllControls().some(function (cControl) {
if (cControl.getText() === option.toString()) {
option = cControl;
isValidOption = true;
return true;
}
});
}
else if (this.indexOf(option) >= 0) {
isValidOption = true;
}
if (isValidOption && this.selected !== option) {
this.getAllControls().forEach(function (cControl) {
cControl.setSelected(cControl === option ? true : false);
});
this.selected = option;
var text = this.selected.getText();
var index = this.indexOf(this.selected);
var value = this.selected.getValue();
this.trigger(UIEvents$1.ValueChanged, { text: text, value: value, index: index });
}
return this;
};
/**
* 根据序号设置Option选中状态
* @param {Number} index Option
*/
SelectOptionGroup.prototype.setSelectedByIndex = function (index) {
var option = this.getControl({ index: index });
if (option) {
this.setSelected(option);
}
return this;
};
/**
* 根据Value设置Option选中状态
* @param {String | Number} value Option的Value值
*/
SelectOptionGroup.prototype.setSelectedByValue = function (value) {
var result;
this.getAllControls().some(function (option) {
option = option;
if (option.getValue() === value) {
result = option;
return true;
}
});
return this.setSelected(result);
};
/**
* 获取当前选中的Option
*/
SelectOptionGroup.prototype.getSelected = function () {
return this.selected;
};
/**
* 获取所有Option的信息数组
*/
SelectOptionGroup.prototype.getValues = function () {
return this.values;
};
SelectOptionGroup.prototype.clearSelection = function () {
this.selected = null;
this.trigger(UIEvents$1.ValueChanged);
};
SelectOptionGroup.prototype.setMaxHeight = function (maxHeight) {
this._maxHeight = maxHeight;
this.getDomElement().css('maxHeight', this._maxHeight + "px");
};
return SelectOptionGroup;
}(ControlGroup));
getUINamespace('Select');
/**
* Select组件类
*/
/** @class */ ((function (_super) {
__extends(Select, _super);
function Select(param) {
var _this = this;
// SDM && SDM.send(SNS, "bf_c_UISelect_new");
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-select'
};
var controlParam = __assign(__assign({}, param), { elementParam: elementParam, type: 'Select', id: param.id, parent: param.parent });
_this = _super.call(this, controlParam) || this;
_this.enableAnimation = param.enableAnimation !== false;
// Select的header部分,由显示的选中Text及下拉button组成
var header = _this.header = new Dom().createElement({ elementType: 'div', className: 'bfui-select-header' });
var title = _this.title = new Dom().createElement({ elementType: 'div', className: 'bfui-select-title' });
title.html('请选择');
var toggleButton = _this.toggleButton = new Dom().createElement({ elementType: 'div', className: 'bfui-button bfui-select-togglebutton gld-bf-arrow-down-sm' });
_this.enableAnimation && toggleButton.addClass('bfui-select-animation');
header.append(title).append(toggleButton).on('click', function (evt) {
if (_this.disabled)
return;
_this.content.isVisible() ? _this.hideContent() : _this.showContent();
});
// Select的content部分,基于ControlGroup建立了SelectOptionGroup子类,用于管理多个SelectOption
var content = _this.content = new SelectOptionGroup({ enableAnimation: _this.enableAnimation, values: param.values, maxHeight: param.maxHeight });
_this.getDomElement().append(header);
new Dom(document.body).append(content.getDomElement());
_this.onChange(param.onChange);
// 选中项发生变化时,更新header文字,隐藏content,并触发onChange事件
content.on(UIEvents$1.ValueChanged, function (data) {
data && _this.title.html(data.text);
_this.onChangeCallback instanceof Function && _this.onChangeCallback(data);
});
content.on(UIEvents$1.Clicked, function (clickedOption) {
_this.hideContent();
});
// this.getDomElement().on('mouseleave', ()=> this.hideContent()); // 鼠标离开Select组件时隐藏content
param.defaultIndex !== undefined && _this.setSelected(param.defaultIndex); // 根据配置设置初始选中序号
param.width && (_this.getDomElement().css('width', param.width + "px")); // 根据配置设置Select组件的宽度
document.addEventListener('mousedown', function (evt) {
var headerDom = header.getElement(), targetParent = evt.target.parentElement;
if (evt.target == headerDom || targetParent == headerDom || targetParent == content.getDomElement().getElement() || evt.target == content.getDomElement().getElement()) {
return;
}
_this.hideContent();
}, false);
window.addEventListener('resize', function () {
_this._resize();
});
_this.scrollFunc = _this._scrollFunc.bind(_this);
return _this;
}
Select.prototype._resize = function () {
var domRect = this.header.getPosition();
this.content.setFixedPosition(domRect);
};
/**
* 设置option内容
* @param {Array<string | IOptionParam>} values 由string或IOptionParam组成的数组
*/
Select.prototype.setValues = function (values) {
this.content.setValues(values);
return this;
};
/**
* 设置选中项
* @param {Number} index 选中序号
*/
Select.prototype.setSelected = function (index) {
this.content.setSelectedByIndex(index);
this.title.html(this.content.getSelected().getText());
this.hideContent();
return this;
};
/**
* 根据Value设置Option选中状态
* @param {String | Number} value Option的Value值
*/
Select.prototype.setSelectedByValue = function (value) {
this.content.setSelectedByValue(value);
return this;
};
/**
* 设置Select组件不可用状态
* @param {Boolean} disabled 组件不可用状态,默认为true
*/
Select.prototype.setDisabled = function (disabled) {
if (disabled === void 0) { disabled = true; }
this.disabled = disabled;
disabled ? this.addClass('bfui-select-disabled') : this.removeClass('bfui-select-disabled');
return this;
};
/**
* 设置onChange回调函数
* @param {Function} fn onChange回调函数
*/
Select.prototype.onChange = function (fn) {
fn instanceof Function && (this.onChangeCallback = fn);
return this;
};
Select.prototype._scrollFunc = function () {
this.hideContent();
//移除监听容器的滚动事件
this.getDomElement().getParent().removeEventListener('scroll', this.scrollFunc, false);
};
/**
* 显示options
*/
Select.prototype.showContent = function () {
this.toggleButton.addClass('bfui-select-togglebutton-opened');
this._resize();
this.content.show();
//监听容器的滚动事件
this.getDomElement().getParent().addEventListener('scroll', this.scrollFunc, false);
return this;
};
/**
* 隐藏options
*/
Select.prototype.hideContent = function () {
this.toggleButton.removeClass('bfui-select-togglebutton-opened');
this.content.hide();
return this;
};
Select.prototype.clearSelection = function (defaultText) {
this.content.clearSelection();
this.setText(defaultText);
return this;
};
Select.prototype.setText = function (text) {
this.title.html(text);
return this;
};
Select.prototype.setMaxHeight = function (maxHeight) {
this.content.setMaxHeight(maxHeight);
};
Select.prototype.setId = function (id) {
this.id = id;
};
Select.prototype.getId = function () {
return this.id;
};
return Select;
})(Control));
getUINamespace('Switch');
//Switch组件类
/** @class */ ((function (_super) {
__extends(Switch, _super);
function Switch(param) {
// SDM && SDM.send(SNS, "bf_c_UISwitch_new");
var _this = this;
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-switch'
};
var controlParam = {
elementParam: elementParam,
type: 'Switch',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
param.onClick && _this.onClick(param.onClick);
param.onChange && _this.onChange(param.onChange);
var switchPart = _this.switchPart = new Dom().createElement({ elementType: 'input', className: 'bfui-switch-switch' });
switchPart.attribute('type', 'checkbox');
switchPart.on('click', function () {
_this.value = switchPart.attribute('checked');
_this.onChangeFn && _this.onChangeFn(_this.value);
});
var textPart = _this.textPart = new Dom().createElement({ elementType: 'div', className: 'bfui-switch-text' });
_this._domElement.append(switchPart).append(textPart);
param.text && _this.setText(param.text);
param.value && _this.setValue(param.value);
return _this;
}
// 获取文本
Switch.prototype.getText = function () {
return this.textPart.html();
};
// 设置文本
Switch.prototype.setText = function (text) {
this.textPart.html(text);
return this;
};
// 获取当前switch状态
Switch.prototype.getValue = function () {
return this.value;
};
// 设置switch状态
Switch.prototype.setValue = function (value) {
this.value = value;
this.switchPart.attribute('checked', value);
this.trigger(UIEvents$1.ValueChanged, this, value);
return this;
};
Switch.prototype.onChange = function (fn) {
fn instanceof Function && (this.onChangeFn = fn);
return this;
};
return Switch;
})(Control));
var CheckState = /** @class */ (function (_super) {
__extends(CheckState, _super);
function CheckState(param) {
var _this = _super.call(this, param) || this;
var inputPart = _this.inputPart = new Dom().createElement({ elementType: 'input', className: param.className });
inputPart.attribute('type', param.name);
_this._domElement.on('click', function (evt) {
if (!evt.target.hasClass(param.className)) {
_this.inputPart.getElement().click();
}
});
inputPart.on('change', function () {
_this.trigger(UIEvents$1.ValueChanged, _this, _this.getValue(), _this.isChecked());
});
var textPart = _this.textPart = new Dom().createElement({ elementType: 'label', className: "bfui-checkState-text" });
_this._domElement.append(inputPart).append(textPart);
_this.setValue(param.value === undefined ? true : param.value);
param.label && _this.setLabel(param.label);
param.enabled === false && _this.setEnabled(param.enabled);
param.checked === true && _this.setChecked(param.checked);
return _this;
}
/**
* 多选框选中状态发生变化的事件
* @function Glodon.Bimface.Tiles.UI.CheckState.prototype.onChange
* @param {Function} event 多选框选中状态发生变化时执行的函数
*/
CheckState.prototype.onChange = function (fn) {
this.on(UIEvents$1.ValueChanged, fn);
return this;
};
/**
* 获取多选框文字内容
* @function Glodon.Bimface.Tiles.UI.CheckState.prototype.getLabel
* @returns {String} 多选框文字内容
*/
CheckState.prototype.getLabel = function () {
return this.textPart.html();
};
/**
* 设置多选框文字内容
* @function Glodon.Bimface.Tiles.UI.CheckState.prototype.setLabel
* @param {String} text 多选框文字内容
*/
CheckState.prototype.setLabel = function (text) {
this.textPart.html(text);
return this;
};
/**
* 获取多选框的启用状态
* @function Glodon.Bimface.Tiles.UI.CheckState.prototype.isEnabled
* @returns {Boolean} 多选框的启用状态
*/
CheckState.prototype.isEnabled = function () {
return !this.inputPart.attribute('disabled');
};
/**
* 设置多选框的启用状态
* @function Glodon.Bimface.Tiles.UI.CheckState.prototype.setEnabled
* @param {Boolean} isEnabled 多选框的启用状态
*/
CheckState.prototype.setEnabled = function (isEnabled) {
if (isEnabled != this.isEnabled()) {
this.textPart.toggle('bfui-checkState-text-disabled');
this.inputPart.attribute('disabled', !isEnabled);
}
return this;
};
/**
* 获取多选框的选中状态
* @function Glodon.Bimface.Tiles.UI.CheckState.prototype.isChecked
* @returns {Boolean} 多选框的选中状态
*/
CheckState.prototype.isChecked = function () {
return this.inputPart.attribute('checked');
};
/**
* 设置多选框的选中状态
* @function Glodon.Bimface.Tiles.UI.CheckState.prototype.setChecked
* @param {Boolean} checked 多选框的选中状态
*/
CheckState.prototype.setChecked = function (checked) {
if (checked != this.isChecked()) {
this.inputPart.attribute('checked', checked);
this.trigger(UIEvents$1.ValueChanged, this, this.getValue(), checked);
}
return this;
};
/**
* 获取多选框的返回值
* @function Glodon.Bimface.Tiles.UI.CheckState.prototype.getValue
* @returns {String} 多选框的返回值
*/
CheckState.prototype.getValue = function () {
return this.value;
};
/**
* 设置多选框的返回值
* @function Glodon.Bimface.Tiles.UI.CheckState.prototype.setValue
* @param {String} value 多选框的返回值
*/
CheckState.prototype.setValue = function (value) {
this.value = value;
return this;
};
return CheckState;
}(Control));
var SNS$5 = getUINamespace('Checkbox');
/**
* @classdesc 类:Checkbox组件类
* @class Glodon.Bimface.Tiles.UI.Checkbox
* @constructs Glodon.Bimface.Tiles.UI.Checkbox
* @extends Glodon.Bimface.Tiles.UI.CheckState
* @extends Glodon.Bimface.Tiles.UI.Control
* @description 构造Checkbox组件对象
* @param {Object} option 构造多选框的配置项
* @param {String} option.id 多选框ID
* @param {String} option.label 多选框文字内容
* @param {String} option.value 多选框状态变化时的返回值
* @param {Boolean} option.checked 多选框的选中状态,缺省值为false
* @param {Boolean} option.enabled 多选框是否可用,缺省值为true
*/
var Checkbox = /** @class */ (function (_super) {
__extends(Checkbox, _super);
function Checkbox(param) {
var _this = this;
SDM && (!param || !param.isInside) && SDM.send(SNS$5, "bf_c_UICheckBox_new");
var elementParam = {
elementType: 'div',
className: 'bfui-checkbox'
};
var controlParam = {
elementParam: elementParam,
type: 'Checkbox',
name: 'checkbox',
id: param.id,
className: 'bfui-checkbox-checkbox',
parent: param.parent
};
param = Object.assign({}, controlParam, param);
_this = _super.call(this, param) || this;
return _this;
}
return Checkbox;
}(CheckState));
getUINamespace('Collapse');
//Collapse组件类
var Collapse = /** @class */ (function (_super) {
__extends(Collapse, _super);
function Collapse(param) {
// SDM && SDM.send(SNS, "bf_c_UICollapse_new");
var _this = this;
var elementParam = {
elementType: 'tbody',
className: 'bfui-collapse-tbody'
};
var controlParam = {
elementParam: elementParam,
type: 'Collapse',
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
// let tbodyPart = this.tbodyPart = new Dom().createElement({ elementType: 'tbody', className :param.isCollapse?'bf-collapse':'' });
var tbodyPart = _this._domElement;
var titlePart = new Dom().createElement({ elementType: 'tr', className: 'bfui-collapse-title bfui-transition' });
if (param.group === '基本属性') {
param.group = window.BimfaceLanguage.bf_panel_basic_attribute;
}
titlePart.html("<td colspan=\"2\"><i class=\"bfui-collapse-icon\"></i>" + param.group + "</td>");
tbodyPart.append(titlePart);
if (param.items && param.items.length > 0) {
param.items.forEach(function (item) {
var tr = new Dom().createElement({ elementType: 'tr', className: 'bfui-collapse-content' });
tr.html("<td class=\"bfui-collapse-content-key\"><div class=\"bfui-collapse-content-padding\"></div><div class=\"bfui-collapse-content-name\">" + item.key + "</div></td><td class=\"bfui-collapse-content-value\">" + item.value + "</td>");
tbodyPart.append(tr);
});
}
titlePart.on('click', function () {
tbodyPart.toggleClass('bfui-collapse-collapse');
});
return _this;
}
return Collapse;
}(Control));
getUINamespace('Radio');
//Radio组件类
var Radio = /** @class */ (function (_super) {
__extends(Radio, _super);
function Radio(param) {
// SDM && SDM.send(SNS, "bf_c_UIRadio_new");
var _this = this;
var elementParam = {
elementType: 'div',
className: 'bfui-radio'
};
var controlParam = {
elementParam: elementParam,
type: 'Radio',
name: 'radio',
id: param.id,
className: 'bfui-radio-radio',
parent: param.parent
};
param = Object.assign({}, controlParam, param);
_this = _super.call(this, param) || this;
return _this;
}
return Radio;
}(CheckState));
getUINamespace('Slider');
//Slider组件类
/** @class */ ((function (_super) {
__extends(Slider, _super);
function Slider(param) {
// SDM && SDM.send(SNS, "bf_c_UISlider_new");
var _this = this;
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-slider'
};
var controlParam = {
elementParam: elementParam,
type: 'Slider',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
_this.minValue = param.minValue || 0;
_this.maxValue = param.maxValue || 100;
param.onClick && _this.onClick(param.onClick);
_this.onChangeCallback = param.onChangeCallback || param.onChange;
var sliderLinePart = _this.sliderLinePart = new Dom().createElement({ elementType: 'div', className: 'bfui-slider-line' });
var sliderLeftPart = _this.sliderLeftPart = new Dom().createElement({ elementType: 'div', className: 'bfui-slider-left' });
var sliderValuePart = _this.sliderValuePart = new Dom().createElement({ elementType: 'div', className: 'bfui-slider-value' });
_this._domElement.append(sliderLinePart).append(sliderLeftPart).append(sliderValuePart);
_this.setValue(param.value || 0);
_this.setEnableTooltip(param.enableTooltip);
_this.on(UIEvents$1.ValueChanged, function (data) {
_this.onChangeCallback instanceof Function && _this.onChangeCallback(Math.round(data));
});
var dragging = false;
var startX, startValue;
sliderValuePart.on('mousedown', function (data) {
dragging = true;
startX = data.clientX;
startValue = _this.getValue();
if (_this.enableTooltip && _this.tooltipControl) {
_this.tooltipControl.setEnableAlwaysShow(true);
}
});
var setValue = function (data) {
if (!dragging)
return;
var cX = data.clientX;
var cValue = startValue + ((cX - startX) * (_this.maxValue - _this.minValue) / (_this.sliderLinePart.getWidth() - 10));
cValue > _this.maxValue && (cValue = _this.maxValue);
cValue < _this.minValue && (cValue = _this.minValue);
_this.setValue(cValue);
startX = cX;
startValue = cValue;
if (_this.enableTooltip && _this.tooltipControl) {
_this.tooltipControl.updatePosition();
}
data.preventDefault && data.preventDefault();
};
var body = new Dom(document.body);
body.on('mousemove', setValue);
body.on('mouseup', function (data) {
setValue(data);
if (_this.enableTooltip && _this.tooltipControl) {
_this.tooltipControl.setEnableAlwaysShow(false);
}
dragging = false;
});
return _this;
// this._domElement.on('mouseout', (data: any)=> {setValue(data); dragging = false});
}
Slider.prototype.setValueRange = function (minValue, maxValue) {
this.minValue = minValue;
this.maxValue = maxValue;
};
// 获取当前slider的值
Slider.prototype.getValue = function () {
return this.value;
};
// 设置slider的值
Slider.prototype.setValue = function (value) {
this.value = Math.round(value);
var cssValue = (this.sliderLinePart.getWidth() - 10) * this.value / (this.maxValue - this.minValue);
this.sliderValuePart.css('left', cssValue + "px");
this.sliderLeftPart.css('width', cssValue + 3 + "px");
this.trigger(UIEvents$1.ValueChanged, this.value);
if (this.enableTooltip) {
this.setTooltipValue();
}
return this;
};
/**
* 设置onChange回调函数
* @param {Function} fn onChange回调函数
*/
Slider.prototype.onChange = function (fn) {
fn instanceof Function && (this.onChangeCallback = fn);
return this;
};
Slider.prototype.setEnableTooltip = function (enable) {
this.enableTooltip = enable;
if (enable && !this.tooltipControl) {
this.tooltipControl = new Tooltip({
hostDom: this.sliderValuePart,
content: '',
placement: 'top',
theme: 'dark',
className: 'bfui-slider-tooltip'
});
this.setTooltipValue();
}
};
Slider.prototype.setTooltipFormater = function (fn) {
this.tooltipFormater = fn;
this.setTooltipValue();
};
Slider.prototype.setTooltipValue = function () {
if (!this.enableTooltip || !this.tooltipControl)
return;
this.tooltipControl.setHTML(this.tooltipFormater ? this.tooltipFormater(this.getValue()) : this.getValue().toString());
};
Slider.prototype.getTooltipControl = function () {
return this.tooltipControl;
};
return Slider;
})(Control));
var SNS$4 = getUINamespace('Tree');
//Tree组件类
var Tree = /** @class */ (function (_super) {
__extends(Tree, _super);
function Tree(param) {
var _this = this;
SDM && (!param || !param.isInside) && SDM.send(SNS$4, "bf_c_UITree_new");
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-tree'
};
var controlParam = {
elementParam: elementParam,
type: 'Tree',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
var contentElementParam = {
elementType: 'div',
className: 'bfui-tree-content'
};
var contentControlParam = {
elementParam: contentElementParam,
type: 'ControlGroup',
};
var content = _this.content = new ControlGroup(contentControlParam);
_this.header = new Dom().createElement({ elementType: 'div', className: 'bfui-tree-header' });
_this.footer = new Dom().createElement({ elementType: 'div', className: 'bfui-tree-footer' });
_this.title = new Dom().createElement({ elementType: 'div', className: 'bfui-tree-title' });
_this._domElement.append(content.getDomElement());
// this._domElement.append(header).append(content.getDomElement()).append(footer);
// header.append(title);
param.title && _this.setTitle(param.title);
_this.sizeFixed = param.sizeFixed;
return _this;
}
Tree.prototype.addTreeNode = function (control, option) {
var _this = this;
this.content.addControl(control, option);
control.on(UIEvents$1.RightClicked, function (params) {
_this.trigger(UIEvents$1.RightClicked, params);
});
};
Tree.prototype.getControl = function (condition) {
return this.content.getControl(condition);
};
Tree.prototype.getAllControls = function () {
return this.content.getAllControls();
};
/******* public for client *********/
// 设置Header文字
Tree.prototype.setTitle = function (text) {
this.title.html(text);
return this;
};
Tree.prototype.getTitle = function () {
return this.title.html();
};
// 获取当前选择项
Tree.prototype.getSelection = function () {
// 交互细节待补充
};
// 清空当前选择
Tree.prototype.clearSelection = function () {
var selection = function (control) {
if (control.length > 0) {
control.find(function (subChild) {
if (subChild.getSelectState()) {
subChild.setSelectState(false);
}
else {
selection(subChild.getAllControls());
}
});
}
};
selection(this.getAllControls());
};
return Tree;
}(Control));
/**
* @namespace Glodon.Bimface.Tiles.UI.ControlAlignOption
* @classdesc 常量:UI对齐样式(控件对齐样式的选项)
* @description Glodon.Bimface.Tiles.UI.ControlAlignOption
* @property {String} Left 左侧对齐
* @property {String} Center 居中对齐
* @property {String} Right 右侧对齐
* @property {String} Top 顶部对齐
* @property {String} Middle 中部对齐
* @property {String} Bottom 底部对齐
*/
var ControlAlignOption;
(function (ControlAlignOption) {
ControlAlignOption["Left"] = "Left";
ControlAlignOption["Center"] = "Center";
ControlAlignOption["Right"] = "Right";
ControlAlignOption["Top"] = "Top";
ControlAlignOption["Middle"] = "Middle";
ControlAlignOption["Bottom"] = "Bottom";
})(ControlAlignOption || (ControlAlignOption = {}));
var ControlAlignOption$1 = ControlAlignOption;
var SNS$3 = getUINamespace('Toolbar');
/**
* @classdesc 类:工具条组件类
* @class Glodon.Bimface.Tiles.UI.Toolbar
* @constructs Glodon.Bimface.Tiles.UI.Toolbar
* @extends Glodon.Bimface.Tiles.UI.Control
* @extends Glodon.Bimface.Tiles.UI.ControlGroup
* @description 构造工具条组件对象
* @param {Object} option 构造工具条对象的配置项
* @param {String} option.id 工具条对象ID
* @param {Boolean} option.isHorizontal 工具条是否为水平放置,默认为true
* @param {Boolean} option.isFullLength 工具条长度是否与视图DOM容器保持一致,默认为false
* @param {Glodon.Bimface.Tiles.UI.ControlAlignOption} option.controlAlign 组件的对齐方式,当水平放置时默认为Left,垂直放置时默认为Top
*/
/** @class */ ((function (_super) {
__extends(Toolbar, _super);
function Toolbar(param) {
var _this = this;
(!param || !param.isInside) && SDM.send(SNS$3, "bf_c_UIToolbar_new");
param = param || {};
var elementParam = SyleUtil.formatElementParam({
elementType: 'div',
className: 'bfui-toolbar'
}, param.elementParam);
var controlParam = {
elementParam: elementParam,
type: 'Toolbar',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
_this.isHorizontal = param.isHorizontal !== false;
_this.isFullLength = param.isFullLength === true;
_this.controlAlign = param.controlAlign || (_this.isHorizontal ? ControlAlignOption$1.Left : ControlAlignOption$1.Top);
var fullClass = _this.isFullLength ? '-full' : '';
_this.isHorizontal ? _this.addClass("bfui-toolbar-horizontal" + fullClass) : _this.addClass("bfui-toolbar-vertical" + fullClass);
_this.addClass("bfui-align-" + _this.controlAlign.toLowerCase());
return _this;
}
return Toolbar;
})(ControlGroup));
var SNS$2 = getUINamespace('Row');
var JustifyContent;
(function (JustifyContent) {
JustifyContent["Start"] = "flex-start";
JustifyContent["End"] = "flex-end";
JustifyContent["Center"] = "center";
JustifyContent["Between"] = "space-between";
JustifyContent["Around"] = "space-around";
})(JustifyContent || (JustifyContent = {}));
/**
* @classdesc 类:行元素组件类
* @class Glodon.Bimface.Tiles.UI.Row
* @constructs Glodon.Bimface.Tiles.UI.Row
* @extends Glodon.Bimface.Tiles.UI.Control
* @extends Glodon.Bimface.Tiles.UI.ControlGroup
* @description 构造行元素组件对象
* @param {Object} option 构造行元素对象的配置项
* @param {String} option.id 行元素对象ID
*/
var Row = /** @class */ (function (_super) {
__extends(Row, _super);
function Row(param) {
var _this = this;
(!param || !param.isInside) && SDM.send(SNS$2, "bf_c_UIRow_new");
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-row'
};
var controlParam = {
elementParam: elementParam,
type: 'Row',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
_this.setJustifyContent(param.justifyContent);
param.contents && param.contents.forEach(function (control) {
_this.addControl(control);
});
return _this;
}
Row.prototype.setJustifyContent = function (justifyContentKeyParam) {
var justifyContentKey = Object.keys(JustifyContent).indexOf(justifyContentKeyParam) >= 0 ? justifyContentKeyParam : 'Between';
var justifyContent = JustifyContent[justifyContentKey];
this.getDomElement().css('justifyContent', justifyContent);
};
return Row;
}(ControlGroup));
var SNS$1 = getUINamespace('RadioGroup');
/**
* @classdesc 类:RadioGroup组件类
* @class Glodon.Bimface.Tiles.UI.RadioGroup
* @constructs Glodon.Bimface.Tiles.UI.RadioGroup
* @description 构造单选组件对象
* @extends Glodon.Bimface.Tiles.UI.Control
* @param {Object} opt 构造单选组件的配置项
* @param {String} opt.id 单选对象ID
* @param {Array} opt.options 单选框数组
* @param {String} opt.options.value 单选框的返回值
* @param {String} opt.options.label 单选框显示的文本信息
* @param {Boolean} opt.options.checked 单选框的选中状态
* @param {Boolean} opt.options.enabled 单选框的可用状态,缺省值为true
*/
/** @class */ ((function (_super) {
__extends(RadioGroup, _super);
function RadioGroup(param) {
var _this = this;
(!param || !param.isInside) && SDM.send(SNS$1, "bf_c_UIRadioGroup_new");
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-radioGroup'
};
var controlParam = {
elementParam: elementParam,
type: 'RadioGroup',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
_this.radioArray = [];
param.options && _this.setOptions(param.options);
_this.on(UIEvents$1.ValueChanged, function (radio, value, checked) {
checked && _this.setCheckedByValue(value);
});
return _this;
}
// 创建单个radio
RadioGroup.prototype.addRadio = function (param) {
var _this = this;
param.parent = this.getDomElement();
var radio = new Radio(param);
radio.onChange(function (radio, value) {
radio.isChecked() && _this.trigger(UIEvents$1.ValueChanged, radio, value, radio.isChecked());
});
this.radioArray.push(radio);
return radio;
};
// 创建多个radio
RadioGroup.prototype.setOptions = function (options) {
var _this = this;
var checkedIndex;
this.clearOptions();
options.forEach(function (label, index) {
if (checkedIndex == undefined && label.checked) {
checkedIndex = index;
}
_this.addRadio(label);
});
this.setChecked(checkedIndex == undefined ? 0 : checkedIndex);
};
// 获取单选框数值内容列表
RadioGroup.prototype.getOptions = function () {
var options = [];
this.radioArray.forEach(function (radio) {
options.push({ value: radio.getValue(), enabled: radio.isEnabled(), checked: radio.isChecked(), label: radio.getLabel() });
});
return options;
};
/**
* 设置选中的单选框
* @function Glodon.Bimface.Tiles.UI.RadioGroup.prototype.setChecked
* @param {Number} index 选中选项的序号
*/
RadioGroup.prototype.setChecked = function (index) {
this.radioArray.forEach(function (radio, idx) {
radio.setChecked(idx === index);
});
};
//设置选中的单选框
RadioGroup.prototype.setCheckedByValue = function (value) {
this.radioArray.forEach(function (radio) {
radio.setChecked(radio.getValue() == value);
});
};
/**
* 获取当前选中选项的序号
* @function Glodon.Bimface.Tiles.UI.RadioGroup.prototype.getChecked
* @returns {Number} 选中选项的序号
*/
RadioGroup.prototype.getChecked = function () {
var index;
this.radioArray.forEach(function (radio, idx) {
radio.isChecked() && (index = idx);
});
return index;
};
// 清空radio
RadioGroup.prototype.clearOptions = function () {
this.radioArray = [];
this._domElement.html('');
};
/**
* 设置可用的单选框选项
* @function Glodon.Bimface.Tiles.UI.RadioGroup.prototype.setEnabled
* @param {Array} index 可用选项的序号列表
*/
RadioGroup.prototype.setEnabled = function (indexs) {
this.radioArray.forEach(function (radio, idx) {
radio.setEnabled(indexs.indexOf(idx) > -1);
});
};
/**
* 获取可用的单选框选项
* @function Glodon.Bimface.Tiles.UI.RadioGroup.prototype.getEnabled
* @returns {Array} 可用选项的序号列表
*/
RadioGroup.prototype.getEnabled = function () {
var indexs = [];
this.radioArray.forEach(function (radio, idx) {
radio.isEnabled() && indexs.push(idx);
});
return indexs;
};
/**
* 单选框值发生变化的事件
* @function Glodon.Bimface.Tiles.UI.RadioGroup.prototype.onChange
* @param {Function} event 单选框值发生变化时执行的函数
*/
RadioGroup.prototype.onChange = function (fn) {
this.on(UIEvents$1.ValueChanged, fn);
return this;
};
return RadioGroup;
})(Control));
//PropertyPanel组件类
/** @class */ ((function (_super) {
__extends(PropertyControl, _super);
function PropertyControl(param) {
var _this = this;
param = param || {};
var elementParam = {
elementType: 'table',
className: 'bfui-property-panel'
};
var controlParam = {
elementParam: elementParam,
type: 'PropertyPanel',
};
_this = _super.call(this, controlParam) || this;
_this.createCollapse(param.propertyData);
return _this;
}
// 清空radio
PropertyControl.prototype.clear = function () {
this._domElement.html('');
};
PropertyControl.prototype.createCollapse = function (properties) {
var _this = this;
this.clear();
if (properties) {
properties.forEach(function (item) {
item.parent = _this.getDomElement();
new Collapse(item);
});
}
};
return PropertyControl;
})(Control));
/**
* TabOption组件类,作为Tab组件的单条option
*/
var Tab = /** @class */ (function (_super) {
__extends(Tab, _super);
function Tab(param) {
var _this = this;
var elementParam = {
elementType: 'div',
className: 'bfui-tab'
};
var controlParam = {
elementParam: elementParam,
type: 'Tab',
name: 'tab',
className: 'bfui-tab-tab',
parent: param.parent
};
param = Object.assign({}, controlParam, param);
param.extraClass && (elementParam.className = elementParam.className + ' ' + param.extraClass);
_this = _super.call(this, param) || this;
_this.param = param;
_this._domElement.on('click', function (evt) {
if (!_this.isActived() && _this.isEnabled()) {
_this.trigger(UIEvents$1.SelectionChanged, _this);
}
});
param.label && _this.setLabel(param.label);
param.enabled === false && _this.setEnabled(param.enabled);
return _this;
}
Tab.prototype.isEnabled = function () {
return !this._domElement.hasClass('disabled');
};
Tab.prototype.setEnabled = function (isEnabled) {
if (isEnabled != this.isEnabled()) {
this._domElement.toggle('disabled');
}
return this;
};
Tab.prototype.setLabel = function (text) {
this.setHTML(text);
return this;
};
Tab.prototype.setActive = function () {
if (!this.isActived()) {
this._domElement.addClass('is-active');
}
return this;
};
Tab.prototype.isActived = function () {
return this._domElement.hasClass('is-active');
};
Tab.prototype.getValue = function () {
return this.param.value;
};
return Tab;
}(Control));
getUINamespace('Tabs');
/**
* Tabs组件类
*/
/** @class */ ((function (_super) {
__extends(Tabs, _super);
function Tabs(param) {
var _this = this;
// SDM && SDM.send(SNS, "bf_c_UITabs_new");
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-tabs'
};
var controlParam = {
elementParam: elementParam,
type: 'Tabs',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
var header = _this.header = new Dom().createElement({ elementType: 'div', className: 'bfui-tabs-header' });
var content = _this.content = new Dom().createElement({ elementType: 'div', className: 'bfui-tabs-content' });
_this.getDomElement().append(header).append(content);
_this.tabLeft = param.tabLeft != null ? param.tabLeft : null;
_this.tabsArray = [];
param.options && _this.setOptions(param.options);
return _this;
}
// 创建单个tab
Tabs.prototype.addTab = function (param) {
var _this = this;
param.parent = this.header;
var tab = new Tab(param);
var pane = new Dom().createElement({ elementType: 'div', className: 'bfui-tabs-pane', id: "pane-" + param.name });
this.content.append(pane);
if (typeof param.content === 'string') {
pane.html(param.content);
}
else {
pane.append(param.content);
}
tab.on(UIEvents$1.SelectionChanged, function (tab) {
var idx = _this.getIndex(tab);
_this.setActive(idx);
_this.trigger(UIEvents$1.SelectionChanged, tab.param);
});
this.tabsArray.push(tab);
return tab;
};
Tabs.prototype.getIndex = function (tab) {
for (var i = 0; i < this.tabsArray.length; i++) {
if (tab.param.name === this.tabsArray[i].param.name) {
return i;
}
}
};
// 创建多个tab
Tabs.prototype.setOptions = function (options) {
var _this = this;
var activedIndex;
this.clearOptions();
this.header.html("<div class=\"bfui-tabs-active-bar\"></div>");
options.forEach(function (label, index) {
if (activedIndex == undefined && label.actived) {
activedIndex = index;
}
_this.addTab(label);
});
this.setActive(activedIndex == undefined ? 0 : activedIndex);
};
// 获取tab数值内容列表
Tabs.prototype.getOptions = function () {
var options = [];
this.tabsArray.forEach(function (tab) {
options.push(tab.param);
});
return options;
};
/**
* 设置选中的tab
* @function Glodon.Bimface.Tiles.UI.Tabs.prototype.setActive
* @param {Number} index 选中选项的序号
*/
Tabs.prototype.setActive = function (index) {
var _this = this;
var left = 0;
this.tabsArray.forEach(function (tab, idx) {
if (idx === index) {
_this.activeValue = tab.getValue();
var header_active = _this.header.getElement().querySelector('.is-active');
var content_active = _this.content.getElement().querySelector('.is-active');
header_active && header_active.removeClass('is-active');
content_active && content_active.removeClass('is-active');
tab.setActive();
var pane = _this.content.getElement().querySelector("#pane-" + tab.param.name);
pane.addClass('is-active');
var header_bar = _this.header.getElement().querySelector('.bfui-tabs-active-bar');
if (index == 1)
left = left - 5;
if (index == 2)
left = left - 10;
header_bar.style.transform = "translateX(" + left + "px)";
header_bar.style.width = tab.getDomElement().getWidth() + 'px';
}
else {
var marginLeft = _this.tabLeft ? _this.tabLeft : 20;
left = left + tab.getDomElement().getWidth() + marginLeft;
}
});
this.selectHandler && this.selectHandler(this.activeValue);
};
Tabs.prototype.getActiveValue = function () {
return this.activeValue;
};
// 清空
Tabs.prototype.clearOptions = function () {
this.tabsArray = [];
this.header.html('');
this.content.html('');
};
/**
* 设置可用的单选框选项
* @function Glodon.Bimface.Tiles.UI.Tabs.prototype.setEnabled
* @param {Array} index 可用选项的序号列表
*/
Tabs.prototype.setEnabled = function (indexs) {
this.tabsArray.forEach(function (tab, idx) {
tab.setEnabled(indexs.indexOf(idx) > -1);
});
};
Tabs.prototype.onSelect = function (fn) {
this.selectHandler = fn;
};
return Tabs;
})(Control));
getUINamespace('Input');
/**
* @classdesc 类:Crumb组件类
* @class Glodon.Bimface.Tiles.UI.Crumb
* @constructs Glodon.Bimface.Tiles.UI.Crumb
* @description 构造面包屑组件
* @extends Glodon.Bimface.Tiles.UI.Control
* @param {Object} option 构造面包屑的配置项
* @param {String} option.id 面包屑ID
*/
/** @class */ ((function (_super) {
__extends(Crumb, _super);
function Crumb(param) {
// SDM && SDM.send(SNS, "bf_c_UICrumb_new");
var _this = this;
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-crumb'
};
var controlParam = {
elementParam: elementParam,
type: 'Crumb',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
_this.value = [];
_this.getDomElement().on('click', function (event) {
var target = new Dom(event.target);
var selectedId = target.attribute('data-id');
if (selectedId) {
_this._selectHandler && _this._selectHandler(selectedId);
}
});
return _this;
}
/**
* 获取面包屑的信息数组
* @function Glodon.Bimface.Tiles.UI.Crumb.prototype.getValue
* @returns {Array<ICrumbData>} 面包屑的信息数组
*/
Crumb.prototype.getValue = function () {
return this.value;
};
/**
* 设置面包屑的信息数组
* @function Glodon.Bimface.Tiles.UI.Crumb.prototype.setValue
* @param {Array<ICrumbData>} value 面包屑的信息数组
*/
Crumb.prototype.setValue = function (value) {
var _this = this;
this.value = value;
this.getDomElement().clear();
value.forEach(function (data, index) {
var item = new Dom().createElement({ elementType: 'a', className: 'bfui-crumb-item' });
item.html(data.text);
item.attribute('title', data.text);
item.attribute('data-id', data.id);
_this.getDomElement().append(item);
if (index !== value.length - 1) {
var array = new Dom().createElement({ elementType: 'i', className: 'bfui-crumb-array gld-bf-arrow-up-sm' });
_this.getDomElement().append(array);
}
});
return this;
};
Crumb.prototype.onSelect = function (handler) {
this._selectHandler = handler;
return this;
};
return Crumb;
})(Control));
getUINamespace('Input');
/**
* @classdesc 类:List组件类
* @class Glodon.Bimface.Tiles.UI.List
* @constructs Glodon.Bimface.Tiles.UI.List
* @description 构造列表组件
* @extends Glodon.Bimface.Tiles.UI.Control
* @param {Object} option 构造列表的配置项
* @param {String} option.id 列表ID
*/
/** @class */ ((function (_super) {
__extends(List, _super);
function List(param) {
// SDM && SDM.send(SNS, "bf_c_UIList_new");
var _this = this;
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-list'
};
var controlParam = {
elementParam: elementParam,
type: 'List',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
_this.value = [];
_this._domElements = [];
_this._checkedList = [];
_this._singleCheckedMode = false;
_this._checkBoxMap = new Map();
return _this;
}
/**
* 获取列表的信息数组
* @function Glodon.Bimface.Tiles.UI.List.prototype.getValue
* @returns {Array<IListItemData>} 列表的信息数组
*/
List.prototype.getValue = function () {
return this.value;
};
/**
* 设置列表的信息数组
* @function Glodon.Bimface.Tiles.UI.List.prototype.setValue
* @param {Array<IListItemData>} value 列表的信息数组
*/
List.prototype.setValue = function (value) {
var _this = this;
this.value = value;
this._domElements.forEach(function (dom) {
dom.destroy();
});
this._domElements = [];
this._checkedList = [];
this._checkBoxMap.clear();
this.getDomElement().clear();
value.forEach(function (data) {
var row = new Row({ justifyContent: 'Start', isInside: true });
if (!!data.hasCheckBox) {
var checkBox_1 = new Checkbox({ value: data.id, isInside: true });
if (data.isCheckBoxDisabled) {
checkBox_1.setEnabled(false);
}
else {
checkBox_1.onChange(function () {
if (checkBox_1.isChecked()) {
if (_this._singleCheckedMode) {
_this._checkedList.forEach(function (value) {
_this._checkBoxMap.get(value.id).setChecked(false);
});
_this._checkedList = [];
}
_this._checkedList.push(data);
}
else {
var index = _this._checkedList.indexOf(data);
if (index >= 0) {
_this._checkedList.splice(index, 1);
}
}
_this._checkedHandler && _this._checkedHandler(__spreadArrays(_this._checkedList));
});
}
_this._domElements.push(checkBox_1.getDomElement());
_this._checkBoxMap.set(data.id, checkBox_1);
row.addControl(checkBox_1);
if (data.checked) {
checkBox_1.setChecked(true);
}
}
if (!!data.hasIcon) {
var icon = void 0;
if (data.iconType === 'svg') {
icon = new Dom().createElement({ elementType: 'div', className: "bfui-list-icon" });
icon.html("<svg class=\"bimface-svgicon svg-icon\" aria-hidden=\"true\">\n <use xlink:href=\"#" + data.iconClass + "\"></use>\n </svg>");
}
else {
icon = new Dom().createElement({ elementType: 'i', className: "bfui-list-icon " + (data.iconClass ? data.iconClass : '') });
}
row.getDomElement().append(icon);
}
var text = new Dom().createElement({ elementType: 'div', className: 'bfui-list-text' });
text.html(data.text);
text.on('click', function () {
_this._itemClickedHandler && _this._itemClickedHandler(data);
});
_this._domElements.push(text);
row.getDomElement().append(text);
_this.getDomElement().append(row.getDomElement());
});
return this;
};
List.prototype.onChecked = function (handler) {
this._checkedHandler = handler;
return this;
};
List.prototype.onItemClicked = function (handler) {
this._itemClickedHandler = handler;
return this;
};
List.prototype.getCheckedIds = function () {
return this._checkedList.map(function (item) { return item.id; });
};
List.prototype.getCheckedValue = function () {
return this._checkedList;
};
List.prototype.setSingleCheckedMode = function (singleCheckedMode) {
this._singleCheckedMode = singleCheckedMode;
};
return List;
})(Control));
/**
* SearchResultOption组件类,作为Search组件的单条option
*/
var SearchResultOption = /** @class */ (function (_super) {
__extends(SearchResultOption, _super);
function SearchResultOption(param) {
var _this = this;
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-search-option'
};
var controlParam = {
elementParam: elementParam,
type: 'SearchResultOption',
};
_this = _super.call(this, controlParam) || this;
_this.getDomElement().html(param.html || param.text || '');
_this.param = param;
_this.disabled = param.disabled === true;
_this.selected = param.selected === true;
_this.value = param.value;
_this.text = param.text;
_this.setTooltip(_this.text);
_this.setDisabled(_this.disabled).setSelected(_this.selected);
param.class && _this.addClass(param.class);
// 点击本条option时,调用SearchResultOptionGroup的setSelected事件,将本条option设置为选中,其他option取消选中
_this.onClick(function () {
if (!_this.selected && !_this.disabled) {
_this._parent.setSelected(_this);
}
_this.trigger(UIEvents$1.Clicked);
});
return _this;
}
/**
* 设置选中状态
* @param {Boolean} selected 选中状态
*/
SearchResultOption.prototype.setSelected = function (selected) {
if (!this.disabled && this.selected !== selected) {
this.selected = selected;
selected ? this.addClass('bfui-search-option-selected') : this.removeClass('bfui-search-option-selected');
}
return this;
};
/**
* 设置不可用状态
* @param {Boolean} disabled 不可用状态
*/
SearchResultOption.prototype.setDisabled = function (disabled) {
if (this.disabled !== disabled) {
this.setSelected(false);
this.disabled = disabled;
disabled ? this.addClass('bfui-search-option-disabled') : this.removeClass('bfui-search-option-disabled');
}
return this;
};
/**
* 获取option的文本内容
*/
SearchResultOption.prototype.getText = function () {
return this.text;
};
/**
* 获取option的实际value,如未设置value则返回option的text文本内容
*/
SearchResultOption.prototype.getValue = function () {
return this.value === undefined ? this.getText() : this.value;
};
SearchResultOption.prototype.getParam = function () {
return this.param;
};
return SearchResultOption;
}(Control));
/**
* SearchResultOptionGroup组件类,管理多条SearchResultOption
*/
var SearchResultOptionGroup = /** @class */ (function (_super) {
__extends(SearchResultOptionGroup, _super);
function SearchResultOptionGroup(config) {
var _this = this;
var contentElementParam = {
elementType: 'div',
className: 'bfui-search-content'
};
var contentControlParam = {
// parent: document.getElementsByTagName('body')[0],
elementParam: contentElementParam,
type: 'ControlGroup',
};
_this = _super.call(this, contentControlParam) || this;
_this.enableAnimation = config.enableAnimation !== false;
_this.enableAnimation && _this.addClass('bfui-search-animation');
config.values && _this.setValues(config.values);
_this.hide();
return _this;
}
/**
* 设置option内容
* @param {Array<string | IOptionParam>} values option内容
*/
SearchResultOptionGroup.prototype.setValues = function (values) {
var _this = this;
this.clearControls(true);
this.values = [];
values.forEach(function (value) {
var param;
if (!DataUtil.assertType(value, 'obj')) {
param = { html: value.toString() };
}
else {
param = value;
}
_this.values.push(param);
var option = new SearchResultOption(param);
_this.addControl(option);
option.on(UIEvents$1.Clicked, function () {
_this.trigger(UIEvents$1.Clicked, option);
});
});
return this;
};
/**
* 获取当前显示/隐藏状态
*/
SearchResultOptionGroup.prototype.isVisible = function () {
return this.enableAnimation ? this._visible : _super.prototype.isVisible.call(this);
};
SearchResultOptionGroup.prototype.setFixedPosition = function (position) {
var pageHeight = window.innerHeight, maxHeight = 125, dom = this.getDomElement().getElement(), minHeight = Math.min(maxHeight, this._height);
if (position.bottom + minHeight > pageHeight) {
dom.style.top = '';
dom.style.bottom = pageHeight - position.top + 'px';
}
else {
dom.style.top = position.bottom + 'px';
dom.style.bottom = '';
}
dom.style.left = position.left + 'px';
dom.style.width = position.right - position.left + 'px';
};
/**
* 显示组件
*/
SearchResultOptionGroup.prototype.show = function () {
var _this = this;
if (this.enableAnimation) { // 支持动画状态时,通过height变化显示组件
this._visible = true;
var transitionEndFn_1 = function () {
if (_this._inTransition) {
_this.getDomElement().removeClass('bfui-search-overflow-hidden').off('transitionend', transitionEndFn_1);
_this._inTransition = false;
}
};
this._inTransition = true;
if (this._children.length > 0) {
var itemHeight = this._children[0].getDimensions().height;
this._height = this._children.length * itemHeight + 2;
}
this.getDomElement().addClass('bfui-search-overflow-hidden').css({ 'border-width': '1px', 'height': this._height + 'px' }).on('transitionend', transitionEndFn_1);
}
else {
_super.prototype.show.call(this);
}
return this;
};
/**
* 隐藏组件
*/
SearchResultOptionGroup.prototype.hide = function () {
if (this.enableAnimation) { // 支持动画状态时,通过height变化隐藏组件
this._visible = false;
this.getDomElement().addClass('bfui-search-overflow-hidden').css({ 'border-width': '0px', 'height': '0px' });
}
else {
_super.prototype.hide.call(this);
}
return this;
};
/**
* 设置某条option为选中状态,其他option取消选中
* @param {SearchResultOption | string} option 选中的内容
*/
SearchResultOptionGroup.prototype.setSelected = function (option) {
if (option === undefined)
return;
var isValidOption = false;
if (!(option instanceof SearchResultOption)) {
this.getAllControls().some(function (cControl) {
if (cControl.getText() === option.toString()) {
option = cControl;
isValidOption = true;
return true;
}
});
}
else if (this.indexOf(option) >= 0) {
isValidOption = true;
}
if (isValidOption && this.selected !== option) {
this.getAllControls().forEach(function (cControl) {
cControl.setSelected(cControl === option ? true : false);
});
this.selected = option;
var index = this.indexOf(this.selected);
var value = this.selected.getValue();
var text = this.selected.getText();
var data = this.selected.getParam();
this.trigger(UIEvents$1.ValueChanged, { text: text, value: value, index: index, data: data });
}
return this;
};
/**
* 根据序号设置Option选中状态
* @param {Number} index Option
*/
SearchResultOptionGroup.prototype.setSelectedByIndex = function (index) {
var option = this.getControl({ index: index });
if (option) {
this.setSelected(option);
}
return this;
};
/**
* 根据Value设置Option选中状态
* @param {String | Number} value Option的Value值
*/
SearchResultOptionGroup.prototype.setSelectedByValue = function (value) {
var result;
this.getAllControls().some(function (option) {
option = option;
if (option.getValue() === value) {
result = option;
return true;
}
});
return this.setSelected(result);
};
/**
* 获取当前选中的Option
*/
SearchResultOptionGroup.prototype.getSelected = function () {
return this.selected;
};
/**
* 获取所有Option的信息数组
*/
SearchResultOptionGroup.prototype.getValues = function () {
return this.values;
};
SearchResultOptionGroup.prototype.clearSelection = function () {
this.selected = null;
this.trigger(UIEvents$1.ValueChanged);
};
return SearchResultOptionGroup;
}(ControlGroup));
getUINamespace('Search');
/**
* Search组件类
*/
/** @class */ ((function (_super) {
__extends(Search, _super);
function Search(param) {
var _this = this;
// SDM && SDM.send(SNS, "bf_c_UISearch_new");
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-search'
};
var controlParam = {
elementParam: elementParam,
type: 'Search',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
_this.enableAnimation = param.enableAnimation !== false;
new Dom().createElement({ elementType: 'i', className: 'bfui-search-icon gld-bf-search-md', parent: _this.getDomElement() });
_this.input = new Input({ parent: _this, isInside: true });
_this.input.addClass('bfui-search-input')
.onBlur(function () { return window.setTimeout(function () { return _this.searchResult.hide(); }, 100); })
.onFocus(function () {
if (_this.input.getValue()) {
_this.onSearch();
}
});
param.placeholder && _this.setPlaceholder(param.placeholder);
_this.noResultText = param.noResultText || '没有找到对应内容';
_this.setSearchHandler(param.searchHandler || (function () { return []; }));
_this.setSelectHandler(param.selectHandler || (function () { return null; }));
_this.searchResult = new SearchResultOptionGroup({ enableAnimation: _this.enableAnimation });
new Dom(document.body).append(_this.searchResult.getDomElement());
_this.searchResult.on(UIEvents$1.ValueChanged, function (data) {
data && _this.input.setValue(data.text);
_this.searchResult.hide();
_this.selectHandler instanceof Function && _this.selectHandler(data);
});
return _this;
}
// input变化时搜索符合条件的结果
Search.prototype.onSearch = function () {
var _this = this;
var value = this.input.getValue();
if (!value) {
this.searchResult.hide();
return;
}
var searchResultValue = this.searchResultValue = this.searchHandler(value);
if (searchResultValue && searchResultValue.length > 0) {
this.searchResult.setValues(searchResultValue);
}
else { // 未搜索到结果
this.searchResult.setValues([
{
html: this.noResultText,
class: 'bfui-search-noresult',
},
{
html: '',
class: 'bfui-search-noresult',
}
]);
}
var domRect = this.getPosition();
this.searchResult.setFixedPosition(domRect);
requestAnimationFrame(function () { return _this.searchResult.show(); });
};
// 设置搜索回调
Search.prototype.setSearchHandler = function (handler) {
var _this = this;
if (handler instanceof Function) {
this.searchHandler = handler;
this.input.onInput(function () {
_this.onSearch();
});
}
};
// 设置选中回调
Search.prototype.setSelectHandler = function (handler) {
if (handler instanceof Function) {
this.selectHandler = handler;
}
};
// 设置input中的placeholder
Search.prototype.setPlaceholder = function (value) {
this.input.getDomElement().attribute('placeholder', value);
};
// 设置未匹配到结果时的文本
Search.prototype.setNoResultText = function (value) {
this.noResultText = value;
};
Search.prototype.getSearchResultGroup = function () {
return this.searchResult;
};
return Search;
})(Control));
/**
* @classdesc 类:ColorPicker组件类
* @class Glodon.Bimface.Tiles.UI.ColorPicker
* @constructs Glodon.Bimface.Tiles.UI.ColorPicker
* @description 构造颜色选择器组件
* @extends Glodon.Bimface.Tiles.UI.Control
* @param {Object} option 构造输入框的配置项
* @param {String} option.id 输入框ID
*/
/** @class */ ((function (_super) {
__extends(ColorPicker, _super);
function ColorPicker(param) {
var _this = this;
param = param || {};
var elementParam = {
elementType: 'div',
className: 'bfui-colorpicker'
};
var controlParam = {
elementParam: elementParam,
type: 'ColorPicker',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
_this.inputColor = new Dom().createElement({ elementType: 'input', className: 'bfui-colorpicker-input' });
_this.inputColor.attribute('type', 'color');
_this._domElement.append(_this.inputColor);
_this.onClick(function () {
_this.inputColor.click();
});
_this.onInput(function () { });
_this.setValue('');
param.onChange && _this.onChange(param.onChange);
return _this;
}
/**
* 获取输入框的值
* @function Glodon.Bimface.Tiles.UI.Input.prototype.getValue
* @returns {String} 输入框的值
*/
ColorPicker.prototype.getValue = function () {
return this.value;
};
/**
* 设置输入框的值
* @function Glodon.Bimface.Tiles.UI.Input.prototype.setValue
* @param {String} value 输入框的值
*/
ColorPicker.prototype.setValue = function (value) {
this.value = value;
if (value) {
this.inputColor.attribute('value', value);
this.getDomElement().css('background', value);
this.getDomElement().removeClass('no-color');
}
else {
this.getDomElement().css('background', 'none');
this.getDomElement().addClass('no-color');
}
return this;
};
ColorPicker.prototype.onChange = function (fn) {
var _this = this;
this.onChangeFn && this._domElement.off('change', this.onChangeFn);
this.onChangeFn = function (evt) {
var value = evt.target.value;
_this.value = value;
_this.getDomElement().css('background', value);
_this.getDomElement().removeClass('no-color');
fn(value);
};
this._domElement.on('change', this.onChangeFn);
return this;
};
ColorPicker.prototype.onInput = function (fn) {
var _this = this;
this.onInputFn && this._domElement.off('input', this.onInputFn);
this.onInputFn = function (evt) {
var value = evt.target.value;
_this.value = value;
_this.getDomElement().css('background', value);
_this.getDomElement().removeClass('no-color');
fn(value);
};
this._domElement.on('input', this.onInputFn);
return this;
};
return ColorPicker;
})(Control));
//Tree组件类
var TreeNode = /** @class */ (function (_super) {
__extends(TreeNode, _super);
function TreeNode(param) {
var _this = this;
param = param || {};
typeof (param.isLoaded) === "undefined" && (param.isLoaded = true); //默认不许要判断模型是否加载
var elementParam = {
elementType: 'div',
className: param.isLoaded ? 'bfui-tree-node' : 'bfui-tree-node not-allowed'
};
var controlParam = {
elementParam: elementParam,
type: 'TreeNode',
id: param.id,
parent: param.parent
};
_this = _super.call(this, controlParam) || this;
_this.isLoaded = param.isLoaded;
_this.parent = param.parent;
var subElementParam = {
elementType: 'div',
className: 'bfui-subtree'
};
var subControlParam = {
elementParam: subElementParam,
type: 'ControlGroup',
};
_this.subNode = new ControlGroup(subControlParam);
_this.opt = param;
_this.opt.isChecked ? _this.checkedState = 'checked'
: _this.checkedState = 'unchecked';
return _this;
}
TreeNode.prototype.initTreeNode = function (name, icon) {
var _this = this;
var treeInfoDom = new Dom().createElement({ elementType: 'div', className: "bfui-tree-info" });
// 是否有展开收起
if (this.opt.hasCollapse) {
var className = this.opt.hasCollapse && this.opt.isExpand ? 'open' : '';
this.opt.isExpand ? this.subNode.show() : this.subNode.hide();
var collapseWrap = this.collapseWrap = new Dom().createElement({ elementType: 'span', className: "bfui-collapse " + className });
collapseWrap.html("<i class=\"bimface-icon gld-bf-arrow-down-sm\"></i>");
collapseWrap.on('click', function () {
_this.toggleExpansion();
});
}
// 是否有checkbox
if (this.opt.hasCheckBox) {
// 在visible是布尔值的情况下,查找子数据是否有uncheck的情况,以此初始化半选状态"bfui-checkbox bfui-half"
var checkedClass = '';
if (this.opt.isChecked) {
if (this.isChildHasUncheckState(this.opt.content.children) && this.opt.parent.checkedState !== 'checked') {
checkedClass = "bfui-checkbox bfui-half";
this.checkedState = 'half';
}
else {
checkedClass = 'bfui-checked';
}
}
if (this.opt.canCheck === false) {
checkedClass = "bfui-checkbox-disabled " + checkedClass;
}
var checkbox = this.checkbox = new Dom().createElement({ elementType: 'span', className: "bfui-checkbox " + checkedClass });
checkbox.on('click', function () {
if (_this.opt.canCheck !== false) {
var enable = !_this.opt.isChecked;
_this.setCheckState(enable);
_this.trigger(UIEvents$1.CheckedChanged, _this, enable);
}
});
}
// 是否有隔离显示
if (this.opt.hasIsolate) {
var isolateClass = this.opt.isIsolate ? 'gld-bf-component-sm' : 'gld-bf-component-fill-sm';
var isolateBox = this.isolateBox = new Dom().createElement({ elementType: 'i', className: "bfui-isolate bimface-icon " + isolateClass });
isolateBox.on('click', function () {
_this.setIsolateState(!_this.opt.isIsolate);
_this.trigger(UIEvents$1.IsolateChanged, _this, !_this.opt.isIsolate);
});
}
// 节点名称
var treeName = this.treeName = new Dom().createElement({ elementType: 'span', className: "bfui-tree-name" });
var nodeIcon = '';
icon && (icon.type === 'svg' ? nodeIcon = "<svg class=\"bimface-svgicon svg-icon\" aria-hidden=\"true\">\n <use xlink:href=\"#" + icon.name + "\"></use>\n </svg>"
: nodeIcon = "<i class=\"bimface-icon " + icon.name + "\"></i>");
treeName.html("" + nodeIcon + name);
treeName.attribute('title', "" + name);
treeName.on('click', function () {
if (!_this.opt.hasSelection && _this.opt.hasCollapse) { // 如果不能被选中择展开收起
_this.toggleExpansion();
}
else { // 节点能被select
if (!_this.isLoaded)
return;
var enable = !_this.selectionState;
_this.currentUnSelect(_this.opt.rootTree);
_this.setSelectState(enable);
_this.trigger(UIEvents$1.SelectionChanged, _this, enable);
}
});
treeName.on('contextmenu', function (event) {
event.preventDefault();
_this.trigger(UIEvents$1.RightClicked, { event: event, node: _this });
});
this._domElement.append(treeInfoDom);
this.checkbox && treeInfoDom.append(this.checkbox);
this.collapseWrap && treeInfoDom.append(this.collapseWrap);
this.isolateBox && treeInfoDom.append(this.isolateBox);
treeInfoDom.append(this.treeName);
this.getTreeInfoDom = function () { return treeInfoDom; };
this._domElement.append(this.subNode.getDomElement());
};
// 选择接口
TreeNode.prototype.getSelectState = function () {
return this.selectionState;
};
// 获取Checkbox状态
TreeNode.prototype.getIsChecked = function () {
return this.opt.isChecked;
};
TreeNode.prototype.setSelectState = function (enable) {
this.selectionState = enable;
this.selectionState ? this.opt.hasSelection && this.treeName.addClass('bfui-selected')
: this.treeName && this.treeName.removeClass('bfui-selected');
};
TreeNode.prototype.currentUnSelect = function (node) {
var childNodes = node.getAllControls();
for (var _i = 0, childNodes_1 = childNodes; _i < childNodes_1.length; _i++) {
var child = childNodes_1[_i];
if (child.getSelectState()) {
child.setSelectState(false);
child.trigger(UIEvents$1.SelectionChanged, child, false);
break;
}
else {
this.currentUnSelect(child);
}
}
};
// 勾选接口
TreeNode.prototype.getCheckedState = function () {
return this.checkedState;
};
TreeNode.prototype.setCheckState = function (enable) {
this.checkedState = enable ? 'checked' : 'unchecked';
this.opt.isChecked = enable;
if (this.opt.hasCheckBox && this.checkbox) {
this.checkbox.toggleClass('bfui-checked', enable);
this.checkbox.removeClass('bfui-half');
}
this.setChildCheckState(enable);
};
TreeNode.prototype.setChildCheckState = function (enable) {
//更新子节点的checkstate
if (this.opt.hasCheckBox && this.checkbox) {
var subNodes = this.getAllControls();
this.getCheckedState() !== 'half' && subNodes.forEach(function (node) {
node.setCheckState(enable);
});
}
};
TreeNode.prototype.setParentCheckState = function (control) {
if (!this.checkbox)
return;
var children = this.getAllControls();
if (children && children.length > 0) {
var checkedState = void 0;
for (var i = 0, len = children.length; i < len; i++) {
var testState = children[i].getCheckedState();
if (checkedState === undefined) {
checkedState = testState;
}
else if (testState != checkedState) {
checkedState = 'half';
}
}
this.checkedState = checkedState;
}
switch (this.checkedState) {
case 'checked':
this.opt.isChecked = true;
this.checkbox.addClass('bfui-checked');
this.checkbox.removeClass('bfui-half');
break;
case 'unchecked':
this.opt.isChecked = false;
this.checkbox.removeClass('bfui-checked');
this.checkbox.removeClass('bfui-half');
break;
case 'half':
this.opt.isChecked = true;
this.checkbox.addClass('bfui-half');
this.checkbox.removeClass('bfui-checked');
break;
}
this.trigger(UIEvents$1.ValueChanged, 'check');
};
//在visible是布尔值的情况下,查找子数据是否有uncheck的情况,以此初始化半选状态"bfui-checkbox bfui-half
TreeNode.prototype.isChildHasUncheckState = function (datas) {
var state;
var results = [];
if (datas) { // BFS遍历获取所有子节isVisble点情况
var queue_1 = [];
queue_1.unshift(datas);
var _loop_1 = function () {
var item = void 0, children;
item = queue_1.shift();
item.map(function (node) {
results.push(node.isVisible);
children = node.children;
if (children && children.length > 0) {
for (var i = 0; i < children.length; i++)
queue_1.push([children[i]]);
}
});
};
while (queue_1.length > 0) {
_loop_1();
}
}
results.includes(false) ? state = true : state = false;
return state;
};
//隔离接口
TreeNode.prototype.getIsolateState = function () {
return this.opt.isIsolate;
};
TreeNode.prototype.setIsolateState = function (enable) {
this.opt.isIsolate = enable;
if (this.opt.hasIsolate) {
if (enable) {
this.isolateBox.removeClass('gld-bf-component-fill-sm');
this.isolateBox.addClass('gld-bf-component-sm');
}
else {
this.isolateBox.addClass('gld-bf-component-fill-sm');
this.isolateBox.removeClass('gld-bf-component-sm');
}
//更新子节点的checkstate
var subNodes = this.getAllControls();
subNodes.forEach(function (node) {
node.setIsolateState(enable);
});
}
};
TreeNode.prototype.setParentIsolateState = function (control) {
var children = this.getAllControls();
if (children && children.length > 0) {
var isolateCount = 0;
for (var i = 0; i < children.length; i++) {
children[i].getIsolateState() && (isolateCount++);
}
// 默认隔离的节点为0, 有隔离加1, 当被隔离的个数等于节点长度时,父节点为true。其余情况为false
isolateCount === children.length ? (this.opt.isIsolate = true) : (this.opt.isIsolate = false);
}
if (this.opt.isIsolate) {
this.isolateBox.removeClass('gld-bf-component-fill-sm');
this.isolateBox.addClass('gld-bf-component-sm');
}
else {
this.isolateBox.addClass('gld-bf-component-fill-sm');
this.isolateBox.removeClass('gld-bf-component-sm');
}
this.trigger(UIEvents$1.ValueChanged, 'isolate');
};
TreeNode.prototype.toggleExpansion = function () {
this.collapseWrap.toggleClass('open');
this.opt.isExpand = !this.opt.isExpand;
this.trigger(UIEvents$1.ExpendChanged, this, this.opt.isExpand);
this.opt.isExpand ? this.subNode.show() : this.subNode.hide();
};
TreeNode.prototype.setExpansion = function (isExpand) {
if (this.opt.hasCollapse && isExpand !== this.opt.isExpand) {
this.toggleExpansion();
}
};
// 子节点接口
TreeNode.prototype.addChildNode = function (control, option) {
var _this = this;
this.subNode.addControl(control, option);
control.on('ValueChanged', function (type) {
switch (type) {
case 'check':
_this.setParentCheckState(control);
break;
case 'isolate':
_this.setParentIsolateState(control);
break;
}
});
control.on('CheckedChanged', function () {
_this.setParentCheckState(control);
});
control.on('IsolateChanged', function () {
_this.setParentIsolateState(control);
});
control.on('SelectionChanged', function () {
});
control.on(UIEvents$1.RightClicked, function (params) {
_this.trigger(UIEvents$1.RightClicked, params);
});
};
TreeNode.prototype.removeChildNode = function () {
var subTrees = this.getAllControls();
for (var i = subTrees.length - 1; i >= 0; i--) {
this.subNode.removeControl(subTrees[i]);
}
};
TreeNode.prototype.getControl = function (condition, deep) {
if (deep === void 0) { deep = false; }
if (deep) {
if (this.subNode.getControl(condition)) {
return this.subNode.getControl(condition);
}
else {
var controls = this.getAllControls();
for (var _i = 0, controls_1 = controls; _i < controls_1.length; _i++) {
var control = controls_1[_i];
var result = control.getControl(condition, deep);
if (result)
return result;
}
}
}
else {
return this.subNode.getControl(condition);
}
};
TreeNode.prototype.getAllControls = function () {
return this.subNode.getAllControls();
};
TreeNode.prototype.updateUnloadControl = function (condition) {
if (this.getControl(condition)) {
var node = this.getControl(condition);
node.removeClass('not-allowed');
node.isLoaded = true;
}
else {
var controls = this.getAllControls();
controls.forEach(function (item) {
if (item.getControl(condition)) {
var node = item.getControl(condition);
node.removeClass('not-allowed');
node.isLoaded = true;
}
else {
item.updateUnloadControl(condition);
}
});
}
};
// 获取构件ID
TreeNode.prototype.getInstanceIds = function () {
return this.opt.instanceIds;
};
TreeNode.prototype.setInstanceIds = function (ids) {
this.opt.instanceIds = ids;
};
TreeNode.prototype.getParent = function () {
return this.parent;
};
// 获取option参数
TreeNode.prototype.getOptions = function () {
return this.opt;
};
TreeNode.prototype.getTreeName = function () {
return this.treeName;
};
TreeNode.prototype.getSubNode = function () {
return this.subNode;
};
return TreeNode;
}(Control));
var FilterTree = (function (_a) {
var filterType = _a.filterType;
var source = currentClashGroup.value;
var treeData = source["tree" + filterType];
var hashTreeMap = source["platTreeMap" + filterType];
var checkedIds = source["checkedTreeIds" + filterType];
var refTreeContainer = ref(null);
var onTreeCreated = function () {
createTreeNode(refTreeContainer.value, treeData[0]);
checkedIds.forEach(function (id) {
getNode(id).setCheckState(true);
updateCheckState(id);
});
};
var createTreeNode = function (parentNode, data) {
var nodeConfig = {
hasCollapse: Boolean(data.children),
hasCheckBox: true,
isExpand: data.id === 'all',
canCheck: false,
hasSelection: false,
rootTree: refTreeContainer.value,
content: data,
id: data.id
};
var node = new TreeNode(nodeConfig);
node.initTreeNode(data.name);
parentNode instanceof TreeNode ? parentNode.addChildNode(node) : parentNode.addTreeNode(node);
data.children && data.children.forEach(function (item) {
return createTreeNode(node, item);
});
};
var getRootNode = function () {
return refTreeContainer.value.getControl({
id: 'all'
});
};
var getNode = function (id) {
if (id === 'all') {
return getRootNode();
} else {
return getRootNode().getControl({
id: id
}, true);
}
};
var updateCheckState = function (id) {
var parentNode = getNode(hashTreeMap[id].pId);
if (parentNode) {
parentNode.setParentCheckState(parentNode);
}
};
return window.Glodon.__bf_h(Tree, {
ref: refTreeContainer,
onCreated: onTreeCreated
});
});
var slotElement = function () {
return window.Glodon.__bf_h("div", {
class: "bf-clashdetective-filter-detail"
}, window.Glodon.__bf_h("div", {
class: "filter-detail-section"
}, window.Glodon.__bf_h("div", {
class: "section-name"
}, "\u6784\u4EF6A"), window.Glodon.__bf_h("div", {
class: "section-tree"
}, window.Glodon.__bf_h(FilterTree, {
filterType: EFilterType.A
}))), window.Glodon.__bf_h("div", {
class: "filter-detail-section"
}, window.Glodon.__bf_h("div", {
class: "section-name"
}, "\u6784\u4EF6B"), window.Glodon.__bf_h("div", {
class: "section-tree"
}, window.Glodon.__bf_h(FilterTree, {
filterType: EFilterType.B
}))));
};
var closeHandler = function () {
return showFilterModal.value = false;
};
var FilterDetail = (function () {
return Modal({
slot: slotElement,
title: '筛选条件',
closeHandler: closeHandler
});
});
var ClashGroupItem = (function () {
var _a, _b, _c, _d, _e, _f;
var handleReback = function () {
selectedGroupIndex.value = null;
showGroupItemPanel.value = false;
clearIsolation();
resetHomeView();
};
var selectedId = ref(null);
var handleDetailClick = function (detail) {
var _a;
if (selectedId.value !== detail.clashId) {
selectedId.value = detail.clashId;
isolateComponentsById(detail);
zoomToBoundingBox(detail.position);
} else {
selectedId.value = null;
resetHomeView();
clashEffectOnModel((_a = currentClashGroup.value) === null || _a === void 0 ? void 0 : _a.clashList);
}
};
return window.Glodon.__bf_h("div", {
class: "bf-clashgroup-item"
}, window.Glodon.__bf_h("div", {
class: "header bf-clashdetective-title"
}, window.Glodon.__bf_h("i", {
class: "bficon bf-reback bf-arrow-left",
onClick: function () {
return handleReback();
}
}), window.Glodon.__bf_h("span", {
class: "header-name text-ellipsis"
}, {
__bf_render: () => (_a = currentClashGroup.value) === null || _a === void 0 ? void 0 : _a.name,
__bf_refItems: [(() => {
try {
return currentClashGroup;
} catch {}
})()]
})), window.Glodon.__bf_h("div", {
class: "bf-clashdetective-title item-header"
}, window.Glodon.__bf_h("span", {
class: "color-suffix"
}), window.Glodon.__bf_h("span", {
class: "header-name"
}, "\u57FA\u672C\u4FE1\u606F")), window.Glodon.__bf_h("div", {
class: "basic-info-list"
}, window.Glodon.__bf_h("div", {
class: "basic-info"
}, window.Glodon.__bf_h("span", {
class: "basic-info-name"
}, "\u78B0\u649E\u7C7B\u578B\uFF1A"), window.Glodon.__bf_h("span", {
class: "basic-info-value"
}, {
__bf_render: () => ((_b = clashData.value) === null || _b === void 0 ? void 0 : _b.clashType) === 'Hard' ? '硬碰撞' : '',
__bf_refItems: [(() => {
try {
return clashData;
} catch {}
})()]
})), window.Glodon.__bf_h("div", {
class: "basic-info"
}, window.Glodon.__bf_h("span", {
class: "basic-info-name"
}, "\u78B0\u649E\u70B9\uFF1A"), window.Glodon.__bf_h("span", {
class: "basic-info-value"
}, {
__bf_render: () => (_c = currentClashGroup.value) === null || _c === void 0 ? void 0 : _c.count,
__bf_refItems: [(() => {
try {
return currentClashGroup;
} catch {}
})()]
})), window.Glodon.__bf_h("div", {
class: "basic-info"
}, window.Glodon.__bf_h("span", {
class: "basic-info-name"
}, "\u7B5B\u9009\u6761\u4EF6\uFF1A"), {
__bf_render: () => window.Glodon.__bf_h("span", {
class: "basic-info-value basic-info-view-detail",
onClick: function () {
return showFilterModal.value = true;
}
}, "\u67E5\u770B\u8BE6\u60C5"),
__bf_refItems: [(() => {
try {
return showFilterModal;
} catch {}
})()]
})), window.Glodon.__bf_h("div", {
class: "bf-clashdetective-title item-header"
}, window.Glodon.__bf_h("span", {
class: "color-suffix"
}), window.Glodon.__bf_h("span", {
class: "header-name"
}, "\u78B0\u649E\u8BE6\u60C5")), window.Glodon.__bf_h("div", {
class: "group-detail"
}, window.Glodon.__bf_h("div", {
class: "group-detail-header bf-clashdetective-row"
}, window.Glodon.__bf_h("div", {
class: "column column-1"
}, "\u5E8F\u53F7"), window.Glodon.__bf_h("div", {
class: "column column-2"
}, "\u6784\u4EF6A"), window.Glodon.__bf_h("div", {
class: "column column-3"
}, "\u6784\u4EF6B")), {
__bf_render: () => ((_d = currentClashGroup.value) === null || _d === void 0 ? void 0 : _d.clashList.length) > 0 ? window.Glodon.__bf_h("ul", {
class: "group-detail-list"
}, {
__bf_render: () => (_f = (_e = currentClashGroup.value) === null || _e === void 0 ? void 0 : _e.clashList) === null || _f === void 0 ? void 0 : _f.map(function (detail, index) {
return window.Glodon.__bf_h("div", {
class: {
__bf_render: () => detail.clashId === selectedId.value ? "bf-clashdetective-row bf-clashdetective-row-selected" : "bf-clashdetective-row",
__bf_refItems: [(() => {
try {
return selectedId;
} catch {}
})()]
},
onClick: function () {
return handleDetailClick(detail);
}
}, window.Glodon.__bf_h("div", {
class: "column column-1"
}, index + 1), window.Glodon.__bf_h("div", {
class: "column column-2",
title: detail.nameA
}, detail.nameA), window.Glodon.__bf_h("div", {
class: "column column-3",
title: detail.nameB
}, detail.nameB));
}),
__bf_refItems: [(() => {
try {
return currentClashGroup;
} catch {}
})()]
}) : window.Glodon.__bf_h("div", {
class: "group-detail-list group-detail-list-empty"
}, "\u6682\u65E0\u6570\u636E"),
__bf_refItems: [(() => {
try {
return currentClashGroup;
} catch {}
})()]
}), {
__bf_render: () => showFilterModal.value === true && window.Glodon.__bf_h(FilterDetail, null),
__bf_refItems: [(() => {
try {
return showFilterModal;
} catch {}
})()]
});
});
var LeftPanel = (function () {
return window.Glodon.__bf_h("div", {
class: "bf-clashdetective-left-panel"
}, {
__bf_render: () => showGroupItemPanel.value === false ? window.Glodon.__bf_h(ClashGroup, null) : window.Glodon.__bf_h(ClashGroupItem, null),
__bf_refItems: [(() => {
try {
return showGroupItemPanel;
} catch {}
})()]
});
});
var SNS = 'Glodon.Bimface.Module.ClashDetective.WebApplication';
var SNSM = 'Glodon.Bimface.Module.ModuleManager';
/**
* @classdesc 类:碰撞检测应用
* @class Glodon.Bimface.Module.ClashDetective.WebApplication
* @description 构造碰撞检测应用
* @constructs Glodon.Bimface.Module.ClashDetective.WebApplication
* @param {Glodon.Bimface.Module.ClashDetective.WebApplicationConfig} webApplicationConfig 碰撞检测应用的配置项
*/
var WebApplication = function (_super) {
__extends(WebApplication, _super);
function WebApplication(config) {
var _this = this;
SDM.send(SNS, "bf_c_clashDetectiveWebApplication_new");
SDM.send(SNSM, "bf_c_loadModule_new");
_this = _super.call(this, config) || this;
_this.init();
return _this;
}
WebApplication.prototype.prepare = function (dom) {
var _a, _b, _c, _d, _e, _f;
return __awaiter(this, void 0, void 0, function () {
var response, selectionInfo, modelMetaData, clashDetectiveId, _g, groups;
return __generator(this, function (_h) {
switch (_h.label) {
case 0:
response = BaseModule._currentModuleData;
selectionInfo = (_b = (_a = response === null || response === void 0 ? void 0 : response.multiModelClashDetectiveList) === null || _a === void 0 ? void 0 : _a.items[0]) === null || _b === void 0 ? void 0 : _b.selectionA[0];
modelMetaData = {
databagId: selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.databagId,
isSupportComponentProperty: response === null || response === void 0 ? void 0 : response.isSupportComponentProperty,
isSupportDrawing: response === null || response === void 0 ? void 0 : response.isSupportDrawing,
isSupportFamilyTypeList: response === null || response === void 0 ? void 0 : response.isSupportFamilyTypeList,
isSupportMaterialProperty: response === null || response === void 0 ? void 0 : response.isSupportMaterialProperty,
isSupportMiniMap: response === null || response === void 0 ? void 0 : response.isSupportMiniMap,
isSupportModelTree: false,
isSupportRoomArea: true,
isSurpportWalk: false,
jsSDKVersion: response === null || response === void 0 ? void 0 : response.jsSDKVersion,
loadMode: response === null || response === void 0 ? void 0 : response.loadMode,
modelId: selectionInfo.modelType === 'INTEGRATE' ? selectionInfo.integrateId : selectionInfo.fileId,
modelType: selectionInfo.modelType,
renderType: response === null || response === void 0 ? void 0 : response.renderType,
renderVersion: response === null || response === void 0 ? void 0 : response.renderVersion,
sceneJsonInfo: response === null || response === void 0 ? void 0 : response.sceneJsonInfo,
shell: response === null || response === void 0 ? void 0 : response.shell,
split: response === null || response === void 0 ? void 0 : response.split,
subRenders: response === null || response === void 0 ? void 0 : response.subRenders,
type: response === null || response === void 0 ? void 0 : response.type,
viewType: '3DView',
workerType: response === null || response === void 0 ? void 0 : response.workerType,
viewToken: response === null || response === void 0 ? void 0 : response.viewToken
};
clashDetectiveId = (_d = (_c = response === null || response === void 0 ? void 0 : response.multiModelClashDetectiveList) === null || _c === void 0 ? void 0 : _c.items[0]) === null || _d === void 0 ? void 0 : _d.clashDetectiveId;
return [4
/*yield*/
, this._initApp({
domElement: dom,
viewMetaData: modelMetaData,
clashDetectiveId: clashDetectiveId
})];
case 1:
_h.sent();
app.value = this._app3d;
viewer.value = this._viewer3d;
modelId.value = this._modelId;
modelType.value = this._modelType;
_g = clashData;
return [4
/*yield*/
, this._getClashResults()];
case 2:
_g.value = _h.sent();
clashResults.value = ((_e = clashData.value) === null || _e === void 0 ? void 0 : _e.results) || [];
return [4
/*yield*/
, this._getClashGroups()];
case 3:
groups = _h.sent();
if (!groups) {
clashGroups.value = [{
name: '碰撞分组',
id: 0,
filterA: [{
id: 'all'
}],
filterB: [{
id: 'all'
}],
count: ((_f = clashResults.value) === null || _f === void 0 ? void 0 : _f.length) || 0
}];
} else {
clashGroups.value = groups;
}
this.handleClashData();
return [2
/*return*/
];
}
});
});
};
WebApplication.prototype.handleClashData = function () {
if (this._modelType !== 'INTEGRATE') {
hanldeClashResults();
} else {
this._eventEmmiter.on(Glodon.Bimface.Module.ClashDetective.WebApplicationEvent.FilesInfoAdded, hanldeClashResults);
}
};
WebApplication.prototype.resizeHandler = function () {
var _this = this;
window.addEventListener('resize', function () {
var clashDetectiveDom = document.getElementsByClassName('bf-clashdetective')[0];
var clientWidth = clashDetectiveDom.clientWidth,
clientHeight = clashDetectiveDom.clientHeight;
var leftPanelDom = document.getElementsByClassName('bf-clashdetective-left')[0];
var leftPanelWidth = leftPanelDom.getBoundingClientRect().width;
_this._viewer3d.resize(clientWidth - leftPanelWidth, clientHeight);
});
};
WebApplication.prototype.handleViewerChange = function () {
var _this = this;
this._eventEmmiter.on(Glodon.Bimface.Module.ClashDetective.WebApplicationEvent.ModelAdded, function () {
return _this.resizeHandler();
});
};
WebApplication.prototype.init = function () {
return __awaiter(this, void 0, void 0, function () {
var refViewerDom, initViewer, destroyApp, content;
var _this = this;
return __generator(this, function (_a) {
refViewerDom = ref(null);
this.handleViewerChange();
initViewer = function () {
// 延迟使得获取element的准确宽高
requestAnimationFrame(function () {
_this.prepare(refViewerDom.value.getElement());
});
};
destroyApp = function () {
_this.removeEventListener(Glodon.Bimface.Module.ClashDetective.WebApplicationEvent.FilesInfoAdded, hanldeClashResults);
_this.removeEventListener(Glodon.Bimface.Module.ClashDetective.WebApplicationEvent.ModelAdded, function () {
return _this.resizeHandler();
});
_this.destroy();
};
content = window.Glodon.__bf_h("div", {
class: "bf-clashdetective",
onDestroyed: destroyApp
}, window.Glodon.__bf_h("div", {
class: "bf-clashdetective-left"
}, window.Glodon.__bf_h(LeftPanel, null)), window.Glodon.__bf_h("div", {
ref: refViewerDom,
class: "bf-clashdetective-viewer",
onCreated: initViewer
}));
render(content, this.getDomElement());
return [2
/*return*/
];
});
});
};
return WebApplication;
}(ClashDetectiveModule);
/**
* @classdesc 类:碰撞检测应用的配置项
* @class Glodon.Bimface.Module.ClashDetective.WebApplicationConfig
* @constructs Glodon.Bimface.Module.ClashDetective.WebApplicationConfig
* @description 构造碰撞检测应用的配置项
*/
var WebApplicationConfig = /** @class */ (function () {
function WebApplicationConfig(options) {
var config;
if (options) {
options = {
/**
* 存放组件界面的DOM容器
* @var {DOMElement} Glodon.Bimface.Module.ClashDetective.WebApplicationConfig.prototype.domElement
*/
domElement: options.domElement
};
}
return config;
}
return WebApplicationConfig;
}());
/**
* @namespace Glodon.Bimface.Module.ClashDetective.WebApplicationEvent
* @classdesc 常量:WebApplication的事件
* @description Glodon.Bimface.Module.ClashDetective.WebApplicationEvent
* @property {String} ModuleDestroyed 组件销毁完成事件
*/
var WebApplicationEvent;
(function (WebApplicationEvent) {
WebApplicationEvent["ModuleInitialized"] = "ModuleInitialized";
WebApplicationEvent["ModuleDestroyed"] = "ModuleDestroyed";
WebApplicationEvent["FilesInfoAdded"] = "FilesInfoAdded";
WebApplicationEvent["ModelAdded"] = "ModelAdded";
})(WebApplicationEvent || (WebApplicationEvent = {}));
var WebApplicationEvent$1 = WebApplicationEvent;
var ClashDetective = ModuleNS.ClashDetective = ModuleNS.ClashDetective || {};
ClashDetective.WebApplication = WebApplication;
ClashDetective.WebApplicationConfig = WebApplicationConfig;
ClashDetective.WebApplicationEvent = WebApplicationEvent$1;
export { ClashDetective as default };