diff --git a/angular.json b/angular.json index 6660740..08c357a 100644 --- a/angular.json +++ b/angular.json @@ -63,13 +63,13 @@ "budgets": [ { "type": "initial", - "maximumWarning": "8mb", - "maximumError": "8mb" + "maximumWarning": "80mb", + "maximumError": "80mb" }, { "type": "anyComponentStyle", - "maximumWarning": "6kb", - "maximumError": "10kb" + "maximumWarning": "60kb", + "maximumError": "100kb" } ] } diff --git a/package.json b/package.json index 952efd6..10960e1 100644 --- a/package.json +++ b/package.json @@ -22,19 +22,28 @@ "@angular/platform-browser": "~9.0.0", "@angular/platform-browser-dynamic": "~9.0.0", "@angular/router": "~9.0.0", + "@babylonjs/core": "^4.2.0", + "@babylonjs/gui": "^4.2.0", + "@babylonjs/inspector": "^4.2.0", + "@babylonjs/loaders": "^4.2.0", + "@babylonjs/materials": "^4.2.0", "@types/cesium": "^1.59.5", + "@types/react-dom": "^17.0.10", "@types/swiper": "^5.2.1", "angular-calendar": "^0.28.2", "bson-objectid": "^1.3.1", "cesium": "^1.64.0", + "class-transformer": "^0.4.0", "e-ngx-cesium": "^6.3.2", "echarts": "^4.6.0", "firebase": "^7.6.2", + "install": "^0.13.0", "ng-zorro-antd": "^9.3.0", "ngx-cookie-service": "^3.0.2", "ngx-countdown": "^11.0.0", "ngx-echarts": "^4.2.2", "ngx-perfect-scrollbar": "^8.0.0", + "reflect-metadata": "^0.1.13", "rxjs": "~6.5.4", "swiper": "^5.3.6", "tslib": "^1.10.0", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 61196b3..c8e1abc 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -7,6 +7,7 @@ import { NavigationComponent } from './navigation/navigation.component'; //路由守卫 import { AuthGuard } from './auth.guard' import { HomeComponent } from './pages/home/home.component'; +import { ThreeHomeComponent } from './three-dimensional/three-home/three-home.component'; @@ -14,6 +15,7 @@ const routes: Routes = [ { path: '', redirectTo: 'login', pathMatch: 'full' }, { path: 'login', component: LoginComponent }, //登录页 { path: 'register', component: RegisterComponent }, //注册页 + { path: 'threeDimensional', component: ThreeHomeComponent }, //三维场景 { path: '', component: HomeComponent, children: [ { path: 'home', loadChildren: () => import('./pages/pages.module').then(m => m.PagesModule) } diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 89995bf..6d583f7 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,9 +1,10 @@ import { Component } from '@angular/core'; import { HttpClient } from '@angular/common/http' import { Data } from './interface' -import { Router,ActivatedRoute } from '@angular/router' -import {CacheTokenService} from './service/cache-token.service'//引入服务 +import { Router, ActivatedRoute } from '@angular/router' +import { CacheTokenService } from './service/cache-token.service'//引入服务 import { CookieService } from 'ngx-cookie-service'; +import "reflect-metadata"; @@ -14,7 +15,7 @@ import { CookieService } from 'ngx-cookie-service'; }) export class AppComponent { - constructor(private http:HttpClient,private router:Router,public token:CacheTokenService,private cookieService: CookieService) { } + constructor(private http: HttpClient, private router: Router, public token: CacheTokenService, private cookieService: CookieService) { } ngOnInit(): void { // var token = this.cookieService.get("token") diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 442fc26..7d59b2c 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -16,10 +16,12 @@ import { CacheTokenService } from './service/cache-token.service' import { TreeService } from './service/tree.service' import { CookieService } from 'ngx-cookie-service';//cookie插件 import { CountdownModule } from 'ngx-countdown'; //倒计时插件 +import { ThreeHomeComponent } from './three-dimensional/three-home/three-home.component'; @NgModule({ declarations: [ - AppComponent + AppComponent, + ThreeHomeComponent ], imports: [ BrowserModule, diff --git a/src/app/babylon/controller/config-manager.ts b/src/app/babylon/controller/config-manager.ts new file mode 100644 index 0000000..46242f6 --- /dev/null +++ b/src/app/babylon/controller/config-manager.ts @@ -0,0 +1,232 @@ +import { MarkKindType, MarkType, MarkTagPos } from "../model/data/mark/mark-data"; +import { FacilityPosType, FacilityType } from "../model/data/model-data/model-data-facility"; + +//配置、常量管理器 +export class ConfigManager { + static readonly c_resPath_assetsRoot = 'assets/'; //资源根目录 + + static readonly c_resPath_institutionsRoot = 'institutions/'; //单位 + static readonly c_reaPath_facilityProperty = "facilityProperty";//设备属性资源(一般是图片) + static readonly c_resPath_facilitiesRoot = 'facilities/'; //设备资源 + static readonly c_resPath_facilityIcon = "images/facility/";// 设备icon + + + static readonly c_size_facilityIconSize = 40;//设备icon的大小 + + static readonly c_time_longPress = 500;//长按时间(毫秒) + + + /** + * 获取设备icon的url + * @param type 设备的类型 + * @param pos 设备的位置(室内还是室外) + */ + static getFacilityIconUrl(type: FacilityType, pos: FacilityPosType): string { + + let result = ConfigManager.c_resPath_assetsRoot + "images/facility/" + pos + "/" + type + ".png"; + return result; + } + + /** + * 根据设备类型获取名称 + * @param type 设备类型 + */ + static getFacilityTypeName(type: FacilityType): string { + let result = "未知"; + switch (type) { + case FacilityType.AQCK: result = "安全出口"; break; + case FacilityType.DSXHS: result = "地上消火栓"; break; + case FacilityType.DXXHS: result = "地下消火栓"; break; + case FacilityType.SZDSXHS: result = "市政地上消火栓"; break; + case FacilityType.SZDXXHS: result = "市政地下消火栓"; break; + case FacilityType.DSSBJHQ: result = "地上水泵接合器"; break; + case FacilityType.DXSBJHQ: result = "地下水泵接合器"; break; + case FacilityType.QBSBJHQ: result = "墙壁式接合器"; break; + case FacilityType.DGNSBJHQ: result = "多功能接合器"; break; + case FacilityType.GD: result = "高度"; break; + case FacilityType.PL: result = "毗邻"; break; + case FacilityType.JTQ: result = "禁停区"; break; + case FacilityType.JJQ: result = "集结区"; break; + case FacilityType.TPBZ: result = "图片标注"; break; + + case FacilityType.XKS: result = "消控室"; break; + case FacilityType.BF: result = "泵房"; break; + case FacilityType.SX: result = "水箱"; break; + case FacilityType.LSXFB: result = "立式消防泵"; break; + case FacilityType.WSXFB: result = "卧式消防泵"; break; + case FacilityType.CYXFB: result = "柴油消防泵"; break; + case FacilityType.FHFQ: result = "防火分区"; break; + case FacilityType.SNXHS: result = "室内消火栓"; break; + case FacilityType.FHM: result = "防火门"; break; + case FacilityType.FHJL: result = "防火卷帘"; break; + case FacilityType.SSLT: result = "疏散楼梯"; break; + case FacilityType.XFDT: result = "消防电梯"; break; + case FacilityType.PTDT: result = "普通电梯"; break; + case FacilityType.WXY: result = "危险源"; break; + case FacilityType.ZDQY: result = "重点区域"; break; + case FacilityType.DWBZ: result = "点位标注"; break; + case FacilityType.HT: result = "货梯"; break; + + case FacilityType.BNC: result = "避难层"; break;//特殊 + } + return result; + } + + /** + * 查询某设备所处位置类型(室内还是室外) + * @param facilityType + */ + static getPosType(facilityType: FacilityType): FacilityPosType { + let result = FacilityPosType.Indoor; + + switch (facilityType) { + case FacilityType.AQCK: + case FacilityType.DSXHS: + case FacilityType.DXXHS: + case FacilityType.SZDXXHS: + case FacilityType.SZDSXHS: + case FacilityType.DSSBJHQ: + case FacilityType.DXSBJHQ: + case FacilityType.QBSBJHQ: + case FacilityType.DGNSBJHQ: + case FacilityType.GD: + case FacilityType.PL: + case FacilityType.JTQ: + case FacilityType.JJQ: + case FacilityType.TPBZ: result = FacilityPosType.Outdoor; break; + case FacilityType.DWBZ: + case FacilityType.ZDQY: + case FacilityType.WXY: result = FacilityPosType.Public; break; + } + return result; + } + + + //#region 事态标绘 + + /** + * 事态标绘的名称配置 + */ + static s_markName = new Map([ + [MarkType.SYA, "伤员"], + [MarkType.SYB, "伤员"], + [MarkType.SYC, "伤员"], + [MarkType.SYD, "伤员"], + [MarkType.ZQR, "知情人"], + [MarkType.WXP, "危险品"], + [MarkType.ZWD, "杂物堆"], + [MarkType.PCD, "破拆点"], + [MarkType.H, "火"], + [MarkType.TPH, "突破火"], + [MarkType.SNH, "室内火"], + [MarkType.YWA, "烟雾"], + [MarkType.YWB, "烟雾"], + [MarkType.YWC, "烟雾"], + [MarkType.MHF, "灭火服"], + [MarkType.JYF, "救援服"], + [MarkType.GRF, "隔热服"], + [MarkType.FHF, "防化服"], + [MarkType.BHF, "避火服"], + [MarkType.YWXFY, "义务消防员"], + [MarkType.AQS, "安全哨"], + [MarkType.MTC, "摩托车"], + [MarkType.XLC, "巡逻车"], + [MarkType.SGC, "水罐车"], + [MarkType.PMC, "泡沫车"], + [MarkType.GPC, "高喷车"], + [MarkType.DGPTC, "登高平台车"], + [MarkType.YTC, "云梯车"], + [MarkType.QXJYC, "抢险救援车"], + [MarkType.QCC, "器材车"], + [MarkType.ZMC, "照明车"], + [MarkType.PCC, "破拆车"], + [MarkType.PYC, "排烟车"], + [MarkType.ZHC, "指挥车"], + [MarkType.GCGSC, "高层供水车"], + [MarkType.KQHXCQC, "空气呼吸充气车"], + [MarkType.GA, "公安"], + [MarkType.JJ, "交警"], + [MarkType.YS, "医生"], + [MarkType.QXRY, "抢修人员"], + [MarkType.JHC, "救护车"], + [MarkType.JC, "警车"], + [MarkType.DLQXC, "电力抢修车"], + [MarkType.RQQXC, "燃气抢修车"], + [MarkType.GSQXC, "供水抢修车"], + [MarkType.HBJCC, "环保检测车"], + [MarkType.JTYSC, "交通运输车"], + [MarkType.WSFYC, "卫生防疫车"], + [MarkType.YJTXC, "应急通信车"], + [MarkType.JCA, "轿车"], + [MarkType.JCB, "轿车"], + [MarkType.JCC, "轿车"], + [MarkType.DSZ, "董事长"], + [MarkType.JL, "经理"], + [MarkType.FZ, "副总"], + [MarkType.MS, "秘书"], + [MarkType.ZJ, "总监"], + [MarkType.ZG, "主管"], + [MarkType.ZZ, "组长"], + [MarkType.QT, "前台"], + [MarkType.SJS, "设计师"], + [MarkType.CXY, "程序员"], + [MarkType.ZYA, "职员"], + [MarkType.ZYB, "职员"], + [MarkType.JG, "技工"], + [MarkType.BA, "保安"], + [MarkType.JJX, "警戒线"], + [MarkType.SD, "水带"], + [MarkType.JGLX, "进攻路线"], + [MarkType.CT, "撤退"], + [MarkType.ZHB, "指挥部"], + [MarkType.LT6, "6米拉梯"], + [MarkType.LT15, "15米拉梯"], + [MarkType.FSQ, "分水器"], + [MarkType.STB, "手抬泵"], + [MarkType.SP, "水炮"], + [MarkType.WZ, "文字"], + [MarkType.JJQ, "集结区"], + [MarkType.QYSDA, "区域设定"], + [MarkType.QYSDB, "区域设定"], + ]); + + /** + * 获取事态标绘素材的名称 + * @param type + */ + static getMarkName(type: MarkType) { + if (ConfigManager.s_markName.has(type)) { + return ConfigManager.s_markName.get(type); + } + else { + return "未知"; + } + } + + /** + * 获取事态标绘模型的路径 + * @param type + * @param pos + */ + static getMarkModelPath(pos: MarkTagPos, type: MarkType): string { + + let result = ConfigManager.c_resPath_assetsRoot + "mark/" + pos.toLocaleLowerCase() + "/" + type.toLocaleLowerCase() + "/"; + return result; + } + + /** + * 获取事态标绘素材的图标 + * @param type + * @param pos + */ + static getMarkIconUrl(pos: MarkTagPos, type: MarkType): string { + + let result = ConfigManager.c_resPath_assetsRoot + "images/mark/" + pos.toLocaleLowerCase() + "/" + type.toLocaleLowerCase() + ".png"; + return result; + } + + + + //#endregion + +} \ No newline at end of file diff --git a/src/app/babylon/controller/data-manager.ts b/src/app/babylon/controller/data-manager.ts new file mode 100644 index 0000000..edf6d63 --- /dev/null +++ b/src/app/babylon/controller/data-manager.ts @@ -0,0 +1,646 @@ +import { Quaternion, Vector3 } from '@babylonjs/core'; +import { + BuildingData, + BuildingData_ChemicalPlant, + BuildingData_Environment, + BuildingData_Normal, + BuildingType, +} from '../model/data/institution/building/building-data'; +import { + FacilityPosType, + FacilityType, + ModelData_facility, +} from '../model/data/model-data/model-data-facility'; +import { + InstitutionData, + NormalData, +} from '../model/data/institution/institution-data'; +import { + BuildingPosType, + ModelData, + +} from '../model/data/model-data/model-data'; +import { ModelData_building } from '../model/data/model-data/model-data-building'; +import { TransformData } from '../model/data/transform-data'; +import { BabylonTool } from '../tool/babylon-tool'; +import { AllFacilityData } from '../model/data/institution/facility/all-facility-data'; +import { plainToClass } from 'class-transformer'; +import { ConfigManager } from './config-manager'; +import { ModelEditData } from '../model/data/model-data/model-edit-data'; +import { ServeManager } from './serve-manager'; +import { InsitutionDataSimple } from '../model/data/institution/institution-data-simple'; +import { PropertyData_Base } from '../model/data/institution/facility/property-data/property-data-base'; +import { PropertyData_AQCK } from '../model/data/institution/facility/property-data/outdoor/property-data-aqck'; +import { PropertyData_public } from '../model/data/institution/facility/property-data/property-data-public'; +import { TsTool } from '../tool/ts-tool'; +import { PropertyData_Base_XHS } from '../model/data/institution/facility/property-data/base/property-data-base-xhs'; +import { PropertyData_Base_SBJHQ } from '../model/data/institution/facility/property-data/base/property-data-base-sbjhq'; +import { PropertyData_PL } from '../model/data/institution/facility/property-data/outdoor/property-data-pl'; +import { PropertyData_Base_IMG } from '../model/data/institution/facility/property-data/base/property-data-base-img'; +import { PropertyData_Base_XFB } from '../model/data/institution/facility/property-data/base/property-data-base-xfb'; +import { PropertyData_FHFQ } from '../model/data/institution/facility/property-data/indoor/property-data-fhfq'; +import { PropertyData_SSLT } from '../model/data/institution/facility/property-data/indoor/property-data-sslt'; +import { PropertyData_XFDT } from '../model/data/institution/facility/property-data/indoor/property-data-xfdt'; +import { PropertyData_ZDQY } from '../model/data/institution/facility/property-data/indoor/property-data-zdqy'; +import { PropertyData_DWBZ } from '../model/data/institution/facility/property-data/indoor/property-data-dwbz'; +import { PropertyData_GD } from '../model/data/institution/facility/property-data/outdoor/property-data-gd'; +import { ModeManager, ModeType } from './mode-manager'; +import { AllMarkData } from '../model/data/mark/all-mark-data'; +import { AllMarkPlanData } from '../model/data/mark/mark-plan-data'; +import { HttpErrorResponse } from '@angular/common/http'; +import { PropertyData_Q } from '../model/data/institution/facility/property-data/outdoor/property-data-q'; + +class Test { + id: string; +} + +//数据管理器 +export class DataManager { + + static institutionData_simple: InsitutionDataSimple;//当前单位简易信息 + static institutionData: InstitutionData; //当前单位信息 + + static allFacilityData: AllFacilityData; //所有可用的设备数据(将来读取自配置表) + + /** + * 态势标绘的素材库 + */ + static allMarkData: AllMarkData; + + /** + * 当前单位的标绘方案信息 + */ + static allMarkPlanData: AllMarkPlanData; + + static initDebugData(institutionKey: string, onSuccess?: (key: string) => void, onError?: (key: string, error: string) => void) { + + //本地捏造消防设备列表信息 + DataManager.initDebugData_facility(); + if (ModeManager.currentMode == ModeType.Look) { + DataManager.initDebugData_mark(); + } + + let dataFromServe = true;//true-表示数据来自服务器,false-表示来自本地捏造 + + if (dataFromServe) { + + ServeManager.instance.getInstitutionData(institutionKey, (key, result) => { + if (onSuccess) { + DataManager.institutionData = plainToClass(InstitutionData, result); + DataManager.institutionData.normalData.name = DataManager.institutionData_simple.name; + // console.log(DataManager.institutionData); + onSuccess(key); + } + }, (key, error) => { + + if (onError) { + console.error("获取单位信息失败" + key); + onError(key, error); + } + + console.error("获取单位信息失败,本地捏造数据"); + DataManager.initDebugData_institution(); + if (onSuccess) { + onSuccess(key); + } + }); + } + else { + //本地捏造测试数据 + DataManager.initDebugData_institution(); + onSuccess(DataManager.institutionData.normalData.key); + } + + + + } + + //初始化单位数据 + static initDebugData_institution() { + DataManager.institutionData = new InstitutionData(); + + DataManager.institutionData.normalData = new NormalData(); + DataManager.institutionData.normalData.key = 'Institution001'; + DataManager.institutionData.normalData.name = '单位001'; + + DataManager.institutionData.environmentDatas = [ + new BuildingData_Environment(), + ]; + DataManager.institutionData.environmentDatas[0].normalData = new NormalData(); + DataManager.institutionData.environmentDatas[0].normalData.key = + 'environment001'; + DataManager.institutionData.environmentDatas[0].normalData.name = '环境001'; + + let environmentTransform = new TransformData(); //用于测试建筑的数据还原效果 + environmentTransform.originalScaling = new Vector3(961.66, 5.17, 962.6); + environmentTransform.position = new Vector3(0, -2.939, 0); + environmentTransform.scaling = environmentTransform.originalScaling.clone(); + + DataManager.institutionData.environmentDatas[0].outdoorData = new ModelEditData(); + DataManager.institutionData.environmentDatas[0].outdoorData.index = 1; + let resPath_en = DataManager.getResPath_building( + DataManager.institutionData.normalData.key.toLowerCase(), + DataManager.institutionData.environmentDatas[0].normalData.key.toLocaleLowerCase(), + BuildingPosType.Environment, + 'modelEn001' + ); + DataManager.institutionData.environmentDatas[0].outdoorData.modelData = new ModelData_building( + 'modelEn001', + '环境001', + BuildingPosType.Environment, + 'Terrain.gltf', + environmentTransform, + resPath_en + ); + + DataManager.institutionData.environmentDatas[0].describe = '这是环境'; + + let facilityTransform = new TransformData(); + facilityTransform.position = new Vector3(-137, 3.3, 150); + facilityTransform.rotationQuaternion = Quaternion.FromEulerAngles( + 0, + 80 / BabylonTool.c_radian1, + 0 + ); + facilityTransform.originalScaling = new Vector3(0.39, 0.7, 0.37); + facilityTransform.scaling = facilityTransform.originalScaling.multiplyByFloats( + 2, + 2, + 2 + ); + // let facilityData = new ModelData_facility( + // 'facility001', + // FacilityType.DSXHS, + // '地上消火栓', + // 'DXXHS.gltf', + // facilityTransform, + // FacilityPosType.Outdoor + // ); + // DataManager.institutionData.environmentDatas[0].outdoorData.facilities = [ + // facilityData, + // ]; + + DataManager.institutionData.normalBuildingDatas = [ + new BuildingData_Normal(), + ]; + + DataManager.institutionData.normalBuildingDatas[0].normalData = new NormalData(); + DataManager.institutionData.normalBuildingDatas[0].buildingType = + BuildingType.Normal; + DataManager.institutionData.normalBuildingDatas[0].normalData.key = + 'building001'; + DataManager.institutionData.normalBuildingDatas[0].normalData.name = + '大楼001'; + DataManager.institutionData.normalBuildingDatas[0].describe = + '一个普通大楼'; + + DataManager.institutionData.normalBuildingDatas[0].outdoorData = new ModelEditData(); + DataManager.institutionData.normalBuildingDatas[0].outdoorData.index = 1; + let resPath_out = DataManager.getResPath_building( + DataManager.institutionData.normalData.key.toLowerCase(), + DataManager.institutionData.normalBuildingDatas[0].normalData.key.toLocaleLowerCase(), + BuildingPosType.OutDoor, + 'modelOut001' + ); + DataManager.institutionData.normalBuildingDatas[0].outdoorData.modelData = new ModelData_building( + 'modelOut001', + '外观模型1', + BuildingPosType.OutDoor, + 'ZhuTi.gltf', + new TransformData(), + resPath_out + ); + + DataManager.institutionData.normalBuildingDatas[0].indoorsData = []; + + let indoorData1 = new ModelEditData(); + DataManager.institutionData.normalBuildingDatas[0].indoorsData.push( + indoorData1 + ); + indoorData1.index = 1; + let resPath_inDoor1 = DataManager.getResPath_building( + DataManager.institutionData.normalData.key.toLowerCase(), + DataManager.institutionData.normalBuildingDatas[0].normalData.key.toLocaleLowerCase(), + BuildingPosType.Indoor, + 'nei1' + ); + indoorData1.modelData = new ModelData_building( + 'nei1', + '室内模型1层', + BuildingPosType.Indoor, + 'nei1.gltf', + null, + resPath_inDoor1 + ); + + let indoorData2 = new ModelEditData(); + DataManager.institutionData.normalBuildingDatas[0].indoorsData.push( + indoorData2 + ); + indoorData2.index = 2; + let resPath_inDoor2 = DataManager.getResPath_building( + DataManager.institutionData.normalData.key.toLowerCase(), + DataManager.institutionData.normalBuildingDatas[0].normalData.key.toLocaleLowerCase(), + BuildingPosType.Indoor, + 'nei2' + ); + indoorData2.modelData = new ModelData_building( + 'nei2', + '室内模型2层', + BuildingPosType.Indoor, + 'nei2.gltf', + null, + resPath_inDoor2 + ); + indoorData2.facilities = []; + + let indoorData2FacilityTransform = new TransformData(); + indoorData2FacilityTransform.position = new Vector3(-6, -3.1, 29); + indoorData2FacilityTransform.rotationQuaternion = Quaternion.FromEulerAngles( + 0, + 30 / BabylonTool.c_radian1, + 0 + ); + // let indoorData2FacilityData = new ModelData_facility( + // 'indoor2_facility001', + // FacilityType.DSXHS, + // '地下消火栓1', + // 'DSXHS.gltf', + // indoorData2FacilityTransform, + // FacilityPosType.Indoor + // ); + // indoorData2.facilities.push(indoorData2FacilityData); + } + + + + //获取建筑资源完整路径 + static getResPath_building( + institutionKey: string, + buildingKey: string, + buildingPosType: BuildingPosType, + key: string + ): string { + let result = + ConfigManager.c_resPath_institutionsRoot + + institutionKey.toLocaleLowerCase() + + '/' + + buildingKey.toLocaleLowerCase() + + '/' + + buildingPosType + + '/' + + key + + '/'; + return result; + } + + //获取属性所需文件的路径 + static getResPath_facilityProperty(institutionKey: string, + buildingKey: string, facilityType: FacilityType, facilityKey: string, key: string) { + + let result = + ConfigManager.c_resPath_institutionsRoot + + institutionKey.toLocaleLowerCase() + + '/' + + buildingKey.toLocaleLowerCase() + + '/' + + ConfigManager.c_reaPath_facilityProperty + + "/" + + facilityType.toLocaleLowerCase() + + '/' + + facilityKey.toLocaleLowerCase() + + "/"; + + + return result; + } + + //获取设备资源完整路径 + static getResPath_facility(facilityPosType: FacilityPosType, type: FacilityType): string { + let result = "facilities/"; + + result += facilityPosType.toString() + "/"; + + result += DataManager.getResName_facility(type).toLocaleLowerCase(); + result += "/"; + return result; + } + + //获取设备的资源名(有些是公用的) + static getResName_facility(type: FacilityType): string { + let result = type.toString(); + switch (type) { + case FacilityType.XKS: + case FacilityType.BF: + case FacilityType.SX: + case FacilityType.FHM: + case FacilityType.FHJL: + case FacilityType.SSLT: + case FacilityType.XFDT: + case FacilityType.PTDT: + case FacilityType.HT: + case FacilityType.WXY: result = "Location"; break; + + } + return result; + } + + //初始化设备信息 + static initDebugData_facility() { + DataManager.allFacilityData = AllFacilityData.CreateAllFacilityData(); + } + + /** + * 初始化态势标绘的素材库 + */ + static initDebugData_mark() { + DataManager.allMarkData = AllMarkData.CreateAllMarkData(); + console.log(DataManager.allMarkData, "态势标会"); + } + + static init(simpleData: InsitutionDataSimple, onSuccess?: (key: string) => void) { + DataManager.institutionData_simple = simpleData; + DataManager.initDebugData(simpleData.key, onSuccess); + } + + /** + * 新建当前单位的标绘信息 + */ + static initAllMarkPlaneData() { + DataManager.allMarkPlanData = new AllMarkPlanData(); + DataManager.allMarkPlanData.institutionID = DataManager.institutionData.normalData.key; + DataManager.allMarkPlanData.datas = []; + return DataManager.allMarkPlanData; + } + + /** + * 初始化当前建筑的 态势标绘信息 + */ + static initMarkData(onSuccess?: (data: AllMarkPlanData) => void) { + ServeManager.instance.getMarkData(DataManager.institutionData.normalData.key, (institutionID: string, data: string) => { + if (data == null) //新建单位的标绘信息 + { + DataManager.initAllMarkPlaneData(); + } + else //读取已有的标绘信息 + { + DataManager.allMarkPlanData = plainToClass(AllMarkPlanData, data); + } + if (onSuccess != null) { + onSuccess(DataManager.allMarkPlanData); + } + }, (institutionID: string, data: any) => { + if (data instanceof HttpErrorResponse && data.status == 404) { + //404,新增单位标绘数据,不算错误 + } + else { + ModeManager.log("获取态势标会失败" + institutionID, data); + } + + }) + } + + + + //#region 创建类方法 + + /** + * 新建建筑 + * @param key + * @param name + * @param buildingType + */ + static createBuilding(key: string, name: string, buildingType: BuildingType): BuildingData { + let result = false; + if (buildingType == null) { + throw new Error('create building buildingType is null'); + } + + if (key == null) { + throw new Error('create building key is null'); + } + + if (name == null || name == "") { + throw new Error('create building name is null'); + } + + + let normalData = new NormalData(key, name); + + let newBuilding: BuildingData_Normal | BuildingData_Environment | BuildingData_ChemicalPlant; + switch (buildingType) { + case BuildingType.Normal: + newBuilding = new BuildingData_Normal(); + + DataManager.institutionData.normalBuildingDatas.push(newBuilding as BuildingData_Normal); + break; + case BuildingType.Environment: + newBuilding = new BuildingData_Environment(); + DataManager.institutionData.environmentDatas.push(newBuilding as BuildingData_Environment); + + break; + case BuildingType.ChemicalPlant: + newBuilding = new BuildingData_ChemicalPlant(); + DataManager.institutionData.chemicalPlantData.push(newBuilding as BuildingData_ChemicalPlant); + break; + } + newBuilding.normalData = normalData; + + return newBuilding; + } + + + /** + * 创建属性 + * @param key + * @param facilityType + */ + static createPropertyData(key: string, facilityType: FacilityType): PropertyData_Base { + let result: PropertyData_Base = null; + switch (facilityType) { + case FacilityType.AQCK: result = new PropertyData_AQCK(key, "", false, "安全出口", ""); break; //安全出口 + case FacilityType.DSXHS: + case FacilityType.DXXHS: + case FacilityType.SZDSXHS: + case FacilityType.SZDXXHS: result = new PropertyData_Base_XHS(key, "", false, "", "", "", facilityType); break; + case FacilityType.DSSBJHQ: + case FacilityType.DXSBJHQ: + case FacilityType.QBSBJHQ: + case FacilityType.DGNSBJHQ: result = new PropertyData_Base_SBJHQ(key, "", "", "", "", facilityType); break; + case FacilityType.GD: result = new PropertyData_GD(key, "-"); break; + case FacilityType.PL: result = new PropertyData_PL(key, 0, "", []); break; + case FacilityType.JTQ: + case FacilityType.JJQ: result = new PropertyData_Q(key, "", "", "", null, facilityType); break; + case FacilityType.TPBZ: + case FacilityType.XKS: + case FacilityType.BF: + case FacilityType.SX: result = new PropertyData_Base_IMG(key, "", "", "", facilityType); break; + case FacilityType.LSXFB: + case FacilityType.WSXFB: + case FacilityType.CYXFB: result = new PropertyData_Base_XFB(key, "", "", "", "", "", "", facilityType); break; + case FacilityType.FHFQ: result = new PropertyData_FHFQ(key, "", ""); break; + case FacilityType.SSLT: result = new PropertyData_SSLT(key, "", "", ""); break; + case FacilityType.XFDT: result = new PropertyData_XFDT(key, "", "", ""); break; + case FacilityType.WXY: result = new PropertyData_Base_IMG(key, "", "", "", facilityType); break; + case FacilityType.ZDQY: result = new PropertyData_ZDQY(key, "", "", "", "", "", []); break; + case FacilityType.DWBZ: result = new PropertyData_DWBZ(key, "", ""); break; + //其他在表格中显示无 + } + + if (result == null) { + result = new PropertyData_public(key, facilityType); + } + + return result; + + } + + + /** + * 新建标绘方案 + * @param name + */ + static createMarkPlane(name: string) { + if (DataManager.allMarkPlanData == null) { + console.error("当前单位没有标绘方案,无法新建"); + return; + } + + let index = 0; + + + + + + } + + + //#endregion + + + //#region 查询类方法 + /** + * 根据类型查询建筑列表 + * @param buildingType 建筑类型 + */ + static getBuildingDataListByType(buildingType: BuildingType): BuildingData_Normal[] | BuildingData_Environment[] | BuildingData_ChemicalPlant[] { + let buildingDatas: BuildingData_Normal[] | BuildingData_Environment[] | BuildingData_ChemicalPlant[]; + + switch (buildingType) { + case BuildingType.Normal: + buildingDatas = DataManager.institutionData.normalBuildingDatas; + break; + case BuildingType.Environment: + buildingDatas = DataManager.institutionData.environmentDatas; + break; + case BuildingType.ChemicalPlant: + buildingDatas = DataManager.institutionData.chemicalPlantData; + break; + } + + return buildingDatas; + + } + //#endregion + + //#region 修改和删除类方法 + + //删除一个当前单位的buildingData + static deleteOneBuildingData(buildingType: BuildingType, key: string) { + let buildingDatas = DataManager.getBuildingDataListByType(buildingType); + + for (let i = 0; i < buildingDatas.length; i++) { + if (buildingDatas[i].normalData.key == key) { + TsTool.arrayRemove(buildingDatas, buildingDatas[i]); + break; + } + } + } + + /** + * 保存当前的标绘信息 + */ + static saveallMarkPlanData() { + console.log("当前标绘", DataManager.allMarkPlanData); + ServeManager.instance.saveMarkData(DataManager.allMarkPlanData); + } + //#endregion + + + //#region 文件修改类 + + /** + * 创建manifest 类文件 + * @param fileName //资源文件名,例如 zhuti.gltf + * @param version //版本号 + */ + static createFile_manifest(fileName: string, version: number): File { + let file; + let data = []; + + let info = { + "version": version, + "enableSceneOffline": true, + "enableTexturesOffline": true + }; + + data.push(JSON.stringify(info)); + + + let properties = { type: 'text/cache-manifest' }; // 设置文件的 mime-type. + try { + // 使用文件构造函数指定文件名,如果 ... + file = new File(data, fileName + ".manifest", properties); + } catch (e) { + // ... 如果不支持Blob构造函数,请退回到Blob构造函数。 + file = new Blob(data, properties); + } + + console.log("创建版本号" + version); + + return file; + } + + /** + * 创建版本文件(版本号+1) + * @param indoorData + */ + static createManifestFile(modelData: ModelData): File { + modelData.version += 1; + let manifestFile = DataManager.createFile_manifest(modelData.resName, modelData.version); + + return manifestFile; + } + + /** + * 读取版本文件中的版本号 + * @param file + */ + static readFile_manifest(file: File, onLoad: (result) => void): number { + let version = 1; + + var reader = new FileReader(); + reader.onload = function (evt) { // 指定异步读写后触发的函数 + ModeManager.log(evt.target.result); + let object = JSON.parse(evt.target.result as string); + onLoad(object.version); + }; + reader.readAsText(file); + + return version; + + } + + //#endregion + +} + +//模型信息变化类型 +export enum ModelChangeType { + Add, + Remove, + Update, +} + + + diff --git a/src/app/babylon/controller/event-manager/event-base.ts b/src/app/babylon/controller/event-manager/event-base.ts new file mode 100644 index 0000000..016b019 --- /dev/null +++ b/src/app/babylon/controller/event-manager/event-base.ts @@ -0,0 +1,12 @@ + +/** + * 事件基础类 + */ +export class Event_Base { + + //属性 自定义 + + + + +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/event-manager.ts b/src/app/babylon/controller/event-manager/event-manager.ts new file mode 100644 index 0000000..793cf30 --- /dev/null +++ b/src/app/babylon/controller/event-manager/event-manager.ts @@ -0,0 +1,138 @@ +import { EventState, Observable, Observer, TransformNode } from "@babylonjs/core"; +import { Event_Base } from "./event-base"; + +/** + * 事件管理器 + */ +export class EventManager { + + //#region 单例 + private static instance: EventManager; + + public static get Instcane() { + if (EventManager.instance == null) { + EventManager.instance = new EventManager(); + } + + return EventManager.instance; + + } + //#endregion + + //#region event 实例管理 + //所有实例化的event + private static s_allEventContainer: any[]; + + //创建event实例 + private static createEvent(c: { new(): T }): EventContainer { + let newEvent = null; + if (newEvent == null) { + newEvent = new EventContainer(c); + EventManager.s_allEventContainer.push(newEvent); + } + + return newEvent; + } + + //获取event实例 + private static getEvent(c: { new(): T }): EventContainer { + + if (EventManager.s_allEventContainer == null) { + EventManager.s_allEventContainer = []; + } + let result = null; + for (let i = 0; i < EventManager.s_allEventContainer.length; i++) { + + if (EventManager.s_allEventContainer[i].key == c.name) { + result = (EventManager.s_allEventContainer[i]); + // console.log("找到已有的event" + (c.name)); + return result; + + } + } + + result = EventManager.createEvent(c); + + // console.log("新建event" + result); + + return result; + } + + //#endregion + + + /** + * 添加监听 + * @param callback 事件派发时的回调 + */ + static addListener(c: { new(): T }, callback: (eventData: T, eventState: EventState) => void, + mask?: number, + insertFirst?: boolean, + scope?: any, + unregisterOnFirstCall?: boolean): Observer { + + let instance = EventManager.getEvent(c); + + + return instance.observable.add(callback, mask, insertFirst, scope, unregisterOnFirstCall); + } + + + + /** + * 移除监听者 + * @param observer 要移除的观察者 + */ + static removeListener(c: { new(): T }, observer: Observer) { + let instance = EventManager.getEvent(c); + if (instance == null) { + return; + } + instance.observable.remove(observer); + } + + /** + * 移除监听者(通过回调) + * @param callback + */ + static removeCallback(c: { new(): T }, callback: (eventData: T, eventState: EventState) => void, + mask?: number, + insertFirst?: boolean, + scope?: any, + unregisterOnFirstCall?: boolean) { + let instance = EventManager.getEvent(c); + if (instance == null) { + return; + } + + instance.observable.removeCallback(callback); + } + + /** + * 派发事件 + * @param eventData 派发的信息 + */ + static dispatch(c: { new(): T }, eventData: T) { + let instance = EventManager.getEvent(c); + if (instance == null) { + return; + } + instance.observable.notifyObservers(eventData); + } + +} + + +/** + * 事件容器 + */ +class EventContainer { + key: string; + observable: Observable; + constructor(c: { new(): T }) { + + this.key = c.name; + // console.log("EventContainer===" + this.key); + this.observable = new Observable(); + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/events/event-change-facility.ts b/src/app/babylon/controller/event-manager/events/event-change-facility.ts new file mode 100644 index 0000000..aca85e7 --- /dev/null +++ b/src/app/babylon/controller/event-manager/events/event-change-facility.ts @@ -0,0 +1,31 @@ + + +import { ModelData } from "src/app/babylon/model/data/model-data/model-data"; +import { BuildingInfo } from "src/app/babylon/model/info/building/building-info"; +import { ModelChangeType } from "../../data-manager"; +import { Event_Base } from "../event-base"; +import { EventManager } from "../event-manager"; + +export class Event_ChangeFacility extends Event_Base { + + modeleData: ModelData; + modelChangeType: ModelChangeType; + belongtoBuilding: BuildingInfo;//属于哪个建筑 + + initInfo(modeleData: ModelData, + modelChangeType: ModelChangeType, + belongtoBuilding: BuildingInfo) { + this.modeleData = modeleData; + this.modelChangeType = modelChangeType; + this.belongtoBuilding = belongtoBuilding; + } + + static dispatch(modeleData: ModelData, + modelChangeType: ModelChangeType, + belongtoBuilding: BuildingInfo) { + let eventInfo = new Event_ChangeFacility(); + eventInfo.initInfo(modeleData, modelChangeType, belongtoBuilding); + + EventManager.dispatch(Event_ChangeFacility, eventInfo); + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/events/event-get-markplandata-success.ts b/src/app/babylon/controller/event-manager/events/event-get-markplandata-success.ts new file mode 100644 index 0000000..bc8dbf5 --- /dev/null +++ b/src/app/babylon/controller/event-manager/events/event-get-markplandata-success.ts @@ -0,0 +1,24 @@ + +import { AllMarkPlanData } from "src/app/babylon/model/data/mark/mark-plan-data"; +import { Event_Base } from "../event-base"; +import { EventManager } from "../event-manager"; + +/** + * 获取单位的标绘方案信息的结果 + */ +export class Event_GetAllMarkPlanData extends Event_Base { + + success: boolean; + data: AllMarkPlanData; + + static dispatch(success: boolean, data: AllMarkPlanData) { + let info = new Event_GetAllMarkPlanData(); + info.success = success; + info.data = data; + + EventManager.dispatch(Event_GetAllMarkPlanData, info); + + } + + +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/events/event-keyboard-input.ts b/src/app/babylon/controller/event-manager/events/event-keyboard-input.ts new file mode 100644 index 0000000..9239fc6 --- /dev/null +++ b/src/app/babylon/controller/event-manager/events/event-keyboard-input.ts @@ -0,0 +1,17 @@ +import { Event_Base } from "../event-base"; +import { EventManager } from "../event-manager"; + +/** + * 键盘输入事件 + */ +export class Event_KeyboardInput extends Event_Base { + + data: KeyboardEvent; + + static dispatch(ev: KeyboardEvent) { + let eventData = new Event_KeyboardInput(); + eventData.data = ev; + EventManager.dispatch(Event_KeyboardInput, eventData); + } + +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/events/event-mark-info-change.ts b/src/app/babylon/controller/event-manager/events/event-mark-info-change.ts new file mode 100644 index 0000000..e826135 --- /dev/null +++ b/src/app/babylon/controller/event-manager/events/event-mark-info-change.ts @@ -0,0 +1,44 @@ + +import { ModelInfo_mark } from "src/app/babylon/model/info/mark/model-info-mark"; +import { Event_Base } from "../event-base"; +import { EventManager } from "../event-manager"; + +/** + * MarkInfo(标绘物运行时数据)发生变化 + */ +export class Event_MarkInfoChange extends Event_Base { + + eventType: MarkInfoChangeType; + + markInfo: ModelInfo_mark; + + static dispatch(eventType: MarkInfoChangeType, markInfo: ModelInfo_mark) { + + let eventInfo = new Event_MarkInfoChange(); + eventInfo.eventType = eventType; + eventInfo.markInfo = markInfo; + + EventManager.dispatch(Event_MarkInfoChange, eventInfo); + } +} + +/** + * 标绘物运行时数据发生变化 + */ +export enum MarkInfoChangeType { + + /** + * 创建 + */ + Create, + + /** + * 选中 + */ + Select, + /** + * 取消选中 + */ + UnSelect, + +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/events/event-modelinfo-change.ts b/src/app/babylon/controller/event-manager/events/event-modelinfo-change.ts new file mode 100644 index 0000000..00f9f28 --- /dev/null +++ b/src/app/babylon/controller/event-manager/events/event-modelinfo-change.ts @@ -0,0 +1,33 @@ + +import { ModelInfo } from "src/app/babylon/model/info/model/model-info"; +import { ModelChangeType } from "../../data-manager"; +import { Event_Base } from "../event-base"; +import { EventManager } from "../event-manager"; + +/** + * modelInfo发生变化 + */ +export class Event_ModelInfoChange extends Event_Base { + + //属性 + modeleInfo: ModelInfo; + modelChangeType: ModelChangeType; + + + setInfo(modelInfo: ModelInfo, modelChangeType: ModelChangeType) { + + this.modeleInfo = modelInfo; + this.modelChangeType = modelChangeType; + } + + /** + * 派发事件 + * @param modeleInfo + * @param modelChangeType + */ + static dispatch(modeleInfo: ModelInfo, modelChangeType: ModelChangeType) { + let eventData = new Event_ModelInfoChange(); + eventData.setInfo(modeleInfo, modelChangeType); + EventManager.dispatch(Event_ModelInfoChange, eventData); + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/info-manager.ts b/src/app/babylon/controller/info-manager.ts new file mode 100644 index 0000000..4b00c76 --- /dev/null +++ b/src/app/babylon/controller/info-manager.ts @@ -0,0 +1,228 @@ + +import { AbstractMesh } from "@babylonjs/core"; +import { MarkData } from "../model/data/mark/mark-data"; +import { ModelData } from "../model/data/model-data/model-data"; +import { FacilityType, ModelData_facility } from "../model/data/model-data/model-data-facility"; +import { ModelEditData } from "../model/data/model-data/model-edit-data"; +import { TransformData } from "../model/data/transform-data"; +import { BuildingInfo } from "../model/info/building/building-info"; +import { ModelInfo_mark } from "../model/info/mark/model-info-mark"; +import { ModelInfo } from "../model/info/model/model-info"; +import { ModelInfo_building } from "../model/info/model/model-info-building"; +import { FacilityInfoByType, ModelInfo_facility } from "../model/info/model/model-info-facility"; +import { GizmoTool } from "../tool/gizmo-tool"; +import { TsTool } from "../tool/ts-tool"; +import { FacilityWindow } from "../view/facility-window/facility-window"; +import { FacilityInfoInSceneWindow } from "../view/facilityinfoinscene-window/facilityinfoinscene-window"; +import { ModelChangeType } from "./data-manager"; +import { Event_ModelInfoChange } from "./event-manager/events/event-modelinfo-change"; +import { ModeManager, ModeType } from "./mode-manager"; +import { SceneManager } from "./scene-manager"; + +//运行时数据管理器 +export class InfoManager { + static s_currentTransformData: TransformData; //当前模型的transform信息 + static s_currentMesh: AbstractMesh; //当前选中的mesh + + // static s_allBuildingInfos: ModelInfo_building[] = []; //所有实例化的建筑(室外) + + // static s_allFactivityInfos_outdoor: FacilityInfoByType[] = []; //所有实例化的设备(室外) + + // static s_allFactivityInfos_indoor: FacilityInfoByType[] = []; //所有实例化的设备(室内) + + // static s_onModelInfoChangeObservable: Observable; //模型信息变化事件 + + // static s_onModelEnableChangeObservable: Observable; //模型状态变化事件 + + static init() { + SceneManager.Instance.scene.onBeforeRenderObservable.add(InfoManager.onBeforeRender); + GizmoTool.onPickMeshInfoObservable.add(InfoManager.onPickMesh); + } + + static onBeforeRender() { + if (InfoManager.s_currentTransformData != null) { + InfoManager.s_currentTransformData.position = + InfoManager.s_currentMesh.position; + InfoManager.s_currentTransformData.rotation = + InfoManager.s_currentMesh.rotation; + InfoManager.s_currentTransformData.rotationQuaternion = + InfoManager.s_currentMesh.rotationQuaternion; + InfoManager.s_currentTransformData.scaling = + InfoManager.s_currentMesh.scaling; + InfoManager.s_currentMesh.absoluteScaling; + } + } + static onPickMesh(modelInfo: ModelInfo) { + if (modelInfo != null) { + InfoManager.s_currentMesh = modelInfo.modelBox; + InfoManager.s_currentTransformData = modelInfo.modelData.transformData; + } + } + + + + //加入管理 + static addModelInfo(modelInfo: ModelInfo) { + Event_ModelInfoChange.dispatch(modelInfo, ModelChangeType.Add); + } + + /** + * 创建一个建筑模型info + * @param key + * @param modelData + * @param models + * @param modelBox + */ + static newModelInfo_building(key: string, + modelData: ModelData, + models: AbstractMesh[], + modelBox: AbstractMesh): ModelInfo_building { + let result = new ModelInfo_building(key, + modelData, + models, + modelBox); + InfoManager.addModelInfo(result); + + return result; + } + + /** + * 新建设备 info + * @param key + * @param modelData + * @param models + * @param modelBox + */ + static newModelInfo_facility(key: string, + modelData: ModelData, + models: AbstractMesh[], + modelBox: AbstractMesh, + belongToBuilding: BuildingInfo, + isNew: boolean): ModelInfo_facility { + let result = new ModelInfo_facility(key, + modelData, + models, + modelBox, + belongToBuilding, + isNew + ); + if (belongToBuilding != null) //表示游离态的设备 + { + InfoManager.addFacilityInfoToTypeList(result, belongToBuilding.ModelInfo.facilityInfos); + } + InfoManager.addModelInfo(result); + + + return result; + } + + + /** + * 新建标绘物 info + * @param key + * @param modelData + * @param models + * @param modelBox + */ + static newModelInfo_mark( + markData: MarkData, + models: AbstractMesh[], + modelBox: AbstractMesh, + belongToBuilding: BuildingInfo, + isNew: boolean): ModelInfo_mark { + let result = new ModelInfo_mark( + markData, + models, + modelBox, + belongToBuilding, + isNew + ); + // if (belongToBuilding != null) //表示游离态的设备 + // { + // InfoManager.addFacilityInfoToTypeList(result, belongToBuilding.ModelInfo.facilityInfos); + // } + if (isNew) { + InfoManager.addModelInfo(result); + } + + return result; + } + + + + //移除model info + static removeModelInfo(modelInfo: ModelInfo) { + + Event_ModelInfoChange.dispatch(modelInfo, ModelChangeType.Remove); + + } + + //创建建筑中的设备 + static createFacilityInfos( + modelEditData: ModelEditData, + buildingInfo: BuildingInfo = null + ) { + + let facilities = modelEditData.facilities; + + for (let i = 0; i < facilities.length; i++) { + + for (let j = 0; j < facilities[i].facilities.length; j++) { + FacilityWindow.instance.createFacility( + modelEditData.facilities[i].facilities[j], + false, + buildingInfo, + true, + false, + (modelInfo: ModelInfo_facility) => { + if (ModeManager.currentMode == ModeType.Look) { + modelInfo.setIconEnable(false);//查看模式下隐藏所有设备ui + } + } + ); + } + } + + } + + //将某设备info,加入到相应的列表中 + static addFacilityInfoToTypeList(facilityInfo: ModelInfo_facility, facilityInfosByType: FacilityInfoByType[]) { + let facilityType = (facilityInfo.modelData as ModelData_facility).facilityType; + let facilityInfoByType = InfoManager.getFacilityInfoByType(facilityType, facilityInfosByType); + + if (facilityInfoByType == null) { + facilityInfoByType = new FacilityInfoByType(facilityType); + facilityInfosByType.push(facilityInfoByType); + } + + + facilityInfoByType.facilityInfo.push(facilityInfo); + } + + //将某设备info,从相应的列表中移除 + static removeFacilityInfoToTypeList(facilityInfo: ModelInfo_facility, facilityInfosByType: FacilityInfoByType[]) { + let facilityType = (facilityInfo.modelData as ModelData_facility).facilityType; + let facilityInfoByType = InfoManager.getFacilityInfoByType(facilityType, facilityInfosByType); + + TsTool.arrayRemove(facilityInfoByType.facilityInfo, facilityInfo); + } + + //根据类型获取 + static getFacilityInfoByType(facilityType: FacilityType, facilityInfosByType: FacilityInfoByType[]) { + let result: FacilityInfoByType = null; + + for (let i = 0; i < facilityInfosByType.length; i++) { + if (facilityInfosByType[i].type == facilityType) { + result = facilityInfosByType[i]; + break; + } + } + + return result; + } + +} + + + + diff --git a/src/app/babylon/controller/inputController.ts b/src/app/babylon/controller/inputController.ts new file mode 100644 index 0000000..8f914ad --- /dev/null +++ b/src/app/babylon/controller/inputController.ts @@ -0,0 +1,1436 @@ +import { Angle, AnimationGroup, Axis, Mesh, MeshBuilder, Quaternion, Scene, SceneLoader, Space, TransformNode, Vector3 } from "@babylonjs/core"; +import { Event_MarkInfoChange, MarkInfoChangeType } from "./event-manager/events/event-mark-info-change"; +import { EventManager } from "./event-manager/event-manager"; +import { ChildNodeData, MarkData, MarkType } from "../model/data/mark/mark-data"; +import { ModelInfo_mark } from "../model/info/mark/model-info-mark"; +export enum ArmActionState { + Bi, + Bi1, + Bi2, + Bi3, + Bi4, + Bi5, + Bi6, + Pentou, +} +export enum LTState { + None, + LU, + LU1, + LU2 +} + +export class InputController { + private targetPoint: Vector3 = null; + + public rotateSpeed: number = 1; // 旋转速度 + public moveBiSpeed: number = 5;// 展臂速度 + public animation: AnimationGroup; + // 选中的对象 + public selectedObject: Mesh = null; // Y轴旋转 + // 选中的类型 + private markType: MarkType = null; + public Bi: Mesh = null; // Y轴旋转 + public Bi1: Mesh = null;// X轴旋转 + public Bi2: Mesh = null;// 伸臂 + public Bi3: Mesh = null;// 伸臂 + public Bi4: Mesh = null;// 伸臂 + public Bi5: Mesh = null;// 伸臂 + public Bi6: Mesh = null;// X轴旋转 + public PingTai: Mesh = null;// 保持水平 + public PT: Mesh = null;// X轴旋转 + public BaShou: Mesh = null;// X轴旋转 + public Arm: Mesh = null; + public Light: Mesh = null; + public Bi1Postion: Vector3 = null; + public Bi1MaxAngle: number = -84; + public Bi1MinAngle: number = -6; + public LadderUp: TransformNode = null; + public LadderUp1: TransformNode = null; + public LadderUp2: TransformNode = null; + // 最大臂长 + public maxArmlength = 15; + // 最小臂长 + public minArmlength = 0; + public L6Length = 3; + public L15Length = 5; + // Bi2 + public Bi2Length = 0; + // Bi3 + public Bi3Length = 0; + // Bi4 + public Bi4Length = 0; + // Bi5 + public Bi5Length = 0; + + deltaTime: number = 0.005; + private scene: Scene; + // 自动举臂状态 + private armActionState: ArmActionState = ArmActionState.Bi; + private LTActionState: LTState = LTState.None; + // data + dataBi: ChildNodeData = null; + dataBi1: ChildNodeData = null; + dataBi2: ChildNodeData = null; + dataBi3: ChildNodeData = null; + dataBi4: ChildNodeData = null; + dataBi5: ChildNodeData = null; + dataBi6: ChildNodeData = null; + dataPingTai: ChildNodeData = null; + dataBaShou: ChildNodeData = null; + dataPT: ChildNodeData = null; + dataLadderUp: ChildNodeData = null; + dataLadderUp1: ChildNodeData = null; + dataLadderUp2: ChildNodeData = null; + dataArm: ChildNodeData = null; + dataLight: ChildNodeData = null; + markData: MarkData = null; + markInfo: ModelInfo_mark = null; + waterPowerSpeed: number = 50; + /** + * + */ + constructor(scene: Scene) { + this.scene = scene; + + //添加监听事件 + EventManager.addListener(Event_MarkInfoChange, (eventData, eventState) => { + this.markInfo = eventData.markInfo; + this.markData = eventData.markInfo.markData; + this.markType = eventData.markInfo.markData.type; + switch (eventData.eventType) { + case MarkInfoChangeType.Create: + // 数据 + this.dataBi = eventData.markInfo.getChildrenDataByName("Bi"); + this.dataBi1 = eventData.markInfo.getChildrenDataByName("Bi1"); + this.dataBi2 = eventData.markInfo.getChildrenDataByName("Bi2"); + this.dataBi3 = eventData.markInfo.getChildrenDataByName("Bi3"); + this.dataBi4 = eventData.markInfo.getChildrenDataByName("Bi4"); + this.dataBi5 = eventData.markInfo.getChildrenDataByName("Bi5"); + this.dataBi6 = eventData.markInfo.getChildrenDataByName("Bi6"); + this.dataPingTai = eventData.markInfo.getChildrenDataByName("PingTai"); + this.dataBaShou = eventData.markInfo.getChildrenDataByName("BaShou"); + this.dataPT = eventData.markInfo.getChildrenDataByName("PT"); + this.dataLadderUp = eventData.markInfo.getChildrenDataByName("LadderUp"); + this.dataLadderUp1 = eventData.markInfo.getChildrenDataByName("LadderUp1"); + this.dataLadderUp2 = eventData.markInfo.getChildrenDataByName("LadderUp2"); + this.dataArm = eventData.markInfo.getChildrenDataByName("Arm"); + this.dataLight = eventData.markInfo.getChildrenDataByName("Light"); + + let playAnimation = true; + + if (this.dataBi) { + this.Bi = eventData.markInfo.getChildrenByName("Bi") as Mesh; + this.Bi.rotationQuaternion = this.dataBi.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataBi1) { + this.Bi1 = eventData.markInfo.getChildrenByName("Bi1") as Mesh; + this.Bi1.rotationQuaternion = this.dataBi1.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataBi2) { + this.Bi2 = eventData.markInfo.getChildrenByName("Bi2") as Mesh; + this.Bi2.position = this.dataBi2.transformData.position; + playAnimation = false; + } + if (this.dataBi3) { + this.Bi3 = eventData.markInfo.getChildrenByName("Bi3") as Mesh; + this.Bi3.position = this.dataBi3.transformData.position; + playAnimation = false; + } + if (this.dataBi4) { + this.Bi4 = eventData.markInfo.getChildrenByName("Bi4") as Mesh; + this.Bi4.position = this.dataBi4.transformData.position; + playAnimation = false; + } + if (this.dataBi5) { + this.Bi5 = eventData.markInfo.getChildrenByName("Bi5") as Mesh; + if (this.markType == MarkType.DGPTC) { + this.Bi5.rotationQuaternion = this.dataBi5.transformData.rotationQuaternion; + } else { + this.Bi5.position = this.dataBi5.transformData.position; + } + playAnimation = false; + } + if (this.dataBi6) { + this.Bi6 = eventData.markInfo.getChildrenByName("Bi6") as Mesh; + this.Bi6.rotationQuaternion = this.dataBi6.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataPingTai) { + if (this.markType == MarkType.YTC) { + this.PingTai = eventData.markInfo.getChildrenByName("pingtai") as Mesh; + } else { + this.PingTai = eventData.markInfo.getChildrenByName("PingTai") as Mesh; + } + this.PingTai.rotationQuaternion = this.dataPingTai.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataBaShou) { + this.BaShou = eventData.markInfo.getChildrenByName("BaShou") as Mesh; + this.BaShou.rotationQuaternion = this.dataBaShou.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataPT) { + this.PT = eventData.markInfo.getChildrenByName("PT") as Mesh; + this.PT.rotationQuaternion = this.dataPT.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataLadderUp) { + this.LadderUp = eventData.markInfo.getChildrenByName("LadderUp_primitive0").parent as TransformNode; + this.LadderUp.position = this.dataLadderUp.transformData.position; + playAnimation = false; + } + if (this.dataLadderUp1) { + this.LadderUp1 = eventData.markInfo.getChildrenByName("LadderUp1_primitive0").parent as TransformNode; + this.LadderUp1.position = this.dataLadderUp1.transformData.position; + playAnimation = false; + } + if (this.dataLadderUp2) { + this.LadderUp2 = eventData.markInfo.getChildrenByName("LadderUp2_primitive0").parent as TransformNode; + this.LadderUp2.position = this.dataLadderUp2.transformData.position; + playAnimation = false; + } + if (this.dataArm) { + this.Arm = eventData.markInfo.getChildrenByName("Arm") as Mesh; + this.Arm.rotationQuaternion = this.dataArm.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataLight) { + this.Light = eventData.markInfo.getChildrenByName("Light") as Mesh; + this.Light.rotationQuaternion = this.dataLight.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.CanPlayAnimation() && playAnimation) {// 创建高喷车、登高平台车、云梯车播放默认动画 + this.animation = eventData.markInfo.animationGroups[0]; + this.animation.start(); + } + break; + case MarkInfoChangeType.Select: + // 数据 + this.dataBi = eventData.markInfo.getChildrenDataByName("Bi"); + this.dataBi1 = eventData.markInfo.getChildrenDataByName("Bi1"); + this.dataBi2 = eventData.markInfo.getChildrenDataByName("Bi2"); + this.dataBi3 = eventData.markInfo.getChildrenDataByName("Bi3"); + this.dataBi4 = eventData.markInfo.getChildrenDataByName("Bi4"); + this.dataBi5 = eventData.markInfo.getChildrenDataByName("Bi5"); + this.dataBi6 = eventData.markInfo.getChildrenDataByName("Bi6"); + this.dataPingTai = eventData.markInfo.getChildrenDataByName("PingTai"); + this.dataBaShou = eventData.markInfo.getChildrenDataByName("BaShou"); + this.dataPT = eventData.markInfo.getChildrenDataByName("PT"); + this.dataArm = eventData.markInfo.getChildrenDataByName("PT"); + this.dataLight = eventData.markInfo.getChildrenDataByName("Light"); + // 如果可以忽略返回,否则设置 + this.selectedObject = eventData.markInfo.modelBox as Mesh; + this.Bi = eventData.markInfo.getChildrenByName("Bi") as Mesh; + this.Bi1 = eventData.markInfo.getChildrenByName("Bi1") as Mesh; + this.Bi2 = eventData.markInfo.getChildrenByName("Bi2") as Mesh; + this.Bi2Length = this.Bi2?.position.z; + this.Bi3 = eventData.markInfo.getChildrenByName("Bi3") as Mesh; + this.Bi3Length = this.Bi3?.position.z; + this.Bi4 = eventData.markInfo.getChildrenByName("Bi4") as Mesh; + this.Bi4Length = this.Bi4?.position.z; + this.Bi5 = eventData.markInfo.getChildrenByName("Bi5") as Mesh; + this.Bi5Length = this.Bi5?.position.z; + this.Bi6 = eventData.markInfo.getChildrenByName("Bi6") as Mesh; + this.PingTai = eventData.markInfo.getChildrenByName("PingTai") as Mesh; + this.PT = eventData.markInfo.getChildrenByName("PT") as Mesh; + this.BaShou = eventData.markInfo.getChildrenByName("BaShou") as Mesh; + this.Arm = eventData.markInfo.getChildrenByName("Arm") as Mesh; + this.Light = eventData.markInfo.getChildrenByName("Light") as Mesh; + + + if (this.markType === MarkType.LT6) { + this.LTActionState = LTState.LU; + this.LadderUp = (eventData.markInfo.getChildrenByName("LadderUp_primitive0")).parent as TransformNode;; + console.log(this.LadderUp); + } + if (this.markType == MarkType.LT15) { + this.LTActionState = LTState.LU1; + this.LadderUp1 = (eventData.markInfo.getChildrenByName("LadderUp1_primitive0")).parent as TransformNode; + this.LadderUp2 = (eventData.markInfo.getChildrenByName("LadderUp2_primitive0")).parent as TransformNode;; + console.log(this.LadderUp1, this.LadderUp2); + } + if (this.markType == MarkType.YTC) { + this.PingTai = eventData.markInfo.getChildrenByName("pingtai") as Mesh; + } + break; + case MarkInfoChangeType.UnSelect: + this.markInfo = null; + this.markData = null; + this.markType = null; + this.animation = null; + this.selectedObject = null; + this.Bi = null; + this.Bi1 = null; + this.Bi2 = null; + this.Bi3 = null; + this.Bi4 = null; + this.Bi5 = null; + this.Bi6 = null; + this.Arm = null; + this.Light = null; + this.LadderUp = null; + this.LadderUp1 = null; + this.LadderUp2 = null; + this.PT = null; + this.PingTai = null; + this.BaShou = null; + break; + } + }) + + this.scene.registerBeforeRender(() => { + this.update(); + }) + + } + // 可以旋转 + public CanRotateSelf(): boolean { + return this.markType != MarkType.H + && this.markType != MarkType.TPH + && this.markType != MarkType.SNH + && this.markType != MarkType.YWA + && this.markType != MarkType.YWB + && this.markType != MarkType.YWC + && this.markType != MarkType.JJX + && this.markType != MarkType.SD + && this.markType != MarkType.JGLX + && this.markType != MarkType.CT + && this.markType != MarkType.JJQ + && this.markType != MarkType.QYSDA + && this.markType != MarkType.QYSDB; + } + // 可以播放动画 + public CanPlayAnimation(): boolean { + return this.markType === MarkType.GPC + || this.markType === MarkType.DGPTC + || this.markType === MarkType.YTC + } + // 是消防员 + public IsFiremen(): boolean { + return this.markType == MarkType.MHF + || this.markType == MarkType.JYF + || this.markType == MarkType.GRF + || this.markType == MarkType.FHF + || this.markType == MarkType.BHF + || this.markType == MarkType.YWXFY; + } + // 是消防车 + public IsFireTruck(): boolean { + return this.markType == MarkType.SGC + || this.markType == MarkType.PMC + || this.markType == MarkType.GCGSC; + } + // + // todo 按选择的类型处理,也方便后续拆分 + // if(高喷车) + // 按键处理 + // if(喷水车) + // 按键处理 + + // 更新 + update() { + if (this.selectedObject) { + this.RotateSelfControl(); + this.HighSprayCarControl(); + this.LadderCarControl(); + this.FiremenControl(); + this.FireTruckControl(); + this.AscendingPlatformCarControl(); + this.WaterCannonControl(); + this.LadderControl(); + this.LightTruckControl(); + } + } + // 控制自身旋转 + public RotateSelfControl() { + if (this.CanRotateSelf()) { + if (Keyboard.Instance.ArrowLeft) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.ArrowRight) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.selectedObject); + } + } + } + // 控制消防员 + public FiremenControl() { + if (this.IsFiremen()) { + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 控制喷水车 + public FireTruckControl() { + if (this.IsFireTruck()) { + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.h) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.k) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 控制喷水车 + public LightTruckControl() { + if (this.markType == MarkType.ZMC) { + if (Keyboard.Instance.a) { + this.rotateSpeed = 1; + this.RotateAroundAxisZ(this.Light); + if (this.dataLight == null) { + this.dataLight = new ChildNodeData(); + this.dataLight.name = "Light"; + this.markData.childrenNodeData.push(this.dataLight); + } + this.dataLight.transformData.rotationQuaternion = this.Light.rotationQuaternion; + } + if (Keyboard.Instance.d) { + this.rotateSpeed = -1; + this.RotateAroundAxisZ(this.Light); + if (this.dataLight == null) { + this.dataLight = new ChildNodeData(); + this.dataLight.name = "Light"; + this.markData.childrenNodeData.push(this.dataLight); + } + this.dataLight.transformData.rotationQuaternion = this.Light.rotationQuaternion; + } + if (Keyboard.Instance.w) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Arm); + if (this.dataArm == null) { + this.dataArm = new ChildNodeData(); + this.dataArm.name = "Arm"; + this.markData.childrenNodeData.push(this.dataArm); + } + this.dataArm.transformData.rotationQuaternion = this.Arm.rotationQuaternion; + } + if (Keyboard.Instance.s) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Arm); + if (this.dataArm == null) { + this.dataArm = new ChildNodeData(); + this.dataArm.name = "Arm"; + this.markData.childrenNodeData.push(this.dataArm); + } + this.dataArm.transformData.rotationQuaternion = this.Arm.rotationQuaternion; + } + } + } + // 控制高喷车 + public HighSprayCarControl() { + if (this.markType == MarkType.GPC) { + if (Keyboard.Instance.ArrowLeft) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.ArrowRight) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.a) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.d) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.w) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.s) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.h) { + // this.rotateSpeed = -1; + // this.RotateAroundAxisY(this.PT); + } + if (Keyboard.Instance.k) { + // this.rotateSpeed = 1; + // this.RotateAroundAxisY(this.PT); + } + if (Keyboard.Instance.W) { + this.moveBiSpeed = 5; + this.TranlateBiGPC(); + } + if (Keyboard.Instance.S) { + this.moveBiSpeed = -5; + this.TranlateBiGPC(); + } + if (Keyboard.Instance.U) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Bi6); + if (this.dataBi6 == null) { + this.dataBi6 = new ChildNodeData(); + this.dataBi6.name = "Bi6"; + this.markData.childrenNodeData.push(this.dataBi6); + } + this.dataBi6.transformData.rotationQuaternion = this.Bi6.rotationQuaternion; + } + if (Keyboard.Instance.J) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Bi6); + if (this.dataBi6 == null) { + this.dataBi6 = new ChildNodeData(); + this.dataBi6.name = "Bi6"; + this.markData.childrenNodeData.push(this.dataBi6); + } + this.dataBi6.transformData.rotationQuaternion = this.Bi6.rotationQuaternion; + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 控制云梯车 + public LadderCarControl() { + if (this.markType == MarkType.YTC) { + var theta = Vector3.Dot(this.PingTai.forward, Vector3.Up()); + this.PingTai.rotate(Axis.X, theta, Space.WORLD); + if (Keyboard.Instance.ArrowLeft) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.ArrowRight) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.a) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.d) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.w) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.s) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.h) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.k) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.W) { + this.moveBiSpeed = 5; + this.TranlateBiGPC(); + } + if (Keyboard.Instance.S) { + this.moveBiSpeed = -5; + this.TranlateBiGPC(); + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 控制登高平台车 + public AscendingPlatformCarControl() { + if (this.markType == MarkType.DGPTC) { + var theta = Vector3.Dot(this.PingTai.forward, Vector3.Up()); + this.PingTai.rotate(Axis.X, theta, Space.WORLD); + if (Keyboard.Instance.ArrowLeft) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.ArrowRight) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.a) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.d) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.w) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.s) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.h) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.k) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.W) { + this.moveBiSpeed = 5; + this.TranlateBiDGPTC(); + } + if (Keyboard.Instance.S) { + this.moveBiSpeed = -5; + this.TranlateBiDGPTC(); + } + if (Keyboard.Instance.U) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Bi5); + if (this.dataBi5 == null) { + this.dataBi5 = new ChildNodeData(); + this.dataBi5.name = "Bi5"; + this.markData.childrenNodeData.push(this.dataBi5); + } + this.dataBi5.transformData.rotationQuaternion = this.Bi5.rotationQuaternion; + } + if (Keyboard.Instance.J) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Bi5); + if (this.dataBi5 == null) { + this.dataBi5 = new ChildNodeData(); + this.dataBi5.name = "Bi5"; + this.markData.childrenNodeData.push(this.dataBi5); + } + this.dataBi5.transformData.rotationQuaternion = this.Bi5.rotationQuaternion; + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 水炮控制 + public WaterCannonControl() { + if (this.markType == MarkType.SP) { + if (Keyboard.Instance.h) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.k) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 梯子 + public LadderControl() { + if (this.markType == MarkType.LT6) { + if (Keyboard.Instance.W) { + this.moveBiSpeed = 5; + this.TranslateLadder6M(); + } + if (Keyboard.Instance.S) { + this.moveBiSpeed = -5; + this.TranslateLadder6M(); + } + } else if (this.markType == MarkType.LT15) { + if (Keyboard.Instance.W) { + this.moveBiSpeed = 5; + this.TranslateLadder15M(); + } + if (Keyboard.Instance.S) { + this.moveBiSpeed = -5; + this.TranslateLadder15M(); + } + } + } + // 围绕Y轴旋转 + public RotateAroundAxisY(mesh: Mesh) { + mesh?.rotate(Axis.Y, this.scene.deltaTime * 0.001 * this.rotateSpeed, Space.LOCAL); + } + // 围绕X轴旋转 + public RotateAroundAxisX(mesh: Mesh) { + mesh?.rotate(Axis.X, this.scene.deltaTime * 0.001 * this.rotateSpeed, Space.LOCAL); + } + // 围绕Z轴旋转 + public RotateAroundAxisZ(mesh: Mesh) { + mesh?.rotate(Axis.Z, this.scene.deltaTime * 0.001 * this.rotateSpeed, Space.LOCAL); + } + // 高喷车展臂 + public TranlateBiGPC() { + + switch (this.armActionState) { + case ArmActionState.Bi3: + this.TranlateBi(this.Bi3, ArmActionState.Bi4); + if (this.dataBi3 == null) { + this.dataBi3 = new ChildNodeData(); + this.dataBi3.name = "Bi3"; + this.markData.childrenNodeData.push(this.dataBi3); + } + this.dataBi3.transformData.position = this.Bi3.position; + break; + case ArmActionState.Bi4: + this.TranlateBi(this.Bi4, ArmActionState.Bi5); + if (this.dataBi4 == null) { + this.dataBi4 = new ChildNodeData(); + this.dataBi4.name = "Bi4"; + this.markData.childrenNodeData.push(this.dataBi4); + } + this.dataBi4.transformData.position = this.Bi4.position; + break; + case ArmActionState.Bi5: + this.TranlateBi(this.Bi5, ArmActionState.Bi1); + if (this.dataBi5 == null) { + this.dataBi5 = new ChildNodeData(); + this.dataBi5.name = "Bi5"; + this.markData.childrenNodeData.push(this.dataBi5); + } + this.dataBi5.transformData.position = this.Bi5.position; + break; + default: + this.TranlateBi(this.Bi2, ArmActionState.Bi3); + if (this.dataBi2 == null) { + this.dataBi2 = new ChildNodeData(); + this.dataBi2.name = "Bi2"; + this.markData.childrenNodeData.push(this.dataBi2); + } + this.dataBi2.transformData.position = this.Bi2.position; + break; + } + } + // 高喷车展臂 + public TranlateBiYTC() { + + switch (this.armActionState) { + case ArmActionState.Bi3: + this.TranlateBi(this.Bi3, ArmActionState.Bi4); + if (this.dataBi3 == null) { + this.dataBi3 = new ChildNodeData(); + this.dataBi3.name = "Bi3"; + this.markData.childrenNodeData.push(this.dataBi3); + } + this.dataBi3.transformData.position = this.Bi3.position; + break; + case ArmActionState.Bi4: + this.TranlateBi(this.Bi4, ArmActionState.Bi5); + if (this.dataBi4 == null) { + this.dataBi4 = new ChildNodeData(); + this.dataBi4.name = "Bi4"; + this.markData.childrenNodeData.push(this.dataBi4); + } + this.dataBi4.transformData.position = this.Bi4.position; + break; + case ArmActionState.Bi5: + this.TranlateBi(this.Bi5, ArmActionState.Bi6); + if (this.dataBi5 == null) { + this.dataBi5 = new ChildNodeData(); + this.dataBi5.name = "Bi5"; + this.markData.childrenNodeData.push(this.dataBi5); + } + this.dataBi5.transformData.position = this.Bi5.position; + break; + case ArmActionState.Bi6: + this.TranlateBi(this.Bi6, ArmActionState.Bi1); + if (this.dataBi6 == null) { + this.dataBi6 = new ChildNodeData(); + this.dataBi6.name = "Bi6"; + this.markData.childrenNodeData.push(this.dataBi6); + } + this.dataBi6.transformData.position = this.Bi6.position; + break; + default: + this.TranlateBi(this.Bi2, ArmActionState.Bi3); + if (this.dataBi2 == null) { + this.dataBi2 = new ChildNodeData(); + this.dataBi2.name = "Bi2"; + this.markData.childrenNodeData.push(this.dataBi2); + } + this.dataBi2.transformData.position = this.Bi2.position; + break; + } + } + // 登高平台车展臂 + public TranlateBiDGPTC() { + + switch (this.armActionState) { + case ArmActionState.Bi3: + this.TranlateBi(this.Bi3, ArmActionState.Bi4); + break; + default: + this.TranlateBi(this.Bi2, ArmActionState.Bi3); + break; + } + } + // 移动6米梯子 + public TranslateLadder6M() { + switch (this.LTActionState) { + default: + this.TranlateLadder(this.LadderUp, 3, 0, LTState.None); + if (this.dataLadderUp == null) { + this.dataLadderUp = new ChildNodeData(); + this.dataLadderUp.name = "LadderUp"; + this.markData.childrenNodeData.push(this.dataLadderUp); + } + this.dataLadderUp.transformData.position = this.LadderUp.position; + break; + } + } + // 移动15米梯子 + public TranslateLadder15M() { + switch (this.LTActionState) { + default: + this.TranlateLadder(this.LadderUp1, 5, 0, LTState.LU2); + if (this.dataLadderUp1 == null) { + this.dataLadderUp1 = new ChildNodeData(); + this.dataLadderUp1.name = "LadderUp1"; + this.markData.childrenNodeData.push(this.dataLadderUp1); + } + this.dataLadderUp1.transformData.position = this.LadderUp1.position; + break; + case LTState.LU2: + this.TranlateLadder(this.LadderUp2, 5, 0, LTState.None); + if (this.dataLadderUp2 == null) { + this.dataLadderUp2 = new ChildNodeData(); + this.dataLadderUp2.name = "LadderUp2"; + this.markData.childrenNodeData.push(this.dataLadderUp2); + } + this.dataLadderUp2.transformData.position = this.LadderUp2.position; + break; + } + } + // 消防车展臂 + public TranlateBi(tranlateMesh: Mesh, nextState: ArmActionState) { + tranlateMesh?.translate(Axis.Z, this.scene.deltaTime * 0.001 * this.moveBiSpeed, Space.LOCAL); + if (tranlateMesh?.position.z > this.maxArmlength) { + tranlateMesh.position.z = this.maxArmlength; + this.armActionState = nextState; + } else if (tranlateMesh?.position.z < this.minArmlength) { + tranlateMesh.position.z = this.minArmlength; + this.armActionState = nextState; + } + } + + // 移动梯子 + public TranlateLadder(tranlateMesh: TransformNode, maxLength: number, minLength: number, nextState: LTState) { + tranlateMesh?.translate(Axis.Y, this.scene.deltaTime * 0.001 * this.moveBiSpeed, Space.LOCAL); + if (tranlateMesh?.position.y > maxLength) { + tranlateMesh.position.y = maxLength; + this.LTActionState = nextState; + } else if (tranlateMesh?.position.y < minLength) { + tranlateMesh.position.y = minLength; + this.LTActionState = nextState; + } + } + + + // 旋转消防车 + // public RotateRoot(angle: number) { + // if (this.selectedObject) { + // this.selectedObject.rotate(Axis.Y, angle, Space.LOCAL); + // } + // } + // 旋转消防车举臂底盘 + // public RotateBi(angle: number) { + // if (this.Bi) { + // this.Bi.rotate(Axis.Y, angle, Space.LOCAL); + // } + // } + // 旋转消防车举臂角度 + // public RotateAroundAxisX(angle: number) { + // if (this.Bi1) { + // this.Bi1.rotate(Axis.X, angle, Space.LOCAL); + // } + // } + // 高喷车喷头前一节举臂 + // public RotateBi6(angle: number) { + // if (this.Bi6) { + // this.Bi6.rotate(Axis.X, angle, Space.LOCAL); + // } + // } + // 自动旋转Bi + // public AutoRotateBi() { + // // this.center.position.set(10, 0, 10); + + // // const lookPosBox = this.targetPoint.subtract(this.box.absolutePosition).normalize(); + // // lookPosBox.y = 0; + // // const q0 = Quaternion.FromLookDirectionLH(lookPosBox, Vector3.Up()); + // // if (!this.box.absoluteRotationQuaternion.equalsWithEpsilon(q0, 0.01)) { + // // this.box.rotate(Axis.Y, 0.005, Space.LOCAL) + // // } + + // // const lookPos = this.targetPoint.subtract(this.Bi.absolutePosition).normalize(); + // // lookPos.y = 0; + // // const q1 = Quaternion.FromLookDirectionLH(lookPos, Vector3.Up()); + + + // // if (!this.Bi.absoluteRotationQuaternion.equalsWithEpsilon(q1, 0.01)) { + // // this.Bi.rotate(Axis.Y, 0.005, Space.LOCAL) + // // } + + // // const absoluteRotationQuaternion = Quaternion.FromLookDirectionLH(lookPos, Vector3.Up()); + // // const absoluteRotationQuaternionOffset = absoluteRotationQuaternion.subtract(this.root.absoluteRotationQuaternion); + // // this.Bi.addRotation(0, absoluteRotationQuaternionOffset.toEulerAngles().y, 0); + // // this.armActionState = ArmActionState.Bi2; + // // this.Bi.rotationQuaternion = Quaternion.Slerp(this.Bi.rotationQuaternion, absoluteRotationQuaternionOffset.normalize(), this.deltaTime * 10);// TODO需要设置世界旋转 + // // if (this.Bi.rotationQuaternion.equalsWithEpsilon(rotation, 0.1)) { + // // this.Bi.rotationQuaternion = rotation; + // // // this.armActionState = ArmActionState.Bi2; + // // console.log("旋转地盘结束"); + // // const line = MeshBuilder.CreateLines('line', { points: [this.targetPoint, this.Bi.absolutePosition] }); + // // line.color = Color3.Red(); + // // } + // // const v1 = (new Vector3(this.targetPoint.x, this.Bi.position.y, this.targetPoint.z).subtract(this.Bi.position)).normalize(); + // // const v2 = this.root.forward; + // // const targetDir = Vector3.Cross(v1, v2).y > 0 ? 1 : -1; + + // // const targetAngle = Math.acos(Vector3.Dot(v1, v2)) * 180 / Math.PI * targetDir; + // // const currentAngle = this.Bi.rotationQuaternion.toEulerAngles().y * 180 / Math.PI; + + + // // // console.log(this.Bi.rotationQuaternion.equalsWithEpsilon(new Quaternion(-rotation.x, -rotation.y, -rotation.z, rotation.w), 0.001)); + + // // if (Math.abs(targetAngle - currentAngle) > 0.5) { + // // const speedDir = (targetAngle - currentAngle) >= 0 ? 1 : -1; + // // this.RotateBi(speedDir * 0.01); + // // } else { + // // this.armActionState = ArmActionState.Bi2; + // // } + // } + + + + // public AutoRotateBi1() { + // // const d2E = Math.floor(Vector3.Distance(this.Bi6.absolutePosition, this.Bi.absolutePosition)) + 15;//臂长 + // // const d2T = Math.floor(Vector3.Distance(this.Bi.absolutePosition, this.targetPoint));//臂底端到目标的距离 + // // const distance = Math.round(Vector3.Distance(this.Bi6.absolutePosition, this.targetPoint)); //Bi6到目标距离 + + // // const v1 = (new Vector3(this.targetPoint.x, this.targetPoint.y, this.targetPoint.z).subtract(this.Bi1.position)).normalize(); + // // const v2 = this.Bi.forward.normalize(); + // // const targetDir = Vector3.Cross(v1, v2).x > 0 ? -1 : 1; + + + // // const lookPos = this.targetPoint.subtract(this.Bi1.position).normalize(); + // // const rotation = Quaternion.FromLookDirectionRH(lookPos, this.Bi1.up); + // // this.Bi1.rotationQuaternion = Quaternion.Slerp(this.Bi1.rotationQuaternion, new Quaternion(rotation.x, rotation.y, rotation.z, rotation.w), this.deltaTime * 10); + + + // // const targetAngle = Math.acos(Vector3.Dot(v1, v2)) * 180 / Math.PI * targetDir; + // // const currentAngle = this.Bi1.rotationQuaternion.toEulerAngles().x * 180 / Math.PI; + + + // // console.log(currentAngle,); + // // console.log(targetAngle, "================="); + // // if (Math.abs(targetAngle - currentAngle) > 0.5) { + // // const speedDir = (targetAngle - currentAngle) >= 0 ? 1 : -1; + // // this.RotateBi1(speedDir * 0.01); + // // } else { + // // this.armActionState = ArmActionState.Bi6; + // // } + + // // console.log(distance, '') + // // if (d2E < d2T) { + // // // todo 直接指向目标点 + // // this.armActionState = ArmActionState.Bi6; + // // } else { + // // // 根据距离上调或下调 + // // if (distance < 15) { + // // this.RotateBi1(-this.deltaTime); + // // } else if (distance > 15) { + // // this.RotateBi1(this.deltaTime); + // // } else { + // // this.armActionState = ArmActionState.Bi6; + // // } + // // } + // } + + // public AutoRotateBi6() { + // // const v1 = (new Vector3(this.targetPoint.x, this.targetPoint.y, this.targetPoint.z).subtract(this.Bi6.position)).normalize(); + // // const v2 = this.Bi.forward.normalize(); + // // const targetDir = Vector3.Cross(v1, v2).x > 0 ? -1 : 1; + + // // const targetAngle = Math.acos(Vector3.Dot(v1, v2)) * 180 / Math.PI * targetDir; + // // const currentAngle = this.Bi6.rotationQuaternion.toEulerAngles().x * 180 / Math.PI; + + + // // const test = Vector3.GetAngleBetweenVectors(v1, this.Bi1.forward.normalize(), this.Bi1.up.normalize()) * 180 / Math.PI; + + + // // const isUp = Math.abs(this.Bi6.rotationQuaternion.toEulerAngles().y) < 0.1 && Math.abs(this.Bi6.rotationQuaternion.toEulerAngles().z) < 0.1; + // // const isZero = test - currentAngle > 0; + + // // if (test - currentAngle < 0.5 && isZero && isUp) { + // // // this.armActionState = ArmActionState.Pentou; + // // } else { + // // if (isUp) { + // // if (isZero) { + // // this.RotateBi6(0.01); + // // console.log("0"); + // // } else { + // // this.RotateBi6(-0.01); + // // console.log("1"); + // // } + + // // } else { + // // this.RotateBi6(-0.01); + // // console.log("2"); + // // } + // // } + + // // console.log(test, 'Angle', isUp); + + // // console.log(currentAngle, this.Bi6.rotationQuaternion.toEulerAngles().y, this.Bi6.rotationQuaternion.toEulerAngles().z); + // } + + // // 移动举臂 + // public AutoTranlateBi(tranlateMesh: Mesh, nextState: ArmActionState) { + // //#region 自动伸臂 + // const d2E = Math.floor(Vector3.Distance(this.Bi6.absolutePosition, this.Bi.absolutePosition)) + 15;//臂长 + // const d2T = Math.floor(Vector3.Distance(this.Bi.absolutePosition, this.targetPoint));//臂底端到目标的距离 + + // // console.log("当前臂长:", d2E, d2T); + // // 臂长小于目标距离,伸臂 + // if (d2E < d2T) { + // tranlateMesh.translate(Axis.Z, this.deltaTime * this.speed, Space.LOCAL); + // if (tranlateMesh.position.z > this.maxArmlength) { + // tranlateMesh.position.z = this.maxArmlength; + // this.armActionState = nextState; + // } else if (tranlateMesh.position.z < this.minArmlength) { + // tranlateMesh.position.z = this.minArmlength; + // this.armActionState = nextState; + // } + // } + // else if (d2E > d2T) { + // tranlateMesh.translate(Axis.Z, -this.deltaTime * this.speed, Space.LOCAL); + // if (tranlateMesh.position.z > this.maxArmlength) { + // tranlateMesh.position.z = this.maxArmlength; + // this.armActionState = nextState; + // } else if (tranlateMesh.position.z < this.minArmlength) { + // tranlateMesh.position.z = this.minArmlength; + // this.armActionState = nextState; + // } + // } + // else { + // this.armActionState = nextState; + // } + // //#endregion + // } +} + + +export class Keyboard { + public ArrowLeft = false; + public ArrowRight = false; + public ShiftKey = false; + public w = false; + public a = false; + public s = false; + public d = false; + public u = false; + public j = false; + public h = false; + public k = false; + public W = false; + public S = false; + public U = false; + public J = false; + public AddKey = false; + public SubKey = false; + + private static instance: Keyboard = new Keyboard(); + + public static get Instance(): Keyboard { + return this.instance; + } + /** + * + */ + private constructor() { + // 添加快捷键 + document.addEventListener('keydown', (e: KeyboardEvent) => { + let key = e.key.toLocaleLowerCase(); + console.log(key); + if (key == "w" && e.shiftKey) { + this.W = true; + } else if (key == "w") { + this.w = true; + } + if (key == "s" && e.shiftKey) { + this.S = true; + } else if (key == "s") { + this.s = true; + } + if (key == "u" && e.shiftKey) { + this.U = true; + } else if (key == "u") { + this.u = true; + } + if (key == "j" && e.shiftKey) { + this.J = true; + } else if (key == "j") { + this.j = true; + } + if (key == "arrowleft") { + this.ArrowLeft = true; + } + if (key == "arrowright") { + this.ArrowRight = true; + } + + if (key == "a") { + this.a = true; + } + + if (key == "d") { + this.d = true; + } + + + if (key == "h") { + this.h = true; + } + if (key == "k") { + this.k = true; + } + if (key == "=") { + this.AddKey = true; + } + if (key == "-") { + this.SubKey = true; + } + if (key == "shift") { + if (this.w == true) { + this.W = true; + this.w = false; + } else if (this.s == true) { + this.S = true; + this.s = false; + } + else if (this.u == true) { + this.U = true; + this.u = false; + } + else if (this.j == true) { + this.J = true; + this.j = false; + } + } + }); + document.addEventListener('keyup', (e: KeyboardEvent) => { + if (e.key == null) { + return; + } + let key = e.key.toLocaleLowerCase(); + if (key == "arrowleft") { + this.ArrowLeft = false; + } + if (key == "arrowright") { + this.ArrowRight = false; + } + if (key == "w") { + this.w = false; + this.W = false; + } + if (key == "a") { + this.a = false; + } + if (key == "s") { + this.s = false; + this.S = false; + } + if (key == "d") { + this.d = false; + } + if (key == "u") { + this.u = false; + this.U = false; + } + if (key == "j") { + this.j = false; + this.J = false; + } + if (key == "h") { + this.h = false; + } + if (key == "k") { + this.k = false; + } + if (key == "=") { + this.AddKey = false; + } + if (key == "-") { + this.SubKey = false; + } + if (key == "shift") { + if (this.W == true) { + this.W = false; + this.w = true; + } else if (this.S == true) { + this.S = false; + this.s = true; + } + else if (this.U == true) { + this.U = false; + this.u = true; + } + else if (this.J == true) { + this.J = false; + this.j = true; + } + } + }); + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/mode-manager.ts b/src/app/babylon/controller/mode-manager.ts new file mode 100644 index 0000000..c8b1743 --- /dev/null +++ b/src/app/babylon/controller/mode-manager.ts @@ -0,0 +1,79 @@ + + +/** + * 模式类型 + */ +export enum ModeType { + + Look = "Look",//查看模式 + Edit = "Edit",//编辑模式 +} + +/** + * 模式管理器 + */ +export class ModeManager { + + /** + * 当前模式的类型 + */ + private static s_currentMode: ModeType = ModeType.Edit; + + /** + * 调试模式 + */ + public static isDebug = true; + + + //#region 演示单单位 + + //未指定演示单位,正常打开 + static readonly c_demoKey_null = null; + + // 上海国际会议中心 测试 + static readonly c_demoKey_shanghai = "shanghai"; + + //测试 + static readonly c_demoKey_test = "test"; + + /** + * 演示单位的key + */ + public static institutionDemoKey = ModeManager.c_demoKey_null; + + //#endregion + + /** + * 获取当前模式的类型 + */ + static get currentMode(): ModeType { + return ModeManager.s_currentMode; + } + + /** + * 改变模式类型 + */ + static set currentMode(modeType: ModeType) { + ModeManager.s_currentMode = modeType; + ModeManager.log("currentMode" + modeType); + } + + //封装打印 + static log(data: any, ...optionalParams: any[]) { + if (ModeManager.isDebug) { + console.log(data, optionalParams); + } + } + + /** + * 封装的打印堆栈 + */ + static trace(message?: any, ...optionalParams: any[]) { + if (ModeManager.isDebug) { + console.trace(message, optionalParams); + } + } + + +} + diff --git a/src/app/babylon/controller/scene-manager.ts b/src/app/babylon/controller/scene-manager.ts new file mode 100644 index 0000000..dab79dd --- /dev/null +++ b/src/app/babylon/controller/scene-manager.ts @@ -0,0 +1,915 @@ +import { + AbstractMesh, + AnimationGroup, + ArcRotateCamera, + BoundingBoxGizmo, + Color3, + Color4, + CubeTexture, + DirectionalLight, + Engine, + EventState, + HemisphericLight, + HighlightLayer, + IParticleSystem, + Mesh, + MeshBuilder, + Observable, + Observer, + PBRMaterial, + PickingInfo, + PointerEventTypes, + Quaternion, + Scene, + ShadowGenerator, + Skeleton, + StandardMaterial, + Texture, + TransformNode, + Vector3, +} from '@babylonjs/core'; +import '@babylonjs/core/Debug/debugLayer'; +import '@babylonjs/inspector'; +import { GridMaterial } from '@babylonjs/materials'; +import { ModelData, ModelType } from '../model/data/model-data/model-data'; +import { ModelInfo } from '../model/info/model/model-info'; +import { ModelInfo_building } from '../model/info/model/model-info-building'; +import { MyArcRotateCameraPointersInput } from '../tool/myArcRotateCameraPointersInput'; +import { BabylonTool } from '../tool/babylon-tool'; +import { GizmoTool } from '../tool/gizmo-tool'; +import { TsTool } from '../tool/ts-tool'; +import { FacilityWindow } from '../view/facility-window/facility-window'; +import { FacilityInfoInSceneWindow } from '../view/facilityinfoinscene-window/facilityinfoinscene-window'; +import { InfoManager } from './info-manager'; +import { ModeManager } from './mode-manager'; +import { MarkWindow } from '../view/mark-window/mark-window'; +import { ModelInfo_facility } from '../model/info/model/model-info-facility'; +import { ModelInfo_mark } from '../model/info/mark/model-info-mark'; +import { MarkData, MarkType } from '../model/data/mark/mark-data'; +import { Event_KeyboardInput } from './event-manager/events/event-keyboard-input'; +import { ModelInfo_mark_area } from '../model/info/mark/other/mark-plan-area-info'; +import { classToClass, plainToClass } from 'class-transformer'; +import { MarkData_Area } from '../model/data/mark/other/mark-data-area'; +import { MarkData_Line } from '../model/data/mark/other/mark-data-line'; +import { ModelInfo_mark_line } from '../model/info/mark/other/mark-plan-line-info'; +import { MarkData_multiLine } from '../model/data/mark/other/mark-data-multi-line'; +import { ModelInfo_mark_multiLine } from '../model/info/mark/other/mark-plan-multi-line-info'; +import { MarkData_multiArrow_CT, MarkData_multiArrow_JG } from '../model/data/mark/other/mark-data-multi-arrow'; +import { ModelInfo_mark_multiArrow } from '../model/info/mark/other/mark-plan-multi-arrow'; +import { ModelInfo_mark_particle } from '../model/info/mark/other/mark-plan-particle-info'; + +//场景管理器 +export class SceneManager { + //----------------Camera-----------------\\ + + public engine: Engine; + public canvas: HTMLCanvasElement; + public scene: Scene; + public defaultCamera: ArcRotateCamera; + private hemisphericLight: HemisphericLight; + public shadowGenerator: ShadowGenerator;//阴影 + public sunLight: DirectionalLight;//太阳光,用于产生阴影 + public skyBox: Mesh;//天空球 + public ground3D: Mesh;//无天空盒时的背景地面 + + + static s_openLight: boolean = true;//开启光照效果(关闭是要同时关闭阴影) + static s_openShadow: boolean = true;//开启阴影(必须开启阴影) + static s_openSkyBox: boolean = true;//使用天空盒 + static s_environmentCubeTexture: CubeTexture;//环境所用的cubeTexture + static s_openEnvironmentReflection: boolean = true;//使用环境反射 + static s_allModelInfo: ModelInfo[] = []; //所有建筑模型信息 + static s_facilityInfoInSceneWindow: FacilityInfoInSceneWindow; //场景中设备 界面 + static s_facilityWindow: FacilityWindow; //可用设备 界面 + static s_markWindow: MarkWindow;//可用的标绘素材 界面 + + //#region 单例 + private static instance: SceneManager; + + public static get Instance() { + if (SceneManager.instance == null) { + throw new Error('Method not implemented.'); + } + return SceneManager.instance; + } + //#endregion + + //#region 初始化 + //初始化 + public static init(scene: Scene, canvas: HTMLCanvasElement, engine: Engine): SceneManager { + if (SceneManager.instance != null) { + throw new Error("sceneManager can't be reinitialized"); + } else { + + SceneManager.instance = new SceneManager(); + SceneManager.instance.engine; + SceneManager.instance.scene = scene; + SceneManager.instance.canvas = canvas; + + } + return SceneManager.instance; + } + //#endregion + + //#region 摄像机 + + /** + * 摄像机模式-是正交状态 + */ + public cameraMode_Is2D = false; + + //初始化自由旋转相机 + public initArcRotateCamera() { + let camera = new ArcRotateCamera( + 'Camera', //名称 + 0, //alpha: 定义相机沿垂直轴的旋转 + 1.2, //beta: 定义相机沿水平轴的旋转 + 10, //摄像机与目标位置的距离 + Vector3.Zero(), //目标位置 + this.scene //定义摄像机所属的场景 + ); + camera.maxZ = 6000; //摄像机拍摄的最远距离 + camera.upperBetaLimit = 1.5; //beta方向上的旋转限制(防止看到模型底面) + camera.lowerRadiusLimit = 3; //相机距离拍摄目标的最小距离(防止穿插) + camera.setTarget(Vector3.Zero()); //设置拍摄目标 + camera.attachControl(this.canvas, true); //把相机连接到画布 + this.defaultCamera = camera; + + camera.inputs.removeByType("ArcRotateCameraPointersInput"); + camera.inputs.removeByType("ArcRotateCameraKeyboardMoveInput"); //为了配合快捷键,屏蔽了 + + camera.inputs.add(new MyArcRotateCameraPointersInput()); + + } + + /** + * 改变摄像机模式(正交还是透视) + * @param is2D true表示正交 + */ + public changeCameraMode(is2D: boolean) { + this.cameraMode_Is2D = is2D; + BabylonTool.changeCameraMode(this.defaultCamera, is2D); + } + + //#endregion + + //#region 光照与背景 + + + + //默认的半球光 + public initLight() { + this.hemisphericLight = new HemisphericLight( + 'light1', + new Vector3(0, 1, 0), + this.scene + ); + + this.updateLightSetting(); + + this.updateShadow(); + } + + + /** + * 更新光照设置 + */ + updateLightSetting() { + if (SceneManager.s_openLight) { + + + if (this.sunLight == null) { + this.sunLight = new DirectionalLight("sun", new Vector3(0.49, -0.79, 0.38), this.scene); + } + else { + this.sunLight.setEnabled(true); + } + + if (SceneManager.s_openEnvironmentReflection) { + this.hemisphericLight.intensity = 0.1;//有环境反射时,本身会比较亮(跟当前使用的环境贴图有关) + this.sunLight.intensity = 3; + } + else { + this.hemisphericLight.intensity = 0.25; + this.sunLight.intensity = 3; + } + + + } + else { + if (this.sunLight == null) { + this.sunLight.setEnabled(false); + } + + this.hemisphericLight.intensity = 10; + } + } + + /** + * 初始化阴影 + */ + public updateShadow() { + if (SceneManager.s_openShadow) { + if (this.shadowGenerator == null) { + this.shadowGenerator = new ShadowGenerator(2048, this.sunLight); + } + + this.shadowGenerator.usePercentageCloserFiltering = true; + this.shadowGenerator.filteringQuality = ShadowGenerator.QUALITY_MEDIUM; + // this.shadowGenerator.blurKernel = 32; + if (this.sunLight != null) { + this.sunLight.autoCalcShadowZBounds = true; //投影矩阵距离自适应 + } + } + else { + if (this.shadowGenerator != null) { + this.shadowGenerator.usePercentageCloserFiltering = false; + } + if (this.sunLight != null) { + this.sunLight.autoCalcShadowZBounds = false; //投影矩阵距离自适应 + } + } + } + + //#endregion + + //#region 高亮层 + + /** + * 高亮层 + */ + highLightLayer: HighlightLayer; + + /** + * 添加到高亮层 + * @param mesh + * @param color + */ + addToHighLight(mesh: Mesh, color: Color3) { + if (this.highLightLayer == null) { + this.highLightLayer = new HighlightLayer("highLight", this.scene); + this.highLightLayer.innerGlow = false; + } + + + let allMesh = mesh.getChildMeshes(); + this.highLightLayer.addMesh(mesh, color); + for (let i = 0; i < allMesh.length; i++) { + let childMesh = allMesh[i]; + if (childMesh instanceof Mesh) { + this.highLightLayer.addMesh(childMesh, color); + } + } + + + } + + /** + * 移除出高亮层 + * @param mesh + */ + removeFromHighLight(mesh: Mesh) { + if (this.highLightLayer == null) { + return; + } + let allMesh = mesh.getChildMeshes(); + for (let i = 0; i < allMesh.length; i++) { + let childMesh = allMesh[i]; + if (childMesh instanceof Mesh) { + this.highLightLayer.removeMesh(childMesh); + } + } + + } + + /** + * 清空高亮层 + */ + clearHighLight() { + this.highLightLayer.removeAllMeshes(); + } + + //#endregion + + //#region 三维场景的背景 + + public updateSceneBG() { + + this.scene.clearColor = new Color4(0, 0, 0, 1);//0.51, 0.63, 0.89 + this.scene.ambientColor = new Color3(1, 1, 1); + + if (SceneManager.s_openSkyBox) { + + if (this.skyBox == null) { + this.skyBox = Mesh.CreateBox("skyBox", 4000.0, this.scene); + let skyboxMaterial = new StandardMaterial("skyBox", this.scene); + skyboxMaterial.backFaceCulling = false; + skyboxMaterial.reflectionTexture = new CubeTexture("assets/skybox/default/default", this.scene); + skyboxMaterial.reflectionTexture.coordinatesMode = Texture.SKYBOX_MODE; + skyboxMaterial.diffuseColor = new Color3(0, 0, 0); + skyboxMaterial.specularColor = new Color3(0, 0, 0); + skyboxMaterial.disableLighting = true; + this.skyBox.material = skyboxMaterial; + this.skyBox.renderingGroupId = -1; + } + else { + this.skyBox.setEnabled(true); + } + + if (this.ground3D != null) { + this.ground3D.setEnabled(false); + } + } + else { + if (this.ground3D == null) { + this.ground3D = MeshBuilder.CreateGround("ground", { width: 10000, height: 10000 }); + this.ground3D.position.y = -1.5; + + let mat_grid = new GridMaterial("mat_ground", SceneManager.Instance.scene); + + mat_grid.gridRatio = 10; + mat_grid.mainColor = new Color3(0, 0, 0); + mat_grid.lineColor = new Color3(0, 0.4, 1); + + this.ground3D.material = mat_grid; + this.ground3D.renderingGroupId = -1; + } + else { + this.ground3D.setEnabled(true); + } + + + + } + + //环境反射 + if (SceneManager.s_openEnvironmentReflection) { + this.scene.environmentTexture = new CubeTexture("assets/skybox/city/city.env", this.scene); + SceneManager.s_environmentCubeTexture = this.scene.environmentTexture as CubeTexture; + } + + + + } + + + + //#endregion + + + //#region 场景声明周期与事件 + + public initSceneEvent() { + this.scene.onBeforeRenderObservable.add(SceneManager.onBeforeRender); + + this.scene.onPointerDown = SceneManager.onPointerDown; + this.scene.onPointerUp = SceneManager.onPointerUp; + this.scene.onPointerMove = SceneManager.onPointerMove; + + document.onkeydown = SceneManager.onKeyDown; + } + + + static showDebug = false; + //按键按下 + static onKeyDown(this: GlobalEventHandlers, ev: KeyboardEvent) { + if (ev.altKey && ev.key == 'd' && ModeManager.isDebug) { + SceneManager.showDebug = !SceneManager.showDebug; + if (SceneManager.showDebug) { + SceneManager.Instance.scene.debugLayer.show(); + } else { + SceneManager.Instance.scene.debugLayer.hide(); + } + } + Event_KeyboardInput.dispatch(ev); //派发给其他 + + } + + //场景渲染前 + static onBeforeRender(eventData: Scene, eventState: EventState) { + if (SceneManager.s_isPointerDown) { + SceneManager.s_downTime += SceneManager.Instance.scene.deltaTime; + } + } + + static s_isPointerDrag: boolean = false; //拖拽中 + static s_isPointerDown = false; //按下中 + static s_downTime = 0;//按下的时间 + + static readonly c_dragTime = 200;//超过则表示拖拽 + + //焦点按下 + private static onPointerDown( + evt: PointerEvent, + pickInfo: PickingInfo, + type: PointerEventTypes + ) { + SceneManager.s_isPointerDown = true; + SceneManager.s_downTime = 0; + } + + //焦点移动 + private static onPointerMove( + evt: PointerEvent, + pickInfo: PickingInfo, + type: PointerEventTypes + ) { + if (SceneManager.s_isPointerDown && SceneManager.s_downTime > SceneManager.c_dragTime) { + SceneManager.s_isPointerDrag = true; + } + + } + + //焦点抬起 + private static onPointerUp(evt: PointerEvent, pickInfo: PickingInfo) { + SceneManager.s_isPointerDown = false; + SceneManager.s_isPointerDrag = false; + SceneManager.s_downTime = 0; + } + + //#endregion + + //#region 操作模型 + //创建模型 + /** + * 加载模型 + * @param modelType + * @param modelData + * @param needBox + * @param isNew + * @param tag 加载的原因 + * @param onSuccess + * @param onError + * @param index 重试次数,超过五次就停止 + */ + static createModel( + modelType: ModelType, + modelData: ModelData, + needBox: boolean, + isNew: boolean, + tag: string, + onSuccess?: ( + meshes: AbstractMesh[], + box: AbstractMesh, + modelInfo: ModelInfo + ) => void, + onError?: ( + message: string + ) => void, + index = 0 + ) { + // console.log("准备加载"); + + let defaultMesh = MeshBuilder.CreateBox(modelData.key, { size: 0.01 }); + defaultMesh.scaling.y = 0.01; + defaultMesh.visibility = 0; + + let modelInfo: ModelInfo; + if (modelType == ModelType.Building) { + modelInfo = InfoManager.newModelInfo_building( + modelData.key, + modelData, + null, + defaultMesh + ); + } + else if (modelType == ModelType.Facility) { + + modelInfo = new ModelInfo_facility(modelData.key, modelData, null, defaultMesh, null, isNew); + modelInfo.showFollowUI(false); + } + else if (modelType == ModelType.Mark) { + switch ((modelData as MarkData).type) { + case MarkType.JJQ: + case MarkType.QYSDA: + case MarkType.QYSDB: + modelData = plainToClass(MarkData_Area, modelData); + modelInfo = new ModelInfo_mark_area(modelData as MarkData, null, defaultMesh, null, isNew); + break; + case MarkType.JJX: + modelData = plainToClass(MarkData_Line, modelData); + modelInfo = new ModelInfo_mark_line(modelData as MarkData, null, defaultMesh, null, isNew); + break; + case MarkType.SD: + modelData = plainToClass(MarkData_multiLine, modelData); + modelInfo = new ModelInfo_mark_multiLine(modelData as MarkData, null, defaultMesh, null, isNew); + break; + case MarkType.JGLX: + modelData = plainToClass(MarkData_multiArrow_JG, modelData); + modelInfo = new ModelInfo_mark_multiArrow(modelData as MarkData, null, defaultMesh, null, isNew); + break; + case MarkType.CT: + modelData = plainToClass(MarkData_multiArrow_CT, modelData); + modelInfo = new ModelInfo_mark_multiArrow(modelData as MarkData, null, defaultMesh, null, isNew); + break; + case MarkType.H: + case MarkType.TPH: + case MarkType.SNH: + case MarkType.YWA: + case MarkType.YWB: + case MarkType.YWC: + modelInfo = new ModelInfo_mark_particle(modelData as MarkData, null, defaultMesh, null, isNew); + break; + + default: modelInfo = new ModelInfo_mark(modelData as MarkData, null, defaultMesh, null, isNew); + break; + } + + modelInfo.showFollowUI(false); + } + + if (modelData.isModel) { + let importMeshSyncData = SceneManager.getImportMeshSyncData(modelData.resPath, modelData.resName); + if (importMeshSyncData != null) //已经在加载了 + { + importMeshSyncData.onsuccessObservable.add((eventData: ImportMeshSyncCallBack) => { + let box = SceneManager.importMeshSuccess(eventData.newMeshes, eventData.particleSystems, eventData.skeletons, eventData.animationGroups, eventData.modelInfo, eventData.needBox, eventData.modelData); + onSuccess(eventData.newMeshes, box, eventData.modelInfo); + }) + } + else { + + importMeshSyncData = SceneManager.startLoadMesh(modelData.resPath, modelData.resName); + BabylonTool.importMeshSync( + '', + modelData.resPath, + modelData.resName, + SceneManager.Instance.scene, + tag, + function (newMeshes: AbstractMesh[], particleSystems: IParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[]) { + let callBack = new ImportMeshSyncCallBack(newMeshes, particleSystems, skeletons, animationGroups, modelInfo, needBox, modelData); + let allImportMeshSyncDatas = SceneManager.getAllImportMeshSyncData(modelData.resPath, modelData.resName); + for (let i = 0; i < allImportMeshSyncDatas.length; i++) { + allImportMeshSyncDatas[i].onsuccessObservable.notifyObservers(callBack); + } + SceneManager.endLoadMesh(modelData.resPath, modelData.resName); + let box = SceneManager.importMeshSuccess(newMeshes, particleSystems, skeletons, animationGroups, modelInfo, needBox, modelData); + console.log("加载模型完成", modelData.resName); + onSuccess(newMeshes, box, modelInfo); + }, null, + function (scene: Scene, message: string, exception?: any) { + + if (index < 5) { + let l_index = index + 1; + modelInfo.dispose(); + importMeshSyncData.isBreak = true;//中断 + + SceneManager.createModel(modelType, modelData, needBox, isNew, tag, onSuccess, onError, l_index); + + console.log("重新开始加载" + l_index, modelData); + console.log(exception); + } + else { + modelInfo.dispose(); + console.log(message); + console.log(exception); + // alert("模型加载失败: " + message + "==" + exception); + // alert(exception); + if (onError) { + onError(message) + } + } + } + ); + } + } + else { + onSuccess([], defaultMesh, modelInfo); + } + } + + /** + * 加载完成的回调 + * @param newMeshes + * @param particleSystems + * @param skeletons + * @param animationGroups + */ + static importMeshSuccess(newMeshes: AbstractMesh[], particleSystems: IParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[], modelInfo: ModelInfo, needBox: boolean, modelData: ModelData) { + SceneManager.addModel(modelInfo); + let box: AbstractMesh = null; + if (needBox) { + box = BoundingBoxGizmo.MakeNotPickableAndWrapInBoundingBox( + newMeshes[0] as Mesh + ); + + box.isPickable = false; + box.name = modelData.key; + box.rotationQuaternion = undefined; + modelInfo.models = newMeshes; + modelInfo.modelBox = box; + modelInfo.animationGroups = animationGroups; + if (animationGroups != null && animationGroups.length > 0) { + animationGroups[0].stop(); + } + + let canPick = false; + for (let i = 0; i < newMeshes.length; i++) { + //if (newMeshes[i].name.match("Floor") || newMeshes[i].name.match("floor") || newMeshes[i].name.match("Terrain")) { + newMeshes[i].isPickable = true; + canPick = true; + //} + + if (SceneManager.s_openShadow) { + newMeshes[i].receiveShadows = true; + + // let mat = newMeshes[i].material; + //if (mat instanceof PBRMaterial && TsTool.stringContain(mat.name, "glass")) { + // mat.refractionTexture = SceneManager.s_environmentCubeTexture;//折射 + // mat.reflectionTexture = SceneManager.s_prefabSkyBoxCubeTexture;//反射 + // mat.invertRefractionY = true; + //} + } + } + + if (!SceneManager.s_openLight) { + BabylonTool.setMatToUnlit(newMeshes, true, "Color"); //无光材质 + BabylonTool.setMatSheen(newMeshes, true, true); + } + + + // SceneManager.instance.shadowGenerator.addShadowCaster(newMeshes[0], true); + + //如果是建筑,内部还没找到可接受pick的特定mesh,则整体可接受pick + if (modelInfo instanceof ModelInfo_building && !canPick) { + //box.isPickable = true; + let ground = MeshBuilder.CreateBox("ground", { size: 1 }); + ground.scaling = new Vector3(box.scaling.x, 0.1, box.scaling.z); + ground.setParent(box); + ground.rotationQuaternion = Quaternion.Zero(); + ground.position = new Vector3(0, -0.5, 0); + ground.visibility = 0.01; + + } + + // if (modelInfo instanceof ModelInfo_building) { + // for (let i = 0; i < newMeshes.length; i++) { + // newMeshes[i].receiveShadows = true; + // } + + // } + } + return box + } + + + /** + * 正在加载的模型数据 + */ + static s_ImportMeshSyncData: ImportMeshSyncData[] = []; + + /** + * 开始加载模型 + */ + static startLoadMesh(path: string, name: string) { + let importMeshSyncData = new ImportMeshSyncData(path, name); + + SceneManager.s_ImportMeshSyncData.push(importMeshSyncData); + + return importMeshSyncData + } + + + + + /** + * 结束加载模型 + * @param path + * @param name + */ + static endLoadMesh(path: string, name: string) { + let datas = SceneManager.getAllImportMeshSyncData(path, name); + for (let i = 0; i < datas.length; i++) { + TsTool.arrayRemove(SceneManager.s_ImportMeshSyncData, datas[i]); + } + + } + + /** + * 查询加载模型的数据(确实在加载的) + * @param path + * @param name + */ + static getImportMeshSyncData(path: string, name: string) { + let result: ImportMeshSyncData = null; + for (let i = 0; i < SceneManager.s_ImportMeshSyncData.length; i++) { + let data = SceneManager.s_ImportMeshSyncData[i]; + if (data.path == path && data.name == name && data.isBreak == false) { + result = data; + break; + } + } + + return result; + } + + /** + * 获取所有的加载信息(失败时,会产生多份) + * @param path + * @param name + */ + static getAllImportMeshSyncData(path: string, name: string) { + let result: ImportMeshSyncData[] = []; + for (let i = 0; i < SceneManager.s_ImportMeshSyncData.length; i++) { + let data = SceneManager.s_ImportMeshSyncData[i]; + if (data.path == path && data.name == name) { + result.push(data); + } + } + + return result; + } + + + + //克隆模型 + static cloneMesh( + key, + modelInfo: ModelInfo, + prefab: Mesh, + name?: string + ): Mesh { + let result = BabylonTool.cloneMesh(prefab); + + if (SceneManager.s_openShadow) { + SceneManager.Instance.shadowGenerator.addShadowCaster(result); + } + SceneManager.addModel(modelInfo); + + return result; + } + + //获取模型 + static getModel(modelKey: string): ModelInfo { + let result = null; + if (SceneManager.s_allModelInfo != null) { + for (let i = 0; i < SceneManager.s_allModelInfo.length; i++) { + let l_modelInfo = SceneManager.s_allModelInfo[i]; + if (l_modelInfo.key == modelKey) { + return l_modelInfo; + } + } + } + return result; + } + + //获取模型 + static getModelById(uniqueId: number): ModelInfo { + let result = null; + if (SceneManager.s_allModelInfo != null) { + for (let i = 0; i < SceneManager.s_allModelInfo.length; i++) { + let l_modelInfo = SceneManager.s_allModelInfo[i]; + if (l_modelInfo.modelBox.uniqueId == uniqueId) { + return l_modelInfo; + } + } + } + console.log('没找到:' + uniqueId); + return result; + } + + //删除模型 + static destroyModel(model: string | ModelInfo) { + let modelInfo: ModelInfo; + + if (model instanceof ModelInfo) { + modelInfo = model; + } else { + modelInfo = SceneManager.getModel(model); + } + if (modelInfo == null) { + return; + } else { + TsTool.arrayRemove(SceneManager.s_allModelInfo, modelInfo); + modelInfo.dispose(); + } + + } + + //添加模型 + private static addModel(modelInfo: ModelInfo) { + SceneManager.s_allModelInfo.push(modelInfo); + } + + + /** + * 聚焦当前选中的目标 + */ + public static lookAtCurrentSelect() { + if (GizmoTool.s_nowPickAim_mesh != null) { + BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, GizmoTool.s_nowPickAim_mesh, true); + } + else { + ModeManager.log("没有选中的目标"); + } + } + + /** + * 模型的Y方向吸附 + * @param mover 行动者 + * @param target 吸附的目标物 + */ + public static meshAdsorbY(mover: AbstractMesh, target: AbstractMesh, pickPos: Vector3) { + + ModeManager.log("吸附模型" + target); + + let targetRoot = SceneManager.getRootTransformNode(target); + + if (mover == targetRoot) { + return; + } + let aimPos_y: number = 0; + + let direction = 0.5; + if (mover.absolutePosition.y < pickPos.y) { + direction = -0.5; + } + + aimPos_y += mover.scaling.y * direction; + + let newPos = new Vector3(mover.absolutePosition.x, pickPos.y + aimPos_y, mover.absolutePosition.z) + + mover.setAbsolutePosition(newPos); + } + + + //获取根节点 + public static getRootTransformNode(mesh: AbstractMesh): TransformNode { + let result: TransformNode = mesh; + let parent: any = mesh; + while (true) { + if (parent.id == "ground" || parent.id.match("Floor")) { + result = parent; + return result; + } + + parent = parent.parent; + if (parent == null) { + return mesh; + } + else if (parent.id == "box") { + result = parent; + return result; + } + else { + result = parent; + } + } + } + + //#endregion + + +} + +/** + * 正在异步导入模型的数据 + */ +class ImportMeshSyncData { + path: string; + name: string; + isBreak: boolean; //中断了 + + onsuccessObservable: Observable; + + constructor(path: string, + name: string) { + this.isBreak = false; + this.path = path; + this.name = name; + this.onsuccessObservable = new Observable(); + } + +} + +/** + * 异步导入模型的回调 + */ +class ImportMeshSyncCallBack { + + newMeshes: AbstractMesh[]; + particleSystems: IParticleSystem[]; + skeletons: Skeleton[]; + animationGroups: AnimationGroup[]; + modelInfo: ModelInfo; + needBox: boolean; + modelData: ModelData; + + constructor(newMeshes: AbstractMesh[], + particleSystems: IParticleSystem[], + skeletons: Skeleton[], + animationGroups: AnimationGroup[], + modelInfo: ModelInfo, + needBox: boolean, + modelData: ModelData) { + this.newMeshes = newMeshes; + this.particleSystems = particleSystems; + this.skeletons = skeletons; + this.animationGroups = animationGroups; + this.modelInfo = modelInfo; + this.needBox = needBox; + this.modelData = modelData; + } + + +} diff --git a/src/app/babylon/controller/serve-manager.ts b/src/app/babylon/controller/serve-manager.ts new file mode 100644 index 0000000..f3b1f1c --- /dev/null +++ b/src/app/babylon/controller/serve-manager.ts @@ -0,0 +1,242 @@ +import { HttpErrorResponse } from "@angular/common/http"; +import { classToPlain } from "class-transformer"; +import { BuildingBasicInfosService } from "src/app/service/babylon/building-basic-infos.service"; +import { ObjectsService } from "src/app/service/babylon/objects.service"; +import { InsitutionDataSimple } from "../model/data/institution/institution-data-simple"; +import { AllMarkPlanData } from "../model/data/mark/mark-plan-data"; +import { ModeManager } from "./mode-manager"; + +//服务器通信 +export class ServeManager { + + static ngAssetsPath = "assets/";//资源根目录 + + static instance: ServeManager = null; + + postFilePath: string;//上传文件的相对路径 + + static Init(buildingBISrv: BuildingBasicInfosService, objectsSrv: ObjectsService) { + ServeManager.instance = new ServeManager(buildingBISrv, objectsSrv); + } + + constructor( + private buildingBISrv: BuildingBasicInfosService, + private objectsSrv: ObjectsService + ) { + //this.fileInput = document.getElementById("file"); + + } + + //从服务器获取单位信息 + getInstitutionData(key: string = 'test', onSuccess?: (key: string, + data: string + ) => void, onError?: (key: string, error: any) => void) { + this.buildingBISrv.getBuildingBasicInfos(key) + .subscribe(data => { + + if (onSuccess) { + onSuccess(key, data); + } + }, error => { + console.error("From serve" + key + "===" + error); + if (onError) { + onError(key, error); + } + }) + } + + //保存单位信息 + saveInstitutionData(institutionData: any, key: string = 'test', onSuccess?: (key: string, + result: string + ) => void, onError?: (key: string, error: string) => void) { + let data = classToPlain(institutionData); + + console.log(data); + this.buildingBISrv.postBuildingBasicInfos(key, data) + .subscribe(data => { + ModeManager.log("保存单位成功:" + key); + if (onSuccess) { + onSuccess(key, data); + } + if (key != "InsList") { + //ThreeDimensionalHomeComponent.instance.openSnackBar("保存单位成功"); + // alert("保存单位成功"); + } + + + //暂时没有失败的回调 onError + }) + } + + //保存单位列表 + saveInstitutionListData(institutionList: InsitutionDataSimple[], onSucess?: () => void) { + // console.log("======保存单位"); + + ServeManager.instance.saveInstitutionData(institutionList, "InsList", () => { + //alert("保存单位列表成功"); + if (onSucess) { + onSucess(); + } + }) + } + + //#region 态势标会 + + /** + * 获取态势标会信息 + * @param institutionID + * @param onSuccess + * @param onError + */ + getMarkData(institutionID: string, + onSuccess?: (institutionID: string, data: string) => void, + onError?: (institutionID: string, error: any) => void) { + + this.buildingBISrv.getMarkData(institutionID) + .subscribe(data => { + ModeManager.log(data); + if (onSuccess) { + onSuccess(institutionID, data); + } + }, (error) => { + if (error instanceof HttpErrorResponse) { + if (error.status === 404) { + ModeManager.log("没有标绘数据,新建:" + error.error); + onSuccess(institutionID, null); //data 为null ,表示新建 + } + else { + if (onError) { + onError(institutionID, error); + } + } + } + if (onError) { + onError(institutionID, error); + } + }) + } + + + /** + * 保存态势标会信息 + */ + saveMarkData(allMarkPlanData: AllMarkPlanData, + onSuccess?: (key: string, result: string) => void, + onError?: (key: string, error: string) => void) { + + if (allMarkPlanData == null) { + console.error("标绘信息为空,无法保存"); + } + else { + let data = classToPlain(allMarkPlanData); + this.buildingBISrv.postMarkData(allMarkPlanData.institutionID, data) + .subscribe(data => { + ModeManager.log("保存标绘信息成功:" + allMarkPlanData.institutionID); + if (onSuccess) { + onSuccess(allMarkPlanData.institutionID, data); + } + // ThreeDimensionalHomeComponent.instance.openSnackBar("保存标绘信息成功"); + // alert("保存标绘信息成功"); + + //暂时没有失败的回调 onError + }) + } + } + + + + //#endregion + + + + //#region 文件上传 + //队列性,批量上传 + uploadFile(index: number, files: File[], resPath_out, onOneSuccess: (name: string, path: string, file: File) => void, onEnd: () => void) { + if (index < files.length) { + ServeManager.instance.openFileSelect(files[index], resPath_out, (name: string, path: string, file: File) => { + onOneSuccess(name, path, file); + this.uploadFile(index + 1, files, resPath_out, onOneSuccess, onEnd); + + }); + } + else { + onEnd(); + } + } + + + //设置文件路径并上传 + openFileSelect(file: File, extensionPath: string, onSuccess?: (name: string, path: string, file: File) => void) { + this.postFilePath = extensionPath; + + this.onPostFileSuccess = onSuccess; + + let fileSize = file.size || null //上传文件的总大小 + let shardSize = 5 * 1024 * 1024 //5MB 超过5MB要分块上传 + if (fileSize >= shardSize) // 超过5MB要分块上传 + { + this.postFileByMul(file); + } + else //普通上传 + { + this.postFile(file); + } + + } + + + //上传成功 + onPostFileSuccess?: (name: string, path: string, file: File) => void; + + //上传文件 + async postFile(file: File) { + await new Promise((resolve, reject) => { + + ServeManager.instance.objectsSrv.postFile(ServeManager.ngAssetsPath + this.postFilePath, file).subscribe(data => { + let dataObj = data as any; + let fileName = dataObj.fileName; + let filePath: string = dataObj.objectName; + filePath = filePath.replace(fileName, ""); + filePath = ObjectsService.baseUrl + filePath; + ServeManager.instance.onGetPostFileResult(fileName, filePath, file); + resolve('success') + }); + }) + } + + + /** + * 上传文件的结果 + * @param data + * @param file + */ + onGetPostFileResult(fileName: string, filePath: string, file: File) { + + + if (ServeManager.instance.onPostFileSuccess) { + ServeManager.instance.onPostFileSuccess(fileName, filePath, file); + } + } + + + /** + * 分块上传 + * @param file + */ + postFileByMul(file: File) { + ServeManager.instance.objectsSrv.postFile_MultipartUpload(ServeManager.ngAssetsPath + this.postFilePath, file).then((value) => { + let dataObj = value as any; + ServeManager.instance.onGetPostFileResult(dataObj.fileName, dataObj.filePath, file); + }); + + } + + //#endregion + + + + + + + +} \ No newline at end of file diff --git a/src/app/babylon/controller/status/building-status.ts b/src/app/babylon/controller/status/building-status.ts new file mode 100644 index 0000000..c044113 --- /dev/null +++ b/src/app/babylon/controller/status/building-status.ts @@ -0,0 +1,164 @@ + +import { Observable, Observer } from "@babylonjs/core"; +import { Game } from "../../game"; +import { BuildingType, BuildingData } from "../../model/data/institution/building/building-data"; +import { FacilityPosType, ModelData_facility } from "../../model/data/model-data/model-data-facility"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { BuildingUIItem } from "../../view/building-window/building-ui-item"; +import { BuildingWindow } from "../../view/building-window/building-window"; +import { FacilityWindow } from "../../view/facility-window/facility-window"; +import { FacilityInfoInSceneWindow } from "../../view/facilityinfoinscene-window/facilityinfoinscene-window"; +import { MarkWindow } from "../../view/mark-window/mark-window"; +import { ToolbarWindow } from "../../view/toolbar-window/toobar-window"; + +import { DataManager, ModelChangeType } from "../data-manager"; +import { EventManager } from "../event-manager/event-manager"; +import { Event_ChangeFacility } from "../event-manager/events/event-change-facility"; +import { InfoManager } from "../info-manager"; +import { ModeManager, ModeType } from "../mode-manager"; +import { SceneManager } from "../scene-manager"; +import { UIManager } from "../ui-manager"; +import { StatusBase, StatusManager } from "./status-manager"; + +//建筑物外观模式 +export class BuildingStatus extends StatusBase { + buildingWindow: BuildingWindow; + currentBuildingInfo: BuildingInfo; //当前的建筑 + onChangeFacilityObserver: Observer; + + static changeStatusFromUI: boolean = false;//因为ui而切换 + static startEnterObservable: Observable = new Observable();//开始切入 + static enterSuccessObservable: Observable = new Observable();//进入成功的事件 + + + //#region + /** + * 在数据层创建建筑 + * @param key 唯一key,来自服务器分配 + * @param name 名称,由玩家自定义 + * @param buildingType 建筑类型 + */ + createOneBuildingInData(key: string, name: string, buildingType: BuildingType): BuildingData { + return DataManager.createBuilding(key, name, buildingType); + } + //#endregion + + //#region 生命周期 + //初始化 + onCreate() { + super.onCreate(); + // this.enterSuccessObservable = new Observable(); + GizmoTool.init(SceneManager.Instance.scene, UIManager.Instance.uiRoot, SceneManager.Instance.defaultCamera); + InfoManager.init(); + //UIManager.open(InputHintWindow); + UIManager.open(ToolbarWindow); + } + //进入状态 + onEnter() { + super.onEnter(); + Game.instance.engine.resize(); + + //首次进入 + if (this.buildingWindow == null) { + SceneManager.s_facilityWindow = UIManager.open(FacilityWindow); + if (ModeManager.currentMode == ModeType.Look) { + //此处应改为由前端调用, 退出编辑状态时应调用hide + // SceneManager.s_markWindow = MarkWindow.openWindow(); + } + + this.buildingWindow = UIManager.open(BuildingWindow); + + SceneManager.s_facilityInfoInSceneWindow = UIManager.open(FacilityInfoInSceneWindow); + + } + else { //从室内返回 + UIManager.show(this.buildingWindow); + if (this.buildingWindow.currentBuidngItem != null) { + this.buildingWindow.currentBuidngItem.select(); + BuildingStatus.startEnterObservable.notifyObservers(this.buildingWindow.currentBuidngItem); + BuildingStatus.enterSuccessObservable.notifyObservers(this.buildingWindow.currentBuidngItem) + if (MarkWindow.s_cameraData == null) { + this.buildingWindow.currentBuidngItem.lookAt(); + } + else { + + MarkWindow.s_cameraData.setDataToCamera(SceneManager.Instance.defaultCamera); + MarkWindow.s_cameraData = null; + } + + FacilityInfoInSceneWindow.instance.createAllFacilities(this.buildingWindow.currentBuidngItem.buildingInfo.ModelInfo.facilityInfos); + if (ModeManager.currentMode == ModeType.Look) { + FacilityInfoInSceneWindow.instance.showFacilityByType(null, false); + } + } + } + + SceneManager.s_facilityWindow.updateAllFacilities(FacilityPosType.Outdoor); + + let instance = this; + this.onChangeFacilityObserver = EventManager.addListener(Event_ChangeFacility, ((eventInfo) => { + instance.onChangeFacility(eventInfo); + })); + + SceneManager.Instance.sunLight.intensity = 3; + } + //退出状态 + onExit() { + UIManager.hide(this.buildingWindow); + // console.log("==退出buildingStatus=="); + EventManager.removeListener(Event_ChangeFacility, this.onChangeFacilityObserver); + super.onExit(); + } + + //#endregion + + //改变当前选中的建筑 + changeCurrentBuilding(buildingInfo: BuildingInfo) { + + if (buildingInfo == this.currentBuildingInfo) { + return; + } + + // console.log("改变当前建筑" + buildingInfo.buildingData.normalData.key); + //FacilityInfoInSceneWindow.instance.clearFacilityInfoUIItemes(); + if (this.currentBuildingInfo != null) { + // this.buildingWindow.clearFacilityInfos(this.currentBuildingInfo); + //隐藏 + this.buildingWindow.showFacilityInfosIcon(this.currentBuildingInfo, false); + } + + this.currentBuildingInfo = buildingInfo; + + + FacilityInfoInSceneWindow.instance.createAllFacilities(buildingInfo.ModelInfo.facilityInfos); + if (this.currentBuildingInfo.ModelInfo.facilityInfos != null && ModeManager.currentMode == ModeType.Edit) { + //判断已经有了就不创建了 + // InfoManager.createFacilityInfos(buildingInfo.buildingData.outdoorData, buildingInfo); + //显示 + this.buildingWindow.showFacilityInfosIcon(this.currentBuildingInfo, true); + } + + } + + //模型变化 + onChangeFacility(eventInfo: Event_ChangeFacility) { + if (eventInfo.modeleData instanceof ModelData_facility) { + let modelEditData: ModelEditData; + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + modelEditData = this.currentBuildingInfo.buildingData.outdoorData; + } + + if (eventInfo.modelChangeType == ModelChangeType.Add) { + modelEditData.addFacility(eventInfo.modeleData); + // console.log("添加设备数据" + eventInfo.modeleData.key); + } + else if (eventInfo.modelChangeType == ModelChangeType.Remove) { + modelEditData.removeFacility(eventInfo.modeleData); + + // console.log("移除设备数据" + eventInfo.modeleData.key); + } + } + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/status/indoor-status.ts b/src/app/babylon/controller/status/indoor-status.ts new file mode 100644 index 0000000..5940425 --- /dev/null +++ b/src/app/babylon/controller/status/indoor-status.ts @@ -0,0 +1,127 @@ +import { Observable, Observer } from "@babylonjs/core"; +import { BuildingData_Normal } from "../../model/data/institution/building/building-data"; +import { ModelData } from "../../model/data/model-data/model-data"; +import { FacilityPosType, ModelData_facility } from "../../model/data/model-data/model-data-facility"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { BuildingInfo_Normal } from "../../model/info/building/building-info-normal"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { IndoorFloorUIItem } from "../../view/indoor-window/indoor-floorui-item"; +import { IndoorWindow } from "../../view/indoor-window/indoor-window"; + +import { ModelChangeType } from "../data-manager"; +import { EventManager } from "../event-manager/event-manager"; +import { Event_ChangeFacility } from "../event-manager/events/event-change-facility"; +import { SceneManager } from "../scene-manager"; +import { UIManager } from "../ui-manager"; +import { StatusBase, StatusManager } from "./status-manager"; + +//室内模式 +export class IndoorStatus extends StatusBase { + buildingInfo: BuildingInfo_Normal; + indoorWindow: IndoorWindow; + + //indoorInfos:BuildingInfo[];//室内信息(运行时) + indoorData: BuildingData_Normal; //室内信息(纯数据) + + onChangeFacilityObserver: Observer; + + static changeStatusFromUI: boolean = false;//因为ui而切换 + static startEnterObservable: Observable = new Observable();//开始切入 + static enterSuccessObservable: Observable = new Observable();//进入成功的事件 + + //初始化 + onCreate() { + super.onCreate(); + // this.enterSuccessObservable = new Observable(); + } + //进入状态 + onEnter() { + super.onEnter(); + if (this.indoorWindow == null) { + this.indoorWindow = UIManager.open(IndoorWindow); + } else { + UIManager.show(this.indoorWindow); + } + + let instance = this; + this.onChangeFacilityObserver = EventManager.addListener(Event_ChangeFacility, (eventInfo) => { + instance.onChangeFacility(eventInfo); + }) + + GizmoTool.onPickMeshInfoObservable.notifyObservers(null);//取消之前的选中 + + SceneManager.s_facilityInfoInSceneWindow.clearFacilityInfoUIItemes();//先清空 + SceneManager.s_facilityWindow.updateAllFacilities(FacilityPosType.Indoor); + SceneManager.Instance.sunLight.intensity = 1; + } + //退出状态 + onExit() { + EventManager.removeListener(Event_ChangeFacility, this.onChangeFacilityObserver); + UIManager.hide(this.indoorWindow); + this.clearIndoorInfo(); + super.onExit(); + } + + init(buildingInfo: BuildingInfo_Normal, key: string) { + this.buildingInfo = buildingInfo; + this.indoorData = buildingInfo.buildingData as BuildingData_Normal; + + this.indoorWindow.initAllFloor(this.indoorData.indoorsData, key); + } + + //清空室内运行时信息 + clearIndoorInfo() { + console.log('清空室内'); + this.indoorWindow.clearAllFloorUIItem(); + + if (this.indoorWindow.currentFloorUIItem != null && + this.indoorWindow.currentFloorUIItem.buildingInfo != null) { + GizmoTool.leaveTheGizmoAim(this.indoorWindow.currentFloorUIItem.buildingInfo.ModelInfo); + } + + this.indoorWindow.currentFloorUIItem = null; + } + + //模型Data数据变化 + onChangeFacility(eventInfo: Event_ChangeFacility) { + if (eventInfo.modeleData instanceof ModelData_facility) { + let modelEditData: ModelEditData; + + modelEditData = (StatusManager.s_currentStatus as IndoorStatus) + .indoorWindow.currentFloorUIItem.modelEditData; + + if (eventInfo.modelChangeType == ModelChangeType.Add) { + modelEditData.addFacility(eventInfo.modeleData); + } else if (eventInfo.modelChangeType == ModelChangeType.Remove) { + modelEditData.removeFacility(eventInfo.modeleData); + } + } + } + + //创建新的室内数据 + newIndoorData(key: string, name: string, isRefugeFloor: boolean): ModelEditData { + let newIndoorData = new ModelEditData(); + + newIndoorData.modelData = new ModelData(); + newIndoorData.modelData.key = key; + newIndoorData.modelData.name = name; + newIndoorData.isRefugeFloor = isRefugeFloor; + return newIndoorData; + } + + //将新的室内添加到当前建筑中 + addNewIndoorToBuilding(newIndoorData: ModelEditData) { + let buildingData = this.buildingInfo.buildingData as BuildingData_Normal; + if (buildingData.indoorsData == null) { + buildingData.indoorsData = []; + } + newIndoorData.index = buildingData.getNextIndoorIndex(); + //设置index为最大+1 + buildingData.indoorsData.push(newIndoorData); + + } + + + + +} diff --git a/src/app/babylon/controller/status/login-status.ts b/src/app/babylon/controller/status/login-status.ts new file mode 100644 index 0000000..b5a796a --- /dev/null +++ b/src/app/babylon/controller/status/login-status.ts @@ -0,0 +1,224 @@ +import { HttpErrorResponse } from "@angular/common/http"; +import { plainToClass } from "class-transformer"; +import { InstitutionData, NormalData } from "../../model/data/institution/institution-data"; +import { InsitutionDataSimple } from "../../model/data/institution/institution-data-simple"; +import { BabylonTool } from "../../tool/babylon-tool"; +import { InstitutionCreateWindow } from "../../view/institution/institution-create-window"; +import { InstitutionSelectWindow } from "../../view/institution/institution-select-window"; +import { TopbarWindow } from "../../view/topbar-window/topbar-window"; + +import { DataManager } from "../data-manager"; +import { SceneManager } from "../scene-manager"; +import { ServeManager } from "../serve-manager"; +import { UIManager } from "../ui-manager"; +import { MainStatus } from "./main-status"; +import { StatusBase, StatusManager } from "./status-manager"; + +export class LoginSatus extends StatusBase { + + institutionSelectWindow: InstitutionSelectWindow; + + institutionCreateWindow: InstitutionCreateWindow; + + institutionList: InsitutionDataSimple[];//单位简易信息列表 + + + //#region 前端对接 + + /** + * 新建单位 + * @param insData 新的单位信息 + */ + createInsitution(key: string, name: string, onSuccess?: (insDataSimple: InsitutionDataSimple) => void) { + + if (key == null) { + console.error("创建单位key为null"); + return; + } + let insData = new InstitutionData(); + insData.normalData = new NormalData(key, name); + + this.saveNewIns(this, insData, key, onSuccess); + } + + //#endregion + + + //#region 外部方法 + + + /** + * 获取单位简易信息列表 + * @param onSuccess 获取成功的回调 + */ + getInstitutionListFromServe(onSuccess?: (result: InsitutionDataSimple[], data?: any) => void, onFail?: (error: string) => void) { + let debugList: any | InsitutionDataSimple[] = []; + // let testIns1 = new InsitutionDataSimple(); + // testIns1.key = "test"; + // testIns1.name = "测试单位1"; + // debugList.push(testIns1); + ServeManager.instance.getInstitutionData("InsList", (key, data) => { + debugList = plainToClass(InsitutionDataSimple, data); + this.institutionList = debugList; + if (onSuccess) { + onSuccess(debugList, data); + } + }, (key: string, error: any) => { + console.error("获取单位列表失败"); + console.log(error); + if (error instanceof HttpErrorResponse && error.status === 404) { + //数据库没有数据,新建 + this.institutionList = []; + if (onSuccess) { + onSuccess(this.institutionList, this.institutionList); + } + console.log("新建数据列表"); + } + else { + if (onFail) { + onFail(error); + } + } + + return; + }) + } + + + /** + * 选择单位完成,初始化数据(向服务器请求完整数据) + * @param simpleData 选择的单位 + */ + onSelectInsSuccess(simpleData: InsitutionDataSimple) { + let status: LoginSatus = StatusManager.getStatus(LoginSatus); + if (status.institutionSelectWindow != null) { + UIManager.close(status.institutionSelectWindow); + status.institutionSelectWindow = null; + } + + DataManager.init(simpleData, (resultkey) => { + StatusManager.enterStatus(MainStatus); + }); + + } + + + + //#endregion + + + //#region 生命周期 + //初始化 + onCreate() { + super.onCreate(); + + } + //进入状态 + onEnter() { + super.onEnter(); + + console.log("进入 logins"); + + BabylonTool.importMeshSync("", "assets/mesh/outdoor/ZhuTi/ZhuTi.gltf", undefined, undefined, undefined, (meshes) => { + console.log("加载完成", meshes); + }); + + //UIManager.open(TopbarWindow); + // this.openSelectWindow();//可以开启选择、新建单位 + + + } + //退出状态 + onExit() { + + super.onEnter(); + + } + + //开启选择界面 + openSelectWindow() { + console.log("=======开启选择界面"); + this.institutionSelectWindow = UIManager.open(InstitutionSelectWindow); + console.log(this.institutionSelectWindow); + let status = this; + this.institutionSelectWindow.getInsList(status.onSelectInsSuccess); + } + + //关闭选择界面 + closeSelectWindow() { + if (this.institutionSelectWindow != null) { + UIManager.close(this.institutionSelectWindow); + this.institutionSelectWindow = null; + } + } + + + //新建完成 + onCreateInsSuccess(insData: InsitutionDataSimple) { + + this.closeCreateWindow(); + + let isOverWrite = false; + for (let i = 0; i < this.institutionList.length; i++) { + if (this.institutionList[i].key == insData.key) { + this.institutionList[i].name = insData.name; + isOverWrite = true; + break; + } + } + + if (!isOverWrite) { + this.institutionList.push(insData); + } + + let status = this; + + ServeManager.instance.saveInstitutionListData(this.institutionList, () => { + //进入新单位 + status.onSelectInsSuccess(insData); + }); + + } + //#endregion + + //#region babylonGUI 新建单位 + //开启新建界面 + onNewIns() { + this.closeSelectWindow(); + + this.institutionCreateWindow = UIManager.open(InstitutionCreateWindow); + let status = this; + this.institutionCreateWindow.startCreate(); + + } + + //关闭创建界面 + closeCreateWindow() { + if (this.institutionCreateWindow != null) { + UIManager.close(this.institutionCreateWindow); + } + this.institutionCreateWindow = null; + + + } + + + //保存新单位信息至服务器 + saveNewIns(status: LoginSatus, insData: InstitutionData, key: string, onSuccess?: (insDataSimple: InsitutionDataSimple) => void) { + ServeManager.instance.saveInstitutionData(insData, key, (key, result) => { + console.log("在服务器新建单位" + key); + let insDataSimple = new InsitutionDataSimple(); + insDataSimple.key = key; + insDataSimple.name = insData.normalData.name; + status.onCreateInsSuccess(insDataSimple); + if (onSuccess != null) { + onSuccess(insDataSimple); + } + }); + } + + + + //#endregion + +} \ No newline at end of file diff --git a/src/app/babylon/controller/status/main-status.ts b/src/app/babylon/controller/status/main-status.ts new file mode 100644 index 0000000..29d68d8 --- /dev/null +++ b/src/app/babylon/controller/status/main-status.ts @@ -0,0 +1,28 @@ + +import { DataManager } from "../data-manager"; +import { BuildingStatus } from "./building-status"; +import { StatusBase, StatusManager } from "./status-manager"; + +//主状态 +export class MainStatus extends StatusBase { + //初始化 + onCreate() { + super.onCreate(); + } + //进入状态 + onEnter() { + super.onEnter(); + + + if (DataManager.institutionData == null) { + //新建单位信息、开启上传建筑模型的界面 + } else { + //已有信息,进入建筑物模式 + StatusManager.enterStatus(BuildingStatus); + } + } + //退出状态 + onExit() { + super.onExit(); + } +} diff --git a/src/app/babylon/controller/status/status-manager.ts b/src/app/babylon/controller/status/status-manager.ts new file mode 100644 index 0000000..bb85945 --- /dev/null +++ b/src/app/babylon/controller/status/status-manager.ts @@ -0,0 +1,74 @@ +//状态管理 +export class StatusManager { + //所有已经实例化的status + static s_allStatus: StatusBase[] = []; + //当前状态 + static s_currentStatus: StatusBase; + + //获取已经有的目标类型status + static getStatus(c: { new(): T; }): T { + + if (StatusManager.s_allStatus == null) { + return null; + } + for (let i = 0; i < StatusManager.s_allStatus.length; i++) { + + if ((StatusManager.s_allStatus[i]) instanceof c) { + let result = StatusManager.s_allStatus[i]; + return result; + + } + } + return null; + } + + //创建status + static createStatus(c: { new(): T }): T { + let newStatus = StatusManager.getStatus(c); + if (newStatus == null) { + newStatus = new c(); + newStatus.onCreate(); + StatusManager.s_allStatus.push(newStatus); + } + + return newStatus; + } + + //进入某状态 + static enterStatus(c: { new(): T }): T { + if (StatusManager.s_currentStatus != null) { + // console.log("退出status"); + // console.log(StatusManager.s_currentStatus); + StatusManager.s_currentStatus.onExit(); + } + let newStatus = StatusManager.getStatus(c); + if (newStatus == null) { + newStatus = new c(); + newStatus.onCreate(); + StatusManager.s_allStatus.push(newStatus); + } + // console.log("进入status"); + // console.log(newStatus); + + StatusManager.s_currentStatus = newStatus; + newStatus.onEnter(); + return newStatus; + } +} + + +//状态基类 +export class StatusBase { + //初始化 + onCreate() { + + } + //进入状态 + onEnter() { + + } + //退出状态 + onExit() { + + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/ui-manager.ts b/src/app/babylon/controller/ui-manager.ts new file mode 100644 index 0000000..a842cba --- /dev/null +++ b/src/app/babylon/controller/ui-manager.ts @@ -0,0 +1,43 @@ +import { AdvancedDynamicTexture } from "@babylonjs/gui"; +import { UIBase } from "../view/window-base/ui-base"; + +export class UIManager { + public static _instance: UIManager; + static get Instance(): UIManager { + if (UIManager._instance == null) { + UIManager._instance = new UIManager(); + } + return UIManager._instance; + } + + public uiRoot: AdvancedDynamicTexture; + + + public init() { + this.uiRoot = AdvancedDynamicTexture.CreateFullscreenUI("UIRoot", undefined);//UtilityLayerRenderer.DefaultUtilityLayer.utilityLayerScene + + } + + static open(c: { new(): T }): T { + let ui: T = new c(); + ui.onInit(); + ui.onOpen(); + return ui; + } + + static close(ui: T) { + + ui.onClose(); + ui.root.dispose(); + } + + static hide(ui: T) { + ui.onHide(); + } + + static show(ui: T) { + ui.onShow(); + } +} + + diff --git a/src/app/babylon/game.ts b/src/app/babylon/game.ts new file mode 100644 index 0000000..ba9a346 --- /dev/null +++ b/src/app/babylon/game.ts @@ -0,0 +1,58 @@ +import { Database, Engine, RenderingManager, Scene } from "@babylonjs/core"; +import { AdvancedDynamicTexture } from "@babylonjs/gui"; + +import { SceneManager } from "./controller/scene-manager"; +import { LoginSatus } from "./controller/status/login-status"; +import { StatusManager } from "./controller/status/status-manager"; +import { UIManager } from "./controller/ui-manager"; + + +export class Game { + public canvas: HTMLCanvasElement; + public engine: Engine; + public scene: Scene; + public uiRoot: AdvancedDynamicTexture; + + static instance: Game; + + //初始化引擎和画布 + public init(canvas: HTMLCanvasElement) { + Game.instance = this; + this.canvas = canvas; + this.engine = new Engine(canvas, null, { stencil: true }); + Database.IDBStorageEnabled = true;//开启本地缓存 + this.scene = new Scene(this.engine); + this.scene.useRightHandedSystem = true;//使用右手坐标系 + RenderingManager.MIN_RENDERINGGROUPS = -1;//最小渲染序列 + + this.createScene(); + let scene = this.scene; + // canvas.translate = true; //用于设置背景透明 + // scene.autoClear = true; + UIManager.Instance.init(); + + StatusManager.enterStatus(LoginSatus); + + //最后,将场景渲染出来 (重要,不可缺少) + this.engine.runRenderLoop(function () { + scene.render(); + }) + + // 监听浏览器改变大小的事件,通过调用engine.resize()来自适应窗口大小 + window.addEventListener("resize", function () { + Game.instance.engine.resize(); + }); + + } + + //创建初始场景 + private createScene() { + let sceneManager = SceneManager.init(this.scene, this.canvas, this.engine); + sceneManager.initArcRotateCamera(); + sceneManager.initLight(); + sceneManager.updateSceneBG(); + sceneManager.initSceneEvent(); + } + +} + diff --git a/src/app/babylon/model/data/camera-data.ts b/src/app/babylon/model/data/camera-data.ts new file mode 100644 index 0000000..8ab6ed5 --- /dev/null +++ b/src/app/babylon/model/data/camera-data.ts @@ -0,0 +1,37 @@ +import { ArcRotateCamera, Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; + +/** + * 自由旋转相机的数据 + */ +export class ArcRotateCameraData { + + @Type(() => Vector3) + target: Vector3; + radius: number; + alpha: number; + beta: number; + + /** + * 将数据设置到相机上 + * @param camera + */ + setDataToCamera(camera: ArcRotateCamera) { + camera._scene.stopAnimation(camera); + camera.target = this.target; + camera.radius = this.radius; + camera.alpha = this.alpha; + camera.beta = this.beta; + } + + /** + * 将摄像机的数据记录下来 + * @param camera + */ + getDataFromCamera(camera: ArcRotateCamera) { + this.target = camera.target; + this.radius = camera.radius; + this.alpha = camera.alpha; + this.beta = camera.beta; + } +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/building/building-data.ts b/src/app/babylon/model/data/institution/building/building-data.ts new file mode 100644 index 0000000..d2b5405 --- /dev/null +++ b/src/app/babylon/model/data/institution/building/building-data.ts @@ -0,0 +1,70 @@ +import { Type } from "class-transformer"; +import { ModelEditData } from "../../model-data/model-edit-data"; + +import { NormalData } from "../institution-data"; + +//基础建筑信息 +export class BuildingData { + // belongToInstitution: InstitutionData + @Type(() => NormalData) + normalData: NormalData; //常规信息 + buildingIDFromPlatform: string;//关联自预案管理平台中的建筑id + describe: string; //描述 + buildingType: BuildingType; //建筑类型 + @Type(() => ModelEditData) + outdoorData: ModelEditData; //外观建筑编辑信息 + + constructor() { + // this.belongToInstitution = belongToInstitution; + this.normalData = new NormalData(); + this.outdoorData = new ModelEditData(); + } +} + +//普通大楼信息 +export class BuildingData_Normal extends BuildingData { + @Type(() => ModelEditData) + indoorsData: ModelEditData[];//室内编辑信息 + constructor() { + super(); + this.buildingType = BuildingType.Normal; + } + + /** + * 获取下一个室内层的index序号 + */ + getNextIndoorIndex() { + let result = -1; + for (let i = 0; i < this.indoorsData.length; i++) { + if (this.indoorsData[i].index > result) { + result = this.indoorsData[i].index; + } + } + result++; + return result; + } +} + + +//环境信息 +export class BuildingData_Environment extends BuildingData { + constructor() { + super(); + this.buildingType = BuildingType.Environment; + } +} + +//化工厂信息 +export class BuildingData_ChemicalPlant extends BuildingData { + constructor() { + super(); + this.buildingType = BuildingType.ChemicalPlant; + } +} + +//建筑类型 +export enum BuildingType { + Normal = "normal", //普通大楼 + Environment = "environment", //环境 + ChemicalPlant = "chemicalPlant", //化工厂 +} diff --git a/src/app/babylon/model/data/institution/facility/all-facility-data.ts b/src/app/babylon/model/data/institution/facility/all-facility-data.ts new file mode 100644 index 0000000..b6decfa --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/all-facility-data.ts @@ -0,0 +1,79 @@ +import { Type } from 'class-transformer'; +import { ConfigManager } from 'src/app/babylon/controller/config-manager'; +import { DataManager } from 'src/app/babylon/controller/data-manager'; + + +import { FacilityPosType, FacilityType, ModelData_facility } from '../../model-data/model-data-facility'; +import { TransformData } from '../../transform-data'; + +//所有设备数据 +export class AllFacilityData { + @Type(() => ModelData_facility) + indoor: ModelData_facility[] = []; //室内 + @Type(() => ModelData_facility) + outdoor: ModelData_facility[] = []; //室外 + + /**捏造所有消防设施的源数据 */ + static CreateAllFacilityData(): AllFacilityData { + let result = new AllFacilityData(); + + AllFacilityData.newFacilityData(FacilityType.AQCK, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.DSXHS, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.DXXHS, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.SZDSXHS, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.SZDXXHS, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.DSSBJHQ, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.DXSBJHQ, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.QBSBJHQ, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.DGNSBJHQ, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.GD, FacilityPosType.Outdoor, result, false); + AllFacilityData.newFacilityData(FacilityType.PL, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.JTQ, FacilityPosType.Outdoor, result, false); + AllFacilityData.newFacilityData(FacilityType.JJQ, FacilityPosType.Outdoor, result, false); + AllFacilityData.newFacilityData(FacilityType.TPBZ, FacilityPosType.Outdoor, result, true); + + AllFacilityData.newFacilityData(FacilityType.XKS, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.BF, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.SX, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.LSXFB, FacilityPosType.Indoor, result); + AllFacilityData.newFacilityData(FacilityType.WSXFB, FacilityPosType.Indoor, result); + AllFacilityData.newFacilityData(FacilityType.CYXFB, FacilityPosType.Indoor, result); + AllFacilityData.newFacilityData(FacilityType.FHFQ, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.SNXHS, FacilityPosType.Indoor, result); + AllFacilityData.newFacilityData(FacilityType.FHM, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.FHJL, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.SSLT, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.XFDT, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.PTDT, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.HT, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.WXY, FacilityPosType.Public, result); + AllFacilityData.newFacilityData(FacilityType.ZDQY, FacilityPosType.Public, result); + AllFacilityData.newFacilityData(FacilityType.DWBZ, FacilityPosType.Public, result); + return result; + + } + + //新建设备信息 + static newFacilityData(type: FacilityType, posType: FacilityPosType, allFacilityData: AllFacilityData, isModel: boolean = true): ModelData_facility { + let name = ConfigManager.getFacilityTypeName(type); + let result = new ModelData_facility(type.toString(), type, name, DataManager.getResName_facility(type) + ".gltf", new TransformData(), posType, isModel); + switch (posType) { + case FacilityPosType.Outdoor: + allFacilityData.outdoor.push(result); + break; + case FacilityPosType.Indoor: + allFacilityData.indoor.push(result); + break; + case FacilityPosType.Public: + allFacilityData.outdoor.push(result); + allFacilityData.indoor.push(result); + break; + } + return result; + } + + +} + + + diff --git a/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-img.ts b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-img.ts new file mode 100644 index 0000000..82a0d34 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-img.ts @@ -0,0 +1,30 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 图片类 基础类 + */ +export class PropertyData_Base_IMG extends PropertyData_Base { + + img: string;//图片 + is360: boolean;//全景图片 + pos: string;//位置 + info: string;//详情 + + constructor(key: string, img: string, pos: string, info: string, type: FacilityType) { + super(key, type); + this.img = img; + this.pos = pos; + this.info = info; + this.is360 = false; + } + + clone(key: string) { + let result = new PropertyData_Base_IMG(key, this.img, this.pos, this.info, this.facilityType); + result.is360 = this.is360; + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-lt.ts b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-lt.ts new file mode 100644 index 0000000..aacd1ce --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-lt.ts @@ -0,0 +1,27 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 楼梯基础类 + */ +export class PropertyData_Base_LT extends PropertyData_Base { + + number: string = "";//编号 + channel: string = "";//通往层数 + + constructor(key: string, number: string, channel: string, type: FacilityType) { + super(key, type); + this.number = number; + this.channel = channel; + + } + + clone(key: string) { + let result = new PropertyData_Base_LT(key, this.number, this.channel, this.facilityType); + + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-sbjhq.ts b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-sbjhq.ts new file mode 100644 index 0000000..55b2e6f --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-sbjhq.ts @@ -0,0 +1,31 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 水泵接合器 基础类 + */ +export class PropertyData_Base_SBJHQ extends PropertyData_Base { + + number: string;//编号 + type: string;//类型(特殊字段,关系UI分类展示) + range: string;//供给范围 + img: string;//图片 + is360: boolean;//是否是全景图片 + + constructor(key: string, number: string, type: string, range: string, img: string, facilityType: FacilityType) { + super(key, facilityType); + this.number = number; + this.type = type; + this.range = range; + this.img = img; + this.is360 = false; + } + + clone(key: string) { + let result = new PropertyData_Base_SBJHQ(key, this.number, this.type, this.range, this.img, this.facilityType); + result.is360 = this.is360; + return result; + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xfb.ts b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xfb.ts new file mode 100644 index 0000000..2fc86e2 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xfb.ts @@ -0,0 +1,34 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 消防泵基础类 + */ +export class PropertyData_Base_XFB extends PropertyData_Base { + + type: string;//类型 + number: string;//型号 + power: string;//功率 + lift: string;//扬程 + flow: string;//流量 + pressure: string;//压力 + + constructor(key: string, type: string, number: string, power: string, lift: string, flow: string, pressure: string, facilityType: FacilityType) { + super(key, facilityType); + this.type = type; + this.power = power; + this.number = number; + this.lift = lift; + this.flow = flow; + this.pressure = pressure; + } + + clone(key: string) { + let result = new PropertyData_Base_XFB(key, this.type, this.number, this.power, this.lift, this.flow, this.pressure, this.facilityType); + + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xhs.ts b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xhs.ts new file mode 100644 index 0000000..756bd5c --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xhs.ts @@ -0,0 +1,32 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 消火栓基础类 + */ +export class PropertyData_Base_XHS extends PropertyData_Base { + + img: string;//图片 + is360: boolean;//全景图片 + number: string;//编号 + caliber: string;//管径 + screw: string;//牙口 + + constructor(key: string, img: string, is360: boolean, number: string, caliber: string, screw: string, type: FacilityType) { + super(key, type); + this.img = img; + this.is360 = is360; + this.number = number; + this.caliber = caliber; + this.screw = screw; + } + + clone(key: string) { + let result = new PropertyData_Base_XHS(key, this.img, this.is360, this.number, this.caliber, this.screw, this.facilityType); + + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-dwbz.ts b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-dwbz.ts new file mode 100644 index 0000000..6fb94f5 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-dwbz.ts @@ -0,0 +1,27 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 点位标注 + */ +export class PropertyData_DWBZ extends PropertyData_Base { + + + pos: string = "";//位置 + info: string = "";//详情 + constructor(key: string, pos: string, info: string) { + super(key, FacilityType.DWBZ); + this.pos = pos; + this.info = info; + } + + clone(key: string) { + let result = new PropertyData_DWBZ(key, this.pos, this.info); + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-fhfq.ts b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-fhfq.ts new file mode 100644 index 0000000..ce294f5 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-fhfq.ts @@ -0,0 +1,31 @@ +import { Color3, Color4 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 防火分区 + */ +export class PropertyData_FHFQ extends PropertyData_Base { + + + name: string = "";//名称 + area: string = "";//面积 + @Type(() => Color3) + color: Color3 = Color3.Red();//颜色 + constructor(key: string, name: string, area: string, color: Color3 = Color3.Red()) { + super(key, FacilityType.FHFQ); + this.name = name; + this.area = area; + this.color = color; + } + + clone(key: string) { + let result = new PropertyData_FHFQ(key, this.name, this.area, this.color); + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-sslt.ts b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-sslt.ts new file mode 100644 index 0000000..eb47672 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-sslt.ts @@ -0,0 +1,26 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base_LT } from "../base/property-data-base-lt"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 疏散楼梯 + */ +export class PropertyData_SSLT extends PropertyData_Base_LT { + + width: string = "";//宽度 + + constructor(key: string, number: string, channel: string, width: string) { + super(key, number, channel, FacilityType.SSLT); + this.width = width; + } + + clone(key: string) { + let result = new PropertyData_SSLT(key, this.number, this.channel, this.width); + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-xfdt.ts b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-xfdt.ts new file mode 100644 index 0000000..7bf5ad3 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-xfdt.ts @@ -0,0 +1,24 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base_LT } from "../base/property-data-base-lt"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 消防电梯 + */ +export class PropertyData_XFDT extends PropertyData_Base_LT { + + weight: string = "";//载重 + + constructor(key: string, number: string, channel: string, weight: string) { + super(key, number, channel, FacilityType.XFDT); + this.weight = weight; + } + + clone(key: string) { + let result = new PropertyData_XFDT(key, this.number, this.channel, this.weight); + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-zdqy.ts b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-zdqy.ts new file mode 100644 index 0000000..1afcb8d --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-zdqy.ts @@ -0,0 +1,42 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 重点区域 + */ +export class PropertyData_ZDQY extends PropertyData_Base { + + name: string = "";//名称 + pos: string = "";//所在位置 + construction: string = "";//建筑结构 + character: string = "";//使用性质 + danger: string = "";//主要危险性 + imgs: string[] = [];//图片 + + constructor(key: string, name: string, pos: string, construction: string, character: string, danger: string, imgs: string[]) { + super(key, FacilityType.ZDQY); + this.name = name; + this.pos = pos; + this.construction = construction; + this.character = character; + this.danger = danger; + this.imgs = imgs; + } + + clone(key: string) { + + let newImgs: string[] = []; + + for (let i = 0; i < this.imgs.length; i++) { + newImgs.push(this.imgs[i]); + } + + let result = new PropertyData_ZDQY(key, this.name, this.pos, this.construction, this.character, this.danger, newImgs); + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-aqck.ts b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-aqck.ts new file mode 100644 index 0000000..e6e2c38 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-aqck.ts @@ -0,0 +1,31 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 安全出口 + */ +export class PropertyData_AQCK extends PropertyData_Base { + + img: string = ""; + is360: boolean;//全景图片 + name: string = "安全出口"; + width: string = ""; + constructor(key: string, img: string, is360: boolean, name: string, width: string) { + super(key, FacilityType.AQCK); + this.img = img; + this.is360 = is360; + this.name = name; + this.width = width; + } + + clone(key: string) { + let result = new PropertyData_AQCK(key, this.img, this.is360, "安全出口", "1"); + + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-gd.ts b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-gd.ts new file mode 100644 index 0000000..b1d9cb0 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-gd.ts @@ -0,0 +1,26 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 高度 + */ +export class PropertyData_GD extends PropertyData_Base { + + + info: string = ""; + constructor(key: string, info: string) { + super(key, FacilityType.GD); + this.info = info; + } + + clone(key: string) { + let result = new PropertyData_GD(key, this.info); + + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-pl.ts b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-pl.ts new file mode 100644 index 0000000..d9775ef --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-pl.ts @@ -0,0 +1,36 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 毗邻 + */ +export class tableData { + public tableRow: string[] +} +export class tableRow { + public street: string = "" + public adjoinBuilding: string = "" + public range: string = "" +} +export class PropertyData_PL extends PropertyData_Base { + + direction: number = 0; //毗邻所属方向 0,1,2,3 --- 东南西北 + info: string = ""; + tableData: tableData[] = []; + constructor(key: string, direction: number, info: string, tableData: tableData[]) { + super(key, FacilityType.PL); + this.direction = direction; + this.info = info; + this.tableData = tableData + } + + clone(key: string) { + let result = new PropertyData_PL(key, this.direction, this.info, this.tableData); + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-q.ts b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-q.ts new file mode 100644 index 0000000..adb9f00 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-q.ts @@ -0,0 +1,37 @@ +import { Color3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { FacilityType } from "../../../../model-data/model-data-facility"; + +import { PropertyData_Base_IMG } from "../base/property-data-base-img"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 集结区和禁停区 + */ +export class PropertyData_Q extends PropertyData_Base_IMG { + + @Type(() => Color3) + color: Color3;//区域颜色 + constructor(key: string, img: string, pos: string, info: string, color: Color3, type: FacilityType) { + super(key, img, pos, info, type); + this.color = color; + if (color == null) { + switch (type) { + case FacilityType.JTQ: + this.color = Color3.Yellow(); + break; + case FacilityType.JJQ: + this.color = Color3.Green(); + break; + } + } + } + + clone(key: string) { + let result = new PropertyData_Q(key, this.img, this.pos, this.info, this.color, this.facilityType); + + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/property-data-base.ts b/src/app/babylon/model/data/institution/facility/property-data/property-data-base.ts new file mode 100644 index 0000000..3d96019 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/property-data-base.ts @@ -0,0 +1,38 @@ + +import { classToClass } from "class-transformer"; +import { FacilityType } from "../../../model-data/model-data-facility"; + +//基本属性 +export abstract class PropertyData_Base { + + static readonly c_defaultText = "----"; //文字默认值 + + /** + * 唯一身份key + */ + key: string; + /** + * 设备具体类型 + */ + facilityType: FacilityType; + + /** + * 自定义名称 + */ + name: string; + + + constructor(key: string, facilityType: FacilityType) { + this.key = key; + this.facilityType = facilityType; + } + + clone(key: string): PropertyData_Base { + let result = classToClass(this); + result.key = key; + return result; + } + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/property-data-public.ts b/src/app/babylon/model/data/institution/facility/property-data/property-data-public.ts new file mode 100644 index 0000000..969ea84 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/property-data-public.ts @@ -0,0 +1,14 @@ +import { PropertyData_Base } from "./property-data-base"; + +//暂时用于哪些还没有具体实现的属性 +export class PropertyData_public extends PropertyData_Base { + + + clone(key: string) { + + let result = new PropertyData_public(key, this.facilityType); + return result; + + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/institution-data-simple.ts b/src/app/babylon/model/data/institution/institution-data-simple.ts new file mode 100644 index 0000000..6c54561 --- /dev/null +++ b/src/app/babylon/model/data/institution/institution-data-simple.ts @@ -0,0 +1,5 @@ +//简易单位基本信息,用于显示于列表中 +export class InsitutionDataSimple { + key: string;//唯一身份key + name: string;//自定义的名称 +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/institution-data.ts b/src/app/babylon/model/data/institution/institution-data.ts new file mode 100644 index 0000000..9910b73 --- /dev/null +++ b/src/app/babylon/model/data/institution/institution-data.ts @@ -0,0 +1,87 @@ +import { Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { BuildingData_ChemicalPlant, BuildingData_Environment, BuildingData_Normal, BuildingType } from "./building/building-data"; + +//单位信息 +export class InstitutionData { + + @Type(() => NormalData) + normalData: NormalData = null;//常规信息 + + @Type(() => BuildingData_Normal) + normalBuildingDatas: BuildingData_Normal[] = [];//普通建筑列表 + + @Type(() => BuildingData_Environment) + environmentDatas: BuildingData_Environment[] = [];//环境信息 + + @Type(() => BuildingData_ChemicalPlant) + chemicalPlantData: BuildingData_ChemicalPlant[] = [];//化工厂信息 + + @Type(() => Vector3) + pos: Vector3 = new Vector3(0, 0, 0); + + + //获取一个最新的key(根据前一个同类建筑key,加一) + public getNewKey(buildingType: BuildingType): string { + let result = ""; + + let lastNormalData: NormalData = null; + let length = 0; + switch (buildingType) { + case BuildingType.Normal: + if (this.normalBuildingDatas != null && this.normalBuildingDatas.length > 0) { + length = this.normalBuildingDatas.length; + lastNormalData = this.normalBuildingDatas[length - 1].normalData; + } + break; + case BuildingType.Environment: + if (this.environmentDatas != null && this.environmentDatas.length > 0) { + length = this.environmentDatas.length; + lastNormalData = this.environmentDatas[length - 1].normalData; + } + break; + case BuildingType.ChemicalPlant: + if (this.chemicalPlantData != null && this.chemicalPlantData.length > 0) { + length = this.chemicalPlantData.length; + lastNormalData = this.chemicalPlantData[length - 1].normalData; + } + break; + } + + let lastKey = 0; + if (lastNormalData != null) { + lastKey = Number.parseInt(lastNormalData.key); + lastKey++; + } + + result += lastKey; + + + return result; + } + + +} + +//常规、必有的信息 +export class NormalData { + + key: string;//唯一key + + name: string;//给用户编辑、查看用的名称 + constructor(key: string = "", name: string = "") { + + this.key = key; + this.name = name; + } + clone(): NormalData { + let result = new NormalData(this.key, this.name); + return result; + + } + + getName() { + //console.log("getName==" + this.name); + return this.name; + } +} \ No newline at end of file diff --git a/src/app/babylon/model/data/mark/all-mark-data.ts b/src/app/babylon/model/data/mark/all-mark-data.ts new file mode 100644 index 0000000..e567b20 --- /dev/null +++ b/src/app/babylon/model/data/mark/all-mark-data.ts @@ -0,0 +1,227 @@ +import { Type } from "class-transformer"; + +import { MarkData_Area } from "./other/mark-data-area"; +import { MarkData, MarkType, MarkKindType, MarkTagPos, MarkTask } from "./mark-data"; +import { MarkData_Line } from "./other/mark-data-line"; +import { MarkData_multiLine } from "./other/mark-data-multi-line"; +import { MarkData_multiArrow_CT, MarkData_multiArrow_JG } from "./other/mark-data-multi-arrow"; +import { ConfigManager } from "src/app/babylon/controller/config-manager"; + + +export class AllMarkData { + /** + * 灾情 + */ + @Type(() => MarkData) + marks_Disaster: MarkData[] = []; + + /** + * 消防力量 + */ + @Type(() => MarkData) + marks_FireFighting: MarkData[] = []; + + /** + * 联动力量 + */ + @Type(() => MarkData) + marks_Linkage: MarkData[] = []; + + /** + * 内部力量 + */ + @Type(() => MarkData) + marks_Inside: MarkData[] = []; + + /** + * 标绘工具 + */ + @Type(() => MarkData) + marks_Tool: MarkData[] = []; + + static CreateAllMarkData(): AllMarkData { + let result = new AllMarkData(); + + //灾情 + let tagPos: MarkTagPos = MarkTagPos.Disaster; + AllMarkData.newMarkData(MarkType.SYA, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.SYB, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.SYC, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.SYD, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZQR, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.WXP, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.ZWD, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.PCD, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.H, MarkKindType.Effect, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.TPH, MarkKindType.Effect, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.SNH, MarkKindType.Effect, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.YWA, MarkKindType.Effect, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.YWB, MarkKindType.Effect, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.YWC, MarkKindType.Effect, tagPos, result, undefined, false); + + //消防力量 + tagPos = MarkTagPos.FireFighting; + AllMarkData.newMarkData(MarkType.MHF, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.JYF, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.GRF, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.FHF, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.BHF, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.YWXFY, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.AQS, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.MTC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.XLC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.SGC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.PMC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.GPC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.DGPTC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.YTC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.QXJYC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.QCC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.ZMC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.PCC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.PYC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.ZHC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.GCGSC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.KQHXCQC, MarkKindType.Car, tagPos, result); + + //联动力量 + tagPos = MarkTagPos.Linkage; + AllMarkData.newMarkData(MarkType.GA, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.JJ, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.YS, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.QXRY, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.JHC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.JC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.DLQXC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.RQQXC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.GSQXC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.HBJCC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.JTYSC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.WSFYC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.YJTXC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.JCA, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.JCB, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.JCC, MarkKindType.Car, tagPos, result); + + //内部力量 + tagPos = MarkTagPos.Inside; + AllMarkData.newMarkData(MarkType.DSZ, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.JL, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.FZ, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.MS, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZJ, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZG, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZZ, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.QT, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.SJS, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.CXY, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZYA, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZYB, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.JG, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.BA, MarkKindType.Persion, tagPos, result); + + //标绘工具 + tagPos = MarkTagPos.Tool; + AllMarkData.newMarkData(MarkType.JJX, MarkKindType.Goods, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.SD, MarkKindType.Goods, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.JGLX, MarkKindType.Virtual, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.CT, MarkKindType.Virtual, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.ZHB, MarkKindType.Goods, tagPos, result, MarkTask.Unknown); + AllMarkData.newMarkData(MarkType.LT6, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.LT15, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.FSQ, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.STB, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.SP, MarkKindType.Goods, tagPos, result, MarkTask.WaterMonitor); + AllMarkData.newMarkData(MarkType.WZ, MarkKindType.Virtual, tagPos, result, MarkTask.Unknown); + AllMarkData.newMarkData(MarkType.JJQ, MarkKindType.Virtual, tagPos, result, MarkTask.Unknown, false); + AllMarkData.newMarkData(MarkType.QYSDA, MarkKindType.Virtual, tagPos, result, MarkTask.Unknown, false); + AllMarkData.newMarkData(MarkType.QYSDB, MarkKindType.Virtual, tagPos, result, MarkTask.Unknown, false); + + + return result; + } + + + + //新建设备信息 + /** + * 创建标绘物素材库数据 + * @param type + * @param kindType + * @param tagPos + * @param allMarkData + * @param taskType + * @param isModel + */ + static newMarkData(type: MarkType, kindType: MarkKindType, tagPos: MarkTagPos, allMarkData: AllMarkData, taskType?: MarkTask, isModel = true): MarkData { + + let l_taskType: MarkTask = MarkTask.None; + let list = []; + switch (tagPos) { + case MarkTagPos.Disaster: + list = allMarkData.marks_Disaster; + break; + case MarkTagPos.FireFighting: + list = allMarkData.marks_FireFighting + break; + case MarkTagPos.Linkage: + list = allMarkData.marks_Linkage; + break; + case MarkTagPos.Inside: + list = allMarkData.marks_Inside; + break; + case MarkTagPos.Tool: + list = allMarkData.marks_Tool; + break; + } + + //除了灾情以外, 人和车的任务类型 + if (tagPos != MarkTagPos.Disaster) { + if (kindType == MarkKindType.Persion) { + l_taskType = MarkTask.Person; + } + else if (kindType == MarkKindType.Car) { + l_taskType = MarkTask.Car; + } + } + + //没指定,则使用规则的任务类型 + if (taskType == null) { + taskType = l_taskType; + } + + let icon = ConfigManager.getMarkIconUrl(tagPos, type); + let modelPath = ConfigManager.getMarkModelPath(tagPos, type); + let modelName = type + ".gltf"; + + + let result = null; + switch (type) { + case MarkType.JJQ: + case MarkType.QYSDA: + case MarkType.QYSDB: + result = new MarkData_Area(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + case MarkType.JJX: + result = new MarkData_Line(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + case MarkType.SD: + result = new MarkData_multiLine(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + case MarkType.JGLX: + result = new MarkData_multiArrow_JG(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + case MarkType.CT: + result = new MarkData_multiArrow_CT(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + default: + result = new MarkData(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + } + + + list.push(result); + return result; + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/mark/mark-data.ts b/src/app/babylon/model/data/mark/mark-data.ts new file mode 100644 index 0000000..2d59abd --- /dev/null +++ b/src/app/babylon/model/data/mark/mark-data.ts @@ -0,0 +1,598 @@ +import { Type } from "class-transformer"; +import { ConfigManager } from "src/app/babylon/controller/config-manager"; + + +import { ModelData } from "../model-data/model-data"; +import { TransformData } from "../transform-data"; +import { MarkProperty } from "./mark-property"; + +/** + * 标绘数据 + */ +export class MarkData extends ModelData { + + + + + /** + * 名称类型,标志其具体是什么 + */ + type: MarkType = MarkType.SYA; + + /** + * 所属标签的tag + */ + tagPos: MarkTagPos = MarkTagPos.Disaster; + + /** + * 标记的类型划分 + * 包括:人、车、物、虚拟物、特效 + */ + markKindType: MarkKindType = MarkKindType.Persion; + + /** + * 图标地址 + */ + iconURL: string; + + /** + * 所属建筑 + */ + belongtoBuildingId: string; + + /** + * 属性 + */ + @Type(() => MarkProperty) + property: MarkProperty; + + /** + * 子节点信息(用于保存子节点变换信息,完成举臂等功能) + */ + @Type(() => ChildNodeData) + childrenNodeData: ChildNodeData[] = []; + + /** + * 水枪特效强度 + */ + waterPower: number = 20; + + + constructor(id: string, type: MarkType, tagPos: MarkTagPos, markKindType: MarkKindType, iconURL: string, resPath: string, resName: string, taskType: MarkTask, isModel: boolean) { + super(id, ConfigManager.getMarkName(type), resPath, resName, undefined, isModel) + this.name = ConfigManager.getMarkName(type); + this.type = type; + this.tagPos = tagPos; + this.markKindType = markKindType; + this.iconURL = iconURL; + + let defaultTask: string = undefined; + if (type == MarkType.WZ) { + defaultTask = "文字信息"; + } + + this.property = new MarkProperty(taskType, undefined, undefined, defaultTask); + } + +} + +/** + * 子节点数据 + */ +export class ChildNodeData { + /** + * 子节点名称 + */ + name: string; + + /** + * 变换信息 + */ + @Type(() => TransformData) + transformData: TransformData = new TransformData(); +} + +/** + * 所属标签的tag + */ +export enum MarkTagPos { + /** + * 灾情 + */ + Disaster = "Disaster", + + /** + * 消防力量 + */ + FireFighting = "FireFighting", + + /** + * 联动力量 + */ + Linkage = "Linkage", + + /** + * 内部力量 + */ + Inside = "Inside", + + /** + * 标绘工具 + */ + Tool = "Tool", + +} + +/** + * 标绘的分类类型 + */ +export enum MarkKindType { + /** + * 人 + */ + Persion = "Persion", + + /** + * 车 + */ + Car = "Car", + + /** + * 物品 + */ + Goods = "Goods", + + /** + * 虚拟物,如: 箭头、文字标记类 + */ + Virtual = "Virtual", + + /** + * 特效 + */ + Effect = "Effect", + +} + +/** + * 标绘的名称类型 + * 每个标会类型id + */ +export enum MarkType { + + //============灾情设定=============== + /** + * 伤员A + */ + SYA = "SYA", + /** + * 伤员B + */ + SYB = "SYB", + /** + * 伤员C + */ + SYC = "SYC", + /** + * 伤员D + */ + SYD = "SYD", + + /** + * 知情人 + */ + ZQR = "ZQR", + + /** + * 危险品 + */ + WXP = "WXP", + + /** + * 杂物堆 + */ + ZWD = "ZWD", + + /** + * 破拆点 + */ + PCD = "PCD", + + /** + * 火 + */ + H = "H", + + /** + * 突破火 + */ + TPH = "TPH", + + /** + * 室内火 + */ + SNH = "SNH", + + /** + * 烟雾A + */ + YWA = "YWA", + + /** + * 烟雾B + */ + YWB = "YWB", + + /** + * 烟雾C + */ + YWC = "YWC", + + //==================消防力量================ + + /** + * 灭火服 + */ + MHF = "MHF", + + /** + * 救援服 + */ + JYF = "JYF", + + /** + * 隔热服 + */ + GRF = "GRF", + + /** + * 防化服 + */ + FHF = "FHF", + + /** + * 避火服 + */ + BHF = "BHF", + + /** + * 义务消防员 + */ + YWXFY = "YWXFY", + + /** + * 安全哨 + */ + AQS = "AQS", + + /** + * 摩托车 + */ + MTC = "MTC", + + /** + * 巡逻车 + */ + XLC = "XLC", + + /** + * 水罐车 + */ + SGC = "SGC", + + /** + * 泡沫车 + */ + PMC = "PMC", + + /** + * 高喷车 + */ + GPC = "GPC", + + /** + * 登高平台车 + */ + DGPTC = "DGPTC", + + /** + * 云梯车 + */ + YTC = "YTC", + + /** + * 抢险救援车 + */ + QXJYC = "QXJYC", + + /** + * 器材车 + */ + QCC = "QCC", + + /** + * 照明车 + */ + ZMC = "ZMC", + + /** + * 破拆车 + */ + PCC = "PCC", + + /** + * 排烟车 + */ + PYC = "PYC", + + /** + * 指挥车 + */ + ZHC = "ZHC", + + /** + * 高层供水车 + */ + GCGSC = "GCGSC", + + /** + * 空气呼吸充气车 + */ + KQHXCQC = "KQHXCQC", + + //================联动力量=================== + /** + * 公安 + */ + GA = "GA", + + /** + * 交警 + */ + JJ = "JJ", + + /** + * 医生 + */ + YS = "YS", + + /** + * 抢修人员 + */ + QXRY = "QXRY", + + /** + * 救护车 + */ + JHC = "JHC", + + /** + * 警车 + */ + JC = "JC", + + /** + * 电力抢修车 + */ + DLQXC = "DLQXC", + + /** + * 燃气抢修车 + */ + RQQXC = "RQQXC", + + /** + * 供水抢修车 + */ + GSQXC = "GSQXC", + + /** + * 环保检测车 + */ + HBJCC = "HBJCC", + + /** + * 交通运输车 + */ + JTYSC = "JTYSC", + + /** + * 卫生防疫车 + */ + WSFYC = "WSFYC", + + /** + * 应急通信车 + */ + YJTXC = "YJTXC", + + /** + * 轿车 + */ + JCA = "JCA", + + /** + * 轿车 + */ + JCB = "JCB", + + /** + * 轿车 + */ + JCC = "JCC", + + //===============内部力量================= + /** + * 董事长 + */ + DSZ = "DSZ", + + /** + * 经理 + */ + JL = "JL", + + /** + * 副总 + */ + FZ = "FZ", + + /** + * 秘书 + */ + MS = "MS", + + /** + * 总监 + */ + ZJ = "ZJ", + + /** + * 主管 + */ + ZG = "ZG", + + /** + * 组长 + */ + ZZ = "ZZ", + + /** + * 前台 + */ + QT = "QT", + + /** + * 设计师 + */ + SJS = "SJS", + + /** + * 程序员 + */ + CXY = "CXY", + + /** + * 职员 + */ + ZYA = "ZYA", + + /** + * 职员 + */ + ZYB = "ZYB", + + /** + * 技工 + */ + JG = "JG", + + /** + * 保安 + */ + BA = "BA", + + //===================标绘工具=================== + + /** + * 警戒线 + */ + JJX = "JJX", + + /** + * 水带 + */ + SD = "SD", + + /** + * 进攻路线 + */ + JGLX = "JGLX", + + /** + * 撤退 + */ + CT = "CT", + + /** + * 指挥部 + */ + ZHB = "ZHB", + + /** + * 6米拉梯 + */ + LT6 = "LT6", + + /** + * 15米拉梯 + */ + LT15 = "LT15", + + /** + * 分水器 + */ + FSQ = "FSQ", + + /** + * 手抬泵 + */ + STB = "STB", + + /** + * 水炮 + */ + SP = "SP", + + /** + * 文字 + */ + WZ = "WZ", + + /** + * 集结区 + */ + JJQ = "JJQ", + + /** + * 区域设定 + */ + QYSDA = "QYSDA", + + /** + * 区域设定 + */ + QYSDB = "QYSDB", +} + +/** + * 标记的任务类型 + */ +export enum MarkTask { + /** + * 无任务(不打开任务界面) + */ + None, + + /** + * 未知(打开界面,但没有任务列表) + */ + Unknown, + + /** + * 人员 + */ + Person, + + /** + * 车辆 + */ + Car, + + /** + * 水炮 + */ + WaterMonitor + +} + diff --git a/src/app/babylon/model/data/mark/mark-plan-data.ts b/src/app/babylon/model/data/mark/mark-plan-data.ts new file mode 100644 index 0000000..68fb3f9 --- /dev/null +++ b/src/app/babylon/model/data/mark/mark-plan-data.ts @@ -0,0 +1,492 @@ +import { Type } from "class-transformer"; +import { TsTool } from "src/app/babylon/tool/ts-tool"; + + +import { ArcRotateCameraData } from "../camera-data"; +import { MarkData } from "./mark-data"; + + +/** + * 当前单位的所有标绘信息 + */ +export class AllMarkPlanData { + + /** + * 单位ID + */ + institutionID: string; + + /** + * 所有方案 + */ + @Type(() => MarkPlanData) + datas: MarkPlanData[]; + + + + + /** + * 创建新方案 + * @param name + */ + createPlanData(name): MarkPlanData { + let id = this.getNextPlaneId(); + let data = new MarkPlanData(id, name, []); + this.datas.push(data); + return data; + } + + /** + * 删除方案 + */ + deletePlanData(id: number) { + let planeData = this.getMarkPlanById(id); + if (planeData != null) { + TsTool.arrayRemove(this.datas, planeData); + } + } + + + /** + * 获取下一个方案的id + */ + getNextPlaneId() { + let index = -1; + if (this.datas != null && this.datas.length > 0) { + index = this.datas[this.datas.length - 1].id; + } + index++; + return index; + } + + + /** + * 根据id查找标绘方案 + * @param markPlanId + */ + getMarkPlanById(markPlanId: number) { + if (this.datas != null) { + for (let i = 0; i < this.datas.length; i++) { + if (this.datas[i].id == markPlanId) { + return this.datas[i]; + } + } + } + + return null; + } + + + + +} + +/** + * 方案数据 + */ +export class MarkPlanData { + + /** + * 唯一身份id + */ + id: number; + /** + * 显示的名称 + */ + name: string; + + /** + * 用于UI上排序 + */ + index: number = 0; + + /** + * 所有的标绘节点 + */ + @Type(() => MarkNodeData) + nodes: MarkNodeData[] = []; + + constructor(id: number, name: string, nodes: MarkNodeData[] = []) { + this.id = id; + this.index = id; + this.name = name; + this.nodes = nodes; + this.index = 0; + } + + + /** + * 获取下一个节点的id + */ + getNextNodeId() { + let index = -1; + + if (this.nodes != null && this.nodes.length > 0) { + index = this.nodes[this.nodes.length - 1].id; + } + + index++; + return index; + + + } + + /** + * 创建方案的子节点 + * @param name + */ + createMarkNode(name: string) { + let id = this.getNextNodeId(); + let result = new MarkNodeData(id, name); + + this.nodes.push(result); + + return result; + } + + /** + * 删除方案的节点 + * @param id + */ + deleteMarkNode(id: number) { + let node = this.getNodeById(id); + if (node != null) { + TsTool.arrayRemove(this.nodes, node); + } + } + + /** + * 根据id获取节点 + * @param id + */ + getNodeById(id: number) { + if (this.nodes != null) { + for (let i = 0; i < this.nodes.length; i++) { + if (this.nodes[i].id == id) { + return this.nodes[i]; + } + } + } + return null; + } + + /** + * 设置节点数据 + * @param id //要替换的节点id + * @param nodeData //新数据 + */ + setNodeData(id: number, nodeData: MarkNodeData) { + if (this.nodes != null) { + for (let i = 0; i < this.nodes.length; i++) { + if (this.nodes[i].id == id) { + this.nodes[i] = nodeData; + } + } + } + } + +} + +/** + * 标绘节点数据 + */ +export class MarkNodeData { + + /** + * 唯一身份id + */ + id: number; + + /** + * 显示的名称 + */ + name: string; + + /** + * 用于UI上排序 + */ + index: number = 0; + + /** + * 相机数据 + */ + @Type(() => ArcRotateCameraData) + cameraData: ArcRotateCameraData; + + /** + * 所处环境的信息 + */ + @Type(() => EnvironmentData) + environmentData: EnvironmentData[]; + + /** + * 自然信息 + */ + @Type(() => NatureData) + natureData: NatureData; + + + constructor(id: number, name: string) { + this.id = id; + this.index = id; + this.name = name; + this.cameraData = new ArcRotateCameraData(); + this.environmentData = []; + this.natureData = new NatureData(); + this.index = 0; + + } + + + /** + * 获取环境信息 + * @param id + */ + getEnvironmentData(id: number) { + let result = null; + for (let i = 0; i < this.environmentData.length; i++) { + if (this.environmentData[i].id == id) { + result = this.environmentData[i]; + break; + } + } + return result; + } + + /** + * 改变当前环境值 + * @param id + */ + changeNowEnvironmentData(id: number) { + for (let i = 0; i < this.environmentData.length; i++) { + if (this.environmentData[i].id == id) { + this.environmentData[i].isNow = true; + } + else { + this.environmentData[i].isNow = false; + } + } + } + + /** + * 根据内容获取 + * @param isOutdoor + * @param buildingId + * @param floorId + */ + getEnvironmentDataByValue(isOutdoor: boolean, + + /** + * 建筑Id + */ + buildingId: string, + + /** + * 所处楼层的id(室内的话) + */ + floorId: string) { + let result: EnvironmentData = null; + for (let i = 0; i < this.environmentData.length; i++) { + if (isOutdoor == true && this.environmentData[i].isOutdoor == true) { + result = this.environmentData[i]; + break; + } + else if (this.environmentData[i].isOutdoor == isOutdoor && this.environmentData[i].buildingId == buildingId && this.environmentData[i].floorId == floorId) { + result = this.environmentData[i]; + break; + } + } + + return result; + + } + + + /** + * 获取当前状态的环境数据 + */ + getCurrentEnvironmentData() { + let result = this.environmentData[0]; + for (let i = 0; i < this.environmentData.length; i++) { + if (this.environmentData[i].isNow) { + result = this.environmentData[i]; + break; + } + } + result.isNow = true; + return result; + } + + addEnvironment(buildingId: string, isOutdoor: boolean, floorId: string) { + let index = -1; + for (let i = 0; i < this.environmentData.length; i++) { + if (this.environmentData[i].id > index) { + index = this.environmentData[i].id; + } + } + index++; + + let newEnvironment = new EnvironmentData(index, buildingId, isOutdoor, floorId); + this.environmentData.push(newEnvironment); + + return newEnvironment; + } + +} + +/** + * 环境信息 + */ +export class EnvironmentData { + + id: number; + /** + * 室外、室内 + */ + isOutdoor: boolean; + + /** + * 建筑Id + */ + buildingId: string; + + /** + * 所处楼层的id(室内的话) + */ + floorId: string; + + /** + * 所有标绘物 + */ + @Type(() => MarkData) + markDatas: MarkData[] = []; + + /** + * 是否是当前节点 + */ + isNow: boolean; + + constructor(id: number, buildingId: string, isOutdoor: boolean, floorId: string) { + this.id = id; + this.buildingId = buildingId; + this.isOutdoor = isOutdoor; + this.floorId = floorId; + this.markDatas = []; + } + + /** + * 添加markData + * @param markData + */ + addMarkData(markData: MarkData) { + this.markDatas.push(markData); + } + + /** + * 移除markData + * @param markData + */ + removeMarkData(markData: MarkData) { + TsTool.arrayRemove(this.markDatas, markData); + } + +} + +/** + * 自然信息 + */ +export class NatureData { + + /** + * 天气 + */ + weather: WeatherType; + /** + * 温度 + */ + temperature: number; + + /** + * 风向 + */ + windDirection: WindDirectionType; + + /** + * 风力 + */ + windPower: number; + + constructor() { + this.weather = WeatherType.Sun; + this.temperature = 26; + this.windDirection = WindDirectionType.East; + this.windPower = 3; + } +} + +/** + * 天气类型 + */ +export enum WeatherType { + /** + * 晴 + */ + Sun = "Sun", + /** + * 阴 + */ + Sloudy = "Sloudy", + /** + * 雨 + */ + Rain = "Rain", + /** + * 雪 + */ + Snow = "Snow" +} + +/** + * 方向类型 + */ +export enum WindDirectionType { + /** + * 东 + */ + East = "East", + /** + * 南 + */ + South = "South", + + /** + * 西 + */ + West = "West", + + /** + * 北 + */ + North = "North", + + /** + * 东南 + */ + SouthEast = "SouthEast", + + /** + * 西南 + */ + SouthWest = "SouthWest", + + /** + * 东北 + */ + NorthEast = "NorthEast", + + /** + * 西北 + */ + NorthWest = "NorthWest", + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/mark/mark-property.ts b/src/app/babylon/model/data/mark/mark-property.ts new file mode 100644 index 0000000..fac3311 --- /dev/null +++ b/src/app/babylon/model/data/mark/mark-property.ts @@ -0,0 +1,50 @@ +import { MarkTask } from "./mark-data"; + +/** + * 标绘物的属性 + */ +export class MarkProperty { + + /** + * 单位 + */ + institution: string; + + /** + * 编号 + */ + index: number; + + /** + * 任务的类型(预制项) + */ + taskType: MarkTask; + + /** + * 任务 + */ + task: string; + + /** + * 备注 + */ + description: string; + + constructor(taskType?: MarkTask, institution: string = "辖区中队", index: number = 1, task: string = "待命", description?: string) { + this.taskType = taskType + this.institution = institution + this.index = index + this.task = task + this.description = description + } + + + /** + * 获取单位-编号 + */ + getInstitutionNum() { + return this.institution + "-" + this.index; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/mark/other/mark-data-area.ts b/src/app/babylon/model/data/mark/other/mark-data-area.ts new file mode 100644 index 0000000..26181b9 --- /dev/null +++ b/src/app/babylon/model/data/mark/other/mark-data-area.ts @@ -0,0 +1,19 @@ +import { Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { MarkData } from "../mark-data"; + +/** + * 区域类 + */ +export class MarkData_Area extends MarkData { + /** + * 点位 + */ + @Type(() => Vector3) + pointData: Vector3[]; + + /** + * 颜色 + */ + color: string = "#FF666D"; +} diff --git a/src/app/babylon/model/data/mark/other/mark-data-line.ts b/src/app/babylon/model/data/mark/other/mark-data-line.ts new file mode 100644 index 0000000..6dc016d --- /dev/null +++ b/src/app/babylon/model/data/mark/other/mark-data-line.ts @@ -0,0 +1,21 @@ +import { Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { MarkData } from "../mark-data"; + +/** + * 一条线 + */ +export class MarkData_Line extends MarkData { + /** + * 点位 + */ + @Type(() => Vector3) + pointData: Vector3[] = []; + + /** + * 颜色 + */ + color: string = "#FFD306"; + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/mark/other/mark-data-multi-arrow.ts b/src/app/babylon/model/data/mark/other/mark-data-multi-arrow.ts new file mode 100644 index 0000000..db1b5a9 --- /dev/null +++ b/src/app/babylon/model/data/mark/other/mark-data-multi-arrow.ts @@ -0,0 +1,41 @@ +import { Vector3 } from "@babylonjs/core/Maths"; +import { Type } from "class-transformer"; +import { MarkData } from "../mark-data"; + +/** + * 多个线条 + */ +export class MarkData_multiArrow extends MarkData { + + /** + * 点位 + */ + @Type(() => Vector3) + pointData: Vector3[]; + + /** + * 颜色 + */ + color: string; + +} + +/** + * 进攻路线 + */ +export class MarkData_multiArrow_JG extends MarkData_multiArrow { + /** + * 颜色 + */ + color: string = "#d71345"; +} + +/** + * 撤退路线 + */ +export class MarkData_multiArrow_CT extends MarkData_multiArrow { + /** + * 颜色 + */ + color: string = "#A9FF00"; +} diff --git a/src/app/babylon/model/data/mark/other/mark-data-multi-line.ts b/src/app/babylon/model/data/mark/other/mark-data-multi-line.ts new file mode 100644 index 0000000..170da1f --- /dev/null +++ b/src/app/babylon/model/data/mark/other/mark-data-multi-line.ts @@ -0,0 +1,31 @@ +import { Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { MarkData } from "../mark-data"; + +/** + * 多个线条 + */ +export class MarkData_multiLine extends MarkData { + + /** + * 点位 + */ + @Type(() => Vector3) + pointData: Vector3[]; + + /** + * 颜色 + */ + color: string = "#FF5151"; + + /** + * 管线半径 + */ + radius: number = 0.1; + + /** + * y偏移 + */ + yPos: number = 0; + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/model-data/model-data-building.ts b/src/app/babylon/model/data/model-data/model-data-building.ts new file mode 100644 index 0000000..023d140 --- /dev/null +++ b/src/app/babylon/model/data/model-data/model-data-building.ts @@ -0,0 +1,18 @@ +import { TransformData } from "../transform-data"; +import { BuildingPosType, ModelData } from "./model-data"; + +//建筑类 模型数据 +export class ModelData_building extends ModelData { + modelType: BuildingPosType;//模型类别 + baseInfoKey: string;//单位基本信息的key + + + constructor(key: string, name: string, modelType: BuildingPosType, resName: string, transformData: TransformData, l_resPath: string) { + super(key, name, null, resName, transformData); + this.modelType = modelType; + + this.resPath = l_resPath; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/model-data/model-data-facility.ts b/src/app/babylon/model/data/model-data/model-data-facility.ts new file mode 100644 index 0000000..9291fbb --- /dev/null +++ b/src/app/babylon/model/data/model-data/model-data-facility.ts @@ -0,0 +1,280 @@ +import { ModelData } from "./model-data"; +import { TransformData } from "../transform-data"; +import { PropertyData_Base } from "../institution/facility/property-data/property-data-base"; + +import { classToClass, Type } from "class-transformer"; +import { Vector3 } from "@babylonjs/core"; +import { DataManager } from "src/app/babylon/controller/data-manager"; + + +//设备数据 +export class ModelData_facility extends ModelData { + posType: FacilityPosType = FacilityPosType.Outdoor;//位置类型 + + facilityType: FacilityType = FacilityType.AQCK;//具体设备类别 + @Type(() => PropertyData_Base) + propertyData: PropertyData_Base = null;//属性信息 + @Type(() => Vector3) + areaPoints: Vector3[] = [];//区域位点 + + + constructor(key: string, type: FacilityType, name: string, resName: string, transformData: TransformData, posType: FacilityPosType, isModel: boolean = true) { + + super(key, name, null, resName, transformData, isModel); + + this.facilityType = type; + this.posType = posType; + if (type != undefined) { + + let showType = ModelData_facility.getShowType(type); + switch (showType) { + case FacilityShowType.ModelAndTag: + this.resName = resName; + this.resPath = DataManager.getResPath_facility(this.posType, type); + break; + case FacilityShowType.AreaAndTag: + this.areaPoints = this.newAreapPoints(); + break; + } + // this.resPath = ConfigManager.c_resPath_facilitiesRoot + this.posType.toString() + "/" + type.toLowerCase() + "/"; + this.propertyData = DataManager.createPropertyData(key, type); + } + + + } + + /** + * 获取表现类型 + */ + getShowtype() { + let showType = ModelData_facility.getShowType(this.facilityType); + return showType + } + + clone(key: string): ModelData_facility { + let result = new ModelData_facility(key, this.facilityType, this.name, this.resName, this.transformData.clone(), this.posType); + result.propertyData = this.propertyData.clone(key); + result.areaPoints = classToClass(this.areaPoints); + return result; + } + + //新建区域位点 + newAreapPoints(): Vector3[] { + let size = 10; + let x = 0.75 * size; + let z = 0.5 * size; + let result: Vector3[] = []; + result.push(new Vector3(0, 0, 1 * size)); + result.push(new Vector3(x, 0, z)); + result.push(new Vector3(x, 0, -z)); + result.push(new Vector3(0, 0, -1 * size)); + result.push(new Vector3(-x, 0, -z)); + result.push(new Vector3(-x, 0, z)); + + return result; + } + + /** + * 查询展示方式 + * @param facilityType 设备具体类型 + */ + static getShowType(facilityType: FacilityType): FacilityShowType { + let result = FacilityShowType.ModelAndTag; + switch (facilityType) { + case FacilityType.AQCK: + case FacilityType.DSXHS: + case FacilityType.DXXHS: + case FacilityType.SZDXXHS: + case FacilityType.SZDSXHS: + case FacilityType.DSSBJHQ: + case FacilityType.DXSBJHQ: + case FacilityType.QBSBJHQ: + case FacilityType.DGNSBJHQ: + + case FacilityType.PL: + case FacilityType.TPBZ: + + case FacilityType.XKS: + case FacilityType.BF: + case FacilityType.SX: + case FacilityType.LSXFB: + case FacilityType.WSXFB: + case FacilityType.CYXFB: + case FacilityType.SNXHS: + case FacilityType.FHM: + case FacilityType.HT: + case FacilityType.PTDT: + case FacilityType.XFDT: + case FacilityType.SSLT: + case FacilityType.FHJL: result = FacilityShowType.ModelAndTag; break;//展示模型和标签 + + case FacilityType.JTQ: + case FacilityType.JJQ: + case FacilityType.FHFQ: result = FacilityShowType.AreaAndTag; break;//展示可编辑多边形 + case FacilityType.GD: result = FacilityShowType.GdAndTag; break;//展示高度和标签 + } + + return result; + } + + + +} + + + +//设备位置类型(室内还是室外) +export enum FacilityPosType { + Indoor = "indoor", //室内 + Outdoor = "outdoor", //室外 + Public = "public",//共有 +} + +//设备展示类型 +export enum FacilityShowType { + Tag,//标签 + ModelAndTag,//模型和标签 + AreaAndTag,//区域和标签 + GdAndTag,//高度和标签 +} + + +/** + * 设备具体类型 + */ +export enum FacilityType { + //室外 + /** + * 安全出口 + */ + AQCK = "AQCK", + /** + * 地上消火栓 + */ + DSXHS = "DSXHS", + /** + * 地下消火栓 + */ + DXXHS = "DXXHS", + /** + * 市政地上消火栓 + */ + SZDSXHS = "SZDSXHS", + /** + * 市政地下消火栓 + */ + SZDXXHS = "SZDXXHS", + /** + * 地上水泵接合器 + */ + DSSBJHQ = "DSSBJHQ", + /** + * 地下水泵接合器 + */ + DXSBJHQ = "DXSBJHQ", + /** + * 墙壁水泵接合器 + */ + QBSBJHQ = "QBSBJHQ", + /** + * 多功能水泵接合器 + */ + DGNSBJHQ = "DGNSBJHQ", + + /** + * 高度 + */ + GD = "GD", + /** + * 毗邻 + */ + PL = "PL", + /** + * 禁停区 + */ + JTQ = "JTQ", + /** + * 集结区 + */ + JJQ = "JJQ", + /** + * 图片标注 + */ + TPBZ = "TPBZ",// + + //室内 + /** + * 消控室 + */ + XKS = "XKS", + /** + * 泵房 + */ + BF = "BF", + /** + * 水箱 + */ + SX = "SX", + /** + * 立式消防泵 + */ + LSXFB = "LSXFB", + /** + * 卧式消防泵 + */ + WSXFB = "WSXFB", + /** + * 柴油消防泵 + */ + CYXFB = "CYXFB", + /** + * 室内消火栓 + */ + SNXHS = "SNXHS", + /** + * 防火门 + */ + FHM = "FHM", + /** + * 防火卷帘 + */ + FHJL = "FHJL", + + /** + * 疏散楼梯 + */ + SSLT = "SSLT", + /** + * 消防电梯 + */ + XFDT = "XFDT", + /** + * 普通电梯 + */ + PTDT = "PTDT", + /** + * 货梯 + */ + HT = "HT", + /** + * 避难层 + */ + BNC = "BNC", + /** + * 危险源 + */ + WXY = "WXY", + /** + * 重点区域 + */ + ZDQY = "ZDQY", + /** + * 点位标注 + */ + DWBZ = "DWBZ", + + /** + * 防火分区 + */ + FHFQ = "FHFQ", +} \ No newline at end of file diff --git a/src/app/babylon/model/data/model-data/model-data.ts b/src/app/babylon/model/data/model-data/model-data.ts new file mode 100644 index 0000000..48df269 --- /dev/null +++ b/src/app/babylon/model/data/model-data/model-data.ts @@ -0,0 +1,71 @@ +import { TransformData } from '../transform-data'; +import { Type } from 'class-transformer'; + +//模型 数据 +export class ModelData { + + key: string; //身份唯一标识 + name: string; //用户定义的名称 + resName: string; //资源名称 + resPath: string; //资源路径(局部) 可使用 DataManager.getResPath进行构造 + @Type(() => TransformData) + transformData: TransformData; //变换信息 + version: number = 1;//版本号 + isModel: boolean;//是否是现成的模型要加载 + + constructor( + key?: string, + name?: string, + resPath?: string, + resName?: string, + transformData?: TransformData, + isModel: boolean = true + ) { + this.key = key; + this.name = name; + this.resPath = resPath; + this.resName = resName; + this.isModel = isModel; + if (transformData == null) { + this.transformData = new TransformData(); + } + else { + this.transformData = transformData; + } + } + +} + + + +//建筑模型位置类别 +export enum BuildingPosType { + Default = 'default', + OutDoor = 'outdoor', //建筑外观 + Environment = 'environment', //环境 + Indoor = 'indoor', //室内 +} + +//模型类别 +export enum ModelType { + Building, //建筑 + Facility, //设施 + Mark,//态势标绘 +} + +//数据记录的类型 +export enum DataRecordType { + Number,//数字 + String,//字符串 + Texture,//字符串 +} + +//数据记录 +export class DataRecord { + + dataRecordType: DataRecordType;//记录的类型 + + value: string;//值 + +} + diff --git a/src/app/babylon/model/data/model-data/model-edit-data.ts b/src/app/babylon/model/data/model-data/model-edit-data.ts new file mode 100644 index 0000000..c851a8a --- /dev/null +++ b/src/app/babylon/model/data/model-data/model-edit-data.ts @@ -0,0 +1,79 @@ +import { Type } from "class-transformer"; +import { TsTool } from "src/app/babylon/tool/ts-tool"; + + +import { ModelData } from "./model-data"; +import { FacilityType, ModelData_facility } from "./model-data-facility"; + +//模型编辑信息(外观、环境、室内分层) +export class ModelEditData { + index: number = 0; //楼层、顺序用于ui上排序 + isRefugeFloor: boolean = false;//避难层 + @Type(() => ModelData) + modelData: ModelData; //模型信息 + @Type(() => FacilityDatasByType) + facilities: FacilityDatasByType[] = []; //含有哪些设备 + + constructor() { + // this.belongToBuilding = belongToBuilding; + this.modelData = new ModelData(); + this.index = 0; + } + //添加设备 + addFacility(modelData_facility: ModelData_facility) { + + let facility = this.getFacilitiesByType(modelData_facility.facilityType); + + if (facility == null) { + let newDataByType = new FacilityDatasByType(modelData_facility.facilityType); + this.facilities.push(newDataByType); + facility = newDataByType.facilities; + } + + facility.push(modelData_facility); + } + //移除设备 + removeFacility(modelData_facility: ModelData_facility) { + let facility = this.getFacilitiesByType(modelData_facility.facilityType); + if (facility == null) { + console.error(this.modelData.key + "移除设备出错" + modelData_facility.key); + } + else { + TsTool.arrayRemove(facility, modelData_facility); + } + + } + + /** + * 根据设备类型获取设备数据 + * @param facilityType 设备类型 + */ + getFacilitiesByType(facilityType: FacilityType) { + let result: ModelData_facility[] = null; + for (let i = 0; i < this.facilities.length; i++) { + if (this.facilities[i].facilityType == facilityType) { + result = this.facilities[i].facilities; + return result; + } + } + return result; + + } +} + +/** + * 根据类型储存的设备数据 + */ +export class FacilityDatasByType { + + facilityType: FacilityType; + + @Type(() => ModelData_facility) + facilities: ModelData_facility[] = []; //含有哪些设备 + + constructor(type: FacilityType) { + this.facilityType = type; + this.facilities = []; + } +} + diff --git a/src/app/babylon/model/data/transform-data.ts b/src/app/babylon/model/data/transform-data.ts new file mode 100644 index 0000000..61848c0 --- /dev/null +++ b/src/app/babylon/model/data/transform-data.ts @@ -0,0 +1,42 @@ +import { Quaternion, Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import "reflect-metadata"; + +//变换信息 +export class TransformData { + + @Type(() => Vector3) + position: Vector3 = new Vector3(0, 0, 0); + + @Type(() => Vector3) + rotation: Vector3 = new Vector3(0, 0, 0); + + @Type(() => Quaternion) + rotationQuaternion: Quaternion = new Quaternion(); + + @Type(() => Vector3) + scaling: Vector3 = new Vector3(0, 0, 0); //在babylon中,相对父节点的当前缩放 + + @Type(() => Vector3) + originalScaling: Vector3 = new Vector3(0, 0, 0); //原始缩放 + + clone(): TransformData { + let result = new TransformData(); + + result.position = this.position.clone(); + result.rotation = this.rotation.clone(); + if ( + result.rotationQuaternion != null && + result.rotationQuaternion != undefined + ) { + result.rotationQuaternion = this.rotationQuaternion.clone(); + } + + result.scaling = this.scaling.clone(); + result.originalScaling = this.originalScaling.clone(); + + return result; + } +} + + diff --git a/src/app/babylon/model/info/building/building-info-chemicalplant.ts b/src/app/babylon/model/info/building/building-info-chemicalplant.ts new file mode 100644 index 0000000..c63efbf --- /dev/null +++ b/src/app/babylon/model/info/building/building-info-chemicalplant.ts @@ -0,0 +1,8 @@ +import { BuildingInfo } from "./building-info"; + +/** + * 化工厂类建筑 + */ +export class BuildingInfo_ChemicalPlant extends BuildingInfo { + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/building/building-info-environment.ts b/src/app/babylon/model/info/building/building-info-environment.ts new file mode 100644 index 0000000..1c4fc67 --- /dev/null +++ b/src/app/babylon/model/info/building/building-info-environment.ts @@ -0,0 +1,55 @@ +import { TransformNode } from '@babylonjs/core'; +import { BuildingStatus } from 'src/app/babylon/controller/status/building-status'; +import { IndoorStatus } from 'src/app/babylon/controller/status/indoor-status'; +import { StatusManager } from 'src/app/babylon/controller/status/status-manager'; +import { TsTool } from 'src/app/babylon/tool/ts-tool'; + + +import { BuildingInfo } from './building-info'; + +//环境数据 +export class BuildingInfo_Environment extends BuildingInfo { + + + readonly c_FuGaiCeng = "FuGaiCeng";//覆盖层关键字 + go_FuGaiCeng: TransformNode; + + /** + * 更新覆盖层。 室外模式显示覆盖层,室内模式隐藏 + */ + updateFuGaiCeng() { + if (this.go_FuGaiCeng == null) { + return; + } + let currentStatus = StatusManager.s_currentStatus; + if (currentStatus instanceof IndoorStatus) { + this.go_FuGaiCeng.setEnabled(true); + } + else if (currentStatus instanceof BuildingStatus) { + this.go_FuGaiCeng.setEnabled(false); + } + } + + + /** + * 设置modelInfo时 + */ + onSetModel() { + super.onSetModel(); + + if (this.ModelInfo != null && this.ModelInfo.modelBox != null) { + console.log("查找覆盖层", this.ModelInfo.modelBox); + let allChildren = this.ModelInfo.modelBox.getChildTransformNodes(false); + if (allChildren != null) { + for (let i = 0; i < allChildren.length; i++) { + if (TsTool.stringContain(allChildren[i].name, this.c_FuGaiCeng)) { + this.go_FuGaiCeng = allChildren[i]; + break; + } + } + } + + } + } + +} diff --git a/src/app/babylon/model/info/building/building-info-normal.ts b/src/app/babylon/model/info/building/building-info-normal.ts new file mode 100644 index 0000000..7b8dcba --- /dev/null +++ b/src/app/babylon/model/info/building/building-info-normal.ts @@ -0,0 +1,11 @@ +import { BuildingData_Normal } from "../../data/institution/building/building-data"; +import { ModelInfo_building } from "../model/model-info-building"; +import { BuildingInfo } from "./building-info"; + +//普通大楼 +export class BuildingInfo_Normal extends BuildingInfo { + constructor(buildingData: BuildingData_Normal, modelInfo: ModelInfo_building) { + super(buildingData, modelInfo) + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/building/building-info.ts b/src/app/babylon/model/info/building/building-info.ts new file mode 100644 index 0000000..ba9e858 --- /dev/null +++ b/src/app/babylon/model/info/building/building-info.ts @@ -0,0 +1,118 @@ +import { Vector3 } from "@babylonjs/core"; +import { InfoManager } from "src/app/babylon/controller/info-manager"; +import { SceneManager } from "src/app/babylon/controller/scene-manager"; +import { BuildingStatus } from "src/app/babylon/controller/status/building-status"; +import { StatusManager } from "src/app/babylon/controller/status/status-manager"; +import { GizmoTool } from "src/app/babylon/tool/gizmo-tool"; + +import { BuildingData } from "../../data/institution/building/building-data"; +import { TransformData } from "../../data/transform-data"; +import { ModelInfo_building } from "../model/model-info-building"; + +//基本建筑信息 +export class BuildingInfo { + /** + * 所属建筑的数据 + */ + buildingData: BuildingData; + /** + * 本模型的数据(室外建筑或室内某层) + */ + private modelInfo: ModelInfo_building; + isDisposed = false;//已经释放了 + isEnable = true;//显示状态 + constructor(buildingData: BuildingData, modelInfo: ModelInfo_building) { + this.buildingData = buildingData; + this.ModelInfo = modelInfo; + this.isDisposed = false; + } + + /** + * 本模型的数据(室外建筑或室内某层) + */ + get ModelInfo() { + return this.modelInfo; + } + + set ModelInfo(value: ModelInfo_building) { + this.modelInfo = value; + if (this.isDisposed) { + this.dispose(); + return; + } + if (value != null) { + let modelInfo = this.modelInfo; + if (modelInfo.modelData.transformData == null) { + modelInfo.modelData.transformData = new TransformData(); + } + + if ( + modelInfo.modelData.transformData.originalScaling.equals(Vector3.Zero()) + ) { + //表示是新建 + modelInfo.modelData.transformData.position = modelInfo.modelBox.position; + modelInfo.modelData.transformData.rotation = modelInfo.modelBox.rotation; + modelInfo.modelData.transformData.rotationQuaternion = + modelInfo.modelBox.rotationQuaternion; + modelInfo.modelData.transformData.originalScaling = modelInfo.modelBox.absoluteScaling.clone(); + modelInfo.modelData.transformData.scaling = modelInfo.modelBox.absoluteScaling.clone(); + } //已有数据,进行还原 + else { + modelInfo.modelBox.position = modelInfo.modelData.transformData.position; + modelInfo.modelBox.rotation = modelInfo.modelData.transformData.rotation; + modelInfo.modelBox.rotationQuaternion = + modelInfo.modelData.transformData.rotationQuaternion; + } + this.ModelInfo.buildingType = this.buildingData.buildingType; + this.ModelInfo.setEnable(this.isEnable); + this.onSetModel(); + //this.initFacility(); + + + } + + // if (!this.isEnable) { + + // } + // else { + // } + } + + /** + * 初始化设备 + */ + initFacility() { + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + InfoManager.createFacilityInfos(this.buildingData.outdoorData, this); + this.ModelInfo.showFacilityUI(false); + } + } + + setEnable(enable: boolean) { + this.isEnable = enable; + if (this.ModelInfo != null) { + this.ModelInfo.setEnable(enable); + + } + } + + + /** + * 设置模型了 + */ + onSetModel() { + + } + + //释放 + dispose() { + this.isDisposed = true; + StatusManager.getStatus(BuildingStatus).buildingWindow.clearFacilityInfos(this); + if (this.modelInfo != null) { + if (GizmoTool.s_nowPickAim == this.modelInfo) { + GizmoTool.onPickMeshInfoObservable.notifyObservers(null); + } + SceneManager.destroyModel(this.modelInfo); + } + } +} diff --git a/src/app/babylon/model/info/mark/all-mark-info.ts b/src/app/babylon/model/info/mark/all-mark-info.ts new file mode 100644 index 0000000..146e28b --- /dev/null +++ b/src/app/babylon/model/info/mark/all-mark-info.ts @@ -0,0 +1,73 @@ + +import { MarkType } from "../../data/mark/mark-data"; +import { ModelInfo_mark } from "./model-info-mark"; + +/** + * 所有标记素材的预制体信息 + */ +export class AllMarkInfo { + /** + * 灾情 + */ + marks_Disaster: Map = new Map(); + + /** + * 消防力量 + */ + + marks_FireFighting: Map = new Map(); + + /** + * 联动力量 + */ + + marks_Linkage: Map = new Map(); + + /** + * 内部力量 + */ + + marks_Inside: Map = new Map(); + + /** + * 标绘工具 + */ + + marks_Tool: Map = new Map(); + + + // /** + // * 根据类型,找到预制体info + // * @param data + // */ + // getMarkPrefab(data: MarkData): ModelInfo_mark { + + // let map: Map; + // switch (data.tagPos) { + // case MarkTagPos.Disaster: + // map = this.marks_Disaster; + // break; + // case MarkTagPos.FireFighting: + // map = this.marks_FireFighting; + // break; + // case MarkTagPos.Inside: + // map = this.marks_Inside; + // break; + // case MarkTagPos.Linkage: + // map = this.marks_Linkage; + // break; + // case MarkTagPos.Tool: + // map = this.marks_Tool; + // break; + // } + + // if (!map.has(data.type)) { + // let markInfoPrefab = new ModelInfo_mark(data, true); + // map.set(data.type, markInfoPrefab); + // } + + // return map.get(data.type); + // } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/mark-plan-info.ts b/src/app/babylon/model/info/mark/mark-plan-info.ts new file mode 100644 index 0000000..7ef67bf --- /dev/null +++ b/src/app/babylon/model/info/mark/mark-plan-info.ts @@ -0,0 +1,130 @@ + +import { TsTool } from "src/app/babylon/tool/ts-tool"; +import { MarkTagPos, MarkType } from "../../data/mark/mark-data"; +import { MarkNodeData, MarkPlanData } from "../../data/mark/mark-plan-data"; +import { ModelInfo_mark } from "./model-info-mark"; + +/** + * 标绘方案数据(一级节点的集合) + */ +export class MarkNodeInfo { + + /** + * 所属的方案数据 + */ + belongToPlanData: MarkPlanData; + /** + * 源数据 + */ + nodeData: MarkNodeData; + + /** + * 运行时的标绘数据 + */ + markInfos: Map = new Map(); + + currentMarkDataIndex = -1; + + + constructor(belongToPlanData: MarkPlanData, nodeData: MarkNodeData) { + this.belongToPlanData = belongToPlanData; + this.nodeData = nodeData; + } + + /** + * 获取标绘物 + * @param tagPos + * @param type + * @param id + */ + getMarkInfo(tagPos: MarkTagPos, type: MarkType, id: string) { + let result: ModelInfo_mark = null; + if (this.markInfos.has(tagPos)) { + let array = this.markInfos.get(tagPos); + for (let i = 0; i < array.length; i++) { + if (array[i].markData.key == id) { + result = array[i]; + break; + } + } + } + + + return result; + } + + /** + * 新增标绘物 + * @param markInfo + * @param addToData //新增时,需要添加进数据层 + */ + addMarkInfo(markInfo: ModelInfo_mark, addToData: boolean) { + if (!this.markInfos.has(markInfo.markData.tagPos)) { + this.markInfos.set(markInfo.markData.tagPos, []); + } + this.markInfos.get(markInfo.markData.tagPos).push(markInfo); + + if (addToData) { + this.nodeData.getCurrentEnvironmentData().addMarkData(markInfo.markData);//修改数据层 + } + + } + + /** + * 删除标绘物 + * @param markInfo + */ + removeMarkInfo(markInfo: ModelInfo_mark) { + if (this.markInfos.has(markInfo.markData.tagPos)) { + TsTool.arrayRemove(this.markInfos.get(markInfo.markData.tagPos), markInfo); + } + this.nodeData.getCurrentEnvironmentData().removeMarkData(markInfo.markData); + markInfo.dispose(); + } + + /** + * 获取下一个标绘物的id + */ + getNextMarkDataId() { + //console.log(this.currentMarkDataIndex, 1); + let environmentData = this.nodeData.getCurrentEnvironmentData(); + if (this.currentMarkDataIndex < 0) { + if (this.nodeData != null && environmentData.markDatas.length > 0) { + this.currentMarkDataIndex = Number(environmentData.markDatas[environmentData.markDatas.length - 1].key); + //console.log(this.currentMarkDataIndex, this.nodeData.markDatas[this.nodeData.markDatas.length - 1].key); + } + } + this.currentMarkDataIndex++; + //console.log(this.currentMarkDataIndex, "====="); + return this.currentMarkDataIndex; + } + + /** + * 清空标绘物(表现层和逻辑层) + */ + clearAllMarkDataAndInfo() { + let currentEnvironmentData = this.nodeData.getCurrentEnvironmentData(); + currentEnvironmentData.markDatas.length = 0; + this.nodeData.environmentData.length = 0; + this.nodeData.environmentData.push(currentEnvironmentData); + this.disposeInfo(); + + } + + /** + * 只释放表现层 + */ + disposeInfo() { + this.markInfos.forEach((value: ModelInfo_mark[], key: MarkTagPos, map: Map) => { + if (value != null) { + for (let i = 0; i < value.length; i++) { + value[i].dispose(); + } + } + }); + this.markInfos.clear(); + this.currentMarkDataIndex = -1; + } + +} + diff --git a/src/app/babylon/model/info/mark/model-info-mark.ts b/src/app/babylon/model/info/mark/model-info-mark.ts new file mode 100644 index 0000000..7cf1488 --- /dev/null +++ b/src/app/babylon/model/info/mark/model-info-mark.ts @@ -0,0 +1,535 @@ +import { AbstractMesh, Color3, EventState, Mesh, MeshBuilder, ParticleSystem, PointerDragBehavior, Vector3 } from "@babylonjs/core"; +import { Button } from "@babylonjs/gui/2D/controls/button"; +import { Control } from "@babylonjs/gui/2D/controls/control"; +import { Ellipse } from "@babylonjs/gui/2D/controls/ellipse"; +import { Rectangle } from "@babylonjs/gui/2D/controls/rectangle"; +import { TextBlock, TextWrapping } from "@babylonjs/gui/2D/controls/textBlock"; +import { Vector2WithInfo } from "@babylonjs/gui/2D/math2D"; +import { classToClass } from "class-transformer"; +import { ConfigManager } from "src/app/babylon/controller/config-manager"; +import { MarkInfoChangeType, Event_MarkInfoChange } from "src/app/babylon/controller/event-manager/events/event-mark-info-change"; +import { SceneManager } from "src/app/babylon/controller/scene-manager"; +import { UIManager } from "src/app/babylon/controller/ui-manager"; +import { BabylonTool } from "src/app/babylon/tool/babylon-tool"; +import { BabylonUIStyleTool } from "src/app/babylon/tool/babylon-ui-style-tool"; +import { ParticleSystemTool } from "src/app/babylon/tool/particle-system-tool"; +import { TsTool } from "src/app/babylon/tool/ts-tool"; +import { MarkWindow } from "src/app/babylon/view/mark-window/mark-window"; + +import { ChildNodeData, MarkData, MarkTask, MarkType } from "../../data/mark/mark-data"; +import { BuildingInfo } from "../building/building-info"; +import { ModelInfo } from "../model/model-info"; + +/** + * 标绘的运行时数据 + */ +export class ModelInfo_mark extends ModelInfo { + /** + * 标绘的源数据 + */ + markData: MarkData; + + /** + * 所属建筑 + */ + belongToBuilding: BuildingInfo; + /** + * 选中状态 + */ + isSelect: boolean = false; + ui_select: Ellipse; + + + /** + * 头部跟随mesh + */ + headMesh: Mesh; + + uiFollowHead: Rectangle;//头部跟随节点 + uiFollowHeadBg: Rectangle;//头部跟随节点的背景 + uiNumber: TextBlock;//标号 + uiTask: TextBlock;//任务 + + + + readonly c_highLightColor = Color3.Green(); + readonly c_uiDefaultWidth = 100;//默认UI宽度 + + /** + * 水枪强度——最小 + */ + static readonly c_waterPower_min: number = 5; + /** + * 水枪强度——最大 + */ + static readonly c_waterPower_max: number = 30; + + + constructor(markData: MarkData, + models: AbstractMesh[], + modelBox: AbstractMesh, + belongToBuilding: BuildingInfo, + isNew: boolean) { + super(markData.key, markData, models, modelBox, isNew); + + this.belongToBuilding = belongToBuilding; + + } + + // 根据名字找到子对象数据 + public getChildrenDataByName(name: string): ChildNodeData { + const data = this.markData.childrenNodeData.filter(item => item.name === name); + if (data.length > 0) { + return data[0] + } else { + return null; + } + } + + onCreate(isNew: boolean) { + this.markData = this.modelData as MarkData; + } + + + onCreateFollowUI() { + super.onCreateFollowUI(); + // console.log("创建跟随UI"); + let instance = this; + let modelData = this.modelData as MarkData; + let posType = modelData.tagPos; + // let iconPath = ConfigManager.getMarkIconUrl(posType, modelData.type); + BabylonUIStyleTool.setStyle_size(this.uiFollowRoot, ConfigManager.c_size_facilityIconSize + "px", ConfigManager.c_size_facilityIconSize + "px"); + this.uiFollowRoot.thickness = 0; + + + this.ui_select = new Ellipse("select"); + + + this.uiFollowRoot.addControl(this.ui_select); + this.ui_select.background = BabylonUIStyleTool.c_color_3d_blue; + this.ui_select.thickness = 0; + this.ui_select.width = 0.95; + this.ui_select.height = 0.95; + this.ui_select.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + this.ui_select.shadowBlur = 3; + this.ui_select.isVisible = false; + + // this.uiIconBtn = Button.CreateImageButton("iconPath", "", iconPath); + // this.uiIconBtn.thickness = 0; + // this.uiIconBtn.image.width = 0.9; + // this.uiIconBtn.image.height = 0.9; + // this.uiIconBtn.image.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER; + // this.uiIconBtn.image.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER; + // this.uiFollowRoot.addControl(this.uiIconBtn); + + + // this.uiIconBtn.onPointerClickObservable.add(() => { + // instance.onStopLongPress(null, null); + // }); + + this.uiFollowRoot.zIndex = BabylonUIStyleTool.c_zIndex_facilityIcon; + + this.markData = this.modelData as MarkData; + if (this.markData.property != null && this.markData.property.taskType != MarkTask.None) { + + this.headMesh = MeshBuilder.CreateBox("headMesh", { size: 0.001 }); + this.headMesh.position = this.modelBox.absolutePosition.add(new Vector3(0, this.modelBox.scaling.y * 0.5, 0)).add(new Vector3(0, 0.5, 0)); + this.headMesh.setParent(this.modelBox); + + + this.uiFollowHead = Button.CreateSimpleButton('followHead_' + this.key, ""); + UIManager.Instance.uiRoot.addControl(this.uiFollowHead); + this.uiFollowHead.width = this.c_uiDefaultWidth + "px"; + this.uiFollowHead.height = "50px"; + this.uiFollowHead.thickness = 0; + this.uiFollowHead.linkWithMesh(this.headMesh); + this.uiFollowHead.onPointerClickObservable.add(() => { + MarkWindow.instance.selectMarkDataFrom3d(instance, true); + instance.lookAt(); + }); + + this.uiFollowHeadBg = new Rectangle('bg'); + this.uiFollowHead.addControl(this.uiFollowHeadBg); + this.uiFollowHeadBg.width = 1; + this.uiFollowHeadBg.alpha = 0.7; + this.uiFollowHeadBg.color = BabylonUIStyleTool.c_color_3d_blueLight; + this.uiFollowHeadBg.background = BabylonUIStyleTool.c_color_3d_blueBg; + + + this.uiNumber = new TextBlock(this.modelData.key + "-num", this.markData.property.getInstitutionNum()); + this.uiFollowHead.addControl(this.uiNumber); + this.uiNumber.width = 1; + this.uiNumber.height = 0.5; + this.uiNumber.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + this.uiNumber.color = "white"; + this.uiNumber.shadowBlur = 2; + this.uiNumber.textWrapping = TextWrapping.Clip; + this.uiNumber.resizeToFit = true; + + this.uiTask = new TextBlock(this.modelData.key + "-task", this.markData.property.task); + this.uiFollowHead.addControl(this.uiTask); + this.uiTask.width = 1; + this.uiTask.height = 0.5; + this.uiTask.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM + this.uiTask.color = BabylonUIStyleTool.c_color_3d_blue; + this.uiTask.shadowBlur = 1; + this.uiTask.textWrapping = TextWrapping.Clip; + this.uiTask.resizeToFit = true; + + this.updateProperty(); + } + + + } + + + //终止长按 + onStopLongPress(eventData: Vector2WithInfo, eventState: EventState) { + // this.onClickMeshIconBtn(eventData,eventState); + MarkWindow.instance.selectMarkDataFrom3d(this, true); + } + + /** + * 选中 + * @param select + */ + onSelect(select: boolean) { + this.isSelect = select; + // this.lookAt(); + if (select) { + SceneManager.Instance.addToHighLight(this.modelBox as Mesh, this.c_highLightColor); + if (this.pointerDragBehavior == null) { + this.pointerDragBehavior = new PointerDragBehavior({ dragPlaneNormal: Vector3.Up() }); //平面内移动 + this.modelBox.addBehavior(this.pointerDragBehavior); + this.pointerDragBehavior.onDragEndObservable.add((event) => { + // instance.modelData.transformData.position = instance.modelBox.position; + }) + } + else { + //this.pointerDragBehavior.enabled = true; + } + + // SceneManager.Instance.defaultCamera.target = this.modelBox.absolutePosition.clone() + // SceneManager.Instance.defaultCamera.setTarget(this.modelBox.absolutePosition.clone()); + + } + else { + SceneManager.Instance.removeFromHighLight(this.modelBox as Mesh) + if (this.pointerDragBehavior != null) { + //this.pointerDragBehavior.enabled = false; //停止拖拽 + } + } + + let eventType: MarkInfoChangeType = select ? MarkInfoChangeType.Select : MarkInfoChangeType.UnSelect; + Event_MarkInfoChange.dispatch(eventType, this); + + + } + + /** + * 聚焦 + */ + lookAt() { + BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, this.modelBox, true, null); + } + + /** + * 更新属性显示 + */ + updateProperty() { + if (this.markData.property.taskType != MarkTask.None) { + this.uiNumber.text = this.markData.property.getInstitutionNum(); + this.uiTask.text = this.markData.property.task; + + let instance = this; + setTimeout(() => { + if (instance.uiNumber == null) { + return; + } + let numWidth = instance.uiNumber.widthInPixels; + let taskWidth = instance.uiTask.widthInPixels; + let maxWidth = Math.max(numWidth, taskWidth, this.c_uiDefaultWidth); + instance.uiFollowHead.widthInPixels = maxWidth; + // instance.uiFollowHeadBg.widthInPixels = maxWidth; + }, (50)); + + if (this.taskNeedWaterParticle()) { + this.sprinklingWater(true); + } + else { + this.sprinklingWater(false); + } + + + } + } + + + + + + /** + * 释放属性相关ui + */ + disposeProperty() { + + if (this.uiNumber != null) { + this.uiNumber.dispose(); + this.uiNumber = null; + } + if (this.uiTask != null) { + this.uiTask.dispose(); + this.uiTask = null; + } + + if (this.uiFollowHead != null) { + this.uiFollowHead.dispose(); + this.uiFollowHead = null; + } + + } + + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + modelBox.name = markData.key; + + let info = new ModelInfo_mark(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + /** + * 显隐跟随UI + * @param show + */ + showFollowUI(show: boolean) { + super.showFollowUI(show); + if (this.uiFollowHead != null) { + this.uiFollowHead.isVisible = show; + } + } + + dispose() { + SceneManager.Instance.removeFromHighLight(this.modelBox as Mesh); + this.disposeProperty(); + super.dispose(); + } + + //#region 喷水 + + + /** + * 播放喷水特效的任务,包含此特殊字则播放 + */ + static readonly c_taskPenShui: string[] = ["喷水", "冷却", "灭火", "控火"]; + + + /** + * 喷水特效 + */ + particle_water: ParticleSystem; + + /** + * 喷头(消防员喷水枪) + */ + node_pt: Mesh; + /** + * 喷嘴,用于放特效的根节点 + */ + node_pz: Mesh; + + /** + * 正在喷水 + */ + isSprinkling: boolean; + + + /** + * 是否可以喷水 + */ + canSprinkling() { + let result = false; + switch (this.markData.type) { + case MarkType.MHF: + case MarkType.JYF: + case MarkType.GRF: + case MarkType.FHF: + case MarkType.BHF: + result = true; + //五种消防员 + if (this.node_pt == null && this.models != null) { + this.node_pt = this.getChildrenByName("PT") as Mesh; + // for (let i = 0; i < this.models.length; i++) { + // if (this.models[i].name == "PT") { + // this.node_pt = this.models[i] as Mesh; + // break; + // } + // } + } + break; + case MarkType.SGC: + case MarkType.PMC: + case MarkType.GPC: + case MarkType.GCGSC: + case MarkType.YTC: + //五种消防车 + result = true; + break; + case MarkType.SP: + result = true; + break; + default: + break; + } + + + if (result == true && this.node_pz == null && this.models != null) { + this.node_pz = this.getChildrenByName("PZ") as Mesh; + // let transformNodes = this.modelBox.getChildTransformNodes(); + // for (let i = 0; i < transformNodes.length; i++) { + // if (transformNodes[i].name == "PZ") { + + // this.node_pz = new Mesh("PZ_1", undefined, transformNodes[i]); + // break; + // } + // } + } + if (this.node_pz == null) { + result = false; + } + else { + this.node_pz.scaling = Vector3.One(); + this.node_pz.isVisible = false; + } + + return result; + } + + /** + * 当前任务是否需要喷水特效 + */ + taskNeedWaterParticle() { + let result: boolean = false; + for (let i = 0; i < ModelInfo_mark.c_taskPenShui.length; i++) { + //包含某些特殊字 + if (TsTool.stringContain(this.markData.property.task, ModelInfo_mark.c_taskPenShui[i])) { + result = true; + break; + } + } + return result; + } + + /** + * 喷水 + * @param show + */ + sprinklingWater(show: boolean) { + let canSprinkling = this.canSprinkling();//是否可以喷水 + let instance = this; + if (!canSprinkling) { + return; + } + switch (this.markData.type) { + case MarkType.MHF: + case MarkType.JYF: + case MarkType.GRF: + case MarkType.FHF: + case MarkType.BHF: + //消防员,显隐喷枪 + if (this.node_pt != null) { + this.node_pt.setEnabled(show); + } + break; + } + if (this.particle_water != null) { + this.playWater(show); + } + else { + //编写特效克隆方案 + //加载特效,然后播放 + ParticleSystemTool.instance.importParticle(this.markData.type + "_water", MarkWindow.c_water_particlePath, (ps) => { + instance.particle_water = ps; + instance.particle_water.emitter = instance.node_pz; + instance.playWater(show); + + }) + + } + + } + /** + * 播放喷水 + * @param show + */ + playWater(show: boolean) { + if (this.particle_water == null) { + return; + } + this.isSprinkling = show; + if (show) { + this.changeWaterPower(this.markData.waterPower); + this.particle_water.start(); + + } + else { + this.particle_water.stop(); + } + + + } + + /** + * 改变喷水强度,返回改变后的 + * @param 最小值:c_waterPower_min + * @param 最大值:c_waterPower_max + * @param value + */ + changeWaterPower(value: number): number { + + if (!this.isSprinkling) //不在喷水 + { + return value; + } + + let power = Math.min(value, ModelInfo_mark.c_waterPower_max); + power = Math.max(power, ModelInfo_mark.c_waterPower_min); + + + if (this.particle_water != null) { + this.particle_water.minEmitPower = power * 0.3; + this.particle_water.maxEmitPower = power; + } + + this.markData.waterPower = power; + return power; + + } + + + //#endregion + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/other/mark-plan-area-info.ts b/src/app/babylon/model/info/mark/other/mark-plan-area-info.ts new file mode 100644 index 0000000..af38dfa --- /dev/null +++ b/src/app/babylon/model/info/mark/other/mark-plan-area-info.ts @@ -0,0 +1,271 @@ +import { AbstractMesh, Color3, Material, Mesh, MeshBuilder, PointerDragBehavior, PolygonMeshBuilder, Vector2, Vector3 } from "@babylonjs/core"; +import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial"; +import { classToClass, plainToClass } from "class-transformer"; +import { SceneManager } from "src/app/babylon/controller/scene-manager"; +import { BabylonTool } from "src/app/babylon/tool/babylon-tool"; +import { MarkWindow } from "src/app/babylon/view/mark-window/mark-window"; + + +import { MarkData, MarkType } from "../../../data/mark/mark-data"; +import { MarkData_Area } from "../../../data/mark/other/mark-data-area"; +import { ModelInfo_mark } from "../model-info-mark"; + +/** + * 区域类的标绘物 + */ +export class ModelInfo_mark_area extends ModelInfo_mark { + + areaSize = 5;//区域尺寸 + + material: StandardMaterial;//mesh材质 + pointMat: StandardMaterial; //顶点材质 + + areaPoint: AreaPoint[]; + + areaMesh: Mesh; + + areaDragEvent: PointerDragBehavior;//区域mesh 拖拽行为 + + onCreate(isNew: boolean) { + super.onCreate(isNew); + + this.modelBox.position.y = this.modelBox.position.y + 1; + + let data = this.markData as MarkData_Area; + + this.pointMat = new StandardMaterial("mat_areaPoint", SceneManager.Instance.scene); + this.pointMat.emissiveColor = Color3.FromHexString("#A9FF00"); + this.pointMat.disableLighting = true; + this.pointMat.alpha = 0.87; + + + let instance = this; + this.areaDragEvent = new PointerDragBehavior({ dragPlaneNormal: Vector3.Up() }); //平面内移动 + this.areaDragEvent.moveAttached = false; + this.areaDragEvent.onDragStartObservable.add((eventData) => { + //instance.modelBox.translate(eventData.dragPlaneNormal, eventData.dragDistance); + MarkWindow.instance.selectMarkDataFrom3d(instance, true); + }) + + this.initMeshPoint(isNew); + this.material = new StandardMaterial("mat_area", SceneManager.Instance.scene); + this.material.emissiveColor = Color3.FromHexString((this.markData as MarkData_Area).color); + this.material.disableLighting = true; + this.material.alpha = 0.87; + this.refreshMesh(); + } + + getVector2Point(): Vector2[] { + let data = this.markData as MarkData_Area; + let point: Vector2[] = []; + for (let i = 0; i < data.pointData.length; i++) { + let pos = new Vector2(data.pointData[i].x, data.pointData[i].z); + point.push(pos); + } + return point; + } + + + + /** + * 更新mesh + */ + refreshMesh() { + if (this.areaMesh != null) { + this.areaMesh.removeBehavior(this.areaDragEvent); + this.areaMesh.dispose(); + SceneManager.Instance.removeFromHighLight(this.areaMesh); + } + + let poly_tri = new PolygonMeshBuilder("polytri", this.getVector2Point(), SceneManager.Instance.scene); + this.areaMesh = poly_tri.build(true, 0); + this.areaMesh.setParent(this.modelBox); + this.areaMesh.position = new Vector3(0, 1, 0); + this.areaMesh.material = this.material; + this.areaMesh.addBehavior(this.areaDragEvent); + + if (this.isSelect) { + // console.log("选中状态下更新"); + SceneManager.Instance.addToHighLight(this.areaMesh, this.c_highLightColor); + } + + } + + /** + * 更新顶点 + * @param index + */ + initMeshPoint(isNew: boolean) { + let data = this.markData as MarkData_Area; + + if (isNew) { + switch (data.type) { + case MarkType.JJQ: data.pointData = this.getDefaultPoint_4(); + break; + case MarkType.QYSDA: data.pointData = this.getDefaultPoint_6(); + break; + case MarkType.QYSDB: data.pointData = this.getDefaultPoint_8(); + } + + } + else { + data.pointData = plainToClass(Vector3, data.pointData); + } + + this.areaPoint = []; + for (let i = 0; i < data.pointData.length; i++) { + let newPoint = new AreaPoint(data.pointData[i], this.pointMat, this); + this.areaPoint.push(newPoint); + } + + } + + /** + * 显示顶点 + * @param show + */ + showMeshPoint(show: boolean) { + + } + + //清空顶点 + clearMeshPoint() { + for (let i = 0; i < this.areaPoint.length; i++) { + this.areaPoint[i].dispose(); + } + this.areaPoint = []; + } + + + /** + * 获取默认位置,4点 + * @param center + */ + getDefaultPoint_4() { + let l_xy = this.areaSize; + let result = [new Vector3(l_xy, 0, l_xy), new Vector3(l_xy, 0, -l_xy), new Vector3(-l_xy, 0, -l_xy), new Vector3(-l_xy, 0, l_xy)]; + return result; + } + + /** + * 获取默认位置,6边型 + * @param center + */ + getDefaultPoint_6() { + let sin60 = Math.sin(Math.PI / 3) * this.areaSize; + let sin30 = 0.5 * this.areaSize; + let l_size = this.areaSize; + let result = [new Vector3(0, 0, l_size), new Vector3(sin60, 0, sin30), new Vector3(sin60, 0, -sin30), new Vector3(0, 0, -l_size), new Vector3(-sin60, 0, -sin30), new Vector3(-sin60, 0, sin30)]; + return result; + } + + /** + * 获取默认位置,8边形 + * @param center + */ + getDefaultPoint_8() { + let sin45 = Math.sin(Math.PI * 0.25) * this.areaSize; + let l_size = this.areaSize; + let result = [new Vector3(0, 0, l_size), new Vector3(sin45, 0, sin45), new Vector3(l_size, 0, 0), new Vector3(sin45, 0, -sin45), + new Vector3(0, 0, -l_size), new Vector3(-sin45, 0, -sin45), new Vector3(-l_size, 0, 0), new Vector3(-sin45, 0, sin45)]; + return result; + } + + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark_area { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + + let info = new ModelInfo_mark_area(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + dispose() { + this.areaMesh.dispose(); + this.material.dispose(); + this.pointMat.dispose(); + this.clearMeshPoint(); + + super.dispose(); + } + +} + +/** + * 区域顶点 + */ +export class AreaPoint { + + parent: ModelInfo_mark_area; + + mesh: Mesh; + + pos: Vector3; + + pointerDragBehavior: PointerDragBehavior;//拖拽事件 + + constructor(pos: Vector3, material: Material, parent: ModelInfo_mark_area) { + this.pos = pos; + this.parent = parent; + + this.mesh = MeshBuilder.CreateSphere("AreaPoint", { segments: 4, diameter: 3 }); + this.mesh.material = material; + this.mesh.setParent(parent.modelBox); + this.mesh.position = pos; + this.initDragEvent(); + + + } + + + initDragEvent() { + let instance = this; + this.pointerDragBehavior = new PointerDragBehavior({ dragPlaneNormal: Vector3.Up() }); //平面内移动 + this.mesh.addBehavior(this.pointerDragBehavior); + this.pointerDragBehavior.onDragStartObservable.add(() => { + instance.parent.setDragEventEnable(false); + }) + this.pointerDragBehavior.onDragObservable.add(() => { + instance.parent.refreshMesh(); + setTimeout(() => { + instance.parent.refreshMesh(); + }, 100); + }); + this.pointerDragBehavior.onDragEndObservable.add(() => { + instance.parent.setDragEventEnable(true); + instance.parent.refreshMesh(); + }) + } + + + dispose() { + this.mesh.removeBehavior(this.pointerDragBehavior); + this.pointerDragBehavior = null; + this.mesh.dispose(); + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/other/mark-plan-line-info.ts b/src/app/babylon/model/info/mark/other/mark-plan-line-info.ts new file mode 100644 index 0000000..ccff6c3 --- /dev/null +++ b/src/app/babylon/model/info/mark/other/mark-plan-line-info.ts @@ -0,0 +1,183 @@ +import { Color3, EventState, Mesh, MeshBuilder, Observer, PointerEventTypes, PointerInfo, Scene, StandardMaterial, Vector3 } from "@babylonjs/core"; +import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh"; +import { classToClass, plainToClass } from "class-transformer"; +import { SceneManager } from "src/app/babylon/controller/scene-manager"; +import { BabylonTool } from "src/app/babylon/tool/babylon-tool"; +import { MarkWindow } from "src/app/babylon/view/mark-window/mark-window"; + +import { MarkData } from "../../../data/mark/mark-data"; +import { MarkData_Line } from "../../../data/mark/other/mark-data-line"; + + +import { ModelInfo_mark } from "../model-info-mark"; + +/** + * 单线条 + */ +export class ModelInfo_mark_line extends ModelInfo_mark { + lineData: MarkData_Line; + + onPointObserver: Observer; + + lineMesh: Mesh; + + mat: StandardMaterial; + + + onCreate(isNew: boolean) { + let instance = this; + instance.lineData = this.markData as MarkData_Line; + + + this.mat = new StandardMaterial("mat_areaPoint", SceneManager.Instance.scene); + this.mat.emissiveColor = Color3.FromHexString(this.lineData.color); + this.mat.disableLighting = true; + + if (isNew) { + instance.lineData.pointData = []; + instance.lineData.pointData.push(Vector3.Zero()); + + setTimeout(() => { + instance.onPointObserver = SceneManager.Instance.scene.onPointerObservable.add((eventData: PointerInfo, eventState: EventState) => { + instance.onPointerObservable(eventData, eventState); + } + + ); + }, 300); + } + else { + instance.lineData.pointData = plainToClass(Vector3, instance.lineData.pointData); + } + instance.updateRender(); + } + + /** + * 更新显示 + */ + updateRender() { + if (this.lineData.pointData != null && this.lineData.pointData.length > 1) { + this.lineMesh = MeshBuilder.CreateTube("tube", { path: this.lineData.pointData, radius: 0.5, sideOrientation: Mesh.DOUBLESIDE, updatable: true }, SceneManager.Instance.scene); + this.lineMesh.setParent(this.modelBox); + this.lineMesh.position = Vector3.Zero(); + this.lineMesh.material = this.mat; + + } + } + + /** + * 添加节点 + * @param point + */ + addPoint(point: Vector3) { + + this.lineData.pointData.push(point.subtract(this.modelBox.absolutePosition)); + + //更新表现 + + if (this.lineData.pointData.length == 2) { + this.removeEvent(); + this.updateRender(); + + MarkWindow.instance.selectMarkDataFrom3d(this, true); + } + + } + + /** + * 移除事件 + */ + removeEvent() { + if (this.onPointObserver != null) { + SceneManager.Instance.scene.onPointerObservable.remove(this.onPointObserver); + this.onPointObserver = null; + } + } + + /** + * 取消创建 + */ + cancelCreate() { + if (this.lineData.pointData.length < 2) { + MarkWindow.instance.deleteMarkInfo(this); + } + + } + + + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = this; + if (MarkWindow.instance.markLineIsBreak < 0) { + instance.cancelCreate(); + return; + } + + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + if (eventData.event.button == 0) { //左键正常 + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + console.log("点击添加节点"); + instance.addPoint(eventData.pickInfo.pickedPoint); + } + } + else { //右键取消 + console.log("按键", eventData.event.button); + instance.cancelCreate(); + } + break; + + } + } + + + onSelect(select: boolean) { + super.onSelect(select); + + if (select = false) { + this.cancelCreate(); + } + } + + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + let info = new ModelInfo_mark_line(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + + dispose() { + if (this.mat != null) { + this.mat.dispose(); + } + + this.removeEvent(); + super.dispose(); + } + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/other/mark-plan-multi-arrow.ts b/src/app/babylon/model/info/mark/other/mark-plan-multi-arrow.ts new file mode 100644 index 0000000..493e566 --- /dev/null +++ b/src/app/babylon/model/info/mark/other/mark-plan-multi-arrow.ts @@ -0,0 +1,323 @@ +import { Color3, MeshBuilder, Quaternion, Space, Vector3 } from "@babylonjs/core"; +import { PointerEventTypes, PointerInfo } from "@babylonjs/core/Events/pointerEvents"; +import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial"; +import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh"; +import { Mesh } from "@babylonjs/core/Meshes/mesh"; +import { EventState, Observer } from "@babylonjs/core/Misc/observable"; +import { classToClass, plainToClass } from "class-transformer"; +import { SceneManager } from "src/app/babylon/controller/scene-manager"; +import { BabylonTool } from "src/app/babylon/tool/babylon-tool"; +import { MarkWindow } from "src/app/babylon/view/mark-window/mark-window"; + + +import { MarkData, MarkType } from "../../../data/mark/mark-data"; +import { MarkData_multiArrow } from "../../../data/mark/other/mark-data-multi-arrow"; +import { ModelInfo_mark } from "../model-info-mark"; + +/** + * 多点的箭头 + */ +export class ModelInfo_mark_multiArrow extends ModelInfo_mark { + + + arrowData: MarkData_multiArrow; + + onPointObserver: Observer; + + arrowInfo: ArrowInfo[] = []; + + mat: StandardMaterial; + + + onCreate(isNew: boolean) { + let instance = this; + instance.arrowData = this.markData as MarkData_multiArrow; + + + this.mat = new StandardMaterial("mat_multiArrow", SceneManager.Instance.scene); + if (this.arrowData.color == null) { + this.mat.emissiveColor = Color3.Green(); + } + else { + this.mat.emissiveColor = Color3.FromHexString(this.arrowData.color); + } + + this.mat.disableLighting = true; + + if (isNew) { + instance.arrowData.pointData = []; + instance.addPoint(this.modelBox.absolutePosition.clone()); + + setTimeout(() => { + instance.onPointObserver = SceneManager.Instance.scene.onPointerObservable.add((eventData: PointerInfo, eventState: EventState) => { + instance.onPointerObservable(eventData, eventState); + } + + ); + }, 300); + } + else { + instance.arrowData.pointData = plainToClass(Vector3, instance.arrowData.pointData); + instance.updateRender(); + } + + } + + /** + * 更新显示 + */ + updateRender() { + if (this.arrowData.pointData != null && this.arrowData.pointData.length > 1) { + // this.lineMesh = MeshBuilder.CreateTube("tube", { path: this.lineData.pointData, radius: this.lineData.radius, sideOrientation: Mesh.DOUBLESIDE, updatable: true }, SceneManager.Instance.scene); + // this.lineMesh.setParent(this.modelBox); + // this.lineMesh.position = Vector3.Zero(); + // this.lineMesh.material = this.mat; + for (let i = 1; i < this.arrowData.pointData.length; i++) { + // let newBox = MeshBuilder.CreateBox("box", { size: 1 }); + // newBox.setParent(this.modelBox); + // newBox.position = this.arrowData.pointData[i]; + let lastPoint = this.arrowData.pointData[i - 1]; + let point = this.arrowData.pointData[i]; + let newArrow = new ArrowInfo(lastPoint, point, this.mat, this.modelBox as Mesh); + this.arrowInfo.push(newArrow); + } + + } + } + + /** + * 添加节点 + * @param point + */ + addPoint(point: Vector3) { + + let localPos = point.subtract(this.modelBox.absolutePosition); + + localPos.y = localPos.y / this.modelBox.scaling.y; + console.log(point, localPos, this.modelBox.absolutePosition); + + let startBox = MeshBuilder.CreateBox("start", { size: 1 }); + startBox.setParent(this.modelBox); + + startBox.position = localPos; + + + + this.arrowData.pointData.push(localPos); + + //更新表现 + + if (this.arrowData.pointData.length > 1) { + + // this.updateRender(); + let lastPoint = this.arrowData.pointData[this.arrowData.pointData.length - 2]; + let newArrow = new ArrowInfo(lastPoint, localPos, this.mat, this.modelBox as Mesh); + this.arrowInfo.push(newArrow); + } + + } + + /** + * 移除事件 + */ + removeEvent() { + if (this.onPointObserver != null) { + SceneManager.Instance.scene.onPointerObservable.remove(this.onPointObserver); + this.onPointObserver = null; + } + } + + /** + * 取消创建 + */ + cancelCreate() { + if (this.arrowData.pointData.length < 2) { + MarkWindow.instance.deleteMarkInfo(this); + } + + if (this.arrowData.type == MarkType.JGLX) { + MarkWindow.instance.mulArrowIsBreak_JG = -1; + } + else if (this.arrowData.type == MarkType.CT) { + MarkWindow.instance.mulArrowIsBreak_CT = -1; + } + + } + + + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = this; + if (this.arrowData.type == MarkType.JGLX && MarkWindow.instance.mulArrowIsBreak_JG < 0) { + instance.cancelCreate(); + instance.removeEvent(); + return; + } + else if (this.arrowData.type == MarkType.CT && MarkWindow.instance.mulArrowIsBreak_CT < 0) { + instance.cancelCreate(); + instance.removeEvent(); + return; + } + + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + if (eventData.event.button == 0) { //左键正常 + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + instance.addPoint(eventData.pickInfo.pickedPoint); + } + } + else if (eventData.event.button == 2) { //右键取消 + instance.cancelCreate(); + instance.removeEvent(); + } + break; + + } + } + + + onSelect(select: boolean) { + super.onSelect(select); + + if (select = false) { + this.cancelCreate(); + } + } + + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + let info = new ModelInfo_mark_multiArrow(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + + dispose() { + if (this.mat != null) { + this.mat.dispose(); + } + + this.removeEvent(); + super.dispose(); + } + + +} + +/** + * 箭头信息 + * 仅用作创建mesh,所以没有释放(mesh会跟随父节点释放) + */ +class ArrowInfo { + + static s_step = 3;//箭头间隔(从头到下一个的头) + + lastArrowInfo: ArrowInfo;//上一个箭头 + parent: Mesh; + mesh: Mesh[] = []; + + point: Vector3[]; + + start: Vector3; + + end: Vector3; + forward: Vector3; + + endlocalY: number; //局部的Y做坐标,末尾 + mat: StandardMaterial; + + constructor(start: Vector3, end: Vector3, mat: StandardMaterial, parent: Mesh) { + this.start = start; + this.end = end; + this.forward = end.subtract(start).normalize(); + this.mat = mat; + this.parent = parent; + this.createMesh(); + } + + createMesh() { + //let distance = Vector3.Distance(this.start, this.end); + //console.log(distance); + + + let distance = Vector3.Distance(new Vector3(this.start.x, 0, this.start.z), new Vector3(this.end.x, 0, this.end.z)); + + let yStep = (this.start.y - this.end.y) / (distance / ArrowInfo.s_step); + + let index = 0; + + + while (distance > ArrowInfo.s_step) { + + let offset = index * ArrowInfo.s_step; + let forwardDistance = this.forward.multiplyByFloats(1, 0, 1).normalize().multiplyByFloats(offset, offset, offset); + let meshStart: Vector3 = this.start.add(forwardDistance); + + let posArray = []; + posArray.push(new Vector3(0, 0, 2)); + posArray.push(new Vector3(-1, 0, 1)); + posArray.push(new Vector3(-0.5, 0, 1)); + posArray.push(new Vector3(-0.5, 0, 0)); + posArray.push(new Vector3(0.5, 0, 0)); + posArray.push(new Vector3(0.5, 0, 1)); + posArray.push(new Vector3(1, 0, 1)); + + let l_mesh = MeshBuilder.ExtrudePolygon("arrow", { shape: posArray, depth: 1, updatable: false }, SceneManager.Instance.scene); + l_mesh.material = this.mat; + + + + l_mesh.setParent(this.parent); + this.endlocalY = (0.5) / this.parent.scaling.y - index * yStep;//0.5 - index * yStep + //l_mesh.position = new Vector3(0, (0.5 - index * yStep) / this.parent.scaling.y, 0).add(meshStart); + l_mesh.position = new Vector3(0, this.endlocalY, 0).add(meshStart); + // l_mesh.setParent(null) + + // setTimeout(() => { + l_mesh.lookAt(this.end.add(this.parent.absolutePosition), undefined, undefined, undefined, Space.WORLD); + l_mesh.rotation.x = 0; + l_mesh.rotation.z = 0; + + // }, (50)); + + // l_mesh.rotation.x = 0; + // l_mesh.rotation.z = 0; + // l_mesh.setParent(this.parent); + + //l_mesh.rotationQuaternion = Quaternion.FromEulerVector(Vector3.Zero()); + + // let angle = Vector3.GetAngleBetweenVectors(l_mesh.forward, this.forward, Vector3.Up()); + // l_mesh.rotation.y = 180 / Math.PI * angle; + + + this.mesh.push(l_mesh); + + distance -= ArrowInfo.s_step; + index++; + + } + } +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/other/mark-plan-multi-line-info.ts b/src/app/babylon/model/info/mark/other/mark-plan-multi-line-info.ts new file mode 100644 index 0000000..bd7c152 --- /dev/null +++ b/src/app/babylon/model/info/mark/other/mark-plan-multi-line-info.ts @@ -0,0 +1,185 @@ +import { Color3, MeshBuilder, Vector3 } from "@babylonjs/core"; +import { PointerEventTypes, PointerInfo } from "@babylonjs/core/Events/pointerEvents"; +import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial"; +import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh"; +import { Mesh } from "@babylonjs/core/Meshes/mesh"; +import { EventState, Observer } from "@babylonjs/core/Misc/observable"; +import { classToClass, plainToClass } from "class-transformer"; +import { SceneManager } from "src/app/babylon/controller/scene-manager"; +import { BabylonTool } from "src/app/babylon/tool/babylon-tool"; +import { MarkWindow } from "src/app/babylon/view/mark-window/mark-window"; + + +import { MarkData } from "../../../data/mark/mark-data"; +import { MarkData_multiLine } from "../../../data/mark/other/mark-data-multi-line"; +import { ModelInfo_mark } from "../model-info-mark"; + +/** + * 多点的线段 + */ +export class ModelInfo_mark_multiLine extends ModelInfo_mark { + + + lineData: MarkData_multiLine; + + onPointObserver: Observer; + + lineMesh: Mesh; + + mat: StandardMaterial; + + + onCreate(isNew: boolean) { + let instance = this; + instance.lineData = this.markData as MarkData_multiLine; + + + this.mat = new StandardMaterial("mat_multiLine", SceneManager.Instance.scene); + this.mat.emissiveColor = Color3.FromHexString(this.lineData.color); + this.mat.disableLighting = true; + + if (isNew) { + instance.lineData.pointData = []; + instance.addPoint(this.modelBox.absolutePosition.clone()); + + setTimeout(() => { + instance.onPointObserver = SceneManager.Instance.scene.onPointerObservable.add((eventData: PointerInfo, eventState: EventState) => { + instance.onPointerObservable(eventData, eventState); + } + + ); + }, 300); + } + else { + instance.lineData.pointData = plainToClass(Vector3, instance.lineData.pointData); + } + instance.updateRender(); + } + + /** + * 更新显示 + */ + updateRender() { + if (this.lineData.pointData != null && this.lineData.pointData.length > 1) { + this.lineMesh = MeshBuilder.CreateTube("tube", { path: this.lineData.pointData, radius: this.lineData.radius, sideOrientation: Mesh.DOUBLESIDE, updatable: true }, SceneManager.Instance.scene); + this.lineMesh.setParent(this.modelBox); + this.lineMesh.position = Vector3.Zero(); + this.lineMesh.material = this.mat; + + } + } + + /** + * 添加节点 + * @param point + */ + addPoint(point: Vector3) { + point.y = point.y + this.lineData.yPos; + this.lineData.pointData.push(point.subtract(this.modelBox.absolutePosition)); + //更新表现 + + if (this.lineData.pointData.length > 1) { + + this.updateRender(); + } + + } + + /** + * 移除事件 + */ + removeEvent() { + if (this.onPointObserver != null) { + SceneManager.Instance.scene.onPointerObservable.remove(this.onPointObserver); + this.onPointObserver = null; + } + } + + /** + * 取消创建 + */ + cancelCreate() { + if (this.lineData.pointData.length < 2) { + MarkWindow.instance.deleteMarkInfo(this); + } + MarkWindow.instance.mulLineIsBreak_SD = -1; + + } + + + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = this; + if (MarkWindow.instance.mulLineIsBreak_SD < 0) { + instance.cancelCreate(); + instance.removeEvent(); + return; + } + + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + if (eventData.event.button == 0) { //左键正常 + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + instance.addPoint(eventData.pickInfo.pickedPoint); + } + } + else if (eventData.event.button == 2) { //右键取消 + instance.cancelCreate(); + instance.removeEvent(); + } + break; + + } + } + + + onSelect(select: boolean) { + super.onSelect(select); + + if (select = false) { + this.cancelCreate(); + } + } + + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + let info = new ModelInfo_mark_multiLine(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + + dispose() { + if (this.mat != null) { + this.mat.dispose(); + } + + this.removeEvent(); + super.dispose(); + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/other/mark-plan-particle-info.ts b/src/app/babylon/model/info/mark/other/mark-plan-particle-info.ts new file mode 100644 index 0000000..0a1a9ce --- /dev/null +++ b/src/app/babylon/model/info/mark/other/mark-plan-particle-info.ts @@ -0,0 +1,149 @@ +import { Mesh, ParticleSystem, ParticleSystemSet, Vector3 } from "@babylonjs/core"; +import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh"; +import { classToClass } from "class-transformer"; +import { BabylonTool } from "src/app/babylon/tool/babylon-tool"; +import { ParticleSystemTool } from "src/app/babylon/tool/particle-system-tool"; + +import { MarkType, MarkData } from "../../../data/mark/mark-data"; + +import { ModelInfo_mark } from "../model-info-mark"; + +export class ModelInfo_mark_particle extends ModelInfo_mark { + + /** + * 粒子特效集合 + */ + particleSet: ParticleSystemSet; + + /** + * 是否播放 + */ + isPlaying: boolean = true; + + + onCreate(isNew: boolean) { + super.onCreate(isNew); + let instance = this; + + this.particleSet = new ParticleSystemSet(); + + let particleJsonPath: string[] = []; + + let posOffset = Vector3.Zero(); + + switch (this.markData.type) { + case MarkType.H: + particleJsonPath.push("assets/particlesystem/fire/fire_h_1.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_h_2.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_h_3.json"); + particleJsonPath.push("assets/particlesystem/smoke/smoke_a.json"); + instance.modelBox.scaling = new Vector3(300, 300, 300); + posOffset.y = 2.9 / instance.modelBox.scaling.y; + break; + case MarkType.TPH: + particleJsonPath.push("assets/particlesystem/fire/fire_tph_1.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_tph_2.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_tph_3.json"); + particleJsonPath.push("assets/particlesystem/smoke/smoke_b.json"); + instance.modelBox.scaling = new Vector3(300, 300, 300); + posOffset.y = 2.9 / instance.modelBox.scaling.y; + break; + case MarkType.SNH: + particleJsonPath.push("assets/particlesystem/fire/fire_snh_1.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_snh_2.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_snh_3.json"); + particleJsonPath.push("assets/particlesystem/smoke/smoke_snh.json"); + instance.modelBox.scaling = new Vector3(300, 100, 300); + posOffset.y = 1 / instance.modelBox.scaling.y; + break; + case MarkType.YWA: + particleJsonPath.push("assets/particlesystem/smoke/smoke_a.json"); + instance.modelBox.scaling = new Vector3(500, 100, 500); + break; + case MarkType.YWB: + particleJsonPath.push("assets/particlesystem/smoke/smoke_b.json"); + instance.modelBox.scaling = new Vector3(300, 600, 300); + break; + case MarkType.YWC: + particleJsonPath.push("assets/particlesystem/smoke/smoke_c.json"); + instance.modelBox.scaling = new Vector3(100, 100, 100); + break; + } + + let root: AbstractMesh = new AbstractMesh("psRoot"); + root.setParent(instance.modelBox); + root.position = Vector3.Zero().add(posOffset); + root.rotationQuaternion = undefined; + root.rotation = Vector3.Zero(); + + + for (let i = 0; i < particleJsonPath.length; i++) { + ParticleSystemTool.instance.importParticle(instance.markData.type.toString(), particleJsonPath[i], (ps: ParticleSystem) => { + // instance.modelBox.scaling = new Vector3(100, 300, 100); + ps.emitter = root; + instance.particleSet.systems.push(ps); + if (instance.isPlaying) { + instance.particleSet.start(); + } + }) + } + } + + + play() { + this.isPlaying = true; + if (this.particleSet == null) { + return; + } + this.particleSet.start(); + } + + stop() { + this.isPlaying = true; + if (this.particleSet == null) { + return; + } + for (let i = 0; i < this.particleSet.systems.length; i++) { + this.particleSet.systems[i].stop(); + } + } + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + let info = new ModelInfo_mark_particle(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + + dispose() { + if (this.particleSet != null) { + this.particleSet.dispose(); + } + super.dispose(); + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/model/facilityinfo-tool/facility-area.ts b/src/app/babylon/model/info/model/facilityinfo-tool/facility-area.ts new file mode 100644 index 0000000..6d1184a --- /dev/null +++ b/src/app/babylon/model/info/model/facilityinfo-tool/facility-area.ts @@ -0,0 +1,369 @@ +//#region 区域 + +import { AbstractMesh, Color3, Mesh, MeshBuilder, Observer, PolygonMeshBuilder, Quaternion, Scene, StandardMaterial, Vector2, Vector3 } from "@babylonjs/core"; +import { Button, Vector2WithInfo } from "@babylonjs/gui"; + +import { ModelInfo_facility } from "../model-info-facility"; +import * as earcut from "earcut"; + +import { FacilityType, ModelData_facility } from "../../../data/model-data/model-data-facility"; +import { ModeManager, ModeType } from "src/app/babylon/controller/mode-manager"; +import { SceneManager } from "src/app/babylon/controller/scene-manager"; +import { UIManager } from "src/app/babylon/controller/ui-manager"; +import { BabylonUIStyleTool } from "src/app/babylon/tool/babylon-ui-style-tool"; +import { GizmoTool } from "src/app/babylon/tool/gizmo-tool"; +import { PosPointTool } from "src/app/babylon/tool/pos-point-tool"; + +(window as any).earcut = earcut; + + +// import {earcut} from "earcut"; + +/** + * 区域信息 + */ +export class AreaInfo { + pointData: Vector3[];//点位 + mesh: Mesh; + material: StandardMaterial; + belongToFacility: ModelInfo_facility; + + pointMesh: PolygonMeshPoint[] = []; + root: Mesh; + isShow: boolean; + + onBeforeRenderObserver: Observer; + onGizmoAimMeshObserver: Observer; + + /** + * 根据类别分辨区域颜色 + * @param facilityType + */ + static getAreaColor(facilityType: FacilityType): Color3 { + let result = Color3.Red(); + switch (facilityType) { + case FacilityType.FHFQ: + result = Color3.Red(); + break; + case FacilityType.JTQ: + result = Color3.Yellow(); + break; + case FacilityType.JJQ: + result = Color3.Green(); + break; + } + + return result; + } + + constructor(pointData: Vector3[], facilityInfo: ModelInfo_facility) { + this.belongToFacility = facilityInfo; + this.pointData = pointData; + + this.root = MeshBuilder.CreateBox("areaRoot_" + this.belongToFacility.key, { size: 1 }); + this.root.isVisible = false; + + this.root.setParent(this.belongToFacility.modelBox); + this.root.position = Vector3.Zero(); + this.root.rotationQuaternion = new Quaternion(); + + this.updateMeshPoint(); + + + let poly_tri = new PolygonMeshBuilder("polytri", this.getVector2Point(), SceneManager.Instance.scene); + this.mesh = poly_tri.build(true, 0); + this.mesh.setParent(this.root); + this.mesh.position = Vector3.Zero(); + this.mesh.isPickable = false; + + + this.material = new StandardMaterial("mat_area", SceneManager.Instance.scene); + this.material.emissiveColor = this.getAreaColor(); + this.material.disableLighting = true; + this.material.alpha = 0.5; + this.mesh.material = this.material; + + + let instance = this; + this.onBeforeRenderObserver = SceneManager.Instance.scene.onBeforeRenderObservable.add(() => { + instance.onUpdate(); + }); + + this.onGizmoAimMeshObserver = GizmoTool.onGizmoAimMeshObservable.add((mesh) => { + instance.onChangeGizmo(mesh); + }) + + + //延时更新一下 + setTimeout( + function () { + instance.refreshMesh(); + }, + 100); + + } + + /** + * 获取颜色属性 + */ + getAreaColor() { + let modelData = this.belongToFacility.modelData as ModelData_facility; + let propertyData = modelData.propertyData as any; + if (propertyData.color == undefined) { + propertyData.color = AreaInfo.getAreaColor(modelData.facilityType); + } + else if (!(propertyData.color instanceof Color3)) { + propertyData.color = new Color3(propertyData.color.r, propertyData.color.g, propertyData.color.b); + } + return propertyData.color as Color3; + } + + getVector2Point(): Vector2[] { + let point: Vector2[] = []; + for (let i = 0; i < this.pointData.length; i++) { + point.push(new Vector2(this.pointData[i].x, this.pointData[i].z)); + } + return point; + } + + setEnable(enable: boolean) { + if (this.root != null) { + this.root.setEnabled(enable); + } + } + + dispose() { + SceneManager.Instance.scene.onBeforeRenderObservable.remove(this.onBeforeRenderObserver); + this.onBeforeRenderObserver = null; + GizmoTool.onGizmoAimMeshObservable.remove(this.onGizmoAimMeshObserver); + this.onGizmoAimMeshObserver = null; + this.clearMeshPoint(); + this.material.dispose(); + this.mesh.dispose(); + } + + onChangeGizmo(mesh: AbstractMesh) { + if (mesh != null) { + this.isShow = mesh == this.belongToFacility.modelBox || this.isPosPointMesh(mesh); + this.isShow = this.isShow && ModeManager.currentMode == ModeType.Edit; + this.showPoint(this.isShow); + } + else { + this.showPoint(false); + } + + + } + + //是否是位点mesh + isPosPointMesh(mesh: AbstractMesh): boolean { + if (mesh == null) { + return false; + } + for (let i = 0; i < this.pointMesh.length; i++) { + if (mesh == this.pointMesh[i].mesh) { + return true; + } + } + return false; + } + + + showPoint(show: boolean) { + for (let i = 0; i < this.pointMesh.length; i++) { + this.pointMesh[i].showUI(show); + } + } + + onUpdate() { + + if (!this.isShow) { + return; + } + for (let i = 0; i < this.pointData.length; i++) { + this.pointData[i].y = 0; + } + this.refreshMesh(); + + + } + + refreshMesh() { + if (this.mesh != null) { + this.mesh.dispose(); + let poly_tri = new PolygonMeshBuilder("polytri", this.getVector2Point(), SceneManager.Instance.scene); + this.mesh = poly_tri.build(true, 0); + this.mesh.setParent(this.root); + this.mesh.position = Vector3.Zero(); + this.mesh.isPickable = false; + this.mesh.material = this.material; + } + } + + //更新顶点 + updateMeshPoint(index = -1) { + this.clearMeshPoint(); + let select = null; + for (let i = 0; i < this.pointData.length; i++) { + let l_meshPoint = new PolygonMeshPoint(PosPointTool.c_key + "_" + i, i, 0.2, this.root, this.pointData[i], this); + + this.pointMesh.push(l_meshPoint); + if (i == index) { + select = l_meshPoint; + + } + } + if (select != null) { + select.changeAim(); + } + } + + //清空顶点 + clearMeshPoint() { + for (let i = 0; i < this.pointMesh.length; i++) { + this.pointMesh[i].dispose(); + } + this.pointMesh = []; + } + + //加点 + addPoint(index: number) { + let newIndex = index; + + let pos = Vector3.Zero(); + let num = this.pointData.length; + if (newIndex < 1) { + pos = (this.pointData[0].add(this.pointData[num - 1])).multiplyByFloats(0.5, 0.5, 0.5); + this.pointData.push(pos); + this.updateMeshPoint(num); + } + else { + pos = (this.pointData[index].add(this.pointData[index - 1])).multiplyByFloats(0.5, 0.5, 0.5); + this.pointData.splice(index, 0, pos); + this.updateMeshPoint(index); + } + + + + } + + //减点 + reducePoint(index: number) { + + let num = this.pointData.length; + if (num < 4) { + //ThreeDimensionalHomeComponent.instance.openSnackBar("不能少于3个顶点"); + // alert("不能少于3个顶点"); + return; + } + this.pointData.splice(index, 1); + let newSelectIndex = index; + if (newSelectIndex <= 0) { + newSelectIndex = 1; + } + this.updateMeshPoint(newSelectIndex); + } + +} + +//可编辑多边形的mesh +export class PolygonMeshPoint { + + area: AreaInfo + mesh: Mesh; + pos: Vector3; + + index: number; + + uiRoot: Button; + + onGizmoAimMeshObservor: Observer; + onPointerClickObservor: Observer; + + constructor(name: string, index: number, size: number, parent: Mesh, pos: Vector3, area: AreaInfo) { + + + this.index = index; + this.area = area; + + this.initEditUI(name, size, parent, pos); + + } + + + + //初始化编辑UI + initEditUI(name: string, size: number, parent: Mesh, pos: Vector3) { + if (ModeManager.currentMode == ModeType.Edit) { + this.mesh = MeshBuilder.CreateBox(name, { size: size }); + this.mesh.setParent(parent); + this.mesh.position = pos; + this.mesh.isVisible = false; + + let instance = this; + this.uiRoot = Button.CreateSimpleButton("ui_" + name, this.index.toString()); + UIManager.Instance.uiRoot.addControl(this.uiRoot); + this.uiRoot.linkWithMesh(this.mesh); + BabylonUIStyleTool.setStyle_size(this.uiRoot, "20px", "20px"); + this.uiRoot.background = BabylonUIStyleTool.c_color_blue; + this.uiRoot.color = BabylonUIStyleTool.c_color_white; + this.uiRoot.onPointerClickObservable.add(() => { + instance.changeAim(); + }); + + this.showUI(false); + } + + } + + //改变序号 + changeIndex(newIndex: number) { + this.index = newIndex; + } + + //改变选中的目标 + changeAim() { + let instance = this; + GizmoTool.changeGizmoAim(instance.mesh); + PosPointTool.attachMesh(instance.mesh as Mesh, instance.pos, + () => { + instance.addPoint(); + }, + () => { + instance.reducePoint(); + } + ); + } + + dispose() { + + if (this.uiRoot != null) { + GizmoTool.onGizmoAimMeshObservable.remove(this.onGizmoAimMeshObservor); + this.uiRoot.onPointerClickObservable.clear(); + this.mesh.dispose(); + this.uiRoot.dispose(); + } + + } + + //显示或隐藏UI + showUI(show: boolean) { + if (this.uiRoot != null) { + this.uiRoot.isVisible = show; + } + + } + + //加点 + addPoint() { + this.area.addPoint(this.index); + } + + //减点 + reducePoint() { + this.area.reducePoint(this.index); + + } + +} +//#endregion \ No newline at end of file diff --git a/src/app/babylon/model/info/model/facilityinfo-tool/facility-gd.ts b/src/app/babylon/model/info/model/facilityinfo-tool/facility-gd.ts new file mode 100644 index 0000000..9037f0a --- /dev/null +++ b/src/app/babylon/model/info/model/facilityinfo-tool/facility-gd.ts @@ -0,0 +1,267 @@ +//#region 高度 + +import { AbstractMesh, MeshBuilder, Color3, Vector3, Mesh, Observer, Scene, Vector2 } from "@babylonjs/core"; +import { Control, Button } from "@babylonjs/gui"; +import { GridMaterial } from "@babylonjs/materials"; +import { ModeManager, ModeType } from "src/app/babylon/controller/mode-manager"; +import { SceneManager } from "src/app/babylon/controller/scene-manager"; +import { UIManager } from "src/app/babylon/controller/ui-manager"; +import { BabylonUIStyleTool, UI_LineInfo } from "src/app/babylon/tool/babylon-ui-style-tool"; +import { GizmoTool, TransformUIType } from "src/app/babylon/tool/gizmo-tool"; + +import { PropertyData_GD } from "../../../data/institution/facility/property-data/outdoor/property-data-gd"; +import { ModelData_facility } from "../../../data/model-data/model-data-facility"; + +import { ModelInfo_facility } from "../model-info-facility"; + +/** + * 高度信息 + */ +export class GdInfo { + + pointData_start: Vector3;//起位 + pointData_end: Vector3;//终点 + + material: GridMaterial; + belongToFacility: ModelInfo_facility; + + myPath: Vector3[] = []; + myTube: Mesh; + gdMeshPoints: GdMeshPoint[] = []; + + isShow: boolean; + onGizmoAimMeshObserver: Observer; + updateObserver: Observer; + + constructor(startPoint: Vector3, endPoint: Vector3, belongToFacility: ModelInfo_facility) { + let instance = this; + this.belongToFacility = belongToFacility; + this.pointData_start = startPoint; + + let point_start = new GdMeshPoint(this, this.pointData_start, false); + this.gdMeshPoints.push(point_start); + + this.pointData_end = endPoint; + let point_end = new GdMeshPoint(this, this.pointData_end, true); + this.gdMeshPoints.push(point_end); + + this.myPath.push(point_start.pos); + this.myPath.push(point_end.pos); + this.updateObserver = SceneManager.Instance.scene.onBeforeRenderObservable.add(() => { + instance.update(); + }); + this.onGizmoAimMeshObserver = GizmoTool.onGizmoAimMeshObservable.add((mesh) => { + instance.onChangeGizmo(mesh); + }) + + this.createMesh(); + + + } + + createMesh() { + this.myTube = MeshBuilder.CreateTube("tube", { path: this.myPath, radius: 2, sideOrientation: Mesh.DOUBLESIDE, updatable: true }, SceneManager.Instance.scene); + this.myTube.parent = this.belongToFacility.modelBox; + this.myTube.position = Vector3.Zero(); + this.material = new GridMaterial("mat_myTube", SceneManager.Instance.scene); + this.material.mainColor = Color3.FromHexString(BabylonUIStyleTool.c_color_3d_blue); // new Color3(0, 0.5, 1) + this.material.lineColor = new Color3(0, 0, 0); + this.myTube.material = this.material; + } + + update() { + this.gdMeshPoints[1].mesh.position.x = 0; + this.gdMeshPoints[1].mesh.position.z = 0; + this.myPath[1] = this.gdMeshPoints[1].mesh.position; + this.myTube = MeshBuilder.CreateTube("tube", { path: this.myPath, radius: 2, sideOrientation: Mesh.DOUBLESIDE, updatable: true, instance: this.myTube }, SceneManager.Instance.scene); + let facilityData = this.belongToFacility.modelData as ModelData_facility; + let property = facilityData.propertyData as PropertyData_GD; + this.gdMeshPoints[1].updateInfo(property.info); + } + + + + //释放 + dispose() { + SceneManager.Instance.scene.onBeforeRenderObservable.remove(this.updateObserver); + GizmoTool.onGizmoAimMeshObservable.remove(this.onGizmoAimMeshObserver); + this.updateObserver = null; + + for (let i = 0; i < this.gdMeshPoints.length; i++) { + this.gdMeshPoints[i].dispose(); + } + + this.material.dispose(); + this.myTube.dispose(); + } + + onChangeGizmo(mesh: AbstractMesh) { + // if (mesh != null) { + // this.isShow = mesh == this.belongToFacility.modelBox || this.isPosPointMesh(mesh); + // this.setEnable(this.isShow); + // } + // else { + // this.setEnable(false); + // } + + } + + //是否是位点mesh + isPosPointMesh(mesh: AbstractMesh): boolean { + + if (mesh == null) { + return false; + } + + for (let i = 0; i < this.gdMeshPoints.length; i++) { + if (mesh == this.gdMeshPoints[i].mesh) { + return true; + } + } + return false; + } + + + + setEnable(show: boolean) { + for (let i = 0; i < this.gdMeshPoints.length; i++) { + this.gdMeshPoints[i].setEnable(show); + } + } + + + setUIEnable(show: boolean) { + for (let i = 0; i < this.gdMeshPoints.length; i++) { + this.gdMeshPoints[i].showEditUI(show); + } + } + + +} + + + + +/** + * 高度mesh + */ +export class GdMeshPoint { + + pos: Vector3; + canSet: boolean; + gdInfo: GdInfo; + uiRoot: Button; + + lineInfo: UI_LineInfo; + + mesh: Mesh; + constructor(gdInfo: GdInfo, pos: Vector3, canSet: boolean) { + this.pos = pos; + this.canSet = canSet; + if (canSet) { + this.gdInfo = gdInfo; + this.mesh = MeshBuilder.CreateBox(gdInfo.belongToFacility.modelBox.name + "_point", { size: 1 }); + this.mesh.setParent(gdInfo.belongToFacility.modelBox); + this.mesh.position = pos; + this.mesh.isVisible = false; + + + this.initEditUI(); + + this.lineInfo = BabylonUIStyleTool.createLineInfo(gdInfo.belongToFacility.modelBox.name, this.mesh); + + this.showEditUI(false); + + } + + + } + + //初始化 编辑UI + initEditUI() { + if (ModeManager.currentMode == ModeType.Edit) { + let instance = this; + this.uiRoot = Button.CreateImageButton("ui_editPoint_" + this.gdInfo.belongToFacility.modelBox.name, "", "assets/images/ui/edit.png"); + UIManager.Instance.uiRoot.addControl(this.uiRoot); + this.uiRoot.linkWithMesh(this.mesh); + this.uiRoot.linkOffsetYInPixels = 20; + this.uiRoot.linkOffsetXInPixels = -40; + BabylonUIStyleTool.setStyle_size(this.uiRoot, "20px", "20px"); + this.uiRoot.image.width = 0.8; + this.uiRoot.image.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER; + this.uiRoot.image.verticalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER; + // this.uiRoot.thickness = 0; + this.uiRoot.background = BabylonUIStyleTool.c_color_3d_blueBg; + this.uiRoot.color = BabylonUIStyleTool.c_color_3d_blue; + // this.uiRoot.alpha = 0.7; + this.uiRoot.onPointerClickObservable.add(() => { + instance.changeAim(); + }); + } + + + } + + //显示或隐藏 编辑UI + showEditUI(show: boolean) { + if (this.uiRoot != null) { + this.uiRoot.isVisible = show && this.canSet; + } + + } + + //显示、隐藏标识UI + setEnable(show: boolean) { + if (this.lineInfo != null) { + this.lineInfo.setEnable(show); + } + this.showEditUI(show && ModeManager.currentMode == ModeType.Edit); + } + + + + + //改变选中的目标 + changeAim() { + let instance = this; + GizmoTool.onTransformUITypeChange(TransformUIType.Position);//强行变为position + GizmoTool.changeGizmoAim(instance.mesh, false, true, false); + // PosPointTool.attachMesh(instance.mesh as Mesh, instance.pos, + // () => { + // instance.addPoint(); + // }, + // () => { + // instance.reducePoint(); + // } + // ); + //如果需要增加节点,在此拓展 + } + + dispose() { + + + if (this.canSet) { + if (this.uiRoot != null) { + this.uiRoot.dispose(); + } + + GizmoTool.leaveTheGizmoAimMesh(this.mesh); + this.mesh.dispose(); + this.lineInfo.dispose(); + } + } + + /** + * 更新显示内容 + * @param text + */ + updateInfo(text: string) { + if (this.lineInfo.info != null) { + this.lineInfo.info.text = "高度:" + text; + this.lineInfo.info.resizeToFit = true; + this.lineInfo.infoBg.height = (this.lineInfo.info.heightInPixels + 5) + "px"; + } + } +} + +//#endregion \ No newline at end of file diff --git a/src/app/babylon/model/info/model/model-info-building.ts b/src/app/babylon/model/info/model/model-info-building.ts new file mode 100644 index 0000000..5ca3014 --- /dev/null +++ b/src/app/babylon/model/info/model/model-info-building.ts @@ -0,0 +1,232 @@ +import { Observer, Scene, TransformNode } from "@babylonjs/core"; +import { Button, Rectangle } from "@babylonjs/gui"; +import { ModelChangeType } from "src/app/babylon/controller/data-manager"; +import { Event_ModelInfoChange } from "src/app/babylon/controller/event-manager/events/event-modelinfo-change"; +import { InfoManager } from "src/app/babylon/controller/info-manager"; +import { ModeManager, ModeType } from "src/app/babylon/controller/mode-manager"; +import { SceneManager } from "src/app/babylon/controller/scene-manager"; +import { BuildingStatus } from "src/app/babylon/controller/status/building-status"; +import { IndoorStatus } from "src/app/babylon/controller/status/indoor-status"; +import { StatusManager } from "src/app/babylon/controller/status/status-manager"; +import { BabylonUIStyleTool } from "src/app/babylon/tool/babylon-ui-style-tool"; +import { GizmoTool } from "src/app/babylon/tool/gizmo-tool"; +import { TsTool } from "src/app/babylon/tool/ts-tool"; + + +import { BuildingType } from "../../data/institution/building/building-data"; +import { ModelInfo_mark } from "../mark/model-info-mark"; +import { ModelInfo } from "./model-info"; +import { FacilityInfoByType, ModelInfo_facility } from "./model-info-facility"; + +//建筑类模型信息 +export class ModelInfo_building extends ModelInfo { + facilityRoot: TransformNode; + facilityInfos: FacilityInfoByType[] = []; + buildingType: BuildingType = BuildingType.Normal; + + neiRoot: TransformNode; //facilityRoot参照的节点 + updateObserver: Observer; + + onSetModelBox() { + super.onSetModelBox(); + this.initFacilityRoot(); + } + + initFacilityRoot() { + + let allTransformNode = this.modelBox.getChildTransformNodes(); + this.neiRoot = null; + for (let i = 0; i < allTransformNode.length; i++) { + if (TsTool.stringContain(allTransformNode[i].name, "nei")) { + this.neiRoot = allTransformNode[i]; + break; + } + } + + if (this.neiRoot == null) { + this.neiRoot = this.modelBox; + + } + + if (this.facilityRoot != null) { + this.facilityRoot.dispose(); + } + + this.facilityRoot = new TransformNode(this.modelData.key + '_facilityRoot'); + + let instance = this; + if (this.updateObserver != null) { + SceneManager.Instance.scene.onAfterRenderObservable.remove(this.updateObserver); + } + this.updateObserver = SceneManager.Instance.scene.onAfterRenderObservable.add(function () { + instance.onBeforeRender(); + }); + } + + onClickMeshIconBtn() { + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + StatusManager.s_currentStatus.buildingWindow.changeCurrentBuildingInfo(this); + } + else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + GizmoTool.onPickMeshInfoObservable.notifyObservers(this); + // StatusManager.s_currentStatus.indoorWindow.lookAtCenter(this); + } + } + + onCreateFollowUI() { + super.onCreateFollowUI(); + + this.uiFollowRoot.width = '104px'; + this.uiFollowRoot.height = '26px'; + this.uiFollowRoot.thickness = 0; + + + let border = new Rectangle("border"); + this.uiFollowRoot.addControl(border); + border.thickness = 0; + border.background = BabylonUIStyleTool.c_color_blue;//"#0CB7F7"; + border.alpha = 0.7; + + + this.uiIconBtn = Button.CreateSimpleButton( + 'Btn_' + this.key, + "加载中..." + ); + border.addControl(this.uiIconBtn); + this.uiIconBtn.width = '100px'; + this.uiIconBtn.height = '22px'; + this.uiIconBtn.background = "#415094"; + this.uiIconBtn.color = "white"; + this.uiIconBtn.thickness = 0; + this.uiIconBtn.textBlock.fontSize = 12; + this.uiIconBtn.shadowBlur = 1; + this.uiFollowRoot.zIndex = BabylonUIStyleTool.c_zIndex_buildingIcon; + + + } + + /** + * 显示此模型的跟随UI + * @param show + */ + showFollowUI(show: boolean) { + if (ModeManager.currentMode == ModeType.Look && this.buildingType == BuildingType.Environment) { + super.showFollowUI(false); + } + else { + super.showFollowUI(show); + } + } + + /** + * 显示设备的跟随UI + * @param show + */ + showFacilityUI(show: boolean) { + + if (this.facilityInfos != null) { + for (let i = 0; i < this.facilityInfos.length; i++) { + let facilityByType = this.facilityInfos[i].facilityInfo; + if (facilityByType != null) { + for (let i = 0; i < facilityByType.length; i++) { + facilityByType[i].setIconEnable(show) + + } + } + } + } + + + } + + //更新跟随UI的名称 + updateName(name: string) { + this.uiIconBtn.textBlock.text = name; + } + + + + + dispose() { + this.disposeAllFacility(); + super.dispose(); + } + + //释放所有设备 + disposeAllFacility() { + ModeManager.log('释放室内设备' + this.facilityInfos.length); + for (let i = 0; i < this.facilityInfos.length; i++) { + + for (let j = 0; j < this.facilityInfos[i].facilityInfo.length; j++) { + this.removeFacilityInfo(this.facilityInfos[i].facilityInfo[j], false); + } + + } + this.facilityInfos = []; + this.facilityRoot.dispose(); + } + + onBeforeRender() { + // console.log(this.modelBox.absolutePosition); + + this.facilityRoot.position = this.neiRoot.absolutePosition.clone(); + this.facilityRoot.rotation = this.neiRoot.rotation.clone(); + //if (this.modelBox.rotationQuaternion != null) { + this.facilityRoot.rotationQuaternion = this.neiRoot.absoluteRotationQuaternion.clone(); + if (this.neiRoot.parent != null && (this.neiRoot.parent as TransformNode).scaling.y < 0) { + this.facilityRoot.scaling.y = -1; + } + + //} + } + + //设置设备的父节点 + setFacilityParent(modelInfo_facility: ModelInfo_facility) { + modelInfo_facility.modelBox.setParent(this.facilityRoot); + } + + //设置标绘物的父节点 + steMarkParent(modelInfo_mark: ModelInfo_mark) { + modelInfo_mark.modelBox.setParent(this.facilityRoot); + } + + //移除设备记录 + removeFacilityInfo(modelInfo_facility: ModelInfo_facility, remove: boolean) { + if (remove) { + + InfoManager.removeFacilityInfoToTypeList(modelInfo_facility, this.facilityInfos); + } + Event_ModelInfoChange.dispatch(modelInfo_facility, ModelChangeType.Remove); + SceneManager.destroyModel(modelInfo_facility); + } + + /** + * 设置显示状态 + * @param enable true 为显示 + */ + setEnable(enable: boolean) { + super.setEnable(enable); + this.setFacilityEnable(enable); + } + + /** + * 设置设备的显隐状态 + * @param enable + */ + setFacilityEnable(enable: boolean) { + if (this.facilityRoot != null) { + this.facilityRoot.setEnabled(enable); + } + + + if (this.facilityInfos != null) { + for (let j = 0; j < this.facilityInfos.length; j++) { + for (let k = 0; k < this.facilityInfos[j].facilityInfo.length; k++) { + this.facilityInfos[j].facilityInfo[k].setEnable(enable); + } + } + } + } + + +} diff --git a/src/app/babylon/model/info/model/model-info-facility.ts b/src/app/babylon/model/info/model/model-info-facility.ts new file mode 100644 index 0000000..7da26c3 --- /dev/null +++ b/src/app/babylon/model/info/model/model-info-facility.ts @@ -0,0 +1,196 @@ +import { AbstractMesh, EventState } from "@babylonjs/core"; +import { Button, Control, Ellipse, Rectangle, Vector2WithInfo } from "@babylonjs/gui"; +import { ConfigManager } from "src/app/babylon/controller/config-manager"; +import { SceneManager } from "src/app/babylon/controller/scene-manager"; +import { BabylonUIStyleTool } from "src/app/babylon/tool/babylon-ui-style-tool"; +import { FacilityWindow } from "src/app/babylon/view/facility-window/facility-window"; +import { FacilityInfoInSceneWindow } from "src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window"; +import { PropertyBaseWindow } from "src/app/babylon/view/property-window/property-base-window"; +import { ModelData } from "../../data/model-data/model-data"; +import { FacilityShowType, FacilityType, ModelData_facility } from "../../data/model-data/model-data-facility"; +import { BuildingInfo } from "../building/building-info"; +import { AreaInfo } from "./facilityinfo-tool/facility-area"; +import { GdInfo } from "./facilityinfo-tool/facility-gd"; +import { ModelInfo } from "./model-info"; + +//设施数据 +export class ModelInfo_facility extends ModelInfo { + belongToBuilding: BuildingInfo;//属于哪个建筑 + pickDown: boolean;//按下 + facilityShowType: FacilityShowType;//设备展示状态 + ui_select: Ellipse | Rectangle; + areaInfo: AreaInfo;//区域信息 + gdInfo: GdInfo;//高度信息 + isNew: boolean;//是否是新建 + + + constructor( + key: string, + modelData: ModelData, + models: AbstractMesh[], + modelBox: AbstractMesh, + belongToBuilding: BuildingInfo, + isNew: boolean + ) { + super(key, modelData, models, modelBox); + this.facilityShowType = ModelData_facility.getShowType((modelData as ModelData_facility).facilityType); + this.belongToBuilding = belongToBuilding; + this.isNew = isNew; + } + + onCreateFollowUI() { + super.onCreateFollowUI(); + let instance = this; + let modelData = this.modelData as ModelData_facility; + let posType = ConfigManager.getPosType(modelData.facilityType); + let iconPath = ConfigManager.getFacilityIconUrl(modelData.facilityType, posType); + BabylonUIStyleTool.setStyle_size(this.uiFollowRoot, ConfigManager.c_size_facilityIconSize + "px", ConfigManager.c_size_facilityIconSize + "px"); + this.uiFollowRoot.thickness = 0; + + if (modelData.facilityType == FacilityType.AQCK) { + this.ui_select = new Rectangle("select"); + } + else { + this.ui_select = new Ellipse("select"); + } + + this.uiFollowRoot.addControl(this.ui_select); + this.ui_select.background = BabylonUIStyleTool.c_color_3d_blue; + this.ui_select.thickness = 0; + this.ui_select.width = 0.95; + this.ui_select.height = 0.95; + this.ui_select.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + this.ui_select.shadowBlur = 3; + this.ui_select.isVisible = false; + + this.uiIconBtn = Button.CreateImageButton("iconPath", "", iconPath); + this.uiIconBtn.thickness = 0; + this.uiIconBtn.image.width = 0.9; + this.uiIconBtn.image.height = 0.9; + this.uiIconBtn.image.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER; + this.uiIconBtn.image.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER; + this.uiFollowRoot.addControl(this.uiIconBtn); + + //BabylonUIStyleTool.addLongPressButtonBehave(this.uiIconBtn, SceneManager.Instance.scene, () => { + // instance.askDelete(instance); + // }, () => { + // // instance.onClickMeshIconBtn(null, null); + // instance.onStopLongPress(null, null); + // }) + + this.uiIconBtn.onPointerClickObservable.add(() => { + instance.onStopLongPress(null, null); + }); + + //双击,拉近镜头 + BabylonUIStyleTool.addDoubleClickButtonBehave(this.uiIconBtn, SceneManager.Instance.scene, () => { + let item = FacilityInfoInSceneWindow.instance.getFacilityItem(instance); + if (item != null) { + item.lookAt(); + } + + }); + + this.uiFollowRoot.zIndex = BabylonUIStyleTool.c_zIndex_facilityIcon; + } + + + //询问删除 + askDelete(modelInfo: ModelInfo_facility, ask = true) { + if (ask) { + // ThreeDimensionalHomeComponent.instance.deleteProperty(() => { + // FacilityWindow.instance.disposeFacility(modelInfo); + // }, modelInfo.key); + } + else { //直接删除 + FacilityWindow.instance.disposeFacility(modelInfo); + } + + } + + //终止长按 + onStopLongPress(eventData: Vector2WithInfo, eventState: EventState) { + // this.onClickMeshIconBtn(eventData,eventState); + FacilityInfoInSceneWindow.instance.selectFacilityInfo(this); + + } + + //展示属性 + showProperty() { + PropertyBaseWindow.ShowWindow(this); + } + + onSetModelBox() { + super.onSetModelBox(); + } + + + setEnable(enable: boolean) { + super.setEnable(enable); + if (this.areaInfo != null) { + this.areaInfo.setEnable(enable); + } + + if (this.gdInfo != null) { + this.gdInfo.setEnable(enable); + } + } + + /** + * 设置选中圈的显示状态 + * @param enable + */ + setSelectEnable(enable: boolean) { + this.ui_select.isVisible = enable; + } + + /** + * 设置整个Icon的显示状态 + * @param enable + */ + setIconEnable(enable: boolean) { + this.showFollowUI(enable); + if (this.gdInfo != null) { + this.gdInfo.setUIEnable(enable); + } + + if (!enable)//还原选中状态 + { + this.setSelectEnable(false); + } + } + + dispose() { + if (this.areaInfo != null) { + this.areaInfo.dispose(); + + } + if (this.gdInfo != null) { + this.gdInfo.dispose(); + } + super.dispose(); + } +} + + + + + +//根据类型划分的设备信息 +export class FacilityInfoByType { + type: FacilityType; + facilityInfo: ModelInfo_facility[]; + + constructor(type: FacilityType) { + this.type = type; + this.facilityInfo = []; + + } + + dispose() { + for (let i = 0; i < this.facilityInfo.length; i++) { + this.facilityInfo[i].dispose(); + } + this.facilityInfo = []; + } +} \ No newline at end of file diff --git a/src/app/babylon/model/info/model/model-info.ts b/src/app/babylon/model/info/model/model-info.ts new file mode 100644 index 0000000..5f3ee40 --- /dev/null +++ b/src/app/babylon/model/info/model/model-info.ts @@ -0,0 +1,265 @@ +import { + AbstractMesh, + AnimationGroup, + EventState, + GizmoManager, + Mesh, + PointerDragBehavior, + TransformNode, + Node, + Vector3, +} from '@babylonjs/core'; +import { Button, Rectangle, Vector2WithInfo } from '@babylonjs/gui'; +import { classToClass } from 'class-transformer'; +import { UIManager } from 'src/app/babylon/controller/ui-manager'; +import { BabylonTool } from 'src/app/babylon/tool/babylon-tool'; +import { GizmoTool } from 'src/app/babylon/tool/gizmo-tool'; + + +import { ModelData } from '../../data/model-data/model-data'; + + +//基础模型信息 +export class ModelInfo { + key: string; + /** + * 所有子节点 + */ + models: AbstractMesh[]; + /** + * 包装盒、根节点 ,请使用modelBox 属性进行访问 + */ + _modelBox: AbstractMesh; + /** + * 模型的动画 + */ + animationGroups: AnimationGroup[]; + modelData: ModelData; + + uiFollowRoot: Rectangle; + uiIconBtn: Button; + uiDeleteBtn: Button; + + + + + modelEnableChangeObserver; //模型enable状态变化监听 + isDisposed: boolean = false;//已经被释放了 + isEnable: boolean = true;//显示状态 + + pointerDragBehavior: PointerDragBehavior;//mesh 拖拽行为 + + //请不要直接new ,而是使用 InfoManager.new + constructor( + key: string, + modelData: ModelData, + models: AbstractMesh[], + modelBox: AbstractMesh, + isNew: boolean = true + ) { + this.key = key; + this.models = models; + this.modelData = modelData; + this.modelBox = modelBox; + this.isDisposed = false; + + if (this.modelBox != null) { + this.modelBox.name = this.modelData.key; + } + } + + // 根据名字找到子对象 + public getChildrenByName(name: string): AbstractMesh { + const children = this.models.filter(item => item.name === name); + if (children.length > 0) { + return children[0] + } else { + return null; + } + } + + /** + * 模型根节点盒子 + */ + get modelBox(): AbstractMesh { + return this._modelBox; + } + + /** + * 模型根节点盒子 + */ + set modelBox(value: AbstractMesh) { + if (this._modelBox != value && this._modelBox != null) { + this._modelBox.dispose(); + } + + + if (this.isDisposed) { + this.dispose(); + return; + } + + + this._modelBox = value; + + if (value != null && this.uiFollowRoot == null) { + this.onCreateFollowUI(); + + let instance = this; + if (this.uiIconBtn != null) { + this.uiIconBtn.onPointerClickObservable.add(function (eventData, eventState) { + instance.onClickMeshIconBtn(eventData, eventState); + }); + } + + } + + this.onSetModelBox(); + + if (!this.isEnable) { + this.setEnable(this.isEnable); + } + } + + //创建跟随UI + onCreateFollowUI() { + + this.uiFollowRoot = new Rectangle('follow_' + this.key); + UIManager.Instance.uiRoot.addControl(this.uiFollowRoot); + + } + + //展示或隐藏跟随UI + showFollowUI(show: boolean) { + if (this.uiFollowRoot != null) { + this.uiFollowRoot.isVisible = show; + + } + } + + + /** + * 克隆 + */ + clone(modelData?: ModelData, isNew: boolean = true): ModelInfo { + + let l_modelData; + if (modelData == null) { + l_modelData = classToClass(this.modelData); + } + else { + l_modelData = modelData; + } + + let childMeshes; + let modelBox = null; + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + + let info = new ModelInfo(this.key, l_modelData, childMeshes, modelBox, isNew); + return info; + } + + + + /** + * 从本mesh上克隆动画给新模型 + * @param newInfo + */ + cloneAnimTo(newInfo: ModelInfo) { + if (this.animationGroups != null) { + + newInfo.animationGroups = []; + for (let i = 0; i < this.animationGroups.length; i++) { + let prfabAnim = this.animationGroups[i]; + let newAnimGroup = prfabAnim.clone(prfabAnim.name, (oldTarget) => { + let newTarget = null; + + let allChildren = newInfo.modelBox.getChildren((node) => { + if (oldTarget.name == node.name) { + newTarget = node; + // console.log("找到节点了", node); + return false; + } + else { + return true; + } + }, false); + + // console.log("复制动画给新节点", newTarget); + return newTarget; + }); + + newInfo.animationGroups.push(newAnimGroup); + // console.log("测试播放动画", newAnimGroup); + // newAnimGroup.play();//完善正式逻辑时,注释掉此行 + } + } + } + + dispose() { + this.isDisposed = true; + this.uiFollowRoot.dispose(); + // console.log("释放model" + this.key); + if (this.modelBox != null) { + this.modelBox.dispose(); + } else { + this.models[0].dispose(); + } + + } + + //设置模型盒子时 + onSetModelBox() { + + if ( + (this.modelData.transformData.scaling as Vector3).equals(Vector3.Zero()) + ) { + this.modelData.transformData.originalScaling = this.modelBox.absoluteScaling.clone(); + this.modelData.transformData.scaling = this.modelData.transformData.originalScaling.clone(); + } + + + if (this.uiFollowRoot != null) { + this.uiFollowRoot.linkWithMesh(this.modelBox); + this.uiFollowRoot.linkOffsetY = '-50px'; + } + + } + + //改变显示状态 + setEnable(enable: boolean) { + this.isEnable = enable; + if (this.modelBox != null) { + this.modelBox.setEnabled(enable); + GizmoTool.leaveTheGizmoAim(this); + } + this.showFollowUI(enable); + + } + + /** + * 设置拖拽事件的激活状态 + * @param enable + */ + setDragEventEnable(enable: boolean) { + if (this.pointerDragBehavior != null) { + this.pointerDragBehavior.enabled = enable; + } + } + + + //点击到图标按钮 + onClickMeshIconBtn(eventData: Vector2WithInfo, eventState: EventState) { + + + + } +} + + + diff --git a/src/app/babylon/tool/babylon-tool.ts b/src/app/babylon/tool/babylon-tool.ts new file mode 100644 index 0000000..7065a9a --- /dev/null +++ b/src/app/babylon/tool/babylon-tool.ts @@ -0,0 +1,534 @@ +import { + AbstractMesh, + Animation, + AnimationGroup, + ArcRotateCamera, + Camera, + EasingFunction, + IParticleSystem, + ISceneLoaderPlugin, + ISceneLoaderPluginAsync, + ISceneLoaderProgressEvent, + Mesh, + MeshBuilder, + PBRMaterial, + QuadraticEase, + Quaternion, + Scene, + SceneLoader, + Skeleton, + Vector3, +} from '@babylonjs/core'; + +import { + AdvancedDynamicTexture, + Button, + Container, + Control, + InputText, + Rectangle, + ScrollViewer, + StackPanel, + TextBlock, +} from '@babylonjs/gui'; +import { ConfigManager } from '../controller/config-manager'; +import { ModeManager } from '../controller/mode-manager'; +import { UIManager } from '../controller/ui-manager'; +import { UIBase } from '../view/window-base/ui-base'; +import { BabylonUIStyleTool } from './babylon-ui-style-tool'; +import { LoadTool } from './load-tool'; +import { TsTool } from './ts-tool'; + +export class BabylonTool { + + + static readonly c_radian1 = 180 / Math.PI; //1弧度的度数 + static readonly c_cloneSuffix = '(Clone)'; //克隆物体的名称后缀 + + static readonly alpha_N = Math.PI * 0.5;//面朝北时的alpha值 右手坐标系是pi,左手是-pi + + //获取世界坐标 + static getWorldPosition(mesh: AbstractMesh): Vector3 { + let result = mesh.position; + if (mesh.parent != null) { + result = mesh.absolutePosition; + } + return result.clone(); + } + + //载入模型 + static importMesh( + meshNames: any, + rootUrl: string, + sceneFilename?: string | File, + scene?: Scene, + onSuccess?: ( + meshes: AbstractMesh[], + particleSystems: IParticleSystem[], + skeletons: Skeleton[], + animationGroups: AnimationGroup[] + ) => void, + onProgress?: (event: ISceneLoaderProgressEvent) => void, + onError?: (scene: Scene, message: string, exception?: any) => void, + pluginExtension?: string + ): ISceneLoaderPlugin | ISceneLoaderPluginAsync { + + let path = rootUrl; //"institutions/institution001/building001/outdoor/"; + if (path == null) { + return null; + } + if (path.indexOf(ConfigManager.c_resPath_assetsRoot) == -1) { + path = ConfigManager.c_resPath_assetsRoot + rootUrl; + } + + ModeManager.log("加载模型" + path + sceneFilename); + return SceneLoader.ImportMesh( + meshNames, + path, + sceneFilename, + scene, + onSuccess, + onProgress, + onError, + pluginExtension + ); + } + + /** + * 异步加载模型 + * @param meshNames + * @param rootUrl + * @param sceneFilename + * @param scene + * @param tag 加载原因 + * @param onSuccess + * @param onProgress + * @param onError + * @param pluginExtension + */ + static importMeshSync(meshNames: any, + rootUrl: string, + sceneFilename?: string | File, + scene?: Scene, + tag?: string, + onSuccess?: ( + meshes: AbstractMesh[], + particleSystems: IParticleSystem[], + skeletons: Skeleton[], + animationGroups: AnimationGroup[] + ) => void, + onProgress?: (event: ISceneLoaderProgressEvent) => void, + onError?: (scene: Scene, message: string, exception?: any) => void, + pluginExtension?: string) { + let path = rootUrl; //"institutions/institution001/building001/outdoor/"; + if (path == null) { + return null; + } + if (path.indexOf(ConfigManager.c_resPath_assetsRoot) == -1) { + path = ConfigManager.c_resPath_assetsRoot + rootUrl; + } + + console.log("异步加载模型" + path + sceneFilename); + let modelPath = path + sceneFilename; + LoadTool.add(modelPath, tag); + SceneLoader.ImportMeshAsync( + meshNames, + path, + sceneFilename, + scene, + onProgress, + ).then(function (result) { + LoadTool.remove(modelPath); + onSuccess(result.meshes, result.particleSystems, result.skeletons, result.animationGroups); + }).catch(function (result) { + onError(scene, "load error", result); + + }); + } + + /** + * 设置材质为无光材质 + */ + static setMatToUnlit(meshes: AbstractMesh[], isUnlit: boolean, mask: string = null) { + if (meshes == null) { + return; + } + for (let i = 0; i < meshes.length; i++) { + if (meshes[i].material instanceof PBRMaterial) { + let mat_pbr = (meshes[i].material as PBRMaterial); + // mat_pbr.metallicF0Factor = 0;//关掉反光 + if (mask == null || !TsTool.stringContain(mat_pbr.name, mask)) { + mat_pbr.unlit = isUnlit; + } + + } + } + + } + + /** + * 设置材质从菲涅尔反射(反光效果) + * @param meshes + * @param enable //是否开启 + * @param linkToAlbedo //是否反射环境光颜色 + */ + static setMatSheen(meshes: AbstractMesh[], enable: boolean, linkToAlbedo: boolean) { + for (let i = 0; i < meshes.length; i++) { + if (meshes[i].material instanceof PBRMaterial) { + let mat_pbr = (meshes[i].material as PBRMaterial); + if (TsTool.stringContain(mat_pbr.name, "Color")) { + mat_pbr.sheen.isEnabled = enable; + mat_pbr.sheen.linkSheenWithAlbedo = linkToAlbedo; + } + + } + } + } + + + + //改变摄像机观察目标 + static changeCameraTarget(camera: ArcRotateCamera, mesh: AbstractMesh, animMove: boolean = true, size = null) { + if (mesh == null) { + return; + } + + + + let maxScaleAxis = size; + if (size == null) { + maxScaleAxis = mesh.scaling.x; + } + + camera._scene.stopAnimation(camera); + + maxScaleAxis = Math.max(maxScaleAxis, mesh.scaling.y); + maxScaleAxis = Math.max(maxScaleAxis, mesh.scaling.z); + maxScaleAxis *= 1.5; + if (BabylonTool.cameraModeIs2D) { + camera.target = BabylonTool.getWorldPosition(mesh); + camera.radius = maxScaleAxis + 5; + camera.alpha = BabylonTool.alpha_N; + camera.beta = 0; + } + else { + if (animMove) { + BabylonTool.AnimMoveCameraTarget( + camera, + 60, + BabylonTool.getWorldPosition(mesh), + maxScaleAxis + 5 + ); + } + else { + let alpha = BabylonTool.alpha_N; + camera.target = BabylonTool.getWorldPosition(mesh).clone(); + camera.radius = maxScaleAxis + 50; + camera.alpha = alpha; + camera.beta = 1; + BabylonTool.AnimMoveCameraTarget( + camera, + 60, + BabylonTool.getWorldPosition(mesh).clone(), + maxScaleAxis + 5 + ); + } + + } + + + + + + } + + + + /** + * 停止动画 + * @param camera + */ + static stopAnim(camera: ArcRotateCamera) { + camera._scene.stopAnimation(camera); + + } + + /** + * 摄像机状态- 是2d正交状态 + */ + static cameraModeIs2D = false; + /** + * 改变摄像机模式 + * @param camera + * @param is2D + * @param mesh + */ + static changeCameraMode(camera: ArcRotateCamera, is2D: boolean) { + camera.mode = is2D ? Camera.ORTHOGRAPHIC_CAMERA : Camera.PERSPECTIVE_CAMERA; + BabylonTool.cameraModeIs2D = is2D; + // BabylonTool.AnimMoveCameraTarget( + // camera, + // 60, + // camera.target, + // camera.radius + // ); + + + if (camera._scene.useRightHandedSystem) { + + } + camera.alpha = BabylonTool.alpha_N; + camera.beta = 0; + + + } + + + //动画移动摄像机target + public static AnimMoveCameraTarget( + camera: ArcRotateCamera, + allFrame: number, + target: Vector3, + radius: number, + ) { + //缓动动画 + let easingFunction = new QuadraticEase(); + easingFunction.setEasingMode(EasingFunction.EASINGMODE_EASEOUT); + + //target + let anim_target = new Animation( + 'CameraAnim_target', + 'target', + 60, + Animation.ANIMATIONTYPE_VECTOR3, + Animation.ANIMATIONLOOPMODE_CYCLE + ); + let keys_target = [ + { frame: 0, value: camera.target }, + { frame: allFrame, value: target }, + ]; + anim_target.setKeys(keys_target); + anim_target.setEasingFunction(easingFunction); + + //radius + let anim_radius = new Animation( + 'CameraAnim_radius', + 'radius', + 60, + Animation.ANIMATIONTYPE_FLOAT, + Animation.ANIMATIONLOOPMODE_CYCLE + ); + let keys_radius = [ + { frame: 0, value: camera.radius }, + { frame: allFrame, value: radius }, + ]; + anim_radius.setKeys(keys_radius); + anim_radius.setEasingFunction(easingFunction); + + camera.animations = []; + camera.animations.push(anim_target); + camera.animations.push(anim_radius); + + camera._scene.beginAnimation(camera, 0, allFrame, false); + // camera.target = target; + // SceneManager.scene.beginAnimation(camera, 0, allFrame, false); + + } + + //克隆mesh + static cloneMesh(prefab: Mesh, name?: string, onSuccess?: (childMesh: AbstractMesh[], root: AbstractMesh) => void): Mesh { + if (name == null || name == undefined) { + name = prefab.name + BabylonTool.c_cloneSuffix; + } + + let prefabActive = prefab.isEnabled(false); + + if (prefabActive == false) { + prefab.setEnabled(true); + } + + let result = prefab.clone(name); + + let childMesh: AbstractMesh[] = []; + + //把名字中,因为复制而产生的无用前缀删掉 + let allChildren = result.getChildren((node) => { + let names = node.name.split('.'); + let newName = names[names.length - 1]; + node.name = newName; + if (node instanceof AbstractMesh) { + childMesh.push(node); + } + return true; + }, false); + + if (prefabActive == false) { + prefab.setEnabled(false); + } + + + if (onSuccess) { + onSuccess(childMesh, result); + } + + return result; + } + + +} + +//输入提示界面 +export class InputHintWindow extends UIBase { + + btn_hide: Button; //隐藏按钮 + isShow: boolean = true;//是否是显示状态 + txt_first: TextBlock;//第一行文字 + + onInit() { + super.onInit(); + + let window = this; + + let advancedTexture = UIManager.Instance.uiRoot; + let inputInfoBg = new Rectangle('InputHintWindow'); + inputInfoBg.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + inputInfoBg.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + advancedTexture.addControl(inputInfoBg); + this.root = inputInfoBg; + BabylonUIStyleTool.setDefaultStyle_windowRoot(this.root, false); + BabylonUIStyleTool.setStyle_size(this.root, "160px", "100px"); + this.root.alpha = 0.8; + + + + let inputInfoRoot = new StackPanel('inputInfoRoot'); + inputInfoRoot.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + inputInfoRoot.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + inputInfoRoot.width = '150px'; + inputInfoRoot.height = '100px'; + inputInfoRoot.isVertical = true; + inputInfoBg.addControl(inputInfoRoot); + + let infoStyle = advancedTexture.createStyle(); + infoStyle.fontSize = 15; + + let mouseLeft = new TextBlock('mouseLeft', '左键拖动 => 旋转镜头'); + mouseLeft.color = 'white'; + mouseLeft.height = '30px'; + mouseLeft.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + mouseLeft.style = infoStyle; + inputInfoRoot.addControl(mouseLeft); + this.txt_first = mouseLeft; + + let mouseRight = new TextBlock('mouseRight', '右键拖动 => 平移镜头'); + mouseRight.color = 'white'; + mouseRight.height = '30px'; + mouseRight.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + mouseRight.style = infoStyle; + inputInfoRoot.addControl(mouseRight); + + let mouseCenter = new TextBlock('mouseCenter', '前滑滚轮 => 拉近镜头'); + mouseCenter.color = 'white'; + mouseCenter.height = '30px'; + mouseCenter.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + mouseCenter.style = infoStyle; + inputInfoRoot.addControl(mouseCenter); + + this.btn_hide = Button.CreateSimpleButton("btn_hide", "..."); + this.root.addControl(this.btn_hide); + this.btn_hide.textBlock.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + this.btn_hide.textBlock.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + this.btn_hide.textBlock.color = "white"; + this.btn_hide.thickness = 0; + this.btn_hide.onPointerClickObservable.add(() => { + console.log("隐藏"); + window.setShowStatus(!window.isShow); + }); + + this.setShowStatus(true); + + // setTimeout(() => { + // if (window.isShow) { + // window.setShowStatus(false); + // } + // }, 4000); + + } + + //设置显示状态 + setShowStatus(newStatus: boolean) { + this.isShow = newStatus; + if (newStatus) { + this.root.width = "160px"; + this.root.height = "100px"; + this.root.alpha = 0.8; + this.txt_first.alpha = 1; + this.btn_hide.textBlock.isVisible = false; + } + else { + this.root.width = "20px"; + this.root.height = "20px"; + this.root.alpha = 0.5; + this.txt_first.alpha = 0; + this.btn_hide.textBlock.isVisible = true; + + } + } + + + + + + +} + +//封装的滚动条组件 +export class MyScrollView { + name: string; + scrollView: ScrollViewer; + container: StackPanel; + + constructor(name: string, parent: Rectangle, isVertical: boolean = true) { + + this.name = name; + this.scrollView = new ScrollViewer(name); + parent.addControl(this.scrollView); + this.scrollView.paddingTop = "0px"; + this.scrollView.paddingRight = "0px"; + this.scrollView.paddingBottom = "0px"; + this.scrollView.paddingLeft = "0px"; + + + + this.container = new StackPanel("Container"); + this.scrollView.addControl(this.container); + this.container.isVertical = isVertical; + this.container.paddingTop = "0px"; + this.container.paddingBottom = "0px"; + this.container.paddingLeft = "0px"; + this.container.paddingRight = "0px"; + + } +} + +//带背景的输入框 +export class MyInputText { + name: string; + bg: Rectangle; + inputText: InputText; + + constructor(name: string, parent: Container, width: string, height: string) { + this.name = name; + this.bg = new Rectangle(name); + parent.addControl(this.bg); + this.bg.width = width; + this.bg.height = height; + this.inputText = new InputText(name + "_txt"); + this.bg.addControl(this.inputText); + this.inputText.width = width; + this.inputText.height = height; + } + +} + + diff --git a/src/app/babylon/tool/babylon-ui-style-tool.ts b/src/app/babylon/tool/babylon-ui-style-tool.ts new file mode 100644 index 0000000..2fd9e82 --- /dev/null +++ b/src/app/babylon/tool/babylon-ui-style-tool.ts @@ -0,0 +1,522 @@ + +import { AbstractMesh, EventState, Scene, setAndStartTimer, Vector2 } from "@babylonjs/core"; +import { Button, Container, Control, Ellipse, MultiLine, RadioButton, Rectangle, StackPanel, TextBlock, Vector2WithInfo } from "@babylonjs/gui"; +import { ConfigManager } from "../controller/config-manager"; +import { SceneManager } from "../controller/scene-manager"; +import { UIManager } from "../controller/ui-manager"; +import { UIBase } from "../view/window-base/ui-base"; +import { MyInputText } from "./babylon-tool"; + +//babylon UI 风格 工具 +export class BabylonUIStyleTool { + + static c_color_blue: string = "#0080FF";//普通蓝色,用于选中、确定等正面风格 + static c_color_gray: string = "#E8ECF1";//普通灰色,用于取消、后退、输入背景等 + static c_color_black: string = "black";//黑色 + static c_color_blueBg: string = "#001121";//深蓝,用于长存界面的背景 + static c_color_white: string = "white"; + static c_color_green = "#439C08";//绿色按钮 + static c_color_greenLight = '#00F424';//亮绿色 + static c_color_red = "#C14242";//红色按钮,用于删除等危险操作 + + static c_color_3d_blueLight: string = "#99ECFC";//亮蓝,字 + static c_color_3d_blue: string = "#47E0FF";//蓝, 框体 + static c_color_3d_blueBg: string = "#122F49";//蓝黑,背景 + + static c_shadow_blur_button = 2;//按钮的阴影模糊 + static c_shadow_blur_window = 20; //界面的阴影模糊 + + static readonly cornerRadius_window1 = 10;//界面圆角 + static readonly cornerRadius_button = 6;//按钮圆角 + + static c_zIndex_gizmo = 200;//gizmo界面的z + static c_zIndex_topBar = 100;//topbar界面的z + + static c_zIndex_buildingIcon = 50;//建筑标志的z + static c_zIndex_facilityIcon = 40;//设备标志的z + + + //#region 组件 + //创建窗口根节点 + static createWindoRoot(window: UIBase, name: string, width: string, height: string, isDialog: boolean) { + + window.root = new Rectangle(name); + UIManager.Instance.uiRoot.addControl(window.root); + window.root.width = width; + window.root.height = height; + + BabylonUIStyleTool.setDefaultStyle_windowRoot(window.root, isDialog); + + } + + //创建文本输入组件 + static createInputText(name: string, parent: Container, width: string, height: string, textColor: string = "black", thickness: number = 0, cornerRadius: number = 6, backgroundColor: string = "#EEF1F5", focuseColor: string = "black", focuseBgColor: string = "#EEF1F5"): MyInputText { + let result = new MyInputText(name, parent, width, height); + + result.inputText.color = textColor; + + result.inputText.background = backgroundColor; + result.inputText.thickness = thickness; + + result.inputText.focusedColor = focuseColor; + result.inputText.focusedBackground = focuseBgColor; + + result.bg.cornerRadius = cornerRadius; + result.bg.color = backgroundColor; + result.bg.thickness = thickness; + + return result; + + } + + //创建文本 + static createTextBlock(name: string, text: string, width: string, height: string, fontSize: string): TextBlock { + let textBlock = new TextBlock(name, text); + BabylonUIStyleTool.setStyle_size(textBlock, width, height); + textBlock.fontSize = fontSize; + textBlock.color = "black"; + return textBlock; + + } + + //创建统一风格的确定按钮 + static createBtn_OK(name: string, text: string, width: string, height: string, fontSize: string): Button { + let result = BabylonUIStyleTool.createBtn(name, text, width, height, fontSize, "white", BabylonUIStyleTool.c_color_blue); + BabylonUIStyleTool.setStyle_Shadow(result, undefined, 1.5); + return result; + } + + //创建统一风格的取消按钮 + static createBtn_Cancel(name: string, text: string, width: string, height: string, fontSize: string): Button { + let result = BabylonUIStyleTool.createBtn(name, text, width, height, fontSize, "black", BabylonUIStyleTool.c_color_gray); + return result + } + + //创建统一风格的删除按钮 + static createBtn_Delete(name: string, text: string, width: string, height: string, fontSize: string,): Button { + let result = BabylonUIStyleTool.createBtn(name, text, width, height, fontSize, "white", BabylonUIStyleTool.c_color_red); + return result; + } + + //创建按钮 + static createBtn(name: string, text: string, width: string, height: string, fontSize: string, textColor: string = "black", bgColor: string = "white", thickness: number = 0, cornerRadius: number = 6): Button { + let result = Button.CreateSimpleButton(name, text); + result.background = bgColor; + result.color = textColor; + result.width = width; + result.height = height; + result.thickness = thickness; + result.cornerRadius = cornerRadius; + + result.textBlock.color = textColor; + result.fontSize = fontSize; + return result; + } + + + //创建选择框 + static createRadioButton(name: string, parent: Container, group: string, width: string, height: string, color: string, background: string, info?: string, infoWidth?: string, isChecked = false, callback?: (eventData: boolean, eventState: EventState) => void) { + let root = new StackPanel(name + "Root"); + root.isVertical = false + root.width = width; + root.height = height; + parent.addControl(root); + + + + let radioButton = new RadioButton(name); + root.addControl(radioButton); + radioButton.group = group; + BabylonUIStyleTool.setStyle_size(radioButton, height, height); + radioButton.background = background; + radioButton.color = color; + if (callback) { + radioButton.onIsCheckedChangedObservable.add(callback); + } + radioButton.isChecked = isChecked; + + + let header = new TextBlock(name + "_info", info); + root.addControl(header); + header.height = height; + header.width = width; + header.color = "black"; + header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + + return radioButton; + } + + /** + * 创建线性指示UI + * @param key + * @param mesh 跟随在此mesh 右侧 + * @param size 外框的大小, 外框的左侧中点为线段起点 + * @param infoSize 信息框的大小, 对齐于外框的右上角 + */ + static createLineInfo(key: string, mesh: AbstractMesh, size: Vector2 = new Vector2(160, 60), infoSize: Vector2 = new Vector2(120, 20)): UI_LineInfo { + + + if (size.x < infoSize.x) { + size.x = infoSize.x; + } + if (size.y < infoSize.y) { + size.y = infoSize.y; + } + + let lineInfo = new UI_LineInfo(key, mesh, size, infoSize); + + return lineInfo; + } + + + //#endregion + + + //#region 风格样式 + //统一设置窗口根节点风格 + static setDefaultStyle_windowRoot(container: Rectangle, isDialog = true, shadow: boolean = true, corner: boolean = true) { + + container.thickness = 0; + //弹框 + if (isDialog) { + container.color = BabylonUIStyleTool.c_color_white; + container.background = BabylonUIStyleTool.c_color_white; + container.alpha = 1; + container.zIndex = 100; + } + else//长存界面 + { + + container.color = BabylonUIStyleTool.c_color_blueBg; + container.background = BabylonUIStyleTool.c_color_blueBg; + container.alpha = 0.8; + container.zIndex = 1; + } + + + //阴影 + if (shadow) { + BabylonUIStyleTool.setStyle_Shadow(container, BabylonUIStyleTool.c_color_black, BabylonUIStyleTool.c_shadow_blur_window); + } + //圆角 + if (corner) { + container.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; + } + } + //设置尺寸 + static setStyle_size(control: Control, width: string, height: string) { + control.width = width; + control.height = height; + } + + //设置文本风格 + static setStyle_bodyText(text: TextBlock, fontSize: string = "20px", color: string = "#333333", alpha: number = 1) { + text.fontSize = fontSize; + text.color = color; + text.alpha = alpha; + } + + //设置对齐方式 + //horizontal: Control.HORIZONTAL_ALIGNMENT_CENTER;Control.HORIZONTAL_ALIGNMENT_LEFT;Control.HORIZONTAL_ALIGNMENT_RIGHT; + //vertical: Control.VERTICAL_ALIGNMENT_CENTER ; Control.VERTICAL_ALIGNMENT_LEFT;Control.VERTICAL_ALIGNMENT_RIGHT; + // + static setStyle_Alignment(control: Control, horizontal: number, vertical: number) { + control.horizontalAlignment = horizontal; + control.verticalAlignment = vertical; + } + + //设置边距 + static setStyle_padding(control: Control, paddingTop?: string, paddingRight?: string, paddingBottom?: string, paddingLeft?: string) { + if (paddingTop != undefined) { + control.paddingTop = paddingTop; + } + + if (paddingRight != undefined) { + control.paddingRight = paddingRight; + } + if (paddingBottom != undefined) { + control.paddingBottom = paddingBottom; + } + + if (paddingLeft != undefined) { + control.paddingLeft = paddingLeft; + } + + } + + + //设置阴影 + static setStyle_Shadow(container: Control, color: string = BabylonUIStyleTool.c_color_black, blur: number = BabylonUIStyleTool.c_shadow_blur_window) { + container.shadowColor = color; + container.shadowBlur = blur; + + } + //#endregion + + + //#region 功能封装 + + + + /** + * 在按钮上增加长按事件 + * @param button 按钮 + * @param scene 所在的场景 + * @param onEnd 正常长按 + * @param onAbort 长按中端 + */ + static addLongPressButtonBehave(button: Button, scene: Scene, onEnd?: () => void, onAbort?: () => void) { + let pickDown = false; + + let size = ConfigManager.c_size_facilityIconSize; + let vector2WithInfo: Vector2WithInfo; + + let ellipse: Ellipse; + button.onPointerUpObservable.add((info) => { + if (pickDown) { + pickDown = false; + ellipse.dispose(); + console.log("onPointerUpObservable"); + vector2WithInfo = info; + } + + }); + button.onPointerDownObservable.add(() => { + ellipse = new Ellipse("ellipse"); + ellipse.width = size + "px"; + ellipse.height = size + "px"; + ellipse.color = BabylonUIStyleTool.c_color_blue; + button.addControl(ellipse); + console.log("onPointerDownObservable"); + pickDown = true; + setAndStartTimer({ + timeout: ConfigManager.c_time_longPress, + contextObservable: scene.onBeforeRenderObservable, + breakCondition: () => { + return pickDown == false; + }, + + onEnded: (data) => { + if (onEnd) { + onEnd(); + + setTimeout( + function () { + button.onPointerUpObservable.notifyObservers(vector2WithInfo); + //此处存在问题,因为打开了前端页面,导致焦点小时,babylon无法确定鼠标抬起,则下一次的按下操作失效 + }, + 250); + + + } + }, + + onAborted: () => { + if (onAbort) { + onAbort(); + } + }, + + onTick: (data) => { + ellipse.thickness = data.completeRate * 0.5 * size * data.completeRate * data.completeRate; + } + }) + }); + } + + /** + * 在按钮上增加双击事件 + * @param button + * @param scene + * @param onClick 双击的回调 + */ + static addDoubleClickButtonBehave(button: Button, scene: Scene, onClick: () => void) { + if (BabylonUIStyleTool.s_doubleClickHelper == null) { + BabylonUIStyleTool.s_doubleClickHelper = new DoubleClickHelper(scene); + } + button.onPointerClickObservable.add( + (eventData: Vector2WithInfo, eventState: EventState) => { + let buttonID = button.uniqueId.toString(); + if (BabylonUIStyleTool.s_doubleClickHelper.isDoubleClick(buttonID)) { + onClick(); + } + else { + BabylonUIStyleTool.s_doubleClickHelper.setClickEvent(buttonID); + } + + } + ); + + } + + static s_doubleClickHelper: DoubleClickHelper; + + //#endregion +} + +/** + * 双击帮助器 + */ +class DoubleClickHelper { + readonly c_timer: number = 200; //双击的时间间隔 + scene: Scene; + + timer: number; + buttonID: string; + + constructor(scene: Scene) { + this.scene = scene; + let instance = this; + this.scene.onBeforeRenderObservable.add(() => { + instance.update() + }); + } + + update() { + if (this.timer > 0) { + this.timer -= this.scene.deltaTime; + } + + } + + /** + * 判断双击 + * @param buttonID 按钮id + */ + isDoubleClick(buttonID: string) { + if (this.buttonID == buttonID && this.timer > 0) { + return true; + } + else { + return false; + } + + + + + } + + /** + * 记录点击 + * @param buttonID + */ + setClickEvent(buttonID: string) { + this.buttonID = buttonID; + this.timer = this.c_timer; + } + + +} + +//#region 功能类 + +export class UI_LineInfo { + key: string; + mesh: AbstractMesh; + + root: Rectangle; + root_size: Vector2; + + points: Ellipse[] = []; + lineLength: number; + + infoBg: Rectangle; + info: TextBlock; + + line: MultiLine; + constructor(l_key: string, l_mesh: AbstractMesh, rootSize: Vector2, infoSize: Vector2) { + this.key = l_key; + this.mesh = l_mesh; + + this.root = new Rectangle("UI_LineRoot_" + this.key); + UIManager.Instance.uiRoot.addControl(this.root); + this.root.thickness = 0; + + + this.root_size = rootSize; + BabylonUIStyleTool.setStyle_size(this.root, rootSize.x + "px", rootSize.y + "px"); + this.root.linkWithMesh(this.mesh); + this.root.linkOffsetXInPixels = rootSize.x * 0.5; + // this.root.linkOffsetYInPixels = -40; + + let point_start = new Ellipse("start"); + point_start.width = "5px"; + point_start.height = "5px"; + this.root.addControl(point_start); + point_start.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + point_start.color = BabylonUIStyleTool.c_color_3d_blue; + point_start.background = BabylonUIStyleTool.c_color_3d_blue; + point_start.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + point_start.shadowBlur = 5; + this.points.push(point_start); + + let point_end = new Ellipse("end"); + point_end.width = "1px"; + point_end.height = "1px"; + this.root.addControl(point_end); + point_end.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + point_end.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + this.lineLength = 20; + point_end.left = this.lineLength + "px"; + point_end.topInPixels = infoSize.y * 0.5; + this.points.push(point_end); + + + this.infoBg = new Rectangle("infoBg"); + BabylonUIStyleTool.setStyle_size(this.infoBg, infoSize.x + "px", infoSize.y + "px"); + this.root.addControl(this.infoBg); + this.infoBg.color = BabylonUIStyleTool.c_color_3d_blue; + this.infoBg.shadowBlur = 5; + this.infoBg.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + this.infoBg.background = BabylonUIStyleTool.c_color_3d_blueBg; + this.infoBg.alpha = 0.7; + this.infoBg.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + this.infoBg.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + + this.info = new TextBlock("info", "info") + this.info.fontSize = 12; + this.infoBg.addControl(this.info); + this.info.color = BabylonUIStyleTool.c_color_3d_blueLight; + + + let point_infoBgLeft = new Ellipse("infoBgLeft"); + this.infoBg.addControl(point_infoBgLeft); + BabylonUIStyleTool.setStyle_size(point_infoBgLeft, "1px", "1px"); + point_infoBgLeft.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + point_infoBgLeft.leftInPixels = -1 + + this.points.push(point_infoBgLeft); + + + this.line = new MultiLine("ui_line_" + this.key); + + for (let i = 0; i < this.points.length; i++) { + this.line.add(this.points[i]); + } + // this.line.add(this.mesh);//起点 + // this.line.add(pointL); + // this.line.add(point); + this.line.lineWidth = 1.5; + this.line.color = BabylonUIStyleTool.c_color_3d_blue; + this.line.alpha = 0.7; + this.line.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + this.line.shadowBlur = 5; + UIManager.Instance.uiRoot.addControl(this.line); + + + } + + setEnable(show: boolean) { + this.root.isVisible = show; + this.line.isVisible = show; + } + + dispose() { + this.root.dispose(); + + this.line.dispose(); + } + +} + +//#endregion \ No newline at end of file diff --git a/src/app/babylon/tool/game-object.ts b/src/app/babylon/tool/game-object.ts new file mode 100644 index 0000000..4aca7fd --- /dev/null +++ b/src/app/babylon/tool/game-object.ts @@ -0,0 +1,9 @@ +import { AbstractMesh } from "@babylonjs/core"; + +export class GameObject { + + mesh: AbstractMesh; + + components: any[]; //组件 + +} \ No newline at end of file diff --git a/src/app/babylon/tool/gizmo-tool.ts b/src/app/babylon/tool/gizmo-tool.ts new file mode 100644 index 0000000..25b6d3d --- /dev/null +++ b/src/app/babylon/tool/gizmo-tool.ts @@ -0,0 +1,615 @@ +import { AbstractMesh, ArcRotateCamera, BoundingBoxGizmo, Color3, EventState, GizmoManager, Mesh, Observable, PickingInfo, PointerEventTypes, PointerInfo, Quaternion, Scene, UtilityLayerRenderer, Vector3 } from "@babylonjs/core"; +import { AdvancedDynamicTexture, Button, Container, InputText, Rectangle, StackPanel, TextBlock } from "@babylonjs/gui"; +import { ModeManager, ModeType } from "../controller/mode-manager"; +import { SceneManager } from "../controller/scene-manager"; +import { Game } from "../game"; +import { ModelInfo } from "../model/info/model/model-info"; +import { UIBase } from "../view/window-base/ui-base"; +import { BabylonTool } from "./babylon-tool"; +import { BabylonUIStyleTool } from "./babylon-ui-style-tool"; + + +//transform 信息的UI +export enum TransformUIType { + Hide, + Position, + Rotation, + Scale, +} + +export class GizmoTool { + static s_gizmoManager: GizmoManager; + static s_boundingBoxGizmo: BoundingBoxGizmo; + static s_needUpdateGizmo: NeedUpdateGizmo; //需要更新的gizmo分量 + static s_transformUIInfo: TransformUIInfo; + static s_camera: ArcRotateCamera; + + static onPickMeshInfoObservable: Observable; //pick事件 + static onGizmoAimMeshObservable: Observable; + static s_nowPickAim: ModelInfo;//当前pick的目标 + static s_nowPickAim_mesh: AbstractMesh;//当前pick的目标 + + static s_btn_poisition: Button; + static s_btn_rotation: Button; + static s_btn_scaling: Button; + + static init(scene: Scene, uiRoot: AdvancedDynamicTexture, camera: ArcRotateCamera) { + GizmoTool.s_camera = camera; + GizmoTool.s_boundingBoxGizmo = new BoundingBoxGizmo(); + GizmoTool.s_boundingBoxGizmo.setColor(new Color3(1, 0.52, 0.07)); + GizmoTool.s_boundingBoxGizmo.setEnabledRotationAxis(''); + GizmoTool.s_boundingBoxGizmo.setEnabledScaling(false); + + GizmoTool.initTransformUI(uiRoot); + + GizmoTool.s_needUpdateGizmo = new NeedUpdateGizmo(); + GizmoTool.s_gizmoManager = new GizmoManager(scene, undefined); + GizmoTool.s_gizmoManager.positionGizmoEnabled = true; + GizmoTool.s_gizmoManager.rotationGizmoEnabled = true; + GizmoTool.s_gizmoManager.scaleGizmoEnabled = true; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.planarGizmoEnabled = false; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.yPlaneGizmo.isEnabled = true; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.yPlaneGizmo.scaleRatio = 1; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false; + GizmoTool.s_gizmoManager.usePointerToAttachGizmos = false; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.onDragStartObservable.add( + GizmoTool.onPositionGizmoStart + ); + GizmoTool.s_gizmoManager.gizmos.positionGizmo.onDragEndObservable.add( + GizmoTool.onPositionGizmoEnd + ); + GizmoTool.s_gizmoManager.gizmos.rotationGizmo.onDragStartObservable.add( + GizmoTool.onRotationGizmoStart + ); + GizmoTool.s_gizmoManager.gizmos.rotationGizmo.onDragEndObservable.add( + GizmoTool.onRotationGizmoEnd + ); + GizmoTool.s_gizmoManager.gizmos.scaleGizmo.onDragStartObservable.add( + GizmoTool.onScaleGizmoStart + ); + GizmoTool.s_gizmoManager.gizmos.scaleGizmo.onDragEndObservable.add( + GizmoTool.onScaleGizmoEnd + ); + + scene.onPointerObservable.add(GizmoTool.onPointerObservable); + + GizmoTool.onGizmoAimMeshObservable = new Observable(); + + + GizmoTool.onPickMeshInfoObservable = new Observable(); + GizmoTool.onPickMeshInfoObservable.add(GizmoTool.onChangeGizmoAim); + + scene.onBeforeRenderObservable.add(GizmoTool.onBeforeRender); + GizmoTool.onTransformUITypeChange(TransformUIType.Hide); + } + + static onBeforeRender( + eventData: Scene, + eventState: EventState + ) { + GizmoTool.updateTransformUI(); + + let speed = 10 / GizmoTool.s_camera.radius; + + speed *= 1000; + + GizmoTool.s_camera.panningSensibility = speed;//动态修改平移灵敏度 + + + if (SceneManager.Instance.cameraMode_Is2D) { + let camera = SceneManager.Instance.defaultCamera; + camera.beta = 0; + if (camera.beta > 0.2) { + SceneManager.Instance.changeCameraMode(false); + } + else { + //GizmoTool.s_camera.size = GizmoTool.s_camera.radius * 0.01; + //console.log(GizmoTool.s_camera.orthoTop); + let size_width = GizmoTool.s_camera.radius * Game.instance.canvas.width * 0.0008; + let size_height = GizmoTool.s_camera.radius * Game.instance.canvas.height * 0.0008; + camera.orthoTop = size_height; + camera.orthoBottom = - size_height; + camera.orthoLeft = - size_width; + camera.orthoRight = size_width; + + } + + + } + + + } + + //鼠标事件监听 + static onPointerObservable( + eventData: PointerInfo, + eventState: EventState + ) { + switch (eventData.type) { + case PointerEventTypes.POINTERDOWN: + //console.log("指针按下"); + + break; + case PointerEventTypes.POINTERUP: + //console.log("指针抬起"); + GizmoTool.pickRayTest(eventData.pickInfo); + break; + case PointerEventTypes.POINTERMOVE: + //console.log("指针移动"); + + break; + } + } + + + /** + * 替换选中 + * @param modelInfo 新的modelInfo + */ + static replacePick(modelInfo: ModelInfo) { + if (GizmoTool.s_nowPickAim != modelInfo) { + GizmoTool.onChangeGizmoAim(modelInfo); + } + } + + //射线检测 + static pickRayTest(pickResult: PickingInfo) { + if (!SceneManager.s_isPointerDrag) { + if (pickResult.hit) { + let meshName = pickResult.pickedMesh.name; + // GizmoTool.onPickMeshObservable.notifyObservers(pickResult.pickedMesh); + //GizmoTool.changeGizmoAim(pickResult.pickedMesh); + + } else { + //GizmoTool.onPickMeshInfoObservable.notifyObservers(null); + } + } + + // console.log("pickRayTest " + pickResult.hit); + + } + + //改变gizmo目标mesh + static onChangeGizmoAim(modelInfo: ModelInfo) { + let mesh = null; + GizmoTool.s_nowPickAim = modelInfo; + + if (modelInfo != null) { + mesh = modelInfo.modelBox; + } + + GizmoTool.changeGizmoAim(mesh); + + if (ModeManager.currentMode == ModeType.Edit) { + GizmoTool.s_boundingBoxGizmo.attachedMesh = mesh; + } + + + GizmoTool.s_transformUIInfo.Mesh = mesh; + GizmoTool.s_transformUIInfo.modelInfo = modelInfo; + GizmoTool.updateTransformUI(mesh != null); + } + + //改变Gizmo目标 + static changeGizmoAim(mesh: AbstractMesh, x: boolean = true, y = true, z = true) { + + + GizmoTool.s_nowPickAim_mesh = mesh; + GizmoTool.s_gizmoManager.attachToMesh(mesh); + GizmoTool.s_gizmoManager.gizmos.positionGizmo.xGizmo.isEnabled = x; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.yGizmo.isEnabled = y; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.yPlaneGizmo.isEnabled = x && z; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.zGizmo.isEnabled = z; + GizmoTool.onGizmoAimMeshObservable.notifyObservers(mesh); + + } + + //离开当前目标(如果当前在这个) + static leaveTheGizmoAim(modelInfo: ModelInfo) { + if (GizmoTool.s_nowPickAim != null && GizmoTool.s_nowPickAim == modelInfo) { + GizmoTool.onChangeGizmoAim(null); + } + } + + //离开当前目标(如果当前在这个) + static leaveTheGizmoAimMesh(mesh: AbstractMesh) { + if (GizmoTool.s_nowPickAim_mesh != null && GizmoTool.s_nowPickAim_mesh == mesh) { + GizmoTool.onChangeGizmoAim(null); + } + } + + //初始化 + static initTransformUI(advTexture: AdvancedDynamicTexture) { + let transformUIInfo = new TransformUIInfo(); + GizmoTool.s_transformUIInfo = transformUIInfo; + + let width = 200; + let height = 150; + + let ui_transformUIRoot = new Rectangle('GizmoWindow'); + ui_transformUIRoot.width = width + 'px'; + ui_transformUIRoot.height = height + 'px'; + ui_transformUIRoot.background = UIBase.color_gray; + ui_transformUIRoot.color = '#FFFFFF'; + ui_transformUIRoot.alpha = 0.8; + ui_transformUIRoot.horizontalAlignment = + Container.HORIZONTAL_ALIGNMENT_LEFT; + ui_transformUIRoot.verticalAlignment = + Container.VERTICAL_ALIGNMENT_TOP; + ui_transformUIRoot.thickness = 0; + ui_transformUIRoot.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; + ui_transformUIRoot.zIndex = BabylonUIStyleTool.c_zIndex_gizmo; + advTexture.addControl(ui_transformUIRoot); + transformUIInfo.root = ui_transformUIRoot; + + let stackPanel = new StackPanel('verticalGroup'); + stackPanel.isVertical = true; + stackPanel.width = width + 'px'; + stackPanel.height = height + 'px'; + ui_transformUIRoot.addControl(stackPanel); + + let txt_title = new TextBlock('title', '信息:(x,y,z)'); + transformUIInfo.titleText = txt_title; + txt_title.width = width + 'px'; + txt_title.height = '45px'; + + stackPanel.addControl(txt_title); + + for (let i = 0; i < 3; i++) { + let l_InputInfo: UIVector3InputInfo = new UIVector3InputInfo(); + let postionRoot = new StackPanel('Group' + i); + stackPanel.addControl(postionRoot); + postionRoot.width = width + 'px'; + postionRoot.height = height * 0.23 + 'px'; + postionRoot.isVertical = false; + + let groupName = Button.CreateSimpleButton( + 'groupName', + 'info:' + ); + groupName.width = width * 0.22 + 'px'; + groupName.height = height * 0.22 + 'px'; + groupName.fontSize = 12; + groupName.background = '#FF8833'; + groupName.color = 'white'; + groupName.thickness = 0; + groupName.paddingBottom = '2px'; + postionRoot.addControl(groupName); + + groupName.onPointerClickObservable.add(() => { + switch (i) { + case 0: + transformUIInfo.OnTypeChangeObservable.notifyObservers( + TransformUIType.Position + ); + break; + case 1: + transformUIInfo.OnTypeChangeObservable.notifyObservers( + TransformUIType.Rotation + ); + break; + case 2: + transformUIInfo.OnTypeChangeObservable.notifyObservers( + TransformUIType.Scale + ); + break; + } + }); + + switch (i) { + case 0: + transformUIInfo.position = l_InputInfo; + postionRoot.name = 'transform'; + groupName.textBlock.text = '位置:'; + GizmoTool.s_btn_poisition = groupName; + break; + case 1: + transformUIInfo.rotation = l_InputInfo; + postionRoot.name = 'rotation'; + groupName.textBlock.text = '旋转:'; + GizmoTool.s_btn_rotation = groupName; + break; + case 2: + transformUIInfo.scale = l_InputInfo; + postionRoot.name = 'scale'; + groupName.textBlock.text = '缩放:'; + GizmoTool.s_btn_scaling = groupName; + break; + } + + for (let j = 0; j < 3; j++) { + let xyz = new InputText('xyz', '12'); + xyz.width = width * 0.25 + 'px'; + xyz.height = height * 0.22 + 'px'; + + xyz.color = 'white'; + xyz.alpha = 0.8; + xyz.margin = '5px'; + xyz.fontSize = 13; + xyz.thickness = 0.1; + xyz.paddingLeft = '0.1px'; + xyz.paddingBottom = '2px'; + + switch (i) { + case 0: + xyz.onTextChangedObservable.add(GizmoTool.onGizmoUIInput_Position); + break; + case 1: + xyz.onTextChangedObservable.add(GizmoTool.onGizmoUIInput_Rotation); + break; + case 2: + xyz.onTextChangedObservable.add(GizmoTool.onGizmoUIInput_Scale); + break; + } + + switch (j) { + case 0: + l_InputInfo.x = xyz; + xyz.name = 'x'; + xyz.background = '#C20000'; + break; + case 1: + l_InputInfo.y = xyz; + xyz.name = 'y'; + xyz.background = '#00820F'; + break; + case 2: + l_InputInfo.z = xyz; + xyz.name = 'z'; + xyz.background = '#0047C2'; + break; + } + + postionRoot.addControl(xyz); + } + } + transformUIInfo.OnTypeChangeObservable.add( + GizmoTool.onTransformUITypeChange + ); + } + + static onPositionGizmoStart() { + GizmoTool.s_needUpdateGizmo.position = true; + } + + static onPositionGizmoEnd() { + GizmoTool.s_needUpdateGizmo.position = false; + } + + static onRotationGizmoStart() { + GizmoTool.s_needUpdateGizmo.rotation = true; + } + static onRotationGizmoEnd() { + GizmoTool.s_needUpdateGizmo.rotation = false; + } + + static onScaleGizmoStart() { + GizmoTool.s_needUpdateGizmo.scale = true; + } + + static onScaleGizmoEnd() { + GizmoTool.s_needUpdateGizmo.scale = false; + } + + static currentGizmoType: TransformUIType = TransformUIType.Position; + //操作的类型发生变化: 隐藏、position、rotation、scale + static onTransformUITypeChange(uiType: TransformUIType) { + // console.log("改变type" + uiType); + let transformUIInfo = GizmoTool.s_transformUIInfo; + // if (uiType == TransformUIType.Hide) { + // transformUIInfo.root.isVisible = false; + // } else { + // transformUIInfo.root.isVisible = true; + // } + transformUIInfo.root.isVisible = ModeManager.isDebug;//先隐藏,因为效果图中没有 + + let isEditMode = ModeManager.currentMode == ModeType.Edit; + + let isPosition = uiType == TransformUIType.Position && isEditMode; + GizmoTool.s_btn_poisition.background = isPosition + ? UIBase.color_yellow + : UIBase.color_null; + GizmoTool.s_gizmoManager.positionGizmoEnabled = isPosition; + + let isRotation = uiType == TransformUIType.Rotation && isEditMode; + GizmoTool.s_btn_rotation.background = isRotation + ? UIBase.color_yellow + : UIBase.color_null; + GizmoTool.s_gizmoManager.rotationGizmoEnabled = isRotation; + + let isScaling = uiType == TransformUIType.Scale && isEditMode; + GizmoTool.s_btn_scaling.background = isScaling + ? UIBase.color_yellow + : UIBase.color_null; + GizmoTool.s_gizmoManager.scaleGizmoEnabled = isScaling; + + if (uiType == TransformUIType.Hide) { //隐藏选中框 + GizmoTool.s_boundingBoxGizmo.attachedMesh = null; + } + + } + + //更新显示 + static updateTransformUI(updateAll = false) { + let transformUIInfo = GizmoTool.s_transformUIInfo; + let updateGizmoInfo = GizmoTool.s_needUpdateGizmo; + let mesh = transformUIInfo.mesh; + + if (transformUIInfo == null || mesh == null) { + transformUIInfo.titleText.text = ''; + return; + } + + transformUIInfo.titleText.text = mesh.name; + + if (updateGizmoInfo.position || updateAll) { + transformUIInfo.position.x.text = mesh.position.x.toPrecision(6); + transformUIInfo.position.y.text = mesh.position.y.toPrecision(6); + transformUIInfo.position.z.text = mesh.position.z.toPrecision(6); + } + + if (updateGizmoInfo.rotation || updateAll) { + let augle = mesh.rotationQuaternion.toEulerAngles(); + + let radian1 = BabylonTool.c_radian1; //1弧度 + augle = augle.multiplyByFloats(radian1, radian1, radian1); + + transformUIInfo.rotation.x.text = augle.x.toPrecision(6); + transformUIInfo.rotation.y.text = augle.y.toPrecision(6); + transformUIInfo.rotation.z.text = augle.z.toPrecision(6); + } + + if (updateGizmoInfo.scale || updateAll) { + let originalScaling = + GizmoTool.s_transformUIInfo.modelInfo.modelData.transformData + .originalScaling; + transformUIInfo.scale.x.text = ( + mesh.absoluteScaling.x / originalScaling.x + ).toPrecision(6); + transformUIInfo.scale.y.text = ( + mesh.absoluteScaling.y / originalScaling.y + ).toPrecision(6); + transformUIInfo.scale.z.text = ( + mesh.absoluteScaling.z / originalScaling.z + ).toPrecision(6); + } + } + + //输入gizmo 数值 - position + static onGizmoUIInput_Position( + eventData: InputText, + eventState: EventState + ) { + let transformUIInfo = GizmoTool.s_transformUIInfo; + + switch (eventData.name) { + case 'x': + transformUIInfo.Mesh.position.x = Number.parseFloat( + transformUIInfo.position.x.text + ); + break; + case 'y': + transformUIInfo.Mesh.position.y = Number.parseFloat( + transformUIInfo.position.y.text + ); + break; + case 'z': + transformUIInfo.Mesh.position.z = Number.parseFloat( + transformUIInfo.position.z.text + ); + break; + } + } + + //输入gizmo 数值 - rotation + static onGizmoUIInput_Rotation( + eventData: InputText, + eventState: EventState + ) { + let transformUIInfo = GizmoTool.s_transformUIInfo; + + let eugle = new Vector3(); + eugle.x = + Number.parseFloat(transformUIInfo.rotation.x.text) / + BabylonTool.c_radian1; + eugle.y = + Number.parseFloat(transformUIInfo.rotation.y.text) / + BabylonTool.c_radian1; + eugle.z = + Number.parseFloat(transformUIInfo.rotation.z.text) / + BabylonTool.c_radian1; + + transformUIInfo.Mesh.rotationQuaternion = Quaternion.FromEulerAngles( + eugle.x, + eugle.y, + eugle.z + ); + } + + //输入gizmo 数值 - scale + static onGizmoUIInput_Scale( + eventData: InputText, + eventState: EventState + ) { + let transformUIInfo = GizmoTool.s_transformUIInfo; + let originalScaling = + GizmoTool.s_transformUIInfo.modelInfo.modelData.transformData + .originalScaling; + + switch (eventData.name) { + case 'x': + transformUIInfo.Mesh.scaling.x = + Number.parseFloat(transformUIInfo.scale.x.text) * originalScaling.x; + break; + case 'y': + transformUIInfo.Mesh.scaling.y = + Number.parseFloat(transformUIInfo.scale.y.text) * originalScaling.y; + break; + case 'z': + transformUIInfo.Mesh.scaling.z = + Number.parseFloat(transformUIInfo.scale.z.text) * originalScaling.z; + break; + } + } +} + +//需要更新gizmo的类型 +class NeedUpdateGizmo { + public position = true; + public rotation = false; + public scale = false; +} + + + +//存储vector3 对应文本输入UI的映射 +class UIVector3InputInfo { + public x: InputText; + public y: InputText; + public z: InputText; +} + +//存储 transform 相关UI输入类的映射 +class TransformUIInfo { + public root: Rectangle; + public position: UIVector3InputInfo; + public rotation: UIVector3InputInfo; + public scale: UIVector3InputInfo; + public titleText: TextBlock; + public nowType: TransformUIType = TransformUIType.Hide; + public mesh: AbstractMesh; + public modelInfo: ModelInfo; + public onTypeChangeObservable: Observable; + public onPositionChangeObservable: Observable = new Observable(); + public onRotationChangeObservable: Observable = new Observable(); + public onScaleChangeObservable: Observable = new Observable(); + + set Mesh(value: AbstractMesh) { + let lastMesh = this.mesh; + this.mesh = value; + if (value == null) { + this.NowType = TransformUIType.Hide; + } else { + //if (lastMesh == null) { + this.NowType = GizmoTool.currentGizmoType;// TransformUIType.Position; + //} + } + } + + get Mesh() { + return this.mesh; + } + + set NowType(value: TransformUIType) { + this.nowType = value; + // console.log("NowType====" + value); + this.OnTypeChangeObservable.notifyObservers(this.nowType); + } + + get OnTypeChangeObservable(): Observable { + if (this.onTypeChangeObservable == null) { + this.onTypeChangeObservable = new Observable(); + } + return this.onTypeChangeObservable; + } +} diff --git a/src/app/babylon/tool/load-tool.ts b/src/app/babylon/tool/load-tool.ts new file mode 100644 index 0000000..d135607 --- /dev/null +++ b/src/app/babylon/tool/load-tool.ts @@ -0,0 +1,64 @@ + +/** + * 加载管理器 + */ +export class LoadTool { + static s_loadingData: Map = new Map(); + static s_loadingNum: number = 0; + + static readonly c_tag_preloadMark = "preloadMark";//预加载标绘物模型(不阻断) + static readonly c_tag_createMark = "createMark";//创建标绘物(不阻断) + static readonly c_tag_facilityPrefab = "facilityPrefab";//设备预制体 + + + /** + * 新增加载数据 + * @param data + * @param tag + */ + static add(data: any, tag?: string) { + switch (tag) { + case LoadTool.c_tag_preloadMark: + case LoadTool.c_tag_createMark: return; + } + + let oldNum = LoadTool.s_loadingNum; + LoadTool.s_loadingData.set(data, tag); + LoadTool.s_loadingNum = LoadTool.s_loadingData.size; + if (oldNum == 0 && LoadTool.s_loadingNum == 1) { + LoadTool.onStart(); + } + } + + /** + * 加载完成,移除记录 + * @param data + */ + static remove(data: any) { + let oldNum = LoadTool.s_loadingNum; + if (LoadTool.s_loadingData.has(data)) { + LoadTool.s_loadingData.delete(data); + } + LoadTool.s_loadingNum = LoadTool.s_loadingData.size; + if (oldNum > 0 && LoadTool.s_loadingNum == 0) { + LoadTool.onEnd(); + } + } + + /** + * 开始加载 + */ + static onStart() { + console.log("开始加载"); + //ThreeDimensionalHomeComponent.instance.maskLayerService.sendMessage(true) + } + + /** + * 全部加载结束 + */ + static onEnd() { + console.log("结束加载"); + //ThreeDimensionalHomeComponent.instance.maskLayerService.sendMessage(false) + } + +} \ No newline at end of file diff --git a/src/app/babylon/tool/measure-tool.ts b/src/app/babylon/tool/measure-tool.ts new file mode 100644 index 0000000..67b0c28 --- /dev/null +++ b/src/app/babylon/tool/measure-tool.ts @@ -0,0 +1,476 @@ +import { EventState, Mesh, MeshBuilder, PickingInfo, PointerEventTypes, PointerInfo, Scene, Vector3 } from "@babylonjs/core"; +import { Button, Container, Control, Ellipse, MultiLine, Rectangle, TextBlock } from "@babylonjs/gui"; +import { UIManager } from "../controller/ui-manager"; +import { BabylonUIStyleTool } from "./babylon-ui-style-tool"; + +/** + * 测量工具 + */ +export class MeasureTool { + + + static instance: MeasureTool; + + /** + * 当前编辑的测量 + */ + currentMeasureInfo: MeasureInfo; + + /** + * 当前所处的测量状态 + */ + currentMeasureType: MeasureType = MeasureType.None; + + scene: Scene; + + constructor(scene: Scene) { + this.scene = scene; + MeasureTool.instance = this; + scene.onPointerObservable.add( + MeasureTool.instance.onPointerObservable + ); + + } + + + /** + * 新建测量 + * @param start + * @param type + */ + createMeasureInfo(start: Vector3) { + let type: MeasureType = this.currentMeasureType; + if (type != MeasureType.None) { + this.currentMeasureInfo = new MeasureInfo(start, type); + } + + } + + /** + * 中断测量 + */ + breakMeasure() { + this.currentMeasureInfo = null; + } + + + /** + * 改变测量类型 + * @param type MeasureType.None,表示结束测量 + */ + changeMeasureType(type: MeasureType) { + + + this.currentMeasureType = type; + switch (type) { + case MeasureType.None: + this.breakMeasure(); + break; + } + } + + + //鼠标交互监听 + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = MeasureTool.instance; + if (instance.currentMeasureType == MeasureType.None) { + return; //非测量状态 + } + + switch (eventData.type) { + case PointerEventTypes.POINTERPICK: + if (eventData.event.button == 0 && eventData.pickInfo.hit) { + if (!instance.isPickTooFar(eventData.pickInfo)) { + if (instance.currentMeasureInfo == null) { + instance.createMeasureInfo(eventData.pickInfo.pickedPoint); + } + else { + instance.addMeasurePoint(eventData.pickInfo); + } + + } + + } + else if (eventData.event.button == 2) //右键,中断 + { + instance.breakMeasure(); + + } + + break; + } + } + + /** + * 添加测量点 + */ + addMeasurePoint(pickInfo: PickingInfo) { + console.log("测量", pickInfo); + if (this.currentMeasureInfo != null) { + this.currentMeasureInfo.addPoint(pickInfo.pickedPoint); + } + + } + + /** + * 点击太远了(点在天空盒上) + * @param point + */ + isPickTooFar(point: PickingInfo) { + + if (point.pickedMesh != null && point.pickedMesh.name == "skyBox") { + return true; + } + else { + return false; + } + } + +} + +/** + * 测量状态 + */ +export enum MeasureType { + /** + * 未测量 + */ + None, + + /** + * 直线距离 + */ + Distance, + + /** + * 高度 + */ + Height, + + /** + * 面积 + */ + Area, +} + +/** + * 测量信息 + */ +export class MeasureInfo { + /** + * 所有点 + */ + points: MeasurePoint[]; + + type: MeasureType; + + /** + * ui根节点 + */ + uiRoot: Container; + + + /** + * 圆形起点 + */ + ell_start: Ellipse; + + /** + * 释放按钮 + */ + btn_dispose: Button; + + /** + * 是信息 + */ + txt_info: TextBlock; + + /** + * 信息背景 + */ + txtbg: Rectangle; + + mulLine: MultiLine; + + constructor(start: Vector3, type: MeasureType) { + this.points = []; + this.type = type; + + this.mulLine = new MultiLine("mulLine" + type); + this.mulLine.lineWidth = 1.5; + this.mulLine.color = BabylonUIStyleTool.c_color_3d_blue; + this.mulLine.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + this.mulLine.shadowBlur = 5; + UIManager.Instance.uiRoot.addControl(this.mulLine); + this.addPoint(start); + + this.updateUI(); + } + + /** + * 新增节点 + */ + addPoint(pos: Vector3) { + if (this.points.length > 0) { + for (let i = 0; i < this.points.length; i++) { + this.points[i].changeEnd(false); + } + if (this.type == MeasureType.Height) { + pos.x = this.points[0].pos.x; + pos.z = this.points[0].pos.z; + } + } + + + + let point = new MeasurePoint(pos, true, this); + this.points.push(point); + + if (this.points.length > 3 && this.type == MeasureType.Area) { + let lastPoint = this.mulLine.getAt(this.points.length - 1); + this.mulLine.remove(lastPoint); + this.mulLine.add(point.mesh); + this.mulLine.add(this.points[0].mesh); + } + else { + this.mulLine.add(point.mesh); + } + + + + if (this.points.length > 1 && this.type == MeasureType.Height) { //高度只能放两个点 + MeasureTool.instance.breakMeasure(); + } + + if (this.points.length == 3 && this.type == MeasureType.Area) { + this.mulLine.add(this.points[0].mesh); + } + + //更新显示 + this.updateUI(); + + } + + /** + * 更新UI + */ + updateUI() { + if (this.uiRoot == null) { + this.ell_start = new Ellipse("MeasureStart") + UIManager.Instance.uiRoot.addControl(this.ell_start); + BabylonUIStyleTool.setStyle_size(this.ell_start, "10px", "10px"); + this.ell_start.thickness = 2; + this.ell_start.color = BabylonUIStyleTool.c_color_3d_blue; + this.ell_start.background = BabylonUIStyleTool.c_color_3d_blueBg; + this.ell_start.linkWithMesh(this.points[0].mesh); + + this.uiRoot = new Container("Measure"); + this.uiRoot.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + UIManager.Instance.uiRoot.addControl(this.uiRoot); + BabylonUIStyleTool.setStyle_size(this.uiRoot, "100px", "40px"); + + this.btn_dispose = Button.CreateSimpleButton("dispose", "x"); + this.uiRoot.addControl(this.btn_dispose); + this.btn_dispose.leftInPixels = 10; + BabylonUIStyleTool.setStyle_size(this.btn_dispose, "15px", "15px"); + this.btn_dispose.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + this.btn_dispose.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + let instance = this; + this.btn_dispose.onPointerClickObservable.add(() => { + instance.dispose(); + }); + this.btn_dispose.background = BabylonUIStyleTool.c_color_3d_blueBg; + this.btn_dispose.color = BabylonUIStyleTool.c_color_3d_blue; + + this.txtbg = new Rectangle("txtBG"); + this.uiRoot.addControl(this.txtbg); + BabylonUIStyleTool.setStyle_size(this.txtbg, "70px", "25px"); + this.txtbg.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + this.txtbg.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + this.txtbg.background = BabylonUIStyleTool.c_color_3d_blueBg; + this.txtbg.color = BabylonUIStyleTool.c_color_3d_blue; + + + this.txt_info = new TextBlock("txt"); + this.uiRoot.addControl(this.txt_info); + BabylonUIStyleTool.setStyle_size(this.txt_info, "70px", "25px"); + this.txt_info.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + this.txt_info.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + this.txt_info.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + this.txt_info.color = BabylonUIStyleTool.c_color_3d_blue; + this.txt_info.resizeToFit = true; + + let ell_end = new Ellipse("end") + this.uiRoot.addControl(ell_end); + BabylonUIStyleTool.setStyle_size(ell_end, "10px", "10px"); + ell_end.thickness = 2; + ell_end.color = BabylonUIStyleTool.c_color_3d_blue; + ell_end.background = BabylonUIStyleTool.c_color_3d_blueBg; + ell_end.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + ell_end.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + + } + + + let info: string = ""; + switch (this.type) { + case MeasureType.Distance: + info = " 长度:" + this.getPointsDistance(this.points).toFixed(1) + "米"; + break; + case MeasureType.Height: + info = " 高度:" + this.getPointsHeight(this.points).toFixed(1) + "米"; + break; + case MeasureType.Area: + info = " 面积:" + this.getPointsArea(this.points).toFixed(1) + "平方米"; + break; + } + + this.txt_info.text = info; + + let instance = this; + setTimeout(() => { + + instance.txtbg.widthInPixels = instance.txt_info.widthInPixels + 3; + instance.uiRoot.widthInPixels = instance.txt_info.widthInPixels + 3; + + let lastPoint = instance.points[instance.points.length - 1]; + instance.uiRoot.linkWithMesh(lastPoint.mesh); + instance.uiRoot.linkOffsetYInPixels = 20 - 5; + instance.uiRoot.linkOffsetXInPixels = instance.uiRoot.widthInPixels * 0.5 - 5; + + }, (30)); + + } + + + /** + * 获取多个点的长度 + * @param points + */ + getPointsDistance(points: MeasurePoint[]) { + let result = 0; + + if (points != null && points.length > 1) { + for (let i = 1; i < points.length; i++) { + result += Vector3.Distance(points[i - 1].pos, points[i].pos); + } + } + + + return result; + + } + + /** + * 获取高度 + * @param points + */ + getPointsHeight(points: MeasurePoint[]) { + let result = 0; + + if (points != null && points.length > 1) { + result = points[points.length - 1].pos.y - points[0].pos.y; + result = Math.abs(result); + } + + return result; + } + + /** + * 获取面积(在地面的投影面积, xz平面内) + * @param points + */ + getPointsArea(points: MeasurePoint[]) { + let result = 0; + + if (points != null && points.length > 2) { + + for (let i = 0; i < points.length - 1; i++) { + result += (points[i].pos.x * points[i + 1].pos.z - points[i + 1].pos.x * points[i].pos.z); + } + + let num = points.length - 1; + + result = 0.5 * (result + points[num].pos.x * points[0].pos.z - points[0].pos.x * points[num].pos.z); + result = Math.abs(result); + } + + + return result; + + } + + /** + * 释放 + */ + dispose() { + this.ell_start.dispose(); + + this.uiRoot.dispose(); + this.uiRoot = null; + this.btn_dispose = null; + this.txt_info = null; + this.mulLine.dispose(); + this.mulLine = null; + + for (let i = 0; i < this.points.length; i++) { + this.points[i].dispose(); + } + this.points = []; + + MeasureTool.instance.breakMeasure(); + } + +} + +/** + * 测量点 + */ +export class MeasurePoint { + + /** + * 终点 + */ + isEnd: boolean; + + pos: Vector3; + + /** + * 所属测量信息 + */ + belongTo: MeasureInfo; + + /** + * 模型网格 + */ + mesh: Mesh; + + + + constructor(pos: Vector3, isEnd: boolean, belongTo: MeasureInfo) { + this.pos = pos; + this.isEnd = isEnd; + this.belongTo = belongTo; + + this.mesh = MeshBuilder.CreateSphere(belongTo.type.toString(), { segments: 1, diameter: 0.01 }, MeasureTool.instance.scene); + this.mesh.position = pos; + + } + + /** + * 更新终点的显示 + * @param isEnd + */ + changeEnd(isEnd: boolean) { + this.isEnd = isEnd; + //更新终点显示 + + } + + dispose() { + if (this.mesh != null) { + this.mesh.dispose(); + } + } + +} \ No newline at end of file diff --git a/src/app/babylon/tool/mesh-pool.ts b/src/app/babylon/tool/mesh-pool.ts new file mode 100644 index 0000000..101ff0d --- /dev/null +++ b/src/app/babylon/tool/mesh-pool.ts @@ -0,0 +1,322 @@ +//mesh对象池 +//为避免重复加载、销毁mesh对象 + +import { AbstractMesh, MeshBuilder, Observable, TransformNode, Vector3 } from "@babylonjs/core"; +import { SceneManager } from "../controller/scene-manager"; +import { ModelData, ModelType } from "../model/data/model-data/model-data"; +import { ModelInfo } from "../model/info/model/model-info"; +import { TsTool } from "./ts-tool"; + +export class MeshPool { + + //#region 单例 + private static instance: MeshPool; + + static get Instance() { + if (MeshPool.instance == null) { + MeshPool.instance = new MeshPool(); + } + + return MeshPool.instance; + } + //#endregion + + + root: TransformNode; + + prefabPool: Map = new Map();//预制体池 + idlePool: Map = new Map();//空闲池 + workingPool: Map = new Map();//工作池 + + constructor() { + this.root = new TransformNode("MeshPoolRoot", SceneManager.Instance.scene); + + this.root.setEnabled(false);//隐藏起来 + } + + //#region 外部方法 + + /** + * 从对象池导入模型(经过包装盒包装) + */ + static importMesh(modeltype: ModelType, modelData: ModelData, isNew: boolean = true, fromClone: boolean = true, tag?: string, onSuccess?: (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => void, onlyPrefab = false,): MeshPoolInfo { + let result = MeshPool.Instance.getMesh(modelData.resPath, modelData.resName, fromClone); + + if (result == null) { + //console.log("对象池中没有,要加载:" + path + name); + + let prefab = MeshPool.Instance.getMeshPrefab(modelData.resPath, modelData.resName); + result = new MeshPoolInfo(modelData.resPath, modelData.resName, fromClone); + if (prefab == null) { + prefab = new MeshPoolInfo(modelData.resPath, modelData.resName, false); + prefab.onSuccessObserver = new Observable(); + MeshPool.Instance.addPool(MeshPool.Instance.prefabPool, prefab); + + SceneManager.createModel(modeltype, modelData, true, isNew, tag, (meshes: AbstractMesh[], box: AbstractMesh, modelInfo: ModelInfo) => { + prefab.meshes = meshes; + prefab.meshBox = box; + prefab.modelInfo = modelInfo; + prefab.setActive(false); + modelInfo.showFollowUI(false); + prefab.success(); + MeshPool.Instance.addPool(MeshPool.Instance.prefabPool, prefab); + if (!onlyPrefab) { + if (fromClone) { + result.cloneMeshFrom(prefab, modelData, isNew); + result.setActive(true); + MeshPool.Instance.addPool(MeshPool.Instance.workingPool, result); + result.success(); + if (onSuccess) { + onSuccess(result.meshBox, result.meshes, result); + } + } + else { + SceneManager.createModel(modeltype, modelData, true, isNew, tag, (meshes: AbstractMesh[], box: AbstractMesh, modelInfo: ModelInfo) => { + result.meshBox = box; + result.meshes = meshes; + result.modelInfo = modelInfo; + result.setActive(true); + modelInfo.showFollowUI(false); + result.success(); + MeshPool.Instance.addPool(MeshPool.Instance.workingPool, result); + if (onSuccess) { + onSuccess(result.meshBox, result.meshes, result); + } + }) + } + } + + }) + return result; + + } + else { + if (fromClone) { + if (prefab.meshBox == null) { + // console.log("找到了预制体,但是还没加载完") + prefab.onSuccessObserver.add((eventData: MeshPoolInfo) => { + // console.log("加载回调"); + result.cloneMeshFrom(prefab, modelData, isNew); + result.setActive(true); + MeshPool.Instance.addPool(MeshPool.Instance.workingPool, result); + result.success(); + if (onSuccess) { + onSuccess(result.meshBox, result.meshes, result); + } + }) + return result; + } + else { + result.cloneMeshFrom(prefab, modelData, isNew); + result.setActive(true); + MeshPool.Instance.addPool(MeshPool.Instance.workingPool, result); + result.success(); + if (onSuccess) { + onSuccess(result.meshBox, result.meshes, result); + } + return result; + } + + + } + else { + SceneManager.createModel(modeltype, modelData, true, isNew, tag, (meshes: AbstractMesh[], box: AbstractMesh, modelInfo: ModelInfo) => { + result.meshBox = box; + result.meshes = meshes; + result.modelInfo = modelInfo; + result.setActive(true); + modelInfo.showFollowUI(false); + MeshPool.Instance.addPool(MeshPool.Instance.workingPool, result); + result.success(); + if (onSuccess) { + onSuccess(result.meshBox, result.meshes, result); + } + }) + return result; + } + } + } + else { + // console.log("从对象池取出" + result.key); + MeshPool.Instance.removePool(MeshPool.Instance.idlePool, result); + MeshPool.instance.addPool(MeshPool.Instance.workingPool, result); + result.setActive(true); + result.success(); + if (onSuccess && result.meshBox != null) { + onSuccess(result.meshBox, result.meshes, result); + } + } + return result; + } + + /** + * 放回到对象池(从工作池放入空闲池) + * @param meshPoolInfo + */ + static disposeMesh(meshPoolInfo: MeshPoolInfo) { + MeshPool.Instance.removePool(MeshPool.Instance.workingPool, meshPoolInfo); + MeshPool.Instance.addPool(MeshPool.Instance.idlePool, meshPoolInfo); + meshPoolInfo.setActive(false); + } + + //#endregion + + //#region 内部方法 + + getMesh(path: string, name: string, fromClone: boolean = true): MeshPoolInfo { + let result: MeshPoolInfo = null; + let resKey = path + name; + + let poolList = MeshPool.Instance.idlePool.get(resKey); + + if (poolList != null && poolList.length > 0) { + for (let i = 0; i < poolList.length; i++) { + if (poolList[i].fromClone == fromClone) { + result = poolList[i]; + break; + } + } + + } + else { + //console.log("对象池取出失败" + name); + } + return result; + } + + + + //放入某池 + addPool(pool: Map, value: MeshPoolInfo) { + let poolInfo = pool.get(value.key); + if (poolInfo == null) { + poolInfo = []; + pool.set(value.key, poolInfo); + } + poolInfo.push(value); + } + + //移除池 + removePool(pool: Map, value: MeshPoolInfo) { + let poolInfo = pool.get(value.key); + if (poolInfo == null) { + console.error("removePool no key" + value.key); + return; + } + TsTool.arrayRemove(poolInfo, value); + } + + + /** + * 从预制体池中取出 + */ + getMeshPrefab(path: string, name: string): MeshPoolInfo { + let result: MeshPoolInfo = null; + let resKey = path + name; + + let poolList = MeshPool.Instance.prefabPool.get(resKey); + if (poolList != null && poolList.length > 0) { + result = poolList[0]; + } + else { + + } + + return result; + } + + //#endregion + +} + +/** + * 对象池元数据 + */ +export class MeshPoolInfo { + key: string; + resPath: string;//资源路径, + resName: string; + meshBox: AbstractMesh;//对象 + fromClone: boolean;//来自克隆 + + meshes: AbstractMesh[];//所有mesh节点 + active: boolean; + modelInfo: ModelInfo; + + onSuccessObserver: Observable; + + constructor(resPath: string, resName: string, fromClone: boolean = true, mesh?: AbstractMesh, meshes?: AbstractMesh[], modelInfo?: ModelInfo) { + this.key = resPath + resName; + this.resPath = resPath; + this.resName = resName; + this.fromClone = fromClone; + this.meshBox = mesh; + this.meshes = meshes; + this.modelInfo = modelInfo; + + } + + setActive(active: boolean) { + if (this.meshBox != null) { + + if (active) { + this.meshBox.setParent(null); + let allNode = this.meshBox.getChildTransformNodes(); + for (let i = 0; i < allNode.length; i++) { + allNode[i].setEnabled(true); + } + this.meshBox.setEnabled(true); + } + else { + + this.meshBox.setParent(MeshPool.Instance.root); + this.meshBox.position = Vector3.Zero(); + // this.meshBox.setEnabled(false); + + // console.log("放入对象池" + this.meshBox.name); + } + } + } + + /** + * 导入完成 + */ + success() { + if (this.onSuccessObserver != null) { + // console.log("导入完成", this.onSuccessObserver.observers); + this.onSuccessObserver.notifyObservers(this); + this.onSuccessObserver.clear(); + } + + } + + clone() { + let modelInfo = this.modelInfo.clone(); + let newMesh = new MeshPoolInfo(this.resPath, this.resName, true, modelInfo.modelBox, modelInfo.models, modelInfo); + return newMesh; + } + + /** + * 从预制体克隆mesh + * @param prefab + */ + cloneMeshFrom(prefab: MeshPoolInfo, modelData?: ModelData, isNew: boolean = true) { + let modelInfo = prefab.modelInfo.clone(modelData, isNew); + this.meshBox = modelInfo.modelBox; + this.modelInfo = modelInfo; + // let box = MeshBuilder.CreateBox("box", { size: 1 }); //用于测试阴影 + // box.setParent(modelInfo.modelBox); + // box.position = new Vector3(0, 2, 0); + if (SceneManager.s_openShadow) { + SceneManager.Instance.shadowGenerator.addShadowCaster(modelInfo.modelBox, true); + // console.log("添加到阴影", modelInfo.modelBox.name); + } + + } + + dispose() { + this.modelInfo.dispose(); + } +} + + diff --git a/src/app/babylon/tool/myArcRotateCameraPointersInput.ts b/src/app/babylon/tool/myArcRotateCameraPointersInput.ts new file mode 100644 index 0000000..48322cc --- /dev/null +++ b/src/app/babylon/tool/myArcRotateCameraPointersInput.ts @@ -0,0 +1,262 @@ +import { ArcRotateCamera, CameraInputTypes, Nullable, PointerTouch, serialize } from "@babylonjs/core"; +import { BaseCameraPointersInput } from "@babylonjs/core/Cameras/Inputs/BaseCameraPointersInput"; + + +//修改为左键平移,右键旋转 + +export class MyArcRotateCameraPointersInput extends BaseCameraPointersInput { + /** + * Defines the camera the input is attached to. + */ + public camera: ArcRotateCamera; + + /** + * Gets the class name of the current input. + * @returns the class name + */ + public getClassName(): string { + return "MyArcRotateCameraPointersInput"; + } + + /** + * Defines the buttons associated with the input to handle camera move. + */ + @serialize() + public buttons = [0, 1, 2]; + + /** + * Defines the pointer angular sensibility along the X axis or how fast is + * the camera rotating. + */ + @serialize() + public angularSensibilityX = 1000.0; + + /** + * Defines the pointer angular sensibility along the Y axis or how fast is + * the camera rotating. + */ + @serialize() + public angularSensibilityY = 1000.0; + + /** + * Defines the pointer pinch precision or how fast is the camera zooming. + */ + @serialize() + public pinchPrecision = 12.0; + + /** + * pinchDeltaPercentage will be used instead of pinchPrecision if different + * from 0. + * It defines the percentage of current camera.radius to use as delta when + * pinch zoom is used. + */ + @serialize() + public pinchDeltaPercentage = 0; + + /** + * When useNaturalPinchZoom is true, multi touch zoom will zoom in such + * that any object in the plane at the camera's target point will scale + * perfectly with finger motion. + * Overrides pinchDeltaPercentage and pinchPrecision. + */ + @serialize() + public useNaturalPinchZoom: boolean = false; + + /** + * Defines whether zoom (2 fingers pinch) is enabled through multitouch + */ + @serialize() + public pinchZoom: boolean = true; + + /** + * Defines the pointer panning sensibility or how fast is the camera moving. + */ + @serialize() + public panningSensibility: number = 1000.0; + + /** + * Defines whether panning (2 fingers swipe) is enabled through multitouch. + */ + @serialize() + public multiTouchPanning: boolean = true; + + /** + * Defines whether panning is enabled for both pan (2 fingers swipe) and + * zoom (pinch) through multitouch. + */ + @serialize() + public multiTouchPanAndZoom: boolean = true; + + /** + * Revers pinch action direction. + */ + public pinchInwards = true; + + private _isPanClick: boolean = false; + private _twoFingerActivityCount: number = 0; + private _isPinching: boolean = false; + + /** + * Move camera from multi touch panning positions. + */ + private _computeMultiTouchPanning( + previousMultiTouchPanPosition: Nullable, + multiTouchPanPosition: Nullable + ): void { + if (this.panningSensibility !== 0 && previousMultiTouchPanPosition + && multiTouchPanPosition) { + var moveDeltaX = multiTouchPanPosition.x - previousMultiTouchPanPosition.x; + var moveDeltaY = multiTouchPanPosition.y - previousMultiTouchPanPosition.y; + // this.camera.inertialPanningX += -moveDeltaX / this.panningSensibility; + // this.camera.inertialPanningY += moveDeltaY / this.panningSensibility; + // this.moveCamera(-moveDeltaX, moveDeltaY); + this.rotateCamera(moveDeltaX, moveDeltaX); + } + + } + + moveCamera(x, y) { + this.camera.inertialPanningX += x / this.panningSensibility; + this.camera.inertialPanningY += y / this.panningSensibility; + } + + /** + * Move camera from pinch zoom distances. + */ + private _computePinchZoom( + previousPinchSquaredDistance: number, + pinchSquaredDistance: number + ): void { + if (this.useNaturalPinchZoom) { + this.camera.radius = this.camera.radius * + Math.sqrt(previousPinchSquaredDistance) / Math.sqrt(pinchSquaredDistance); + } else if (this.pinchDeltaPercentage) { + this.camera.inertialRadiusOffset += + (pinchSquaredDistance - previousPinchSquaredDistance) * 0.001 * + this.camera.radius * this.pinchDeltaPercentage; + } + else { + this.camera.inertialRadiusOffset += + (pinchSquaredDistance - previousPinchSquaredDistance) / + (this.pinchPrecision * (this.pinchInwards ? 1 : -1) * + (this.angularSensibilityX + this.angularSensibilityY) / 2); + } + } + + /** + * Called on pointer POINTERMOVE event if only a single touch is active. + */ + protected onTouch(point: Nullable, + offsetX: number, + offsetY: number): void { + if (this.panningSensibility !== 0 && + ((this._ctrlKey && this.camera._useCtrlForPanning) || this._isPanClick)) { + // this.camera.inertialPanningX += -offsetX / this.panningSensibility; + // this.camera.inertialPanningY += offsetY / this.panningSensibility; + + this.rotateCamera(offsetX, offsetY); + } else { + this.moveCamera(-offsetX, offsetY); + // this.camera.inertialAlphaOffset -= offsetX / this.angularSensibilityX; + // this.camera.inertialBetaOffset -= offsetY / this.angularSensibilityY; + } + + + } + + rotateCamera(offsetX, offsetY) { + this.camera.inertialAlphaOffset -= offsetX / this.angularSensibilityX; + this.camera.inertialBetaOffset -= offsetY / this.angularSensibilityY; + } + + /** + * Called on pointer POINTERDOUBLETAP event. + */ + protected onDoubleTap(type: string) { + if (this.camera.useInputToRestoreState) { + this.camera.restoreState(); + } + } + + /** + * Called on pointer POINTERMOVE event if multiple touches are active. + */ + protected onMultiTouch(pointA: Nullable, + pointB: Nullable, + previousPinchSquaredDistance: number, + pinchSquaredDistance: number, + previousMultiTouchPanPosition: Nullable, + multiTouchPanPosition: Nullable): void { + if (previousPinchSquaredDistance === 0 && previousMultiTouchPanPosition === null) { + // First time this method is called for new pinch. + // Next time this is called there will be a + // previousPinchSquaredDistance and pinchSquaredDistance to compare. + return; + } + if (pinchSquaredDistance === 0 && multiTouchPanPosition === null) { + // Last time this method is called at the end of a pinch. + return; + } + // Zoom and panning enabled together + if (this.multiTouchPanAndZoom) { + this._computePinchZoom(previousPinchSquaredDistance, pinchSquaredDistance); + this._computeMultiTouchPanning(previousMultiTouchPanPosition, multiTouchPanPosition); + + // Zoom and panning enabled but only one at a time + } else if (this.multiTouchPanning && this.pinchZoom) { + this._twoFingerActivityCount++; + + if (this._isPinching || (this._twoFingerActivityCount < 20 + && Math.abs(Math.sqrt(pinchSquaredDistance) - Math.sqrt(previousPinchSquaredDistance)) > + this.camera.pinchToPanMaxDistance)) { + + // Since pinch has not been active long, assume we intend to zoom. + this._computePinchZoom(previousPinchSquaredDistance, pinchSquaredDistance); + + // Since we are pinching, remain pinching on next iteration. + this._isPinching = true; + } else { + // Pause between pinch starting and moving implies not a zoom event. Pan instead. + this._computeMultiTouchPanning(previousMultiTouchPanPosition, multiTouchPanPosition); + } + + // Panning enabled, zoom disabled + } else if (this.multiTouchPanning) { + this._computeMultiTouchPanning(previousMultiTouchPanPosition, multiTouchPanPosition); + + // Zoom enabled, panning disabled + } else if (this.pinchZoom) { + this._computePinchZoom(previousPinchSquaredDistance, pinchSquaredDistance); + } + } + + /** + * Called each time a new POINTERDOWN event occurs. Ie, for each button + * press. + */ + protected onButtonDown(evt: PointerEvent): void { + this._isPanClick = evt.button === this.camera._panningMouseButton; + } + + /** + * Called each time a new POINTERUP event occurs. Ie, for each button + * release. + */ + protected onButtonUp(evt: PointerEvent): void { + this._twoFingerActivityCount = 0; + this._isPinching = false; + } + + /** + * Called when window becomes inactive. + */ + protected onLostFocus(): void { + + // console.trace("失去焦点") + this._isPanClick = false; + this._twoFingerActivityCount = 0; + this._isPinching = false; + } +} +(CameraInputTypes)["MyArcRotateCameraPointersInput"] = + MyArcRotateCameraPointersInput; \ No newline at end of file diff --git a/src/app/babylon/tool/particle-system-tool.ts b/src/app/babylon/tool/particle-system-tool.ts new file mode 100644 index 0000000..28d7f8f --- /dev/null +++ b/src/app/babylon/tool/particle-system-tool.ts @@ -0,0 +1,113 @@ +import { ParticleHelper, ParticleSystem, ParticleSystemSet, Scene, Vector3 } from "@babylonjs/core"; + + +/** + * 粒子特效工具 + */ +export class ParticleSystemTool { + + /** + * 保存的预制 + */ + psPool: Map; + + scene: Scene; + + constructor(scene: Scene) { + this.scene = scene; + this.psPool = new Map(); + } + + static instance: ParticleSystemTool; + + static Init(scene: Scene) { + ParticleSystemTool.instance = new ParticleSystemTool(scene); + + + } + + static dispose() { + + } + + /** + * 加载预制 + * @param name + * @param path + * @param onSuccess + */ + loadPrefab(name: string, path: string, clone: boolean = true, onSuccess?: (ps: ParticleSystem) => void) { + let instance = this; + ParticleHelper.ParseFromFileAsync(null, path, this.scene, false).then((value: ParticleSystem) => { + value.stop(); + instance.psPool.set(path, value); + if (clone) { + let result = instance.cloneParticle(value, name); + if (onSuccess) { + onSuccess(result) + } + } + else { + if (onSuccess) { + onSuccess(value) + } + } + }); + } + + /** + * 异步导入粒子特效 + * @param path + * @param onSuccess + */ + importParticle(name: string, path: string, onSuccess: (ps: ParticleSystem) => void) { + let instance = this; + if (instance.psPool.has(path)) { + let set = instance.psPool.get(path); + let result = instance.cloneParticle(set, name); + onSuccess(result); + } + else { + + instance.loadPrefab(null, path, true, (value: ParticleSystem) => { + onSuccess(value); + }) + + // ParticleHelper.ParseFromFileAsync(null, path, this.scene, false).then((value: ParticleSystem) => { + // instance.psPool.set(path, value); + // let result = instance.cloneParticle(value, name); + // onSuccess(result) + // }); + } + + } + + + /** + * 克隆粒子系统 + * @param setPrefab + * @param name + */ + cloneParticleSet(setPrefab: ParticleSystemSet, name: string) { + let result = new ParticleSystemSet(); + for (let i = 0; i < setPrefab.systems.length; i++) { + result.systems.push(this.cloneParticle(setPrefab.systems[i] as ParticleSystem, name)); + } + return result; + } + + /** + * 粒子 + * @param particle + * @param name + */ + cloneParticle(particle: ParticleSystem, name: string) { + // let root = new AbstractMesh("root_" + name, this.scene); + let root = Vector3.Zero(); + let result = particle.clone(particle.name, root); + + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/tool/photo360-tool.ts b/src/app/babylon/tool/photo360-tool.ts new file mode 100644 index 0000000..57b5616 --- /dev/null +++ b/src/app/babylon/tool/photo360-tool.ts @@ -0,0 +1,112 @@ +import { ArcRotateCamera, Color3, Color4, Database, Engine, EngineStore, PhotoDome, Scene, Vector3 } from "@babylonjs/core"; +import { TextBlock } from "@babylonjs/gui"; +import { AdvancedDynamicTexture } from "@babylonjs/gui/2D/advancedDynamicTexture"; + +/** + * 360全景图工具 + */ +export class Photo360Tool { + + static instance: Photo360Tool; + + canvas: HTMLCanvasElement; + engine: Engine; + scene: Scene; + + photo: PhotoDome; + loadingTxt: TextBlock; + + + /** + * 开启全景图,创建 + * @param canvas + * @param photoURL + */ + static open(canvas: HTMLCanvasElement, photoURL: string) { + if (Photo360Tool.instance == null) { + Photo360Tool.instance = new Photo360Tool(); + let instance = Photo360Tool.instance; + instance.canvas = canvas; + instance.engine = new Engine(canvas, null, { stencil: true }); + instance.scene = new Scene(instance.engine, { virtual: true }); // virtual确保默认场景为主场景,而不是新创建的这个 + instance.scene.useRightHandedSystem = true;//使用右手坐标系 + instance.scene.clearColor = new Color4(0, 0, 0, 1); + //instance.initUI(); + //最后,将场景渲染出来 (重要,不可缺少) + instance.engine.runRenderLoop(function () { + if (instance.scene != null) { + instance.scene.render(); + } + }) + + // 监听浏览器改变大小的事件,通过调用engine.resize()来自适应窗口大小 + window.addEventListener("resize", function () { + if (instance != null && instance.engine != null) { + instance.engine.resize(); + } + }); + + let camera = new ArcRotateCamera("Camera", -Math.PI / 2, Math.PI / 2, 5, Vector3.Zero(), Photo360Tool.instance.scene); + camera.attachControl(canvas, true); + camera.inputs.attached.mousewheel.detachControl(); + } + else { + console.error("重复开启全景图"); + } + + //确保默认场景为主场景,而不是新创建的这个. 替换为virtual: true 设置。 + // EngineStore._LastCreatedScene = SceneManager.Instance.scene; + + Photo360Tool.instance.changePhoto(photoURL); + } + + static close() { + if (Photo360Tool.instance != null) { + Photo360Tool.instance.disposePhoto(); + Photo360Tool.instance = null; + } + } + + + initUI() { + let rootUI = AdvancedDynamicTexture.CreateFullscreenUI("UIRoot", undefined, this.scene);//UtilityLayerRenderer.DefaultUtilityLayer.utilityLayerScene + + this.loadingTxt = new TextBlock("loading", "加载中..."); + rootUI.addControl(this.loadingTxt); + this.loadingTxt.fontSize = "30px"; + this.loadingTxt.color = "white"; + this.loadingTxt.width = "200px"; + this.loadingTxt.height = "100px"; + + // this.scene.debugLayer.show(); + } + + changePhoto(photoURL: string) { + if (this.photo != null) { + this.photo.dispose(); + } + Photo360Tool.instance.photo = new PhotoDome( + "testdome", + photoURL, + { + resolution: 32, + size: 1000 + }, + Photo360Tool.instance.scene + ); + + + } + + disposePhoto() { + if (this.photo != null) { + this.photo.dispose(); + } + + this.scene.dispose(); + this.scene = null; + this.engine.dispose(); + this.engine = null; + } + +} \ No newline at end of file diff --git a/src/app/babylon/tool/pos-point-tool.ts b/src/app/babylon/tool/pos-point-tool.ts new file mode 100644 index 0000000..058f5da --- /dev/null +++ b/src/app/babylon/tool/pos-point-tool.ts @@ -0,0 +1,112 @@ +import { Mesh, Vector3 } from "@babylonjs/core"; +import { Button, Rectangle, StackPanel } from "@babylonjs/gui"; +import { SceneManager } from "../controller/scene-manager"; +import { UIManager } from "../controller/ui-manager"; +import { BabylonUIStyleTool } from "./babylon-ui-style-tool"; +import { GizmoTool } from "./gizmo-tool"; + +export class PosPointTool { + + static readonly c_key = "PosPoint"; + static instance: PosPointTool; + + mesh: Mesh; + pos: Vector3; + + uiRoot: Rectangle; + + //#region UI + initUI() { + let instance = this; + this.uiRoot = new Rectangle("PosPointTooUI"); + UIManager.Instance.uiRoot.addControl(this.uiRoot); + + BabylonUIStyleTool.setStyle_size(this.uiRoot, "40px", "20px"); + + let stack = new StackPanel("stack"); + this.uiRoot.addControl(stack); + stack.isVertical = false; + + let btn_add = Button.CreateSimpleButton("add", "+"); + stack.addControl(btn_add); + btn_add.background = BabylonUIStyleTool.c_color_blue; + btn_add.color = "white"; + btn_add.thickness = 0; + btn_add.onPointerClickObservable.add(() => { + instance.btn_add(); + }); + BabylonUIStyleTool.setStyle_size(btn_add, "20px", "20px"); + + let btn_reduce = Button.CreateSimpleButton("reduce", "-"); + stack.addControl(btn_reduce); + btn_reduce.background = BabylonUIStyleTool.c_color_red; + btn_reduce.color = "white"; + btn_reduce.thickness = 0; + btn_reduce.onPointerClickObservable.add(() => { + instance.btn_reduce(); + }); + BabylonUIStyleTool.setStyle_size(btn_reduce, "20px", "20px"); + + } + + showUI(show: boolean) { + this.uiRoot.isVisible = show; + this.uiRoot.linkWithMesh(this.mesh); + this.uiRoot.linkOffsetY = "-50px"; + } + //#endregion + + static get Instance() { + if (PosPointTool.instance == null) { + PosPointTool.instance = new PosPointTool(); + PosPointTool.instance.initUI(); + SceneManager.Instance.scene.onBeforeRenderObservable.add(PosPointTool.onUpdate); + GizmoTool.onGizmoAimMeshObservable.add((mesh) => { + if (mesh == null || !mesh.name.match(PosPointTool.c_key)) { + PosPointTool.attachMesh(null); + } + }); + } + + return PosPointTool.instance; + + } + + onAdd: () => void; + onReduce: () => void; + + static attachMesh(mesh: Mesh, pos?: Vector3, onAdd?: () => void, onReduce?: () => void) { + + + + PosPointTool.Instance.mesh = mesh; + PosPointTool.Instance.pos = pos; + PosPointTool.Instance.showUI(mesh != null); + + PosPointTool.Instance.onAdd = onAdd; + PosPointTool.Instance.onReduce = onReduce; + } + + + static onUpdate() { + if (PosPointTool.Instance.mesh != null) { + + } + } + + + //添加 + btn_add() { + if (this.onAdd) { + this.onAdd(); + } + } + + //减少 + btn_reduce() { + if (this.onReduce) { + this.onReduce(); + } + } + +} \ No newline at end of file diff --git a/src/app/babylon/tool/time-tool.ts b/src/app/babylon/tool/time-tool.ts new file mode 100644 index 0000000..f433ba4 --- /dev/null +++ b/src/app/babylon/tool/time-tool.ts @@ -0,0 +1,6 @@ + + +class TimeTool { + + +} \ No newline at end of file diff --git a/src/app/babylon/tool/ts-tool.ts b/src/app/babylon/tool/ts-tool.ts new file mode 100644 index 0000000..2d116ae --- /dev/null +++ b/src/app/babylon/tool/ts-tool.ts @@ -0,0 +1,26 @@ +export class TsTool { + //在数组中移除目标(不留空位) + static arrayRemove(array: any[], remove: any): boolean { + let index = array.indexOf(remove, 0); + if (index > -1) { + array.splice(index, 1); + return true; + } + else { + return false; + } + } + + //判断字符串source中是否包含某字符串aim + static stringContain(source: string, aim: string): boolean { + let result = source.indexOf(aim) != -1; + return result; + } + + //打印调用堆栈 + static trace() { + console.trace(); + } + + +} \ No newline at end of file diff --git a/src/app/babylon/view/building-window/building-create-window.ts b/src/app/babylon/view/building-window/building-create-window.ts new file mode 100644 index 0000000..df3a6ba --- /dev/null +++ b/src/app/babylon/view/building-window/building-create-window.ts @@ -0,0 +1,351 @@ +// import { Checkbox, Control, InputText, RadioButton, Rectangle, StackPanel, TextBlock } from "@babylonjs/gui"; +// import { DataManager, ModelChangeType } from "src/babylon/controller/data-manager"; +// import { Event_ModelInfoChange } from "src/babylon/controller/event-manager/events/event-modelinfo-change"; +// import { ServeManager } from "src/babylon/controller/serve-manager"; +// import { UIManager } from "src/babylon/controller/ui-manager"; +// import { BuildingData, BuildingType } from "src/babylon/model/data/institution/building/building-data"; +// import { BuildingPosType, ModelData } from "src/babylon/model/data/model-data/model-data"; +// import { ModelEditData } from "src/babylon/model/data/model-data/model-edit-data"; +// import { BuildingInfo } from "src/babylon/model/info/building/building-info"; +// import { ModelInfo_facility } from "src/babylon/model/info/model/model-info-facility"; +// import { BabylonUIStyleTool } from "src/babylon/tool/babylon-ui-style-tool"; +// import { TsTool } from "src/babylon/tool/ts-tool"; +// import { UIBase } from "../window-base/ui-base"; +// import { BuildingUIItem } from "./building-ui-item"; +// import { BuildingWindow } from "./building-window"; + +// //创建建筑物界面 +// export class BuildingCreateWindow extends UIBase { + +// buildingWindow: BuildingWindow; +// buildingData: BuildingData; + +// buildingUIItem: BuildingUIItem; +// isChangeType: boolean;//是修改模式 + +// needUpdateModel: boolean;//需要更新模型 + +// newName: string; + + +// onInit() { +// super.onInit(); + +// } + +// onOpen() { +// super.onOpen(); +// } + +// onClose() { +// super.onClose(); +// } + +// initUI() { +// let window = this; +// let isChangeType = this.isChangeType; + +// let outDoorData: ModelEditData = null; +// if (isChangeType) { +// this.buildingData = this.buildingUIItem.buildingInfo.buildingData; +// outDoorData = this.buildingUIItem.buildingInfo.buildingData.outdoorData; +// if (outDoorData == null) { +// this.buildingUIItem.buildingInfo.buildingData.outdoorData = new ModelEditData(); +// outDoorData = this.buildingUIItem.buildingInfo.buildingData.outdoorData; +// outDoorData.modelData = new ModelData("model0", "空模型", null, null, null); +// } + +// } +// else { +// this.buildingData = DataManager.createBulding("请输入", "key", BuildingType.Normal); +// outDoorData = this.buildingData.outdoorData; +// } + + +// this.root = new Rectangle("BuildingCreateWindow") +// UIManager.Instance.uiRoot.addControl(this.root); + +// BabylonUIStyleTool.setDefaultStyle_windowRoot(this.root, true); +// BabylonUIStyleTool.setStyle_size(this.root, "300px", "482px"); + +// let stackPanel = new StackPanel("Root"); +// BabylonUIStyleTool.setStyle_size(stackPanel, "250px", "440px"); +// this.root.addControl(stackPanel); +// stackPanel.isVertical = true; + +// let titleValue = isChangeType ? "修改建筑" : "新建建筑"; + +// let title = new TextBlock("title", titleValue); +// BabylonUIStyleTool.setStyle_size(title, "220px", "36px"); +// stackPanel.addControl(title); +// title.color = "black"; + +// let name = new TextBlock("name", "名称"); +// BabylonUIStyleTool.setStyle_size(name, "220px", "16px"); +// name.fontSize = "16px"; +// name.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// stackPanel.addControl(name); +// name.color = "black"; + +// let space = new Rectangle("space"); +// BabylonUIStyleTool.setStyle_size(space, "220px", "2px"); +// stackPanel.addControl(space); + +// let nameInput = BabylonUIStyleTool.createInputText("nameInput", stackPanel, "220px", "20px", "black", 0, undefined, BabylonUIStyleTool.c_color_gray, "black", BabylonUIStyleTool.c_color_gray); +// nameInput.inputText.onTextChangedObservable.add(() => { +// this.newName = nameInput.inputText.text; +// }) + +// let key = new TextBlock("key", "key"); +// BabylonUIStyleTool.setStyle_size(key, "220px", "16px"); +// key.fontSize = "16px"; +// key.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// stackPanel.addControl(key); +// key.color = "black"; + +// let keyInput = BabylonUIStyleTool.createInputText("keyInput", stackPanel, "220px", "20px", "black", 0, undefined, BabylonUIStyleTool.c_color_gray, "black", BabylonUIStyleTool.c_color_gray); +// keyInput.inputText.text = window.isChangeType ? window.buildingData.normalData.key : "defalult"; +// keyInput.inputText.onTextChangedObservable.add(() => { +// this.buildingData.normalData.key = keyInput.inputText.text; +// }) + + + +// let space2 = new Rectangle("space2"); +// BabylonUIStyleTool.setStyle_size(space2, "220px", "20px"); +// stackPanel.addControl(space2); + +// if (!isChangeType) { +// let type = new TextBlock("type", "建筑类型"); +// BabylonUIStyleTool.setStyle_size(type, "220px", "36px"); +// type.color = "black"; +// type.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// stackPanel.addControl(type); + +// let group = "buildingType"; +// let normalBuilding = BabylonUIStyleTool.createRadioButton("normalBuilding", stackPanel, group, "200px", "20px", BabylonUIStyleTool.c_color_blue, BabylonUIStyleTool.c_color_gray, "普通建筑", "150px", true, (select) => { +// if (select) { +// window.onSelectType(BuildingType.Normal); +// } + +// }); + +// let space3 = new Rectangle("space3"); +// BabylonUIStyleTool.setStyle_size(space3, "220px", "10px"); +// stackPanel.addControl(space3); + +// let environment = BabylonUIStyleTool.createRadioButton("environment", stackPanel, group, "200px", "20px", BabylonUIStyleTool.c_color_blue, BabylonUIStyleTool.c_color_gray, "环境", "150px", false, (select) => { +// if (select) { +// window.onSelectType(BuildingType.Environment); +// } + +// }); +// } + +// nameInput.inputText.text = window.buildingData.normalData.name; +// let buildingTitle = new TextBlock("buildingTitle", "模型:"); +// buildingTitle.color = "black"; +// BabylonUIStyleTool.setStyle_size(buildingTitle, "220px", "20px"); +// buildingTitle.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// stackPanel.addControl(buildingTitle); + +// let nowBuilding_name = new TextBlock("nowBuildingName", "模型名"); +// nowBuilding_name.fontSize = "16px"; +// nowBuilding_name.color = "black"; +// nowBuilding_name.alpha = 0.8; +// BabylonUIStyleTool.setStyle_size(nowBuilding_name, "220px", "20px"); +// nowBuilding_name.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// stackPanel.addControl(nowBuilding_name); + +// let input_buildingName = BabylonUIStyleTool.createInputText("input_buildingName", stackPanel, "220px", "18px"); +// input_buildingName.inputText.fontSize = "16px"; +// input_buildingName.bg.paddingLeft = "20px"; +// input_buildingName.inputText.text = "-空"; +// if (isChangeType && outDoorData.modelData != null && outDoorData.modelData.name != null) { +// input_buildingName.inputText.text = outDoorData.modelData.name; +// } +// input_buildingName.inputText.onTextChangedObservable.add(() => { +// outDoorData.modelData.name = input_buildingName.inputText.text; +// }); + + +// let nowBuilding_key = new TextBlock("nowBuildingKey", "文件名"); +// BabylonUIStyleTool.setStyle_size(nowBuilding_key, "220px", "20px"); +// nowBuilding_key.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// nowBuilding_key.color = "black"; +// nowBuilding_key.fontSize = "16px"; +// stackPanel.addControl(nowBuilding_key); + +// let txt_buildingKey = BabylonUIStyleTool.createInputText("txt_buildingKey", stackPanel, "220px", "20px", undefined, 0, undefined, undefined, undefined, undefined); + +// txt_buildingKey.bg.paddingLeft = "20px"; +// txt_buildingKey.inputText.fontSize = "16px"; +// if (isChangeType && outDoorData.modelData.key != null) { +// txt_buildingKey.inputText.text = outDoorData.modelData.key; +// } +// txt_buildingKey.inputText.onTextChangedObservable.add(() => { +// window.buildingData.outdoorData.modelData.key = txt_buildingKey.inputText.text; +// }) + +// let btn_changeModel = BabylonUIStyleTool.createBtn_OK("btn_createModel", "修改模型", "200px", "30px", "18px"); +// btn_changeModel.onPointerClickObservable.add(() => { +// window.onChangeModel(); +// }) +// stackPanel.addControl(btn_changeModel); + + + + +// let space5 = new Rectangle("space5"); +// BabylonUIStyleTool.setStyle_size(space5, "220px", "40px"); +// stackPanel.addControl(space5); + +// let btns = new StackPanel("btns"); +// BabylonUIStyleTool.setStyle_size(btns, "220px", "40px"); +// btns.isVertical = false; +// stackPanel.addControl(btns); + +// let btn_OK = BabylonUIStyleTool.createBtn_OK("OK", "确定", "100px", "36px", "18px"); +// btns.addControl(btn_OK); +// btn_OK.onPointerClickObservable.add(() => { +// window.onOK(); +// }) + +// let space4 = new Rectangle("space4"); +// BabylonUIStyleTool.setStyle_size(space4, "20px", "36px"); +// btns.addControl(space4); + +// let btn_cancle = BabylonUIStyleTool.createBtn_Cancel("cancel", "取消", "100px", "36px", "18px"); +// btns.addControl(btn_cancle); +// btn_cancle.onPointerClickObservable.add(() => { +// window.onCancel(); +// }); + +// if (this.isChangeType) { +// let btn_delete = BabylonUIStyleTool.createBtn_Delete("delete", "删", "30px", "30px", "18px"); +// this.root.addControl(btn_delete); +// btn_delete.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// btn_delete.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; +// btn_delete.onPointerClickObservable.add(() => { +// window.onBtn_delete(); +// }) +// } + +// } + +// //初始化新建 +// init(buildingWindow: BuildingWindow) { +// this.buildingWindow = buildingWindow; +// this.isChangeType = false; +// this.initUI(); +// } + +// //初始化修改 +// initChange(buildingWindow: BuildingWindow, buildingUIItem: BuildingUIItem) { +// this.buildingUIItem = buildingUIItem; +// this.buildingWindow = buildingWindow; +// this.isChangeType = true; +// this.initUI(); +// } + +// //选择建筑类型 +// onSelectType(buildingType: BuildingType) { + +// this.buildingData.buildingType = buildingType; +// // this.key = DataManager.institutionData.getNewKey(buildingType); +// console.log("选择建筑类型" + buildingType + "key =" + this.buildingData.normalData.key); +// } + + + +// //修改模型 +// onChangeModel() { +// console.log("修改模型"); + +// let normalData = this.buildingData.normalData; +// let resPath_out = DataManager.getResPath_building( +// DataManager.institutionData.normalData.key.toLowerCase(), +// normalData.key.toLocaleLowerCase(), +// BuildingPosType.OutDoor, +// this.buildingData.outdoorData.modelData.key +// ); +// console.log("新资源路径" + resPath_out); +// let instance = this; +// ServeManager.instance.openFileSelect(resPath_out, (name: string, path: string) => { +// if (TsTool.stringContain(name, ".gltf")) { +// this.buildingData.outdoorData.modelData.resName = name; +// this.buildingData.outdoorData.modelData.resPath = path; +// } +// instance.needUpdateModel = true; + +// }); +// } + +// //确定 +// onOK() { + +// if (this.buildingData.normalData.name == null) { +// alert("请输入名称"); +// } + +// else { +// console.log("修改模式" + this.isChangeType); +// if (this.isChangeType) { +// // let normalData = this.buildingUIItem.buildingInfo.buildingData.normalData; +// // normalData.name = this.buildingData.normalData.name; +// this.buildingUIItem.changeName(this.newName); +// // this.buildingUIItem.updateUI(); +// Event_ModelInfoChange.dispatch(this.buildingUIItem.buildingInfo.ModelInfo, ModelChangeType.Update); +// this.closeWindow(); +// } +// else { +// if (this.buildingData.buildingType == null) { +// alert("请选择建筑类型") +// } +// else { +// let result = this.buildingData; +// this.buildingData.normalData.name = this.newName; + +// if (result != null) { +// this.closeWindow(); +// console.log("=======addOneBuilding"); +// console.log(result); +// this.buildingWindow.addOneBuilding(result, -1); +// } +// } +// } +// } +// } + +// //取消 +// onCancel() { +// this.closeWindow(); + +// } + +// //删除 +// onBtn_delete() { + +// this.buildingWindow.deleteBuilding(this.buildingUIItem); +// this.closeWindow(); +// } + +// //关闭界面 +// closeWindow() { + +// if (this.isChangeType) { +// this.buildingUIItem.closeChangeWindow(); + +// console.log("需要修改模型" + this.needUpdateModel); +// if (this.needUpdateModel) { +// this.buildingUIItem.buildingWindow.updateBuildingModel(this.buildingUIItem.buildingInfo, true); +// } +// } +// else { +// this.buildingWindow.closeCreateWindow(); + +// } +// } +// } + + diff --git a/src/app/babylon/view/building-window/building-ui-item.ts b/src/app/babylon/view/building-window/building-ui-item.ts new file mode 100644 index 0000000..85b2bdf --- /dev/null +++ b/src/app/babylon/view/building-window/building-ui-item.ts @@ -0,0 +1,212 @@ + + +import { SceneManager } from "../../controller/scene-manager"; +import { IndoorStatus } from "../../controller/status/indoor-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { BuildingType, BuildingData_Normal } from "../../model/data/institution/building/building-data"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { ModelInfo_building } from "../../model/info/model/model-info-building"; +import { BabylonTool } from "../../tool/babylon-tool"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { MarkWindow } from "../mark-window/mark-window"; +// import { BuildingCreateWindow } from "./building-create-window"; +import { BuildingWindow } from "./building-window"; + +//建筑UI Item +export class BuildingUIItem { + buildingInfo: BuildingInfo; + buildingWindow: BuildingWindow; + + + constructor(buildingInfo: BuildingInfo, buildingWindow: BuildingWindow) { + + this.buildingWindow = buildingWindow; + this.buildingInfo = buildingInfo; + + } + + dispose() { + + this.buildingInfo.dispose(); + } + + //#region 前端对接 + + /** + * 获取建筑ID + */ + getBuildingID(): string { + return this.buildingInfo.buildingData.normalData.key; + } + + /** + * 获取建筑显示的名称 + */ + getBuildingName(): string { + return this.buildingInfo.buildingData.normalData.name; + } + + + /** + * 修改建筑名称 + */ + setBuildingName(newName: string) { + this.changeName(newName); + } + + + /** + * 获取建筑类型 + */ + getBuildingType(): BuildingType { + return this.buildingInfo.buildingData.buildingType; + } + + /** + * 获取室内数据 (null ,表示没有室内) + */ + getAllIndoorData(): ModelEditData[] { + if (this.buildingInfo.buildingData instanceof BuildingData_Normal) { + let buildingData: BuildingData_Normal = this.buildingInfo.buildingData as BuildingData_Normal; + + let result = buildingData.indoorsData; + return result; + } + else { + return null; + } + } + + /** + * 进入室内 + * 来自ui的切换(不是因为切换沙盘节点而导致的切层) + */ + enterIndoor(key: string = null, fromUI: boolean = true) { + GizmoTool.onPickMeshInfoObservable.notifyObservers(null); + IndoorStatus.changeStatusFromUI = fromUI; + + if (fromUI && MarkWindow.instance != null && MarkWindow.instance.isShow && MarkWindow.instance.currentMarkNodeInfo != null) { + if (key == null) { + let indoorsData = (this.buildingInfo.buildingData as BuildingData_Normal).indoorsData; + if (indoorsData != null && indoorsData.length > 0) { + key = indoorsData[0].modelData.key; + } + else { + //ThreeDimensionalHomeComponent.instance.openSnackBar("暂无室内信息"); + // alert("暂无室内信息"); + return; + } + + } + + MarkWindow.instance.changeBuilding(false, this.buildingInfo.buildingData.normalData.key, key); + } + else { + console.log("进入室内"); + let indoorStatus = StatusManager.enterStatus(IndoorStatus); + indoorStatus.init(this.buildingInfo, key); + } + + + } + + /** + * 修改模型 + * @param buildingData + */ + changeModel(file: File[]) { + + this.buildingWindow.changeModel(file, this.buildingInfo.buildingData); + + } + + /** + * 关联预案管理平台的建筑id + * @param id + */ + linkingBuildingID(id: string) { + this.buildingInfo.buildingData.buildingIDFromPlatform = id; + } + + /** + * 读取关联的预案管理平台的建筑id + */ + getlinkedBuildingID(): string { + return this.buildingInfo.buildingData.buildingIDFromPlatform; + } + + //#endregion + + + //#region 外部公有 + + /** + * 选中 + */ + select() { + this.buildingWindow.onChangeCurrentBuildingItem(this); + } + + /** + * 当选中时的表现 + * @param select true表示选中 + */ + onSelect(select: boolean, animMove = true) { + if (select) { + if (this.buildingInfo.ModelInfo != null && this.buildingInfo.ModelInfo.modelBox != null) { + GizmoTool.onPickMeshInfoObservable.notifyObservers(this.buildingInfo.ModelInfo); + //BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, this.buildingInfo.ModelInfo.modelBox, animMove); + } + } + else { + if (this.buildingInfo != null) { + GizmoTool.leaveTheGizmoAim(this.buildingInfo.ModelInfo); + } + + } + } + + /** + * 相机注释、聚焦 + */ + lookAt(anim: boolean = true) { + if (this.canLookAt()) { + BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, this.buildingInfo.ModelInfo.modelBox, anim); + } + } + + /** + * 是否可以聚焦 + */ + canLookAt(): boolean { + let result = this.buildingInfo != null && this.buildingInfo.ModelInfo != null && this.buildingInfo.ModelInfo.modelBox != null; + + return result; + + } + + /** + * 设置模型的显示状态 + */ + setModelEnable(show: boolean) { + if (this.buildingInfo != null) { + this.buildingInfo.setEnable(show); + } + } + + + //#endregion + + //#region 内部私有 + + //修改建筑名称 + private changeName(name: string) { + this.buildingInfo.buildingData.normalData.name = name; + if (this.buildingInfo.ModelInfo != null) { + (this.buildingInfo.ModelInfo as ModelInfo_building).updateName(name); + } + } + + //#endregion +} \ No newline at end of file diff --git a/src/app/babylon/view/building-window/building-window.ts b/src/app/babylon/view/building-window/building-window.ts new file mode 100644 index 0000000..f4d5f5d --- /dev/null +++ b/src/app/babylon/view/building-window/building-window.ts @@ -0,0 +1,499 @@ + +import { DataManager } from "../../controller/data-manager"; +import { InfoManager } from "../../controller/info-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { ServeManager } from "../../controller/serve-manager"; +import { BuildingStatus } from "../../controller/status/building-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { BuildingData_Normal, BuildingData_Environment, BuildingData_ChemicalPlant, BuildingType, BuildingData } from "../../model/data/institution/building/building-data"; +import { BuildingPosType, ModelType } from "../../model/data/model-data/model-data"; +import { FacilityType } from "../../model/data/model-data/model-data-facility"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { BuildingInfo_ChemicalPlant } from "../../model/info/building/building-info-chemicalplant"; +import { BuildingInfo_Environment } from "../../model/info/building/building-info-environment"; +import { BuildingInfo_Normal } from "../../model/info/building/building-info-normal"; +import { ModelInfo_building } from "../../model/info/model/model-info-building"; +import { TsTool } from "../../tool/ts-tool"; +import { UIBase } from "../window-base/ui-base"; +import { BuildingUIItem } from "./building-ui-item"; + +//建筑界面 +export class BuildingWindow extends UIBase { + buldingStatus: BuildingStatus; + + buildingUIItems: BuildingUIItem[] = [];//所有建筑UI + + currentBuidngItem: BuildingUIItem; //当前正在操作的建筑 + + // three: ThreeDimensionalHomeComponent;//前端组件 + + + + + //#region 与前端对接部分 + + /** + * UI上添加一个建筑item + * @param buildingData 建筑data数据 + * @param index 序号 + * @param onSuccess 成功的回调 + */ + createOneBuildingItem(buildingData: BuildingData_Normal | BuildingData_Environment | BuildingData_ChemicalPlant, index: number, onSuccess?: (buildingUIItem: BuildingUIItem, index: number) => void) { + let buildingInfo: BuildingInfo_Normal | BuildingInfo_Environment | BuildingInfo_ChemicalPlant; + switch (buildingData.buildingType) { + case BuildingType.Normal: + buildingInfo = new BuildingInfo_Normal(buildingData as BuildingData_Normal, null); + break; + case BuildingType.Environment: + buildingInfo = new BuildingInfo_Environment(buildingData, null); + break; + case BuildingType.ChemicalPlant: + buildingInfo = new BuildingInfo_ChemicalPlant(buildingData, null); + break; + } + // console.log("初始化建筑info"); + // console.log(buildingInfo.buildingData); + let uiItem = this.addBuildingItem(buildingInfo); + + if (buildingData.outdoorData != null && buildingData.outdoorData.modelData != null && buildingData.outdoorData.modelData.resName != null) { + this.updateBuildingModel(buildingInfo, false, () => { + buildingInfo.initFacility(); + BuildingStatus.enterSuccessObservable.notifyObservers(uiItem); + if (onSuccess) { + onSuccess(uiItem, index); + } + }) + } + } + + //删除建筑 + deleteBuilding(buidlingUIItem: BuildingUIItem) { + // console.log("删除建筑" + buidlingUIItem.buildingInfo.buildingData.normalData.key); + DataManager.deleteOneBuildingData(buidlingUIItem.buildingInfo.buildingData.buildingType, buidlingUIItem.buildingInfo.buildingData.normalData.key); + for (let i = 0; i < this.buildingUIItems.length; i++) { + if (this.buildingUIItems[i] == buidlingUIItem) { + buidlingUIItem.dispose(); + TsTool.arrayRemove(this.buildingUIItems, buidlingUIItem); + break; + } + } + } + + /** + * 改变模型 + * @param file + */ + changeModel(file: File[], buildingData: BuildingData) { + if (file == null || file.length == 0) { + return; + } + console.log("修改模型"); + + buildingData.outdoorData.modelData.key = buildingData.normalData.key; + buildingData.outdoorData.modelData.name = buildingData.normalData.key; + + let normalData = buildingData.normalData; + let resPath_out = DataManager.getResPath_building( + DataManager.institutionData.normalData.key.toLowerCase(), + normalData.key.toLocaleLowerCase(), + BuildingPosType.OutDoor, + buildingData.normalData.key + ); + // console.log("新资源路径" + resPath_out); + let buildingWindow = this; + + let manifestFile: File = null; + if (buildingData.outdoorData.modelData.resName != null) { + + manifestFile = DataManager.createManifestFile(buildingData.outdoorData.modelData); + file.push(manifestFile); //临时关闭缓存文件 + } + + + ServeManager.instance.uploadFile(0, file, resPath_out, (name: string, path: string, currentfile) => { + if (TsTool.stringContain(name, ".gltf")) { + if (TsTool.stringContain(name, ".gltf.manifest")) { + //缓存文件,提取版本号 + DataManager.readFile_manifest(currentfile, (version: number) => { + buildingData.outdoorData.modelData.version = version; + // console.log("设置version" + version); + }); + } + else { + buildingData.outdoorData.modelData.resName = name; + buildingData.outdoorData.modelData.resPath = path; + if (manifestFile == null) { + manifestFile = DataManager.createManifestFile(buildingData.outdoorData.modelData); + file.push(manifestFile); + }//临时关闭缓存文件 + } + + } + } + , () => { + let buildingInfo = buildingWindow.getBuildingInfo(buildingData.normalData.key); + buildingWindow.updateBuildingModel(buildingInfo, true); + // buildingWindow.three = ThreeDimensionalHomeComponent.instance; + // buildingWindow.three.maskLayerService.sendMessage(false) //关闭遮罩层 + }); + } + + /** + * 获取目标建筑中,室内的某类设备数目 + */ + getNormalBuildingIndoorFacilitys(buildingUIItem: BuildingUIItem, facilityType: FacilityType) { + let result = 0; + + if (buildingUIItem.buildingInfo.buildingData.buildingType != BuildingType.Normal) { + //不是普通建筑,没有室内 + } + else { + let indoorData: ModelEditData[] = (buildingUIItem.buildingInfo.buildingData as BuildingData_Normal).indoorsData; + if (indoorData != null) { + for (let i = 0; i < indoorData.length; i++) { + let facilitiesByType = indoorData[i].getFacilitiesByType(facilityType); + if (facilitiesByType != null) { + result += facilitiesByType.length; + } + + } + } + + } + return result; + } + + /** + * 进入第一个具有本设备的室内楼层 + */ + changeToFirstIndoorByFacility(buildingUIItem: BuildingUIItem, facilityType: FacilityType) { + + let result = false;//是否成功找到并进入某室内层 + let num = 0; + + if (buildingUIItem.buildingInfo.buildingData.buildingType != BuildingType.Normal) { + //不是普通建筑,没有室内 + + } + else { + let indoorData: ModelEditData[] = (buildingUIItem.buildingInfo.buildingData as BuildingData_Normal).indoorsData; + for (let i = 0; i < indoorData.length; i++) { + let facilitiesByType = indoorData[i].getFacilitiesByType(facilityType); + if (facilitiesByType != null) { + num += facilitiesByType.length; + } + + + if (num > 0) { + result = true; + buildingUIItem.enterIndoor(indoorData[i].modelData.key, true); + break; + } + + } + } + + return result; + } + + + //#endregion + + + //#region 生命周期 + onInit() { + super.onInit(); + + this.buldingStatus = StatusManager.getStatus(BuildingStatus); + + + this.initBuildings();//创建每一个建筑buildingItem + + + + // this.three = ThreeDimensionalHomeComponent.instance; + // this.three.getAllBuilding(this); + + } + + onShow() { + this.showModel(true); + + super.onShow(); + } + onHide() { + this.showModel(false); + super.onHide(); + } + + //#endregion + + + //#region 外部公有 + + /** + * 清空建筑上的设备实例 + * @param buildingInfo + */ + clearFacilityInfos(buildingInfo: BuildingInfo) { + + if (buildingInfo.ModelInfo != null) { + for (let i = 0; i < buildingInfo.ModelInfo.facilityInfos.length; i++) { + buildingInfo.ModelInfo.facilityInfos[i].dispose(); + } + buildingInfo.ModelInfo.facilityInfos = []; + } + } + + /** + * 显示或隐藏建筑上的设备icon + * @param buildingInfo + * @param show + */ + showFacilityInfosIcon(buildingInfo: BuildingInfo, show: boolean) { + if (buildingInfo.ModelInfo != null) { + buildingInfo.ModelInfo.showFacilityUI(show); + } + } + + /** + * 根据buildingInfo找到item,然后模拟选中 + * @param buildingInfo 建筑信息 + */ + changeCurrentBuildingInfo(modelInfo: ModelInfo_building) { + + let item: BuildingUIItem = null; + for (let i = 0; i < this.buildingUIItems.length; i++) { + if (this.buildingUIItems[i].buildingInfo.ModelInfo == modelInfo) { + item = this.buildingUIItems[i]; + break; + } + } + + + //this.onChangeCurrentBuildingItem(item); + + // this.three.selectLeftBuilding(item); + } + + /** + * 改变当前操作建筑目标 + * @param buidlingUIItem 新选中的目标 + */ + onChangeCurrentBuildingItem(buidlingUIItem: BuildingUIItem, animMove = true) { + if (this.currentBuidngItem != null && this.currentBuidngItem != buidlingUIItem) { + this.currentBuidngItem.onSelect(false); + } + + this.currentBuidngItem = buidlingUIItem; + this.currentBuidngItem.onSelect(true, animMove); + + this.buldingStatus.changeCurrentBuilding(buidlingUIItem.buildingInfo); + } + + /** + * 查询buildingKey + * @param key + */ + public getBuildingInfo(key: string): BuildingInfo { + for (let i = 0; i < this.buildingUIItems.length; i++) { + if (this.buildingUIItems[i].buildingInfo.buildingData.normalData.key == key) { + return this.buildingUIItems[i].buildingInfo; + } + } + return null; + } + + /** + * 查询UIItem + * @param key + */ + public getBuildingUIItem(key: string) { + for (let i = 0; i < this.buildingUIItems.length; i++) { + if (this.buildingUIItems[i].buildingInfo.buildingData.normalData.key == key) { + return this.buildingUIItems[i]; + } + } + return null; + } + + /** + * 更新建筑模型 + * @param buildingInfo + * @param updateFacility + * @param onSuccess + */ + public updateBuildingModel(buildingInfo: BuildingInfo, updateFacility: boolean, onSuccess?: () => void) { + if (buildingInfo == null) { + return; + } + if (buildingInfo.ModelInfo != null) { + buildingInfo.ModelInfo.dispose(); + } + + + SceneManager.createModel(ModelType.Building, buildingInfo.buildingData.outdoorData.modelData, true, true, "Building", (newMesh, box, modelInfo) => { + buildingInfo.ModelInfo = modelInfo as ModelInfo_building; + buildingInfo.ModelInfo.updateName(buildingInfo.buildingData.normalData.name); + if (updateFacility) { + InfoManager.createFacilityInfos(buildingInfo.buildingData.outdoorData, buildingInfo); + } + if (buildingInfo instanceof BuildingInfo_Environment) { + buildingInfo.updateFuGaiCeng(); + } + + if (onSuccess) { + onSuccess(); + } + }); + } + //#endregion + + + //#region 内部私有 + + + //填充建筑列表 + private initBuildings() { + + + //因为babylon内对indexDB的封装使用有问题,在用户第一次使用时触发了创建数据库操作,导致我们同时调用多个加载方法时报错 + //解决策略是:如果发现有多个模型要加载,则先加载第一个模型,保证indexDB数据库正常建立, 第一个加载完成后,在加载剩余模型 + + BuildingStatus.startEnterObservable.notifyObservers(null); + + let instance = this; + let firstItem; //第一个要加载的模型 + let firstType: BuildingType; + + let allModelNumber = 0; + + + let buildingDatas_Environment = DataManager.getBuildingDataListByType(BuildingType.Environment); + if (buildingDatas_Environment != null) { + allModelNumber += buildingDatas_Environment.length; + if (buildingDatas_Environment.length > 0) { + firstItem = buildingDatas_Environment[0]; + firstType = BuildingType.Environment; + } + } + + let buildingDatas_mormal = DataManager.getBuildingDataListByType(BuildingType.Normal); + if (buildingDatas_mormal != null) { + allModelNumber += buildingDatas_mormal.length; + if (buildingDatas_mormal.length > 0) { + firstItem = buildingDatas_mormal[0]; + firstType = BuildingType.Normal; + } + } + + if (allModelNumber > 1) { + + if (firstType == BuildingType.Environment) { + instance.createOneBuildingItem(firstItem, 0, (uiItem, index) => { + instance.onChangeCurrentBuildingItem(uiItem, false); + uiItem.lookAt(false); + if (buildingDatas_Environment.length > 1) { + instance.addBuildings(BuildingType.Environment, 1); + } + + instance.addBuildings(BuildingType.Normal, 0); + + }); + + } + else { + instance.createOneBuildingItem(firstItem, 0, (uiItem, index) => { + instance.onChangeCurrentBuildingItem(uiItem, false); + uiItem.lookAt(false); + if (buildingDatas_mormal.length > 1) { + instance.addBuildings(BuildingType.Normal, 1); + } + instance.addBuildings(BuildingType.Environment, 0); + + + }); + } + + } + else { + + instance.addBuildings(BuildingType.Normal, 0, (uiItem, index) => { + if (index == 0 && uiItem.buildingInfo.isEnable) { + instance.onChangeCurrentBuildingItem(uiItem, false); + uiItem.lookAt(false); + // console.log("默认选中" + uiItem.buildingInfo.buildingData.normalData.key); + } + }); + + instance.addBuildings(BuildingType.Environment, 0); + } + } + + + + //初始化建筑显示(根据类别) + private addBuildings(buildingType: BuildingType, startIndex: number, onSuccess?: (buildingUIItem: BuildingUIItem, index: number) => void) { + let index = startIndex; + + let buildingDatas = DataManager.getBuildingDataListByType(buildingType); + // console.log(buildingDatas); + while (buildingDatas != null && index < buildingDatas.length) { + let l_index = index; + let buildingData = buildingDatas[l_index]; + this.createOneBuildingItem(buildingData, l_index, onSuccess); + + index++; + } + + } + + + + //添加一个item到界面中 + private addBuildingItem(buildingInfo: BuildingInfo): BuildingUIItem { + let buildingItem = new BuildingUIItem(buildingInfo, this); + this.buildingUIItems.push(buildingItem); + + return buildingItem; + } + + + + /** + * 隐藏或展示模型 + * @param show true-表示展示 + */ + private showModel(show: boolean) { + for (let i = 0; i < this.buildingUIItems.length; i++) { + + //周围环境,不隐藏(也就不用再显示) + if (this.buildingUIItems[i].buildingInfo.ModelInfo.buildingType == BuildingType.Environment) { + (this.buildingUIItems[i].buildingInfo as BuildingInfo_Environment).updateFuGaiCeng(); + if (show) { //切换到室外时,根据选中状态恢复设备UI + if (this.currentBuidngItem == this.buildingUIItems[i]) { + this.buildingUIItems[i].buildingInfo.ModelInfo.showFacilityUI(show); + } + else { + this.buildingUIItems[i].buildingInfo.ModelInfo.showFacilityUI(false); + } + this.buildingUIItems[i].buildingInfo.ModelInfo.showFollowUI(true);//环境的名称UI 不显示 + } + else { //切换到室内时,显示环境的设备UI + this.buildingUIItems[i].buildingInfo.ModelInfo.showFacilityUI(false);//(感觉太乱,暂时取消) + this.buildingUIItems[i].buildingInfo.ModelInfo.showFollowUI(false);//环境的名称UI 不显示 + } + } + else { // 建筑,正常显隐 + this.buildingUIItems[i].setModelEnable(show); + } + // if (this.buildingUIItems[i].buildingInfo != null) { + // this.buildingUIItems[i].buildingInfo.setEnable(show); + // } + } + } + //#endregion + + +} \ No newline at end of file diff --git a/src/app/babylon/view/dialog-window/dialog-window.ts b/src/app/babylon/view/dialog-window/dialog-window.ts new file mode 100644 index 0000000..347be67 --- /dev/null +++ b/src/app/babylon/view/dialog-window/dialog-window.ts @@ -0,0 +1,131 @@ +// import { Button, Control, Rectangle, TextBlock } from "@babylonjs/gui"; +// import { ThreeDimensionalHomeComponent } from "src/app/gis/three-dimensional-home/three-dimensional-home.component"; +// import { UIManager } from "src/babylon/controller/ui-manager"; +// import { BabylonUIStyleTool } from "src/babylon/tool/babylon-ui-style-tool"; +// import { UIBase } from "../window-base/ui-base"; + +// //对话框 +// export class DialogWindow extends UIBase { +// title: string;//标题 +// content: string;//内容描述 + +// okText: string;//确定按钮上的文字 +// okCallBack?: () => void; //确定按钮的回调 +// cancelText: string;//取消按钮上的文字 +// cancelCallBack?: () => void;//取消按钮的回调 + +// static OpenDialog(title: string, content: string, okText: string, okCallBack?: () => void, cancelText?: string, cancelCallBack?: () => void) { +// let result: DialogWindow = UIManager.open(DialogWindow); + +// result.initInfo(title, content, okText, okCallBack, cancelText, cancelCallBack); +// result.initUI(); + +// return result; + +// } + +// onInit() { +// super.onInit(); + +// } + +// onOpen() { +// super.onOpen(); +// } + +// onClose() { +// super.onClose(); + +// } + +// //初始化信息 +// initInfo(title: string, content: string, okText: string, okCallBack?: () => void, cancelText?: string, cancelCallBack?: () => void) { +// this.title = title; +// this.content = content; +// this.okText = okText; +// this.okCallBack = okCallBack; +// this.cancelText = cancelText; +// this.cancelCallBack = cancelCallBack; +// } + +// //初始化界面 +// initUI() { +// this.root = new Rectangle("DialogWindow"); +// this.root.zIndex = 900; +// UIManager.Instance.uiRoot.addControl(this.root); +// this.root.width = "200px"; +// this.root.height = "150px"; +// this.root.background = UIBase.color_gray; +// this.root.thickness = 0; +// this.root.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; + +// let ui_title = new TextBlock("title"); +// this.root.addControl(ui_title); +// ui_title.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; +// ui_title.height = "30px"; +// ui_title.text = this.title; +// ui_title.fontSize = 22; +// ui_title.color = "white"; + +// let ui_content = new TextBlock("content"); +// this.root.addControl(ui_content); +// ui_content.width = "180px"; +// ui_content.height = "100px"; +// ui_content.text = this.content; +// ui_content.color = "white"; +// ui_content.textWrapping = true; + +// let btn_ok = Button.CreateSimpleButton("btn_ok", this.okText); +// this.root.addControl(btn_ok); +// btn_ok.width = "90px"; +// btn_ok.height = "30px"; +// btn_ok.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// btn_ok.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; +// btn_ok.paddingLeft = "20px"; +// btn_ok.background = BabylonUIStyleTool.c_color_green; +// btn_ok.textBlock.color = "white"; +// btn_ok.thickness = 0; +// btn_ok.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; +// btn_ok.onPointerClickObservable.add(() => { +// this.onOK(this.okCallBack); +// }); + +// let btn_Cancel = Button.CreateSimpleButton("btn_cancel", this.cancelText); +// this.root.addControl(btn_Cancel); +// btn_Cancel.width = "90px"; +// btn_Cancel.height = "30px"; +// btn_Cancel.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; +// btn_Cancel.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; +// btn_Cancel.paddingRight = "20px"; +// btn_Cancel.background = UIBase.color_red; +// btn_Cancel.color = "white"; +// btn_Cancel.thickness = 0; +// btn_Cancel.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; +// btn_Cancel.onPointerClickObservable.add(() => { +// this.onConcel(this.cancelCallBack); +// }); + +// } + +// //确定按钮回调 +// onOK(okCallBack?: () => void) { +// if (okCallBack != null) { +// okCallBack(); +// } + +// this.onClickBtn(); +// } +// //取消按钮回调 +// onConcel(cancelCallBack?: () => void) { +// if (cancelCallBack != null) { +// cancelCallBack(); +// } +// this.onClickBtn(); +// } + +// //按钮统一行为 +// onClickBtn() { +// UIManager.close(this); +// } + +// } diff --git a/src/app/babylon/view/facility-window/facility-ui-item.ts b/src/app/babylon/view/facility-window/facility-ui-item.ts new file mode 100644 index 0000000..f2f9f96 --- /dev/null +++ b/src/app/babylon/view/facility-window/facility-ui-item.ts @@ -0,0 +1,90 @@ +import { AbstractMesh } from "@babylonjs/core"; +import { Button, Rectangle } from "@babylonjs/gui"; +import { ConfigManager } from "../../controller/config-manager"; +import { ModeManager, ModeType } from "../../controller/mode-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { ModelType } from "../../model/data/model-data/model-data"; +import { ModelData_facility, FacilityShowType } from "../../model/data/model-data/model-data-facility"; +import { BabylonTool } from "../../tool/babylon-tool"; +import { LoadTool } from "../../tool/load-tool"; +import { MeshPoolInfo, MeshPool } from "../../tool/mesh-pool"; + +import { FacilityInfoInSceneWindow } from "../facilityinfoinscene-window/facilityinfoinscene-window"; +import { FacilityWindow } from "./facility-window"; + +//设施UI item +export class FacilityUIItem { + facilityData: ModelData_facility; + meshPrefab: AbstractMesh; + meshPoolInfo: MeshPoolInfo; + constructor(facilityData: ModelData_facility, root: Rectangle, button: Button) { + this.facilityData = facilityData; + let instance = this; + if (facilityData.getShowtype() == FacilityShowType.ModelAndTag) { + instance.meshPoolInfo = MeshPool.importMesh(ModelType.Facility, facilityData, true, true, LoadTool.c_tag_facilityPrefab, (mesh, meshes, result: MeshPoolInfo) => { + instance.meshPrefab = mesh; + mesh.name = "pfb_" + this.facilityData.key; + mesh.setEnabled(false); + result.modelInfo.showFollowUI(false); + if (!SceneManager.s_openLight) { + BabylonTool.setMatToUnlit(meshes, true); + } + }) + } + + } + + //#region 前端对接 + + //获取图片URL + getIconURL() { + return ConfigManager.getFacilityIconUrl(this.facilityData.facilityType, this.facilityData.posType) + } + + //获取图片key + getIconID() { + return this.facilityData.key + } + + //获取设备中文名 + getIconName() { + + return this.facilityData.name + } + + //取消选择 当前设备 + unSelect() { + FacilityWindow.instance.clearCurrentFacility(); + } + + /** + * 选中当前设备 + */ + select() { + FacilityWindow.instance.onClickFacilityBtn(this); + } + + + + + //#endregion + + + + //选中时的表现 + onSelect(select: boolean) { + if (ModeManager.currentMode == ModeType.Look) //只在查看模式下生效 + { + FacilityInfoInSceneWindow.instance.showFacilityByType(this.facilityData.facilityType, select); + } + } + + dispose() { + if (this.meshPoolInfo != null) { + //MeshPool.disposeMesh(this.meshPoolInfo); + this.meshPoolInfo.dispose(); + this.meshPoolInfo = null; + } + } + +} \ No newline at end of file diff --git a/src/app/babylon/view/facility-window/facility-window.ts b/src/app/babylon/view/facility-window/facility-window.ts new file mode 100644 index 0000000..08e88d1 --- /dev/null +++ b/src/app/babylon/view/facility-window/facility-window.ts @@ -0,0 +1,521 @@ +import { + EventState, + Mesh, + MeshBuilder, + PointerEventTypes, + PointerInfo, + Vector3, +} from '@babylonjs/core'; +import { + Control, + Image, + Rectangle, +} from '@babylonjs/gui'; +import { ConfigManager } from '../../controller/config-manager'; +import { DataManager, ModelChangeType } from '../../controller/data-manager'; +import { Event_ChangeFacility } from '../../controller/event-manager/events/event-change-facility'; +import { InfoManager } from '../../controller/info-manager'; +import { ModeManager, ModeType } from '../../controller/mode-manager'; +import { SceneManager } from '../../controller/scene-manager'; +import { BuildingStatus } from '../../controller/status/building-status'; +import { IndoorStatus } from '../../controller/status/indoor-status'; +import { StatusManager } from '../../controller/status/status-manager'; +import { UIManager } from '../../controller/ui-manager'; +import { FacilityPosType, ModelData_facility, FacilityShowType } from '../../model/data/model-data/model-data-facility'; +import { BuildingInfo } from '../../model/info/building/building-info'; +import { AreaInfo } from '../../model/info/model/facilityinfo-tool/facility-area'; +import { GdInfo } from '../../model/info/model/facilityinfo-tool/facility-gd'; +import { ModelInfo_facility } from '../../model/info/model/model-info-facility'; +import { BabylonTool } from '../../tool/babylon-tool'; +import { BabylonUIStyleTool } from '../../tool/babylon-ui-style-tool'; +import { GizmoTool } from '../../tool/gizmo-tool'; + +import { CopyFacilityInfo, FacilityInfoInSceneWindow } from '../facilityinfoinscene-window/facilityinfoinscene-window'; +import { ToolbarWindow } from '../toolbar-window/toobar-window'; +import { UIBase } from '../window-base/ui-base'; +import { FacilityUIItem } from './facility-ui-item'; + +//设备界面 +export class FacilityWindow extends UIBase { + + + // three: ThreeDimensionalHomeComponent;//前端组件 + + allFacilityUIItemes: FacilityUIItem[] = []; + + static s_currentFacilityItem: FacilityUIItem; + static instance: FacilityWindow; + + createIconRoot: Rectangle;//创建状态的跟随icon + createIcon: Image; + static readonly c_createIcon_width = 40; + + createIndex = 0; //临时的创建序号 + + onInit() { + FacilityWindow.instance = this; + super.onInit(); + + SceneManager.Instance.scene.onBeforeRenderObservable.add(this.onUpdate); + + + this.initPickEvent(); + } + + onOpen() { + super.onOpen(); + } + + onClose() { + super.onClose(); + } + + onUpdate() { + FacilityWindow.instance.createIconFollow(); + } + + + /** + * 更新创建状态指示icon + */ + updateCreateIcon() { + + if (ModeManager.currentMode == ModeType.Look)//查看模式无效 + { + return; + } + if (this.createIconRoot == null) { + this.createIconRoot = new Rectangle("CreateFacilityIcon"); + this.createIconRoot.clipChildren = false; + UIManager.Instance.uiRoot.addControl(this.createIconRoot); + this.createIconRoot.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + this.createIconRoot.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + BabylonUIStyleTool.setStyle_size(this.createIconRoot, FacilityWindow.c_createIcon_width + "px", "70px"); + this.createIconRoot.thickness = 0; + + let line = new Rectangle("line"); + this.createIconRoot.addControl(line); + line.width = "3px"; + line.thickness = 0; + line.background = BabylonUIStyleTool.c_color_blue; + line.shadowBlur = 5; + line.shadowColor = BabylonUIStyleTool.c_color_blue; + + this.createIcon = new Image("createIcon"); + this.createIconRoot.addControl(this.createIcon); + this.createIcon.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + BabylonUIStyleTool.setStyle_size(this.createIcon, FacilityWindow.c_createIcon_width + "px", FacilityWindow.c_createIcon_width + "px"); + } + + if (FacilityWindow.s_currentFacilityItem != null) { + let imageURL = FacilityWindow.s_currentFacilityItem.getIconURL(); + if (this.createIcon.source != imageURL) { + this.createIcon.source = imageURL; + // this.createIcon.sourceLeft = 50.5; + + } + + } + + + + } + + /** + * 创建指示器跟随 + */ + createIconFollow() { + if (this.createIconRoot != null) { + if (FacilityWindow.s_currentFacilityItem == null) { + this.createIconRoot.isVisible = false; + } + else { + this.createIconRoot.isVisible = true; + this.createIconRoot.left = SceneManager.Instance.scene.pointerX - FacilityWindow.c_createIcon_width * 0.5; + this.createIconRoot.top = SceneManager.Instance.scene.pointerY - 40 - ConfigManager.c_size_facilityIconSize; + + } + } + } + + //更新室内或室外的设备信息 + updateAllFacilities(facilityPosType: FacilityPosType) { + this.clearAllFacilityUIItemes(); + this.clearCurrentFacility(); + + let facilities: ModelData_facility[]; + + if (facilityPosType == FacilityPosType.Indoor) { + facilities = DataManager.allFacilityData.indoor; + } else { + // console.log("=====updateAllFacilities====="); + // console.log(DataManager.allFacilityData); + facilities = DataManager.allFacilityData.outdoor; + } + + + let instance = this; + //为了避免多个模型同时加载、导致indexDB创建冲突,所以先加载一个,保证indexDB创建完成 + BabylonTool.importMeshSync(null, "assets/facilities/outdoor/gd/", "GD.gltf", undefined, "GD_indexDB", (meshes) => { + meshes[0].dispose(); + for (let i = 0; i < facilities.length; i++) { + + let facilityUIItem: FacilityUIItem = new FacilityUIItem( + facilities[i], + null, + null + ); + + instance.allFacilityUIItemes.push(facilityUIItem); + } + + + // ThreeDimensionalHomeComponent.instance.getAllIcons(instance) + + }) + // instance.three = ThreeDimensionalHomeComponent.instance + + } + + //清空可用设施列表 + clearAllFacilityUIItemes() { + for (let i = 0; i < this.allFacilityUIItemes.length; i++) { + this.allFacilityUIItemes[i].dispose(); + } + this.allFacilityUIItemes = []; + } + + //清空当前选中的设施 + clearCurrentFacility() { + if (FacilityWindow.s_currentFacilityItem != null) { + FacilityWindow.s_currentFacilityItem.onSelect(null); + FacilityWindow.s_currentFacilityItem = null; + } + } + + //点击了消防设施按钮 + onClickFacilityBtn(select: FacilityUIItem) { + let oldItem = FacilityWindow.s_currentFacilityItem; + + FacilityWindow.s_currentFacilityItem = select; + + FacilityWindow.s_currentFacilityItem.onSelect(true); + + if (oldItem != null) { + oldItem.onSelect(false); + + if (FacilityWindow.s_currentFacilityItem == oldItem) { + FacilityWindow.s_currentFacilityItem = null; + } + } + + this.updateCreateIcon(); + } + + //初始化pick事件 + initPickEvent() { + SceneManager.Instance.scene.onPointerObservable.add( + this.onPointerObservable + ); + } + + //鼠标交互监听 + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + if (ModeManager.currentMode == ModeType.Look)//查看模式无效 + { + return; + } + let instance = FacilityWindow.instance; + + + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + + if (eventData.event.button == 0) { //左键正常 + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + if (FacilityWindow.s_currentFacilityItem != null) { + instance.createNewFacility(eventData.pickInfo.pickedPoint); + return; + } + } + if (!SceneManager.s_isPointerDrag && !ToolbarWindow.instance.isMeshAdsorb) { + GizmoTool.onPickMeshInfoObservable.notifyObservers(null);//取消之前选择 + } + } + else { //右键取消 + // instance.three.unSelectBottomIcon(); + } + + break; + case PointerEventTypes.POINTERPICK: + // console.log(eventData.event); + break; + } + } + + //寻找设备预设 + getFacilityPrefab(resName: string): Mesh { + let result = null; + // console.log("查找设备" + resName); + for (let i = 0; i < this.allFacilityUIItemes.length; i++) { + if (this.allFacilityUIItemes[i].facilityData.resName == resName) { + result = this.allFacilityUIItemes[i].meshPrefab as Mesh; + // console.log("设备找到" + resName); + break; + } + } + // console.log(result); + + return result; + } + + //异步获取预制 + getFacilityPrefabSync(resName: string): Promise { + let thisWindow = this; //为了方便调用其方法 + let myPromise = new Promise(function (resolve, reject) { + let result: Mesh = thisWindow.getFacilityPrefab(resName);//先获取已经加载好的 + if (result == null) {//没获取到,则开始轮询 + let intervalid = setInterval(function () { //轮询方法 + let l_result: Mesh = thisWindow.getFacilityPrefab(resName); + + if (l_result != null) { + clearInterval(intervalid);//停止轮询intervalid + resolve(l_result); //成功返回结果 + } + }, 500); + } else { + resolve(result);//成功返回结果 + } + }); + return myPromise; + } + + + + //创建新的设施(用世界坐标) + createNewFacility(worldPosition: Vector3) { + let facilityData = FacilityWindow.s_currentFacilityItem.facilityData.clone( + this.createIndex.toString() + ); + + facilityData.transformData.position = worldPosition.clone(); + + let currentBuidngItem = StatusManager.getStatus(BuildingStatus) + .buildingWindow.currentBuidngItem; + if (currentBuidngItem == null) { + // alert("请先选中目标建筑"); + // ThreeDimensionalHomeComponent.instance.openSnackBar("请先选中目标建筑"); + return + } + + Event_ChangeFacility.dispatch(facilityData, ModelChangeType.Add, null); + + this.createFacility(facilityData, true, undefined, false, true, (modelInfo) => { + GizmoTool.onPickMeshInfoObservable.notifyObservers(modelInfo); + + }); + + } + + /** + * 粘贴复制的设备到当前建筑 + * @param copyFacilityInfo + */ + pasteFacility(copyFacilityInfo: CopyFacilityInfo) { + let isSameFloor = true;//同层内粘贴 + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + if (!copyFacilityInfo.outDoor) { + isSameFloor = false; + } + } + else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + if (copyFacilityInfo.outDoor) { + isSameFloor = false; + } + else if (copyFacilityInfo.buildingKey != StatusManager.s_currentStatus.indoorWindow.currentFloorUIItem.getIndoorKey()) { + isSameFloor = false; + } + } + //取消之前的所有选中 + FacilityInfoInSceneWindow.instance.cancleAllCurrectFacilityItem(); + + for (let i = 0; i < copyFacilityInfo.facilityData.length; i++) { + let facilityData = copyFacilityInfo.facilityData[i].clone(this.createIndex.toString()); + if (isSameFloor)//同层粘贴,略作偏移 + { + facilityData.transformData.position.x += 5; + } + Event_ChangeFacility.dispatch(facilityData, ModelChangeType.Add, null); + + this.createFacility(facilityData, false, undefined, true, true, (modelInfo) => { + //GizmoTool.onPickMeshInfoObservable.notifyObservers(modelInfo); + + modelInfo.onStopLongPress(null, null); + }); + } + } + + //移除设备(等待UI调用) + disposeFacility(modelInfo_facility: ModelInfo_facility) { + let modelData = modelInfo_facility.modelData; + + let buildingInfo: BuildingInfo = modelInfo_facility.belongToBuilding; + buildingInfo.ModelInfo.removeFacilityInfo(modelInfo_facility, true); + InfoManager.removeModelInfo(modelInfo_facility); + // GizmoTool.leaveTheGizmoAim(modelInfo_facility); // 看是否取消对坐标轴位置的标注 + + Event_ChangeFacility.dispatch(modelData, ModelChangeType.Remove, null); + } + + //创建设备 + createFacility( + facilityData: ModelData_facility, + isNew = false, + buildingInfo: BuildingInfo = null, + isLocalPos = false, + select = false, + onSuccess?: (modelInfo: ModelInfo_facility) => void + ): ModelInfo_facility { + + if (buildingInfo == null) { + buildingInfo = this.getCurrentBuildingInfo(); + } + + + let defaultMesh = MeshBuilder.CreateBox(facilityData.key, { size: 1 }); + defaultMesh.isVisible = false; + let facilityInfo = InfoManager.newModelInfo_facility( + facilityData.key, + facilityData, + null, + defaultMesh, + buildingInfo, + isNew + ); + + if (facilityInfo.facilityShowType == FacilityShowType.ModelAndTag) { + //模型类的,等加载完模型再设置transform信息,因为要把模型的position等数值和数据层的position等数据指向同一引用,方便后续调整后的同步 + } + else { + this.setFacilityTransform(isLocalPos, isNew, facilityData, buildingInfo, defaultMesh, facilityInfo); + } + + + facilityInfo.belongToBuilding = buildingInfo; + + if (facilityInfo.facilityShowType == FacilityShowType.ModelAndTag) { + + this.getFacilityPrefabSync(facilityData.resName).then((mesh) => { + let prefab = mesh; + let newFacility = SceneManager.cloneMesh( + facilityData.key, + facilityInfo, + prefab + ); + facilityInfo.modelBox = newFacility; + + + this.setFacilityTransform(isLocalPos, isNew, facilityData, buildingInfo, newFacility, facilityInfo); + + if (onSuccess) { + onSuccess(facilityInfo); + + } + }); + } + else if (facilityInfo.facilityShowType == FacilityShowType.AreaAndTag) { + let facilityData = facilityInfo.modelData as ModelData_facility; + if (facilityData.areaPoints.length == 0) { + facilityData.areaPoints = facilityData.newAreapPoints(); + } + facilityInfo.areaInfo = new AreaInfo(facilityData.areaPoints, facilityInfo); + if (onSuccess) { + onSuccess(facilityInfo); + } + + } + else if (facilityInfo.facilityShowType == FacilityShowType.GdAndTag) { + if (facilityData.areaPoints.length == 0) { + facilityData.areaPoints = []; + facilityData.areaPoints.push(new Vector3(0, 0, 0)); + facilityData.areaPoints.push(new Vector3(0, 10, 0)); + } + facilityInfo.gdInfo = new GdInfo(facilityData.areaPoints[0], facilityData.areaPoints[1], facilityInfo); + if (onSuccess) { + onSuccess(facilityInfo); + } + } + + // if (select) { + // GizmoTool.onPickMeshInfoObservable.notifyObservers(facilityInfo); + // } + + //添加到建筑信息 + let oldCreateNum = Number(facilityData.key); + if (oldCreateNum >= this.createIndex) { + this.createIndex = oldCreateNum + 1; + } + + + return facilityInfo; + } + + //设置设备transform信息 + setFacilityTransform(isLocalPos: boolean, isNew: boolean, facilityData: ModelData_facility, buildingInfo: BuildingInfo, newFacility: Mesh, facilityInfo?: ModelInfo_facility) { + //如果是局部坐标,要先设置父节点 + if (isLocalPos) { + buildingInfo.ModelInfo.setFacilityParent(facilityInfo); + } + + + let halfY = newFacility.scaling.y * 0.5; + if (!isNew) { + halfY = 0; + + + } + let originalScaling = facilityData.transformData.originalScaling.clone(); + if (!originalScaling.equals(newFacility.absoluteScaling))//原始缩放不同,表示换了模型 + { + // let scaleSize = new Vector3(facilityData.transformData.scaling.x / facilityData.transformData.originalScaling.x, facilityData.transformData.scaling.y / facilityData.transformData.originalScaling.y, facilityData.transformData.scaling.z / facilityData.transformData.originalScaling.z); + let scaleSize = facilityData.transformData.scaling.divide(facilityData.transformData.originalScaling); + facilityData.transformData.originalScaling = newFacility.absoluteScaling.clone(); + facilityData.transformData.scaling = facilityData.transformData.originalScaling.multiply(scaleSize); + + } + + newFacility.position = facilityData.transformData.position.add( + new Vector3(0, halfY, 0) + ); + + newFacility.position = facilityData.transformData.position; + newFacility.position.y += halfY; + + // newFacility.scaling = facilityData.transformData.scaling; + // newFacility.rotation = facilityData.transformData.rotation; + + if (facilityData.transformData.rotationQuaternion != null) { + newFacility.rotationQuaternion = + facilityData.transformData.rotationQuaternion; + } + + //如果是世界坐标,则最后设置父节点 + if (!isLocalPos) { + buildingInfo.ModelInfo.setFacilityParent(facilityInfo); + } + } + + //获取当前选中的建筑信息 + getCurrentBuildingInfo(): BuildingInfo { + let buildingInfo: BuildingInfo = null; + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + buildingInfo = StatusManager.getStatus(BuildingStatus) + .buildingWindow.currentBuidngItem.buildingInfo; + } else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + buildingInfo = StatusManager.getStatus(IndoorStatus) + .indoorWindow.currentFloorUIItem.buildingInfo; + } + + return buildingInfo; + } +} diff --git a/src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts b/src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts new file mode 100644 index 0000000..6c69ed6 --- /dev/null +++ b/src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts @@ -0,0 +1,202 @@ + +import { SceneManager } from "../../controller/scene-manager"; +import { PropertyData_Base_IMG } from "../../model/data/institution/facility/property-data/base/property-data-base-img"; +import { PropertyData_Base_SBJHQ } from "../../model/data/institution/facility/property-data/base/property-data-base-sbjhq"; +import { PropertyData_Base_XFB } from "../../model/data/institution/facility/property-data/base/property-data-base-xfb"; +import { PropertyData_Base_XHS } from "../../model/data/institution/facility/property-data/base/property-data-base-xhs"; +import { PropertyData_DWBZ } from "../../model/data/institution/facility/property-data/indoor/property-data-dwbz"; +import { PropertyData_FHFQ } from "../../model/data/institution/facility/property-data/indoor/property-data-fhfq"; +import { PropertyData_SSLT } from "../../model/data/institution/facility/property-data/indoor/property-data-sslt"; +import { PropertyData_XFDT } from "../../model/data/institution/facility/property-data/indoor/property-data-xfdt"; +import { PropertyData_ZDQY } from "../../model/data/institution/facility/property-data/indoor/property-data-zdqy"; +import { PropertyData_AQCK } from "../../model/data/institution/facility/property-data/outdoor/property-data-aqck"; +import { PropertyData_GD } from "../../model/data/institution/facility/property-data/outdoor/property-data-gd"; +import { PropertyData_PL } from "../../model/data/institution/facility/property-data/outdoor/property-data-pl"; +import { PropertyData_Q } from "../../model/data/institution/facility/property-data/outdoor/property-data-q"; +import { PropertyData_Base } from "../../model/data/institution/facility/property-data/property-data-base"; +import { FacilityType, ModelData_facility } from "../../model/data/model-data/model-data-facility"; +import { ModelInfo_facility } from "../../model/info/model/model-info-facility"; +import { BabylonTool } from "../../tool/babylon-tool"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { TsTool } from "../../tool/ts-tool"; +import { FacilityInfoInSceneWindow } from "./facilityinfoinscene-window"; + +//单个场景中的设备 UI item +export class FacilityInfoUIItem { + modelInfo: ModelInfo_facility; + facilityInfoInSceneWindow: FacilityInfoInSceneWindow; + isSelect: boolean = false; + isChecked: boolean = false; //是否 选中 + // facilityBtn: Button; + + constructor(modelInfo: ModelInfo_facility, facilityInfoInSceneWindow: FacilityInfoInSceneWindow) { + this.modelInfo = modelInfo; + this.facilityInfoInSceneWindow = facilityInfoInSceneWindow; + this.initUI(); + } + + + + //#region 前端对接 + + l_name = null; + /** + * 获取设备名 + */ + getName(): string { + return this.modelInfo.modelData.name; + } + + /** + * 设备类型 + */ + getType(): FacilityType { + return (this.modelInfo.modelData as ModelData_facility).facilityType; + } + /** + * 设备ID + */ + getID(): string { + return this.modelInfo.key; + } + /** + * 获取 设备属性 + */ + getPropertyData() { + let facilityData + // = (this.modelInfo.modelData as ModelData_facility).propertyData as any; + if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.AQCK) { + //安全出口 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_AQCK; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DSXHS || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DXXHS || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.SZDSXHS || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.SZDXXHS) { + //消火栓 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_Base_XHS; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DSSBJHQ || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DXSBJHQ || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.QBSBJHQ || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DGNSBJHQ) { + //水泵接合器 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_Base_SBJHQ; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.GD) { + //高度 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_GD; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.PL) { + //毗邻 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_PL; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.TPBZ || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.XKS || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.BF || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.SX) { + //图片标注,消控室,泵房,水箱 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_Base_IMG; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.JJQ || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.JTQ) { + //集结区,禁停区 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_Q; + } + else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.LSXFB || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.WSXFB || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.CYXFB) { + //消防泵 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_Base_XFB; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.FHFQ) { + //防火分区 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_FHFQ; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.FHM) { + //防火门 + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.FHJL) { + //防火卷帘 + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.SSLT) { + //疏散楼梯 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_SSLT; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.XFDT) { + //消防电梯 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_XFDT; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.PTDT) { + //普通电梯 + facilityData = null + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.ZDQY) { + //重点区域 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_ZDQY; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.WXY || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DWBZ) { + //危险源,点位标注 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_DWBZ; + } else { + //未匹配到的 + facilityData = null + } + return facilityData + } + + /** + * 粘贴属性 + * @param propertyData + */ + pasteProperty(propertyData: PropertyData_Base) { + let facilityData = this.modelInfo.modelData as ModelData_facility; + let key = facilityData.propertyData.key; + facilityData.propertyData = propertyData.clone(key); + + console.log("粘贴属性"); + } + + /** + * 询问删除 + * @param ask true表示询问,false表示不询问 + */ + askDelete(ask: boolean = true) { + this.modelInfo.askDelete(this.modelInfo, ask); + } + //#endregion + + initUI() { + + } + + dispose() { + + TsTool.arrayRemove(this.facilityInfoInSceneWindow.facilityInfoUIItemes, this); + } + + onSelect(select: boolean) { + this.isSelect = select; + this.modelInfo.setSelectEnable(select); + if (select) { + // console.log("选中设备==" + this.modelInfo.key); + GizmoTool.onPickMeshInfoObservable.notifyObservers(this.modelInfo); + this.facilityInfoInSceneWindow.selectFacilityItemToThree([this], true); + this.modelInfo.setIconEnable(select); + } + else { + this.facilityInfoInSceneWindow.selectFacilityItemToThree([this], false); + if (!this.facilityInfoInSceneWindow.getFacilityUIShowType(this.getType())) { + this.modelInfo.setIconEnable(select); + } + + } + } + + /** + * 相机聚焦 + */ + lookAt() { + + if (!this.canLookAt()) { + return; + } + + let size = null; + if (this.modelInfo.gdInfo != null) { + size = this.modelInfo.gdInfo.myPath[1].y * 3; + } + + if (this.modelInfo.areaInfo != null) { + //计算多边形size + } + BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, this.modelInfo.modelBox, true, size); + } + + + /** + * 是否可以聚焦 + */ + canLookAt(): boolean { + let result = this.modelInfo != null && this.modelInfo.modelBox != null; + + return result; + + } + + +} \ No newline at end of file diff --git a/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts b/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts new file mode 100644 index 0000000..9949ae3 --- /dev/null +++ b/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts @@ -0,0 +1,603 @@ +import { EventManager } from "@angular/platform-browser"; +import { AbstractMesh, Ray, RayHelper, Vector3 } from "@babylonjs/core"; +import { classToClass } from "class-transformer"; +import { ModelChangeType } from "../../controller/data-manager"; +import { Event_KeyboardInput } from "../../controller/event-manager/events/event-keyboard-input"; +import { Event_ModelInfoChange } from "../../controller/event-manager/events/event-modelinfo-change"; +import { ModeManager, ModeType } from "../../controller/mode-manager"; +import { BuildingStatus } from "../../controller/status/building-status"; +import { IndoorStatus } from "../../controller/status/indoor-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { Game } from "../../game"; +import { ModelData_facility, FacilityType } from "../../model/data/model-data/model-data-facility"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { ModelInfo } from "../../model/info/model/model-info"; +import { ModelInfo_facility, FacilityInfoByType } from "../../model/info/model/model-info-facility"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { TsTool } from "../../tool/ts-tool"; + +import { BuildingWindow } from "../building-window/building-window"; +import { UIBase } from "../window-base/ui-base"; +import { FacilityInfoUIItem } from "./facilityinfo-ui-item"; + +//所有放在场景中的设备 信息界面 +export class FacilityInfoInSceneWindow extends UIBase { + static instance: FacilityInfoInSceneWindow; + // three: ThreeDimensionalHomeComponent;//前端组件 + // scrollView: ScrollViewer; + // content: StackPanel; + + /** + * 当前选中的所有设备UI + */ + currentFacility: FacilityInfoUIItem[] = []; + + /** + * 当前显示的所有设备UI + */ + facilityInfoUIItemes: FacilityInfoUIItem[] = []; + + copyFacilityInfo: CopyFacilityInfo = new CopyFacilityInfo(); + + isMultiselect: boolean = false;//多选状态 + + //#region 前端对接 + + + /** + * 更新UI显示 + */ + updateUI() { + //this.three.getAllCensusList(this.facilityInfoUIItemes || []); + } + + /** + * 改变多选状态 + * @param isMultiselect true表示多选。 默认是false + */ + changeMultiSelect(isMultiselect: boolean) { + this.isMultiselect = isMultiselect; + } + + /** + * 复制选中的设备 + */ + copyFacility() { + this.copyFacilityInfo.facilityData = []; + for (let i = 0; i < this.currentFacility.length; i++) { + let data = classToClass(this.currentFacility[i].modelInfo.modelData); + this.copyFacilityInfo.facilityData.push(data as ModelData_facility); + } + + + if (StatusManager.s_currentStatus instanceof IndoorStatus) { + this.copyFacilityInfo.outDoor = false; + this.copyFacilityInfo.buildingKey = StatusManager.s_currentStatus.indoorWindow.currentFloorUIItem.getIndoorKey(); + } + else if (StatusManager.s_currentStatus instanceof BuildingStatus) { + this.copyFacilityInfo.outDoor = true; + this.copyFacilityInfo.buildingKey = StatusManager.s_currentStatus.currentBuildingInfo.buildingData.normalData.key; + } + + return this.copyFacilityInfo; + } + + + + /** + * 单选设备 + * @param facilityInfoUIItem null表示取消选中 + */ + selectFacilityItem(facilityInfoUIItem: FacilityInfoUIItem) { + if (facilityInfoUIItem == null)//取消选中 + { + if (this.currentFacility != null) { + for (let i = 0; i < this.currentFacility.length; i++) { + this.currentFacility[i].onSelect(false); + } + this.currentFacility = []; + + } + } + else { + if (this.currentFacility != null) { + for (let i = 0; i < this.currentFacility.length; i++) { + this.currentFacility[i].onSelect(false); + } + this.currentFacility = []; + this.currentFacility.push(facilityInfoUIItem); + facilityInfoUIItem.onSelect(true); + } + + } + } + + /** + * 多选设备 + * @param items + * @param select true表示选中,false表示取消选中 + */ + multiSelectFacilityItem(items: FacilityInfoUIItem[], select: boolean) { + if (items == null) { + return; + } + for (let i = 0; i < items.length; i++) { + if (select) { + items[i].onSelect(true); + let isRepet = false;//重复的 + for (let j = 0; j < this.currentFacility.length; j++) { + if (this.currentFacility[j] == items[i]) { + isRepet = true; + break; + } + } + if (!isRepet) { + this.currentFacility.push(items[i]); + // console.log("添加进选中"); + } + } + else { + items[i].onSelect(false); + + TsTool.arrayRemove(this.currentFacility, items[i]) + // console.log("取消选中", items[i].getID(), this.currentFacility); + } + } + } + + + + //选中,通知前端 + selectFacilityItemToThree(facilityInfoUIItem: FacilityInfoUIItem[], isChecked?: boolean) { + // this.three = ThreeDimensionalHomeComponent.instance; + // if (this.isMultiselect) { // 多选 + // if (isChecked) { //选中 + // facilityInfoUIItem.forEach(element => { + // element.isChecked = isChecked + // let isFind = this.three.beforeOnefacilityInfoList.find(item => { return item === element.getID() }) + // isFind == undefined || isFind == null ? this.three.beforeOnefacilityInfoList.push(element.getID()) : null + // }) + // } else { //取消选中 + // this.three.isShowRightNature = false + // facilityInfoUIItem.forEach(element => { + // element.isChecked = isChecked + // let index = this.three.beforeOnefacilityInfoList.findIndex(value => value === element.getID()) + // index != undefined && index != null ? this.three.beforeOnefacilityInfoList.splice(index, 1) : null + // }) + // } + // } else { // 单选 + // if (isChecked) { //选中 + // this.three.beforeOnefacilityInfo = facilityInfoUIItem[0].getID(); + // this.three.getPropertyData(facilityInfoUIItem[0]) + // } else { //取消选中 + // this.three.isShowRightNature = false + // this.three.beforeOnefacilityInfo = null + // } + // } + } + + /** + * 显示某种type的消防设备,null表示全都 + * @param facilityType + */ + showFacilityByType(facilityType: FacilityType, show: boolean) { + + if (ModeManager.currentMode == ModeType.Look) { + // for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + // let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility; + // if (facilityType == null || facilityType == l_facilityData.facilityType) { + // this.facilityInfoUIItemes[i].modelInfo.setEnable(show); + // } + // else if (show) { + // this.facilityInfoUIItemes[i].modelInfo.setEnable(false); + // } + // } + for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility; + if (facilityType == null || facilityType == l_facilityData.facilityType) { + this.facilityInfoUIItemes[i].modelInfo.setIconEnable(show); + } + } + } + else { + for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility; + if (facilityType == null || facilityType == l_facilityData.facilityType) { + this.facilityInfoUIItemes[i].modelInfo.setIconEnable(show); + } + } + } + + } + + /** + * 根据类型获取数目 + * @param facilityType + */ + getFacilityUIShowType(facilityType: FacilityType): boolean { + // for (let i = 0; i < this.three.allFacilityInfoUIItemes.length; i++) { + // let item = this.three.allFacilityInfoUIItemes[i]; + // if (item.type == facilityType) { + // return item.isShow; + // } + // } + return false; + + } + + /** + * 删除某一类设备 + * @param facilityType + */ + deleteFacilityByType(facilityType: FacilityType) { + let needDelete: FacilityInfoUIItem[] = []; + for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + if ((this.facilityInfoUIItemes[i].modelInfo.modelData as ModelData_facility).facilityType == facilityType) { + needDelete.push(this.facilityInfoUIItemes[i]); + } + } + + for (let i = 0; i < needDelete.length; i++) { + needDelete[i].askDelete(false);//不再单独询问 + } + } + + //#endregion + + //#region 生命周期 + onInit() { + + super.onInit(); + + FacilityInfoInSceneWindow.instance = this; + // this.three = ThreeDimensionalHomeComponent.instance; + // EventManager.addListener(Event_ModelInfoChange, this.onModelInfoChange); + + GizmoTool.onPickMeshInfoObservable.add(this.onClickModel); + this.currentFacility = []; + this.initKeyboardInput(); + this.initDragInput(); + + + } + + + + onClose() { + super.onClose(); + //EventManager.removeCallback(Event_ModelInfoChange, this.onModelInfoChange); + + GizmoTool.onPickMeshInfoObservable.removeCallback(this.onClickModel); + } + + //#region 键盘输入 + /** + * 初始化键盘输入 + */ + initKeyboardInput() { + let instance = this; + // EventManager.addListener(Event_KeyboardInput, (eventData: Event_KeyboardInput) => { + // instance.onKeyboardInput(eventData); + // }) + + } + /** + * 接收到键盘事件 + * @param eventData + */ + onKeyboardInput(eventData: Event_KeyboardInput) { + if (eventData.data.key == "Delete") // 删除。 后期看是否加入 Backspace 退格 + { + //改由前端完成快捷键删除 + // if (this.currentFacility != null) { + // for (let i = 0; i < this.currentFacility.length; i++) { + // this.currentFacility[i].askDelete(false); + // } + // this.currentFacility = []; + // this.three.getAllCensusList(this.facilityInfoUIItemes || []); + // } + } + else if (eventData.data.key == "X") //室内消火栓吸附墙 + { + // 没做完,先搁置 + // let testNum = 5;//检测次数 + // let distance = 1;//检测距离 + // if (this.currentFacility != null) { + // for (let i = 0; i < this.currentFacility.length; i++) { + // let l_facility = this.currentFacility[i]; + // if (l_facility.modelInfo.modelBox == null) { + // continue; + // } + // if (l_facility.getType() == FacilityType.SNXHS) //室内消火栓 + // { + // let start = l_facility.modelInfo.modelBox.absolutePosition.clone(); + // for (let x = -1; i < 2; i += 2) //x取1或-1 + // { + // for (let z = -testNum; z < testNum; z++) { + // let dir = new Vector3(x, 0, z); + // let ray = new Ray(start, dir, distance); + // let rayHelper = new RayHelper(ray);//射线辅助器 + // rayHelper.show(SceneManager.Instance.scene);//debug射线,用于调试 + + // let pickingInfo = SceneManager.Instance.scene.pickWithRay(ray, (mesh: AbstractMesh) => { + // if (TsTool.stringContain(mesh.name, "SNXHS")) { + // return false; + // } + // else { + // return true; + // } + + // }); + // let normal = pickingInfo.getNormal(true); + // console.log(pickingInfo); + // } + // } + + + + // } + // } + // } + + } + } + //#endregion + + //#region gizmo拖拽输入 + + /** + * gizmo拖拽输入 + */ + isGizmoDrag_pos: boolean = false; + lastGizmoMesh_Pos: Vector3 = Vector3.Zero(); + + /** + * 初始化拖拽输入 + * 当多选时,移动一个要同时移动其他设备 + */ + initDragInput() { + let instance = this; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.onDragStartObservable.add((eventData) => { + instance.isGizmoDrag_pos = true; + instance.saveLastGizmoMeshInfo(); + }); + GizmoTool.s_gizmoManager.gizmos.positionGizmo.onDragEndObservable.add((eventData) => { + instance.isGizmoDrag_pos = false; + }); + + Game.instance.scene.onBeforeRenderObservable.add(() => { + + if (!instance.isGizmoDrag_pos) { + return; + } + if (instance.isDragFacility()) { + let offset = GizmoTool.s_nowPickAim.modelBox.position.subtract(instance.lastGizmoMesh_Pos); + for (let i = 0; i < instance.currentFacility.length; i++) { + if (instance.currentFacility[i].modelInfo != (GizmoTool.s_nowPickAim as ModelInfo_facility)) { + + // instance.currentFacility[i].modelInfo.modelData.transformData.position.x += offset.x; + // instance.currentFacility[i].modelInfo.modelData.transformData.position.y += offset.y; + // instance.currentFacility[i].modelInfo.modelData.transformData.position.z += offset.z; + instance.currentFacility[i].modelInfo.modelBox.position.x += offset.x; + instance.currentFacility[i].modelInfo.modelBox.position.y += offset.y; + instance.currentFacility[i].modelInfo.modelBox.position.z += offset.z; + } + else { + //console.log("移动的本体", i); + } + } + instance.saveLastGizmoMeshInfo(); + } + }) + } + + /** + * 保存上一帧的数据 + * @param facilityInfoInSceneWindow + */ + saveLastGizmoMeshInfo() { + if (GizmoTool.s_nowPickAim != null && GizmoTool.s_nowPickAim instanceof ModelInfo_facility) { + this.lastGizmoMesh_Pos = GizmoTool.s_nowPickAim.modelBox.position.clone(); + } + + } + + /** + * 是否拖拽选中的设备 + */ + isDragFacility() { + if (this.currentFacility == null || this.currentFacility.length < 2) { + return false; + } + if (GizmoTool.s_nowPickAim != null && GizmoTool.s_nowPickAim instanceof ModelInfo_facility) { + for (let i = 0; i < this.currentFacility.length; i++) { + if (this.currentFacility[i].modelInfo == GizmoTool.s_nowPickAim) { + return true; + } + } + return false; + } + else { + return false; + } + } + + + //#endregion + + //创建所有设备UI + createAllFacilities(facilityByType: FacilityInfoByType[]) { + this.clearFacilityInfoUIItemes(); + for (let i = 0; i < facilityByType.length; i++) { + for (let j = 0; j < facilityByType[i].facilityInfo.length; j++) { + + this.addFacilityItem(facilityByType[i].facilityInfo[j]); + } + } + + + + //通知ui更新 + //this.three.getAllCensusList(this.facilityInfoUIItemes || []); + } + + //清空设备UI item + clearFacilityInfoUIItemes() { + + this.facilityInfoUIItemes.length = 0; + this.currentFacility = []; + //this.three.getAllCensusList(this.facilityInfoUIItemes || []); + } + + + //模型变化 + onModelInfoChange(modelInfoChange: Event_ModelInfoChange) { + let instance: FacilityInfoInSceneWindow = FacilityInfoInSceneWindow.instance; + if (modelInfoChange.modeleInfo instanceof ModelInfo_facility) { + if (instance.isCurrentBuildingOrIndoor(modelInfoChange.modeleInfo.belongToBuilding)) {//严格隶属当前选中的建筑 + if (modelInfoChange.modelChangeType == ModelChangeType.Add) { + instance.addFacilityItem(modelInfoChange.modeleInfo); + //console.log("此建筑中添加", modelInfoChange.modeleInfo); + } + else if (modelInfoChange.modelChangeType == ModelChangeType.Remove) { + instance.removeFacilityItem(modelInfoChange.modeleInfo); + //console.log("此建筑中移除", modelInfoChange.modeleInfo); + } + } + else { + // console.log("不是此建筑"); + } + // instance.three = ThreeDimensionalHomeComponent.instance; + //instance.three.getAllCensusList(instance.facilityInfoUIItemes || []); + } else { // 无设备 时 + // instance.three = ThreeDimensionalHomeComponent.instance; + //instance.three.getAllCensusList(instance.facilityInfoUIItemes || []); + } + } + + //添加一个设备到UI + addFacilityItem(facilityInfo: ModelInfo_facility) { + let facilityInfoUIItem = new FacilityInfoUIItem(facilityInfo, this); + this.facilityInfoUIItemes.push(facilityInfoUIItem); + if (facilityInfo.isNew) { + if (this.isMultiselect) { + this.multiSelectFacilityItem([facilityInfoUIItem], true); + } + else { + this.selectFacilityItem(facilityInfoUIItem); + } + + // facilityInfo.setSelectEnable(true); + // this.selectFacilityItemToThree(facilityInfoUIItem); + } + //this.onClickModel(facilityInfoUIItem); + + } + + //移除设备Item + removeFacilityItem(facilityInfo: ModelInfo_facility) { + let value = this.getFacilityItem(facilityInfo); + + TsTool.arrayRemove(this.currentFacility, value); + + if (value != null) { + value.dispose(); + } + } + + //获取item + getFacilityItem(facilityInfo: ModelInfo_facility): FacilityInfoUIItem { + let result: FacilityInfoUIItem; + if (this.facilityInfoUIItemes == undefined && this.facilityInfoUIItemes == null) { + result = null; + } + else { + for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + if (this.facilityInfoUIItemes[i].modelInfo == facilityInfo) { + result = this.facilityInfoUIItemes[i]; + break; + } + } + } + + return result; + + } + + //根据info找到相应的item,然后模拟选中 + selectFacilityInfo(facilityInfo: ModelInfo_facility) { + + let item: FacilityInfoUIItem = null; + for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + if (this.facilityInfoUIItemes[i].modelInfo == facilityInfo) { + item = this.facilityInfoUIItemes[i]; + break; + } + } + + if (item == null) { + item = new FacilityInfoUIItem(facilityInfo, this); + } + + if (this.isMultiselect) { + this.multiSelectFacilityItem([item], !item.isSelect); + } + else { + // if (item.isSelect) { + // //this.selectFacilityItem(null);//取消选中 + // } + // else { + this.selectFacilityItem(item); + // } + + } + } + + //当点击了模型 + onClickModel(model: ModelInfo | FacilityInfoUIItem) { + + + } + + /** + * 设备是否属于当前选中的建筑 + * @param belongToBuilding + */ + isCurrentBuildingOrIndoor(belongToBuilding: BuildingInfo) { + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + let buildingWindow = StatusManager.getStatus(BuildingStatus).buildingWindow; + return (buildingWindow != null && buildingWindow.currentBuidngItem != null && buildingWindow.currentBuidngItem.buildingInfo == belongToBuilding) + } + else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + let indoorKey = StatusManager.getStatus(IndoorStatus).indoorWindow.currentFloorUIItem.getIndoorKey(); + return belongToBuilding.ModelInfo.key == indoorKey; + } + + } + + /** + * 取消选中当前选中的所有设备 + * @param select + */ + cancleAllCurrectFacilityItem() { + if (this.currentFacility == null) { + return; + } + this.selectFacilityItemToThree(this.currentFacility, false); + for (let i = 0; i < this.currentFacility.length; i++) { + this.currentFacility[i].onSelect(false); + } + this.currentFacility = []; + + } + +} + +/** + * 复制的设备信息 + */ +export class CopyFacilityInfo { + outDoor: boolean;//室外 + buildingKey: String; + facilityData: ModelData_facility[]; +} \ No newline at end of file diff --git a/src/app/babylon/view/indoor-window/indoor-create-window.ts b/src/app/babylon/view/indoor-window/indoor-create-window.ts new file mode 100644 index 0000000..db5f7ff --- /dev/null +++ b/src/app/babylon/view/indoor-window/indoor-create-window.ts @@ -0,0 +1,234 @@ +// import { Control, Rectangle, StackPanel, TextBlock } from "@babylonjs/gui"; +// import { DataManager } from "src/babylon/controller/data-manager"; +// import { ServeManager } from "src/babylon/controller/serve-manager"; +// import { IndoorStatus } from "src/babylon/controller/status/indoor-status"; +// import { StatusManager } from "src/babylon/controller/status/status-manager"; +// import { UIManager } from "src/babylon/controller/ui-manager"; +// import { BuildingData_Normal } from "src/babylon/model/data/institution/building/building-data"; +// import { BuildingPosType, ModelData } from "src/babylon/model/data/model-data/model-data"; +// import { ModelEditData } from "src/babylon/model/data/model-data/model-edit-data"; +// import { BabylonUIStyleTool } from "src/babylon/tool/babylon-ui-style-tool"; +// import { TsTool } from "src/babylon/tool/ts-tool"; +// import { UIBase } from "../window-base/ui-base"; +// import { IndoorFloorUIItem } from "./indoor-floorui-item"; + +// export class IndoorCreateWindow extends UIBase { +// buildingData: BuildingData_Normal +// newFloorData: ModelEditData;//新的楼层信息,新建时填充 +// indoorFloorUIItem: IndoorFloorUIItem;//已有的楼层item,修改时填充 +// isCreate: boolean = true;//是新建楼层 + +// indoorStatus: IndoorStatus; +// isChangeModel = false;//修改了模型,则要重新加载模型 + +// //初始化为新建 +// initCreate() { +// this.newFloorData = this.indoorStatus.newIndoorData("key", "name"); + +// this.initUI(); +// } + +// //初始化为修改 +// initChange(indoorFloorUIItem: IndoorFloorUIItem) { +// this.indoorFloorUIItem = indoorFloorUIItem; +// this.newFloorData = indoorFloorUIItem.modelEditData; +// this.initUI(); +// } + +// //#region 声明周期 +// onInit() { +// super.onInit(); +// this.indoorStatus = StatusManager.getStatus(IndoorStatus); + +// } + +// onOpen() { +// super.onOpen(); + +// BabylonUIStyleTool.createWindoRoot(this, "IndoorCreateWindow", "300px", "296px", true); +// } + +// onClose() { +// super.onClose(); +// } +// //#endregion + + +// initUI() { + +// let window = this; + +// let baseWidth = "220px"; +// let baseHeight = "20px"; + +// let indoorStatus = StatusManager.getStatus(IndoorStatus); +// this.buildingData = indoorStatus.buildingInfo.buildingData as BuildingData_Normal; + +// let stack = new StackPanel("stack"); +// stack.isVertical = true; +// BabylonUIStyleTool.setStyle_size(stack, baseWidth, "280px"); +// this.root.addControl(stack); + + +// this.isCreate = this.indoorFloorUIItem == null; + +// let titleText = this.isCreate ? "新建" : "编辑"; +// let title = BabylonUIStyleTool.createTextBlock("title", titleText, baseWidth, baseHeight, "20px"); +// stack.addControl(title); + +// let space = new Rectangle("space"); +// BabylonUIStyleTool.setStyle_size(space, baseWidth, baseHeight); +// stack.addControl(space); + +// let floorKey = BabylonUIStyleTool.createTextBlock("floorKey", "唯一key", baseWidth, baseHeight, "18px"); +// stack.addControl(floorKey); +// floorKey.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + +// let floorKeyInput = BabylonUIStyleTool.createInputText("floorKeyInput", stack, baseWidth, baseHeight); +// if (!this.isCreate && this.newFloorData.modelData.key != null) { +// floorKeyInput.inputText.text = this.newFloorData.modelData.key; +// } +// floorKeyInput.inputText.onTextChangedObservable.add(() => { +// window.newFloorData.modelData.key = floorKeyInput.inputText.text; +// }); + +// let floorName = BabylonUIStyleTool.createTextBlock("floorName", "楼层名称", baseWidth, baseHeight, "18px"); +// stack.addControl(floorName); +// floorName.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + +// let floorNameInput = BabylonUIStyleTool.createInputText("floorNameInput", stack, baseWidth, baseHeight); +// if (this.isCreate) { + +// } +// else { +// floorNameInput.inputText.text = this.newFloorData.modelData.name; +// } +// floorNameInput.inputText.onTextChangedObservable.add(() => { +// window.newFloorData.modelData.name = floorNameInput.inputText.text; +// }) + +// let space4 = new Rectangle("space4"); +// BabylonUIStyleTool.setStyle_size(space4, baseWidth, "20px"); +// stack.addControl(space4); + +// let btn_changeModel = BabylonUIStyleTool.createBtn_OK("btn_changeModel", "上传模型", baseWidth, "30px", "18px"); +// stack.addControl(btn_changeModel); + +// btn_changeModel.onPointerClickObservable.add(() => { +// window.changeModel(); +// }) + + +// let space2 = new Rectangle("space2"); +// BabylonUIStyleTool.setStyle_size(space2, baseWidth, "30px"); +// stack.addControl(space2); + +// let btns = new StackPanel("btns"); +// BabylonUIStyleTool.setStyle_size(btns, baseWidth, "36px"); +// stack.addControl(btns); +// btns.isVertical = false; + +// let btn_OK = BabylonUIStyleTool.createBtn_OK("OK", "确定", "100px", "36px", "18px"); +// btns.addControl(btn_OK); +// btn_OK.onPointerClickObservable.add(() => { +// window.onBtn_Ok(); +// }) + +// let space3 = new Rectangle("space3"); +// BabylonUIStyleTool.setStyle_size(space3, "20px", "36px"); +// btns.addControl(space3); + +// let btn_cancel = BabylonUIStyleTool.createBtn_Cancel("cancel", "取消", "100px", "36px", "18px"); +// btns.addControl(btn_cancel); +// btn_cancel.onPointerClickObservable.add(() => { +// window.onBtn_Cancel(); +// }); + +// if (!this.isCreate) { +// let btn_delete = BabylonUIStyleTool.createBtn_Delete("delete", "删", "30px", "30px", "20px"); +// this.root.addControl(btn_delete); +// btn_delete.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// btn_delete.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; +// btn_delete.onPointerClickObservable.add(() => { +// console.log("===btn_delete==="); +// window.onBtn_Delete(); +// }); +// } +// } + + +// //修改模型 +// changeModel() { +// let institutionKey = DataManager.institutionData.normalData.key; +// let indoorData = this.newFloorData; +// let buildingKey = StatusManager.getStatus(IndoorStatus).buildingInfo.buildingData.normalData.key; +// let path = DataManager.getResPath_building(institutionKey, buildingKey, BuildingPosType.Indoor, this.newFloorData.modelData.key); +// console.log("模型路径" + path); + +// let instance = this; +// ServeManager.instance.openFileSelect(path, (name: string, path: string) => { +// instance.isChangeModel = true; +// if (TsTool.stringContain(name, ".gltf")) { +// indoorData.modelData.resName = name; +// indoorData.modelData.resPath = path; +// } +// }); +// } + +// onBtn_Ok() { +// if (this.isCreate) { +// if (this.buildingData.indoorsData == null) { +// this.buildingData.indoorsData = []; +// } +// this.indoorStatus.addNewIndoorToBuilding(this.newFloorData); +// // this.buildingData.indoorsData.push(this.newFloorData); + +// let indoorStatus = StatusManager.getStatus(IndoorStatus); +// indoorStatus.indoorWindow.createOneFloorUIItem(this.newFloorData); +// } +// else { +// console.log(this.indoorFloorUIItem.modelEditData.modelData); +// //更新场景 +// if (this.isChangeModel) { +// this.indoorFloorUIItem.updateBuilding(); +// } +// else { +// this.indoorFloorUIItem.updateUI(); +// } + +// } + +// this.closeWindow(); +// } + +// //点击取消按钮 +// onBtn_Cancel() { +// this.closeWindow(); +// } + +// //点击删除按钮 +// onBtn_Delete() { +// console.log("onBtn_Delete"); +// let indoorStatus = StatusManager.getStatus(IndoorStatus); +// indoorStatus.indoorWindow.deleteFloor(this.indoorFloorUIItem); +// this.closeWindow(); +// } + +// //关闭界面 +// closeWindow() { +// if (this.isCreate) { +// let indoorStatus = StatusManager.getStatus(IndoorStatus); + +// indoorStatus.indoorWindow.closeCreateIndoorWindow(); +// } +// else { +// this.isChangeModel = false; +// this.indoorFloorUIItem.closeChangeWindow(); +// } + +// } + + + + +// } \ No newline at end of file diff --git a/src/app/babylon/view/indoor-window/indoor-floorui-item.ts b/src/app/babylon/view/indoor-window/indoor-floorui-item.ts new file mode 100644 index 0000000..12ecf2e --- /dev/null +++ b/src/app/babylon/view/indoor-window/indoor-floorui-item.ts @@ -0,0 +1,278 @@ +import { AbstractMesh, Mesh } from "@babylonjs/core"; +import { Button, Container, Rectangle } from "@babylonjs/gui"; +import ObjectID from "bson-objectid"; +import { classToClass } from "class-transformer"; +import { DataManager } from "../../controller/data-manager"; +import { InfoManager } from "../../controller/info-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { IndoorStatus } from "../../controller/status/indoor-status"; +import { ModelType } from "../../model/data/model-data/model-data"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { ModelInfo } from "../../model/info/model/model-info"; +import { ModelInfo_building } from "../../model/info/model/model-info-building"; +import { BabylonTool } from "../../tool/babylon-tool"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { MeshPoolInfo } from "../../tool/mesh-pool"; + +import { MarkWindow } from "../mark-window/mark-window"; +// import { IndoorCreateWindow } from "./indoor-create-window"; +import { IndoorWindow } from "./indoor-window"; + +//室内楼层UI +export class IndoorFloorUIItem { + modelEditData: ModelEditData; + buildingInfo: BuildingInfo; + root: Rectangle; + content: Container; + indoorWindow: IndoorWindow; + btn: Button; + + + constructor(modelEditData: ModelEditData, indoorWindow: IndoorWindow) { + this.modelEditData = modelEditData; + this.indoorWindow = indoorWindow; + + } + + //#region 前端对接 + + /** + * 获取室内层key + */ + getIndoorKey() { + return this.modelEditData.modelData.key; + } + + /** + * 获取室内层名称 + */ + getIndoorName() { + return this.modelEditData.modelData.name; + } + + /** + * 楼层序列 + */ + getIndoorIndex() { + return this.modelEditData.index; + } + + /** + * 修改室内名称 + * @param newName + */ + setIndoorName(newName: string) { + this.modelEditData.modelData.name = newName; + if (this.buildingInfo != null && this.buildingInfo.ModelInfo != null) { + (this.buildingInfo.ModelInfo as ModelInfo_building).updateName(newName); + } + } + + /** + * 设置避难层 + */ + setRefugeFloor(isRefugeFloor: boolean) { + this.modelEditData.isRefugeFloor = isRefugeFloor; + } + + /** + * 修改模型 + * @param file + */ + changeModel(file: File[]) { + console.log("修改模型", file); + this.indoorWindow.changeModel(file, this.modelEditData); + } + + /** + * 复制楼层数据 + */ + copyFloor() { + let result = classToClass(this.modelEditData); + result.modelData.key = ObjectID.generate(); + result.modelData.name = result.modelData.name + "(1)"; + return result; + } + + + + //#endregion + + + //#region 内部方法 + //更新建筑 + updateBuilding() { + let instance = this; + + if (this.modelEditData != null && this.modelEditData.modelData != null && this.modelEditData.modelData.resPath != null) { + + if (instance.buildingInfo == null) { + instance.buildingInfo = new BuildingInfo(DataManager.institutionData.normalBuildingDatas[0], null); + } + instance.buildingInfo.isDisposed = false; + if (instance.buildingInfo.ModelInfo != null) { //更新、释放掉之前的模型、ui + instance.buildingInfo.ModelInfo.dispose(); + } + + let resKey = this.modelEditData.modelData.resName + this.modelEditData.modelData.name; + let meshFromPool = IndoorFloorUIItem.getFromPool(resKey); + console.log(meshFromPool); + if (meshFromPool == null) { + //创建所有室内模型 + SceneManager.createModel(ModelType.Building, this.modelEditData.modelData, true, true, undefined, (newMesh, box, modelInfo) => { + // instance.buildingInfo.ModelInfo = modelInfo as ModelInfo_building; + // box.position.y = box.scaling.y * 0.5 + 1; + // IndoorFloorUIItem.addToPool(this.modelEditData.modelData.resPath +this.modelEditData.modelData.name,box); + // // console.log("创建建筑成功=" + this.modelEditData.modelData.name + "isdispos" + instance.buildingInfo.ModelInfo.isDisposed); + // if (!instance.buildingInfo.ModelInfo.isDisposed) { + // instance.buildingInfo.ModelInfo.updateName(instance.modelEditData.modelData.name); + // let facilitysInFloor = instance.buildingInfo.ModelInfo.facilityInfos; + // SceneManager.s_facilityInfoInSceneWindow.createAllFacilities(facilitysInFloor); + // InfoManager.createFacilityInfos(instance.modelEditData, instance.buildingInfo); + // //BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, box, false); + // IndoorStatus.enterSuccessObservable.notifyObservers(instance); + // instance.lookAt(false); + + // } + instance.onLoadMesh(instance, modelInfo, box); + IndoorFloorUIItem.addToPool(resKey, box); + }); + } + else { + let modelInfo = InfoManager.newModelInfo_building( + instance.modelEditData.modelData.key, + instance.modelEditData.modelData, + null, + meshFromPool + ); + + instance.onLoadMesh(instance, modelInfo, meshFromPool); + } + + + } + else { + } + } + + /** + * 加载完成的回调 + * @param instance + * @param modelInfo + * @param modelBox + */ + onLoadMesh(instance: IndoorFloorUIItem, modelInfo: ModelInfo, modelBox: AbstractMesh) { + instance.buildingInfo.ModelInfo = modelInfo as ModelInfo_building; + modelBox.position.y = modelBox.scaling.y * 0.5 + 1; + // console.log("创建建筑成功=" + this.modelEditData.modelData.name + "isdispos" + instance.buildingInfo.ModelInfo.isDisposed); + if (!instance.buildingInfo.ModelInfo.isDisposed) { + instance.buildingInfo.ModelInfo.updateName(instance.modelEditData.modelData.name); + let facilitysInFloor = instance.buildingInfo.ModelInfo.facilityInfos; + SceneManager.s_facilityInfoInSceneWindow.createAllFacilities(facilitysInFloor); + InfoManager.createFacilityInfos(instance.modelEditData, instance.buildingInfo); + //BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, box, false); + IndoorStatus.enterSuccessObservable.notifyObservers(instance); + instance.lookAt(true); + + } + + } + + dispose() { + + if (this.buildingInfo != null) { + GizmoTool.leaveTheGizmoAim(this.buildingInfo.ModelInfo); + } + if (this.buildingInfo != null) { + this.buildingInfo.dispose(); + } + } + + //点击选中 + onClick() { + this.indoorWindow.selectFloor(this); + } + + + //是否选中的表现更新 + onSelect(select: boolean) { + if (select) { + + this.updateBuilding(); + } + else { + if (this.buildingInfo != null) { + GizmoTool.leaveTheGizmoAim(this.buildingInfo.ModelInfo); + this.buildingInfo.dispose(); + } + } + } + + /** + * 摄像机聚焦 + */ + lookAt(anim: boolean = true) { + if (MarkWindow.s_cameraData != null) { + // setTimeout(() => { + SceneManager.Instance.defaultCamera.animations + MarkWindow.s_cameraData.setDataToCamera(SceneManager.Instance.defaultCamera); + MarkWindow.s_cameraData = null; + // }, (500)); + + } else if (this.buildingInfo != null && this.buildingInfo.ModelInfo != null && this.buildingInfo.ModelInfo.modelBox != null) { + BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, this.buildingInfo.ModelInfo.modelBox, anim); + } + } + //#endregion + + + //#region 室内模型池 + + /** + * 缓存室内楼层的备份 + */ + static pool: Map = new Map(); + + /** + * 将备份放入池中 + * @param meshKey + * @param mesh + */ + static addToPool(meshKey: string, mesh: AbstractMesh) { + + if (IndoorFloorUIItem.pool.has(meshKey)) { + return; + } + else { + let prefabMesh = BabylonTool.cloneMesh(mesh as Mesh, mesh.name); + let poolInfo: MeshPoolInfo = new MeshPoolInfo(meshKey, meshKey, false, prefabMesh); + poolInfo.meshBox.setEnabled(false); + IndoorFloorUIItem.pool.set(meshKey, poolInfo); + } + + } + + /** + * 从池中获取 + * @param modelPath + */ + static getFromPool(modelPath: string) { + if (IndoorFloorUIItem.pool.has(modelPath)) { + let result = IndoorFloorUIItem.pool.get(modelPath); + let modelBox = BabylonTool.cloneMesh(result.meshBox as Mesh, result.meshBox.name + "111"); + modelBox.setEnabled(true); + return modelBox; + } + else { + return null; + } + } + + + //#endregion + +} + + + diff --git a/src/app/babylon/view/indoor-window/indoor-window.ts b/src/app/babylon/view/indoor-window/indoor-window.ts new file mode 100644 index 0000000..b0da5cc --- /dev/null +++ b/src/app/babylon/view/indoor-window/indoor-window.ts @@ -0,0 +1,281 @@ + +import { DataManager } from "../../controller/data-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { ServeManager } from "../../controller/serve-manager"; +import { BuildingStatus } from "../../controller/status/building-status"; +import { IndoorStatus } from "../../controller/status/indoor-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { BuildingPosType } from "../../model/data/model-data/model-data"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { TsTool } from "../../tool/ts-tool"; +import { MarkWindow } from "../mark-window/mark-window"; +import { UIBase } from "../window-base/ui-base"; +import { IndoorFloorUIItem } from "./indoor-floorui-item"; + + +//室内界面 +export class IndoorWindow extends UIBase { + + allFloorDatas: ModelEditData[]; + allFloorUIItems: IndoorFloorUIItem[] = []; + + currentFloorUIItem: IndoorFloorUIItem; + + refugeFloorNum: number;//避难层数目 + + indoorStatus: IndoorStatus; + + //#region 生命周期 + onInit() { + super.onInit(); + this.indoorStatus = StatusManager.getStatus(IndoorStatus); + } + + onOpen() { + super.onOpen(); + } + + onClose() { + super.onClose(); + } + //#endregion + + //#region 前端对接 + + /** + * 获取当前室内的避难层数目 + */ + getRefugeFloorNum() { + return this.refugeFloorNum; + } + + /** + * 返回室外 + * 来自UI + */ + onBtnToOutDoor(fromUI: boolean = true) { + BuildingStatus.changeStatusFromUI = fromUI; + if (fromUI && MarkWindow.instance != null && MarkWindow.instance.isShow && MarkWindow.instance.currentMarkNodeInfo != null) { + MarkWindow.instance.changeBuilding(true); + } + else { + StatusManager.enterStatus(BuildingStatus); + console.log("退出到室外"); + } + + } + /** + * 修改模型 + * @param file + * @param modelEditData + */ + changeModel(file: File[], modelEditData: ModelEditData) { + + if (file == null || file.length == 0) { + return; + } + let institutionKey = DataManager.institutionData.normalData.key; + let indoorData = modelEditData; + let buildingKey = StatusManager.getStatus(IndoorStatus).buildingInfo.buildingData.normalData.key; + let path = DataManager.getResPath_building(institutionKey, buildingKey, BuildingPosType.Indoor, indoorData.modelData.key); + // console.log("模型路径" + path); + let instance = this; + + let manifestFile: File = null; + if (indoorData.modelData.resName != null) { + + manifestFile = DataManager.createManifestFile(indoorData.modelData); + file.push(manifestFile);//临时关闭缓存文件 + } + + + ServeManager.instance.uploadFile(0, file, path, (name: string, path: string, currentfile: File) => { + + + if (TsTool.stringContain(name, ".gltf")) { + if (TsTool.stringContain(name, ".gltf.manifest")) { + //缓存文件,提取版本号 + DataManager.readFile_manifest(currentfile, (version: number) => { + indoorData.modelData.version = version; + // console.log("设置version" + version); + }); + } + else { + indoorData.modelData.resName = name; + indoorData.modelData.resPath = path; + + // console.log("上传室内:" + path + name); + + if (manifestFile == null) { + manifestFile = DataManager.createManifestFile(indoorData.modelData); + file.push(manifestFile);//临时关闭缓存文件 + } + } + } + } + , () => { + //ThreeDimensionalHomeComponent.instance.maskLayerService.sendMessage(false) + if (instance.currentFloorUIItem != null && modelEditData.modelData.key == instance.currentFloorUIItem.modelEditData.modelData.key) { + instance.currentFloorUIItem.updateBuilding(); + } + else { + let newItem = this.getFloorByKey(modelEditData.modelData.key); + //ThreeDimensionalHomeComponent.instance.selectLeftBuilding(newItem); + } + }); + } + + + + + //#endregion + + + + //初始化所有楼层 + initAllFloor(allFloorData: ModelEditData[], key: string) { + this.allFloorDatas = allFloorData; + this.updateFloorUIItem(key); + + + } + + + + //更新item + updateFloorUIItem(key: string) { + this.clearAllFloorUIItem(); + let defaultItem: IndoorFloorUIItem = null; + if (this.allFloorDatas != null) { + for (let i = 0; i < this.allFloorDatas.length; i++) { + let item = this.createOneFloorUIItem(this.allFloorDatas[i]); + if (this.allFloorDatas[i].modelData.key == key) { + defaultItem = item; + } + + if (this.allFloorDatas[i].isRefugeFloor) { + this.refugeFloorNum++; + } + } + } + + + if (defaultItem == null) { + if (this.allFloorUIItems.length > 0) { + this.selectFloor(this.getFirstIndexFloor(this.allFloorUIItems), false); + } + } + else { + this.selectFloor(defaultItem, false); + } + + } + + /** + * 获取最小序列的楼层 + * @param items + */ + getFirstIndexFloor(items: IndoorFloorUIItem[]) { + let index = 0; + for (let i = 0; i < items.length; i++) { + if (items[i].getIndoorIndex() < items[index].getIndoorIndex()) { + index = i; + } + } + return items[index]; + + } + + //创建单个楼层UIitem + createOneFloorUIItem(modelEditData: ModelEditData): IndoorFloorUIItem { + let result = new IndoorFloorUIItem(modelEditData, this); + this.allFloorUIItems.push(result); + return result; + } + + //删除室内层 + deleteFloor(indoorFloorUIItem: IndoorFloorUIItem) { + // console.log("试图删除"); + + for (let i = 0; i < this.allFloorDatas.length; i++) { + if (this.allFloorDatas[i] == indoorFloorUIItem.modelEditData) { + TsTool.arrayRemove(this.allFloorDatas, indoorFloorUIItem.modelEditData); + break; + } + } + + for (let i = 0; i < this.allFloorUIItems.length; i++) { + if (this.allFloorUIItems[i] == indoorFloorUIItem) { + this.allFloorUIItems[i].dispose(); + TsTool.arrayRemove(this.allFloorUIItems, indoorFloorUIItem); + // console.log("成功删除"); + break; + } + } + } + + //清空楼层item + clearAllFloorUIItem() { + // console.log("清空楼层item"+this.allFloorUIItems.length); + for (let i = 0; i < this.allFloorUIItems.length; i++) { + this.allFloorUIItems[i].dispose(); + } + this.allFloorUIItems = []; + this.refugeFloorNum = 0; + + } + + //选中某层 + selectFloor(floorUIItem: IndoorFloorUIItem, fromUI: boolean = true) { + + + if (fromUI && MarkWindow.instance != null && MarkWindow.instance.isShow) { + MarkWindow.instance.changeBuilding(false, this.indoorStatus.buildingInfo.buildingData.normalData.key, floorUIItem.modelEditData.modelData.key); + return; + } + + if (this.currentFloorUIItem == floorUIItem) { + // if (floorUIItem.buildingInfo != null) { + // BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, floorUIItem.buildingInfo.ModelInfo.modelBox); + // } + return; + } + else if (this.currentFloorUIItem != null) { + this.currentFloorUIItem.onSelect(false); + + } + + this.currentFloorUIItem = floorUIItem; + SceneManager.s_facilityInfoInSceneWindow.clearFacilityInfoUIItemes();//先清空 + this.currentFloorUIItem.onSelect(true); + } + + + + /** + * 根据key找item + * @param key + */ + getFloorByKey(key: string): IndoorFloorUIItem { + let result = null; + if (this.allFloorUIItems != null) { + for (let i = 0; i < this.allFloorUIItems.length; i++) { + if (this.allFloorUIItems[i].modelEditData.modelData.key == key) { + result = this.allFloorUIItems[i]; + break; + } + } + } + return result; + + } + + // /** + // * 摄像机注视中心 + // */ + // lookAtCenter(buildingInfo: ModelInfo_building) { + // if (buildingInfo != null && buildingInfo.modelBox != null) { + // BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, buildingInfo.modelBox); + // } + // } +} \ No newline at end of file diff --git a/src/app/babylon/view/institution/institution-create-window.ts b/src/app/babylon/view/institution/institution-create-window.ts new file mode 100644 index 0000000..d6f44e5 --- /dev/null +++ b/src/app/babylon/view/institution/institution-create-window.ts @@ -0,0 +1,190 @@ +import { Button, Control, Rectangle, StackPanel, TextBlock } from "@babylonjs/gui"; +import { LoginSatus } from "../../controller/status/login-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { InstitutionData, NormalData } from "../../model/data/institution/institution-data"; +import { InsitutionDataSimple } from "../../model/data/institution/institution-data-simple"; +import { MyInputText } from "../../tool/babylon-tool"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; + +import { UIBase } from "../window-base/ui-base"; + +//创建单位界面 +//由于还没有可存放多个单位信息的位置,先预留,暂时没实现 +export class InstitutionCreateWindow extends UIBase { + + insDataSimple: InsitutionDataSimple;//新单位简易信息 + insData: InstitutionData; //新单位的详细信息 + + //#region 声明周期 + onInit() { + super.onInit(); + + } + + onOpen() { + super.onOpen(); + this.initUI(); + } + + onClose() { + super.onClose(); + } + //#endregion + + //#region 创建新单位 + + //开始创建 + startCreate() { + this.insDataSimple = new InsitutionDataSimple(); + this.insDataSimple.key = "test3";//因不可重复,应该从服务器获得 + this.txt_keyValue.inputText.text = this.insDataSimple.key;//假装请求成功 + this.txt_keyValue.inputText.onTextChangedObservable.add(() => { + this.insDataSimple.key = this.txt_keyValue.inputText.text; + console.log("设置key" + this.insDataSimple.key); + }) + } + + //确定 + onbtnOK() { + this.insDataSimple.name = this.inputTxt_insName.inputText.text;//从输入框获取 + // console.log("onbtnOK==key" + this.insDataSimple.key); + // console.log("onbtnOK==name" + this.insDataSimple.name); + if (this.insDataSimple.name == null) { + console.log("请输入单位名称"); + } + else { + + this.insData = new InstitutionData(); + this.insData.normalData = new NormalData(this.insDataSimple.key, this.insDataSimple.name); + + console.log(this.insData.normalData); + this.saveNewIns(); + } + + } + + //保存新单位信息至服务器 + saveNewIns() { + let window = this; + let loginStatus = StatusManager.getStatus(LoginSatus); + loginStatus.saveNewIns(loginStatus, window.insData, window.insDataSimple.key, (insDataSimple) => { + loginStatus.closeCreateWindow(); + }); + } + + + + //#endregion + + //#region UI界面 + + inputTxt_insName: MyInputText;//名称输入框 + txt_keyValue: MyInputText;//唯一Key + btn_OK: Button;//确定创建 + btn_Cancle: Button;//取消 + + + + initUI() { + let window = this; + + this.root = new Rectangle("InstitutionCreateWindow"); + this.root.width = "300px"; + this.root.height = "382px"; + BabylonUIStyleTool.setDefaultStyle_windowRoot(this.root); + + UIManager.Instance.uiRoot.addControl(this.root); + + let title = new TextBlock("title", "新建单位"); + BabylonUIStyleTool.setStyle_size(title, "80px", "20px"); + BabylonUIStyleTool.setStyle_bodyText(title); + this.root.addControl(title); + BabylonUIStyleTool.setStyle_Alignment(title, Control.HORIZONTAL_ALIGNMENT_CENTER, Control.VERTICAL_ALIGNMENT_TOP); + BabylonUIStyleTool.setStyle_padding(title, "40px", undefined, undefined, undefined); + + let nameRoot = new StackPanel("nameRoor"); + BabylonUIStyleTool.setStyle_size(nameRoot, "200px", "300px"); + this.root.addControl(nameRoot); + BabylonUIStyleTool.setStyle_Alignment(nameRoot, Control.HORIZONTAL_ALIGNMENT_CENTER, Control.VERTICAL_ALIGNMENT_TOP); + BabylonUIStyleTool.setStyle_padding(nameRoot, "80px", undefined, undefined, undefined); + + let nameTxt = new TextBlock("nameTxt", "单位名称"); + BabylonUIStyleTool.setStyle_size(nameTxt, "200px", "20px"); + nameTxt.textVerticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + BabylonUIStyleTool.setStyle_bodyText(nameTxt, "16px", UIBase.color_black); + nameTxt.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + nameRoot.addControl(nameTxt); + + + this.inputTxt_insName = BabylonUIStyleTool.createInputText("input_name", nameRoot, "200px", "30px"); + + let padding = new Control(); + BabylonUIStyleTool.setStyle_size(padding, "200px", "20px"); + nameRoot.addControl(padding); + + let keyTxt = new TextBlock("keyTxt", "唯一key,仅供测试可见"); + BabylonUIStyleTool.setStyle_size(keyTxt, "200px", "20px"); + keyTxt.textVerticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + BabylonUIStyleTool.setStyle_bodyText(keyTxt, "16px", UIBase.color_black); + keyTxt.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + nameRoot.addControl(keyTxt); + keyTxt.alpha = 0.5; + + this.txt_keyValue = BabylonUIStyleTool.createInputText("keyValueTxt", nameRoot, "200px", "20px", "black", undefined, undefined, BabylonUIStyleTool.c_color_gray, "black", BabylonUIStyleTool.c_color_gray); + // BabylonUIStyleTool.setStyle_size(this.txt_keyValue, "200px", "20px"); + // this.txt_keyValue.textVerticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + // BabylonUIStyleTool.setStyle_bodyText(this.txt_keyValue, "14px", UIBase.color_black); + // this.txt_keyValue.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + // nameRoot.addControl(this.txt_keyValue); + // this.txt_keyValue.alpha = 0.7; + this.txt_keyValue.inputText.onTextChangedObservable.add(() => { + window.insDataSimple.key = window.txt_keyValue.inputText.text; + }); + + let btnRoot = new StackPanel("btnRoot"); + btnRoot.isVertical = false; + this.root.addControl(btnRoot); + BabylonUIStyleTool.setStyle_size(btnRoot, "240px", "70px"); + BabylonUIStyleTool.setStyle_Alignment(btnRoot, Control.HORIZONTAL_ALIGNMENT_CENTER, Control.VERTICAL_ALIGNMENT_BOTTOM); + BabylonUIStyleTool.setStyle_padding(btnRoot, undefined, undefined, "30px"); + + + let padding_btn = new Control("padding_btn"); + BabylonUIStyleTool.setStyle_size(padding_btn, "10px", "36px"); + btnRoot.addControl(padding_btn); + + this.btn_OK = BabylonUIStyleTool.createBtn_OK("OK", "确定", "100px", "36px", "18px"); + btnRoot.addControl(this.btn_OK); + + this.btn_OK.onPointerClickObservable.add(() => { + window.onbtnOK(); + }) + + let padding_btn1 = new Control("padding_btn1"); + BabylonUIStyleTool.setStyle_size(padding_btn1, "20px", "36px"); + btnRoot.addControl(padding_btn1); + + this.btn_Cancle = BabylonUIStyleTool.createBtn_Cancel("Cancel", "取消", "100px", "36px", "18px"); + btnRoot.addControl(this.btn_Cancle); + this.btn_Cancle.onPointerClickObservable.add(() => { + window.onBtnClose(); + }) + + + } + + onBtnClose() { + let loginStatus = StatusManager.getStatus(LoginSatus); + loginStatus.closeCreateWindow(); + loginStatus.openSelectWindow(); + } + + + + //#endregion + + + + +} \ No newline at end of file diff --git a/src/app/babylon/view/institution/institution-item.ts b/src/app/babylon/view/institution/institution-item.ts new file mode 100644 index 0000000..004e51f --- /dev/null +++ b/src/app/babylon/view/institution/institution-item.ts @@ -0,0 +1,59 @@ +import { Button, Rectangle, StackPanel } from "@babylonjs/gui"; +import { InsitutionDataSimple } from "../../model/data/institution/institution-data-simple"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; + +import { UIBase } from "../window-base/ui-base"; +import { InstitutionSelectWindow } from "./institution-select-window"; + +export class InstitutionItem { + root: Rectangle; + window: InstitutionSelectWindow;//单位选择界面 + insData: InsitutionDataSimple;//单位简易信息 + + btn_select: Button; + constructor(window: InstitutionSelectWindow, parent: StackPanel, insitutionDataSimple: InsitutionDataSimple) { + this.window = window; + this.insData = insitutionDataSimple; + + if (this.insData == null) { + this.insData = new InsitutionDataSimple(); + this.insData.name = "+新建单位"; + this.insData.key = undefined; + } + + + this.root = new Rectangle("InstitutionItem"); + BabylonUIStyleTool.setStyle_size(this.root, parent.width + "px", "40px"); + this.root.color = UIBase.color_blue; + parent.addControl(this.root); + + let name = "null"; + if (this.insData.name != null) { + name = this.insData.name; + } + this.btn_select = Button.CreateSimpleButton("select", name); + let item = this; + this.btn_select.onPointerClickObservable.add(() => { + item.onSelect(); + }); + this.root.addControl(this.btn_select); + + // let text = this.btn_select.textBlock; + // text.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + + } + + //选择单位 + onSelect() { + console.log("选择单位" + this.insData.name); + + this.window.onSelectIns(this); + + } + + //新建单位 + onNewSelect() { + console.log("新建单位"); + } + +} \ No newline at end of file diff --git a/src/app/babylon/view/institution/institution-select-window.ts b/src/app/babylon/view/institution/institution-select-window.ts new file mode 100644 index 0000000..abb8143 --- /dev/null +++ b/src/app/babylon/view/institution/institution-select-window.ts @@ -0,0 +1,217 @@ +import { Control, Rectangle, TextBlock } from "@babylonjs/gui"; +import { ServeManager } from "../../controller/serve-manager"; +import { LoginSatus } from "../../controller/status/login-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { InsitutionDataSimple } from "../../model/data/institution/institution-data-simple"; +import { MyScrollView } from "../../tool/babylon-tool"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; +import { TsTool } from "../../tool/ts-tool"; +import { UIBase } from "../window-base/ui-base"; +import { InstitutionItem } from "./institution-item"; + +//单位选择界面 +export class InstitutionSelectWindow extends UIBase { + + loginStatus: LoginSatus; + //单位列表 + insItemList: InstitutionItem[] = []; + allInsRoot: Rectangle; + + + //选择单位成功的回调 + onSelectInsSuccess: (simpleData: InsitutionDataSimple) => void; + + //#region ui声明周期 + + onInit() { + this.loginStatus = StatusManager.getStatus(LoginSatus); + super.onInit(); + + } + + onOpen() { + super.onOpen(); + } + + onClose() { + super.onClose(); + } + + //#endregion + + //#region 外部方法 + + //获取单位列表,并注册完成选择的回调 + getInsList(onSuccess?: (simpleData: InsitutionDataSimple) => void) { + this.getInstitutionListFromServe(this.onGetInsListSuccess); + this.onSelectInsSuccess = onSuccess; + + } + + //#endregion + + + + //#region 数据获取 + //从服务器获取单位列表 + private getInstitutionListFromServe(onSuccess?: (result: InsitutionDataSimple[], window: InstitutionSelectWindow) => void) { + + let window = this; + this.loginStatus.getInstitutionListFromServe((result) => { + if (onSuccess) { + onSuccess(result, window); + } + }); + // let debugList: any | InsitutionDataSimple[] = []; + // // let testIns1 = new InsitutionDataSimple(); + // // testIns1.key = "test"; + // // testIns1.name = "测试单位1"; + // // debugList.push(testIns1); + // let window = this; + // ServeManager.instance.getInstitutionData("InsList", (key, data) => { + // debugList = plainToClass(InsitutionDataSimple, data); + + // console.log("单位列表获取到了"); + // console.log(debugList); + // if (onSuccess) { + // onSuccess(debugList, window); + // } + // }, (key: string, error: string) => { + // console.error("获取单位列表失败"); + // console.log(error); + // return; + // }) + } + + + + //获取单位列表成功 + onGetInsListSuccess(result: InsitutionDataSimple[], window: InstitutionSelectWindow) { + console.log(window); + window.loginStatus.institutionList = result; + window.initUI(); + + } + //#endregion + + //#region 界面部分 + initUI() { + console.log("开启界面:单位列表"); + console.log(this.loginStatus.institutionList); + let window = this; + this.root = new Rectangle("InstitutionSelectWindow"); + this.root.width = "300px"; + this.root.height = "382px"; + BabylonUIStyleTool.setDefaultStyle_windowRoot(this.root); + + UIManager.Instance.uiRoot.addControl(this.root); + + let title = new TextBlock("title", "选择单位"); + BabylonUIStyleTool.setStyle_size(title, "80px", "20px"); + BabylonUIStyleTool.setStyle_bodyText(title); + this.root.addControl(title); + BabylonUIStyleTool.setStyle_Alignment(title, Control.HORIZONTAL_ALIGNMENT_CENTER, Control.VERTICAL_ALIGNMENT_TOP); + BabylonUIStyleTool.setStyle_padding(title, "40px", undefined, undefined, undefined); + + + this.updateList(); + + + } + + //更新列表 + updateList() { + + if (this.allInsRoot != null) { + this.allInsRoot.dispose(); + this.allInsRoot = null; + } + let window = this; + + this.allInsRoot = new Rectangle("allInsRoot"); + let allInsRoot = this.allInsRoot; + this.root.addControl(allInsRoot); + BabylonUIStyleTool.setStyle_size(allInsRoot, "220px", "340px"); + BabylonUIStyleTool.setStyle_Alignment(allInsRoot, Control.VERTICAL_ALIGNMENT_CENTER, Control.VERTICAL_ALIGNMENT_TOP); + BabylonUIStyleTool.setStyle_padding(allInsRoot, "60px"); + // allInsRoot.background = "gray"; + + let scrollview = new MyScrollView("sc_allIns", allInsRoot); + // scrollview.scrollView.background = "yellow"; + for (let i = 0; i < this.loginStatus.institutionList.length; i++) { + console.log("InstitutionItem" + this.loginStatus.institutionList[i].name); + let item = new InstitutionItem(this, scrollview.container, this.loginStatus.institutionList[i]); + this.insItemList.push(item); + } + + //新建单位 + let newItem = new InstitutionItem(this, scrollview.container, null); + this.insItemList.push(newItem); + + + let btn_clear = BabylonUIStyleTool.createBtn_OK("clear", "清除test", "100px", "20px", "15px"); + this.root.addControl(btn_clear); + btn_clear.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_clear.onPointerClickObservable.add(() => { + window.btn_ClearTest(); + }); + + } + + + //#endregion + + + //选择完单位 + onSelectIns(item: InstitutionItem) { + + if (item.insData.key == null) //新建单位 + { + console.log("新建单位"); + StatusManager.getStatus(LoginSatus).onNewIns(); + } + else { + if (this.onSelectInsSuccess) { + this.onSelectInsSuccess(item.insData); + } + } + + } + + //清空测试 test + btn_ClearTest() { + + for (let i = 0; i < this.loginStatus.institutionList.length; i++) { + + if (this.loginStatus.institutionList[i].key == null + // || TsTool.stringContain(this.loginStatus.institutionList[i].key, "test3") + ) { + TsTool.arrayRemove(this.loginStatus.institutionList, this.loginStatus.institutionList[i]); + i--; + } + } + + let window = this; + ServeManager.instance.saveInstitutionListData(this.loginStatus.institutionList, () => { + window.updateList(); + }); + } + + + +} + +class AnimTest { + value: number; + + get Value() { + return this.value; + } + + set Value(num: number) { + this.value = num; + + console.log("AnimTest set value " + this.value); + } +} \ No newline at end of file diff --git a/src/app/babylon/view/mark-window/mark-window.ts b/src/app/babylon/view/mark-window/mark-window.ts new file mode 100644 index 0000000..07bc6b2 --- /dev/null +++ b/src/app/babylon/view/mark-window/mark-window.ts @@ -0,0 +1,1447 @@ + +import { AbstractMesh, Mesh, MeshBuilder, ParticleHelper, ThinEngine, Tools, Vector3 } from "@babylonjs/core"; +import { PointerEventTypes, PointerInfo } from "@babylonjs/core/Events/pointerEvents"; +import { EventState, Observer } from "@babylonjs/core/Misc/observable"; +import { classToClass } from "class-transformer"; +import { DataManager } from "../../controller/data-manager"; +import { EventManager } from "../../controller/event-manager/event-manager"; +import { Event_GetAllMarkPlanData } from "../../controller/event-manager/events/event-get-markplandata-success"; +import { Event_KeyboardInput } from "../../controller/event-manager/events/event-keyboard-input"; +import { Event_MarkInfoChange, MarkInfoChangeType } from "../../controller/event-manager/events/event-mark-info-change"; +import { InputController } from "../../controller/inputController"; +import { SceneManager } from "../../controller/scene-manager"; +import { BuildingStatus } from "../../controller/status/building-status"; +import { IndoorStatus } from "../../controller/status/indoor-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { ArcRotateCameraData } from "../../model/data/camera-data"; +import { MarkData, MarkTagPos, MarkType } from "../../model/data/mark/mark-data"; +import { AllMarkPlanData, MarkNodeData, MarkPlanData, WeatherType, WindDirectionType, EnvironmentData, NatureData } from "../../model/data/mark/mark-plan-data"; +import { ModelType } from "../../model/data/model-data/model-data"; +import { FacilityType } from "../../model/data/model-data/model-data-facility"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { MarkNodeInfo } from "../../model/info/mark/mark-plan-info"; +import { ModelInfo_mark } from "../../model/info/mark/model-info-mark"; +import { ModelInfo_building } from "../../model/info/model/model-info-building"; +import { ModelInfo_facility } from "../../model/info/model/model-info-facility"; +import { LoadTool } from "../../tool/load-tool"; +import { MeshPool, MeshPoolInfo } from "../../tool/mesh-pool"; +import { ParticleSystemTool } from "../../tool/particle-system-tool"; +import { BuildingUIItem } from "../building-window/building-ui-item"; +import { IndoorFloorUIItem } from "../indoor-window/indoor-floorui-item"; +import { UIBase } from "../window-base/ui-base"; +import { WeatherTool } from "./weather-tool"; + + + +export class MarkWindow extends UIBase { + + static instance: MarkWindow; + static s_cameraData: ArcRotateCameraData = null;//预定义的相机数据 + static s_preLoadMesh: boolean = false;//预加载所有标绘物(如果是false,则在选中每个标绘物的时候,进行预加载单个) + + /** + * 天气工具 + */ + weatherTool: WeatherTool; + + /** + * 喷水特效路径 + */ + static readonly c_water_particlePath = "assets/particlesystem/water/water.json"; + + enterIndoorObserver: Observer; //进入室内的监听者(一次性,用于选中节点切换时) + enterOutDoorObserver: Observer;//进入室外的监听者(一次性,用于选中节点切换时) + + s_startEnterIndoorObserver: Observer; //开始进入室内的监听者(因UI操作切换) + s_enterIndoorObserver: Observer; //进入室内的监听者(因UI操作切换) + + s_starteEnterOutDoorObserver: Observer;//开始进入室外的监听者(因UI操作切换) + s_enterOutDoorObserver: Observer;//进入室外的监听者(因UI操作切换) + + /** + * 中断一次线的创建 ,0表示可以开始创建,1-表示正在绘制, -1 表示阻止绘制 + */ + markLineIsBreak: number = -1; + + /** + * 多点线段——水带, 0-表示可以开始,1-表示正在绘制,-1 表示阻止绘制 + */ + mulLineIsBreak_SD: number = -1; + + /** + * 进攻路线 0-表示可以开始,1-表示正在绘制,-1 表示阻止绘制 + */ + mulArrowIsBreak_JG: number = -1; + + /** + * 撤退路线 0-表示可以开始,1-表示正在绘制,-1 表示阻止绘制 + */ + mulArrowIsBreak_CT: number = -1; + + /** + * 所有的标绘方案数据 + */ + allMarkPlanData: AllMarkPlanData; + + + /** + * 当前节点的拷贝信息,用于还原 + */ + currentMarkNodeDataCopy: MarkNodeData; + + /** + * 当前节点的信息 + */ + currentMarkNodeInfo: MarkNodeInfo; + + /** + * 当前选中的素材实例(运行时数据) + */ + currentMarkInfo: ModelInfo_mark; + + /** + * 当前选中的素材预制体 + */ + currentMarkDataPrefab: MarkData; + // /** + // * 所有标绘物的预制体 + // */ + // allMarkPrefabInfo: AllMarkInfo = new AllMarkInfo(); + + isPickDown: boolean = false; //按下了 + + /** + * 是否显示名称 + */ + isShowProperty3d: boolean = true; + + /** + * 是否显示水源 + */ + isShowWaterSource = false; + + //#region 生命周期 + + onInit() { + super.onInit(); + MarkWindow.instance = this; + let instance = this; + instance.initPickEvent(); + instance.initKeyboardInput(); + ParticleSystemTool.Init(SceneManager.Instance.scene); + + ParticleSystemTool.instance.loadPrefab("water", MarkWindow.c_water_particlePath, false); //预加载喷水 + + this.preLoadMesh(); + // 创建输入控制器 + const control = new InputController(SceneManager.Instance.scene); + + DataManager.initMarkData((data: AllMarkPlanData) => { + instance.onGetAllMarkPlanData(data); + MarkWindow.instance.selectMarkNode(null, null, true); //模拟选中空节点,创建游离节点 + console.log("标绘信息", data); + }); + + this.weatherTool = new WeatherTool(SceneManager.Instance.defaultCamera, SceneManager.Instance.scene); + + + + } + + + + onOpen() { + super.onOpen(); + + } + + onClose() { + super.onClose(); + + + } + + onHide() { + super.onHide(); + this.selectMarkNode(null, null); + + } + + onShow() { + super.onShow(); + } + //#endregion + + + //#region 与前端通信 + + //请先监听 Event_GetAllMarkPlanData 事件,获取单位的标绘方案数据成功的事件。 + // 注意EventManager 的引用路径: import { EventManager } from "src/babylon/controller/event-manager/event-manager"; + // EventManager.addListener(Event_GetAllMarkPlanData,(data:Event_GetAllMarkPlanData)=> + // { + // //从服务器获取到方案数据 + // }) + + //开启界面后,直接使用 MarkWindow.instance 访问实例对象 + + /** + * 开启界面 + */ + static openWindow(): MarkWindow { + if (MarkWindow.instance == null) { + SceneManager.s_markWindow = UIManager.open(MarkWindow); + } + else { + UIManager.show(MarkWindow.instance); + MarkWindow.instance.selectMarkNode(null, null, true); //模拟选中空节点,创建游离节点 + } + + + + return MarkWindow.instance; + } + + /** + * 关闭界面 + */ + static closeWindow() { + + if (MarkWindow.instance != null) { + MarkWindow.instance.shouWaterSource(false); + UIManager.hide(MarkWindow.instance); + } + console.log("退出沙盘"); + } + + /** + * 整体保存当前单位的标绘数据 + * 先整体保存 + */ + saveAllMarkPlanData() { + + // this.savCurrentNodeData(); + DataManager.saveallMarkPlanData(); + // if (this.currentMarkNodeInfo != null) { + // this.currentMarkNodeDataCopy = classToClass(this.currentMarkNodeInfo.nodeData); //更新备份数据 + // } + } + + /** + * 保存至已有节点 + * @param markPlanId 方案id,一级节点ID + * @param nodeId 节点id,二级节点id + */ + saveToOldNode(markPlanId: number, nodeId: number) { + let markPlaneData = DataManager.allMarkPlanData.getMarkPlanById(markPlanId); + if (markPlaneData == null) { + console.error("没找到标绘方案:" + markPlanId) + return null; + } + this.savCurrentNodeData(this.currentMarkNodeDataCopy); + let oldNodeData = markPlaneData.getNodeById(nodeId); + let copyNodeData = classToClass(this.currentMarkNodeDataCopy);//覆盖数据 + copyNodeData.id = oldNodeData.id; + copyNodeData.index = oldNodeData.index; + copyNodeData.name = oldNodeData.name; + markPlaneData.setNodeData(nodeId, copyNodeData);//覆盖数据 + + this.saveAllMarkPlanData(); + } + + /** + * 新建新节点并保存 + * @param markPlanId 方案id,一级节点ID + * @param name 新节点名称 + */ + createNewNodeAndSave(markPlanId: number, name: string) { + let newNode = this.createMarkNodeData(markPlanId, name); + this.saveToOldNode(markPlanId, newNode.id); + } + + + /** + * 在沙盘节点中点击UI、 切换楼层或室内外,相当于清空 + */ + changeBuilding(isOutdoor: boolean = false, buildingId: string = null, floorId: string = null) { + console.log("沙盘内切换", isOutdoor, buildingId, floorId); + if (this.currentMarkNodeInfo == null) { + + this.selectMarkNode(null, null, true); + + return; + } + else { + + let environmentData = this.currentMarkNodeInfo.nodeData.getEnvironmentDataByValue(isOutdoor, buildingId, floorId); + if (environmentData == null) { + //新增环境 + environmentData = this.currentMarkNodeInfo.nodeData.addEnvironment(buildingId, isOutdoor, floorId); + } + else { + //已有环境 + } + environmentData.isNow = true; + + this.currentMarkNodeInfo.nodeData.changeNowEnvironmentData(environmentData.id); + + let belongToPlanID = null; + if (this.currentMarkNodeInfo.belongToPlanData != null) { + belongToPlanID = this.currentMarkNodeInfo.belongToPlanData.id; + } + + this.selectMarkNode(belongToPlanID, this.currentMarkNodeInfo.nodeData.id, true); + + } + } + + /** + * 选中具体的方案子节点 + * @param planId 方案 + * @param nodeId 节点 + * @param changeBuildingByUI 是否在沙盘状态下,点UI切层、建筑 + */ + selectMarkNode(planId: number, nodeId: number, changeBuildingByUI: boolean = false) { + // //还原数据 + // if (this.currentMarkNodeDataCopy != null && reData) { + // let oldPlaneData = this.currentMarkNodeInfo.belongToPlanData; + // oldPlaneData.setNodeData(this.currentMarkNodeDataCopy.id, this.currentMarkNodeDataCopy); + // this.currentMarkNodeDataCopy = null; + // } + + let nodeCopy: MarkNodeData; + if (changeBuildingByUI) //从ui点击切层, + { + console.log(this.currentMarkNodeInfo); + if (this.currentMarkNodeInfo == null)//没有当前的markInfo,创建一个游离的节点 + { + console.log("拷贝游离节点"); + nodeCopy = this.createLeaveNode(); + this.savCurrentNodeData(nodeCopy); + } + else //并且当前有拷贝的markinfo + { + nodeCopy = classToClass(this.currentMarkNodeInfo.nodeData); + } + } + + //更新新节点 + let markPlanData = DataManager.allMarkPlanData.getMarkPlanById(planId); + this.clearNodeInfo(); + if (markPlanData != null) { //表示不是取消选中 + if (nodeCopy == null) { + nodeCopy = classToClass(markPlanData.getNodeById(nodeId)); + } + } + else { + if (nodeCopy == null) { + console.log("拷贝游离节点 2"); + nodeCopy = this.createLeaveNode(); + this.savCurrentNodeData(nodeCopy); + } + + } + + + if (nodeCopy != null) { + //清空 + this.currentMarkNodeDataCopy = nodeCopy;//更新备份数据 + this.currentMarkNodeInfo = new MarkNodeInfo(markPlanData, this.currentMarkNodeDataCopy); + //this.currentMarkNodeDataCopy = classToClass(this.currentMarkNodeInfo.nodeData); //更新备份数据 + this.updateNodeInfo(); + } + + } + + + /** + * 新建方案(一级节点) + * @param name 新方案名称 + */ + createMarkPlaneData(name: string): MarkPlanData { + let result = DataManager.allMarkPlanData.createPlanData(name); + return result; + } + + /** + * 删除方案 + * @param id + */ + deleteMarkPlaneData(id: number) { + if (this.currentMarkNodeInfo != null) { + this.currentMarkNodeInfo.clearAllMarkDataAndInfo(); + } + this.currentMarkNodeInfo = null; + this.currentMarkNodeDataCopy = null; + + DataManager.allMarkPlanData.deletePlanData(id); + this.saveAllMarkPlanData(); + } + + + /** + * 新建标绘节点(二级节点) + * @param markPlanId 要在哪个方案下新建节点 + * @param name 新建的节点名称 + */ + createMarkNodeData(markPlanId: number, name: string) { + + let markPlaneData = DataManager.allMarkPlanData.getMarkPlanById(markPlanId); + if (markPlaneData == null) { + console.error("没找到标绘方案:" + markPlanId) + return null; + } + + let result = markPlaneData.createMarkNode(name); + this.savCurrentNodeData(result); + + return result; + } + + /** + * 删除标绘节点(二级节点) + * @param markPlanId 要删哪个方案下的节点 + * @param id 节点的id + */ + deleteMarkNodeData(markPlanId: number, id: number) { + let markPlan = DataManager.allMarkPlanData.getMarkPlanById(markPlanId); + if (markPlan == null) { + console.error("没找到方案:" + markPlanId + "==无法删除节点" + id); + } + else { + + // if (this.currentMarkNodeInfo != null && this.currentMarkNodeInfo.nodeData.id == id) { + // this.currentMarkNodeInfo.clearAllMarkDataAndInfo(); + // this.currentMarkNodeInfo = null; + // this.currentMarkNodeDataCopy = null; + // } + markPlan.deleteMarkNode(id); + this.saveAllMarkPlanData(); + + } + } + + /** + * 选中标记素材模板(由前端调用) + * @param select + */ + selectMarkDataPrefab(select: boolean, data: MarkData) { + if (select) { + this.currentMarkDataPrefab = data; + + this.preLoadOneMesh(data); + + } + else { + this.currentMarkDataPrefab = null; + } + this.setMultiPointOnSelectPrefab(select, data) + } + + + /** + * 选中标绘素材模板 (从前端通知3d) + * @param markData + * @param select + */ + selectMarkDataPrefabFrom3d(markData: MarkData, select: boolean) { + //通知前端 (一般是右键取消) 最后需要其调用 selectMarkDataPrefab + if (select) { + + } + else { + if (markData != null) { + this.selectMarkDataPrefab(false, markData) + //ThreeDimensionalHomeComponent.instance.beforeOneIcon = null + } + this.mulLineIsBreak_SD = -1; + this.markLineIsBreak = -1; + this.mulArrowIsBreak_JG = -1; + this.mulArrowIsBreak_CT = -1; + } + + } + + + + /** + * 选中标绘素材实例(由前端调用) + * @param markData + * @param select + */ + selectMarkData(markData: MarkData, select: boolean) { + if (select) { + let markInfo = this.currentMarkNodeInfo.getMarkInfo(markData.tagPos, markData.type, markData.key); + + if (this.currentMarkInfo != null && this.currentMarkInfo != markInfo) { + this.currentMarkInfo.onSelect(false); + } + this.currentMarkInfo = markInfo; + markInfo.onSelect(select); + } + else { + if (this.currentMarkInfo != null) { + this.currentMarkInfo.onSelect(false); + } + this.currentMarkInfo = null; + } + + } + + /** + * 选中标绘素材实例 (从3d通知前端) + * @param markData + * @param select + */ + // markInfo.markData //通知前端 最后需要其调用 selectMarkData + selectMarkDataFrom3d(markInfo: ModelInfo_mark, select: boolean) { + if (select) { + //ThreeDimensionalHomeComponent.instance.selectSandTableMark(markInfo.markData, select) + } + else { + if (markInfo != null) { + //ThreeDimensionalHomeComponent.instance.selectSandTableMark(markInfo.markData, select) + } + } + + } + + /** + * 打开属性界面 + */ + openProperty(markInfo: ModelInfo_mark) { + if (markInfo != null) { + //ThreeDimensionalHomeComponent.instance.getSandTableNature(markInfo.markData); + } + } + + /** + * 更新属性 + * @param markInfo + */ + updateProperty() { + if (this.currentMarkInfo != null) { + this.currentMarkInfo.updateProperty(); + } + } + + /** + * 显示三维属性 + * @param show + */ + showProperty3d(show: boolean) { + this.currentMarkNodeInfo.markInfos.forEach((value: ModelInfo_mark[], key: MarkTagPos) => { + for (let i = 0; i < value.length; i++) { + value[i].showFollowUI(show); + } + }); + this.isShowProperty3d = show; + } + + /** + * 清空力量 + */ + clearForce() { + if (this.currentMarkNodeInfo != null) { + this.currentMarkNodeInfo.clearAllMarkDataAndInfo(); + } + this.saveAllMarkPlanData(); + } + + + + /**显示水源 */ + shouWaterSource(show: boolean) { + this.isShowWaterSource = show; + let facility_water: ModelInfo_facility[] = []; + + let buildingWindow = StatusManager.getStatus(BuildingStatus).buildingWindow; + let buildingUIItems = buildingWindow.buildingUIItems; + if (buildingUIItems != null) { + for (let i = 0; i < buildingUIItems.length; i++) { + let l_item = buildingUIItems[i]; + facility_water = facility_water.concat(this.getAllWaterSource(l_item.buildingInfo.ModelInfo)); + } + } + + + + if (StatusManager.s_currentStatus instanceof IndoorStatus) { + let indoorWindow = StatusManager.s_currentStatus.indoorWindow; + let indoorUIItem = indoorWindow.currentFloorUIItem; + // console.log(indoorUIItem.buildingInfo); + + if (indoorUIItem.buildingInfo != null) { + facility_water = facility_water.concat(this.getAllWaterSource(indoorUIItem.buildingInfo.ModelInfo)); + + } + + + } + + for (let i = 0; i < facility_water.length; i++) { + facility_water[i].showFollowUI(show); + } + + } + + /** + * 获取当前节点的原数据 + */ + getCurrentNodeData() { + if (this.currentMarkNodeInfo == null) { + return null; + } + else { + return this.currentMarkNodeInfo.nodeData; + } + + } + + /** + * 改变自然-天气 + */ + changeNature_weater(weather: WeatherType) { + if (this.currentMarkNodeInfo == null) { + return; + } + this.currentMarkNodeInfo.nodeData.natureData.weather = weather; + this.changeNatureEffect(true, this.currentMarkNodeInfo.nodeData.natureData); + + } + + /** + * 改变温度 + * @param temperature + */ + changeNature_temperature(temperature: number) { + if (this.currentMarkNodeInfo == null) { + return; + } + this.currentMarkNodeInfo.nodeData.natureData.temperature = temperature; + this.changeNatureEffect(true, this.currentMarkNodeInfo.nodeData.natureData); + } + + /** + * 改变风向 + * @param temperature + */ + changeNature_windDirection(windDirection: WindDirectionType) { + if (this.currentMarkNodeInfo == null) { + return; + } + this.currentMarkNodeInfo.nodeData.natureData.windDirection = windDirection; + this.changeNatureEffect(true, this.currentMarkNodeInfo.nodeData.natureData); + } + + /** +* 改变风速 +* @param temperature +*/ + changeNature_windPower(windPower: number) { + if (this.currentMarkNodeInfo == null) { + return; + } + this.currentMarkNodeInfo.nodeData.natureData.windPower = windPower; + } + + + + + + //#endregion + + + + //#region 事件、回调类 + + + //初始化pick事件 + initPickEvent() { + let instance = this; + SceneManager.Instance.scene.onPointerObservable.add( + instance.onPointerObservable + ); + } + + + /** + * 点击事件的监听 + * @param eventData + * @param eventState + */ + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = MarkWindow.instance; + if (!instance.isShow) { + return; + } + + let pickMesh: AbstractMesh = null; + + let readyCreateMark = false;//准备创建标绘物 如果点在了标绘物上,就不创建(除了水带) + let pickPos: Vector3 = null; + + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + instance.isPickDown = false; + if (eventData.event.button == 0) { //左键正常 + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + if (instance.currentMarkDataPrefab != null) { + let worldPos = eventData.pickInfo.pickedPoint; + if (instance.currentMarkDataPrefab.type == MarkType.JJX) { + if (instance.markLineIsBreak > 0) { + instance.markLineIsBreak = 0; + return; + } + else { + instance.markLineIsBreak = 1; + } + } + else if (instance.currentMarkDataPrefab.type == MarkType.SD) { + if (instance.mulLineIsBreak_SD > 0) { + return; + } + else { + instance.mulLineIsBreak_SD = 1; + } + } + else if (instance.currentMarkDataPrefab.type == MarkType.JGLX) { + if (instance.mulArrowIsBreak_JG > 0) { + return; + } + else { + instance.mulArrowIsBreak_JG = 1; + } + } + else if (instance.currentMarkDataPrefab.type == MarkType.CT) { + if (instance.mulArrowIsBreak_CT > 0) { + return; + } + else { + instance.mulArrowIsBreak_CT = 1; + } + + } + readyCreateMark = true; + pickPos = worldPos; + pickMesh = eventData.pickInfo.pickedMesh; + // return; + + } + } + // if (!SceneManager.s_isPointerDrag && !ToolbarWindow.instance.isMeshAdsorb) { + // GizmoTool.onPickMeshInfoObservable.notifyObservers(null);//取消之前选择 + // } + } + else { //右键取消 + // instance.selectMarkDataFrom3d(instance.currentMarkInfo, false); //暂时没有右键取消选中实例的功能 + if (!SceneManager.s_isPointerDrag) { + instance.selectMarkDataPrefabFrom3d(instance.currentMarkDataPrefab, false) + + + } + } + break; + case PointerEventTypes.POINTERDOWN: + if (eventData.pickInfo.hit && !instance.isPickDown) { + pickMesh = eventData.pickInfo.pickedMesh; + instance.isPickDown = true; + } + + break; + case PointerEventTypes.POINTERPICK: + if (eventData.pickInfo.hit) { + pickMesh = eventData.pickInfo.pickedMesh; + } + break; + case PointerEventTypes.POINTERDOUBLETAP: + + if (eventData.pickInfo.hit) { + pickMesh = eventData.pickInfo.pickedMesh; + } + break; + } + + if (pickMesh != null) { + //是标绘物 + let l_markInfo = instance.getMarkInfoFromMesh(eventData.pickInfo.pickedMesh); + if (l_markInfo != null) { + if (readyCreateMark == true && instance.currentMarkDataPrefab.type != MarkType.SD) //水带的起点是可以在分水器上的 + { + readyCreateMark = false; + } + + if (eventData.type == PointerEventTypes.POINTERDOUBLETAP) { + //双击标绘物,打开任务界面 + instance.openProperty(l_markInfo); + } + else if (eventData.type == PointerEventTypes.POINTERDOWN) { + if (eventData.event.button == 0)//左键 + { + if (!instance.isCreateMultiPointMark()) { + instance.selectMarkDataFrom3d(l_markInfo, true); + } + } + } + else if (eventData.type == PointerEventTypes.POINTERPICK) { + if (eventData.event.button == 0)//左键 + { + if (!instance.isCreateMultiPointMark()) { + //instance.selectMarkDataFrom3d(l_markInfo, true); + } + + } + else if (eventData.event.button == 1) {//中键 + //聚焦 + l_markInfo.lookAt(); + } + else { + + } + + } + } + else { + // console.log("不是标绘物", pickMesh); + } + + } + if (readyCreateMark) { + instance.createNewMark(pickPos, instance.currentMarkDataPrefab, true); + } + } + + + + + /** + * 从服务器获取到所有的标绘信息 + * @param data + */ + onGetAllMarkPlanData(data: AllMarkPlanData) { + this.allMarkPlanData = data; + //DisposalPlanComponent.instance.allMarkPlanData = this.allMarkPlanData + Event_GetAllMarkPlanData.dispatch(true, data); + } + + + /** + * 初始化键盘输入 + */ + initKeyboardInput() { + let instance = this; + EventManager.addListener(Event_KeyboardInput, (eventData: Event_KeyboardInput) => { + instance.onKeyboardInput(eventData); + }) + + } + + /** + * 接收到键盘事件 + * @param eventData + */ + onKeyboardInput(eventData: Event_KeyboardInput) { + if (eventData.data.key == "Delete") // 删除。 后期看是否加入 Backspace 退格 + { + this.deleteMarkInfo(this.currentMarkInfo); + } + } + + + + //#endregion + + //#region 查询类 + + + //获取当前选中的建筑信息 + getCurrentBuildingInfo(): BuildingInfo { + let buildingInfo: BuildingInfo = null; + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + buildingInfo = StatusManager.getStatus(BuildingStatus) + .buildingWindow.currentBuidngItem.buildingInfo; + } else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + buildingInfo = StatusManager.getStatus(IndoorStatus) + .indoorWindow.currentFloorUIItem.buildingInfo; + } + + return buildingInfo; + } + + /** + * 根据mesh,查找 + * @param mesh + */ + getMarkInfoFromMesh(mesh: AbstractMesh) { + if (mesh == null) { + return null; + } + + let result: ModelInfo_mark = null; + + if (this.currentMarkNodeInfo == null || this.currentMarkNodeInfo.markInfos == null) { + return null; + } + this.currentMarkNodeInfo.markInfos.forEach((value: ModelInfo_mark[], key: MarkTagPos) => { + for (let i = 0; i < value.length; i++) { + if (mesh.uniqueId == value[i].modelBox.uniqueId) { + result = value[i]; + break; + } + + let children = value[i].modelBox.getChildMeshes(); + for (let j = 0; j < children.length; j++) { + if (children != null) { + if (mesh.uniqueId == children[j].uniqueId) { + result = value[i]; + break; + } + } + } + } + }) + + return result; + } + + + + //#endregion + + + //#region 修改类 + + /** + * 创建一个游离的节点,用于没有选中已经创建的节点时,存放标绘信息 + */ + createLeaveNode() { + let result = new MarkNodeData(0, "leave"); + return result; + } + + /** + * 保存当前节点的数据(主要是环境数据和相机数据) + */ + savCurrentNodeData(markNodeData: MarkNodeData = null, environId: number = null) { + + if (markNodeData == null) { + if (this.currentMarkNodeInfo == null) { + return; + } + else { + markNodeData = this.currentMarkNodeInfo.nodeData; + environId = markNodeData.getCurrentEnvironmentData().id; + } + } + + let environmentData: EnvironmentData = markNodeData.getEnvironmentData(environId) + if (environmentData == null) { + environmentData = markNodeData.addEnvironment(null, false, null); + } + + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + environmentData.isOutdoor = true; + } + else { + environmentData.isOutdoor = false; + let indoorStatus = StatusManager.s_currentStatus as IndoorStatus; + environmentData.buildingId = indoorStatus.buildingInfo.buildingData.normalData.key; + environmentData.floorId = indoorStatus.indoorWindow.currentFloorUIItem.getIndoorKey(); + } + if (markNodeData.cameraData == null) { + markNodeData.cameraData = new ArcRotateCameraData(); + } + + markNodeData.cameraData.getDataFromCamera(SceneManager.Instance.defaultCamera); + console.log("保存", markNodeData); + } + + /** + * 创建新标记物 + * @param pickedPoint + * @param currentMarkInstanceData + * @param isNew 新放置的 + */ + createNewMark(worldPosition: Vector3, currentMarkDataPrefab: MarkData, isNew: boolean) { + + if (this.currentMarkNodeInfo == null) { + //现在,取消选中节点时会创建并选中一个游离节点,用于承接标绘物,以允许不选节点就标绘,所以此处应永远不会走进来 + //ThreeDimensionalHomeComponent.instance.openSnackBar("请创建或选择方案的节点后,再进行标绘"); + // alert("请创建或选择方案的节点后,再进行标绘"); + + return; + } + + let markDataId = this.currentMarkNodeInfo.getNextMarkDataId(); + + + // let newMarkInfo = currentMarkInfoPrefab.instance(markDataId.toString()); + let instance = this; + //设置位置等 + let newMarkInfo = this.createMark(markDataId, currentMarkDataPrefab, true, worldPosition, null, false, true, (modelInfo: ModelInfo_mark) => { + instance.selectMarkDataFrom3d(modelInfo, true); + }); + + return newMarkInfo; + } + + + + //创建设备 + createMark( + markId: number,//用于新建 + markData: MarkData,//新创建时,这是模板; 有数据是,即为元数据 + isNew = false, //新创建、还是还原旧数据 + position: Vector3,//新创建的位置 + buildingInfo: BuildingInfo = null,//所属建筑 + isLocalPos = false,//是否是局部坐标 + select = false, + onSuccess?: (modelInfo: ModelInfo_mark) => void + ): ModelInfo_mark { + + + let instance = this; + if (buildingInfo == null) { + buildingInfo = this.getCurrentBuildingInfo(); + } + let markInfo: ModelInfo_mark; + + let newMarkData: MarkData = null; + if (isNew) { + newMarkData = classToClass(markData); + newMarkData.key = markId.toString(); + newMarkData.belongtoBuildingId = buildingInfo.ModelInfo.key; + newMarkData.transformData.position = position.clone(); + } + else { + newMarkData = markData; + } + + let startEnvironmentData = instance.currentMarkNodeInfo.nodeData.getCurrentEnvironmentData();//加载发起时的环境信息 + + let createTag = isNew ? LoadTool.c_tag_createMark : undefined; + MeshPool.importMesh(ModelType.Mark, newMarkData, isNew, true, createTag, (box, meshes, meshPoolInfo: MeshPoolInfo) => { + let currentEnvironmentData = instance.currentMarkNodeInfo.nodeData.getCurrentEnvironmentData();//加载发起时的环境信息 + if (startEnvironmentData != currentEnvironmentData) { + meshPoolInfo.dispose(); + return; + } + markInfo = meshPoolInfo.modelInfo as ModelInfo_mark; + markInfo.belongToBuilding = buildingInfo; + instance.setMarkTransform(isLocalPos, isNew, buildingInfo, markInfo.modelBox, markInfo); + markInfo.modelBox.isPickable = true; + // console.log("成功创建模型", markInfo); + instance.currentMarkNodeInfo.addMarkInfo(markInfo, isNew); + markInfo.onCreate(isNew); + Event_MarkInfoChange.dispatch(MarkInfoChangeType.Create, markInfo); + // console.log("测试播放动画", markInfo.animationGroups); + // if (markInfo.animationGroups != null && markInfo.animationGroups.length > 0) { + // markInfo.animationGroups[0].play();//完善正式逻辑时,注释掉此行 + // } + if (onSuccess) { + onSuccess(markInfo); + } + }) + + return markInfo; + } + + /** + * 清空节点的运行时数据 + * 清空标记物 + */ + clearNodeInfo() { + if (this.currentMarkInfo != null) { + this.selectMarkDataFrom3d(this.currentMarkInfo, false); + } + + if (this.currentMarkNodeInfo != null) { + this.currentMarkNodeInfo.disposeInfo(); + this.currentMarkNodeInfo = null; + } + + this.changeNatureEffect(false, null); + this.shouWaterSource(false); + //ThreeDimensionalHomeComponent.instance.toggleHeadwaters = false; + + } + + + + + + /** + * 更新节点数据至表现层 + * 摄像机、楼层、室内外的更新 + * 标记物的重新创建 + */ + updateNodeInfo() { + let environmentData = this.currentMarkNodeInfo.nodeData.getCurrentEnvironmentData(); + let cameraData = this.currentMarkNodeInfo.nodeData.cameraData; + let instance = this; + if (environmentData.isOutdoor) //要在室外 + { + if (StatusManager.s_currentStatus instanceof IndoorStatus) { + + //设置相机信息//相机位置设置问题 异步、动画冲突问题 + MarkWindow.s_cameraData = cameraData; + + instance.clearEnterObserver(true); + instance.enterOutDoorObserver = BuildingStatus.enterSuccessObservable.add((eventData: BuildingUIItem) => { + //记录不分建筑,但初始化分建筑 + //if (eventData.buildingInfo.buildingData.normalData.key == environmentData.buildingId) { + instance.onEnterSuccess(eventData.buildingInfo, eventData.buildingInfo.buildingData.normalData.key); + //} + }) + //切到室外 + StatusManager.s_currentStatus.indoorWindow.onBtnToOutDoor(false); + } + else if (StatusManager.s_currentStatus instanceof BuildingStatus) { + this.currentMarkNodeInfo.nodeData.cameraData.setDataToCamera(SceneManager.Instance.defaultCamera); + instance.clearEnterObserver(true); + + for (let i = 0; i < StatusManager.s_currentStatus.buildingWindow.buildingUIItems.length; i++) { + let buildingInfo = StatusManager.s_currentStatus.buildingWindow.buildingUIItems[i].buildingInfo + instance.onEnterSuccess(buildingInfo, buildingInfo.buildingData.normalData.key); + } + } + else { + console.log("非法状态切换", StatusManager.s_currentStatus); + + return; + } + } + else { //要在室内 + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + //相机位置设置问题 异步、动画冲突问题 + MarkWindow.s_cameraData = cameraData; + + //切到室内 + let buildingUIItem: BuildingUIItem = StatusManager.s_currentStatus.buildingWindow.getBuildingUIItem(environmentData.buildingId); + + instance.clearEnterObserver(false); + instance.enterIndoorObserver = IndoorStatus.enterSuccessObservable.add((eventData: IndoorFloorUIItem) => { + if (eventData.getIndoorKey() == environmentData.floorId) { + instance.onEnterSuccess(eventData.buildingInfo, eventData.buildingInfo.ModelInfo.key); + } + }) + buildingUIItem.enterIndoor(environmentData.floorId, false); + + + } + else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + + //相机位置设置问题 异步、动画冲突问题 + MarkWindow.s_cameraData = cameraData; + + + let buildingUIItem = StatusManager.getStatus(BuildingStatus).buildingWindow.getBuildingUIItem(environmentData.buildingId); + instance.clearEnterObserver(false); + instance.enterIndoorObserver = IndoorStatus.enterSuccessObservable.add((eventData: IndoorFloorUIItem) => { + if (eventData.getIndoorKey() == environmentData.floorId) { + instance.onEnterSuccess(eventData.buildingInfo, eventData.buildingInfo.ModelInfo.key); + } + }) + buildingUIItem.enterIndoor(environmentData.floorId, false); + } + else { + console.log("非法状态切换", StatusManager.s_currentStatus); + + return; + } + } + + this.changeNatureEffect(true, this.currentMarkNodeInfo.nodeData.natureData); + + } + + + enterSuccessKey: Map = new Map(); + + /** + * 进入建筑成功 + * @param buildingInfo + */ + onEnterSuccess(buildingInfo: BuildingInfo, key: string) { + if (!this.isShow) { + return; + } + let instance = this; + let environmentData = this.currentMarkNodeInfo.nodeData.getCurrentEnvironmentData(); + + if (instance.enterSuccessKey.has(key)) { + return; + } + instance.enterSuccessKey.set(key, buildingInfo); + + for (let i = 0; i < environmentData.markDatas.length; i++) { + let markData = environmentData.markDatas[i]; + + + if (markData.belongtoBuildingId == key) { + this.createMark(0, markData, false, null, buildingInfo, true, null, (modelInfo: ModelInfo_mark) => { + modelInfo.showFollowUI(instance.isShowProperty3d); + }); + } + } + + this.shouWaterSource(this.isShowWaterSource); + + } + + + /** + * 删除标记物 + */ + deleteMarkInfo(markInfo: ModelInfo_mark) { + if (markInfo == null) { + return; + } + else { + if (markInfo == this.currentMarkInfo) { + this.selectMarkDataFrom3d(markInfo, false); + } + this.currentMarkNodeInfo.removeMarkInfo(markInfo); + } + } + + //#endregion + + + //#region 工具类 + + /** + * 根据原数据,查找运行时数据 - 标记元素 + * @param data + */ + getMarkInfoByMarkData(data: AllMarkPlanData) { + + + } + + + //设置设备transform信息 + setMarkTransform(isLocalPos: boolean, isNew: boolean, buildingInfo: BuildingInfo, newMark: AbstractMesh, markInfo?: ModelInfo_mark) { + //如果是局部坐标,要先设置父节点 + if (isLocalPos) { + buildingInfo.ModelInfo.steMarkParent(markInfo); + } + + let markData = markInfo.markData; + + + let halfY = newMark.scaling.y * 0.5; + if (!isNew) { + halfY = 0; + + + } + let originalScaling = markData.transformData.originalScaling.clone(); + if (!originalScaling.equals(newMark.absoluteScaling))//原始缩放不同,表示换了模型 + { + // let scaleSize = new Vector3(facilityData.transformData.scaling.x / facilityData.transformData.originalScaling.x, facilityData.transformData.scaling.y / facilityData.transformData.originalScaling.y, facilityData.transformData.scaling.z / facilityData.transformData.originalScaling.z); + let scaleSize = markData.transformData.scaling.divide(markData.transformData.originalScaling); + markData.transformData.originalScaling = newMark.absoluteScaling.clone(); + markData.transformData.scaling = markData.transformData.originalScaling.multiply(scaleSize); + + } + + newMark.position = markData.transformData.position.add( + new Vector3(0, halfY, 0) + ); + newMark.scaling = markData.transformData.scaling; + newMark.rotation = markData.transformData.rotation; + + if (markData.transformData.rotationQuaternion != null) { + newMark.rotationQuaternion = + markData.transformData.rotationQuaternion; + } + + + //如果是世界坐标,则最后设置父节点 + if (!isLocalPos) { + buildingInfo.ModelInfo.steMarkParent(markInfo); + + } + + markData.transformData.position = newMark.position; + } + + + /** + * 清空进入场景的监听者 + * @param outDoor + */ + clearEnterObserver(outDoor: boolean) { + this.enterSuccessKey.clear(); + if (outDoor) { + if (this.enterOutDoorObserver != null) { + BuildingStatus.enterSuccessObservable.remove(this.enterOutDoorObserver); + this.enterOutDoorObserver = null; + } + } + else { + if (this.enterIndoorObserver != null) { + IndoorStatus.enterSuccessObservable.remove(this.enterIndoorObserver); + this.enterIndoorObserver = null; + } + + } + } + + /** + * 正在创建多点的标绘物 + */ + isCreateMultiPointMark() { + return !(this.mulLineIsBreak_SD < 0 && this.markLineIsBreak < 0 && this.mulArrowIsBreak_JG < 0 && this.mulArrowIsBreak_CT) + } + + + /** + * 当选中预设时,设置多点创建物的状态 + * @param select + */ + setMultiPointOnSelectPrefab(select: boolean, data: MarkData) { + if (select == false) { + return; + } + if (data.type == MarkType.JJX) { + this.markLineIsBreak = 0; + } + else { + this.markLineIsBreak = -1; + + } + + if (data.type == MarkType.SD) { + this.mulLineIsBreak_SD = 0; + } + else { + this.mulLineIsBreak_SD = -1; + } + + if (data.type == MarkType.JGLX) { + this.mulArrowIsBreak_JG = 0; + } + else { + this.mulArrowIsBreak_JG = -1; + } + if (data.type == MarkType.CT) { + this.mulArrowIsBreak_CT = 0; + } + else { + this.mulArrowIsBreak_CT = -1 + } + } + + /** + * 查找建筑内所有水源 + * @param buildingInfo + */ + getAllWaterSource(buildingInfo: ModelInfo_building) { + let result = []; + + for (let i = 0; i < buildingInfo.facilityInfos.length; i++) { + let item = buildingInfo.facilityInfos[i]; + if (this.isWaterSouce(item.type)) { + result = result.concat(item.facilityInfo); + } + } + return result; + } + + /** + * 是水源类型 + * @param type + */ + isWaterSouce(type: FacilityType) { + let result = false; + switch (type) { + case FacilityType.DXXHS: + case FacilityType.DSXHS: + case FacilityType.SZDSXHS: + case FacilityType.SZDXXHS: + case FacilityType.DSSBJHQ: + case FacilityType.DXSBJHQ: + case FacilityType.DGNSBJHQ: + case FacilityType.QBSBJHQ: + case FacilityType.SNXHS: + result = true; + break; + } + return result; + } + + /** + * 改变自然效果 + * @param show + * @param natureData + */ + changeNatureEffect(show: boolean, natureData: NatureData) { + + if (show) { + this.weatherTool.changeWeatherEffect(natureData.weather); + this.weatherTool.changeWindDirection(natureData.windDirection); + this.weatherTool.changeWindPower(natureData.windPower); + + } + else { + this.weatherTool.show(show); + } + + } + + /** + * 预加载模型 + */ + preLoadMesh() { + if (MarkWindow.s_preLoadMesh) { + for (let i = 0; i < DataManager.allMarkData.marks_Disaster.length; i++) { + MeshPool.importMesh(ModelType.Mark, DataManager.allMarkData.marks_Disaster[i], true, false, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }); + } + for (let i = 0; i < DataManager.allMarkData.marks_FireFighting.length; i++) { + MeshPool.importMesh(ModelType.Mark, DataManager.allMarkData.marks_FireFighting[i], true, false, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }); + } + for (let i = 0; i < DataManager.allMarkData.marks_Inside.length; i++) { + MeshPool.importMesh(ModelType.Mark, DataManager.allMarkData.marks_Inside[i], true, false, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }); + } + for (let i = 0; i < DataManager.allMarkData.marks_Linkage.length; i++) { + MeshPool.importMesh(ModelType.Mark, DataManager.allMarkData.marks_Linkage[i], true, false, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }); + } + for (let i = 0; i < DataManager.allMarkData.marks_Tool.length; i++) { + MeshPool.importMesh(ModelType.Mark, DataManager.allMarkData.marks_Tool[i], true, false, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }); + } + + + } + + } + + /** + * 预加载一个标绘物 + * @param data + */ + preLoadOneMesh(data: MarkData) { + if (!MarkWindow.s_preLoadMesh && MeshPool.Instance.getMeshPrefab(data.resPath, data.resName) == null) { + MeshPool.importMesh(ModelType.Mark, data, true, true, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }, true); + } + + } + + //#endregion + + +} + diff --git a/src/app/babylon/view/mark-window/weather-tool.ts b/src/app/babylon/view/mark-window/weather-tool.ts new file mode 100644 index 0000000..19c06b6 --- /dev/null +++ b/src/app/babylon/view/mark-window/weather-tool.ts @@ -0,0 +1,219 @@ +import { ArcRotateCamera, Mesh, ParticleSystem, Scene, ShadowLight, TonemappingOperator, TonemapPostProcess, Vector3 } from "@babylonjs/core"; +import { WeatherType, WindDirectionType } from "../../model/data/mark/mark-plan-data"; +import { ParticleSystemTool } from "../../tool/particle-system-tool"; + + +/** + * 天气工具 + */ +export class WeatherTool { + + static instance: WeatherTool; + + /** + * 雨特效 + */ + effect_rain: ParticleSystem; + /** + * 雪特效 + */ + effect_snow: ParticleSystem; + + /** + * 当前特效 + */ + currentPS: ParticleSystem; + + /** + * 屏幕后处理 + */ + postProcess: TonemapPostProcess; + + scene: Scene; + camera: ArcRotateCamera; + + followRoot: Mesh; + + /** + * 在展示中 + */ + isShow: boolean = false; + + /** + * 天气 + */ + weather: WeatherType; + /** + * 风向 + */ + windDirection: WindDirectionType; + /** + * 风力 + */ + windPower: number; + + + + constructor(camera: ArcRotateCamera, scene: Scene) { + this.camera = camera; + this.followRoot = new Mesh("WeatherRoot"); + this.scene = scene; + this.windDirection = WindDirectionType.East; + this.init(); + WeatherTool.instance = this; + + let instance = this; + ParticleSystemTool.instance.loadPrefab("rain", "assets/particlesystem/rain/rain.json", false, (ps) => { + instance.effect_rain = ps; + ps.emitter = instance.followRoot; + console.log("下雨加载完成"); + }) + + ParticleSystemTool.instance.loadPrefab("snow", "assets/particlesystem/snow/snow.json", false, (ps) => { + instance.effect_snow = ps; + ps.emitter = instance.followRoot; + console.log("下雪加载完成"); + }) + + } + + //#region 生命周期 + init() { + let instance = this; + this.scene.onBeforeRenderObservable.add(() => { + instance.update(); + }) + + + } + + update() { + this.followRoot.position = this.camera.position.add(new Vector3(0, 2, 0)); + } + //#endregion + + /** + * 显示或隐藏 + * @param show + */ + show(show: boolean) { + this.isShow = show; + if (this.currentPS != null) { + if (show) { + this.currentPS.start(); + let windDir = this.getDirectionV3(this.windDirection); + this.currentPS.direction1 = windDir; + this.currentPS.direction2 = windDir; + } + else { + this.currentPS.stop(); + } + } + + if (this.postProcess != null) { + if (!show) { + this.postProcess.dispose(); + this.postProcess = null; + } + } + + } + + /** + * 改变天气类型 + * @param type + */ + changeWeatherEffect(type: WeatherType) { + if (this.weather == type && this.isShow) { + return; + } + this.weather = type; + this.show(false); + + switch (this.weather) { + case WeatherType.Rain: + this.currentPS = this.effect_rain; + break; + case WeatherType.Snow: + this.currentPS = this.effect_snow; + + break; + default: + this.currentPS = null; + } + + if (this.weather != WeatherType.Sun && this.postProcess == null) { + this.postProcess = new TonemapPostProcess("tonemap", TonemappingOperator.Photographic, 1.5, this.camera); + } + + + + this.show(true); + + + + //更新显示 + } + + /** + * 改变风向 + * @param type + */ + changeWindDirection(type: WindDirectionType) { + if (this.windDirection == type && this.isShow) { + return; + } + this.windDirection = type; + //更新显示 + if (this.currentPS != null) { + //改变力方向 + if (this.currentPS != null) { + //改变力大小 + let windV3: Vector3 = this.getDirectionV3(this.windDirection); + this.currentPS.direction1 = windV3; + this.currentPS.direction2 = windV3; + } + + } + } + + /** + * 改变风力 + * @param value + */ + changeWindPower(value: number) { + if (this.windPower == value && this.isShow) { + return; + } + this.windPower = value; + //更新显示 + + } + + /** + * 获取给特效用的风向向量 + * @param type + */ + getDirectionV3(type: WindDirectionType) { + let result = new Vector3(0, -1, 0); + + if (type == WindDirectionType.East || type == WindDirectionType.NorthEast || type == WindDirectionType.SouthEast) { + result.x = -1; + } + else if (type == WindDirectionType.West || type == WindDirectionType.NorthWest || type == WindDirectionType.SouthWest) { + result.x = 1; + } + + if (type == WindDirectionType.North || type == WindDirectionType.NorthEast || type == WindDirectionType.NorthWest) { + result.z = -1; + } + else if (type == WindDirectionType.South || type == WindDirectionType.SouthEast || type == WindDirectionType.SouthWest) { + result.z = 1; + } + + + return result; + + } + +} \ No newline at end of file diff --git a/src/app/babylon/view/property-window/property-base-window.ts b/src/app/babylon/view/property-window/property-base-window.ts new file mode 100644 index 0000000..f14cfa1 --- /dev/null +++ b/src/app/babylon/view/property-window/property-base-window.ts @@ -0,0 +1,123 @@ +import { Button, Control, Rectangle, StackPanel, TextBlock } from "@babylonjs/gui"; +import { ConfigManager } from "../../controller/config-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { PropertyData_Base } from "../../model/data/institution/facility/property-data/property-data-base"; +import { ModelData_facility } from "../../model/data/model-data/model-data-facility"; +import { ModelInfo_facility } from "../../model/info/model/model-info-facility"; +import { MyInputText } from "../../tool/babylon-tool"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; + +import { UIBase } from "../window-base/ui-base"; + +/** + * 属性界面 + */ +export class PropertyBaseWindow extends UIBase { + facilityInfo: ModelInfo_facility; + property: PropertyData_Base; + + + //#region UI组件 + + typeTxt: TextBlock; + nameTxt: MyInputText; + + //#endregion + + + //#region 单例 + private static instance: PropertyBaseWindow; + + static ShowWindow(facilityInfo: ModelInfo_facility) { + if (PropertyBaseWindow.instance == null) { + PropertyBaseWindow.instance = UIManager.open(PropertyBaseWindow); + } + + UIManager.show(PropertyBaseWindow.instance); + PropertyBaseWindow.instance.initfacility(facilityInfo); + } + + static HideWindow() { + if (PropertyBaseWindow.instance == null) { + return; + } + UIManager.hide(PropertyBaseWindow.instance); + } + //#endregion + + //#region 生命周期 + + onHide() { + super.onHide(); + } + + onShow() { + super.onShow(); + } + //#endregion + + + //初始化设备 + initfacility(facilityInfo: ModelInfo_facility) { + this.facilityInfo = facilityInfo; + this.property = (facilityInfo.modelData as ModelData_facility).propertyData; + this.updateUI(); + } + + + + updateUI() { + + let instance = this; + if (this.root == null) { + this.root = new Rectangle("PropertyBaseWindow"); + this.root.alpha = 0.8; + this.root.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; + UIManager.Instance.uiRoot.addControl(this.root); + + BabylonUIStyleTool.setStyle_size(this.root, "320px", "200px"); + this.root.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + this.root.paddingRight = "120px"; + this.root.color = BabylonUIStyleTool.c_color_blueBg; + this.root.background = BabylonUIStyleTool.c_color_blueBg; + + let stackPanel = new StackPanel("stackPanel"); + stackPanel.width = "180px"; + stackPanel.isVertical = true; + this.root.addControl(stackPanel); + + this.typeTxt = new TextBlock("typeTxt", "--"); + this.typeTxt.height = "50px"; + this.typeTxt.color = "white"; + stackPanel.addControl(this.typeTxt); + + let nameTitle = new TextBlock("nameTitle", "自定义内容:"); + nameTitle.height = "30px"; + nameTitle.color = BabylonUIStyleTool.c_color_gray; + nameTitle.fontSize = "14px"; + nameTitle.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + stackPanel.addControl(nameTitle); + + this.nameTxt = BabylonUIStyleTool.createInputText("nameInput", stackPanel, "200px", "80px", "white", 0, 0, BabylonUIStyleTool.c_color_blueBg, "white", BabylonUIStyleTool.c_color_blueBg); + this.nameTxt.inputText.onTextChangedObservable.add(() => { + instance.property.name = this.nameTxt.inputText.text; + }); + + let btn_close = Button.CreateSimpleButton("close", "-"); + BabylonUIStyleTool.setStyle_size(btn_close, "20px", "20px"); + btn_close.color = "white"; + btn_close.thickness = 0; + btn_close.background = BabylonUIStyleTool.c_color_red; + this.root.addControl(btn_close); + btn_close.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_close.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + btn_close.onPointerClickObservable.add(() => { + PropertyBaseWindow.HideWindow(); + }); + } + + this.typeTxt.text = ConfigManager.getFacilityTypeName((this.facilityInfo.modelData as ModelData_facility).facilityType); + this.nameTxt.inputText.text = this.property.name; + + } +} \ No newline at end of file diff --git a/src/app/babylon/view/toolbar-window/toobar-window.ts b/src/app/babylon/view/toolbar-window/toobar-window.ts new file mode 100644 index 0000000..877e751 --- /dev/null +++ b/src/app/babylon/view/toolbar-window/toobar-window.ts @@ -0,0 +1,255 @@ + +import { PointerEventTypes } from "@babylonjs/core/Events/pointerEvents"; +import { PointerInfo } from "@babylonjs/core/Events/pointerEvents"; +import { EventState } from "@babylonjs/core/Misc/observable"; +import { Button, Control, Rectangle } from "@babylonjs/gui"; +import { DataManager } from "../../controller/data-manager"; +import { ModeManager } from "../../controller/mode-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { ServeManager } from "../../controller/serve-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; +import { GizmoTool, TransformUIType } from "../../tool/gizmo-tool"; +import { MeasureTool, MeasureType } from "../../tool/measure-tool"; + +import { FacilityWindow } from "../facility-window/facility-window"; +import { CopyFacilityInfo, FacilityInfoInSceneWindow } from "../facilityinfoinscene-window/facilityinfoinscene-window"; + +import { UIBase } from "../window-base/ui-base"; + +/** + * 工具栏 + */ +export class ToolbarWindow extends UIBase { + static instance: ToolbarWindow; + compass: Rectangle;//指南针 + compassImage: Button; + + /** + * 摄像机为顶视 + */ + isTopView: boolean = false; + + + //#region 前端对接 + // three: ThreeDimensionalHomeComponent;//前端组件 + compassAlpha: number;//指南针旋转 0-2π + + /** + * 复制下来的设备数据 + */ + copyFacilityData: CopyFacilityInfo; + + /** + * 测量工具 + */ + measureTool: MeasureTool; + + //保存数据 + onBtnSave() { + let data = DataManager.institutionData; + ModeManager.log(data); + ServeManager.instance.saveInstitutionData(data, DataManager.institutionData_simple.key, () => { + ModeManager.log("保存成功" + DataManager.institutionData_simple.key); + }); + } + + /*** + * gizmo工具 改为位移 + */ + changeGizmoType_position() { + GizmoTool.onTransformUITypeChange(TransformUIType.Position); + GizmoTool.currentGizmoType = TransformUIType.Position; + } + + /** + * gizmo工具 改为旋转 + */ + changeGizmoType_Rotation() { + GizmoTool.onTransformUITypeChange(TransformUIType.Rotation); + GizmoTool.currentGizmoType = TransformUIType.Rotation; + } + + /** + * gizmo工具 改为缩放 + */ + changeGizmoType_Scale() { + GizmoTool.onTransformUITypeChange(TransformUIType.Scale); + GizmoTool.currentGizmoType = TransformUIType.Scale; + } + + /** + * 改相机为顶视图 + * @param isTop true表示为顶视 + */ + changeTopView(isTop: boolean) { + SceneManager.Instance.changeCameraMode(isTop); + this.isTopView = isTop; + } + + //#endregion + + onInit() { + super.onInit(); + ToolbarWindow.instance = this; + let instance = this; + SceneManager.Instance.scene.onBeforeRenderObservable.add(() => { + instance.onUpdate(); + }); + + instance.measureTool = new MeasureTool(SceneManager.Instance.scene); + + SceneManager.Instance.scene.onPointerObservable.add( + instance.onPointerObservable + ); + + //this.initUIBase(); + //this.initCompass(); + } + + initUIBase() { + this.root = new Rectangle("ToolbarWindwow"); + UIManager.Instance.uiRoot.addControl(this.root); + + this.root.top = 10; + this.root.height = 0.1; + this.root.width = 0.2; + this.root.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + this.root.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + this.root.thickness = 0; + this.root.zIndex = BabylonUIStyleTool.c_zIndex_topBar; + + + } + + onUpdate() { + let alpha = SceneManager.Instance.defaultCamera.alpha + Math.PI / 2; + this.setCompass(alpha); + } + + + //#region 复制粘贴、多选设备 + + /** + * 多选设备 + * @param multi + */ + multiSelectFacility(multi: boolean) { + FacilityInfoInSceneWindow.instance.changeMultiSelect(multi); + } + + + + /** + * 复制设备 + */ + copyFacility() { + this.copyFacilityData = FacilityInfoInSceneWindow.instance.copyFacility(); + } + + /** + * 粘贴设备 + */ + pasteFacility() { + FacilityWindow.instance.pasteFacility(this.copyFacilityData); + } + + + //#endregion + + //#region 指南针 + + //设置指南针朝向 + setCompass(alpha: number) { + this.compassAlpha = Math.PI + alpha; + // this.three = ThreeDimensionalHomeComponent.instance; + // this.three.rotationAngle = `rotate(${this.compassAlpha * 180 / Math.PI}deg)` + + } + //#endregion + + + //#region 模型吸附 + + /** + * 是否是吸附 + */ + isMeshAdsorb = false; + + //鼠标交互监听 + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = ToolbarWindow.instance; + if (!instance.isMeshAdsorb || GizmoTool.s_nowPickAim_mesh == null) { + + return; + } + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + + if (GizmoTool.s_nowPickAim_mesh != eventData.pickInfo.pickedMesh) { + SceneManager.meshAdsorbY(GizmoTool.s_nowPickAim_mesh, eventData.pickInfo.pickedMesh, eventData.pickInfo.pickedPoint); + } + setTimeout( + function () { + instance.changeMeshAdsorbY(); + }, + 100); + } + + break; + } + } + + //改变拾取状态 + changeMeshAdsorbY() { + this.isMeshAdsorb = !this.isMeshAdsorb; + // this.three.updateSelectAdsorb(); + } + //#endregion + + + + //#region 测量工具 + + /** + * 测距 + */ + measureDistance() { + this.measureTool.changeMeasureType(MeasureType.Distance); + } + + /** + * 测量高度 + */ + measureHeight() { + this.measureTool.changeMeasureType(MeasureType.Height); + } + + /** + * 测量面积 + */ + measureArea() { + this.measureTool.changeMeasureType(MeasureType.Area); + } + + /** + * 结束测量 + */ + endMeasure() { + this.measureTool.changeMeasureType(MeasureType.None); + } + + // /** + // * 中断测量 + // */ + // breakMeasure() { + // this.measureTool.changeMeasureType(MeasureType.break); + // } + + + //#endregion + + + +} diff --git a/src/app/babylon/view/topbar-window/topbar-window.ts b/src/app/babylon/view/topbar-window/topbar-window.ts new file mode 100644 index 0000000..9b00f1e --- /dev/null +++ b/src/app/babylon/view/topbar-window/topbar-window.ts @@ -0,0 +1,250 @@ + + +import { Button, Control } from "@babylonjs/gui"; + +import { DataManager } from "../../controller/data-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { ServeManager } from "../../controller/serve-manager"; +import { LoginSatus } from "../../controller/status/login-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { InsitutionDataSimple } from "../../model/data/institution/institution-data-simple"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; +import { ToolbarWindow } from "../toolbar-window/toobar-window"; +import { UIBase } from "../window-base/ui-base"; + +//用于某些临时功能按钮的测试 +export class TopbarWindow extends UIBase { + + + static instance: TopbarWindow; + + //#region 声明周期 + onInit() { + super.onInit(); + TopbarWindow.instance = this; + + } + + + + onOpen() { + super.onOpen(); + //this.initUI_createInstitution(); + // this.initUI_createFile(); + //this.initInstitutionListData(); + //this.initLookAtAim(); + //this.meshAdsorbY(); + // this.initTopView(); + } + + + onClose() { + super.onClose(); + } + //#endregion + + + /** + * 创建单位 + */ + initUI_createInstitution() { + + let btn_createInstitution = Button.CreateSimpleButton("btn_createIns", "新建单位"); + + UIManager.Instance.uiRoot.addControl(btn_createInstitution); + + BabylonUIStyleTool.setStyle_size(btn_createInstitution, "100px", "50px"); + btn_createInstitution.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_createInstitution.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_createInstitution.background = BabylonUIStyleTool.c_color_blue; + btn_createInstitution.color = "white"; + + btn_createInstitution.onPointerClickObservable.add(() => { + StatusManager.getStatus(LoginSatus).onNewIns(); + }) + + + } + + //#region + /** + * 初始化单位列表 (用于新数据库上的初始化,不可乱用) + */ + initInstitutionListData() { + + // return; + console.log("新建单位列表"); + let btn_createInstitutionList = Button.CreateSimpleButton("btn_createIns", "新建单位列表"); + + UIManager.Instance.uiRoot.addControl(btn_createInstitutionList); + + BabylonUIStyleTool.setStyle_size(btn_createInstitutionList, "100px", "50px"); + btn_createInstitutionList.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_createInstitutionList.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_createInstitutionList.background = BabylonUIStyleTool.c_color_blue; + btn_createInstitutionList.color = "white"; + + btn_createInstitutionList.onPointerClickObservable.add(() => { + + let institutionList: InsitutionDataSimple[] = []; + let test = new InsitutionDataSimple(); + test.key = "test"; + test.name = "测试"; + institutionList.push(test); + ServeManager.instance.saveInstitutionListData(institutionList); + }) + + } + //#endregion + + + + //#region 创建文件 + + + initUI_createFile() { + let btn_createFile = Button.CreateSimpleButton("btn_createFile", "新建文件"); + + UIManager.Instance.uiRoot.addControl(btn_createFile); + + BabylonUIStyleTool.setStyle_size(btn_createFile, "100px", "50px"); + btn_createFile.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_createFile.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_createFile.background = BabylonUIStyleTool.c_color_blue; + btn_createFile.color = "white"; + + let instance = this; + btn_createFile.onPointerClickObservable.add(() => { + instance.createFileAndDownload(); + }) + + } + + + + + + /** + * 创建文件并上传 + */ + createFileAndUpload(): File { + var file; + var data = []; + data.push("This is a test\n"); + data.push("Of creating a file\n"); + data.push("In a browser\n"); + var properties = { type: 'text/cache-manifest' }; // Specify the file's mime-type. + try { + // Specify the filename using the File constructor, but ... + file = new File(data, "a.gltf.manifest", properties); + } catch (e) { + // ... fall back to the Blob constructor if that isn't supported. + file = new Blob(data, properties); + } + + return file; + } + + /** + * 创建文件并下载 + */ + createFileAndDownload() { + let file: any; + file = DataManager.createFile_manifest("a.gltf", 1); + + var aTag = document.createElement('a'); + aTag.download = "a.gltf.manifest"; + aTag.href = URL.createObjectURL(file); + document.body.appendChild(aTag); + aTag.click(); + setTimeout(function () { + document.body.removeChild(aTag); + window.URL.revokeObjectURL(file); + }, 1000) + + } + + //#endregion + + + //#region 注视 + initLookAtAim() { + + let btn_lookAtAim = Button.CreateSimpleButton("btn_createIns", "注视目标"); + + UIManager.Instance.uiRoot.addControl(btn_lookAtAim); + + BabylonUIStyleTool.setStyle_size(btn_lookAtAim, "100px", "50px"); + btn_lookAtAim.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_lookAtAim.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_lookAtAim.background = BabylonUIStyleTool.c_color_blue; + btn_lookAtAim.color = "white"; + + btn_lookAtAim.onPointerClickObservable.add(() => { + + SceneManager.lookAtCurrentSelect(); + }) + + } + //#endregion + + //#region 吸附测试 + + //模型Y方向吸附 + meshAdsorbY() { + let btn_meshAdsorbY = Button.CreateSimpleButton("btn_createIns", "吸附"); + + UIManager.Instance.uiRoot.addControl(btn_meshAdsorbY); + + BabylonUIStyleTool.setStyle_size(btn_meshAdsorbY, "100px", "50px"); + btn_meshAdsorbY.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_meshAdsorbY.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_meshAdsorbY.background = BabylonUIStyleTool.c_color_blue; + btn_meshAdsorbY.color = "white"; + + btn_meshAdsorbY.onPointerClickObservable.add(() => { + + ToolbarWindow.instance.changeMeshAdsorbY(); + if (ToolbarWindow.instance.isMeshAdsorb) { + btn_meshAdsorbY.background = "green"; + } + else { + btn_meshAdsorbY.background = BabylonUIStyleTool.c_color_blue; + } + }) + + + + + } + + //#endregion + + //#region 测试顶视图 + + topView: boolean = false;//顶视图 + + initTopView() { + + let instance = this; + let btn_topView = Button.CreateSimpleButton("btn_topView", "顶视图"); + + UIManager.Instance.uiRoot.addControl(btn_topView); + + BabylonUIStyleTool.setStyle_size(btn_topView, "100px", "50px"); + btn_topView.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_topView.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_topView.background = BabylonUIStyleTool.c_color_blue; + btn_topView.color = "white"; + + btn_topView.onPointerClickObservable.add(() => { + + instance.topView = !instance.topView; + SceneManager.Instance.changeCameraMode(instance.topView); + }) + } + + + //#endregion +} \ No newline at end of file diff --git a/src/app/babylon/view/window-base/ui-base.ts b/src/app/babylon/view/window-base/ui-base.ts new file mode 100644 index 0000000..6db396a --- /dev/null +++ b/src/app/babylon/view/window-base/ui-base.ts @@ -0,0 +1,57 @@ +import { Rectangle } from "@babylonjs/gui"; + +export class UIBase { + static readonly color_black = "#000000"; + static readonly color_white = "#FFFFFF"; + static readonly color_gray = "#293745"; + + static readonly color_red = "#9C3208"; + static readonly color_blue = "#0080FF"; + static readonly color_yellow = "#FF8833"; + static readonly color_null = ""; + + static readonly color_inputBg = "#EEF1F5";//输入背景色 + + + + root: Rectangle; + /** + * 显示的状态 + */ + isShow: boolean = true; + + onInit() { + this.isShow = true; + } + + onOpen() { + + } + + onClose() { + } + + onHide() { + if (this.root != null) { + this.root.isVisible = false; + + } + this.isShow = false; + + } + + onShow() { + if (this.root != null) { + this.root.isVisible = true; + + } + this.isShow = true + } + + //#region 组件封装 + + + + //#endregion + +} \ No newline at end of file diff --git a/src/app/service/babylon/building-basic-infos.service.ts b/src/app/service/babylon/building-basic-infos.service.ts new file mode 100644 index 0000000..ec80242 --- /dev/null +++ b/src/app/service/babylon/building-basic-infos.service.ts @@ -0,0 +1,87 @@ +import { HttpClient, HttpErrorResponse } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable, throwError } from 'rxjs'; +import { catchError, retry } from 'rxjs/operators'; + +@Injectable({ + providedIn: 'root' +}) +export class BuildingBasicInfosService { + //获取单位信息的api + baseUrl = 'api/v2/BuildingBasicInfos'; + + /** + * 事态标绘(电子沙盘)的api + */ + markUrl = "api/v2/Sandboxie"; + + + constructor( + private http: HttpClient + ) { } + + /** + * 获取三维信息 + */ + getBuildingBasicInfos(name: string): Observable { + return this.http.get(this.baseUrl + '?name=' + name); + } + /** + * 保存三维信息 + * @param name + * @param data + */ + postBuildingBasicInfos(name: string, data: any): Observable { + return this.http.post(this.baseUrl + '?name=' + name, data) + .pipe( + catchError((err) => this.handleError(err)) + ); + } + + /** + * 获取事态标绘的信息 + * @param name + */ + getMarkData(name: string): Observable { + // name = "bb"; + let id = { "name": name }; + return this.http.get(this.markUrl, { params: id }).pipe( //'?name=' + catchError((err) => this.handleError(err)) + ); + } + + /** + * 推送事态标绘的信息 + * @param name + * @param data + */ + postMarkData(name: string, data: any): Observable { + return this.http.post(this.markUrl + '?name=' + name, data) + .pipe( + catchError((err) => this.handleError(err)) + ); + } + + + private handleError(error: HttpErrorResponse) { + if (error.error instanceof ErrorEvent) { + // A client-side or network error occurred. Handle it accordingly. + console.error('An error occurred:', error.error.message); + } else { + // The backend returned an unsuccessful response code. + // The response body may contain clues as to what went wrong. + if (error.status == 404) { + console.log("404===" + error.error); + } + else { + console.error( + error + `Backend returned code ${error.status}, ` + + `body was: ${error.error}`); + } + + } + // Return an observable with a user-facing error message. + return throwError( + error); + } +} diff --git a/src/app/service/babylon/mask-layer.service.ts b/src/app/service/babylon/mask-layer.service.ts new file mode 100644 index 0000000..c0a8988 --- /dev/null +++ b/src/app/service/babylon/mask-layer.service.ts @@ -0,0 +1,18 @@ +import { Injectable } from '@angular/core'; +import {ReplaySubject} from "rxjs"; +import { Observable } from "rxjs"; +@Injectable({ + providedIn: 'root' +}) +export class MaskLayerService { + private _sendMessage: ReplaySubject = new ReplaySubject(1); + /** * 向其他组件发送信息 * + * @param message 需要发送的信息 * @returns {Observavle} */ + public sendMessage(message: any) { + this._sendMessage.next(message); + } + public getMessage(): Observable { + return this._sendMessage.asObservable(); + } + constructor() { } +} diff --git a/src/app/service/babylon/objects.service.ts b/src/app/service/babylon/objects.service.ts new file mode 100644 index 0000000..723068a --- /dev/null +++ b/src/app/service/babylon/objects.service.ts @@ -0,0 +1,87 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; + +@Injectable({ + providedIn: 'root' +}) +export class ObjectsService { + + static readonly c_apiRoot = "/api/";//普通上传的API根路径 + static readonly c_apiRoot_Multipart = "/api/";//分块上传的API根路径 + + // static testPath = "f1/f2";//测试路径 + + constructor(private http: HttpClient) { } + + + + //普通上传,单个文件上限5M + static baseUrl = ObjectsService.c_apiRoot + 'Objects/WebPlan/'; + postFile(extensionPath: string, file: File): Observable { + let formData = new FormData() + //console.log(file.name + file.type); + formData.append("file", file, file.name) + + let data = { keepOriginalName: 'true' } + return this.http.post(ObjectsService.baseUrl + extensionPath, formData, { params: data }); + } + + + + + //分块上传 + static baseUrl_MultipartUpload = ObjectsService.c_apiRoot_Multipart + 'NewMultipartUpload/WebPlan/'; + // { + // "objectName": "string", + // "uploadId": "string" + // } + postFile_MultipartUpload(extensionPath: string, file: File): Promise { + // let formData = new FormData() + // formData.append("file", file, file.name) + // return this.http.post(ObjectsService.baseUrl + extensionPath, formData); + let data = { keepOriginalName: 'true', filename: file.name } + return new Promise((resolve, reject) => { + this.http.post(ObjectsService.baseUrl_MultipartUpload + extensionPath, {}, { params: data }).subscribe(async (data: any) => { //初始化分段上传 + let objectName = data.objectName + let uploadId = data.uploadId + let PartNumberETag = []; //每次返回需要保存的信息 + //分块 处理 + let fileSize = file.size || null //上传文件的总大小 + let shardSize = 5 * 1024 * 1024 //5MB一个分片 + let allSlice = Math.ceil(fileSize / shardSize) //总文件/5MB===共分多少段 + + for (let i = 0; i < allSlice; i++) { //循环分段上传 + let start = i * shardSize //切割文件开始位置 + let end = Math.min(fileSize, start + shardSize); //切割文件结束位置 + let formData = new FormData() + formData.append("file", file.slice(start, end)) + + //同步写法实现异步调用 + let result = await new Promise((resolve, reject) => { + // await 需要后面返回一个 promise 对象 + this.http.post(ObjectsService.c_apiRoot_Multipart + `MultipartUpload/WebPlan/${objectName}?uploadId=${uploadId}&partNumber=${i + 1}`, formData).subscribe((data: any) => { + let msg = { "partNumber": data.partNumber || null, "eTag": data.eTag || null } + resolve(msg) // 调用 promise 内置方法处理成功 + }) + }); + PartNumberETag.push(result) + + if (PartNumberETag.length === allSlice) { //分块上传完成 + let data = PartNumberETag + let paramsData = { uploadId: uploadId }; + let path = ObjectsService.c_apiRoot_Multipart + 'CompleteMultipartUpload/WebPlan/' + objectName; + this.http.post(path, data, { params: paramsData }).subscribe(data => { + let objData: any = new Object(); + objData.fileName = file.name; + objData.filePath = (ObjectsService.baseUrl + objectName).replace(file.name, ""); + resolve(objData) + }) + } + }//for循环 + + //分块 处理 + }) + }) + } +} diff --git a/src/app/three-dimensional/three-dimensional.module.ts b/src/app/three-dimensional/three-dimensional.module.ts new file mode 100644 index 0000000..2aaa2da --- /dev/null +++ b/src/app/three-dimensional/three-dimensional.module.ts @@ -0,0 +1,99 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { A11yModule } from '@angular/cdk/a11y'; +import { DragDropModule } from '@angular/cdk/drag-drop'; +import { PortalModule } from '@angular/cdk/portal'; +import { ScrollingModule } from '@angular/cdk/scrolling'; +import { CdkStepperModule } from '@angular/cdk/stepper'; +import { CdkTableModule } from '@angular/cdk/table'; +import { CdkTreeModule } from '@angular/cdk/tree'; +import { MatAutocompleteModule } from '@angular/material/autocomplete'; +import { MatBadgeModule } from '@angular/material/badge'; +import { MatBottomSheetModule } from '@angular/material/bottom-sheet'; +import { MatButtonModule } from '@angular/material/button'; +import { MatButtonToggleModule } from '@angular/material/button-toggle'; +import { MatCardModule } from '@angular/material/card'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatStepperModule } from '@angular/material/stepper'; +import { MatChipsModule } from '@angular/material/chips'; +import { MatDatepickerModule } from '@angular/material/datepicker'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatDividerModule } from '@angular/material/divider'; +import { MatExpansionModule } from '@angular/material/expansion'; +import { MatGridListModule } from '@angular/material/grid-list'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatListModule } from '@angular/material/list'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatNativeDateModule, MatRippleModule } from '@angular/material/core'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatProgressBarModule } from '@angular/material/progress-bar'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatRadioModule } from '@angular/material/radio'; +import { MatSelectModule } from '@angular/material/select'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { MatSliderModule } from '@angular/material/slider'; +import { MatSlideToggleModule } from '@angular/material/slide-toggle'; +import { MatSnackBarModule } from '@angular/material/snack-bar'; +import { MatSortModule } from '@angular/material/sort'; +import { MatTableModule } from '@angular/material/table'; +import { MatTabsModule } from '@angular/material/tabs'; +import { MatToolbarModule } from '@angular/material/toolbar'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { MatTreeModule } from '@angular/material/tree'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { ThreeHomeComponent } from './three-home/three-home.component'; + + + +@NgModule({ + declarations: [ThreeHomeComponent], + imports: [ + CommonModule, + A11yModule, + DragDropModule, + PortalModule, + ScrollingModule, + CdkStepperModule, + CdkTableModule, + CdkTreeModule, + MatAutocompleteModule, + MatBadgeModule, + MatBottomSheetModule, + MatButtonModule, + MatButtonToggleModule, + MatCardModule, + MatCheckboxModule, + MatChipsModule, + MatStepperModule, + MatDatepickerModule, + MatDialogModule, + MatDividerModule, + MatExpansionModule, + MatGridListModule, + MatIconModule, + MatInputModule, + MatListModule, + MatMenuModule, + MatNativeDateModule, + MatRippleModule, + MatPaginatorModule, + MatProgressBarModule, + MatProgressSpinnerModule, + MatRadioModule, + MatSelectModule, + MatSidenavModule, + MatSliderModule, + MatSlideToggleModule, + MatSnackBarModule, + MatSortModule, + MatTableModule, + MatTabsModule, + MatToolbarModule, + MatTooltipModule, + MatTreeModule, + FormsModule, + ReactiveFormsModule, + ] +}) +export class ThreeDimensionalModule { } diff --git a/src/app/three-dimensional/three-home/three-home.component.html b/src/app/three-dimensional/three-home/three-home.component.html new file mode 100644 index 0000000..bf2dc3b --- /dev/null +++ b/src/app/three-dimensional/three-home/three-home.component.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/src/app/three-dimensional/three-home/three-home.component.scss b/src/app/three-dimensional/three-home/three-home.component.scss new file mode 100644 index 0000000..ea25d2d --- /dev/null +++ b/src/app/three-dimensional/three-home/three-home.component.scss @@ -0,0 +1,7 @@ +.content{ + width: 100%; + height: 100%; + overflow: hidden; + position: relative; + canvas{ width: 100%; height: 100%; border: none; outline: none; } +} \ No newline at end of file diff --git a/src/app/three-dimensional/three-home/three-home.component.ts b/src/app/three-dimensional/three-home/three-home.component.ts new file mode 100644 index 0000000..a404788 --- /dev/null +++ b/src/app/three-dimensional/three-home/three-home.component.ts @@ -0,0 +1,23 @@ +import { Component, ElementRef, OnInit } from '@angular/core'; +import { Game } from 'src/app/babylon/game'; + +@Component({ + selector: 'app-three-home', + templateUrl: './three-home.component.html', + styleUrls: ['./three-home.component.scss'] +}) +export class ThreeHomeComponent implements OnInit { + + constructor(private element: ElementRef,) { } + + static instance: ThreeHomeComponent; + public game: Game = new Game(); + public canvas: HTMLCanvasElement; //canvas 实例 + + ngOnInit(): void { + ThreeHomeComponent.instance = this; + this.canvas = this.element.nativeElement.querySelector('#center') as HTMLCanvasElement; + this.game.init(this.canvas); + } + +} diff --git a/src/app/ui/tabbar/tabbar.component.ts b/src/app/ui/tabbar/tabbar.component.ts index 2ef7b37..4598098 100644 --- a/src/app/ui/tabbar/tabbar.component.ts +++ b/src/app/ui/tabbar/tabbar.component.ts @@ -25,6 +25,11 @@ export class TabbarComponent implements OnInit { },1000); } + //进入 三维场景 + initThreeDimensional() { + this.router.navigate(['/threeDimensional']) + } + //获得时间 time:string getTime() { diff --git a/src/assets/js/babylon.ktx2Decoder.js b/src/assets/js/babylon.ktx2Decoder.js new file mode 100644 index 0000000..7e58c3b --- /dev/null +++ b/src/assets/js/babylon.ktx2Decoder.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.KTX2DECODER=t():e.KTX2DECODER=t()}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/dist/",r(r.s=1)}([function(e,t,r){"use strict";r.d(t,"b",(function(){return C})),r.d(t,"j",(function(){return i})),r.d(t,"c",(function(){return u})),r.d(t,"o",(function(){return n})),r.d(t,"p",(function(){return a})),r.d(t,"k",(function(){return s})),r.d(t,"l",(function(){return c})),r.d(t,"m",(function(){return d})),r.d(t,"n",(function(){return U})),r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return m})),r.d(t,"e",(function(){return _})),r.d(t,"f",(function(){return g})),r.d(t,"h",(function(){return b})),r.d(t,"g",(function(){return B})),r.d(t,"i",(function(){return T}));var n,a,o=function(){function e(e,t,r){e.buffer?this._dataView=new DataView(e.buffer,e.byteOffset+(null!=t?t:0),null!=r?r:e.byteLength):this._dataView=new DataView(e,null!=t?t:0,null!=r?r:e.byteLength),this._dataByteOffset=0}return Object.defineProperty(e.prototype,"byteOffset",{get:function(){return this._dataByteOffset},enumerable:!1,configurable:!0}),e.prototype.readUint8=function(){var e=this._dataView.getUint8(this._dataByteOffset);return this._dataByteOffset+=1,e},e.prototype.readInt8=function(){var e=this._dataView.getInt8(this._dataByteOffset);return this._dataByteOffset+=1,e},e.prototype.readUint16=function(){var e=this._dataView.getUint16(this._dataByteOffset,!0);return this._dataByteOffset+=2,e},e.prototype.readInt16=function(){var e=this._dataView.getInt16(this._dataByteOffset,!0);return this._dataByteOffset+=2,e},e.prototype.readUint32=function(){var e=this._dataView.getUint32(this._dataByteOffset,!0);return this._dataByteOffset+=4,e},e.prototype.readInt32=function(){var e=this._dataView.getInt32(this._dataByteOffset,!0);return this._dataByteOffset+=4,e},e.prototype.readUint64=function(){var e=this._dataView.getUint32(this._dataByteOffset,!0),t=this._dataView.getUint32(this._dataByteOffset+4,!0),r=e+Math.pow(2,32)*t;return this._dataByteOffset+=8,r},e.prototype.readUint8Array=function(e){var t=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._dataByteOffset,e);return this._dataByteOffset+=e,t},e.prototype.skipBytes=function(e){return this._dataByteOffset+=e,this},e}();!function(e){e[e.ETC1S=0]="ETC1S",e[e.UASTC4x4=1]="UASTC4x4"}(n||(n={})),function(e){e[e.ASTC_4x4_RGBA=0]="ASTC_4x4_RGBA",e[e.BC7_RGBA=1]="BC7_RGBA",e[e.BC3_RGBA=2]="BC3_RGBA",e[e.BC1_RGB=3]="BC1_RGB",e[e.PVRTC1_4_RGBA=4]="PVRTC1_4_RGBA",e[e.PVRTC1_4_RGB=5]="PVRTC1_4_RGB",e[e.ETC2_RGBA=6]="ETC2_RGBA",e[e.ETC1_RGB=7]="ETC1_RGB",e[e.RGBA32=8]="RGBA32"}(a||(a={}));var i,s=function(){function e(){}return e.CanTranscode=function(e,t,r){return!1},e.prototype.getName=function(){return e.Name},e.prototype.initialize=function(){},e.prototype.needMemoryManager=function(){return!1},e.prototype.setMemoryManager=function(e){},e.prototype.transcode=function(e,t,r,n,a,o,i,s,u){return Promise.resolve(null)},e.Name="Transcoder",e}();!function(e){e[e.None=0]="None",e[e.BasisLZ=1]="BasisLZ",e[e.ZStandard=2]="ZStandard",e[e.ZLib=3]="ZLib"}(i||(i={}));var u=function(){function e(e){this._data=e}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"header",{get:function(){return this._header},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"levels",{get:function(){return this._levels},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dfdBlock",{get:function(){return this._dfdBlock},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supercompressionGlobalData",{get:function(){return this._supercompressionGlobalData},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return e.IsValid(this._data)},e.prototype.parse=function(){var e=12,t=new o(this._data,e,68),r=this._header={vkFormat:t.readUint32(),typeSize:t.readUint32(),pixelWidth:t.readUint32(),pixelHeight:t.readUint32(),pixelDepth:t.readUint32(),layerCount:t.readUint32(),faceCount:t.readUint32(),levelCount:t.readUint32(),supercompressionScheme:t.readUint32(),dfdByteOffset:t.readUint32(),dfdByteLength:t.readUint32(),kvdByteOffset:t.readUint32(),kvdByteLength:t.readUint32(),sgdByteOffset:t.readUint64(),sgdByteLength:t.readUint64()};if(r.pixelDepth>0)throw new Error("Failed to parse KTX2 file - Only 2D textures are currently supported.");if(r.layerCount>1)throw new Error("Failed to parse KTX2 file - Array textures are not currently supported.");if(r.faceCount>1)throw new Error("Failed to parse KTX2 file - Cube textures are not currently supported.");e+=t.byteOffset;for(var n=Math.max(1,r.levelCount),a=new o(this._data,e,3*n*8),i=this._levels=[];n--;)i.push({byteOffset:a.readUint64(),byteLength:a.readUint64(),uncompressedByteLength:a.readUint64()});e+=a.byteOffset;var s=new o(this._data,r.dfdByteOffset,r.dfdByteLength),u=this._dfdBlock={vendorId:s.skipBytes(4).readUint16(),descriptorType:s.readUint16(),versionNumber:s.readUint16(),descriptorBlockSize:s.readUint16(),colorModel:s.readUint8(),colorPrimaries:s.readUint8(),transferFunction:s.readUint8(),flags:s.readUint8(),texelBlockDimension:{x:s.readUint8()+1,y:s.readUint8()+1,z:s.readUint8()+1,w:s.readUint8()+1},bytesPlane:[s.readUint8(),s.readUint8(),s.readUint8(),s.readUint8(),s.readUint8(),s.readUint8(),s.readUint8(),s.readUint8()],numSamples:0,samples:new Array};u.numSamples=(u.descriptorBlockSize-24)/16;for(var d=0;d>4,c.channelType=15&c.channelType,u.samples.push(c)}var f=this._supercompressionGlobalData={};if(r.sgdByteLength>0){var l=new o(this._data,r.sgdByteOffset,r.sgdByteLength);f.endpointCount=l.readUint16(),f.selectorCount=l.readUint16(),f.endpointsByteLength=l.readUint32(),f.selectorsByteLength=l.readUint32(),f.tablesByteLength=l.readUint32(),f.extendedByteLength=l.readUint32(),f.imageDescs=[];var h=this._getImageCount();for(d=0;d>t,1);return Math.max(this._header.layerCount,1)*this._header.faceCount*e},Object.defineProperty(e.prototype,"textureFormat",{get:function(){return 166===this._dfdBlock.colorModel?n.UASTC4x4:n.ETC1S},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasAlpha",{get:function(){switch(this.textureFormat){case n.ETC1S:return 2===this._dfdBlock.numSamples&&(15===this._dfdBlock.samples[0].channelType||15===this._dfdBlock.samples[1].channelType);case n.UASTC4x4:return 3===this._dfdBlock.samples[0].channelType}return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needZSTDDecoder",{get:function(){return this._header.supercompressionScheme===i.ZStandard},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInGammaSpace",{get:function(){return 2===this._dfdBlock.transferFunction},enumerable:!1,configurable:!0}),e.IsValid=function(e){if(e.byteLength>=12){var t=new Uint8Array(e.buffer,e.byteOffset,12);if(171===t[0]&&75===t[1]&&84===t[2]&&88===t[3]&&32===t[4]&&50===t[5]&&48===t[6]&&187===t[7]&&13===t[8]&&10===t[9]&&26===t[10]&&10===t[11])return!0}return!1},e}(),d=function(){function e(t){void 0===t&&(t=e.InitialMemoryPages),this._numPages=t,this._memory=new WebAssembly.Memory({initial:this._numPages}),this._memoryViewByteLength=this._numPages<<16,this._memoryViewOffset=0,this._memoryView=new Uint8Array(this._memory.buffer,this._memoryViewOffset,this._memoryViewByteLength)}return e.LoadWASM=function(e){if(this.LoadBinariesFromCurrentThread)return new Promise((function(t,r){fetch(e).then((function(t){if(t.ok)return t.arrayBuffer();throw new Error('Could not fetch the wasm component from "'+e+'": '+t.status+" - "+t.statusText)})).then((function(e){return t(e)})).catch((function(e){r(e)}))}));var t=this._RequestId++;return new Promise((function(r){var n=function(e){"wasmLoaded"===e.data.action&&e.data.id===t&&(self.removeEventListener("message",n),r(e.data.wasmBinary))};self.addEventListener("message",n),postMessage({action:"loadWASM",path:e,id:t})}))},Object.defineProperty(e.prototype,"wasmMemory",{get:function(){return this._memory},enumerable:!1,configurable:!0}),e.prototype.getMemoryView=function(e,t,r){return void 0===t&&(t=0),r=null!=r?r:e<<16,this._numPages>2)*(t+3>>2);a&&(r=e*(t+3>>2)*4*4);var i=1+(16*o+65535+(this._transcodeInPlace?0:r)>>16),s=this.memoryManager.getMemoryView(i,65536,16*o),u=this._transcodeInPlace?null:new Uint8Array(this._memoryManager.wasmMemory.buffer,65536+16*o,a?e*t*4:r);return s.set(n),[s,u,o]},t}(s),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.CanTranscode=function(e,t,r){return e===n.UASTC4x4&&t===a.ASTC_4x4_RGBA},t.prototype.getName=function(){return t.Name},t.prototype.initialize=function(){e.prototype.initialize.call(this),this.setModulePath(t.WasmModuleURL)},t.WasmModuleURL="https://preview.babylonjs.com/ktx2Transcoders/uastc_astc.wasm",t.Name="UniversalTranscoder_UASTC_ASTC",t}(m),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.CanTranscode=function(e,t,r){return e===n.UASTC4x4&&t===a.BC7_RGBA},t.prototype.getName=function(){return t.Name},t.prototype.initialize=function(){e.prototype.initialize.call(this),this.setModulePath(t.WasmModuleURL)},t.WasmModuleURL="https://preview.babylonjs.com/ktx2Transcoders/uastc_bc7.wasm",t.Name="UniversalTranscoder_UASTC_BC7",t}(m),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.CanTranscode=function(e,t,r){return e===n.UASTC4x4&&t===a.RGBA32&&!r},t.prototype.getName=function(){return t.Name},t.prototype.initialize=function(){e.prototype.initialize.call(this),this._transcodeInPlace=!1,this.setModulePath(t.WasmModuleURL)},t.prototype.transcode=function(e,t,r,n,a,o,i,s,u){var d=this;return this._loadModule().then((function(e){var t=e.module,r=d._prepareTranscoding(n,a,o,u,!0)[1];return 0===t.decodeRGBA32(n,a)?r.slice():null}))},t.WasmModuleURL="https://preview.babylonjs.com/ktx2Transcoders/uastc_rgba32_unorm.wasm",t.Name="UniversalTranscoder_UASTC_RGBA_UNORM",t}(m),B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.CanTranscode=function(e,t,r){return e===n.UASTC4x4&&t===a.RGBA32&&r},t.prototype.getName=function(){return t.Name},t.prototype.initialize=function(){e.prototype.initialize.call(this),this._transcodeInPlace=!1,this.setModulePath(t.WasmModuleURL)},t.prototype.transcode=function(e,t,r,n,a,o,i,s,u){var d=this;return this._loadModule().then((function(e){var t=e.module,r=d._prepareTranscoding(n,a,o,u,!0)[1];return 0===t.decodeRGBA32(n,a)?r.slice():null}))},t.WasmModuleURL="https://preview.babylonjs.com/ktx2Transcoders/uastc_rgba32_srgb.wasm",t.Name="UniversalTranscoder_UASTC_RGBA_SRGB",t}(m),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.getName=function(){return t.Name},t.prototype._getMSCBasisTranscoder=function(){var e=this;return this._mscBasisTranscoderPromise||(this._mscBasisTranscoderPromise=d.LoadWASM(t.WasmModuleURL).then((function(r){return t.UseFromWorkerThread&&importScripts(t.JSModuleURL),new Promise((function(t){MSC_TRANSCODER({wasmBinary:r}).then((function(r){r.initTranscoders(),e._mscBasisModule=r,t()}))}))}))),this._mscBasisTranscoderPromise},t.CanTranscode=function(e,t,r){return!0},t.prototype.transcode=function(e,t,r,o,i,s,u,d,c){var f=this;return this._getMSCBasisTranscoder().then((function(){var l,h=f._mscBasisModule,p=e===n.UASTC4x4?new h.UastcImageTranscoder:new h.BasisLzEtc1sImageTranscoder,y=e===n.UASTC4x4?h.TextureFormat.UASTC4x4:h.TextureFormat.ETC1S,m=new h.ImageInfo(y,o,i,r),_=h.TranscodeTarget[a[t]];if(!h.isFormatSupported(_,y))throw new Error('MSCTranscoder: Transcoding from "'+n[e]+'" to "'+a[t]+'" not supported by current transcoder build.');if(e===n.ETC1S){var g=u.supercompressionGlobalData;p.decodePalettes(g.endpointCount,g.endpointsData,g.selectorCount,g.selectorsData),p.decodeTables(g.tablesData),m.flags=d.imageFlags,m.rgbByteOffset=0,m.rgbByteLength=d.rgbSliceByteLength,m.alphaByteOffset=d.alphaSliceByteOffset>0?d.rgbSliceByteLength:0,m.alphaByteLength=d.alphaSliceByteLength,l=p.transcodeImage(_,c,m,0,!1)}else m.flags=0,m.rgbByteOffset=0,m.rgbByteLength=s,m.alphaByteOffset=0,m.alphaByteLength=0,l=p.transcodeImage(_,c,m,0,u.hasAlpha,!1);if(l&&void 0!==l.transcodedImage){var b=l.transcodedImage.get_typed_memory_view().slice();return l.transcodedImage.delete(),b}return null}))},t.JSModuleURL="https://preview.babylonjs.com/ktx2Transcoders/msc_basis_transcoder.js",t.WasmModuleURL="https://preview.babylonjs.com/ktx2Transcoders/msc_basis_transcoder.wasm",t.UseFromWorkerThread=!0,t.Name="MSCTranscoder",t}(s),w={env:{emscripten_notify_memory_growth:function(e){y=new Uint8Array(p.exports.memory.buffer)}}},U=function(){function e(){}return e.prototype.init=function(){return h||(h="undefined"!=typeof fetch?fetch(e.WasmModuleURL).then((function(e){if(e.ok)return e.arrayBuffer();throw new Error("Could not fetch the wasm component for the Zstandard decompression lib: "+e.status+" - "+e.statusText)})).then((function(e){return WebAssembly.instantiate(e,w)})).then(this._init):WebAssembly.instantiateStreaming(fetch(e.WasmModuleURL),w).then(this._init))},e.prototype._init=function(e){p=e.instance,w.env.emscripten_notify_memory_growth(0)},e.prototype.decode=function(e,t){if(void 0===t&&(t=0),!p)throw new Error("ZSTDDecoder: Await .init() before decoding.");var r=e.byteLength,n=p.exports.malloc(r);y.set(e,n),t=t||Number(p.exports.ZSTD_findDecompressedSize(n,r));var a=p.exports.malloc(t),o=p.exports.ZSTD_decompress(a,t,n,r),i=y.slice(a,a+o);return p.exports.free(n),p.exports.free(a),i},e.WasmModuleURL="https://preview.babylonjs.com/zstddec.wasm",e}(),v=function(e){return 0==(e&e-1)&&0!==e},C=function(){function e(){this._transcoderMgr=new c}return e.prototype.decode=function(e,t,r){var n=this;return Promise.resolve().then((function(){var a=new u(e);if(!a.isValid())throw new Error("Invalid KT2 file: wrong signature");return a.parse(),a.needZSTDDecoder?(n._zstdDecoder||(n._zstdDecoder=new U),n._zstdDecoder.init().then((function(){return n._decodeData(a,t,r)}))):n._decodeData(a,t,r)}))},e.prototype._decodeData=function(e,t,r){var o=e.header.pixelWidth,s=e.header.pixelHeight,u=e.textureFormat,d=v(o)&&v(s),c=-1,f=-1,l=!0;(null==r?void 0:r.forceRGBA)?(c=a.RGBA32,f=32856,l=!1):t.astc?(c=a.ASTC_4x4_RGBA,f=37808):t.bptc?(c=a.BC7_RGBA,f=36492):(null==r?void 0:r.useRGBAIfASTCBC7NotAvailableWhenUASTC)&&u===n.UASTC4x4?(c=a.RGBA32,f=32856,l=!1):t.s3tc?(c=e.hasAlpha?a.BC3_RGBA:a.BC1_RGB,f=e.hasAlpha?33779:33777):t.pvrtc&&d?(c=e.hasAlpha?a.PVRTC1_4_RGBA:a.PVRTC1_4_RGB,f=e.hasAlpha?35842:35840):t.etc2?(c=e.hasAlpha?a.ETC2_RGBA:a.ETC1_RGB,f=e.hasAlpha?37496:37492):t.etc1?(c=a.ETC1_RGB,f=36196):(c=a.RGBA32,f=32856,l=!1);var h=this._transcoderMgr.findTranscoder(u,c,e.isInGammaSpace,null==r?void 0:r.bypassTranscoders);if(null===h)throw new Error('no transcoder found to transcode source texture format "'+n[u]+'" to format "'+a[c]+'"');for(var p=[],y=[],m={width:0,height:0,transcodedFormat:f,mipmaps:p,isInGammaSpace:e.isInGammaSpace,transcoderName:h.getName()},_=0,g=0;g0&&(_+=Math.max(e.header.layerCount,1)*e.header.faceCount*Math.max(e.header.pixelDepth>>g-1,1));var b=Math.floor(o/(1<>2)*(B+3>>2)*e.dfdBlock.bytesPlane[0],U=e.levels[g].uncompressedByteLength,C=e.data.buffer,A=e.levels[g].byteOffset+e.data.byteOffset,S=0;e.header.supercompressionScheme===i.ZStandard&&(C=this._zstdDecoder.decode(new Uint8Array(C,A,e.levels[g].byteLength),U),A=0),0===g&&(m.width=l?b+3&-4:b,m.height=l?B+3&-4:B);for(var M=function(t){var r=void 0,n=null;e.header.supercompressionScheme===i.BasisLZ?(n=e.supercompressionGlobalData.imageDescs[_+t],r=new Uint8Array(C,A+n.rgbSliceByteOffset,n.rgbSliceByteLength+n.alphaSliceByteLength)):(r=new Uint8Array(C,A+S,w),S+=w);var a={data:null,width:b,height:B},o=h.transcode(u,c,g,b,B,U,e,n,r).then((function(e){return a.data=e,e})).catch((function(e){var t;return m.errors=null!==(t=m.errors)&&void 0!==t?t:"",m.errors+=e+"\n",null}));y.push(o),p.push(a)},O=0;O1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);Module["quit"]=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){Module["read"]=function shell_read(f){return read(f)}}Module["readBinary"]=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=function(status){quit(status)}}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}Module["read"]=function shell_read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=function(title){document.title=title}}else{}var out=Module["print"]||(typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null);var err=Module["printErr"]||(typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||out);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var asm2wasmImports={"f64-rem":function(x,y){return x%y},"debugger":function(){debugger}};var functionPointers=new Array(0);var tempRet0=0;var setTempRet0=function(value){tempRet0=value};if(typeof WebAssembly!=="object"){err("no native wasm support detected")}var wasmMemory;var wasmTable;var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(u8Array[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;var WASM_PAGE_SIZE=65536;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var DYNAMIC_BASE=5401280,DYNAMICTOP_PTR=158368;var TOTAL_STACK=5242880;var INITIAL_TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(INITIAL_TOTAL_MEMORY>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}var wasmBinaryFile="basis_transcoder.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(Module["wasmBinary"]){return new Uint8Array(Module["wasmBinary"])}if(Module["readBinary"]){return Module["readBinary"](wasmBinaryFile)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!Module["wasmBinary"]&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(env){var info={"env":env,"global":{"NaN":NaN,Infinity:Infinity},"global.Math":Math,"asm2wasm":asm2wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}if(!Module["wasmBinary"]&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch==="function"){WebAssembly.instantiateStreaming(fetch(wasmBinaryFile,{credentials:"same-origin"}),info).then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");instantiateArrayBuffer(receiveInstantiatedSource)})}else{instantiateArrayBuffer(receiveInstantiatedSource)}return{}}Module["asm"]=function(global,env,providedBuffer){env["memory"]=wasmMemory;env["table"]=wasmTable=new WebAssembly.Table({"initial":70,"maximum":70,"element":"anyfunc"});env["__memory_base"]=1024;env["__table_base"]=0;var exports=createWasm(env);return exports};__ATINIT__.push({func:function(){globalCtors()}});function ___cxa_allocate_exception(size){return _malloc(size)}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}function ___cxa_free_exception(ptr){try{return _free(ptr)}catch(e){}}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(adjusted){if(!adjusted||EXCEPTIONS.infos[adjusted])return adjusted;for(var key in EXCEPTIONS.infos){var ptr=+key;var adj=EXCEPTIONS.infos[ptr].adjusted;var len=adj.length;for(var i=0;i0);info.refcount--;if(info.refcount===0&&!info.rethrown){if(info.destructor){Module["dynCall_vi"](info.destructor,ptr)}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}},clearRef:function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0}};function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:[ptr],type:type,destructor:destructor,refcount:0,caught:false,rethrown:false};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr}var SYSCALLS={buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:0,get:function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(){var ret=UTF8ToString(SYSCALLS.get());return ret},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();return low},getZero:function(){SYSCALLS.get()}};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j=char_0&&f<=char_9){return"_"+name}else{return name}}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function("body","return function "+name+"() {\n"+' "use strict";'+" return body.apply(this, arguments);\n"+"};\n")(body)}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+": "+this.message}};return errorClass}var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}});clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function runDestructor(handle){var $$=handle.$$;if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}this.$$.count.value-=1;var toDelete=0===this.$$.count.value;if(toDelete){runDestructor(this)}if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}var delayFunction=undefined;var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater}function ClassHandle(){}var registeredPointers={};function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError("Cannot register public name '"+name+"' twice")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,__emval_register(function(){clonedHandle["delete"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]()}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return Object.create(prototype,{$$:{value:record}})}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(dynCall){var args=[];for(var i=1;i>2)+i])}return array}function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!")}classType.registeredClass.constructor_body[argCount-1]=function unboundTypeHandler(){throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){classType.registeredClass.constructor_body[argCount-1]=function constructor_body(){if(arguments.length!==argCount-1){throwBindingError(humanName+" called with "+arguments.length+" arguments, expected "+(argCount-1))}var destructors=[];var args=new Array(argCount);args[0]=rawConstructor;for(var i=1;i0?", ":"")+argsListWired}invokerFnBody+=(returns?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function count_emval_handles(){var count=0;for(var i=5;i>2])};case 3:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError("Unknown float type: "+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(value){return value},"toWireType":function(destructors,value){if(typeof value!=="number"&&typeof value!=="boolean"){throw new TypeError('Cannot convert "'+_embind_repr(value)+'" to '+this.name)}return value},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null})}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError("Cannot call "+name+" due to unbound types",argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[]})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=function(value){return value};if(minRange===0){var bitshift=32-8*size;fromWireType=function(value){return value<>>bitshift}}var isUnsignedType=name.indexOf("unsigned")!=-1;registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":function(destructors,value){if(typeof value!=="number"&&typeof value!=="boolean"){throw new TypeError('Cannot convert "'+_embind_repr(value)+'" to '+this.name)}if(valuemaxRange){throw new TypeError('Passing a number "'+_embind_repr(value)+'" from JS side to C/C++ side to an argument of type "'+name+'", which is outside the valid range ['+minRange+", "+maxRange+"]!")}return isUnsignedType?value>>>0:value|0},"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(heap["buffer"],data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var str;if(stdStringIsUTF8){var endChar=HEAPU8[value+4+length];var endCharSwap=0;if(endChar!=0){endCharSwap=endChar;HEAPU8[value+4+length]=0}var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i;if(HEAPU8[currentBytePtr]==0){var stringSegment=UTF8ToString(decodeStartPtr);if(str===undefined)str=stringSegment;else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}if(endCharSwap!=0)HEAPU8[value+4+length]=endCharSwap}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr+4,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+4+i]=charCode}}else{for(var i=0;i>2];var a=new Array(length);var start=value+4>>shift;for(var i=0;i>2]=length;var start=ptr+4>>shift;for(var i=0;i>2]=rd;return returnType["toWireType"](destructors,handle)}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}else{return symbol}}var emval_methodCallers=[];function __emval_call_void_method(caller,handle,methodName,args){caller=emval_methodCallers[caller];handle=requireHandle(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)}function emval_get_global(){return function(){return Function}()("return this")()}function __emval_get_global(name){if(name===0){return __emval_register(emval_get_global())}else{name=getStringOrSymbol(name);return __emval_register(emval_get_global()[name])}}function __emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function __emval_lookupTypes(argCount,argTypes,argWireTypes){var a=new Array(argCount);for(var i=0;i>2)+i],"parameter "+i)}return a}function __emval_get_method_caller(argCount,argTypes){var types=__emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+"_$"+types.slice(1).map(function(t){return t.name}).join("_")+"$";var params=["retType"];var args=[retType];var argsList="";for(var i=0;i4){emval_handle_array[handle].refcount+=1}}function craftEmvalAllocator(argCount){var argsList="";for(var i=0;i> 2) + "+i+'], "parameter '+i+'");\n'+"var arg"+i+" = argType"+i+".readValueFromPointer(args);\n"+"args += argType"+i+"['argPackAdvance'];\n"}functionBody+="var obj = new constructor("+argsList+");\n"+"return __emval_register(obj);\n"+"}\n";return new Function("requireRegisteredType","Module","__emval_register",functionBody)(requireRegisteredType,Module,__emval_register)}var emval_newers={};function __emval_new(handle,argCount,argTypes,args){handle=requireHandle(handle);var newer=emval_newers[argCount];if(!newer){newer=craftEmvalAllocator(argCount);emval_newers[argCount]=newer}return newer(handle,argTypes,args)}function __emval_new_cstring(v){return __emval_register(getStringOrSymbol(v))}function __emval_run_destructors(handle){var destructors=emval_handle_array[handle].value;runDestructors(destructors);__emval_decref(handle)}function _abort(){Module["abort"]()}function _emscripten_get_heap_size(){return HEAP8.length}function abortOnCannotGrowMemory(requestedSize){abort("OOM")}function emscripten_realloc_buffer(size){var PAGE_MULTIPLE=65536;size=alignUp(size,PAGE_MULTIPLE);var oldSize=buffer.byteLength;try{var result=wasmMemory.grow((size-oldSize)/65536);if(result!==(-1|0)){buffer=wasmMemory.buffer;return true}else{return false}}catch(e){return false}}function _emscripten_resize_heap(requestedSize){var oldSize=_emscripten_get_heap_size();var PAGE_MULTIPLE=65536;var LIMIT=2147483648-PAGE_MULTIPLE;if(requestedSize>LIMIT){return false}var MIN_TOTAL_MEMORY=16777216;var newSize=Math.max(oldSize,MIN_TOTAL_MEMORY);while(newSize>2]=value;return value}embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");InternalError=Module["InternalError"]=extendError(Error,"InternalError");init_ClassHandle();init_RegisteredPointer();init_embind();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();var asmGlobalArg={};var asmLibraryArg={"d":abort,"B":setTempRet0,"i":___cxa_allocate_exception,"h":___cxa_throw,"n":___setErrNo,"A":___syscall140,"m":___syscall146,"z":___syscall6,"y":__embind_register_bool,"x":__embind_register_class,"w":__embind_register_class_constructor,"g":__embind_register_class_function,"K":__embind_register_emval,"v":__embind_register_float,"J":__embind_register_function,"f":__embind_register_integer,"c":__embind_register_memory_view,"u":__embind_register_std_string,"I":__embind_register_std_wstring,"H":__embind_register_void,"t":__emval_as,"s":__emval_call_void_method,"b":__emval_decref,"G":__emval_get_global,"r":__emval_get_method_caller,"q":__emval_get_module_property,"k":__emval_get_property,"l":__emval_incref,"p":__emval_new,"j":__emval_new_cstring,"o":__emval_run_destructors,"e":_abort,"F":_emscripten_get_heap_size,"E":_emscripten_memcpy_big,"D":_emscripten_resize_heap,"C":abortOnCannotGrowMemory,"a":DYNAMICTOP_PTR};var asm=Module["asm"](asmGlobalArg,asmLibraryArg,buffer);Module["asm"]=asm;var ___errno_location=Module["___errno_location"]=function(){return Module["asm"]["L"].apply(null,arguments)};var ___getTypeName=Module["___getTypeName"]=function(){return Module["asm"]["M"].apply(null,arguments)};var _free=Module["_free"]=function(){return Module["asm"]["N"].apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return Module["asm"]["O"].apply(null,arguments)};var globalCtors=Module["globalCtors"]=function(){return Module["asm"]["ca"].apply(null,arguments)};var dynCall_ii=Module["dynCall_ii"]=function(){return Module["asm"]["P"].apply(null,arguments)};var dynCall_iidiiii=Module["dynCall_iidiiii"]=function(){return Module["asm"]["Q"].apply(null,arguments)};var dynCall_iii=Module["dynCall_iii"]=function(){return Module["asm"]["R"].apply(null,arguments)};var dynCall_iiii=Module["dynCall_iiii"]=function(){return Module["asm"]["S"].apply(null,arguments)};var dynCall_iiiii=Module["dynCall_iiiii"]=function(){return Module["asm"]["T"].apply(null,arguments)};var dynCall_iiiiii=Module["dynCall_iiiiii"]=function(){return Module["asm"]["U"].apply(null,arguments)};var dynCall_iiiiiiii=Module["dynCall_iiiiiiii"]=function(){return Module["asm"]["V"].apply(null,arguments)};var dynCall_iiiiiiiii=Module["dynCall_iiiiiiiii"]=function(){return Module["asm"]["W"].apply(null,arguments)};var dynCall_jiji=Module["dynCall_jiji"]=function(){return Module["asm"]["X"].apply(null,arguments)};var dynCall_v=Module["dynCall_v"]=function(){return Module["asm"]["Y"].apply(null,arguments)};var dynCall_vi=Module["dynCall_vi"]=function(){return Module["asm"]["Z"].apply(null,arguments)};var dynCall_vii=Module["dynCall_vii"]=function(){return Module["asm"]["_"].apply(null,arguments)};var dynCall_viiii=Module["dynCall_viiii"]=function(){return Module["asm"]["$"].apply(null,arguments)};var dynCall_viiiii=Module["dynCall_viiiii"]=function(){return Module["asm"]["aa"].apply(null,arguments)};var dynCall_viiiiii=Module["dynCall_viiiiii"]=function(){return Module["asm"]["ba"].apply(null,arguments)};Module["asm"]=asm;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};function run(args){args=args||Module["arguments"];if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){out(what);err(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}Module["noExitRuntime"]=true;run(); diff --git a/src/assets/js/basisTranscoder/basis_transcoder.wasm b/src/assets/js/basisTranscoder/basis_transcoder.wasm new file mode 100644 index 0000000..c5b4d20 Binary files /dev/null and b/src/assets/js/basisTranscoder/basis_transcoder.wasm differ diff --git a/src/assets/js/draco_decoder_gltf.js b/src/assets/js/draco_decoder_gltf.js new file mode 100644 index 0000000..13ec1e5 --- /dev/null +++ b/src/assets/js/draco_decoder_gltf.js @@ -0,0 +1,48 @@ + +var DracoDecoderModule = (function() { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; + return ( +function(DracoDecoderModule) { + DracoDecoderModule = DracoDecoderModule || {}; + +var Module=typeof DracoDecoderModule!=="undefined"?DracoDecoderModule:{};var isRuntimeInitialized=false;var isModuleParsed=false;Module["onRuntimeInitialized"]=function(){isRuntimeInitialized=true;if(isModuleParsed){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}};Module["onModuleParsed"]=function(){isModuleParsed=true;if(isRuntimeInitialized){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}};function isVersionSupported(versionString){if(typeof versionString!=="string")return false;const version=versionString.split(".");if(version.length<2||version.length>3)return false;if(version[0]==1&&version[1]>=0&&version[1]<=3)return true;if(version[0]!=0||version[1]>10)return false;return true}Module["isVersionSupported"]=isVersionSupported;var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=function shell_read(filename,binary){var ret=tryParseAsDataURI(filename);if(ret){return binary?ret:ret.toString()}if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);return nodeFS["readFileSync"](filename,binary?null:"utf8")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);quit_=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){var data=tryParseAsDataURI(f);if(data){return intArrayToString(data)}return read(f)}}readBinary=function readBinary(f){var data;data=tryParseAsDataURI(f);if(data){return data}if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit==="function"){quit_=function(status){quit(status)}}if(typeof print!=="undefined"){if(typeof console==="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!=="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var STACK_ALIGN=16;function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=Number(type.substr(1));assert(bits%8===0,"getNativeTypeSize invalid bits "+bits+", type "+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}function convertJsFunctionToWasm(func,sig){return func}var freeTableIndexes=[];function addFunctionWasm(func,sig){var table=wasmTable;var ret;if(freeTableIndexes.length){ret=freeTableIndexes.pop()}else{ret=table.length;try{table.grow(1)}catch(err){if(!(err instanceof RangeError)){throw err}throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}}try{table.set(ret,func)}catch(err){if(!(err instanceof TypeError)){throw err}assert(typeof sig!=="undefined","Missing signature argument to addFunction");var wrapped=convertJsFunctionToWasm(func,sig);table.set(ret,wrapped)}return ret}function removeFunctionWasm(index){freeTableIndexes.push(index)}var funcWrappers={};function dynCall(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime;if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];var Promise=function(){function noop(){}function bind(fn,thisArg){return function(){fn.apply(thisArg,arguments)}}function Promise(fn){if(!(this instanceof Promise))throw new TypeError("Promises must be constructed via new");if(typeof fn!=="function")throw new TypeError("not a function");this._state=0;this._handled=false;this._value=undefined;this._deferreds=[];doResolve(fn,this)}function handle(self,deferred){while(self._state===3){self=self._value}if(self._state===0){self._deferreds.push(deferred);return}self._handled=true;Promise._immediateFn(function(){var cb=self._state===1?deferred.onFulfilled:deferred.onRejected;if(cb===null){(self._state===1?resolve:reject)(deferred.promise,self._value);return}var ret;try{ret=cb(self._value)}catch(e){reject(deferred.promise,e);return}resolve(deferred.promise,ret)})}function resolve(self,newValue){try{if(newValue===self)throw new TypeError("A promise cannot be resolved with itself.");if(newValue&&(typeof newValue==="object"||typeof newValue==="function")){var then=newValue.then;if(newValue instanceof Promise){self._state=3;self._value=newValue;finale(self);return}else if(typeof then==="function"){doResolve(bind(then,newValue),self);return}}self._state=1;self._value=newValue;finale(self)}catch(e){reject(self,e)}}function reject(self,newValue){self._state=2;self._value=newValue;finale(self)}function finale(self){if(self._state===2&&self._deferreds.length===0){Promise._immediateFn(function(){if(!self._handled){Promise._unhandledRejectionFn(self._value)}})}for(var i=0,len=self._deferreds.length;i=294+0){abort("Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH.")}ret.push(null)};ret.set=function(i,func){ret[i]=func};ret.get=function(i){return ret[i]};return ret},Module:function(binary){return{}},Instance:function(module,info){var exports=( +// EMSCRIPTEN_START_ASM +function a(asmLibraryArg,wasmMemory,wasmTable){var scratchBuffer=new ArrayBuffer(8);var b=new Int32Array(scratchBuffer);var c=new Float32Array(scratchBuffer);var d=new Float64Array(scratchBuffer);function e(index){return b[index]}function f(index,value){b[index]=value}function g(){return d[0]}function h(value){d[0]=value}function i(low,high){b[0]=low;b[1]=high}function j(global,env,buffer){var k=env.memory;var l=wasmTable;var m=new global.Int8Array(buffer);var n=new global.Int16Array(buffer);var o=new global.Int32Array(buffer);var p=new global.Uint8Array(buffer);var q=new global.Uint16Array(buffer);var r=new global.Uint32Array(buffer);var s=new global.Float32Array(buffer);var t=new global.Float64Array(buffer);var u=global.Math.imul;var v=global.Math.fround;var w=global.Math.abs;var x=global.Math.clz32;var y=global.Math.min;var z=global.Math.max;var A=global.Math.floor;var B=global.Math.ceil;var C=global.Math.sqrt;var D=env.abort;var E=global.NaN;var F=global.Infinity;var G=env.__cxa_allocate_exception;var H=env.__cxa_throw;var I=env.fd_close;var J=env.fd_write;var K=env.abort;var L=env.environ_sizes_get;var M=env.environ_get;var N=env.emscripten_resize_heap;var O=env.emscripten_memcpy_big;var P=env.setTempRet0;var Q=env.fd_seek;var R=5256720;var S=13836;var T=0; +// EMSCRIPTEN_START_FUNCS +function il(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=R-16|0;R=l;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{if(a>>>0<=244){f=o[3333];h=a>>>0<11?16:a+11&-8;b=h>>>3|0;a=f>>>b|0;if(a&3){d=b+((a^-1)&1)|0;b=d<<3;e=o[b+13380>>2];a=e+8|0;c=o[e+8>>2];b=b+13372|0;l:{if((c|0)==(b|0)){m=13332,n=Sl(d)&f,o[m>>2]=n;break l}o[c+12>>2]=b;o[b+8>>2]=c}b=d<<3;o[e+4>>2]=b|3;b=b+e|0;o[b+4>>2]=o[b+4>>2]|1;break a}k=o[3335];if(h>>>0<=k>>>0){break k}if(a){c=a<>>12&16;c=a;b=b>>>a|0;a=b>>>5&8;c=c|a;b=b>>>a|0;a=b>>>2&4;c=c|a;b=b>>>a|0;a=b>>>1&2;c=c|a;b=b>>>a|0;a=b>>>1&1;c=(c|a)+(b>>>a|0)|0;a=c<<3;g=o[a+13380>>2];b=o[g+8>>2];a=a+13372|0;m:{if((b|0)==(a|0)){f=Sl(c)&f;o[3333]=f;break m}o[b+12>>2]=a;o[a+8>>2]=b}a=g+8|0;o[g+4>>2]=h|3;d=g+h|0;b=c<<3;e=b-h|0;o[d+4>>2]=e|1;o[b+g>>2]=e;if(k){b=k>>>3|0;c=(b<<3)+13372|0;h=o[3338];b=1<>2]}o[c+8>>2]=h;o[b+12>>2]=h;o[h+12>>2]=c;o[h+8>>2]=b}o[3338]=d;o[3335]=e;break a}i=o[3334];if(!i){break k}b=(i&0-i)+ -1|0;a=b>>>12&16;c=a;b=b>>>a|0;a=b>>>5&8;c=c|a;b=b>>>a|0;a=b>>>2&4;c=c|a;b=b>>>a|0;a=b>>>1&2;c=c|a;b=b>>>a|0;a=b>>>1&1;b=o[((c|a)+(b>>>a|0)<<2)+13636>>2];d=(o[b+4>>2]&-8)-h|0;c=b;while(1){o:{a=o[c+16>>2];if(!a){a=o[c+20>>2];if(!a){break o}}c=(o[a+4>>2]&-8)-h|0;e=c>>>0>>0;d=e?c:d;b=e?a:b;c=a;continue}break}j=o[b+24>>2];e=o[b+12>>2];if((e|0)!=(b|0)){a=o[b+8>>2];o[a+12>>2]=e;o[e+8>>2]=a;break b}c=b+20|0;a=o[c>>2];if(!a){a=o[b+16>>2];if(!a){break j}c=b+16|0}while(1){g=c;e=a;c=a+20|0;a=o[c>>2];if(a){continue}c=e+16|0;a=o[e+16>>2];if(a){continue}break}o[g>>2]=0;break b}h=-1;if(a>>>0>4294967231){break k}a=a+11|0;h=a&-8;i=o[3334];if(!i){break k}a=a>>>8|0;g=0;p:{if(!a){break p}g=31;if(h>>>0>16777215){break p}b=a+1048320>>>16&8;a=a<>>16&4;a=a<>>16&2;a=(a<>>15|0)-(c|(b|d))|0;g=(a<<1|h>>>a+21&1)+28|0}c=0-h|0;d=o[(g<<2)+13636>>2];q:{r:{s:{if(!d){a=0;break s}b=h<<((g|0)==31?0:25-(g>>>1|0)|0);a=0;while(1){t:{f=(o[d+4>>2]&-8)-h|0;if(f>>>0>=c>>>0){break t}e=d;c=f;if(c){break t}c=0;a=d;break r}f=o[d+20>>2];d=o[((b>>>29&4)+d|0)+16>>2];a=f?(f|0)==(d|0)?a:f:a;b=b<<((d|0)!=0);if(d){continue}break}}if(!(a|e)){a=2<>>12&16;d=a;b=b>>>a|0;a=b>>>5&8;d=d|a;b=b>>>a|0;a=b>>>2&4;d=d|a;b=b>>>a|0;a=b>>>1&2;d=d|a;b=b>>>a|0;a=b>>>1&1;a=o[((d|a)+(b>>>a|0)<<2)+13636>>2]}if(!a){break q}}while(1){b=(o[a+4>>2]&-8)-h|0;d=b>>>0>>0;c=d?b:c;e=d?a:e;b=o[a+16>>2];if(b){a=b}else{a=o[a+20>>2]}if(a){continue}break}}if(!e|c>>>0>=o[3335]-h>>>0){break k}g=o[e+24>>2];b=o[e+12>>2];if((e|0)!=(b|0)){a=o[e+8>>2];o[a+12>>2]=b;o[b+8>>2]=a;break c}d=e+20|0;a=o[d>>2];if(!a){a=o[e+16>>2];if(!a){break i}d=e+16|0}while(1){f=d;b=a;d=a+20|0;a=o[d>>2];if(a){continue}d=b+16|0;a=o[b+16>>2];if(a){continue}break}o[f>>2]=0;break c}c=o[3335];if(c>>>0>=h>>>0){d=o[3338];b=c-h|0;u:{if(b>>>0>=16){o[3335]=b;a=d+h|0;o[3338]=a;o[a+4>>2]=b|1;o[c+d>>2]=b;o[d+4>>2]=h|3;break u}o[3338]=0;o[3335]=0;o[d+4>>2]=c|3;a=c+d|0;o[a+4>>2]=o[a+4>>2]|1}a=d+8|0;break a}j=o[3336];if(j>>>0>h>>>0){b=j-h|0;o[3336]=b;c=o[3339];a=c+h|0;o[3339]=a;o[a+4>>2]=b|1;o[c+4>>2]=h|3;a=c+8|0;break a}a=0;i=h+47|0;b=i;if(o[3451]){c=o[3453]}else{o[3454]=-1;o[3455]=-1;o[3452]=4096;o[3453]=4096;o[3451]=l+12&-16^1431655768;o[3456]=0;o[3444]=0;c=4096}g=b+c|0;f=0-c|0;c=g&f;if(c>>>0<=h>>>0){break a}e=o[3443];if(e){d=o[3441];b=d+c|0;if(b>>>0<=d>>>0|b>>>0>e>>>0){break a}}if(p[13776]&4){break f}v:{w:{d=o[3339];if(d){a=13780;while(1){b=o[a>>2];if(b+o[a+4>>2]>>>0>d>>>0?b>>>0<=d>>>0:0){break w}a=o[a+8>>2];if(a){continue}break}}b=kl(0);if((b|0)==-1){break g}f=c;d=o[3452];a=d+ -1|0;if(a&b){f=(c-b|0)+(a+b&0-d)|0}if(f>>>0<=h>>>0|f>>>0>2147483646){break g}e=o[3443];if(e){d=o[3441];a=d+f|0;if(a>>>0<=d>>>0|a>>>0>e>>>0){break g}}a=kl(f);if((b|0)!=(a|0)){break v}break e}f=f&g-j;if(f>>>0>2147483646){break g}b=kl(f);if((b|0)==(o[a>>2]+o[a+4>>2]|0)){break h}a=b}if(!((a|0)==-1|h+48>>>0<=f>>>0)){b=o[3453];b=b+(i-f|0)&0-b;if(b>>>0>2147483646){b=a;break e}if((kl(b)|0)!=-1){f=b+f|0;b=a;break e}kl(0-f|0);break g}b=a;if((a|0)!=-1){break e}break g}e=0;break b}b=0;break c}if((b|0)!=-1){break e}}o[3444]=o[3444]|4}if(c>>>0>2147483646){break d}b=kl(c);a=kl(0);if(b>>>0>=a>>>0|(b|0)==-1|(a|0)==-1){break d}f=a-b|0;if(f>>>0<=h+40>>>0){break d}}a=o[3441]+f|0;o[3441]=a;if(a>>>0>r[3442]){o[3442]=a}x:{y:{z:{d=o[3339];if(d){a=13780;while(1){e=o[a>>2];c=o[a+4>>2];if((e+c|0)==(b|0)){break z}a=o[a+8>>2];if(a){continue}break}break y}a=o[3337];if(!(b>>>0>=a>>>0?a:0)){o[3337]=b}a=0;o[3446]=f;o[3445]=b;o[3341]=-1;o[3342]=o[3451];o[3448]=0;while(1){d=a<<3;c=d+13372|0;o[d+13380>>2]=c;o[d+13384>>2]=c;a=a+1|0;if((a|0)!=32){continue}break}d=f+ -40|0;a=b+8&7?-8-b&7:0;c=d-a|0;o[3336]=c;a=a+b|0;o[3339]=a;o[a+4>>2]=c|1;o[(b+d|0)+4>>2]=40;o[3340]=o[3455];break x}if(p[a+12|0]&8|b>>>0<=d>>>0|e>>>0>d>>>0){break y}o[a+4>>2]=c+f;a=d+8&7?-8-d&7:0;c=a+d|0;o[3339]=c;b=o[3336]+f|0;a=b-a|0;o[3336]=a;o[c+4>>2]=a|1;o[(b+d|0)+4>>2]=40;o[3340]=o[3455];break x}e=o[3337];if(b>>>0>>0){o[3337]=b;e=0}c=b+f|0;a=13780;A:{B:{C:{D:{E:{F:{while(1){if((c|0)!=o[a>>2]){a=o[a+8>>2];if(a){continue}break F}break}if(!(p[a+12|0]&8)){break E}}a=13780;while(1){c=o[a>>2];if(c>>>0<=d>>>0){g=c+o[a+4>>2]|0;if(g>>>0>d>>>0){break D}}a=o[a+8>>2];continue}}o[a>>2]=b;o[a+4>>2]=o[a+4>>2]+f;j=(b+8&7?-8-b&7:0)+b|0;o[j+4>>2]=h|3;b=c+(c+8&7?-8-c&7:0)|0;a=(b-j|0)-h|0;g=h+j|0;if((b|0)==(d|0)){o[3339]=g;a=o[3336]+a|0;o[3336]=a;o[g+4>>2]=a|1;break B}if(o[3338]==(b|0)){o[3338]=g;a=o[3335]+a|0;o[3335]=a;o[g+4>>2]=a|1;o[a+g>>2]=a;break B}c=o[b+4>>2];if((c&3)==1){i=c&-8;G:{if(c>>>0<=255){e=o[b+8>>2];c=c>>>3|0;d=o[b+12>>2];if((d|0)==(e|0)){m=13332,n=o[3333]&Sl(c),o[m>>2]=n;break G}o[e+12>>2]=d;o[d+8>>2]=e;break G}k=o[b+24>>2];f=o[b+12>>2];H:{if((f|0)!=(b|0)){c=o[b+8>>2];o[c+12>>2]=f;o[f+8>>2]=c;break H}I:{d=b+20|0;h=o[d>>2];if(h){break I}d=b+16|0;h=o[d>>2];if(h){break I}f=0;break H}while(1){c=d;f=h;d=f+20|0;h=o[d>>2];if(h){continue}d=f+16|0;h=o[f+16>>2];if(h){continue}break}o[c>>2]=0}if(!k){break G}d=o[b+28>>2];c=(d<<2)+13636|0;J:{if(o[c>>2]==(b|0)){o[c>>2]=f;if(f){break J}m=13336,n=o[3334]&Sl(d),o[m>>2]=n;break G}o[k+(o[k+16>>2]==(b|0)?16:20)>>2]=f;if(!f){break G}}o[f+24>>2]=k;c=o[b+16>>2];if(c){o[f+16>>2]=c;o[c+24>>2]=f}c=o[b+20>>2];if(!c){break G}o[f+20>>2]=c;o[c+24>>2]=f}b=b+i|0;a=a+i|0}o[b+4>>2]=o[b+4>>2]&-2;o[g+4>>2]=a|1;o[a+g>>2]=a;if(a>>>0<=255){a=a>>>3|0;b=(a<<3)+13372|0;c=o[3333];a=1<>2]}o[b+8>>2]=g;o[a+12>>2]=g;o[g+12>>2]=b;o[g+8>>2]=a;break B}b=g;d=a>>>8|0;c=0;L:{if(!d){break L}c=31;if(a>>>0>16777215){break L}c=d;d=d+1048320>>>16&8;c=c<>>16&4;c=c<>>16&2;c=(c<>>15|0)-(e|(d|f))|0;c=(c<<1|a>>>c+21&1)+28|0}o[b+28>>2]=c;o[g+16>>2]=0;o[g+20>>2]=0;e=(c<<2)+13636|0;d=o[3334];b=1<>2]=g;o[g+24>>2]=e;break M}d=a<<((c|0)==31?0:25-(c>>>1|0)|0);b=o[e>>2];while(1){c=b;if((o[b+4>>2]&-8)==(a|0)){break C}b=d>>>29|0;d=d<<1;e=(c+(b&4)|0)+16|0;b=o[e>>2];if(b){continue}break}o[e>>2]=g;o[g+24>>2]=c}o[g+12>>2]=g;o[g+8>>2]=g;break B}e=f+ -40|0;a=b+8&7?-8-b&7:0;c=e-a|0;o[3336]=c;a=a+b|0;o[3339]=a;o[a+4>>2]=c|1;o[(b+e|0)+4>>2]=40;o[3340]=o[3455];a=(g+(g+ -39&7?39-g&7:0)|0)+ -47|0;c=a>>>0>>0?d:a;o[c+4>>2]=27;a=o[3448];o[c+16>>2]=o[3447];o[c+20>>2]=a;a=o[3446];o[c+8>>2]=o[3445];o[c+12>>2]=a;o[3447]=c+8;o[3446]=f;o[3445]=b;o[3448]=0;a=c+24|0;while(1){o[a+4>>2]=7;b=a+8|0;a=a+4|0;if(g>>>0>b>>>0){continue}break}if((c|0)==(d|0)){break x}o[c+4>>2]=o[c+4>>2]&-2;g=c-d|0;o[d+4>>2]=g|1;o[c>>2]=g;if(g>>>0<=255){a=g>>>3|0;b=(a<<3)+13372|0;c=o[3333];a=1<>2]}o[b+8>>2]=d;o[a+12>>2]=d;o[d+12>>2]=b;o[d+8>>2]=a;break x}o[d+16>>2]=0;o[d+20>>2]=0;a=d;c=g>>>8|0;b=0;O:{if(!c){break O}b=31;if(g>>>0>16777215){break O}b=c;c=c+1048320>>>16&8;b=b<>>16&4;b=b<>>16&2;b=(b<>>15|0)-(e|(c|f))|0;b=(b<<1|g>>>b+21&1)+28|0}o[a+28>>2]=b;e=(b<<2)+13636|0;c=o[3334];a=1<>2]=d;o[d+24>>2]=e;break P}a=g<<((b|0)==31?0:25-(b>>>1|0)|0);b=o[e>>2];while(1){c=b;if((g|0)==(o[b+4>>2]&-8)){break A}b=a>>>29|0;a=a<<1;e=(c+(b&4)|0)+16|0;b=o[e>>2];if(b){continue}break}o[e>>2]=d;o[d+24>>2]=c}o[d+12>>2]=d;o[d+8>>2]=d;break x}a=o[c+8>>2];o[a+12>>2]=g;o[c+8>>2]=g;o[g+24>>2]=0;o[g+12>>2]=c;o[g+8>>2]=a}a=j+8|0;break a}a=o[c+8>>2];o[a+12>>2]=d;o[c+8>>2]=d;o[d+24>>2]=0;o[d+12>>2]=c;o[d+8>>2]=a}a=o[3336];if(a>>>0<=h>>>0){break d}b=a-h|0;o[3336]=b;c=o[3339];a=c+h|0;o[3339]=a;o[a+4>>2]=b|1;o[c+4>>2]=h|3;a=c+8|0;break a}o[3314]=48;a=0;break a}Q:{if(!g){break Q}d=o[e+28>>2];a=(d<<2)+13636|0;R:{if(o[a>>2]==(e|0)){o[a>>2]=b;if(b){break R}i=Sl(d)&i;o[3334]=i;break Q}o[g+(o[g+16>>2]==(e|0)?16:20)>>2]=b;if(!b){break Q}}o[b+24>>2]=g;a=o[e+16>>2];if(a){o[b+16>>2]=a;o[a+24>>2]=b}a=o[e+20>>2];if(!a){break Q}o[b+20>>2]=a;o[a+24>>2]=b}S:{if(c>>>0<=15){a=c+h|0;o[e+4>>2]=a|3;a=a+e|0;o[a+4>>2]=o[a+4>>2]|1;break S}o[e+4>>2]=h|3;d=e+h|0;o[d+4>>2]=c|1;o[c+d>>2]=c;if(c>>>0<=255){a=c>>>3|0;b=(a<<3)+13372|0;c=o[3333];a=1<>2]}o[b+8>>2]=d;o[a+12>>2]=d;o[d+12>>2]=b;o[d+8>>2]=a;break S}a=d;f=c>>>8|0;b=0;U:{if(!f){break U}b=31;if(c>>>0>16777215){break U}b=f;f=f+1048320>>>16&8;b=b<>>16&4;b=b<>>16&2;b=(b<>>15|0)-(h|(f|g))|0;b=(b<<1|c>>>b+21&1)+28|0}o[a+28>>2]=b;o[d+16>>2]=0;o[d+20>>2]=0;f=(b<<2)+13636|0;V:{a=1<>2]=d;o[d+24>>2]=f;break W}a=c<<((b|0)==31?0:25-(b>>>1|0)|0);h=o[f>>2];while(1){b=h;if((o[b+4>>2]&-8)==(c|0)){break V}f=a>>>29|0;a=a<<1;f=(b+(f&4)|0)+16|0;h=o[f>>2];if(h){continue}break}o[f>>2]=d;o[d+24>>2]=b}o[d+12>>2]=d;o[d+8>>2]=d;break S}a=o[b+8>>2];o[a+12>>2]=d;o[b+8>>2]=d;o[d+24>>2]=0;o[d+12>>2]=b;o[d+8>>2]=a}a=e+8|0;break a}X:{if(!j){break X}c=o[b+28>>2];a=(c<<2)+13636|0;Y:{if(o[a>>2]==(b|0)){o[a>>2]=e;if(e){break Y}m=13336,n=Sl(c)&i,o[m>>2]=n;break X}o[(o[j+16>>2]==(b|0)?16:20)+j>>2]=e;if(!e){break X}}o[e+24>>2]=j;a=o[b+16>>2];if(a){o[e+16>>2]=a;o[a+24>>2]=e}a=o[b+20>>2];if(!a){break X}o[e+20>>2]=a;o[a+24>>2]=e}Z:{if(d>>>0<=15){a=d+h|0;o[b+4>>2]=a|3;a=a+b|0;o[a+4>>2]=o[a+4>>2]|1;break Z}o[b+4>>2]=h|3;e=b+h|0;o[e+4>>2]=d|1;o[d+e>>2]=d;if(k){a=k>>>3|0;c=(a<<3)+13372|0;h=o[3338];a=1<>2]}o[c+8>>2]=h;o[a+12>>2]=h;o[h+12>>2]=c;o[h+8>>2]=a}o[3338]=e;o[3335]=d}a=b+8|0}R=l+16|0;return a|0}function ah(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;h=R-96|0;R=h;o[h+72>>2]=0;o[h+64>>2]=0;o[h+68>>2]=0;o[h+48>>2]=0;o[h+52>>2]=0;o[h+40>>2]=0;o[h+44>>2]=0;o[h+56>>2]=1065353216;o[h+32>>2]=0;o[h+24>>2]=0;o[h+28>>2]=0;y=o[a+124>>2];a:{b:{c:{d:{e:{f:{g:{if((b|0)>=1){t=o[a+216>>2]!=o[a+220>>2];while(1){h:{i:{j:{k:{l:{m:{n:{o:{if(!p[a+308|0]){break o}p:{q:{g=o[a+296>>2];i=o[a+304>>2];d=g+(i>>>3|0)|0;f=o[a+300>>2];if(d>>>0>=f>>>0){break q}d=p[d|0];e=i+1|0;o[a+304>>2]=e;if(!(d>>>(i&7)&1)){break q}j=e>>>3|0;d=g+j|0;r:{if(d>>>0>=f>>>0){d=e;e=0;break r}c=p[d|0];d=i+2|0;o[a+304>>2]=d;j=d>>>3|0;e=c>>>(e&7)&1}c=g+j|0;if(c>>>0>>0){c=p[c|0];o[a+304>>2]=d+1;d=c>>>(d&7)<<1&2}else{d=0}e=(d|e)<<1|1;switch(e+ -2|0){case 0:case 2:case 4:break b;case 5:break n;case 1:case 3:break p;default:break o}}e=o[h+68>>2];if((e|0)==o[h+64>>2]){d=-1;break g}c=-1;n=o[a+8>>2];i=o[n+24>>2];f=i;g=e+ -4|0;s=o[g>>2];d=-1;s:{if((s|0)==-1){break s}e=s+1|0;e=(e>>>0)%3|0?e:s+ -2|0;d=-1;if((e|0)==-1){break s}d=o[o[n>>2]+(e<<2)>>2]}f=o[f+(d<<2)>>2];if((f|0)!=-1){e=f+1|0;c=(e>>>0)%3|0?e:f+ -2|0}f=o[n+12>>2];r=u(k,3);e=r+1|0;o[f+(s<<2)>>2]=e;e=e<<2;o[e+f>>2]=s;q=r+2|0;o[f+(c<<2)>>2]=q;j=q<<2;o[j+f>>2]=c;l=o[n>>2];o[l+(r<<2)>>2]=d;x=e+l|0;f=-1;t:{if((c|0)==-1){break t}e=c+1|0;e=(e>>>0)%3|0?e:c+ -2|0;f=-1;if((e|0)==-1){break t}f=o[l+(e<<2)>>2]}o[x>>2]=f;u:{v:{if((s|0)!=-1){e=s+((s>>>0)%3|0?-1:2)|0;if((e|0)!=-1){break v}}o[j+l>>2]=-1;break u}e=o[l+(e<<2)>>2];o[j+l>>2]=e;if((e|0)==-1){break u}o[i+(e<<2)>>2]=q}c=o[a+120>>2]+(d>>>3&536870908)|0;e=o[c>>2];A=c,B=Sl(d)&e,o[A>>2]=B;o[g>>2]=r;break h}c=o[h+68>>2];if((c|0)==o[h+64>>2]){d=-1;break g}q=o[a+8>>2];d=o[q+12>>2];n=u(k,3);i=(e|0)==5;g=n+(i?2:1)|0;e=g<<2;r=o[c+ -4>>2];o[d+e>>2]=r;o[d+(r<<2)>>2]=g;eh(q+24|0,8268);d=-1;f=o[a+8>>2];j=o[f+24>>2];if(o[f+28>>2]-j>>2>(y|0)){break g}c=n+2|0;f=o[f>>2];x=f+e|0;e=o[q+28>>2]-o[q+24>>2]|0;d=(e>>2)+ -1|0;o[x>>2]=d;if(e){o[j+(d<<2)>>2]=g}c=i?n:c;i=f+(i+n<<2)|0;w:{x:{y:{if((r|0)!=-1){d=r+((r>>>0)%3|0?-1:2)|0;if((d|0)==-1){break y}d=o[f+(d<<2)>>2];o[f+(c<<2)>>2]=d;if((d|0)==-1){break x}o[j+(d<<2)>>2]=c;break x}o[f+(c<<2)>>2]=-1;e=-1;break w}o[f+(c<<2)>>2]=-1}d=r+1|0;d=(d>>>0)%3|0?d:r+ -2|0;e=-1;if((d|0)==-1){break w}e=o[f+(d<<2)>>2]}o[i>>2]=e;o[o[h+68>>2]+ -4>>2]=n;break m}d=-1;g=o[h+68>>2];f=o[h+64>>2];if((g|0)==(f|0)){break g}i=g+ -4|0;z=o[i>>2];o[h+68>>2]=i;n=o[h+44>>2];if(!n){break j}x=o[h+40>>2];q=Rl(n)>>>0>1;c=n+2147483647&k;z:{if(!q){break z}e=k;c=e;if(e>>>0>>0){break z}c=(k>>>0)%(n>>>0)|0}e=c;c=o[x+(e<<2)>>2];if(!c){break j}l=o[c>>2];if(!l){break j}j=n+ -1|0;while(1){A:{c=o[l+4>>2];B:{if((k|0)!=(c|0)){C:{if(!q){c=c&j;break C}if(c>>>0>>0){break C}c=(c>>>0)%(n>>>0)|0}if((c|0)!=(e|0)){break j}break B}if(o[l+8>>2]==(k|0)){break A}}l=o[l>>2];if(l){continue}break j}break}e=o[h+72>>2];if((e|0)!=(i|0)){o[i>>2]=o[l+12>>2];o[h+68>>2]=g;c=f;break i}q=i-f|0;i=q>>2;j=i+1|0;if(j>>>0>=1073741824){break l}g=e-f|0;e=g>>1;e=g>>2>>>0<536870911?e>>>0>>0?j:e:1073741823;c=0;D:{if(!e){break D}if(e>>>0>=1073741824){break a}c=yk(e<<2)}g=c+(i<<2)|0;o[g>>2]=o[l+12>>2];e=(e<<2)+c|0;g=g+4|0;if((q|0)>=1){ll(c,f,q)}o[h+72>>2]=e;o[h+68>>2]=g;o[h+64>>2]=c;if(!f){break i}jl(f);g=o[h+68>>2];c=o[h+64>>2];break i}e=o[a+8>>2];eh(e+24|0,8268);d=-1;c=o[a+8>>2];n=u(k,3);i=o[e+28>>2]-o[e+24>>2]|0;j=i>>2;f=j+ -1|0;o[o[c>>2]+(n<<2)>>2]=f;eh(c+24|0,8268);g=n+1|0;o[o[c>>2]+(g<<2)>>2]=(o[c+28>>2]-o[c+24>>2]>>2)+ -1;e=o[a+8>>2];eh(e+24|0,8268);c=n+2|0;o[o[e>>2]+(c<<2)>>2]=(o[e+28>>2]-o[e+24>>2]>>2)+ -1;e=o[a+8>>2];q=o[e+24>>2];if(o[e+28>>2]-q>>2>(y|0)){break g}E:{F:{if(!i){o[q+(j<<2)>>2]=g;d=1;break F}o[q+(f<<2)>>2]=n;d=0;if((i|0)==-4){break F}o[q+(j<<2)>>2]=g;d=j+1|0;if((d|0)==-1){break E}}o[q+(d<<2)>>2]=c}d=o[h+68>>2];e=o[h+72>>2];if((d|0)!=(e|0)){o[d>>2]=n;o[h+68>>2]=d+4;break m}j=o[h+64>>2];i=d-j|0;f=i>>2;g=f+1|0;if(g>>>0>=1073741824){break k}c=e-j|0;e=c>>1;c=c>>2>>>0<536870911?e>>>0>>0?g:e:1073741823;d=0;G:{if(!c){break G}if(c>>>0>=1073741824){break a}d=yk(c<<2)}e=d+(f<<2)|0;o[e>>2]=n;c=d+(c<<2)|0;e=e+4|0;if((i|0)>=1){ll(d,j,i)}o[h+72>>2]=c;o[h+68>>2]=e;o[h+64>>2]=d;if(!j){break m}jl(j)}l=o[a+40>>2];if((l|0)==o[a+36>>2]){break h}g=(k^-1)+b|0;while(1){d=-1;e=o[l+ -8>>2];if(e>>>0>g>>>0){break g}if((e|0)!=(g|0)){break h}c=p[l+ -4|0];e=l+ -12|0;f=o[e>>2];o[a+40>>2]=e;if((f|0)<0){break g}e=o[o[h+68>>2]+ -4>>2];o[h+20>>2]=(f^-1)+b;o[h+88>>2]=h+20;fh(h,h+40|0,h+20|0,h+88|0);f=o[h>>2];H:{if(c&1){d=-1;if((e|0)==-1){break H}d=e+1|0;d=(d>>>0)%3|0?d:e+ -2|0;break H}d=-1;if((e|0)==-1){break H}d=e+ -1|0;if((e>>>0)%3){break H}d=e+2|0}o[f+12>>2]=d;l=o[a+40>>2];if((l|0)!=o[a+36>>2]){continue}break}break h}Nk();D()}Nk();D()}g=i;c=f}if((c|0)==(g|0)){break g}w=o[g+ -4>>2];e=(w|0)==-1;s=o[a+8>>2];if(o[o[s+12>>2]+(w<<2)>>2]!=-1?!e:0){break g}j=(z|0)==-1;l=o[s+12>>2];if(o[l+(z<<2)>>2]!=-1?!j:0){break g}r=u(k,3);q=r+2|0;o[l+(w<<2)>>2]=q;n=q<<2;o[n+l>>2]=w;d=r+1|0;o[l+(z<<2)>>2]=d;i=d<<2;o[i+l>>2]=z;I:{if(!e){d=-1;e=-1;v=o[s>>2];f=v+(r<<2)|0;c=w+((w>>>0)%3|0?-1:2)|0;if((c|0)!=-1){e=o[(c<<2)+v>>2]}o[f>>2]=e;c=w+1|0;c=(c>>>0)%3|0?c:w+ -2|0;if((c|0)==-1){break I}d=o[(c<<2)+v>>2];break I}e=-1;v=o[s>>2];o[v+(r<<2)>>2]=-1;d=-1}o[i+v>>2]=d;J:{K:{L:{if(!j){d=z+((z>>>0)%3|0?-1:2)|0;if((d|0)==-1){break L}d=o[(d<<2)+v>>2];o[n+v>>2]=d;if((d|0)==-1){break K}o[o[s+24>>2]+(d<<2)>>2]=q;break K}o[n+v>>2]=-1;x=-1;d=-1;break J}o[n+v>>2]=-1}x=-1;c=z+1|0;c=(c>>>0)%3|0?c:z+ -2|0;d=-1;if((c|0)==-1){break J}x=o[(c<<2)+v>>2];d=c}c=o[s+24>>2];f=c+(x<<2)|0;if((e|0)!=-1){o[c+(e<<2)>>2]=o[f>>2]}M:{if((d|0)==-1){break M}while(1){o[(d<<2)+v>>2]=e;c=d+1|0;d=(c>>>0)%3|0?c:d+ -2|0;if((d|0)==-1){break M}c=o[l+(d<<2)>>2];if((c|0)==-1){break M}d=c+1|0;d=(d>>>0)%3|0?d:c+ -2|0;if((d|0)!=-1){continue}break}}o[f>>2]=-1;N:{if(t){break N}d=o[h+28>>2];e=o[h+32>>2];if((d|0)!=(e|0)){o[d>>2]=x;o[h+28>>2]=d+4;break N}q=o[h+24>>2];j=d-q|0;f=j>>2;i=f+1|0;O:{if(i>>>0<1073741824){c=e-q|0;e=c>>1;c=c>>2>>>0<536870911?e>>>0>>0?i:e:1073741823;d=0;P:{if(!c){break P}if(c>>>0>=1073741824){break O}d=yk(c<<2)}e=d+(f<<2)|0;o[e>>2]=x;c=d+(c<<2)|0;e=e+4|0;if((j|0)>=1){ll(d,q,j)}o[h+32>>2]=c;o[h+28>>2]=e;o[h+24>>2]=d;if(!q){break N}jl(q);g=o[h+68>>2];break N}Nk();D()}break a}o[g+ -4>>2]=r}k=k+1|0;if((k|0)!=(b|0)){continue}break}e=b}d=-1;l=o[a+8>>2];if(o[l+28>>2]-o[l+24>>2]>>2>(y|0)){break g}k=o[h+68>>2];if((k|0)!=o[h+64>>2]){n=a+72|0;b=a+60|0;q=a+312|0;while(1){c=k+ -4|0;r=o[c>>2];o[h+68>>2]=c;Q:{if(Uf(q)){j=o[a+8>>2];w=o[j>>2];if((e|0)>=((o[j+4>>2]-w>>2>>>0)/3|0)){break g}g=-1;v=-1;k=o[j+24>>2];i=k;c=-1;R:{if((r|0)==-1){break R}f=r+1|0;f=(f>>>0)%3|0?f:r+ -2|0;c=-1;if((f|0)==-1){break R}c=o[w+(f<<2)>>2]}i=o[i+(c<<2)>>2];S:{if((i|0)==-1){break S}f=i+1|0;f=(f>>>0)%3|0?f:i+ -2|0;if((f|0)==-1){break S}g=f+1|0;g=(g>>>0)%3|0?g:f+ -2|0;if((g|0)!=-1){v=o[w+(g<<2)>>2]}g=f}y=-1;x=-1;k=o[k+(v<<2)>>2];i=-1;T:{if((k|0)==-1){break T}f=k+1|0;f=(f>>>0)%3|0?f:k+ -2|0;i=-1;if((f|0)==-1){break T}i=f+1|0;i=(i>>>0)%3|0?i:f+ -2|0;if((i|0)!=-1){x=o[w+(i<<2)>>2]}i=f}l=o[j+12>>2];s=u(e,3);j=s<<2;o[l+j>>2]=r;o[l+(r<<2)>>2]=s;r=s+1|0;k=r<<2;o[k+l>>2]=g;o[l+(g<<2)>>2]=r;t=s+2|0;f=t<<2;o[f+l>>2]=i;o[l+(i<<2)>>2]=t;o[j+w>>2]=v;k=k+w|0;o[k>>2]=x;i=f+w|0;o[i>>2]=c;j=o[a+120>>2];g=r>>>0>>0?-1:v;f=j+(g>>>3&536870908)|0;c=o[f>>2];A=f,B=Sl(g)&c,o[A>>2]=B;y=(r|0)!=-1?o[k>>2]:y;f=j+(y>>>3&536870908)|0;c=o[f>>2];A=f,B=Sl(y)&c,o[A>>2]=B;k=-1;k=(t|0)!=-1?o[i>>2]:k;f=j+(k>>>3&536870908)|0;c=o[f>>2];A=f,B=Sl(k)&c,o[A>>2]=B;k=o[a+64>>2];f=o[a+68>>2];if((k|0)==f<<5){if((k+1|0)<=-1){break e}c=b;if(k>>>0<=1073741822){g=k+32&-32;f=f<<6;f=f>>>0>>0?g:f}else{f=2147483647}fb(c,f);k=o[a+64>>2]}e=e+1|0;o[a+64>>2]=k+1;c=o[a+60>>2]+(k>>>3&536870908)|0;o[c>>2]=o[c>>2]|1<<(k&31);c=o[a+76>>2];f=o[a+80>>2];if((c|0)!=(f|0)){o[c>>2]=s;o[a+76>>2]=c+4;break Q}t=o[n>>2];j=c-t|0;i=j>>2;k=i+1|0;if(k>>>0>=1073741824){break d}g=f-t|0;f=g>>1;g=g>>2>>>0<536870911?f>>>0>>0?k:f:1073741823;c=0;U:{if(!g){break U}if(g>>>0>=1073741824){break a}c=yk(g<<2)}f=c+(i<<2)|0;o[f>>2]=s;g=c+(g<<2)|0;f=f+4|0;if((j|0)>=1){ll(c,t,j)}o[a+80>>2]=g;o[a+76>>2]=f;o[a+72>>2]=c;if(!t){break Q}jl(t);break Q}l=o[a+64>>2];f=o[a+68>>2];if((l|0)==f<<5){if((l+1|0)<=-1){break e}c=b;if(l>>>0<=1073741822){g=l+32&-32;f=f<<6;f=f>>>0>>0?g:f}else{f=2147483647}fb(c,f);l=o[a+64>>2]}o[a+64>>2]=l+1;f=o[a+60>>2]+(l>>>3&536870908)|0;c=o[f>>2];A=f,B=Sl(l)&c,o[A>>2]=B;c=o[a+76>>2];f=o[a+80>>2];if((c|0)!=(f|0)){o[c>>2]=r;o[a+76>>2]=c+4;break Q}t=o[n>>2];j=c-t|0;i=j>>2;k=i+1|0;if(k>>>0>=1073741824){break d}g=f-t|0;f=g>>1;g=g>>2>>>0<536870911?f>>>0>>0?k:f:1073741823;c=0;V:{if(!g){break V}if(g>>>0>=1073741824){break c}c=yk(g<<2)}f=c+(i<<2)|0;o[f>>2]=r;g=c+(g<<2)|0;f=f+4|0;if((j|0)>=1){ll(c,t,j)}o[a+80>>2]=g;o[a+76>>2]=f;o[a+72>>2]=c;if(!t){break Q}jl(t)}k=o[h+68>>2];if((k|0)!=o[h+64>>2]){continue}break}l=o[a+8>>2]}if(((o[l+4>>2]-o[l>>2]>>2>>>0)/3|0)!=(e|0)){break g}d=o[l+28>>2]-o[l+24>>2]>>2;j=o[h+24>>2];f=o[h+28>>2];if((j|0)==(f|0)){break f}while(1){g=o[j>>2];c=o[l+24>>2];k=d+ -1|0;W:{if(o[c+(k<<2)>>2]!=-1){e=d;break W}c=o[l+24>>2];while(1){k=d+ -2|0;e=d+ -1|0;d=e;if(o[(k<<2)+c>>2]==-1){continue}break}}if(!(k>>>0>>0)){o[h>>2]=l;b=k<<2;d=o[b+c>>2];m[h+12|0]=1;o[h+8>>2]=d;o[h+4>>2]=d;if((d|0)!=-1){while(1){o[o[l>>2]+(d<<2)>>2]=g;of(h);l=o[a+8>>2];d=o[h+8>>2];if((d|0)!=-1){continue}break}}d=b;b=o[l+24>>2];d=d+b|0;if((g|0)!=-1){o[b+(g<<2)>>2]=o[d>>2]}o[d>>2]=-1;i=1<<(g&31);b=o[a+120>>2];c=b+(g>>>3&536870908)|0;d=c;g=b+(k>>>3&536870908)|0;b=1<<(k&31);k=i|o[c>>2];X:{if(o[g>>2]&b){break X}k=o[c>>2]&(i^-1)}o[d>>2]=k;o[g>>2]=o[g>>2]&(b^-1);e=e+ -1|0}d=e;j=j+4|0;if((f|0)!=(j|0)){continue}break}}j=o[h+24>>2]}if(j){o[h+28>>2]=j;jl(j)}a=o[h+48>>2];if(a){while(1){b=o[a>>2];jl(a);a=b;if(a){continue}break}}a=o[h+40>>2];o[h+40>>2]=0;if(a){jl(a)}a=o[h+64>>2];if(a){o[h+68>>2]=a;jl(a)}R=h+96|0;return d}Nk();D()}Nk();D()}db(8832)}D()}db(8832);D()}function lh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;i=R-96|0;R=i;o[i+72>>2]=0;o[i+64>>2]=0;o[i+68>>2]=0;o[i+48>>2]=0;o[i+52>>2]=0;o[i+40>>2]=0;o[i+44>>2]=0;o[i+56>>2]=1065353216;o[i+32>>2]=0;o[i+24>>2]=0;o[i+28>>2]=0;w=o[a+124>>2];a:{b:{c:{d:{e:{if((b|0)>=1){t=a+232|0;v=o[a+216>>2]!=o[a+220>>2];while(1){f:{g:{h:{i:{j:{c=o[a+404>>2];k:{l:{if((c|0)!=-1){g=-1;d=o[a+428>>2]+(c<<2)|0;e=o[d>>2];c=e+ -1|0;o[d>>2]=c;if((e|0)<1){break e}c=o[o[o[a+416>>2]+u(o[a+404>>2],12)>>2]+(c<<2)>>2];d=o[(c<<2)+8912>>2];o[a+400>>2]=d;if(!c){d=o[i+68>>2];if((d|0)==o[i+64>>2]){break e}c=-1;e=o[a+8>>2];k=o[e+24>>2];h=k;n=d+ -4|0;d=o[n>>2];g=-1;m:{if((d|0)==-1){break m}f=d+1|0;f=(f>>>0)%3|0?f:d+ -2|0;g=-1;if((f|0)==-1){break m}g=o[o[e>>2]+(f<<2)>>2]}j=o[h+(g<<2)>>2];if((j|0)!=-1){c=j+1|0;c=(c>>>0)%3|0?c:j+ -2|0}f=o[e+12>>2];j=u(q,3);h=j+1|0;o[f+(d<<2)>>2]=h;s=h<<2;o[s+f>>2]=d;h=j+2|0;o[f+(c<<2)>>2]=h;l=h<<2;o[l+f>>2]=c;e=o[e>>2];o[e+(j<<2)>>2]=g;f=e+s|0;r=-1;n:{if((c|0)==-1){break n}r=c+1|0;c=(r>>>0)%3|0?r:c+ -2|0;r=-1;if((c|0)==-1){break n}r=o[e+(c<<2)>>2]}o[f>>2]=r;o:{p:{if((d|0)!=-1){c=d+((d>>>0)%3|0?-1:2)|0;if((c|0)!=-1){break p}}o[e+l>>2]=-1;break o}c=o[e+(c<<2)>>2];o[e+l>>2]=c;if((c|0)==-1){break o}o[k+(c<<2)>>2]=h}c=o[a+120>>2]+(g>>>3&536870908)|0;d=o[c>>2];A=c,B=Sl(g)&d,o[A>>2]=B;o[n>>2]=j;nh(t,j);break f}d=d+ -1|0;if(d>>>0>6){break e}q:{switch(d-1|0){case 1:case 3:j=o[i+68>>2];if((j|0)==o[i+64>>2]){break e}e=o[a+8>>2];g=o[e+12>>2];d=u(q,3);f=(c|0)==3;h=d+(f?2:1)|0;k=h<<2;c=o[j+ -4>>2];o[g+k>>2]=c;o[g+(c<<2)>>2]=h;eh(e+24|0,8268);g=-1;l=o[a+8>>2];j=o[l+24>>2];if(o[l+28>>2]-j>>2>(w|0)){break e}n=d+2|0;g=o[l>>2];e=o[e+28>>2]-o[e+24>>2]|0;l=(e>>2)+ -1|0;o[g+k>>2]=l;if(e){o[j+(l<<2)>>2]=h}e=f?d:n;h=g+(d+f<<2)|0;r:{s:{t:{if((c|0)!=-1){f=c+((c>>>0)%3|0?-1:2)|0;if((f|0)==-1){break t}f=o[g+(f<<2)>>2];o[g+(e<<2)>>2]=f;if((f|0)==-1){break s}o[j+(f<<2)>>2]=e;break s}o[g+(e<<2)>>2]=-1;f=-1;break r}o[g+(e<<2)>>2]=-1}j=c+1|0;c=(j>>>0)%3|0?j:c+ -2|0;f=-1;if((c|0)==-1){break r}f=o[g+(c<<2)>>2]}o[h>>2]=f;g=o[i+68>>2];o[g+ -4>>2]=d;break k;case 5:break l;case 0:case 2:case 4:break e;default:break q}}j=o[i+68>>2];d=o[i+64>>2];if((j|0)==(d|0)){break e}f=j+ -4|0;l=o[f>>2];o[i+68>>2]=f;k=o[i+44>>2];if(!k){break h}n=Rl(k)>>>0>1;u:{if(!n){e=k+2147483647&q;break u}e=q;if(e>>>0>>0){break u}e=(q>>>0)%(k>>>0)|0}c=o[o[i+40>>2]+(e<<2)>>2];if(!c){break h}h=o[c>>2];if(!h){break h}s=k+ -1|0;while(1){v:{c=o[h+4>>2];w:{if((q|0)!=(c|0)){x:{if(!n){c=c&s;break x}if(c>>>0>>0){break x}c=(c>>>0)%(k>>>0)|0}if((c|0)!=(e|0)){break h}break w}if(o[h+8>>2]==(q|0)){break v}}h=o[h>>2];if(h){continue}break h}break}k=o[i+72>>2];if((k|0)!=(f|0)){o[f>>2]=o[h+12>>2];o[i+68>>2]=j;c=d;break g}f=f-d|0;j=f>>2;e=j+1|0;if(e>>>0>=1073741824){break j}k=k-d|0;n=k>>1;e=k>>2>>>0<536870911?n>>>0>>0?e:n:1073741823;c=0;y:{if(!e){break y}if(e>>>0>=1073741824){break a}c=yk(e<<2)}j=c+(j<<2)|0;o[j>>2]=o[h+12>>2];e=(e<<2)+c|0;j=j+4|0;if((f|0)>=1){ll(c,d,f)}o[i+72>>2]=e;o[i+68>>2]=j;o[i+64>>2]=c;if(!d){break g}jl(d);j=o[i+68>>2];c=o[i+64>>2];break g}o[a+400>>2]=7}e=o[a+8>>2];eh(e+24|0,8268);g=-1;c=o[a+8>>2];d=u(q,3);j=o[e+28>>2]-o[e+24>>2]|0;e=j>>2;h=e+ -1|0;o[o[c>>2]+(d<<2)>>2]=h;eh(c+24|0,8268);f=d+1|0;o[o[c>>2]+(f<<2)>>2]=(o[c+28>>2]-o[c+24>>2]>>2)+ -1;c=o[a+8>>2];eh(c+24|0,8268);l=d+2|0;o[o[c>>2]+(l<<2)>>2]=(o[c+28>>2]-o[c+24>>2]>>2)+ -1;k=o[a+8>>2];c=o[k+24>>2];if(o[k+28>>2]-c>>2>(w|0)){break e}z:{A:{if(!j){o[c+(e<<2)>>2]=f;g=1;break A}o[c+(h<<2)>>2]=d;g=0;if((j|0)==-4){break A}o[c+(e<<2)>>2]=f;g=e+1|0;if((g|0)==-1){break z}}o[c+(g<<2)>>2]=l}c=o[i+68>>2];f=o[i+72>>2];if((c|0)!=(f|0)){o[c>>2]=d;g=c+4|0;o[i+68>>2]=g;break k}e=o[i+64>>2];j=c-e|0;h=j>>2;g=h+1|0;if(g>>>0>=1073741824){break i}f=f-e|0;l=f>>1;g=f>>2>>>0<536870911?l>>>0>>0?g:l:1073741823;c=0;B:{if(!g){break B}if(g>>>0>=1073741824){break a}c=yk(g<<2)}f=c+(h<<2)|0;o[f>>2]=d;d=c+(g<<2)|0;g=f+4|0;if((j|0)>=1){ll(c,e,j)}o[i+72>>2]=d;o[i+68>>2]=g;o[i+64>>2]=c;if(!e){break k}jl(e);g=o[i+68>>2]}nh(t,o[g+ -4>>2]);h=o[a+40>>2];if((h|0)==o[a+36>>2]){break f}d=(q^-1)+b|0;while(1){g=-1;c=o[h+ -8>>2];if(c>>>0>d>>>0){break e}if((c|0)!=(d|0)){break f}j=p[h+ -4|0];c=h+ -12|0;e=o[c>>2];o[a+40>>2]=c;if((e|0)<0){break e}c=o[o[i+68>>2]+ -4>>2];o[i+20>>2]=(e^-1)+b;o[i+88>>2]=i+20;fh(i,i+40|0,i+20|0,i+88|0);f=o[i>>2];C:{if(j&1){g=-1;if((c|0)==-1){break C}g=c+1|0;g=(g>>>0)%3|0?g:c+ -2|0;break C}g=-1;if((c|0)==-1){break C}g=c+ -1|0;if((c>>>0)%3){break C}g=c+2|0}o[f+12>>2]=g;h=o[a+40>>2];if((h|0)!=o[a+36>>2]){continue}break}break f}Nk();D()}Nk();D()}j=f;c=d}if((c|0)==(j|0)){break e}c=o[j+ -4>>2];d=(c|0)==-1;f=o[a+8>>2];if(o[o[f+12>>2]+(c<<2)>>2]!=-1?!d:0){break e}r=(l|0)==-1;h=o[f+12>>2];if(o[h+(l<<2)>>2]!=-1?!r:0){break e}k=u(q,3);s=k+2|0;o[h+(c<<2)>>2]=s;n=s<<2;o[n+h>>2]=c;g=k+1|0;o[h+(l<<2)>>2]=g;x=g<<2;o[x+h>>2]=l;D:{if(!d){g=-1;e=-1;d=o[f>>2];z=d+(k<<2)|0;y=c+((c>>>0)%3|0?-1:2)|0;if((y|0)!=-1){e=o[(y<<2)+d>>2]}o[z>>2]=e;y=c+1|0;c=(y>>>0)%3|0?y:c+ -2|0;if((c|0)==-1){break D}g=o[(c<<2)+d>>2];break D}e=-1;d=o[f>>2];o[d+(k<<2)>>2]=-1;g=-1}o[d+x>>2]=g;E:{F:{G:{if(!r){c=l+((l>>>0)%3|0?-1:2)|0;if((c|0)==-1){break G}c=o[(c<<2)+d>>2];o[d+n>>2]=c;if((c|0)==-1){break F}o[o[f+24>>2]+(c<<2)>>2]=s;break F}o[d+n>>2]=-1;n=-1;g=-1;break E}o[d+n>>2]=-1}n=-1;c=l+1|0;c=(c>>>0)%3|0?c:l+ -2|0;g=-1;if((c|0)==-1){break E}n=o[(c<<2)+d>>2];g=c}c=o[a+388>>2];l=e<<2;s=c+l|0;r=c;c=n<<2;o[s>>2]=o[s>>2]+o[r+c>>2];f=o[f+24>>2];c=f+c|0;if((e|0)!=-1){o[f+l>>2]=o[c>>2]}H:{if((g|0)==-1){break H}while(1){o[(g<<2)+d>>2]=e;f=g+1|0;g=(f>>>0)%3|0?f:g+ -2|0;if((g|0)==-1){break H}g=o[h+(g<<2)>>2];if((g|0)==-1){break H}f=g+1|0;g=(f>>>0)%3|0?f:g+ -2|0;if((g|0)!=-1){continue}break}}o[c>>2]=-1;I:{if(v){break I}c=o[i+28>>2];f=o[i+32>>2];if((c|0)!=(f|0)){o[c>>2]=n;o[i+28>>2]=c+4;break I}g=o[i+24>>2];e=c-g|0;h=e>>2;d=h+1|0;J:{if(d>>>0<1073741824){f=f-g|0;l=f>>1;d=f>>2>>>0<536870911?l>>>0>>0?d:l:1073741823;c=0;K:{if(!d){break K}if(d>>>0>=1073741824){break J}c=yk(d<<2)}f=c+(h<<2)|0;o[f>>2]=n;d=c+(d<<2)|0;f=f+4|0;if((e|0)>=1){ll(c,g,e)}o[i+32>>2]=d;o[i+28>>2]=f;o[i+24>>2]=c;if(!g){break I}jl(g);j=o[i+68>>2];break I}Nk();D()}break a}o[j+ -4>>2]=k;nh(t,k)}q=q+1|0;if((q|0)!=(b|0)){continue}break}q=b}g=-1;c=o[a+8>>2];if(o[c+28>>2]-o[c+24>>2]>>2>(w|0)){break e}h=o[i+68>>2];if((h|0)!=o[i+64>>2]){w=a+72|0;b=a+60|0;s=a+312|0;while(1){c=h+ -4|0;l=o[c>>2];o[i+68>>2]=c;L:{if(Uf(s)){n=o[a+8>>2];k=o[n>>2];if((q|0)>=((o[n+4>>2]-k>>2>>>0)/3|0)){break e}d=-1;e=-1;f=o[n+24>>2];c=f;j=-1;M:{if((l|0)==-1){break M}h=l+1|0;h=(h>>>0)%3|0?h:l+ -2|0;j=-1;if((h|0)==-1){break M}j=o[k+(h<<2)>>2]}h=j;c=o[c+(h<<2)>>2];N:{if((c|0)==-1){break N}j=c+1|0;c=(j>>>0)%3|0?j:c+ -2|0;if((c|0)==-1){break N}d=c+1|0;d=(d>>>0)%3|0?d:c+ -2|0;if((d|0)!=-1){e=o[k+(d<<2)>>2]}d=c}j=-1;t=-1;f=o[f+(e<<2)>>2];c=-1;O:{if((f|0)==-1){break O}v=f+1|0;f=(v>>>0)%3|0?v:f+ -2|0;c=-1;if((f|0)==-1){break O}c=f+1|0;c=(c>>>0)%3|0?c:f+ -2|0;if((c|0)!=-1){t=o[k+(c<<2)>>2]}c=f}n=o[n+12>>2];f=u(q,3);v=f<<2;o[n+v>>2]=l;o[n+(l<<2)>>2]=f;l=f+1|0;r=l<<2;o[r+n>>2]=d;o[n+(d<<2)>>2]=l;d=f+2|0;x=d<<2;o[x+n>>2]=c;o[n+(c<<2)>>2]=d;o[k+v>>2]=e;n=k+r|0;o[n>>2]=t;k=k+x|0;o[k>>2]=h;c=o[a+120>>2];e=l>>>0>>0?-1:e;h=c+(e>>>3&536870908)|0;t=o[h>>2];A=h,B=Sl(e)&t,o[A>>2]=B;j=(l|0)!=-1?o[n>>2]:j;e=c+(j>>>3&536870908)|0;h=o[e>>2];A=e,B=Sl(j)&h,o[A>>2]=B;h=-1;h=(d|0)!=-1?o[k>>2]:h;c=c+(h>>>3&536870908)|0;d=o[c>>2];A=c,B=Sl(h)&d,o[A>>2]=B;h=o[a+64>>2];d=o[a+68>>2];if((h|0)==d<<5){if((h+1|0)<=-1){break c}c=b;if(h>>>0<=1073741822){e=h+32&-32;d=d<<6;d=d>>>0>>0?e:d}else{d=2147483647}fb(c,d);h=o[a+64>>2]}q=q+1|0;o[a+64>>2]=h+1;c=o[a+60>>2]+(h>>>3&536870908)|0;o[c>>2]=o[c>>2]|1<<(h&31);c=o[a+76>>2];h=o[a+80>>2];if((c|0)!=(h|0)){o[c>>2]=f;o[a+76>>2]=c+4;break L}d=o[w>>2];j=c-d|0;l=j>>2;e=l+1|0;if(e>>>0>=1073741824){break b}h=h-d|0;k=h>>1;e=h>>2>>>0<536870911?k>>>0>>0?e:k:1073741823;c=0;P:{if(!e){break P}if(e>>>0>=1073741824){break a}c=yk(e<<2)}h=c+(l<<2)|0;o[h>>2]=f;e=c+(e<<2)|0;f=h+4|0;if((j|0)>=1){ll(c,d,j)}o[a+80>>2]=e;o[a+76>>2]=f;o[a+72>>2]=c;if(!d){break L}jl(d);break L}c=o[a+64>>2];e=o[a+68>>2];if((c|0)==e<<5){if((c+1|0)<=-1){break c}d=b;if(c>>>0<=1073741822){c=c+32&-32;e=e<<6;c=e>>>0>>0?c:e}else{c=2147483647}fb(d,c);c=o[a+64>>2]}o[a+64>>2]=c+1;d=o[a+60>>2]+(c>>>3&536870908)|0;e=o[d>>2];A=d,B=Sl(c)&e,o[A>>2]=B;c=o[a+76>>2];f=o[a+80>>2];if((c|0)!=(f|0)){o[c>>2]=l;o[a+76>>2]=c+4;break L}d=o[w>>2];j=c-d|0;h=j>>2;e=h+1|0;if(e>>>0>=1073741824){break b}f=f-d|0;k=f>>1;e=f>>2>>>0<536870911?k>>>0>>0?e:k:1073741823;c=0;Q:{if(!e){break Q}if(e>>>0>=1073741824){break a}c=yk(e<<2)}f=c+(h<<2)|0;o[f>>2]=l;e=c+(e<<2)|0;f=f+4|0;if((j|0)>=1){ll(c,d,j)}o[a+80>>2]=e;o[a+76>>2]=f;o[a+72>>2]=c;if(!d){break L}jl(d)}h=o[i+68>>2];if((h|0)!=o[i+64>>2]){continue}break}c=o[a+8>>2]}if(((o[c+4>>2]-o[c>>2]>>2>>>0)/3|0)!=(q|0)){break e}g=o[c+28>>2]-o[c+24>>2]>>2;q=o[i+24>>2];j=o[i+28>>2];if((q|0)==(j|0)){break d}while(1){e=o[q>>2];d=o[c+24>>2];h=g+ -1|0;R:{if(o[d+(h<<2)>>2]!=-1){b=g;break R}d=o[c+24>>2];while(1){h=g+ -2|0;b=g+ -1|0;g=b;if(o[(h<<2)+d>>2]==-1){continue}break}}if(h>>>0>=e>>>0){o[i>>2]=c;g=d;d=h<<2;g=o[g+d>>2];m[i+12|0]=1;o[i+8>>2]=g;o[i+4>>2]=g;if((g|0)!=-1){while(1){o[o[c>>2]+(g<<2)>>2]=e;of(i);c=o[a+8>>2];g=o[i+8>>2];if((g|0)!=-1){continue}break}}g=d;d=o[c+24>>2];g=g+d|0;if((e|0)!=-1){o[d+(e<<2)>>2]=o[g>>2]}o[g>>2]=-1;g=1<<(e&31);d=e>>>3&536870908;e=o[a+120>>2];d=d+e|0;f=d;e=e+(h>>>3&536870908)|0;h=1<<(h&31);k=g|o[d>>2];S:{if(o[e>>2]&h){break S}k=o[d>>2]&(g^-1)}o[f>>2]=k;o[e>>2]=o[e>>2]&(h^-1);b=b+ -1|0}g=b;q=q+4|0;if((j|0)!=(q|0)){continue}break}}q=o[i+24>>2]}if(q){o[i+28>>2]=q;jl(q)}a=o[i+48>>2];if(a){while(1){b=o[a>>2];jl(a);a=b;if(a){continue}break}}a=o[i+40>>2];o[i+40>>2]=0;if(a){jl(a)}a=o[i+64>>2];if(a){o[i+68>>2]=a;jl(a)}R=i+96|0;return g}Nk();D()}Nk();D()}db(8832);D()}function ji(a,b,c,d,e){var f=0,g=0;f=R-32|0;R=f;o[b+32>>2]=d;o[b+40>>2]=c;o[b+4>>2]=e;gi(a,d,f+16|0);a:{if(o[a>>2]){break a}c=a+4|0;if(m[a+15|0]<=-1){jl(o[c>>2])}e=p[f+23|0];if((l[o[o[b>>2]+8>>2]](b)|0)!=(e|0)){b=yk(64);o[f>>2]=b;o[f+4>>2]=50;o[f+8>>2]=-2147483584;m[b+50|0]=0;d=p[10289]|p[10290]<<8;m[b+48|0]=d;m[b+49|0]=d>>>8;d=p[10285]|p[10286]<<8|(p[10287]<<16|p[10288]<<24);e=p[10281]|p[10282]<<8|(p[10283]<<16|p[10284]<<24);m[b+40|0]=e;m[b+41|0]=e>>>8;m[b+42|0]=e>>>16;m[b+43|0]=e>>>24;m[b+44|0]=d;m[b+45|0]=d>>>8;m[b+46|0]=d>>>16;m[b+47|0]=d>>>24;d=p[10277]|p[10278]<<8|(p[10279]<<16|p[10280]<<24);e=p[10273]|p[10274]<<8|(p[10275]<<16|p[10276]<<24);m[b+32|0]=e;m[b+33|0]=e>>>8;m[b+34|0]=e>>>16;m[b+35|0]=e>>>24;m[b+36|0]=d;m[b+37|0]=d>>>8;m[b+38|0]=d>>>16;m[b+39|0]=d>>>24;d=p[10269]|p[10270]<<8|(p[10271]<<16|p[10272]<<24);e=p[10265]|p[10266]<<8|(p[10267]<<16|p[10268]<<24);m[b+24|0]=e;m[b+25|0]=e>>>8;m[b+26|0]=e>>>16;m[b+27|0]=e>>>24;m[b+28|0]=d;m[b+29|0]=d>>>8;m[b+30|0]=d>>>16;m[b+31|0]=d>>>24;d=p[10261]|p[10262]<<8|(p[10263]<<16|p[10264]<<24);e=p[10257]|p[10258]<<8|(p[10259]<<16|p[10260]<<24);m[b+16|0]=e;m[b+17|0]=e>>>8;m[b+18|0]=e>>>16;m[b+19|0]=e>>>24;m[b+20|0]=d;m[b+21|0]=d>>>8;m[b+22|0]=d>>>16;m[b+23|0]=d>>>24;d=p[10253]|p[10254]<<8|(p[10255]<<16|p[10256]<<24);e=p[10249]|p[10250]<<8|(p[10251]<<16|p[10252]<<24);m[b+8|0]=e;m[b+9|0]=e>>>8;m[b+10|0]=e>>>16;m[b+11|0]=e>>>24;m[b+12|0]=d;m[b+13|0]=d>>>8;m[b+14|0]=d>>>16;m[b+15|0]=d>>>24;d=p[10245]|p[10246]<<8|(p[10247]<<16|p[10248]<<24);e=p[10241]|p[10242]<<8|(p[10243]<<16|p[10244]<<24);m[b|0]=e;m[b+1|0]=e>>>8;m[b+2|0]=e>>>16;m[b+3|0]=e>>>24;m[b+4|0]=d;m[b+5|0]=d>>>8;m[b+6|0]=d>>>16;m[b+7|0]=d>>>24;o[a>>2]=-1;Bk(c,f);if(m[f+11|0]>-1){break a}jl(o[f>>2]);break a}d=p[f+21|0];m[b+36|0]=d;g=p[f+22|0];m[b+37|0]=g;if((d+ -1&255)>>>0>=2){b=yk(32);o[f>>2]=b;o[f+4>>2]=22;o[f+8>>2]=-2147483616;m[b+22|0]=0;d=p[10310]|p[10311]<<8|(p[10312]<<16|p[10313]<<24);e=p[10306]|p[10307]<<8|(p[10308]<<16|p[10309]<<24);m[b+14|0]=e;m[b+15|0]=e>>>8;m[b+16|0]=e>>>16;m[b+17|0]=e>>>24;m[b+18|0]=d;m[b+19|0]=d>>>8;m[b+20|0]=d>>>16;m[b+21|0]=d>>>24;d=p[10304]|p[10305]<<8|(p[10306]<<16|p[10307]<<24);e=p[10300]|p[10301]<<8|(p[10302]<<16|p[10303]<<24);m[b+8|0]=e;m[b+9|0]=e>>>8;m[b+10|0]=e>>>16;m[b+11|0]=e>>>24;m[b+12|0]=d;m[b+13|0]=d>>>8;m[b+14|0]=d>>>16;m[b+15|0]=d>>>24;d=p[10296]|p[10297]<<8|(p[10298]<<16|p[10299]<<24);e=p[10292]|p[10293]<<8|(p[10294]<<16|p[10295]<<24);m[b|0]=e;m[b+1|0]=e>>>8;m[b+2|0]=e>>>16;m[b+3|0]=e>>>24;m[b+4|0]=d;m[b+5|0]=d>>>8;m[b+6|0]=d>>>16;m[b+7|0]=d>>>24;o[a>>2]=-5;Bk(c,f);if(m[f+11|0]>-1){break a}jl(o[f>>2]);break a}if(!((d|0)!=2|(e?2:3)>>>0>=g>>>0)){b=yk(32);o[f>>2]=b;o[f+4>>2]=22;o[f+8>>2]=-2147483616;m[b+22|0]=0;d=p[10333]|p[10334]<<8|(p[10335]<<16|p[10336]<<24);e=p[10329]|p[10330]<<8|(p[10331]<<16|p[10332]<<24);m[b+14|0]=e;m[b+15|0]=e>>>8;m[b+16|0]=e>>>16;m[b+17|0]=e>>>24;m[b+18|0]=d;m[b+19|0]=d>>>8;m[b+20|0]=d>>>16;m[b+21|0]=d>>>24;d=p[10327]|p[10328]<<8|(p[10329]<<16|p[10330]<<24);e=p[10323]|p[10324]<<8|(p[10325]<<16|p[10326]<<24);m[b+8|0]=e;m[b+9|0]=e>>>8;m[b+10|0]=e>>>16;m[b+11|0]=e>>>24;m[b+12|0]=d;m[b+13|0]=d>>>8;m[b+14|0]=d>>>16;m[b+15|0]=d>>>24;d=p[10319]|p[10320]<<8|(p[10321]<<16|p[10322]<<24);e=p[10315]|p[10316]<<8|(p[10317]<<16|p[10318]<<24);m[b|0]=e;m[b+1|0]=e>>>8;m[b+2|0]=e>>>16;m[b+3|0]=e>>>24;m[b+4|0]=d;m[b+5|0]=d>>>8;m[b+6|0]=d>>>16;m[b+7|0]=d>>>24;o[a>>2]=-5;Bk(c,f);if(m[f+11|0]>-1){break a}jl(o[f>>2]);break a}d=d<<8|g;n[o[b+32>>2]+38>>1]=d;b:{if((d&65535)>>>0<259|n[f+26>>1]>-1){break b}hi(a,b);if(o[a>>2]){break a}if(m[c+11|0]>-1){break b}jl(o[c>>2])}if(!l[o[o[b>>2]+12>>2]](b)){b=yk(48);o[f>>2]=b;o[f+4>>2]=33;o[f+8>>2]=-2147483600;m[b+33|0]=0;m[b+32|0]=p[10370];d=p[10366]|p[10367]<<8|(p[10368]<<16|p[10369]<<24);e=p[10362]|p[10363]<<8|(p[10364]<<16|p[10365]<<24);m[b+24|0]=e;m[b+25|0]=e>>>8;m[b+26|0]=e>>>16;m[b+27|0]=e>>>24;m[b+28|0]=d;m[b+29|0]=d>>>8;m[b+30|0]=d>>>16;m[b+31|0]=d>>>24;d=p[10358]|p[10359]<<8|(p[10360]<<16|p[10361]<<24);e=p[10354]|p[10355]<<8|(p[10356]<<16|p[10357]<<24);m[b+16|0]=e;m[b+17|0]=e>>>8;m[b+18|0]=e>>>16;m[b+19|0]=e>>>24;m[b+20|0]=d;m[b+21|0]=d>>>8;m[b+22|0]=d>>>16;m[b+23|0]=d>>>24;d=p[10350]|p[10351]<<8|(p[10352]<<16|p[10353]<<24);e=p[10346]|p[10347]<<8|(p[10348]<<16|p[10349]<<24);m[b+8|0]=e;m[b+9|0]=e>>>8;m[b+10|0]=e>>>16;m[b+11|0]=e>>>24;m[b+12|0]=d;m[b+13|0]=d>>>8;m[b+14|0]=d>>>16;m[b+15|0]=d>>>24;d=p[10342]|p[10343]<<8|(p[10344]<<16|p[10345]<<24);e=p[10338]|p[10339]<<8|(p[10340]<<16|p[10341]<<24);m[b|0]=e;m[b+1|0]=e>>>8;m[b+2|0]=e>>>16;m[b+3|0]=e>>>24;m[b+4|0]=d;m[b+5|0]=d>>>8;m[b+6|0]=d>>>16;m[b+7|0]=d>>>24;o[a>>2]=-1;Bk(c,f);if(m[f+11|0]>-1){break a}jl(o[f>>2]);break a}if(!l[o[o[b>>2]+20>>2]](b)){b=yk(32);o[f>>2]=b;o[f+4>>2]=31;o[f+8>>2]=-2147483616;m[b+31|0]=0;d=p[10399]|p[10400]<<8|(p[10401]<<16|p[10402]<<24);e=p[10395]|p[10396]<<8|(p[10397]<<16|p[10398]<<24);m[b+23|0]=e;m[b+24|0]=e>>>8;m[b+25|0]=e>>>16;m[b+26|0]=e>>>24;m[b+27|0]=d;m[b+28|0]=d>>>8;m[b+29|0]=d>>>16;m[b+30|0]=d>>>24;d=p[10392]|p[10393]<<8|(p[10394]<<16|p[10395]<<24);e=p[10388]|p[10389]<<8|(p[10390]<<16|p[10391]<<24);m[b+16|0]=e;m[b+17|0]=e>>>8;m[b+18|0]=e>>>16;m[b+19|0]=e>>>24;m[b+20|0]=d;m[b+21|0]=d>>>8;m[b+22|0]=d>>>16;m[b+23|0]=d>>>24;d=p[10384]|p[10385]<<8|(p[10386]<<16|p[10387]<<24);e=p[10380]|p[10381]<<8|(p[10382]<<16|p[10383]<<24);m[b+8|0]=e;m[b+9|0]=e>>>8;m[b+10|0]=e>>>16;m[b+11|0]=e>>>24;m[b+12|0]=d;m[b+13|0]=d>>>8;m[b+14|0]=d>>>16;m[b+15|0]=d>>>24;d=p[10376]|p[10377]<<8|(p[10378]<<16|p[10379]<<24);e=p[10372]|p[10373]<<8|(p[10374]<<16|p[10375]<<24);m[b|0]=e;m[b+1|0]=e>>>8;m[b+2|0]=e>>>16;m[b+3|0]=e>>>24;m[b+4|0]=d;m[b+5|0]=d>>>8;m[b+6|0]=d>>>16;m[b+7|0]=d>>>24;o[a>>2]=-1;Bk(c,f);if(m[f+11|0]>-1){break a}jl(o[f>>2]);break a}if(!l[o[o[b>>2]+24>>2]](b)){b=yk(48);o[f>>2]=b;o[f+4>>2]=34;o[f+8>>2]=-2147483600;m[b+34|0]=0;d=p[10436]|p[10437]<<8;m[b+32|0]=d;m[b+33|0]=d>>>8;d=p[10432]|p[10433]<<8|(p[10434]<<16|p[10435]<<24);e=p[10428]|p[10429]<<8|(p[10430]<<16|p[10431]<<24);m[b+24|0]=e;m[b+25|0]=e>>>8;m[b+26|0]=e>>>16;m[b+27|0]=e>>>24;m[b+28|0]=d;m[b+29|0]=d>>>8;m[b+30|0]=d>>>16;m[b+31|0]=d>>>24;d=p[10424]|p[10425]<<8|(p[10426]<<16|p[10427]<<24);e=p[10420]|p[10421]<<8|(p[10422]<<16|p[10423]<<24);m[b+16|0]=e;m[b+17|0]=e>>>8;m[b+18|0]=e>>>16;m[b+19|0]=e>>>24;m[b+20|0]=d;m[b+21|0]=d>>>8;m[b+22|0]=d>>>16;m[b+23|0]=d>>>24;d=p[10416]|p[10417]<<8|(p[10418]<<16|p[10419]<<24);e=p[10412]|p[10413]<<8|(p[10414]<<16|p[10415]<<24);m[b+8|0]=e;m[b+9|0]=e>>>8;m[b+10|0]=e>>>16;m[b+11|0]=e>>>24;m[b+12|0]=d;m[b+13|0]=d>>>8;m[b+14|0]=d>>>16;m[b+15|0]=d>>>24;d=p[10408]|p[10409]<<8|(p[10410]<<16|p[10411]<<24);e=p[10404]|p[10405]<<8|(p[10406]<<16|p[10407]<<24);m[b|0]=e;m[b+1|0]=e>>>8;m[b+2|0]=e>>>16;m[b+3|0]=e>>>24;m[b+4|0]=d;m[b+5|0]=d>>>8;m[b+6|0]=d>>>16;m[b+7|0]=d>>>24;o[a>>2]=-1;Bk(c,f);if(m[f+11|0]>-1){break a}jl(o[f>>2]);break a}o[a>>2]=0;o[a+4>>2]=0;o[a+8>>2]=0;o[a+12>>2]=0}R=f+32|0}function gi(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;e=R-16|0;R=e;g=o[b+12>>2];d=o[b+20>>2];f=o[b+16>>2];h=f+5|0;if(h>>>0<5){d=d+1|0}a:{if((g|0)<(d|0)?1:(g|0)<=(d|0)?r[b+8>>2]>=h>>>0?0:1:0){b=yk(32);o[e>>2]=b;o[e+4>>2]=29;o[e+8>>2]=-2147483616;m[b+29|0]=0;c=p[10185]|p[10186]<<8|(p[10187]<<16|p[10188]<<24);d=p[10181]|p[10182]<<8|(p[10183]<<16|p[10184]<<24);m[b+21|0]=d;m[b+22|0]=d>>>8;m[b+23|0]=d>>>16;m[b+24|0]=d>>>24;m[b+25|0]=c;m[b+26|0]=c>>>8;m[b+27|0]=c>>>16;m[b+28|0]=c>>>24;c=o[2545];d=o[2544];m[b+16|0]=d;m[b+17|0]=d>>>8;m[b+18|0]=d>>>16;m[b+19|0]=d>>>24;m[b+20|0]=c;m[b+21|0]=c>>>8;m[b+22|0]=c>>>16;m[b+23|0]=c>>>24;c=o[2543];d=o[2542];m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=o[2541];d=o[2540];m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;o[a>>2]=-2;Bk(a+4|0,e);if(m[e+11|0]>-1){break a}jl(o[e>>2]);break a}d=f+o[b>>2]|0;g=p[d|0]|p[d+1|0]<<8|(p[d+2|0]<<16|p[d+3|0]<<24);m[c|0]=g;m[c+1|0]=g>>>8;m[c+2|0]=g>>>16;m[c+3|0]=g>>>24;m[c+4|0]=p[d+4|0];g=b;d=o[b+20>>2];f=o[b+16>>2]+5|0;if(f>>>0<5){d=d+1|0}h=f;f=d;o[g+16>>2]=h;o[g+20>>2]=d;if(Vj(c,10190,5)){b=yk(32);o[e>>2]=b;o[e+4>>2]=17;o[e+8>>2]=-2147483616;m[b+17|0]=0;m[b+16|0]=p[10212];c=p[10208]|p[10209]<<8|(p[10210]<<16|p[10211]<<24);d=p[10204]|p[10205]<<8|(p[10206]<<16|p[10207]<<24);m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=p[10200]|p[10201]<<8|(p[10202]<<16|p[10203]<<24);d=p[10196]|p[10197]<<8|(p[10198]<<16|p[10199]<<24);m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;o[a>>2]=-1;Bk(a+4|0,e);if(m[e+11|0]>-1){break a}jl(o[e>>2]);break a}d=o[b+12>>2];if((d|0)<(f|0)?1:(d|0)<=(f|0)?r[b+8>>2]>h>>>0?0:1:0){b=yk(32);o[e>>2]=b;o[e+4>>2]=29;o[e+8>>2]=-2147483616;m[b+29|0]=0;c=p[10185]|p[10186]<<8|(p[10187]<<16|p[10188]<<24);d=p[10181]|p[10182]<<8|(p[10183]<<16|p[10184]<<24);m[b+21|0]=d;m[b+22|0]=d>>>8;m[b+23|0]=d>>>16;m[b+24|0]=d>>>24;m[b+25|0]=c;m[b+26|0]=c>>>8;m[b+27|0]=c>>>16;m[b+28|0]=c>>>24;c=o[2545];d=o[2544];m[b+16|0]=d;m[b+17|0]=d>>>8;m[b+18|0]=d>>>16;m[b+19|0]=d>>>24;m[b+20|0]=c;m[b+21|0]=c>>>8;m[b+22|0]=c>>>16;m[b+23|0]=c>>>24;c=o[2543];d=o[2542];m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=o[2541];d=o[2540];m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;o[a>>2]=-2;Bk(a+4|0,e);if(m[e+11|0]>-1){break a}jl(o[e>>2]);break a}m[c+5|0]=p[h+o[b>>2]|0];d=o[b+20>>2];f=o[b+16>>2]+1|0;if(f>>>0<1){d=d+1|0}o[b+16>>2]=f;o[g+20>>2]=d;g=o[b+12>>2];if((g|0)<(d|0)?1:(g|0)<=(d|0)?r[b+8>>2]>f>>>0?0:1:0){b=yk(32);o[e>>2]=b;o[e+4>>2]=29;o[e+8>>2]=-2147483616;m[b+29|0]=0;c=p[10185]|p[10186]<<8|(p[10187]<<16|p[10188]<<24);d=p[10181]|p[10182]<<8|(p[10183]<<16|p[10184]<<24);m[b+21|0]=d;m[b+22|0]=d>>>8;m[b+23|0]=d>>>16;m[b+24|0]=d>>>24;m[b+25|0]=c;m[b+26|0]=c>>>8;m[b+27|0]=c>>>16;m[b+28|0]=c>>>24;c=o[2545];d=o[2544];m[b+16|0]=d;m[b+17|0]=d>>>8;m[b+18|0]=d>>>16;m[b+19|0]=d>>>24;m[b+20|0]=c;m[b+21|0]=c>>>8;m[b+22|0]=c>>>16;m[b+23|0]=c>>>24;c=o[2543];d=o[2542];m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=o[2541];d=o[2540];m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;o[a>>2]=-2;Bk(a+4|0,e);if(m[e+11|0]>-1){break a}jl(o[e>>2]);break a}m[c+6|0]=p[f+o[b>>2]|0];d=o[b+20>>2];f=o[b+16>>2]+1|0;if(f>>>0<1){d=d+1|0}o[b+16>>2]=f;o[b+20>>2]=d;g=o[b+12>>2];if((g|0)<(d|0)?1:(g|0)<=(d|0)?r[b+8>>2]>f>>>0?0:1:0){b=yk(32);o[e>>2]=b;o[e+4>>2]=29;o[e+8>>2]=-2147483616;m[b+29|0]=0;c=p[10185]|p[10186]<<8|(p[10187]<<16|p[10188]<<24);d=p[10181]|p[10182]<<8|(p[10183]<<16|p[10184]<<24);m[b+21|0]=d;m[b+22|0]=d>>>8;m[b+23|0]=d>>>16;m[b+24|0]=d>>>24;m[b+25|0]=c;m[b+26|0]=c>>>8;m[b+27|0]=c>>>16;m[b+28|0]=c>>>24;c=o[2545];d=o[2544];m[b+16|0]=d;m[b+17|0]=d>>>8;m[b+18|0]=d>>>16;m[b+19|0]=d>>>24;m[b+20|0]=c;m[b+21|0]=c>>>8;m[b+22|0]=c>>>16;m[b+23|0]=c>>>24;c=o[2543];d=o[2542];m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=o[2541];d=o[2540];m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;o[a>>2]=-2;Bk(a+4|0,e);if(m[e+11|0]>-1){break a}jl(o[e>>2]);break a}m[c+7|0]=p[f+o[b>>2]|0];d=o[b+20>>2];f=o[b+16>>2]+1|0;if(f>>>0<1){d=d+1|0}o[b+16>>2]=f;o[b+20>>2]=d;g=o[b+12>>2];if((g|0)<(d|0)?1:(g|0)<=(d|0)?r[b+8>>2]>f>>>0?0:1:0){b=yk(32);o[e>>2]=b;o[e+4>>2]=29;o[e+8>>2]=-2147483616;m[b+29|0]=0;c=p[10185]|p[10186]<<8|(p[10187]<<16|p[10188]<<24);d=p[10181]|p[10182]<<8|(p[10183]<<16|p[10184]<<24);m[b+21|0]=d;m[b+22|0]=d>>>8;m[b+23|0]=d>>>16;m[b+24|0]=d>>>24;m[b+25|0]=c;m[b+26|0]=c>>>8;m[b+27|0]=c>>>16;m[b+28|0]=c>>>24;c=o[2545];d=o[2544];m[b+16|0]=d;m[b+17|0]=d>>>8;m[b+18|0]=d>>>16;m[b+19|0]=d>>>24;m[b+20|0]=c;m[b+21|0]=c>>>8;m[b+22|0]=c>>>16;m[b+23|0]=c>>>24;c=o[2543];d=o[2542];m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=o[2541];d=o[2540];m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;o[a>>2]=-2;Bk(a+4|0,e);if(m[e+11|0]>-1){break a}jl(o[e>>2]);break a}m[c+8|0]=p[f+o[b>>2]|0];d=o[b+20>>2];f=d;i=o[b+16>>2];h=i+1|0;if(h>>>0<1){d=d+1|0}o[b+16>>2]=h;o[b+20>>2]=d;g=o[b+12>>2];d=f;f=i+3|0;if(f>>>0<3){d=d+1|0}if((g|0)<(d|0)?1:(g|0)<=(d|0)?r[b+8>>2]>=f>>>0?0:1:0){b=yk(32);o[e>>2]=b;o[e+4>>2]=29;o[e+8>>2]=-2147483616;m[b+29|0]=0;c=p[10185]|p[10186]<<8|(p[10187]<<16|p[10188]<<24);d=p[10181]|p[10182]<<8|(p[10183]<<16|p[10184]<<24);m[b+21|0]=d;m[b+22|0]=d>>>8;m[b+23|0]=d>>>16;m[b+24|0]=d>>>24;m[b+25|0]=c;m[b+26|0]=c>>>8;m[b+27|0]=c>>>16;m[b+28|0]=c>>>24;c=o[2545];d=o[2544];m[b+16|0]=d;m[b+17|0]=d>>>8;m[b+18|0]=d>>>16;m[b+19|0]=d>>>24;m[b+20|0]=c;m[b+21|0]=c>>>8;m[b+22|0]=c>>>16;m[b+23|0]=c>>>24;c=o[2543];d=o[2542];m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=o[2541];d=o[2540];m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;o[a>>2]=-2;Bk(a+4|0,e);if(m[e+11|0]>-1){break a}jl(o[e>>2]);break a}f=c;c=h+o[b>>2]|0;n[f+10>>1]=p[c|0]|p[c+1|0]<<8;c=b;f=b;d=o[b+20>>2];b=o[b+16>>2]+2|0;if(b>>>0<2){d=d+1|0}o[f+16>>2]=b;o[c+20>>2]=d;o[a+8>>2]=0;o[a+12>>2]=0;o[a>>2]=0;o[a+4>>2]=0}R=e+16|0}function Oj(a,b,c,d,f,g){a=a|0;b=+b;c=c|0;d=d|0;f=f|0;g=g|0;var i=0,j=0,k=0,l=0,n=0,q=0,r=0,s=0,t=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;n=R-560|0;R=n;o[n+44>>2]=0;h(+b);i=e(1)|0;a:{if(G=1,H=(J=e(0)>>>0>4294967295?0:1,K=0,L=(i|0)<=-1,L?J:K),I=(i|0)<-1,I?G:H){C=1;b=-b;h(+b);i=e(1)|0;e(0)|0;D=11632;break a}if(f&2048){C=1;D=11635;break a}C=f&1;D=C?11638:11633}b:{if((i&2146435072)==2146435072){r=C+3|0;Kj(a,32,c,r,f&-65537);Hj(a,D,C);d=g>>>5&1;Hj(a,b!=b?d?11659:11663:d?11651:11655,3);break b}y=n+16|0;c:{d:{e:{b=Ej(b,n+44|0);b=b+b;if(b!=0){i=o[n+44>>2];o[n+44>>2]=i+ -1;z=g|32;if((z|0)!=97){break e}break c}z=g|32;if((z|0)==97){break c}j=o[n+44>>2];q=(d|0)<0?6:d;break d}j=i+ -29|0;o[n+44>>2]=j;b=b*268435456;q=(d|0)<0?6:d}s=(j|0)<0?n+48|0:n+336|0;l=s;while(1){d=l;if(b<4294967296&b>=0){i=~~b>>>0}else{i=0}o[d>>2]=i;l=l+4|0;b=(b- +(i>>>0))*1e9;if(b!=0){continue}break}f:{if((j|0)<1){i=l;k=s;break f}k=s;while(1){v=(j|0)<29?j:29;i=l+ -4|0;g:{if(i>>>0>>0){break g}d=v;j=0;while(1){r=i;E=j;x=o[i>>2];t=d&31;if(32<=(d&63)>>>0){j=x<>>32-t;x=x<>>0>>0?j+1|0:j;j=Ql(t,j,1e9,0);x=r;r=Ol(j,T,1e9,0);o[x>>2]=t-r;i=i+ -4|0;if(i>>>0>=k>>>0){continue}break}if(!j){break g}k=k+ -4|0;o[k>>2]=j}while(1){i=l;if(i>>>0>k>>>0){l=i+ -4|0;if(!o[l>>2]){continue}}break}j=o[n+44>>2]-v|0;o[n+44>>2]=j;l=i;if((j|0)>0){continue}break}}if((j|0)<=-1){A=((q+25|0)/9|0)+1|0;v=(z|0)==102;while(1){d=(j|0)<-9?9:0-j|0;h:{if(k>>>0>=i>>>0){k=o[k>>2]?k:k+4|0;break h}r=1e9>>>d|0;t=-1<>2];o[l>>2]=x+(j>>>d|0);j=u(r,j&t);l=l+4|0;if(l>>>0>>0){continue}break}k=o[k>>2]?k:k+4|0;if(!j){break h}o[i>>2]=j;i=i+4|0}j=d+o[n+44>>2]|0;o[n+44>>2]=j;d=v?s:k;i=i-d>>2>(A|0)?d+(A<<2)|0:i;if((j|0)<0){continue}break}}l=0;i:{if(k>>>0>=i>>>0){break i}l=u(s-k>>2,9);j=10;d=o[k>>2];if(d>>>0<10){break i}while(1){l=l+1|0;j=u(j,10);if(d>>>0>=j>>>0){continue}break}}d=(q-((z|0)==102?0:l)|0)-((z|0)==103&(q|0)!=0)|0;if((d|0)<(u(i-s>>2,9)+ -9|0)){d=d+9216|0;v=(d|0)/9|0;r=(s+(v<<2)|0)+ -4092|0;j=10;d=d-u(v,9)|0;if((d|0)<=7){while(1){j=u(j,10);d=d+1|0;if((d|0)!=8){continue}break}}v=o[r>>2];t=(v>>>0)/(j>>>0)|0;A=r+4|0;d=v-u(j,t)|0;j:{if(d?0:(A|0)==(i|0)){break j}x=j>>>1|0;B=d>>>0>>0?.5:(i|0)==(A|0)?(x|0)==(d|0)?1:1.5:1.5;b=t&1?9007199254740994:9007199254740992;if(!(!C|p[D|0]!=45)){B=-B;b=-b}d=v-d|0;o[r>>2]=d;if(b+B==b){break j}d=d+j|0;o[r>>2]=d;if(d>>>0>=1e9){while(1){o[r>>2]=0;r=r+ -4|0;if(r>>>0>>0){k=k+ -4|0;o[k>>2]=0}d=o[r>>2]+1|0;o[r>>2]=d;if(d>>>0>999999999){continue}break}}l=u(s-k>>2,9);j=10;d=o[k>>2];if(d>>>0<10){break j}while(1){l=l+1|0;j=u(j,10);if(d>>>0>=j>>>0){continue}break}}d=r+4|0;i=i>>>0>d>>>0?d:i}k:{while(1){j=i;v=0;if(i>>>0<=k>>>0){break k}i=j+ -4|0;if(!o[i>>2]){continue}break}v=1}l:{if((z|0)!=103){t=f&8;break l}d=q?q:1;i=(d|0)>(l|0)&(l|0)>-5;q=(i?l^-1:-1)+d|0;g=(i?-1:-2)+g|0;t=f&8;if(t){break l}i=9;m:{if(!v){break m}r=o[j+ -4>>2];if(!r){break m}d=10;i=0;if((r>>>0)%10){break m}while(1){i=i+1|0;d=u(d,10);if(!((r>>>0)%(d>>>0))){continue}break}}d=u(j-s>>2,9)+ -9|0;if((g|32)==102){t=0;d=d-i|0;d=(d|0)>0?d:0;q=(q|0)<(d|0)?q:d;break l}t=0;d=(d+l|0)-i|0;d=(d|0)>0?d:0;q=(q|0)<(d|0)?q:d}z=q|t;x=(z|0)!=0;d=a;E=c;F=g|32;i=(l|0)>0?l:0;n:{if((F|0)==102){break n}i=l>>31;i=Nj(i+l^i,0,y);if((y-i|0)<=1){while(1){i=i+ -1|0;m[i|0]=48;if((y-i|0)<2){continue}break}}A=i+ -2|0;m[A|0]=g;m[i+ -1|0]=(l|0)<0?45:43;i=y-A|0}r=(i+(x+(q+C|0)|0)|0)+1|0;Kj(d,32,E,r,f);Hj(a,D,C);Kj(a,48,c,r,f^65536);o:{p:{q:{if((F|0)==102){d=n+16|8;g=n+16|9;l=k>>>0>s>>>0?s:k;k=l;while(1){i=Nj(o[k>>2],0,g);r:{if((k|0)!=(l|0)){if(i>>>0<=n+16>>>0){break r}while(1){i=i+ -1|0;m[i|0]=48;if(i>>>0>n+16>>>0){continue}break}break r}if((g|0)!=(i|0)){break r}m[n+24|0]=48;i=d}Hj(a,i,g-i|0);k=k+4|0;if(k>>>0<=s>>>0){continue}break}if(z){Hj(a,11667,1)}if((q|0)<1|k>>>0>=j>>>0){break q}while(1){i=Nj(o[k>>2],0,g);if(i>>>0>n+16>>>0){while(1){i=i+ -1|0;m[i|0]=48;if(i>>>0>n+16>>>0){continue}break}}Hj(a,i,(q|0)<9?q:9);i=q+ -9|0;k=k+4|0;if(k>>>0>=j>>>0){break p}d=(q|0)>9;q=i;if(d){continue}break}break p}s:{if((q|0)<0){break s}s=v?j:k+4|0;d=n+16|8;g=n+16|9;l=k;while(1){i=Nj(o[l>>2],0,g);if((g|0)==(i|0)){m[n+24|0]=48;i=d}t:{if((k|0)!=(l|0)){if(i>>>0<=n+16>>>0){break t}while(1){i=i+ -1|0;m[i|0]=48;if(i>>>0>n+16>>>0){continue}break}break t}Hj(a,i,1);i=i+1|0;if((q|0)<1?!t:0){break t}Hj(a,11667,1)}j=i;i=g-i|0;Hj(a,j,(q|0)>(i|0)?i:q);q=q-i|0;l=l+4|0;if(l>>>0>=s>>>0){break s}if((q|0)>-1){continue}break}}Kj(a,48,q+18|0,18,0);Hj(a,A,y-A|0);break o}i=q}Kj(a,48,i+9|0,9,0)}break b}q=g&32;j=q?D+9|0:D;u:{if(d>>>0>11){break u}i=12-d|0;if(!i){break u}B=8;while(1){B=B*16;i=i+ -1|0;if(i){continue}break}if(p[j|0]==45){b=-(B+(-b-B));break u}b=b+B-B}l=o[n+44>>2];i=l>>31;i=Nj(i^i+l,0,y);if((y|0)==(i|0)){m[n+15|0]=48;i=n+15|0}l=C|2;k=o[n+44>>2];s=i+ -2|0;m[s|0]=g+15;m[i+ -1|0]=(k|0)<0?45:43;D=f&8;k=n+16|0;while(1){g=k;r=q;if(w(b)<2147483648){i=~~b}else{i=-2147483648}m[k|0]=r|p[i+11616|0];b=(b- +(i|0))*16;k=g+1|0;if(!((k-(n+16|0)|0)!=1|(b==0?!((d|0)>0|D):0))){m[g+1|0]=46;k=g+2|0}if(b!=0){continue}break}g=a;i=c;if(!d|((k-n|0)+ -18|0)>=(d|0)){q=((y-(n+16|0)|0)-s|0)+k|0}else{q=((d+y|0)-s|0)+2|0}d=q;r=d+l|0;Kj(g,32,i,r,f);Hj(a,j,l);Kj(a,48,c,r,f^65536);g=k-(n+16|0)|0;Hj(a,n+16|0,g);d=y-s|0;Kj(a,48,q-(d+g|0)|0,0,0);Hj(a,s,d)}Kj(a,32,c,r,f^8192);R=n+560|0;return((r|0)<(c|0)?c:r)|0}function Ie(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;i=R+ -64|0;R=i;o[a+8>>2]=e;f=a+32|0;j=o[f>>2];d=o[a+36>>2]-j>>2;a:{if(d>>>0>>0){Ia(f,e-d|0);break a}if(d>>>0<=e>>>0){break a}o[a+36>>2]=j+(e<<2)}o[i+56>>2]=0;o[i+60>>2]=0;o[i+48>>2]=0;o[i+52>>2]=0;o[i+40>>2]=0;o[i+44>>2]=0;f=i+32|0;o[f>>2]=0;o[f+4>>2]=0;o[i+24>>2]=0;o[i+28>>2]=0;o[i+16>>2]=0;o[i+20>>2]=0;o[i>>2]=0;d=0;if(e){Dd(i+16|0,e,i);h=o[i+28>>2];d=o[f>>2]}o[i>>2]=0;d=d-h>>2;b:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break b}o[i+32>>2]=(e<<2)+h;break b}Dd(i+16|12,e-d|0,i)}o[i>>2]=0;f=o[i+40>>2];d=o[i+44>>2]-f>>2;c:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break c}o[i+44>>2]=f+(e<<2);break c}Dd(i+40|0,e-d|0,i)}o[i>>2]=0;f=o[i+52>>2];d=o[i+56>>2]-f>>2;d:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break d}o[i+56>>2]=f+(e<<2);break d}Dd(i+52|0,e-d|0,i)}e:{if(o[a+8>>2]<=0){break e}g=o[i+16>>2];h=0;while(1){d=h<<2;f=o[d+g>>2];k=o[a+16>>2];f:{if((f|0)>(k|0)){j=o[a+32>>2];o[d+j>>2]=k;break f}j=o[a+32>>2];d=d+j|0;k=o[a+12>>2];if((f|0)<(k|0)){o[d>>2]=k;break f}o[d>>2]=f}h=h+1|0;d=o[a+8>>2];if((h|0)<(d|0)){continue}break}if((d|0)<1){break e}d=0;while(1){g=d<<2;f=g+c|0;g=o[b+g>>2]+o[g+j>>2]|0;o[f>>2]=g;g:{if((g|0)>o[a+16>>2]){g=g-o[a+20>>2]|0}else{if((g|0)>=o[a+12>>2]){break g}g=g+o[a+20>>2]|0}o[f>>2]=g}d=d+1|0;if((d|0)>2]){continue}break}}z=o[a+52>>2];p=o[a+48>>2];t=yk(16);d=t;o[d>>2]=0;o[d+4>>2]=0;o[d+8>>2]=0;o[d+12>>2]=0;o[i+8>>2]=0;o[i>>2]=0;o[i+4>>2]=0;h:{if(e){if(e>>>0>=1073741824){break h}d=e<<2;s=yk(d);o[i>>2]=s;f=d+s|0;o[i+8>>2]=f;ml(s,0,d);o[i+4>>2]=f}d=1;f=o[a+56>>2];y=o[f>>2];f=o[f+4>>2]-y|0;i:{if((f|0)<5){break i}d=f>>2;A=(d|0)>2?d:2;B=d>>>0>1?d:1;C=e<<2;k=1;while(1){j:{k:{l:{if((k|0)!=(B|0)){m:{n:{j=o[(k<<2)+y>>2];if((j|0)==-1){break n}m=j+((j>>>0)%3|0?-1:2)|0;v=m>>>5|0;l=1;w=1<<(m&31);x=o[p>>2];f=0;d=j;o:{while(1){p:{if(o[x+(d>>>3&536870908)>>2]>>>(d&31)&1){break p}g=o[o[o[p+64>>2]+12>>2]+(d<<2)>>2];if((g|0)==-1){break p}q=o[z>>2];h=o[p+28>>2];r=o[q+(o[h+(g<<2)>>2]<<2)>>2];if((r|0)>=(k|0)){break p}n=g+1|0;n=o[q+(o[h+(((n>>>0)%3|0?n:g+ -2|0)<<2)>>2]<<2)>>2];if((n|0)>=(k|0)){break p}g=o[q+(o[h+(g+((g>>>0)%3|0?-1:2)<<2)>>2]<<2)>>2];if((g|0)>=(k|0)){break p}if((e|0)>=1){q=o[(i+16|0)+u(f,12)>>2];g=u(e,g);n=u(e,n);r=u(e,r);h=0;while(1){o[q+(h<<2)>>2]=(o[(g+h<<2)+c>>2]+o[(h+n<<2)+c>>2]|0)-o[(h+r<<2)+c>>2];h=h+1|0;if((h|0)!=(e|0)){continue}break}}g=4;f=f+1|0;if((f|0)==4){break o}}q:{if(l&1){h=-1;g=d+1|0;d=(g>>>0)%3|0?g:d+ -2|0;if((d|0)==-1|o[o[p>>2]+(d>>>3&536870908)>>2]>>>(d&31)&1){break q}d=o[o[o[p+64>>2]+12>>2]+(d<<2)>>2];if((d|0)==-1){break q}g=d+1|0;h=(g>>>0)%3|0?g:d+ -2|0;break q}h=-1;d=((d>>>0)%3|0?-1:2)+d|0;if((d|0)==-1|o[o[p>>2]+(d>>>3&536870908)>>2]>>>(d&31)&1){break q}d=o[o[o[p+64>>2]+12>>2]+(d<<2)>>2];if((d|0)==-1){break q}if((d>>>0)%3){h=d+ -1|0;break q}h=d+2|0}r:{if((h|0)==(j|0)){break r}d=h;g=(h|0)!=-1;h=(g|l^-1)&1;d=h?d:-1;l=g&l;if(!((m|0)==-1|h)){if(o[o[p>>2]+(v<<2)>>2]&w){break r}g=o[o[o[p+64>>2]+12>>2]+(m<<2)>>2];if((g|0)==-1){break r}l=0;if((g>>>0)%3){d=g+ -1|0}else{d=g+2|0}}if((d|0)!=-1){continue}}break}g=f;if((g|0)<1){break n}}m=(e|0)<1;if(!m){ml(s,0,C)}d=g+ -1|0;l=(d<<2)+t|0;d=u(d,12)+a|0;q=d+60|0;v=o[d- -64>>2];d=0;w=o[i>>2];j=0;f=0;while(1){h=o[l>>2];o[l>>2]=h+1;if(v>>>0<=h>>>0){break i}s:{if(o[o[q>>2]+(h>>>3&536870908)>>2]>>>(h&31)&1){break s}f=f+1|0;if(m){break s}x=o[(i+16|0)+u(j,12)>>2];h=0;while(1){r=h<<2;n=r+w|0;o[n>>2]=o[n>>2]+o[r+x>>2];h=h+1|0;if((h|0)!=(e|0)){continue}break}}j=j+1|0;if((g|0)!=(j|0)){continue}break}l=u(e,k);g=l;if(!f){break m}h=0;if((e|0)>0){break l}break k}g=u(e,k)}if(o[a+8>>2]<1){break j}l=(u(k+ -1|0,e)<<2)+c|0;h=0;while(1){d=h<<2;f=o[d+l>>2];m=o[a+16>>2];t:{if((f|0)>(m|0)){j=o[a+32>>2];o[d+j>>2]=m;break t}j=o[a+32>>2];d=d+j|0;m=o[a+12>>2];if((f|0)<(m|0)){o[d>>2]=m;break t}o[d>>2]=f}h=h+1|0;f=o[a+8>>2];if((h|0)<(f|0)){continue}break}d=0;if((f|0)<1){break j}f=g<<2;h=f+c|0;l=b+f|0;while(1){g=d<<2;f=g+h|0;g=o[g+l>>2]+o[g+j>>2]|0;o[f>>2]=g;u:{if((g|0)>o[a+16>>2]){g=g-o[a+20>>2]|0}else{if((g|0)>=o[a+12>>2]){break u}g=g+o[a+20>>2]|0}o[f>>2]=g}d=d+1|0;if((d|0)>2]){continue}break}break j}Ok();D()}while(1){d=(h<<2)+s|0;o[d>>2]=o[d>>2]/(f|0);h=h+1|0;if((h|0)!=(e|0)){continue}break}}if(o[a+8>>2]<1){break j}h=0;while(1){d=h<<2;f=o[d+s>>2];g=o[a+16>>2];v:{if((f|0)>(g|0)){j=o[a+32>>2];o[d+j>>2]=g;break v}j=o[a+32>>2];d=d+j|0;g=o[a+12>>2];if((f|0)<(g|0)){o[d>>2]=g;break v}o[d>>2]=f}h=h+1|0;f=o[a+8>>2];if((h|0)<(f|0)){continue}break}d=0;if((f|0)<1){break j}f=l<<2;h=f+c|0;l=b+f|0;while(1){g=d<<2;f=g+h|0;g=o[g+l>>2]+o[g+j>>2]|0;o[f>>2]=g;w:{if((g|0)>o[a+16>>2]){g=g-o[a+20>>2]|0}else{if((g|0)>=o[a+12>>2]){break w}g=g+o[a+20>>2]|0}o[f>>2]=g}d=d+1|0;if((d|0)>2]){continue}break}}d=1;k=k+1|0;if((A|0)!=(k|0)){continue}break}}a=o[i>>2];if(a){o[i+4>>2]=a;jl(a)}jl(t);a=o[i+52>>2];if(a){o[i+56>>2]=a;jl(a)}a=o[i+40>>2];if(a){o[i+44>>2]=a;jl(a)}a=o[i+28>>2];if(a){o[i+32>>2]=a;jl(a)}a=o[i+16>>2];if(a){o[i+20>>2]=a;jl(a)}R=i- -64|0;return d|0}Nk();D()}function ef(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;h=R+ -64|0;R=h;o[a+8>>2]=e;f=a+32|0;j=o[f>>2];d=o[a+36>>2]-j>>2;a:{if(d>>>0>>0){Ia(f,e-d|0);break a}if(d>>>0<=e>>>0){break a}o[a+36>>2]=j+(e<<2)}o[h+56>>2]=0;o[h+60>>2]=0;o[h+48>>2]=0;o[h+52>>2]=0;o[h+40>>2]=0;o[h+44>>2]=0;d=h+32|0;o[d>>2]=0;o[d+4>>2]=0;o[h+24>>2]=0;o[h+28>>2]=0;o[h+16>>2]=0;o[h+20>>2]=0;o[h>>2]=0;f=0;if(e){Dd(h+16|0,e,h);i=o[h+28>>2];f=o[d>>2]}o[h>>2]=0;d=f-i>>2;b:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break b}o[h+32>>2]=(e<<2)+i;break b}Dd(h+16|12,e-d|0,h)}o[h>>2]=0;f=o[h+40>>2];d=o[h+44>>2]-f>>2;c:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break c}o[h+44>>2]=f+(e<<2);break c}Dd(h+40|0,e-d|0,h)}o[h>>2]=0;f=o[h+52>>2];d=o[h+56>>2]-f>>2;d:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break d}o[h+56>>2]=f+(e<<2);break d}Dd(h+52|0,e-d|0,h)}e:{if(o[a+8>>2]<=0){break e}g=o[h+16>>2];i=0;while(1){d=i<<2;f=o[d+g>>2];l=o[a+16>>2];f:{if((f|0)>(l|0)){j=o[a+32>>2];o[d+j>>2]=l;break f}j=o[a+32>>2];d=d+j|0;l=o[a+12>>2];if((f|0)<(l|0)){o[d>>2]=l;break f}o[d>>2]=f}i=i+1|0;d=o[a+8>>2];if((i|0)<(d|0)){continue}break}if((d|0)<1){break e}f=0;while(1){g=f<<2;d=g+c|0;g=o[b+g>>2]+o[g+j>>2]|0;o[d>>2]=g;g:{if((g|0)>o[a+16>>2]){g=g-o[a+20>>2]|0}else{if((g|0)>=o[a+12>>2]){break g}g=g+o[a+20>>2]|0}o[d>>2]=g}f=f+1|0;if((f|0)>2]){continue}break}}z=o[a+52>>2];x=o[a+48>>2];w=yk(16);d=w;o[d>>2]=0;o[d+4>>2]=0;o[d+8>>2]=0;o[d+12>>2]=0;o[h+8>>2]=0;o[h>>2]=0;o[h+4>>2]=0;h:{if(e){if(e>>>0>=1073741824){break h}d=e<<2;r=yk(d);o[h>>2]=r;f=d+r|0;o[h+8>>2]=f;ml(r,0,d);o[h+4>>2]=f}j=1;d=o[a+56>>2];y=o[d>>2];d=o[d+4>>2]-y|0;i:{if((d|0)<5){break i}d=d>>2;A=(d|0)>2?d:2;B=d>>>0>1?d:1;C=e<<2;l=1;while(1){j:{k:{l:{if((l|0)!=(B|0)){m:{n:{j=o[(l<<2)+y>>2];if((j|0)==-1){break n}m=o[x+12>>2];t=j+((j>>>0)%3|0?-1:2)|0;v=m+(t<<2)|0;k=1;f=0;d=j;o:{while(1){g=o[m+(d<<2)>>2];p:{if((g|0)==-1){break p}i=-1;q=o[z>>2];n=o[x>>2];s=o[q+(o[n+(g<<2)>>2]<<2)>>2];p=g+1|0;p=(p>>>0)%3|0?p:g+ -2|0;if((p|0)!=-1){p=o[n+(p<<2)>>2]}else{p=-1}g=g+((g>>>0)%3|0?-1:2)|0;if((g|0)!=-1){i=o[n+(g<<2)>>2]}if((s|0)>=(l|0)){break p}g=o[(p<<2)+q>>2];if((g|0)>=(l|0)){break p}i=o[q+(i<<2)>>2];if((i|0)>=(l|0)){break p}n=o[(h+16|0)+u(f,12)>>2];if((e|0)>=1){q=u(e,i);g=u(e,g);s=u(e,s);i=0;while(1){o[n+(i<<2)>>2]=(o[(i+q<<2)+c>>2]+o[(g+i<<2)+c>>2]|0)-o[(i+s<<2)+c>>2];i=i+1|0;if((i|0)!=(e|0)){continue}break}}g=4;f=f+1|0;if((f|0)==4){break o}}q:{if(k&1){n=d+1|0;d=(n>>>0)%3|0?n:d+ -2|0;g=-1;if((d|0)==-1){break q}d=o[m+(d<<2)>>2];g=-1;if((d|0)==-1){break q}g=d+1|0;g=(g>>>0)%3|0?g:d+ -2|0;break q}d=((d>>>0)%3|0?-1:2)+d|0;g=-1;if((d|0)==-1){break q}d=o[m+(d<<2)>>2];g=-1;if((d|0)==-1){break q}g=d+ -1|0;if((d>>>0)%3){break q}g=d+2|0}r:{if((g|0)==(j|0)){break r}d=g;g=(g|0)!=-1;i=(g|k^-1)&1;d=i?d:-1;k=g&k;if(!((t|0)==-1|i)){g=o[v>>2];if((g|0)==-1){break r}k=0;if((g>>>0)%3){d=g+ -1|0}else{d=g+2|0}}if((d|0)!=-1){continue}}break}g=f;if((g|0)<1){break n}}m=(e|0)<1;if(!m){ml(r,0,C)}d=g+ -1|0;k=(d<<2)+w|0;d=u(d,12)+a|0;n=d+60|0;q=o[d- -64>>2];j=0;s=o[h>>2];d=0;f=0;while(1){i=o[k>>2];o[k>>2]=i+1;if(q>>>0<=i>>>0){break i}s:{if(o[o[n>>2]+(i>>>3&536870908)>>2]>>>(i&31)&1){break s}f=f+1|0;if(m){break s}p=o[(h+16|0)+u(d,12)>>2];i=0;while(1){t=i<<2;v=t+s|0;o[v>>2]=o[v>>2]+o[p+t>>2];i=i+1|0;if((i|0)!=(e|0)){continue}break}}d=d+1|0;if((g|0)!=(d|0)){continue}break}g=u(e,l);d=g;if(!f){break m}i=0;if((e|0)>0){break l}break k}d=u(e,l)}if(o[a+8>>2]<1){break j}k=(u(l+ -1|0,e)<<2)+c|0;i=0;while(1){f=i<<2;g=o[f+k>>2];m=o[a+16>>2];t:{if((g|0)>(m|0)){j=o[a+32>>2];o[f+j>>2]=m;break t}j=o[a+32>>2];f=f+j|0;m=o[a+12>>2];if((g|0)<(m|0)){o[f>>2]=m;break t}o[f>>2]=g}i=i+1|0;g=o[a+8>>2];if((i|0)<(g|0)){continue}break}f=0;if((g|0)<1){break j}d=d<<2;i=d+c|0;k=b+d|0;while(1){g=f<<2;d=g+i|0;g=o[g+k>>2]+o[g+j>>2]|0;o[d>>2]=g;u:{if((g|0)>o[a+16>>2]){g=g-o[a+20>>2]|0}else{if((g|0)>=o[a+12>>2]){break u}g=g+o[a+20>>2]|0}o[d>>2]=g}f=f+1|0;if((f|0)>2]){continue}break}break j}Ok();D()}while(1){d=(i<<2)+r|0;o[d>>2]=o[d>>2]/(f|0);i=i+1|0;if((i|0)!=(e|0)){continue}break}}if(o[a+8>>2]<1){break j}i=0;while(1){d=i<<2;f=o[d+r>>2];k=o[a+16>>2];v:{if((f|0)>(k|0)){j=o[a+32>>2];o[d+j>>2]=k;break v}j=o[a+32>>2];d=d+j|0;k=o[a+12>>2];if((f|0)<(k|0)){o[d>>2]=k;break v}o[d>>2]=f}i=i+1|0;d=o[a+8>>2];if((i|0)<(d|0)){continue}break}f=0;if((d|0)<1){break j}d=g<<2;i=d+c|0;k=b+d|0;while(1){g=f<<2;d=g+i|0;g=o[g+k>>2]+o[g+j>>2]|0;o[d>>2]=g;w:{if((g|0)>o[a+16>>2]){g=g-o[a+20>>2]|0}else{if((g|0)>=o[a+12>>2]){break w}g=g+o[a+20>>2]|0}o[d>>2]=g}f=f+1|0;if((f|0)>2]){continue}break}}j=1;l=l+1|0;if((A|0)!=(l|0)){continue}break}}a=o[h>>2];if(a){o[h+4>>2]=a;jl(a)}jl(w);a=o[h+52>>2];if(a){o[h+56>>2]=a;jl(a)}a=o[h+40>>2];if(a){o[h+44>>2]=a;jl(a)}a=o[h+28>>2];if(a){o[h+32>>2]=a;jl(a)}a=o[h+16>>2];if(a){o[h+20>>2]=a;jl(a)}R=h- -64|0;return j|0}Nk();D()}function _j(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;e=R-16|0;R=e;o[e+12>>2]=a;a:{if(a>>>0<=211){a=o[$j(11680,11872,e+12|0)>>2];break a}if(a>>>0>=4294967292){bk();D()}f=(a>>>0)/210|0;d=u(f,210);o[e+8>>2]=a-d;g=$j(11872,12064,e+8|0)-11872>>2;b:{while(1){a=o[(g<<2)+11872>>2]+d|0;d=5;c:{d:{e:{while(1){if((d|0)==47){break e}b=o[(d<<2)+11680>>2];c=(a>>>0)/(b>>>0)|0;h=c>>>0>>0;i=h?a:i;d=d+1|0;b=h?1:(u(b,c)|0)==(a|0)?7:0;if(!b){continue}break}d=b+ -4|0;if(d>>>0>3){break b}switch(d-1|0){case 0:case 1:break b;case 2:break d;default:break e}}d=211;while(1){b=(a>>>0)/(d>>>0)|0;if(b>>>0>>0){break c}if((u(b,d)|0)==(a|0)){break d}b=d+10|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+12|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+16|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+18|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+22|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+28|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+30|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+36|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+40|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+42|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+46|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+52|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+58|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+60|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+66|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+70|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+72|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+78|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+82|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+88|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+96|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+100|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+102|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+106|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+108|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+112|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+120|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+126|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+130|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+136|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+138|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+142|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+148|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+150|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+156|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+162|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+166|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+168|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+172|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+178|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+180|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+186|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+190|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+192|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+196|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+198|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}if((u(b,c)|0)==(a|0)){break d}b=d+208|0;c=(a>>>0)/(b>>>0)|0;if(c>>>0>>0){break c}d=d+210|0;if((u(b,c)|0)!=(a|0)){continue}break}}d=g+1|0;a=(d|0)==48;g=a?0:d;f=a+f|0;d=u(f,210);continue}break}o[e+12>>2]=a;break a}o[e+12>>2]=a;a=i}R=e+16|0;return a}function Gj(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,q=0,r=0,s=0,v=0,w=0,x=0,y=0,z=0,A=0;f=R-80|0;R=f;o[f+76>>2]=12431;A=f+55|0;x=f+56|0;a:{b:{c:while(1){d:{if((s|0)<0){break d}if((e|0)>(2147483647-s|0)){o[3314]=61;s=-1;break d}s=e+s|0}e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{j=o[f+76>>2];e=j;i=p[e|0];if(i){while(1){r:{s:{g=i&255;t:{if(!g){i=e;break t}if((g|0)!=37){break s}i=e;while(1){if(p[e+1|0]!=37){break t}g=e+2|0;o[f+76>>2]=g;i=i+1|0;h=p[e+2|0];e=g;if((h|0)==37){continue}break}}e=i-j|0;if(a){Hj(a,j,e)}if(e){continue c}v=-1;i=1;g=f;k=!Bj(m[o[f+76>>2]+1|0]);e=o[f+76>>2];if(!(k|p[e+2|0]!=36)){v=m[e+1|0]+ -48|0;y=1;i=3}e=i+e|0;o[g+76>>2]=e;i=0;w=m[e|0];h=w+ -32|0;u:{if(h>>>0>31){g=e;break u}g=e;h=1<>2]=g;i=h|i;w=m[e+1|0];h=w+ -32|0;if(h>>>0>31){break u}e=g;h=1<>2];if(p[e+2|0]!=36){break x}o[((m[e+1|0]<<2)+d|0)+ -192>>2]=10;r=o[((m[e+1|0]<<3)+c|0)+ -384>>2];y=1;e=e+3|0;break w}if(y){break b}y=0;r=0;if(a){e=o[b>>2];o[b>>2]=e+4;r=o[e>>2]}e=o[f+76>>2]+1|0}o[k+76>>2]=e;if((r|0)>-1){break v}r=0-r|0;i=i|8192;break v}r=Ij(f+76|0);if((r|0)<0){break b}e=o[f+76>>2]}h=-1;y:{if(p[e|0]!=46){break y}if(p[e+1|0]==42){z:{if(!Bj(m[e+2|0])){break z}e=o[f+76>>2];if(p[e+3|0]!=36){break z}o[((m[e+2|0]<<2)+d|0)+ -192>>2]=10;h=o[((m[e+2|0]<<3)+c|0)+ -384>>2];e=e+4|0;o[f+76>>2]=e;break y}if(y){break b}if(a){e=o[b>>2];o[b>>2]=e+4;h=o[e>>2]}else{h=0}e=o[f+76>>2]+2|0;o[f+76>>2]=e;break y}o[f+76>>2]=e+1;h=Ij(f+76|0);e=o[f+76>>2]}g=0;while(1){z=g;q=-1;if(m[e|0]+ -65>>>0>57){break a}w=e+1|0;o[f+76>>2]=w;g=m[e|0];e=w;g=p[(g+u(z,58)|0)+11087|0];if(g+ -1>>>0<8){continue}break}if(!g){break a}A:{B:{C:{if((g|0)==19){if((v|0)<=-1){break C}break a}if((v|0)<0){break B}o[(v<<2)+d>>2]=g;e=(v<<3)+c|0;g=o[e+4>>2];o[f+64>>2]=o[e>>2];o[f+68>>2]=g}e=0;if(!a){continue c}break A}if(!a){break e}Jj(f- -64|0,g,b);w=o[f+76>>2]}k=i&-65537;i=i&8192?k:i;q=0;v=11120;g=x;e=m[w+ -1|0];e=z?(e&15)==3?e&-33:e:e;w=e+ -88|0;if(w>>>0<=32){break r}D:{E:{F:{G:{k=e+ -65|0;if(k>>>0>6){if((e|0)!=83){break f}if(!h){break G}g=o[f+64>>2];break E}switch(k-1|0){case 1:break F;case 0:case 2:break f;default:break q}}e=0;Kj(a,32,r,0,i);break D}o[f+12>>2]=0;o[f+8>>2]=o[f+64>>2];o[f+64>>2]=f+8;h=-1;g=f+8|0}e=0;H:{while(1){j=o[g>>2];if(!j){break H}j=Dj(f+4|0,j);k=(j|0)<0;if(!(k|j>>>0>h-e>>>0)){g=g+4|0;e=e+j|0;if(h>>>0>e>>>0){continue}break H}break}q=-1;if(k){break a}}Kj(a,32,r,e,i);if(!e){e=0;break D}h=0;g=o[f+64>>2];while(1){j=o[g>>2];if(!j){break D}j=Dj(f+4|0,j);h=j+h|0;if((h|0)>(e|0)){break D}Hj(a,f+4|0,j);g=g+4|0;if(h>>>0>>0){continue}break}}Kj(a,32,r,e,i^8192);e=(r|0)>(e|0)?r:e;continue c}g=e+1|0;o[f+76>>2]=g;i=p[e+1|0];e=g;continue}break}switch(w-1|0){case 28:break i;case 21:break j;case 23:break l;case 22:break m;case 11:case 16:break n;case 10:break o;case 26:break p;case 8:case 12:case 13:case 14:break q;case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 9:case 15:case 17:case 18:case 19:case 20:case 24:case 25:case 27:case 29:case 30:break f;default:break k}}q=s;if(a){break a}if(!y){break e}e=1;while(1){a=o[(e<<2)+d>>2];if(a){Jj((e<<3)+c|0,a,b);q=1;e=e+1|0;if((e|0)!=10){continue}break a}break}q=1;if(e>>>0>9){break a}while(1){a=e;e=e+1|0;if(o[(e<<2)+d>>2]?0:(e|0)!=10){continue}break}q=a>>>0<9?-1:1;break a}e=l[274](a,t[f+64>>3],r,h,i,e)|0;continue}e=o[f+64>>2];j=e?e:11130;e=Uj(j,h);g=e?e:h+j|0;i=k;h=e?e-j|0:h;break f}m[f+55|0]=o[f+64>>2];h=1;j=A;i=k;break f}k=o[f+68>>2];e=k;j=o[f+64>>2];if((e|0)<-1?1:(e|0)<=-1?j>>>0>4294967295?0:1:0){e=0-(e+(0>>0)|0)|0;j=0-j|0;o[f+64>>2]=j;o[f+68>>2]=e;q=1;v=11120;break h}if(i&2048){q=1;v=11121;break h}q=i&1;v=q?11122:11120;break h}j=Lj(o[f+64>>2],o[f+68>>2],x);if(!(i&8)){break g}e=x-j|0;h=(h|0)>(e|0)?h:e+1|0;break g}h=h>>>0>8?h:8;i=i|8;e=120}j=Mj(o[f+64>>2],o[f+68>>2],x,e&32);if(!(i&8)|!(o[f+64>>2]|o[f+68>>2])){break g}v=(e>>>4|0)+11120|0;q=2;break g}e=0;g=z&255;if(g>>>0>7){continue}I:{switch(g-1|0){default:o[o[f+64>>2]>>2]=s;continue;case 0:o[o[f+64>>2]>>2]=s;continue;case 1:g=o[f+64>>2];o[g>>2]=s;o[g+4>>2]=s>>31;continue;case 2:n[o[f+64>>2]>>1]=s;continue;case 3:m[o[f+64>>2]]=s;continue;case 5:o[o[f+64>>2]>>2]=s;continue;case 4:continue;case 6:break I}}g=o[f+64>>2];o[g>>2]=s;o[g+4>>2]=s>>31;continue}j=o[f+64>>2];e=o[f+68>>2];v=11120}j=Nj(j,e,x)}i=(h|0)>-1?i&-65537:i;e=o[f+64>>2];k=o[f+68>>2];J:{if(!(!!(e|k)|h)){j=x;h=0;break J}e=!(e|k)+(x-j|0)|0;h=(h|0)>(e|0)?h:e}}k=g-j|0;h=(h|0)<(k|0)?k:h;g=h+q|0;e=(r|0)<(g|0)?g:r;Kj(a,32,e,g,i);Hj(a,v,q);Kj(a,48,e,g,i^65536);Kj(a,48,h,k,0);Hj(a,j,k);Kj(a,32,e,g,i^8192);continue}break}q=0;break a}q=-1}R=f+80|0;return q}function Wg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,s=0,t=0,v=0;g=R+ -64|0;R=g;o[a+132>>2]=0;if(o[a+148>>2]){c=o[a+144>>2];if(c){while(1){d=o[c>>2];jl(c);c=d;if(d){continue}break}}o[a+144>>2]=0;d=o[a+140>>2];if(d){c=0;while(1){o[o[a+136>>2]+(c<<2)>>2]=0;c=c+1|0;if((d|0)!=(c|0)){continue}break}}o[a+148>>2]=0}a:{if(!Xg(1,g+52|0,o[o[a+4>>2]+32>>2])){break a}o[a+156>>2]=o[g+52>>2];if(!Xg(1,g+48|0,o[o[a+4>>2]+32>>2])){break a}f=o[g+48>>2];if(f>>>0>1431655765|r[a+156>>2]>u(f,3)>>>0){break a}d=o[o[a+4>>2]+32>>2];j=o[d+16>>2];e=o[d+12>>2];c=o[d+20>>2];if((e|0)<(c|0)?1:(e|0)<=(c|0)?r[d+8>>2]>j>>>0?0:1:0){break a}h=p[j+o[d>>2]|0];j=j+1|0;if(j>>>0<1){c=c+1|0}o[d+16>>2]=j;o[d+20>>2]=c;if(!Xg(1,g+44|0,d)){break a}k=o[g+44>>2];if(f>>>0>>0|f>>>0>k+((k>>>0)/3|0)>>>0){break a}if(!Xg(1,g+40|0,o[o[a+4>>2]+32>>2])){break a}e=o[g+40>>2];if(e>>>0>k>>>0){break a}o[a+28>>2]=o[a+24>>2];c=yk(88);Ci(c);d=o[a+8>>2];o[a+8>>2]=c;j=a+8|0;if(d){za(j,d);if(!o[j>>2]){break a}}b=o[a+160>>2];o[a+164>>2]=b;b:{c:{d:{e:{f:{if(o[a+168>>2]-b>>2>>>0>=f>>>0){break f}if(f>>>0>=1073741824){break e}c=f<<2;d=yk(c);o[a+164>>2]=d;o[a+160>>2]=d;o[a+168>>2]=c+d;if(!b){break f}jl(b)}b=o[a+172>>2];o[a+176>>2]=b;g:{if(o[a+180>>2]-b>>2>>>0>=f>>>0){break g}if(f>>>0>=1073741824){break d}c=f<<2;d=yk(c);o[a+176>>2]=d;o[a+172>>2]=d;o[a+180>>2]=c+d;if(!b){break g}jl(b)}o[a+92>>2]=-1;o[a+84>>2]=-1;o[a+88>>2]=-1;o[a+40>>2]=o[a+36>>2];o[a- -64>>2]=0;o[a+52>>2]=o[a+48>>2];o[a+76>>2]=o[a+72>>2];n=a+216|0;d=o[a+220>>2];b=o[a+216>>2];if((d|0)==(b|0)){break c}while(1){c=o[d+ -12>>2];if(c){o[d+ -8>>2]=c;jl(c)}c=o[d+ -28>>2];if(c){o[d+ -24>>2]=c;jl(c)}c=d+ -144|0;i=o[d+ -40>>2];if(i){o[d+ -36>>2]=i;jl(i)}Yg(d+ -140|0);d=c;if((b|0)!=(d|0)){continue}break}d=o[n>>2];break b}db(8832);D()}db(8832);D()}d=b}o[a+220>>2]=b;c=(b-d|0)/144|0;h:{if(c>>>0>>0){Zg(n,h-c|0);break h}if(c>>>0<=h>>>0){break h}c=d+u(h,144)|0;if((c|0)!=(b|0)){while(1){d=o[b+ -12>>2];if(d){o[b+ -8>>2]=d;jl(d)}d=o[b+ -28>>2];if(d){o[b+ -24>>2]=d;jl(d)}d=b+ -144|0;i=o[b+ -40>>2];if(i){o[b+ -36>>2]=i;jl(i)}Yg(b+ -140|0);b=d;if((b|0)!=(c|0)){continue}break}}o[a+220>>2]=c}b=0;if(!Mi(o[a+8>>2],f,o[a+156>>2]+e|0)){break a}d=o[a+156>>2];m[g|0]=1;eb(a+120|0,d+e|0,g);if((_g(a,o[o[a+4>>2]+32>>2])|0)==-1){break a}o[a+376>>2]=a;e=a+232|0;b=o[(l[o[o[a>>2]+32>>2]](a)|0)+32>>2];f=o[b>>2]+o[b+16>>2]|0;c=o[(l[o[o[a>>2]+32>>2]](a)|0)+32>>2];b=o[c+8>>2];d=o[c+16>>2];ti(e,f,b-d|0,q[o[(l[o[o[a>>2]+32>>2]](a)|0)+32>>2]+38>>1]);o[a+372>>2]=h;d=si(g);b=o[a+268>>2];o[a+304>>2]=o[a+264>>2];o[a+308>>2]=b;b=o[a+260>>2];o[a+296>>2]=o[a+256>>2];o[a+300>>2]=b;c=a+248|0;b=c;f=o[b+4>>2];o[a+288>>2]=o[b>>2];o[a+292>>2]=f;h=a+240|0;b=h;f=o[b+4>>2];o[a+280>>2]=o[b>>2];o[a+284>>2]=f;b=o[a+236>>2];f=a+272|0;o[f>>2]=o[a+232>>2];o[f+4>>2]=b;i:{j:{if(ui(f,1,g+56|0)){b=o[f+4>>2];o[e>>2]=o[f>>2];o[e+4>>2]=b;b=o[f+36>>2];o[e+32>>2]=o[f+32>>2];o[e+36>>2]=b;b=o[f+28>>2];o[e+24>>2]=o[f+24>>2];o[e+28>>2]=b;b=o[f+20>>2];o[e+16>>2]=o[f+16>>2];o[e+20>>2]=b;b=o[f+12>>2];o[e+8>>2]=o[f+8>>2];o[e+12>>2]=b;i=o[h>>2];b=o[c>>2];t=i-b|0;s=o[g+60>>2];v=o[h+4>>2];h=o[c+4>>2];c=v-(h+(i>>>0>>0)|0)|0;i=o[g+56>>2];if((s|0)==(c|0)&i>>>0<=t>>>0|s>>>0>>0){break j}}b=0;break i}h=h+s|0;i=b+i|0;if(i>>>0>>0){h=h+1|0}o[a+248>>2]=i;o[a+252>>2]=h;b=0;if(!Sf(a+312|0,e)){break i}if(!$g(e)){break i}c=o[e+36>>2];o[g+32>>2]=o[e+32>>2];o[g+36>>2]=c;c=o[e+28>>2];o[g+24>>2]=o[e+24>>2];o[g+28>>2]=c;c=o[e+20>>2];o[g+16>>2]=o[e+16>>2];o[g+20>>2]=c;c=o[e+12>>2];o[g+8>>2]=o[e+8>>2];o[g+12>>2]=c;c=o[e+4>>2];o[g>>2]=o[e>>2];o[g+4>>2]=c;h=ah(a,k);if((h|0)==-1){break i}c=o[o[a+4>>2]+32>>2];b=o[d+16>>2];e=b+o[d>>2]|0;d=o[d+8>>2];ti(c,e,d-b|0,q[c+38>>1]);k:{if(o[a+220>>2]==o[a+216>>2]){break k}b=o[j>>2];if(o[b+4>>2]==o[b>>2]){break k}d=0;while(1){if(bh(a,d)){d=d+3|0;b=o[j>>2];if(d>>>0>2]-o[b>>2]>>2>>>0){continue}break k}break}b=0;break i}if(p[a+308|0]){wi(f)}c=o[a+216>>2];if((c|0)!=o[a+220>>2]){b=0;while(1){e=u(b,144);Wi((e+c|0)+4|0,o[j>>2]);d=o[n>>2];f=e+d|0;c=o[f+132>>2];f=o[f+136>>2];if((c|0)!=(f|0)){while(1){Yi((d+e|0)+4|0,o[c>>2]);d=o[n>>2];c=c+4|0;if((f|0)!=(c|0)){continue}break}}Xi((d+e|0)+4|0);b=b+1|0;c=o[a+216>>2];if(b>>>0<(o[a+220>>2]-c|0)/144>>>0){continue}break}}b=o[a+8>>2];ch(a+184|0,o[b+28>>2]-o[b+24>>2]>>2);d=o[a+216>>2];if((d|0)!=o[a+220>>2]){c=0;while(1){b=u(c,144)+d|0;d=o[b+60>>2]-o[b+56>>2]>>2;e=b+104|0;b=o[a+8>>2];b=o[b+28>>2]-o[b+24>>2]>>2;ch(e,(d|0)<(b|0)?b:d);c=c+1|0;d=o[a+216>>2];if(c>>>0<(o[a+220>>2]-d|0)/144>>>0){continue}break}}b=dh(a,h)}}R=g- -64|0;return b|0}function dh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=R-48|0;R=d;c=o[o[a+4>>2]+44>>2];f=o[a+8>>2];e=o[f>>2];f=o[f+4>>2];o[d+40>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;f=(f-e>>2>>>0)/3|0;h=o[c+96>>2];e=(o[c+100>>2]-h|0)/12|0;a:{if(f>>>0>e>>>0){gh(c+96|0,f-e|0,d+32|0);break a}if(f>>>0>=e>>>0){break a}o[c+100>>2]=h+u(f,12)}b:{if(o[a+216>>2]==o[a+220>>2]){j=o[a+4>>2];c=o[j+44>>2];f=o[c+100>>2];l=o[c+96>>2];if((f|0)!=(l|0)){c=(f-l|0)/12|0;i=c>>>0>1?c:1;k=d+40|0;c=0;while(1){o[k>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;e=d;c:{d:{e:{h=u(c,3);if((h|0)==-1){f=-1;o[d+32>>2]=-1;g=0;break e}f=o[o[o[a+8>>2]>>2]+(h<<2)>>2];o[d+32>>2]=f;g=h+1|0;if((g|0)!=-1){break e}o[d+36>>2]=-1;h=0;break d}o[d+36>>2]=o[o[o[a+8>>2]>>2]+(g<<2)>>2];h=h+2|0;g=-1;if((h|0)==-1){break c}}g=o[o[o[a+8>>2]>>2]+(h<<2)>>2]}o[e+40>>2]=g;e=l+u(c,12)|0;o[e>>2]=f;o[e+4>>2]=o[d+36>>2];o[e+8>>2]=o[d+40>>2];c=c+1|0;if((i|0)!=(c|0)){continue}break}}o[o[j+4>>2]+80>>2]=b;c=1;break b}o[d+40>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;h=o[a+8>>2];b=o[h>>2];c=o[h+4>>2];o[d+24>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;f:{g:{h:{i:{j:{k:{l:{b=c-b|0;if(b){f=b>>2;if(f>>>0>=1073741824){break l}c=yk(b);o[d+16>>2]=c;f=c+(f<<2)|0;o[d+24>>2]=f;ml(c,0,b);o[d+20>>2]=f}if((o[h+28>>2]-o[h+24>>2]|0)<1){break g}while(1){f=o[o[h+24>>2]+(l<<2)>>2];m:{if((f|0)==-1){break m}n:{if(o[o[a+120>>2]+(l>>>3&536870908)>>2]>>>(l&31)&1){break n}b=o[a+220>>2];j=o[a+216>>2];if((b|0)==(j|0)){break n}m=(b-j|0)/144|0;i=((f>>>0)%3|0?-1:2)+f|0;g=0;while(1){n=f<<2;k=j+u(g,144)|0;b=o[n+o[o[k+68>>2]>>2]>>2];o:{if(!(o[o[k+16>>2]+(b>>>3&536870908)>>2]>>>(b&31)&1)){break o}b=f;c=-1;p:{if((i|0)==-1){break p}e=o[o[h+12>>2]+(i<<2)>>2];c=-1;if((e|0)==-1){break p}c=e+ -1|0;if((e>>>0)%3){break p}c=e+2|0}if((b|0)==(c|0)){break o}k=o[k+32>>2];n=o[k+n>>2];while(1){b=0;if((c|0)==-1){break f}if((n|0)!=o[k+(c<<2)>>2]){f=c;break n}b=f;c=((c>>>0)%3|0?-1:2)+c|0;e=-1;q:{if((c|0)==-1){break q}c=o[o[h+12>>2]+(c<<2)>>2];e=-1;if((c|0)==-1){break q}e=c+ -1|0;if((c>>>0)%3){break q}e=c+2|0}c=e;if((b|0)!=(c|0)){continue}break}}g=g+1|0;if(g>>>0>>0){continue}break}}b=o[d+36>>2];c=o[d+32>>2];g=b-c|0;j=g>>2;o[o[d+16>>2]+(f<<2)>>2]=j;i=o[d+40>>2];r:{if(i>>>0>b>>>0){o[b>>2]=f;o[d+36>>2]=b+4;break r}e=j+1|0;if(e>>>0>=1073741824){break k}i=i-c|0;k=i>>1;e=i>>2>>>0<536870911?k>>>0>>0?e:k:1073741823;b=0;s:{if(!e){break s}if(e>>>0>=1073741824){break j}b=yk(e<<2)}j=b+(j<<2)|0;o[j>>2]=f;e=b+(e<<2)|0;j=j+4|0;if((g|0)>=1){ll(b,c,g)}o[d+40>>2]=e;o[d+36>>2]=j;o[d+32>>2]=b;if(!c){break r}jl(c);h=o[a+8>>2]}if((f|0)==-1){break m}b=((f>>>0)%3|0?-1:2)+f|0;if((b|0)==-1){break m}b=o[o[h+12>>2]+(b<<2)>>2];if((b|0)==-1){break m}c=b+((b>>>0)%3|0?-1:2)|0;if((c|0)==-1){break m}e=f;if((c|0)==(f|0)){break m}while(1){b=c;t:{u:{c=o[a+220>>2];g=o[a+216>>2];if((c|0)==(g|0)){break u}j=(c-g|0)/144|0;c=0;while(1){i=o[(g+u(c,144)|0)+32>>2];k=b<<2;if(o[i+k>>2]==o[i+(e<<2)>>2]){c=c+1|0;if(c>>>0>>0){continue}break u}break}c=o[d+36>>2];e=o[d+32>>2];j=c-e|0;i=j>>2;o[k+o[d+16>>2]>>2]=i;k=o[d+40>>2];if(k>>>0>c>>>0){o[c>>2]=b;o[d+36>>2]=c+4;break t}g=i+1|0;if(g>>>0>=1073741824){break i}k=k-e|0;m=k>>1;g=k>>2>>>0<536870911?m>>>0>>0?g:m:1073741823;c=0;v:{if(!g){break v}if(g>>>0>=1073741824){break h}c=yk(g<<2)}i=c+(i<<2)|0;o[i>>2]=b;g=c+(g<<2)|0;i=i+4|0;if((j|0)>=1){ll(c,e,j)}o[d+40>>2]=g;o[d+36>>2]=i;o[d+32>>2]=c;if(!e){break t}jl(e);h=o[a+8>>2];break t}c=o[d+16>>2];o[c+(b<<2)>>2]=o[c+(e<<2)>>2]}if((b|0)==-1){break m}c=b+((b>>>0)%3|0?-1:2)|0;if((c|0)==-1){break m}c=o[o[h+12>>2]+(c<<2)>>2];if((c|0)==-1){break m}c=c+((c>>>0)%3|0?-1:2)|0;if((c|0)==-1){break m}e=b;if((c|0)!=(f|0)){continue}break}}l=l+1|0;if((l|0)>2]-o[h+24>>2]>>2){continue}break}break g}Nk();D()}Nk();D()}db(8832);D()}Nk();D()}db(8832);D()}f=o[a+4>>2];a=o[f+44>>2];b=o[a+100>>2];a=o[a+96>>2];if((b|0)!=(a|0)){b=(b-a|0)/12|0;e=b>>>0>1?b:1;c=0;h=o[d+16>>2];while(1){l=d+8|0;g=u(c,12);b=g+h|0;o[l>>2]=o[b+8>>2];j=o[b+4>>2];i=o[b>>2];o[d>>2]=i;o[d+4>>2]=j;b=a+g|0;o[b>>2]=i;o[b+4>>2]=o[d+4>>2];o[b+8>>2]=o[l>>2];c=c+1|0;if((e|0)!=(c|0)){continue}break}}o[o[f+4>>2]+80>>2]=o[d+36>>2]-o[d+32>>2]>>2;b=1}c=b;a=o[d+16>>2];if(a){o[d+20>>2]=a;jl(a)}a=o[d+32>>2];if(!a){break b}o[d+36>>2]=a;jl(a)}R=d+48|0;return c}function Re(a,b,c,d){var e=0,f=0,g=0,h=0,i=v(0),j=0,k=0;a:{b:{if(!d){break b}e=o[a+28>>2]+ -1|0;if(e>>>0>10){break b}c:{d:{e:{switch(e-1|0){default:e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=o[o[a>>2]>>2];e=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;h=m[b|0];o[e>>2]=h;o[e+4>>2]=h>>31;b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 0:e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=o[o[a>>2]>>2];e=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;o[e>>2]=p[b|0];o[e+4>>2]=0;b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 1:e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=o[o[a>>2]>>2];e=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;h=n[b>>1];o[e>>2]=h;o[e+4>>2]=h>>31;b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 2:e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=o[o[a>>2]>>2];e=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;o[e>>2]=q[b>>1];o[e+4>>2]=0;b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 3:e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=o[o[a>>2]>>2];e=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;h=o[b>>2];o[e>>2]=h;o[e+4>>2]=h>>31;b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 4:e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=o[o[a>>2]>>2];e=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;o[e>>2]=o[b>>2];o[e+4>>2]=0;b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 5:e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=o[o[a>>2]>>2];e=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=g+e|0;while(1){h=o[b+4>>2];e=(f<<3)+d|0;o[e>>2]=o[b>>2];o[e+4>>2]=h;b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 6:e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=o[o[a>>2]>>2];e=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=g+e|0;while(1){h=o[b+4>>2];e=(f<<3)+d|0;o[e>>2]=o[b>>2];o[e+4>>2]=h;b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 7:e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break c}g=o[o[a>>2]>>2];e=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;g=e;i=s[b>>2];f:{if(v(w(i))=v(1)?i>v(0)?~~v(y(v(A(v(i/v(4294967296)))),v(4294967296)))>>>0:~~v(B(v(v(i-v(~~i>>>0>>>0))/v(4294967296))))>>>0:0;k=~~i>>>0;break f}h=-2147483648;k=0}o[g>>2]=k;o[e+4>>2]=h;b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break c;case 8:e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break d}g=o[o[a>>2]>>2];e=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;g=e;j=t[b>>3];g:{if(w(j)<0x8000000000000000){h=w(j)>=1?j>0?~~y(A(j/4294967296),4294967295)>>>0:~~B((j- +(~~j>>>0>>>0))/4294967296)>>>0:0;k=~~j>>>0;break g}h=-2147483648;k=0}o[g>>2]=k;o[e+4>>2]=h;b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break d;case 9:break e}}e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=o[o[a>>2]>>2];e=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;o[e>>2]=p[b|0];o[e+4>>2]=0;b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}ml((e<<3)+d|0,0,c-e<<3);break b}if((e|0)>=(c|0)){break b}break a}if((e|0)>=(c|0)){break b}ml((e<<3)+d|0,0,c-e<<3)}return}ml((e<<3)+d|0,0,c-e<<3)}function Yh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,s=0,t=0,u=0;c=R-32|0;R=c;a:{if(!Zh(1,c+28|0,o[a+32>>2])){break a}if(!Zh(1,c+24|0,o[a+32>>2])){break a}n=o[c+28>>2];if(n>>>0>1431655765){break a}f=Ol(n,0,3,0);b=T;u=o[c+24>>2];if(!b&f>>>0>>0|b>>>0<0){break a}d=o[a+32>>2];g=o[d+16>>2];e=o[d+12>>2];b=o[d+20>>2];if((e|0)<(b|0)?1:(e|0)<=(b|0)?r[d+8>>2]>g>>>0?0:1:0){break a}h=p[g+o[d>>2]|0];f=b;k=g+1|0;if(k>>>0<1){f=f+1|0}o[d+16>>2]=k;o[d+20>>2]=f;b:{if(!h){if(!_h(a,n)){break a}break b}i=d+16|0;c:{if(u>>>0<=255){if(!n){break b}m=c+16|0;o[m>>2]=0;o[c+8>>2]=0;o[c+12>>2]=0;l=o[d+8>>2];e=o[d+12>>2];b=e;if((b|0)<(f|0)?1:(b|0)<=(f|0)?l>>>0>k>>>0?0:1:0){break c}while(1){g=o[d>>2];j=p[g+k|0];b=f;h=k+1|0;if(h>>>0<1){b=b+1|0}o[d+16>>2]=h;o[d+20>>2]=b;o[c+8>>2]=j;if((e|0)<(b|0)?1:(e|0)<=(b|0)?l>>>0>h>>>0?0:1:0){break c}j=p[g+h|0];b=f;d=k+2|0;if(d>>>0<2){b=b+1|0}h=i;o[h>>2]=d;o[h+4>>2]=b;o[c+12>>2]=j;if((e|0)<(b|0)?1:(e|0)<=(b|0)?l>>>0>d>>>0?0:1:0){break c}b=p[d+g|0];e=k+3|0;if(e>>>0<3){f=f+1|0}o[i>>2]=e;o[i+4>>2]=f;o[c+16>>2]=b;$h(o[a+44>>2]+96|0,c+8|0);s=s+1|0;if((s|0)==(n|0)){break b}d=o[a+32>>2];b=d;k=o[b+16>>2];f=o[b+20>>2];o[m>>2]=0;o[c+8>>2]=0;o[c+12>>2]=0;i=b+16|0;l=o[b+8>>2];e=o[b+12>>2];b=e;if((b|0)>(f|0)?1:(b|0)>=(f|0)?l>>>0<=k>>>0?0:1:0){continue}break}break c}if(u>>>0<=65535){if(!n){break b}t=c+16|0;o[t>>2]=0;o[c+8>>2]=0;o[c+12>>2]=0;h=o[d+12>>2];j=h;e=g+3|0;if(e>>>0<3){b=b+1|0}m=o[d+8>>2];l=e;e=b;if((j|0)<(b|0)?1:(j|0)<=(b|0)?m>>>0>=l>>>0?0:1:0){break c}while(1){g=o[d>>2];b=g+k|0;b=p[b|0]|p[b+1|0]<<8;o[d+16>>2]=l;o[d+20>>2]=e;o[c+8>>2]=b;e=h;b=f;d=k+4|0;if(d>>>0<4){b=b+1|0}j=d;d=b;if((e|0)<(b|0)?1:(e|0)<=(b|0)?m>>>0>=j>>>0?0:1:0){break c}b=g+l|0;b=p[b|0]|p[b+1|0]<<8;o[i>>2]=j;o[i+4>>2]=d;o[c+12>>2]=b;b=f;f=k+6|0;if(f>>>0<6){b=b+1|0}e=f;f=b;if((h|0)<(b|0)?1:(h|0)<=(b|0)?m>>>0>=e>>>0?0:1:0){break c}b=g+j|0;b=p[b|0]|p[b+1|0]<<8;o[i>>2]=e;o[i+4>>2]=f;o[c+16>>2]=b;$h(o[a+44>>2]+96|0,c+8|0);s=s+1|0;if((s|0)==(n|0)){break b}d=o[a+32>>2];b=d;k=o[b+16>>2];f=o[b+20>>2];o[t>>2]=0;o[c+8>>2]=0;o[c+12>>2]=0;i=b+16|0;g=o[b+12>>2];h=g;m=o[b+8>>2];j=m;b=f;e=k+2|0;if(e>>>0<2){b=b+1|0}l=e;e=b;if((g|0)>(b|0)?1:(g|0)>=(b|0)?j>>>0>>0?0:1:0){continue}break}break c}d:{if(r[o[a+44>>2]+80>>2]>2097151){break d}e=q[a+36>>1];if((e<<24|e<<8&16711680)>>>16>>>0<514){break d}if(!n){break b}i=0;f=c+16|0;o[f>>2]=0;o[c+8>>2]=0;o[c+12>>2]=0;if(!Zh(1,c+4|0,d)){break c}while(1){o[c+8>>2]=o[c+4>>2];if(!Zh(1,c+4|0,o[a+32>>2])){break c}o[c+12>>2]=o[c+4>>2];if(!Zh(1,c+4|0,o[a+32>>2])){break c}o[c+16>>2]=o[c+4>>2];$h(o[a+44>>2]+96|0,c+8|0);i=i+1|0;if((n|0)==(i|0)){break b}b=o[a+32>>2];o[f>>2]=0;o[c+8>>2]=0;o[c+12>>2]=0;if(Zh(1,c+4|0,b)){continue}break}break c}if(!n){break b}t=c+16|0;o[t>>2]=0;o[c+8>>2]=0;o[c+12>>2]=0;h=o[d+12>>2];j=h;e=g+5|0;if(e>>>0<5){b=b+1|0}m=o[d+8>>2];l=e;e=b;if((j|0)<(b|0)?1:(j|0)<=(b|0)?m>>>0>=l>>>0?0:1:0){break c}while(1){g=o[d>>2];b=g+k|0;b=p[b|0]|p[b+1|0]<<8|(p[b+2|0]<<16|p[b+3|0]<<24);o[d+16>>2]=l;o[d+20>>2]=e;o[c+8>>2]=b;e=h;b=f;d=k+8|0;if(d>>>0<8){b=b+1|0}j=d;d=b;if((e|0)<(b|0)?1:(e|0)<=(b|0)?m>>>0>=j>>>0?0:1:0){break c}b=g+l|0;b=p[b|0]|p[b+1|0]<<8|(p[b+2|0]<<16|p[b+3|0]<<24);o[i>>2]=j;o[i+4>>2]=d;o[c+12>>2]=b;b=k+12|0;if(b>>>0<12){f=f+1|0}e=b;b=f;if((h|0)<(b|0)?1:(h|0)<=(b|0)?m>>>0>=e>>>0?0:1:0){break c}f=g+j|0;f=p[f|0]|p[f+1|0]<<8|(p[f+2|0]<<16|p[f+3|0]<<24);o[i>>2]=e;o[i+4>>2]=b;o[c+16>>2]=f;$h(o[a+44>>2]+96|0,c+8|0);s=s+1|0;if((s|0)==(n|0)){break b}d=o[a+32>>2];b=d;k=o[b+16>>2];f=o[b+20>>2];o[t>>2]=0;o[c+8>>2]=0;o[c+12>>2]=0;i=b+16|0;g=o[b+12>>2];h=g;m=o[b+8>>2];j=m;b=f;e=k+4|0;if(e>>>0<4){b=b+1|0}l=e;e=b;if((g|0)>(b|0)?1:(g|0)>=(b|0)?j>>>0>>0?0:1:0){continue}break}}i=0;break a}o[o[a+4>>2]+80>>2]=u;i=1}R=c+32|0;return i|0}function Dh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0;a:{b:{c:{d:{e:{f:{g:{if(o[a+92>>2]==o[a+88>>2]){break g}d=o[a+52>>2];e=o[a+56>>2];h:{if((d|0)!=(e|0)){o[d>>2]=b;o[a+52>>2]=d+4;break h}i=o[a+48>>2];h=d-i|0;f=h>>2;g=f+1|0;if(g>>>0>=1073741824){break a}c=e-i|0;e=c>>1;c=c>>2>>>0<536870911?e>>>0>>0?g:e:1073741823;d=0;i:{if(!c){break i}if(c>>>0>=1073741824){break b}d=yk(c<<2)}e=d+(f<<2)|0;o[e>>2]=b;c=d+(c<<2)|0;e=e+4|0;if((h|0)>=1){ll(d,i,h)}o[a+56>>2]=c;o[a+52>>2]=e;o[a+48>>2]=d;if(!i){break h}jl(i)}o[a+84>>2]=0;e=-1;d=-1;j:{if((b|0)==-1){break j}f=o[a+4>>2];c=b+1|0;c=(c>>>0)%3|0?c:b+ -2|0;if((c|0)!=-1){e=o[o[f>>2]+(c<<2)>>2]}c=((b>>>0)%3|0?-1:2)+b|0;if((c|0)==-1){break j}d=o[o[f>>2]+(c<<2)>>2]}c=o[a+36>>2];h=c+(e>>>3&536870908)|0;g=o[h>>2];f=1<<(e&31);if(!(g&f)){o[h>>2]=f|g;f=a+8|0;if((b|0)!=-1){c=b+1|0;c=(c>>>0)%3|0?c:b+ -2|0}else{c=-1}Eh(f,e,c);c=o[a+36>>2]}f=(d>>>3&536870908)+c|0;c=o[f>>2];e=1<<(d&31);if(!(c&e)){o[f>>2]=c|e;e=a+8|0;c=-1;k:{if((b|0)==-1){break k}c=b+ -1|0;if((b>>>0)%3){break k}c=b+2|0}Eh(e,d,c)}e=-1;e=(b|0)!=-1?o[o[o[a+4>>2]>>2]+(b<<2)>>2]:e;f=o[a+36>>2]+(e>>>3&536870908)|0;c=o[f>>2];d=1<<(e&31);if(!(c&d)){o[f>>2]=c|d;Eh(a+8|0,e,b)}c=o[a+84>>2];if((c|0)>2){break g}p=a+8|0;while(1){b=u(c,12)+a|0;e=b+52|0;d=o[e>>2];if((d|0)==o[b+48>>2]){c=c+1|0;if((c|0)!=3){continue}break g}d=d+ -4|0;b=o[d>>2];o[e>>2]=d;o[a+84>>2]=c;if((b|0)==-1){break g}e=o[a+24>>2];d=(b>>>0)/3|0;l:{if(o[e+(d>>>3&268435452)>>2]>>>(d&31)&1){break l}m:{while(1){g=(b>>>0)/3|0;d=(g>>>3&268435452)+e|0;o[d>>2]=o[d>>2]|1<<(g&31);e=-1;e=(b|0)!=-1?o[o[o[a+4>>2]>>2]+(b<<2)>>2]:e;f=o[a+36>>2]+(e>>>3&536870908)|0;c=o[f>>2];d=1<<(e&31);if(!(c&d)){o[f>>2]=c|d;Eh(p,e,b)}if((b|0)==-1){break m}h=o[a+4>>2];d=-1;e=-1;c=b+1|0;c=(c>>>0)%3|0?c:b+ -2|0;if((c|0)!=-1){e=o[o[h+12>>2]+(c<<2)>>2]}b=(b-u(g,3)|0?-1:2)+b|0;if((b|0)!=-1){d=o[o[h+12>>2]+(b<<2)>>2]}g=(d|0)==-1;f=(d>>>0)/3|0;c=(e>>>0)/3|0;n:{o:{p:{q:{b=(e|0)==-1;if(!b){b=b?-1:c;b=o[o[a+24>>2]+(b>>>3&536870908)>>2]&1<<(b&31);if(g){break q}n=(b|0)!=0;break p}n=1;if(!g){break p}break m}if(!b){break o}break m}b=g?-1:f;r:{if(o[o[a+24>>2]+(b>>>3&536870908)>>2]>>>(b&31)&1){break r}b=0;c=o[o[h>>2]+(d<<2)>>2];if(!(o[o[a+36>>2]+(c>>>3&536870908)>>2]>>>(c&31)&1)){b=o[a+88>>2]+(c<<2)|0;c=o[b>>2];o[b>>2]=c+1;b=(c|0)<1?2:1}if(!(!n|(b|0)>o[a+84>>2])){b=d;e=o[a+24>>2];continue}c=u(b,12)+a|0;j=c+52|0;g=o[j>>2];m=c+56|0;f=o[m>>2];s:{if((g|0)!=(f|0)){o[g>>2]=d;o[j>>2]=g+4;break s}i=c+48|0;h=o[i>>2];k=g-h|0;c=k>>2;l=c+1|0;if(l>>>0>=1073741824){break f}q=c<<2;g=f-h|0;f=g>>1;f=g>>2>>>0<536870911?f>>>0>>0?l:f:1073741823;c=0;t:{if(!f){break t}if(f>>>0>=1073741824){break e}c=yk(f<<2)}g=q+c|0;o[g>>2]=d;f=c+(f<<2)|0;d=g+4|0;if((k|0)>=1){ll(c,h,k)}o[i>>2]=c;o[j>>2]=d;o[m>>2]=f;if(!h){break s}jl(h)}if(o[a+84>>2]<=(b|0)){break r}o[a+84>>2]=b}if(n){break m}b=-1;if((e|0)==-1){break n}}b=o[o[o[a+4>>2]>>2]+(e<<2)>>2]}d=0;if(!(o[o[a+36>>2]+(b>>>3&536870908)>>2]>>>(b&31)&1)){b=o[a+88>>2]+(b<<2)|0;d=o[b>>2];o[b>>2]=d+1;d=(d|0)<1?2:1}if((d|0)<=o[a+84>>2]){b=e;e=o[a+24>>2];continue}break}b=u(d,12)+a|0;k=b+52|0;f=o[k>>2];i=b+56|0;c=o[i>>2];u:{if((f|0)!=(c|0)){o[f>>2]=e;o[k>>2]=f+4;break u}h=b+48|0;j=o[h>>2];l=f-j|0;g=l>>2;m=g+1|0;if(m>>>0>=1073741824){break d}f=c-j|0;c=f>>1;c=f>>2>>>0<536870911?c>>>0>>0?m:c:1073741823;b=0;v:{if(!c){break v}if(c>>>0>=1073741824){break c}b=yk(c<<2)}f=b+(g<<2)|0;o[f>>2]=e;c=b+(c<<2)|0;e=f+4|0;if((l|0)>=1){ll(b,j,l)}o[h>>2]=b;o[k>>2]=e;o[i>>2]=c;if(!j){break u}jl(j)}c=o[a+84>>2];if((c|0)<=(d|0)){break l}o[a+84>>2]=d;c=d;break l}c=o[a+84>>2]}if((c|0)<3){continue}break}}return 1}Nk();D()}db(8832);D()}Nk();D()}db(8832);D()}db(8832);D()}Nk();D()}function jh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,s=0,t=0,v=0;g=R+ -64|0;R=g;o[a+132>>2]=0;if(o[a+148>>2]){b=o[a+144>>2];if(b){while(1){c=o[b>>2];jl(b);b=c;if(b){continue}break}}o[a+144>>2]=0;c=o[a+140>>2];if(c){b=0;while(1){o[o[a+136>>2]+(b<<2)>>2]=0;b=b+1|0;if((c|0)!=(b|0)){continue}break}}o[a+148>>2]=0}a:{if(!Xg(1,g+60|0,o[o[a+4>>2]+32>>2])){break a}o[a+156>>2]=o[g+60>>2];if(!Xg(1,g+56|0,o[o[a+4>>2]+32>>2])){break a}e=o[g+56>>2];if(e>>>0>1431655765|r[a+156>>2]>u(e,3)>>>0){break a}b=o[o[a+4>>2]+32>>2];f=o[b+16>>2];h=o[b+12>>2];c=o[b+20>>2];if((h|0)<(c|0)?1:(h|0)<=(c|0)?r[b+8>>2]>f>>>0?0:1:0){break a}j=p[f+o[b>>2]|0];f=f+1|0;if(f>>>0<1){c=c+1|0}o[b+16>>2]=f;o[b+20>>2]=c;if(!Xg(1,g+52|0,b)){break a}f=o[g+52>>2];if(e>>>0>>0|e>>>0>f+((f>>>0)/3|0)>>>0){break a}if(!Xg(1,g+48|0,o[o[a+4>>2]+32>>2])){break a}k=o[g+48>>2];if(k>>>0>f>>>0){break a}o[a+28>>2]=o[a+24>>2];c=yk(88);Ci(c);b=o[a+8>>2];o[a+8>>2]=c;h=a+8|0;if(b){za(h,b);if(!o[h>>2]){break a}}d=o[a+160>>2];o[a+164>>2]=d;b:{c:{d:{e:{f:{if(o[a+168>>2]-d>>2>>>0>=e>>>0){break f}if(e>>>0>=1073741824){break e}c=e<<2;b=yk(c);o[a+164>>2]=b;o[a+160>>2]=b;o[a+168>>2]=b+c;if(!d){break f}jl(d)}d=o[a+172>>2];o[a+176>>2]=d;g:{if(o[a+180>>2]-d>>2>>>0>=e>>>0){break g}if(e>>>0>=1073741824){break d}c=e<<2;b=yk(c);o[a+176>>2]=b;o[a+172>>2]=b;o[a+180>>2]=b+c;if(!d){break g}jl(d)}o[a+92>>2]=-1;o[a+84>>2]=-1;o[a+88>>2]=-1;o[a+40>>2]=o[a+36>>2];o[a- -64>>2]=0;o[a+52>>2]=o[a+48>>2];o[a+76>>2]=o[a+72>>2];n=a+216|0;c=o[a+220>>2];d=o[a+216>>2];if((c|0)==(d|0)){break c}while(1){b=o[c+ -12>>2];if(b){o[c+ -8>>2]=b;jl(b)}b=o[c+ -28>>2];if(b){o[c+ -24>>2]=b;jl(b)}b=c+ -144|0;i=o[c+ -40>>2];if(i){o[c+ -36>>2]=i;jl(i)}Yg(c+ -140|0);c=b;if((d|0)!=(b|0)){continue}break}b=o[n>>2];break b}db(8832);D()}db(8832);D()}b=d}o[a+220>>2]=d;c=(d-b|0)/144|0;h:{if(c>>>0>>0){Zg(n,j-c|0);break h}if(c>>>0<=j>>>0){break h}c=b+u(j,144)|0;if((c|0)!=(d|0)){while(1){b=o[d+ -12>>2];if(b){o[d+ -8>>2]=b;jl(b)}b=o[d+ -28>>2];if(b){o[d+ -24>>2]=b;jl(b)}b=d+ -144|0;i=o[d+ -40>>2];if(i){o[d+ -36>>2]=i;jl(i)}Yg(d+ -140|0);d=b;if((b|0)!=(c|0)){continue}break}}o[a+220>>2]=c}d=0;if(!Mi(o[a+8>>2],e,o[a+156>>2]+k|0)){break a}b=o[a+156>>2];m[g+8|0]=1;eb(a+120|0,b+k|0,g+8|0);if((_g(a,o[o[a+4>>2]+32>>2])|0)==-1){break a}o[a+376>>2]=a;i=a+232|0;b=o[(l[o[o[a>>2]+32>>2]](a)|0)+32>>2];s=o[b>>2]+o[b+16>>2]|0;e=o[(l[o[o[a>>2]+32>>2]](a)|0)+32>>2];b=o[e+8>>2];c=o[e+16>>2];ti(i,s,b-c|0,q[o[(l[o[o[a>>2]+32>>2]](a)|0)+32>>2]+38>>1]);t=a,v=l[o[o[a>>2]+36>>2]](a)|0,o[t+380>>2]=v;o[a+372>>2]=j;o[a+384>>2]=o[a+156>>2]+k;b=si(g+8|0);i:{if(!kh(i,b)){break i}j=lh(a,f);if((j|0)==-1){break i}e=o[o[a+4>>2]+32>>2];c=o[b+16>>2];f=c+o[b>>2]|0;b=o[b+8>>2];ti(e,f,b-c|0,q[e+38>>1]);j:{if(o[a+220>>2]==o[a+216>>2]){break j}b=o[h>>2];if(o[b+4>>2]==o[b>>2]){break j}b=0;while(1){if(bh(a,b)){b=b+3|0;c=o[h>>2];if(b>>>0>2]-o[c>>2]>>2>>>0){continue}break j}break}break i}if(p[a+308|0]){wi(a+272|0)}b=o[a+216>>2];if((b|0)!=o[a+220>>2]){while(1){e=u(d,144);Wi((e+b|0)+4|0,o[h>>2]);c=o[n>>2];f=e+c|0;b=o[f+132>>2];f=o[f+136>>2];if((b|0)!=(f|0)){while(1){Yi((c+e|0)+4|0,o[b>>2]);c=o[n>>2];b=b+4|0;if((f|0)!=(b|0)){continue}break}}Xi((c+e|0)+4|0);d=d+1|0;b=o[a+216>>2];if(d>>>0<(o[a+220>>2]-b|0)/144>>>0){continue}break}}d=o[a+8>>2];ch(a+184|0,o[d+28>>2]-o[d+24>>2]>>2);c=o[a+216>>2];if((c|0)!=o[a+220>>2]){b=0;while(1){d=u(b,144)+c|0;c=o[d+60>>2]-o[d+56>>2]>>2;h=d+104|0;d=o[a+8>>2];d=o[d+28>>2]-o[d+24>>2]>>2;ch(h,(c|0)<(d|0)?d:c);b=b+1|0;c=o[a+216>>2];if(b>>>0<(o[a+220>>2]-c|0)/144>>>0){continue}break}}d=dh(a,j)}}R=g- -64|0;return d|0}function Ga(a,b,c,d){var e=0,f=0,g=v(0),h=0,i=0;a:{b:{if(!d){break b}e=o[a+28>>2]+ -1|0;if(e>>>0>10){break b}c:{switch(e-1|0){default:i=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;h=p[a+32|0];while(1){g=v(m[b|0]);s[(f<<2)+d>>2]=h?v(g/v(127)):g;b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 0:i=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;h=p[a+32|0];while(1){g=v(p[b|0]);s[(f<<2)+d>>2]=h?v(g/v(255)):g;b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 1:i=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;h=p[a+32|0];while(1){g=v(n[b>>1]);s[(f<<2)+d>>2]=h?v(g/v(32767)):g;b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 2:i=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;h=p[a+32|0];while(1){g=v(q[b>>1]);s[(f<<2)+d>>2]=h?v(g/v(65535)):g;b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 3:i=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;h=p[a+32|0];while(1){g=v(o[b>>2]);s[(f<<2)+d>>2]=h?v(g*v(4.656612873077393e-10)):g;b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 4:i=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;h=p[a+32|0];while(1){g=v(r[b>>2]);s[(f<<2)+d>>2]=h?v(g*v(2.3283064365386963e-10)):g;b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 5:i=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;h=p[a+32|0];while(1){g=v(+r[b>>2]+4294967296*+o[b+4>>2]);s[(f<<2)+d>>2]=h?v(g*v(1.0842021724855044e-19)):g;b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 6:i=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;h=p[a+32|0];while(1){g=v(+r[b>>2]+4294967296*+r[b+4>>2]);s[(f<<2)+d>>2]=h?v(g*v(5.421010862427522e-20)):g;b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 7:i=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 8:i=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){s[(f<<2)+d>>2]=t[b>>3];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 9:break c}}i=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){s[(f<<2)+d>>2]=p[b|0]?v(1):v(0);b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}ml((e<<2)+d|0,0,c-e<<2)}return i}ml((e<<2)+d|0,0,c-e<<2);return 1}function jf(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0,F=0,G=0;g=R-80|0;R=g;e=-1;f=-1;a:{if((b|0)==-1){break a}h=((b>>>0)%3|0?-1:2)+b|0;i=o[a+32>>2];k=b+1|0;b=(k>>>0)%3|0?k:b+ -2|0;if((b|0)!=-1){e=o[o[i>>2]+(b<<2)>>2]}if((h|0)==-1){break a}f=o[o[i>>2]+(h<<2)>>2]}h=o[a+36>>2];b=o[h>>2];h=o[h+4>>2]-b>>2;b:{c:{d:{e:{if(!(h>>>0<=e>>>0|h>>>0<=f>>>0)){f:{g:{q=o[b+(e<<2)>>2];s=(q|0)>=(d|0);if(s){break g}f=o[b+(f<<2)>>2];if((f|0)>=(d|0)){break g}b=f<<3;x=o[(b|4)+c>>2];e=q<<3;k=o[(e|4)+c>>2];u=o[b+c>>2];w=o[c+e>>2];if(!((u|0)!=(w|0)|(k|0)!=(x|0))){o[a+8>>2]=w;o[a+12>>2]=k;break f}b=o[o[a+4>>2]+(d<<2)>>2];o[g+72>>2]=0;o[g+76>>2]=0;e=g- -64|0;o[e>>2]=0;o[e+4>>2]=0;o[g+56>>2]=0;o[g+60>>2]=0;e=o[a>>2];if(!p[e+84|0]){b=o[o[e+68>>2]+(b<<2)>>2]}Re(e,b,m[e+24|0],g+56|0);b=o[o[a+4>>2]+(q<<2)>>2];o[g+48>>2]=0;o[g+52>>2]=0;o[g+40>>2]=0;o[g+44>>2]=0;o[g+32>>2]=0;o[g+36>>2]=0;e=o[a>>2];if(!p[e+84|0]){b=o[o[e+68>>2]+(b<<2)>>2]}Re(e,b,m[e+24|0],g+32|0);b=o[o[a+4>>2]+(f<<2)>>2];o[g+24>>2]=0;o[g+28>>2]=0;o[g+16>>2]=0;o[g+20>>2]=0;o[g+8>>2]=0;o[g+12>>2]=0;e=o[a>>2];if(!p[e+84|0]){b=o[o[e+68>>2]+(b<<2)>>2]}Re(e,b,m[e+24|0],g+8|0);y=o[g+44>>2];b=o[g+16>>2];j=o[g+40>>2];e=j;f=o[g+20>>2]-(y+(b>>>0>>0)|0)|0;A=b-e|0;b=Ol(A,f,A,f);e=T;n=b;z=o[g+36>>2];b=o[g+8>>2];l=o[g+32>>2];i=l;h=o[g+12>>2]-(z+(b>>>0>>0)|0)|0;B=b-i|0;i=Ol(B,h,B,h);b=n+i|0;e=T+e|0;e=b>>>0>>0?e+1|0:e;t=b;E=o[g+52>>2];b=o[g+24>>2];n=o[g+48>>2];i=n;r=o[g+28>>2]-(E+(b>>>0>>0)|0)|0;C=b-i|0;i=Ol(C,r,C,r);b=t+i|0;e=T+e|0;v=b;i=b>>>0>>0?e+1|0:e;if(!(b|i)){break g}d=1;b=0;e=o[g+64>>2];c=o[g+68>>2]-((e>>>0>>0)+y|0)|0;e=e-j|0;q=e;s=c;c=Ol(A,f,e,c);e=T;t=c;j=o[g+56>>2];c=j-l|0;y=o[g+60>>2]-((j>>>0>>0)+z|0)|0;l=Ol(c,y,B,h);j=t+l|0;e=T+e|0;e=j>>>0>>0?e+1|0:e;t=j;j=o[g+72>>2];l=j-n|0;z=o[g+76>>2]-((j>>>0>>0)+E|0)|0;n=Ol(l,z,C,r);j=t+n|0;e=T+e|0;e=j>>>0>>0?e+1|0:e;n=j;j=e;f=Pl(Ol(n,e,A,f),T,v,i);s=s-(T+(q>>>0>>0)|0)|0;f=q-f|0;f=Ol(f,s,f,s);q=T;t=f;e=Pl(Ol(B,h,n,e),T,v,i);f=y-(T+(c>>>0>>0)|0)|0;c=c-e|0;f=Ol(c,f,c,f);c=t+f|0;e=T+q|0;e=c>>>0>>0?e+1|0:e;h=c;c=Pl(Ol(n,j,C,r),T,v,i);f=z-(T+(l>>>0>>0)|0)|0;c=l-c|0;f=Ol(c,f,c,f);c=h+f|0;e=T+e|0;f=Ol(c,c>>>0>>0?e+1|0:e,v,i);c=T;h=c;if(!c&f>>>0<=1|c>>>0<0){break e}r=f;c=h;while(1){e=b<<1|d>>>31;d=d<<1;b=e;l=!c&r>>>0>7|c>>>0>0;r=(c&3)<<30|r>>>2;c=c>>>2|0;if(l){continue}break}break d}e=a;if(s){if((d|0)<=0){o[a+8>>2]=0;o[a+12>>2]=0;break f}b=(d<<1)+ -2|0}else{b=q<<1}b=(b<<2)+c|0;o[e+8>>2]=o[b>>2];o[a+12>>2]=o[b+4>>2]}c=1;break b}Ok();D()}d=f;b=h;if(f-1){break c}}while(1){c=Ql(f,h,d,b)+d|0;e=b+T|0;e=c>>>0>>0?e+1|0:e;d=(e&1)<<31|c>>>1;b=e>>>1|0;c=Ol(d,b,d,b);e=T;if((h|0)==(e|0)&c>>>0>f>>>0|e>>>0>h>>>0){continue}break}}e=o[a+20>>2];c=0;if(!e){break b}h=e+ -1|0;r=o[o[a+16>>2]+(h>>>3&536870908)>>2];o[a+20>>2]=h;c=x;e=k;l=c-e|0;k=e>>31;x=(c>>31)-(k+(c>>>0>>0)|0)|0;c=Ol(n,j,l,x);f=T;k=Ol(e,k,v,i);c=k+c|0;e=T+f|0;e=c>>>0>>0?e+1|0:e;t=c;c=u;f=w;q=c-f|0;w=f>>31;k=(c>>31)-(w+(c>>>0>>0)|0)|0;c=Ol(d,b,q,k);u=c;c=r>>>(h&31)&1;s=c?0-u|0:u;h=t+s|0;r=e;e=T;e=r+(c?0-(e+(0>>0)|0)|0:e)|0;F=a,G=Pl(h,h>>>0>>0?e+1|0:e,v,i),o[F+12>>2]=G;e=Ol(n,j,q,k);h=T;u=a;f=Ol(f,w,v,i);a=f+e|0;e=T+h|0;e=a>>>0>>0?e+1|0:e;j=a;a=Ol(d,b,l,x);d=c?a:0-a|0;b=j+d|0;j=e;e=T;a=j+(c?e:0-((0>>0)+e|0)|0)|0;F=u,G=Pl(b,b>>>0>>0?a+1|0:a,v,i),o[F+8>>2]=G;c=1}R=g+80|0;return c}function Qe(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0,F=0,G=0;g=R-80|0;R=g;f=-1;e=-1;a:{if((b|0)==-1){break a}e=b+1|0;f=(e>>>0)%3|0?e:b+ -2|0;e=b+ -1|0;if((b>>>0)%3){break a}e=b+2|0}h=o[a+36>>2];b=o[h>>2];b:{c:{d:{e:{f:{h=o[h+4>>2]-b>>2;i=f<<2;f=o[o[a+32>>2]+28>>2];j=o[i+f>>2];if(h>>>0<=j>>>0){break f}e=o[f+(e<<2)>>2];if(h>>>0<=e>>>0){break f}g:{h:{n=o[b+(j<<2)>>2];s=(n|0)>=(d|0);if(s){break h}f=o[b+(e<<2)>>2];if((f|0)>=(d|0)){break h}b=f<<3;x=o[(b|4)+c>>2];e=n<<3;q=o[(e|4)+c>>2];u=o[b+c>>2];w=o[c+e>>2];if(!((u|0)!=(w|0)|(q|0)!=(x|0))){o[a+8>>2]=w;o[a+12>>2]=q;break g}b=o[o[a+4>>2]+(d<<2)>>2];o[g+72>>2]=0;o[g+76>>2]=0;e=g- -64|0;o[e>>2]=0;o[e+4>>2]=0;o[g+56>>2]=0;o[g+60>>2]=0;e=o[a>>2];if(!p[e+84|0]){b=o[o[e+68>>2]+(b<<2)>>2]}Re(e,b,m[e+24|0],g+56|0);b=o[o[a+4>>2]+(n<<2)>>2];o[g+48>>2]=0;o[g+52>>2]=0;o[g+40>>2]=0;o[g+44>>2]=0;o[g+32>>2]=0;o[g+36>>2]=0;e=o[a>>2];if(!p[e+84|0]){b=o[o[e+68>>2]+(b<<2)>>2]}Re(e,b,m[e+24|0],g+32|0);b=o[o[a+4>>2]+(f<<2)>>2];o[g+24>>2]=0;o[g+28>>2]=0;o[g+16>>2]=0;o[g+20>>2]=0;o[g+8>>2]=0;o[g+12>>2]=0;e=o[a>>2];if(!p[e+84|0]){b=o[o[e+68>>2]+(b<<2)>>2]}Re(e,b,m[e+24|0],g+8|0);y=o[g+44>>2];b=o[g+16>>2];i=o[g+40>>2];e=i;f=o[g+20>>2]-(y+(b>>>0>>0)|0)|0;A=b-e|0;b=Ol(A,f,A,f);e=T;l=b;z=o[g+36>>2];b=o[g+8>>2];k=o[g+32>>2];j=k;h=o[g+12>>2]-(z+(b>>>0>>0)|0)|0;B=b-j|0;j=Ol(B,h,B,h);b=l+j|0;e=T+e|0;e=b>>>0>>0?e+1|0:e;t=b;E=o[g+52>>2];b=o[g+24>>2];l=o[g+48>>2];j=l;r=o[g+28>>2]-(E+(b>>>0>>0)|0)|0;C=b-j|0;j=Ol(C,r,C,r);b=t+j|0;e=T+e|0;v=b;j=b>>>0>>0?e+1|0:e;if(!(b|j)){break h}d=1;b=0;e=o[g+64>>2];c=o[g+68>>2]-((e>>>0>>0)+y|0)|0;e=e-i|0;n=e;s=c;c=Ol(A,f,e,c);e=T;t=c;i=o[g+56>>2];c=i-k|0;y=o[g+60>>2]-((i>>>0>>0)+z|0)|0;k=Ol(c,y,B,h);i=t+k|0;e=T+e|0;e=i>>>0>>0?e+1|0:e;t=i;i=o[g+72>>2];k=i-l|0;z=o[g+76>>2]-((i>>>0>>0)+E|0)|0;l=Ol(k,z,C,r);i=t+l|0;e=T+e|0;e=i>>>0>>0?e+1|0:e;l=i;i=e;f=Pl(Ol(l,e,A,f),T,v,j);s=s-(T+(n>>>0>>0)|0)|0;f=n-f|0;f=Ol(f,s,f,s);n=T;t=f;e=Pl(Ol(B,h,l,e),T,v,j);f=y-(T+(c>>>0>>0)|0)|0;c=c-e|0;f=Ol(c,f,c,f);c=t+f|0;e=T+n|0;e=c>>>0>>0?e+1|0:e;h=c;c=Pl(Ol(l,i,C,r),T,v,j);f=z-(T+(k>>>0>>0)|0)|0;c=k-c|0;f=Ol(c,f,c,f);c=h+f|0;e=T+e|0;f=Ol(c,c>>>0>>0?e+1|0:e,v,j);c=T;h=c;if(!c&f>>>0<=1|c>>>0<0){break e}r=f;c=h;while(1){e=b<<1|d>>>31;d=d<<1;b=e;k=!c&r>>>0>7|c>>>0>0;r=(c&3)<<30|r>>>2;c=c>>>2|0;if(k){continue}break}break d}e=a;if(s){if((d|0)<=0){o[a+8>>2]=0;o[a+12>>2]=0;break g}b=(d<<1)+ -2|0}else{b=n<<1}b=(b<<2)+c|0;o[e+8>>2]=o[b>>2];o[a+12>>2]=o[b+4>>2]}c=1;break b}Ok();D()}d=f;b=h;if(f-1){break c}}while(1){c=Ql(f,h,d,b)+d|0;e=b+T|0;e=c>>>0>>0?e+1|0:e;d=(e&1)<<31|c>>>1;b=e>>>1|0;c=Ol(d,b,d,b);e=T;if((h|0)==(e|0)&c>>>0>f>>>0|e>>>0>h>>>0){continue}break}}e=o[a+20>>2];c=0;if(!e){break b}h=e+ -1|0;r=o[o[a+16>>2]+(h>>>3&536870908)>>2];o[a+20>>2]=h;c=x;e=q;k=c-e|0;q=e>>31;x=(c>>31)-(q+(c>>>0>>0)|0)|0;c=Ol(l,i,k,x);f=T;q=Ol(e,q,v,j);c=q+c|0;e=T+f|0;e=c>>>0>>0?e+1|0:e;t=c;c=u;f=w;n=c-f|0;w=f>>31;q=(c>>31)-(w+(c>>>0>>0)|0)|0;c=Ol(d,b,n,q);u=c;c=r>>>(h&31)&1;s=c?0-u|0:u;h=t+s|0;r=e;e=T;e=r+(c?0-(e+(0>>0)|0)|0:e)|0;F=a,G=Pl(h,h>>>0>>0?e+1|0:e,v,j),o[F+12>>2]=G;e=Ol(l,i,n,q);h=T;u=a;f=Ol(f,w,v,j);a=f+e|0;e=T+h|0;e=a>>>0>>0?e+1|0:e;i=a;a=Ol(d,b,k,x);d=c?a:0-a|0;b=i+d|0;i=e;e=T;a=i+(c?e:0-((0>>0)+e|0)|0)|0;F=u,G=Pl(b,b>>>0>>0?a+1|0:a,v,j),o[F+8>>2]=G;c=1}R=g+80|0;return c}function Ua(a,b,c,d){var e=0,f=0,g=0,h=0,i=v(0),j=0;a:{b:{if(!d){break b}e=o[a+28>>2]+ -1|0;if(e>>>0>10){break b}c:{d:{e:{switch(e-1|0){default:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=m[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 0:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 1:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=n[b>>1];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 2:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=q[b>>1];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 3:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 4:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 5:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 6:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 7:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break c}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=(f<<2)+d|0;i=s[b>>2];f:{if(v(w(i))>2]=h;b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break c;case 8:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break d}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=(f<<2)+d|0;j=t[b>>3];g:{if(w(j)<2147483648){h=~~j;break g}h=-2147483648}o[e>>2]=h;b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break d;case 9:break e}}g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}ml((e<<2)+d|0,0,c-e<<2);break b}if((e|0)>=(c|0)){break b}break a}if((e|0)>=(c|0)){break b}break a}return g}ml((e<<2)+d|0,0,c-e<<2);return 1}function Qa(a,b,c,d){var e=0,f=0,g=0,h=0,i=v(0),j=0;a:{b:{if(!d){break b}e=o[a+28>>2]+ -1|0;if(e>>>0>10){break b}c:{d:{e:{switch(e-1|0){default:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=m[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 0:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 1:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=q[b>>1];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 2:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=q[b>>1];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 3:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 4:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 5:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 6:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 7:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break c}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=(f<<1)+d|0;i=s[b>>2];f:{if(v(w(i))>1]=h;b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break c;case 8:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break d}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=(f<<1)+d|0;j=t[b>>3];g:{if(w(j)<2147483648){h=~~j;break g}h=-2147483648}n[e>>1]=h;b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break d;case 9:break e}}g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}ml((e<<1)+d|0,0,c-e<<1);break b}if((e|0)>=(c|0)){break b}break a}if((e|0)>=(c|0)){break b}break a}return g}ml((e<<1)+d|0,0,c-e<<1);return 1}function Wa(a,b,c,d){var e=0,f=0,g=0,h=0,i=v(0),j=0;a:{b:{if(!d){break b}e=o[a+28>>2]+ -1|0;if(e>>>0>10){break b}c:{d:{e:{switch(e-1|0){default:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=m[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 0:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 1:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=n[b>>1];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 2:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=q[b>>1];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 3:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 4:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 5:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 6:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 7:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break c}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=(f<<2)+d|0;i=s[b>>2];f:{if(i=v(0)){h=~~i>>>0;break f}h=0}o[e>>2]=h;b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break c;case 8:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break d}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=(f<<2)+d|0;j=t[b>>3];g:{if(j<4294967296&j>=0){h=~~j>>>0;break g}h=0}o[e>>2]=h;b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break d;case 9:break e}}g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){o[(f<<2)+d>>2]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}ml((e<<2)+d|0,0,c-e<<2);break b}if((e|0)>=(c|0)){break b}break a}if((e|0)>=(c|0)){break b}break a}return g}ml((e<<2)+d|0,0,c-e<<2);return 1}function Sa(a,b,c,d){var e=0,f=0,g=0,h=0,i=v(0),j=0;a:{b:{if(!d){break b}e=o[a+28>>2]+ -1|0;if(e>>>0>10){break b}c:{d:{e:{switch(e-1|0){default:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=m[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 0:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 1:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=q[b>>1];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 2:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=q[b>>1];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 3:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 4:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 5:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 6:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 7:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break c}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=(f<<1)+d|0;i=s[b>>2];f:{if(i=v(0)){h=~~i>>>0;break f}h=0}n[e>>1]=h;b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break c;case 8:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break d}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=(f<<1)+d|0;j=t[b>>3];g:{if(j<4294967296&j>=0){h=~~j>>>0;break g}h=0}n[e>>1]=h;b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break d;case 9:break e}}g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){n[(f<<1)+d>>1]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}ml((e<<1)+d|0,0,c-e<<1);break b}if((e|0)>=(c|0)){break b}break a}if((e|0)>=(c|0)){break b}break a}return g}ml((e<<1)+d|0,0,c-e<<1);return 1}function Pg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,r=0,s=0,t=0,v=0,w=0;e=R-80|0;R=e;a:{b:{v=o[a+4>>2];c=o[v+32>>2];n=o[c+8>>2];j=o[c+16>>2];k=o[c+12>>2];d=k;g=o[c+20>>2];h=g;c:{if((d|0)<(h|0)?1:(d|0)<=(h|0)?n>>>0>j>>>0?0:1:0){break c}s=o[c>>2];i=p[s+j|0];d=g;t=j+1|0;if(t>>>0<1){d=d+1|0}h=c;o[c+16>>2]=t;o[c+20>>2]=d;if((k|0)<(d|0)?1:(k|0)<=(d|0)?n>>>0>t>>>0?0:1:0){break c}t=p[t+s|0];d=g;w=j+2|0;if(w>>>0<2){d=d+1|0}o[c+16>>2]=w;o[h+20>>2]=d;h=i<<24>>24;d:{if((h|0)>=0){r=o[a+216>>2];if((o[a+220>>2]-r|0)/144>>>0<=i>>>0){break c}r=r+u(i,144)|0;if(o[r>>2]<=-1){break d}break c}if(o[a+212>>2]>-1){break c}r=a+212|0}o[r>>2]=b;e:{f:{r=q[v+36>>1];g:{if((r<<24|r<<8&16711680)>>>16>>>0>=258){if((k|0)<(d|0)?1:(k|0)<=(d|0)?n>>>0>w>>>0?0:1:0){break c}d=p[s+w|0];j=j+3|0;if(j>>>0<3){g=g+1|0}o[c+16>>2]=j;o[c+20>>2]=g;if(!t){break g}if(d){break c}break f}if(t){break f}d=0}if((h|0)<=-1){c=a+184|0}else{c=o[a+216>>2]+u(i,144)|0;m[c+100|0]=0;c=c+104|0}if(d>>>0>1){break c}h:{if(d-1){Qg(e+16|0,a,c);break h}Rg(e+16|0,a,c)}c=o[e+16>>2];if(!c){break c}break e}if((h|0)<0){break c}g=o[v+44>>2];f=o[a+216>>2];c=yk(80);o[c+12>>2]=0;o[c+16>>2]=0;o[c>>2]=9700;o[c+4>>2]=0;o[c+76>>2]=0;o[c+68>>2]=g;o[c+64>>2]=0;o[c+56>>2]=0;o[c+60>>2]=0;o[c+8>>2]=8568;d=c+20|0;o[d>>2]=0;o[d+4>>2]=0;j=c+28|0;h=j;o[h>>2]=0;o[h+4>>2]=0;o[c+36>>2]=0;o[c+40>>2]=0;h=c+44|0;o[h>>2]=0;o[h+4>>2]=0;o[c+52>>2]=0;f=f+u(i,144)|0;i=f+104|0;o[c+72>>2]=i;k=e+56|0;o[k>>2]=0;o[k+4>>2]=0;o[e+48>>2]=0;o[e+52>>2]=0;v=e+32|0;n=v;o[n>>2]=0;o[n+4>>2]=0;o[e+72>>2]=0;o[e+40>>2]=0;o[e+44>>2]=0;o[e+24>>2]=0;o[e+28>>2]=0;o[e+64>>2]=0;o[e+68>>2]=0;o[e+16>>2]=8568;n=f+4|0;o[e+20>>2]=n;f=o[f+68>>2];s=o[f>>2];f=o[f+4>>2];m[e+79|0]=0;eb(e+40|0,(f-s>>2>>>0)/3|0,e+79|0);f=o[e+20>>2];s=o[f+56>>2];f=o[f+52>>2];m[e+79|0]=0;eb(e+52|0,s-f>>2,e+79|0);o[e+36>>2]=c;o[v>>2]=g;g=e+28|0;o[g>>2]=i;o[e+24>>2]=n;o[j>>2]=c;f=o[g+4>>2];o[d>>2]=o[g>>2];o[d+4>>2]=f;g=o[e+24>>2];o[c+12>>2]=o[e+20>>2];o[c+16>>2]=g;g=c;f=o[e+44>>2];if(f){d=c+32|0;i:{if(f>>>0<=o[c+40>>2]<<5>>>0){i=f+ -1>>>5|0;f=o[d>>2];break i}d=o[d>>2];if(d){jl(d);o[c+40>>2]=0;o[c+32>>2]=0;o[c+36>>2]=0;f=o[e+44>>2]}if((f|0)<=-1){break b}i=f+ -1>>>5|0;d=i+1|0;f=yk(d<<2);o[c+40>>2]=d;o[c+36>>2]=0;o[c+32>>2]=f}nl(f,o[e+40>>2],(i<<2)+4|0);d=o[e+44>>2]}else{d=0}o[g+36>>2]=d;g=c;f=o[k>>2];if(f){j:{if(f>>>0<=o[c+52>>2]<<5>>>0){d=f+ -1>>>5|0;f=o[h>>2];break j}d=o[h>>2];if(d){jl(d);o[c+52>>2]=0;o[c+44>>2]=0;o[c+48>>2]=0;f=o[e+56>>2]}if((f|0)<=-1){break a}d=f+ -1>>>5|0;h=d+1|0;f=yk(h<<2);o[c+52>>2]=h;o[c+48>>2]=0;o[c+44>>2]=f}nl(f,o[e+52>>2],(d<<2)+4|0);h=o[e+56>>2]}else{h=0}o[g+48>>2]=h;yd(c+56|0,o[e+64>>2],o[e+68>>2]);o[e+16>>2]=8568;g=o[e+64>>2];if(g){o[e+68>>2]=g;jl(g)}o[e+16>>2]=8820;g=o[e+52>>2];if(g){jl(g)}g=o[e+40>>2];if(!g){break e}jl(g)}g=yk(64);o[e+8>>2]=c;Vd(g,e+8|0);c=o[e+8>>2];o[e+8>>2]=0;if(c){l[o[o[c>>2]+4>>2]](c)}if((b|0)>=0){a=o[a+4>>2];f=a+8|0;c=o[a+12>>2];i=o[a+8>>2];d=c-i>>2;k:{if((d|0)>(b|0)){break k}h=b+1|0;if(d>>>0<=b>>>0){Sg(f,h-d|0);break k}if(h>>>0>=d>>>0){break k}h=i+(h<<2)|0;if((h|0)!=(c|0)){while(1){c=c+ -4|0;d=o[c>>2];o[c>>2]=0;if(d){l[o[o[d>>2]+4>>2]](d)}if((c|0)!=(h|0)){continue}break}}o[a+12>>2]=h}b=o[f>>2]+(b<<2)|0;a=o[b>>2];o[b>>2]=g;f=1;if(!a){break c}l[o[o[a>>2]+4>>2]](a);break c}l[o[o[g>>2]+4>>2]](g);f=0}R=e+80|0;return f|0}Nk();D()}Nk();D()}function La(a,b,c,d){var e=0,f=0,g=0,h=0,i=v(0),j=0;a:{b:{if(!d){break b}e=o[a+28>>2]+ -1|0;if(e>>>0>10){break b}c:{d:{e:{switch(e-1|0){default:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 0:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 1:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=p[b|0];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 2:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=p[b|0];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 3:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 4:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 5:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 6:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 7:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break c}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=d+f|0;i=s[b>>2];f:{if(v(w(i))(c|0)?c:e)<<24>>24){continue}break}break c;case 8:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break d}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=d+f|0;j=t[b>>3];g:{if(w(j)<2147483648){h=~~j;break g}h=-2147483648}m[e|0]=h;b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break d;case 9:break e}}g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}ml(d+e|0,0,c-e|0);break b}if((e|0)>=(c|0)){break b}break a}if((e|0)>=(c|0)){break b}break a}return g}ml(d+e|0,0,c-e|0);return 1}function Na(a,b,c,d){var e=0,f=0,g=0,h=0,i=v(0),j=0;a:{b:{if(!d){break b}e=o[a+28>>2]+ -1|0;if(e>>>0>10){break b}c:{d:{e:{switch(e-1|0){default:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 0:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 1:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=p[b|0];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 2:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=p[b|0];b=b+2|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 3:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 4:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=o[b>>2];b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 5:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 6:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=o[b>>2];b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 7:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break c}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=d+f|0;i=s[b>>2];f:{if(i=v(0)){h=~~i>>>0;break f}h=0}m[e|0]=h;b=b+4|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break c;case 8:g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break d}e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){e=d+f|0;j=t[b>>3];g:{if(j<4294967296&j>=0){h=~~j>>>0;break g}h=0}m[e|0]=h;b=b+8|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break d;case 9:break e}}g=1;e=m[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){e=o[o[a>>2]>>2];b=o[a+48>>2]+Ol(o[a+40>>2],o[a+44>>2],b,0)|0;b=e+b|0;while(1){m[d+f|0]=p[b|0];b=b+1|0;f=f+1|0;e=m[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}ml(d+e|0,0,c-e|0);break b}if((e|0)>=(c|0)){break b}break a}if((e|0)>=(c|0)){break b}break a}return g}ml(d+e|0,0,c-e|0);return 1}function jl(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{if(!a){break a}d=a+ -8|0;c=o[a+ -4>>2];a=c&-8;f=d+a|0;b:{if(c&1){break b}if(!(c&3)){break a}c=o[d>>2];d=d-c|0;if(d>>>0>>0<=255){e=o[d+8>>2];c=c>>>3|0;b=o[d+12>>2];if((b|0)==(e|0)){i=13332,j=o[3333]&Sl(c),o[i>>2]=j;break b}o[e+12>>2]=b;o[b+8>>2]=e;break b}h=o[d+24>>2];c=o[d+12>>2];c:{if((c|0)!=(d|0)){b=o[d+8>>2];o[b+12>>2]=c;o[c+8>>2]=b;break c}d:{e=d+20|0;b=o[e>>2];if(b){break d}e=d+16|0;b=o[e>>2];if(b){break d}c=0;break c}while(1){g=e;c=b;e=c+20|0;b=o[e>>2];if(b){continue}e=c+16|0;b=o[c+16>>2];if(b){continue}break}o[g>>2]=0}if(!h){break b}e=o[d+28>>2];b=(e<<2)+13636|0;e:{if(o[b>>2]==(d|0)){o[b>>2]=c;if(c){break e}i=13336,j=o[3334]&Sl(e),o[i>>2]=j;break b}o[h+(o[h+16>>2]==(d|0)?16:20)>>2]=c;if(!c){break b}}o[c+24>>2]=h;b=o[d+16>>2];if(b){o[c+16>>2]=b;o[b+24>>2]=c}b=o[d+20>>2];if(!b){break b}o[c+20>>2]=b;o[b+24>>2]=c;break b}c=o[f+4>>2];if((c&3)!=3){break b}o[3335]=a;o[f+4>>2]=c&-2;o[d+4>>2]=a|1;o[a+d>>2]=a;return}if(f>>>0<=d>>>0){break a}c=o[f+4>>2];if(!(c&1)){break a}f:{if(!(c&2)){if((f|0)==o[3339]){o[3339]=d;a=o[3336]+a|0;o[3336]=a;o[d+4>>2]=a|1;if(o[3338]!=(d|0)){break a}o[3335]=0;o[3338]=0;return}if((f|0)==o[3338]){o[3338]=d;a=o[3335]+a|0;o[3335]=a;o[d+4>>2]=a|1;o[a+d>>2]=a;return}a=(c&-8)+a|0;g:{if(c>>>0<=255){b=o[f+8>>2];c=c>>>3|0;e=o[f+12>>2];if((b|0)==(e|0)){i=13332,j=o[3333]&Sl(c),o[i>>2]=j;break g}o[b+12>>2]=e;o[e+8>>2]=b;break g}h=o[f+24>>2];c=o[f+12>>2];h:{if((f|0)!=(c|0)){b=o[f+8>>2];o[b+12>>2]=c;o[c+8>>2]=b;break h}i:{e=f+20|0;b=o[e>>2];if(b){break i}e=f+16|0;b=o[e>>2];if(b){break i}c=0;break h}while(1){g=e;c=b;e=c+20|0;b=o[e>>2];if(b){continue}e=c+16|0;b=o[c+16>>2];if(b){continue}break}o[g>>2]=0}if(!h){break g}e=o[f+28>>2];b=(e<<2)+13636|0;j:{if((f|0)==o[b>>2]){o[b>>2]=c;if(c){break j}i=13336,j=o[3334]&Sl(e),o[i>>2]=j;break g}o[h+((f|0)==o[h+16>>2]?16:20)>>2]=c;if(!c){break g}}o[c+24>>2]=h;b=o[f+16>>2];if(b){o[c+16>>2]=b;o[b+24>>2]=c}b=o[f+20>>2];if(!b){break g}o[c+20>>2]=b;o[b+24>>2]=c}o[d+4>>2]=a|1;o[a+d>>2]=a;if(o[3338]!=(d|0)){break f}o[3335]=a;return}o[f+4>>2]=c&-2;o[d+4>>2]=a|1;o[a+d>>2]=a}if(a>>>0<=255){a=a>>>3|0;c=(a<<3)+13372|0;b=o[3333];a=1<>2]}o[c+8>>2]=d;o[a+12>>2]=d;o[d+12>>2]=c;o[d+8>>2]=a;return}o[d+16>>2]=0;o[d+20>>2]=0;c=d;e=a>>>8|0;b=0;l:{if(!e){break l}b=31;if(a>>>0>16777215){break l}b=e;e=e+1048320>>>16&8;b=b<>>16&4;b=b<>>16&2;b=(b<>>15|0)-(g|(e|h))|0;b=(b<<1|a>>>b+21&1)+28|0}o[c+28>>2]=b;g=(b<<2)+13636|0;m:{n:{e=o[3334];c=1<>2]=d;o[d+24>>2]=g;break o}e=a<<((b|0)==31?0:25-(b>>>1|0)|0);c=o[g>>2];while(1){b=c;if((o[c+4>>2]&-8)==(a|0)){break n}c=e>>>29|0;e=e<<1;g=(b+(c&4)|0)+16|0;c=o[g>>2];if(c){continue}break}o[g>>2]=d;o[d+24>>2]=b}o[d+12>>2]=d;o[d+8>>2]=d;break m}a=o[b+8>>2];o[a+12>>2]=d;o[b+8>>2]=d;o[d+24>>2]=0;o[d+12>>2]=b;o[d+8>>2]=a}a=o[3341]+ -1|0;o[3341]=a;if(a){break a}d=13788;while(1){a=o[d>>2];d=a+8|0;if(a){continue}break}o[3341]=-1}}function Xi(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;o[a+56>>2]=o[a+52>>2];o[a+44>>2]=o[a+40>>2];a:{b:{c:{d=o[a+64>>2];if(o[d+28>>2]!=o[d+24>>2]){m=a+40|0;n=a+52|0;while(1){e=c;j=o[o[d+24>>2]+(l<<2)>>2];d:{if((j|0)==-1){break d}c=o[a+56>>2];b=o[a+60>>2];e:{if((c|0)!=(b|0)){o[c>>2]=e;o[a+56>>2]=c+4;break e}h=o[n>>2];i=c-h|0;f=i>>2;g=f+1|0;if(g>>>0>=1073741824){break c}d=b-h|0;b=d>>1;d=d>>2>>>0<536870911?b>>>0>>0?g:b:1073741823;c=0;f:{if(!d){break f}if(d>>>0>=1073741824){break a}c=yk(d<<2)}b=c+(f<<2)|0;o[b>>2]=e;d=c+(d<<2)|0;b=b+4|0;if((i|0)>=1){ll(c,h,i)}o[a+60>>2]=d;o[a+56>>2]=b;o[a+52>>2]=c;if(!h){break e}jl(h)}g:{if(!(o[o[a+12>>2]+(l>>>3&536870908)>>2]>>>(l&31)&1)){break g}c=j+1|0;c=(c>>>0)%3|0?c:j+ -2|0;if((c|0)==-1|o[o[a>>2]+(c>>>3&536870908)>>2]>>>(c&31)&1){break g}b=o[o[o[a+64>>2]+12>>2]+(c<<2)>>2];if((b|0)==-1){break g}c=b+1|0;d=(c>>>0)%3|0?c:b+ -2|0;if((d|0)==-1){break g}while(1){c=d+1|0;j=d;c=(c>>>0)%3|0?c:d+ -2|0;if((c|0)==-1|o[o[a>>2]+(c>>>3&536870908)>>2]>>>(c&31)&1){break g}b=o[o[o[a+64>>2]+12>>2]+(c<<2)>>2];if((b|0)==-1){break g}c=b+1|0;d=(c>>>0)%3|0?c:b+ -2|0;if((d|0)!=-1){continue}break}}o[o[a+28>>2]+(j<<2)>>2]=e;c=o[a+44>>2];b=o[a+48>>2];h:{if((c|0)!=(b|0)){o[c>>2]=j;o[a+44>>2]=c+4;break h}h=o[m>>2];i=c-h|0;f=i>>2;g=f+1|0;if(g>>>0>=1073741824){break b}d=b-h|0;b=d>>1;d=d>>2>>>0<536870911?b>>>0>>0?g:b:1073741823;c=0;i:{if(!d){break i}if(d>>>0>=1073741824){break a}c=yk(d<<2)}b=c+(f<<2)|0;o[b>>2]=j;d=c+(d<<2)|0;b=b+4|0;if((i|0)>=1){ll(c,h,i)}o[a+48>>2]=d;o[a+44>>2]=b;o[a+40>>2]=c;if(!h){break h}jl(h)}c=e+1|0;b=((j>>>0)%3|0?-1:2)+j|0;if((b|0)==-1){break d}b=o[o[o[a+64>>2]+12>>2]+(b<<2)>>2];if((b|0)==-1){break d}d=b+((b>>>0)%3|0?-1:2)|0;if((d|0)==-1|(d|0)==(j|0)){break d}while(1){b=d+1|0;b=(b>>>0)%3|0?b:d+ -2|0;if(o[o[a>>2]+(b>>>3&536870908)>>2]>>>(b&31)&1){e=o[a+56>>2];b=o[a+60>>2];j:{if((e|0)!=(b|0)){o[e>>2]=c;o[a+56>>2]=e+4;break j}k=o[n>>2];h=e-k|0;g=h>>2;i=g+1|0;if(i>>>0>=1073741824){break c}f=b-k|0;b=f>>1;f=f>>2>>>0<536870911?b>>>0>>0?i:b:1073741823;e=0;k:{if(!f){break k}if(f>>>0>=1073741824){break a}e=yk(f<<2)}b=e+(g<<2)|0;o[b>>2]=c;f=e+(f<<2)|0;b=b+4|0;if((h|0)>=1){ll(e,k,h)}o[a+60>>2]=f;o[a+56>>2]=b;o[a+52>>2]=e;if(!k){break j}jl(k)}b=c+1|0;e=o[a+44>>2];f=o[a+48>>2];l:{if((e|0)!=(f|0)){o[e>>2]=d;o[a+44>>2]=e+4;break l}i=o[m>>2];k=e-i|0;e=k>>2;h=e+1|0;if(h>>>0>=1073741824){break b}p=e<<2;g=f-i|0;f=g>>1;g=g>>2>>>0<536870911?f>>>0>>0?h:f:1073741823;e=0;m:{if(!g){break m}if(g>>>0>=1073741824){break a}e=yk(g<<2)}f=p+e|0;o[f>>2]=d;g=e+(g<<2)|0;f=f+4|0;if((k|0)>=1){ll(e,i,k)}o[a+48>>2]=g;o[a+44>>2]=f;o[a+40>>2]=e;if(!i){break l}jl(i)}e=c;c=b}o[o[a+28>>2]+(d<<2)>>2]=e;b=((d>>>0)%3|0?-1:2)+d|0;if((b|0)==-1){break d}b=o[o[o[a+64>>2]+12>>2]+(b<<2)>>2];if((b|0)==-1){break d}d=b+((b>>>0)%3|0?-1:2)|0;if((d|0)==-1){break d}if((d|0)!=(j|0)){continue}break}}l=l+1|0;d=o[a+64>>2];if(l>>>0>2]-o[d+24>>2]>>2>>>0){continue}break}}return}Nk();D()}Nk();D()}db(10720);D()}function nf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;f=R-96|0;R=f;e=o[a+16>>2];m[f+92|0]=1;o[f+88>>2]=b;o[f+84>>2]=b;o[f+80>>2]=e;d=-1;d=(b|0)!=-1?o[o[e>>2]+(b<<2)>>2]:d;g=o[a+20>>2];e=o[g>>2];a:{b:{c:{d:{if(o[g+4>>2]-e>>2>>>0>d>>>0){e=o[o[a+8>>2]+(o[e+(d<<2)>>2]<<2)>>2];d=o[a+4>>2];if(!p[d+84|0]){e=o[o[d+68>>2]+(e<<2)>>2]}o[f+72>>2]=0;o[f+76>>2]=0;g=f- -64|0;o[g>>2]=0;o[g+4>>2]=0;o[f+56>>2]=0;o[f+60>>2]=0;Re(d,e,m[d+24|0],f+56|0);if((b|0)==-1){break a}d=b+1|0;g=(d>>>0)%3|0?d:b+ -2|0;t=((b>>>0)%3|0?-1:2)+b|0;j=!o[a+28>>2];A=f+48|0;B=f+40|0;while(1){e=g;d=t;e:{if(j){break e}d=b+1|0;e=(d>>>0)%3|0?d:b+ -2|0;d=b+ -1|0;if((b>>>0)%3){break e}d=b+2|0}b=-1;b=(e|0)!=-1?o[o[o[a+16>>2]>>2]+(e<<2)>>2]:b;j=o[a+20>>2];e=o[j>>2];if(o[j+4>>2]-e>>2>>>0<=b>>>0){break d}e=o[o[a+8>>2]+(o[e+(b<<2)>>2]<<2)>>2];b=o[a+4>>2];if(!p[b+84|0]){e=o[o[b+68>>2]+(e<<2)>>2]}o[A>>2]=0;o[A+4>>2]=0;o[B>>2]=0;o[B+4>>2]=0;o[f+32>>2]=0;o[f+36>>2]=0;Re(b,e,m[b+24|0],f+32|0);b=-1;b=(d|0)!=-1?o[o[o[a+16>>2]>>2]+(d<<2)>>2]:b;e=o[a+20>>2];d=o[e>>2];if(o[e+4>>2]-d>>2>>>0<=b>>>0){break c}d=o[o[a+8>>2]+(o[d+(b<<2)>>2]<<2)>>2];b=o[a+4>>2];if(!p[b+84|0]){d=o[o[b+68>>2]+(d<<2)>>2]}e=f+24|0;o[e>>2]=0;o[e+4>>2]=0;j=f+16|0;k=j;o[k>>2]=0;o[k+4>>2]=0;o[f+8>>2]=0;o[f+12>>2]=0;Re(b,d,m[b+24|0],f+8|0);d=o[f+8>>2];b=o[f+56>>2];u=d-b|0;v=o[f+60>>2];k=o[f+12>>2]-(v+(d>>>0>>0)|0)|0;w=o[f+40>>2];d=o[f+64>>2];C=w-d|0;x=o[f+68>>2];w=o[f+44>>2]-(x+(w>>>0>>0)|0)|0;y=Ol(u,k,C,w);z=h-y|0;l=l-(T+(h>>>0>>0)|0)|0;h=o[j>>2];y=h-d|0;j=o[j+4>>2]-((h>>>0>>0)+x|0)|0;h=o[f+32>>2];x=h-b|0;v=o[f+36>>2]-((h>>>0>>0)+v|0)|0;d=Ol(y,j,x,v);h=d+z|0;b=T+l|0;b=h>>>0>>0?b+1|0:b;l=b;d=i;q=u;E=k;i=o[f+48>>2];b=o[f+72>>2];k=i-b|0;u=o[f+76>>2];z=o[f+52>>2]-(u+(i>>>0>>0)|0)|0;q=Ol(q,E,k,z);i=d+q|0;d=T+r|0;d=i>>>0>>0?d+1|0:d;r=i;i=o[e>>2];q=i-b|0;b=o[e+4>>2]-((i>>>0>>0)+u|0)|0;e=Ol(q,b,x,v);i=r-e|0;r=d-(T+(r>>>0>>0)|0)|0;d=Ol(y,j,k,z);e=n-d|0;s=s-(T+(n>>>0>>0)|0)|0;d=Ol(q,b,C,w);n=d+e|0;b=T+s|0;b=n>>>0>>0?b+1|0:b;s=b;of(f+80|0);k=o[a+28>>2];j=!k;b=o[f+88>>2];if((b|0)!=-1){continue}break}b=r;d=b>>31;a=b>>31;b=a+b|0;g=d+i|0;if(g>>>0>>0){b=b+1|0}d=d^g;j=a^b;b=s;a=b>>31;b=b>>31;g=a;t=s+a|0;e=b+n|0;if(e>>>0>>0){t=t+1|0}a=b^e;e=g^t;f:{if((l|0)<-1?1:(l|0)<=-1?h>>>0>4294967295?0:1:0){b=h;g=a+(d-b|0)|0;b=e+(j-((d>>>0>>0)+l|0)|0)|0;d=g;a=d>>>0>>0?b+1|0:b;if(!k){break f}break b}b=j+l|0;g=d;d=h;g=g+d|0;if(g>>>0>>0){b=b+1|0}d=a;g=d+g|0;a=b+e|0;a=g>>>0>>0?a+1|0:a;d=g;if(k){break b}}if((d|0)<536870913){break a}a=((a&536870911)<<3|d>>>29)&7;b=0;h=Pl(h,l,a,b);i=Pl(i,r,a,b);n=Pl(n,s,a,b);break a}Ok();D()}Ok();D()}Ok();D()}if((a|0)<0?1:(a|0)<=0?d>>>0>=536870913?0:1:0){break a}b=a>>>29|0;a=(a&536870911)<<3|d>>>29;h=Pl(h,l,a,b);i=Pl(i,r,a,b);n=Pl(n,s,a,b)}o[c+8>>2]=h;o[c+4>>2]=i;o[c>>2]=n;R=f+96|0}function Uh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((b|0)==-1){return 1}i=1;d=(b>>>0)/3|0;a:{if(o[o[a+24>>2]+(d>>>3&268435452)>>2]>>>(d&31)&1){break a}c=o[a+48>>2];o[a+52>>2]=c;b:{if((c|0)!=o[a+56>>2]){o[c>>2]=b;o[a+52>>2]=c+4;break b}e=yk(4);o[e>>2]=b;f=e+4|0;o[a+56>>2]=f;o[a+52>>2]=f;o[a+48>>2]=e;if(!c){break b}jl(c)}i=0;f=o[o[a+4>>2]+28>>2];c=b+1|0;e=(c>>>0)%3|0?c:b+ -2|0;c=o[f+(e<<2)>>2];if((c|0)==-1){break a}h=(b-u(d,3)|0?-1:2)+b|0;d=o[f+(h<<2)>>2];if((d|0)==-1){break a}b=o[a+36>>2];f=b+(c>>>3&536870908)|0;i=o[f>>2];g=1<<(c&31);if(!(i&g)){o[f>>2]=g|i;Eh(a+8|0,c,e);b=o[a+36>>2]}b=(d>>>3&536870908)+b|0;c=o[b>>2];e=1<<(d&31);if(!(c&e)){o[b>>2]=c|e;Eh(a+8|0,d,h)}c=o[a+52>>2];if((c|0)==o[a+48>>2]){return 1}j=a+48|0;k=a+8|0;while(1){c=c+ -4|0;b=o[c>>2];d=(b>>>0)/3|0;c:{d:{e:{if((b|0)==-1){break e}e=o[a+24>>2]+(d>>>3&268435452)|0;f=o[e>>2];d=1<<(d&31);if(f&d){break e}o[e>>2]=d|f;i=0;f=o[a+4>>2];d=o[o[f+28>>2]+(b<<2)>>2];if((d|0)==-1){break a}f:{while(1){g:{c=b;b=o[a+36>>2]+(d>>>3&536870908)|0;e=o[b>>2];h=1<<(d&31);h:{i:{if(e&h){break i}g=o[o[f+40>>2]+(d<<2)>>2];if((g|0)!=-1){j:{l=g+1|0;g=(l>>>0)%3|0?l:g+ -2|0;if((g|0)==-1|o[o[f>>2]+(g>>>3&536870908)>>2]>>>(g&31)&1){break j}f=o[o[o[f+64>>2]+12>>2]+(g<<2)>>2];if((f|0)==-1){break j}o[b>>2]=e|h;Eh(k,d,c);b=f+1|0;if((((b>>>0)%3|0?b:f+ -2|0)|0)==-1){break i}b=-1;f=o[a+4>>2];k:{if((c|0)==-1){break k}d=c+1|0;c=(d>>>0)%3|0?d:c+ -2|0;if((c|0)==-1|o[o[f>>2]+(c>>>3&536870908)>>2]>>>(c&31)&1){break k}b=o[o[o[f+64>>2]+12>>2]+(c<<2)>>2]}c=(b>>>0)/3|0;break h}}o[b>>2]=e|h;Eh(k,d,c)}if((c|0)==-1){break d}f=o[a+4>>2];d=-1;e=c+1|0;e=(e>>>0)%3|0?e:c+ -2|0;b=-1;l:{if((e|0)==-1){break l}b=-1;if(o[o[f>>2]+(e>>>3&536870908)>>2]>>>(e&31)&1){break l}b=o[o[o[f+64>>2]+12>>2]+(e<<2)>>2]}c=c+((c>>>0)%3|0?-1:2)|0;if(!((c|0)==-1|o[o[f>>2]+(c>>>3&536870908)>>2]>>>(c&31)&1)){d=o[o[o[f+64>>2]+12>>2]+(c<<2)>>2]}h=(d|0)==-1;e=(d>>>0)/3|0;c=(b>>>0)/3|0;m:{g=(b|0)==-1;n:{if(!g){g=g?-1:c;g=o[o[a+24>>2]+(g>>>3&536870908)>>2]&1<<(g&31);if(h){break m}g=(g|0)!=0;break n}c=-1;g=1;if((d|0)==-1){break d}}h=h?-1:e;h=o[o[a+24>>2]+(h>>>3&536870908)>>2]&1<<(h&31);if(g){c=e;b=d;if(!h){break h}break d}if(h){break h}c=o[a+52>>2];o[c+ -4>>2]=d;h=o[a+56>>2];if((h|0)!=(c|0)){o[c>>2]=b;c=c+4|0;break e}e=o[j>>2];f=c-e|0;i=f>>2;c=i+1|0;if(c>>>0>=1073741824){break g}h=h-e|0;g=h>>1;c=h>>2>>>0<536870911?g>>>0>>0?c:g:1073741823;d=0;o:{if(!c){break o}if(c>>>0>=1073741824){break f}d=yk(c<<2)}h=d+(i<<2)|0;o[h>>2]=b;b=d+(c<<2)|0;c=h+4|0;if((f|0)>=1){ll(d,e,f)}o[a+56>>2]=b;o[a+52>>2]=c;o[a+48>>2]=d;if(!e){break c}jl(e);c=o[a+52>>2];break c}if(g){break d}}d=o[a+24>>2]+(c>>>3&536870908)|0;o[d>>2]=o[d>>2]|1<<(c&31);d=o[o[f+28>>2]+(b<<2)>>2];if((d|0)!=-1){continue}break a}break}Nk();D()}db(8832);D()}o[a+52>>2]=c;break c}c=o[a+52>>2]+ -4|0;o[a+52>>2]=c}i=1;if(o[j>>2]!=(c|0)){continue}break}}return i}function Ze(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;e=R-96|0;R=e;d=o[a+16>>2];m[e+92|0]=1;o[e+88>>2]=b;o[e+84>>2]=b;o[e+80>>2]=d;g=o[a+20>>2];f=o[g>>2];d=o[o[d+28>>2]+(b<<2)>>2];a:{b:{c:{d:{if(o[g+4>>2]-f>>2>>>0>d>>>0){d=o[o[a+8>>2]+(o[f+(d<<2)>>2]<<2)>>2];f=o[a+4>>2];if(!p[f+84|0]){d=o[o[f+68>>2]+(d<<2)>>2]}o[e+72>>2]=0;o[e+76>>2]=0;g=e- -64|0;o[g>>2]=0;o[g+4>>2]=0;o[e+56>>2]=0;o[e+60>>2]=0;Re(f,d,m[f+24|0],e+56|0);if((b|0)==-1){break a}d=b+1|0;g=(d>>>0)%3|0?d:b+ -2|0;t=((b>>>0)%3|0?-1:2)+b|0;j=!o[a+28>>2];A=e+48|0;B=e+40|0;while(1){f=g;d=t;e:{if(j){break e}d=b+1|0;f=(d>>>0)%3|0?d:b+ -2|0;d=b+ -1|0;if((b>>>0)%3){break e}d=b+2|0}j=o[a+20>>2];b=o[j>>2];f=o[o[o[a+16>>2]+28>>2]+(f<<2)>>2];if(o[j+4>>2]-b>>2>>>0<=f>>>0){break d}f=o[o[a+8>>2]+(o[b+(f<<2)>>2]<<2)>>2];b=o[a+4>>2];if(!p[b+84|0]){f=o[o[b+68>>2]+(f<<2)>>2]}o[A>>2]=0;o[A+4>>2]=0;o[B>>2]=0;o[B+4>>2]=0;o[e+32>>2]=0;o[e+36>>2]=0;Re(b,f,m[b+24|0],e+32|0);f=o[a+20>>2];b=o[f>>2];d=o[o[o[a+16>>2]+28>>2]+(d<<2)>>2];if(o[f+4>>2]-b>>2>>>0<=d>>>0){break c}f=o[o[a+8>>2]+(o[b+(d<<2)>>2]<<2)>>2];b=o[a+4>>2];if(!p[b+84|0]){f=o[o[b+68>>2]+(f<<2)>>2]}j=e+24|0;d=j;o[d>>2]=0;o[d+4>>2]=0;k=e+16|0;d=k;o[d>>2]=0;o[d+4>>2]=0;o[e+8>>2]=0;o[e+12>>2]=0;Re(b,f,m[b+24|0],e+8|0);d=o[e+8>>2];b=o[e+56>>2];u=d-b|0;v=o[e+60>>2];f=o[e+12>>2]-(v+(d>>>0>>0)|0)|0;w=o[e+40>>2];d=o[e+64>>2];C=w-d|0;x=o[e+68>>2];w=o[e+44>>2]-(x+(w>>>0>>0)|0)|0;y=Ol(u,f,C,w);z=h-y|0;l=l-(T+(h>>>0>>0)|0)|0;h=o[k>>2];y=h-d|0;k=o[k+4>>2]-((h>>>0>>0)+x|0)|0;h=o[e+32>>2];x=h-b|0;v=o[e+36>>2]-((h>>>0>>0)+v|0)|0;d=Ol(y,k,x,v);h=d+z|0;b=T+l|0;b=h>>>0>>0?b+1|0:b;l=b;d=i;q=u;E=f;i=o[e+48>>2];b=o[e+72>>2];f=i-b|0;u=o[e+76>>2];z=o[e+52>>2]-(u+(i>>>0>>0)|0)|0;q=Ol(q,E,f,z);i=d+q|0;d=T+r|0;d=i>>>0>>0?d+1|0:d;r=i;i=o[j>>2];q=i-b|0;b=o[j+4>>2]-((i>>>0>>0)+u|0)|0;j=Ol(q,b,x,v);i=r-j|0;r=d-(T+(r>>>0>>0)|0)|0;d=Ol(y,k,f,z);f=n-d|0;s=s-(T+(n>>>0>>0)|0)|0;d=Ol(q,b,C,w);n=d+f|0;b=T+s|0;b=n>>>0>>0?b+1|0:b;s=b;$e(e+80|0);k=o[a+28>>2];j=!k;b=o[e+88>>2];if((b|0)!=-1){continue}break}b=r;d=b>>31;a=b>>31;b=a+b|0;g=d+i|0;if(g>>>0>>0){b=b+1|0}d=d^g;j=a^b;b=s;a=b>>31;b=b>>31;g=a;t=s+a|0;f=b+n|0;if(f>>>0>>0){t=t+1|0}a=b^f;f=g^t;f:{if((l|0)<-1?1:(l|0)<=-1?h>>>0>4294967295?0:1:0){b=h;g=a+(d-b|0)|0;b=f+(j-((d>>>0>>0)+l|0)|0)|0;d=g;a=d>>>0>>0?b+1|0:b;if(!k){break f}break b}b=j+l|0;g=d;d=h;g=g+d|0;if(g>>>0>>0){b=b+1|0}d=a;g=d+g|0;a=b+f|0;a=g>>>0>>0?a+1|0:a;d=g;if(k){break b}}if((d|0)<536870913){break a}a=((a&536870911)<<3|d>>>29)&7;b=0;h=Pl(h,l,a,b);i=Pl(i,r,a,b);n=Pl(n,s,a,b);break a}Ok();D()}Ok();D()}Ok();D()}if((a|0)<0?1:(a|0)<=0?d>>>0>=536870913?0:1:0){break a}b=a>>>29|0;a=(a&536870911)<<3|d>>>29;h=Pl(h,l,a,b);i=Pl(i,r,a,b);n=Pl(n,s,a,b)}o[c+8>>2]=h;o[c+4>>2]=i;o[c>>2]=n;R=e+96|0}function Oh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((b|0)==-1){return 1}i=1;d=(b>>>0)/3|0;a:{if(o[o[a+24>>2]+(d>>>3&268435452)>>2]>>>(d&31)&1){break a}c=o[a+48>>2];o[a+52>>2]=c;b:{if((c|0)!=o[a+56>>2]){o[c>>2]=b;o[a+52>>2]=c+4;break b}e=yk(4);o[e>>2]=b;g=e+4|0;o[a+56>>2]=g;o[a+52>>2]=g;o[a+48>>2]=e;if(!c){break b}jl(c)}c=o[a+4>>2];f=-1;i=0;e=b+1|0;e=(e>>>0)%3|0?e:b+ -2|0;if((e|0)!=-1){f=o[o[c>>2]+(e<<2)>>2]}d=(b-u(d,3)|0?-1:2)+b|0;if((d|0)==-1|(f|0)==-1){break a}c=o[o[c>>2]+(d<<2)>>2];if((c|0)==-1){break a}b=o[a+36>>2];g=b+(f>>>3&536870908)|0;i=o[g>>2];j=1<<(f&31);if(!(i&j)){o[g>>2]=i|j;Eh(a+8|0,f,e);b=o[a+36>>2]}b=(c>>>3&536870908)+b|0;e=o[b>>2];g=1<<(c&31);if(!(e&g)){o[b>>2]=e|g;Eh(a+8|0,c,d)}c=o[a+52>>2];if((c|0)==o[a+48>>2]){return 1}j=a+48|0;k=a+8|0;while(1){c=c+ -4|0;b=o[c>>2];d=(b>>>0)/3|0;c:{d:{e:{if((b|0)==-1){break e}e=o[a+24>>2]+(d>>>3&268435452)|0;g=o[e>>2];d=1<<(d&31);if(g&d){break e}o[e>>2]=d|g;f:{while(1){i=0;f=o[a+4>>2];c=o[o[f>>2]+(b<<2)>>2];if((c|0)==-1){break a}g:{d=o[a+36>>2]+(c>>>3&536870908)|0;e=o[d>>2];g=1<<(c&31);h:{i:{if(e&g){break i}h=o[o[f+24>>2]+(c<<2)>>2];if((h|0)!=-1){l=h+1|0;h=(l>>>0)%3|0?l:h+ -2|0;if((h|0)!=-1){f=o[o[f+12>>2]+(h<<2)>>2];if((f|0)!=-1){o[d>>2]=e|g;Eh(k,c,b);c=f+1|0;if((((c>>>0)%3|0?c:f+ -2|0)|0)==-1){break i}d=b+ -2|0;c=b+1|0;b=-1;c=(c>>>0)%3|0?c:d;if((c|0)!=-1){b=o[o[o[a+4>>2]+12>>2]+(c<<2)>>2]}c=(b>>>0)/3|0;f=o[a+24>>2];break h}}}o[d>>2]=e|g;Eh(k,c,b)}c=o[a+4>>2];j:{k:{l:{m:{n:{d=b+1|0;e=(d>>>0)%3|0?d:b+ -2|0;o:{if((e|0)!=-1){d=((b>>>0)%3|0?-1:2)+b|0;c=o[c+12>>2];b=o[c+(e<<2)>>2];if((d|0)==-1){break n}d=o[c+(d<<2)>>2];if((b|0)!=-1){break m}b=d;break o}b=((b>>>0)%3|0?-1:2)+b|0;if((b|0)==-1){break d}b=o[o[c+12>>2]+(b<<2)>>2]}if((b|0)==-1){break d}f=o[a+24>>2];h=1;e=-1;d=-1;c=(b>>>0)/3|0;break k}if((b|0)==-1){break d}c=(b>>>0)/3|0;d=-1;g=-1;break l}c=(b>>>0)/3|0;g=-1;if((d|0)==-1){d=-1;break l}g=(d>>>0)/3|0}f=o[a+24>>2];e=o[f+(c>>>3&268435452)>>2]&1<<(c&31);if((g|0)==-1){break j}h=(e|0)!=0;e=b;b=d;d=c;c=g}g=o[(c>>>3&536870908)+f>>2]&1<<(c&31);if(h){if(!g){break h}break d}if(g){c=d;b=e;break h}c=o[a+52>>2];o[c+ -4>>2]=b;f=o[a+56>>2];if((f|0)!=(c|0)){o[c>>2]=e;c=c+4|0;break e}d=o[j>>2];g=c-d|0;i=g>>2;c=i+1|0;if(c>>>0>=1073741824){break g}f=f-d|0;h=f>>1;c=f>>2>>>0<536870911?h>>>0>>0?c:h:1073741823;b=0;p:{if(!c){break p}if(c>>>0>=1073741824){break f}b=yk(c<<2)}f=b+(i<<2)|0;o[f>>2]=e;e=b+(c<<2)|0;c=f+4|0;if((g|0)>=1){ll(b,d,g)}o[a+56>>2]=e;o[a+52>>2]=c;o[a+48>>2]=b;if(!d){break c}jl(d);c=o[a+52>>2];break c}if(e){break d}}d=(c>>>3&536870908)+f|0;o[d>>2]=o[d>>2]|1<<(c&31);if((b|0)!=-1){continue}break a}break}Nk();D()}db(8832);D()}o[a+52>>2]=c;break c}c=o[a+52>>2]+ -4|0;o[a+52>>2]=c}i=1;if(o[j>>2]!=(c|0)){continue}break}}return i}function bf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0;o[a+8>>2]=e;f=a+32|0;g=o[f>>2];d=o[a+36>>2]-g>>2;a:{if(d>>>0>>0){Ia(f,e-d|0);break a}if(d>>>0<=e>>>0){break a}o[a+36>>2]=g+(e<<2)}r=o[a+52>>2];p=o[a+48>>2];d=0;f=(e&1073741823)!=(e|0)?-1:e<<2;n=ml(yk(f),0,f);f=o[a+8>>2];b:{if((f|0)<1){break b}while(1){f=d<<2;g=o[f+n>>2];j=o[a+16>>2];c:{if((g|0)>(j|0)){h=o[a+32>>2];o[f+h>>2]=j;break c}h=o[a+32>>2];f=f+h|0;j=o[a+12>>2];if((g|0)<(j|0)){o[f>>2]=j;break c}o[f>>2]=g}d=d+1|0;f=o[a+8>>2];if((d|0)<(f|0)){continue}break}if((f|0)<1){break b}g=0;while(1){f=g<<2;d=f+c|0;f=o[b+f>>2]+o[f+h>>2]|0;o[d>>2]=f;d:{if((f|0)>o[a+16>>2]){f=f-o[a+20>>2]|0}else{if((f|0)>=o[a+12>>2]){break d}f=f+o[a+20>>2]|0}o[d>>2]=f}g=g+1|0;f=o[a+8>>2];if((g|0)<(f|0)){continue}break}}d=o[a+56>>2];q=o[d>>2];d=o[d+4>>2]-q|0;if((d|0)>=5){d=d>>2;s=(d|0)>2?d:2;t=d>>>0>1?d:1;j=1;while(1){e:{f:{if((j|0)!=(t|0)){m=u(e,j);d=o[(j<<2)+q>>2];if((d|0)==-1){break f}d=o[o[p+12>>2]+(d<<2)>>2];if((d|0)==-1){break f}g=-1;i=o[r>>2];h=o[p>>2];k=o[i+(o[h+(d<<2)>>2]<<2)>>2];l=d+1|0;l=(l>>>0)%3|0?l:d+ -2|0;if((l|0)!=-1){l=o[h+(l<<2)>>2]}else{l=-1}d=d+((d>>>0)%3|0?-1:2)|0;if((d|0)!=-1){g=o[h+(d<<2)>>2]}if((k|0)>=(j|0)){break f}d=o[(l<<2)+i>>2];if((d|0)>=(j|0)){break f}g=o[i+(g<<2)>>2];if((g|0)>=(j|0)){break f}if((e|0)>=1){g=u(e,g);h=u(d,e);i=u(e,k);d=0;while(1){o[(d<<2)+n>>2]=(o[(d+g<<2)+c>>2]+o[(d+h<<2)+c>>2]|0)-o[(d+i<<2)+c>>2];d=d+1|0;if((e|0)!=(d|0)){continue}break}}if((f|0)<1){break e}d=0;while(1){f=d<<2;g=o[f+n>>2];i=o[a+16>>2];g:{if((g|0)>(i|0)){h=o[a+32>>2];o[f+h>>2]=i;break g}h=o[a+32>>2];f=f+h|0;i=o[a+12>>2];if((g|0)<(i|0)){o[f>>2]=i;break g}o[f>>2]=g}d=d+1|0;f=o[a+8>>2];if((d|0)<(f|0)){continue}break}g=0;if((f|0)<1){break e}d=m<<2;m=d+c|0;i=b+d|0;while(1){f=g<<2;d=f+m|0;f=o[f+i>>2]+o[f+h>>2]|0;o[d>>2]=f;h:{if((f|0)>o[a+16>>2]){f=f-o[a+20>>2]|0}else{if((f|0)>=o[a+12>>2]){break h}f=f+o[a+20>>2]|0}o[d>>2]=f}g=g+1|0;f=o[a+8>>2];if((g|0)<(f|0)){continue}break}break e}Ok();D()}if((f|0)<1){break e}i=(u(j+ -1|0,e)<<2)+c|0;d=0;while(1){f=d<<2;g=o[f+i>>2];k=o[a+16>>2];i:{if((g|0)>(k|0)){h=o[a+32>>2];o[f+h>>2]=k;break i}h=o[a+32>>2];f=f+h|0;k=o[a+12>>2];if((g|0)<(k|0)){o[f>>2]=k;break i}o[f>>2]=g}d=d+1|0;f=o[a+8>>2];if((d|0)<(f|0)){continue}break}g=0;if((f|0)<1){break e}d=m<<2;m=d+c|0;i=b+d|0;while(1){f=g<<2;d=f+m|0;f=o[f+i>>2]+o[f+h>>2]|0;o[d>>2]=f;j:{if((f|0)>o[a+16>>2]){f=f-o[a+20>>2]|0}else{if((f|0)>=o[a+12>>2]){break j}f=f+o[a+20>>2]|0}o[d>>2]=f}g=g+1|0;f=o[a+8>>2];if((g|0)<(f|0)){continue}break}}j=j+1|0;if((s|0)!=(j|0)){continue}break}}jl(n);return 1}function Be(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0;o[a+8>>2]=e;f=a+32|0;g=o[f>>2];d=o[a+36>>2]-g>>2;a:{if(d>>>0>>0){Ia(f,e-d|0);break a}if(d>>>0<=e>>>0){break a}o[a+36>>2]=g+(e<<2)}q=o[a+52>>2];n=o[a+48>>2];d=0;f=(e&1073741823)!=(e|0)?-1:e<<2;m=ml(yk(f),0,f);f=o[a+8>>2];b:{if((f|0)<1){break b}while(1){f=d<<2;g=o[f+m>>2];i=o[a+16>>2];c:{if((g|0)>(i|0)){h=o[a+32>>2];o[f+h>>2]=i;break c}h=o[a+32>>2];f=f+h|0;i=o[a+12>>2];if((g|0)<(i|0)){o[f>>2]=i;break c}o[f>>2]=g}d=d+1|0;f=o[a+8>>2];if((d|0)<(f|0)){continue}break}if((f|0)<1){break b}g=0;while(1){f=g<<2;d=f+c|0;f=o[b+f>>2]+o[f+h>>2]|0;o[d>>2]=f;d:{if((f|0)>o[a+16>>2]){f=f-o[a+20>>2]|0}else{if((f|0)>=o[a+12>>2]){break d}f=f+o[a+20>>2]|0}o[d>>2]=f}g=g+1|0;f=o[a+8>>2];if((g|0)<(f|0)){continue}break}}d=o[a+56>>2];p=o[d>>2];d=o[d+4>>2]-p|0;if((d|0)>=5){d=d>>2;r=(d|0)>2?d:2;s=d>>>0>1?d:1;i=1;while(1){e:{f:{if((i|0)!=(s|0)){l=u(e,i);d=o[(i<<2)+p>>2];if((d|0)==-1|o[o[n>>2]+(d>>>3&536870908)>>2]>>>(d&31)&1){break f}d=o[o[o[n+64>>2]+12>>2]+(d<<2)>>2];if((d|0)==-1){break f}h=o[q>>2];g=o[n+28>>2];j=o[h+(o[g+(d<<2)>>2]<<2)>>2];if((j|0)>=(i|0)){break f}k=d+1|0;k=o[h+(o[g+(((k>>>0)%3|0?k:d+ -2|0)<<2)>>2]<<2)>>2];if((k|0)>=(i|0)){break f}d=o[h+(o[g+(d+((d>>>0)%3|0?-1:2)<<2)>>2]<<2)>>2];if((d|0)>=(i|0)){break f}if((e|0)>=1){g=u(d,e);h=u(e,k);j=u(e,j);d=0;while(1){o[(d<<2)+m>>2]=(o[(d+g<<2)+c>>2]+o[(d+h<<2)+c>>2]|0)-o[(d+j<<2)+c>>2];d=d+1|0;if((e|0)!=(d|0)){continue}break}}if((f|0)<1){break e}d=0;while(1){f=d<<2;g=o[f+m>>2];j=o[a+16>>2];g:{if((g|0)>(j|0)){h=o[a+32>>2];o[f+h>>2]=j;break g}h=o[a+32>>2];f=f+h|0;j=o[a+12>>2];if((g|0)<(j|0)){o[f>>2]=j;break g}o[f>>2]=g}d=d+1|0;f=o[a+8>>2];if((d|0)<(f|0)){continue}break}g=0;if((f|0)<1){break e}d=l<<2;l=d+c|0;j=b+d|0;while(1){f=g<<2;d=f+l|0;f=o[f+j>>2]+o[f+h>>2]|0;o[d>>2]=f;h:{if((f|0)>o[a+16>>2]){f=f-o[a+20>>2]|0}else{if((f|0)>=o[a+12>>2]){break h}f=f+o[a+20>>2]|0}o[d>>2]=f}g=g+1|0;f=o[a+8>>2];if((g|0)<(f|0)){continue}break}break e}Ok();D()}if((f|0)<1){break e}j=(u(i+ -1|0,e)<<2)+c|0;d=0;while(1){f=d<<2;g=o[f+j>>2];k=o[a+16>>2];i:{if((g|0)>(k|0)){h=o[a+32>>2];o[f+h>>2]=k;break i}h=o[a+32>>2];f=f+h|0;k=o[a+12>>2];if((g|0)<(k|0)){o[f>>2]=k;break i}o[f>>2]=g}d=d+1|0;f=o[a+8>>2];if((d|0)<(f|0)){continue}break}g=0;if((f|0)<1){break e}d=l<<2;l=d+c|0;j=b+d|0;while(1){f=g<<2;d=f+l|0;f=o[f+j>>2]+o[f+h>>2]|0;o[d>>2]=f;j:{if((f|0)>o[a+16>>2]){f=f-o[a+20>>2]|0}else{if((f|0)>=o[a+12>>2]){break j}f=f+o[a+20>>2]|0}o[d>>2]=f}g=g+1|0;f=o[a+8>>2];if((g|0)<(f|0)){continue}break}}i=i+1|0;if((r|0)!=(i|0)){continue}break}}jl(m);return 1}function Gi(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;d=R-48|0;R=d;if(b){u=a+12|0;k=o[a+4>>2];l=o[a>>2];h=k-l|0;g=h>>2;c=o[a+12>>2];e=o[a+16>>2]-c>>2;a:{if(g>>>0>e>>>0){Ji(u,g-e|0);k=o[a+4>>2];l=o[a>>2];h=k-l|0;g=h>>2;break a}if(g>>>0>=e>>>0){break a}o[a+16>>2]=c+(g<<2)}e=0;o[d+40>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;b:{c:{d:{if(!g){c=0;f=0;break d}if(g>>>0>=1073741824){break c}c=yk(h);o[d+36>>2]=c;o[d+32>>2]=c;o[d+40>>2]=(g<<2)+c;f=c}if(!h){break b}e=f;i=e;h=0;while(1){j=o[(h<<2)+l>>2];i=i-e>>2;if(j>>>0>=i>>>0){o[d+16>>2]=0;c=j+1|0;e:{if(c>>>0>i>>>0){Dd(d+32|0,c-i|0,d+16|0);l=o[a>>2];k=o[a+4>>2];break e}if(c>>>0>=i>>>0){break e}o[d+36>>2]=(c<<2)+e}c=o[d+32>>2];f=c}e=(j<<2)+c|0;o[e>>2]=o[e>>2]+1;h=h+1|0;e=k-l|0;g=e>>2;if(h>>>0>=g>>>0){break b}i=o[d+36>>2];e=c;continue}}db(10528);D()}o[d+24>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;h=0;f:{g:{if(e){if(g>>>0>=536870912){break g}h=yk(e<<1);o[d+16>>2]=h;j=g<<3;e=j+h|0;o[d+24>>2]=e;ml(h,255,j);o[d+20>>2]=e}o[d+8>>2]=0;o[d>>2]=0;o[d+4>>2]=0;f=o[d+36>>2]-f|0;n=f>>2;h:{if(f){if(n>>>0>=1073741824){break h}m=yk(f);o[d>>2]=m;e=(n<<2)+m|0;o[d+8>>2]=e;g=0;i=ml(m,0,f);o[d+4>>2]=e;j=n>>>0>1?n:1;e=0;while(1){f=e<<2;o[f+i>>2]=g;g=o[c+f>>2]+g|0;e=e+1|0;if((j|0)!=(e|0)){continue}break}}if((k|0)==(l|0)){break f}x=k-l>>2;j=0;v=o[d+32>>2];while(1){s=j<<2;r=o[s+l>>2];k=-1;e=j+1|0;c=(e>>>0)%3|0?e:j+ -2|0;if((c|0)!=-1){k=o[(c<<2)+l>>2]}p=-1;f=(j>>>0)%3|0;c=(f?-1:2)+j|0;if((c|0)!=-1){p=o[(c<<2)+l>>2]}i:{j:{if(f){break j}k:{if((k|0)==(p|0)){break k}c=o[l+s>>2];if((c|0)==(k|0)){break k}if((c|0)!=(p|0)){break j}}o[a+40>>2]=o[a+40>>2]+1;e=j+3|0;break i}c=p<<2;t=o[c+v>>2];l:{m:{if((t|0)<1){break m}c=o[c+m>>2];g=0;while(1){i=(c<<3)+h|0;f=o[i>>2];if((f|0)==-1){break m}n:{if((f|0)!=(k|0)){break n}q=o[i+4>>2];if((q|0)!=-1){f=o[(q<<2)+l>>2]}else{f=-1}if((f|0)==(r|0)){break n}while(1){o:{f=c;g=g+1|0;if((g|0)>=(t|0)){break o}w=(f<<3)+h|0;c=f+1|0;r=(c<<3)+h|0;i=o[r>>2];o[w>>2]=i;o[w+4>>2]=o[r+4>>2];if((i|0)!=-1){continue}}break}o[(f<<3)+h>>2]=-1;if((q|0)==-1){break m}c=o[u>>2];o[c+s>>2]=q;o[c+(q<<2)>>2]=j;break l}c=c+1|0;g=g+1|0;if((t|0)!=(g|0)){continue}break}}c=k<<2;f=o[c+v>>2];if((f|0)<1){break l}c=o[c+m>>2];g=0;while(1){i=(c<<3)+h|0;if(o[i>>2]==-1){o[i>>2]=p;o[i+4>>2]=j;break l}c=c+1|0;g=g+1|0;if((f|0)!=(g|0)){continue}break}}}j=e;if(j>>>0>>0){continue}break}break f}Nk();D()}Nk();D()}o[b>>2]=n;if(m){o[d+4>>2]=m;jl(m)}a=o[d+16>>2];if(a){o[d+20>>2]=a;jl(a)}a=o[d+32>>2];if(a){o[d+36>>2]=a;jl(a)}a=1}else{a=0}R=d+48|0;return a}function Ii(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0,p=0,q=0,r=0,s=0,t=0,v=0;h=R-48|0;R=h;o[a+36>>2]=b;n=a+24|0;e=o[a+24>>2];c=o[a+28>>2]-e>>2;a:{if(c>>>0>>0){Ji(n,b-c|0);break a}if(c>>>0<=b>>>0){break a}o[a+28>>2]=e+(b<<2)}m[h+16|0]=0;i=Ki(h+32|0,b,h+16|0);c=o[a>>2];e=o[a+4>>2];m[h+8|0]=0;p=Ki(h+16|0,e-c>>2,h+8|0);c=o[a>>2];b:{if(o[a+4>>2]-c>>2>>>0<3){break b}s=a+48|0;while(1){k=u(q,3);f=o[(k<<2)+c>>2];g=0;d=-1;e=k+1|0;c:{if((e|0)!=-1){d=o[(e<<2)+c>>2];g=k+2|0;e=-1;if((g|0)==-1){break c}}e=o[(g<<2)+c>>2]}d:{if(!((e|0)==(d|0)|(d|0)==(f|0)|(e|0)==(f|0))){j=o[p>>2];l=0;while(1){e=k+l|0;e:{if(o[(e>>>3&536870908)+j>>2]>>>(e&31)&1){break e}g=o[o[a>>2]+(e<<2)>>2];o[h+8>>2]=g;c=1<<(g&31);d=o[i>>2];g=g>>>5|0;j=o[d+(g<<2)>>2];f=0;f:{if(!(c&j)){break f}eh(n,10524);Li(s,h+8|0);c=o[i+4>>2];f=o[i+8>>2];if((c|0)==f<<5){if((c+1|0)<=-1){break d}d=i;if(c>>>0<=1073741822){c=c+32&-32;f=f<<6;c=f>>>0>>0?c:f}else{c=2147483647}fb(d,c);c=o[i+4>>2]}o[i+4>>2]=c+1;d=o[i>>2];f=d+(c>>>3&536870908)|0;g=o[f>>2];t=f,v=Sl(c)&g,o[t>>2]=v;o[h+8>>2]=b;c=1<<(b&31);g=b>>>5|0;j=o[(g<<2)+d>>2];b=b+1|0;f=1}o[(g<<2)+d>>2]=c|j;j=o[p>>2];c=e;g:{while(1){if((c|0)==-1){break g}d=(c>>>3&536870908)+j|0;o[d>>2]=o[d>>2]|1<<(c&31);d=o[h+8>>2];o[o[n>>2]+(d<<2)>>2]=c;if(f){o[o[a>>2]+(c<<2)>>2]=d}g=e;d=c+1|0;c=(d>>>0)%3|0?d:c+ -2|0;d=-1;h:{if((c|0)==-1){break h}c=o[o[a+12>>2]+(c<<2)>>2];d=-1;if((c|0)==-1){break h}d=c+1|0;d=(d>>>0)%3|0?d:c+ -2|0}c=d;if((g|0)!=(c|0)){continue}break}if((e|0)!=-1){break e}}c=e+((e>>>0)%3|0?-1:2)|0;if((c|0)==-1){break e}c=o[o[a+12>>2]+(c<<2)>>2];if((c|0)==-1){break e}c=c+((c>>>0)%3|0?-1:2)|0;if((c|0)==-1){break e}while(1){e=(c>>>3&536870908)+j|0;o[e>>2]=o[e>>2]|1<<(c&31);if(f){o[o[a>>2]+(c<<2)>>2]=o[h+8>>2]}c=((c>>>0)%3|0?-1:2)+c|0;if((c|0)==-1){break e}c=o[o[a+12>>2]+(c<<2)>>2];if((c|0)==-1){break e}c=c+((c>>>0)%3|0?-1:2)|0;if((c|0)!=-1){continue}break}}l=l+1|0;if((l|0)!=3){continue}break}}q=q+1|0;c=o[a>>2];if(q>>>0<(o[a+4>>2]-c>>2>>>0)/3>>>0){continue}break b}break}Nk();D()}o[a+44>>2]=0;b=o[i>>2];c=o[i+4>>2];e=c>>>5|0;f=c&31;if(e|f){e=(e<<2)+b|0;d=b;c=0;while(1){if(!(o[d>>2]>>>c&1)){r=r+1|0;o[a+44>>2]=r}g=(c|0)==31;c=g?0:c+1|0;d=g?d+4|0:d;if((e|0)!=(d|0)|(c|0)!=(f|0)){continue}break}}a=o[p>>2];if(a){jl(a);b=o[i>>2]}if(b){jl(b)}R=h+48|0}function pj(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;a:{b:{d=b;g=o[b>>2];if(g){c=o[b+4>>2];if(!c){break b}while(1){d=c;c=o[c>>2];if(c){continue}break}}g=o[d+4>>2];if(g){break b}g=0;e=0;break a}o[g+8>>2]=o[d+8>>2];e=1}f=o[d+8>>2];c=o[f>>2];c:{if((c|0)==(d|0)){o[f>>2]=g;if((a|0)==(d|0)){c=0;a=g;break c}c=o[f+4>>2];break c}o[f+4>>2]=g}d:{e:{f:{h=!p[d+12|0];if((b|0)!=(d|0)){f=o[b+8>>2];o[d+8>>2]=f;o[f+((o[o[b+8>>2]>>2]!=(b|0))<<2)>>2]=d;f=o[b>>2];o[d>>2]=f;o[f+8>>2]=d;f=o[b+4>>2];o[d+4>>2]=f;if(f){o[f+8>>2]=d}m[d+12|0]=p[b+12|0];a=(a|0)==(b|0)?d:a}if(!(h|!a)){if(!e){while(1){b=p[c+12|0];g:{e=o[c+8>>2];if(o[e>>2]!=(c|0)){if(!b){m[c+12|0]=1;m[e+12|0]=0;d=o[e+4>>2];b=o[d>>2];o[e+4>>2]=b;if(b){o[b+8>>2]=e}o[d+8>>2]=o[e+8>>2];b=o[e+8>>2];o[(((e|0)!=o[b>>2])<<2)+b>>2]=d;o[d>>2]=e;o[e+8>>2]=d;b=o[c>>2];a=(b|0)==(a|0)?c:a;c=o[b+4>>2]}d=o[c>>2];if(!(p[d+12|0]?0:d)){b=o[c+4>>2];if(p[b+12|0]?0:b){break f}m[c+12|0]=0;c=o[c+8>>2];h:{if((c|0)==(a|0)){c=a;break h}if(p[c+12|0]){break g}}m[c+12|0]=1;return}b=o[c+4>>2];if(b){break f}break e}i:{if(b){b=c;break i}m[c+12|0]=1;m[e+12|0]=0;b=o[c+4>>2];o[e>>2]=b;if(b){o[b+8>>2]=e}o[c+8>>2]=o[e+8>>2];d=o[e+8>>2];j:{if((e|0)==o[d>>2]){o[d>>2]=c;b=o[e>>2];break j}o[d+4>>2]=c}o[c+4>>2]=e;o[e+8>>2]=c;a=(a|0)==(e|0)?c:a}d=o[b>>2];k:{if(!(!d|p[d+12|0])){c=b;break k}c=o[b+4>>2];if(!(p[c+12|0]?0:c)){m[b+12|0]=0;c=o[b+8>>2];if(p[c+12|0]?(c|0)!=(a|0):0){break g}m[c+12|0]=1;return}if(!(p[d+12|0]|!d)){c=b;break k}m[c+12|0]=1;m[b+12|0]=0;a=o[c>>2];o[b+4>>2]=a;if(a){o[a+8>>2]=b}o[c+8>>2]=o[b+8>>2];a=o[b+8>>2];o[((o[a>>2]!=(b|0))<<2)+a>>2]=c;o[c>>2]=b;o[b+8>>2]=c;d=b}a=c;c=o[c+8>>2];m[a+12|0]=p[c+12|0];m[c+12|0]=1;m[d+12|0]=1;b=o[c>>2];a=o[b+4>>2];o[c>>2]=a;if(a){o[a+8>>2]=c}o[b+8>>2]=o[c+8>>2];a=o[c+8>>2];o[(((c|0)!=o[a>>2])<<2)+a>>2]=b;o[b+4>>2]=c;o[c+8>>2]=b;return}b=o[c+8>>2];c=o[((o[b>>2]==(c|0))<<2)+b>>2];continue}}m[g+12|0]=1}return}if(p[b+12|0]){break e}d=c;break d}m[d+12|0]=1;m[c+12|0]=0;a=o[d+4>>2];o[c>>2]=a;if(a){o[a+8>>2]=c}o[d+8>>2]=o[c+8>>2];a=o[c+8>>2];o[((o[a>>2]!=(c|0))<<2)+a>>2]=d;o[d+4>>2]=c;o[c+8>>2]=d;b=c}c=o[d+8>>2];m[d+12|0]=p[c+12|0];m[c+12|0]=1;m[b+12|0]=1;b=o[c+4>>2];a=o[b>>2];o[c+4>>2]=a;if(a){o[a+8>>2]=c}o[b+8>>2]=o[c+8>>2];a=o[c+8>>2];o[(((c|0)!=o[a>>2])<<2)+a>>2]=b;o[b>>2]=c;o[c+8>>2]=b}function mf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;h=R-32|0;R=h;o[a+68>>2]=f;d=o[a+56>>2];e=o[d>>2];f=o[d+4>>2];o[h+24>>2]=0;o[h+16>>2]=0;o[h+20>>2]=0;f=f-e|0;a:{if((f|0)<1){break a}e=o[d>>2];if((e|0)!=o[d+4>>2]){m=a+60|0;d=f>>2;n=(d|0)>1?d:1;p=a+108|0;while(1){nf(m,o[(k<<2)+e>>2],h+16|0);e=o[h+20>>2];g=e>>31;f=o[h+16>>2];i=f>>31;l=o[h+24>>2];j=l>>31;d=0;j=j^j+l;g=j+((g^e+g)+(i^f+i)|0)|0;if(g>>>0>>0){d=1}b:{if(!(d|g)){o[h+16>>2]=o[a+104>>2];break b}i=o[a+104>>2];j=i>>31;e=Pl(Ol(i,j,e,e>>31),T,g,d);o[h+20>>2]=e;d=Pl(Ol(i,j,f,f>>31),T,g,d);o[h+16>>2]=d;f=d;d=d>>31;d=(i-(f+d^d)|0)+((e|0)<0?e:0-e|0)|0;if((l|0)>=0){o[h+24>>2]=d;break b}o[h+24>>2]=0-d}d=Uf(p);f=o[h+16>>2];c:{if(!d){e=o[h+20>>2];break c}o[h+24>>2]=0-o[h+24>>2];e=0-o[h+20>>2]|0;o[h+20>>2]=e;f=0-f|0;o[h+16>>2]=f}d:{if((f|0)>=0){d=o[a+104>>2];f=d+o[h+24>>2]|0;d=d+e|0;break d}e:{if((e|0)<=-1){f=o[h+24>>2];d=f>>31;d=d^d+f;break e}f=o[h+24>>2];d=f>>31;d=o[a+100>>2]-(d^d+f)|0}if((f|0)<=-1){f=e;e=e>>31;f=f+e^e;break d}f=e;e=e>>31;f=o[a+100>>2]-(f+e^e)|0}f:{if(!(d|f)){f=o[a+100>>2];e=f;break f}g=o[a+100>>2];g:{h:{i:{if(!d){if((f|0)==(g|0)){e=f;break f}e=0;if(f|g){break i}f=0;break f}if(!((d|0)!=(g|0)|f)){f=d;e=d;break f}if((d|0)!=(g|0)){break g}i=o[a+104>>2];break h}i=o[a+104>>2];if((i|0)<(f|0)){f=(i<<1)-f|0;break f}if(g){break g}}g=d;if((i|0)<=(f|0)){break g}f=(i<<1)-f|0;e=d;break f}j:{if((f|0)!=(g|0)){break j}e=o[a+104>>2];if((e|0)<=(d|0)){break j}e=(e<<1)-d|0;break f}if(f){e=d;break f}f=0;e=o[a+104>>2];if((e|0)>=(d|0)){e=d;break f}e=(e<<1)-d|0}o[h+12>>2]=f;o[h+8>>2]=e;k:{if(o[a+8>>2]<1){break k}f=0;while(1){g=o[a+16>>2];l:{if((e|0)>(g|0)){d=o[a+32>>2];o[d+(f<<2)>>2]=g;break l}d=o[a+32>>2];g=d+(f<<2)|0;i=o[a+12>>2];if((e|0)<(i|0)){o[g>>2]=i;break l}o[g>>2]=e}f=f+1|0;g=o[a+8>>2];if((f|0)<(g|0)){e=o[(h+8|0)+(f<<2)>>2];continue}break}e=0;if((g|0)<1){break k}f=k<<3;i=f+c|0;l=b+f|0;while(1){g=e<<2;f=g+i|0;g=o[g+l>>2]+o[d+g>>2]|0;o[f>>2]=g;m:{if((g|0)>o[a+16>>2]){g=g-o[a+20>>2]|0}else{if((g|0)>=o[a+12>>2]){break m}g=g+o[a+20>>2]|0}o[f>>2]=g}e=e+1|0;if((e|0)>2]){continue}break}}k=k+1|0;if((n|0)==(k|0)){break a}d=o[a+56>>2];e=o[d>>2];if(o[d+4>>2]-e>>2>>>0>k>>>0){continue}break}}Ok();D()}R=h+32|0;return 1}function Ye(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;h=R-32|0;R=h;o[a+68>>2]=f;d=o[a+56>>2];e=o[d>>2];f=o[d+4>>2];o[h+24>>2]=0;o[h+16>>2]=0;o[h+20>>2]=0;f=f-e|0;a:{if((f|0)<1){break a}e=o[d>>2];if((e|0)!=o[d+4>>2]){m=a+60|0;d=f>>2;n=(d|0)>1?d:1;p=a+108|0;while(1){Ze(m,o[(k<<2)+e>>2],h+16|0);e=o[h+20>>2];g=e>>31;f=o[h+16>>2];i=f>>31;l=o[h+24>>2];j=l>>31;d=0;j=j^j+l;g=j+((g^e+g)+(i^f+i)|0)|0;if(g>>>0>>0){d=1}b:{if(!(d|g)){o[h+16>>2]=o[a+104>>2];break b}i=o[a+104>>2];j=i>>31;e=Pl(Ol(i,j,e,e>>31),T,g,d);o[h+20>>2]=e;d=Pl(Ol(i,j,f,f>>31),T,g,d);o[h+16>>2]=d;f=d;d=d>>31;d=(i-(f+d^d)|0)+((e|0)<0?e:0-e|0)|0;if((l|0)>=0){o[h+24>>2]=d;break b}o[h+24>>2]=0-d}d=Uf(p);f=o[h+16>>2];c:{if(!d){e=o[h+20>>2];break c}o[h+24>>2]=0-o[h+24>>2];e=0-o[h+20>>2]|0;o[h+20>>2]=e;f=0-f|0;o[h+16>>2]=f}d:{if((f|0)>=0){d=o[a+104>>2];f=d+o[h+24>>2]|0;d=d+e|0;break d}e:{if((e|0)<=-1){f=o[h+24>>2];d=f>>31;d=d^d+f;break e}f=o[h+24>>2];d=f>>31;d=o[a+100>>2]-(d^d+f)|0}if((f|0)<=-1){f=e;e=e>>31;f=f+e^e;break d}f=e;e=e>>31;f=o[a+100>>2]-(f+e^e)|0}f:{if(!(d|f)){f=o[a+100>>2];e=f;break f}g=o[a+100>>2];g:{h:{i:{if(!d){if((f|0)==(g|0)){e=f;break f}e=0;if(f|g){break i}f=0;break f}if(!((d|0)!=(g|0)|f)){f=d;e=d;break f}if((d|0)!=(g|0)){break g}i=o[a+104>>2];break h}i=o[a+104>>2];if((i|0)<(f|0)){f=(i<<1)-f|0;break f}if(g){break g}}g=d;if((i|0)<=(f|0)){break g}f=(i<<1)-f|0;e=d;break f}j:{if((f|0)!=(g|0)){break j}e=o[a+104>>2];if((e|0)<=(d|0)){break j}e=(e<<1)-d|0;break f}if(f){e=d;break f}f=0;e=o[a+104>>2];if((e|0)>=(d|0)){e=d;break f}e=(e<<1)-d|0}o[h+12>>2]=f;o[h+8>>2]=e;k:{if(o[a+8>>2]<1){break k}f=0;while(1){g=o[a+16>>2];l:{if((e|0)>(g|0)){d=o[a+32>>2];o[d+(f<<2)>>2]=g;break l}d=o[a+32>>2];g=d+(f<<2)|0;i=o[a+12>>2];if((e|0)<(i|0)){o[g>>2]=i;break l}o[g>>2]=e}f=f+1|0;g=o[a+8>>2];if((f|0)<(g|0)){e=o[(h+8|0)+(f<<2)>>2];continue}break}e=0;if((g|0)<1){break k}f=k<<3;i=f+c|0;l=b+f|0;while(1){g=e<<2;f=g+i|0;g=o[g+l>>2]+o[d+g>>2]|0;o[f>>2]=g;m:{if((g|0)>o[a+16>>2]){g=g-o[a+20>>2]|0}else{if((g|0)>=o[a+12>>2]){break m}g=g+o[a+20>>2]|0}o[f>>2]=g}e=e+1|0;if((e|0)>2]){continue}break}}k=k+1|0;if((n|0)==(k|0)){break a}d=o[a+56>>2];e=o[d>>2];if(o[d+4>>2]-e>>2>>>0>k>>>0){continue}break}}Ok();D()}R=h+32|0;return 1}function te(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0;a:{b:{c:{d:{b=b+ -1|0;e:{if(b>>>0>5){break e}f:{switch(b-1|0){default:b=yk(60);o[b+4>>2]=c;o[b>>2]=2732;c=o[d+8>>2];f=o[d+12>>2];g=o[d+16>>2];h=o[d+20>>2];i=o[d>>2];j=o[d+4>>2];o[b+40>>2]=0;o[b+32>>2]=0;o[b+36>>2]=0;o[b+24>>2]=g;o[b+28>>2]=h;o[b+16>>2]=c;o[b+20>>2]=f;o[b+8>>2]=i;o[b+12>>2]=j;f=o[d+24>>2];c=o[d+28>>2]-f|0;g:{if(!c){break g}g=c>>2;if(g>>>0>=1073741824){break d}d=yk(c);o[b+32>>2]=d;o[b+36>>2]=d;o[b+40>>2]=d+(g<<2);if((c|0)<1){break g}k=b,l=ll(d,f,c)+c|0,o[k+36>>2]=l}c=o[e+4>>2];o[b+44>>2]=o[e>>2];o[b+48>>2]=c;c=o[e+12>>2];o[b+52>>2]=o[e+8>>2];o[b+56>>2]=c;o[b>>2]=3928;break a;case 2:b=yk(112);o[b+4>>2]=c;o[b>>2]=2732;c=o[d+8>>2];f=o[d+12>>2];g=o[d+16>>2];h=o[d+20>>2];i=o[d>>2];j=o[d+4>>2];o[b+40>>2]=0;o[b+32>>2]=0;o[b+36>>2]=0;o[b+24>>2]=g;o[b+28>>2]=h;o[b+16>>2]=c;o[b+20>>2]=f;o[b+8>>2]=i;o[b+12>>2]=j;f=o[d+24>>2];c=o[d+28>>2]-f|0;h:{if(!c){break h}g=c>>2;if(g>>>0>=1073741824){break c}d=yk(c);o[b+32>>2]=d;o[b+36>>2]=d;o[b+40>>2]=d+(g<<2);if((c|0)<1){break h}k=b,l=ll(d,f,c)+c|0,o[k+36>>2]=l}c=o[e+4>>2];o[b+44>>2]=o[e>>2];o[b+48>>2]=c;c=o[e+12>>2];o[b+52>>2]=o[e+8>>2];o[b+56>>2]=c;o[b+60>>2]=0;o[b+64>>2]=0;o[b>>2]=4352;o[b+68>>2]=0;o[b+72>>2]=0;o[b+76>>2]=0;o[b+80>>2]=0;o[b+84>>2]=0;o[b+88>>2]=0;o[b+92>>2]=0;o[b+96>>2]=0;o[b+100>>2]=0;o[b+104>>2]=0;o[b+108>>2]=0;break a;case 3:b=yk(104);o[b+4>>2]=c;o[b>>2]=2732;c=o[d+8>>2];f=o[d+12>>2];g=o[d+16>>2];h=o[d+20>>2];i=o[d>>2];j=o[d+4>>2];o[b+40>>2]=0;o[b+32>>2]=0;o[b+36>>2]=0;o[b+24>>2]=g;o[b+28>>2]=h;o[b+16>>2]=c;o[b+20>>2]=f;o[b+8>>2]=i;o[b+12>>2]=j;f=o[d+24>>2];c=o[d+28>>2]-f|0;i:{if(!c){break i}g=c>>2;if(g>>>0>=1073741824){break b}d=yk(c);o[b+32>>2]=d;o[b+36>>2]=d;o[b+40>>2]=d+(g<<2);if((c|0)<1){break i}k=b,l=ll(d,f,c)+c|0,o[k+36>>2]=l}c=o[e+4>>2];o[b+44>>2]=o[e>>2];o[b+48>>2]=c;c=e+8|0;d=o[c>>2];f=o[c+4>>2];o[b+84>>2]=0;o[b+76>>2]=0;o[b+80>>2]=0;o[b+60>>2]=0;o[b+64>>2]=0;o[b>>2]=4588;o[b+52>>2]=d;o[b+56>>2]=f;d=o[e+4>>2];o[b+88>>2]=o[e>>2];o[b+92>>2]=d;d=o[c+4>>2];o[b+96>>2]=o[c>>2];o[b+100>>2]=d;break a;case 0:case 1:break e;case 4:break f}}f=yk(124);af(f,c,d,e)}o[a>>2]=f;return}Nk();D()}Nk();D()}Nk();D()}o[a>>2]=b}function se(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0;a:{b:{c:{d:{b=b+ -1|0;e:{if(b>>>0>5){break e}f:{switch(b-1|0){default:b=yk(60);o[b+4>>2]=c;o[b>>2]=2732;c=o[d+8>>2];f=o[d+12>>2];g=o[d+16>>2];h=o[d+20>>2];i=o[d>>2];j=o[d+4>>2];o[b+40>>2]=0;o[b+32>>2]=0;o[b+36>>2]=0;o[b+24>>2]=g;o[b+28>>2]=h;o[b+16>>2]=c;o[b+20>>2]=f;o[b+8>>2]=i;o[b+12>>2]=j;f=o[d+24>>2];c=o[d+28>>2]-f|0;g:{if(!c){break g}g=c>>2;if(g>>>0>=1073741824){break d}d=yk(c);o[b+32>>2]=d;o[b+36>>2]=d;o[b+40>>2]=d+(g<<2);if((c|0)<1){break g}k=b,l=ll(d,f,c)+c|0,o[k+36>>2]=l}c=o[e+4>>2];o[b+44>>2]=o[e>>2];o[b+48>>2]=c;c=o[e+12>>2];o[b+52>>2]=o[e+8>>2];o[b+56>>2]=c;o[b>>2]=2024;break a;case 2:b=yk(112);o[b+4>>2]=c;o[b>>2]=2732;c=o[d+8>>2];f=o[d+12>>2];g=o[d+16>>2];h=o[d+20>>2];i=o[d>>2];j=o[d+4>>2];o[b+40>>2]=0;o[b+32>>2]=0;o[b+36>>2]=0;o[b+24>>2]=g;o[b+28>>2]=h;o[b+16>>2]=c;o[b+20>>2]=f;o[b+8>>2]=i;o[b+12>>2]=j;f=o[d+24>>2];c=o[d+28>>2]-f|0;h:{if(!c){break h}g=c>>2;if(g>>>0>=1073741824){break c}d=yk(c);o[b+32>>2]=d;o[b+36>>2]=d;o[b+40>>2]=d+(g<<2);if((c|0)<1){break h}k=b,l=ll(d,f,c)+c|0,o[k+36>>2]=l}c=o[e+4>>2];o[b+44>>2]=o[e>>2];o[b+48>>2]=c;c=o[e+12>>2];o[b+52>>2]=o[e+8>>2];o[b+56>>2]=c;o[b+60>>2]=0;o[b+64>>2]=0;o[b>>2]=2788;o[b+68>>2]=0;o[b+72>>2]=0;o[b+76>>2]=0;o[b+80>>2]=0;o[b+84>>2]=0;o[b+88>>2]=0;o[b+92>>2]=0;o[b+96>>2]=0;o[b+100>>2]=0;o[b+104>>2]=0;o[b+108>>2]=0;break a;case 3:b=yk(104);o[b+4>>2]=c;o[b>>2]=2732;c=o[d+8>>2];f=o[d+12>>2];g=o[d+16>>2];h=o[d+20>>2];i=o[d>>2];j=o[d+4>>2];o[b+40>>2]=0;o[b+32>>2]=0;o[b+36>>2]=0;o[b+24>>2]=g;o[b+28>>2]=h;o[b+16>>2]=c;o[b+20>>2]=f;o[b+8>>2]=i;o[b+12>>2]=j;f=o[d+24>>2];c=o[d+28>>2]-f|0;i:{if(!c){break i}g=c>>2;if(g>>>0>=1073741824){break b}d=yk(c);o[b+32>>2]=d;o[b+36>>2]=d;o[b+40>>2]=d+(g<<2);if((c|0)<1){break i}k=b,l=ll(d,f,c)+c|0,o[k+36>>2]=l}c=o[e+4>>2];o[b+44>>2]=o[e>>2];o[b+48>>2]=c;c=e+8|0;d=o[c>>2];f=o[c+4>>2];o[b+84>>2]=0;o[b+76>>2]=0;o[b+80>>2]=0;o[b+60>>2]=0;o[b+64>>2]=0;o[b>>2]=3036;o[b+52>>2]=d;o[b+56>>2]=f;d=o[e+4>>2];o[b+88>>2]=o[e>>2];o[b+92>>2]=d;d=o[c+4>>2];o[b+96>>2]=o[c>>2];o[b+100>>2]=d;break a;case 0:case 1:break e;case 4:break f}}f=yk(124);ue(f,c,d,e)}o[a>>2]=f;return}Nk();D()}Nk();D()}Nk();D()}o[a>>2]=b}function If(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0;g=R-48|0;R=g;d=o[a+8>>2];if(d+ -2>>>0<=28){o[a+72>>2]=d;d=-1<>2]=e;o[a+76>>2]=d^-1;o[a+84>>2]=(e|0)/2}o[a+48>>2]=f;e=o[a+36>>2];d=o[e>>2];f=o[e+4>>2];o[g+16>>2]=0;o[g+8>>2]=0;o[g+12>>2]=0;f=f-d|0;a:{if((f|0)<1){break a}d=o[e>>2];if((d|0)!=o[e+4>>2]){m=a+8|0;n=a+40|0;e=f>>2;p=(e|0)>1?e:1;q=a+88|0;while(1){nf(n,o[(k<<2)+d>>2],g+8|0);e=o[g+12>>2];h=e>>31;f=o[g+8>>2];i=f>>31;l=o[g+16>>2];j=l>>31;d=0;j=j^j+l;h=j+((h^e+h)+(i^f+i)|0)|0;if(h>>>0>>0){d=1}b:{if(!(d|h)){o[g+8>>2]=o[a+84>>2];break b}i=o[a+84>>2];j=i>>31;e=Pl(Ol(i,j,e,e>>31),T,h,d);o[g+12>>2]=e;d=Pl(Ol(i,j,f,f>>31),T,h,d);o[g+8>>2]=d;f=d;d=d>>31;d=(i-(f+d^d)|0)+((e|0)<0?e:0-e|0)|0;if((l|0)>=0){o[g+16>>2]=d;break b}o[g+16>>2]=0-d}d=Uf(q);f=o[g+8>>2];c:{if(!d){e=o[g+12>>2];break c}o[g+16>>2]=0-o[g+16>>2];e=0-o[g+12>>2]|0;o[g+12>>2]=e;f=0-f|0;o[g+8>>2]=f}d:{if((f|0)>=0){d=o[a+84>>2];f=d+o[g+16>>2]|0;d=d+e|0;break d}e:{if((e|0)<=-1){f=o[g+16>>2];d=f>>31;d=d^d+f;break e}f=o[g+16>>2];d=f>>31;d=o[a+80>>2]-(d^d+f)|0}if((f|0)<=-1){f=e;e=e>>31;f=f+e^e;break d}f=e;e=e>>31;f=o[a+80>>2]-(f+e^e)|0}f:{if(!(d|f)){f=o[a+80>>2];e=f;break f}h=o[a+80>>2];g:{h:{i:{if(!d){if((f|0)==(h|0)){e=f;break f}e=0;if(f|h){break i}f=0;break f}if(!((d|0)!=(h|0)|f)){f=d;e=d;break f}if((d|0)!=(h|0)){break g}i=o[a+84>>2];break h}i=o[a+84>>2];if((i|0)<(f|0)){f=(i<<1)-f|0;break f}if(h){break g}}h=d;if((i|0)<=(f|0)){break g}f=(i<<1)-f|0;e=d;break f}j:{if((f|0)!=(h|0)){break j}e=o[a+84>>2];if((e|0)<=(d|0)){break j}e=(e<<1)-d|0;break f}if(f){e=d;break f}f=0;e=o[a+84>>2];if((e|0)>=(d|0)){e=d;break f}e=(e<<1)-d|0}d=k<<3;h=d+b|0;i=o[h+4>>2];h=o[h>>2];o[g+36>>2]=f;o[g+32>>2]=e;o[g+24>>2]=h;o[g+28>>2]=i;Ef(g+40|0,m,g+32|0,g+24|0);d=c+d|0;o[d>>2]=o[g+40>>2];o[d+4>>2]=o[g+44>>2];k=k+1|0;if((p|0)==(k|0)){break a}e=o[a+36>>2];d=o[e>>2];if(o[e+4>>2]-d>>2>>>0>k>>>0){continue}break}}Ok();D()}R=g+48|0;return 1}function Df(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0;g=R-48|0;R=g;d=o[a+8>>2];if(d+ -2>>>0<=28){o[a+72>>2]=d;d=-1<>2]=e;o[a+76>>2]=d^-1;o[a+84>>2]=(e|0)/2}o[a+48>>2]=f;e=o[a+36>>2];d=o[e>>2];f=o[e+4>>2];o[g+16>>2]=0;o[g+8>>2]=0;o[g+12>>2]=0;f=f-d|0;a:{if((f|0)<1){break a}d=o[e>>2];if((d|0)!=o[e+4>>2]){m=a+8|0;n=a+40|0;e=f>>2;p=(e|0)>1?e:1;q=a+88|0;while(1){Ze(n,o[(k<<2)+d>>2],g+8|0);e=o[g+12>>2];h=e>>31;f=o[g+8>>2];i=f>>31;l=o[g+16>>2];j=l>>31;d=0;j=j^j+l;h=j+((h^e+h)+(i^f+i)|0)|0;if(h>>>0>>0){d=1}b:{if(!(d|h)){o[g+8>>2]=o[a+84>>2];break b}i=o[a+84>>2];j=i>>31;e=Pl(Ol(i,j,e,e>>31),T,h,d);o[g+12>>2]=e;d=Pl(Ol(i,j,f,f>>31),T,h,d);o[g+8>>2]=d;f=d;d=d>>31;d=(i-(f+d^d)|0)+((e|0)<0?e:0-e|0)|0;if((l|0)>=0){o[g+16>>2]=d;break b}o[g+16>>2]=0-d}d=Uf(q);f=o[g+8>>2];c:{if(!d){e=o[g+12>>2];break c}o[g+16>>2]=0-o[g+16>>2];e=0-o[g+12>>2]|0;o[g+12>>2]=e;f=0-f|0;o[g+8>>2]=f}d:{if((f|0)>=0){d=o[a+84>>2];f=d+o[g+16>>2]|0;d=d+e|0;break d}e:{if((e|0)<=-1){f=o[g+16>>2];d=f>>31;d=d^d+f;break e}f=o[g+16>>2];d=f>>31;d=o[a+80>>2]-(d^d+f)|0}if((f|0)<=-1){f=e;e=e>>31;f=f+e^e;break d}f=e;e=e>>31;f=o[a+80>>2]-(f+e^e)|0}f:{if(!(d|f)){f=o[a+80>>2];e=f;break f}h=o[a+80>>2];g:{h:{i:{if(!d){if((f|0)==(h|0)){e=f;break f}e=0;if(f|h){break i}f=0;break f}if(!((d|0)!=(h|0)|f)){f=d;e=d;break f}if((d|0)!=(h|0)){break g}i=o[a+84>>2];break h}i=o[a+84>>2];if((i|0)<(f|0)){f=(i<<1)-f|0;break f}if(h){break g}}h=d;if((i|0)<=(f|0)){break g}f=(i<<1)-f|0;e=d;break f}j:{if((f|0)!=(h|0)){break j}e=o[a+84>>2];if((e|0)<=(d|0)){break j}e=(e<<1)-d|0;break f}if(f){e=d;break f}f=0;e=o[a+84>>2];if((e|0)>=(d|0)){e=d;break f}e=(e<<1)-d|0}d=k<<3;h=d+b|0;i=o[h+4>>2];h=o[h>>2];o[g+36>>2]=f;o[g+32>>2]=e;o[g+24>>2]=h;o[g+28>>2]=i;Ef(g+40|0,m,g+32|0,g+24|0);d=c+d|0;o[d>>2]=o[g+40>>2];o[d+4>>2]=o[g+44>>2];k=k+1|0;if((p|0)==(k|0)){break a}e=o[a+36>>2];d=o[e>>2];if(o[e+4>>2]-d>>2>>>0>k>>>0){continue}break}}Ok();D()}R=g+48|0;return 1}function Hi(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0,p=0,q=0,r=0,s=0;f=R-32|0;R=f;n=o[a>>2];c=o[a+4>>2];m[f|0]=0;p=Ki(f+16|0,c-n>>2,f);o[f+8>>2]=0;o[f>>2]=0;o[f+4>>2]=0;g=o[a>>2];b=o[a+4>>2];a:{b:{while(1){c:{r=0;j=0;if((b|0)==(g|0)){break c}while(1){h=o[p>>2];d:{if(o[h+(j>>>3&536870908)>>2]>>>(j&31)&1){break d}i=o[f>>2];o[f+4>>2]=i;b=j;while(1){e:{c=b+1|0;n=b;c=(c>>>0)%3|0?c:b+ -2|0;if((c|0)==-1){break e}d=o[o[a+12>>2]+(c<<2)>>2];if((d|0)==-1){break e}c=d+1|0;b=(c>>>0)%3|0?c:d+ -2|0;if((j|0)==(b|0)|(b|0)==-1){break e}if(!(o[(b>>>3&536870908)+h>>2]>>>(b&31)&1)){continue}}break}d=i;b=d;e=n;while(1){c=(e>>>3&536870908)+h|0;o[c>>2]=o[c>>2]|1<<(e&31);c=e+1|0;c=(c>>>0)%3|0?c:e+ -2|0;l=((e>>>0)%3|0?-1:2)+e|0;if((b|0)!=(d|0)){h=o[(c<<2)+g>>2];while(1){f:{if((h|0)!=o[b>>2]){break f}e=-1;k=o[b+4>>2];e=(l|0)!=-1?o[o[a+12>>2]+(l<<2)>>2]:e;if((k|0)==(e|0)){break f}d=-1;d=(k|0)!=-1?o[o[a+12>>2]+(k<<2)>>2]:d;if((e|0)!=-1){o[o[a+12>>2]+(e<<2)>>2]=-1}c=o[a+12>>2];if((d|0)!=-1){o[c+(d<<2)>>2]=-1}o[c+(l<<2)>>2]=-1;o[c+(k<<2)>>2]=-1;r=1;break d}b=b+8|0;if((d|0)!=(b|0)){continue}break}}k=l<<2;h=o[k+g>>2];b=o[f+8>>2];g:{if((b|0)!=(d|0)){o[d>>2]=h;o[d+4>>2]=c;o[f+4>>2]=o[f+4>>2]+8;break g}q=d-i|0;d=q>>3;g=d+1|0;if(g>>>0>=536870912){break b}s=d<<3;e=b-i|0;b=e>>2;g=e>>3>>>0<268435455?b>>>0>>0?g:b:536870911;d=0;h:{if(!g){break h}if(g>>>0>=536870912){break a}d=yk(g<<3)}e=s+d|0;b=e;o[b>>2]=h;o[b+4>>2]=c;b=d+(g<<3)|0;c=e+8|0;if((q|0)>=1){ll(d,i,q)}o[f+8>>2]=b;o[f+4>>2]=c;o[f>>2]=d;if(!i){break g}jl(i)}i:{if((l|0)==-1){break i}c=o[k+o[a+12>>2]>>2];if((c|0)==-1){break i}e=c+((c>>>0)%3|0?-1:2)|0;if((n|0)==(e|0)|(e|0)==-1){break i}g=o[a>>2];h=o[p>>2];d=o[f+4>>2];i=o[f>>2];b=i;continue}break}g=o[a>>2]}j=j+1|0;b=o[a+4>>2];if(j>>>0>2>>>0){continue}break}if(r){continue}}break}a=o[f>>2];if(a){o[f+4>>2]=a;jl(a)}a=o[p>>2];if(a){jl(a)}R=f+32|0;return}Nk();D()}db(10528);D()}function aj(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0;d=R-48|0;R=d;c=yk(8);o[c+4>>2]=b;o[c>>2]=0;b=c+8|0;o[d+40>>2]=b;o[d+36>>2]=b;o[d+32>>2]=c;a:{b:{c:{d:{while(1){b=b+ -8|0;i=o[b+4>>2];n=o[b>>2];o[d+36>>2]=b;if(n){o[d+24>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;j=1;b=o[a>>2];g=o[b+16>>2];f=o[b+12>>2];c=o[b+20>>2];e:{if((f|0)<(c|0)?1:(f|0)<=(c|0)?r[b+8>>2]>g>>>0?0:1:0){break e}e=p[g+o[b>>2]|0];f=g+1|0;if(f>>>0<1){c=c+1|0}o[b+16>>2]=f;o[b+20>>2]=c;Gk(d+16|0,e);if(e){f=o[a>>2];l=Kk(d+16|0);h=o[f+12>>2];g=o[f+20>>2];k=o[f+16>>2];b=e;c=k+b|0;if(c>>>0>>0){g=g+1|0}if((h|0)<(g|0)?1:(h|0)<=(g|0)?r[f+8>>2]>=c>>>0?0:1:0){break e}ll(l,k+o[f>>2]|0,e);c=f;f=c;g=o[c+20>>2];e=b+o[c+16>>2]|0;if(e>>>0>>0){g=g+1|0}o[f+16>>2]=e;o[c+20>>2]=g}i=yk(24);b=i;o[b+4>>2]=0;o[b+8>>2]=0;o[b+16>>2]=0;o[b+20>>2]=0;o[b>>2]=b+4;o[b+12>>2]=b+16;o[d+8>>2]=b;oj(n,d+16|0,d+8|0);b=o[d+8>>2];j=0;o[d+8>>2]=0;if(!b){break e}Kc(b+12|0,o[b+16>>2]);Lc(b,o[b+4>>2]);jl(b)}if(m[d+27|0]<=-1){jl(o[d+16>>2])}if(j){break b}}if(!i){break b}o[d+16>>2]=0;if(!bj(1,d+16|0,o[a>>2])){break b}b=0;c=o[d+16>>2];if(c){while(1){if(!cj(a,i)){break b}b=b+1|0;if((c|0)!=(b|0)){continue}break}}o[d+4>>2]=0;if(!bj(1,d+4|0,o[a>>2])){break b}g=o[d+4>>2];if(g){j=0;while(1){b=o[d+36>>2];c=o[d+40>>2];f:{if(b>>>0>>0){o[b+4>>2]=0;o[b>>2]=i;o[d+36>>2]=o[d+36>>2]+8;break f}h=o[d+32>>2];l=b-h|0;b=l>>3;k=b+1|0;if(k>>>0>=536870912){break d}f=b<<3;e=c-h|0;c=e>>2;e=e>>3>>>0<268435455?c>>>0>>0?k:c:536870911;b=0;g:{if(!e){break g}if(e>>>0>=536870912){break c}b=yk(e<<3)}c=f+b|0;o[c+4>>2]=0;o[c>>2]=i;e=b+(e<<3)|0;c=c+8|0;if((l|0)>=1){ll(b,h,l)}o[d+40>>2]=e;o[d+36>>2]=c;o[d+32>>2]=b;if(!h){break f}jl(h)}j=j+1|0;if((g|0)!=(j|0)){continue}break}}b=o[d+36>>2];c=o[d+32>>2];if((b|0)!=(c|0)){continue}break}a=1;break a}Nk();D()}db(10856);D()}c=o[d+32>>2];a=0}if(c){o[d+36>>2]=c;jl(c)}R=d+48|0;return a}function ke(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,q=0,s=0,t=0;a:{q=l[o[o[a>>2]+44>>2]](a)|0;if((q|0)<1){break a}h=o[b+4>>2]-o[b>>2]>>2;le(a,h,q);d=o[a+16>>2];if(!o[d+80>>2]){break a}f=o[o[d>>2]>>2];if(!f){break a}j=o[c+8>>2];i=o[c+16>>2];g=o[c+12>>2];k=g;e=o[c+20>>2];if((k|0)<(e|0)?1:(k|0)<=(e|0)?j>>>0>i>>>0?0:1:0){break a}k=u(h,q);n=f+o[d+48>>2]|0;s=o[c>>2];t=p[s+i|0];h=c;d=e;f=i+1|0;if(f>>>0<1){d=d+1|0}m=f;f=d;o[h+16>>2]=m;o[h+20>>2]=d;b:{c:{d:{if(t){if(dg(k,q,c,n)){break d}break a}if((g|0)<(f|0)?1:(g|0)<=(f|0)?j>>>0>m>>>0?0:1:0){break a}h=p[m+s|0];d=e;e=i+2|0;if(e>>>0<2){d=d+1|0}o[c+16>>2]=e;o[c+20>>2]=d;d=xi(5);e=o[o[a+16>>2]+64>>2];e=o[e+4>>2]-o[e>>2]|0;e:{if((d|0)==(h|0)){h=k<<2;if(e>>>0>>0){break a}f=o[c+12>>2];d=o[c+20>>2];i=o[c+16>>2];e=h;g=i+e|0;if(g>>>0>>0){d=d+1|0}if((f|0)>(d|0)?1:(f|0)>=(d|0)?r[c+8>>2]>>0?0:1:0){break e}break a}if(e>>>0>>0){break a}i=o[c+12>>2];d=o[c+20>>2];j=o[c+8>>2];f=j;m=o[c+16>>2];g=m;e=h;t=f-g>>>0>=Ol(e,0,k,0)>>>0?0:1;f=i-(d+(f>>>0>>0)|0)|0;g=T;if((f|0)<(g|0)?1:(f|0)<=(g|0)?t:0){break a}f=0;if(!k){break c}g=0;f=j;j=e+m|0;if(j>>>0>>0){d=d+1|0}if((i|0)<(d|0)?1:(i|0)<=(d|0)?f>>>0>=j>>>0?0:1:0){break b}j=0;while(1){ll(n+(j<<2)|0,m+o[c>>2]|0,h);d=o[c+20>>2];m=e+o[c+16>>2]|0;if(m>>>0>>0){d=d+1|0}o[c+16>>2]=m;o[c+20>>2]=d;j=j+1|0;if((k|0)==(j|0)){break d}i=o[c+12>>2];s=e+m|0;if(s>>>0>>0){d=d+1|0}if((i|0)>(d|0)?1:(i|0)>=(d|0)?r[c+8>>2]>>0?0:1:0){continue}break}break b}ll(n,i+o[c>>2]|0,h);d=o[c+20>>2];f=e+o[c+16>>2]|0;if(f>>>0>>0){d=d+1|0}o[c+16>>2]=f;o[c+20>>2]=d}f=0;if(!k){break c}e=o[a+20>>2];if(e){f=1;if(l[o[o[e>>2]+32>>2]](e)){break c}}ni(n,k,n);f=1}e=o[a+20>>2];f:{if(!e){break f}if(!l[o[o[e>>2]+40>>2]](e,c)){break a}if(!f){break f}g=0;a=o[a+20>>2];if(!l[o[o[a>>2]+44>>2]](a,n,n,k,q,o[b>>2])){break b}}g=1}return g|0}return 0}function Qg(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0;d=R+ -64|0;R=d;f=o[o[b+4>>2]+44>>2];e=yk(80);o[e+12>>2]=0;o[e+16>>2]=0;o[e>>2]=9408;o[e+4>>2]=0;o[e+76>>2]=0;o[e+72>>2]=c;o[e+68>>2]=f;o[e+64>>2]=0;o[e+56>>2]=0;o[e+60>>2]=0;o[e+8>>2]=9572;g=e+20|0;o[g>>2]=0;o[g+4>>2]=0;l=e+28|0;i=l;o[i>>2]=0;o[i+4>>2]=0;o[e+36>>2]=0;o[e+40>>2]=0;i=e+44|0;o[i>>2]=0;o[i+4>>2]=0;o[e+52>>2]=0;b=o[b+8>>2];n=d+40|0;j=n;o[j>>2]=0;o[j+4>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;j=d+16|0;h=j;o[h>>2]=0;o[h+4>>2]=0;o[d+56>>2]=0;o[d+24>>2]=0;o[d+28>>2]=0;o[d+8>>2]=0;o[d+12>>2]=0;o[d+48>>2]=0;o[d+52>>2]=0;o[d>>2]=9572;o[d+4>>2]=b;h=o[b>>2];k=o[b+4>>2];m[d+63|0]=0;eb(d+24|0,(k-h>>2>>>0)/3|0,d+63|0);h=o[d+4>>2];k=o[h+28>>2];h=o[h+24>>2];m[d+63|0]=0;eb(d+36|0,k-h>>2,d+63|0);o[d+20>>2]=e;o[j>>2]=f;f=d+12|0;o[f>>2]=c;o[d+8>>2]=b;o[l>>2]=e;b=o[f+4>>2];o[g>>2]=o[f>>2];o[g+4>>2]=b;b=o[d+8>>2];o[e+12>>2]=o[d+4>>2];o[e+16>>2]=b;a:{b:{c=e;b=o[d+28>>2];if(b){f=e+32|0;c:{if(b>>>0<=o[e+40>>2]<<5>>>0){g=b+ -1>>>5|0;b=o[f>>2];break c}f=o[f>>2];if(f){jl(f);o[e+40>>2]=0;o[e+32>>2]=0;o[e+36>>2]=0;b=o[d+28>>2]}if((b|0)<=-1){break b}g=b+ -1>>>5|0;f=g+1|0;b=yk(f<<2);o[e+40>>2]=f;o[e+36>>2]=0;o[e+32>>2]=b}nl(b,o[d+24>>2],(g<<2)+4|0);b=o[d+28>>2]}else{b=0}o[c+36>>2]=b;j=e;b=o[n>>2];if(b){d:{if(b>>>0<=o[e+52>>2]<<5>>>0){c=b+ -1>>>5|0;b=o[i>>2];break d}c=o[i>>2];if(c){jl(c);o[e+52>>2]=0;o[e+44>>2]=0;o[e+48>>2]=0;b=o[d+40>>2]}if((b|0)<=-1){break a}c=b+ -1>>>5|0;g=c+1|0;b=yk(g<<2);o[e+52>>2]=g;o[e+48>>2]=0;o[e+44>>2]=b}nl(b,o[d+36>>2],(c<<2)+4|0);b=o[d+40>>2]}else{b=0}o[j+48>>2]=b;yd(e+56|0,o[d+48>>2],o[d+52>>2]);o[a>>2]=e;o[d>>2]=9572;a=o[d+48>>2];if(a){o[d+52>>2]=a;jl(a)}o[d>>2]=9388;a=o[d+36>>2];if(a){jl(a)}a=o[d+24>>2];if(a){jl(a)}R=d- -64|0;return}Nk();D()}Nk();D()}function _i(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,v=0;d=u(b,12)+a|0;k=d+12|0;m=d+8|0;o[k>>2]=o[m>>2];i=(c|0)==-1?-1:(c>>>0)/3|0;q=d+16|0;d=0;h=c;a:{b:{c:{while(1){d:{n=d;r=(d|0)!=1;if(!r){if((h|0)==-1){break d}if(($i(a,((h>>>0)%3|0?-1:2)+h|0)|0)==-1){break a}c=h+1|0;d=(c>>>0)%3|0?c:h+ -2|0;if((d|0)==-1){break a}c=d+1|0;c=(c>>>0)%3|0?c:d+ -2|0;if((c|0)==-1){break a}d=o[o[o[a+4>>2]+12>>2]+(c<<2)>>2];if((d|0)==-1){break a}c=d+1|0;c=(c>>>0)%3|0?c:d+ -2|0;if((c|0)==-1){break a}i=(c>>>0)/3|0}j=o[a+56>>2]+(i>>>3&536870908)|0;g=o[j>>2];f=1<<(i&31);e:{if(g&f){break e}d=0;while(1){o[j>>2]=g|f;e=o[k>>2];f=o[q>>2];f:{if((e|0)!=(f|0)){o[e>>2]=i;o[k>>2]=e+4;break f}l=o[m>>2];p=e-l|0;e=p>>2;j=e+1|0;if(j>>>0>=1073741824){break c}s=e<<2;g=f-l|0;f=g>>1;g=g>>2>>>0<536870911?f>>>0>>0?j:f:1073741823;e=0;g:{if(!g){break g}if(g>>>0>=1073741824){break b}e=yk(g<<2)}f=s+e|0;o[f>>2]=i;g=e+(g<<2)|0;f=f+4|0;if((p|0)>=1){ll(e,l,p)}o[m>>2]=e;o[k>>2]=f;o[q>>2]=g;if(!l){break f}jl(l)}e=d+1|0;h:{if(!d){break h}if(e&1){if((c|0)==-1){c=-1;break h}d=c+1|0;c=(d>>>0)%3|0?d:c+ -2|0;break h}h=(n|0)==1?c:h;if((c|0)==-1){c=-1;break h}if((c>>>0)%3){c=c+ -1|0;break h}c=c+2|0}c=$i(a,c);if((c|0)!=-1){d=e;i=(c>>>0)/3|0;j=o[a+56>>2]+(i>>>3&268435452)|0;g=o[j>>2];f=1<<(i&31);if(!(g&f)){continue}}break}if(r|!(e&1)){break e}g=o[k>>2]+ -4|0;f=o[g>>2];e=o[a+56>>2]+(f>>>3&536870908)|0;d=o[e>>2];t=e,v=Sl(f)&d,o[t>>2]=v;o[k>>2]=g}d=1;if(!n){continue}break a}break}h=-1;$i(a,-1);break a}Nk();D()}db(10788);D()}o[((b<<2)+a|0)+44>>2]=h;b=o[k>>2];h=o[m>>2];if((b|0)!=(h|0)){b=b-h>>2;n=b>>>0>1?b:1;e=o[a+56>>2];c=0;while(1){d=o[h+(c<<2)>>2];b=e+(d>>>3&536870908)|0;a=o[b>>2];t=b,v=Sl(d)&a,o[t>>2]=v;c=c+1|0;if((n|0)!=(c|0)){continue}break}}}function Ef(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;k=o[b+12>>2];f=o[c+4>>2]-k|0;e=o[c>>2]-k|0;o[c>>2]=e;o[c+4>>2]=f;g=f>>31;h=g+f^g;g=e>>31;i=o[b+12>>2];l=(h+(g+e^g)|0)<=(i|0);if(!l){a:{b:{if((e|0)>=0){g=1;j=1;if((f|0)>-1){break a}h=1;g=-1;j=-1;if((e|0)>=1){break b}break a}h=-1;g=-1;j=-1;if((f|0)<1){break a}}g=(f|0)<1?-1:1;j=h}h=f<<1;f=u(g,i);h=h-f|0;o[c+4>>2]=h;i=u(i,j);e=(e<<1)-i|0;o[c>>2]=e;c:{if((u(g,j)|0)>=0){h=0-h|0;o[c>>2]=h;e=0-e|0;break c}o[c>>2]=h}f=(e+f|0)/2|0;o[c+4>>2]=f;e=(i+h|0)/2|0;o[c>>2]=e}d:{e:{f:{g:{h:{i:{j:{k:{if(!e){if(f){break j}i=1;j=0;break k}i=1;g=(e|0)<0&(f|0)<1;if((e|0)>=1){j=(f|0)>-1?2:1;if(g){break k}break i}j=(f|0)>0?3:0;if(!g){break i}}g=f;h=e;break d}if((f|0)>=1){break f}break h}g=j+ -1|0;if(g>>>0>2){g=f;f=e;j=0;break e}switch(g-1|0){case 0:break g;case 1:break f;default:break h}}g=0-e|0;j=1;break e}g=0-f|0;f=0-e|0;j=2;break e}g=e;f=0-f|0;j=3}e=c;h=f;o[e>>2]=f;o[e+4>>2]=g;i=0}f=o[d>>2]+h|0;o[a>>2]=f;e=o[d+4>>2]+g|0;o[a+4>>2]=e;g=o[b+12>>2];l:{if((g|0)<(f|0)){f=f-o[b+4>>2]|0;break l}if((f|0)>=(0-g|0)){break l}f=o[b+4>>2]+f|0}o[a>>2]=f;m:{if((g|0)<(e|0)){e=e-o[b+4>>2]|0;break m}if((e|0)>=(0-g|0)){break m}e=o[b+4>>2]+e|0}o[a+4>>2]=e;n:{if(i){c=e;e=f;break n}b=(4-j&3)+ -1|0;o:{if(b>>>0>2){c=e;e=f;break o}p:{switch(b-1|0){default:c=0-f|0;break o;case 0:c=0-e|0;e=0-f|0;break o;case 1:break p}}e=0-e|0;c=f}o[a>>2]=e;o[a+4>>2]=c}if(!l){q:{r:{if((e|0)>=0){b=1;i=1;if((c|0)>-1){break q}f=1;b=-1;i=-1;if((e|0)>=1){break r}break q}f=-1;b=-1;i=-1;if((c|0)<1){break q}}b=(c|0)<1?-1:1;i=f}d=c<<1;c=u(b,g);f=d-c|0;o[a+4>>2]=f;d=u(g,i);e=(e<<1)-d|0;o[a>>2]=e;s:{if((u(b,i)|0)>=0){f=0-f|0;o[a>>2]=f;e=0-e|0;break s}o[a>>2]=f}c=(c+e|0)/2|0;o[a+4>>2]=c;e=(d+f|0)/2|0;o[a>>2]=e}o[a>>2]=e+k;o[a+4>>2]=c+k}function Vh(a,b){var c=0,d=0,e=0;o[a>>2]=o[b>>2];o[a+4>>2]=o[b+4>>2];o[a+8>>2]=o[b+8>>2];c=b+12|0;o[a+12>>2]=o[c>>2];o[c>>2]=0;o[b+4>>2]=0;o[b+8>>2]=0;c=b+16|0;o[a+16>>2]=o[c>>2];o[a+20>>2]=o[b+20>>2];d=b+24|0;o[a+24>>2]=o[d>>2];o[d>>2]=0;o[c>>2]=0;o[c+4>>2]=0;d=p[b+28|0];e=a+40|0;o[e>>2]=0;c=a+32|0;o[c>>2]=0;o[c+4>>2]=0;m[a+28|0]=d;d=c;c=b+32|0;o[d>>2]=o[c>>2];o[a+36>>2]=o[b+36>>2];d=b+40|0;o[e>>2]=o[d>>2];o[d>>2]=0;o[c>>2]=0;o[c+4>>2]=0;d=a+52|0;o[d>>2]=0;c=a+44|0;o[c>>2]=0;o[c+4>>2]=0;e=c;c=b+44|0;o[e>>2]=o[c>>2];o[a+48>>2]=o[b+48>>2];e=d;d=b+52|0;o[e>>2]=o[d>>2];o[d>>2]=0;o[c>>2]=0;o[c+4>>2]=0;d=a- -64|0;o[d>>2]=0;c=a+56|0;o[c>>2]=0;o[c+4>>2]=0;e=c;c=b+56|0;o[e>>2]=o[c>>2];o[a+60>>2]=o[b+60>>2];e=d;d=b- -64|0;o[e>>2]=o[d>>2];o[d>>2]=0;o[c>>2]=0;o[c+4>>2]=0;o[a+68>>2]=o[b+68>>2];d=o[b+72>>2];e=a+84|0;o[e>>2]=0;c=a+76|0;o[c>>2]=0;o[c+4>>2]=0;o[a+72>>2]=d;d=c;c=b+76|0;o[d>>2]=o[c>>2];o[a+80>>2]=o[b+80>>2];d=b+84|0;o[e>>2]=o[d>>2];o[d>>2]=0;o[c>>2]=0;o[c+4>>2]=0;d=a+96|0;o[d>>2]=0;c=a+88|0;o[c>>2]=0;o[c+4>>2]=0;e=c;c=b+88|0;o[e>>2]=o[c>>2];o[a+92>>2]=o[b+92>>2];e=d;d=b+96|0;o[e>>2]=o[d>>2];o[d>>2]=0;o[c>>2]=0;o[c+4>>2]=0;c=p[b+100|0];d=a+112|0;o[d>>2]=0;o[a+104>>2]=0;o[a+108>>2]=0;m[a+100|0]=c;o[a+104>>2]=o[b+104>>2];o[a+108>>2]=o[b+108>>2];c=b+112|0;o[d>>2]=o[c>>2];o[c>>2]=0;o[b+104>>2]=0;o[b+108>>2]=0;d=a+124|0;o[d>>2]=0;c=a+116|0;o[c>>2]=0;o[c+4>>2]=0;e=c;c=b+116|0;o[e>>2]=o[c>>2];o[a+120>>2]=o[b+120>>2];e=d;d=b+124|0;o[e>>2]=o[d>>2];o[d>>2]=0;o[c>>2]=0;o[c+4>>2]=0;c=o[b+128>>2];d=a+140|0;o[d>>2]=0;o[a+132>>2]=0;o[a+136>>2]=0;o[a+128>>2]=c;o[a+132>>2]=o[b+132>>2];o[a+136>>2]=o[b+136>>2];c=b+140|0;o[d>>2]=o[c>>2];o[c>>2]=0;o[b+132>>2]=0;o[b+136>>2]=0;return a}function bh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;h=R-16|0;R=h;o[h>>2]=b;g=-1;a:{if((b|0)==-1){o[h+4>>2]=-1;break a}c=b+1|0;o[h+4>>2]=(c>>>0)%3|0?c:b+ -2|0;if((b>>>0)%3){g=b+ -1|0;break a}g=b+2|0}o[h+8>>2]=g;p=(b|0)==-1?-1:(b>>>0)/3|0;b:{c:{d:{e:{while(1){f:{g:{if((b|0)!=-1){c=o[o[o[a+8>>2]+12>>2]+(b<<2)>>2];if((c|0)!=-1){break g}}g=0;c=o[a+216>>2];if((c|0)==o[a+220>>2]){break f}while(1){f=u(g,144)+c|0;i=f+136|0;c=o[i>>2];k=f+140|0;d=o[k>>2];h:{if(c>>>0>>0){o[c>>2]=b;o[i>>2]=c+4;break h}l=f+132|0;f=o[l>>2];j=c-f|0;c=j>>2;e=c+1|0;if(e>>>0>=1073741824){break e}m=c<<2;d=d-f|0;c=d>>1;e=d>>2>>>0<536870911?c>>>0>>0?e:c:1073741823;c=0;i:{if(!e){break i}if(e>>>0>=1073741824){break d}c=yk(e<<2)}d=m+c|0;o[d>>2]=b;e=c+(e<<2)|0;d=d+4|0;if((j|0)>=1){ll(c,f,j)}o[l>>2]=c;o[i>>2]=d;o[k>>2]=e;if(!f){break h}jl(f)}g=g+1|0;c=o[a+216>>2];if(g>>>0<(o[a+220>>2]-c|0)/144>>>0){continue}break}break f}if((c>>>0)/3>>>0

>>0){break f}g=0;if(o[a+220>>2]==o[a+216>>2]){break f}while(1){j:{if(!Uf(o[a+368>>2]+(g<<4)|0)){break j}f=o[a+216>>2]+u(g,144)|0;i=f+136|0;c=o[i>>2];k=f+140|0;d=o[k>>2];if(c>>>0>>0){o[c>>2]=b;o[i>>2]=c+4;break j}l=f+132|0;f=o[l>>2];j=c-f|0;c=j>>2;e=c+1|0;if(e>>>0>=1073741824){break c}m=c<<2;d=d-f|0;c=d>>1;e=d>>2>>>0<536870911?c>>>0>>0?e:c:1073741823;c=0;k:{if(!e){break k}if(e>>>0>=1073741824){break b}c=yk(e<<2)}d=m+c|0;o[d>>2]=b;e=c+(e<<2)|0;d=d+4|0;if((j|0)>=1){ll(c,f,j)}o[l>>2]=c;o[i>>2]=d;o[k>>2]=e;if(!f){break j}jl(f)}g=g+1|0;if(g>>>0<(o[a+220>>2]-o[a+216>>2]|0)/144>>>0){continue}break}}n=n+1|0;if((n|0)!=3){b=o[(n<<2)+h>>2];continue}break}R=h+16|0;return 1}Nk();D()}db(8832);D()}Nk();D()}db(8832);D()}function yj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{if((b|0)<0){break a}c=o[a+12>>2];d=o[a+8>>2];if(c-d>>2>>>0<=b>>>0){break a}d=d+(b<<2)|0;e=o[d>>2];h=o[e+60>>2];f=o[e+56>>2];e=d+4|0;b:{if((e|0)!=(c|0)){while(1){i=o[e>>2];o[e>>2]=0;g=o[d>>2];o[d>>2]=i;if(g){Kb(g)}d=d+4|0;e=e+4|0;if((e|0)!=(c|0)){continue}break}c=o[a+12>>2];if((d|0)==(c|0)){break b}}while(1){c=c+ -4|0;e=o[c>>2];o[c>>2]=0;if(e){Kb(e)}if((c|0)!=(d|0)){continue}break}}o[a+12>>2]=d;c=o[a+4>>2];if(c){zj(c,h)}c:{if((f|0)>4){break c}d:{d=u(f,12)+a|0;c=o[d+20>>2];e=d+24|0;d=o[e>>2];if((c|0)==(d|0)){break d}while(1){if(o[c>>2]==(b|0)){break d}c=c+4|0;if((d|0)!=(c|0)){continue}break}break c}if((c|0)==(d|0)){break c}f=c+4|0;d=d-f|0;g=d>>2;if(d){nl(c,f,d)}o[e>>2]=(g<<2)+c}c=o[a+24>>2];d=o[a+20>>2];if((c|0)!=(d|0)){c=c-d>>2;e=c>>>0>1?c:1;c=0;while(1){f=d+(c<<2)|0;g=o[f>>2];if((g|0)>(b|0)){o[f>>2]=g+ -1}c=c+1|0;if((e|0)!=(c|0)){continue}break}}c=o[a+36>>2];d=o[a+32>>2];if((c|0)!=(d|0)){c=c-d>>2;e=c>>>0>1?c:1;c=0;while(1){f=d+(c<<2)|0;g=o[f>>2];if((g|0)>(b|0)){o[f>>2]=g+ -1}c=c+1|0;if((e|0)!=(c|0)){continue}break}}c=o[a+48>>2];d=o[a+44>>2];if((c|0)!=(d|0)){c=c-d>>2;e=c>>>0>1?c:1;c=0;while(1){f=d+(c<<2)|0;g=o[f>>2];if((g|0)>(b|0)){o[f>>2]=g+ -1}c=c+1|0;if((e|0)!=(c|0)){continue}break}}c=o[a+60>>2];d=o[a+56>>2];if((c|0)!=(d|0)){c=c-d>>2;e=c>>>0>1?c:1;c=0;while(1){f=d+(c<<2)|0;g=o[f>>2];if((g|0)>(b|0)){o[f>>2]=g+ -1}c=c+1|0;if((e|0)!=(c|0)){continue}break}}c=o[a+72>>2];a=o[a+68>>2];if((c|0)==(a|0)){break a}c=c-a>>2;d=c>>>0>1?c:1;c=0;while(1){e=a+(c<<2)|0;f=o[e>>2];if((f|0)>(b|0)){o[e>>2]=f+ -1}c=c+1|0;if((d|0)!=(c|0)){continue}break}}}function pg(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=R+ -64|0;R=d;o[d+48>>2]=0;o[d+40>>2]=0;o[d+44>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;o[d+24>>2]=0;o[d+28>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;o[d+8>>2]=0;o[d+12>>2]=0;o[d>>2]=0;o[d+4>>2]=0;a:{if(!yg(d,b)|(o[d+12>>2]?0:a)){break a}if(!sg(1,d+56|0,b)){break a}f=o[b+8>>2];l=o[b+16>>2];g=l;j=f-g|0;i=o[d+60>>2];e=i;k=o[b+20>>2];g=o[b+12>>2]-(k+(f>>>0>>0)|0)|0;f=o[d+56>>2];if((e|0)==(g|0)&f>>>0>j>>>0|e>>>0>g>>>0){break a}i=i+k|0;g=l;k=g+f|0;if(k>>>0>>0){i=i+1|0}o[b+16>>2]=k;o[b+20>>2]=i;if((f|0)<1){break a}j=l+o[b>>2]|0;o[d+40>>2]=j;g=d;b:{c:{d:{e:{f:{b=f+ -1|0;e=j+b|0;switch((p[e|0]>>>6|0)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break c}}if((f|0)<2){break a}b=f+ -2|0;o[d+44>>2]=b;e=(f+j|0)+ -2|0;e=p[e+1|0]<<8&16128|p[e|0];break b}if((f|0)<3){break a}b=f+ -3|0;o[d+44>>2]=b;e=(f+j|0)+ -3|0;e=p[e+1|0]<<8|p[e+2|0]<<16&4128768|p[e|0];break b}b=f+ -4|0;o[d+44>>2]=b;e=(f+j|0)+ -4|0;e=p[e+2|0]<<16|p[e+3|0]<<24&1056964608|p[e+1|0]<<8|p[e|0];break b}o[d+44>>2]=b;e=p[e|0]&63}h=e+4194304|0;o[g+48>>2]=h;m=h>>>0<1073741824;if(!a|h>>>0>1073741823){break a}k=o[d+28>>2];i=0;l=o[d+16>>2];while(1){g:{if(h>>>0>4194303){break g}while(1){if((b|0)<1){break g}b=b+ -1|0;o[d+44>>2]=b;h=p[b+j|0]|h<<8;o[d+48>>2]=h;if(h>>>0<4194304){continue}break}}f=h&1048575;e=o[(f<<2)+l>>2];g=(e<<3)+k|0;h=(u(o[g>>2],h>>>20|0)+f|0)-o[g+4>>2]|0;o[d+48>>2]=h;o[(i<<2)+c>>2]=e;m=1;i=i+1|0;if((i|0)!=(a|0)){continue}break}}a=o[d+28>>2];if(a){o[d+32>>2]=a;jl(a)}a=o[d+16>>2];if(a){o[d+20>>2]=a;jl(a)}a=o[d>>2];if(a){o[d+4>>2]=a;jl(a)}R=d- -64|0;return m}function ng(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=R+ -64|0;R=d;o[d+48>>2]=0;o[d+40>>2]=0;o[d+44>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;o[d+24>>2]=0;o[d+28>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;o[d+8>>2]=0;o[d+12>>2]=0;o[d>>2]=0;o[d+4>>2]=0;a:{if(!wg(d,b)|(o[d+12>>2]?0:a)){break a}if(!sg(1,d+56|0,b)){break a}f=o[b+8>>2];l=o[b+16>>2];g=l;j=f-g|0;i=o[d+60>>2];e=i;k=o[b+20>>2];g=o[b+12>>2]-(k+(f>>>0>>0)|0)|0;f=o[d+56>>2];if((e|0)==(g|0)&f>>>0>j>>>0|e>>>0>g>>>0){break a}i=i+k|0;g=l;k=g+f|0;if(k>>>0>>0){i=i+1|0}o[b+16>>2]=k;o[b+20>>2]=i;if((f|0)<1){break a}j=l+o[b>>2]|0;o[d+40>>2]=j;g=d;b:{c:{d:{e:{f:{b=f+ -1|0;e=j+b|0;switch((p[e|0]>>>6|0)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break c}}if((f|0)<2){break a}b=f+ -2|0;o[d+44>>2]=b;e=(f+j|0)+ -2|0;e=p[e+1|0]<<8&16128|p[e|0];break b}if((f|0)<3){break a}b=f+ -3|0;o[d+44>>2]=b;e=(f+j|0)+ -3|0;e=p[e+1|0]<<8|p[e+2|0]<<16&4128768|p[e|0];break b}b=f+ -4|0;o[d+44>>2]=b;e=(f+j|0)+ -4|0;e=p[e+2|0]<<16|p[e+3|0]<<24&1056964608|p[e+1|0]<<8|p[e|0];break b}o[d+44>>2]=b;e=p[e|0]&63}h=e- -1048576|0;o[g+48>>2]=h;m=h>>>0<268435456;if(!a|h>>>0>268435455){break a}k=o[d+28>>2];i=0;l=o[d+16>>2];while(1){g:{if(h>>>0>1048575){break g}while(1){if((b|0)<1){break g}b=b+ -1|0;o[d+44>>2]=b;h=p[b+j|0]|h<<8;o[d+48>>2]=h;if(h>>>0<1048576){continue}break}}f=h&262143;e=o[(f<<2)+l>>2];g=(e<<3)+k|0;h=(u(o[g>>2],h>>>18|0)+f|0)-o[g+4>>2]|0;o[d+48>>2]=h;o[(i<<2)+c>>2]=e;m=1;i=i+1|0;if((i|0)!=(a|0)){continue}break}}a=o[d+28>>2];if(a){o[d+32>>2]=a;jl(a)}a=o[d+16>>2];if(a){o[d+20>>2]=a;jl(a)}a=o[d>>2];if(a){o[d+4>>2]=a;jl(a)}R=d- -64|0;return m}function og(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=R+ -64|0;R=d;o[d+48>>2]=0;o[d+40>>2]=0;o[d+44>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;o[d+24>>2]=0;o[d+28>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;o[d+8>>2]=0;o[d+12>>2]=0;o[d>>2]=0;o[d+4>>2]=0;a:{if(!xg(d,b)|(o[d+12>>2]?0:a)){break a}if(!sg(1,d+56|0,b)){break a}f=o[b+8>>2];l=o[b+16>>2];g=l;j=f-g|0;i=o[d+60>>2];e=i;k=o[b+20>>2];g=o[b+12>>2]-(k+(f>>>0>>0)|0)|0;f=o[d+56>>2];if((e|0)==(g|0)&f>>>0>j>>>0|e>>>0>g>>>0){break a}i=i+k|0;g=l;k=g+f|0;if(k>>>0>>0){i=i+1|0}o[b+16>>2]=k;o[b+20>>2]=i;if((f|0)<1){break a}j=l+o[b>>2]|0;o[d+40>>2]=j;g=d;b:{c:{d:{e:{f:{b=f+ -1|0;e=j+b|0;switch((p[e|0]>>>6|0)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break c}}if((f|0)<2){break a}b=f+ -2|0;o[d+44>>2]=b;e=(f+j|0)+ -2|0;e=p[e+1|0]<<8&16128|p[e|0];break b}if((f|0)<3){break a}b=f+ -3|0;o[d+44>>2]=b;e=(f+j|0)+ -3|0;e=p[e+1|0]<<8|p[e+2|0]<<16&4128768|p[e|0];break b}b=f+ -4|0;o[d+44>>2]=b;e=(f+j|0)+ -4|0;e=p[e+2|0]<<16|p[e+3|0]<<24&1056964608|p[e+1|0]<<8|p[e|0];break b}o[d+44>>2]=b;e=p[e|0]&63}h=e+2097152|0;o[g+48>>2]=h;m=h>>>0<536870912;if(!a|h>>>0>536870911){break a}k=o[d+28>>2];i=0;l=o[d+16>>2];while(1){g:{if(h>>>0>2097151){break g}while(1){if((b|0)<1){break g}b=b+ -1|0;o[d+44>>2]=b;h=p[b+j|0]|h<<8;o[d+48>>2]=h;if(h>>>0<2097152){continue}break}}f=h&524287;e=o[(f<<2)+l>>2];g=(e<<3)+k|0;h=(u(o[g>>2],h>>>19|0)+f|0)-o[g+4>>2]|0;o[d+48>>2]=h;o[(i<<2)+c>>2]=e;m=1;i=i+1|0;if((i|0)!=(a|0)){continue}break}}a=o[d+28>>2];if(a){o[d+32>>2]=a;jl(a)}a=o[d+16>>2];if(a){o[d+20>>2]=a;jl(a)}a=o[d>>2];if(a){o[d+4>>2]=a;jl(a)}R=d- -64|0;return m}function mg(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=R+ -64|0;R=d;o[d+48>>2]=0;o[d+40>>2]=0;o[d+44>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;o[d+24>>2]=0;o[d+28>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;o[d+8>>2]=0;o[d+12>>2]=0;o[d>>2]=0;o[d+4>>2]=0;a:{if(!vg(d,b)|(o[d+12>>2]?0:a)){break a}if(!sg(1,d+56|0,b)){break a}f=o[b+8>>2];l=o[b+16>>2];g=l;j=f-g|0;i=o[d+60>>2];e=i;k=o[b+20>>2];g=o[b+12>>2]-(k+(f>>>0>>0)|0)|0;f=o[d+56>>2];if((e|0)==(g|0)&f>>>0>j>>>0|e>>>0>g>>>0){break a}i=i+k|0;g=l;k=g+f|0;if(k>>>0>>0){i=i+1|0}o[b+16>>2]=k;o[b+20>>2]=i;if((f|0)<1){break a}j=l+o[b>>2]|0;o[d+40>>2]=j;g=d;b:{c:{d:{e:{f:{b=f+ -1|0;e=j+b|0;switch((p[e|0]>>>6|0)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break c}}if((f|0)<2){break a}b=f+ -2|0;o[d+44>>2]=b;e=(f+j|0)+ -2|0;e=p[e+1|0]<<8&16128|p[e|0];break b}if((f|0)<3){break a}b=f+ -3|0;o[d+44>>2]=b;e=(f+j|0)+ -3|0;e=p[e+1|0]<<8|p[e+2|0]<<16&4128768|p[e|0];break b}b=f+ -4|0;o[d+44>>2]=b;e=(f+j|0)+ -4|0;e=p[e+2|0]<<16|p[e+3|0]<<24&1056964608|p[e+1|0]<<8|p[e|0];break b}o[d+44>>2]=b;e=p[e|0]&63}h=e+262144|0;o[g+48>>2]=h;m=h>>>0<67108864;if(!a|h>>>0>67108863){break a}k=o[d+28>>2];i=0;l=o[d+16>>2];while(1){g:{if(h>>>0>262143){break g}while(1){if((b|0)<1){break g}b=b+ -1|0;o[d+44>>2]=b;h=p[b+j|0]|h<<8;o[d+48>>2]=h;if(h>>>0<262144){continue}break}}f=h&65535;e=o[(f<<2)+l>>2];g=(e<<3)+k|0;h=(u(o[g>>2],h>>>16|0)+f|0)-o[g+4>>2]|0;o[d+48>>2]=h;o[(i<<2)+c>>2]=e;m=1;i=i+1|0;if((i|0)!=(a|0)){continue}break}}a=o[d+28>>2];if(a){o[d+32>>2]=a;jl(a)}a=o[d+16>>2];if(a){o[d+20>>2]=a;jl(a)}a=o[d>>2];if(a){o[d+4>>2]=a;jl(a)}R=d- -64|0;return m}function lg(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=R+ -64|0;R=d;o[d+48>>2]=0;o[d+40>>2]=0;o[d+44>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;o[d+24>>2]=0;o[d+28>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;o[d+8>>2]=0;o[d+12>>2]=0;o[d>>2]=0;o[d+4>>2]=0;a:{if(!ug(d,b)|(o[d+12>>2]?0:a)){break a}if(!sg(1,d+56|0,b)){break a}f=o[b+8>>2];l=o[b+16>>2];g=l;j=f-g|0;i=o[d+60>>2];e=i;k=o[b+20>>2];g=o[b+12>>2]-(k+(f>>>0>>0)|0)|0;f=o[d+56>>2];if((e|0)==(g|0)&f>>>0>j>>>0|e>>>0>g>>>0){break a}i=i+k|0;g=l;k=g+f|0;if(k>>>0>>0){i=i+1|0}o[b+16>>2]=k;o[b+20>>2]=i;if((f|0)<1){break a}j=l+o[b>>2]|0;o[d+40>>2]=j;g=d;b:{c:{d:{e:{f:{b=f+ -1|0;e=j+b|0;switch((p[e|0]>>>6|0)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break c}}if((f|0)<2){break a}b=f+ -2|0;o[d+44>>2]=b;e=(f+j|0)+ -2|0;e=p[e+1|0]<<8&16128|p[e|0];break b}if((f|0)<3){break a}b=f+ -3|0;o[d+44>>2]=b;e=(f+j|0)+ -3|0;e=p[e+1|0]<<8|p[e+2|0]<<16&4128768|p[e|0];break b}b=f+ -4|0;o[d+44>>2]=b;e=(f+j|0)+ -4|0;e=p[e+2|0]<<16|p[e+3|0]<<24&1056964608|p[e+1|0]<<8|p[e|0];break b}o[d+44>>2]=b;e=p[e|0]&63}h=e+131072|0;o[g+48>>2]=h;m=h>>>0<33554432;if(!a|h>>>0>33554431){break a}k=o[d+28>>2];i=0;l=o[d+16>>2];while(1){g:{if(h>>>0>131071){break g}while(1){if((b|0)<1){break g}b=b+ -1|0;o[d+44>>2]=b;h=p[b+j|0]|h<<8;o[d+48>>2]=h;if(h>>>0<131072){continue}break}}f=h&32767;e=o[(f<<2)+l>>2];g=(e<<3)+k|0;h=(u(o[g>>2],h>>>15|0)+f|0)-o[g+4>>2]|0;o[d+48>>2]=h;o[(i<<2)+c>>2]=e;m=1;i=i+1|0;if((i|0)!=(a|0)){continue}break}}a=o[d+28>>2];if(a){o[d+32>>2]=a;jl(a)}a=o[d+16>>2];if(a){o[d+20>>2]=a;jl(a)}a=o[d>>2];if(a){o[d+4>>2]=a;jl(a)}R=d- -64|0;return m}function kg(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=R+ -64|0;R=d;o[d+48>>2]=0;o[d+40>>2]=0;o[d+44>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;o[d+24>>2]=0;o[d+28>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;o[d+8>>2]=0;o[d+12>>2]=0;o[d>>2]=0;o[d+4>>2]=0;a:{if(!tg(d,b)|(o[d+12>>2]?0:a)){break a}if(!sg(1,d+56|0,b)){break a}f=o[b+8>>2];l=o[b+16>>2];g=l;j=f-g|0;i=o[d+60>>2];e=i;k=o[b+20>>2];g=o[b+12>>2]-(k+(f>>>0>>0)|0)|0;f=o[d+56>>2];if((e|0)==(g|0)&f>>>0>j>>>0|e>>>0>g>>>0){break a}i=i+k|0;g=l;k=g+f|0;if(k>>>0>>0){i=i+1|0}o[b+16>>2]=k;o[b+20>>2]=i;if((f|0)<1){break a}j=l+o[b>>2]|0;o[d+40>>2]=j;g=d;b:{c:{d:{e:{f:{b=f+ -1|0;e=j+b|0;switch((p[e|0]>>>6|0)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break c}}if((f|0)<2){break a}b=f+ -2|0;o[d+44>>2]=b;e=(f+j|0)+ -2|0;e=p[e+1|0]<<8&16128|p[e|0];break b}if((f|0)<3){break a}b=f+ -3|0;o[d+44>>2]=b;e=(f+j|0)+ -3|0;e=p[e+1|0]<<8|p[e+2|0]<<16&4128768|p[e|0];break b}b=f+ -4|0;o[d+44>>2]=b;e=(f+j|0)+ -4|0;e=p[e+2|0]<<16|p[e+3|0]<<24&1056964608|p[e+1|0]<<8|p[e|0];break b}o[d+44>>2]=b;e=p[e|0]&63}h=e+32768|0;o[g+48>>2]=h;m=h>>>0<8388608;if(!a|h>>>0>8388607){break a}k=o[d+28>>2];i=0;l=o[d+16>>2];while(1){g:{if(h>>>0>32767){break g}while(1){if((b|0)<1){break g}b=b+ -1|0;o[d+44>>2]=b;h=p[b+j|0]|h<<8;o[d+48>>2]=h;if(h>>>0<32768){continue}break}}f=h&8191;e=o[(f<<2)+l>>2];g=(e<<3)+k|0;h=(u(o[g>>2],h>>>13|0)+f|0)-o[g+4>>2]|0;o[d+48>>2]=h;o[(i<<2)+c>>2]=e;m=1;i=i+1|0;if((i|0)!=(a|0)){continue}break}}a=o[d+28>>2];if(a){o[d+32>>2]=a;jl(a)}a=o[d+16>>2];if(a){o[d+20>>2]=a;jl(a)}a=o[d>>2];if(a){o[d+4>>2]=a;jl(a)}R=d- -64|0;return m}function ig(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=R+ -64|0;R=d;o[d+48>>2]=0;o[d+40>>2]=0;o[d+44>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;o[d+24>>2]=0;o[d+28>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;o[d+8>>2]=0;o[d+12>>2]=0;o[d>>2]=0;o[d+4>>2]=0;a:{if(!gg(d,b)|(o[d+12>>2]?0:a)){break a}if(!sg(1,d+56|0,b)){break a}f=o[b+8>>2];l=o[b+16>>2];g=l;j=f-g|0;i=o[d+60>>2];e=i;k=o[b+20>>2];g=o[b+12>>2]-(k+(f>>>0>>0)|0)|0;f=o[d+56>>2];if((e|0)==(g|0)&f>>>0>j>>>0|e>>>0>g>>>0){break a}i=i+k|0;g=l;k=g+f|0;if(k>>>0>>0){i=i+1|0}o[b+16>>2]=k;o[b+20>>2]=i;if((f|0)<1){break a}j=l+o[b>>2]|0;o[d+40>>2]=j;g=d;b:{c:{d:{e:{f:{b=f+ -1|0;e=j+b|0;switch((p[e|0]>>>6|0)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break c}}if((f|0)<2){break a}b=f+ -2|0;o[d+44>>2]=b;e=(f+j|0)+ -2|0;e=p[e+1|0]<<8&16128|p[e|0];break b}if((f|0)<3){break a}b=f+ -3|0;o[d+44>>2]=b;e=(f+j|0)+ -3|0;e=p[e+1|0]<<8|p[e+2|0]<<16&4128768|p[e|0];break b}b=f+ -4|0;o[d+44>>2]=b;e=(f+j|0)+ -4|0;e=p[e+2|0]<<16|p[e+3|0]<<24&1056964608|p[e+1|0]<<8|p[e|0];break b}o[d+44>>2]=b;e=p[e|0]&63}h=e+16384|0;o[g+48>>2]=h;m=h>>>0<4194304;if(!a|h>>>0>4194303){break a}k=o[d+28>>2];i=0;l=o[d+16>>2];while(1){g:{if(h>>>0>16383){break g}while(1){if((b|0)<1){break g}b=b+ -1|0;o[d+44>>2]=b;h=p[b+j|0]|h<<8;o[d+48>>2]=h;if(h>>>0<16384){continue}break}}f=h&4095;e=o[(f<<2)+l>>2];g=(e<<3)+k|0;h=(u(o[g>>2],h>>>12|0)+f|0)-o[g+4>>2]|0;o[d+48>>2]=h;o[(i<<2)+c>>2]=e;m=1;i=i+1|0;if((i|0)!=(a|0)){continue}break}}a=o[d+28>>2];if(a){o[d+32>>2]=a;jl(a)}a=o[d+16>>2];if(a){o[d+20>>2]=a;jl(a)}a=o[d>>2];if(a){o[d+4>>2]=a;jl(a)}R=d- -64|0;return m}function yg(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a:{if(!q[b+38>>1]){break a}l=a+12|0;if(!qg(1,l,b)){break a}f=o[a+12>>2];c=o[a>>2];d=o[a+4>>2]-c>>2;b:{if(f>>>0>d>>>0){Ia(a,f-d|0);f=o[a+12>>2];break b}if(f>>>0>=d>>>0){break b}o[a+4>>2]=c+(f<<2)}if(!f){return 1}m=o[b+8>>2];i=o[b+12>>2];while(1){e=o[b+16>>2];d=o[b+20>>2];c=d;if((i|0)<(c|0)?1:(i|0)<=(c|0)?m>>>0>e>>>0?0:1:0){break a}n=o[b>>2];j=p[n+e|0];e=e+1|0;if(e>>>0<1){d=d+1|0}c=b;h=e;o[c+16>>2]=e;o[c+20>>2]=d;e=j>>>2|0;c:{d:{e:{k=j&3;if(k>>>0>3){c=0;break e}c=0;f:{switch(k-1|0){case 0:case 1:break e;case 2:break f;default:break d}}d=e+g|0;if(d>>>0>=f>>>0){break a}ml(o[a>>2]+(g<<2)|0,0,(j&252)+4|0);g=d;break c}while(1){if((i|0)<(d|0)?1:(i|0)<=(d|0)?m>>>0>h>>>0?0:1:0){break a}j=p[h+n|0];h=h+1|0;if(h>>>0<1){d=d+1|0}f=b;o[f+16>>2]=h;o[f+20>>2]=d;e=j<<(c<<3|6)|e;c=c+1|0;if((k|0)!=(c|0)){continue}break}}o[o[a>>2]+(g<<2)>>2]=e}g=g+1|0;f=o[l>>2];if(g>>>0>>0){continue}break}d=a+16|0;i=o[a>>2];b=o[a+16>>2];c=o[a+20>>2]-b|0;g=c>>2;g:{if(g>>>0<=1048575){Ia(d,1048576-g|0);break g}if((c|0)==4194304){break g}o[a+20>>2]=b+4194304}h:{c=a+28|0;b=o[c>>2];g=o[a+32>>2]-b>>3;if(f>>>0>g>>>0){rg(c,f-g|0);b=o[c>>2];break h}if(f>>>0>>0){o[a+32>>2]=(f<<3)+b}if(f){break h}break a}e=0;c=0;while(1){a=i+(e<<2)|0;g=o[a>>2];h=(e<<3)+b|0;o[h+4>>2]=c;o[h>>2]=g;a=o[a>>2]+c|0;if(a>>>0>1048576){break a}if(c>>>0>>0){g=o[d>>2];while(1){o[g+(c<<2)>>2]=e;c=c+1|0;if((a|0)!=(c|0)){continue}break}}c=a;e=e+1|0;if((f|0)!=(e|0)){continue}break}return(a|0)==1048576}return 0}function wg(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a:{if(!q[b+38>>1]){break a}l=a+12|0;if(!qg(1,l,b)){break a}f=o[a+12>>2];c=o[a>>2];d=o[a+4>>2]-c>>2;b:{if(f>>>0>d>>>0){Ia(a,f-d|0);f=o[a+12>>2];break b}if(f>>>0>=d>>>0){break b}o[a+4>>2]=c+(f<<2)}if(!f){return 1}m=o[b+8>>2];i=o[b+12>>2];while(1){e=o[b+16>>2];d=o[b+20>>2];c=d;if((i|0)<(c|0)?1:(i|0)<=(c|0)?m>>>0>e>>>0?0:1:0){break a}n=o[b>>2];j=p[n+e|0];e=e+1|0;if(e>>>0<1){d=d+1|0}c=b;h=e;o[c+16>>2]=e;o[c+20>>2]=d;e=j>>>2|0;c:{d:{e:{k=j&3;if(k>>>0>3){c=0;break e}c=0;f:{switch(k-1|0){case 0:case 1:break e;case 2:break f;default:break d}}d=e+g|0;if(d>>>0>=f>>>0){break a}ml(o[a>>2]+(g<<2)|0,0,(j&252)+4|0);g=d;break c}while(1){if((i|0)<(d|0)?1:(i|0)<=(d|0)?m>>>0>h>>>0?0:1:0){break a}j=p[h+n|0];h=h+1|0;if(h>>>0<1){d=d+1|0}f=b;o[f+16>>2]=h;o[f+20>>2]=d;e=j<<(c<<3|6)|e;c=c+1|0;if((k|0)!=(c|0)){continue}break}}o[o[a>>2]+(g<<2)>>2]=e}g=g+1|0;f=o[l>>2];if(g>>>0>>0){continue}break}d=a+16|0;i=o[a>>2];b=o[a+16>>2];c=o[a+20>>2]-b|0;g=c>>2;g:{if(g>>>0<=262143){Ia(d,262144-g|0);break g}if((c|0)==1048576){break g}o[a+20>>2]=b- -1048576}h:{c=a+28|0;b=o[c>>2];g=o[a+32>>2]-b>>3;if(f>>>0>g>>>0){rg(c,f-g|0);b=o[c>>2];break h}if(f>>>0>>0){o[a+32>>2]=(f<<3)+b}if(f){break h}break a}e=0;c=0;while(1){a=i+(e<<2)|0;g=o[a>>2];h=(e<<3)+b|0;o[h+4>>2]=c;o[h>>2]=g;a=o[a>>2]+c|0;if(a>>>0>262144){break a}if(c>>>0>>0){g=o[d>>2];while(1){o[g+(c<<2)>>2]=e;c=c+1|0;if((a|0)!=(c|0)){continue}break}}c=a;e=e+1|0;if((f|0)!=(e|0)){continue}break}return(a|0)==262144}return 0}function xg(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a:{if(!q[b+38>>1]){break a}l=a+12|0;if(!qg(1,l,b)){break a}f=o[a+12>>2];c=o[a>>2];d=o[a+4>>2]-c>>2;b:{if(f>>>0>d>>>0){Ia(a,f-d|0);f=o[a+12>>2];break b}if(f>>>0>=d>>>0){break b}o[a+4>>2]=c+(f<<2)}if(!f){return 1}m=o[b+8>>2];i=o[b+12>>2];while(1){e=o[b+16>>2];d=o[b+20>>2];c=d;if((i|0)<(c|0)?1:(i|0)<=(c|0)?m>>>0>e>>>0?0:1:0){break a}n=o[b>>2];j=p[n+e|0];e=e+1|0;if(e>>>0<1){d=d+1|0}c=b;h=e;o[c+16>>2]=e;o[c+20>>2]=d;e=j>>>2|0;c:{d:{e:{k=j&3;if(k>>>0>3){c=0;break e}c=0;f:{switch(k-1|0){case 0:case 1:break e;case 2:break f;default:break d}}d=e+g|0;if(d>>>0>=f>>>0){break a}ml(o[a>>2]+(g<<2)|0,0,(j&252)+4|0);g=d;break c}while(1){if((i|0)<(d|0)?1:(i|0)<=(d|0)?m>>>0>h>>>0?0:1:0){break a}j=p[h+n|0];h=h+1|0;if(h>>>0<1){d=d+1|0}f=b;o[f+16>>2]=h;o[f+20>>2]=d;e=j<<(c<<3|6)|e;c=c+1|0;if((k|0)!=(c|0)){continue}break}}o[o[a>>2]+(g<<2)>>2]=e}g=g+1|0;f=o[l>>2];if(g>>>0>>0){continue}break}d=a+16|0;i=o[a>>2];b=o[a+16>>2];c=o[a+20>>2]-b|0;g=c>>2;g:{if(g>>>0<=524287){Ia(d,524288-g|0);break g}if((c|0)==2097152){break g}o[a+20>>2]=b+2097152}h:{c=a+28|0;b=o[c>>2];g=o[a+32>>2]-b>>3;if(f>>>0>g>>>0){rg(c,f-g|0);b=o[c>>2];break h}if(f>>>0>>0){o[a+32>>2]=(f<<3)+b}if(f){break h}break a}e=0;c=0;while(1){a=i+(e<<2)|0;g=o[a>>2];h=(e<<3)+b|0;o[h+4>>2]=c;o[h>>2]=g;a=o[a>>2]+c|0;if(a>>>0>524288){break a}if(c>>>0>>0){g=o[d>>2];while(1){o[g+(c<<2)>>2]=e;c=c+1|0;if((a|0)!=(c|0)){continue}break}}c=a;e=e+1|0;if((f|0)!=(e|0)){continue}break}return(a|0)==524288}return 0}function vg(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a:{if(!q[b+38>>1]){break a}l=a+12|0;if(!qg(1,l,b)){break a}f=o[a+12>>2];c=o[a>>2];d=o[a+4>>2]-c>>2;b:{if(f>>>0>d>>>0){Ia(a,f-d|0);f=o[a+12>>2];break b}if(f>>>0>=d>>>0){break b}o[a+4>>2]=c+(f<<2)}if(!f){return 1}m=o[b+8>>2];i=o[b+12>>2];while(1){e=o[b+16>>2];d=o[b+20>>2];c=d;if((i|0)<(c|0)?1:(i|0)<=(c|0)?m>>>0>e>>>0?0:1:0){break a}n=o[b>>2];j=p[n+e|0];e=e+1|0;if(e>>>0<1){d=d+1|0}c=b;h=e;o[c+16>>2]=e;o[c+20>>2]=d;e=j>>>2|0;c:{d:{e:{k=j&3;if(k>>>0>3){c=0;break e}c=0;f:{switch(k-1|0){case 0:case 1:break e;case 2:break f;default:break d}}d=e+g|0;if(d>>>0>=f>>>0){break a}ml(o[a>>2]+(g<<2)|0,0,(j&252)+4|0);g=d;break c}while(1){if((i|0)<(d|0)?1:(i|0)<=(d|0)?m>>>0>h>>>0?0:1:0){break a}j=p[h+n|0];h=h+1|0;if(h>>>0<1){d=d+1|0}f=b;o[f+16>>2]=h;o[f+20>>2]=d;e=j<<(c<<3|6)|e;c=c+1|0;if((k|0)!=(c|0)){continue}break}}o[o[a>>2]+(g<<2)>>2]=e}g=g+1|0;f=o[l>>2];if(g>>>0>>0){continue}break}d=a+16|0;i=o[a>>2];b=o[a+16>>2];c=o[a+20>>2]-b|0;g=c>>2;g:{if(g>>>0<=65535){Ia(d,65536-g|0);break g}if((c|0)==262144){break g}o[a+20>>2]=b+262144}h:{c=a+28|0;b=o[c>>2];g=o[a+32>>2]-b>>3;if(f>>>0>g>>>0){rg(c,f-g|0);b=o[c>>2];break h}if(f>>>0>>0){o[a+32>>2]=(f<<3)+b}if(f){break h}break a}e=0;c=0;while(1){a=i+(e<<2)|0;g=o[a>>2];h=(e<<3)+b|0;o[h+4>>2]=c;o[h>>2]=g;a=o[a>>2]+c|0;if(a>>>0>65536){break a}if(c>>>0>>0){g=o[d>>2];while(1){o[g+(c<<2)>>2]=e;c=c+1|0;if((a|0)!=(c|0)){continue}break}}c=a;e=e+1|0;if((f|0)!=(e|0)){continue}break}return(a|0)==65536}return 0}function ug(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a:{if(!q[b+38>>1]){break a}l=a+12|0;if(!qg(1,l,b)){break a}f=o[a+12>>2];c=o[a>>2];d=o[a+4>>2]-c>>2;b:{if(f>>>0>d>>>0){Ia(a,f-d|0);f=o[a+12>>2];break b}if(f>>>0>=d>>>0){break b}o[a+4>>2]=c+(f<<2)}if(!f){return 1}m=o[b+8>>2];i=o[b+12>>2];while(1){e=o[b+16>>2];d=o[b+20>>2];c=d;if((i|0)<(c|0)?1:(i|0)<=(c|0)?m>>>0>e>>>0?0:1:0){break a}n=o[b>>2];j=p[n+e|0];e=e+1|0;if(e>>>0<1){d=d+1|0}c=b;h=e;o[c+16>>2]=e;o[c+20>>2]=d;e=j>>>2|0;c:{d:{e:{k=j&3;if(k>>>0>3){c=0;break e}c=0;f:{switch(k-1|0){case 0:case 1:break e;case 2:break f;default:break d}}d=e+g|0;if(d>>>0>=f>>>0){break a}ml(o[a>>2]+(g<<2)|0,0,(j&252)+4|0);g=d;break c}while(1){if((i|0)<(d|0)?1:(i|0)<=(d|0)?m>>>0>h>>>0?0:1:0){break a}j=p[h+n|0];h=h+1|0;if(h>>>0<1){d=d+1|0}f=b;o[f+16>>2]=h;o[f+20>>2]=d;e=j<<(c<<3|6)|e;c=c+1|0;if((k|0)!=(c|0)){continue}break}}o[o[a>>2]+(g<<2)>>2]=e}g=g+1|0;f=o[l>>2];if(g>>>0>>0){continue}break}d=a+16|0;i=o[a>>2];b=o[a+16>>2];c=o[a+20>>2]-b|0;g=c>>2;g:{if(g>>>0<=32767){Ia(d,32768-g|0);break g}if((c|0)==131072){break g}o[a+20>>2]=b+131072}h:{c=a+28|0;b=o[c>>2];g=o[a+32>>2]-b>>3;if(f>>>0>g>>>0){rg(c,f-g|0);b=o[c>>2];break h}if(f>>>0>>0){o[a+32>>2]=(f<<3)+b}if(f){break h}break a}e=0;c=0;while(1){a=i+(e<<2)|0;g=o[a>>2];h=(e<<3)+b|0;o[h+4>>2]=c;o[h>>2]=g;a=o[a>>2]+c|0;if(a>>>0>32768){break a}if(c>>>0>>0){g=o[d>>2];while(1){o[g+(c<<2)>>2]=e;c=c+1|0;if((a|0)!=(c|0)){continue}break}}c=a;e=e+1|0;if((f|0)!=(e|0)){continue}break}return(a|0)==32768}return 0}function tg(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a:{if(!q[b+38>>1]){break a}l=a+12|0;if(!qg(1,l,b)){break a}f=o[a+12>>2];c=o[a>>2];d=o[a+4>>2]-c>>2;b:{if(f>>>0>d>>>0){Ia(a,f-d|0);f=o[a+12>>2];break b}if(f>>>0>=d>>>0){break b}o[a+4>>2]=c+(f<<2)}if(!f){return 1}m=o[b+8>>2];i=o[b+12>>2];while(1){e=o[b+16>>2];d=o[b+20>>2];c=d;if((i|0)<(c|0)?1:(i|0)<=(c|0)?m>>>0>e>>>0?0:1:0){break a}n=o[b>>2];j=p[n+e|0];e=e+1|0;if(e>>>0<1){d=d+1|0}c=b;h=e;o[c+16>>2]=e;o[c+20>>2]=d;e=j>>>2|0;c:{d:{e:{k=j&3;if(k>>>0>3){c=0;break e}c=0;f:{switch(k-1|0){case 0:case 1:break e;case 2:break f;default:break d}}d=e+g|0;if(d>>>0>=f>>>0){break a}ml(o[a>>2]+(g<<2)|0,0,(j&252)+4|0);g=d;break c}while(1){if((i|0)<(d|0)?1:(i|0)<=(d|0)?m>>>0>h>>>0?0:1:0){break a}j=p[h+n|0];h=h+1|0;if(h>>>0<1){d=d+1|0}f=b;o[f+16>>2]=h;o[f+20>>2]=d;e=j<<(c<<3|6)|e;c=c+1|0;if((k|0)!=(c|0)){continue}break}}o[o[a>>2]+(g<<2)>>2]=e}g=g+1|0;f=o[l>>2];if(g>>>0>>0){continue}break}d=a+16|0;i=o[a>>2];b=o[a+16>>2];c=o[a+20>>2]-b|0;g=c>>2;g:{if(g>>>0<=8191){Ia(d,8192-g|0);break g}if((c|0)==32768){break g}o[a+20>>2]=b+32768}h:{c=a+28|0;b=o[c>>2];g=o[a+32>>2]-b>>3;if(f>>>0>g>>>0){rg(c,f-g|0);b=o[c>>2];break h}if(f>>>0>>0){o[a+32>>2]=(f<<3)+b}if(f){break h}break a}e=0;c=0;while(1){a=i+(e<<2)|0;g=o[a>>2];h=(e<<3)+b|0;o[h+4>>2]=c;o[h>>2]=g;a=o[a>>2]+c|0;if(a>>>0>8192){break a}if(c>>>0>>0){g=o[d>>2];while(1){o[g+(c<<2)>>2]=e;c=c+1|0;if((a|0)!=(c|0)){continue}break}}c=a;e=e+1|0;if((f|0)!=(e|0)){continue}break}return(a|0)==8192}return 0}function gg(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a:{if(!q[b+38>>1]){break a}l=a+12|0;if(!qg(1,l,b)){break a}f=o[a+12>>2];c=o[a>>2];d=o[a+4>>2]-c>>2;b:{if(f>>>0>d>>>0){Ia(a,f-d|0);f=o[a+12>>2];break b}if(f>>>0>=d>>>0){break b}o[a+4>>2]=c+(f<<2)}if(!f){return 1}m=o[b+8>>2];i=o[b+12>>2];while(1){e=o[b+16>>2];d=o[b+20>>2];c=d;if((i|0)<(c|0)?1:(i|0)<=(c|0)?m>>>0>e>>>0?0:1:0){break a}n=o[b>>2];j=p[n+e|0];e=e+1|0;if(e>>>0<1){d=d+1|0}c=b;h=e;o[c+16>>2]=e;o[c+20>>2]=d;e=j>>>2|0;c:{d:{e:{k=j&3;if(k>>>0>3){c=0;break e}c=0;f:{switch(k-1|0){case 0:case 1:break e;case 2:break f;default:break d}}d=e+g|0;if(d>>>0>=f>>>0){break a}ml(o[a>>2]+(g<<2)|0,0,(j&252)+4|0);g=d;break c}while(1){if((i|0)<(d|0)?1:(i|0)<=(d|0)?m>>>0>h>>>0?0:1:0){break a}j=p[h+n|0];h=h+1|0;if(h>>>0<1){d=d+1|0}f=b;o[f+16>>2]=h;o[f+20>>2]=d;e=j<<(c<<3|6)|e;c=c+1|0;if((k|0)!=(c|0)){continue}break}}o[o[a>>2]+(g<<2)>>2]=e}g=g+1|0;f=o[l>>2];if(g>>>0>>0){continue}break}d=a+16|0;i=o[a>>2];b=o[a+16>>2];c=o[a+20>>2]-b|0;g=c>>2;g:{if(g>>>0<=4095){Ia(d,4096-g|0);break g}if((c|0)==16384){break g}o[a+20>>2]=b+16384}h:{c=a+28|0;b=o[c>>2];g=o[a+32>>2]-b>>3;if(f>>>0>g>>>0){rg(c,f-g|0);b=o[c>>2];break h}if(f>>>0>>0){o[a+32>>2]=(f<<3)+b}if(f){break h}break a}e=0;c=0;while(1){a=i+(e<<2)|0;g=o[a>>2];h=(e<<3)+b|0;o[h+4>>2]=c;o[h>>2]=g;a=o[a>>2]+c|0;if(a>>>0>4096){break a}if(c>>>0>>0){g=o[d>>2];while(1){o[g+(c<<2)>>2]=e;c=c+1|0;if((a|0)!=(c|0)){continue}break}}c=a;e=e+1|0;if((f|0)!=(e|0)){continue}break}return(a|0)==4096}return 0}function Bd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,q=0,r=0,s=0,t=0;f=R-96|0;R=f;a:{if(!Cd(1,f+92|0,b)){break a}c=o[f+92>>2];if(!c){break a}e=o[a+4>>2];d=o[a+8>>2]-e>>2;b:{if(c>>>0>d>>>0){Ia(a+4|0,c-d|0);break b}if(c>>>0>=d>>>0){break b}o[a+8>>2]=e+(c<<2)}t=c>>>0>1?c:1;q=a+16|0;r=o[a+32>>2];while(1){k=o[b+8>>2];j=o[b+16>>2];g=o[b+12>>2];c=g;d=o[b+20>>2];if((c|0)<(d|0)?1:(c|0)<=(d|0)?k>>>0>j>>>0?0:1:0){d=0;break a}l=o[b>>2];s=p[l+j|0];c=d;h=j+1|0;if(h>>>0<1){c=c+1|0}e=b;o[e+16>>2]=h;o[e+20>>2]=c;if((g|0)<(c|0)?1:(g|0)<=(c|0)?k>>>0>h>>>0?0:1:0){d=0;break a}h=p[h+l|0];c=d;i=j+2|0;if(i>>>0<2){c=c+1|0}o[b+16>>2]=i;o[e+20>>2]=c;if((g|0)<(c|0)?1:(g|0)<=(c|0)?k>>>0>i>>>0?0:1:0){d=0;break a}i=p[i+l|0];c=d;m=j+3|0;if(m>>>0<3){c=c+1|0}o[b+16>>2]=m;o[e+20>>2]=c;if((g|0)<(c|0)?1:(g|0)<=(c|0)?k>>>0>m>>>0?0:1:0){d=0;break a}g=p[m+l|0];c=d;d=j+4|0;if(d>>>0<4){c=c+1|0}o[b+16>>2]=d;o[e+20>>2]=c;if(s>>>0>4){d=0;break a}if((h+ -1&255)>>>0>10){d=0;break a}d=qd(f+24|0);c=u(xi(h),i);rd(d,s,i<<24>>24,h,(g|0)!=0,c,c>>31);Cd(1,f+20|0,b);e=o[f+20>>2];o[f+84>>2]=e;c=yk(96);vd(c,d);o[f+16>>2]=c;d=vj(r,f+16|0);c=o[f+16>>2];o[f+16>>2]=0;if(c){Kb(c)}g=d<<2;o[o[g+o[r+8>>2]>>2]+60>>2]=e;o[o[a+4>>2]+(n<<2)>>2]=d;c=o[a+16>>2];e=o[a+20>>2]-c>>2;c:{if((d|0)<(e|0)){break c}o[f+12>>2]=-1;d=d+1|0;if(d>>>0>e>>>0){Dd(q,d-e|0,f+12|0);c=o[q>>2];break c}if(d>>>0>=e>>>0){break c}o[a+20>>2]=(d<<2)+c}o[c+g>>2]=n;d=1;n=n+1|0;if((t|0)!=(n|0)){continue}break}}R=f+96|0;return d|0}function $d(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,q=0;e=R-16|0;R=e;b=1;g=l[o[o[a>>2]+24>>2]](a)|0;a:{if((g|0)<1){break a}q=a+48|0;while(1){b:{c:{if(!o[(l[o[o[a>>2]+28>>2]](a)|0)+40>>2]){break c}h=f<<2;b=o[h+o[a+36>>2]>>2];c=o[b+8>>2];i=Qd(b);if(!i){break c}j=o[(l[o[o[a>>2]+28>>2]](a)|0)+40>>2];k=o[c+56>>2];b=yk(32);o[e>>2]=b;o[e+4>>2]=24;o[e+8>>2]=-2147483616;m[b+24|0]=0;c=p[1764]|p[1765]<<8|(p[1766]<<16|p[1767]<<24);d=p[1760]|p[1761]<<8|(p[1762]<<16|p[1763]<<24);m[b+16|0]=d;m[b+17|0]=d>>>8;m[b+18|0]=d>>>16;m[b+19|0]=d>>>24;m[b+20|0]=c;m[b+21|0]=c>>>8;m[b+22|0]=c>>>16;m[b+23|0]=c>>>24;c=p[1756]|p[1757]<<8|(p[1758]<<16|p[1759]<<24);d=p[1752]|p[1753]<<8|(p[1754]<<16|p[1755]<<24);m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=p[1748]|p[1749]<<8|(p[1750]<<16|p[1751]<<24);d=p[1744]|p[1745]<<8|(p[1746]<<16|p[1747]<<24);m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;d:{e:{d=j+16|0;c=d;b=o[c>>2];if(!b){break e}while(1){n=o[b+16>>2]<(k|0);c=n?c:b;b=o[(n<<2)+b>>2];if(b){continue}break}if((c|0)==(d|0)|(k|0)>2]){break e}b=c+20|0;if(!ja(b,e)){break e}b=Bi(b,e);break d}b=Bi(j,e)}if(m[e+11|0]<=-1){jl(o[e>>2])}if(!b){break c}xd(o[o[o[a+36>>2]+h>>2]+8>>2],i);break b}b=o[o[a+36>>2]+(f<<2)>>2];if(l[o[o[b>>2]+24>>2]](b,q)){break b}b=0;break a}b=1;f=f+1|0;if((g|0)!=(f|0)){continue}break}}R=e+16|0;return b|0}function _g(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0,s=0,t=0;j=R-16|0;R=j;n=-1;a:{b:{c:{if(!Xg(1,j+12|0,b)){break c}d=o[j+12>>2];if(d){c=o[a+8>>2];if(d>>>0>(o[c+4>>2]-o[c>>2]>>2>>>0)/3>>>0){break c}s=a+36|0;while(1){Xg(1,j+8|0,b);c=o[j+8>>2];Xg(1,j+8|0,b);h=c+h|0;c=o[j+8>>2];if(h>>>0>>0){break c}g=h-c|0;c=o[a+40>>2];i=o[a+44>>2];d:{if((c|0)!=(i|0)){o[c+4>>2]=h;o[c>>2]=g;o[a+40>>2]=o[a+40>>2]+12;break d}e=c;c=o[s>>2];k=e-c|0;e=(k|0)/12|0;f=e+1|0;if(f>>>0>=357913942){break b}t=u(e,12);i=(i-c|0)/12|0;e=i<<1;f=i>>>0<178956970?e>>>0>>0?f:e:357913941;e=0;e:{if(!f){break e}if(f>>>0>=357913942){break a}e=yk(u(f,12))}i=t+e|0;o[i+4>>2]=h;o[i>>2]=g;g=i+u((k|0)/-12|0,12)|0;e=e+u(f,12)|0;f=i+12|0;if((k|0)>=1){ll(g,c,k)}o[a+44>>2]=e;o[a+40>>2]=f;o[a+36>>2]=g;if(!c){break d}jl(c)}l=l+1|0;if((d|0)!=(l|0)){continue}break}h=0;ui(b,0,0);k=d>>>0>1?d:1;while(1){d=p[b+36|0];c=q[o[a+4>>2]+36>>1];f:{if((c<<24|c<<8&16711680)>>>16>>>0<=513){if(!d){break f}g=0;d=o[b+32>>2];l=d>>>3|0;e=o[b+24>>2];c=l+e|0;f=o[b+28>>2];g:{if(c>>>0>=f>>>0){c=d;break g}g=p[c|0];c=d+1|0;o[b+32>>2]=c;l=c>>>3|0;g=g>>>(d&7)&1}if(e+l>>>0>=f>>>0){break f}o[b+32>>2]=c+1;break f}if(!d){break f}g=0;d=o[b+32>>2];c=o[b+24>>2]+(d>>>3|0)|0;if(c>>>0>=r[b+28>>2]){break f}c=p[c|0];o[b+32>>2]=d+1;g=c>>>(d&7)&1}d=o[a+36>>2]+u(h,12)|0;m[d+8|0]=p[d+8|0]&254|g&1;h=h+1|0;if((k|0)!=(h|0)){continue}break}wi(b)}n=o[b+16>>2]}R=j+16|0;return n}Nk();D()}db(8832);D()}function bg(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a:{b:{c:{d:{e:{l=a+4|0;f:{if((l|0)==(b|0)){break f}f=p[b+27|0];i=f<<24>>24<0;h=p[e+11|0];n=h<<24>>24;g=(n|0)<0;f=i?o[b+20>>2]:f;h=g?o[e+4>>2]:h;j=f>>>0>>0;k=j?f:h;if(k){g=g?o[e>>2]:e;m=b+16|0;i=i?o[m>>2]:m;m=Vj(g,i,k);if(!m){if(h>>>0>>0){break f}break e}if((m|0)>-1){break e}break f}if(h>>>0>=f>>>0){break d}}i=o[b>>2];g:{h:{if(o[a>>2]==(b|0)){f=b;break h}i:{if(!i){d=b;while(1){f=o[d+8>>2];h=o[f>>2]==(d|0);d=f;if(h){continue}break}break i}d=i;while(1){f=d;d=o[f+4>>2];if(d){continue}break}}g=p[e+11|0];d=g<<24>>24<0;j=p[f+27|0];h=j<<24>>24<0;j:{g=d?o[e+4>>2]:g;j=h?o[f+20>>2]:j;k=g>>>0>>0?g:j;if(k){l=f+16|0;d=Vj(h?o[l>>2]:l,d?o[e>>2]:e,k);if(d){break j}}if(j>>>0>>0){break h}break g}if((d|0)>-1){break g}}if(!i){o[c>>2]=b;return b}o[c>>2]=f;return f+4|0}return cg(a,c,e)}f=Vj(i,g,k);if(f){break c}}if(j){break b}break a}if((f|0)>-1){break a}}i=o[b+4>>2];k:{if(i){f=i;while(1){d=f;f=o[f>>2];if(f){continue}break}break k}d=o[b+8>>2];if(o[d>>2]==(b|0)){break k}f=b+8|0;while(1){g=o[f>>2];f=g+8|0;d=o[g+8>>2];if((g|0)!=o[d>>2]){continue}break}}l:{m:{if((d|0)==(l|0)){break m}g=p[d+27|0];f=g<<24>>24<0;n:{g=f?o[d+20>>2]:g;j=g>>>0>>0?g:h;if(j){k=d+16|0;f=Vj((n|0)<0?o[e>>2]:e,f?o[k>>2]:k,j);if(f){break n}}if(h>>>0>>0){break m}break l}if((f|0)>-1){break l}}if(!i){o[c>>2]=b;return b+4|0}o[c>>2]=d;return d}return cg(a,c,e)}o[c>>2]=b;o[d>>2]=b;return d}function kh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=R-16|0;R=h;a:{if(!Sf(a+80|0,a)){break a}if(!$g(a)){break a}c=o[a+4>>2];o[b>>2]=o[a>>2];o[b+4>>2]=c;c=o[a+36>>2];o[b+32>>2]=o[a+32>>2];o[b+36>>2]=c;c=o[a+28>>2];o[b+24>>2]=o[a+24>>2];o[b+28>>2]=c;c=o[a+20>>2];o[b+16>>2]=o[a+16>>2];o[b+20>>2]=c;c=o[a+12>>2];o[b+8>>2]=o[a+8>>2];o[b+12>>2]=c;o[a+176>>2]=2;o[a+180>>2]=7;c=o[a+152>>2];if((c|0)<0){break a}o[h+12>>2]=0;d=2;f=o[a+156>>2];g=o[a+160>>2]-f>>2;b:{if(c>>>0>g>>>0){Dd(a+156|0,c-g|0,h+12|0);d=o[a+176>>2];e=o[a+180>>2];break b}e=7;if(c>>>0>=g>>>0){break b}o[a+160>>2]=f+(c<<2)}g=a+184|0;e=(e-d|0)+1|0;c=o[a+188>>2];f=o[a+184>>2];d=(c-f|0)/12|0;c:{if(e>>>0>d>>>0){mh(g,e-d|0);e=o[a+188>>2];break c}if(e>>>0>=d>>>0){e=c;break c}e=f+u(e,12)|0;if((e|0)!=(c|0)){while(1){d=c+ -12|0;f=o[d>>2];if(f){o[c+ -8>>2]=f;jl(f)}c=d;if((c|0)!=(e|0)){continue}break}}o[a+188>>2]=e}k=a+196|0;c=o[a+184>>2];d=(e-c|0)/12|0;i=o[a+196>>2];f=o[a+200>>2]-i>>2;d:{if(d>>>0>f>>>0){Ia(k,d-f|0);c=o[a+184>>2];e=o[a+188>>2];break d}if(d>>>0>=f>>>0){break d}o[a+200>>2]=i+(d<<2)}d=1;if((c|0)==(e|0)){break a}c=0;while(1){Xg(1,h+8|0,b);d=o[h+8>>2];if(d){e=o[g>>2];l=u(c,12);f=e+l|0;i=o[f>>2];j=o[f+4>>2]-i>>2;e:{if(d>>>0>j>>>0){Ia(f,d-j|0);e=o[g>>2];break e}if(d>>>0>=j>>>0){break e}o[f+4>>2]=(d<<2)+i}dg(d,1,b,o[e+l>>2]);o[o[k>>2]+(c<<2)>>2]=d}d=1;c=c+1|0;if(c>>>0<(o[a+188>>2]-o[a+184>>2]|0)/12>>>0){continue}break}}R=h+16|0;return d}function Xf(a,b,c,d){var e=0,f=0,g=0;e=R-80|0;R=e;f=o[c+36>>2];o[e+72>>2]=o[c+32>>2];o[e+76>>2]=f;g=o[c+28>>2];f=e- -64|0;o[f>>2]=o[c+24>>2];o[f+4>>2]=g;f=o[c+20>>2];o[e+56>>2]=o[c+16>>2];o[e+60>>2]=f;f=o[c+12>>2];o[e+48>>2]=o[c+8>>2];o[e+52>>2]=f;f=o[c+4>>2];o[e+40>>2]=o[c>>2];o[e+44>>2]=f;gi(a,e+40|0,e+24|0);a:{if(o[a>>2]){break a}f=a+4|0;if(m[a+15|0]<=-1){jl(o[f>>2])}if(p[e+31|0]!=1){b=yk(32);o[e>>2]=b;o[e+4>>2]=20;o[e+8>>2]=-2147483616;m[b+20|0]=0;c=p[7916]|p[7917]<<8|(p[7918]<<16|p[7919]<<24);m[b+16|0]=c;m[b+17|0]=c>>>8;m[b+18|0]=c>>>16;m[b+19|0]=c>>>24;c=p[7912]|p[7913]<<8|(p[7914]<<16|p[7915]<<24);d=p[7908]|p[7909]<<8|(p[7910]<<16|p[7911]<<24);m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=p[7904]|p[7905]<<8|(p[7906]<<16|p[7907]<<24);d=p[7900]|p[7901]<<8|(p[7902]<<16|p[7903]<<24);m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;o[a>>2]=-1;Bk(f,e);if(m[e+11|0]>-1){break a}jl(o[e>>2]);break a}Vf(e,p[e+32|0]);g=o[e>>2];b:{if(g){o[a>>2]=g;Bk(f,e|4);break b}g=o[e+16>>2];o[e+16>>2]=0;o[g+44>>2]=d;ji(a,g,b,c,d);if(!o[a>>2]){if(m[f+11|0]<=-1){jl(o[f>>2])}o[a>>2]=0;o[a+4>>2]=0;o[a+8>>2]=0;o[a+12>>2]=0}if(!g){break b}l[o[o[g>>2]+4>>2]](g)}a=o[e+16>>2];o[e+16>>2]=0;if(a){l[o[o[a>>2]+4>>2]](a)}if(m[e+15|0]>-1){break a}jl(o[e+4>>2])}R=e+80|0}function pf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0;o[a+8>>2]=e;h=a+32|0;g=o[h>>2];f=o[a+36>>2]-g>>2;a:{if(f>>>0>>0){Ia(h,e-f|0);break a}if(f>>>0<=e>>>0){break a}o[a+36>>2]=g+(e<<2)}h=0;f=(e&1073741823)!=(e|0)?-1:e<<2;m=ml(yk(f),0,f);g=o[a+8>>2];b:{if((g|0)<1){break b}while(1){f=h<<2;g=o[f+m>>2];i=o[a+16>>2];c:{if((g|0)>(i|0)){j=o[a+32>>2];o[f+j>>2]=i;break c}j=o[a+32>>2];f=f+j|0;i=o[a+12>>2];if((g|0)<(i|0)){o[f>>2]=i;break c}o[f>>2]=g}h=h+1|0;g=o[a+8>>2];if((h|0)<(g|0)){continue}break}if((g|0)<1){break b}i=0;while(1){h=i<<2;f=h+c|0;h=o[b+h>>2]+o[h+j>>2]|0;o[f>>2]=h;d:{if((h|0)>o[a+16>>2]){h=h-o[a+20>>2]|0}else{if((h|0)>=o[a+12>>2]){break d}h=h+o[a+20>>2]|0}o[f>>2]=h}i=i+1|0;g=o[a+8>>2];if((i|0)<(g|0)){continue}break}}if((e|0)<(d|0)){p=0-e<<2;f=e;while(1){e:{if((g|0)<1){break e}l=f<<2;n=l+c|0;q=n+p|0;h=0;while(1){g=h<<2;i=o[g+q>>2];k=o[a+16>>2];f:{if((i|0)>(k|0)){j=o[a+32>>2];o[g+j>>2]=k;break f}j=o[a+32>>2];g=g+j|0;k=o[a+12>>2];if((i|0)<(k|0)){o[g>>2]=k;break f}o[g>>2]=i}h=h+1|0;g=o[a+8>>2];if((h|0)<(g|0)){continue}break}i=0;if((g|0)<1){break e}l=b+l|0;while(1){g=i<<2;h=g+n|0;g=o[g+l>>2]+o[g+j>>2]|0;o[h>>2]=g;g:{if((g|0)>o[a+16>>2]){g=g-o[a+20>>2]|0}else{if((g|0)>=o[a+12>>2]){break g}g=g+o[a+20>>2]|0}o[h>>2]=g}i=i+1|0;g=o[a+8>>2];if((i|0)<(g|0)){continue}break}}f=e+f|0;if((f|0)<(d|0)){continue}break}}jl(m);return 1}function hi(a,b){var c=0,d=0,e=0;e=R-48|0;R=e;c=yk(36);o[c+4>>2]=0;o[c+8>>2]=0;o[c+16>>2]=0;o[c+20>>2]=0;o[c+32>>2]=0;o[c+24>>2]=0;o[c+28>>2]=0;o[c>>2]=c+4;o[c+12>>2]=c+16;o[e+40>>2]=c;d=e+32|0;o[d>>2]=0;a:{if(!dj(d,o[b+32>>2],c)){b=yk(32);o[e+16>>2]=b;o[e+20>>2]=26;o[e+24>>2]=-2147483616;m[b+26|0]=0;c=p[10238]|p[10239]<<8;m[b+24|0]=c;m[b+25|0]=c>>>8;c=p[10234]|p[10235]<<8|(p[10236]<<16|p[10237]<<24);d=p[10230]|p[10231]<<8|(p[10232]<<16|p[10233]<<24);m[b+16|0]=d;m[b+17|0]=d>>>8;m[b+18|0]=d>>>16;m[b+19|0]=d>>>24;m[b+20|0]=c;m[b+21|0]=c>>>8;m[b+22|0]=c>>>16;m[b+23|0]=c>>>24;c=p[10226]|p[10227]<<8|(p[10228]<<16|p[10229]<<24);d=p[10222]|p[10223]<<8|(p[10224]<<16|p[10225]<<24);m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=p[10218]|p[10219]<<8|(p[10220]<<16|p[10221]<<24);d=p[10214]|p[10215]<<8|(p[10216]<<16|p[10217]<<24);m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;o[a>>2]=-1;Bk(a+4|0,e+16|0);if(m[e+27|0]>-1){break a}jl(o[e+16>>2]);break a}b=o[b+4>>2];o[e+8>>2]=0;o[e+40>>2]=0;d=o[b+4>>2];o[b+4>>2]=c;b:{if(!d){o[e+8>>2]=0;break b}ii(d);b=o[e+8>>2];o[e+8>>2]=0;if(!b){break b}ii(b)}o[a>>2]=0;o[a+4>>2]=0;o[a+8>>2]=0;o[a+12>>2]=0}a=o[e+40>>2];o[e+40>>2]=0;if(a){ii(a)}R=e+48|0}function Rg(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=R-112|0;R=d;j=o[o[b+4>>2]+44>>2];f=yk(120);e=f;o[e+12>>2]=0;o[e+16>>2]=0;o[e>>2]=8940;o[e+4>>2]=0;o[e+8>>2]=9152;o[e+116>>2]=0;o[e+112>>2]=c;o[e+108>>2]=j;o[e+104>>2]=0;o[e+96>>2]=0;o[e+100>>2]=0;o[e+20>>2]=0;o[e+24>>2]=0;o[e+28>>2]=0;o[e+32>>2]=0;o[e+36>>2]=0;o[e+40>>2]=0;o[e+44>>2]=0;o[e+48>>2]=0;o[e+52>>2]=0;o[e+56>>2]=0;o[e+60>>2]=0;e=e- -64|0;o[e>>2]=0;o[e+4>>2]=0;o[f+72>>2]=0;o[f+76>>2]=0;o[f+80>>2]=0;o[f+84>>2]=0;o[f+88>>2]=0;b=o[b+8>>2];o[d+48>>2]=0;o[d+52>>2]=0;o[d+40>>2]=0;o[d+44>>2]=0;e=d+24|0;o[e>>2]=0;o[e+4>>2]=0;h=d- -64|0;o[h>>2]=0;o[h+4>>2]=0;o[d+72>>2]=0;o[d+76>>2]=0;h=d+80|0;g=h;o[g>>2]=0;o[g+4>>2]=0;o[d+88>>2]=0;o[d+104>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;o[d+56>>2]=0;o[d+60>>2]=0;o[d+8>>2]=9152;o[d+96>>2]=0;o[d+100>>2]=0;o[d+12>>2]=b;g=o[b>>2];i=o[b+4>>2];m[d+111|0]=0;eb(d+32|0,(i-g>>2>>>0)/3|0,d+111|0);g=o[d+12>>2];i=o[g+28>>2];g=o[g+24>>2];m[d+111|0]=0;eb(d+44|0,i-g>>2,d+111|0);o[d+28>>2]=f;o[e>>2]=j;o[d+20>>2]=c;o[d+16>>2]=b;Tg(f,d+8|0);o[a>>2]=f;o[d+8>>2]=9152;a=o[d+96>>2];if(a){o[d+100>>2]=a;jl(a)}a=o[h>>2];if(a){o[d+84>>2]=a;jl(a)}a=o[d+68>>2];if(a){o[d+72>>2]=a;jl(a)}a=o[d+56>>2];if(a){o[d+60>>2]=a;jl(a)}o[d+8>>2]=9388;a=o[d+44>>2];if(a){jl(a)}a=o[d+32>>2];if(a){jl(a)}R=d+112|0}function nh(a,b){var c=0,d=0,e=0,f=0,g=0;f=-1;d=-1;a:{if((b|0)==-1){break a}d=b+1|0;f=(d>>>0)%3|0?d:b+ -2|0;d=b+ -1|0;if((b>>>0)%3){break a}d=b+2|0}c=o[a+168>>2];b:{if(c>>>0>7){break b}c:{d:{switch(c-2|0){default:c=o[a+148>>2];e=1;b=o[a+156>>2];g=b+(((f|0)!=-1?o[o[c>>2]+(f<<2)>>2]:-1)<<2)|0;o[g>>2]=o[g>>2]+1;b=(((d|0)!=-1?o[o[c>>2]+(d<<2)>>2]:-1)<<2)+b|0;break c;case 3:e=o[a+148>>2];c=-1;c=((b|0)!=-1?o[o[e>>2]+(b<<2)>>2]:c)<<2;b=o[a+156>>2];c=c+b|0;o[c>>2]=o[c>>2]+1;c=(((f|0)!=-1?o[o[e>>2]+(f<<2)>>2]:-1)<<2)+b|0;o[c>>2]=o[c>>2]+1;c=-1;c=(d|0)!=-1?o[o[e>>2]+(d<<2)>>2]:c;e=2;b=b+(c<<2)|0;break c;case 1:e=o[a+148>>2];c=-1;c=((b|0)!=-1?o[o[e>>2]+(b<<2)>>2]:c)<<2;b=o[a+156>>2];c=c+b|0;o[c>>2]=o[c>>2]+1;c=(((f|0)!=-1?o[o[e>>2]+(f<<2)>>2]:-1)<<2)+b|0;o[c>>2]=o[c>>2]+2;b=(((d|0)!=-1?o[o[e>>2]+(d<<2)>>2]:-1)<<2)+b|0;e=1;break c;case 0:case 2:case 4:break b;case 5:break d}}e=o[a+148>>2];c=-1;c=((b|0)!=-1?o[o[e>>2]+(b<<2)>>2]:c)<<2;b=o[a+156>>2];c=c+b|0;o[c>>2]=o[c>>2]+2;c=(((f|0)!=-1?o[o[e>>2]+(f<<2)>>2]:-1)<<2)+b|0;o[c>>2]=o[c>>2]+2;c=-1;c=(d|0)!=-1?o[o[e>>2]+(d<<2)>>2]:c;e=2;b=b+(c<<2)|0}o[b>>2]=o[b>>2]+e}c=-1;c=(f|0)!=-1?o[o[o[a+148>>2]>>2]+(f<<2)>>2]:c;f=o[a+176>>2];b=f;d=a;c=o[o[a+156>>2]+(c<<2)>>2];if((c|0)>=(b|0)){a=o[a+180>>2];b=(c|0)>(a|0)?a:c}o[d+172>>2]=b-f}function Oe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=R-16|0;R=j;e=o[b+12>>2];c=o[b+20>>2];f=o[b+16>>2];d=f+4|0;if(d>>>0<4){c=c+1|0}g=d;d=c;a:{if((e|0)<(c|0)?1:(e|0)<=(c|0)?r[b+8>>2]>=g>>>0?0:1:0){break a}c=f+o[b>>2]|0;c=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);o[b+16>>2]=g;o[b+20>>2]=d;if((c|0)<0){break a}He(a+76|0,c);g=Rf(j);b:{if(!Sf(g,b)){break b}if((c|0)>=1){e=1;while(1){f=1<<(i&31);h=Uf(g);d=o[a+76>>2]+(i>>>3&536870908)|0;e=e^h;h=o[d>>2]|f;c:{if(!(e&1)){break c}h=o[d>>2]&(f^-1)}f=h;e=e^1;o[d>>2]=f;i=i+1|0;if((c|0)!=(i|0)){continue}break}}d=o[b+12>>2];i=d;c=o[b+20>>2];e=c;g=o[b+16>>2];f=g+4|0;if(f>>>0<4){c=c+1|0}k=o[b+8>>2];h=f;f=c;if((d|0)<(c|0)?1:(d|0)<=(c|0)?k>>>0>=h>>>0?0:1:0){break b}l=o[b>>2];c=l+g|0;d=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);o[b+16>>2]=h;o[b+20>>2]=f;c=e;e=g+8|0;if(e>>>0<8){c=c+1|0}f=e;e=c;if((i|0)<(c|0)?1:(i|0)<=(c|0)?k>>>0>=f>>>0?0:1:0){break b}c=h+l|0;c=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);o[b+16>>2]=f;o[b+20>>2]=e;if((d|0)>(c|0)){break b}o[a+16>>2]=c;o[a+12>>2]=d;b=d;d=(c>>31)-((c>>>0>>0)+(b>>31)|0)|0;b=c-b|0;if(!d&b>>>0>2147483646|d>>>0>0){break b}m=1;b=b+1|0;o[a+20>>2]=b;c=(b|0)/2|0;o[a+24>>2]=c;o[a+28>>2]=0-c;if(b&1){break b}o[a+24>>2]=c+ -1}}R=j+16|0;return m|0}function Nl(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{g=b;if(g){e=c;if(!e){break j}f=d;if(!f){break i}f=x(f)-x(g)|0;if(f>>>0<=31){break h}break b}if((d|0)==1&c>>>0>=0|d>>>0>1){break b}b=(a>>>0)/(c>>>0)|0;Kl(a-u(b,c)|0,0);T=0;return b}e=d;if(!a){break g}if(!e){break f}f=e+ -1|0;if(f&e){break f}Kl(a,f&g);a=g>>>(Tl(e)&31)|0;T=0;return a}f=e+ -1|0;if(!(f&e)){break e}j=(x(e)+33|0)-x(g)|0;h=0-j|0;break c}j=f+1|0;h=63-f|0;break c}a=(g>>>0)/(e>>>0)|0;Kl(0,g-u(a,e)|0);T=0;return a}f=x(e)-x(g)|0;if(f>>>0<31){break d}break b}Kl(a&f,0);if((e|0)==1){break a}c=a;a=Tl(e);d=a&31;if(32<=(a&63)>>>0){f=0;a=b>>>d|0}else{f=b>>>d|0;a=((1<>>d}T=f;return a}j=f+1|0;h=63-f|0}e=b;g=a;f=j&63;i=f&31;if(32<=(f&63)>>>0){f=0;l=e>>>i|0}else{f=e>>>i|0;l=((1<>>i}a=h&63;h=a&31;if(32<=(a&63)>>>0){e=g<>>32-h|b<>>0<4294967295){g=g+1|0}h=e;while(1){e=l;f=f<<1|e>>>31;e=e<<1;k=f;f=b>>>31|e;m=k;e=k;k=f;i=g-((h>>>0>>0)+e|0)|0;e=i>>31;i=i>>31;f=c&i;l=k-f|0;f=m-((d&e)+(k>>>0>>0)|0)|0;e=b<<1|a>>>31;a=n|a<<1;b=e|o;e=0;m=e;k=i&1;n=k;j=j+ -1|0;if(j){continue}break}}Kl(l,f);e=b<<1|a>>>31;a=k|a<<1;T=e|m;return a}Kl(a,b);a=0;b=0}T=b;return a}function me(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=o[a+8>>2];c=o[d+28>>2]+ -1|0;if(c>>>0>5){return 0}a:{switch(c-1|0){case 2:ne(a,b);return 1;case 1:ne(a,b);return 1;case 4:f=m[d+24|0];h=f<<2;i=yk((f|0)!=(f&1073741823)?-1:h);c=o[a+16>>2];d=0;b:{if(!o[c+80>>2]){break b}d=o[o[c>>2]>>2]+o[c+48>>2]|0}if(b){while(1){c=j;e=0;if((f|0)>0){while(1){o[i+(e<<2)>>2]=o[d+(c<<2)>>2];c=c+1|0;e=e+1|0;if((f|0)!=(e|0)){continue}break}j=j+f|0}ll(o[o[o[a+8>>2]+64>>2]>>2]+k|0,i,h);k=h+k|0;g=g+1|0;if((g|0)!=(b|0)){continue}break}}jl(i);return 1;case 3:f=m[d+24|0];h=f<<2;i=yk((f|0)!=(f&1073741823)?-1:h);c=o[a+16>>2];d=0;c:{if(!o[c+80>>2]){break c}d=o[o[c>>2]>>2]+o[c+48>>2]|0}if(b){while(1){c=j;e=0;if((f|0)>0){while(1){o[i+(e<<2)>>2]=o[d+(c<<2)>>2];c=c+1|0;e=e+1|0;if((f|0)!=(e|0)){continue}break}j=j+f|0}ll(o[o[o[a+8>>2]+64>>2]>>2]+k|0,i,h);k=h+k|0;g=g+1|0;if((g|0)!=(b|0)){continue}break}}jl(i);return 1;default:break a}}g=m[d+24|0];h=yk((g|0)>-1?g:-1);c=o[a+16>>2];d=0;d:{if(!o[c+80>>2]){break d}d=o[o[c>>2]>>2]+o[c+48>>2]|0}if(b){while(1){c=j;e=0;if((g|0)>0){while(1){m[e+h|0]=o[d+(c<<2)>>2];c=c+1|0;e=e+1|0;if((g|0)!=(e|0)){continue}break}j=g+j|0}ll(o[o[o[a+8>>2]+64>>2]>>2]+k|0,h,g);k=g+k|0;i=i+1|0;if((i|0)!=(b|0)){continue}break}}jl(h);return 1}function Zg(a,b){var c=0,d=0,e=0,f=0,g=0;a:{e=o[a+8>>2];c=o[a+4>>2];if((e-c|0)/144>>>0>=b>>>0){while(1){o[c>>2]=-1;Vi(c+4|0);o[c+104>>2]=0;o[c+108>>2]=0;m[c+100|0]=1;o[c+112>>2]=0;o[c+116>>2]=0;o[c+120>>2]=0;o[c+124>>2]=0;o[c+128>>2]=0;o[c+132>>2]=0;o[c+136>>2]=0;o[c+140>>2]=0;c=o[a+4>>2]+144|0;o[a+4>>2]=c;b=b+ -1|0;if(b){continue}break a}}d=c;c=o[a>>2];f=(d-c|0)/144|0;g=f+b|0;b:{c:{d:{if(g>>>0<29826162){e=(e-c|0)/144|0;c=e<<1;c=e>>>0<14913080?c>>>0>>0?g:c:29826161;d=0;e:{if(!c){break e}if(c>>>0>=29826162){break d}d=yk(u(c,144))}e=d+u(c,144)|0;f=d+u(f,144)|0;c=f;while(1){o[c>>2]=-1;Vi(c+4|0);o[c+104>>2]=0;o[c+108>>2]=0;m[c+100|0]=1;o[c+112>>2]=0;o[c+116>>2]=0;o[c+120>>2]=0;o[c+124>>2]=0;o[c+128>>2]=0;o[c+132>>2]=0;o[c+136>>2]=0;o[c+140>>2]=0;c=c+144|0;b=b+ -1|0;if(b){continue}break}d=d+u(g,144)|0;b=o[a+4>>2];c=o[a>>2];if((b|0)==(c|0)){break c}while(1){b=b+ -144|0;f=Vh(f+ -144|0,b);if((b|0)!=(c|0)){continue}break}c=o[a+4>>2];b=o[a>>2];break b}Nk();D()}db(8832);D()}b=c}o[a+8>>2]=e;o[a+4>>2]=d;o[a>>2]=f;if((b|0)!=(c|0)){while(1){a=o[c+ -12>>2];if(a){o[c+ -8>>2]=a;jl(a)}a=o[c+ -28>>2];if(a){o[c+ -24>>2]=a;jl(a)}a=c+ -144|0;d=o[c+ -40>>2];if(d){o[c+ -36>>2]=d;jl(d)}Yg(c+ -140|0);c=a;if((b|0)!=(c|0)){continue}break}}if(!b){break a}jl(b)}}function _f(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=R-32|0;R=e;f=a+16|0;d=o[f>>2];a:{b:{if(!d){break b}h=o[b>>2];c=f;while(1){g=o[d+16>>2]<(h|0);c=g?c:d;d=o[(g<<2)+d>>2];if(d){continue}break}if((c|0)==(f|0)){break b}if((h|0)>=o[c+16>>2]){break a}}j=yi(e+16|0);b=o[b>>2];i=e+8|0;o[i>>2]=0;o[i+4>>2]=0;o[e>>2]=b;o[e+4>>2]=i;c=o[j>>2];h=j+4|0;if((c|0)!=(h|0)){g=e|4;while(1){b=c;d=c+16|0;$f(g,i,d,d);d=o[c+4>>2];c:{if(!d){c=o[b+8>>2];if((b|0)==o[c>>2]){break c}d=b+8|0;while(1){b=o[d>>2];d=b+8|0;c=o[b+8>>2];if((b|0)!=o[c>>2]){continue}break}break c}while(1){c=d;d=o[c>>2];if(d){continue}break}}if((c|0)!=(h|0)){continue}break}}d=o[a+16>>2];d:{if(d){f=a+16|0;g=o[e>>2];while(1){b=o[d+16>>2];e:{if((g|0)<(b|0)){c=o[d>>2];if(c){break e}f=d;break d}if((b|0)>=(g|0)){break d}f=d+4|0;c=o[d+4>>2];if(!c){break d}d=f}f=d;d=c;continue}}d=f}c=o[f>>2];if(!c){c=yk(32);o[c+16>>2]=o[e>>2];o[c+20>>2]=o[e+4>>2];g=o[e+8>>2];o[c+24>>2]=g;b=o[e+12>>2];o[c+28>>2]=b;h=c+24|0;f:{if(!b){o[c+20>>2]=h;break f}o[g+8>>2]=h;o[e+8>>2]=0;o[e+12>>2]=0;o[e+4>>2]=i}o[c+8>>2]=d;o[c>>2]=0;o[c+4>>2]=0;o[f>>2]=c;d=o[o[a+12>>2]>>2];b=c;g:{if(!d){break g}o[a+12>>2]=d;b=o[f>>2]}ag(o[a+16>>2],b);a=a+20|0;o[a>>2]=o[a>>2]+1}Fc(e|4,o[e+8>>2]);Fc(j,o[j+4>>2])}R=e+32|0;return c+20|0}function Vf(a,b){var c=0,d=0,e=0;e=R-32|0;R=e;a:{if(b>>>0<=1){if(b-1){b=yk(48);zg(b);o[b>>2]=9880;o[a+8>>2]=0;o[a+12>>2]=0;o[a>>2]=0;o[a+4>>2]=0;o[a+16>>2]=b;break a}b=yk(52);zg(b);o[b+48>>2]=0;o[b>>2]=8120;o[a+8>>2]=0;o[a+12>>2]=0;o[a>>2]=0;o[a+4>>2]=0;o[a+16>>2]=b;break a}b=yk(32);o[e>>2]=b;o[e+4>>2]=28;o[e+8>>2]=-2147483616;m[b+28|0]=0;c=p[7868]|p[7869]<<8|(p[7870]<<16|p[7871]<<24);m[b+24|0]=c;m[b+25|0]=c>>>8;m[b+26|0]=c>>>16;m[b+27|0]=c>>>24;c=p[7864]|p[7865]<<8|(p[7866]<<16|p[7867]<<24);d=p[7860]|p[7861]<<8|(p[7862]<<16|p[7863]<<24);m[b+16|0]=d;m[b+17|0]=d>>>8;m[b+18|0]=d>>>16;m[b+19|0]=d>>>24;m[b+20|0]=c;m[b+21|0]=c>>>8;m[b+22|0]=c>>>16;m[b+23|0]=c>>>24;c=p[7856]|p[7857]<<8|(p[7858]<<16|p[7859]<<24);d=p[7852]|p[7853]<<8|(p[7854]<<16|p[7855]<<24);m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=p[7848]|p[7849]<<8|(p[7850]<<16|p[7851]<<24);d=p[7844]|p[7845]<<8|(p[7846]<<16|p[7847]<<24);m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;o[e+16>>2]=-1;b=Bk(e+16|4,e);o[a>>2]=o[e+16>>2];Bk(a+4|0,b);o[a+16>>2]=0;if(m[b+11|0]<=-1){jl(o[b>>2])}if(m[e+11|0]>-1){break a}jl(o[e>>2])}R=e+32|0}function cj(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=R-32|0;R=d;o[d+24>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;a:{e=o[a>>2];c=e;g=o[c+16>>2];h=r[c+8>>2]>g>>>0?0:1;f=o[c+12>>2];c=o[c+20>>2];b:{if((f|0)<(c|0)?1:(f|0)<=(c|0)?h:0){break b}h=p[g+o[e>>2]|0];f=c;c=g+1|0;if(c>>>0<1){f=f+1|0}o[e+16>>2]=c;o[e+20>>2]=f;Gk(d+16|0,h);if(h){f=o[a>>2];j=Kk(d+16|0);l=o[f+12>>2];g=o[f+20>>2];k=o[f+16>>2];e=h;c=k+e|0;if(c>>>0>>0){g=g+1|0}if((l|0)<(g|0)?1:(l|0)<=(g|0)?r[f+8>>2]>=c>>>0?0:1:0){break b}ll(j,k+o[f>>2]|0,h);c=f;f=c;g=o[c+20>>2];h=e+o[c+16>>2]|0;if(h>>>0>>0){g=g+1|0}o[f+16>>2]=h;o[c+20>>2]=g}o[d+12>>2]=0;c=bj(1,d+12|0,o[a>>2]);e=o[d+12>>2];if(!e|!c){break b}o[d+8>>2]=0;o[d>>2]=0;o[d+4>>2]=0;if((e|0)<=-1){break a}i=yk(e);o[d>>2]=i;o[d+4>>2]=i;o[d+8>>2]=e+i;c=e;while(1){m[i|0]=0;i=o[d+4>>2]+1|0;o[d+4>>2]=i;c=c+ -1|0;if(c){continue}break}i=0;c=o[a>>2];a=o[c+8>>2];k=o[c+12>>2];f=a;j=o[c+20>>2];g=o[c+16>>2];a=e;h=g+e|0;if(h>>>0>>0){j=j+1|0}if((k|0)>(j|0)?1:(k|0)>=(j|0)?f>>>0>>0?0:1:0){ll(o[d>>2],g+o[c>>2]|0,e);e=c;h=c;f=o[c+20>>2];c=a+o[c+16>>2]|0;if(c>>>0>>0){f=f+1|0}o[h+16>>2]=c;o[e+20>>2]=f;nj(b,d+16|0,d);i=1}a=o[d>>2];if(!a){break b}o[d+4>>2]=a;jl(a)}if(m[d+27|0]<=-1){jl(o[d+16>>2])}R=d+32|0;return i}Nk();D()}function eg(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;e=R+ -64|0;R=e;o[e+56>>2]=0;o[e+48>>2]=0;o[e+52>>2]=0;o[e+40>>2]=0;o[e+44>>2]=0;o[e+32>>2]=0;o[e+36>>2]=0;o[e+24>>2]=0;o[e+28>>2]=0;o[e+16>>2]=0;o[e+20>>2]=0;o[e+8>>2]=0;o[e+12>>2]=0;a:{if(!gg(e+8|0,c)){break a}if(!hg(e+8|0,c)){break a}b:{if(!a){ui(c,0,0);break b}if(!o[e+20>>2]){break a}ui(c,0,0);g=o[e+56>>2];s=o[e+36>>2];t=o[e+48>>2];v=o[e+24>>2];while(1){c:{if(g>>>0>16383){break c}f=o[e+52>>2];while(1){if((f|0)<1){break c}f=f+ -1|0;o[e+52>>2]=f;g=p[f+t|0]|g<<8;o[e+56>>2]=g;if(g>>>0<16384){continue}break}}h=g&4095;m=o[(h<<2)+v>>2];i=(m<<3)+s|0;g=(u(o[i>>2],g>>>12|0)+h|0)-o[i+4>>2]|0;o[e+56>>2]=g;if((b|0)>=1){j=0;i=q;if(!p[c+36|0]){break a}while(1){n=0;if((m|0)>=1){h=o[c+32>>2];w=o[c+28>>2];x=o[c+24>>2];f=0;while(1){k=(h>>>3|0)+x|0;d:{if(k>>>0>=w>>>0){l=0;break d}l=p[k|0];k=h+1|0;o[c+32>>2]=k;l=l>>>(h&7)&1;h=k}n=l<>2]=n;i=i+1|0;j=j+1|0;if((j|0)!=(b|0)){continue}break}q=b+q|0}r=b+r|0;if(r>>>0>>0){continue}break}}wi(c);j=1}a=o[e+36>>2];if(a){o[e+40>>2]=a;jl(a)}a=o[e+24>>2];if(a){o[e+28>>2]=a;jl(a)}a=o[e+8>>2];if(a){o[e+12>>2]=a;jl(a)}R=e- -64|0;return j}function Ca(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=R-16|0;R=e;o[a+68>>2]=o[a+68>>2]+1;d=u(b,12)+a|0;d=o[d+12>>2]-o[d+8>>2]|0;if((d|0)>=1){d=d>>2;j=(d|0)>1?d:1;d=o[((b<<2)+a|0)+44>>2];while(1){b=d;g=(b>>>0)/3|0;f=(b|0)==-1;d=f?-1:g;h=o[a+56>>2]+(d>>>3&536870908)|0;o[h>>2]=o[h>>2]|1<<(d&31);o[a+72>>2]=o[a+72>>2]+1;a:{b:{if(!i){o[e+12>>2]=(b|0)<0?-1:o[(o[o[a>>2]+96>>2]+u(g,12)|0)+((b>>>0)%3<<2)>>2];o[e+8>>2]=c;Ba(e+8|0,e+12|0);c:{if(!f){d=-1;g=e;f=b+1|0;f=(f>>>0)%3|0?f:b+ -2|0;if((f|0)>=0){h=(f>>>0)/3|0;f=o[(o[o[a>>2]+96>>2]+u(h,12)|0)+(f-u(h,3)<<2)>>2]}else{f=-1}o[g+12>>2]=f;o[e+8>>2]=c;Ba(e+8|0,e+12|0);g=((b>>>0)%3|0?-1:2)+b|0;if((g|0)<0){break c}d=(g>>>0)/3|0;d=o[(o[o[a>>2]+96>>2]+u(d,12)|0)+(g-u(d,3)<<2)>>2];break c}d=-1;o[e+12>>2]=-1;o[e+8>>2]=c;Ba(e+8|0,e+12|0)}o[a+76>>2]=d;o[e+12>>2]=d;o[e+8>>2]=c;Ba(e+8|0,e+12|0);break b}f=(b|0)<0?-1:o[(o[o[a>>2]+96>>2]+u(g,12)|0)+((b>>>0)%3<<2)>>2];o[a+76>>2]=f;o[e+12>>2]=f;o[e+8>>2]=c;Ba(e+8|0,e+12|0);if(i&1){d=-1;if((b|0)==-1){break a}if(b-u(g,3)){b=b+ -1|0;break b}b=b+2|0;break b}d=-1;if((b|0)==-1){break a}d=b+1|0;b=(d>>>0)%3|0?d:b+ -2|0}d=-1;if((b|0)==-1){break a}d=o[o[o[a+4>>2]+12>>2]+(b<<2)>>2]}i=i+1|0;if((j|0)!=(i|0)){continue}break}}R=e+16|0}function Zj(a,b,c,d){var e=0,h=0,i=0,j=0,k=0,l=0,m=0;i=R-32|0;R=i;e=d&2147483647;k=e;e=e+ -1006698496|0;j=c;h=c;if(c>>>0<0){e=e+1|0}l=h;h=e;e=k+ -1140785152|0;m=j;if(j>>>0<0){e=e+1|0}a:{if((e|0)==(h|0)&l>>>0>>0|h>>>0>>0){e=d<<4|c>>>28;c=c<<4|b>>>28;b=b&268435455;j=b;if((b|0)==134217728&a>>>0>=1|b>>>0>134217728){e=e+1073741824|0;a=c+1|0;if(a>>>0<1){e=e+1|0}h=a;break a}h=c;e=e-((c>>>0<0)+ -1073741824|0)|0;if(a|j^134217728){break a}a=h+(h&1)|0;if(a>>>0>>0){e=e+1|0}h=a;break a}if(!(!j&(k|0)==2147418112?!(a|b):(k|0)==2147418112&j>>>0<0|k>>>0<2147418112)){e=d<<4|c>>>28;h=c<<4|b>>>28;e=e&524287|2146959360;break a}h=0;e=2146435072;if((k|0)==1140785151&j>>>0>4294967295|k>>>0>1140785151){break a}e=0;j=k>>>16|0;if(j>>>0<15249){break a}e=d&65535|65536;Xj(i+16|0,a,b,c,e,j+ -15233|0);Yj(i,a,b,c,e,15361-j|0);c=o[i+4>>2];a=o[i+8>>2];e=o[i+12>>2]<<4|a>>>28;h=a<<4|c>>>28;a=c&268435455;c=a;b=o[i>>2]|((o[i+16>>2]|o[i+24>>2])!=0|(o[i+20>>2]|o[i+28>>2])!=0);if((a|0)==134217728&b>>>0>=1|a>>>0>134217728){a=h+1|0;if(a>>>0<1){e=e+1|0}h=a;break a}if(b|c^134217728){break a}a=h+(h&1)|0;if(a>>>0>>0){e=e+1|0}h=a}R=i+32|0;f(0,h|0);f(1,d&-2147483648|e);return+g()}function fh(a,b,c,d){var e=0,f=0,g=0,h=0,i=v(0),j=0,k=v(0),l=0,n=0;f=o[c>>2];l=a;a:{b:{e=o[b+4>>2];if(!e){break b}h=o[b>>2];j=Rl(e);g=f&e+ -1;c:{if(j>>>0<=1){break c}c=f;g=c;if(c>>>0>>0){break c}g=(f>>>0)%(e>>>0)|0}c=g;g=c;c=o[(c<<2)+h>>2];if(!c){break b}n=e+ -1|0;j=j>>>0>1;while(1){c=o[c>>2];if(!c){break b}h=o[c+4>>2];if((f|0)!=(h|0)){d:{if(!j){h=h&n;break d}if(h>>>0>>0){break d}h=(h>>>0)%(e>>>0)|0}if((h|0)!=(g|0)){break b}}if((f|0)!=o[c+8>>2]){continue}break}b=0;break a}c=yk(16);d=o[o[d>>2]>>2];o[c+12>>2]=0;o[c+8>>2]=d;o[c+4>>2]=f;o[c>>2]=0;i=s[b+16>>2];k=v(o[b+12>>2]+1>>>0);e:{if(v(i*v(e>>>0))>>0<3|e<<1;d=b;i=v(B(v(k/i)));f:{if(i=v(0)){g=~~i>>>0;break f}g=0}Wh(d,e>>>0>>0?g:e);e=o[b+4>>2];if(!(e&e+ -1)){g=f&e+ -1;break e}if(f>>>0>>0){g=f;break e}g=(f>>>0)%(e>>>0)|0}f=o[b>>2]+(g<<2)|0;d=o[f>>2];g:{h:{if(!d){o[c>>2]=o[b+8>>2];o[b+8>>2]=c;o[f>>2]=b+8;d=o[c>>2];if(!d){break g}d=o[d+4>>2];f=e+ -1|0;i:{if(!(f&e)){d=d&f;break i}if(d>>>0>>0){break i}d=(d>>>0)%(e>>>0)|0}d=o[b>>2]+(d<<2)|0;break h}o[c>>2]=o[d>>2]}o[d>>2]=c}o[b+12>>2]=o[b+12>>2]+1;b=1}m[l+4|0]=b;o[a>>2]=c}function ki(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;a:{b=o[a+32>>2];e=o[b+16>>2];g=o[b+12>>2];d=o[b+20>>2];b:{if((g|0)<(d|0)?1:(g|0)<=(d|0)?r[b+8>>2]>e>>>0?0:1:0){break b}h=p[e+o[b>>2]|0];i=e+1|0;if(i>>>0<1){d=d+1|0}o[b+16>>2]=i;o[b+20>>2]=d;c:{if(!h){break c}while(1){if(l[o[o[a>>2]+16>>2]](a,c)){c=c+1|0;if((h|0)!=(c|0)){continue}break c}break}return 0}c=o[a+8>>2];d=o[a+12>>2];if((c|0)!=(d|0)){while(1){b=o[c>>2];if(!l[o[o[b>>2]+8>>2]](b,a,o[a+4>>2])){break b}c=c+4|0;if((d|0)!=(c|0)){continue}break}}if(h){c=0;while(1){b=o[o[a+8>>2]+(c<<2)>>2];if(!l[o[o[b>>2]+12>>2]](b,o[a+32>>2])){break a}c=c+1|0;if((h|0)!=(c|0)){continue}break}g=a+20|0;while(1){c=0;i=j<<2;b=o[i+o[a+8>>2]>>2];d=l[o[o[b>>2]+24>>2]](b)|0;if((d|0)>0){while(1){b=o[o[a+8>>2]+i>>2];b=l[o[o[b>>2]+20>>2]](b,c)|0;k=o[a+20>>2];e=o[a+24>>2]-k>>2;d:{if(b>>>0>>0){break d}f=b+1|0;if(f>>>0>e>>>0){Ia(g,f-e|0);k=o[g>>2];break d}if(f>>>0>=e>>>0){break d}o[a+24>>2]=(f<<2)+k}o[(b<<2)+k>>2]=j;c=c+1|0;if((d|0)!=(c|0)){continue}break}}j=j+1|0;if((j|0)!=(h|0)){continue}break}}f=0;if(!l[o[o[a>>2]+28>>2]](a)){break b}f=l[o[o[a>>2]+32>>2]](a)|0}return f|0}return 0}function Ma(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=R-16|0;R=e;i=o[a+80>>2];g=m[b+24|0];f=u(i,g);a:{a=o[b+28>>2];b:{if(!(!p[b+84|0]|((a|0)!=2?(a|0)!=1:0))){h=o[b+48>>2];b=o[o[b>>2]>>2];o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;a=0;if(f){if((f|0)<=-1){break a}a=yk(f);o[e>>2]=a;d=a+f|0;o[e+8>>2]=d;ll(a,b+h|0,f);o[e+4>>2]=d}b=o[c>>2];if(b){o[c+4>>2]=b;jl(b);o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0}o[c+8>>2]=d;o[c+4>>2]=d;o[c>>2]=a;d=1;break b}o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;if(g){if((g|0)<=-1){break a}d=yk(g);o[e>>2]=d;o[e+4>>2]=d;o[e+8>>2]=d+g;a=g;while(1){m[d|0]=0;d=o[e+4>>2]+1|0;o[e+4>>2]=d;a=a+ -1|0;if(a){continue}break}}a=o[c>>2];h=o[c+4>>2]-a|0;c:{if(f>>>0>h>>>0){Ka(c,f-h|0);break c}if(f>>>0>=h>>>0){break c}o[c+4>>2]=a+f}d:{if(i){k=(g|0)<1;f=0;while(1){a=f;h=b;if(!p[b+84|0]){a=o[o[b+68>>2]+(f<<2)>>2]}l=a;a=o[e>>2];d=0;if(!Na(h,l,m[b+24|0],a)){break d}if(!k){m[o[c>>2]+j|0]=p[a|0];d=1;a=j;if((g|0)!=1){while(1){a=a+1|0;m[a+o[c>>2]|0]=p[o[e>>2]+d|0];d=d+1|0;if((g|0)!=(d|0)){continue}break}}j=g+j|0}f=f+1|0;if((i|0)!=(f|0)){continue}break}}a=o[e>>2];d=1}if(!a){break b}o[e+4>>2]=a;jl(a)}R=e+16|0;return d}Nk();D()}function Ja(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=R-16|0;R=e;i=o[a+80>>2];g=m[b+24|0];f=u(i,g);a:{a=o[b+28>>2];b:{if(!(!p[b+84|0]|((a|0)!=2?(a|0)!=1:0))){h=o[b+48>>2];b=o[o[b>>2]>>2];o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;a=0;if(f){if((f|0)<=-1){break a}a=yk(f);o[e>>2]=a;d=a+f|0;o[e+8>>2]=d;ll(a,b+h|0,f);o[e+4>>2]=d}b=o[c>>2];if(b){o[c+4>>2]=b;jl(b);o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0}o[c+8>>2]=d;o[c+4>>2]=d;o[c>>2]=a;d=1;break b}o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;if(g){if((g|0)<=-1){break a}d=yk(g);o[e>>2]=d;o[e+4>>2]=d;o[e+8>>2]=d+g;a=g;while(1){m[d|0]=0;d=o[e+4>>2]+1|0;o[e+4>>2]=d;a=a+ -1|0;if(a){continue}break}}a=o[c>>2];h=o[c+4>>2]-a|0;c:{if(f>>>0>h>>>0){Ka(c,f-h|0);break c}if(f>>>0>=h>>>0){break c}o[c+4>>2]=a+f}d:{if(i){k=(g|0)<1;f=0;while(1){a=f;h=b;if(!p[b+84|0]){a=o[o[b+68>>2]+(f<<2)>>2]}l=a;a=o[e>>2];d=0;if(!La(h,l,m[b+24|0],a)){break d}if(!k){m[o[c>>2]+j|0]=p[a|0];d=1;a=j;if((g|0)!=1){while(1){a=a+1|0;m[a+o[c>>2]|0]=p[o[e>>2]+d|0];d=d+1|0;if((g|0)!=(d|0)){continue}break}}j=g+j|0}f=f+1|0;if((i|0)!=(f|0)){continue}break}}a=o[e>>2];d=1}if(!a){break b}o[e+4>>2]=a;jl(a)}R=e+16|0;return d}Nk();D()}function Va(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=R-16|0;R=e;k=o[a+80>>2];h=m[b+24|0];i=u(k,h);a:{a=o[b+28>>2];b:{if(!(!p[b+84|0]|((a|0)!=6?(a|0)!=5:0))){j=o[b+48>>2];b=o[o[b>>2]>>2];o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;a=0;f=i<<2;c:{if(!f){break c}a=f>>2;if(a>>>0>=1073741824){break a}d=yk(f);o[e>>2]=d;o[e+4>>2]=d;g=(a<<2)+d|0;o[e+8>>2]=g;if((f|0)<1){a=d;break c}a=ll(d,b+j|0,f);d=a+f|0;o[e+4>>2]=d}b=o[c>>2];if(b){o[c+4>>2]=b;jl(b);o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0}o[c+8>>2]=g;o[c+4>>2]=d;o[c>>2]=a;a=1;break b}o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;if(h){if((h|0)<=-1){break a}d=h<<2;g=yk(d);o[e>>2]=g;a=d+g|0;o[e+8>>2]=a;ml(g,0,d);o[e+4>>2]=a}a=o[c>>2];d=o[c+4>>2]-a>>2;d:{if(i>>>0>d>>>0){Ia(c,i-d|0);break d}if(i>>>0>=d>>>0){break d}o[c+4>>2]=a+(i<<2)}e:{if(!k){a=1;break e}l=(h|0)<1;while(1){a=f;d=b;if(!p[d+84|0]){a=o[o[b+68>>2]+(f<<2)>>2]}if(!Wa(d,a,m[b+24|0],g)){a=0;break e}if(!l){i=o[c>>2];a=0;d=j;while(1){o[i+(d<<2)>>2]=o[(a<<2)+g>>2];d=d+1|0;a=a+1|0;if((h|0)!=(a|0)){continue}break}j=h+j|0}a=1;f=f+1|0;if((k|0)!=(f|0)){continue}break}}if(!g){break b}o[e+4>>2]=g;jl(g)}R=e+16|0;return a}Nk();D()}function Ta(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=R-16|0;R=e;k=o[a+80>>2];h=m[b+24|0];i=u(k,h);a:{a=o[b+28>>2];b:{if(!(!p[b+84|0]|((a|0)!=6?(a|0)!=5:0))){j=o[b+48>>2];b=o[o[b>>2]>>2];o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;a=0;f=i<<2;c:{if(!f){break c}a=f>>2;if(a>>>0>=1073741824){break a}d=yk(f);o[e>>2]=d;o[e+4>>2]=d;g=(a<<2)+d|0;o[e+8>>2]=g;if((f|0)<1){a=d;break c}a=ll(d,b+j|0,f);d=a+f|0;o[e+4>>2]=d}b=o[c>>2];if(b){o[c+4>>2]=b;jl(b);o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0}o[c+8>>2]=g;o[c+4>>2]=d;o[c>>2]=a;a=1;break b}o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;if(h){if((h|0)<=-1){break a}d=h<<2;g=yk(d);o[e>>2]=g;a=d+g|0;o[e+8>>2]=a;ml(g,0,d);o[e+4>>2]=a}a=o[c>>2];d=o[c+4>>2]-a>>2;d:{if(i>>>0>d>>>0){Ia(c,i-d|0);break d}if(i>>>0>=d>>>0){break d}o[c+4>>2]=a+(i<<2)}e:{if(!k){a=1;break e}l=(h|0)<1;while(1){a=f;d=b;if(!p[d+84|0]){a=o[o[b+68>>2]+(f<<2)>>2]}if(!Ua(d,a,m[b+24|0],g)){a=0;break e}if(!l){i=o[c>>2];a=0;d=j;while(1){o[i+(d<<2)>>2]=o[(a<<2)+g>>2];d=d+1|0;a=a+1|0;if((h|0)!=(a|0)){continue}break}j=h+j|0}a=1;f=f+1|0;if((k|0)!=(f|0)){continue}break}}if(!g){break b}o[e+4>>2]=g;jl(g)}R=e+16|0;return a}Nk();D()}function ll(a,b,c){var d=0,e=0,f=0;if(c>>>0>=512){O(a|0,b|0,c|0)|0;return a}e=a+c|0;a:{if(!((a^b)&3)){b:{if((c|0)<1){c=a;break b}if(!(a&3)){c=a;break b}c=a;while(1){m[c|0]=p[b|0];b=b+1|0;c=c+1|0;if(c>>>0>=e>>>0){break b}if(c&3){continue}break}}d=e&-4;c:{if(d>>>0<64){break c}f=d+ -64|0;if(c>>>0>f>>>0){break c}while(1){o[c>>2]=o[b>>2];o[c+4>>2]=o[b+4>>2];o[c+8>>2]=o[b+8>>2];o[c+12>>2]=o[b+12>>2];o[c+16>>2]=o[b+16>>2];o[c+20>>2]=o[b+20>>2];o[c+24>>2]=o[b+24>>2];o[c+28>>2]=o[b+28>>2];o[c+32>>2]=o[b+32>>2];o[c+36>>2]=o[b+36>>2];o[c+40>>2]=o[b+40>>2];o[c+44>>2]=o[b+44>>2];o[c+48>>2]=o[b+48>>2];o[c+52>>2]=o[b+52>>2];o[c+56>>2]=o[b+56>>2];o[c+60>>2]=o[b+60>>2];b=b- -64|0;c=c- -64|0;if(c>>>0<=f>>>0){continue}break}}if(c>>>0>=d>>>0){break a}while(1){o[c>>2]=o[b>>2];b=b+4|0;c=c+4|0;if(c>>>0>>0){continue}break}break a}if(e>>>0<4){c=a;break a}d=e+ -4|0;if(d>>>0>>0){c=a;break a}c=a;while(1){m[c|0]=p[b|0];m[c+1|0]=p[b+1|0];m[c+2|0]=p[b+2|0];m[c+3|0]=p[b+3|0];b=b+4|0;c=c+4|0;if(c>>>0<=d>>>0){continue}break}}if(c>>>0>>0){while(1){m[c|0]=p[b|0];b=b+1|0;c=c+1|0;if((e|0)!=(c|0)){continue}break}}return a}function Fe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;i=R-32|0;R=i;a:{b:{while(1){if(!Ge(1,i+28|0,b)){break b}c=o[i+28>>2];if(c){f=(u(d,12)+a|0)+60|0;He(f,c);h=Rf(i+8|0);if(!Sf(h,b)){break b}g=0;while(1){j=1<<(g&31);k=Uf(h);e=o[f>>2]+(g>>>3&536870908)|0;l=e;if(k){e=o[e>>2]|j}else{e=o[e>>2]&(j^-1)}o[l>>2]=e;g=g+1|0;if((c|0)!=(g|0)){continue}break}}d=d+1|0;if((d|0)!=4){continue}break}g=0;d=o[b+12>>2];j=d;c=o[b+20>>2];e=c;h=o[b+16>>2];f=h+4|0;if(f>>>0<4){c=c+1|0}l=o[b+8>>2];k=f;f=c;if((d|0)<(c|0)?1:(d|0)<=(c|0)?l>>>0>=k>>>0?0:1:0){break a}m=o[b>>2];c=m+h|0;d=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);o[b+16>>2]=k;o[b+20>>2]=f;c=e;e=h+8|0;if(e>>>0<8){c=c+1|0}f=e;e=c;if((j|0)<(c|0)?1:(j|0)<=(c|0)?l>>>0>=f>>>0?0:1:0){break a}c=k+m|0;c=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);o[b+16>>2]=f;o[b+20>>2]=e;if((d|0)>(c|0)){break a}o[a+16>>2]=c;o[a+12>>2]=d;b=d;d=(c>>31)-((c>>>0>>0)+(b>>31)|0)|0;b=c-b|0;if(!d&b>>>0>2147483646|d>>>0>0){break a}g=1;b=b+1|0;o[a+20>>2]=b;c=(b|0)/2|0;o[a+24>>2]=c;o[a+28>>2]=0-c;if(b&1){break a}o[a+24>>2]=c+ -1;break a}g=0}R=i+32|0;return g|0}function oh(a){a=a|0;var b=0,c=0,d=0,e=0;o[a>>2]=8228;b=a+368|0;d=o[b>>2];o[b>>2]=0;if(d){c=d+ -4|0;b=o[c>>2];if(b){b=d+(b<<4)|0;while(1){b=b+ -16|0;if((d|0)!=(b|0)){continue}break}}jl(c)}d=o[a+216>>2];if(d){b=o[a+220>>2];c=d;a:{if((d|0)==(b|0)){break a}while(1){c=o[b+ -12>>2];if(c){o[b+ -8>>2]=c;jl(c)}c=o[b+ -28>>2];if(c){o[b+ -24>>2]=c;jl(c)}c=b+ -144|0;e=o[b+ -40>>2];if(e){o[b+ -36>>2]=e;jl(e)}Yg(b+ -140|0);b=c;if((d|0)!=(b|0)){continue}break}c=o[a+216>>2]}o[a+220>>2]=d;jl(c)}b=o[a+196>>2];if(b){o[a+200>>2]=b;jl(b)}b=o[a+184>>2];if(b){o[a+188>>2]=b;jl(b)}b=o[a+172>>2];if(b){o[a+176>>2]=b;jl(b)}b=o[a+160>>2];if(b){o[a+164>>2]=b;jl(b)}b=o[a+144>>2];if(b){while(1){d=o[b>>2];jl(b);b=d;if(b){continue}break}}b=o[a+136>>2];o[a+136>>2]=0;if(b){jl(b)}b=o[a+120>>2];if(b){jl(b)}b=o[a+108>>2];if(b){jl(b)}b=o[a+96>>2];if(b){jl(b)}b=o[a+72>>2];if(b){o[a+76>>2]=b;jl(b)}b=o[a+60>>2];if(b){jl(b)}b=o[a+48>>2];if(b){o[a+52>>2]=b;jl(b)}b=o[a+36>>2];if(b){o[a+40>>2]=b;jl(b)}b=o[a+24>>2];if(b){o[a+28>>2]=b;jl(b)}b=o[a+12>>2];if(b){o[a+16>>2]=b;jl(b)}b=o[a+8>>2];o[a+8>>2]=0;if(b){za(a+8|0,b)}return a|0}function Ra(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=R-16|0;R=e;k=o[a+80>>2];h=m[b+24|0];a=u(k,h);a:{g=o[b+28>>2];b:{if(!(!p[b+84|0]|((g|0)!=4?(g|0)!=3:0))){i=o[b+48>>2];j=o[o[b>>2]>>2];o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;b=0;a=a<<1;if(a){if((a|0)<=-1){break a}d=yk(a);o[e>>2]=d;f=(a>>1<<1)+d|0;o[e+8>>2]=f;b=ll(d,i+j|0,a)+a|0;o[e+4>>2]=b}a=o[c>>2];if(a){o[c+4>>2]=a;jl(a);o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0}o[c+8>>2]=f;o[c+4>>2]=b;o[c>>2]=d;a=1;break b}o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;if(h){if((h|0)<=-1){break a}d=h<<1;f=yk(d);o[e>>2]=f;g=d+f|0;o[e+8>>2]=g;ml(f,0,d);o[e+4>>2]=g}g=o[c>>2];d=o[c+4>>2]-g>>1;c:{if(a>>>0>d>>>0){Pa(c,a-d|0);break c}if(a>>>0>=d>>>0){break c}o[c+4>>2]=g+(a<<1)}d:{if(!k){a=1;break d}g=(h|0)<1;while(1){a=i;d=b;if(!p[d+84|0]){a=o[o[b+68>>2]+(i<<2)>>2]}if(!Sa(d,a,m[b+24|0],f)){a=0;break d}if(!g){l=o[c>>2];a=0;d=j;while(1){n[l+(d<<1)>>1]=q[(a<<1)+f>>1];d=d+1|0;a=a+1|0;if((h|0)!=(a|0)){continue}break}j=h+j|0}a=1;i=i+1|0;if((k|0)!=(i|0)){continue}break}}if(!f){break b}o[e+4>>2]=f;jl(f)}R=e+16|0;return a}Nk();D()}function Oa(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=R-16|0;R=e;k=o[a+80>>2];h=m[b+24|0];a=u(k,h);a:{g=o[b+28>>2];b:{if(!(!p[b+84|0]|((g|0)!=4?(g|0)!=3:0))){i=o[b+48>>2];j=o[o[b>>2]>>2];o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;b=0;a=a<<1;if(a){if((a|0)<=-1){break a}d=yk(a);o[e>>2]=d;f=(a>>1<<1)+d|0;o[e+8>>2]=f;b=ll(d,i+j|0,a)+a|0;o[e+4>>2]=b}a=o[c>>2];if(a){o[c+4>>2]=a;jl(a);o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0}o[c+8>>2]=f;o[c+4>>2]=b;o[c>>2]=d;a=1;break b}o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;if(h){if((h|0)<=-1){break a}d=h<<1;f=yk(d);o[e>>2]=f;g=d+f|0;o[e+8>>2]=g;ml(f,0,d);o[e+4>>2]=g}g=o[c>>2];d=o[c+4>>2]-g>>1;c:{if(a>>>0>d>>>0){Pa(c,a-d|0);break c}if(a>>>0>=d>>>0){break c}o[c+4>>2]=g+(a<<1)}d:{if(!k){a=1;break d}g=(h|0)<1;while(1){a=i;d=b;if(!p[d+84|0]){a=o[o[b+68>>2]+(i<<2)>>2]}if(!Qa(d,a,m[b+24|0],f)){a=0;break d}if(!g){l=o[c>>2];a=0;d=j;while(1){n[l+(d<<1)>>1]=q[(a<<1)+f>>1];d=d+1|0;a=a+1|0;if((h|0)!=(a|0)){continue}break}j=h+j|0}a=1;i=i+1|0;if((k|0)!=(i|0)){continue}break}}if(!f){break b}o[e+4>>2]=f;jl(f)}R=e+16|0;return a}Nk();D()}function hf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;d=0;a:{if((e|0)!=2){break a}o[a+8>>2]=2;o[a- -64>>2]=f;d=a+32|0;e=o[d>>2];f=o[a+36>>2]-e|0;g=f>>2;b:{if(g>>>0<=1){Ia(d,2-g|0);break b}if((f|0)==8){break b}o[a+36>>2]=e+8}d=1;f=o[a+56>>2];e=o[f>>2];f=o[f+4>>2]-e|0;if((f|0)<1){break a}j=a+60|0;d=f>>2;k=(d|0)>1?d:1;while(1){if(!jf(j,o[(i<<2)+e>>2],c,i)){d=0;break a}c:{if(o[a+8>>2]<1){break c}e=0;while(1){d=e<<2;f=o[(d+a|0)+68>>2];h=o[a+16>>2];d:{if((f|0)>(h|0)){g=o[a+32>>2];o[d+g>>2]=h;break d}g=o[a+32>>2];d=d+g|0;h=o[a+12>>2];if((f|0)<(h|0)){o[d>>2]=h;break d}o[d>>2]=f}e=e+1|0;f=o[a+8>>2];if((e|0)<(f|0)){continue}break}d=0;if((f|0)<1){break c}e=i<<3;h=e+c|0;l=b+e|0;while(1){f=d<<2;e=f+h|0;f=o[f+l>>2]+o[f+g>>2]|0;o[e>>2]=f;e:{if((f|0)>o[a+16>>2]){f=f-o[a+20>>2]|0}else{if((f|0)>=o[a+12>>2]){break e}f=f+o[a+20>>2]|0}o[e>>2]=f}d=d+1|0;if((d|0)>2]){continue}break}}d=1;i=i+1|0;if((k|0)==(i|0)){break a}d=o[a+56>>2];e=o[d>>2];if(o[d+4>>2]-e>>2>>>0>i>>>0){continue}break}Ok();D()}return d|0}function Pe(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;d=0;a:{if((e|0)!=2){break a}o[a+8>>2]=2;o[a- -64>>2]=f;d=a+32|0;e=o[d>>2];f=o[a+36>>2]-e|0;g=f>>2;b:{if(g>>>0<=1){Ia(d,2-g|0);break b}if((f|0)==8){break b}o[a+36>>2]=e+8}d=1;f=o[a+56>>2];e=o[f>>2];f=o[f+4>>2]-e|0;if((f|0)<1){break a}j=a+60|0;d=f>>2;k=(d|0)>1?d:1;while(1){if(!Qe(j,o[(i<<2)+e>>2],c,i)){d=0;break a}c:{if(o[a+8>>2]<1){break c}e=0;while(1){d=e<<2;f=o[(d+a|0)+68>>2];h=o[a+16>>2];d:{if((f|0)>(h|0)){g=o[a+32>>2];o[d+g>>2]=h;break d}g=o[a+32>>2];d=d+g|0;h=o[a+12>>2];if((f|0)<(h|0)){o[d>>2]=h;break d}o[d>>2]=f}e=e+1|0;f=o[a+8>>2];if((e|0)<(f|0)){continue}break}d=0;if((f|0)<1){break c}e=i<<3;h=e+c|0;l=b+e|0;while(1){f=d<<2;e=f+h|0;f=o[f+l>>2]+o[f+g>>2]|0;o[e>>2]=f;e:{if((f|0)>o[a+16>>2]){f=f-o[a+20>>2]|0}else{if((f|0)>=o[a+12>>2]){break e}f=f+o[a+20>>2]|0}o[e>>2]=f}d=d+1|0;if((d|0)>2]){continue}break}}d=1;i=i+1|0;if((k|0)==(i|0)){break a}d=o[a+56>>2];e=o[d>>2];if(o[d+4>>2]-e>>2>>>0>i>>>0){continue}break}Ok();D()}return d|0}function ag(a,b){var c=0,d=0,e=0;c=(a|0)==(b|0);m[b+12|0]=c;a:{if(c){break a}while(1){d=o[b+8>>2];if(p[d+12|0]){break a}b:{c=o[d+8>>2];e=o[c>>2];if((e|0)==(d|0)){e=o[c+4>>2];if(!(!e|p[e+12|0])){break b}c:{if(o[d>>2]==(b|0)){b=d;break c}b=o[d+4>>2];e=o[b>>2];o[d+4>>2]=e;a=b;if(e){o[e+8>>2]=d;c=o[d+8>>2]}o[a+8>>2]=c;a=o[d+8>>2];o[(((d|0)!=o[a>>2])<<2)+a>>2]=b;o[b>>2]=d;o[d+8>>2]=b;c=o[b+8>>2]}m[b+12|0]=1;m[c+12|0]=0;a=o[c>>2];b=o[a+4>>2];o[c>>2]=b;if(b){o[b+8>>2]=c}o[a+8>>2]=o[c+8>>2];b=o[c+8>>2];o[((o[b>>2]!=(c|0))<<2)+b>>2]=a;o[a+4>>2]=c;o[c+8>>2]=a;return}if(!(p[e+12|0]|!e)){break b}d:{if(o[d>>2]!=(b|0)){b=d;break d}e=o[b+4>>2];o[d>>2]=e;a=b;if(e){o[e+8>>2]=d;c=o[d+8>>2]}o[a+8>>2]=c;a=o[d+8>>2];o[(((d|0)!=o[a>>2])<<2)+a>>2]=b;o[b+4>>2]=d;o[d+8>>2]=b;c=o[b+8>>2]}m[b+12|0]=1;m[c+12|0]=0;a=o[c+4>>2];b=o[a>>2];o[c+4>>2]=b;if(b){o[b+8>>2]=c}o[a+8>>2]=o[c+8>>2];b=o[c+8>>2];o[((o[b>>2]!=(c|0))<<2)+b>>2]=a;o[a>>2]=c;o[c+8>>2]=a;break a}b=e+12|0;m[d+12|0]=1;m[c+12|0]=(a|0)==(c|0);m[b|0]=1;b=c;if((a|0)!=(b|0)){continue}break}}}function wf(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;j=o[o[o[b+4>>2]+8>>2]+(d<<2)>>2];a:{b:{if((l[o[o[b>>2]+8>>2]](b)|0)!=1|c+ -1>>>0>5){break b}h=l[o[o[b>>2]+36>>2]](b)|0;f=l[o[o[b>>2]+44>>2]](b,d)|0;if(!h|!f){break b}g=f+12|0;i=l[o[o[b>>2]+40>>2]](b,d)|0;d=o[b+44>>2];c:{if(i){if((c|0)!=6){break c}b=yk(104);o[b+4>>2]=j;c=o[e+4>>2];o[b+8>>2]=o[e>>2];o[b+12>>2]=c;c=o[e+12>>2];o[b+16>>2]=o[e+8>>2];o[b+20>>2]=c;o[b+36>>2]=f;o[b+32>>2]=g;o[b+28>>2]=i;o[b+24>>2]=d;o[b+64>>2]=f;o[b+60>>2]=g;o[b+56>>2]=i;o[b+52>>2]=d;o[b+44>>2]=0;o[b+48>>2]=0;o[b>>2]=5700;o[b+72>>2]=-1;o[b+76>>2]=-1;o[b+68>>2]=1;o[b+40>>2]=6264;break a}if((c|0)!=6){break c}b=yk(104);o[b+4>>2]=j;c=o[e+4>>2];o[b+8>>2]=o[e>>2];o[b+12>>2]=c;c=o[e+12>>2];o[b+16>>2]=o[e+8>>2];o[b+20>>2]=c;o[b+36>>2]=f;o[b+32>>2]=g;o[b+28>>2]=h;o[b+24>>2]=d;o[b+64>>2]=f;o[b+60>>2]=g;o[b+56>>2]=h;o[b+52>>2]=d;o[b+44>>2]=0;o[b+48>>2]=0;o[b>>2]=6704;o[b+72>>2]=-1;o[b+76>>2]=-1;o[b+68>>2]=1;o[b+40>>2]=7124;break a}o[a>>2]=0}o[a>>2]=0;return}o[b+80>>2]=-1;o[b+84>>2]=-1;Rf(b+88|0);o[a>>2]=b}function hb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=o[b>>2];e=o[c+4>>2]+(o[c>>2]-f<<3)|0;c=o[b+4>>2];g=e-c|0;a:{if((g|0)<=0){c=o[d+4>>2];break a}b:{if(!c){c=o[d+4>>2];break b}e=o[d+4>>2];j=32-e|0;k=32-c|0;h=(g|0)<(k|0)?g:k;i=j>>>0>>0?j:h;l=o[d>>2];f=o[f>>2]&(-1<>>k-h);o[l>>2]=o[l>>2]&(-1<>>j-i^-1)|(e>>>0>c>>>0?f<>>c-e|0);e=e+i|0;c=e&31;o[d+4>>2]=c;j=l+(e>>>3&536870908)|0;o[d>>2]=j;e=h-i|0;if((e|0)>=1){o[j>>2]=o[j>>2]&(-1>>>32-e^-1)|f>>>i+o[b+4>>2];o[d+4>>2]=e;c=e}g=g-h|0;f=o[b>>2]+4|0;o[b>>2]=f}i=-1<>2];f=o[f>>2];o[e>>2]=j&o[e>>2]|f<>2]=e+4;o[e+4>>2]=i&o[e+4>>2]|f>>>h;f=o[b>>2]+4|0;o[b>>2]=f;k=(g|0)>63;e=g+ -32|0;g=e;if(k){continue}break}}if((e|0)<1){break a}b=o[d>>2];g=(h|0)<(e|0)?h:e;i=o[b>>2]&(i&-1>>>h-g^-1);h=o[f>>2]&-1>>>32-e;o[b>>2]=i|h<>2]=c;f=b+(f>>>3&536870908)|0;o[d>>2]=f;b=e-g|0;if((b|0)<1){break a}o[f>>2]=o[f>>2]&(-1>>>32-b^-1)|h>>>g;o[d+4>>2]=b;c=b}b=o[d>>2];o[a+4>>2]=c;o[a>>2]=b}function Wd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,q=0,s=0;g=R-16|0;R=g;a:{if(!Bd(a,b)){break a}k=a+36|0;h=l[o[o[a>>2]+24>>2]](a)|0;e=o[a+40>>2];d=o[a+36>>2];c=e-d>>2;b:{if(h>>>0>c>>>0){Xd(k,h-c|0);break b}if(h>>>0>=c>>>0){break b}d=d+(h<<2)|0;if((d|0)!=(e|0)){while(1){e=e+ -4|0;c=o[e>>2];o[e>>2]=0;if(c){l[o[o[c>>2]+4>>2]](c)}if((e|0)!=(d|0)){continue}break}}o[a+40>>2]=d}j=1;if((h|0)<1){break a}j=0;e=0;while(1){f=o[b+16>>2];d=o[b+12>>2];c=o[b+20>>2];if((d|0)<(c|0)?1:(d|0)<=(c|0)?r[b+8>>2]>f>>>0?0:1:0){break a}i=p[f+o[b>>2]|0];f=f+1|0;if(f>>>0<1){c=c+1|0}d=b;o[d+16>>2]=f;o[d+20>>2]=c;l[o[o[a>>2]+48>>2]](g+8|0,a,i);c=o[a+36>>2];d=o[g+8>>2];o[g+8>>2]=0;f=e<<2;i=c+f|0;c=o[i>>2];o[i>>2]=d;if(c){l[o[o[c>>2]+4>>2]](c)}c=o[g+8>>2];o[g+8>>2]=0;if(c){l[o[o[c>>2]+4>>2]](c)}c=o[o[k>>2]+f>>2];if(!c){break a}if(!(n=c,q=l[o[o[a>>2]+28>>2]](a)|0,s=l[o[o[a>>2]+20>>2]](a,e)|0,m=o[o[c>>2]+8>>2],l[m](n|0,q|0,s|0)|0)){break a}e=e+1|0;if((h|0)!=(e|0)){continue}break}j=1}R=g+16|0;return j|0}function Nf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=m[o[a+8>>2]+24|0];d=b<<2;b=yk((b|0)!=(b&1073741823)?-1:d);c=o[a+28>>2];o[a+28>>2]=b;if(c){jl(c)}c=o[o[a+4>>2]+32>>2];b=o[c+8>>2];i=o[c+12>>2];g=b;f=o[c+20>>2];h=o[c+16>>2];b=d;e=h+b|0;if(e>>>0>>0){f=f+1|0}a:{if((i|0)<(f|0)?1:(i|0)<=(f|0)?g>>>0>=e>>>0?0:1:0){break a}ll(o[a+28>>2],h+o[c>>2]|0,d);d=c;g=c;e=o[c+20>>2];c=b+o[c+16>>2]|0;if(c>>>0>>0){e=e+1|0}o[g+16>>2]=c;o[d+20>>2]=e;e=o[a+4>>2];d=o[e+32>>2];b=o[d+8>>2];f=o[d+12>>2];g=b;h=o[d+20>>2];c=o[d+16>>2];b=c+4|0;if(b>>>0<4){h=h+1|0}if((f|0)<(h|0)?1:(f|0)<=(h|0)?g>>>0>=b>>>0?0:1:0){break a}b=c+o[d>>2]|0;o[a+32>>2]=p[b|0]|p[b+1|0]<<8|(p[b+2|0]<<16|p[b+3|0]<<24);b=d;g=b;c=o[b+20>>2];d=o[b+16>>2]+4|0;if(d>>>0<4){c=c+1|0}o[g+16>>2]=d;o[b+20>>2]=c;b=o[e+32>>2];f=o[b+16>>2];e=o[b+12>>2];d=o[b+20>>2];c=d;if((e|0)<(c|0)?1:(e|0)<=(c|0)?r[b+8>>2]>f>>>0?0:1:0){break a}e=p[f+o[b>>2]|0];c=f+1|0;if(c>>>0<1){d=d+1|0}o[b+16>>2]=c;o[b+20>>2]=d;if(e>>>0>31){break a}o[a+24>>2]=e;j=1}return j|0}function qh(a){a=a|0;var b=0,c=0,d=0,e=0;o[a>>2]=8280;rh(a+232|0);e=o[a+216>>2];if(e){c=e;b=o[a+220>>2];d=c;a:{if((c|0)==(b|0)){break a}while(1){c=o[b+ -12>>2];if(c){o[b+ -8>>2]=c;jl(c)}c=o[b+ -28>>2];if(c){o[b+ -24>>2]=c;jl(c)}c=b+ -144|0;d=o[b+ -40>>2];if(d){o[b+ -36>>2]=d;jl(d)}Yg(b+ -140|0);b=c;if((e|0)!=(b|0)){continue}break}d=o[a+216>>2]}c=d;o[a+220>>2]=e;jl(c)}b=o[a+196>>2];if(b){o[a+200>>2]=b;jl(b)}b=o[a+184>>2];if(b){o[a+188>>2]=b;jl(b)}b=o[a+172>>2];if(b){o[a+176>>2]=b;jl(b)}b=o[a+160>>2];if(b){o[a+164>>2]=b;jl(b)}b=o[a+144>>2];if(b){while(1){c=o[b>>2];jl(b);b=c;if(b){continue}break}}b=o[a+136>>2];o[a+136>>2]=0;if(b){jl(b)}b=o[a+120>>2];if(b){jl(b)}b=o[a+108>>2];if(b){jl(b)}b=o[a+96>>2];if(b){jl(b)}b=o[a+72>>2];if(b){o[a+76>>2]=b;jl(b)}b=o[a+60>>2];if(b){jl(b)}b=o[a+48>>2];if(b){o[a+52>>2]=b;jl(b)}b=o[a+36>>2];if(b){o[a+40>>2]=b;jl(b)}b=o[a+24>>2];if(b){o[a+28>>2]=b;jl(b)}b=o[a+12>>2];if(b){o[a+16>>2]=b;jl(b)}b=o[a+8>>2];o[a+8>>2]=0;if(b){za(a+8|0,b)}return a|0}function He(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;d=R-32|0;R=d;a:{c=o[a+4>>2];b:{if(c>>>0>>0){g=o[a+8>>2];e=g<<5;f=b-c|0;c:{if(!(e>>>0>>0|c>>>0>e-f>>>0)){o[a+4>>2]=b;b=c&31;a=o[a>>2]+(c>>>3&536870908)|0;break c}o[d+24>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;if((b|0)<=-1){break a}c=d+16|0;if(e>>>0<=1073741822){b=b+31&-32;e=g<<6;b=e>>>0>>0?b:e}else{b=2147483647}fb(c,b);c=o[a+4>>2];o[d+20>>2]=c+f;b=o[d+16>>2];d:{if((c|0)<1){c=0;break d}g=o[a>>2];e=c>>>5<<2;b=nl(b,g,e)+e|0;c=c&31;if(!c){c=0;break d}h=-1>>>32-c|0;o[b>>2]=o[b>>2]&(h^-1)|o[e+g>>2]&h}o[d+12>>2]=c;o[d+8>>2]=b;c=o[d+8>>2];b=o[d+12>>2];e=o[a>>2];o[a>>2]=o[d+16>>2];o[d+16>>2]=e;g=o[a+4>>2];o[a+4>>2]=o[d+20>>2];o[d+20>>2]=g;g=o[a+8>>2];o[a+8>>2]=o[d+24>>2];o[d+24>>2]=g;if(e){jl(e)}a=c}if(!f){break b}if(b){c=32-b|0;e=c>>>0>f>>>0?f:c;o[a>>2]=o[a>>2]&(-1<>>c-e^-1);f=f-e|0;a=a+4|0}b=a;a=f>>>5<<2;b=ml(b,0,a);c=f&31;if(!c){break b}a=a+b|0;o[a>>2]=o[a>>2]&(-1>>>32-c^-1);break b}o[a+4>>2]=b}R=d+32|0;return}Nk();D()}function Sf(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0;g=R-16|0;R=g;f=o[b+16>>2];d=o[b+12>>2];c=o[b+20>>2];a:{if((d|0)<(c|0)?1:(d|0)<=(c|0)?r[b+8>>2]>f>>>0?0:1:0){break a}m[a+12|0]=p[f+o[b>>2]|0];d=o[b+20>>2];c=o[b+16>>2]+1|0;if(c>>>0<1){d=d+1|0}o[b+16>>2]=c;o[b+20>>2]=d;if(!Tf(1,g+12|0,b)){break a}d=o[b+8>>2];h=o[b+16>>2];c=h;e=o[g+12>>2];f=e;i=d-c>>>0>=e>>>0?0:1;c=d>>>0>>0;d=o[b+20>>2];c=o[b+12>>2]-(c+d|0)|0;if(((c|0)<0?1:(c|0)<=0?i:0)|(e|0)<1){break a}c=h+o[b>>2]|0;o[a>>2]=c;j=e+ -1|0;k=j+c|0;l=p[k|0]>>>6|0;if((l|0)==3){break a}i=a;b:{c:{switch(l-1|0){default:o[a+4>>2]=j;a=p[k|0]&63;break b;case 0:if((e|0)<2){break a}o[a+4>>2]=e+ -2;a=(c+e|0)+ -2|0;a=p[a+1|0]<<8&16128|p[a|0];break b;case 1:break c}}if((e|0)<3){break a}o[a+4>>2]=e+ -3;a=(c+e|0)+ -3|0;a=p[a+1|0]<<8|p[a+2|0]<<16&4128768|p[a|0]}a=a+4096|0;o[i+8>>2]=a;if(a>>>0>1048575){break a}a=d;d=f+h|0;if(d>>>0>>0){a=a+1|0}o[b+16>>2]=d;o[b+20>>2]=a;n=1}R=g+16|0;return n}function Ch(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;f=R-16|0;R=f;b=o[a+4>>2];c=o[b>>2];a:{d=o[a+12>>2];e=o[d+28>>2]-o[d+24>>2]|0;d=e>>2;b:{if(o[b+8>>2]-c>>2>>>0>=d>>>0){break b}if(d>>>0>=1073741824){break a}g=o[b+4>>2];h=d<<2;d=yk(e);h=h+d|0;e=g-c|0;g=e+d|0;if((e|0)>=1){ll(d,c,e)}o[b+8>>2]=h;o[b+4>>2]=g;o[b>>2]=d;if(!c){break b}jl(c)}b=o[a+12>>2];c=o[b+28>>2];b=o[b+24>>2];o[f+12>>2]=0;b=c-b>>2;d=a+96|0;e=o[d>>2];c=o[a+100>>2]-e>>2;c:{if(b>>>0>c>>>0){Dd(d,b-c|0,f+12|0);break c}if(b>>>0>=c>>>0){break c}o[a+100>>2]=e+(b<<2)}e=a+8|0;d:{e:{b=o[a+116>>2];if(b){d=o[b>>2];c=1;if((d|0)==o[b+4>>2]){break d}b=0;while(1){if(!Dh(e,o[(b<<2)+d>>2])){break e}c=o[a+116>>2];d=o[c>>2];b=b+1|0;if(b>>>0>2]-d>>2>>>0){continue}break}c=1;break d}b=0;a=o[a+12>>2];a=(o[a+4>>2]-o[a>>2]>>2>>>0)/3|0;c=1;if((a|0)<=0){break d}while(1){if(!Dh(e,u(b,3))){break e}b=b+1|0;if((a|0)!=(b|0)){continue}break}c=1;break d}c=0}R=f+16|0;return c|0}db(8832);D()}function Wi(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;h=R-16|0;R=h;a:{b:{if(b){o[a+88>>2]=0;o[a+92>>2]=0;c=a+84|0;d=o[c>>2];o[c>>2]=0;if(d){jl(d)}o[a+76>>2]=0;o[a+80>>2]=0;c=a+72|0;d=o[c>>2];o[c>>2]=0;if(d){jl(d)}d=o[b>>2];c=o[b+4>>2];m[h+15|0]=0;eb(a,c-d>>2,h+15|0);c=b+28|0;d=o[c>>2];e=o[b+24>>2];m[h+14|0]=0;eb(a+12|0,d-e>>2,h+14|0);Ni(a+28|0,o[b+4>>2]-o[b>>2]>>2,10716);d=o[a+52>>2];e=o[c>>2]-o[b+24>>2]|0;c=e>>2;c:{if(o[a+60>>2]-d>>2>>>0>=c>>>0){break c}if(c>>>0>=1073741824){break b}f=o[a+56>>2];g=c<<2;c=yk(e);g=g+c|0;e=f-d|0;f=e+c|0;if((e|0)>=1){ll(c,d,e)}o[a+60>>2]=g;o[a+56>>2]=f;o[a+52>>2]=c;if(!d){break c}jl(d)}d=o[a+40>>2];e=o[b+28>>2]-o[b+24>>2]|0;c=e>>2;d:{if(o[a+48>>2]-d>>2>>>0>=c>>>0){break d}if(c>>>0>=1073741824){break a}f=o[a+44>>2];g=c<<2;c=yk(e);g=g+c|0;e=f-d|0;f=e+c|0;if((e|0)>=1){ll(c,d,e)}o[a+48>>2]=g;o[a+44>>2]=f;o[a+40>>2]=c;if(!d){break d}jl(d)}m[a+24|0]=1;o[a+64>>2]=b}R=h+16|0;return}db(10720);D()}db(10720);D()}function Bh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0;l=o[a+12>>2];d=o[a+108>>2];e=o[d+80>>2];m[b+84|0]=0;f=o[b+68>>2];c=o[b+72>>2]-f>>2;a:{if(e>>>0>c>>>0){pd(b+68|0,e-c|0,9140);d=o[a+108>>2];e=o[d+80>>2];break a}if(e>>>0>=c>>>0){break a}o[b+72>>2]=f+(e<<2)}k=o[d+96>>2];c=o[d+100>>2]-k|0;d=(c|0)/12|0;if(!c){return 1}n=d>>>0>1?d:1;d=0;b:{while(1){c:{if((d|0)==1431655765){break c}c=o[l>>2]+(u(d,3)<<2)|0;h=o[c>>2];if((h|0)==-1){break c}f=u(d,12)+k|0;g=o[f>>2];if(g>>>0>=e>>>0){break c}j=o[o[a+112>>2]+12>>2];i=o[j+(h<<2)>>2];if(i>>>0>=e>>>0){break c}h=o[b+68>>2];o[h+(g<<2)>>2]=i;g=o[c+4>>2];if((g|0)==-1){break c}i=o[f+4>>2];if(i>>>0>=e>>>0){break c}g=o[(g<<2)+j>>2];if(g>>>0>=e>>>0){break c}o[h+(i<<2)>>2]=g;c=o[c+8>>2];if((c|0)==-1){break c}f=o[f+8>>2];if(f>>>0>=e>>>0){break c}c=o[(c<<2)+j>>2];if(c>>>0>=e>>>0){break c}o[h+(f<<2)>>2]=c;c=1;d=d+1|0;if((n|0)!=(d|0)){continue}break b}break}c=0}return c|0}function Mh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0;l=o[a+12>>2];d=o[a+68>>2];e=o[d+80>>2];m[b+84|0]=0;f=o[b+68>>2];c=o[b+72>>2]-f>>2;a:{if(e>>>0>c>>>0){pd(b+68|0,e-c|0,9140);d=o[a+68>>2];e=o[d+80>>2];break a}if(e>>>0>=c>>>0){break a}o[b+72>>2]=f+(e<<2)}k=o[d+96>>2];c=o[d+100>>2]-k|0;d=(c|0)/12|0;if(!c){return 1}n=d>>>0>1?d:1;d=0;b:{while(1){c:{if((d|0)==1431655765){break c}c=o[l>>2]+(u(d,3)<<2)|0;h=o[c>>2];if((h|0)==-1){break c}f=u(d,12)+k|0;g=o[f>>2];if(g>>>0>=e>>>0){break c}j=o[o[a+72>>2]+12>>2];i=o[j+(h<<2)>>2];if(i>>>0>=e>>>0){break c}h=o[b+68>>2];o[h+(g<<2)>>2]=i;g=o[c+4>>2];if((g|0)==-1){break c}i=o[f+4>>2];if(i>>>0>=e>>>0){break c}g=o[(g<<2)+j>>2];if(g>>>0>=e>>>0){break c}o[h+(i<<2)>>2]=g;c=o[c+8>>2];if((c|0)==-1){break c}f=o[f+8>>2];if(f>>>0>=e>>>0){break c}c=o[(c<<2)+j>>2];if(c>>>0>=e>>>0){break c}o[h+(f<<2)>>2]=c;c=1;d=d+1|0;if((n|0)!=(d|0)){continue}break b}break}c=0}return c|0}function wj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;i=a+8|0;d=o[a+12>>2];h=o[a+8>>2];e=d-h>>2;a:{if((e|0)>(b|0)){break a}f=b+1|0;if(f>>>0>e>>>0){xj(i,f-e|0);break a}if(f>>>0>=e>>>0){break a}e=h+(f<<2)|0;if((e|0)!=(d|0)){while(1){d=d+ -4|0;f=o[d>>2];o[d>>2]=0;if(f){Kb(f)}if((d|0)!=(e|0)){continue}break}}o[a+12>>2]=e}b:{c:{d=o[o[c>>2]+56>>2];d:{if((d|0)>4){break d}d=u(d,12)+a|0;f=d+24|0;a=o[f>>2];j=d+28|0;g=o[j>>2];if((a|0)!=(g|0)){o[a>>2]=b;o[f>>2]=a+4;break d}k=d+20|0;d=o[k>>2];h=a-d|0;a=h>>2;e=a+1|0;if(e>>>0>=1073741824){break c}l=a<<2;g=g-d|0;a=g>>1;e=g>>2>>>0<536870911?a>>>0>>0?e:a:1073741823;a=0;e:{if(!e){break e}if(e>>>0>=1073741824){break b}a=yk(e<<2)}g=l+a|0;o[g>>2]=b;e=a+(e<<2)|0;g=g+4|0;if((h|0)>=1){ll(a,d,h)}o[k>>2]=a;o[f>>2]=g;o[j>>2]=e;if(!d){break d}jl(d)}d=o[c>>2];o[d+60>>2]=b;a=o[i>>2];o[c>>2]=0;b=a+(b<<2)|0;a=o[b>>2];o[b>>2]=d;if(a){Kb(a)}return}Nk();D()}db(11048);D()}function Sh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0;h=o[a+12>>2];d=o[a+68>>2];e=o[d+80>>2];m[b+84|0]=0;g=o[b+68>>2];c=o[b+72>>2]-g>>2;a:{if(e>>>0>c>>>0){pd(b+68|0,e-c|0,9140);d=o[a+68>>2];e=o[d+80>>2];break a}if(e>>>0>=c>>>0){break a}o[b+72>>2]=g+(e<<2)}k=o[d+96>>2];c=o[d+100>>2]-k|0;d=(c|0)/12|0;if(!c){return 1}l=d>>>0>1?d:1;n=o[h+28>>2];d=0;b:{while(1){c:{c=(u(d,3)<<2)+n|0;g=o[c>>2];if((g|0)==-1){break c}h=u(d,12)+k|0;i=o[h>>2];if(i>>>0>=e>>>0){break c}f=g<<2;g=o[o[a+72>>2]+12>>2];f=o[f+g>>2];if(f>>>0>=e>>>0){break c}j=i<<2;i=o[b+68>>2];o[j+i>>2]=f;f=o[c+4>>2];if((f|0)==-1){break c}j=o[h+4>>2];if(j>>>0>=e>>>0){break c}f=o[g+(f<<2)>>2];if(f>>>0>=e>>>0){break c}o[i+(j<<2)>>2]=f;c=o[c+8>>2];if((c|0)==-1){break c}h=o[h+8>>2];if(h>>>0>=e>>>0){break c}c=o[g+(c<<2)>>2];if(c>>>0>=e>>>0){break c}o[i+(h<<2)>>2]=c;c=1;d=d+1|0;if((l|0)!=(d|0)){continue}break b}break}c=0}return c|0}function $e(a){var b=0,c=0,d=0;b=o[a+8>>2];d=o[a>>2];a:{if(p[a+12|0]){b:{c:{d:{e:{if((b|0)==-1){break e}c=b+1|0;b=(c>>>0)%3|0?c:b+ -2|0;if((b|0)==-1|o[o[d>>2]+(b>>>3&536870908)>>2]>>>(b&31)&1){break e}b=o[o[o[d+64>>2]+12>>2]+(b<<2)>>2];if((b|0)!=-1){break d}}o[a+8>>2]=-1;break c}c=b+1|0;b=(c>>>0)%3|0?c:b+ -2|0;o[a+8>>2]=b;if((b|0)!=-1){break b}}b=-1;c=o[a+4>>2];f:{if((c|0)==-1){break f}c=c+((c>>>0)%3|0?-1:2)|0;if((c|0)==-1|o[o[d>>2]+(c>>>3&536870908)>>2]>>>(c&31)&1){break f}d=o[o[o[d+64>>2]+12>>2]+(c<<2)>>2];if((d|0)==-1){break f}if((d>>>0)%3){b=d+ -1|0;break f}b=d+2|0}m[a+12|0]=0;o[a+8>>2]=b;return}if((b|0)!=o[a+4>>2]){break a}o[a+8>>2]=-1;return}c=-1;g:{if((b|0)==-1){break g}b=b+((b>>>0)%3|0?-1:2)|0;if((b|0)==-1|o[o[d>>2]+(b>>>3&536870908)>>2]>>>(b&31)&1){break g}b=o[o[o[d+64>>2]+12>>2]+(b<<2)>>2];if((b|0)==-1){break g}if((b>>>0)%3){c=b+ -1|0;break g}c=b+2|0}o[a+8>>2]=c}}function ue(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;o[a+4>>2]=b;o[a>>2]=2732;b=c;e=o[b+8>>2];g=o[b+12>>2];h=o[b+16>>2];i=o[b+20>>2];j=o[b>>2];k=o[b+4>>2];o[a+40>>2]=0;f=a+32|0;o[f>>2]=0;o[f+4>>2]=0;o[a+24>>2]=h;o[a+28>>2]=i;o[a+16>>2]=e;o[a+20>>2]=g;o[a+8>>2]=j;o[a+12>>2]=k;a:{b=o[b+28>>2]-o[b+24>>2]|0;b:{if(!b){break b}e=b>>2;if(e>>>0>=1073741824){break a}b=yk(b);o[a+32>>2]=b;o[a+36>>2]=b;o[a+40>>2]=b+(e<<2);e=o[c+24>>2];c=o[c+28>>2]-e|0;if((c|0)<1){break b}l=a,m=ll(b,e,c)+c|0,o[l+36>>2]=m}o[a>>2]=2676;b=o[d+4>>2];o[a+44>>2]=o[d>>2];o[a+48>>2]=b;b=d+8|0;e=o[b+4>>2];o[a+52>>2]=o[b>>2];o[a+56>>2]=e;c=a- -64|0;o[c>>2]=0;o[c+4>>2]=0;o[a+60>>2]=3900;o[a>>2]=3272;c=o[d+4>>2];o[a+72>>2]=o[d>>2];o[a+76>>2]=c;c=o[b+4>>2];o[a+80>>2]=o[b>>2];o[a+84>>2]=c;o[a+92>>2]=-1;o[a+96>>2]=-1;o[a+88>>2]=1;o[a+60>>2]=3508;o[a+100>>2]=-1;o[a+104>>2]=-1;Rf(a+108|0);return}Nk();D()}function af(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;o[a+4>>2]=b;o[a>>2]=2732;b=c;e=o[b+8>>2];g=o[b+12>>2];h=o[b+16>>2];i=o[b+20>>2];j=o[b>>2];k=o[b+4>>2];o[a+40>>2]=0;f=a+32|0;o[f>>2]=0;o[f+4>>2]=0;o[a+24>>2]=h;o[a+28>>2]=i;o[a+16>>2]=e;o[a+20>>2]=g;o[a+8>>2]=j;o[a+12>>2]=k;a:{b=o[b+28>>2]-o[b+24>>2]|0;b:{if(!b){break b}e=b>>2;if(e>>>0>=1073741824){break a}b=yk(b);o[a+32>>2]=b;o[a+36>>2]=b;o[a+40>>2]=b+(e<<2);e=o[c+24>>2];c=o[c+28>>2]-e|0;if((c|0)<1){break b}l=a,m=ll(b,e,c)+c|0,o[l+36>>2]=m}o[a>>2]=4296;b=o[d+4>>2];o[a+44>>2]=o[d>>2];o[a+48>>2]=b;b=d+8|0;e=o[b+4>>2];o[a+52>>2]=o[b>>2];o[a+56>>2]=e;c=a- -64|0;o[c>>2]=0;o[c+4>>2]=0;o[a+60>>2]=5396;o[a>>2]=4812;c=o[d+4>>2];o[a+72>>2]=o[d>>2];o[a+76>>2]=c;c=o[b+4>>2];o[a+80>>2]=o[b>>2];o[a+84>>2]=c;o[a+92>>2]=-1;o[a+96>>2]=-1;o[a+88>>2]=1;o[a+60>>2]=5032;o[a+100>>2]=-1;o[a+104>>2]=-1;Rf(a+108|0);return}Nk();D()}function Yf(a){var b=0,c=0,d=0,e=0;e=R-16|0;R=e;b=yk(32);o[e>>2]=b;o[e+4>>2]=26;o[e+8>>2]=-2147483616;m[b+26|0]=0;c=p[7897]|p[7898]<<8;m[b+24|0]=c;m[b+25|0]=c>>>8;d=p[7893]|p[7894]<<8|(p[7895]<<16|p[7896]<<24);c=p[7889]|p[7890]<<8|(p[7891]<<16|p[7892]<<24);m[b+16|0]=c;m[b+17|0]=c>>>8;m[b+18|0]=c>>>16;m[b+19|0]=c>>>24;m[b+20|0]=d;m[b+21|0]=d>>>8;m[b+22|0]=d>>>16;m[b+23|0]=d>>>24;d=p[7885]|p[7886]<<8|(p[7887]<<16|p[7888]<<24);c=p[7881]|p[7882]<<8|(p[7883]<<16|p[7884]<<24);m[b+8|0]=c;m[b+9|0]=c>>>8;m[b+10|0]=c>>>16;m[b+11|0]=c>>>24;m[b+12|0]=d;m[b+13|0]=d>>>8;m[b+14|0]=d>>>16;m[b+15|0]=d>>>24;d=p[7877]|p[7878]<<8|(p[7879]<<16|p[7880]<<24);c=p[7873]|p[7874]<<8|(p[7875]<<16|p[7876]<<24);m[b|0]=c;m[b+1|0]=c>>>8;m[b+2|0]=c>>>16;m[b+3|0]=c>>>24;m[b+4|0]=d;m[b+5|0]=d>>>8;m[b+6|0]=d>>>16;m[b+7|0]=d>>>24;o[a>>2]=-1;Bk(a+4|0,e);if(m[e+11|0]<=-1){jl(o[e>>2])}R=e+16|0}function xd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;if(!o[a+64>>2]){d=yk(32);c=oi(d);e=o[a+64>>2];o[a+64>>2]=d;d=a;if(e){c=o[e>>2];if(c){o[e+4>>2]=c;jl(c)}jl(e);c=o[a+64>>2]}td(d,c,0,0)}a:{b:{if(!sd(a,b)){break b}m[a+84|0]=p[b+84|0];o[a+80>>2]=o[b+80>>2];if((a|0)!=(b|0)){yd(a+68|0,o[b+68>>2],o[b+72>>2])}c=o[b+88>>2];if(c){b=yk(40);d=o[c>>2];o[b+16>>2]=0;o[b+8>>2]=0;o[b+12>>2]=0;o[b>>2]=d;d=o[c+12>>2]-o[c+8>>2]|0;c:{if(!d){break c}if((d|0)<=-1){break a}e=yk(d);o[b+8>>2]=e;o[b+12>>2]=e;o[b+16>>2]=d+e;f=o[c+8>>2];d=o[c+12>>2]-f|0;if((d|0)<1){break c}g=b,h=ll(e,f,d)+d|0,o[g+12>>2]=h}d=o[c+36>>2];o[b+32>>2]=o[c+32>>2];o[b+36>>2]=d;d=o[c+28>>2];o[b+24>>2]=o[c+24>>2];o[b+28>>2]=d;c=o[a+88>>2];o[a+88>>2]=b;if(!c){break b}a=o[c+8>>2];if(a){o[c+12>>2]=a;jl(a)}jl(c);return}b=o[a+88>>2];o[a+88>>2]=0;if(!b){break b}a=o[b+8>>2];if(a){o[b+12>>2]=a;jl(a)}jl(b)}return}Nk();D()}function hg(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=R-16|0;R=g;a:{if(!sg(1,g+8|0,b)){break a}c=o[b+8>>2];d=o[b+16>>2];h=c-d|0;e=o[g+12>>2];i=o[b+20>>2];f=o[b+12>>2]-(i+(c>>>0>>0)|0)|0;c=o[g+8>>2];if((e|0)==(f|0)&c>>>0>h>>>0|e>>>0>f>>>0){break a}e=e+i|0;f=c+d|0;if(f>>>0>>0){e=e+1|0}o[b+16>>2]=f;o[b+20>>2]=e;if((c|0)<1){break a}d=d+o[b>>2]|0;o[a+40>>2]=d;b=a;b:{c:{d:{e:{f:{f=c+ -1|0;h=d+f|0;switch((p[h|0]>>>6|0)-1|0){case 2:break c;case 1:break d;case 0:break e;default:break f}}o[a+44>>2]=f;a=p[h|0]&63;break b}if((c|0)<2){break a}o[a+44>>2]=c+ -2;a=(c+d|0)+ -2|0;a=p[a+1|0]<<8&16128|p[a|0];break b}if((c|0)<3){break a}o[a+44>>2]=c+ -3;a=(c+d|0)+ -3|0;a=p[a+1|0]<<8|p[a+2|0]<<16&4128768|p[a|0];break b}o[a+44>>2]=c+ -4;a=(c+d|0)+ -4|0;a=p[a+2|0]<<16|p[a+3|0]<<24&1056964608|p[a+1|0]<<8|p[a|0]}a=a+16384|0;o[b+48>>2]=a;j=a>>>0<4194304}R=g+16|0;return j}function Xh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;a:{b:{if(b){if(b>>>0>=1073741824){break a}c=yk(b<<2);d=o[a>>2];o[a>>2]=c;if(d){jl(d)}o[a+4>>2]=b;d=b>>>0>1?b:1;c=0;while(1){o[o[a>>2]+(c<<2)>>2]=0;c=c+1|0;if((d|0)!=(c|0)){continue}break}f=o[a+8>>2];if(!f){break b}d=a+8|0;g=o[f+4>>2];c=Rl(b);c:{if(c>>>0<=1){g=b+ -1&g;break c}if(g>>>0>>0){break c}g=(g>>>0)%(b>>>0)|0}o[o[a>>2]+(g<<2)>>2]=d;d=o[f>>2];if(!d){break b}j=b+ -1|0;k=c>>>0>1;while(1){e=o[d+4>>2];d:{if(!k){e=e&j;break d}if(e>>>0>>0){break d}e=(e>>>0)%(b>>>0)|0}e:{if((e|0)==(g|0)){f=d;break e}c=d;h=e<<2;i=h+o[a>>2]|0;if(!o[i>>2]){o[i>>2]=f;f=d;g=e;break e}while(1){e=c;c=o[c>>2];if(o[d+8>>2]==o[c+8>>2]?c:0){continue}break}o[f>>2]=c;o[e>>2]=o[o[o[a>>2]+h>>2]>>2];o[o[o[a>>2]+h>>2]>>2]=d}d=o[f>>2];if(d){continue}break}break b}b=o[a>>2];o[a>>2]=0;if(b){jl(b)}o[a+4>>2]=0}return}db(8832);D()}function ya(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=R-16|0;R=e;a:{if(!Aa(a,b)){break a}d=1;f=o[b+100>>2];g=o[b+96>>2];if((f|0)==(g|0)){break a}while(1){if(!(o[o[a+56>>2]+(i>>>3&536870908)>>2]>>>(i&31)&1)){d=u(i,3);_i(a,0,d);f=o[a+8>>2];g=o[a+12>>2];_i(a,1,d+1|0);h=o[a+20>>2];j=o[a+24>>2];_i(a,2,d+2|0);h=j-h>>2;f=g-f|0;g=f>>2;d=h>>>0>g>>>0;g=o[a+36>>2]-o[a+32>>2]>>2>>>0>(d?h:g)>>>0?2:d?1:f?0:-1;b:{if(o[a+68>>2]<1){break b}o[e+12>>2]=o[a+76>>2];o[e+8>>2]=c;Ba(e+8|0,e+12|0);f=e;h=o[((g<<2)+a|0)+44>>2];d=-1;c:{if((h|0)<0){break c}d=(h>>>0)/3|0;d=o[(o[o[a>>2]+96>>2]+u(d,12)|0)+(h-u(d,3)<<2)>>2]}o[f+12>>2]=d;o[e+8>>2]=c;Ba(e+8|0,e+12|0);f=o[a+72>>2]+2|0;o[a+72>>2]=f;if(!(f&1)){break b}o[e+12>>2]=d;o[e+8>>2]=c;Ba(e+8|0,e+12|0);o[a+72>>2]=o[a+72>>2]+1}Ca(a,g,c);g=o[b+96>>2];f=o[b+100>>2]}d=1;i=i+1|0;if(i>>>0<(f-g|0)/12>>>0){continue}break}}R=e+16|0;return d}function ih(a){o[a>>2]=8280;ml(a+4|0,0,80);o[a+96>>2]=0;o[a+100>>2]=0;o[a+92>>2]=-1;o[a+84>>2]=-1;o[a+88>>2]=-1;o[a+104>>2]=0;o[a+108>>2]=0;o[a+112>>2]=0;o[a+116>>2]=0;o[a+120>>2]=0;o[a+124>>2]=0;o[a+128>>2]=0;o[a+132>>2]=0;o[a+136>>2]=0;o[a+140>>2]=0;o[a+144>>2]=0;o[a+148>>2]=0;o[a+156>>2]=0;o[a+160>>2]=0;o[a+152>>2]=1065353216;o[a+164>>2]=0;o[a+168>>2]=0;o[a+172>>2]=0;o[a+176>>2]=0;o[a+180>>2]=0;o[a+184>>2]=0;o[a+188>>2]=0;o[a+192>>2]=0;o[a+196>>2]=0;o[a+200>>2]=0;o[a+204>>2]=0;o[a+208>>2]=0;o[a+212>>2]=-1;o[a+216>>2]=0;o[a+220>>2]=0;o[a+224>>2]=0;si(a+232|0);si(a+272|0);Rf(a+312|0);si(a+328|0);o[a+392>>2]=0;o[a+396>>2]=0;o[a+384>>2]=0;o[a+388>>2]=0;o[a+376>>2]=0;o[a+380>>2]=0;o[a+368>>2]=0;o[a+372>>2]=0;o[a+416>>2]=0;o[a+420>>2]=0;o[a+408>>2]=2;o[a+412>>2]=7;o[a+400>>2]=-1;o[a+404>>2]=-1;o[a+424>>2]=0;o[a+428>>2]=0;o[a+432>>2]=0;o[a+436>>2]=0}function Yi(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=o[a>>2];c=e+(b>>>3&536870908)|0;o[c>>2]=o[c>>2]|1<<(b&31);g=o[a+64>>2];f=(b|0)==-1;c=-1;a:{if(f){break a}d=b+1|0;d=(d>>>0)%3|0?d:b+ -2|0;c=-1;if((d|0)==-1){break a}c=o[o[g>>2]+(d<<2)>>2]}d=o[a+12>>2];h=(c>>>3&536870908)+d|0;o[h>>2]=o[h>>2]|1<<(c&31);b:{c:{if(!f){c=-1;f=((b>>>0)%3|0?-1:2)+b|0;if((f|0)!=-1){c=o[o[g>>2]+(f<<2)>>2]}f=d+(c>>>3&536870908)|0;o[f>>2]=o[f>>2]|1<<(c&31);b=o[o[g+12>>2]+(b<<2)>>2];if((b|0)==-1){break b}m[a+24|0]=0;a=(b>>>3&536870908)+e|0;o[a>>2]=o[a>>2]|1<<(b&31);a=-1;c=-1;e=b+1|0;e=(e>>>0)%3|0?e:b+ -2|0;if((e|0)!=-1){c=o[o[g>>2]+(e<<2)>>2]}e=d+(c>>>3&536870908)|0;o[e>>2]=o[e>>2]|1<<(c&31);b=b+((b>>>0)%3|0?-1:2)|0;if((b|0)!=-1){a=o[o[g>>2]+(b<<2)>>2]}b=1<<(a&31);a=d+(a>>>3&536870908)|0;c=o[a>>2];break c}a=d+536870908|0;b=o[d+536870908>>2];c=-2147483648}o[a>>2]=b|c}}function jg(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=R+ -64|0;R=d;o[d+56>>2]=0;o[d+48>>2]=0;o[d+52>>2]=0;o[d+40>>2]=0;o[d+44>>2]=0;o[d+32>>2]=0;o[d+36>>2]=0;o[d+24>>2]=0;o[d+28>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;o[d+8>>2]=0;o[d+12>>2]=0;a:{if(!gg(d+8|0,b)){break a}if(a){if(!o[d+20>>2]){break a}if(!hg(d+8|0,b)){break a}b=o[d+56>>2];i=o[d+36>>2];j=o[d+48>>2];k=o[d+24>>2];while(1){b:{if(b>>>0>16383){break b}e=o[d+52>>2];while(1){if((e|0)<1){break b}e=e+ -1|0;o[d+52>>2]=e;b=p[e+j|0]|b<<8;o[d+56>>2]=b;if(b>>>0<16384){continue}break}}e=b&4095;g=o[(e<<2)+k>>2];h=(g<<3)+i|0;b=(u(o[h>>2],b>>>12|0)+e|0)-o[h+4>>2]|0;o[d+56>>2]=b;o[(f<<2)+c>>2]=g;e=1;f=f+1|0;if((f|0)!=(a|0)){continue}break}break a}e=hg(d+8|0,b)}a=o[d+36>>2];if(a){o[d+40>>2]=a;jl(a)}a=o[d+24>>2];if(a){o[d+28>>2]=a;jl(a)}a=o[d+8>>2];if(a){o[d+12>>2]=a;jl(a)}R=d- -64|0;return e}function Zf(a,b){var c=0,d=0,e=0;e=R-16|0;R=e;o[e+12>>2]=b;b=yk(32);o[e>>2]=b;o[e+4>>2]=24;o[e+8>>2]=-2147483616;m[b+24|0]=0;c=p[7941]|p[7942]<<8|(p[7943]<<16|p[7944]<<24);d=p[7937]|p[7938]<<8|(p[7939]<<16|p[7940]<<24);m[b+16|0]=d;m[b+17|0]=d>>>8;m[b+18|0]=d>>>16;m[b+19|0]=d>>>24;m[b+20|0]=c;m[b+21|0]=c>>>8;m[b+22|0]=c>>>16;m[b+23|0]=c>>>24;c=p[7933]|p[7934]<<8|(p[7935]<<16|p[7936]<<24);d=p[7929]|p[7930]<<8|(p[7931]<<16|p[7932]<<24);m[b+8|0]=d;m[b+9|0]=d>>>8;m[b+10|0]=d>>>16;m[b+11|0]=d>>>24;m[b+12|0]=c;m[b+13|0]=c>>>8;m[b+14|0]=c>>>16;m[b+15|0]=c>>>24;c=p[7925]|p[7926]<<8|(p[7927]<<16|p[7928]<<24);d=p[7921]|p[7922]<<8|(p[7923]<<16|p[7924]<<24);m[b|0]=d;m[b+1|0]=d>>>8;m[b+2|0]=d>>>16;m[b+3|0]=d>>>24;m[b+4|0]=c;m[b+5|0]=c>>>8;m[b+6|0]=c>>>16;m[b+7|0]=c>>>24;zi(_f(a,e+12|0),e);if(m[e+11|0]<=-1){jl(o[e>>2])}R=e+16|0}function mh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=o[a+8>>2];c=o[a+4>>2];if((e-c|0)/12>>>0>=b>>>0){d=a;a=u(b,12);j=d,k=ml(c,0,a)+a|0,o[j+4>>2]=k;return}f=o[a>>2];g=(c-f|0)/12|0;d=g+b|0;a:{if(d>>>0<357913942){g=u(g,12);e=(e-f|0)/12|0;h=e<<1;e=e>>>0<178956970?h>>>0>>0?d:h:357913941;if(e){if(e>>>0>=357913942){break a}i=yk(u(e,12))}d=g+i|0;b=u(b,12);b=ml(d,0,b)+b|0;e=u(e,12)+i|0;if((c|0)!=(f|0)){while(1){d=d+ -12|0;o[d+8>>2]=0;o[d>>2]=0;o[d+4>>2]=0;c=c+ -12|0;o[d>>2]=o[c>>2];o[d+4>>2]=o[c+4>>2];o[d+8>>2]=o[c+8>>2];o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0;if((c|0)!=(f|0)){continue}break}f=o[a>>2];c=o[a+4>>2]}o[a+8>>2]=e;o[a+4>>2]=b;o[a>>2]=d;if((c|0)!=(f|0)){while(1){a=c+ -12|0;b=o[a>>2];if(b){o[c+ -8>>2]=b;jl(b)}c=a;if((c|0)!=(f|0)){continue}break}}if(f){jl(f)}return}Nk();D()}db(8832);D()}function gb(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;f=R-32|0;R=f;h=o[c+4>>2];d=o[b+4>>2];i=o[c>>2];g=o[b>>2];b=(h-d|0)+(i-g<<3)|0;c=o[a+4>>2];e=b+c|0;o[a+4>>2]=e;a:{if(!(!c|(e+ -1^c+ -1)>>>0>31)){a=o[a>>2];break a}a=o[a>>2];if(e>>>0<=32){o[a>>2]=0;break a}o[(e+ -1>>>3&536870908)+a>>2]=0}a=(c>>>3&536870908)+a|0;c=c&31;b:{if((c|0)==(d|0)){c:{if((b|0)<1){break c}d:{if(!d){c=0;break d}e=32-d|0;c=(b|0)<(e|0)?b:e;e=-1<>>e-c;o[a>>2]=o[a>>2]&(e^-1)|e&o[g>>2];b=b-c|0;d=c+d|0;c=d&31;a=(d>>>3&536870908)+a|0;g=g+4|0}d=(b|0)/32|0;e=d<<2;a=nl(a,g,e)+e|0;d=b-(d<<5)|0;if((d|0)<1){d=c;break c}b=-1>>>32-d|0;o[a>>2]=o[a>>2]&(b^-1)|b&o[e+g>>2]}o[f+4>>2]=d;o[f>>2]=a;break b}o[f+28>>2]=d;o[f+24>>2]=g;o[f+20>>2]=h;o[f+16>>2]=i;o[f+12>>2]=c;o[f+8>>2]=a;hb(f,f+24|0,f+16|0,f+8|0)}R=f+32|0}function nl(a,b,c){var d=0,e=0;a:{if((a|0)==(b|0)){break a}b:{if(b+c>>>0>a>>>0){e=a+c|0;if(e>>>0>b>>>0){break b}}return ll(a,b,c)}d=(a^b)&3;c:{d:{if(a>>>0>>0){if(d){d=a;break c}if(!(a&3)){d=a;break d}d=a;while(1){if(!c){break a}m[d|0]=p[b|0];b=b+1|0;c=c+ -1|0;d=d+1|0;if(d&3){continue}break}break d}e:{if(d){break e}if(e&3){while(1){if(!c){break a}c=c+ -1|0;d=c+a|0;m[d|0]=p[b+c|0];if(d&3){continue}break}}if(c>>>0<=3){break e}while(1){c=c+ -4|0;o[c+a>>2]=o[b+c>>2];if(c>>>0>3){continue}break}}if(!c){break a}while(1){c=c+ -1|0;m[c+a|0]=p[b+c|0];if(c){continue}break}break a}if(c>>>0<=3){break c}while(1){o[d>>2]=o[b>>2];b=b+4|0;d=d+4|0;c=c+ -4|0;if(c>>>0>3){continue}break}}if(!c){break a}while(1){m[d|0]=p[b|0];d=d+1|0;b=b+1|0;c=c+ -1|0;if(c){continue}break}}return a}function ej(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=R-16|0;R=d;g=o[a+24>>2];l=o[a+28>>2];a:{if((g|0)!=(l|0)){n=d+8|0;while(1){o[n>>2]=0;o[d>>2]=0;o[d+4>>2]=0;a=mj(o[g>>2],b,d);h=p[d+11|0];k=h<<24>>24;b:{c:{d:{if(!a){a=3;break d}a=0;e=p[c+11|0];f=e<<24>>24;j=(k|0)<0?o[d+4>>2]:h;if((j|0)!=(((f|0)<0?o[c+4>>2]:e)|0)){break d}i=(f|0)<0?o[c>>2]:c;f=o[d>>2];e=(k|0)<0;e:{if(!e){if(!j){break e}e=d;if(p[i|0]!=(f&255)){break d}while(1){h=h+ -1|0;if(!h){break e}f=p[i+1|0];i=i+1|0;e=e+1|0;if((f|0)==p[e|0]){continue}break}break d}if(!j){break e}if(Vj(e?f:d,i,j)){break c}}m=o[g>>2];a=1}if((k|0)>-1){break b}}jl(o[d>>2])}if(a>>>0>3){break a}f:{switch(a-1|0){case 0:case 1:break a;default:break f}}g=g+4|0;if((l|0)!=(g|0)){continue}break}}m=0}R=d+16|0;return m}function id(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;o[b>>2]=1;f=b+8|0;c=o[b+8>>2];d=o[b+12>>2]-c|0;if(d>>>0<=4294967291){ri(f,d+4|0);c=o[f>>2]}d=c+d|0;c=p[a+4|0]|p[a+5|0]<<8|(p[a+6|0]<<16|p[a+7|0]<<24);m[d|0]=c;m[d+1|0]=c>>>8;m[d+2|0]=c>>>16;m[d+3|0]=c>>>24;c=o[a+8>>2];if((c|0)!=o[a+12>>2]){while(1){d=(g<<2)+c|0;c=o[b+8>>2];e=o[b+12>>2]-c|0;if(e>>>0<=4294967291){ri(f,e+4|0);c=o[f>>2]}e=c+e|0;c=p[d|0]|p[d+1|0]<<8|(p[d+2|0]<<16|p[d+3|0]<<24);m[e|0]=c;m[e+1|0]=c>>>8;m[e+2|0]=c>>>16;m[e+3|0]=c>>>24;g=g+1|0;c=o[a+8>>2];if(g>>>0>2]-c>>2>>>0){continue}break}}c=o[b+12>>2];b=o[b+8>>2];c=c-b|0;if(c>>>0<=4294967291){ri(f,c+4|0);b=o[f>>2]}b=b+c|0;a=p[a+20|0]|p[a+21|0]<<8|(p[a+22|0]<<16|p[a+23|0]<<24);m[b|0]=a;m[b+1|0]=a>>>8;m[b+2|0]=a>>>16;m[b+3|0]=a>>>24}function Xe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=o[b+12>>2];g=d;c=o[b+20>>2];f=c;h=o[b+16>>2];e=h+4|0;if(e>>>0<4){c=c+1|0}j=o[b+8>>2];i=e;e=c;a:{if((d|0)<(c|0)?1:(d|0)<=(c|0)?j>>>0>=i>>>0?0:1:0){break a}k=o[b>>2];c=k+h|0;d=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);o[b+16>>2]=i;o[b+20>>2]=e;c=f;f=h+8|0;if(f>>>0<8){c=c+1|0}e=f;f=c;if((g|0)<(c|0)?1:(g|0)<=(c|0)?j>>>0>=e>>>0?0:1:0){break a}c=i+k|0;c=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);o[b+16>>2]=e;o[b+20>>2]=f;if((d|0)>(c|0)){break a}o[a+16>>2]=c;o[a+12>>2]=d;g=d;d=(c>>31)-((d>>31)+(c>>>0>>0)|0)|0;c=c-g|0;if(!d&c>>>0>2147483646|d>>>0>0){break a}c=c+1|0;o[a+20>>2]=c;d=(c|0)/2|0;o[a+24>>2]=d;o[a+28>>2]=0-d;if(!(c&1)){o[a+24>>2]=d+ -1}l=Sf(a+108|0,b)}return l|0}function Ae(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=o[b+12>>2];i=d;c=o[b+20>>2];f=c;g=o[b+16>>2];e=g+4|0;if(e>>>0<4){c=c+1|0}j=o[b+8>>2];h=e;e=c;a:{if((d|0)<(c|0)?1:(d|0)<=(c|0)?j>>>0>=h>>>0?0:1:0){break a}k=o[b>>2];c=k+g|0;d=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);o[b+16>>2]=h;o[b+20>>2]=e;c=f;f=g+8|0;if(f>>>0<8){c=c+1|0}e=f;f=c;if((i|0)<(c|0)?1:(i|0)<=(c|0)?j>>>0>=e>>>0?0:1:0){break a}c=h+k|0;c=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);o[b+16>>2]=e;o[b+20>>2]=f;if((d|0)>(c|0)){break a}o[a+16>>2]=c;o[a+12>>2]=d;b=d;d=(c>>31)-((c>>>0>>0)+(b>>31)|0)|0;b=c-b|0;if(!d&b>>>0>2147483646|d>>>0>0){break a}l=1;b=b+1|0;o[a+20>>2]=b;c=(b|0)/2|0;o[a+24>>2]=c;o[a+28>>2]=0-c;if(b&1){break a}o[a+24>>2]=c+ -1}return l|0}function of(a){var b=0,c=0,d=0;b=o[a+8>>2];d=o[a>>2];a:{if(p[a+12|0]){b:{c:{d:{e:{if((b|0)==-1){break e}c=b+1|0;b=(c>>>0)%3|0?c:b+ -2|0;if((b|0)==-1){break e}b=o[o[d+12>>2]+(b<<2)>>2];if((b|0)!=-1){break d}}o[a+8>>2]=-1;break c}c=b+1|0;b=(c>>>0)%3|0?c:b+ -2|0;o[a+8>>2]=b;if((b|0)!=-1){break b}}c=o[a+4>>2];b=-1;f:{if((c|0)==-1){break f}c=c+((c>>>0)%3|0?-1:2)|0;b=-1;if((c|0)==-1){break f}c=o[o[d+12>>2]+(c<<2)>>2];b=-1;if((c|0)==-1){break f}b=c+ -1|0;if((c>>>0)%3){break f}b=c+2|0}m[a+12|0]=0;o[a+8>>2]=b;return}if((b|0)!=o[a+4>>2]){break a}o[a+8>>2]=-1;return}c=-1;g:{if((b|0)==-1){break g}b=b+((b>>>0)%3|0?-1:2)|0;c=-1;if((b|0)==-1){break g}b=o[o[d+12>>2]+(b<<2)>>2];c=-1;if((b|0)==-1){break g}c=b+ -1|0;if((b>>>0)%3){break g}c=b+2|0}o[a+8>>2]=c}}function gh(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{f=o[a+8>>2];d=o[a+4>>2];c:{if((f-d|0)/12>>>0>=b>>>0){while(1){e=o[c+4>>2];o[d>>2]=o[c>>2];o[d+4>>2]=e;o[d+8>>2]=o[c+8>>2];d=o[a+4>>2]+12|0;o[a+4>>2]=d;b=b+ -1|0;if(b){continue}break c}}e=d;d=o[a>>2];g=(e-d|0)/12|0;h=g+b|0;if(h>>>0>=357913942){break b}d=(f-d|0)/12|0;f=d<<1;d=d>>>0<178956970?f>>>0>>0?h:f:357913941;e=0;d:{if(!d){break d}if(d>>>0>=357913942){break a}e=yk(u(d,12))}f=e+u(d,12)|0;g=e+u(g,12)|0;d=g;while(1){i=o[c+4>>2];o[d>>2]=o[c>>2];o[d+4>>2]=i;o[d+8>>2]=o[c+8>>2];d=d+12|0;b=b+ -1|0;if(b){continue}break}d=e+u(h,12)|0;b=o[a>>2];c=o[a+4>>2]-b|0;e=g+u((c|0)/-12|0,12)|0;if((c|0)>=1){ll(e,b,c)}o[a+8>>2]=f;o[a+4>>2]=d;o[a>>2]=e;if(!b){break c}jl(b)}return}Nk();D()}db(8832);D()}function Ya(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=R-16|0;R=f;a:{g=m[b+24|0];i=o[a+80>>2];b:{if((u(g,i)|0)!=(c|0)){break b}if(!(!p[b+84|0]|o[b+28>>2]!=1)){ll(d,o[o[b>>2]>>2]+o[b+48>>2]|0,c);e=1;break b}o[f+8>>2]=0;o[f>>2]=0;o[f+4>>2]=0;if(g){if((g|0)<=-1){break a}e=yk(g);o[f>>2]=e;o[f+4>>2]=e;o[f+8>>2]=e+g;c=g;while(1){m[e|0]=0;e=o[f+4>>2]+1|0;o[f+4>>2]=e;c=c+ -1|0;if(c){continue}break}}c:{if(!i){e=1;a=o[f>>2];break c}a=o[f>>2];k=(g|0)<1;while(1){c=h;e=b;if(!p[e+84|0]){c=o[o[b+68>>2]+(h<<2)>>2]}if(!La(e,c,m[b+24|0],a)){e=0;break c}e=0;c=j;if(!k){while(1){m[c+d|0]=p[a+e|0];c=c+1|0;e=e+1|0;if((g|0)!=(e|0)){continue}break}j=g+j|0}e=1;h=h+1|0;if((i|0)!=(h|0)){continue}break}}if(!a){break b}o[f+4>>2]=a;jl(a)}R=f+16|0;return e}Nk();D()}function $a(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=R-16|0;R=f;a:{g=m[b+24|0];i=o[a+80>>2];b:{if((u(g,i)|0)!=(c|0)){break b}if(!(!p[b+84|0]|o[b+28>>2]!=2)){ll(d,o[o[b>>2]>>2]+o[b+48>>2]|0,c);e=1;break b}o[f+8>>2]=0;o[f>>2]=0;o[f+4>>2]=0;if(g){if((g|0)<=-1){break a}e=yk(g);o[f>>2]=e;o[f+4>>2]=e;o[f+8>>2]=e+g;c=g;while(1){m[e|0]=0;e=o[f+4>>2]+1|0;o[f+4>>2]=e;c=c+ -1|0;if(c){continue}break}}c:{if(!i){e=1;a=o[f>>2];break c}a=o[f>>2];k=(g|0)<1;while(1){c=h;e=b;if(!p[e+84|0]){c=o[o[b+68>>2]+(h<<2)>>2]}if(!Na(e,c,m[b+24|0],a)){e=0;break c}e=0;c=j;if(!k){while(1){m[c+d|0]=p[a+e|0];c=c+1|0;e=e+1|0;if((g|0)!=(e|0)){continue}break}j=g+j|0}e=1;h=h+1|0;if((i|0)!=(h|0)){continue}break}}if(!a){break b}o[f+4>>2]=a;jl(a)}R=f+16|0;return e}Nk();D()}function he(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;f=R-16|0;R=f;j=o[c+8>>2];g=o[c+16>>2];h=o[c+12>>2];d=h;e=o[c+20>>2];a:{if((d|0)<(e|0)?1:(d|0)<=(e|0)?j>>>0>g>>>0?0:1:0){break a}k=o[c>>2];n=m[k+g|0];d=e;i=g+1|0;if(i>>>0<1){d=d+1|0}o[c+16>>2]=i;o[c+20>>2]=d;b:{if((n|0)==-2){break b}if((h|0)<(d|0)?1:(h|0)<=(d|0)?j>>>0>i>>>0?0:1:0){break a}h=m[i+k|0];g=g+2|0;if(g>>>0<2){e=e+1|0}d=c;o[d+16>>2]=g;o[d+20>>2]=e;l[o[o[a>>2]+40>>2]](f+8|0,a,n,h);e=o[f+8>>2];o[f+8>>2]=0;d=o[a+20>>2];o[a+20>>2]=e;if(!d){o[f+8>>2]=0;break b}l[o[o[d>>2]+4>>2]](d);d=o[f+8>>2];o[f+8>>2]=0;if(!d){break b}l[o[o[d>>2]+4>>2]](d)}d=o[a+20>>2];if(d){if(!l[o[o[a>>2]+28>>2]](a,d)){break a}}p=l[o[o[a>>2]+36>>2]](a,b,c)|0}R=f+16|0;return p|0}function oa(a,b,c){var d=0,e=0,f=0;a:{if(o[a+12>>2]==(b|0)){break a}d=o[a>>2];e=o[a+4>>2];if((d|0)!=(e|0)){while(1){f=e+ -12|0;if(m[e+ -1|0]<=-1){jl(o[f>>2])}e=f;if((e|0)!=(d|0)){continue}break}}o[a+12>>2]=b;o[a+4>>2]=d;e=o[b>>2];f=b+4|0;if((e|0)==(f|0)){break a}while(1){b=e+16|0;b:{if(o[a+8>>2]!=(d|0)){Bk(d,b);o[a+4>>2]=o[a+4>>2]+12;break b}pa(a,b)}d=o[e+4>>2];c:{if(!d){b=o[e+8>>2];if(o[b>>2]==(e|0)){break c}e=e+8|0;while(1){d=o[e>>2];e=d+8|0;b=o[d+8>>2];if((d|0)!=o[b>>2]){continue}break}break c}while(1){b=d;d=o[d>>2];if(d){continue}break}}if((b|0)==(f|0)){break a}d=o[a+4>>2];e=b;continue}}d=0;d:{if((c|0)<0){break d}b=o[a+4>>2];a=o[a>>2];if((b-a|0)/12>>>0<=c>>>0){break d}d=a+u(c,12)|0;if(m[d+11|0]>-1){break d}d=o[d>>2]}return d}function ml(a,b,c){var d=0,e=0,f=0,g=0;a:{if(!c){break a}d=a+c|0;m[d+ -1|0]=b;m[a|0]=b;if(c>>>0<3){break a}m[d+ -2|0]=b;m[a+1|0]=b;m[d+ -3|0]=b;m[a+2|0]=b;if(c>>>0<7){break a}m[d+ -4|0]=b;m[a+3|0]=b;if(c>>>0<9){break a}d=0-a&3;e=d+a|0;b=u(b&255,16843009);o[e>>2]=b;c=c-d&-4;d=c+e|0;o[d+ -4>>2]=b;if(c>>>0<9){break a}o[e+8>>2]=b;o[e+4>>2]=b;o[d+ -8>>2]=b;o[d+ -12>>2]=b;if(c>>>0<25){break a}o[e+24>>2]=b;o[e+20>>2]=b;o[e+16>>2]=b;o[e+12>>2]=b;o[d+ -16>>2]=b;o[d+ -20>>2]=b;o[d+ -24>>2]=b;o[d+ -28>>2]=b;g=e&4|24;c=c-g|0;if(c>>>0<32){break a}d=b;f=b;b=e+g|0;while(1){o[b+24>>2]=f;o[b+28>>2]=d;o[b+16>>2]=f;o[b+20>>2]=d;o[b+8>>2]=f;o[b+12>>2]=d;o[b>>2]=f;o[b+4>>2]=d;b=b+32|0;c=c+ -32|0;if(c>>>0>31){continue}break}}return a}function Th(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=o[a+4>>2];e=o[b>>2];a:{c=o[a+12>>2];d=o[c+56>>2]-o[c+52>>2]|0;c=d>>2;b:{if(o[b+8>>2]-e>>2>>>0>=c>>>0){break b}if(c>>>0>=1073741824){break a}f=o[b+4>>2];g=c<<2;c=yk(d);g=g+c|0;d=f-e|0;f=d+c|0;if((d|0)>=1){ll(c,e,d)}o[b+8>>2]=g;o[b+4>>2]=f;o[b>>2]=c;if(!e){break b}jl(e)}c=a+8|0;c:{d:{b=o[a+76>>2];if(b){e=o[b>>2];d=1;if((e|0)==o[b+4>>2]){break c}b=0;while(1){if(!Uh(c,o[(b<<2)+e>>2])){break d}d=o[a+76>>2];e=o[d>>2];b=b+1|0;if(b>>>0>2]-e>>2>>>0){continue}break}return 1}b=0;a=o[o[a+12>>2]+64>>2];a=(o[a+4>>2]-o[a>>2]>>2>>>0)/3|0;if((a|0)<=0){return 1}while(1){if(!Uh(c,u(b,3))){break d}b=b+1|0;if((a|0)!=(b|0)){continue}break}return 1}d=0}return d|0}db(8832);D()}function $i(a,b){var c=0,d=0,e=0,f=0,g=0;d=-1;f=-1;e=-1;a:{b:{if((b|0)==-1){break b}g=1;f=o[o[o[a+4>>2]+12>>2]+(b<<2)>>2];c=b+1|0;c=(c>>>0)%3|0?c:b+ -2|0;if((c|0)>=0){e=(c>>>0)/3|0;e=o[(o[o[a>>2]+96>>2]+u(e,12)|0)+(c-u(e,3)<<2)>>2]}c:{if((f|0)==-1){break c}g=0;c=((f>>>0)%3|0?-1:2)+f|0;if((c|0)<0){break c}d=(c>>>0)/3|0;d=o[(o[o[a>>2]+96>>2]+u(d,12)|0)+(c-u(d,3)<<2)>>2]}c=-1;if((d|0)!=(e|0)){break a}e=-1;d:{b=((b>>>0)%3|0?-1:2)+b|0;if((b|0)>=0){d=(b>>>0)/3|0;d=o[(o[o[a>>2]+96>>2]+u(d,12)|0)+(b-u(d,3)<<2)>>2];if(g){break b}break d}d=-1;if(!g){break d}break b}b=f+1|0;b=(b>>>0)%3|0?b:f+ -2|0;if((b|0)<0){break b}e=o[o[a>>2]+96>>2];a=(b>>>0)/3|0;e=o[(e+u(a,12)|0)+(b-u(a,3)<<2)>>2]}c=(d|0)==(e|0)?f:-1}return c}function Nh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=o[a+4>>2];e=o[b>>2];a:{c=o[a+12>>2];d=o[c+28>>2]-o[c+24>>2]|0;c=d>>2;b:{if(o[b+8>>2]-e>>2>>>0>=c>>>0){break b}if(c>>>0>=1073741824){break a}f=o[b+4>>2];g=c<<2;c=yk(d);g=g+c|0;d=f-e|0;f=d+c|0;if((d|0)>=1){ll(c,e,d)}o[b+8>>2]=g;o[b+4>>2]=f;o[b>>2]=c;if(!e){break b}jl(e)}c=a+8|0;c:{d:{b=o[a+76>>2];if(b){e=o[b>>2];d=1;if((e|0)==o[b+4>>2]){break c}b=0;while(1){if(!Oh(c,o[(b<<2)+e>>2])){break d}d=o[a+76>>2];e=o[d>>2];b=b+1|0;if(b>>>0>2]-e>>2>>>0){continue}break}return 1}b=0;a=o[a+12>>2];a=(o[a+4>>2]-o[a>>2]>>2>>>0)/3|0;if((a|0)<=0){return 1}while(1){if(!Oh(c,u(b,3))){break d}b=b+1|0;if((a|0)!=(b|0)){continue}break}return 1}d=0}return d|0}db(8832);D()}function pa(a,b){var c=0,d=0,e=0,f=0,g=0;e=o[a>>2];g=(o[a+4>>2]-e|0)/12|0;c=g+1|0;a:{b:{c:{if(c>>>0<357913942){e=(o[a+8>>2]-e|0)/12|0;f=e<<1;c=e>>>0<178956970?f>>>0>>0?c:f:357913941;d=0;d:{if(!c){break d}if(c>>>0>=357913942){break c}d=yk(u(c,12))}e=d+u(c,12)|0;b=Bk(d+u(g,12)|0,b);g=b+12|0;c=o[a+4>>2];d=o[a>>2];if((c|0)==(d|0)){break b}while(1){c=c+ -12|0;f=o[c+4>>2];b=b+ -12|0;o[b>>2]=o[c>>2];o[b+4>>2]=f;f=c+8|0;o[b+8>>2]=o[f>>2];o[c>>2]=0;o[c+4>>2]=0;o[f>>2]=0;if((c|0)!=(d|0)){continue}break}d=o[a+4>>2];c=o[a>>2];break a}Nk();D()}db(1040);D()}c=d}o[a+8>>2]=e;o[a+4>>2]=g;o[a>>2]=b;if((c|0)!=(d|0)){while(1){a=d+ -12|0;if(m[d+ -1|0]<=-1){jl(o[a>>2])}d=a;if((a|0)!=(c|0)){continue}break}}if(c){jl(c)}}function Xa(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0;g=R-16|0;R=g;c=c+ -1|0;a:{if(c>>>0>8){break a}b:{switch(c-1|0){default:f=Ya(a,b,d,e);break a;case 1:f=Za(a,b,d,e);break a;case 3:f=_a(a,b,d,e);break a;case 0:f=$a(a,b,d,e);break a;case 2:f=ab(a,b,d,e);break a;case 4:f=bb(a,b,d,e);break a;case 5:case 6:break a;case 7:break b}}c=d;d=m[b+24|0];i=d<<2;h=o[a+80>>2];if((c|0)!=(u(i,h)|0)){break a}c=0;a=o[259];o[g+8>>2]=o[258];o[g+12>>2]=a;a=o[257];o[g>>2]=o[256];o[g+4>>2]=a;if(!h){f=1;break a}j=((d|0)>0?d:0)<<2;k=(d|0)<1;while(1){a=c;d=b;if(!p[d+84|0]){a=o[o[b+68>>2]+(c<<2)>>2]}if(!Ga(d,a,m[b+24|0],g)){f=0;break a}if(!k){ll(u(c,j)+e|0,g,i)}f=1;c=c+1|0;if((h|0)!=(c|0)){continue}break}}R=g+16|0;return f}function Sj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;d=R-32|0;R=d;e=o[a+28>>2];o[d+16>>2]=e;f=o[a+20>>2];o[d+28>>2]=c;o[d+24>>2]=b;b=f-e|0;o[d+20>>2]=b;e=b+c|0;h=2;b=d+16|0;a:{b:{c:{if(!Wj(J(o[a+60>>2],d+16|0,2,d+12|0)|0)){while(1){f=o[d+12>>2];if((f|0)==(e|0)){break c}if((f|0)<=-1){break b}g=o[b+4>>2];i=f>>>0>g>>>0;b=i?b+8|0:b;g=f-(i?g:0)|0;o[b>>2]=g+o[b>>2];o[b+4>>2]=o[b+4>>2]-g;e=e-f|0;h=h-i|0;if(!Wj(J(o[a+60>>2],b|0,h|0,d+12|0)|0)){continue}break}}o[d+12>>2]=-1;if((e|0)!=-1){break b}}b=o[a+44>>2];o[a+28>>2]=b;o[a+20>>2]=b;o[a+16>>2]=b+o[a+48>>2];a=c;break a}o[a+28>>2]=0;o[a+16>>2]=0;o[a+20>>2]=0;o[a>>2]=o[a>>2]|32;a=0;if((h|0)==2){break a}a=c-o[b+4>>2]|0}R=d+32|0;return a|0}function va(a,b,c){var d=0,e=0,f=0,g=0;d=R-32|0;R=d;o[d+24>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;g=rl(b);a:{if(g>>>0<4294967280){b:{c:{if(g>>>0>=11){e=g+16&-16;f=yk(e);o[d+24>>2]=e|-2147483648;o[d+16>>2]=f;o[d+20>>2]=g;break c}m[d+27|0]=g;f=d+16|0;if(!g){break b}}ll(f,b,g)}m[f+g|0]=0;o[d+8>>2]=0;o[d>>2]=0;o[d+4>>2]=0;e=rl(c);if(e>>>0>=4294967280){break a}d:{e:{if(e>>>0>=11){b=e+16&-16;f=yk(b);o[d+8>>2]=b|-2147483648;o[d>>2]=f;o[d+4>>2]=e;break e}m[d+11|0]=e;f=d;if(!e){break d}}ll(f,c,e)}m[e+f|0]=0;c=o[a+4>>2];b=-1;f:{if(!c){break f}c=ej(c,d+16|0,d);b=-1;if(!c){break f}b=uj(a,o[c+24>>2])}a=b;if(m[d+11|0]<=-1){jl(o[d>>2])}if(m[d+27|0]<=-1){jl(o[d+16>>2])}R=d+32|0;return a}Ak();D()}Ak();D()}function bb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=R-16|0;R=f;a:{j=o[a+80>>2];g=m[b+24|0];h=g<<2;b:{if((u(j,h)|0)!=(c|0)){break b}if(!(!p[b+84|0]|o[b+28>>2]!=6)){ll(d,o[o[b>>2]>>2]+o[b+48>>2]|0,c);e=1;break b}a=0;o[f+8>>2]=0;o[f>>2]=0;o[f+4>>2]=0;if(g){if((g|0)<=-1){break a}a=yk(h);o[f>>2]=a;c=(g<<2)+a|0;o[f+8>>2]=c;ml(a,0,h);o[f+4>>2]=c}c:{if(!j){e=1;break c}h=0;k=(g|0)<1;while(1){c=i;e=b;if(!p[b+84|0]){c=o[o[b+68>>2]+(i<<2)>>2]}if(!Wa(e,c,m[b+24|0],a)){e=0;break c}e=0;c=h;if(!k){while(1){o[(c<<2)+d>>2]=o[(e<<2)+a>>2];c=c+1|0;e=e+1|0;if((g|0)!=(e|0)){continue}break}h=h+g|0}e=1;i=i+1|0;if((j|0)!=(i|0)){continue}break}}if(!a){break b}o[f+4>>2]=a;jl(a)}R=f+16|0;return e}Nk();D()}function ab(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=R-16|0;R=f;a:{j=o[a+80>>2];g=m[b+24|0];h=g<<1;b:{if((u(j,h)|0)!=(c|0)){break b}if(!(!p[b+84|0]|o[b+28>>2]!=4)){ll(d,o[o[b>>2]>>2]+o[b+48>>2]|0,c);e=1;break b}a=0;o[f+8>>2]=0;o[f>>2]=0;o[f+4>>2]=0;if(g){if((g|0)<=-1){break a}a=yk(h);o[f>>2]=a;c=(g<<1)+a|0;o[f+8>>2]=c;ml(a,0,h);o[f+4>>2]=c}c:{if(!j){e=1;break c}h=0;k=(g|0)<1;while(1){c=i;e=b;if(!p[b+84|0]){c=o[o[b+68>>2]+(i<<2)>>2]}if(!Sa(e,c,m[b+24|0],a)){e=0;break c}e=0;c=h;if(!k){while(1){n[(c<<1)+d>>1]=q[(e<<1)+a>>1];c=c+1|0;e=e+1|0;if((g|0)!=(e|0)){continue}break}h=h+g|0}e=1;i=i+1|0;if((j|0)!=(i|0)){continue}break}}if(!a){break b}o[f+4>>2]=a;jl(a)}R=f+16|0;return e}Nk();D()}function _a(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=R-16|0;R=f;a:{j=o[a+80>>2];g=m[b+24|0];h=g<<2;b:{if((u(j,h)|0)!=(c|0)){break b}if(!(!p[b+84|0]|o[b+28>>2]!=5)){ll(d,o[o[b>>2]>>2]+o[b+48>>2]|0,c);e=1;break b}a=0;o[f+8>>2]=0;o[f>>2]=0;o[f+4>>2]=0;if(g){if((g|0)<=-1){break a}a=yk(h);o[f>>2]=a;c=(g<<2)+a|0;o[f+8>>2]=c;ml(a,0,h);o[f+4>>2]=c}c:{if(!j){e=1;break c}h=0;k=(g|0)<1;while(1){c=i;e=b;if(!p[b+84|0]){c=o[o[b+68>>2]+(i<<2)>>2]}if(!Ua(e,c,m[b+24|0],a)){e=0;break c}e=0;c=h;if(!k){while(1){o[(c<<2)+d>>2]=o[(e<<2)+a>>2];c=c+1|0;e=e+1|0;if((g|0)!=(e|0)){continue}break}h=h+g|0}e=1;i=i+1|0;if((j|0)!=(i|0)){continue}break}}if(!a){break b}o[f+4>>2]=a;jl(a)}R=f+16|0;return e}Nk();D()}function Za(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=R-16|0;R=f;a:{j=o[a+80>>2];g=m[b+24|0];h=g<<1;b:{if((u(j,h)|0)!=(c|0)){break b}if(!(!p[b+84|0]|o[b+28>>2]!=3)){ll(d,o[o[b>>2]>>2]+o[b+48>>2]|0,c);e=1;break b}a=0;o[f+8>>2]=0;o[f>>2]=0;o[f+4>>2]=0;if(g){if((g|0)<=-1){break a}a=yk(h);o[f>>2]=a;c=(g<<1)+a|0;o[f+8>>2]=c;ml(a,0,h);o[f+4>>2]=c}c:{if(!j){e=1;break c}h=0;k=(g|0)<1;while(1){c=i;e=b;if(!p[b+84|0]){c=o[o[b+68>>2]+(i<<2)>>2]}if(!Qa(e,c,m[b+24|0],a)){e=0;break c}e=0;c=h;if(!k){while(1){n[(c<<1)+d>>1]=q[(e<<1)+a>>1];c=c+1|0;e=e+1|0;if((g|0)!=(e|0)){continue}break}h=h+g|0}e=1;i=i+1|0;if((j|0)!=(i|0)){continue}break}}if(!a){break b}o[f+4>>2]=a;jl(a)}R=f+16|0;return e}Nk();D()}function Zi(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,q=0;d=R-16|0;R=d;h=sj(b);a:{if(!h){o[a>>2]=0;break a}e=o[b+100>>2];i=o[b+96>>2];o[d+8>>2]=0;o[d>>2]=0;o[d+4>>2]=0;b=e-i|0;c=(b|0)/12|0;b:{c:{if(b){if(c>>>0>=357913942){break c}g=yk(b);o[d>>2]=g;o[d+8>>2]=u(c,12)+g;n=d,q=ml(g,0,b)+b|0,o[n+4>>2]=q}if((e|0)==(i|0)){break b}l=c>>>0>1?c:1;b=0;m=p[h+84|0];while(1){j=u(b,12);c=j+i|0;e=o[c>>2];d:{if(m){k=c+8|0;c=c+4|0;break d}f=o[h+68>>2];k=f+(o[c+8>>2]<<2)|0;e=o[f+(e<<2)>>2];c=f+(o[c+4>>2]<<2)|0}f=o[c>>2];c=g+j|0;o[c+8>>2]=o[k>>2];o[c+4>>2]=f;o[c>>2]=e;b=b+1|0;if((l|0)!=(b|0)){continue}break}break b}Nk();D()}Di(a,d);a=o[d>>2];if(!a){break a}o[d+4>>2]=a;jl(a)}R=d+16|0}function Xd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=o[a+8>>2];c=o[a+4>>2];if(d-c>>2>>>0>=b>>>0){e=a;a=b<<2;j=e,k=ml(c,0,a)+a|0,o[j+4>>2]=k;return}e=o[a>>2];g=c-e>>2;f=g+b|0;a:{if(f>>>0<1073741824){g=g<<2;d=d-e|0;i=d>>1;f=d>>2>>>0<536870911?i>>>0>>0?f:i:1073741823;if(f){if(f>>>0>=1073741824){break a}h=yk(f<<2)}d=h+g|0;b=b<<2;b=ml(d,0,b)+b|0;f=(f<<2)+h|0;if((c|0)!=(e|0)){while(1){c=c+ -4|0;h=o[c>>2];o[c>>2]=0;d=d+ -4|0;o[d>>2]=h;if((c|0)!=(e|0)){continue}break}e=o[a>>2];c=o[a+4>>2]}o[a+8>>2]=f;o[a+4>>2]=b;o[a>>2]=d;if((c|0)!=(e|0)){while(1){c=c+ -4|0;a=o[c>>2];o[c>>2]=0;if(a){l[o[o[a>>2]+4>>2]](a)}if((c|0)!=(e|0)){continue}break}}if(e){jl(e)}return}Nk();D()}db(1832);D()}function Sg(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=o[a+8>>2];c=o[a+4>>2];if(d-c>>2>>>0>=b>>>0){e=a;a=b<<2;j=e,k=ml(c,0,a)+a|0,o[j+4>>2]=k;return}e=o[a>>2];g=c-e>>2;f=g+b|0;a:{if(f>>>0<1073741824){g=g<<2;d=d-e|0;i=d>>1;f=d>>2>>>0<536870911?i>>>0>>0?f:i:1073741823;if(f){if(f>>>0>=1073741824){break a}h=yk(f<<2)}d=h+g|0;b=b<<2;b=ml(d,0,b)+b|0;f=(f<<2)+h|0;if((c|0)!=(e|0)){while(1){c=c+ -4|0;h=o[c>>2];o[c>>2]=0;d=d+ -4|0;o[d>>2]=h;if((c|0)!=(e|0)){continue}break}e=o[a>>2];c=o[a+4>>2]}o[a+8>>2]=f;o[a+4>>2]=b;o[a>>2]=d;if((c|0)!=(e|0)){while(1){c=c+ -4|0;a=o[c>>2];o[c>>2]=0;if(a){l[o[o[a>>2]+4>>2]](a)}if((c|0)!=(e|0)){continue}break}}if(e){jl(e)}return}Nk();D()}db(8832);D()}function Ni(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=o[a+8>>2];f=o[a>>2];a:{if(d-f>>2>>>0>=b>>>0){h=o[a+4>>2];g=h-f>>2;e=g>>>0>>0?g:b;if(e){d=f;while(1){o[d>>2]=o[c>>2];d=d+4|0;e=e+ -1|0;if(e){continue}break}}a=a+4|0;if(g>>>0>>0){d=h;b=b-g|0;e=b;while(1){o[d>>2]=o[c>>2];d=d+4|0;e=e+ -1|0;if(e){continue}break}o[a>>2]=(b<<2)+h;return}break a}if(f){o[a+4>>2]=f;jl(f);o[a+8>>2]=0;o[a>>2]=0;o[a+4>>2]=0;d=0}b:{if(b>>>0>=1073741824){break b}e=d>>1;d=d>>2>>>0<536870911?e>>>0>>0?b:e:1073741823;if(d>>>0>=1073741824){break b}d=d<<2;f=yk(d);o[a>>2]=f;o[a+4>>2]=f;o[a+8>>2]=d+f;a=a+4|0;d=f;e=b;while(1){o[d>>2]=o[c>>2];d=d+4|0;e=e+ -1|0;if(e){continue}break}break a}Nk();D()}o[a>>2]=f+(b<<2)}function je(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0;a:{b:{if((b|0)!=-2){g=o[o[o[d+4>>2]+8>>2]+(c<<2)>>2];if((l[o[o[d>>2]+8>>2]](d)|0)==1){f=b;b=q[d+36>>1];re(a,d,f,c,e,(b<<24|b<<8&16711680)>>>16|0);if(o[a>>2]){break b}o[a>>2]=0}f=yk(44);o[f+4>>2]=g;o[f>>2]=2732;b=o[e+8>>2];c=o[e+12>>2];d=o[e+16>>2];g=o[e+20>>2];h=o[e>>2];i=o[e+4>>2];o[f+40>>2]=0;o[f+32>>2]=0;o[f+36>>2]=0;o[f+24>>2]=d;o[f+28>>2]=g;o[f+16>>2]=b;o[f+20>>2]=c;o[f+8>>2]=h;o[f+12>>2]=i;d=o[e+24>>2];b=o[e+28>>2]-d|0;c:{if(!b){break c}e=b>>2;if(e>>>0>=1073741824){break a}c=yk(b);o[f+32>>2]=c;o[f+36>>2]=c;o[f+40>>2]=c+(e<<2);if((b|0)<1){break c}j=f,k=ll(c,d,b)+b|0,o[j+36>>2]=k}o[f>>2]=5424}o[a>>2]=f}return}Nk();D()}function _h(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=R-32|0;R=d;o[d+24>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;a:{f=u(b,3);if(f){if(f>>>0>=1073741824){break a}c=u(b,12);e=yk(c);o[d+16>>2]=e;g=(f<<2)+e|0;o[d+24>>2]=g;ml(e,0,c);o[d+20>>2]=g}b:{if(!dg(f,1,o[a+32>>2],e)){break b}if(!b){h=1;break b}f=0;c=0;while(1){g=d+8|0;o[g>>2]=0;o[d>>2]=0;o[d+4>>2]=0;i=c;e=(f<<2)+e|0;c=o[e>>2];j=c>>>1|0;c=i+(c&1?0-j|0:j)|0;o[d>>2]=c;i=c;c=o[e+4>>2];j=c>>>1|0;c=i+(c&1?0-j|0:j)|0;o[d+4>>2]=c;i=c;e=o[e+8>>2];c=e>>>1|0;c=i+(e&1?0-c|0:c)|0;o[g>>2]=c;$h(o[a+44>>2]+96|0,d);h=h+1|0;if((h|0)!=(b|0)){f=f+3|0;e=o[d+16>>2];continue}break}h=1;e=o[d+16>>2]}if(e){o[d+20>>2]=e;jl(e)}R=d+32|0;return h}Nk();D()}function Jj(a,b,c){a:{b:{if(b>>>0>20){break b}b=b+ -9|0;if(b>>>0>9){break b}c:{switch(b-1|0){default:b=o[c>>2];o[c>>2]=b+4;o[a>>2]=o[b>>2];return;case 0:b=o[c>>2];o[c>>2]=b+4;b=o[b>>2];o[a>>2]=b;o[a+4>>2]=b>>31;return;case 1:b=o[c>>2];o[c>>2]=b+4;o[a>>2]=o[b>>2];o[a+4>>2]=0;return;case 3:b=o[c>>2];o[c>>2]=b+4;b=n[b>>1];o[a>>2]=b;o[a+4>>2]=b>>31;return;case 4:b=o[c>>2];o[c>>2]=b+4;o[a>>2]=q[b>>1];o[a+4>>2]=0;return;case 5:b=o[c>>2];o[c>>2]=b+4;b=m[b|0];o[a>>2]=b;o[a+4>>2]=b>>31;return;case 6:b=o[c>>2];o[c>>2]=b+4;o[a>>2]=p[b|0];o[a+4>>2]=0;return;case 2:case 7:break a;case 8:break c}}l[275](a,c)}return}b=o[c>>2]+7&-8;o[c>>2]=b+8;c=o[b+4>>2];o[a>>2]=o[b>>2];o[a+4>>2]=c}function Of(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,n=0,p=0,q=0,r=0,t=v(0);g=R-16|0;R=g;d=o[a+24>>2];f=m[o[a+8>>2]+24|0];h=f<<2;i=yk((f&1073741823)!=(f|0)?-1:h);j=g+8|0;o[j>>2]=1065353216;d=-1<>2]=s[a+32>>2]/v(d|0);c=1}b:{if(!c){break b}c=o[a+16>>2];d=0;c:{if(!o[c+80>>2]){break c}d=o[o[c>>2]>>2]+o[c+48>>2]|0}if(!b){e=1;break b}q=(f|0)<1;while(1){if(!q){r=o[a+28>>2];t=s[j>>2];e=0;c=k;while(1){l=e<<2;s[l+i>>2]=v(t*v(o[d+(c<<2)>>2]))+s[r+l>>2];c=c+1|0;e=e+1|0;if((f|0)!=(e|0)){continue}break}k=f+k|0}ll(o[o[o[a+8>>2]+64>>2]>>2]+n|0,i,h);n=h+n|0;e=1;p=p+1|0;if((p|0)!=(b|0)){continue}break}}jl(i);R=g+16|0;return e|0}function xj(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=o[a+8>>2];c=o[a+4>>2];if(d-c>>2>>>0>=b>>>0){e=a;a=b<<2;j=e,k=ml(c,0,a)+a|0,o[j+4>>2]=k;return}e=o[a>>2];g=c-e>>2;f=g+b|0;a:{if(f>>>0<1073741824){g=g<<2;d=d-e|0;i=d>>1;f=d>>2>>>0<536870911?i>>>0>>0?f:i:1073741823;if(f){if(f>>>0>=1073741824){break a}h=yk(f<<2)}d=h+g|0;b=b<<2;b=ml(d,0,b)+b|0;f=(f<<2)+h|0;if((c|0)!=(e|0)){while(1){c=c+ -4|0;h=o[c>>2];o[c>>2]=0;d=d+ -4|0;o[d>>2]=h;if((c|0)!=(e|0)){continue}break}e=o[a>>2];c=o[a+4>>2]}o[a+8>>2]=f;o[a+4>>2]=b;o[a>>2]=d;if((c|0)!=(e|0)){while(1){c=c+ -4|0;a=o[c>>2];o[c>>2]=0;if(a){Kb(a)}if((c|0)!=(e|0)){continue}break}}if(e){jl(e)}return}Nk();D()}db(11048);D()}function gj(a,b){var c=0,d=0,e=0,f=0,g=0;e=o[a>>2];f=o[a+4>>2]-e>>2;c=f+1|0;a:{b:{c:{if(c>>>0<1073741824){e=o[a+8>>2]-e|0;g=e>>1;c=e>>2>>>0<536870911?g>>>0>>0?c:g:1073741823;if(c){if(c>>>0>=1073741824){break c}d=yk(c<<2)}e=o[b>>2];o[b>>2]=0;b=(f<<2)+d|0;o[b>>2]=e;e=(c<<2)+d|0;f=b+4|0;c=o[a+4>>2];d=o[a>>2];if((c|0)==(d|0)){break b}while(1){c=c+ -4|0;g=o[c>>2];o[c>>2]=0;b=b+ -4|0;o[b>>2]=g;if((c|0)!=(d|0)){continue}break}d=o[a+4>>2];c=o[a>>2];break a}Nk();D()}db(10924);D()}c=d}o[a+8>>2]=e;o[a+4>>2]=f;o[a>>2]=b;if((c|0)!=(d|0)){while(1){d=d+ -4|0;a=o[d>>2];o[d>>2]=0;if(a){Kc(a+12|0,o[a+16>>2]);Lc(a,o[a+4>>2]);jl(a)}if((c|0)!=(d|0)){continue}break}}if(c){jl(c)}}function uf(a,b,c){var d=0,e=0,f=v(0),g=v(0),h=v(0),i=0,j=0;f=v(a+b);a:{b:{h=v(a-b);if(h<=v(.5)^1|h>=v(-.5)^1|f>=v(.5)^1){break b}e=1;if(!(f<=v(1.5))){break b}g=b;break a}c:{if(!!(f<=v(.5))){g=v(v(.5)-a);a=v(v(.5)-b);break c}if(!!(f>=v(1.5))){g=v(v(1.5)-a);a=v(v(1.5)-b);break c}if(!!(h<=v(-.5))){g=v(a+v(.5));a=v(b+v(-.5));break c}g=v(a+v(-.5));a=v(b+v(.5))}h=v(a-g);f=v(g+a);e=-1}d=+g;b=v(d+d+ -1);d=+a;a=v(d+d+ -1);j=e;e=+h;e=e+e;d=1-e;e=e+1;e=d>2]=0;f=v(0);a=v(0);break d}h=v(v(1)/v(C(f)));s[c>>2]=h*g;f=v(h*b);a=v(h*a)}s[c+8>>2]=f;s[c+4>>2]=a}function yd(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{d=c-b|0;g=d>>2;f=o[a+8>>2];e=o[a>>2];b:{if(g>>>0<=f-e>>2>>>0){h=o[a+4>>2];d=h-e|0;f=d>>2;d=g>>>0>f>>>0?b+d|0:c;if((d|0)!=(b|0)){while(1){o[e>>2]=o[b>>2];e=e+4|0;b=b+4|0;if((d|0)!=(b|0)){continue}break}}if(g>>>0>f>>>0){b=c-d|0;if((b|0)<1){break b}ll(h,d,b);o[a+4>>2]=b+o[a+4>>2];return}o[a+4>>2]=e;return}if(e){o[a+4>>2]=e;jl(e);o[a+8>>2]=0;o[a>>2]=0;o[a+4>>2]=0;f=0}if(g>>>0>=1073741824){break a}c=f>>1;c=f>>2>>>0<536870911?c>>>0>>0?g:c:1073741823;if(c>>>0>=1073741824){break a}e=c<<2;c=yk(e);o[a>>2]=c;o[a+4>>2]=c;o[a+8>>2]=c+e;if((d|0)<1){break b}i=a,j=ll(c,b,d)+d|0,o[i+4>>2]=j}return}Nk();D()}function eb(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=R-16|0;R=e;o[a+4>>2]=0;a:{b:{if(!b){break b}f=o[a+8>>2];d=f<<5;c:{if(d>>>0>=b>>>0){o[a+4>>2]=b;break c}o[e+8>>2]=0;o[e>>2]=0;o[e+4>>2]=0;if((b|0)<=-1){break a}h=e;if(d>>>0<=1073741822){g=b+31&-32;d=f<<6;g=d>>>0>>0?g:d}else{g=2147483647}fb(h,g);d=o[a>>2];o[a>>2]=o[e>>2];o[e>>2]=d;f=o[a+4>>2];o[a+4>>2]=b;o[e+4>>2]=f;f=o[a+8>>2];o[a+8>>2]=o[e+8>>2];o[e+8>>2]=f;if(!d){break c}jl(d)}d=b>>>5|0;f=d<<2;a=o[a>>2];if(p[c|0]){a=ml(a,255,f);b=b&31;if(!b){break b}a=a+(d<<2)|0;o[a>>2]=o[a>>2]|-1>>>32-b;break b}a=ml(a,0,f);b=b&31;if(!b){break b}a=a+(d<<2)|0;o[a>>2]=o[a>>2]&(-1>>>32-b^-1)}R=e+16|0;return}Nk();D()}function ai(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=R-16|0;R=f;g=yk(64);c=yk(12);o[c+8>>2]=o[o[a+4>>2]+80>>2];o[c>>2]=10052;o[c+4>>2]=0;o[f+8>>2]=c;Vd(g,f+8|0);a:{if((b|0)>=0){h=a+8|0;c=o[a+12>>2];i=o[a+8>>2];d=c-i>>2;b:{if((d|0)>(b|0)){break b}e=b+1|0;if(d>>>0<=b>>>0){Sg(h,e-d|0);break b}if(e>>>0>=d>>>0){break b}e=i+(e<<2)|0;if((e|0)!=(c|0)){while(1){c=c+ -4|0;d=o[c>>2];o[c>>2]=0;if(d){l[o[o[d>>2]+4>>2]](d)}if((c|0)!=(e|0)){continue}break}}o[a+12>>2]=e}b=o[h>>2]+(b<<2)|0;a=o[b>>2];o[b>>2]=g;d=1;if(!a){break a}l[o[o[a>>2]+4>>2]](a);break a}l[o[o[g>>2]+4>>2]](g)}a=o[f+8>>2];o[f+8>>2]=0;if(a){l[o[o[a>>2]+4>>2]](a)}R=f+16|0;return d|0}function Lg(a){o[a>>2]=8228;ml(a+4|0,0,80);o[a+96>>2]=0;o[a+100>>2]=0;o[a+92>>2]=-1;o[a+84>>2]=-1;o[a+88>>2]=-1;o[a+104>>2]=0;o[a+108>>2]=0;o[a+112>>2]=0;o[a+116>>2]=0;o[a+120>>2]=0;o[a+124>>2]=0;o[a+128>>2]=0;o[a+132>>2]=0;o[a+136>>2]=0;o[a+140>>2]=0;o[a+144>>2]=0;o[a+148>>2]=0;o[a+156>>2]=0;o[a+160>>2]=0;o[a+152>>2]=1065353216;o[a+164>>2]=0;o[a+168>>2]=0;o[a+172>>2]=0;o[a+176>>2]=0;o[a+180>>2]=0;o[a+184>>2]=0;o[a+188>>2]=0;o[a+192>>2]=0;o[a+196>>2]=0;o[a+200>>2]=0;o[a+204>>2]=0;o[a+208>>2]=0;o[a+212>>2]=-1;o[a+216>>2]=0;o[a+220>>2]=0;o[a+224>>2]=0;si(a+232|0);si(a+272|0);Rf(a+312|0);si(a+328|0);o[a+376>>2]=0;o[a+368>>2]=0;o[a+372>>2]=0}function Ei(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;f=R-16|0;R=f;o[a+80>>2]=0;o[a+84>>2]=0;c=a+76|0;d=o[c>>2];o[c>>2]=0;if(d){jl(d)}o[a+68>>2]=0;o[a+72>>2]=0;c=a- -64|0;d=o[c>>2];o[c>>2]=0;if(d){jl(d)}c=o[b+4>>2];d=o[b>>2];e=u((c-d|0)/12|0,3);h=o[a>>2];g=o[a+4>>2]-h>>2;a:{if(e>>>0>g>>>0){Fi(a,e-g|0);d=o[b>>2];c=o[b+4>>2];break a}if(e>>>0>=g>>>0){break a}o[a+4>>2]=h+(e<<2)}if((c|0)!=(d|0)){b=(c-d|0)/12|0;g=b>>>0>1?b:1;h=o[a>>2];b=0;while(1){e=u(b,12);c=e+h|0;e=d+e|0;o[c>>2]=o[e>>2];o[c+4>>2]=o[e+4>>2];o[c+8>>2]=o[e+8>>2];b=b+1|0;if((g|0)!=(b|0)){continue}break}}o[f+12>>2]=-1;b=0;if(Gi(a,f+12|0)){Hi(a);Ii(a,o[f+12>>2]);b=1}R=f+16|0;return b}function Eh(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=(c>>>0)/3|0;Fh(o[a+12>>2],o[(o[o[a+8>>2]+96>>2]+u(d,12)|0)+(c-u(d,3)<<2)>>2]);a:{b:{g=o[a+4>>2];d=o[g+4>>2];f=o[g+8>>2];c:{if((d|0)!=(f|0)){o[d>>2]=c;o[g+4>>2]=d+4;break c}h=o[g>>2];i=d-h|0;d=i>>2;e=d+1|0;if(e>>>0>=1073741824){break b}j=d<<2;f=f-h|0;d=f>>1;e=f>>2>>>0<536870911?d>>>0>>0?e:d:1073741823;d=0;d:{if(!e){break d}if(e>>>0>=1073741824){break a}d=yk(e<<2)}f=j+d|0;o[f>>2]=c;c=d+(e<<2)|0;e=f+4|0;if((i|0)>=1){ll(d,h,i)}o[g+8>>2]=c;o[g+4>>2]=e;o[g>>2]=d;if(!h){break c}jl(h)}a=o[a+4>>2];o[o[a+12>>2]+(b<<2)>>2]=o[a+24>>2];o[a+24>>2]=o[a+24>>2]+1;return}Nk();D()}db(8832);D()}function Jf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=R-32|0;R=f;h=(e&1073741823)!=(e|0)?-1:e<<2;h=ml(yk(h),0,h);g=o[b>>2];i=o[b+4>>2];k=o[h+4>>2];o[f+16>>2]=o[h>>2];o[f+20>>2]=k;o[f+8>>2]=g;o[f+12>>2]=i;i=a+8|0;Ef(f+24|0,i,f+16|0,f+8|0);o[c>>2]=o[f+24>>2];o[c+4>>2]=o[f+28>>2];if((e|0)<(d|0)){k=0-e<<2;a=e;while(1){g=a<<2;j=g+b|0;m=o[j>>2];j=o[j+4>>2];g=c+g|0;l=g+k|0;n=o[l+4>>2];o[f+16>>2]=o[l>>2];o[f+20>>2]=n;o[f+8>>2]=m;o[f+12>>2]=j;Ef(f+24|0,i,f+16|0,f+8|0);o[g>>2]=o[f+24>>2];o[g+4>>2]=o[f+28>>2];a=a+e|0;if((a|0)<(d|0)){continue}break}}jl(h);R=f+32|0;return 1}function fg(a,b,c){var d=0,e=0,f=0,g=0;a:{b:{e=o[b+16>>2];f=o[b+12>>2];d=o[b+20>>2];c:{if((f|0)<(d|0)?1:(f|0)<=(d|0)?r[b+8>>2]>e>>>0?0:1:0){break c}f=p[e+o[b>>2]|0];e=e+1|0;if(e>>>0<1){d=d+1|0}o[b+16>>2]=e;o[b+20>>2]=d;d=f+ -1|0;if(d>>>0>17){break c}d:{e:{f:{g:{h:{i:{j:{switch(d-1|0){case 12:case 13:case 14:case 15:break a;case 8:break h;case 7:break i;case 3:break j;case 16:break d;case 11:break e;case 10:break f;case 9:break g;default:break b}}return jg(a,b,c)}return kg(a,b,c)}return lg(a,b,c)}return mg(a,b,c)}return ng(a,b,c)}return og(a,b,c)}g=pg(a,b,c)}return g}return ig(a,b,c)}return pg(a,b,c)}function Dg(a){a=a|0;var b=0,c=0,d=0,e=0;b=o[a+32>>2];d=o[b+16>>2];e=o[b+12>>2];c=o[b+20>>2];if((e|0)>(c|0)?1:(e|0)>=(c|0)?r[b+8>>2]<=d>>>0?0:1:0){e=p[d+o[b>>2]|0];d=d+1|0;if(d>>>0<1){c=c+1|0}o[b+16>>2]=d;o[b+20>>2]=c;b=o[a+48>>2];o[a+48>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}a:{b:{if(e>>>0>2){break b}c:{switch(e-1|0){default:c=yk(384);Lg(c);b=o[a+48>>2];o[a+48>>2]=c;if(!b){break a}l[o[o[b>>2]+4>>2]](b);break b;case 0:break b;case 1:break c}}c=yk(440);ih(c);b=o[a+48>>2];o[a+48>>2]=c;if(!b){break a}l[o[o[b>>2]+4>>2]](b)}c=o[a+48>>2];if(c){break a}return 0}a=l[o[o[c>>2]+8>>2]](c,a)|0}else{a=0}return a|0}function kd(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{f=c-b|0;g=f>>2;d=o[a+8>>2];e=o[a>>2];b:{if(g>>>0<=d-e>>2>>>0){d=o[a+4>>2]-e|0;f=d>>2;d=g>>>0>f>>>0?b+d|0:c;h=d-b|0;if(h){nl(e,b,h)}if(g>>>0>f>>>0){b=c-d|0;if((b|0)<1){break b}ll(o[a+4>>2],d,b);o[a+4>>2]=b+o[a+4>>2];return}o[a+4>>2]=e+(h>>2<<2);return}if(e){o[a+4>>2]=e;jl(e);o[a+8>>2]=0;o[a>>2]=0;o[a+4>>2]=0;d=0}if(g>>>0>=1073741824){break a}c=d>>1;c=d>>2>>>0<536870911?c>>>0>>0?g:c:1073741823;if(c>>>0>=1073741824){break a}e=c<<2;c=yk(e);o[a>>2]=c;o[a+4>>2]=c;o[a+8>>2]=c+e;if((f|0)<1){break b}i=a,j=ll(c,b,f)+f|0,o[i+4>>2]=j}return}Nk();D()}function Cf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=o[b+12>>2];h=c;e=c;c=o[b+20>>2];f=c;g=o[b+16>>2];d=g+4|0;if(d>>>0<4){c=c+1|0}i=o[b+8>>2];j=d;d=c;a:{if((e|0)<(c|0)?1:(e|0)<=(c|0)?i>>>0>=j>>>0?0:1:0){break a}c=g+o[b>>2]|0;e=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);o[b+16>>2]=j;o[b+20>>2]=d;c=f;d=g+8|0;if(d>>>0<8){c=c+1|0}f=d;d=c;if((h|0)<(c|0)?1:(h|0)<=(c|0)?i>>>0>=f>>>0?0:1:0){break a}o[b+16>>2]=f;o[b+20>>2]=d;if(!(e&1)){break a}c=x(e)^31;if(c+ -1>>>0>28){break a}o[a+8>>2]=c+1;d=-2<>2]=c;o[a+12>>2]=d^-1;o[a+20>>2]=(c|0)/2;k=Sf(a+88|0,b)}return k|0}function Ha(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=R-16|0;R=e;i=o[a+80>>2];f=m[b+24|0];a=o[259];o[e+8>>2]=o[258];o[e+12>>2]=a;a=o[257];o[e>>2]=o[256];o[e+4>>2]=a;a=u(f,i);g=o[c>>2];d=o[c+4>>2]-g>>2;a:{if(a>>>0>d>>>0){Ia(c,a-d|0);break a}if(a>>>0>=d>>>0){break a}o[c+4>>2]=g+(a<<2)}b:{if(!i){a=1;break b}g=(f|0)<1;while(1){a=h;d=b;if(!p[d+84|0]){a=o[o[b+68>>2]+(h<<2)>>2]}if(!Ga(d,a,m[b+24|0],e)){a=0;break b}if(!g){k=o[c>>2];a=0;d=j;while(1){o[k+(d<<2)>>2]=o[(a<<2)+e>>2];d=d+1|0;a=a+1|0;if((f|0)!=(a|0)){continue}break}j=f+j|0}a=1;h=h+1|0;if((i|0)!=(h|0)){continue}break}}R=e+16|0;return a}function $h(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=o[a+4>>2];f=o[a+8>>2];if((e|0)!=(f|0)){d=o[b+4>>2];o[e>>2]=o[b>>2];o[e+4>>2]=d;o[e+8>>2]=o[b+8>>2];o[a+4>>2]=o[a+4>>2]+12;return}c=e;e=o[a>>2];g=c-e|0;c=(g|0)/12|0;d=c+1|0;a:{if(d>>>0<357913942){h=u(c,12);f=(f-e|0)/12|0;c=f<<1;f=f>>>0<178956970?c>>>0>>0?d:c:357913941;c=0;b:{if(!f){break b}if(f>>>0>=357913942){break a}c=yk(u(f,12))}d=h+c|0;h=o[b+4>>2];o[d>>2]=o[b>>2];o[d+4>>2]=h;o[d+8>>2]=o[b+8>>2];b=d+u((g|0)/-12|0,12)|0;c=c+u(f,12)|0;d=d+12|0;if((g|0)>=1){ll(b,e,g)}o[a+8>>2]=c;o[a+4>>2]=d;o[a>>2]=b;if(e){jl(e)}return}Nk();D()}db(9976);D()}function hd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;d=o[b+88>>2];if(!(!d|o[d>>2]!=1)){f=o[d+8>>2];c=f;o[a+4>>2]=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);g=a+8|0;h=o[a+8>>2];e=o[a+12>>2]-h>>2;c=m[b+24|0];a:{if(e>>>0>>0){Ia(g,c-e|0);f=o[d+8>>2];c=p[b+24|0];break a}if(e>>>0<=c>>>0){break a}o[a+12>>2]=h+(c<<2)}e=1;b=f;d=p[b+4|0]|p[b+5|0]<<8|(p[b+6|0]<<16|p[b+7|0]<<24);if(c<<24>>24>=1){b=c&255;h=b>>>0>1?b:1;g=o[g>>2];b=0;c=4;while(1){o[g+(b<<2)>>2]=d;c=c+4|0;d=f+c|0;d=p[d|0]|p[d+1|0]<<8|(p[d+2|0]<<16|p[d+3|0]<<24);b=b+1|0;if((h|0)!=(b|0)){continue}break}}o[a+20>>2]=d}return e|0}function Ff(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=o[b+12>>2];h=c;e=c;c=o[b+20>>2];f=c;g=o[b+16>>2];d=g+4|0;if(d>>>0<4){c=c+1|0}i=o[b+8>>2];j=d;d=c;a:{if((e|0)<(c|0)?1:(e|0)<=(c|0)?i>>>0>=j>>>0?0:1:0){break a}c=g+o[b>>2]|0;e=p[c|0]|p[c+1|0]<<8|(p[c+2|0]<<16|p[c+3|0]<<24);o[b+16>>2]=j;o[b+20>>2]=d;c=f;d=g+8|0;if(d>>>0<8){c=c+1|0}f=d;d=c;if((h|0)<(c|0)?1:(h|0)<=(c|0)?i>>>0>=f>>>0?0:1:0){break a}o[b+16>>2]=f;o[b+20>>2]=d;if(!(e&1)){break a}b=x(e)^31;if(b+ -1>>>0>28){break a}k=1;o[a+8>>2]=b+1;c=-2<>2]=b;o[a+12>>2]=c^-1;o[a+20>>2]=(b|0)/2}return k|0}function pd(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=o[a+8>>2];f=o[a+4>>2];if(e-f>>2>>>0>=b>>>0){e=f;d=b;while(1){o[e>>2]=o[c>>2];e=e+4|0;d=d+ -1|0;if(d){continue}break}o[a+4>>2]=f+(b<<2);return}g=o[a>>2];j=f-g|0;h=j>>2;d=h+b|0;a:{if(d>>>0<1073741824){e=e-g|0;i=e>>1;d=e>>2>>>0<536870911?i>>>0>>0?d:i:1073741823;f=0;b:{if(!d){break b}if(d>>>0>=1073741824){break a}f=yk(d<<2)}i=f+(d<<2)|0;h=f+(h<<2)|0;e=h;d=b;while(1){o[e>>2]=o[c>>2];e=e+4|0;d=d+ -1|0;if(d){continue}break}b=h+(b<<2)|0;if((j|0)>=1){ll(f,g,j)}o[a+8>>2]=i;o[a+4>>2]=b;o[a>>2]=f;if(g){jl(g)}return}Nk();D()}db(1308);D()}function Dd(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=o[a+8>>2];f=o[a+4>>2];if(e-f>>2>>>0>=b>>>0){e=f;d=b;while(1){o[e>>2]=o[c>>2];e=e+4|0;d=d+ -1|0;if(d){continue}break}o[a+4>>2]=f+(b<<2);return}g=o[a>>2];j=f-g|0;h=j>>2;d=h+b|0;a:{if(d>>>0<1073741824){e=e-g|0;i=e>>1;d=e>>2>>>0<536870911?i>>>0>>0?d:i:1073741823;f=0;b:{if(!d){break b}if(d>>>0>=1073741824){break a}f=yk(d<<2)}i=f+(d<<2)|0;h=f+(h<<2)|0;e=h;d=b;while(1){o[e>>2]=o[c>>2];e=e+4|0;d=d+ -1|0;if(d){continue}break}b=h+(b<<2)|0;if((j|0)>=1){ll(f,g,j)}o[a+8>>2]=i;o[a+4>>2]=b;o[a>>2]=f;if(g){jl(g)}return}Nk();D()}db(1520);D()}function Ji(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=o[a+8>>2];e=o[a+4>>2];if(d-e>>2>>>0>=b>>>0){d=e;c=b;while(1){o[d>>2]=o[2631];d=d+4|0;c=c+ -1|0;if(c){continue}break}o[a+4>>2]=e+(b<<2);return}f=o[a>>2];i=e-f|0;g=i>>2;c=g+b|0;a:{if(c>>>0<1073741824){d=d-f|0;h=d>>1;c=d>>2>>>0<536870911?h>>>0>>0?c:h:1073741823;e=0;b:{if(!c){break b}if(c>>>0>=1073741824){break a}e=yk(c<<2)}h=e+(c<<2)|0;g=e+(g<<2)|0;d=g;c=b;while(1){o[d>>2]=o[2631];d=d+4|0;c=c+ -1|0;if(c){continue}break}b=g+(b<<2)|0;if((i|0)>=1){ll(e,f,i)}o[a+8>>2]=h;o[a+4>>2]=b;o[a>>2]=e;if(f){jl(f)}return}Nk();D()}db(10528);D()}function tf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=v(0),j=0;d=R-32|0;R=d;f=m[o[a+8>>2]+24|0];c=o[a+16>>2];if(o[c+80>>2]){g=o[o[c>>2]>>2]+o[c+48>>2]|0}o[d+8>>2]=-1;o[d+12>>2]=-1;o[d>>2]=-1;o[d+4>>2]=-1;a:{c=o[a+24>>2];if(c+ -2>>>0>28){break a}o[d>>2]=c;c=-1<>2]=e;o[d+4>>2]=c^-1;o[d+12>>2]=(e|0)/2;if(!b){e=1;break a}h=f<<2;c=0;f=0;while(1){i=v(v(1)/v(e|0));e=c<<2;uf(v(i*v(o[e+g>>2])),v(i*v(o[(e|4)+g>>2])),d+20|0);ll(o[o[o[a+8>>2]+64>>2]>>2]+f|0,d+20|0,h);e=1;j=j+1|0;if((j|0)==(b|0)){break a}c=c+2|0;f=f+h|0;e=o[d+8>>2];continue}}R=d+32|0;return e|0}function qi(a,b,c,d){var e=0,f=0,g=0;a:{if(!b){b=c;d=b>>>0<0?d+1|0:d;if((d|0)<0?1:(d|0)<=0?b>>>0>=0?0:1:0){return 0}d=o[a>>2];c=o[a+4>>2]-d|0;if(c>>>0>>0){Ka(a,b-c|0);break a}if(c>>>0<=b>>>0){break a}o[a+4>>2]=b+d;break a}if((d|0)<0?1:(d|0)<=0?c>>>0>=0?0:1:0){return 0}f=c;if(c>>>0<0){d=d+1|0}g=o[a>>2];e=o[a+4>>2]-g|0;b:{if((d|0)<0?1:(d|0)<=0?f>>>0>e>>>0?0:1:0){break b}d=f;if(e>>>0>>0){Ka(a,d-e|0);break b}if(e>>>0<=d>>>0){break b}o[a+4>>2]=d+g}if(!c){break a}nl(o[a>>2],b,c)}b=a+24|0;c=b;d=b;a=o[b+4>>2];b=o[b>>2]+1|0;if(b>>>0<1){a=a+1|0}o[d>>2]=b;o[c+4>>2]=a;return 1}function vf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=R-32|0;R=e;a:{if((d|0)==3){d=o[b+4>>2];b=o[b+12>>2];o[e+24>>2]=-1;o[e+28>>2]=-1;o[e+16>>2]=-1;o[e+20>>2]=-1;if((c|0)==-2){o[e+8>>2]=0;o[a>>2]=0;break a}f=o[o[o[d+4>>2]+8>>2]+(b<<2)>>2];if((l[o[o[d>>2]+8>>2]](d)|0)==1){g=b;b=q[d+36>>1];wf(e+8|0,d,c,g,e+16|0,(b<<24|b<<8&16711680)>>>16|0);b=o[e+8>>2];if(b){o[a>>2]=b;break a}o[e+8>>2]=0}b=yk(24);o[b+4>>2]=f;c=o[e+20>>2];o[b+8>>2]=o[e+16>>2];o[b+12>>2]=c;c=o[e+28>>2];o[b+16>>2]=o[e+24>>2];o[b+20>>2]=c;o[b>>2]=7536;o[e+8>>2]=b;o[a>>2]=b;break a}o[a>>2]=0}R=e+32|0}function Ti(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=o[a+8>>2];e=o[a+4>>2];if(d-e>>2>>>0>=b>>>0){d=e;c=b;while(1){o[d>>2]=1;d=d+4|0;c=c+ -1|0;if(c){continue}break}o[a+4>>2]=e+(b<<2);return}f=o[a>>2];i=e-f|0;g=i>>2;c=g+b|0;a:{if(c>>>0<1073741824){d=d-f|0;h=d>>1;c=d>>2>>>0<536870911?h>>>0>>0?c:h:1073741823;e=0;b:{if(!c){break b}if(c>>>0>=1073741824){break a}e=yk(c<<2)}h=e+(c<<2)|0;g=e+(g<<2)|0;d=g;c=b;while(1){o[d>>2]=1;d=d+4|0;c=c+ -1|0;if(c){continue}break}b=g+(b<<2)|0;if((i|0)>=1){ll(e,f,i)}o[a+8>>2]=h;o[a+4>>2]=b;o[a>>2]=e;if(f){jl(f)}return}Nk();D()}db(10648);D()}function cg(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;f=a+4|0;a:{a=o[a+4>>2];if(a){e=p[c+11|0];d=e<<24>>24<0;i=d?o[c>>2]:c;e=d?o[c+4>>2]:e;while(1){c=p[a+27|0];d=c<<24>>24<0;c=d?o[a+20>>2]:c;j=c>>>0>>0;b:{c:{d:{e:{f:{h=j?c:e;g:{if(h){g=a+16|0;d=d?o[g>>2]:g;g=Vj(i,d,h);if(!g){if(e>>>0>>0){break g}break f}if((g|0)>-1){break f}break g}if(e>>>0>=c>>>0){break e}}c=o[a>>2];if(c){break b}o[b>>2]=a;return a}c=Vj(d,i,h);if(c){break d}}if(j){break c}break a}if((c|0)>-1){break a}}f=a+4|0;c=o[a+4>>2];if(!c){break a}a=f}f=a;a=c;continue}}o[b>>2]=f;return f}o[b>>2]=a;return f}function vd(a,b){var c=0;c=o[b+4>>2];o[a>>2]=o[b>>2];o[a+4>>2]=c;c=o[b+60>>2];o[a+56>>2]=o[b+56>>2];o[a+60>>2]=c;c=o[b+52>>2];o[a+48>>2]=o[b+48>>2];o[a+52>>2]=c;c=o[b+44>>2];o[a+40>>2]=o[b+40>>2];o[a+44>>2]=c;c=o[b+36>>2];o[a+32>>2]=o[b+32>>2];o[a+36>>2]=c;c=o[b+28>>2];o[a+24>>2]=o[b+24>>2];o[a+28>>2]=c;c=o[b+20>>2];o[a+16>>2]=o[b+16>>2];o[a+20>>2]=c;c=o[b+12>>2];o[a+8>>2]=o[b+8>>2];o[a+12>>2]=c;o[a+88>>2]=0;o[a+64>>2]=0;o[a+68>>2]=0;o[a+72>>2]=0;o[a+76>>2]=0;m[a+77|0]=0;m[a+78|0]=0;m[a+79|0]=0;m[a+80|0]=0;m[a+81|0]=0;m[a+82|0]=0;m[a+83|0]=0;m[a+84|0]=0;return a}function Ai(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=a+4|0;a=o[a+4>>2];a:{b:{if(!a){break b}d=p[b+11|0];c=d<<24>>24<0;i=c?o[b>>2]:b;e=c?o[b+4>>2]:d;c=g;while(1){b=p[a+27|0];j=b<<24>>24<0;h=j?o[a+20>>2]:b;f=e>>>0>>0;d=f?e:h;c:{if(d){b=a+16|0;b=Vj(j?o[b>>2]:b,i,d);if(b){break c}}b=h>>>0>>0?-1:f}c=(b|0)<0?c:a;a=o[(b>>>29&4)+a>>2];if(a){continue}break}if((c|0)==(g|0)){break b}a=p[c+27|0];f=a<<24>>24<0;d:{d=f?o[c+20>>2]:a;b=d>>>0>>0?d:e;if(b){a=c+16|0;a=Vj(i,f?o[a>>2]:a,b);if(a){break d}}if(e>>>0>>0){break b}break a}if((a|0)>-1){break a}}c=g}return c}function ij(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=R-16|0;R=g;j=a;h=cg(b,g+12|0,c);c=o[h>>2];if(c){b=0}else{c=yk(40);e=d+8|0;o[c+24>>2]=o[e>>2];f=o[d+4>>2];o[c+16>>2]=o[d>>2];o[c+20>>2]=f;o[d>>2]=0;o[d+4>>2]=0;o[e>>2]=0;o[c+36>>2]=0;o[c+28>>2]=0;o[c+32>>2]=0;f=o[d+16>>2];e=o[d+12>>2];i=f-e|0;if(i){e=c+28|0;Ka(e,i);f=o[d+16>>2];k=o[e>>2];e=o[d+12>>2]}ll(k,e,f-e|0);o[c+8>>2]=o[g+12>>2];o[c>>2]=0;o[c+4>>2]=0;o[h>>2]=c;e=o[o[b>>2]>>2];d=c;a:{if(!e){break a}o[b>>2]=e;d=o[h>>2]}ag(o[b+4>>2],d);o[b+8>>2]=o[b+8>>2]+1;b=1}m[j+4|0]=b;o[a>>2]=c;R=g+16|0}function xa(a,b){var c=0,d=0;c=R-96|0;R=c;ml(c+16|0,0,76);o[c+92>>2]=-1;o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0;a:{if(ya(c+16|0,a,c)){a=o[b>>2];if(a){o[b+4>>2]=a;jl(a);o[b+8>>2]=0;o[b>>2]=0;o[b+4>>2]=0}o[b>>2]=o[c>>2];o[b+4>>2]=o[c+4>>2];o[b+8>>2]=o[c+8>>2];o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0;d=o[c+84>>2];break a}a=o[c>>2];if(!a){break a}o[c+4>>2]=a;jl(a)}a=o[c+72>>2];if(a){jl(a)}a=o[c+48>>2];if(a){o[c+52>>2]=a;jl(a)}a=o[c+36>>2];if(a){o[c+40>>2]=a;jl(a)}a=o[c+24>>2];if(a){o[c+28>>2]=a;jl(a)}a=o[c+20>>2];o[c+20>>2]=0;if(a){za(c+16|4,a)}R=c+96|0;return d}function Fj(a){var b=0,c=0,d=0,e=0;b=R-208|0;R=b;o[b+204>>2]=0;ml(b+160|0,0,40);o[b+200>>2]=o[b+204>>2];a:{if((Gj(0,b+200|0,b+80|0,b+160|0)|0)<0){break a}d=o[a+76>>2]>=0?1:d;c=o[a>>2];if(m[a+74|0]<=0){o[a>>2]=c&-33}e=c&32;b:{if(o[a+48>>2]){Gj(a,b+200|0,b+80|0,b+160|0);break b}o[a+48>>2]=80;o[a+16>>2]=b+80;o[a+28>>2]=b;o[a+20>>2]=b;c=o[a+44>>2];o[a+44>>2]=b;Gj(a,b+200|0,b+80|0,b+160|0);if(!c){break b}l[o[a+36>>2]](a,0,0)|0;o[a+48>>2]=0;o[a+44>>2]=c;o[a+28>>2]=0;o[a+16>>2]=0;o[a+20>>2]=0}o[a>>2]=e|o[a>>2];if(!d){break a}}R=b+208|0}function dj(a,b,c){var d=0,e=0,f=0;e=R-16|0;R=e;a:{b:{if(!c){break b}o[a>>2]=b;o[e+12>>2]=0;d=0;if(!bj(1,e+12|0,b)){break a}c:{f=o[e+12>>2];if(f){b=0;while(1){if(!bj(1,e+8|0,o[a>>2])){break b}d=yk(28);o[d+4>>2]=0;o[d+8>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;o[d>>2]=d+4;o[d+12>>2]=d+16;o[d+24>>2]=o[e+8>>2];if(!aj(a,d)){break c}o[e>>2]=d;fj(c,e);d=o[e>>2];o[e>>2]=0;if(d){Kc(d+12|0,o[d+16>>2]);Lc(d,o[d+4>>2]);jl(d)}b=b+1|0;if((f|0)!=(b|0)){continue}break}}d=aj(a,c);break a}Kc(d+12|0,o[d+16>>2]);Lc(d,o[d+4>>2]);jl(d)}d=0}R=e+16|0;return d}function ua(a,b){var c=0,d=0,e=0,f=0;c=R-32|0;R=c;o[c+24>>2]=0;o[c+16>>2]=0;o[c+20>>2]=0;d=rl(b);if(d>>>0<4294967280){a:{b:{if(d>>>0>=11){f=d+16&-16;e=yk(f);o[c+24>>2]=f|-2147483648;o[c+16>>2]=e;o[c+20>>2]=d;break b}m[c+27|0]=d;e=c+16|0;if(!d){break a}}ll(e,b,d)}m[d+e|0]=0;o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0;m[c+11|0]=4;m[c+4|0]=0;o[c>>2]=1701667182;d=o[a+4>>2];b=-1;c:{if(!d){break c}d=ej(d,c,c+16|0);b=-1;if(!d){break c}b=uj(a,o[d+24>>2])}if(m[c+11|0]<=-1){jl(o[c>>2])}if(m[c+27|0]<=-1){jl(o[c+16>>2])}R=c+32|0;return b}Ak();D()}function rg(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{d=o[a+8>>2];c=o[a+4>>2];c:{if(d-c>>3>>>0>=b>>>0){while(1){o[c>>2]=0;o[c+4>>2]=0;c=o[a+4>>2]+8|0;o[a+4>>2]=c;b=b+ -1|0;if(b){continue}break c}}f=o[a>>2];h=c-f|0;g=h>>3;e=g+b|0;if(e>>>0>=536870912){break b}c=0;g=g<<3;d=d-f|0;i=d>>2;d=d>>3>>>0<268435455?i>>>0>>0?e:i:536870911;if(d){if(d>>>0>=536870912){break a}c=yk(d<<3)}ml(c+g|0,0,b<<3);b=(e<<3)+c|0;e=(d<<3)+c|0;if((h|0)>=1){ll(c,f,h)}o[a+8>>2]=e;o[a+4>>2]=b;o[a>>2]=c;if(!f){break c}jl(f)}return}Nk();D()}db(7946);D()}function re(a,b,c,d,e,f){var g=0,h=0,i=0;f=R-32|0;R=f;h=o[o[o[b+4>>2]+8>>2]+(d<<2)>>2];a:{b:{if((l[o[o[b>>2]+8>>2]](b)|0)!=1|c+ -1>>>0>5){break b}i=l[o[o[b>>2]+36>>2]](b)|0;g=l[o[o[b>>2]+44>>2]](b,d)|0;if(!(g?i:0)){o[a>>2]=0;break a}d=l[o[o[b>>2]+40>>2]](b,d)|0;if(d){b=o[b+44>>2];o[f+12>>2]=d;o[f+8>>2]=b;o[f+20>>2]=g;o[f+16>>2]=g+12;se(a,c,h,e,f+8|0);if(o[a>>2]){break a}o[a>>2]=0;break b}b=o[b+44>>2];o[f+12>>2]=i;o[f+8>>2]=b;o[f+20>>2]=g;o[f+16>>2]=g+12;te(a,c,h,e,f+8|0);if(o[a>>2]){break a}o[a>>2]=0}o[a>>2]=0}R=f+32|0}function Wf(a,b){var c=0,d=0,e=0;c=R-80|0;R=c;d=o[b+36>>2];o[c+72>>2]=o[b+32>>2];o[c+76>>2]=d;e=o[b+28>>2];d=c- -64|0;o[d>>2]=o[b+24>>2];o[d+4>>2]=e;d=o[b+20>>2];o[c+56>>2]=o[b+16>>2];o[c+60>>2]=d;d=o[b+12>>2];o[c+48>>2]=o[b+8>>2];o[c+52>>2]=d;d=o[b+4>>2];o[c+40>>2]=o[b>>2];o[c+44>>2]=d;gi(c+8|0,c+40|0,c+24|0);b=o[c+8>>2];a:{if(b){o[a>>2]=b;Bk(a+4|0,c+8|4);if(m[c+23|0]>-1){break a}jl(o[c+12>>2]);break a}if(m[c+23|0]<=-1){jl(o[c+12>>2])}b=p[c+31|0];o[a>>2]=0;o[a+4>>2]=0;o[a+16>>2]=b;o[a+8>>2]=0;o[a+12>>2]=0}R=c+80|0}function _k(a){var b=0,c=0,d=0,e=0;b=R+ -64|0;R=b;d=o[a>>2];c=o[d+ -4>>2];d=o[d+ -8>>2];o[b+20>>2]=0;o[b+16>>2]=12680;o[b+12>>2]=a;o[b+8>>2]=12728;ml(b+24|0,0,39);a=a+d|0;a:{if(Yk(c,12728,0)){o[b+56>>2]=1;l[o[o[c>>2]+20>>2]](c,b+8|0,a,a,1,0);e=o[b+32>>2]==1?a:0;break a}l[o[o[c>>2]+24>>2]](c,b+8|0,a,1,0);a=o[b+44>>2];if(a>>>0>1){break a}if(a-1){e=o[b+48>>2]==1?o[b+36>>2]==1?o[b+40>>2]==1?o[b+28>>2]:0:0:0;break a}if(o[b+32>>2]!=1){if(o[b+48>>2]|o[b+36>>2]!=1|o[b+40>>2]!=1){break a}}e=o[b+24>>2]}R=b- -64|0;return e}function zj(a,b){var c=0,d=0,e=0,f=0;a:{if((b|0)<0){break a}c=o[a+28>>2];e=o[a+24>>2];while(1){d=e;if((c|0)==(d|0)){break a}e=d+4|0;if(o[o[d>>2]+24>>2]!=(b|0)){continue}break}b:{if((c|0)!=(e|0)){while(1){b=o[e>>2];o[e>>2]=0;f=o[d>>2];o[d>>2]=b;if(f){Kc(f+12|0,o[f+16>>2]);Lc(f,o[f+4>>2]);jl(f)}d=d+4|0;e=e+4|0;if((c|0)!=(e|0)){continue}break}c=o[a+28>>2];if((c|0)==(d|0)){break b}}while(1){c=c+ -4|0;b=o[c>>2];o[c>>2]=0;if(b){Kc(b+12|0,o[b+16>>2]);Lc(b,o[b+4>>2]);jl(b)}if((d|0)!=(c|0)){continue}break}}o[a+28>>2]=d}}function zi(a,b){var c=0,d=0,e=0,f=0;d=R-16|0;R=d;Lk(d);e=cg(a,d+12|0,b);c=o[e>>2];if(!c){c=yk(40);Bk(c+16|0,b);o[c+36>>2]=0;o[c+28>>2]=0;o[c+32>>2]=0;o[c+8>>2]=o[d+12>>2];o[c>>2]=0;o[c+4>>2]=0;o[e>>2]=c;b=o[o[a>>2]>>2];f=c;a:{if(!b){break a}o[a>>2]=b;f=o[e>>2]}b=f;ag(o[a+4>>2],b);o[a+8>>2]=o[a+8>>2]+1}a=c+28|0;b:{if(m[c+39|0]>=0){m[a+11|0]=0;m[a|0]=0;break b}m[o[c+28>>2]]=0;o[c+32>>2]=0;if(m[c+39|0]>-1){break b}jl(o[c+28>>2]);o[c+36>>2]=0}b=o[d+4>>2];o[a>>2]=o[d>>2];o[a+4>>2]=b;o[a+8>>2]=o[d+8>>2];R=d+16|0}function Yd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;c=o[a+60>>2];a:{if(!c){break a}o[c+4>>2]=a+48;if(!l[o[o[c>>2]+12>>2]](c)){break a}b:{d=l[o[o[a>>2]+24>>2]](a)|0;if((d|0)<1){break b}c=0;while(1){c:{f=o[(l[o[o[a>>2]+28>>2]](a)|0)+4>>2];g=l[o[o[a>>2]+20>>2]](a,c)|0;e=o[a+60>>2];if(!l[o[o[e>>2]+8>>2]](e,o[o[f+8>>2]+(g<<2)>>2])){break c}c=c+1|0;if((d|0)!=(c|0)){continue}break b}break}return 0}if(!l[o[o[a>>2]+36>>2]](a,b)){break a}if(!l[o[o[a>>2]+40>>2]](a,b)){break a}h=l[o[o[a>>2]+44>>2]](a)|0}return h|0}function el(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;if(Yk(a,o[b+8>>2],e)){dl(b,c,d);return}a:{if(Yk(a,o[b>>2],e)){if(!(o[b+20>>2]!=(c|0)?o[b+16>>2]!=(c|0):0)){if((d|0)!=1){break a}o[b+32>>2]=1;return}o[b+32>>2]=d;b:{if(o[b+44>>2]==4){break b}n[b+52>>1]=0;a=o[a+8>>2];l[o[o[a>>2]+20>>2]](a,b,c,c,1,e);if(p[b+53|0]){o[b+44>>2]=3;if(!p[b+52|0]){break b}break a}o[b+44>>2]=4}o[b+20>>2]=c;o[b+40>>2]=o[b+40>>2]+1;if(o[b+36>>2]!=1|o[b+24>>2]!=2){break a}m[b+54|0]=1;return}a=o[a+8>>2];l[o[o[a>>2]+24>>2]](a,b,c,d,e)}}function Ng(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=o[a+216>>2];if((c|0)!=o[a+220>>2]){while(1){a:{c=o[u(e,144)+c>>2];if((c|0)<0){break a}f=o[a+4>>2];d=o[f+8>>2];if((c|0)>=o[f+12>>2]-d>>2){break a}c=o[d+(c<<2)>>2];if((l[o[o[c>>2]+24>>2]](c)|0)<1){break a}d=0;while(1){if((l[o[o[c>>2]+20>>2]](c,d)|0)!=(b|0)){d=d+1|0;if((d|0)<(l[o[o[c>>2]+24>>2]](c)|0)){continue}break a}break}a=o[a+216>>2]+u(e,144)|0;return(p[a+100|0]?a+4|0:0)|0}e=e+1|0;c=o[a+216>>2];if(e>>>0<(o[a+220>>2]-c|0)/144>>>0){continue}break}}return 0}function Mi(a,b,c){var d=0,e=0,f=0;a:{b:{if((b|c)<0|b>>>0>1431655765){break b}b=u(b,3);Ni(a,b,10520);Ni(a+12|0,b,10524);b=o[a+24>>2];c:{if(o[a+32>>2]-b>>2>>>0>=c>>>0){break c}if(c>>>0>=1073741824){break a}d=o[a+28>>2];e=c<<2;c=yk(e);e=c+e|0;d=d-b|0;f=d+c|0;if((d|0)>=1){ll(c,b,d)}o[a+32>>2]=e;o[a+28>>2]=f;o[a+24>>2]=c;if(!b){break c}jl(b)}o[a+80>>2]=0;o[a+84>>2]=0;c=a+76|0;b=o[c>>2];o[c>>2]=0;if(b){jl(b)}o[a+68>>2]=0;o[a+72>>2]=0;b=a- -64|0;a=o[b>>2];o[b>>2]=0;d=1;if(!a){break b}jl(a)}return d}db(10528);D()}function Yj(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;a:{if(f&64){c=f+ -64|0;b=c&31;if(32<=(c&63)>>>0){c=0;b=e>>>b|0}else{c=e>>>b|0;b=((1<>>b}d=0;e=0;break a}if(!f){break a}h=e;i=d;j=64-f|0;g=j&31;if(32<=(j&63)>>>0){h=i<>>32-g|h<>>0){g=0;b=c>>>b|0}else{g=c>>>b|0;b=((1<>>b}b=j|b;c=g|h;g=d;d=f&31;if(32<=(f&63)>>>0){h=0;d=e>>>d|0}else{h=e>>>d|0;d=((1<>>d}e=h}o[a>>2]=b;o[a+4>>2]=c;o[a+8>>2]=d;o[a+12>>2]=e}function la(a,b,c){var d=0,e=0,f=0,g=0;d=R-32|0;R=d;o[d+24>>2]=0;o[d+16>>2]=0;o[d+20>>2]=0;e=rl(b);if(e>>>0<4294967280){a:{b:{if(e>>>0>=11){g=e+16&-16;f=yk(g);o[d+24>>2]=g|-2147483648;o[d+16>>2]=f;o[d+20>>2]=e;break b}m[d+27|0]=e;f=d+16|0;if(!e){break a}}ll(f,b,e)}m[e+f|0]=0;o[d+8>>2]=0;o[d>>2]=0;o[d+4>>2]=0;kj(a,d+16|0,d);a=o[c>>2];if(a){o[c+4>>2]=a;jl(a);o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0}o[c>>2]=o[d>>2];o[c+4>>2]=o[d+4>>2];o[c+8>>2]=o[d+8>>2];if(m[d+27|0]<=-1){jl(o[d+16>>2])}R=d+32|0;return}Ak();D()}function fb(a,b){var c=0,d=0;c=R-32|0;R=c;a:{b:{if(o[a+8>>2]<<5>>>0>=b>>>0){break b}o[c+24>>2]=0;o[c+16>>2]=0;o[c+20>>2]=0;if((b|0)<=-1){break a}b=(b+ -1>>>5|0)+1|0;d=yk(b<<2);o[c+24>>2]=b;o[c+20>>2]=0;o[c+16>>2]=d;b=o[a>>2];o[c+12>>2]=0;o[c+8>>2]=b;d=o[a+4>>2];o[c+4>>2]=d&31;o[c>>2]=b+(d>>>3&536870908);gb(c+16|0,c+8|0,c);b=o[a>>2];o[a>>2]=o[c+16>>2];o[c+16>>2]=b;d=o[a+4>>2];o[a+4>>2]=o[c+20>>2];o[c+20>>2]=d;d=o[a+8>>2];o[a+8>>2]=o[c+24>>2];o[c+24>>2]=d;if(!b){break b}jl(b)}R=c+32|0;return}Nk();D()}function Og(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=o[a+216>>2];if((c|0)!=o[a+220>>2]){while(1){a:{c=o[u(e,144)+c>>2];if((c|0)<0){break a}f=o[a+4>>2];d=o[f+8>>2];if((c|0)>=o[f+12>>2]-d>>2){break a}c=o[d+(c<<2)>>2];if((l[o[o[c>>2]+24>>2]](c)|0)<1){break a}d=0;while(1){if((l[o[o[c>>2]+20>>2]](c,d)|0)!=(b|0)){d=d+1|0;if((d|0)<(l[o[o[c>>2]+24>>2]](c)|0)){continue}break a}break}return(o[a+216>>2]+u(e,144)|0)+104|0}e=e+1|0;c=o[a+216>>2];if(e>>>0<(o[a+220>>2]-c|0)/144>>>0){continue}break}}return a+184|0}function Sd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=o[b>>2];e=o[b+4>>2];b=o[o[a+8>>2]+40>>2];f=b;g=yk((b|0)>-1?b:-1);d=e-d|0;if((d|0)>=1){d=d>>2;m=(d|0)>1?d:1;while(1){i=o[c+12>>2];d=n+o[c+20>>2]|0;j=o[c+16>>2];h=b+j|0;if(h>>>0>>0){d=d+1|0}e=d;if((i|0)<(d|0)?1:(i|0)<=(d|0)?r[c+8>>2]>=h>>>0?0:1:0){jl(g);return 0}d=ll(g,j+o[c>>2]|0,f);o[c+16>>2]=h;o[c+20>>2]=e;ll(o[o[o[a+8>>2]+64>>2]>>2]+k|0,d,f);k=f+k|0;l=l+1|0;if((m|0)!=(l|0)){continue}break}}jl(g);return 1}function Xj(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;a:{if(f&64){d=b;e=f+ -64|0;b=e&31;if(32<=(e&63)>>>0){e=d<>>32-b|c<>>0){h=g<>>32-d|e<>>0){f=0;d=d>>>e|0}else{f=d>>>e|0;d=((1<>>e}d=j|d;e=f|h;f=b;b=i&31;if(32<=(i&63)>>>0){h=f<>>32-b|c<>2]=b;o[a+4>>2]=c;o[a+8>>2]=d;o[a+12>>2]=e}function nj(a,b,c){var d=0,e=0,f=0,g=0;d=R-48|0;R=d;f=Ai(a,b);if((f|0)!=(a+4|0)){hj(a,f)}f=0;o[d+8>>2]=0;o[d>>2]=0;o[d+4>>2]=0;g=o[c>>2];e=o[c+4>>2]-g|0;if(e){Ka(d,e);g=o[c>>2];c=o[d>>2]}else{c=0}ll(c,g,e);g=Bk(d+16|0,b);o[d+36>>2]=0;o[d+28>>2]=0;o[d+32>>2]=0;b=o[d+4>>2];c=o[d>>2];e=b-c|0;if(e){Ka(d+28|0,e);c=o[d>>2];f=o[d+28>>2];b=o[d+4>>2]}ll(f,c,b-c|0);ij(d+40|0,a,g,d+16|0);a=o[d+28>>2];if(a){o[d+32>>2]=a;jl(a)}if(m[d+27|0]<=-1){jl(o[d+16>>2])}a=o[d>>2];if(a){o[d+4>>2]=a;jl(a)}R=d+48|0}function Qd(a){var b=0,c=0,d=0,e=0,f=0;b=o[a+8>>2];a:{if(p[b+84|0]){break a}c=o[a+16>>2];if(!c|!p[c+84|0]){break a}d=o[b+72>>2];e=o[b+68>>2];m[c+84|0]=0;d=d-e>>2;f=o[c+68>>2];e=o[c+72>>2]-f>>2;b:{if(d>>>0>e>>>0){pd(c+68|0,d-e|0,1680);b=o[a+8>>2];break b}if(d>>>0>=e>>>0){break b}o[c+72>>2]=f+(d<<2)}if(p[b+84|0]){break a}c=o[b+68>>2];b=o[b+72>>2]-c|0;if(!b){break a}d=b>>2;e=o[o[a+16>>2]+68>>2];b=0;while(1){f=b<<2;o[f+e>>2]=o[c+f>>2];b=b+1|0;if(b>>>0>>0){continue}break}}return o[a+16>>2]}function Fa(a,b,c){var d=0,e=0,f=0,g=0;d=R-32|0;R=d;e=m[a+24|0];f=o[259];o[d+24>>2]=o[258];o[d+28>>2]=f;f=o[257];o[d+16>>2]=o[256];o[d+20>>2]=f;a:{if(Ga(a,b,e,d+16|0)){a=0;o[d+8>>2]=0;o[d>>2]=0;o[d+4>>2]=0;b=0;if(e){if((e|0)<=-1){break a}b=e<<2;g=yk(b);o[d>>2]=g;a=(e<<2)+g|0;o[d+8>>2]=a;ll(g,d+16|0,b);o[d+4>>2]=a;b=a}e=c;f=o[c>>2];if(f){o[c+4>>2]=f;jl(f);o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0;b=o[d+4>>2];g=o[d>>2];a=o[d+8>>2]}o[e+8>>2]=a;o[c+4>>2]=b;o[c>>2]=g;g=1}R=d+32|0;return g}Nk();D()}function $g(a){var b=0,c=0,d=0,e=0;c=1;d=o[a+140>>2];a:{if((d|0)<1){break a}b=d<<4;c=yk((d|0)!=(d&268435455)?-1:b|4);o[c>>2]=d;c=c+4|0;d=c+b|0;b=c;while(1){b=Rf(b)+16|0;if((d|0)!=(b|0)){continue}break}e=o[a+136>>2];o[a+136>>2]=c;if(e){d=e+ -4|0;c=o[d>>2];if(c){b=e+(c<<4)|0;while(1){b=b+ -16|0;if((e|0)!=(b|0)){continue}break}}jl(d)}c=1;if(o[a+140>>2]<1){break a}c=0;b=0;while(1){if(!Sf(o[a+136>>2]+(b<<4)|0,a)){break a}b=b+1|0;if((b|0)>2]){continue}break}c=1}return c}function Qi(a){a=a|0;var b=0,c=0,d=0,e=0;o[a>>2]=11e3;b=o[a+68>>2];if(b){o[a+72>>2]=b;jl(b)}b=o[a+56>>2];if(b){o[a+60>>2]=b;jl(b)}b=o[a+44>>2];if(b){o[a+48>>2]=b;jl(b)}b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}b=o[a+20>>2];if(b){o[a+24>>2]=b;jl(b)}d=o[a+8>>2];if(d){b=d;c=o[a+12>>2];e=b;a:{if((b|0)==(c|0)){break a}while(1){c=c+ -4|0;b=o[c>>2];o[c>>2]=0;if(b){Kb(b)}if((c|0)!=(d|0)){continue}break}e=o[a+8>>2]}b=e;o[a+12>>2]=d;jl(b)}b=o[a+4>>2];o[a+4>>2]=0;if(b){ii(b)}return a|0}function Fi(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=o[a+8>>2];d=o[a+4>>2];if(e-d>>2>>>0>=b>>>0){c=a;a=b<<2;j=c,k=ml(d,0,a)+a|0,o[j+4>>2]=k;return}f=o[a>>2];h=d-f|0;g=h>>2;c=g+b|0;a:{if(c>>>0<1073741824){d=0;g=g<<2;e=e-f|0;i=e>>1;c=e>>2>>>0<536870911?i>>>0>>0?c:i:1073741823;if(c){if(c>>>0>=1073741824){break a}d=yk(c<<2)}b=b<<2;b=ml(d+g|0,0,b)+b|0;c=(c<<2)+d|0;if((h|0)>=1){ll(d,f,h)}o[a+8>>2]=c;o[a+4>>2]=b;o[a>>2]=d;if(f){jl(f)}return}Nk();D()}db(10528);D()}function ei(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=o[a+8>>2];d=o[a+4>>2];if(e-d>>2>>>0>=b>>>0){c=a;a=b<<2;j=c,k=ml(d,0,a)+a|0,o[j+4>>2]=k;return}f=o[a>>2];h=d-f|0;g=h>>2;c=g+b|0;a:{if(c>>>0<1073741824){d=0;g=g<<2;e=e-f|0;i=e>>1;c=e>>2>>>0<536870911?i>>>0>>0?c:i:1073741823;if(c){if(c>>>0>=1073741824){break a}d=yk(c<<2)}b=b<<2;b=ml(d+g|0,0,b)+b|0;c=(c<<2)+d|0;if((h|0)>=1){ll(d,f,h)}o[a+8>>2]=c;o[a+4>>2]=b;o[a>>2]=d;if(f){jl(f)}return}Nk();D()}db(9976);D()}function Ia(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=o[a+8>>2];d=o[a+4>>2];if(e-d>>2>>>0>=b>>>0){c=a;a=b<<2;j=c,k=ml(d,0,a)+a|0,o[j+4>>2]=k;return}f=o[a>>2];h=d-f|0;g=h>>2;c=g+b|0;a:{if(c>>>0<1073741824){d=0;g=g<<2;e=e-f|0;i=e>>1;c=e>>2>>>0<536870911?i>>>0>>0?c:i:1073741823;if(c){if(c>>>0>=1073741824){break a}d=yk(c<<2)}b=b<<2;b=ml(d+g|0,0,b)+b|0;c=(c<<2)+d|0;if((h|0)>=1){ll(d,f,h)}o[a+8>>2]=c;o[a+4>>2]=b;o[a>>2]=d;if(f){jl(f)}return}Nk();D()}db(1040);D()}function Ba(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=o[a>>2];a=o[e+4>>2];d=o[e+8>>2];if(a>>>0>>0){o[a>>2]=o[b>>2];o[e+4>>2]=a+4;return}f=o[e>>2];g=a-f|0;a=g>>2;c=a+1|0;a:{if(c>>>0<1073741824){h=a<<2;d=d-f|0;a=d>>1;c=d>>2>>>0<536870911?a>>>0>>0?c:a:1073741823;a=0;b:{if(!c){break b}if(c>>>0>=1073741824){break a}a=yk(c<<2)}d=h+a|0;o[d>>2]=o[b>>2];b=a+(c<<2)|0;c=d+4|0;if((g|0)>=1){ll(a,f,g)}o[e+8>>2]=b;o[e+4>>2]=c;o[e>>2]=a;if(f){jl(f)}return}Nk();D()}db(1040);D()}function ja(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;a=o[a+4>>2];if(a){c=p[b+11|0];d=c<<24>>24<0;g=d?o[b>>2]:b;b=d?o[b+4>>2]:c;while(1){c=p[a+27|0];d=c<<24>>24<0;c=d?o[a+20>>2]:c;h=c>>>0>>0;a:{b:{f=h?c:b;c:{if(f){e=a+16|0;d=d?o[e>>2]:e;e=Vj(g,d,f);d:{if(!e){if(b>>>0>=c>>>0){break d}break a}if((e|0)<=-1){break a}}c=Vj(d,g,f);if(!c){break c}if((c|0)<=-1){break b}return 1}if(b>>>0>>0){break a}}if(h){break b}return 1}a=a+4|0}a=o[a>>2];if(a){continue}break}}return 0}function Li(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=o[a+4>>2];e=o[a+8>>2];if((c|0)!=(e|0)){o[c>>2]=o[b>>2];o[a+4>>2]=c+4;return}f=o[a>>2];g=c-f|0;c=g>>2;d=c+1|0;a:{if(d>>>0<1073741824){h=c<<2;e=e-f|0;c=e>>1;d=e>>2>>>0<536870911?c>>>0>>0?d:c:1073741823;c=0;b:{if(!d){break b}if(d>>>0>=1073741824){break a}c=yk(d<<2)}e=h+c|0;o[e>>2]=o[b>>2];b=c+(d<<2)|0;d=e+4|0;if((g|0)>=1){ll(c,f,g)}o[a+8>>2]=b;o[a+4>>2]=d;o[a>>2]=c;if(f){jl(f)}return}Nk();D()}db(10528);D()}function eh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=o[a+4>>2];e=o[a+8>>2];if((c|0)!=(e|0)){o[c>>2]=o[b>>2];o[a+4>>2]=c+4;return}f=o[a>>2];g=c-f|0;c=g>>2;d=c+1|0;a:{if(d>>>0<1073741824){h=c<<2;e=e-f|0;c=e>>1;d=e>>2>>>0<536870911?c>>>0>>0?d:c:1073741823;c=0;b:{if(!d){break b}if(d>>>0>=1073741824){break a}c=yk(d<<2)}e=h+c|0;o[e>>2]=o[b>>2];b=c+(d<<2)|0;d=e+4|0;if((g|0)>=1){ll(c,f,g)}o[a+8>>2]=b;o[a+4>>2]=d;o[a>>2]=c;if(f){jl(f)}return}Nk();D()}db(8832);D()}function Fh(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=o[a+4>>2];a=o[e+4>>2];d=o[e+8>>2];if((a|0)!=(d|0)){o[a>>2]=b;o[e+4>>2]=a+4;return}f=o[e>>2];g=a-f|0;a=g>>2;c=a+1|0;a:{if(c>>>0<1073741824){h=a<<2;d=d-f|0;a=d>>1;c=d>>2>>>0<536870911?a>>>0>>0?c:a:1073741823;a=0;b:{if(!c){break b}if(c>>>0>=1073741824){break a}a=yk(c<<2)}d=h+a|0;o[d>>2]=b;b=a+(c<<2)|0;c=d+4|0;if((g|0)>=1){ll(a,f,g)}o[e+8>>2]=b;o[e+4>>2]=c;o[e>>2]=a;if(f){jl(f)}return}Nk();D()}db(8832);D()}function oj(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=R-16|0;R=e;f=a+12|0;a:{if((Ai(f,b)|0)!=(a+16|0)){break a}g=cg(f,e+12|0,b);d=o[g>>2];if(!d){d=yk(32);Bk(d+16|0,b);o[d+28>>2]=0;o[d+8>>2]=o[e+12>>2];o[d>>2]=0;o[d+4>>2]=0;o[g>>2]=d;b=o[o[f>>2]>>2];h=d;b:{if(!b){break b}o[f>>2]=b;h=o[g>>2]}b=h;ag(o[a+16>>2],b);a=a+20|0;o[a>>2]=o[a>>2]+1}b=o[c>>2];o[c>>2]=0;c=d+28|0;a=o[c>>2];o[c>>2]=b;if(!a){break a}Kc(a+12|0,o[a+16>>2]);Lc(a,o[a+4>>2]);jl(a)}R=e+16|0}function be(a){a=a|0;var b=0,c=0,d=0,e=0;o[a>>2]=1692;b=o[a+60>>2];o[a+60>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}b=o[a+48>>2];if(b){o[a+52>>2]=b;jl(b)}d=o[a+36>>2];if(d){b=d;c=o[a+40>>2];e=b;a:{if((b|0)==(c|0)){break a}while(1){c=c+ -4|0;b=o[c>>2];o[c>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}e=o[a+36>>2]}b=e;o[a+40>>2]=d;jl(b)}o[a>>2]=1384;b=o[a+16>>2];if(b){o[a+20>>2]=b;jl(b)}b=o[a+4>>2];if(b){o[a+8>>2]=b;jl(b)}return a|0}function Cj(a,b){a:{if(a){if(b>>>0<=127){break a}b:{if(!o[o[3298]>>2]){if((b&-128)==57216){break a}break b}if(b>>>0<=2047){m[a+1|0]=b&63|128;m[a|0]=b>>>6|192;return 2}if(!((b&-8192)!=57344?b>>>0>=55296:0)){m[a+2|0]=b&63|128;m[a|0]=b>>>12|224;m[a+1|0]=b>>>6&63|128;return 3}if(b+ -65536>>>0<=1048575){m[a+3|0]=b&63|128;m[a|0]=b>>>18|240;m[a+2|0]=b>>>6&63|128;m[a+1|0]=b>>>12&63|128;return 4}}o[3314]=25;a=-1}else{a=1}return a}m[a|0]=b;return 1}function ce(a){a=a|0;var b=0,c=0,d=0,e=0;o[a>>2]=1692;b=o[a+60>>2];o[a+60>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}b=o[a+48>>2];if(b){o[a+52>>2]=b;jl(b)}d=o[a+36>>2];if(d){b=d;c=o[a+40>>2];e=b;a:{if((b|0)==(c|0)){break a}while(1){c=c+ -4|0;b=o[c>>2];o[c>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}e=o[a+36>>2]}b=e;o[a+40>>2]=d;jl(b)}o[a>>2]=1384;b=o[a+16>>2];if(b){o[a+20>>2]=b;jl(b)}b=o[a+4>>2];if(b){o[a+8>>2]=b;jl(b)}jl(a)}function Pa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=o[a+8>>2];d=o[a+4>>2];if(e-d>>1>>>0>=b>>>0){c=a;a=b<<1;i=c,j=ml(d,0,a)+a|0,o[i+4>>2]=j;return}f=o[a>>2];g=d-f|0;h=g>>1;c=h+b|0;a:{if((c|0)>-1){d=0;e=e-f|0;c=e>>1>>>0<1073741823?e>>>0>>0?c:e:2147483647;if(c){if((c|0)<=-1){break a}d=yk(c<<1)}b=b<<1;b=ml((h<<1)+d|0,0,b)+b|0;c=(c<<1)+d|0;if((g|0)>=1){ll(d,f,g)}o[a+8>>2]=c;o[a+4>>2]=b;o[a>>2]=d;if(f){jl(f)}return}Nk();D()}db(1040);D()}function rh(a){var b=0,c=0,d=0,e=0;b=o[a+196>>2];if(b){o[a+200>>2]=b;jl(b)}b=o[a+184>>2];if(b){c=o[a+188>>2];d=b;a:{if((b|0)==(c|0)){break a}while(1){d=c+ -12|0;e=o[d>>2];if(e){o[c+ -8>>2]=e;jl(e)}c=d;if((c|0)!=(b|0)){continue}break}d=o[a+184>>2]}o[a+188>>2]=b;jl(d)}b=o[a+156>>2];if(b){o[a+160>>2]=b;jl(b)}b=o[a+136>>2];o[a+136>>2]=0;if(b){c=b+ -4|0;a=o[c>>2];if(a){a=b+(a<<4)|0;while(1){a=a+ -16|0;if((b|0)!=(a|0)){continue}break}}jl(c)}}function Di(a,b){var c=0,d=0,e=0;d=R-16|0;R=d;e=yk(88);c=e;o[c>>2]=0;o[c+4>>2]=0;o[c+64>>2]=0;o[c+68>>2]=0;o[c+56>>2]=0;o[c+48>>2]=0;o[c+52>>2]=0;o[c+40>>2]=0;o[c+44>>2]=0;o[c+32>>2]=0;o[c+36>>2]=0;o[c+24>>2]=0;o[c+28>>2]=0;o[c+16>>2]=0;o[c+20>>2]=0;o[c+8>>2]=0;o[c+12>>2]=0;o[c+72>>2]=0;o[c+76>>2]=0;o[c+80>>2]=0;o[c+84>>2]=0;o[c+60>>2]=c;o[d+8>>2]=c;a:{if(Ei(c,b)){o[a>>2]=e;o[d+8>>2]=0;break a}o[a>>2]=0;o[d+8>>2]=0;za(d+8|0,e)}R=d+16|0}function Ka(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{f=o[a+8>>2];d=o[a+4>>2];b:{if(f-d>>>0>=b>>>0){while(1){m[d|0]=0;d=o[a+4>>2]+1|0;o[a+4>>2]=d;b=b+ -1|0;if(b){continue}break b}}e=o[a>>2];h=d-e|0;c=h+b|0;if((c|0)<=-1){break a}f=f-e|0;i=f<<1;c=f>>>0<1073741823?i>>>0>>0?c:i:2147483647;if(c){g=yk(c)}ml(g+h|0,0,b);c=c+g|0;b=((b+d|0)-e|0)+g|0;if((h|0)>=1){ll(g,e,h)}o[a+8>>2]=c;o[a+4>>2]=b;o[a>>2]=g;if(!e){break b}jl(e)}return}Nk();D()}function vi(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{if(a>>>0>10){break a}f=o[c+16>>2];d=o[c+12>>2];e=o[c+20>>2];g=e;if((d|0)<(g|0)?1:(d|0)<=(g|0)?r[c+8>>2]>f>>>0?0:1:0){break a}h=m[f+o[c>>2]|0];d=f+1|0;if(d>>>0<1){e=e+1|0}o[c+16>>2]=d;o[c+20>>2]=e;g=b;f=b;d=h;b:{if((d|0)<=-1){if(!vi(a+1|0,b,c)){break a}a=b;c=o[b+4>>2];b=o[b>>2];e=c<<7|b>>>25;b=b<<7;o[a>>2]=b;o[a+4>>2]=e;a=d&127|b;break b}e=0;a=d&255}o[f>>2]=a;o[g+4>>2]=e;i=1}return i}function sg(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{if(a>>>0>10){break a}f=o[c+16>>2];d=o[c+12>>2];e=o[c+20>>2];g=e;if((d|0)<(g|0)?1:(d|0)<=(g|0)?r[c+8>>2]>f>>>0?0:1:0){break a}h=m[f+o[c>>2]|0];d=f+1|0;if(d>>>0<1){e=e+1|0}o[c+16>>2]=d;o[c+20>>2]=e;g=b;f=b;d=h;b:{if((d|0)<=-1){if(!sg(a+1|0,b,c)){break a}a=b;c=o[b+4>>2];b=o[b>>2];e=c<<7|b>>>25;b=b<<7;o[a>>2]=b;o[a+4>>2]=e;a=d&127|b;break b}e=0;a=d&255}o[f>>2]=a;o[g+4>>2]=e;i=1}return i}function sd(a,b){var c=0,d=0,e=0;d=o[a>>2];a:{if(!d){break a}c=o[b>>2];if(!c){break a}e=d;d=o[c>>2];pi(e,d,o[c+4>>2]-d|0,0);m[a+24|0]=p[b+24|0];o[a+28>>2]=o[b+28>>2];m[a+32|0]=p[b+32|0];c=o[b+44>>2];o[a+40>>2]=o[b+40>>2];o[a+44>>2]=c;c=o[b+52>>2];o[a+48>>2]=o[b+48>>2];o[a+52>>2]=c;o[a+56>>2]=o[b+56>>2];c=o[b+12>>2];o[a+8>>2]=o[b+8>>2];o[a+12>>2]=c;c=o[b+20>>2];o[a+16>>2]=o[b+16>>2];o[a+20>>2]=c;o[a+60>>2]=o[b+60>>2];e=1}return e}function Uj(a,b){var c=0;c=(b|0)!=0;a:{b:{c:{d:{if(!b|!(a&3)){break d}while(1){if(!p[a|0]){break c}a=a+1|0;b=b+ -1|0;c=(b|0)!=0;if(!b){break d}if(a&3){continue}break}}if(!c){break b}}if(!p[a|0]){break a}e:{if(b>>>0>=4){while(1){c=o[a>>2];if((c^-1)&c+ -16843009&-2139062144){break e}a=a+4|0;b=b+ -4|0;if(b>>>0>3){continue}break}}if(!b){break b}}while(1){if(!p[a|0]){break a}a=a+1|0;b=b+ -1|0;if(b){continue}break}}return 0}return a}function Ki(a,b,c){var d=0,e=0,f=0;o[a+8>>2]=0;o[a>>2]=0;o[a+4>>2]=0;a:{b:{if(!b){break b}if((b|0)<=-1){break a}e=b+ -1>>>5|0;f=e+1|0;d=yk(f<<2);o[a+8>>2]=f;o[a>>2]=d;f=p[c|0];o[a+4>>2]=b;o[(b>>>0<33?d:d+(e<<2)|0)>>2]=0;c=b>>>5|0;e=c<<2;if(f){d=ml(d,255,e);b=b&31;if(!b){break b}c=d+(c<<2)|0;o[c>>2]=o[c>>2]|-1>>>32-b;return a}d=ml(d,0,e);b=b&31;if(!b){break b}c=d+(c<<2)|0;o[c>>2]=o[c>>2]&(-1>>>32-b^-1)}return a}Nk();D()}function Wh(a,b){var c=0,d=0,e=v(0),f=0;c=2;a:{if((b|0)==1){break a}c=b;if(!(b+ -1&b)){break a}c=_j(b)}d=o[a+4>>2];if(c>>>0>d>>>0){Xh(a,c);return}b:{if(c>>>0>=d>>>0){break b}f=d>>>0<3;e=v(B(v(v(r[a+12>>2])/s[a+16>>2])));c:{if(e=v(0)){b=~~e>>>0;break c}b=0}d:{e:{if(f){break e}if(Rl(d)>>>0>1){break e}b=b>>>0<2?b:1<<32-x(b+ -1|0);break d}b=_j(b)}b=c>>>0>>0?b:c;if(b>>>0>=d>>>0){break b}Xh(a,b)}}function sf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;d=R-16|0;R=d;a:{b:{if(p[o[a+4>>2]+36|0]<=1){b=o[a+24>>2];break b}g=o[c+16>>2];e=o[c+12>>2];f=o[c+20>>2];b=f;h=0;if((e|0)<(b|0)?1:(e|0)<=(b|0)?r[c+8>>2]>g>>>0?0:1:0){break a}b=p[g+o[c>>2]|0];e=g+1|0;if(e>>>0<1){f=f+1|0}o[c+16>>2]=e;o[c+20>>2]=f;o[a+24>>2]=b}o[d+12>>2]=-1;o[d+8>>2]=1116;o[(d+8|0)+4>>2]=b;h=od(d+8|0,o[a+16>>2])}a=h;R=d+16|0;return a|0}function ne(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=m[o[a+8>>2]+24|0];e=c+c|0;g=yk(e>>>0>>0?-1:e);d=o[a+16>>2];e=0;a:{if(!o[d+80>>2]){break a}e=o[o[d>>2]>>2]+o[d+48>>2]|0}if(b){h=c<<1;while(1){d=i;f=0;if((c|0)>0){while(1){n[(f<<1)+g>>1]=o[(d<<2)+e>>2];d=d+1|0;f=f+1|0;if((f|0)!=(c|0)){continue}break}i=c+i|0}ll(o[o[o[a+8>>2]+64>>2]>>2]+j|0,g,h);j=h+j|0;k=k+1|0;if((k|0)!=(b|0)){continue}break}}jl(g)}function ma(a,b){var c=0,d=0,e=0,f=0,g=0;c=R-32|0;R=c;o[c+24>>2]=0;o[c+28>>2]=0;o[c+16>>2]=0;o[c+8>>2]=0;o[c+12>>2]=0;d=rl(b);if(d>>>0<4294967280){a:{b:{if(d>>>0>=11){e=d+16&-16;f=yk(e);o[c+16>>2]=e|-2147483648;o[c+8>>2]=f;o[c+12>>2]=d;e=c+8|0;break b}m[c+19|0]=d;e=c+8|0;f=e;if(!d){break a}}ll(f,b,d)}m[d+f|0]=0;lj(a,c+8|0,c+24|0);g=t[c+24>>3];if(m[e+11|0]<=-1){jl(o[c+8>>2])}R=c+32|0;return g}Ak();D()}function na(a,b,c){var d=0,e=0,f=0,g=0;d=R-16|0;R=d;o[d+8>>2]=0;o[d>>2]=0;o[d+4>>2]=0;e=rl(c);if(e>>>0<4294967280){a:{b:{if(e>>>0>=11){g=e+16&-16;f=yk(g);o[d+8>>2]=g|-2147483648;o[d>>2]=f;o[d+4>>2]=e;break b}m[d+11|0]=e;f=d;if(!e){break a}}ll(f,c,e)}m[e+f|0]=0;a=a+16|0;c=0;c:{if(!mj(b,d,a)){break c}c=o[a>>2];if(m[a+11|0]<=-1){break c}c=a}if(m[d+11|0]<=-1){jl(o[d>>2])}R=d+16|0;return c}Ak();D()}function di(a){a=a|0;var b=0,c=0,d=0,e=0;a:{b=o[a+8>>2];b:{if((b|0)<0){break b}c=o[a+4>>2];e=o[c>>2];d=o[c+4>>2]-e>>2;c:{if(b>>>0>d>>>0){ei(c,b-d|0);b=o[a+8>>2];break c}if(b>>>0>=d>>>0){break c}o[c+4>>2]=e+(b<<2)}e=1;if((b|0)<1){break b}a=o[a+4>>2];c=o[a>>2];d=o[a+4>>2]-c>>2;a=0;while(1){if((a|0)==(d|0)){break a}o[c+(a<<2)>>2]=a;a=a+1|0;if((a|0)<(b|0)){continue}break}}return e|0}Ok();D()}function ch(a,b){var c=0,d=0,e=0,f=0;d=o[a+12>>2];c=o[a+16>>2]-d>>2;a:{if(c>>>0>>0){Ia(a+12|0,b-c|0);break a}if(c>>>0<=b>>>0){break a}o[a+16>>2]=d+(b<<2)}b:{c=o[a>>2];c:{if(o[a+8>>2]-c>>2>>>0>=b>>>0){break c}if(b>>>0>=1073741824){break b}d=o[a+4>>2];e=b<<2;b=yk(e);e=b+e|0;d=d-c|0;f=d+b|0;if((d|0)>=1){ll(b,c,d)}o[a+8>>2]=e;o[a+4>>2]=f;o[a>>2]=b;if(!c){break c}jl(c)}return}db(8832);D()}function xh(a,b){var c=0,d=0,e=0;a:{if((a|0)!=(b|0)){e=a;c=o[b+4>>2];d=0;b:{if(!c){break b}c:{if(c>>>0<=o[a+8>>2]<<5>>>0){d=o[a>>2];break c}d=o[a>>2];if(d){jl(d);o[a+8>>2]=0;o[a>>2]=0;o[a+4>>2]=0;c=o[b+4>>2]}if((c|0)<=-1){break a}c=(c+ -1>>>5|0)+1|0;d=yk(c<<2);o[a+8>>2]=c;o[a+4>>2]=0;o[a>>2]=d;c=o[b+4>>2]}nl(d,o[b>>2],(c+ -1>>>3&536870908)+4|0);d=o[b+4>>2]}o[e+4>>2]=d}return}Nk();D()}function kj(a,b,c){var d=0,e=0,f=0;a:{b=Ai(a,b);b:{if((b|0)==(a+4|0)){break b}a=o[b+28>>2];d=o[b+32>>2];if((a|0)==(d|0)){break b}a=d-a|0;if(a&3){break b}d=a>>>2|0;e=o[c+4>>2];a=o[c>>2];f=e-a>>2;c:{if(d>>>0>f>>>0){Ia(c,d-f|0);a=o[c>>2];e=o[c+4>>2];break c}if(d>>>0>=f>>>0){break c}e=(d<<2)+a|0;o[c+4>>2]=e}if((a|0)==(e|0)){break a}c=a;a=o[b+28>>2];ll(c,a,o[b+32>>2]-a|0)}return}Ok();D()}function Tg(a,b){var c=0;c=o[b+8>>2];o[a+12>>2]=o[b+4>>2];o[a+16>>2]=c;o[a+28>>2]=o[b+20>>2];c=o[b+16>>2];o[a+20>>2]=o[b+12>>2];o[a+24>>2]=c;xh(a+32|0,b+24|0);xh(a+44|0,b+36|0);if((a+8|0)==(b|0)){o[a+92>>2]=o[b+84>>2];return}yd(a+56|0,o[b+48>>2],o[b+52>>2]);yd(a+68|0,o[b+60>>2],o[b- -64>>2]);yd(a+80|0,o[b+72>>2],o[b+76>>2]);o[a+92>>2]=o[b+84>>2];kd(a+96|0,o[b+88>>2],o[b+92>>2])}function hj(a,b){var c=0,d=0,e=0;c=o[b+4>>2];a:{if(!c){d=o[b+8>>2];if(o[d>>2]==(b|0)){break a}e=b+8|0;while(1){c=o[e>>2];e=c+8|0;d=o[c+8>>2];if((c|0)!=o[d>>2]){continue}break}break a}while(1){d=c;c=o[c>>2];if(c){continue}break}}if(o[a>>2]==(b|0)){o[a>>2]=d}o[a+8>>2]=o[a+8>>2]+ -1;pj(o[a+4>>2],b);a=o[b+28>>2];if(a){o[b+32>>2]=a;jl(a)}if(m[b+27|0]<=-1){jl(o[b+16>>2])}jl(b)}function Gg(a){a=a|0;var b=0,c=0,d=0,e=0;o[a>>2]=8120;b=o[a+48>>2];o[a+48>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}o[a>>2]=10116;b=o[a+20>>2];if(b){o[a+24>>2]=b;jl(b)}d=o[a+8>>2];if(d){b=d;c=o[a+12>>2];e=b;a:{if((b|0)==(c|0)){break a}while(1){c=c+ -4|0;b=o[c>>2];o[c>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}e=o[a+8>>2]}b=e;o[a+12>>2]=d;jl(b)}return a|0}function Hg(a){a=a|0;var b=0,c=0,d=0,e=0;o[a>>2]=8120;b=o[a+48>>2];o[a+48>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}o[a>>2]=10116;b=o[a+20>>2];if(b){o[a+24>>2]=b;jl(b)}d=o[a+8>>2];if(d){b=d;c=o[a+12>>2];e=b;a:{if((b|0)==(c|0)){break a}while(1){c=c+ -4|0;b=o[c>>2];o[c>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}e=o[a+8>>2]}b=e;o[a+12>>2]=d;jl(b)}jl(a)}function Lf(a,b,c){a=a|0;b=b|0;c=c|0;b=R-32|0;R=b;a:{if(p[o[a+4>>2]+36|0]>=2){c=0;if(!l[o[o[a>>2]+52>>2]](a)){break a}}o[b+24>>2]=0;o[b+28>>2]=0;o[b+16>>2]=0;o[b+20>>2]=0;o[b+12>>2]=-1;o[b+8>>2]=1232;jd(b+8|0,o[a+24>>2],o[a+28>>2],m[o[a+8>>2]+24|0],s[a+32>>2]);c=od(b+8|0,o[a+16>>2]);o[b+8>>2]=1232;a=o[b+16>>2];if(!a){break a}o[b+20>>2]=a;jl(a)}R=b+32|0;return c|0}function ka(a,b){var c=0,d=0,e=0,f=0;c=R-16|0;R=c;o[c+12>>2]=0;o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0;d=rl(b);if(d>>>0<4294967280){a:{b:{if(d>>>0>=11){e=d+16&-16;f=yk(e);o[c+8>>2]=e|-2147483648;o[c>>2]=f;o[c+4>>2]=d;e=c;break b}m[c+11|0]=d;e=c;f=c;if(!d){break a}}ll(f,b,d)}m[d+f|0]=0;jj(a,c,c+12|0);a=o[c+12>>2];if(m[e+11|0]<=-1){jl(o[c>>2])}R=c+16|0;return a}Ak();D()}function Fk(a,b,c,d,e,f,g){var h=0,i=0,j=0;h=R-16|0;R=h;if((b^-1)+ -17>>>0>=c>>>0){i=nk(a);a:{if(2147483623>b>>>0){o[h+8>>2]=b<<1;o[h+12>>2]=b+c;c=sk(o[fk(h+12|0,h+8|0)>>2]);break a}c=-18}j=c+1|0;c=tk(j);if(f){ek(c,g,f)}d=d-e|0;g=d;if(d){ek(c+f|0,e+i|0,g)}if((b|0)!=10){jl(i)}uk(a,c);vk(a,j);b=a;a=d+f|0;qk(b,a);m[h+7|0]=0;pk(a+c|0,h+7|0);R=h+16|0;return}Ak();D()}function le(a,b,c){var d=0,e=0,f=0,g=0;d=R-80|0;R=d;e=qd(d+16|0);f=o[o[a+8>>2]+56>>2];g=c<<24>>24;c=u(xi(5),c);rd(e,f,g,5,0,c,c>>31);c=yk(96);e=vd(c,e);m[c+84|0]=1;o[c+72>>2]=o[c+68>>2];wd(e,b);o[d>>2]=0;o[d+8>>2]=0;b=o[a+16>>2];o[a+16>>2]=c;a:{if(!b){o[d>>2]=0;break a}Kb(b);a=o[d>>2];o[d>>2]=0;if(!a){break a}Kb(a)}a=o[d+8>>2];o[d+8>>2]=0;if(a){Kb(a)}R=d+80|0}function ql(a,b,c){var d=0,e=0,f=0;a:{d=o[c+16>>2];if(!d){if(ol(c)){break a}d=o[c+16>>2]}f=o[c+20>>2];if(d-f>>>0>>0){l[o[c+36>>2]](c,a,b)|0;return}b:{if(m[c+75|0]<0){break b}d=b;while(1){e=d;if(!e){break b}d=e+ -1|0;if(p[d+a|0]!=10){continue}break}if(l[o[c+36>>2]](c,a,e)>>>0>>0){break a}b=b-e|0;a=a+e|0;f=o[c+20>>2]}ll(f,a,b);o[c+20>>2]=o[c+20>>2]+b}}function Tj(a){var b=0,c=0,d=0,e=0,f=0,g=0;while(1){b=a;a=b+1|0;c=m[b|0];if((c|0)==32|c+ -9>>>0<5){continue}break}c=m[b|0];e=c+ -43|0;a:{if(e>>>0>2){break a}b:{switch(e-1|0){case 1:f=1;break;case 0:break a;default:break b}}c=m[a|0];b=a;g=f}if(Bj(c)){while(1){d=(u(d,10)-m[b|0]|0)+48|0;a=m[b+1|0];b=b+1|0;if(Bj(a)){continue}break}}return g?d:0-d|0}function Aa(a,b){var c=0,d=0,e=0;c=R-16|0;R=c;o[a+68>>2]=0;o[a+72>>2]=0;o[a>>2]=b;Zi(c+8|0,b);d=o[c+8>>2];o[c+8>>2]=0;e=o[a+4>>2];o[a+4>>2]=d;a:{if(!e){o[c+8>>2]=0;break a}d=a+4|0;za(d,e);e=o[c+8>>2];o[c+8>>2]=0;if(e){za(c+8|0,e)}d=o[d>>2]}if(d){d=o[b+100>>2];b=o[b+96>>2];m[c+7|0]=0;eb(a+56|0,(d-b|0)/12|0,c+7|0);a=1}else{a=0}R=c+16|0;return a}function cl(a,b,c,d){m[a+53|0]=1;a:{if(o[a+4>>2]!=(c|0)){break a}m[a+52|0]=1;c=o[a+16>>2];if(!c){o[a+36>>2]=1;o[a+24>>2]=d;o[a+16>>2]=b;if((d|0)!=1|o[a+48>>2]!=1){break a}m[a+54|0]=1;return}if((b|0)==(c|0)){c=o[a+24>>2];if((c|0)==2){o[a+24>>2]=d;c=d}if(o[a+48>>2]!=1|(c|0)!=1){break a}m[a+54|0]=1;return}m[a+54|0]=1;o[a+36>>2]=o[a+36>>2]+1}}function ia(a,b){var c=0,d=0,e=0,f=0;c=R-16|0;R=c;o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0;d=rl(b);if(d>>>0<4294967280){a:{b:{if(d>>>0>=11){e=d+16&-16;f=yk(e);o[c+8>>2]=e|-2147483648;o[c>>2]=f;o[c+4>>2]=d;e=c;break b}m[c+11|0]=d;e=c;f=c;if(!d){break a}}ll(f,b,d)}m[d+f|0]=0;a=ja(a,c);if(m[e+11|0]<=-1){jl(o[c>>2])}R=c+16|0;return(a|0)!=0}Ak();D()}function Zk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=R+ -64|0;R=d;e=1;a:{if(Yk(a,b,0)){break a}e=0;if(!b){break a}b=_k(b);e=0;if(!b){break a}o[d+20>>2]=-1;o[d+16>>2]=a;o[d+12>>2]=0;o[d+8>>2]=b;ml(d+24|0,0,39);o[d+56>>2]=1;l[o[o[b>>2]+28>>2]](b,d+8|0,o[c>>2],1);e=0;if(o[d+32>>2]!=1){break a}o[c>>2]=o[d+24>>2];e=1}R=d- -64|0;return e|0}function qg(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}f=o[c+16>>2];d=o[c+12>>2];e=o[c+20>>2];if((d|0)<(e|0)?1:(d|0)<=(e|0)?r[c+8>>2]>f>>>0?0:1:0){break a}d=p[f+o[c>>2]|0];f=f+1|0;if(f>>>0<1){e=e+1|0}o[c+16>>2]=f;o[c+20>>2]=e;e=b;if(d&128){if(!qg(a+1|0,b,c)){break a}a=o[b>>2]<<7;o[b>>2]=a;d=a|d&127}o[e>>2]=d;g=1}return g}function bj(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}f=o[c+16>>2];d=o[c+12>>2];e=o[c+20>>2];if((d|0)<(e|0)?1:(d|0)<=(e|0)?r[c+8>>2]>f>>>0?0:1:0){break a}d=p[f+o[c>>2]|0];f=f+1|0;if(f>>>0<1){e=e+1|0}o[c+16>>2]=f;o[c+20>>2]=e;e=b;if(d&128){if(!bj(a+1|0,b,c)){break a}a=o[b>>2]<<7;o[b>>2]=a;d=a|d&127}o[e>>2]=d;g=1}return g}function Zh(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}f=o[c+16>>2];d=o[c+12>>2];e=o[c+20>>2];if((d|0)<(e|0)?1:(d|0)<=(e|0)?r[c+8>>2]>f>>>0?0:1:0){break a}d=p[f+o[c>>2]|0];f=f+1|0;if(f>>>0<1){e=e+1|0}o[c+16>>2]=f;o[c+20>>2]=e;e=b;if(d&128){if(!Zh(a+1|0,b,c)){break a}a=o[b>>2]<<7;o[b>>2]=a;d=a|d&127}o[e>>2]=d;g=1}return g}function Xg(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}f=o[c+16>>2];d=o[c+12>>2];e=o[c+20>>2];if((d|0)<(e|0)?1:(d|0)<=(e|0)?r[c+8>>2]>f>>>0?0:1:0){break a}d=p[f+o[c>>2]|0];f=f+1|0;if(f>>>0<1){e=e+1|0}o[c+16>>2]=f;o[c+20>>2]=e;e=b;if(d&128){if(!Xg(a+1|0,b,c)){break a}a=o[b>>2]<<7;o[b>>2]=a;d=a|d&127}o[e>>2]=d;g=1}return g}function Ug(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=R-16|0;R=d;o[a+4>>2]=b;b=o[b+64>>2];e=o[b>>2];b=o[b+4>>2];m[d+15|0]=0;eb(a+24|0,(b-e>>2>>>0)/3|0,d+15|0);b=o[a+4>>2];e=o[b+56>>2];b=o[b+52>>2];m[d+14|0]=0;eb(a+36|0,e-b>>2,d+14|0);b=o[c+12>>2];o[a+16>>2]=o[c+8>>2];o[a+20>>2]=b;b=o[c+4>>2];o[a+8>>2]=o[c>>2];o[a+12>>2]=b;R=d+16|0}function Tf(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}f=o[c+16>>2];d=o[c+12>>2];e=o[c+20>>2];if((d|0)<(e|0)?1:(d|0)<=(e|0)?r[c+8>>2]>f>>>0?0:1:0){break a}d=p[f+o[c>>2]|0];f=f+1|0;if(f>>>0<1){e=e+1|0}o[c+16>>2]=f;o[c+20>>2]=e;e=b;if(d&128){if(!Tf(a+1|0,b,c)){break a}a=o[b>>2]<<7;o[b>>2]=a;d=a|d&127}o[e>>2]=d;g=1}return g}function Ge(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}f=o[c+16>>2];d=o[c+12>>2];e=o[c+20>>2];if((d|0)<(e|0)?1:(d|0)<=(e|0)?r[c+8>>2]>f>>>0?0:1:0){break a}d=p[f+o[c>>2]|0];f=f+1|0;if(f>>>0<1){e=e+1|0}o[c+16>>2]=f;o[c+20>>2]=e;e=b;if(d&128){if(!Ge(a+1|0,b,c)){break a}a=o[b>>2]<<7;o[b>>2]=a;d=a|d&127}o[e>>2]=d;g=1}return g}function Cd(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}f=o[c+16>>2];d=o[c+12>>2];e=o[c+20>>2];if((d|0)<(e|0)?1:(d|0)<=(e|0)?r[c+8>>2]>f>>>0?0:1:0){break a}d=p[f+o[c>>2]|0];f=f+1|0;if(f>>>0<1){e=e+1|0}o[c+16>>2]=f;o[c+20>>2]=e;e=b;if(d&128){if(!Cd(a+1|0,b,c)){break a}a=o[b>>2]<<7;o[b>>2]=a;d=a|d&127}o[e>>2]=d;g=1}return g}function rl(a){var b=0,c=0,d=0;a:{b:{b=a;if(!(b&3)){break b}if(!p[a|0]){return 0}while(1){b=b+1|0;if(!(b&3)){break b}if(p[b|0]){continue}break}break a}while(1){c=b;b=b+4|0;d=o[c>>2];if(!((d^-1)&d+ -16843009&-2139062144)){continue}break}if(!(d&255)){return c-a|0}while(1){d=p[c+1|0];b=c+1|0;c=b;if(d){continue}break}}return b-a|0}function ie(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=R-48|0;R=e;a:{if((d|0)!=1){o[a>>2]=0;break a}d=o[b+4>>2];b=o[b+12>>2];o[e+40>>2]=0;f=e+32|0;o[f>>2]=0;o[f+4>>2]=0;o[e+24>>2]=0;o[e+28>>2]=0;o[e+16>>2]=0;o[e+20>>2]=0;o[e+8>>2]=0;o[e+12>>2]=0;je(e,c,b,d,e+8|0);b=o[f>>2];if(b){o[e+36>>2]=b;jl(b)}o[a>>2]=o[e>>2]}R=e+48|0}function Da(a,b,c){var d=0,e=0,f=0,g=0;a:{if(r[a+80>>2]>65535){break a}d=b;e=o[a+96>>2];b=o[a+100>>2]-e|0;a=(b|0)/12|0;if((d|0)!=(u(a,6)|0)){break a}f=1;if(!b){break a}g=a>>>0>1?a:1;a=0;while(1){b=u(a,6)+c|0;d=u(a,12)+e|0;n[b>>1]=o[d>>2];n[b+2>>1]=o[d+4>>2];n[b+4>>1]=o[d+8>>2];a=a+1|0;if((g|0)!=(a|0)){continue}break}}return f}function Rd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;d=1;a:{if((l[o[o[b>>2]+20>>2]](b)|0)<1){break a}d=0;while(1){c=rj(o[o[a+4>>2]+4>>2],l[o[o[b>>2]+24>>2]](b,e)|0);if((c|0)==-1){break a}c=mi(o[a+4>>2],c);if(!c){break a}if(!l[o[o[b>>2]+28>>2]](b,c)){break a}e=e+1|0;if((e|0)<(l[o[o[b>>2]+20>>2]](b)|0)){continue}break}d=1}return d|0}function fl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;if(Yk(a,o[b+8>>2],e)){dl(b,c,d);return}a:{if(!Yk(a,o[b>>2],e)){break a}if(!(o[b+20>>2]!=(c|0)?o[b+16>>2]!=(c|0):0)){if((d|0)!=1){break a}o[b+32>>2]=1;return}o[b+20>>2]=c;o[b+32>>2]=d;o[b+40>>2]=o[b+40>>2]+1;if(!(o[b+36>>2]!=1|o[b+24>>2]!=2)){m[b+54|0]=1}o[b+44>>2]=4}}function Vi(a){o[a>>2]=0;o[a+4>>2]=0;o[a+28>>2]=0;o[a+32>>2]=0;m[a+24|0]=1;o[a+16>>2]=0;o[a+20>>2]=0;o[a+8>>2]=0;o[a+12>>2]=0;o[a+36>>2]=0;o[a+40>>2]=0;o[a+44>>2]=0;o[a+48>>2]=0;o[a+52>>2]=0;o[a+56>>2]=0;o[a+60>>2]=0;o[a+64>>2]=0;o[a+72>>2]=0;o[a+76>>2]=0;o[a+80>>2]=0;o[a+84>>2]=0;o[a+88>>2]=0;o[a+92>>2]=0;o[a+68>>2]=a}function Nj(a,b,c){var d=0,e=0,f=0;a:{if((b|0)==1&a>>>0<0|b>>>0<1){d=a;break a}while(1){d=Ql(a,b,10,0);e=T;f=e;e=Ol(d,e,10,0);c=c+ -1|0;m[c|0]=a-e|48;e=(b|0)==9&a>>>0>4294967295|b>>>0>9;a=d;b=f;if(e){continue}break}}if(d){while(1){c=c+ -1|0;a=(d>>>0)/10|0;m[c|0]=d-u(a,10)|48;b=d>>>0>9;d=a;if(b){continue}break}}return c}function wh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=R-16|0;R=d;o[a+4>>2]=b;e=o[b>>2];b=o[b+4>>2];m[d+15|0]=0;eb(a+24|0,(b-e>>2>>>0)/3|0,d+15|0);b=o[a+4>>2];e=o[b+28>>2];b=o[b+24>>2];m[d+14|0]=0;eb(a+36|0,e-b>>2,d+14|0);b=o[c+12>>2];o[a+16>>2]=o[c+8>>2];o[a+20>>2]=b;b=o[c+4>>2];o[a+8>>2]=o[c>>2];o[a+12>>2]=b;R=d+16|0}function ae(a,b,c){a=a|0;b=b|0;c=c|0;if(c>>>0>3){o[a>>2]=0;return}a:{b:{switch(c-1|0){default:b=yk(20);Ld(b);break a;case 0:b=yk(24);ee(b);break a;case 1:b=yk(36);ee(b);o[b+32>>2]=0;o[b+24>>2]=-1;o[b+28>>2]=0;o[b>>2]=7720;break a;case 2:break b}}b=yk(28);ee(b);o[b+24>>2]=-1;o[b>>2]=5584;o[a>>2]=b;return}o[a>>2]=b}function wa(a,b,c){var d=0,e=0,f=0;d=R-16|0;R=d;e=o[a+96>>2];o[d+8>>2]=0;o[d>>2]=0;o[d+4>>2]=0;a=yk(12);o[d>>2]=a;o[d+4>>2]=a;f=a+12|0;o[d+8>>2]=f;a=ll(a,e+u(b,12)|0,12);b=a+12|0;o[d+4>>2]=b;e=o[c>>2];if(e){o[c+4>>2]=e;jl(e);o[c+8>>2]=0;o[c>>2]=0;o[c+4>>2]=0}o[c+8>>2]=f;o[c+4>>2]=b;o[c>>2]=a;R=d+16|0;return 1}function ii(a){var b=0,c=0,d=0,e=0;if(a){d=o[a+24>>2];if(d){b=d;c=o[a+28>>2];e=b;a:{if((c|0)==(b|0)){break a}while(1){c=c+ -4|0;b=o[c>>2];o[c>>2]=0;if(b){Kc(b+12|0,o[b+16>>2]);Lc(b,o[b+4>>2]);jl(b)}if((c|0)!=(d|0)){continue}break}e=o[a+24>>2]}b=e;o[a+28>>2]=d;jl(b)}Kc(a+12|0,o[a+16>>2]);Lc(a,o[a+4>>2]);jl(a)}}function Ci(a){var b=0;o[a>>2]=0;o[a+4>>2]=0;o[a+56>>2]=0;o[a+48>>2]=0;o[a+52>>2]=0;o[a+40>>2]=0;o[a+44>>2]=0;o[a+32>>2]=0;o[a+36>>2]=0;o[a+24>>2]=0;o[a+28>>2]=0;o[a+16>>2]=0;o[a+20>>2]=0;o[a+8>>2]=0;o[a+12>>2]=0;b=a- -64|0;o[b>>2]=0;o[b+4>>2]=0;o[a+72>>2]=0;o[a+76>>2]=0;o[a+80>>2]=0;o[a+84>>2]=0;o[a+60>>2]=a}function dg(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;if(!a){return 1}e=o[c+16>>2];h=o[c+12>>2];g=o[c+20>>2];f=g;a:{if((h|0)<(f|0)?1:(h|0)<=(f|0)?r[c+8>>2]>e>>>0?0:1:0){break a}f=p[e+o[c>>2]|0];e=e+1|0;if(e>>>0<1){g=g+1|0}o[c+16>>2]=e;o[c+20>>2]=g;if(f>>>0>1){break a}if(f-1){return eg(a,b,c,d)}i=fg(a,c,d)}return i}function Si(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=R-16|0;R=d;e=o[c>>2];o[c>>2]=0;o[d+8>>2]=e;wj(a,b,d+8|0);c=o[d+8>>2];o[d+8>>2]=0;if(c){Kb(c)}e=o[a+84>>2];c=o[a+88>>2]-e>>2;a:{if((c|0)>(b|0)){break a}b=b+1|0;if(b>>>0>c>>>0){Ti(a+84|0,b-c|0);break a}if(b>>>0>=c>>>0){break a}o[a+88>>2]=e+(b<<2)}R=d+16|0}function Bg(a){a=a|0;var b=0,c=0,d=0,e=0;o[a>>2]=10116;b=o[a+20>>2];if(b){o[a+24>>2]=b;jl(b)}d=o[a+8>>2];if(d){b=d;c=o[a+12>>2];e=b;a:{if((b|0)==(c|0)){break a}while(1){c=c+ -4|0;b=o[c>>2];o[c>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}e=o[a+8>>2]}b=e;o[a+12>>2]=d;jl(b)}return a|0}function Jk(a,b,c,d,e){var f=0,g=0,h=0;f=R-16|0;R=f;if(-17-b>>>0>=c>>>0){g=nk(a);a:{if(2147483623>b>>>0){o[f+8>>2]=b<<1;o[f+12>>2]=b+c;c=sk(o[fk(f+12|0,f+8|0)>>2]);break a}c=-18}h=c+1|0;c=tk(h);if(e){ek(c,g,e)}d=d-e|0;if(d){ek(c+e|0,e+g|0,d)}if((b|0)!=10){jl(g)}uk(a,c);vk(a,h);R=f+16|0;return}Ak();D()}function bi(a){a=a|0;var b=0,c=0,d=0,e=0;o[a>>2]=10116;b=o[a+20>>2];if(b){o[a+24>>2]=b;jl(b)}d=o[a+8>>2];if(d){b=d;c=o[a+12>>2];e=b;a:{if((b|0)==(c|0)){break a}while(1){c=c+ -4|0;b=o[c>>2];o[c>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}e=o[a+8>>2]}b=e;o[a+12>>2]=d;jl(b)}jl(a)}function xk(a,b,c){var d=0,e=0,f=0,g=0;e=R-16|0;R=e;d=c-b|0;if(d>>>0<=4294967279){a:{if(d>>>0<=10){rk(a,d);f=a;break a}g=sk(d)+1|0;f=tk(g);uk(a,f);vk(a,g);qk(a,d)}d=c-b|0;a=f;while(1){if((b|0)!=(c|0)){pk(a,b);a=a+1|0;b=b+1|0;continue}break}m[e+15|0]=0;pk(d+f|0,e+15|0);R=e+16|0;return}Ak();D()}function Ea(a,b,c){var d=0,e=0,f=0,g=0;e=o[a+96>>2];d=o[a+100>>2]-e|0;a=(d|0)/12|0;a:{if((b|0)!=(d|0)){break a}f=1;if(!b){break a}g=a>>>0>1?a:1;a=0;while(1){d=u(a,12);b=d+c|0;d=d+e|0;o[b>>2]=o[d>>2];o[b+4>>2]=o[d+4>>2];o[b+8>>2]=o[d+8>>2];a=a+1|0;if((g|0)!=(a|0)){continue}break}}return f}function wd(a,b){var c=0,d=0;a:{if(o[a+64>>2]){break a}d=yk(32);oi(d);c=o[a+64>>2];o[a+64>>2]=d;if(!c){break a}d=o[c>>2];if(d){o[c+4>>2]=d;jl(d)}jl(c)}c=xi(o[a+28>>2]);c=u(c,m[a+24|0]);d=c;c=c>>31;if(pi(o[a+64>>2],0,Ol(d,c,b,0),T)){td(a,o[a+64>>2],d,c);o[a+80>>2]=b;a=1}else{a=0}return a}function zh(a){a=a|0;var b=0;o[a+8>>2]=9152;o[a>>2]=8940;b=o[a+96>>2];if(b){o[a+100>>2]=b;jl(b)}b=o[a+80>>2];if(b){o[a+84>>2]=b;jl(b)}b=o[a+68>>2];if(b){o[a+72>>2]=b;jl(b)}b=o[a+56>>2];if(b){o[a+60>>2]=b;jl(b)}o[a+8>>2]=9388;b=o[a+44>>2];if(b){jl(b)}b=o[a+32>>2];if(b){jl(b)}return a|0}function Ah(a){a=a|0;var b=0;o[a+8>>2]=9152;o[a>>2]=8940;b=o[a+96>>2];if(b){o[a+100>>2]=b;jl(b)}b=o[a+80>>2];if(b){o[a+84>>2]=b;jl(b)}b=o[a+68>>2];if(b){o[a+72>>2]=b;jl(b)}b=o[a+56>>2];if(b){o[a+60>>2]=b;jl(b)}o[a+8>>2]=9388;b=o[a+44>>2];if(b){jl(b)}b=o[a+32>>2];if(b){jl(b)}jl(a)}function cb(a,b){var c=0,d=0;c=o[a+4>>2];if(!c){return 0}b=o[o[o[a+8>>2]+(b<<2)>>2]+60>>2];if((b|0)<0){return 0}a=o[c+24>>2];c=o[c+28>>2];if((a|0)==(c|0)){return 0}a:{while(1){d=o[a>>2];if((b|0)==o[d+24>>2]){break a}a=a+4|0;if((c|0)!=(a|0)){continue}break}return 0}return d}function Pk(a){var b=0;if(o[a+76>>2]<0){a:{if(m[a+75|0]==10){break a}b=o[a+20>>2];if(b>>>0>=r[a+16>>2]){break a}o[a+20>>2]=b+1;m[b|0]=10;return}pl(a);return}b:{c:{if(m[a+75|0]==10){break c}b=o[a+20>>2];if(b>>>0>=r[a+16>>2]){break c}o[a+20>>2]=b+1;m[b|0]=10;break b}pl(a)}}function yh(a){a=a|0;var b=0;o[a>>2]=9152;b=o[a+88>>2];if(b){o[a+92>>2]=b;jl(b)}b=o[a+72>>2];if(b){o[a+76>>2]=b;jl(b)}b=o[a+60>>2];if(b){o[a- -64>>2]=b;jl(b)}b=o[a+48>>2];if(b){o[a+52>>2]=b;jl(b)}o[a>>2]=9388;b=o[a+36>>2];if(b){jl(b)}b=o[a+24>>2];if(b){jl(b)}return a|0}function Zb(a){a=a|0;var b=0,c=0,d=0,e=0;if(a){if(m[a+27|0]<=-1){jl(o[a+16>>2])}c=o[a>>2];if(c){b=c;d=o[a+4>>2];e=b;a:{if((d|0)==(b|0)){break a}while(1){b=d+ -12|0;if(m[d+ -1|0]<=-1){jl(o[b>>2])}d=b;if((b|0)!=(c|0)){continue}break}e=o[a>>2]}b=e;o[a+4>>2]=c;jl(b)}jl(a)}}function jk(){var a=0,b=0,c=0;a=R-16|0;R=a;a:{if(L(a+12|0,a+8|0)){break a}b=il((o[a+12>>2]<<2)+4|0);o[3331]=b;if(!b){break a}b:{b=il(o[a+8>>2]);if(b){c=o[3331];if(c){break b}}o[3331]=0;break a}o[(o[a+12>>2]<<2)+c>>2]=0;if(!M(o[3331],b|0)){break a}o[3331]=0}R=a+16|0}function Uf(a){var b=0,c=0,d=0,e=0,f=0;d=0-p[a+12|0]|0;c=o[a+8>>2];a:{if(c>>>0>4095){break a}b=o[a+4>>2];if((b|0)<1){break a}b=b+ -1|0;o[a+4>>2]=b;c=p[b+o[a>>2]|0]|c<<8;o[a+8>>2]=c}d=d&255;b=u(d,c>>>8|0);e=c&255;f=e>>>0>>0;o[a+8>>2]=f?b+e|0:(c-d|0)-b|0;return f}function Gh(a){a=a|0;var b=0;o[a>>2]=9152;b=o[a+88>>2];if(b){o[a+92>>2]=b;jl(b)}b=o[a+72>>2];if(b){o[a+76>>2]=b;jl(b)}b=o[a+60>>2];if(b){o[a- -64>>2]=b;jl(b)}b=o[a+48>>2];if(b){o[a+52>>2]=b;jl(b)}o[a>>2]=9388;b=o[a+36>>2];if(b){jl(b)}b=o[a+24>>2];if(b){jl(b)}jl(a)}function $f(a,b,c,d){var e=0;e=R-16|0;R=e;c=bg(a,b,e+12|0,e+8|0,c);if(!o[c>>2]){b=yk(40);Bk(b+16|0,d);Bk(b+28|0,d+12|0);o[b+8>>2]=o[e+12>>2];o[b>>2]=0;o[b+4>>2]=0;o[c>>2]=b;d=o[o[a>>2]>>2];if(d){o[a>>2]=d;b=o[c>>2]}ag(o[a+4>>2],b);o[a+8>>2]=o[a+8>>2]+1}R=e+16|0}function Yg(a){var b=0;b=o[a+84>>2];if(b){o[a+88>>2]=b;jl(b)}b=o[a+72>>2];if(b){o[a+76>>2]=b;jl(b)}b=o[a+52>>2];if(b){o[a+56>>2]=b;jl(b)}b=o[a+40>>2];if(b){o[a+44>>2]=b;jl(b)}b=o[a+28>>2];if(b){o[a+32>>2]=b;jl(b)}b=o[a+12>>2];if(b){jl(b)}a=o[a>>2];if(a){jl(a)}}function Ej(a,b){var c=0,d=0,i=0;h(+a);c=e(1)|0;d=e(0)|0;i=c;c=c>>>20&2047;if((c|0)!=2047){if(!c){c=b;if(a==0){b=0}else{a=Ej(a*0x10000000000000000,b);b=o[b>>2]+ -64|0}o[c>>2]=b;return a}o[b>>2]=c+ -1022;f(0,d|0);f(1,i&-2146435073|1071644672);a=+g()}return a}function za(a,b){if(b){a=o[b+76>>2];if(a){o[b+80>>2]=a;jl(a)}a=o[b- -64>>2];if(a){o[b+68>>2]=a;jl(a)}a=o[b+48>>2];if(a){o[b+52>>2]=a;jl(a)}a=o[b+24>>2];if(a){o[b+28>>2]=a;jl(a)}a=o[b+12>>2];if(a){o[b+16>>2]=a;jl(a)}a=o[b>>2];if(a){o[b+4>>2]=a;jl(a)}jl(b)}}function _d(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;c=1;e=l[o[o[a>>2]+24>>2]](a)|0;a:{if((e|0)<1){break a}g=a+48|0;c=0;while(1){f=o[o[a+36>>2]+(d<<2)>>2];if(!l[o[o[f>>2]+20>>2]](f,g,b)){break a}d=d+1|0;if((e|0)!=(d|0)){continue}break}c=1}return c|0}function Zd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;c=1;e=l[o[o[a>>2]+24>>2]](a)|0;a:{if((e|0)<1){break a}g=a+48|0;c=0;while(1){f=o[o[a+36>>2]+(d<<2)>>2];if(!l[o[o[f>>2]+16>>2]](f,g,b)){break a}d=d+1|0;if((e|0)!=(d|0)){continue}break}c=1}return c|0}function Ml(a,b,c,d){var e=0,f=0,g=0,h=0;e=b;f=e>>31;e=e>>31;a=a^e;g=a-e|0;h=(b^f)-((a>>>0>>0)+f|0)|0;e=d;f=e>>31;e=e>>31;a=c^e;e=Ql(g,h,a-e|0,(d^f)-((a>>>0>>0)+f|0)|0);b=b^d;c=b>>31;a=b>>31;b=e^a;d=b-a|0;T=(c^T)-((b>>>0>>0)+c|0)|0;return d}function dd(a,b){a=a|0;b=b|0;var c=0,d=0;o[b>>2]=2;c=o[b+8>>2];d=o[b+12>>2]-c|0;if(d>>>0<=4294967291){b=b+8|0;ri(b,d+4|0);c=o[b>>2]}b=c+d|0;a=p[a+4|0]|p[a+5|0]<<8|(p[a+6|0]<<16|p[a+7|0]<<24);m[b|0]=a;m[b+1|0]=a>>>8;m[b+2|0]=a>>>16;m[b+3|0]=a>>>24}function pl(a){var b=0,c=0,d=0;b=R-16|0;R=b;m[b+15|0]=10;c=o[a+16>>2];a:{if(!c){if(ol(a)){break a}c=o[a+16>>2]}d=o[a+20>>2];if(!(m[a+75|0]==10|d>>>0>=c>>>0)){o[a+20>>2]=d+1;m[d|0]=10;break a}if((l[o[a+36>>2]](a,b+15|0,1)|0)!=1){break a}}R=b+16|0}function ck(a,b,c){var d=0,e=0,f=0,g=0;d=R-16|0;R=d;b=b-a>>2;while(1){if(b){o[d+12>>2]=a;e=d+12|0;f=e;g=o[e>>2];e=b>>>1|0;o[f>>2]=g+(e<<2);if(dk(o[d+12>>2],c)){a=o[d+12>>2]+4|0;o[d+12>>2]=a;b=(e^-1)+b|0}else{b=e}continue}break}R=d+16|0;return a}function lj(a,b,c){var d=0;a:{d=a+4|0;a=Ai(a,b);if((d|0)==(a|0)){break a}b=o[a+32>>2];a=o[a+28>>2];if((b-a|0)!=8){break a}b=p[a+4|0]|p[a+5|0]<<8|(p[a+6|0]<<16|p[a+7|0]<<24);o[c>>2]=p[a|0]|p[a+1|0]<<8|(p[a+2|0]<<16|p[a+3|0]<<24);o[c+4>>2]=b}}function Kb(a){a=a|0;var b=0,c=0;if(a){b=o[a+88>>2];o[a+88>>2]=0;if(b){c=o[b+8>>2];if(c){o[b+12>>2]=c;jl(c)}jl(b)}b=o[a+68>>2];if(b){o[a+72>>2]=b;jl(b)}b=o[a+64>>2];o[a+64>>2]=0;if(b){c=o[b>>2];if(c){o[b+4>>2]=c;jl(c)}jl(b)}jl(a)}}function vj(a,b){var c=0,d=0,e=0,f=0;c=R-16|0;R=c;d=o[a+12>>2];e=o[a+8>>2];f=o[b>>2];o[b>>2]=0;o[c+8>>2]=f;l[o[o[a>>2]+8>>2]](a,d-e>>2,c+8|0);b=o[c+8>>2];o[c+8>>2]=0;if(b){Kb(b)}R=c+16|0;return(o[a+12>>2]-o[a+8>>2]>>2)+ -1|0}function Ll(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;e=c>>>16|0;f=a>>>16|0;j=u(e,f);g=c&65535;h=a&65535;i=u(g,h);f=(i>>>16|0)+u(f,g)|0;e=(f&65535)+u(e,h)|0;a=(u(b,c)+j|0)+u(a,d)+(f>>>16)+(e>>>16)|0;b=i&65535|e<<16;T=a;return b}function tj(a,b){var c=0,d=0,e=0;c=o[a+8>>2];a=o[a+12>>2];a:{if((c|0)==(a|0)){break a}a=a-c>>2;e=a>>>0>1?a:1;a=0;while(1){d=o[(a<<2)+c>>2];if(o[d+60>>2]==(b|0)){break a}a=a+1|0;if((e|0)!=(a|0)){continue}break}d=0}return d}function si(a){n[a+38>>1]=0;o[a>>2]=0;o[a+8>>2]=0;o[a+12>>2]=0;o[a+16>>2]=0;o[a+20>>2]=0;o[a+24>>2]=0;o[a+28>>2]=0;m[a+29|0]=0;m[a+30|0]=0;m[a+31|0]=0;m[a+32|0]=0;m[a+33|0]=0;m[a+34|0]=0;m[a+35|0]=0;m[a+36|0]=0;return a}function ri(a,b){var c=0,d=0;d=o[a>>2];c=o[a+4>>2]-d|0;a:{if(c>>>0>>0){Ka(a,b-c|0);break a}if(c>>>0<=b>>>0){break a}o[a+4>>2]=b+d}b=a+24|0;c=b;d=b;a=o[b+4>>2];b=o[b>>2]+1|0;if(b>>>0<1){a=a+1|0}o[d>>2]=b;o[c+4>>2]=a}function li(a){a=a|0;var b=0,c=0,d=0,e=0;c=1;b=o[a+8>>2];d=o[a+12>>2];a:{if((b|0)==(d|0)){break a}while(1){e=o[b>>2];if(l[o[o[e>>2]+16>>2]](e,o[a+32>>2])){b=b+4|0;if((d|0)!=(b|0)){continue}break a}break}c=0}return c|0}function Ck(a,b,c){var d=0,e=0,f=0;d=R-16|0;R=d;if(4294967279>=c>>>0){a:{if(c>>>0<=10){rk(a,c);e=a;break a}f=sk(c)+1|0;e=tk(f);uk(a,e);vk(a,f);qk(a,c)}ek(e,b,c);m[d+15|0]=0;pk(c+e|0,d+15|0);R=d+16|0;return}Ak();D()}function Pf(a){a=a|0;var b=0;o[a>>2]=7720;b=o[a+28>>2];o[a+28>>2]=0;if(b){jl(b)}o[a>>2]=1908;b=o[a+20>>2];o[a+20>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}o[a>>2]=1596;b=o[a+16>>2];o[a+16>>2]=0;if(b){Kb(b)}return a|0}function $k(a,b,c){var d=0;d=o[a+16>>2];if(!d){o[a+36>>2]=1;o[a+24>>2]=c;o[a+16>>2]=b;return}a:{if((b|0)==(d|0)){if(o[a+24>>2]!=2){break a}o[a+24>>2]=c;return}m[a+54|0]=1;o[a+24>>2]=2;o[a+36>>2]=o[a+36>>2]+1}}function wi(a){var b=0,c=0,d=0,e=0,f=0,g=0;m[a+36|0]=0;d=o[a+20>>2];e=a;f=a;g=o[a+16>>2];a=o[a+32>>2]+7|0;if(a>>>0<7){b=1}c=b>>>3|0;a=b<<29|a>>>3;b=g+a|0;c=c+d|0;o[f+16>>2]=b;o[e+20>>2]=b>>>0>>0?c+1|0:c}function cf(a){a=a|0;var b=0;o[a>>2]=4352;b=o[a+96>>2];if(b){jl(b)}b=o[a+84>>2];if(b){jl(b)}b=o[a+72>>2];if(b){jl(b)}b=o[a+60>>2];if(b){jl(b)}o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}return a|0}function Qf(a){a=a|0;var b=0;o[a>>2]=7720;b=o[a+28>>2];o[a+28>>2]=0;if(b){jl(b)}o[a>>2]=1908;b=o[a+20>>2];o[a+20>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}o[a>>2]=1596;b=o[a+16>>2];o[a+16>>2]=0;if(b){Kb(b)}jl(a)}function Ce(a){a=a|0;var b=0;o[a>>2]=2788;b=o[a+96>>2];if(b){jl(b)}b=o[a+84>>2];if(b){jl(b)}b=o[a+72>>2];if(b){jl(b)}b=o[a+60>>2];if(b){jl(b)}o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}return a|0}function Ui(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;yj(a,b);a:{if((b|0)<0){break a}c=o[a+88>>2];d=o[a+84>>2];if(c-d>>2<=(b|0)){break a}b=d+(b<<2)|0;d=b+4|0;c=c-d|0;e=c>>2;if(c){nl(b,d,c)}o[a+88>>2]=b+(e<<2)}}function Ek(a,b,c){var d=0,e=0,f=0,g=0;e=R-16|0;R=e;d=lk(a);a:{if(d>>>0>=c>>>0){f=nk(a);g=f;d=c;if(c){nl(g,b,d)}m[e+15|0]=0;pk(c+f|0,e+15|0);wk(a,c);break a}f=a;a=kk(a);Fk(f,d,c-d|0,a,a,c,b)}R=e+16|0}function df(a){a=a|0;var b=0;o[a>>2]=4352;b=o[a+96>>2];if(b){jl(b)}b=o[a+84>>2];if(b){jl(b)}b=o[a+72>>2];if(b){jl(b)}b=o[a+60>>2];if(b){jl(b)}o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}jl(a)}function Kj(a,b,c,d,e){var f=0;f=R-256|0;R=f;if(!(e&73728|(c|0)<=(d|0))){c=c-d|0;d=c>>>0<256;ml(f,b,d?c:256);if(!d){while(1){Hj(a,f,256);c=c+ -256|0;if(c>>>0>255){continue}break}}Hj(a,f,c)}R=f+256|0}function De(a){a=a|0;var b=0;o[a>>2]=2788;b=o[a+96>>2];if(b){jl(b)}b=o[a+84>>2];if(b){jl(b)}b=o[a+72>>2];if(b){jl(b)}b=o[a+60>>2];if(b){jl(b)}o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}jl(a)}function Hk(a,b){var c=0,d=0,e=0,f=0;e=R-16|0;R=e;if(b){d=lk(a);c=kk(a);f=c+b|0;if(d-c>>>0>>0){Jk(a,d,f-d|0,c,c)}d=c;c=nk(a);d=d+c|0;if(b){ml(d,0,b)}wk(a,f);m[e+15|0]=0;pk(c+f|0,e+15|0)}R=e+16|0}function mj(a,b,c){var d=0,e=0;d=a+4|0;a=Ai(a,b);a:{if((d|0)==(a|0)){break a}b=o[a+32>>2];d=o[a+28>>2];if((b|0)==(d|0)){break a}Gk(c,b-d|0);c=Kk(c);b=o[a+28>>2];ll(c,b,o[a+32>>2]-b|0);e=1}return e}function mi(a,b){var c=0,d=0;a:{if((b|0)<0){break a}c=o[a+4>>2];if(o[c+12>>2]-o[c+8>>2]>>2<=(b|0)){break a}a=o[o[a+8>>2]+(o[o[a+20>>2]+(b<<2)>>2]<<2)>>2];d=l[o[o[a>>2]+32>>2]](a,b)|0}return d}function ud(a){qd(a);o[a+64>>2]=0;o[a+68>>2]=0;o[a+88>>2]=0;o[a+72>>2]=0;o[a+76>>2]=0;m[a+77|0]=0;m[a+78|0]=0;m[a+79|0]=0;m[a+80|0]=0;m[a+81|0]=0;m[a+82|0]=0;m[a+83|0]=0;m[a+84|0]=0;return a}function td(a,b,c,d){var e=0;o[a>>2]=b;e=o[b+20>>2];o[a+8>>2]=o[b+16>>2];o[a+12>>2]=e;e=o[b+24>>2];b=o[b+28>>2];o[a+48>>2]=0;o[a+52>>2]=0;o[a+40>>2]=c;o[a+44>>2]=d;o[a+16>>2]=e;o[a+20>>2]=b}function qd(a){o[a+8>>2]=0;o[a+12>>2]=0;o[a>>2]=0;o[a+40>>2]=0;o[a+44>>2]=0;o[a+28>>2]=9;m[a+24|0]=1;o[a+56>>2]=-1;o[a+60>>2]=0;o[a+16>>2]=0;o[a+20>>2]=0;o[a+48>>2]=0;o[a+52>>2]=0;return a}function ol(a){var b=0;b=p[a+74|0];m[a+74|0]=b+ -1|b;b=o[a>>2];if(b&8){o[a>>2]=b|32;return-1}o[a+4>>2]=0;o[a+8>>2]=0;b=o[a+44>>2];o[a+28>>2]=b;o[a+20>>2]=b;o[a+16>>2]=b+o[a+48>>2];return 0}function uj(a,b){var c=0,d=0;c=o[a+8>>2];a=o[a+12>>2];if((c|0)!=(a|0)){d=a-c>>2;a=0;while(1){if(o[o[(a<<2)+c>>2]+60>>2]==(b|0)){return a}a=a+1|0;if(a>>>0>>0){continue}break}}return-1}function ik(a,b){var c=0,d=0;c=p[a|0];d=p[b|0];a:{if(!c|(c|0)!=(d|0)){break a}while(1){d=p[b+1|0];c=p[a+1|0];if(!c){break a}b=b+1|0;a=a+1|0;if((c|0)==(d|0)){continue}break}}return c-d|0}function Kc(a,b){var c=0;if(b){Kc(a,o[b>>2]);Kc(a,o[b+4>>2]);c=b+28|0;a=o[c>>2];o[c>>2]=0;if(a){Kc(a+12|0,o[a+16>>2]);Lc(a,o[a+4>>2]);jl(a)}if(m[b+27|0]<=-1){jl(o[b+16>>2])}jl(b)}}function Bk(a,b){var c=0,d=0,e=0;d=R-16|0;R=d;hk(a);c=a;a:{if(!mk(b)){o[c+8>>2]=o[b+8>>2];e=o[b+4>>2];o[c>>2]=o[b>>2];o[c+4>>2]=e;break a}Ck(a,o[b>>2],o[b+4>>2])}R=d+16|0;return a}function ui(a,b,c){var d=0;a:{if(b){b=0;if(!vi(1,c,a)){break a}}m[a+36|0]=1;o[a+32>>2]=0;b=o[a+16>>2];c=b+o[a>>2]|0;o[a+24>>2]=c;d=a;a=o[a+8>>2];o[d+28>>2]=c+(a-b|0);b=1}return b}function jj(a,b,c){var d=0;a:{d=a+4|0;a=Ai(a,b);if((d|0)==(a|0)){break a}b=o[a+32>>2];a=o[a+28>>2];if((b-a|0)!=4){break a}o[c>>2]=p[a|0]|p[a+1|0]<<8|(p[a+2|0]<<16|p[a+3|0]<<24)}}function de(a,b){a=a|0;b=b|0;var c=0,d=0;d=o[a+16>>2];c=0;a:{if(o[a+20>>2]-d>>2<=(b|0)){break a}b=o[(b<<2)+d>>2];c=0;if((b|0)<0){break a}c=Qd(o[o[a+36>>2]+(b<<2)>>2])}return c|0}function Qh(a){a=a|0;var b=0;o[a+8>>2]=8568;o[a>>2]=9700;b=o[a+56>>2];if(b){o[a+60>>2]=b;jl(b)}o[a+8>>2]=8820;b=o[a+44>>2];if(b){jl(b)}b=o[a+32>>2];if(b){jl(b)}return a|0}function Kh(a){a=a|0;var b=0;o[a+8>>2]=9572;o[a>>2]=9408;b=o[a+56>>2];if(b){o[a+60>>2]=b;jl(b)}o[a+8>>2]=9388;b=o[a+44>>2];if(b){jl(b)}b=o[a+32>>2];if(b){jl(b)}return a|0}function Od(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=o[a+8>>2];a:{if(m[d+24|0]<1){break a}if(!wd(d,o[b+4>>2]-o[b>>2]>>2)){break a}e=l[o[o[a>>2]+32>>2]](a,b,c)|0}return e|0}function Vj(a,b,c){var d=0,e=0,f=0;a:{if(!c){break a}while(1){d=p[a|0];e=p[b|0];if((d|0)==(e|0)){b=b+1|0;a=a+1|0;c=c+ -1|0;if(c){continue}break a}break}f=d-e|0}return f}function Rh(a){a=a|0;var b=0;o[a+8>>2]=8568;o[a>>2]=9700;b=o[a+56>>2];if(b){o[a+60>>2]=b;jl(b)}o[a+8>>2]=8820;b=o[a+44>>2];if(b){jl(b)}b=o[a+32>>2];if(b){jl(b)}jl(a)}function Lh(a){a=a|0;var b=0;o[a+8>>2]=9572;o[a>>2]=9408;b=o[a+56>>2];if(b){o[a+60>>2]=b;jl(b)}o[a+8>>2]=9388;b=o[a+44>>2];if(b){jl(b)}b=o[a+32>>2];if(b){jl(b)}jl(a)}function od(a,b){var c=0;c=yk(40);o[c>>2]=-1;oi(c+8|0);l[o[o[a>>2]+16>>2]](a,c);a=o[b+88>>2];o[b+88>>2]=c;if(a){b=o[a+8>>2];if(b){o[a+12>>2]=b;jl(b)}jl(a)}return 1}function Ve(a){a=a|0;var b=0;a:{if(!o[a- -64>>2]|!o[a+68>>2]|(!o[a+44>>2]|!o[a+48>>2])){break a}if(!o[a+52>>2]|!o[a+56>>2]){break a}b=o[a+92>>2]!=-1}return b|0}function cd(a,b){a=a|0;b=b|0;var c=0;b=o[b+88>>2];if(!(!b|o[b>>2]!=2)){c=a;a=o[b+8>>2];o[c+4>>2]=p[a|0]|p[a+1|0]<<8|(p[a+2|0]<<16|p[a+3|0]<<24);c=1}return c|0}function zf(a){a=a|0;var b=0;a:{if(!o[a+44>>2]|!o[a+48>>2]|(!o[a+24>>2]|!o[a+28>>2])){break a}if(!o[a+32>>2]|!o[a+36>>2]){break a}b=o[a+72>>2]!=-1}return b|0}function oe(a){a=a|0;var b=0;o[a>>2]=1908;b=o[a+20>>2];o[a+20>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}o[a>>2]=1596;b=o[a+16>>2];o[a+16>>2]=0;if(b){Kb(b)}return a|0}function fi(a){o[a+40>>2]=0;o[a>>2]=10116;o[a+4>>2]=0;o[a+8>>2]=0;o[a+12>>2]=0;o[a+16>>2]=0;o[a+20>>2]=0;o[a+24>>2]=0;o[a+28>>2]=0;o[a+32>>2]=0;n[a+36>>1]=0}function Ik(a,b){var c=0,d=0;c=R-16|0;R=c;a:{if(mk(a)){d=o[a>>2];m[c+15|0]=0;pk(b+d|0,c+15|0);qk(a,b);break a}m[c+14|0]=0;pk(a+b|0,c+14|0);rk(a,b)}R=c+16|0}function Vd(a,b){var c=0;zd(a);o[a+36>>2]=0;o[a+40>>2]=0;o[a>>2]=1692;o[a+44>>2]=0;o[a+48>>2]=0;o[a+52>>2]=0;o[a+56>>2]=0;c=o[b>>2];o[b>>2]=0;o[a+60>>2]=c}function Lk(a){var b=0,c=0,d=0,e=0;b=R-32|0;R=b;c=b+8|0;d=b+21|0;e=b+32|0;a:{if((d|0)==(e|0)){break a}}Mk(c,d,e);c=o[b+8>>2];hk(a);xk(a,b+21|0,c);R=b+32|0}function Ij(a){var b=0,c=0,d=0;if(Bj(m[o[a>>2]])){while(1){b=o[a>>2];d=m[b|0];o[a>>2]=b+1;c=(u(c,10)+d|0)+ -48|0;if(Bj(m[b+1|0])){continue}break}}return c}function Vg(a){a=a|0;var b=0;o[a>>2]=8568;b=o[a+48>>2];if(b){o[a+52>>2]=b;jl(b)}o[a>>2]=8820;b=o[a+36>>2];if(b){jl(b)}b=o[a+24>>2];if(b){jl(b)}return a|0}function Jh(a){a=a|0;var b=0;o[a>>2]=9572;b=o[a+48>>2];if(b){o[a+52>>2]=b;jl(b)}o[a>>2]=9388;b=o[a+36>>2];if(b){jl(b)}b=o[a+24>>2];if(b){jl(b)}return a|0}function Gd(a,b){a=a|0;b=b|0;var c=0;a:{if(!l[o[o[a>>2]+36>>2]](a,b)){break a}if(!l[o[o[a>>2]+40>>2]](a,b)){break a}c=l[o[o[a>>2]+44>>2]](a)|0}return c|0}function pe(a){a=a|0;var b=0;o[a>>2]=1908;b=o[a+20>>2];o[a+20>>2]=0;if(b){l[o[o[b>>2]+4>>2]](b)}o[a>>2]=1596;b=o[a+16>>2];o[a+16>>2]=0;if(b){Kb(b)}jl(a)}function Bi(a,b){var c=0;b=Ai(a,b);a:{if((b|0)==(a+4|0)){break a}a=b+28|0;if(m[b+39|0]<=-1){a=o[a>>2]}a=Tj(a);if((a|0)==-1){break a}c=(a|0)!=0}return c}function fj(a,b){var c=0,d=0;c=o[b>>2];if(!c){return}d=o[a+28>>2];if(d>>>0>2]){o[b>>2]=0;o[d>>2]=c;o[a+28>>2]=o[a+28>>2]+4;return}gj(a+24|0,b)}function th(a){a=a|0;var b=0;o[a>>2]=8568;b=o[a+48>>2];if(b){o[a+52>>2]=b;jl(b)}o[a>>2]=8820;b=o[a+36>>2];if(b){jl(b)}b=o[a+24>>2];if(b){jl(b)}jl(a)}function Ph(a){a=a|0;var b=0;o[a>>2]=9572;b=o[a+48>>2];if(b){o[a+52>>2]=b;jl(b)}o[a>>2]=9388;b=o[a+36>>2];if(b){jl(b)}b=o[a+24>>2];if(b){jl(b)}jl(a)}function Mk(a,b,c){var d=0,e=0;e=a;d=c-b|0;a:{if(!((1-(r[3096]>1)|0)>(d|0)?(d|0)<=9:0)){m[b|0]=49;o[a>>2]=b+1;a=0;break a}o[a>>2]=c;a=61}o[e+4>>2]=a}function kl(a){var b=0,c=0;c=U();a:{b=o[3460];a=b+(a+3&-4)|0;if(a>>>0<=c<<16>>>0){break a}if(N(a|0)){break a}o[3314]=48;return-1}o[3460]=a;return b}function gl(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if(Yk(a,o[b+8>>2],f)){cl(b,c,d,e);return}a=o[a+8>>2];l[o[o[a>>2]+20>>2]](a,b,c,d,e,f)}function ta(a,b,c){var d=0;d=R-16|0;R=d;Xf(d,a,b,c);o[a+24>>2]=o[d>>2];Dk(a+28|0,d|4);a=a+24|0;if(m[d+15|0]<=-1){jl(o[d+4>>2])}R=d+16|0;return a}function Rj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=R-16|0;R=e;Wj(Q(o[a+60>>2],b|0,c|0,d&255,e+8|0)|0);R=e+16|0;T=o[e+12>>2];return o[e+8>>2]}function ni(a,b,c){var d=0,e=0,f=0;if((b|0)>0){while(1){e=d<<2;f=o[e+a>>2];o[c+e>>2]=0-(f&1)^f>>>1;d=d+1|0;if((d|0)!=(b|0)){continue}break}}}function sj(a){var b=0,c=0;b=o[a+20>>2];a:{if((o[a+24>>2]-b|0)<1){break a}b=o[b>>2];if((b|0)==-1){break a}c=o[o[a+8>>2]+(b<<2)>>2]}return c}function rj(a,b){var c=0;c=-1;a:{if((b|0)==-1|(b|0)>4){break a}b=u(b,12)+a|0;a=o[b+20>>2];if((o[b+24>>2]-a|0)<1){break a}c=o[a>>2]}return c}function rd(a,b,c,d,e,f,g){o[a>>2]=0;o[a+56>>2]=b;o[a+48>>2]=0;o[a+52>>2]=0;o[a+40>>2]=f;o[a+44>>2]=g;m[a+32|0]=e;o[a+28>>2]=d;m[a+24|0]=c}function Pj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=b;b=o[b>>2]+15&-16;o[c>>2]=b+16;d=a,e=Zj(o[b>>2],o[b+4>>2],o[b+8>>2],o[b+12>>2]),t[d>>3]=e}function Rf(a){o[a>>2]=0;o[a+4>>2]=0;m[a+5|0]=0;m[a+6|0]=0;m[a+7|0]=0;m[a+8|0]=0;m[a+9|0]=0;m[a+10|0]=0;m[a+11|0]=0;m[a+12|0]=0;return a}function Pi(a){a=a|0;var b=0;o[a>>2]=10604;b=o[a+96>>2];if(b){o[a+100>>2]=b;jl(b)}b=o[a+84>>2];if(b){o[a+88>>2]=b;jl(b)}Qi(a);return a|0}function Mj(a,b,c,d){if(a|b){while(1){c=c+ -1|0;m[c|0]=p[(a&15)+11616|0]|d;a=(b&15)<<28|a>>>4;b=b>>>4|0;if(a|b){continue}break}}return c}function sa(a){var b=0;b=R-16|0;R=b;Yf(b);o[a+24>>2]=o[b>>2];Dk(a+28|0,b|4);a=a+24|0;if(m[b+15|0]<=-1){jl(o[b+4>>2])}R=b+16|0;return a}function qf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:{if(!fe(a,b,c)){break a}a=o[a+8>>2];if(p[a+24|0]!=3){break a}d=o[a+28>>2]==9}return d|0}function qa(a){var b=0;yi(a);b=a+16|0;o[b>>2]=0;o[b+4>>2]=0;o[a+24>>2]=0;o[a+28>>2]=0;o[a+12>>2]=b;o[a+32>>2]=0;o[a+36>>2]=0;return a}function Ri(a){a=a|0;var b=0;o[a>>2]=10604;b=o[a+96>>2];if(b){o[a+100>>2]=b;jl(b)}b=o[a+84>>2];if(b){o[a+88>>2]=b;jl(b)}Qi(a);jl(a)}function Lc(a,b){if(b){Lc(a,o[b>>2]);Lc(a,o[b+4>>2]);a=o[b+28>>2];if(a){o[b+32>>2]=a;jl(a)}if(m[b+27|0]<=-1){jl(o[b+16>>2])}jl(b)}}function zd(a){o[a+4>>2]=0;o[a+8>>2]=0;o[a>>2]=1384;o[a+12>>2]=0;o[a+16>>2]=0;o[a+20>>2]=0;o[a+24>>2]=0;o[a+28>>2]=0;o[a+32>>2]=0}function ff(a){a=a|0;var b=0;o[a>>2]=4588;b=o[a+76>>2];if(b){jl(b)}o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}return a|0}function Je(a){a=a|0;var b=0;o[a>>2]=3036;b=o[a+76>>2];if(b){jl(b)}o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}return a|0}function Rb(){var a=0;a=yk(28);o[a>>2]=0;o[a+4>>2]=0;o[a+24>>2]=0;o[a+16>>2]=0;o[a+20>>2]=0;o[a+8>>2]=0;o[a+12>>2]=0;return a|0}function zk(a,b){var c=0,d=0,e=0,f=0;c=rl(b);d=yk(c+13|0);o[d+8>>2]=0;o[d+4>>2]=c;o[d>>2]=c;e=a,f=ll(d+12|0,b,c+1|0),o[e>>2]=f}function Ed(a){a=a|0;var b=0;o[a>>2]=1384;b=o[a+16>>2];if(b){o[a+20>>2]=b;jl(b)}b=o[a+4>>2];if(b){o[a+8>>2]=b;jl(b)}return a|0}function Fc(a,b){if(b){Fc(a,o[b>>2]);Fc(a,o[b+4>>2]);if(m[b+39|0]<=-1){jl(o[b+28>>2])}if(m[b+27|0]<=-1){jl(o[b+16>>2])}jl(b)}}function yk(a){var b=0,c=0;a=a?a:1;while(1){a:{b=il(a);if(b){break a}c=o[3332];if(!c){break a}l[c]();continue}break}return b}function bl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(Yk(a,o[b+8>>2],0)){$k(b,c,d);return}a=o[a+8>>2];l[o[o[a>>2]+28>>2]](a,b,c,d)}function gf(a){a=a|0;var b=0;o[a>>2]=4588;b=o[a+76>>2];if(b){jl(b)}o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}jl(a)}function Oi(a){qj(a);o[a+84>>2]=0;o[a+88>>2]=0;o[a>>2]=10604;o[a+92>>2]=0;o[a+96>>2]=0;o[a+100>>2]=0;o[a+104>>2]=0;return a}function Ke(a){a=a|0;var b=0;o[a>>2]=3036;b=o[a+76>>2];if(b){jl(b)}o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}jl(a)}function Lj(a,b,c){if(a|b){while(1){c=c+ -1|0;m[c|0]=a&7|48;a=(b&7)<<29|a>>>3;b=b>>>3|0;if(a|b){continue}break}}return c}function Ic(){var a=0;a=yk(24);o[a+4>>2]=0;o[a+8>>2]=0;o[a+16>>2]=0;o[a+20>>2]=0;o[a>>2]=a+4;o[a+12>>2]=a+16;return a|0}function Nb(){var a=0;a=yk(24);o[a+8>>2]=0;o[a+12>>2]=0;o[a+4>>2]=-1;o[a>>2]=1232;o[a+16>>2]=0;o[a+20>>2]=0;return a|0}function Md(a,b,c){a=a|0;b=b|0;c=c|0;o[a+4>>2]=b;b=o[o[o[b+4>>2]+8>>2]+(c<<2)>>2];o[a+12>>2]=c;o[a+8>>2]=b;return 1}function Kf(a,b,c){a=a|0;b=b|0;c=c|0;if(fe(a,b,c)){a=o[o[o[o[b+4>>2]+8>>2]+(c<<2)>>2]+28>>2]==9}else{a=0}return a|0}function Me(a){a=a|0;var b=0;if(!(!o[a+60>>2]|!o[a+44>>2]|(!o[a+48>>2]|!o[a+52>>2]))){b=o[a+56>>2]!=0}return b|0}function ra(a){var b=0;b=R-32|0;R=b;Wf(b+8|0,a);a=o[b+24>>2];if(m[b+23|0]<=-1){jl(o[b+12>>2])}R=b+32|0;return a}function Yk(a,b,c){if(!c){return o[a+4>>2]==o[b+4>>2]}if((a|0)==(b|0)){return 1}return!ik(o[a+4>>2],o[b+4>>2])}function oi(a){o[a+16>>2]=0;o[a+20>>2]=0;o[a+8>>2]=0;o[a>>2]=0;o[a+4>>2]=0;o[a+24>>2]=0;o[a+28>>2]=0;return a}function Uk(a){var b=0,c=0;a:{b=o[a>>2]+ -12|0;c=b+8|0;a=o[c>>2]+ -1|0;o[c>>2]=a;if((a|0)>-1){break a}jl(b)}}function db(a){var b=0;b=G(8)|0;o[b>>2]=12484;o[b>>2]=12528;zk(b+4|0,a);o[b>>2]=12576;H(b|0,12608,1);D()}function Dc(a){a=a|0;if(a){if(m[a+39|0]<=-1){jl(o[a+28>>2])}Ec(a+12|0,o[a+16>>2]);Fc(a,o[a+4>>2]);jl(a)}}function kf(a){a=a|0;var b=0;o[a>>2]=4812;o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}return a|0}function Se(a){a=a|0;var b=0;o[a>>2]=3272;o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}return a|0}function uh(a){a=a|0;var b=0;o[a>>2]=8820;b=o[a+36>>2];if(b){jl(b)}b=o[a+24>>2];if(b){jl(b)}return a|0}function Hh(a){a=a|0;var b=0;o[a>>2]=9388;b=o[a+36>>2];if(b){jl(b)}b=o[a+24>>2];if(b){jl(b)}return a|0}function xe(a){a=a|0;var b=0;if(!(!o[a+52>>2]|(!o[a+44>>2]|!o[a+48>>2]))){b=o[a+56>>2]!=0}return b|0}function hl(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if(Yk(a,o[b+8>>2],f)){cl(b,c,d,e)}} + + + +function lf(a){a=a|0;var b=0;o[a>>2]=4812;o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}jl(a)}function Te(a){a=a|0;var b=0;o[a>>2]=3272;o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}jl(a)}function Ne(a,b){a=a|0;b=b|0;var c=0;if(!(o[b+56>>2]|!b|p[b+24|0]!=3)){o[a+60>>2]=b;c=1}return c|0}function vh(a){a=a|0;var b=0;o[a>>2]=8820;b=o[a+36>>2];if(b){jl(b)}b=o[a+24>>2];if(b){jl(b)}jl(a)}function dc(a,b,c){a=a|0;b=b|0;c=c|0;o[a+16>>2]=0;o[a+20>>2]=0;o[a>>2]=b;o[a+8>>2]=c;o[a+12>>2]=0}function We(a,b){a=a|0;b=b|0;var c=0;if(!(o[b+56>>2]|p[b+24|0]!=3)){o[a- -64>>2]=b;c=1}return c|0}function Ih(a){a=a|0;var b=0;o[a>>2]=9388;b=o[a+36>>2];if(b){jl(b)}b=o[a+24>>2];if(b){jl(b)}jl(a)}function Fl(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return l[a](b,c,d,e,f,g)|0}function Af(a,b){a=a|0;b=b|0;var c=0;if(!(o[b+56>>2]|p[b+24|0]!=3)){o[a+44>>2]=b;c=1}return c|0}function ti(a,b,c,d){n[a+38>>1]=d;o[a>>2]=b;o[a+16>>2]=0;o[a+20>>2]=0;o[a+8>>2]=c;o[a+12>>2]=0}function Gl(a,b,c,d,e,f,g){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;f=f|0;g=g|0;return l[a](b,c,d,e,f,g)|0}function sk(a){var b=0;if(a>>>0>=11){b=a+16&-16;a=b+ -1|0;a=(a|0)==11?b:a}else{a=10}return a}function ve(a){a=a|0;var b=0;o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}return a|0}function Td(a){a=a|0;var b=0;o[a>>2]=1596;b=o[a+16>>2];o[a+16>>2]=0;if(b){Kb(b)}return a|0}function ld(a){a=a|0;var b=0;o[a>>2]=1232;b=o[a+8>>2];if(b){o[a+12>>2]=b;jl(b)}return a|0}function Jl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;a=l[a](b,c,d,e)|0;P(T|0);return a|0}function Hl(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;l[a](b,c,d,e,f,g)}function we(a){a=a|0;var b=0;o[a>>2]=2732;b=o[a+32>>2];if(b){o[a+36>>2]=b;jl(b)}jl(a)}function Ud(a){a=a|0;var b=0;o[a>>2]=1596;b=o[a+16>>2];o[a+16>>2]=0;if(b){Kb(b)}jl(a)}function Rl(a){var b=0,c=0;while(1){c=b;if(a){a=a-1&a;b=b+1|0;continue}break}return c}function md(a){a=a|0;var b=0;o[a>>2]=1232;b=o[a+8>>2];if(b){o[a+12>>2]=b;jl(b)}jl(a)}function Bc(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Xa(b,c,d,e,f)|0}function ge(a,b){a=a|0;b=b|0;return l[o[o[a>>2]+48>>2]](a,o[b+4>>2]-o[b>>2]>>2)|0}function Ec(a,b){if(b){Ec(a,o[b>>2]);Ec(a,o[b+4>>2]);Fc(b+20|0,o[b+24>>2]);jl(b)}}function Ag(a){a=a|0;if(o[a+44>>2]){return l[o[o[a>>2]+48>>2]](a)|0}return 0} + + + +function _e(a,b){a=a|0;b=b|0;if(b>>>0<=1){o[a+28>>2]=b;a=1}else{a=0}return a|0}function Mb(a){a=a|0;var b=0;if(a){b=o[a+8>>2];if(b){o[a+12>>2]=b;jl(b)}jl(a)}}function Ld(a){o[a+12>>2]=-1;o[a+16>>2]=0;o[a+4>>2]=0;o[a+8>>2]=0;o[a>>2]=1596}function al(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(Yk(a,o[b+8>>2],0)){$k(b,c,d)}}function Qk(){var a=0;a=R-16|0;R=a;o[a+12>>2]=0;a=o[2779];Fj(a);Pk(a);K();D()}function Il(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;l[a](b,c,d,e,f)}function pb(a){a=a|0;var b=0;if(a){b=o[a>>2];if(b){o[a+4>>2]=b;jl(b)}jl(a)}}function mb(){var a=0;a=yk(12);o[a>>2]=0;o[a+4>>2]=0;o[a+8>>2]=0;return a|0}function kb(a){a=a|0;var b=0;b=a+4|0;if(m[a+15|0]<=-1){b=o[b>>2]}return b|0}function Kg(a,b){a=a|0;b=b|0;a=o[a+48>>2];return l[o[o[a>>2]+16>>2]](a,b)|0}function Jg(a,b){a=a|0;b=b|0;a=o[a+48>>2];return l[o[o[a>>2]+12>>2]](a,b)|0}function Gk(a,b){var c=0;c=kk(a);if(c>>>0>>0){Hk(a,b-c|0);return}Ik(a,b)}function Cg(a,b){a=a|0;b=b|0;a=o[a+48>>2];return l[o[o[a>>2]+20>>2]](a,b)|0}function lk(a){if(mk(a)){a=(o[a+8>>2]&2147483647)+ -1|0}else{a=10}return a}function Sl(a){var b=0;b=a&31;a=0-a&31;return(-1>>>b&-2)<>>a}function xi(a){a=a+ -1|0;if(a>>>0<=10){return o[(a<<2)+10476>>2]}return-1}function gk(a,b){var c=0,d=0;c=R-16|0;R=c;d=dk(a,b);R=c+16|0;return d?b:a}function ci(a,b){a=a|0;b=b|0;m[b+84|0]=1;o[b+72>>2]=o[b+68>>2];return 1}function Jc(a){a=a|0;if(a){Kc(a+12|0,o[a+16>>2]);Lc(a,o[a+4>>2]);jl(a)}}function Ad(a,b,c){a=a|0;b=b|0;c=c|0;o[a+32>>2]=c;o[a+28>>2]=b;return 1}function jd(a,b,c,d,e){o[a+4>>2]=b;kd(a+8|0,c,(d<<2)+c|0);s[a+20>>2]=e}function dl(a,b,c){if(!(o[a+28>>2]==1|o[a+4>>2]!=(b|0))){o[a+28>>2]=c}}function ak(a,b,c){var d=0;d=R-16|0;R=d;a=ck(a,b,c);R=d+16|0;return a}function yb(){var a=0;a=yk(8);o[a+4>>2]=-1;o[a>>2]=1116;return a|0}function lc(a,b,c){a=a|0;b=b|0;c=c|0;return o[o[b+8>>2]+(c<<2)>>2]}function El(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;l[a](b,c,d,e)}function lb(a){a=a|0;if(a){if(m[a+15|0]<=-1){jl(o[a+4>>2])}jl(a)}}function Ig(a){a=a|0;a=o[a+48>>2];return l[o[o[a>>2]+36>>2]](a)|0}function Fg(a){a=a|0;a=o[a+48>>2];return l[o[o[a>>2]+28>>2]](a)|0}function Eg(a){a=a|0;a=o[a+48>>2];return l[o[o[a>>2]+24>>2]](a)|0}function Bl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return l[a](b,c,d)|0}function zc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ra(b,c,d)|0}function yc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Oa(b,c,d)|0}function xc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ma(b,c,d)|0}function wc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ja(b,c,d)|0}function vc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ta(b,c,d)|0}function uc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ha(b,c,d)|0}function tc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Fa(b,c,d)|0}function sc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ea(b,c,d)|0}function rc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Da(b,c,d)|0}function pc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return wa(b,c,d)|0}function kc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return va(b,c,d)|0}function Nd(a,b){a=a|0;b=b|0;o[a+12>>2]=-1;o[a+8>>2]=b;return 1}function Ac(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Va(b,c,d)|0}function zb(a,b){a=a|0;b=b|0;return l[o[o[a>>2]+12>>2]](a,b)|0}function tk(a){if(4294967295>>0){db(12086);D()}return yk(a)}function sl(a,b){a=a|0;b=b|0;if(!o[3457]){o[3458]=b;o[3457]=a}}function Mf(a,b){a=a|0;b=b|0;return l[o[o[a>>2]+56>>2]](a,b)|0}function Lb(){var a=0;a=yk(40);o[a>>2]=-1;oi(a+8|0);return a|0}function Ob(a,b){a=a|0;b=b|0;return v(s[o[a+8>>2]+(b<<2)>>2])}function yi(a){o[a+4>>2]=0;o[a+8>>2]=0;o[a>>2]=a+4;return a}function $b(a,b){a=a|0;b=b|0;return v(s[o[a>>2]+(b<<2)>>2])}function kk(a){if(mk(a)){return o[a+4>>2]}return p[a+11|0]}function Hd(a,b){a=a|0;b=b|0;return o[o[a+4>>2]+(b<<2)>>2]}function Hc(a){a=a|0;return(o[a+100>>2]-o[a+96>>2]|0)/12|0}function Tl(a){if(a){return 31-x(a+ -1^a)|0}return 32} + + + +function wb(a,b){a=a|0;b=b|0;return o[o[a>>2]+(b<<2)>>2]}function nb(a,b){a=a|0;b=b|0;return q[o[a>>2]+(b<<1)>>1]}function _b(a,b){a=a|0;b=b|0;return n[o[a>>2]+(b<<1)>>1]}function Dl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;l[a](b,c,d)}function zl(a,b,c){a=a|0;b=b|0;c=c|0;return l[a](b,c)|0}function rf(a,b,c){a=a|0;b=b|0;c=c|0;return ke(a,b,c)|0}function hc(a,b,c){a=a|0;b=b|0;c=c|0;return ta(a,b,c)|0}function fe(a,b,c){a=a|0;b=b|0;c=c|0;return Md(a,b,c)|0}function Yb(a,b,c){a=a|0;b=b|0;c=c|0;return oa(a,b,c)|0}function Wb(a,b,c){a=a|0;b=b|0;c=c|0;return na(a,b,c)|0}function Tk(a){a=a|0;o[a>>2]=12528;Uk(a+4|0);return a|0}function Ub(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;la(b,c,d)}function qc(a,b,c){a=a|0;b=b|0;c=c|0;return xa(b,c)|0}function oc(a,b,c){a=a|0;b=b|0;c=c|0;return cb(b,c)|0}function mc(a,b,c){a=a|0;b=b|0;c=c|0;return tj(b,c)|0}function jc(a,b,c){a=a|0;b=b|0;c=c|0;return ua(b,c)|0}function ic(a,b,c){a=a|0;b=b|0;c=c|0;return rj(b,c)|0}function Tb(a,b,c){a=a|0;b=b|0;c=c|0;return ka(b,c)|0}function Sb(a,b,c){a=a|0;b=b|0;c=c|0;return ia(b,c)|0}function Kk(a){if(kk(a)>>>0<=0){bk();D()}return nk(a)}function Dk(a,b){if((a|0)!=(b|0)){Ek(a,nk(b),kk(b))}}function rb(a){a=a|0;return o[a+12>>2]-o[a+8>>2]>>2}function qj(a){o[a>>2]=11e3;ml(a+4|0,0,80);return a}function gc(a,b,c){a=a|0;b=b|0;c=c|0;return sa(a)|0}function Vb(a,b,c){a=a|0;b=b|0;c=c|0;return+ma(b,c)}function ub(a,b){a=a|0;b=b|0;return p[o[a>>2]+b|0]}function Qb(a,b){a=a|0;b=b|0;return m[o[a>>2]+b|0]}function Id(a){a=a|0;return o[a+8>>2]-o[a+4>>2]>>2}function wk(a,b){if(mk(a)){qk(a,b);return}rk(a,b)}function tb(a){a=a|0;if(a){l[o[o[a>>2]+4>>2]](a)}}function Wj(a){if(!a){return 0}o[3314]=a;return-1}function Mg(a,b){a=a|0;b=b|0;o[a+4>>2]=b;return 1}function xb(a){a=a|0;return o[a+4>>2]-o[a>>2]>>2}function ob(a){a=a|0;return o[a+4>>2]-o[a>>2]>>1}function nk(a){if(mk(a)){return o[a>>2]}return a}function hk(a){o[a>>2]=0;o[a+4>>2]=0;o[a+8>>2]=0}function vb(a){a=a|0;return o[a+4>>2]-o[a>>2]|0}function Dj(a,b){if(!a){return 0}return Cj(a,b)}function zg(a){fi(a);o[a+44>>2]=0;o[a>>2]=8024}function ee(a){Ld(a);o[a+20>>2]=0;o[a>>2]=1908}function Hj(a,b,c){if(!(p[a|0]&32)){ql(b,c,a)}}function Al(a,b,c){a=a|0;b=b|0;c=c|0;l[a](b,c)}function xl(a,b){a=a|0;b=b|0;return l[a](b)|0}function ul(a){a=a|0;a=R-a&-16;R=a;return a|0}function qe(a){a=a|0;return m[o[a+8>>2]+24|0]}function nc(a,b){a=a|0;b=b|0;return o[b+4>>2]}function Xb(a,b){a=a|0;b=b|0;return o[b+8>>2]}function Pd(a,b,c){a=a|0;b=b|0;c=c|0;return 1}function xf(a){a=a|0;o[a>>2]=5700;return a|0}function Gf(a){a=a|0;o[a>>2]=6704;return a|0}function fc(a,b){a=a|0;b=b|0;return ra(b)|0}function Ql(a,b,c,d){a=Nl(a,b,c,d);return a}function Qj(a){a=a|0;return I(o[a+60>>2])|0}function Pl(a,b,c,d){a=Ml(a,b,c,d);return a}function Ol(a,b,c,d){a=Ll(a,b,c,d);return a}function Pb(a){a=a|0;return v(s[a+20>>2])}function vk(a,b){o[a+8>>2]=b|-2147483648}function yf(a){a=a|0;o[a>>2]=5700;jl(a)}function pi(a,b,c,d){return qi(a,b,c,d)}function dk(a,b){return r[a>>2]>2]}function Hf(a){a=a|0;o[a>>2]=6704;jl(a)}function sb(a){a=a|0;return o[a+80>>2]}function Jb(a){a=a|0;return o[a+60>>2]}function Ib(a){a=a|0;return o[a+48>>2]}function Hb(a){a=a|0;return o[a+40>>2]}function Eb(a){a=a|0;return o[a+28>>2]}function Db(a){a=a|0;return o[a+56>>2]}function Cb(a){a=a|0;return o[a+88>>2]}function ze(a,b){a=a|0;b=b|0;return-1}function jb(a){a=a|0;return!o[a>>2]|0}function hh(a){a=a|0;return o[a+8>>2]}function Wk(a){a=a|0;return o[a+4>>2]}function Kd(a,b){a=a|0;b=b|0;return 1}function Jd(a,b){a=a|0;b=b|0;return 0}function Gb(a){a=a|0;return p[a+32|0]}function Fb(a){a=a|0;return m[a+24|0]}function Ab(a){a=a|0;return o[a+4>>2]}function yl(a,b){a=a|0;b=b|0;l[a](b)}function wl(a){a=a|0;return V(a|0)|0}function Cc(a,b){a=a|0;b=b|0;Zf(a,b)}function ib(a){a=a|0;return o[a>>2]}function ek(a,b,c){if(c){ll(a,b,c)}}function Bj(a){return a+ -48>>>0<10}function $j(a,b,c){return ak(a,b,c)}function Gc(){return Oi(yk(108))|0}function qb(){return qj(yk(84))|0}function mk(a){return m[a+11|0]<0}function ec(){return qa(yk(40))|0}function cc(){return si(yk(40))|0}function bc(a){a=a|0;if(a){jl(a)}}function ac(){return qd(yk(64))|0}function Sk(a){a=a|0;return 12461}function Bb(){return ud(yk(96))|0}function Xk(a){a=a|0;Tk(a);jl(a)}function fk(a,b){return gk(a,b)}function ed(a){a=a|0;return a|0}function sh(a){a=a|0;jl(qh(a))}function pk(a,b){m[a|0]=p[b|0]}function ph(a){a=a|0;jl(oh(a))}function Vk(a){a=a|0;jl(Tk(a))}function Aj(a){a=a|0;jl(Qi(a))}function ye(a){a=a|0;return 0}function nd(a){a=a|0;return 1}function gd(a){a=a|0;return 2}function Ue(a){a=a|0;return 6}function Le(a){a=a|0;return 5}function Ee(a){a=a|0;return 4}function Bf(a){a=a|0;return 3}function rk(a,b){m[a+11|0]=b}function qk(a,b){o[a+4>>2]=b}function Nk(){db(12424);D()}function Kl(a,b){i(a|0,b|0)}function Cl(a){a=a|0;l[a]()}function Ak(){db(12360);D()}function uk(a,b){o[a>>2]=b}function fd(a){a=a|0;jl(a)}function vl(a){a=a|0;R=a}function tl(){return R|0}function Fd(a){a=a|0;D()}function bd(){return 12}function ad(){return 11}function $c(){return 10}function _c(){return 9}function Zc(){return 8}function Yc(){return 7}function Xc(){return 6}function Wc(){return 5}function Vc(){return 4}function Uc(){return 3}function Tc(){return 2}function Sc(){return 1}function Rk(){Qk();D()}function Rc(){return-5}function Qc(){return-4}function Pc(){return-3}function Ok(){bk();D()}function Oc(){return-2}function Nc(){return-1}function Mc(){return 0}function bk(){K();D()}function ok(a){a=a|0}function ha(){jk()} +// EMSCRIPTEN_END_FUNCS +l[1]=Tk;l[2]=ed;l[3]=fd;l[4]=gd;l[5]=cd;l[6]=dd;l[7]=ld;l[8]=md;l[9]=nd;l[10]=hd;l[11]=id;l[12]=Ed;l[13]=Fd;l[14]=Ad;l[15]=Bd;l[16]=Gd;l[17]=Hd;l[18]=Id;l[19]=Eb;l[20]=Jd;l[21]=Rk;l[22]=Kd;l[23]=nd;l[24]=Td;l[25]=Ud;l[26]=Md;l[27]=Nd;l[28]=Od;l[29]=Pd;l[30]=Kd;l[31]=Rd;l[32]=Sd;l[33]=be;l[34]=ce;l[35]=Wd;l[36]=Yd;l[37]=de;l[38]=Zd;l[39]=_d;l[40]=$d;l[41]=ae;l[42]=oe;l[43]=pe;l[44]=fe;l[45]=ge;l[46]=he;l[47]=ke;l[48]=ie;l[49]=qe;l[50]=me;l[51]=ve;l[52]=we;l[53]=nd;l[54]=Ab;l[55]=xe;l[56]=ye;l[57]=ze;l[58]=Jd;l[59]=ye;l[60]=nd;l[61]=Ae;l[62]=Be;l[63]=Fd;l[64]=Fd;l[65]=Ce;l[66]=De;l[67]=Ee;l[68]=xe;l[69]=Fe;l[70]=Ie;l[71]=Je;l[72]=Ke;l[73]=Le;l[74]=Me;l[75]=nd;l[76]=Jd;l[77]=Ne;l[78]=Oe;l[79]=Pe;l[80]=Se;l[81]=Te;l[82]=Ue;l[83]=Ve;l[84]=nd;l[85]=Jd;l[86]=We;l[87]=Xe;l[88]=Ye;l[89]=ed;l[90]=fd;l[91]=_e;l[92]=Eb;l[93]=Ze;l[94]=Fd;l[95]=we;l[96]=nd;l[97]=xe;l[98]=bf;l[99]=Fd;l[100]=cf;l[101]=df;l[102]=Ee;l[103]=xe;l[104]=Fe;l[105]=ef;l[106]=ff;l[107]=gf;l[108]=Le;l[109]=Me;l[110]=nd;l[111]=Jd;l[112]=Ne;l[113]=Oe;l[114]=hf;l[115]=kf;l[116]=lf;l[117]=Ue;l[118]=Ve;l[119]=nd;l[120]=Jd;l[121]=We;l[122]=Xe;l[123]=mf;l[124]=ed;l[125]=fd;l[126]=_e;l[127]=Eb;l[128]=nf;l[129]=Fd;l[130]=we;l[131]=ye;l[132]=nd;l[133]=pf;l[134]=pe;l[135]=qf;l[136]=sf;l[137]=rf;l[138]=vf;l[139]=gd;l[140]=tf;l[141]=xf;l[142]=yf;l[143]=Ue;l[144]=Ab;l[145]=zf;l[146]=nd;l[147]=Jd;l[148]=Af;l[149]=nd;l[150]=Bf;l[151]=Cf;l[152]=Df;l[153]=ed;l[154]=fd;l[155]=_e;l[156]=Eb;l[157]=Ze;l[158]=Gf;l[159]=Hf;l[160]=Ue;l[161]=zf;l[162]=nd;l[163]=Jd;l[164]=Af;l[165]=Cf;l[166]=If;l[167]=ed;l[168]=fd;l[169]=_e;l[170]=Eb;l[171]=nf;l[172]=ed;l[173]=fd;l[174]=ye;l[175]=nd;l[176]=ye;l[177]=ze;l[178]=Jd;l[179]=Ff;l[180]=Jf;l[181]=Pf;l[182]=Qf;l[183]=Kf;l[184]=Lf;l[185]=rf;l[186]=Mf;l[187]=Nf;l[188]=Of;l[189]=Bg;l[190]=Fd;l[191]=nd;l[192]=nd;l[193]=Ag;l[194]=ki;l[195]=li;l[196]=nd;l[197]=ye;l[198]=Jd;l[199]=Jd;l[200]=Gg;l[201]=Hg;l[202]=Dg;l[203]=Cg;l[204]=Fg;l[205]=Ig;l[206]=Jg;l[207]=Kg;l[208]=Eg;l[209]=oh;l[210]=ph;l[211]=Mg;l[212]=Ng;l[213]=Og;l[214]=Pg;l[215]=Wg;l[216]=nd;l[217]=Ab;l[218]=hh;l[219]=qh;l[220]=sh;l[221]=Mg;l[222]=Ng;l[223]=Og;l[224]=Pg;l[225]=jh;l[226]=nd;l[227]=Ab;l[228]=hh;l[229]=Vg;l[230]=th;l[231]=Ug;l[232]=uh;l[233]=vh;l[234]=zh;l[235]=Ah;l[236]=Bh;l[237]=Ch;l[238]=yh;l[239]=Gh;l[240]=wh;l[241]=Hh;l[242]=Ih;l[243]=Kh;l[244]=Lh;l[245]=Mh;l[246]=Nh;l[247]=Jh;l[248]=Ph;l[249]=Qh;l[250]=Rh;l[251]=Sh;l[252]=Th;l[253]=bi;l[254]=ai;l[255]=Yh;l[256]=ed;l[257]=fd;l[258]=ci;l[259]=di;l[260]=Fd;l[261]=ye;l[262]=nd;l[263]=Pi;l[264]=Ri;l[265]=Si;l[266]=Ui;l[267]=Qi;l[268]=Aj;l[269]=wj;l[270]=yj;l[271]=Qj;l[272]=Sj;l[273]=Rj;l[274]=Oj;l[275]=Pj;l[276]=ed;l[277]=fd;l[278]=Sk;l[279]=Vk;l[280]=Wk;l[281]=Xk;l[282]=ed;l[283]=fd;l[284]=ok;l[285]=ok;l[286]=Zk;l[287]=hl;l[288]=fl;l[289]=al;l[290]=fd;l[291]=gl;l[292]=el;l[293]=bl;function U(){return buffer.byteLength/65536|0}function V(pagesToAdd){pagesToAdd=pagesToAdd|0;var W=U()|0;var X=W+pagesToAdd|0;if(W=0;--$){_[48+$]=52+$;_[65+$]=$;_[97+$]=26+$}_[43]=62;_[47]=63;function aa(uint8Array,offset,b64){var ba,ca,$=0,da=offset,ea=b64.length,fa=offset+(ea*3>>2);if(b64[ea-2]=="=")--fa;if(b64[ea-1]=="=")--fa;for(;$>4;if(da+1>2;if(da+2>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var wasmMemory;var wasmTable=new WebAssembly.Table({"initial":294,"maximum":294+0,"element":"anyfunc"});var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},"array":function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string")return UTF8ToString(ret);if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var WASM_PAGE_SIZE=65536;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var STACK_BASE=5256880,DYNAMIC_BASE=5256880,DYNAMICTOP_PTR=13840;var INITIAL_INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_INITIAL_MEMORY/WASM_PAGE_SIZE})}if(wasmMemory){buffer=wasmMemory.buffer}INITIAL_INITIAL_MEMORY=buffer.byteLength;updateGlobalBufferAndViews(buffer);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPreMain(cb){__ATMAIN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}if(!Math.imul||Math.imul(4294967295,5)!==-5)Math.imul=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};if(!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(x){froundBuffer[0]=x;return froundBuffer[0]}}if(!Math.clz32)Math.clz32=function(x){var n=32;var y=x>>16;if(y){n-=16;x=y}y=x>>8;if(y){n-=8;x=y}y=x>>4;if(y){n-=4;x=y}y=x>>2;if(y){n-=2;x=y}y=x>>1;if(y)return n-2;return n-x};if(!Math.trunc)Math.trunc=function(x){return x<0?Math.ceil(x):Math.floor(x)};var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what+="";out(what);err(what);ABORT=true;EXITSTATUS=1;what="abort("+what+"). Build with -s ASSERTIONS=1 for more info.";throw new WebAssembly.RuntimeError(what)}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}var wasmBinaryFile="draco_decoder.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(wasmBinaryFile);if(binary){return binary}if(readBinary){return readBinary(wasmBinaryFile)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(){var info={"env":asmLibraryArg,"wasi_snapshot_preview1":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch==="function"){fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");instantiateArrayBuffer(receiveInstantiatedSource)})})}else{return instantiateArrayBuffer(receiveInstantiatedSource)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync();return{}}var tempDouble;var tempI64;__ATINIT__.push({func:function(){___wasm_call_ctors()}});function demangle(func){return func}function demangleAll(text){var regex=/\b_Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function ___cxa_allocate_exception(size){return _malloc(size)}var ___exception_infos={};var ___exception_last=0;function __ZSt18uncaught_exceptionv(){return __ZSt18uncaught_exceptionv.uncaught_exceptions>0}function ___cxa_throw(ptr,type,destructor){___exception_infos[ptr]={ptr:ptr,adjusted:[ptr],type:type,destructor:destructor,refcount:0,caught:false,rethrown:false};___exception_last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exceptions=1}else{__ZSt18uncaught_exceptionv.uncaught_exceptions++}throw ptr}function _abort(){abort()}function _emscripten_get_sbrk_ptr(){return 13840}var _emscripten_memcpy_big=Uint8Array.prototype.copyWithin?function(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}:function(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest)};function _emscripten_get_heap_size(){return HEAPU8.length}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=_emscripten_get_heap_size();var PAGE_MULTIPLE=65536;var maxHeapSize=2147483648-PAGE_MULTIPLE;if(requestedSize>maxHeapSize){return false}var minHeapSize=16777216;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(minHeapSize,requestedSize,overGrownHeapSize),PAGE_MULTIPLE));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function __getExecutableName(){return thisProgram||"./this.program"}function _emscripten_get_environ(){if(!_emscripten_get_environ.strings){var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":(typeof navigator==="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8","_":__getExecutableName()};for(var x in ENV){env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(x+"="+env[x])}_emscripten_get_environ.strings=strings}return _emscripten_get_environ.strings}function _environ_get(__environ,environ_buf){var strings=_emscripten_get_environ();var bufSize=0;strings.forEach(function(string,i){var ptr=environ_buf+bufSize;HEAP32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=_emscripten_get_environ();HEAP32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[penviron_buf_size>>2]=bufSize;return 0}var PATH={splitPath:function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:function(l,r){return PATH.normalize(l+"/"+r)}};var SYSCALLS={mappings:{},buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},get64:function(low,high){return low}};function _fd_close(fd){return 0}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){}function _fd_write(fd,iov,iovcnt,pnum){var num=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j>2]=num;return 0}var ASSERTIONS=false;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}function intArrayToString(array){var ret=[];for(var i=0;i255){if(ASSERTIONS){assert(false,"Character code "+chr+" ("+String.fromCharCode(chr)+") at offset "+i+" not in 0x00-0xFF.")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var decodeBase64=typeof atob==="function"?atob:function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i0){return}preRun();if(runDependencies>0)return;function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}noExitRuntime=true;run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return(__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw"Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr]}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(ensureCache.needed){for(var i=0;i=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret)}else{ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len}return ret},copy:function(array,view,offset){var offsetShifted=offset;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offsetShifted>>=1;break;case 4:offsetShifted>>=2;break;case 8:offsetShifted>>=3;break}for(var i=0;i=d);)++b;if(16k?d+=String.fromCharCode(k):(k-=65536,d+=String.fromCharCode(55296|k>>10,56320|k&1023))}}else d+=String.fromCharCode(k)}return d}function X(a,c){return a?h(ca,a,c):""}function e(a,c){0=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++b)&1023);127>=d?++c:c=2047>=d?c+2:65535>=d?c+3:c+4}c=Array(c+1);b=0;d=c.length;if(0=e){var f=a.charCodeAt(++k);e=65536+((e&1023)<<10)|f&1023}if(127>=e){if(b>=d)break;c[b++]=e}else{if(2047>=e){if(b+1>=d)break;c[b++]=192|e>>6}else{if(65535>=e){if(b+2>=d)break;c[b++]=224|e>>12}else{if(b+3>=d)break;c[b++]=240|e>>18;c[b++]=128|e>>12&63}c[b++]=128|e>>6&63}c[b++]=128| +e&63}}c[b]=0}a=n.alloc(c,T);n.copy(c,T,a)}return a}function x(){throw"cannot construct a Status, no constructor in IDL";}function A(){this.ptr=Oa();u(A)[this.ptr]=this}function B(){this.ptr=Pa();u(B)[this.ptr]=this}function C(){this.ptr=Qa();u(C)[this.ptr]=this}function D(){this.ptr=Ra();u(D)[this.ptr]=this}function E(){this.ptr=Sa();u(E)[this.ptr]=this}function q(){this.ptr=Ta();u(q)[this.ptr]=this}function J(){this.ptr=Ua();u(J)[this.ptr]=this}function w(){this.ptr=Va();u(w)[this.ptr]=this}function F(){this.ptr= +Wa();u(F)[this.ptr]=this}function r(){this.ptr=Xa();u(r)[this.ptr]=this}function G(){this.ptr=Ya();u(G)[this.ptr]=this}function H(){this.ptr=Za();u(H)[this.ptr]=this}function O(){this.ptr=$a();u(O)[this.ptr]=this}function K(){this.ptr=ab();u(K)[this.ptr]=this}function g(){this.ptr=bb();u(g)[this.ptr]=this}function y(){this.ptr=cb();u(y)[this.ptr]=this}function Q(){throw"cannot construct a VoidPtr, no constructor in IDL";}function I(){this.ptr=db();u(I)[this.ptr]=this}function L(){this.ptr=eb();u(L)[this.ptr]= +this}m=m||{};var a="undefined"!==typeof m?m:{},Ga=!1,Ha=!1;a.onRuntimeInitialized=function(){Ga=!0;if(Ha&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ha=!0;if(Ga&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3=a[1]?!0:0!=a[0]||10>2]},getStr:function(){return X(R.get())}, +get64:function(){var a=R.get();R.get();return a},getZero:function(){R.get()}},Ka={__cxa_allocate_exception:function(a){return ib(a)},__cxa_throw:function(a,c,b){"uncaught_exception"in ta?ta.uncaught_exceptions++:ta.uncaught_exceptions=1;throw a;},abort:function(){z()},emscripten_get_sbrk_ptr:function(){return 13664},emscripten_memcpy_big:function(a,c,b){ca.set(ca.subarray(c,c+b),a)},emscripten_resize_heap:function(a){if(2147418112= +c?e(2*c,65536):Math.min(e((3*c+2147483648)/4,65536),2147418112);a:{try{ia.grow(c-ka.byteLength+65535>>16);l(ia.buffer);var b=1;break a}catch(d){}b=void 0}return b?!0:!1},environ_get:function(a,c){var b=0;ba().forEach(function(d,e){var f=c+b;e=P[a+4*e>>2]=f;for(f=0;f>0]=d.charCodeAt(f);T[e>>0]=0;b+=d.length+1});return 0},environ_sizes_get:function(a,c){var b=ba();P[a>>2]=b.length;var d=0;b.forEach(function(a){d+=a.length+1});P[c>>2]=d;return 0},fd_close:function(a){return 0},fd_seek:function(a, +c,b,d,e){return 0},fd_write:function(a,c,b,d){try{for(var e=0,f=0;f>2],k=P[c+(8*f+4)>>2],h=0;h>2]=e;return 0}catch(ua){return"undefined"!==typeof FS&&ua instanceof FS.ErrnoError||z(ua),ua.errno}},memory:ia,setTempRet0:function(a){},table:gb},La=function(){function e(c,b){a.asm=c.exports;aa--;a.monitorRunDependencies&&a.monitorRunDependencies(aa);0==aa&&(null!==sa&&(clearInterval(sa),sa=null),ja&&(c=ja,ja=null,c()))}function c(a){e(a.instance)} +function b(a){return Ma().then(function(a){return WebAssembly.instantiate(a,d)}).then(a,function(a){Y("failed to asynchronously prepare wasm: "+a);z(a)})}var d={env:Ka,wasi_unstable:Ka};aa++;a.monitorRunDependencies&&a.monitorRunDependencies(aa);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(Na){return Y("Module.instantiateWasm callback failed with error: "+Na),!1}(function(){if(da||"function"!==typeof WebAssembly.instantiateStreaming||va(U)||"function"!==typeof fetch)return b(c);fetch(U, +{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,d).then(c,function(a){Y("wasm streaming compile failed: "+a);Y("falling back to ArrayBuffer instantiation");b(c)})})})();return{}}();a.asm=La;var hb=a.___wasm_call_ctors=function(){return a.asm.__wasm_call_ctors.apply(null,arguments)},jb=a._emscripten_bind_Status_code_0=function(){return a.asm.emscripten_bind_Status_code_0.apply(null,arguments)},kb=a._emscripten_bind_Status_ok_0=function(){return a.asm.emscripten_bind_Status_ok_0.apply(null, +arguments)},lb=a._emscripten_bind_Status_error_msg_0=function(){return a.asm.emscripten_bind_Status_error_msg_0.apply(null,arguments)},mb=a._emscripten_bind_Status___destroy___0=function(){return a.asm.emscripten_bind_Status___destroy___0.apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_DracoUInt16Array_0.apply(null,arguments)},nb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt16Array_GetValue_1.apply(null, +arguments)},ob=a._emscripten_bind_DracoUInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_size_0.apply(null,arguments)},pb=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt16Array___destroy___0.apply(null,arguments)},Pa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm.emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},qb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm.emscripten_bind_PointCloud_num_attributes_0.apply(null, +arguments)},rb=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm.emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},sb=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm.emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Qa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_DracoUInt8Array_0.apply(null,arguments)},tb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt8Array_GetValue_1.apply(null, +arguments)},ub=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},vb=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},Ra=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_DracoUInt32Array_0.apply(null,arguments)},wb=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt32Array_GetValue_1.apply(null, +arguments)},xb=a._emscripten_bind_DracoUInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_size_0.apply(null,arguments)},yb=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt32Array___destroy___0.apply(null,arguments)},Sa=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},zb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1= +function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},Ab=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,arguments)},Bb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},Ta=a._emscripten_bind_PointAttribute_PointAttribute_0= +function(){return a.asm.emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Cb=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm.emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm.emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},Eb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return a.asm.emscripten_bind_PointAttribute_attribute_type_0.apply(null, +arguments)},Fb=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm.emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},Gb=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm.emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Hb=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm.emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Ib=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_stride_0.apply(null, +arguments)},Jb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Kb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm.emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)},Lb=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm.emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Ua=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0= +function(){return a.asm.emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,arguments)},Mb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm.emscripten_bind_AttributeTransformData_transform_type_0.apply(null,arguments)},Nb=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm.emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},Va=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0= +function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},Ob=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},Pb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)}, +Qb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},Rb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,arguments)},Sb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,arguments)}, +Wa=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return a.asm.emscripten_bind_DracoInt8Array_DracoInt8Array_0.apply(null,arguments)},Tb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt8Array_GetValue_1.apply(null,arguments)},Ub=a._emscripten_bind_DracoInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoInt8Array_size_0.apply(null,arguments)},Vb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt8Array___destroy___0.apply(null, +arguments)},Xa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm.emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},Wb=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},Xb=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Yb=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3= +function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntryArray_3.apply(null,arguments)},Zb=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},$b=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},ac=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm.emscripten_bind_MetadataQuerier_NumEntries_1.apply(null, +arguments)},bc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,arguments)},cc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm.emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},Ya=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return a.asm.emscripten_bind_DracoInt16Array_DracoInt16Array_0.apply(null,arguments)},dc=a._emscripten_bind_DracoInt16Array_GetValue_1= +function(){return a.asm.emscripten_bind_DracoInt16Array_GetValue_1.apply(null,arguments)},ec=a._emscripten_bind_DracoInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoInt16Array_size_0.apply(null,arguments)},fc=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt16Array___destroy___0.apply(null,arguments)},Za=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null, +arguments)},gc=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},hc=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_size_0.apply(null,arguments)},ic=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},$a=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm.emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null, +arguments)},jc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm.emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},ab=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return a.asm.emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,arguments)},kc=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm.emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},lc=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return a.asm.emscripten_bind_DecoderBuffer___destroy___0.apply(null, +arguments)},bb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm.emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},mc=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=function(){return a.asm.emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)},nc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,arguments)},oc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null, +arguments)},pc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeId_2.apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetAttribute_2= +function(){return a.asm.emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm.emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null, +arguments)},wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm.emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return a.asm.emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt16Array_3.apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3= +function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt32Array_3.apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null, +arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3.apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3.apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3.apply(null,arguments)}, +Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3.apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3.apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3.apply(null,arguments)},Jc= +a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return a.asm.emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5.apply(null,arguments)},Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return a.asm.emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},Lc=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm.emscripten_bind_Decoder___destroy___0.apply(null,arguments)},cb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm.emscripten_bind_Mesh_Mesh_0.apply(null, +arguments)},Mc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm.emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},Nc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm.emscripten_bind_Mesh_num_attributes_0.apply(null,arguments)},Oc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm.emscripten_bind_Mesh_num_points_0.apply(null,arguments)},Pc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm.emscripten_bind_Mesh___destroy___0.apply(null,arguments)}, +Qc=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm.emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},db=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm.emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,arguments)},Rc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},Sc=a._emscripten_bind_DracoInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoInt32Array_size_0.apply(null, +arguments)},Tc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},eb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm.emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},Uc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm.emscripten_bind_Metadata___destroy___0.apply(null,arguments)},Vc=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm.emscripten_enum_draco_StatusCode_OK.apply(null, +arguments)},Wc=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_DRACO_ERROR.apply(null,arguments)},Xc=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},Yc=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm.emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},Zc=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION= +function(){return a.asm.emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,arguments)},$c=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm.emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},ad=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return a.asm.emscripten_enum_draco_DataType_DT_INVALID.apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT8.apply(null, +arguments)},cd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT8.apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_INT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT16.apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT16.apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT32.apply(null, +arguments)},gd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT32.apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_INT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT64.apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT64.apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT32.apply(null, +arguments)},kd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT64.apply(null,arguments)},ld=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return a.asm.emscripten_enum_draco_DataType_DT_BOOL.apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return a.asm.emscripten_enum_draco_DataType_DT_TYPES_COUNT.apply(null,arguments)},nd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null, +arguments)},od=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},pd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},qd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null, +arguments)},rd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},sd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},td=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null, +arguments)},ud=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},vd=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},wd=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},xd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR= +function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},yd=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},zd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)};a._setThrew=function(){return a.asm.setThrew.apply(null,arguments)};var ta=a.__ZSt18uncaught_exceptionv= +function(){return a.asm._ZSt18uncaught_exceptionv.apply(null,arguments)};a._free=function(){return a.asm.free.apply(null,arguments)};var ib=a._malloc=function(){return a.asm.malloc.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.__growWasmMemory=function(){return a.asm.__growWasmMemory.apply(null,arguments)}; +a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)}; +a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_iidiiii=function(){return a.asm.dynCall_iidiiii.apply(null,arguments)};a.dynCall_jiji=function(){return a.asm.dynCall_jiji.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.asm=La;var fa;a.then=function(e){if(fa)e(a); +else{var c=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){c&&c();e(a)}}return a};ja=function c(){fa||ma();fa||(ja=c)};a.run=ma;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0=n.size?(t(0>=1;break;case 4:d>>=2;break;case 8:d>>=3}for(var c=0;c 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],2:[function(require,module,exports){ +GLTFValidator = require('gltf-validator'); +},{"gltf-validator":4}],3:[function(require,module,exports){ +(function (process,global,__filename,__argument0,__argument1,__argument2,__argument3,__dirname){ +var dartNodePreambleSelf="undefined"!=typeof global?global:window,self=Object.create(dartNodePreambleSelf);if(self.scheduleImmediate=self.setImmediate?function(e){dartNodePreambleSelf.setImmediate(e)}:function(e){setTimeout(e,0)},self.require=require,self.exports=exports,"undefined"!=typeof process)self.process=process;if("undefined"!=typeof __dirname)self.__dirname=__dirname;if("undefined"!=typeof __filename)self.__filename=__filename;if(!dartNodePreambleSelf.window&&!('undefined'!==typeof WorkerGlobalScope&&dartNodePreambleSelf instanceof WorkerGlobalScope)){var url=("undefined"!=typeof __webpack_require__?__non_webpack_require__:require)("url");self.location={get href(){if(url.pathToFileURL)return url.pathToFileURL(process.cwd()).href+"/";else return"file://"+function(){var e=process.cwd();if("win32"!=process.platform)return e;else return"/"+e.replace(/\\/g,"/")}()+"/"}},function(){function e(){try{throw new Error}catch(t){var e=t.stack,r=new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$","mg"),l=null;do{var n=r.exec(e);if(null!=n)l=n}while(null!=n);return l[1]}}var r=null;self.document={get currentScript(){if(null==r)r={src:e()};return r}}}(),self.dartDeferredLibraryLoader=function(e,r,l){try{load(e),r()}catch(e){l(e)}}}{}(function dartProgram(){function copyProperties(a,b){var u=Object.keys(a) +for(var t=0;t=0)return true +if(typeof version=="function"&&version.length==0){var s=version() +if(/^\d+\.\d+\.\d+\.\d+$/.test(s))return true}}catch(r){}return false}() +function setFunctionNamesIfNecessary(a){function t(){};if(typeof t.name=="string")return +for(var u=0;u36)throw H.e(P.S(b,2,36,"radix",null)) +if(b===10&&t!=null)return parseInt(a,10) +if(b<10||t==null){s=b<=10?47+b:86+b +r=u[1] +for(q=r.length,p=0;ps)return}return parseInt(a,b)}, +dg:function(a){return H.rK(a)+H.mo(H.bp(a),0,null)}, +rK:function(a){var u,t,s,r,q,p,o,n=J.m(a),m=n.constructor +if(typeof m=="function"){u=m.name +t=typeof u==="string"?u:null}else t=null +s=t==null +if(s||n===C.bp||!!n.$ibW){r=C.a0(a) +if(s)t=r +if(r==="Object"){q=a.constructor +if(typeof q=="function"){p=String(q).match(/^\s*function\s*([\w$]*)\s*\(/) +o=p==null?null:p[1] +if(typeof o==="string"&&/^\w+$/.test(o))t=o}}return t}t=t +return H.cd(t.length>1&&C.a.G(t,0)===36?C.a.aN(t,1):t)}, +np:function(a){var u,t,s,r,q=J.H(a) +if(q<=500)return String.fromCharCode.apply(null,a) +for(u="",t=0;t65535)return H.rN(a)}return H.np(a)}, +rO:function(a,b,c){var u,t,s,r +if(c<=500&&b===0&&c===a.length)return String.fromCharCode.apply(null,a) +for(u=b,t="";u>>0,56320|u&1023)}}throw H.e(P.S(a,0,1114111,null,null))}, +a8:function(a){if(a.date===void 0)a.date=new Date(a.a) +return a.date}, +df:function(a){return a.b?H.a8(a).getUTCFullYear()+0:H.a8(a).getFullYear()+0}, +nu:function(a){return a.b?H.a8(a).getUTCMonth()+1:H.a8(a).getMonth()+1}, +nq:function(a){return a.b?H.a8(a).getUTCDate()+0:H.a8(a).getDate()+0}, +nr:function(a){return a.b?H.a8(a).getUTCHours()+0:H.a8(a).getHours()+0}, +nt:function(a){return a.b?H.a8(a).getUTCMinutes()+0:H.a8(a).getMinutes()+0}, +nv:function(a){return a.b?H.a8(a).getUTCSeconds()+0:H.a8(a).getSeconds()+0}, +ns:function(a){return a.b?H.a8(a).getUTCMilliseconds()+0:H.a8(a).getMilliseconds()+0}, +bT:function(a,b,c){var u,t,s={} +s.a=0 +u=[] +t=[] +s.a=b.length +C.d.J(u,b) +s.b="" +if(c!=null&&c.a!==0)c.H(0,new H.ib(s,t,u)) +""+s.a +return J.qJ(a,new H.fH(C.cS,0,u,t,0))}, +rL:function(a,b,c){var u,t,s,r +if(b instanceof Array)u=c==null||c.a===0 +else u=!1 +if(u){t=b +s=t.length +if(s===0){if(!!a.$0)return a.$0()}else if(s===1){if(!!a.$1)return a.$1(t[0])}else if(s===2){if(!!a.$2)return a.$2(t[0],t[1])}else if(s===3){if(!!a.$3)return a.$3(t[0],t[1],t[2])}else if(s===4){if(!!a.$4)return a.$4(t[0],t[1],t[2],t[3])}else if(s===5)if(!!a.$5)return a.$5(t[0],t[1],t[2],t[3],t[4]) +r=a[""+"$"+s] +if(r!=null)return r.apply(a,t)}return H.rJ(a,b,c)}, +rJ:function(a,b,c){var u,t,s,r,q,p,o,n,m,l,k,j +if(b!=null)u=b instanceof Array?b:P.ni(b,!0,null) +else u=[] +t=u.length +s=a.$R +if(ts+p.length)return H.bT(a,u,null) +C.d.J(u,p.slice(t-s)) +return n.apply(a,u)}else{if(t>s)return H.bT(a,u,c) +m=Object.keys(p) +if(c==null)for(q=m.length,l=0;l=u)return P.d6(b,a,t,null,u) +return P.id(b,t)}, +u2:function(a,b,c){var u="Invalid value" +if(a<0||a>c)return new P.bU(0,c,!0,a,"start",u) +if(b!=null)if(bc)return new P.bU(a,c,!0,b,"end",u) +return new P.ab(!0,b,"end",null)}, +al:function(a){return new P.ab(!0,a,null,null)}, +e:function(a){var u +if(a==null)a=new P.cA() +u=new Error() +u.dartException=a +if("defineProperty" in Object){Object.defineProperty(u,"message",{get:H.ou}) +u.name=""}else u.toString=H.ou +return u}, +ou:function(){return J.aa(this.dartException)}, +O:function(a){throw H.e(a)}, +cc:function(a){throw H.e(P.X(a))}, +aA:function(a){var u,t,s,r,q,p +a=H.or(a.replace(String({}),'$receiver$')) +u=a.match(/\\\$[a-zA-Z]+\\\$/g) +if(u==null)u=H.a([],[P.d]) +t=u.indexOf("\\$arguments\\$") +s=u.indexOf("\\$argumentsExpr\\$") +r=u.indexOf("\\$expr\\$") +q=u.indexOf("\\$method\\$") +p=u.indexOf("\\$receiver\\$") +return new H.jz(a.replace(new RegExp('\\\\\\$arguments\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$','g'),'((?:x|[^x])*)'),t,s,r,q,p)}, +jA:function(a){return function($expr$){var $argumentsExpr$='$arguments$' +try{$expr$.$method$($argumentsExpr$)}catch(u){return u.message}}(a)}, +nA:function(a){return function($expr$){try{$expr$.$method$}catch(u){return u.message}}(a)}, +no:function(a,b){return new H.i6(a,b==null?null:b.method)}, +m7:function(a,b){var u=b==null,t=u?null:b.method +return new H.fO(a,t,u?null:b.receiver)}, +z:function(a){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g=null,f=new H.lP(a) +if(a==null)return +if(a instanceof H.co)return f.$1(a.a) +if(typeof a!=="object")return a +if("dartException" in a)return f.$1(a.dartException) +else if(!("message" in a))return a +u=a.message +if("number" in a&&typeof a.number=="number"){t=a.number +s=t&65535 +if((C.c.ad(t,16)&8191)===10)switch(s){case 438:return f.$1(H.m7(H.b(u)+" (Error "+s+")",g)) +case 445:case 5007:return f.$1(H.no(H.b(u)+" (Error "+s+")",g))}}if(a instanceof TypeError){r=$.qo() +q=$.qp() +p=$.qq() +o=$.qr() +n=$.qu() +m=$.qv() +l=$.qt() +$.qs() +k=$.qx() +j=$.qw() +i=r.a3(u) +if(i!=null)return f.$1(H.m7(u,i)) +else{i=q.a3(u) +if(i!=null){i.method="call" +return f.$1(H.m7(u,i))}else{i=p.a3(u) +if(i==null){i=o.a3(u) +if(i==null){i=n.a3(u) +if(i==null){i=m.a3(u) +if(i==null){i=l.a3(u) +if(i==null){i=o.a3(u) +if(i==null){i=k.a3(u) +if(i==null){i=j.a3(u) +h=i!=null}else h=!0}else h=!0}else h=!0}else h=!0}else h=!0}else h=!0}else h=!0 +if(h)return f.$1(H.no(u,i))}}return f.$1(new H.jE(typeof u==="string"?u:""))}if(a instanceof RangeError){if(typeof u==="string"&&u.indexOf("call stack")!==-1)return new P.dm() +u=function(b){try{return String(b)}catch(e){}return null}(a) +return f.$1(new P.ab(!1,g,g,typeof u==="string"?u.replace(/^RangeError:\s*/,""):u))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof u==="string"&&u==="too much recursion")return new P.dm() +return a}, +ao:function(a){var u +if(a instanceof H.co)return a.b +if(a==null)return new H.dA(a) +u=a.$cachedTrace +if(u!=null)return u +return a.$cachedTrace=new H.dA(a)}, +om:function(a){if(a==null||typeof a!='object')return J.ai(a) +else return H.bb(a)}, +ob:function(a,b){var u,t,s,r=a.length +for(u=0;u=27 +if(q)return H.r6(t,!r,u,b) +if(t===0){r=$.ap +$.ap=r+1 +p="self"+H.b(r) +r="return function(){var "+p+" = this." +q=$.ci +return new Function(r+H.b(q==null?$.ci=H.dZ("self"):q)+";return "+p+"."+H.b(u)+"();}")()}o="abcdefghijklmnopqrstuvwxyz".split("").splice(0,t).join(",") +r=$.ap +$.ap=r+1 +o+=H.b(r) +r="return function("+o+"){return this." +q=$.ci +return new Function(r+H.b(q==null?$.ci=H.dZ("self"):q)+"."+H.b(u)+"("+o+");}")()}, +r7:function(a,b,c,d){var u=H.m_,t=H.n8 +switch(b?-1:a){case 0:throw H.e(H.rQ("Intercepted function with no arguments.")) +case 1:return function(e,f,g){return function(){return f(this)[e](g(this))}}(c,u,t) +case 2:return function(e,f,g){return function(h){return f(this)[e](g(this),h)}}(c,u,t) +case 3:return function(e,f,g){return function(h,i){return f(this)[e](g(this),h,i)}}(c,u,t) +case 4:return function(e,f,g){return function(h,i,j){return f(this)[e](g(this),h,i,j)}}(c,u,t) +case 5:return function(e,f,g){return function(h,i,j,k){return f(this)[e](g(this),h,i,j,k)}}(c,u,t) +case 6:return function(e,f,g){return function(h,i,j,k,l){return f(this)[e](g(this),h,i,j,k,l)}}(c,u,t) +default:return function(e,f,g,h){return function(){h=[g(this)] +Array.prototype.push.apply(h,arguments) +return e.apply(f(this),h)}}(d,u,t)}}, +r8:function(a,b){var u,t,s,r,q,p,o,n=$.ci +if(n==null)n=$.ci=H.dZ("self") +u=$.n7 +if(u==null)u=$.n7=H.dZ("receiver") +t=b.$stubName +s=b.length +r=a[t] +q=b==null?r==null:b===r +p=!q||s>=28 +if(p)return H.r7(s,!q,t,b) +if(s===1){n="return function(){return this."+H.b(n)+"."+H.b(t)+"(this."+H.b(u)+");" +u=$.ap +$.ap=u+1 +return new Function(n+H.b(u)+"}")()}o="abcdefghijklmnopqrstuvwxyz".split("").splice(0,s-1).join(",") +n="return function("+o+"){return this."+H.b(n)+"."+H.b(t)+"(this."+H.b(u)+", "+o+");" +u=$.ap +$.ap=u+1 +return new Function(n+H.b(u)+"}")()}, +mr:function(a,b,c,d,e,f,g){return H.r9(a,b,c,d,!!e,!!f,g)}, +m_:function(a){return a.a}, +n8:function(a){return a.c}, +dZ:function(a){var u,t,s,r=new H.ch("self","target","receiver","name"),q=J.m3(Object.getOwnPropertyNames(r)) +for(u=q.length,t=0;t=b.length)return"unexpected-generic-index:"+H.b(a) +return H.b(b[b.length-a-1])}if('func' in a)return H.tx(a,b) +if('futureOr' in a)return"FutureOr<"+H.bk("type" in a?a.type:null,b)+">" +return"unknown-reified-type"}, +tx:function(a,a0){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b=", " +if("bounds" in a){u=a.bounds +if(a0==null){a0=H.a([],[P.d]) +t=null}else t=a0.length +s=a0.length +for(r=u.length,q=r;q>0;--q)a0.push("T"+(s+q)) +for(p="<",o="",q=0;q "+m}, +mo:function(a,b,c){var u,t,s,r,q,p +if(a==null)return"" +u=new P.N("") +for(t=b,s="",r=!0,q="";t"}, +cb:function(a,b){if(a==null)return b +a=a.apply(null,b) +if(a==null)return +if(typeof a==="object"&&a!==null&&a.constructor===Array)return a +if(typeof a=="function")return a.apply(null,b) +return b}, +a2:function(a,b,c,d){var u,t +if(a==null)return!1 +u=H.bp(a) +t=J.m(a) +if(t[b]==null)return!1 +return H.o6(H.cb(t[d],u),null,c,null)}, +dM:function(a,b,c,d){if(a==null)return a +if(H.a2(a,b,c,d))return a +throw H.e(H.m0(a,function(e,f){return e.replace(/[^<,> ]+/g,function(g){return f[g]||g})}(H.cd(b.substring(2))+H.mo(c,0,null),v.mangledGlobalNames)))}, +o6:function(a,b,c,d){var u,t +if(c==null)return!0 +if(a==null){u=c.length +for(t=0;tn)return!1 +if(o+m=0)return a.replace(/\$/g,"$$$$") +return a}, +or:function(a){if(/[[\]{}()*+?.\\^$|]/.test(a))return a.replace(/[[\]{}()*+?.\\^$|]/g,"\\$&") +return a}, +ot:function(a,b,c){var u=H.uB(a,b,c) +return u}, +uB:function(a,b,c){var u,t,s,r +if(b===""){if(a==="")return c +u=a.length +for(t=c,s=0;s=0)return a.split(b).join(c) +return a.replace(new RegExp(H.or(b),'g'),H.u3(c))}, +e8:function e8(a,b){this.a=a +this.$ti=b}, +e7:function e7(){}, +b2:function b2(a,b,c,d){var _=this +_.a=a +_.b=b +_.c=c +_.$ti=d}, +kg:function kg(a,b){this.a=a +this.$ti=b}, +aI:function aI(a,b){this.a=a +this.$ti=b}, +fH:function fH(a,b,c,d,e){var _=this +_.a=a +_.c=b +_.d=c +_.e=d +_.f=e}, +ib:function ib(a,b,c){this.a=a +this.b=b +this.c=c}, +jz:function jz(a,b,c,d,e,f){var _=this +_.a=a +_.b=b +_.c=c +_.d=d +_.e=e +_.f=f}, +i6:function i6(a,b){this.a=a +this.b=b}, +fO:function fO(a,b,c){this.a=a +this.b=b +this.c=c}, +jE:function jE(a){this.a=a}, +co:function co(a,b){this.a=a +this.b=b}, +lP:function lP(a){this.a=a}, +dA:function dA(a){this.a=a +this.b=null}, +ck:function ck(){}, +jy:function jy(){}, +jm:function jm(){}, +ch:function ch(a,b,c,d){var _=this +_.a=a +_.b=b +_.c=c +_.d=d}, +e0:function e0(a){this.a=a}, +ii:function ii(a){this.a=a}, +dn:function dn(a){this.a=a +this.d=this.b=null}, +bH:function bH(a){var _=this +_.a=0 +_.f=_.e=_.d=_.c=_.b=null +_.r=0 +_.$ti=a}, +fN:function fN(a){this.a=a}, +hw:function hw(a,b){this.a=a +this.b=b +this.c=null}, +b9:function b9(a,b){this.a=a +this.$ti=b}, +hx:function hx(a,b,c){var _=this +_.a=a +_.b=b +_.d=_.c=null +_.$ti=c}, +lz:function lz(a){this.a=a}, +lA:function lA(a){this.a=a}, +lB:function lB(a){this.a=a}, +fJ:function fJ(a,b){var _=this +_.a=a +_.b=b +_.d=_.c=null}, +kM:function kM(a){this.b=a}, +aR:function(a,b,c){}, +tw:function(a){return a}, +hU:function(a,b,c){var u +H.aR(a,b,c) +u=new DataView(a,b) +return u}, +rD:function(a){return new Float32Array(a)}, +rE:function(a){return new Int8Array(a)}, +nl:function(a,b,c){var u +H.aR(a,b,c) +u=new Uint16Array(a,b,c) +return u}, +nm:function(a,b,c){var u +H.aR(a,b,c) +u=new Uint32Array(a,b,c) +return u}, +ma:function(a,b,c){var u +H.aR(a,b,c) +u=new Uint8Array(a,b,c) +return u}, +aB:function(a,b,c){if(a>>>0!==a||a>=c)throw H.e(H.cV(b,a))}, +aQ:function(a,b,c){var u +if(!(a>>>0!==a))u=b>>>0!==b||a>b||b>c +else u=!0 +if(u)throw H.e(H.u2(a,b,c)) +return b}, +cz:function cz(){}, +dc:function dc(){}, +dd:function dd(){}, +cy:function cy(){}, +db:function db(){}, +hV:function hV(){}, +hW:function hW(){}, +hX:function hX(){}, +hY:function hY(){}, +hZ:function hZ(){}, +i_:function i_(){}, +de:function de(){}, +bP:function bP(){}, +cJ:function cJ(){}, +cK:function cK(){}, +cL:function cL(){}, +cM:function cM(){}, +u6:function(a){return J.cr(a?Object.keys(a):[],null)}, +uF:function(a){return v.mangledGlobalNames[a]}},J={ +mx:function(a,b,c,d){return{i:a,p:b,e:c,x:d}}, +lw:function(a){var u,t,s,r,q=a[v.dispatchPropertyName] +if(q==null)if($.mv==null){H.ue() +q=a[v.dispatchPropertyName]}if(q!=null){u=q.p +if(!1===u)return q.i +if(!0===u)return a +t=Object.getPrototypeOf(a) +if(u===t)return q.i +if(q.e===t)throw H.e(P.nB("Return interceptor for "+H.b(u(a,q))))}s=a.constructor +r=s==null?null:s[$.mI()] +if(r!=null)return r +r=H.up(a) +if(r!=null)return r +if(typeof a=="function")return C.bv +u=Object.getPrototypeOf(a) +if(u==null)return C.ao +if(u===Object.prototype)return C.ao +if(typeof s=="function"){Object.defineProperty(s,$.mI(),{value:C.O,enumerable:false,writable:true,configurable:true}) +return C.O}return C.O}, +rp:function(a,b){if(a<0||a>4294967295)throw H.e(P.S(a,0,4294967295,"length",null)) +return J.cr(new Array(a),b)}, +cr:function(a,b){return J.m3(H.a(a,[b]))}, +m3:function(a){a.fixed$length=Array +return a}, +rq:function(a){if(a<256)switch(a){case 9:case 10:case 11:case 12:case 13:case 32:case 133:case 160:return!0 +default:return!1}switch(a){case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8232:case 8233:case 8239:case 8287:case 12288:case 65279:return!0 +default:return!1}}, +nf:function(a,b){var u,t +for(;b>0;b=u){u=b-1 +t=C.a.v(a,u) +if(t!==32&&t!==13&&!J.rq(t))break}return b}, +m:function(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.d9.prototype +return J.fG.prototype}if(typeof a=="string")return J.bG.prototype +if(a==null)return J.fI.prototype +if(typeof a=="boolean")return J.d8.prototype +if(a.constructor==Array)return J.b6.prototype +if(typeof a!="object"){if(typeof a=="function")return J.b7.prototype +return a}if(a instanceof P.c)return a +return J.lw(a)}, +K:function(a){if(typeof a=="string")return J.bG.prototype +if(a==null)return a +if(a.constructor==Array)return J.b6.prototype +if(typeof a!="object"){if(typeof a=="function")return J.b7.prototype +return a}if(a instanceof P.c)return a +return J.lw(a)}, +aU:function(a){if(a==null)return a +if(a.constructor==Array)return J.b6.prototype +if(typeof a!="object"){if(typeof a=="function")return J.b7.prototype +return a}if(a instanceof P.c)return a +return J.lw(a)}, +ua:function(a){if(typeof a=="number")return J.cs.prototype +if(a==null)return a +if(!(a instanceof P.c))return J.bW.prototype +return a}, +lu:function(a){if(typeof a=="string")return J.bG.prototype +if(a==null)return a +if(!(a instanceof P.c))return J.bW.prototype +return a}, +an:function(a){if(a==null)return a +if(typeof a!="object"){if(typeof a=="function")return J.b7.prototype +return a}if(a instanceof P.c)return a +return J.lw(a)}, +a5:function(a,b){if(a==null)return b==null +if(typeof a!="object")return b!=null&&a===b +return J.m(a).K(a,b)}, +mY:function(a,b){if(typeof b==="number")if(a.constructor==Array||typeof a=="string"||H.oj(a,a[v.dispatchPropertyName]))if(b>>>0===b&&b>>0===b&&b=4){t=b.aX() +b.a=a.a +b.c=a.c +P.c0(b,t)}else{t=b.c +b.a=2 +b.c=a +a.ce(t)}}, +c0:function(a,b){var u,t,s,r,q,p,o,n,m,l,k,j=null,i={},h=i.a=a +for(;!0;){u={} +t=h.a===8 +if(b==null){if(t){s=h.c +P.c7(j,j,h.b,s.a,s.b)}return}for(;r=b.a,r!=null;b=r){b.a=null +P.c0(i.a,b)}h=i.a +q=h.c +u.a=t +u.b=q +s=!t +if(s){p=b.c +p=(p&1)!==0||(p&15)===8}else p=!0 +if(p){p=b.b +o=p.b +if(t){n=h.b===o +n=!(n||n)}else n=!1 +if(n){P.c7(j,j,h.b,q.a,q.b) +return}m=$.p +if(m!==o)$.p=o +else m=j +h=b.c +if((h&15)===8)new P.kx(i,u,b,t).$0() +else if(s){if((h&1)!==0)new P.kw(u,b,q).$0()}else if((h&2)!==0)new P.kv(i,u,b).$0() +if(m!=null)$.p=m +h=u.b +if(!!J.m(h).$iR){if(h.a>=4){l=p.c +p.c=null +b=p.aY(l) +p.a=h.a +p.c=h.c +i.a=h +continue}else P.kp(h,p) +return}}k=b.b +l=k.c +k.c=null +b=k.aY(l) +h=u.a +s=u.b +if(!h){k.a=4 +k.c=s}else{k.a=8 +k.c=s}i.a=k +h=k}}, +tH:function(a,b){if(H.ca(a,{func:1,args:[P.c,P.a1]}))return b.bN(a) +if(H.ca(a,{func:1,args:[P.c]}))return a +throw H.e(P.n5(a,"onError","Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result"))}, +tE:function(){var u,t +for(;u=$.c6,u!=null;){$.cS=null +t=u.b +$.c6=t +if(t==null)$.cR=null +u.a.$0()}}, +tJ:function(){$.mm=!0 +try{P.tE()}finally{$.cS=null +$.mm=!1 +if($.c6!=null)$.mV().$1(P.o7())}}, +o3:function(a){var u=new P.du(a) +if($.c6==null){$.c6=$.cR=u +if(!$.mm)$.mV().$1(P.o7())}else $.cR=$.cR.b=u}, +tI:function(a){var u,t,s=$.c6 +if(s==null){P.o3(a) +$.cS=$.cR +return}u=new P.du(a) +t=$.cS +if(t==null){u.b=s +$.c6=$.cS=u}else{u.b=t.b +$.cS=t.b=u +if(u.b==null)$.cR=u}}, +os:function(a){var u=null,t=$.p +if(C.f===t){P.c8(u,u,C.f,a) +return}P.c8(u,u,t,t.co(a))}, +rU:function(a,b){var u=null,t=new P.dE(u,u,u,u,[b]) +a.am(0,new P.jp(t,b),new P.jq(t),P.A) +return new P.bi(t,[b])}, +mc:function(a,b){return new P.kz(new P.jr(a),[b])}, +x8:function(a){if(a==null)H.O(P.qZ("stream")) +return new P.kY()}, +nz:function(a,b,c,d){return new P.dv(null,b,c,a,[d])}, +mp:function(a){var u,t,s,r +if(a==null)return +try{a.$0()}catch(s){u=H.z(s) +t=H.ao(s) +r=$.p +P.c7(null,null,r,u,t)}}, +nJ:function(a,b,c,d){var u=$.p +u=new P.cF(u,d?1:0) +u.bV(a,b,c,d) +return u}, +nX:function(a,b){P.c7(null,null,$.p,a,b)}, +c7:function(a,b,c,d,e){var u={} +u.a=d +P.tI(new P.ll(u,e))}, +nZ:function(a,b,c,d){var u,t=$.p +if(t===c)return d.$0() +$.p=c +u=t +try{t=d.$0() +return t}finally{$.p=u}}, +o0:function(a,b,c,d,e){var u,t=$.p +if(t===c)return d.$1(e) +$.p=c +u=t +try{t=d.$1(e) +return t}finally{$.p=u}}, +o_:function(a,b,c,d,e,f){var u,t=$.p +if(t===c)return d.$2(e,f) +$.p=c +u=t +try{t=d.$2(e,f) +return t}finally{$.p=u}}, +c8:function(a,b,c,d){var u=C.f!==c +if(u)d=!(!u||!1)?c.co(d):c.dN(d) +P.o3(d)}, +k6:function k6(a){this.a=a}, +k5:function k5(a,b,c){this.a=a +this.b=b +this.c=c}, +k7:function k7(a){this.a=a}, +k8:function k8(a){this.a=a}, +l0:function l0(){}, +l1:function l1(a,b){this.a=a +this.b=b}, +k4:function k4(a,b){this.a=a +this.b=!1 +this.$ti=b}, +l7:function l7(a){this.a=a}, +l8:function l8(a){this.a=a}, +ln:function ln(a){this.a=a}, +c1:function c1(a,b){this.a=a +this.b=b}, +bj:function bj(a,b){var _=this +_.a=a +_.d=_.c=_.b=null +_.$ti=b}, +kZ:function kZ(a,b){this.a=a +this.$ti=b}, +R:function R(){}, +kf:function kf(){}, +aN:function aN(a,b){this.a=a +this.$ti=b}, +cH:function cH(a,b,c,d){var _=this +_.a=null +_.b=a +_.c=b +_.d=c +_.e=d}, +E:function E(a,b){var _=this +_.a=0 +_.b=a +_.c=null +_.$ti=b}, +km:function km(a,b){this.a=a +this.b=b}, +ku:function ku(a,b){this.a=a +this.b=b}, +kq:function kq(a){this.a=a}, +kr:function kr(a){this.a=a}, +ks:function ks(a,b,c){this.a=a +this.b=b +this.c=c}, +ko:function ko(a,b){this.a=a +this.b=b}, +kt:function kt(a,b){this.a=a +this.b=b}, +kn:function kn(a,b,c){this.a=a +this.b=b +this.c=c}, +kx:function kx(a,b,c,d){var _=this +_.a=a +_.b=b +_.c=c +_.d=d}, +ky:function ky(a){this.a=a}, +kw:function kw(a,b,c){this.a=a +this.b=b +this.c=c}, +kv:function kv(a,b,c){this.a=a +this.b=b +this.c=c}, +du:function du(a){this.a=a +this.b=null}, +jn:function jn(){}, +jp:function jp(a,b){this.a=a +this.b=b}, +jq:function jq(a){this.a=a}, +jr:function jr(a){this.a=a}, +js:function js(a,b){this.a=a +this.b=b}, +jt:function jt(a,b){this.a=a +this.b=b}, +jo:function jo(){}, +dB:function dB(){}, +kW:function kW(a){this.a=a}, +kV:function kV(a){this.a=a}, +l_:function l_(){}, +k9:function k9(){}, +dv:function dv(a,b,c,d,e){var _=this +_.a=null +_.b=0 +_.c=null +_.d=a +_.e=b +_.f=c +_.r=d +_.$ti=e}, +dE:function dE(a,b,c,d,e){var _=this +_.a=null +_.b=0 +_.c=null +_.d=a +_.e=b +_.f=c +_.r=d +_.$ti=e}, +bi:function bi(a,b){this.a=a +this.$ti=b}, +dw:function dw(a,b,c){var _=this +_.x=a +_.c=_.b=_.a=null +_.d=b +_.e=c +_.r=_.f=null}, +cF:function cF(a,b){var _=this +_.c=_.b=_.a=null +_.d=a +_.e=b +_.r=_.f=null}, +kc:function kc(a,b,c){this.a=a +this.b=b +this.c=c}, +kb:function kb(a){this.a=a}, +kX:function kX(){}, +kz:function kz(a,b){this.a=a +this.b=!1 +this.$ti=b}, +kF:function kF(a){this.b=a +this.a=0}, +kj:function kj(){}, +c_:function c_(a){this.b=a +this.a=null}, +dx:function dx(a,b){this.b=a +this.c=b +this.a=null}, +ki:function ki(){}, +kN:function kN(){}, +kO:function kO(a,b){this.a=a +this.b=b}, +dC:function dC(){this.c=this.b=null +this.a=0}, +kY:function kY(){}, +bw:function bw(a,b){this.a=a +this.b=b}, +l6:function l6(){}, +ll:function ll(a,b){this.a=a +this.b=b}, +kP:function kP(){}, +kR:function kR(a,b){this.a=a +this.b=b}, +kQ:function kQ(a,b){this.a=a +this.b=b}, +nL:function(a,b){var u=a[b] +return u===a?null:u}, +mi:function(a,b,c){if(c==null)a[b]=a +else a[b]=c}, +nM:function(){var u=Object.create(null) +P.mi(u,"",u) +delete u[""] +return u}, +m8:function(a,b,c){return H.ob(a,new H.bH([b,c]))}, +V:function(a,b){return new H.bH([a,b])}, +nh:function(a){return new P.c2([a])}, +at:function(a){return new P.c2([a])}, +au:function(a,b){return H.u7(a,new P.c2([b]))}, +mj:function(){var u=Object.create(null) +u[""]=u +delete u[""] +return u}, +rn:function(a,b,c){var u,t +if(P.mn(a)){if(b==="("&&c===")")return"(...)" +return b+"..."+c}u=H.a([],[P.d]) +$.bl.push(a) +try{P.tC(a,u)}finally{$.bl.pop()}t=P.md(b,u,", ")+c +return t.charCodeAt(0)==0?t:t}, +fF:function(a,b,c){var u,t +if(P.mn(a))return b+"..."+c +u=new P.N(b) +$.bl.push(a) +try{t=u +t.a=P.md(t.a,a,", ")}finally{$.bl.pop()}u.a+=c +t=u.a +return t.charCodeAt(0)==0?t:t}, +mn:function(a){var u,t +for(u=$.bl.length,t=0;t100){while(!0){if(!(m>75&&l>3))break +m-=b.pop().length+2;--l}b.push("...") +return}}s=H.b(r) +t=H.b(q) +m+=t.length+s.length+4}}if(l>b.length+2){m+=5 +o="..."}else o=null +while(!0){if(!(m>80&&b.length>3))break +m-=b.pop().length+2 +if(o==null){m+=5 +o="..."}}if(o!=null)b.push(o) +b.push(s) +b.push(t)}, +ry:function(a,b){var u,t=P.nh(b) +for(u=J.U(a);u.m();)t.A(0,u.gn()) +return t}, +m9:function(a){var u,t={} +if(P.mn(a))return"{...}" +u=new P.N("") +try{$.bl.push(a) +u.a+="{" +t.a=!0 +a.H(0,new P.hB(t,u)) +u.a+="}"}finally{$.bl.pop()}t=u.a +return t.charCodeAt(0)==0?t:t}, +kB:function kB(){}, +kE:function kE(a){var _=this +_.a=0 +_.e=_.d=_.c=_.b=null +_.$ti=a}, +kC:function kC(a,b){this.a=a +this.$ti=b}, +kD:function kD(a,b,c){var _=this +_.a=a +_.b=b +_.c=0 +_.d=null +_.$ti=c}, +c2:function c2(a){var _=this +_.a=0 +_.f=_.e=_.d=_.c=_.b=null +_.r=0 +_.$ti=a}, +kK:function kK(a){this.a=a +this.c=this.b=null}, +kL:function kL(a,b,c){var _=this +_.a=a +_.b=b +_.d=_.c=null +_.$ti=c}, +bX:function bX(a,b){this.a=a +this.$ti=b}, +fE:function fE(){}, +hy:function hy(){}, +J:function J(){}, +hA:function hA(){}, +hB:function hB(a,b){this.a=a +this.b=b}, +a7:function a7(){}, +hC:function hC(a){this.a=a}, +l2:function l2(){}, +hD:function hD(){}, +cE:function cE(a,b){this.a=a +this.$ti=b}, +kS:function kS(){}, +l3:function l3(a,b){this.a=a +this.$ti=b}, +dz:function dz(){}, +dF:function dF(){}, +nY:function(a,b){var u,t,s,r=null +try{r=JSON.parse(a)}catch(t){u=H.z(t) +s=P.y(String(u),null,null) +throw H.e(s)}s=P.la(r) +return s}, +la:function(a){var u +if(a==null)return +if(typeof a!="object")return a +if(Object.getPrototypeOf(a)!==Array.prototype)return new P.kI(a,Object.create(null)) +for(u=0;u=0){m=(m<<6|r)&16777215 +l=l+1&3 +if(l===0){q=e+1 +d[e]=m>>>16&255 +e=q+1 +d[q]=m>>>8&255 +q=e+1 +d[e]=m&255 +e=q +m=0}continue}else if(r===-1&&l>1){if(t>127)break +if(l===3){if((m&3)!==0)throw H.e(P.y(o,a,u)) +d[e]=m>>>10 +d[e+1]=m>>>2}else{if((m&15)!==0)throw H.e(P.y(o,a,u)) +d[e]=m>>>4}p=(3-l)*3 +if(s===37)p+=2 +return P.nI(a,u+1,c,-p-1)}throw H.e(P.y(n,a,u))}if(t>=0&&t<=127)return(m<<2|l)>>>0 +for(u=b;u127)break}throw H.e(P.y(n,a,u))}, +t7:function(a,b,c,d){var u=P.t8(a,b,c),t=(d&3)+(u-b),s=C.c.ad(t,2)*3,r=t&3 +if(r!==0&&u0)return new Uint8Array(s) +return}, +t8:function(a,b,c){var u,t=c,s=t,r=0 +while(!0){if(!(s>b&&r<2))break +c$0:{--s +u=C.a.v(a,s) +if(u===61){++r +t=s +break c$0}if((u|32)===100){if(s===b)break;--s +u=C.a.v(a,s)}if(u===51){if(s===b)break;--s +u=C.a.v(a,s)}if(u===37){++r +t=s +break c$0}break}}return t}, +nI:function(a,b,c,d){var u,t +if(b===c)return d +u=-d-1 +for(;u>0;){t=C.a.v(a,b) +if(u===3){if(t===61){u-=3;++b +break}if(t===37){--u;++b +if(b===c)break +t=C.a.v(a,b)}else break}if((u>3?u-3:u)===2){if(t!==51)break;++b;--u +if(b===c)break +t=C.a.v(a,b)}if((t|32)!==100)break;++b;--u +if(b===c)break}if(b!==c)throw H.e(P.y("Invalid padding character",a,b)) +return-u-1}, +kI:function kI(a,b){this.a=a +this.b=b +this.c=null}, +kJ:function kJ(a){this.a=a}, +kH:function kH(a,b,c){this.b=a +this.c=b +this.a=c}, +dW:function dW(){}, +dY:function dY(){}, +dX:function dX(){}, +ka:function ka(){this.a=0}, +e_:function e_(){}, +e3:function e3(){}, +kT:function kT(a,b,c){this.a=a +this.b=b +this.$ti=c}, +e5:function e5(){}, +eh:function eh(){}, +eS:function eS(){}, +fP:function fP(){}, +fQ:function fQ(a){this.a=a}, +ju:function ju(){}, +jv:function jv(){}, +dD:function dD(){}, +l5:function l5(a,b){this.a=a +this.b=b}, +jM:function jM(){}, +jN:function jN(a){this.a=a}, +dH:function dH(a,b){var _=this +_.a=a +_.b=b +_.c=!0 +_.f=_.e=_.d=0}, +aV:function(a,b,c){var u=H.rM(a,c) +if(u!=null)return u +if(b!=null)return b.$1(a) +throw H.e(P.y(a,null,null))}, +re:function(a){if(a instanceof H.ck)return a.k(0) +return"Instance of '"+H.b(H.dg(a))+"'"}, +hz:function(a,b,c){var u,t,s=J.rp(a,c) +if(a!==0&&!0)for(u=s.length,t=0;t0||c=1000)return""+a +if(u>=100)return t+"0"+u +if(u>=10)return t+"00"+u +return t+"000"+u}, +rd:function(a){var u=Math.abs(a),t=a<0?"-":"+" +if(u>=1e5)return t+u +return t+"0"+u}, +nb:function(a){if(a>=100)return""+a +if(a>=10)return"0"+a +return"00"+a}, +aq:function(a){if(a>=10)return""+a +return"0"+a}, +cn:function(a){if(typeof a==="number"||typeof a==="boolean"||null==a)return J.aa(a) +if(typeof a==="string")return JSON.stringify(a) +return P.re(a)}, +I:function(a){return new P.ab(!1,null,null,a)}, +n5:function(a,b,c){return new P.ab(!0,a,b,c)}, +qZ:function(a){return new P.ab(!1,null,a,"Must not be null")}, +id:function(a,b){return new P.bU(null,null,!0,a,b,"Value not in range")}, +S:function(a,b,c,d,e){return new P.bU(b,c,!0,a,d,"Invalid value")}, +az:function(a,b,c){if(0>a||a>c)throw H.e(P.S(a,0,c,"start",null)) +if(b!=null){if(a>b||b>c)throw H.e(P.S(b,a,c,"end",null)) +return b}return c}, +ay:function(a,b){if(a<0)throw H.e(P.S(a,0,null,b,null))}, +d6:function(a,b,c,d,e){var u=e==null?J.H(b):e +return new P.fz(u,!0,a,c,"Index out of range")}, +W:function(a){return new P.jG(a)}, +nB:function(a){return new P.jB(a)}, +aM:function(a){return new P.be(a)}, +X:function(a){return new P.e6(a)}, +y:function(a,b,c){return new P.ak(a,b,c)}, +ne:function(a,b,c){if(a<=0)return new H.d1([c]) +return new P.kA(a,b,[c])}, +nj:function(a,b,c,d){var u,t,s +if(c){u=H.a([],[d]) +C.d.sh(u,a)}else{t=new Array(a) +t.fixed$length=Array +u=H.a(t,[d])}for(s=0;s=5){u=P.o4(a,0) +if(u===0){t=P.jI(d=14)s[7]=d +r=s[1] +if(r>=0)if(P.o1(a,0,r,20,s)===20)s[7]=r +q=s[2]+1 +p=s[3] +o=s[4] +n=s[5] +m=s[6] +if(mr+3){k=e +l=!1}else{t=p>0 +if(t&&p+1===o){k=e +l=!1}else{if(!(no+2&&C.a.R(a,"/..",n-3) +else j=!0 +if(j){k=e +l=!1}else{if(r===4)if(C.a.R(a,"file",0)){if(q<=0){if(!C.a.R(a,"/",o)){i="file:///" +h=3}else{i="file://" +h=2}a=i+C.a.q(a,o,d) +r-=0 +t=h-0 +n+=t +m+=t +d=a.length +q=7 +p=7 +o=7}else if(o===n){g=n+1;++m +a=C.a.aw(a,o,n,"/");++d +n=g}k="file"}else if(C.a.R(a,"http",0)){if(t&&p+3===o&&C.a.R(a,"80",p+1)){f=o-3 +n-=3 +m-=3 +a=C.a.aw(a,p,o,"") +d-=3 +o=f}k="http"}else k=e +else if(r===5&&C.a.R(a,"https",0)){if(t&&p+4===o&&C.a.R(a,"443",p+1)){f=o-4 +n-=4 +m-=4 +a=C.a.aw(a,p,o,"") +d-=3 +o=f}k="https"}else k=e +l=!0}}}else k=e +if(l){if(d9)l.$2("invalid character",u)}else{if(s===3)l.$2(n,u) +q=P.aV(C.a.q(a,t,u),o,o) +if(q>255)l.$2(m,t) +p=s+1 +k[s]=q +t=u+1 +s=p}}if(s!==3)l.$2(n,c) +q=P.aV(C.a.q(a,t,c),o,o) +if(q>255)l.$2(m,t) +k[s]=q +return k}, +nE:function(a,b,c){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g=new P.jK(a),f=new P.jL(g,a) +if(a.length<2)g.$1("address is too short") +u=H.a([],[P.h]) +for(t=b,s=t,r=!1,q=!1;t>>0) +u.push((m[2]<<8|m[3])>>>0)}if(r){if(u.length>7)g.$1("an address with a wildcard must have less than 7 parts")}else if(u.length!==8)g.$1("an address without a wildcard must contain exactly 8 parts") +l=new Uint8Array(16) +for(n=u.length,k=9-n,t=0,j=0;tb)j=P.tk(a,b,d) +else{if(d===b)P.c4(a,b,"Invalid empty scheme") +j=""}if(e>b){u=d+3 +t=u=b&&s=b&&u>>4]&1<<(r&15))!==0){if(s&&65<=r&&90>=r){if(l==null)l=new P.N("") +if(t>>4]&1<<(q&15))!==0){if(r&&65<=q&&90>=q){if(s==null)s=new P.N("") +if(t>>4]&1<<(q&15))!==0)P.c4(a,u,"Invalid character") +else{if((q&64512)===55296&&u+1>>4]&1<<(s&15))!==0))P.c4(a,u,"Illegal scheme character") +if(65<=s&&s<=90)t=!0}a=C.a.q(a,b,c) +return P.tc(t?a.toLowerCase():a)}, +tc:function(a){if(a==="http")return"http" +if(a==="file")return"file" +if(a==="https")return"https" +if(a==="package")return"package" +return a}, +tl:function(a,b,c){return P.cN(a,b,c,C.cc,!1)}, +th:function(a,b,c,d,e,f){var u=e==="file",t=u||f,s=P.cN(a,b,c,C.ak,!0) +if(s.length===0){if(u)return"/"}else if(t&&!C.a.S(s,"/"))s="/"+s +return P.tm(s,e,f)}, +tm:function(a,b,c){var u=b.length===0 +if(u&&!c&&!C.a.S(a,"/"))return P.to(a,!u||c) +return P.tp(a)}, +tj:function(a,b,c,d){return P.cN(a,b,c,C.x,!0)}, +tf:function(a,b,c){return P.cN(a,b,c,C.x,!0)}, +ml:function(a,b,c){var u,t,s,r,q,p=b+2 +if(p>=a.length)return"%" +u=C.a.v(a,b+1) +t=C.a.v(a,p) +s=H.ly(u) +r=H.ly(t) +if(s<0||r<0)return"%" +q=s*16+r +if(q<127&&(C.ai[C.c.ad(q,4)]&1<<(q&15))!==0)return H.mb(c&&65<=q&&90>=q?(q|32)>>>0:q) +if(u>=97||t>=97)return C.a.q(a,b,b+3).toUpperCase() +return}, +mk:function(a){var u,t,s,r,q,p,o="0123456789ABCDEF" +if(a<128){u=new Array(3) +u.fixed$length=Array +t=H.a(u,[P.h]) +t[0]=37 +t[1]=C.a.G(o,a>>>4) +t[2]=C.a.G(o,a&15)}else{if(a>2047)if(a>65535){s=240 +r=4}else{s=224 +r=3}else{s=192 +r=2}u=new Array(3*r) +u.fixed$length=Array +t=H.a(u,[P.h]) +for(q=0;--r,r>=0;s=128){p=C.c.dJ(a,6*r)&63|s +t[q]=37 +t[q+1]=C.a.G(o,p>>>4) +t[q+2]=C.a.G(o,p&15) +q+=3}}return P.mf(t,0,null)}, +cN:function(a,b,c,d,e){var u=P.nR(a,b,c,d,e) +return u==null?C.a.q(a,b,c):u}, +nR:function(a,b,c,d,e){var u,t,s,r,q,p,o,n,m +for(u=!e,t=b,s=t,r=null;t>>4]&1<<(q&15))!==0)++t +else{if(q===37){p=P.ml(a,t,!1) +if(p==null){t+=3 +continue}if("%"===p){p="%25" +o=1}else o=3}else if(u&&q<=93&&(C.ab[q>>>4]&1<<(q&15))!==0){P.c4(a,t,"Invalid character") +p=null +o=null}else{if((q&64512)===55296){n=t+1 +if(n=2&&P.nP(J.lX(a,0)))for(u=1;u127||(C.ag[t>>>4]&1<<(t&15))===0)break}return a}, +te:function(a,b){var u,t,s +for(u=0,t=0;t<2;++t){s=C.a.v(a,b+t) +if(48<=s&&s<=57)u=u*16+s-48 +else{s|=32 +if(97<=s&&s<=102)u=u*16+s-87 +else throw H.e(P.I("Invalid URL encoding"))}}return u}, +tq:function(a,b,c,d,e){var u,t,s,r,q=b +while(!0){if(!(q127)throw H.e(P.I("Illegal percent encoding in URI")) +if(t===37){if(q+3>s)throw H.e(P.I("Truncated URI")) +r.push(P.te(a,q+1)) +q+=2}else r.push(t)}}return new P.jN(!1).dR(r)}, +nP:function(a){var u=a|32 +return 97<=u&&u<=122}, +nC:function(a){var u +if(a.length>=5){u=P.o4(a,0) +if(u===0)return P.jI(a,5,null) +if(u===32)return P.jI(C.a.aN(a,5),0,null)}throw H.e(P.y("Does not start with 'data:'",a,0))}, +jI:function(a,b,c){var u,t,s,r,q,p,o,n,m="Invalid MIME type",l=H.a([b-1],[P.h]) +for(u=a.length,t=b,s=-1,r=null;tb)throw H.e(P.y(m,a,t)) +for(;r!==44;){l.push(t);++t +for(q=-1;t=0)l.push(q) +else{p=C.d.gaH(l) +if(r!==44||t!==p+7||!C.a.R(a,"base64",p+1))throw H.e(P.y("Expecting '='",a,t)) +break}}l.push(t) +o=t+1 +if((l.length&1)===1)a=C.b3.e9(a,o,u) +else{n=P.nR(a,o,u,C.x,!0) +if(n!=null)a=C.a.aw(a,o,u,n)}return new P.jH(a,l,c)}, +tv:function(){var u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",t=".",s=":",r="/",q="?",p="#",o=P.nj(22,new P.lc(),!0,P.af),n=new P.lb(o),m=new P.ld(),l=new P.le(),k=n.$2(0,225) +m.$3(k,u,1) +m.$3(k,t,14) +m.$3(k,s,34) +m.$3(k,r,3) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(14,225) +m.$3(k,u,1) +m.$3(k,t,15) +m.$3(k,s,34) +m.$3(k,r,234) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(15,225) +m.$3(k,u,1) +m.$3(k,"%",225) +m.$3(k,s,34) +m.$3(k,r,9) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(1,225) +m.$3(k,u,1) +m.$3(k,s,34) +m.$3(k,r,10) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(2,235) +m.$3(k,u,139) +m.$3(k,r,131) +m.$3(k,t,146) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(3,235) +m.$3(k,u,11) +m.$3(k,r,68) +m.$3(k,t,18) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(4,229) +m.$3(k,u,5) +l.$3(k,"AZ",229) +m.$3(k,s,102) +m.$3(k,"@",68) +m.$3(k,"[",232) +m.$3(k,r,138) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(5,229) +m.$3(k,u,5) +l.$3(k,"AZ",229) +m.$3(k,s,102) +m.$3(k,"@",68) +m.$3(k,r,138) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(6,231) +l.$3(k,"19",7) +m.$3(k,"@",68) +m.$3(k,r,138) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(7,231) +l.$3(k,"09",7) +m.$3(k,"@",68) +m.$3(k,r,138) +m.$3(k,q,172) +m.$3(k,p,205) +m.$3(n.$2(8,8),"]",5) +k=n.$2(9,235) +m.$3(k,u,11) +m.$3(k,t,16) +m.$3(k,r,234) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(16,235) +m.$3(k,u,11) +m.$3(k,t,17) +m.$3(k,r,234) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(17,235) +m.$3(k,u,11) +m.$3(k,r,9) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(10,235) +m.$3(k,u,11) +m.$3(k,t,18) +m.$3(k,r,234) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(18,235) +m.$3(k,u,11) +m.$3(k,t,19) +m.$3(k,r,234) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(19,235) +m.$3(k,u,11) +m.$3(k,r,234) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(11,235) +m.$3(k,u,11) +m.$3(k,r,10) +m.$3(k,q,172) +m.$3(k,p,205) +k=n.$2(12,236) +m.$3(k,u,12) +m.$3(k,q,12) +m.$3(k,p,205) +k=n.$2(13,237) +m.$3(k,u,13) +m.$3(k,q,13) +l.$3(n.$2(20,245),"az",21) +k=n.$2(21,245) +l.$3(k,"az",21) +l.$3(k,"09",21) +m.$3(k,"+-.",21) +return o}, +o1:function(a,b,c,d,e){var u,t,s,r,q=$.qC() +for(u=b;u95?31:s] +d=r&31 +e[r>>>5]=u}return d}, +o4:function(a,b){return((C.a.G(a,b+4)^58)*3|C.a.G(a,b)^100|C.a.G(a,b+1)^97|C.a.G(a,b+2)^116|C.a.G(a,b+3)^97)>>>0}, +i1:function i1(a,b){this.a=a +this.b=b}, +aT:function aT(){}, +cm:function cm(a,b){this.a=a +this.b=b}, +w:function w(){}, +b3:function b3(){}, +cA:function cA(){}, +ab:function ab(a,b,c,d){var _=this +_.a=a +_.b=b +_.c=c +_.d=d}, +bU:function bU(a,b,c,d,e,f){var _=this +_.e=a +_.f=b +_.a=c +_.b=d +_.c=e +_.d=f}, +fz:function fz(a,b,c,d,e){var _=this +_.f=a +_.a=b +_.b=c +_.c=d +_.d=e}, +i0:function i0(a,b,c,d){var _=this +_.a=a +_.b=b +_.c=c +_.d=d}, +jG:function jG(a){this.a=a}, +jB:function jB(a){this.a=a}, +be:function be(a){this.a=a}, +e6:function e6(a){this.a=a}, +i7:function i7(){}, +dm:function dm(){}, +ei:function ei(a){this.a=a}, +kl:function kl(a){this.a=a}, +ak:function ak(a,b,c){this.a=a +this.b=b +this.c=c}, +bB:function bB(){}, +h:function h(){}, +t:function t(){}, +kA:function kA(a,b,c){this.a=a +this.b=b +this.$ti=c}, +Z:function Z(){}, +l:function l(){}, +f:function f(){}, +cv:function cv(a,b,c){this.a=a +this.b=b +this.$ti=c}, +A:function A(){}, +G:function G(){}, +c:function c(){}, +dl:function dl(){}, +a1:function a1(){}, +d:function d(){}, +N:function N(a){this.a=a}, +me:function me(){}, +bV:function bV(){}, +ah:function ah(){}, +bY:function bY(){}, +jJ:function jJ(a){this.a=a}, +jK:function jK(a){this.a=a}, +jL:function jL(a,b){this.a=a +this.b=b}, +dG:function dG(a,b,c,d,e,f,g){var _=this +_.a=a +_.b=b +_.c=c +_.d=d +_.e=e +_.f=f +_.r=g +_.z=_.y=null}, +l4:function l4(a,b){this.a=a +this.b=b}, +jH:function jH(a,b,c){this.a=a +this.b=b +this.c=c}, +lc:function lc(){}, +lb:function lb(a){this.a=a}, +ld:function ld(){}, +le:function le(){}, +kU:function kU(a,b,c,d,e,f,g,h){var _=this +_.a=a +_.b=b +_.c=c +_.d=d +_.e=e +_.f=f +_.r=g +_.x=h +_.y=null}, +kh:function kh(a,b,c,d,e,f,g){var _=this +_.a=a +_.b=b +_.c=c +_.d=d +_.e=e +_.f=f +_.r=g +_.z=_.y=null}, +mw:function(a){var u=J.m(a) +if(!u.$if&&!u.$it)throw H.e(P.I("object must be a Map or Iterable")) +return P.tu(a)}, +tu:function(a){return new P.l9(new P.kE([null,null])).$1(a)}, +l9:function l9(a){this.a=a}, +af:function af(){}, +tt:function(a){var u,t=a.$dart_jsFunction +if(t!=null)return t +u=function(b,c){return function(){return b(c,Array.prototype.slice.apply(arguments))}}(P.ts,a) +u[$.mB()]=a +a.$dart_jsFunction=u +return u}, +ts:function(a,b){return H.rL(a,b,null)}, +bm:function(a){if(typeof a=="function")return a +else return P.tt(a)}},M={ +qW:function(a,b){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f="byteOffset",e=null,d="normalized" +F.u(a,C.ck,b) +u=F.F(a,"bufferView",b,!1) +if(u===-1){t=a.u(f) +if(t)b.j($.ce(),H.a(["bufferView"],[P.c]),f) +s=0}else s=F.M(a,f,b,0,e,-1,0,!1) +r=F.M(a,"componentType",b,-1,C.bU,-1,0,!0) +q=F.M(a,"count",b,-1,e,-1,1,!0) +p=F.C(a,"type",b,e,C.k.gI(),e,!0) +o=F.oc(a,d,b) +if(p!=null&&r!==-1){n=C.k.i(0,p) +if(n!=null)if(r===5126){t=[P.h] +m=F.a3(a,"min",b,e,H.a([n],t),1/0,-1/0,!0) +l=F.a3(a,"max",b,e,H.a([n],t),1/0,-1/0,!0)}else{m=F.od(a,"min",b,r,n) +l=F.od(a,"max",b,r,n)}else{m=e +l=m}}else{m=e +l=m}k=F.a4(a,"sparse",b,M.tO(),!1) +if(o)t=r===5126||r===5125 +else t=!1 +if(t)b.p($.pM(),d) +if((p==="MAT2"||p==="MAT3"||p==="MAT4")&&s!==-1&&(s&3)!==0)b.p($.pL(),f) +switch(r){case 5120:case 5121:case 5122:case 5123:case 5125:t=P.h +j=[t] +H.dM(l,"$il",j,"$al") +H.dM(m,"$il",j,"$al") +F.C(a,"name",b,e,e,e,!1) +j=F.q(a,C.L,b,e,!1) +i=F.r(a,b) +h=new M.jY(u,s,r,q,p,o,l,m,k,Z.am(r),j,i) +if(m!=null){j=b.M() +i=P.hz(m.length,0,t) +g=new Array(m.length) +g.fixed$length=Array +b.U(h,new M.hT(i,H.a(g,[t]),J.dS(m,!1),j))}if(l!=null){j=b.M() +i=P.hz(l.length,0,t) +g=new Array(l.length) +g.fixed$length=Array +b.U(h,new M.hH(i,H.a(g,[t]),J.dS(l,!1),j))}break +default:t=P.w +j=[t] +H.dM(l,"$il",j,"$al") +H.dM(m,"$il",j,"$al") +F.C(a,"name",b,e,e,e,!1) +j=F.q(a,C.L,b,e,!1) +i=F.r(a,b) +h=new M.jT(u,s,r,q,p,o,l,m,k,Z.am(r),j,i) +b.U(h,new M.fA(b.M())) +if(m!=null){j=b.M() +i=P.hz(m.length,0,P.h) +g=new Array(m.length) +g.fixed$length=Array +b.U(h,new M.hS(i,H.a(g,[t]),J.dS(m,!1),j))}if(l!=null){j=b.M() +i=P.hz(l.length,0,P.h) +g=new Array(l.length) +g.fixed$length=Array +b.U(h,new M.hG(i,H.a(g,[t]),J.dS(l,!1),j))}break}return h}, +aG:function(a,b,c,d,e,f){var u,t,s="byteOffset" +if(a===-1)return!1 +if(a%b!==0)if(f!=null)f.j($.pN(),H.a([a,b],[P.c]),s) +else return!1 +u=d.y +if(u===-1)return!1 +t=u+a +if(t%b!==0)if(f!=null)f.B($.pc(),H.a([t,b],[P.c])) +else return!1 +u=d.z +if(a>u)if(f!=null)f.j($.mJ(),H.a([a,c,e,u],[P.c]),s) +else return!1 +else if(a+c>u)if(f!=null)f.B($.mJ(),H.a([a,c,e,u],[P.c])) +else return!1 +return!0}, +lZ:function(a,b,c,d){if(b==null||b.byteLengthr.gb4()))u=r.gcG()==r.gb4()&&r.ge8()>r.gbH() +else u=!0 +if(u)b.j($.q5(),H.a([t,s],[P.c]),p)}return r}, +bv:function bv(a,b,c,d,e){var _=this +_.e=a +_.f=b +_.r=c +_.a=d +_.b=e +_.c=!1}, +rm:function(a,b){var u,t,s,r,q,p,o,n,m,l,k="bufferView",j=null +F.u(a,C.c2,b) +r=F.F(a,k,b,!1) +q=b.k1 +p=F.C(a,"mimeType",b,j,q,j,!1) +u=F.C(a,"uri",b,j,j,j,!1) +o=r===-1 +n=!o +if(n&&p==null)b.j($.ce(),H.a(["mimeType"],[P.c]),k) +if(!(n&&u!=null))o=o&&u==null +else o=!0 +if(o)b.B($.mR(),H.a(["bufferView","uri"],[P.c])) +t=null +if(u!=null){s=null +try{s=P.nC(u)}catch(m){if(H.z(m) instanceof P.ak)t=F.oh(u,b) +else throw m}if(s!=null){if(b.id)b.p($.mH(),"uri") +l=s.cr() +if(p==null){o=C.d.D(q,s.gat()) +if(!o)b.j($.mS(),H.a([s.gat(),q],[P.c]),"uri") +p=s.gat()}}else l=j}else l=j +q=t +F.C(a,"name",b,j,j,j,!1) +return new T.b5(r,p,q,l,F.q(a,C.as,b,j,!1),F.r(a,b))}, +b5:function b5(a,b,c,d,e,f){var _=this +_.x=a +_.y=b +_.z=c +_.Q=d +_.cx=_.ch=null +_.a=e +_.b=f +_.c=!1}, +rR:function(a,b){var u=null +F.u(a,C.cw,b) +F.M(a,"magFilter",b,-1,C.bJ,-1,0,!1) +F.M(a,"minFilter",b,-1,C.bN,-1,0,!1) +F.M(a,"wrapS",b,10497,C.ac,-1,0,!1) +F.M(a,"wrapT",b,10497,C.ac,-1,0,!1) +F.C(a,"name",b,u,u,u,!1) +return new T.bc(F.q(a,C.dd,b,u,!1),F.r(a,b))}, +bc:function bc(a,b){this.a=a +this.b=b +this.c=!1}, +rA:function(){return new T.bO(new Float32Array(16))}, +rP:function(){return new T.di(new Float32Array(4))}, +nH:function(a){var u=new Float32Array(3) +u[2]=a[2] +u[1]=a[1] +u[0]=a[0] +return new T.bh(u)}, +nG:function(){return new T.bh(new Float32Array(3))}, +bO:function bO(a){this.a=a}, +di:function di(a){this.a=a}, +bh:function bh(a){this.a=a}, +ds:function ds(a){this.a=a}},Q={ +r1:function(a,b){var u,t,s,r,q,p,o,n,m,l="byteLength",k=null,j="uri" +F.u(a,C.cD,b) +r=F.M(a,l,b,-1,k,-1,1,!0) +u=null +q=a.u(j) +if(q){t=F.C(a,j,b,k,k,k,!1) +if(t!=null){s=null +try{s=P.nC(t)}catch(p){if(H.z(p) instanceof P.ak)u=F.oh(t,b) +else throw p}if(s!=null){if(b.id)b.p($.mH(),j) +if(s.gat()==="application/octet-stream"||s.gat()==="application/gltf-buffer")o=s.cr() +else{b.j($.pQ(),H.a([s.gat()],[P.c]),j) +o=k}}else o=k +if(o!=null&&r!==-1&&o.length!==r){n=$.oO() +m=o.length +b.j(n,H.a([m,r],[P.c]),l) +r=m}}else o=k}else o=k +n=u +F.C(a,"name",b,k,k,k,!1) +return new Q.b_(n,r,q,o,F.q(a,C.d_,b,k,!1),F.r(a,b))}, +b_:function b_(a,b,c,d,e,f){var _=this +_.x=a +_.y=b +_.z=c +_.Q=d +_.a=e +_.b=f +_.c=!1}, +ol:function(){var u=new Q.lN() +J.qM(self.exports,P.bm(new Q.lJ(u))) +J.qN(self.exports,P.bm(new Q.lK(u))) +J.qO(self.exports,P.bm(new Q.lL())) +J.qL(self.exports,P.bm(new Q.lM()))}, +dN:function(a,b){return Q.uH(a,b)}, +uH:function(a,b){var u=0,t=P.cT([P.f,P.d,P.c]),s,r=2,q,p=[],o,n,m,l,k,j,i +var $async$dN=P.cU(function(c,d){if(c===1){q=d +u=r}while(true)switch(u){case 0:if(!J.m(a).$iaf)throw H.e(P.I("data: Argument must be a Uint8Array.")) +l=Q.nT(b) +o=Q.nV(l) +n=null +r=4 +k=[P.l,P.h] +u=7 +return P.c5(K.ri(P.mc(H.a([a],[k]),k),o),$async$dN) +case 7:m=d +u=8 +return P.c5(m.bM(),$async$dN) +case 8:n=d +r=2 +u=6 +break +case 4:r=3 +i=q +if(H.z(i) instanceof K.d5)throw i +else throw i +u=6 +break +case 3:u=2 +break +case 6:s=Q.dK(l,o,n) +u=1 +break +case 1:return P.cP(s,t) +case 2:return P.cO(q,t)}}) +return P.cQ($async$dN,t)}, +mA:function(a,b){var u=0,t=P.cT([P.f,P.d,P.c]),s,r,q +var $async$mA=P.cU(function(c,d){if(c===1)return P.cO(d,t) +while(true)switch(u){case 0:if(typeof a!=="string")throw H.e(P.I("json: Argument must be a string.")) +r=Q.nT(b) +q=Q.nV(r) +s=Q.dK(r,q,K.rh(a,q)) +u=1 +break +case 1:return P.cP(s,t)}}) +return P.cQ($async$mA,t)}, +nT:function(a){var u +if(a!=null)u=typeof a==="number"||typeof a==="boolean"||typeof a==="string"||!!J.m(a).$il +else u=!1 +if(u)throw H.e(P.I("options: Value must be an object.")) +return H.oi(a,"$idy")}, +dK:function(a,b,c){var u=0,t=P.cT([P.f,P.d,P.c]),s,r,q,p,o,n,m +var $async$dK=P.cU(function(d,e){if(d===1)return P.cO(e,t) +while(true)switch(u){case 0:m=a==null +if(!m){r=J.an(a) +q=Q.tz(r.gb8(a)) +if(r.gbx(a)!=null&&!J.m(r.gbx(a)).$ibB)throw H.e(P.I("options.externalResourceFunction: Value must be a function.")) +else p=r.gbx(a) +if(r.gbQ(a)!=null){o=r.gbQ(a) +o=typeof o!=="boolean"}else o=!1 +if(o)throw H.e(P.I("options.validateAccessorData: Value must be a boolean.")) +if(r.gbS(a)!=null){r=r.gbS(a) +r=typeof r!=="boolean"}else r=!1 +if(r)throw H.e(P.I("options.writeTimestamp: Value must be a boolean."))}else{q=null +p=null}u=(c==null?null:c.b)!=null&&p!=null?3:4 +break +case 3:n=Q.ty(b,c,p) +r=J.qH(a) +u=5 +return P.c5(n.aJ(r==null?!0:r),$async$dK) +case 5:case 4:m=m?null:J.qI(a) +s=new A.jP(q,b,c,m==null?!0:m).b7() +u=1 +break +case 1:return P.cP(s,t)}}) +return P.cQ($async$dK,t)}, +tz:function(a){var u,t,s +if(a!=null)if(typeof a==="string")try{t=P.nD(a) +return t}catch(s){t=H.z(s) +if(t instanceof P.ak){u=t +throw H.e(P.I("options.uri: "+H.b(u)+"."))}else throw s}else throw H.e(P.I("options.uri: Value must be a string.")) +return}, +nV:function(a){var u,t,s,r,q,p,o,n,m +if(a!=null){u=J.an(a) +if(u.gb5(a)!=null){t=u.gb5(a) +t=typeof t!=="number"||Math.floor(t)!==t||u.gb5(a)<0}else t=!1 +if(t)throw H.e(P.I("options.maxIssues: Value must be a non-negative integer.")) +if(u.gb2(a)!=null){if(!J.m(u.gb2(a)).$il)throw H.e(P.I("options.ignoredIssues: Value must be an array.")) +s=H.a([],[P.d]) +for(r=0;r=0&&n<=3)p.l(0,o,C.cu[n]) +else throw H.e(P.I('options.severityOverrides["'+H.b(o)+'"]: Value must be one of [0, 1, 2, 3].'))}}else p=null +m=M.nF(s,u.gb5(a),p)}else m=null +return M.rb(m)}, +ty:function(a,b,c){var u=new Q.lh(c) +return new N.ie(b.b,a,new Q.lf(b,u),new Q.lg(u))}, +dh:function dh(){}, +m2:function m2(){}, +dy:function dy(){}, +lN:function lN(){}, +lJ:function lJ(a){this.a=a}, +lI:function lI(a,b,c){this.a=a +this.b=b +this.c=c}, +lF:function lF(a){this.a=a}, +lG:function lG(a,b){this.a=a +this.b=b}, +lK:function lK(a){this.a=a}, +lH:function lH(a,b,c){this.a=a +this.b=b +this.c=c}, +lD:function lD(a){this.a=a}, +lE:function lE(a,b){this.a=a +this.b=b}, +lL:function lL(){}, +lM:function lM(){}, +lh:function lh(a){this.a=a}, +li:function li(a){this.a=a}, +lj:function lj(a){this.a=a}, +lf:function lf(a,b){this.a=a +this.b=b}, +lg:function lg(a){this.a=a}, +i2:function i2(a){this.a=a}},V={ +r0:function(a,b){var u,t,s,r,q,p=null,o="byteStride" +F.u(a,C.bQ,b) +u=F.M(a,"byteLength",b,-1,p,-1,1,!0) +t=F.M(a,o,b,-1,p,252,4,!1) +s=F.M(a,"target",b,-1,C.bF,-1,0,!1) +if(t!==-1){if(u!==-1&&t>u)b.j($.pR(),H.a([t,u],[P.c]),o) +if(t%4!==0)b.j($.pK(),H.a([t,4],[P.c]),o) +if(s===34963)b.p($.lV(),o)}r=F.F(a,"buffer",b,!0) +q=F.M(a,"byteOffset",b,0,p,-1,0,!1) +F.C(a,"name",b,p,p,p,!1) +return new V.aH(r,q,u,t,s,F.q(a,C.aq,b,p,!1),F.r(a,b))}, +aH:function aH(a,b,c,d,e,f,g){var _=this +_.x=a +_.y=b +_.z=c +_.Q=d +_.ch=e +_.cy=_.cx=null +_.db=-1 +_.a=f +_.b=g +_.c=!1}, +nc:function(b7,b8){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,b0,b1,b2,b3="extensionsRequired",b4="extensionsUsed",b5=null,b6=new V.fn(b8) +b6.$0() +F.u(b7,C.cF,b8) +if(b7.u(b3)&&!b7.u(b4))b8.j($.ce(),H.a(["extensionsUsed"],[P.c]),b3) +u=F.of(b7,b4,b8) +if(u==null)u=H.a([],[P.d]) +t=F.of(b7,b3,b8) +if(t==null)t=H.a([],[P.d]) +b8.e1(u,t) +s=new V.fo(b7,b6,b8) +r=new V.fp(b6,b7,b8).$3$req("asset",T.tS(),!0) +if((r==null?b5:r.f)==null)return +else if(r.gb4()!==2){q=$.qk() +p=r.gb4() +b8.j(q,H.a([p],[P.c]),"version") +return}else if(r.gbH()>0){q=$.ql() +p=r.gbH() +b8.j(q,H.a([p],[P.c]),"version")}o=s.$1$2("accessors",M.tP(),[M.Q,P.G]) +n=s.$1$2("animations",Z.tR(),Z.aZ) +m=s.$1$2("buffers",Q.tX(),Q.b_) +l=s.$1$2("bufferViews",V.tY(),V.aH) +k=s.$1$2("cameras",G.u0(),G.b1) +j=s.$1$2("images",T.uc(),T.b5) +i=s.$1$2("materials",Y.ur(),Y.ax) +h=s.$1$2("meshes",S.uv(),S.ba) +q=V.ad +g=s.$1$2("nodes",V.ux(),q) +f=s.$1$2("samplers",T.uy(),T.bc) +e=s.$1$2("scenes",B.uz(),B.aK) +b6.$0() +d=F.F(b7,"scene",b8,!1) +c=e.i(0,d) +p=d!==-1&&c==null +if(p)b8.j($.D(),H.a([d],[P.c]),"scene") +b=s.$1$2("skins",O.uA(),O.bd) +a=s.$1$2("textures",U.uC(),U.bf) +a0=F.q(b7,C.ar,b8,b5,!1) +b6.$0() +a1=new V.d4(u,t,o,n,r,m,l,k,j,i,h,g,f,c,b,a,a0,F.r(b7,b8)) +a2=new V.fl(b8,a1) +a2.$2(l,C.aq) +a2.$2(o,C.L) +a2.$2(j,C.as) +a2.$2(a,C.N) +a2.$2(i,C.l) +a2.$2(h,C.at) +a2.$2(g,C.M) +a2.$2(b,C.ax) +a2.$2(n,C.ap) +a2.$2(e,C.aw) +if(a0.a!==0){p=b8.c +p.push("extensions") +a0.H(0,new V.fj(b8,a1)) +p.pop()}p=b8.c +p.push("nodes") +g.aa(new V.fk(b8,P.at(q))) +p.pop() +a3=[o,m,l,k,j,i,h,g,f,b,a] +for(a4=0;a4<11;++a4){a5=a3[a4] +if(a5.gh(a5)===0)continue +p.push(a5.c) +for(q=a5.b,a6=a5.a,a7=a6.length,a8=0;a8=a7 +a9=a9?b5:a6[a8] +if((a9==null?b5:a9.c)===!1)b8.V($.dP(),a8)}p.pop()}q=b8.y +if(q.a!==0){for(a6=new H.b9(q,[H.i(q,0)]),a6=a6.gw(a6);a6.m();){a7=a6.d +if(a7.gh(a7)===0)continue +b0=q.i(0,a7) +C.d.sh(p,0) +C.d.J(p,b0) +for(a9=a7.b,a7=a7.a,b1=a7.length,a8=0;a8=b1 +b2=b2?b5:a7[a8] +if((b2==null?b5:b2.ge4())===!1)b8.V($.dP(),a8)}}C.d.sh(p,0)}return a1}, +d4:function d4(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){var _=this +_.d=a +_.e=b +_.f=c +_.r=d +_.x=e +_.y=f +_.z=g +_.Q=h +_.ch=i +_.cx=j +_.cy=k +_.db=l +_.dx=m +_.dy=n +_.fx=o +_.fy=p +_.a=q +_.b=r +_.c=!1}, +fn:function fn(a){this.a=a}, +fo:function fo(a,b,c){this.a=a +this.b=b +this.c=c}, +fp:function fp(a,b,c){this.a=a +this.b=b +this.c=c}, +fl:function fl(a,b){this.a=a +this.b=b}, +fm:function fm(a,b){this.a=a +this.b=b}, +fj:function fj(a,b){this.a=a +this.b=b}, +fk:function fk(a,b){this.a=a +this.b=b}, +fh:function fh(){}, +fi:function fi(){}, +fq:function fq(a,b){this.a=a +this.b=b}, +fr:function fr(a,b){this.a=a +this.b=b}, +cB:function cB(){}, +fc:function fc(){}, +fa:function fa(){}, +b0:function b0(a){this.a=a}, +aY:function aY(a){this.a=a}, +k:function k(a,b,c){this.a=a +this.b=b +this.c=c}, +rF:function(b2,b3){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3,a4,a5,a6,a7,a8=null,a9="matrix",b0="translation",b1="rotation" +F.u(b2,C.bM,b3) +if(b2.u(a9)){u=F.a3(b2,a9,b3,a8,C.bA,1/0,-1/0,!1) +if(u!=null){t=new Float32Array(16) +s=new T.bO(t) +r=u[0] +q=u[1] +p=u[2] +o=u[3] +n=u[4] +m=u[5] +l=u[6] +k=u[7] +j=u[8] +i=u[9] +h=u[10] +g=u[11] +f=u[12] +e=u[13] +d=u[14] +t[15]=u[15] +t[14]=d +t[13]=e +t[12]=f +t[11]=g +t[10]=h +t[9]=i +t[8]=j +t[7]=k +t[6]=l +t[5]=m +t[4]=n +t[3]=o +t[2]=p +t[1]=q +t[0]=r}else s=a8}else s=a8 +if(b2.u(b0)){c=F.a3(b2,b0,b3,a8,C.o,1/0,-1/0,!1) +b=c!=null?T.nH(c):a8}else b=a8 +if(b2.u(b1)){a=F.a3(b2,b1,b3,a8,C.J,1,-1,!1) +if(a!=null){t=a[0] +r=a[1] +q=a[2] +p=a[3] +o=new Float32Array(4) +a0=new T.di(o) +o[0]=t +o[1]=r +o[2]=q +o[3]=p +t=Math.sqrt(a0.gaI()) +if(Math.abs(1-t)>0.00769)b3.p($.qh(),b1)}else a0=a8}else a0=a8 +if(b2.u("scale")){a1=F.a3(b2,"scale",b3,a8,C.o,1/0,-1/0,!1) +a2=a1!=null?T.nH(a1):a8}else a2=a8 +a3=F.F(b2,"camera",b3,!1) +a4=F.ms(b2,"children",b3,!1) +a5=F.F(b2,"mesh",b3,!1) +a6=F.F(b2,"skin",b3,!1) +a7=F.a3(b2,"weights",b3,a8,a8,1/0,-1/0,!1) +if(a5===-1){if(a6!==-1)b3.j($.ce(),H.a(["mesh"],[P.c]),"skin") +if(a7!=null)b3.j($.ce(),H.a(["mesh"],[P.c]),"weights")}if(s!=null){if(b!=null||a0!=null||a2!=null)b3.p($.q9(),a9) +if(s.cE())b3.p($.q7(),a9) +else if(!F.uh(s))b3.p($.qa(),a9)}F.C(b2,"name",b3,a8,a8,a8,!1) +return new V.ad(a3,a4,a6,s,a5,b,a0,a2,a7,P.at(B.aK),F.q(b2,C.M,b3,a8,!1),F.r(b2,b3))}, +ad:function ad(a,b,c,d,e,f,g,h,i,j,k,l){var _=this +_.x=a +_.y=b +_.z=c +_.Q=d +_.ch=e +_.cx=f +_.cy=g +_.db=h +_.dx=i +_.dy=j +_.id=_.go=_.fy=_.fx=_.fr=null +_.k1=!1 +_.a=k +_.b=l +_.c=!1}, +i3:function i3(){}, +i4:function i4(){}, +i5:function i5(a,b){this.a=a +this.b=b}},G={ +r4:function(a,b){var u,t=null,s="orthographic",r="perspective" +F.u(a,C.cC,b) +u=a.u(s)&&a.u(r) +if(u)b.B($.mR(),C.aj) +switch(F.C(a,"type",b,t,C.aj,t,!0)){case"orthographic":F.a4(a,s,b,G.tZ(),!0) +break +case"perspective":F.a4(a,r,b,G.u_(),!0) +break}F.C(a,"name",b,t,t,t,!1) +return new G.b1(F.q(a,C.d2,b,t,!1),F.r(a,b))}, +r2:function(a,b){var u,t,s,r +F.u(a,C.cE,b) +u=F.T(a,"xmag",b,0/0,1/0,-1/0,1/0,-1/0,!0) +t=F.T(a,"ymag",b,0/0,1/0,-1/0,1/0,-1/0,!0) +s=F.T(a,"zfar",b,0/0,1/0,0,1/0,-1/0,!0) +r=F.T(a,"znear",b,0/0,1/0,-1/0,1/0,0,!0) +if(!isNaN(s)&&!isNaN(r)&&s<=r)b.P($.mT()) +if(u===0||t===0)b.P($.pS()) +return new G.bx(F.q(a,C.d0,b,null,!1),F.r(a,b))}, +r3:function(a,b){var u,t,s +F.u(a,C.c_,b) +u=F.T(a,"zfar",b,0/0,1/0,0,1/0,-1/0,!1) +t=F.T(a,"znear",b,0/0,1/0,0,1/0,-1/0,!0) +s=!isNaN(u)&&!isNaN(t)&&u<=t +if(s)b.P($.mT()) +F.T(a,"aspectRatio",b,0/0,1/0,0,1/0,-1/0,!1) +F.T(a,"yfov",b,0/0,1/0,0,1/0,-1/0,!0) +return new G.by(F.q(a,C.d1,b,null,!1),F.r(a,b))}, +b1:function b1(a,b){this.a=a +this.b=b +this.c=!1}, +bx:function bx(a,b){this.a=a +this.b=b +this.c=!1}, +by:function by(a,b){this.a=a +this.b=b +this.c=!1}},Y={ +rz:function(a,b){var u,t,s,r,q,p,o,n,m,l=null,k="alphaCutoff" +F.u(a,C.bT,b) +u=F.a4(a,"pbrMetallicRoughness",b,Y.uu(),!1) +t=F.a4(a,"normalTexture",b,Y.us(),!1) +s=F.a4(a,"occlusionTexture",b,Y.ut(),!1) +r=F.a4(a,"emissiveTexture",b,Y.dL(),!1) +F.a3(a,"emissiveFactor",b,C.by,C.o,1,0,!1) +q=F.C(a,"alphaMode",b,"OPAQUE",C.bS,l,!1) +F.T(a,k,b,0.5,1/0,-1/0,1/0,0,!1) +p=q!=="MASK"&&a.u(k) +if(p)b.p($.pX(),k) +F.oc(a,"doubleSided",b) +o=F.q(a,C.l,b,l,!0) +F.C(a,"name",b,l,l,l,!1) +n=new Y.ax(u,t,s,r,P.V(P.d,P.h),o,F.r(a,b)) +p=H.a([],[P.c]) +p.push(u) +p.push(t) +p.push(s) +p.push(r) +for(m=o.gax(),m=new H.bN(J.U(m.a),m.b,[H.i(m,0),H.i(m,1)]);m.m();)p.push(m.a) +b.av(n,p) +return n}, +rI:function(a,b){var u,t,s,r,q,p +F.u(a,C.c4,b) +F.a3(a,"baseColorFactor",b,C.a9,C.J,1,0,!1) +u=F.a4(a,"baseColorTexture",b,Y.dL(),!1) +F.T(a,"metallicFactor",b,1,1/0,-1/0,1,0,!1) +F.T(a,"roughnessFactor",b,1,1/0,-1/0,1,0,!1) +t=F.a4(a,"metallicRoughnessTexture",b,Y.dL(),!1) +s=F.q(a,C.dc,b,null,!1) +r=new Y.bS(u,t,s,F.r(a,b)) +q=H.a([],[P.c]) +q.push(u) +q.push(t) +for(p=s.gax(),p=new H.bN(J.U(p.a),p.b,[H.i(p,0),H.i(p,1)]);p.m();)q.push(p.a) +b.av(r,q) +return r}, +rH:function(a,b){var u,t,s,r +F.u(a,C.cg,b) +u=F.q(a,C.av,b,C.l,!1) +t=F.F(a,"index",b,!0) +s=F.M(a,"texCoord",b,0,null,-1,0,!1) +F.T(a,"strength",b,1,1/0,-1/0,1,0,!1) +r=new Y.bR(t,s,u,F.r(a,b)) +b.av(r,u.gax()) +return r}, +rG:function(a,b){var u,t,s,r +F.u(a,C.cf,b) +u=F.q(a,C.au,b,C.l,!1) +t=F.F(a,"index",b,!0) +s=F.M(a,"texCoord",b,0,null,-1,0,!1) +F.T(a,"scale",b,1,1/0,-1/0,1/0,-1/0,!1) +r=new Y.bQ(t,s,u,F.r(a,b)) +b.av(r,u.gax()) +return r}, +rW:function(a,b){var u,t +F.u(a,C.ce,b) +u=F.q(a,C.ay,b,C.l,!1) +t=new Y.bg(F.F(a,"index",b,!0),F.M(a,"texCoord",b,0,null,-1,0,!1),u,F.r(a,b)) +b.av(t,u.gax()) +return t}, +ax:function ax(a,b,c,d,e,f,g){var _=this +_.x=a +_.y=b +_.z=c +_.Q=d +_.dx=e +_.a=f +_.b=g +_.c=!1}, +hF:function hF(a,b){this.a=a +this.b=b}, +bS:function bS(a,b,c,d){var _=this +_.e=a +_.x=b +_.a=c +_.b=d +_.c=!1}, +bR:function bR(a,b,c,d){var _=this +_.d=a +_.e=b +_.f=null +_.a=c +_.b=d +_.c=!1}, +bQ:function bQ(a,b,c,d){var _=this +_.d=a +_.e=b +_.f=null +_.a=c +_.b=d +_.c=!1}, +bg:function bg(a,b,c,d){var _=this +_.d=a +_.e=b +_.f=null +_.a=c +_.b=d +_.c=!1}, +rj:function(a,b,c,d,e,f,g,h,i){return new Y.bC(a,b,c,d,e,f,g,i,h)}, +rl:function(a){var u,t,s,r={} +r.a=r.b=null +u=Y.bC +t=new P.E($.p,[u]) +s=new P.aN(t,[u]) +r.c=!1 +r.a=a.bE(new Y.fv(r,s),new Y.fw(r),new Y.fx(r,s)) +return t}, +rk:function(a){var u=new Y.fu() +if(u.$2(a,C.bC))return C.az +if(u.$2(a,C.bE))return C.aA +if(u.$2(a,C.bI))return C.aB +return}, +cI:function cI(a){this.b=a}, +cG:function cG(a,b){this.a=a +this.b=b}, +bZ:function bZ(a,b){this.a=a +this.b=b}, +b4:function b4(a,b){this.a=a +this.b=b}, +bC:function bC(a,b,c,d,e,f,g,h,i){var _=this +_.a=a +_.b=b +_.c=c +_.d=d +_.e=e +_.f=f +_.r=g +_.x=h +_.y=i}, +fv:function fv(a,b){this.a=a +this.b=b}, +fx:function fx(a,b){this.a=a +this.b=b}, +fw:function fw(a){this.a=a}, +fu:function fu(){}, +ft:function ft(){}, +fK:function fK(a,b){var _=this +_.f=_.e=_.d=_.c=0 +_.r=null +_.a=a +_.b=b}, +fM:function fM(){}, +fL:function fL(){}, +i9:function i9(a,b,c,d,e,f){var _=this +_.y=_.x=_.r=_.f=_.e=_.d=_.c=0 +_.Q=_.z=!1 +_.ch=a +_.cx=b +_.cy=!1 +_.db=c +_.dx=d +_.a=e +_.b=f}, +ia:function ia(a){this.a=a}, +jS:function jS(a,b,c){var _=this +_.c=a +_.d=0 +_.a=b +_.b=c}, +dr:function dr(){}, +dp:function dp(){}, +as:function as(a){this.a=a}},S={ +rC:function(a,b){var u,t,s,r,q,p,o,n,m,l,k=null,j="primitives" +F.u(a,C.ct,b) +u=F.a3(a,"weights",b,k,k,1/0,-1/0,!1) +t=F.lv(a,j,b) +if(t!=null){s=t.gh(t) +r=S.cx +q=new Array(s) +q.fixed$length=Array +q=H.a(q,[r]) +p=new F.ae(q,s,j,[r]) +r=b.c +r.push(j) +for(o=k,n=-1,m=0;m=p +l=m?null:r[o] +if((l==null?null:l.x)==null)continue +m=l.x +if(m.b0(m,new O.lR()))continue +n.a=n.b=-1 +for(k=a.db,k=new H.aJ(k,k.gh(k),[H.i(k,0)]);k.m();){j=k.d +if(j.fy==l){i=j.id +i=(i==null?null:i.ch)!=null}else i=!1 +if(i){j=j.id +h=j.ch.length +i=n.b +if(i===-1||h>>11 +return 536870911&t+((16383&t)<<15)}, +lx:function lx(){}, +dJ:function(a,b){var u=536870911&a+b +u=536870911&u+((524287&u)<<10) +return u^u>>>6}, +nU:function(a){var u=536870911&a+((67108863&a)<<3) +u^=u>>>11 +return 536870911&u+((16383&u)<<15)}},L={ +rx:function(a,b){b.toString +F.u(a,C.cs,b) +F.a3(a,"offset",b,C.bx,C.aa,1/0,-1/0,!1) +F.T(a,"rotation",b,0,1/0,-1/0,1/0,-1/0,!1) +F.a3(a,"scale",b,C.bB,C.aa,1/0,-1/0,!1) +return new L.bM(F.M(a,"texCoord",b,-1,null,-1,0,!1),F.q(a,C.da,b,null,!1),F.r(a,b))}, +bM:function bM(a,b,c){var _=this +_.r=a +_.a=b +_.b=c +_.c=!1}},K={ +ri:function(a,b){var u,t={},s=K.cq,r=new P.E($.p,[s]) +t.a=!1 +t.b=null +u=P.nz(new K.fd(t),new K.fe(t),new K.ff(t),[P.l,P.h]) +t.b=a.e5(new K.fg(t,u,new P.aN(r,[s]),b),u.gdQ()) +return r}, +rg:function(a,b){var u=K.ac +u=new K.cp(a,new P.aN(new P.E($.p,[u]),[u])) +u.e=b +return u}, +rh:function(a,b){var u,t,s,r,q,p=null +try{p=C.a2.dT(a)}catch(s){r=H.z(s) +if(r instanceof P.ak){u=r +b.ar($.dR(),H.a([u],[P.c]),!0) +return}else throw s}r=p +q=P.c +if(H.a2(r,"$if",[P.d,q],"$af"))try{t=V.nc(p,b) +return new K.ac("model/gltf+json",t,null)}catch(s){if(H.z(s) instanceof M.bF)return +else throw s}else{b.ar($.P(),H.a([p,"object"],[q]),!0) +return}}, +ac:function ac(a,b,c){this.a=a +this.b=b +this.c=c}, +cq:function cq(){}, +fe:function fe(a){this.a=a}, +ff:function ff(a){this.a=a}, +fd:function fd(a){this.a=a}, +fg:function fg(a,b,c,d){var _=this +_.a=a +_.b=b +_.c=c +_.d=d}, +cp:function cp(a,b){var _=this +_.a=a +_.b=null +_.c=b +_.e=_.d=null +_.f=!0}, +fb:function fb(a){this.a=a}, +d5:function d5(){}},F={ +a9:function(a,b,c,d){var u=a.i(0,b) +if(u==null&&a.u(b))d.j($.P(),H.a([null,c],[P.c]),b) +return u}, +F:function(a,b,c,d){var u=F.a9(a,b,"integer",c) +if(typeof u==="number"&&Math.floor(u)===u){if(u>=0)return u +c.p($.dQ(),b)}else if(u==null){if(d)c.B($.aE(),H.a([b],[P.c]))}else c.j($.P(),H.a([u,"integer"],[P.c]),b) +return-1}, +oc:function(a,b,c){var u=F.a9(a,b,"boolean",c) +if(u==null)return!1 +if(typeof u==="boolean")return u +c.j($.P(),H.a([u,"boolean"],[P.c]),b) +return!1}, +M:function(a,b,c,d,e,f,g,h){var u,t=F.a9(a,b,"integer",c) +if(typeof t==="number"&&Math.floor(t)===t){if(e!=null){if(!F.mq(b,t,e,c,!1))return-1}else{if(!(tf +else u=!0 +if(u){c.j($.lU(),H.a([t],[P.c]),b) +return-1}}return t}else if(t==null){if(!h)return d +c.B($.aE(),H.a([b],[P.c]))}else c.j($.P(),H.a([t,"integer"],[P.c]),b) +return-1}, +T:function(a,b,c,d,e,f,g,h,i){var u=F.a9(a,b,"number",c) +if(typeof u==="number"){if(ug||u>=e){c.j($.lU(),H.a([u],[P.c]),b) +return 0/0}return u}else if(u==null){if(!i)return d +c.B($.aE(),H.a([b],[P.c]))}else c.j($.P(),H.a([u,"number"],[P.c]),b) +return 0/0}, +C:function(a,b,c,d,e,f,g){var u,t=F.a9(a,b,"string",c) +if(typeof t==="string"){if(e!=null)F.mq(b,t,e,c,!1) +else{if(f==null)u=null +else{u=f.b +u=u.test(t)}if(u===!1){c.j($.pI(),H.a([t,f.a],[P.c]),b) +return}}return t}else if(t==null){if(!g)return d +c.B($.aE(),H.a([b],[P.c]))}else c.j($.P(),H.a([t,"string"],[P.c]),b) +return}, +oh:function(a,b){var u,t,s,r +try{u=P.nD(a) +s=u +if(s.gcC()||s.gby()||s.gcB()||s.gbA()||s.gbz())b.j($.qf(),H.a([a],[P.c]),"uri") +return u}catch(r){s=H.z(r) +if(s instanceof P.ak){t=s +b.j($.pH(),H.a([a,t],[P.c]),"uri") +return}else throw r}}, +mt:function(a,b,c,d){var u=F.a9(a,b,"object",c),t=P.d,s=P.c +if(H.a2(u,"$if",[t,s],"$af"))return u +else if(u==null){if(d){c.B($.aE(),H.a([b],[s])) +return}}else{c.j($.P(),H.a([u,"object"],[s]),b) +if(d)return}return P.V(t,s)}, +a4:function(a,b,c,d,e){var u,t=F.a9(a,b,"object",c),s=P.c +if(H.a2(t,"$if",[P.d,s],"$af")){s=c.c +s.push(b) +u=d.$2(t,c) +s.pop() +return u}else if(t==null){if(e)c.B($.aE(),H.a([b],[s]))}else c.j($.P(),H.a([t,"object"],[s]),b) +return}, +ms:function(a,b,c,d){var u,t,s,r,q,p=F.a9(a,b,"array",c),o=J.m(p) +if(!!o.$il){if(o.gt(p)){c.p($.aX(),b) +return}u=c.c +u.push(b) +t=P.h +s=P.at(t) +for(r=0;r=0){if(!s.A(0,q))c.V($.mP(),r)}else{o.l(p,r,-1) +c.V($.dQ(),r)}}u.pop() +return o.a7(p,t)}else if(p==null){if(d)c.B($.aE(),H.a([b],[P.c]))}else c.j($.P(),H.a([p,"array"],[P.c]),b) +return}, +u8:function(a,b,c,d){var u,t=F.a9(a,b,"object",c),s=P.d,r=P.c +if(H.a2(t,"$if",[s,r],"$af")){r=J.K(t) +if(r.gt(t)){c.p($.aX(),b) +return}u=c.c +u.push(b) +r.H(t,new F.lr(d,t,c)) +u.pop() +return r.ae(t,s,P.h)}else{s=[r] +if(t==null)c.B($.aE(),H.a([b],s)) +else c.j($.P(),H.a([t,"object"],s),b)}return}, +u9:function(a,b,c,d){var u,t,s,r,q,p,o,n=F.a9(a,b,"array",c),m=J.m(n) +if(!!m.$il){if(m.gt(n)){c.p($.aX(),b) +return}else{u=c.c +u.push(b) +for(t=P.c,s=[t],t=[P.d,t],r=!1,q=0;qf +if(p){c.j($.lU(),H.a([q],u),b) +s=!0}if(h){p=$.mX() +p[0]=q +t[r]=p[0]}else t[r]=q}else{c.j($.cW(),H.a([q,"number"],u),b) +s=!0}}if(s)return +return t}else if(o==null){if(d==null)n=null +else n=J.cr(d.slice(0),H.i(d,0)) +return n}else c.j($.P(),H.a([o,"array"],[P.c]),b) +return}, +od:function(a,b,c,d,e){var u,t,s,r,q,p,o,n,m=F.a9(a,b,"array",c),l=J.m(m) +if(!!l.$il){if(l.gh(m)!==e){c.j($.mQ(),H.a([l.gh(m),H.a([e],[P.h])],[P.c]),b) +return}u=Z.uE(d) +t=Z.ov(d) +s=F.u1(d,e) +for(r=[P.c],q=!1,p=0;pt +if(n){c.j($.pV(),H.a([o,C.am.i(0,d)],r),b) +q=!0}s[p]=J.qS(o)}else{c.j($.cW(),H.a([o,"integer"],r),b) +q=!0}}if(q)return +return s}else if(m!=null)c.j($.P(),H.a([m,"array"],[P.c]),b) +return}, +of:function(a,b,c){var u,t,s,r,q,p,o,n=F.a9(a,b,"array",c),m=J.m(n) +if(!!m.$il){if(m.gt(n)){c.p($.aX(),b) +return}u=c.c +u.push(b) +t=P.d +s=P.at(t) +for(r=[P.c],q=!1,p=0;p1)c.B($.q6(),H.a([null,h.gI()],[j])) +for(j=h.gI(),j=j.gw(j),t=d==null,s=c.f,r=c.r;j.m();){q=j.gn() +p=F.mt(h,q,c,!1) +o=c.dx +if(!o.D(o,q)){i.l(0,q,null) +o=c.cy +o=o.D(o,q) +if(!o)c.p($.pE(),q) +continue}n=c.ch.a.i(0,new D.bA(b,q)) +if(n==null){c.p($.pF(),q) +continue}if(p!=null){u.push(q) +m=n.a.$2(p,c) +i.l(0,q,m) +q=J.m(m) +if(!!q.$ing){o=t?b:d +o=s.bL(o,new F.lq()) +l=H.a(u.slice(0),[H.i(u,0)]) +l.fixed$length=Array +J.lY(o,new D.cu(m,l))}if(!!q.$icB){q=H.a(u.slice(0),[H.i(u,0)]) +q.fixed$length=Array +r.push(new D.dk(m,q))}u.pop()}}u.pop() +return i}, +r:function(a,b){var u=a.i(0,"extras"),t=u!=null&&!J.m(u).$if +if(t)b.p($.qe(),"extras") +return u}, +mq:function(a,b,c,d,e){var u +if(!J.n_(c,b)){u=e?$.mQ():$.mS() +d.j(u,H.a([b,c],[P.c]),a) +return!1}return!0}, +u:function(a,b,c){var u,t,s +for(u=a.gI(),u=u.gw(u);u.m();){t=u.gn() +if(!C.d.D(b,t)){s=C.d.D(C.cb,t) +s=!s}else s=!1 +if(s)c.p($.pJ(),t)}}, +my:function(a,b,c,d,e,f){var u,t,s,r,q,p,o=e.c +o.push(d) +for(u=[P.c],t=c.a,s=t.length,r=0;r=s?null:t[q] +if(p!=null){p.c=!0 +b[r]=p +f.$3(p,q,r)}else e.aE($.D(),H.a([q],u),r)}o.pop()}, +uh:function(b4){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,b0,b1,b2,b3=b4.a +if(b3[3]!==0||b3[7]!==0||b3[11]!==0||b3[15]!==1)return!1 +if(b4.cu()===0)return!1 +u=$.qD() +t=$.qA() +s=$.qB() +r=new T.bh(new Float32Array(3)) +r.be(b3[0],b3[1],b3[2]) +q=Math.sqrt(r.gaI()) +r.be(b3[4],b3[5],b3[6]) +p=Math.sqrt(r.gaI()) +r.be(b3[8],b3[9],b3[10]) +o=Math.sqrt(r.gaI()) +if(b4.cu()<0)q=-q +u=u.a +u[0]=b3[12] +u[1]=b3[13] +u[2]=b3[14] +n=1/q +m=1/p +l=1/o +b3=new Float32Array(16) +new T.bO(b3).cX(b4) +b3[0]=b3[0]*n +b3[1]=b3[1]*n +b3[2]=b3[2]*n +b3[4]=b3[4]*m +b3[5]=b3[5]*m +b3[6]=b3[6]*m +b3[8]=b3[8]*l +b3[9]=b3[9]*l +b3[10]=b3[10]*l +k=new Float32Array(9) +k[0]=b3[0] +k[1]=b3[1] +k[2]=b3[2] +k[3]=b3[4] +k[4]=b3[5] +k[5]=b3[6] +k[6]=b3[8] +k[7]=b3[9] +k[8]=b3[10] +t.toString +b3=k[0] +j=k[4] +i=k[8] +h=0+b3+j+i +if(h>0){g=Math.sqrt(h+1) +b3=t.a +b3[3]=g*0.5 +g=0.5/g +b3[0]=(k[5]-k[7])*g +b3[1]=(k[6]-k[2])*g +b3[2]=(k[1]-k[3])*g}else{if(b3a.length)throw H.e(P.S(b,0,a.length,"start",null)) +if(ca.length)throw H.e(P.S(c,b,a.length,"end",null)) +if(b===c)return H.a([],[H.i(a,0)]) +return H.a(a.slice(b,c),[H.i(a,0)])}, +gaH:function(a){var u=a.length +if(u>0)return a[u-1] +throw H.e(H.nd())}, +D:function(a,b){var u +for(u=0;u=a.length||b<0)throw H.e(H.cV(a,b)) +return a[b]}, +l:function(a,b,c){if(!!a.immutable$list)H.O(P.W("indexed set")) +if(b>=a.length||b<0)throw H.e(H.cV(a,b)) +a[b]=c}, +$iB:1, +$it:1, +$il:1} +J.m4.prototype={} +J.bu.prototype={ +gn:function(){return this.d}, +m:function(){var u,t=this,s=t.a,r=s.length +if(t.b!==r)throw H.e(H.cc(s)) +u=t.c +if(u>=r){t.d=null +return!1}t.d=s[u] +t.c=u+1 +return!0}, +$iZ:1} +J.cs.prototype={ +cR:function(a){var u +if(a>=-2147483648&&a<=2147483647)return a|0 +if(isFinite(a)){u=a<0?Math.ceil(a):Math.floor(a) +return u+0}throw H.e(P.W(""+a+".toInt()"))}, +X:function(a,b){var u,t,s,r +if(b<2||b>36)throw H.e(P.S(b,2,36,"radix",null)) +u=a.toString(b) +if(C.a.v(u,u.length-1)!==41)return u +t=/^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(u) +if(t==null)H.O(P.W("Unexpected toString result: "+u)) +u=t[1] +s=+t[3] +r=t[2] +if(r!=null){u+=r +s-=r.length}return u+C.a.bd("0",s)}, +k:function(a){if(a===0&&1/a<0)return"-0.0" +else return""+a}, +gC:function(a){var u,t,s,r,q=a|0 +if(a===q)return 536870911&q +u=Math.abs(a) +t=Math.log(u)/0.6931471805599453|0 +s=Math.pow(2,t) +r=u<1?u/s:s/u +return 536870911&((r*9007199254740992|0)+(r*3542243181176521|0))*599197+t*1259}, +bc:function(a,b){var u=a%b +if(u===0)return 0 +if(u>0)return u +if(b<0)return u-b +else return u+b}, +an:function(a,b){if((a|0)===a)if(b>=1||b<-1)return a/b|0 +return this.ck(a,b)}, +cj:function(a,b){return(a|0)===a?a/b|0:this.ck(a,b)}, +ck:function(a,b){var u=a/b +if(u>=-2147483648&&u<=2147483647)return u|0 +if(u>0){if(u!==1/0)return Math.floor(u)}else if(u>-1/0)return Math.ceil(u) +throw H.e(P.W("Result of truncating division is "+H.b(u)+": "+H.b(a)+" ~/ "+b))}, +ay:function(a,b){if(b<0)throw H.e(H.al(b)) +return b>31?0:a<>>0}, +ad:function(a,b){var u +if(a>0)u=this.ci(a,b) +else{u=b>31?31:b +u=a>>u>>>0}return u}, +dJ:function(a,b){if(b<0)throw H.e(H.al(b)) +return this.ci(a,b)}, +ci:function(a,b){return b>31?0:a>>>b}, +$iw:1, +$iG:1} +J.d9.prototype={$ih:1} +J.fG.prototype={} +J.bG.prototype={ +v:function(a,b){if(b<0)throw H.e(H.cV(a,b)) +if(b>=a.length)H.O(H.cV(a,b)) +return a.charCodeAt(b)}, +G:function(a,b){if(b>=a.length)throw H.e(H.cV(a,b)) +return a.charCodeAt(b)}, +cT:function(a,b){if(typeof b!=="string")throw H.e(P.n5(b,null,null)) +return a+b}, +aw:function(a,b,c,d){var u,t +c=P.az(b,c,a.length) +u=a.substring(0,b) +t=a.substring(c) +return u+d+t}, +R:function(a,b,c){var u +if(typeof c!=="number"||Math.floor(c)!==c)H.O(H.al(c)) +if(c<0||c>a.length)throw H.e(P.S(c,0,a.length,null,null)) +u=c+b.length +if(u>a.length)return!1 +return b===a.substring(c,u)}, +S:function(a,b){return this.R(a,b,0)}, +q:function(a,b,c){if(typeof b!=="number"||Math.floor(b)!==b)H.O(H.al(b)) +if(c==null)c=a.length +if(b<0)throw H.e(P.id(b,null)) +if(b>c)throw H.e(P.id(b,null)) +if(c>a.length)throw H.e(P.id(c,null)) +return a.substring(b,c)}, +aN:function(a,b){return this.q(a,b,null)}, +eq:function(a){var u,t,s +if(typeof a.trimRight!="undefined"){u=a.trimRight() +t=u.length +if(t===0)return u +s=t-1 +if(this.v(u,s)===133)t=J.nf(u,s)}else{t=J.nf(a,a.length) +u=a}if(t===u.length)return u +if(t===0)return"" +return u.substring(0,t)}, +bd:function(a,b){var u,t +if(0>=b)return"" +if(b===1||a.length===0)return a +if(b!==b>>>0)throw H.e(C.bc) +for(u=a,t="";!0;){if((b&1)===1)t=u+t +b=b>>>1 +if(b===0)break +u+=u}return t}, +ak:function(a,b,c){var u=b-a.length +if(u<=0)return a +return this.bd(c,u)+a}, +b3:function(a,b,c){var u +if(c<0||c>a.length)throw H.e(P.S(c,0,a.length,null,null)) +u=a.indexOf(b,c) +return u}, +bC:function(a,b){return this.b3(a,b,0)}, +k:function(a){return a}, +gC:function(a){var u,t,s +for(u=a.length,t=0,s=0;s>6}t=536870911&t+((67108863&t)<<3) +t^=t>>11 +return 536870911&t+((16383&t)<<15)}, +gh:function(a){return a.length}, +$id:1} +H.kd.prototype={ +gw:function(a){return new H.e1(J.U(this.ga5()),this.$ti)}, +gh:function(a){return J.H(this.ga5())}, +gt:function(a){return J.n0(this.ga5())}, +ga2:function(a){return J.qG(this.ga5())}, +a0:function(a,b){return H.m1(J.n1(this.ga5(),b),H.i(this,0),H.i(this,1))}, +N:function(a,b){return H.aC(J.cX(this.ga5(),b),H.i(this,1))}, +D:function(a,b){return J.n_(this.ga5(),b)}, +k:function(a){return J.aa(this.ga5())}, +$at:function(a,b){return[b]}} +H.e1.prototype={ +m:function(){return this.a.m()}, +gn:function(){return H.aC(this.a.gn(),H.i(this,1))}, +$iZ:1, +$aZ:function(a,b){return[b]}} +H.cY.prototype={ +ga5:function(){return this.a}} +H.kk.prototype={$iB:1, +$aB:function(a,b){return[b]}} +H.ke.prototype={ +i:function(a,b){return H.aC(J.mY(this.a,b),H.i(this,1))}, +l:function(a,b,c){J.qE(this.a,b,H.aC(c,H.i(this,0)))}, +sh:function(a,b){J.qK(this.a,b)}, +A:function(a,b){J.lY(this.a,H.aC(b,H.i(this,0)))}, +$iB:1, +$aB:function(a,b){return[b]}, +$aJ:function(a,b){return[b]}, +$il:1, +$al:function(a,b){return[b]}} +H.cj.prototype={ +a7:function(a,b){return new H.cj(this.a,[H.i(this,0),b])}, +ga5:function(){return this.a}} +H.cZ.prototype={ +ae:function(a,b,c){return new H.cZ(this.a,[H.i(this,0),H.i(this,1),b,c])}, +u:function(a){return this.a.u(a)}, +i:function(a,b){return H.aC(this.a.i(0,b),H.i(this,3))}, +l:function(a,b,c){this.a.l(0,H.aC(b,H.i(this,0)),H.aC(c,H.i(this,1)))}, +H:function(a,b){this.a.H(0,new H.e2(this,b))}, +gI:function(){return H.m1(this.a.gI(),H.i(this,0),H.i(this,2))}, +gh:function(a){var u=this.a +return u.gh(u)}, +gt:function(a){var u=this.a +return u.gt(u)}, +$aa7:function(a,b,c,d){return[c,d]}, +$af:function(a,b,c,d){return[c,d]}} +H.e2.prototype={ +$2:function(a,b){var u=this.a +this.b.$2(H.aC(a,H.i(u,2)),H.aC(b,H.i(u,3)))}, +$S:function(){var u=this.a +return{func:1,ret:P.A,args:[H.i(u,0),H.i(u,1)]}}} +H.cl.prototype={ +gh:function(a){return this.a.length}, +i:function(a,b){return C.a.v(this.a,b)}, +$aB:function(){return[P.h]}, +$aJ:function(){return[P.h]}, +$at:function(){return[P.h]}, +$al:function(){return[P.h]}} +H.B.prototype={} +H.av.prototype={ +gw:function(a){var u=this +return new H.aJ(u,u.gh(u),[H.L(u,"av",0)])}, +gt:function(a){return this.gh(this)===0}, +D:function(a,b){var u,t=this,s=t.gh(t) +for(u=0;uu)return u +return t}, +gh:function(a){var u=J.H(this.a),t=this.b +if(t>=u)return 0 +return u-t}, +N:function(a,b){var u=this,t=u.gdK()+b +if(b<0||t>=u.gdh())throw H.e(P.d6(b,u,"index",null,null)) +return J.cX(u.a,t)}, +a0:function(a,b){var u=this +P.ay(b,"count") +return H.jx(u.a,u.b+b,u.c,H.i(u,0))}, +a4:function(a,b){var u,t,s,r=this,q=r.b,p=r.a,o=J.K(p),n=o.gh(p),m=n-q +if(m<0)m=0 +u=new Array(m) +u.fixed$length=Array +t=H.a(u,r.$ti) +for(s=0;s=q){t.d=null +return!1}t.d=r.N(s,u);++t.c +return!0}, +$iZ:1} +H.cw.prototype={ +gw:function(a){return new H.bN(J.U(this.a),this.b,this.$ti)}, +gh:function(a){return J.H(this.a)}, +gt:function(a){return J.n0(this.a)}, +N:function(a,b){return this.b.$1(J.cX(this.a,b))}, +$at:function(a,b){return[b]}} +H.d_.prototype={$iB:1, +$aB:function(a,b){return[b]}} +H.bN.prototype={ +m:function(){var u=this,t=u.b +if(t.m()){u.a=u.c.$1(t.gn()) +return!0}u.a=null +return!1}, +gn:function(){return this.a}, +$aZ:function(a,b){return[b]}} +H.aw.prototype={ +gh:function(a){return J.H(this.a)}, +N:function(a,b){return this.b.$1(J.cX(this.a,b))}, +$aB:function(a,b){return[b]}, +$aav:function(a,b){return[b]}, +$at:function(a,b){return[b]}} +H.mh.prototype={ +gw:function(a){return new H.dt(J.U(this.a),this.b,this.$ti)}, +ab:function(a,b,c){return new H.cw(this,b,[H.i(this,0),c])}} +H.dt.prototype={ +m:function(){var u,t +for(u=this.a,t=this.b;u.m();)if(t.$1(u.gn()))return!0 +return!1}, +gn:function(){return this.a.gn()}} +H.cC.prototype={ +a0:function(a,b){P.ay(b,"count") +return new H.cC(this.a,this.b+b,this.$ti)}, +gw:function(a){return new H.jl(J.U(this.a),this.b,this.$ti)}} +H.d0.prototype={ +gh:function(a){var u=J.H(this.a)-this.b +if(u>=0)return u +return 0}, +a0:function(a,b){P.ay(b,"count") +return new H.d0(this.a,this.b+b,this.$ti)}, +$iB:1} +H.jl.prototype={ +m:function(){var u,t +for(u=this.a,t=0;t>>0}, +k:function(a){var u=this.c +if(u==null)u=this.a +return"Closure '"+H.b(this.d)+"' of "+("Instance of '"+H.b(H.dg(u))+"'")}} +H.e0.prototype={ +k:function(a){return this.a}} +H.ii.prototype={ +k:function(a){return"RuntimeError: "+H.b(this.a)}} +H.dn.prototype={ +gaZ:function(){var u=this.b +return u==null?this.b=H.mz(this.a):u}, +k:function(a){return this.gaZ()}, +gC:function(a){var u=this.d +return u==null?this.d=C.a.gC(this.gaZ()):u}, +K:function(a,b){if(b==null)return!1 +return b instanceof H.dn&&this.gaZ()===b.gaZ()}, +$iah:1} +H.bH.prototype={ +gh:function(a){return this.a}, +gt:function(a){return this.a===0}, +gI:function(){return new H.b9(this,[H.i(this,0)])}, +gax:function(){var u=this,t=H.i(u,0) +return H.hE(new H.b9(u,[t]),new H.fN(u),t,H.i(u,1))}, +u:function(a){var u,t,s=this +if(typeof a==="string"){u=s.b +if(u==null)return!1 +return s.c4(u,a)}else if(typeof a==="number"&&(a&0x3ffffff)===a){t=s.c +if(t==null)return!1 +return s.c4(t,a)}else return s.e2(a)}, +e2:function(a){var u=this.d +if(u==null)return!1 +return this.bD(this.bo(u,J.ai(a)&0x3ffffff),a)>=0}, +i:function(a,b){var u,t,s,r,q=this +if(typeof b==="string"){u=q.b +if(u==null)return +t=q.aR(u,b) +s=t==null?null:t.b +return s}else if(typeof b==="number"&&(b&0x3ffffff)===b){r=q.c +if(r==null)return +t=q.aR(r,b) +s=t==null?null:t.b +return s}else return q.e3(b)}, +e3:function(a){var u,t,s=this.d +if(s==null)return +u=this.bo(s,J.ai(a)&0x3ffffff) +t=this.bD(u,a) +if(t<0)return +return u[t].b}, +l:function(a,b,c){var u,t,s,r,q,p,o=this +if(typeof b==="string"){u=o.b +o.bW(u==null?o.b=o.br():u,b,c)}else if(typeof b==="number"&&(b&0x3ffffff)===b){t=o.c +o.bW(t==null?o.c=o.br():t,b,c)}else{s=o.d +if(s==null)s=o.d=o.br() +r=J.ai(b)&0x3ffffff +q=o.bo(s,r) +if(q==null)o.bt(s,r,[o.bs(b,c)]) +else{p=o.bD(q,b) +if(p>=0)q[p].b=c +else q.push(o.bs(b,c))}}}, +bL:function(a,b){var u +if(this.u(a))return this.i(0,a) +u=b.$0() +this.l(0,a,u) +return u}, +H:function(a,b){var u=this,t=u.e,s=u.r +for(;t!=null;){b.$2(t.a,t.b) +if(s!==u.r)throw H.e(P.X(u)) +t=t.c}}, +bW:function(a,b,c){var u=this.aR(a,b) +if(u==null)this.bt(a,b,this.bs(b,c)) +else u.b=c}, +bs:function(a,b){var u=this,t=new H.hw(a,b) +if(u.e==null)u.e=u.f=t +else u.f=u.f.c=t;++u.a +u.r=u.r+1&67108863 +return t}, +bD:function(a,b){var u,t +if(a==null)return-1 +u=a.length +for(t=0;t>>0!==b||b>c)this.dt(a,b,c,d)}} +H.dc.prototype={ +gh:function(a){return a.length}, +dH:function(a,b,c,d,e){var u,t,s=a.length +this.c_(a,b,s,"start") +this.c_(a,c,s,"end") +if(b>c)throw H.e(P.S(b,0,c,null,null)) +u=c-b +if(e<0)throw H.e(P.I(e)) +t=d.length +if(t-e=4){if(n.a===8){s=o.b +s.b=n.c +s.a=!0}return}p=o.a.a +s=o.b +s.b=J.qQ(n,new P.ky(p),null) +s.a=!1}}} +P.ky.prototype={ +$1:function(a){return this.a}, +$S:22} +P.kw.prototype={ +$0:function(){var u,t,s,r,q=this +try{s=q.b +q.a.b=s.b.b.bO(s.d,q.c)}catch(r){u=H.z(r) +t=H.ao(r) +s=q.a +s.b=new P.bw(u,t) +s.a=!0}}} +P.kv.prototype={ +$0:function(){var u,t,s,r,q,p,o,n,m=this +try{u=m.a.a.c +r=m.c +if(r.e7(u)&&r.e!=null){q=m.b +q.b=r.e_(u) +q.a=!1}}catch(p){t=H.z(p) +s=H.ao(p) +r=m.a.a.c +q=r.a +o=t +n=m.b +if(q==null?o==null:q===o)n.b=r +else n.b=new P.bw(t,s) +n.a=!0}}} +P.du.prototype={} +P.jn.prototype={ +gh:function(a){var u={},t=new P.E($.p,[P.h]) +u.a=0 +this.bF(new P.js(u,this),!0,new P.jt(u,t),t.gdc()) +return t}} +P.jp.prototype={ +$1:function(a){var u=this.a +u.aP(a) +u.bj()}, +$S:function(){return{func:1,ret:P.A,args:[this.b]}}} +P.jq.prototype={ +$2:function(a,b){var u=this.a,t=u.b +if((t&1)!==0)u.aq(a,b) +else if((t&3)===0)u.aQ().A(0,new P.dx(a,b)) +u.bj()}, +$C:"$2", +$R:2, +$S:7} +P.jr.prototype={ +$0:function(){var u=this.a +return new P.kF(new J.bu(u,1,[H.i(u,0)]))}} +P.js.prototype={ +$1:function(a){++this.a.a}, +$S:function(){return{func:1,ret:P.A,args:[H.i(this.b,0)]}}} +P.jt.prototype={ +$0:function(){this.b.c0(this.a.a)}} +P.jo.prototype={} +P.dB.prototype={ +gdC:function(){if((this.b&8)===0)return this.a +return this.a.gb9()}, +aQ:function(){var u,t,s=this +if((s.b&8)===0){u=s.a +return u==null?s.a=new P.dC():u}t=s.a +t.gb9() +return t.gb9()}, +gaD:function(){if((this.b&8)!==0)return this.a.gb9() +return this.a}, +bg:function(){if((this.b&4)!==0)return new P.be("Cannot add event after closing") +return new P.be("Cannot add event while adding a stream")}, +c5:function(){var u=this.c +if(u==null)u=this.c=(this.b&2)!==0?$.dO():new P.E($.p,[null]) +return u}, +A:function(a,b){if(this.b>=4)throw H.e(this.bg()) +this.aP(b)}, +a1:function(){var u=this,t=u.b +if((t&4)!==0)return u.c5() +if(t>=4)throw H.e(u.bg()) +u.bj() +return u.c5()}, +bj:function(){var u=this.b|=4 +if((u&1)!==0)this.ap() +else if((u&3)===0)this.aQ().A(0,C.F)}, +aP:function(a){var u=this.b +if((u&1)!==0)this.ai(a) +else if((u&3)===0)this.aQ().A(0,new P.c_(a))}, +dL:function(a,b,c,d){var u,t,s,r,q=this +if((q.b&3)!==0)throw H.e(P.aM("Stream has already been listened to.")) +u=$.p +t=new P.dw(q,u,d?1:0) +t.bV(a,b,c,d) +s=q.gdC() +u=q.b|=1 +if((u&8)!==0){r=q.a +r.sb9(t) +r.al()}else q.a=t +t.cg(s) +t.bp(new P.kW(q)) +return t}, +dE:function(a){var u,t,s,r,q,p=this,o=null +if((p.b&8)!==0)o=p.a.F() +p.a=null +p.b=p.b&4294967286|2 +s=p.r +if(s!=null)if(o==null)try{o=s.$0()}catch(r){u=H.z(r) +t=H.ao(r) +q=new P.E($.p,[null]) +q.bf(u,t) +o=q}else o=o.ba(s) +s=new P.kV(p) +if(o!=null)o=o.ba(s) +else s.$0() +return o}} +P.kW.prototype={ +$0:function(){P.mp(this.a.d)}} +P.kV.prototype={ +$0:function(){var u=this.a.c +if(u!=null&&u.a===0)u.ag(null)}} +P.l_.prototype={ +ai:function(a){this.gaD().aP(a)}, +aq:function(a,b){this.gaD().d5(a,b)}, +ap:function(){this.gaD().da()}} +P.k9.prototype={ +ai:function(a){this.gaD().az(new P.c_(a))}, +ap:function(){this.gaD().az(C.F)}} +P.dv.prototype={} +P.dE.prototype={} +P.bi.prototype={ +bl:function(a,b,c,d){return this.a.dL(a,b,c,d)}, +gC:function(a){return(H.bb(this.a)^892482866)>>>0}, +K:function(a,b){if(b==null)return!1 +if(this===b)return!0 +return b instanceof P.bi&&b.a===this.a}} +P.dw.prototype={ +cb:function(){return this.x.dE(this)}, +aV:function(){var u=this.x +if((u.b&8)!==0)u.a.aK() +P.mp(u.e)}, +aW:function(){var u=this.x +if((u.b&8)!==0)u.a.al() +P.mp(u.f)}} +P.cF.prototype={ +bV:function(a,b,c,d){var u,t=this +t.a=a +u=b==null?P.tW():b +if(H.ca(u,{func:1,ret:-1,args:[P.c,P.a1]}))t.b=t.d.bN(u) +else if(H.ca(u,{func:1,ret:-1,args:[P.c]}))t.b=u +else H.O(P.I("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace.")) +t.c=c}, +cg:function(a){var u=this +if(a==null)return +u.r=a +if(!a.gt(a)){u.e=(u.e|64)>>>0 +u.r.aM(u)}}, +cK:function(a){var u,t,s=this,r=s.e +if((r&8)!==0)return +u=(r+128|4)>>>0 +s.e=u +if(r<128&&s.r!=null){t=s.r +if(t.a===1)t.a=3}if((r&4)===0&&(u&32)===0)s.bp(s.gcc())}, +aK:function(){return this.cK(null)}, +al:function(){var u=this,t=u.e +if((t&8)!==0)return +if(t>=128){t=u.e=t-128 +if(t<128){if((t&64)!==0){t=u.r +t=!t.gt(t)}else t=!1 +if(t)u.r.aM(u) +else{t=(u.e&4294967291)>>>0 +u.e=t +if((t&32)===0)u.bp(u.gcd())}}}}, +F:function(){var u=this,t=(u.e&4294967279)>>>0 +u.e=t +if((t&8)===0)u.bh() +t=u.f +return t==null?$.dO():t}, +bh:function(){var u,t=this,s=t.e=(t.e|8)>>>0 +if((s&64)!==0){u=t.r +if(u.a===1)u.a=3}if((s&32)===0)t.r=null +t.f=t.cb()}, +aP:function(a){var u=this.e +if((u&8)!==0)return +if(u<32)this.ai(a) +else this.az(new P.c_(a))}, +d5:function(a,b){var u=this.e +if((u&8)!==0)return +if(u<32)this.aq(a,b) +else this.az(new P.dx(a,b))}, +da:function(){var u=this,t=u.e +if((t&8)!==0)return +t=(t|2)>>>0 +u.e=t +if(t<32)u.ap() +else u.az(C.F)}, +aV:function(){}, +aW:function(){}, +cb:function(){return}, +az:function(a){var u,t=this,s=t.r;(s==null?t.r=new P.dC():s).A(0,a) +u=t.e +if((u&64)===0){u=(u|64)>>>0 +t.e=u +if(u<128)t.r.aM(t)}}, +ai:function(a){var u=this,t=u.e +u.e=(t|32)>>>0 +u.d.cP(u.a,a) +u.e=(u.e&4294967263)>>>0 +u.bi((t&4)!==0)}, +aq:function(a,b){var u=this,t=u.e,s=new P.kc(u,a,b) +if((t&1)!==0){u.e=(t|16)>>>0 +u.bh() +t=u.f +if(t!=null&&t!==$.dO())t.ba(s) +else s.$0()}else{s.$0() +u.bi((t&4)!==0)}}, +ap:function(){var u,t=this,s=new P.kb(t) +t.bh() +t.e=(t.e|16)>>>0 +u=t.f +if(u!=null&&u!==$.dO())u.ba(s) +else s.$0()}, +bp:function(a){var u=this,t=u.e +u.e=(t|32)>>>0 +a.$0() +u.e=(u.e&4294967263)>>>0 +u.bi((t&4)!==0)}, +bi:function(a){var u,t,s=this +if((s.e&64)!==0){u=s.r +u=u.gt(u)}else u=!1 +if(u){u=s.e=(s.e&4294967231)>>>0 +if((u&4)!==0)if(u<128){u=s.r +u=u==null||u.gt(u)}else u=!1 +else u=!1 +if(u)s.e=(s.e&4294967291)>>>0}for(;!0;a=t){u=s.e +if((u&8)!==0)return s.r=null +t=(u&4)!==0 +if(a===t)break +s.e=(u^32)>>>0 +if(t)s.aV() +else s.aW() +s.e=(s.e&4294967263)>>>0}u=s.e +if((u&64)!==0&&u<128)s.r.aM(s)}} +P.kc.prototype={ +$0:function(){var u,t,s=this.a,r=s.e +if((r&8)!==0&&(r&16)===0)return +s.e=(r|32)>>>0 +u=s.b +r=this.b +t=s.d +if(H.ca(u,{func:1,ret:-1,args:[P.c,P.a1]}))t.ej(u,r,this.c) +else t.cP(s.b,r) +s.e=(s.e&4294967263)>>>0}} +P.kb.prototype={ +$0:function(){var u=this.a,t=u.e +if((t&16)===0)return +u.e=(t|42)>>>0 +u.d.cO(u.c) +u.e=(u.e&4294967263)>>>0}} +P.kX.prototype={ +bF:function(a,b,c,d){return this.bl(a,d,c,!0===b)}, +bE:function(a,b,c){return this.bF(a,null,b,c)}, +e5:function(a,b){return this.bF(a,null,b,null)}, +bl:function(a,b,c,d){return P.nJ(a,b,c,d)}} +P.kz.prototype={ +bl:function(a,b,c,d){var u +if(this.b)throw H.e(P.aM("Stream has already been listened to.")) +this.b=!0 +u=P.nJ(a,b,c,d) +u.cg(this.a.$0()) +return u}} +P.kF.prototype={ +gt:function(a){return this.b==null}, +cA:function(a){var u,t,s,r,q=this,p=q.b +if(p==null)throw H.e(P.aM("No events pending.")) +u=null +try{u=p.m() +if(u)a.ai(q.b.gn()) +else{q.b=null +a.ap()}}catch(r){t=H.z(r) +s=H.ao(r) +if(u==null){q.b=C.Z +a.aq(t,s)}else a.aq(t,s)}}} +P.kj.prototype={ +gau:function(){return this.a}, +sau:function(a){return this.a=a}} +P.c_.prototype={ +bJ:function(a){a.ai(this.b)}} +P.dx.prototype={ +bJ:function(a){a.aq(this.b,this.c)}} +P.ki.prototype={ +bJ:function(a){a.ap()}, +gau:function(){return}, +sau:function(a){throw H.e(P.aM("No events after a done."))}} +P.kN.prototype={ +aM:function(a){var u=this,t=u.a +if(t===1)return +if(t>=1){u.a=1 +return}P.os(new P.kO(u,a)) +u.a=1}} +P.kO.prototype={ +$0:function(){var u=this.a,t=u.a +u.a=0 +if(t===3)return +u.cA(this.b)}} +P.dC.prototype={ +gt:function(a){return this.c==null}, +A:function(a,b){var u=this,t=u.c +if(t==null)u.b=u.c=b +else{t.sau(b) +u.c=b}}, +cA:function(a){var u=this.b,t=u.gau() +this.b=t +if(t==null)this.c=null +u.bJ(a)}} +P.kY.prototype={} +P.bw.prototype={ +k:function(a){return H.b(this.a)}, +$ib3:1} +P.l6.prototype={} +P.ll.prototype={ +$0:function(){var u,t=this.a,s=t.a +t=s==null?t.a=new P.cA():s +s=this.b +if(s==null)throw H.e(t) +u=H.e(t) +u.stack=s.k(0) +throw u}} +P.kP.prototype={ +cO:function(a){var u,t,s,r=null +try{if(C.f===$.p){a.$0() +return}P.nZ(r,r,this,a)}catch(s){u=H.z(s) +t=H.ao(s) +P.c7(r,r,this,u,t)}}, +el:function(a,b){var u,t,s,r=null +try{if(C.f===$.p){a.$1(b) +return}P.o0(r,r,this,a,b)}catch(s){u=H.z(s) +t=H.ao(s) +P.c7(r,r,this,u,t)}}, +cP:function(a,b){return this.el(a,b,null)}, +ei:function(a,b,c){var u,t,s,r=null +try{if(C.f===$.p){a.$2(b,c) +return}P.o_(r,r,this,a,b,c)}catch(s){u=H.z(s) +t=H.ao(s) +P.c7(r,r,this,u,t)}}, +ej:function(a,b,c){return this.ei(a,b,c,null,null)}, +dO:function(a){return new P.kR(this,a)}, +dN:function(a){return this.dO(a,null)}, +co:function(a){return new P.kQ(this,a)}, +ef:function(a){if($.p===C.f)return a.$0() +return P.nZ(null,null,this,a)}, +cN:function(a){return this.ef(a,null)}, +ek:function(a,b){if($.p===C.f)return a.$1(b) +return P.o0(null,null,this,a,b)}, +bO:function(a,b){return this.ek(a,b,null,null)}, +eh:function(a,b,c){if($.p===C.f)return a.$2(b,c) +return P.o_(null,null,this,a,b,c)}, +eg:function(a,b,c){return this.eh(a,b,c,null,null,null)}, +ec:function(a){return a}, +bN:function(a){return this.ec(a,null,null,null)}} +P.kR.prototype={ +$0:function(){return this.a.cN(this.b)}} +P.kQ.prototype={ +$0:function(){return this.a.cO(this.b)}} +P.kB.prototype={ +gh:function(a){return this.a}, +gt:function(a){return this.a===0}, +gI:function(){return new P.kC(this,[H.i(this,0)])}, +u:function(a){var u,t +if(typeof a==="string"&&a!=="__proto__"){u=this.b +return u==null?!1:u[a]!=null}else if(typeof a==="number"&&(a&1073741823)===a){t=this.c +return t==null?!1:t[a]!=null}else return this.df(a)}, +df:function(a){var u=this.d +if(u==null)return!1 +return this.ah(this.aB(u,a),a)>=0}, +i:function(a,b){var u,t,s +if(typeof b==="string"&&b!=="__proto__"){u=this.b +t=u==null?null:P.nL(u,b) +return t}else if(typeof b==="number"&&(b&1073741823)===b){s=this.c +t=s==null?null:P.nL(s,b) +return t}else return this.dj(b)}, +dj:function(a){var u,t,s=this.d +if(s==null)return +u=this.aB(s,a) +t=this.ah(u,a) +return t<0?null:u[t+1]}, +l:function(a,b,c){var u,t,s,r,q,p=this +if(typeof b==="string"&&b!=="__proto__"){u=p.b +p.d6(u==null?p.b=P.nM():u,b,c)}else{t=p.d +if(t==null)t=p.d=P.nM() +s=H.om(b)&1073741823 +r=t[s] +if(r==null){P.mi(t,s,[b,c]);++p.a +p.e=null}else{q=p.ah(r,b) +if(q>=0)r[q+1]=c +else{r.push(b,c);++p.a +p.e=null}}}}, +H:function(a,b){var u,t,s,r=this,q=r.c3() +for(u=q.length,t=0;t=t.length){u.d=null +return!1}else{u.d=t[s] +u.c=s+1 +return!0}}, +$iZ:1} +P.c2.prototype={ +gw:function(a){var u=this,t=new P.kL(u,u.r,u.$ti) +t.c=u.e +return t}, +gh:function(a){return this.a}, +gt:function(a){return this.a===0}, +ga2:function(a){return this.a!==0}, +D:function(a,b){var u,t +if(typeof b==="string"&&b!=="__proto__"){u=this.b +if(u==null)return!1 +return u[b]!=null}else if(typeof b==="number"&&(b&1073741823)===b){t=this.c +if(t==null)return!1 +return t[b]!=null}else return this.de(b)}, +de:function(a){var u=this.d +if(u==null)return!1 +return this.ah(this.aB(u,a),a)>=0}, +A:function(a,b){var u,t,s=this +if(typeof b==="string"&&b!=="__proto__"){u=s.b +return s.bY(u==null?s.b=P.mj():u,b)}else if(typeof b==="number"&&(b&1073741823)===b){t=s.c +return s.bY(t==null?s.c=P.mj():t,b)}else return s.d4(b)}, +d4:function(a){var u,t,s=this,r=s.d +if(r==null)r=s.d=P.mj() +u=s.c2(a) +t=r[u] +if(t==null)r[u]=[s.bk(a)] +else{if(s.ah(t,a)>=0)return!1 +t.push(s.bk(a))}return!0}, +ed:function(a,b){var u=this +if(typeof b==="string"&&b!=="__proto__")return u.cf(u.b,b) +else if(typeof b==="number"&&(b&1073741823)===b)return u.cf(u.c,b) +else return u.dF(b)}, +dF:function(a){var u,t,s=this,r=s.d +if(r==null)return!1 +u=s.aB(r,a) +t=s.ah(u,a) +if(t<0)return!1 +s.cm(u.splice(t,1)[0]) +return!0}, +di:function(a,b){var u,t,s,r,q=this,p=q.e +for(;p!=null;p=t){u=p.a +t=p.b +s=q.r +r=a.$1(u) +if(s!==q.r)throw H.e(P.X(q)) +if(!1===r)q.ed(0,u)}}, +cp:function(a){var u=this +if(u.a>0){u.b=u.c=u.d=u.e=u.f=null +u.a=0 +u.bq()}}, +bY:function(a,b){if(a[b]!=null)return!1 +a[b]=this.bk(b) +return!0}, +cf:function(a,b){var u +if(a==null)return!1 +u=a[b] +if(u==null)return!1 +this.cm(u) +delete a[b] +return!0}, +bq:function(){this.r=1073741823&this.r+1}, +bk:function(a){var u,t=this,s=new P.kK(a) +if(t.e==null)t.e=t.f=s +else{u=t.f +s.c=u +t.f=u.b=s}++t.a +t.bq() +return s}, +cm:function(a){var u=this,t=a.c,s=a.b +if(t==null)u.e=s +else t.b=s +if(s==null)u.f=t +else s.c=t;--u.a +u.bq()}, +c2:function(a){return J.ai(a)&1073741823}, +aB:function(a,b){return a[this.c2(b)]}, +ah:function(a,b){var u,t +if(a==null)return-1 +u=a.length +for(t=0;tr.gh(s))throw H.e(H.ro()) +if(t=0;--q)p.l(a,b+q,r.i(s,t+q)) +else for(q=0;q=0){k=C.a.v("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",j) +if(k===m)continue +m=k}else{if(j===-1){if(q<0){i=r==null?null:r.a.length +if(i==null)i=0 +q=i+(t-s) +p=t}++o +if(m===61)continue}m=k}if(j!==-2){if(r==null)r=new P.N("") +r.a+=C.a.q(a,s,t) +r.a+=H.mb(m) +s=n +continue}}throw H.e(P.y("Invalid base64 data",a,t))}if(r!=null){i=r.a+=C.a.q(a,s,c) +h=i.length +if(q>=0)P.n6(a,p,c,q,o,h) +else{g=C.c.bc(h-1,4)+1 +if(g===1)throw H.e(P.y(e,a,c)) +for(;g<4;){i+="=" +r.a=i;++g}}i=r.a +return C.a.aw(a,b,c,i.charCodeAt(0)==0?i:i)}f=c-b +if(q>=0)P.n6(a,p,c,q,o,f) +else{g=C.c.bc(f,4) +if(g===1)throw H.e(P.y(e,a,c)) +if(g>1)a=C.a.aw(a,c,c,g===2?"==":"=")}return a}} +P.dY.prototype={} +P.dX.prototype={ +dS:function(a,b){var u,t,s,r=P.az(b,null,a.length) +if(b===r)return new Uint8Array(0) +u=new P.ka() +t=u.dU(a,b,r) +s=u.a +if(s<-1)H.O(P.y("Missing padding character",a,r)) +if(s>0)H.O(P.y("Invalid length, must be multiple of four",a,r)) +u.a=-1 +return t}} +P.ka.prototype={ +dU:function(a,b,c){var u,t=this,s=t.a +if(s<0){t.a=P.nI(a,b,c,s) +return}if(b===c)return new Uint8Array(0) +u=P.t7(a,b,c,s) +t.a=P.t9(a,b,c,u,0,t.a) +return u}} +P.e_.prototype={} +P.e3.prototype={} +P.kT.prototype={} +P.e5.prototype={} +P.eh.prototype={} +P.eS.prototype={} +P.fP.prototype={ +dT:function(a){var u=P.nY(a,this.gct().a) +return u}, +gct:function(){return C.bw}} +P.fQ.prototype={} +P.ju.prototype={} +P.jv.prototype={} +P.dD.prototype={ +a1:function(){}} +P.l5.prototype={ +a1:function(){this.a.dX() +this.b.a1()}} +P.jM.prototype={} +P.jN.prototype={ +dR:function(a){var u,t,s,r,q,p,o,n,m=P.rZ(!1,a,0,null) +if(m!=null)return m +u=P.az(0,null,J.H(a)) +t=P.o2(a,0,u) +if(t>0){s=P.mf(a,0,t) +if(t===u)return s +r=new P.N(s) +q=t +p=!1}else{q=0 +r=null +p=!0}if(r==null)r=new P.N("") +o=new P.dH(!1,r) +o.c=p +o.cs(a,q,u) +o.cw(a,u) +n=r.a +return n.charCodeAt(0)==0?n:n}} +P.dH.prototype={ +cw:function(a,b){var u +if(this.e>0){u=P.y("Unfinished UTF-8 octet sequence",a,b) +throw H.e(u)}}, +dX:function(){return this.cw(null,null)}, +cs:function(a,b,c){var u,t,s,r,q,p,o,n,m,l=this,k="Bad UTF-8 encoding 0x",j=l.d,i=l.e,h=l.f +l.f=l.e=l.d=0 +$label0$0:for(u=J.K(a),t=l.b,s=b;!0;s=n){$label1$1:if(i>0){do{if(s===c)break $label0$0 +r=u.i(a,s) +if((r&192)!==128){q=P.y(k+C.c.X(r,16),a,s) +throw H.e(q)}else{j=(j<<6|r&63)>>>0;--i;++s}}while(i>0) +if(j<=C.bz[h-1]){q=P.y("Overlong encoding of 0x"+C.c.X(j,16),a,s-h-1) +throw H.e(q)}if(j>1114111){q=P.y("Character outside valid Unicode range: 0x"+C.c.X(j,16),a,s-h-1) +throw H.e(q)}if(!l.c||j!==65279)t.a+=H.mb(j) +l.c=!1}for(q=s0){l.c=!1 +o=s+p +t.a+=P.mf(a,s,o) +if(o===c)break}else o=s +n=o+1 +r=u.i(a,o) +if(r<0){m=P.y("Negative UTF-8 code unit: -0x"+C.c.X(-r,16),a,n-1) +throw H.e(m)}else{if((r&224)===192){j=r&31 +i=1 +h=1 +continue $label0$0}if((r&240)===224){j=r&15 +i=2 +h=2 +continue $label0$0}if((r&248)===240&&r<245){j=r&7 +i=3 +h=3 +continue $label0$0}m=P.y(k+C.c.X(r,16),a,n-1) +throw H.e(m)}}break $label0$0}if(i>0){l.d=j +l.e=i +l.f=h}}} +P.i1.prototype={ +$2:function(a,b){var u,t=this.b,s=this.a +t.a+=s.a +u=t.a+=H.b(a.a) +t.a=u+": " +t.a+=P.cn(b) +s.a=", "}} +P.aT.prototype={} +P.cm.prototype={ +K:function(a,b){if(b==null)return!1 +return b instanceof P.cm&&this.a===b.a&&this.b===b.b}, +gC:function(a){var u=this.a +return(u^C.c.ad(u,30))&1073741823}, +eo:function(){var u,t +if(this.b)return this +u=this.a +if(Math.abs(u)<=864e13)t=!1 +else t=!0 +if(t)H.O(P.I("DateTime is outside valid range: "+u)) +return new P.cm(u,!0)}, +k:function(a){var u=this,t=P.na(H.df(u)),s=P.aq(H.nu(u)),r=P.aq(H.nq(u)),q=P.aq(H.nr(u)),p=P.aq(H.nt(u)),o=P.aq(H.nv(u)),n=P.nb(H.ns(u)) +if(u.b)return t+"-"+s+"-"+r+" "+q+":"+p+":"+o+"."+n+"Z" +else return t+"-"+s+"-"+r+" "+q+":"+p+":"+o+"."+n}, +en:function(){var u=this,t=H.df(u)>=-9999&&H.df(u)<=9999?P.na(H.df(u)):P.rd(H.df(u)),s=P.aq(H.nu(u)),r=P.aq(H.nq(u)),q=P.aq(H.nr(u)),p=P.aq(H.nt(u)),o=P.aq(H.nv(u)),n=P.nb(H.ns(u)) +if(u.b)return t+"-"+s+"-"+r+"T"+q+":"+p+":"+o+"."+n+"Z" +else return t+"-"+s+"-"+r+"T"+q+":"+p+":"+o+"."+n}} +P.w.prototype={} +P.b3.prototype={} +P.cA.prototype={ +k:function(a){return"Throw of null."}} +P.ab.prototype={ +gbn:function(){return"Invalid argument"+(!this.a?"(s)":"")}, +gbm:function(){return""}, +k:function(a){var u,t,s,r,q=this,p=q.c,o=p!=null?" ("+p+")":"" +p=q.d +u=p==null?"":": "+H.b(p) +t=q.gbn()+o+u +if(!q.a)return t +s=q.gbm() +r=P.cn(q.b) +return t+s+": "+r}} +P.bU.prototype={ +gbn:function(){return"RangeError"}, +gbm:function(){var u,t,s=this.e +if(s==null){s=this.f +u=s!=null?": Not less than or equal to "+H.b(s):""}else{t=this.f +if(t==null)u=": Not greater than or equal to "+H.b(s) +else if(t>s)u=": Not in range "+H.b(s)+".."+H.b(t)+", inclusive" +else u=tf.length +else i=!1 +if(i)g=null +if(g==null){u=f.length>78?C.a.q(f,0,75)+"...":f +return h+"\n"+u}for(t=1,s=0,r=!1,q=0;q1?h+(" (at line "+t+", character "+(g-s+1)+")\n"):h+(" (at character "+(g+1)+")\n") +o=f.length +for(q=g;q78)if(g-s<75){n=s+75 +m=s +l="" +k="..."}else{if(o-g<75){m=o-75 +n=o +k=""}else{m=g-36 +n=g+36 +k="..."}l="..."}else{n=o +m=s +l="" +k=""}j=C.a.q(f,m,n) +return h+l+j+k+"\n"+C.a.bd(" ",g-m+l.length)+"^\n"}else return g!=null?h+(" (at offset "+H.b(g)+")"):h}, +$iar:1} +P.bB.prototype={} +P.h.prototype={} +P.t.prototype={ +a7:function(a,b){return H.m1(this,H.L(this,"t",0),b)}, +ab:function(a,b,c){return H.hE(this,b,H.L(this,"t",0),c)}, +D:function(a,b){var u +for(u=this.gw(this);u.m();)if(J.a5(u.gn(),b))return!0 +return!1}, +a4:function(a,b){return P.ni(this,!1,H.L(this,"t",0))}, +gh:function(a){var u,t=this.gw(this) +for(u=0;t.m();)++u +return u}, +gt:function(a){return!this.gw(this).m()}, +ga2:function(a){return!this.gt(this)}, +a0:function(a,b){return H.ny(this,b,H.L(this,"t",0))}, +N:function(a,b){var u,t,s +P.ay(b,"index") +for(u=this.gw(this),t=0;u.m();){s=u.gn() +if(b===t)return s;++t}throw H.e(P.d6(b,this,"index",null,t))}, +k:function(a){return P.rn(this,"(",")")}} +P.kA.prototype={ +N:function(a,b){var u=this.a +if(0>b||b>=u)H.O(P.d6(b,this,"index",null,u)) +return this.b.$1(b)}, +gh:function(a){return this.a}} +P.Z.prototype={} +P.l.prototype={$iB:1,$it:1} +P.f.prototype={} +P.cv.prototype={ +k:function(a){return"MapEntry("+H.b(this.a)+": "+H.b(this.b)+")"}} +P.A.prototype={ +gC:function(a){return P.c.prototype.gC.call(this,this)}, +k:function(a){return"null"}} +P.G.prototype={} +P.c.prototype={constructor:P.c,$ic:1, +K:function(a,b){return this===b}, +gC:function(a){return H.bb(this)}, +k:function(a){return"Instance of '"+H.b(H.dg(this))+"'"}, +b6:function(a,b){throw H.e(P.nn(this,b.gcH(),b.gcL(),b.gcI()))}, +toString:function(){return this.k(this)}} +P.dl.prototype={} +P.a1.prototype={} +P.d.prototype={} +P.N.prototype={ +gh:function(a){return this.a.length}, +k:function(a){var u=this.a +return u.charCodeAt(0)==0?u:u}} +P.me.prototype={} +P.bV.prototype={} +P.ah.prototype={} +P.bY.prototype={} +P.jJ.prototype={ +$2:function(a,b){throw H.e(P.y("Illegal IPv4 address, "+a,this.a,b))}} +P.jK.prototype={ +$2:function(a,b){throw H.e(P.y("Illegal IPv6 address, "+a,this.a,b))}, +$1:function(a){return this.$2(a,null)}} +P.jL.prototype={ +$2:function(a,b){var u +if(b-a>4)this.a.$2("an IPv6 part can only contain a maximum of 4 hex digits",a) +u=P.aV(C.a.q(this.b,a,b),null,16) +if(u<0||u>65535)this.a.$2("each part must be in the range of `0x0..0xFFFF`",a) +return u}} +P.dG.prototype={ +gcS:function(){return this.b}, +gbB:function(){var u=this.c +if(u==null)return"" +if(C.a.S(u,"["))return C.a.q(u,1,u.length-1) +return u}, +gbK:function(){var u=this.d +if(u==null)return P.nN(this.a) +return u}, +gcM:function(){var u=this.f +return u==null?"":u}, +gcz:function(){var u=this.r +return u==null?"":u}, +gcC:function(){return this.a.length!==0}, +gby:function(){return this.c!=null}, +gbA:function(){return this.f!=null}, +gbz:function(){return this.r!=null}, +gcB:function(){return C.a.S(this.e,"/")}, +k:function(a){var u,t,s,r=this,q=r.y +if(q==null){q=r.a +u=q.length!==0?q+":":"" +t=r.c +s=t==null +if(!s||q==="file"){q=u+"//" +u=r.b +if(u.length!==0)q=q+H.b(u)+"@" +if(!s)q+=t +u=r.d +if(u!=null)q=q+":"+H.b(u)}else q=u +q+=r.e +u=r.f +if(u!=null)q=q+"?"+u +u=r.r +if(u!=null)q=q+"#"+u +q=r.y=q.charCodeAt(0)==0?q:q}return q}, +K:function(a,b){var u,t,s=this +if(b==null)return!1 +if(s===b)return!0 +if(!!J.m(b).$ibY)if(s.a===b.gbU())if(s.c!=null===b.gby())if(s.b==b.gcS())if(s.gbB()==b.gbB())if(s.gbK()==b.gbK())if(s.e===b.gcJ()){u=s.f +t=u==null +if(!t===b.gbA()){if(t)u="" +if(u===b.gcM()){u=s.r +t=u==null +if(!t===b.gbz()){if(t)u="" +u=u===b.gcz()}else u=!1}else u=!1}else u=!1}else u=!1 +else u=!1 +else u=!1 +else u=!1 +else u=!1 +else u=!1 +else u=!1 +return u}, +gC:function(a){var u=this.z +return u==null?this.z=C.a.gC(this.k(0)):u}, +$ibY:1, +gbU:function(){return this.a}, +gcJ:function(){return this.e}} +P.l4.prototype={ +$1:function(a){throw H.e(P.y("Invalid port",this.a,this.b+1))}} +P.jH.prototype={ +gb8:function(a){var u,t,s,r,q=this,p=null,o=q.c +if(o!=null)return o +o=q.a +u=q.b[0]+1 +t=C.a.b3(o,"?",u) +s=o.length +if(t>=0){r=P.cN(o,t+1,s,C.x,!1) +s=t}else r=p +return q.c=new P.kh("data",p,p,p,P.cN(o,u,s,C.ak,!1),r,p)}, +gat:function(){var u=this.b,t=u[0]+1,s=u[1] +if(t===s)return"text/plain" +return P.tq(this.a,t,s,C.a4,!1)}, +cr:function(){var u,t,s,r,q,p,o,n,m=this.a,l=this.b,k=C.d.gaH(l)+1 +if((l.length&1)===1)return C.b4.dS(m,k) +l=m.length +u=l-k +for(t=k;t=0){p=r+1 +s[r]=n +t=o +r=p +continue}}throw H.e(P.y("Invalid percent escape",m,t))}r=p}return s}, +k:function(a){var u=this.a +return this.b[0]===-1?"data:"+u:u}} +P.lc.prototype={ +$1:function(a){return new Uint8Array(96)}, +$S:19} +P.lb.prototype={ +$2:function(a,b){var u=this.a[a] +J.qF(u,0,96,b) +return u}, +$S:18} +P.ld.prototype={ +$3:function(a,b,c){var u,t +for(u=b.length,t=0;t>>0]=c}} +P.kU.prototype={ +gcC:function(){return this.b>0}, +gby:function(){return this.c>0}, +gbA:function(){return this.ft?C.a.q(this.a,t,u-1):""}, +gbB:function(){var u=this.c +return u>0?C.a.q(this.a,u,this.d):""}, +gbK:function(){var u=this +if(u.c>0&&u.d+1u)b.j($.pO(),H.a([n,u],[P.c]),"count") +u=o.f +t=u.d +u.f=p.i(0,t) +m.push("indices") +s=o.e +o=s.d +if(o!==-1){p=s.r=p.i(0,o) +if(p==null)b.j($.D(),H.a([o],[P.c]),q) +else{p.O(C.v,q,b) +if(s.r.Q!==-1)b.p($.lV(),q) +p=s.f +if(p!==-1)M.aG(s.e,Z.am(p),Z.am(p)*n,s.r,o,b)}}m.pop() +m.push("values") +if(t!==-1){p=u.f +if(p==null)b.j($.D(),H.a([t],[P.c]),q) +else{p.O(C.v,q,b) +if(u.f.Q!==-1)b.p($.lV(),q) +p=r.dy +o=C.k.i(0,r.ch) +if(o==null)o=0 +M.aG(u.e,p,p*o*n,u.f,t,b)}}m.pop() +m.pop()}}, +O:function(a,b,c){var u +this.c=!0 +u=this.k2 +if(u==null)this.k2=a +else if(u!==a)c.j($.pd(),H.a([u,a],[P.c]),b)}, +es:function(a){var u=this.k1 +if(u==null)this.k1=a +else if(u!==a)return!1 +return!0}, +ea:function(a){var u,t,s=this +if(!s.cx||5126===s.z){a.toString +return a}u=s.dy*8 +t=s.z +if(t===5120||t===5122||t===5124)return Math.max(a/(C.c.ay(1,u-1)-1),-1) +else return a/(C.c.ay(1,u)-1)}} +M.jY.prototype={ +ac:function(){return this.cW()}, +cW:function(){var u=this +return P.aS(function(){var t=0,s=2,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b +return function $async$ac(a,a0){if(a===1){r=a0 +t=s}while(true)switch(t){case 0:b=u.z +if(b===-1||u.Q===-1||u.ch==null){t=1 +break}q=u.ga8() +p=u.Q +o=u.fr +if(o!=null){o=o.cx +if((o==null?null:o.Q)==null){t=1 +break}if(u.gaj()p){t=1 +break}p=o.e +o=p.e +g=p.f +if(M.aG(o,Z.am(g),Z.am(g)*h,p.r,null,null)){f=u.dy +e=C.k.i(0,u.ch) +if(e==null)e=0 +e=!M.aG(m,f,f*e*h,n.f,null,null) +f=e}else f=!0 +if(f){t=1 +break}p=p.r +d=M.lZ(g,p.cx.Q.buffer,p.y+o,h) +n=n.f +c=M.n4(b,n.cx.Q.buffer,n.y+m,h*q) +if(d==null||c==null){t=1 +break}i=new M.k3(u,d,i,q,c).$0()}t=3 +return P.kG(i) +case 3:case 1:return P.aO() +case 2:return P.aP(r)}}},P.h)}, +bb:function(){var u=this +return P.aS(function(){var t=0,s=1,r,q,p,o,n +return function $async$bb(a,b){if(a===1){r=b +t=s}while(true)switch(t){case 0:o=u.dy*8 +n=u.z +n=n===5120||n===5122||n===5124 +q=P.w +t=n?2:4 +break +case 2:n=C.c.ay(1,o-1) +p=u.ac() +p.toString +t=5 +return P.kG(H.hE(p,new M.jZ(1/(n-1)),H.L(p,"t",0),q)) +case 5:t=3 +break +case 4:n=C.c.ay(1,o) +p=u.ac() +p.toString +t=6 +return P.kG(H.hE(p,new M.k_(1/(n-1)),H.L(p,"t",0),q)) +case 6:case 3:return P.aO() +case 1:return P.aP(r)}}},P.w)}, +$aQ:function(){return[P.h]}} +M.k0.prototype={ +$0:function(){var u=this +return P.aS(function(){var t=0,s=1,r,q,p,o,n,m,l,k,j +return function $async$$0(a,b){if(a===1){r=b +t=s}while(true)switch(t){case 0:q=u.a,p=u.c,o=u.b,n=u.d,m=u.e,l=0,k=0,j=0 +case 2:if(!(lp){t=1 +break}p=o.e +o=p.e +g=p.f +if(M.aG(o,Z.am(g),Z.am(g)*h,p.r,null,null)){f=u.dy +e=C.k.i(0,u.ch) +if(e==null)e=0 +e=!M.aG(m,f,f*e*h,n.f,null,null) +f=e}else f=!0 +if(f){t=1 +break}p=p.r +d=M.lZ(g,p.cx.Q.buffer,p.y+o,h) +n=n.f +c=M.n3(b,n.cx.Q.buffer,n.y+m,h*q) +if(d==null||c==null){t=1 +break}i=new M.jX(u,d,i,q,c).$0()}t=3 +return P.kG(i) +case 3:case 1:return P.aO() +case 2:return P.aP(r)}}},P.w)}, +bb:function(){return this.ac()}, +$aQ:function(){return[P.w]}} +M.jU.prototype={ +$0:function(){var u=this +return P.aS(function(){var t=0,s=1,r,q,p,o,n,m,l,k,j +return function $async$$0(a,b){if(a===1){r=b +t=s}while(true)switch(t){case 0:q=u.a,p=u.c,o=u.b,n=u.d,m=u.e,l=0,k=0,j=0 +case 2:if(!(ld)t.b[c]=d +if(d0){n=$.mD() +m=q+"/min/"+o +a.j(n,H.a([r[o],s[o]],p),m)}}return!0}, +$aY:function(){return[P.w]}} +M.hG.prototype={ +W:function(a,b,c,d){var u,t=this +if(b===c||t.b[c]t.c[c]){u=t.a +u[c]=u[c]+1}return!0}, +as:function(a){var u,t,s,r,q,p,o,n,m,l=this +for(u=l.b,t=u.length,s=l.c,r=l.a,q=l.d,p=[P.c],o=0;o0){n=$.mC() +m=q+"/max/"+o +a.j(n,H.a([r[o],s[o]],p),m)}}return!0}, +$aY:function(){return[P.w]}} +M.hT.prototype={ +W:function(a,b,c,d){var u,t=this +if(b===c||t.b[c]>d)t.b[c]=d +if(d0){n=$.mD() +m=q+"/min/"+o +a.j(n,H.a([r[o],s[o]],p),m)}}return!0}, +$aY:function(){return[P.h]}} +M.hH.prototype={ +W:function(a,b,c,d){var u,t=this +if(b===c||t.b[c]t.c[c]){u=t.a +u[c]=u[c]+1}return!0}, +as:function(a){var u,t,s,r,q,p,o,n,m,l=this +for(u=l.b,t=u.length,s=l.c,r=l.a,q=l.d,p=[P.c],o=0;o0){n=$.mC() +m=q+"/max/"+o +a.j(n,H.a([r[o],s[o]],p),m)}}return!0}, +$aY:function(){return[P.h]}} +Z.aZ.prototype={ +E:function(a,b){var u,t,s,r,q,p=this,o="samplers",n=p.y +if(n==null||p.x==null)return +u=b.c +u.push(o) +n.aa(new Z.dU(b,a)) +u.pop() +u.push("channels") +p.x.aa(new Z.dV(p,b,a)) +u.pop() +u.push(o) +for(t=n.b,n=n.a,s=n.length,r=0;r=s +if(!(q?null:n[r]).c)b.V($.dP(),r)}u.pop()}} +Z.dU.prototype={ +$2:function(a,b){var u,t,s,r,q="input",p="output",o=this.a,n=o.c +n.push(C.c.k(a)) +u=this.b.f +t=b.d +b.r=u.i(0,t) +s=b.f +b.x=u.i(0,s) +if(t!==-1){u=b.r +if(u==null)o.j($.D(),H.a([t],[P.c]),q) +else{u.O(C.aY,q,o) +u=b.r.fr +if(u!=null)u.O(C.v,q,o) +n.push(q) +u=b.r +r=new V.k(u.ch,u.z,u.cx) +if(!r.K(0,C.A))o.B($.ph(),H.a([r,H.a([C.A],[V.k])],[P.c])) +else o.U(b.r,new Z.dT(o.M())) +u=b.r +if(u.db==null||u.cy==null)o.P($.pj()) +if(b.e==="CUBICSPLINE"&&b.r.Q<2)o.B($.pi(),H.a(["CUBICSPLINE",2,b.r.Q],[P.c])) +n.pop()}}if(s!==-1){u=b.x +if(u==null)o.j($.D(),H.a([s],[P.c]),p) +else{u.O(C.aZ,p,o) +u=b.x.fr +if(u!=null)u.O(C.v,p,o) +b.x.es("CUBICSPLINE"===b.e)}}n.pop()}} +Z.dV.prototype={ +$2:function(a,b){var u,t,s,r,q,p,o,n,m,l,k,j,i,h=null,g="sampler",f=this.b,e=f.c +e.push(C.c.k(a)) +u=this.a +t=b.d +b.f=u.y.i(0,t) +s=b.e +r=s!=null +if(r){q=s.d +s.f=this.c.db.i(0,q) +if(q!==-1){e.push("target") +p=s.f +if(p==null)f.j($.D(),H.a([q],[P.c]),"node") +else{p.c=!0 +switch(s.e){case"translation":case"rotation":case"scale":if(p.Q!=null)f.P($.pe()) +if(s.f.id!=null)f.p($.pP(),"path") +break +case"weights":q=p.fy +q=q==null?h:q.x +q=q==null?h:q.gcv(q) +if((q==null?h:q.fx)==null)f.P($.pf()) +break}}e.pop()}}if(t!==-1){q=b.f +if(q==null)f.j($.D(),H.a([t],[P.c]),g) +else{q.c=!0 +if(r&&q.x!=null){t=s.e +if(t==="rotation"){o=q.x +if(o.ga8()===4){e.push(g) +q=f.M() +p=5126===o.z?h:o.gbI() +f.U(o,new Z.ic("CUBICSPLINE"===b.f.e,p,q,[P.G])) +e.pop()}q=b.f +q.x.toString}q=q.x +n=new V.k(q.ch,q.z,q.cx) +m=C.cH.i(0,t) +if((m==null?h:C.d.D(m,n))===!1)f.j($.pl(),H.a([n,m,t],[P.c]),g) +q=b.f +p=q.r +if(p!=null&&p.Q!==-1&&q.x.Q!==-1&&q.e!=null){l=p.Q +if(q.e==="CUBICSPLINE")l*=3 +if(t==="weights"){t=s.f +t=t==null?h:t.fy +t=t==null?h:t.x +t=t==null?h:t.gcv(t) +t=t==null?h:t.fx +k=t==null?h:t.length +l*=k==null?0:k}if(l!==0&&l!==b.f.x.Q)f.j($.pk(),H.a([l,b.f.x.Q],[P.c]),g)}}}for(j=a+1,u=u.x,t=u.b,q=[P.c];j=u.a.length +i=(p?h:u.a[j]).e +p=i!=null&&s.d===i.d&&s.e==i.e}else p=!1 +if(p)f.j($.pg(),H.a([j],q),"target")}e.pop()}}} +Z.cf.prototype={} +Z.bt.prototype={} +Z.cg.prototype={} +Z.dT.prototype={ +W:function(a,b,c,d){var u=this +if(d<0)a.j($.ox(),H.a([b,d],[P.c]),u.b) +else{if(b!==0&&d<=u.a)a.j($.oy(),H.a([b,d,u.a],[P.c]),u.b) +u.a=d}return!0}, +$aY:function(){return[P.w]}} +Z.ic.prototype={ +W:function(a,b,c,d){var u,t,s=this +if(!s.a||4===(4&s.d)){u=s.b +t=u!=null?u.$1(d):d +u=s.e+t*t +s.e=u +if(3===c){if(Math.abs(Math.sqrt(u)-1)>0.00769)a.j($.oz(),H.a([b-3,b,Math.sqrt(s.e)],[P.c]),s.c) +s.e=0}}if(++s.d===12)s.d=0 +return!0}} +T.bv.prototype={ +gb4:function(){var u,t=this.f +if(t!=null){u=$.aD().b +u=!u.test(t)}else u=!0 +if(u)return 0 +return P.aV($.aD().aG(t).b[1],null,null)}, +gbH:function(){var u,t=this.f +if(t!=null){u=$.aD().b +u=!u.test(t)}else u=!0 +if(u)return 0 +return P.aV($.aD().aG(t).b[2],null,null)}, +gcG:function(){var u,t=this.r +if(t!=null){u=$.aD().b +u=!u.test(t)}else u=!0 +if(u)return 2 +return P.aV($.aD().aG(t).b[1],null,null)}, +ge8:function(){var u,t=this.r +if(t!=null){u=$.aD().b +u=!u.test(t)}else u=!0 +if(u)return 0 +return P.aV($.aD().aG(t).b[2],null,null)}} +Q.b_.prototype={} +V.aH.prototype={ +O:function(a,b,c){var u +this.c=!0 +u=this.cy +if(u==null)this.cy=a +else if(u!==a)c.j($.pn(),H.a([u,a],[P.c]),b)}, +E:function(a,b){var u,t=this,s=t.x,r=t.cx=a.y.i(0,s) +t.db=t.Q +u=t.ch +if(u===34962)t.cy=C.Y +else if(u===34963)t.cy=C.X +if(s!==-1)if(r==null)b.j($.D(),H.a([s],[P.c]),"buffer") +else{r.c=!0 +r=r.y +if(r!==-1){u=t.y +if(u>=r)b.j($.mK(),H.a([s,r],[P.c]),"byteOffset") +else if(u+t.z>r)b.j($.mK(),H.a([s,r],[P.c]),"byteLength")}}}} +G.b1.prototype={} +G.bx.prototype={} +G.by.prototype={} +V.d4.prototype={ +ev:function(a){var u,t,s,r,q +new V.fq(this,a).$1(this.fy) +u=a.r +for(t=u.length,s=a.c,r=0;r2?u-2:0 +default:return 0}}, +E:function(a,b){var u,t,s,r,q,p,o,n,m,l,k,j=this,i="attributes",h="indices",g=j.d +if(g!=null){u=b.c +u.push(i) +g.H(0,new S.hM(j,a,b)) +u.pop()}g=j.e +if(g!==-1){u=j.fy=a.f.i(0,g) +if(u==null)b.j($.D(),H.a([g],[P.c]),h) +else{j.dy=u.Q +u.O(C.b0,h,b) +g=j.fy.fr +if(g!=null)g.O(C.X,h,b) +g=b.c +g.push(h) +u=j.fy.fr +if(u!=null&&u.Q!==-1)b.P($.ps()) +u=j.fy +t=new V.k(u.ch,u.z,u.cx) +if(!C.d.D(C.ae,t))b.B($.pr(),H.a([t,C.ae],[P.c])) +else{u=j.fr +s=u!==-1?u-1:-1 +u=j.r +r=u!==-1?C.c.ay(1,u):-1 +if(r!==0&&s>=-1){u=j.fy +q=b.M() +p=C.c.cj(j.dy,3) +o=j.fy.z +n=new Uint32Array(3) +b.U(u,new S.fy(s,p,Z.ov(o),16===(16&r),n,q))}}g.pop()}}g=j.dy +if(g!==-1){u=j.r +if(!(u===1&&g%2!==0))if(!((u===2||u===3)&&g<2))if(!(u===4&&g%3!==0))g=(u===5||u===6)&&g<3 +else g=!0 +else g=!0 +else g=!0}else g=!1 +if(g)b.B($.pq(),H.a([j.dy,C.bY[j.r]],[P.c])) +g=j.f +j.go=a.cx.i(0,g) +m=P.nj(j.db,new S.hN(),!1,P.h) +if(g!==-1){u=j.go +if(u==null)b.j($.D(),H.a([g],[P.c]),"material") +else{u.c=!0 +u.dx.H(0,new S.hO(j,b,m))}}for(g=C.d.gw(m),u=new H.dt(g,new S.hP(),[H.i(m,0)]),q=b.c;u.m();){p=g.gn() +q.push(i) +b.p($.dP(),"TEXCOORD_"+H.b(p)) +q.pop()}g=j.x +if(g!=null){u=b.c +u.push("targets") +q=new Array(g.length) +q.fixed$length=Array +j.fx=H.a(q,[[P.f,P.d,[M.Q,P.G]]]) +for(q=P.d,p=[M.Q,P.G],l=0;l1)c.p($.pp(),b)}}} +S.hI.prototype={ +$1:function(a){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f=this +if(a.length!==0&&J.lX(a,0)===95)return +switch(a){case"POSITION":f.a.c=!0 +break +case"NORMAL":f.a.b=!0 +break +case"TANGENT":f.a.a=!0 +break +default:u=H.a(a.split("_"),[P.d]) +t=u[0] +if(!C.d.D(C.bO,t)||u.length!==2){f.b.p($.lW(),a) +break}s=u[1] +s.toString +r=new H.cl(s) +if(r.gh(r)===0){q=0 +p=!1}else{o=s.length +if(o===1){q=J.lX(s,0)-48 +p=!(q<0||q>9)||!1}else{n=J.lu(s) +q=0 +m=0 +while(!0){if(!(m=0)k=m===0&&l===0 +else k=!0 +else k=!0 +if(k){p=!1 +break}q=10*q+l;++m}}}if(p)switch(t){case"COLOR":s=f.a;++s.d +j=s.e +s.e=q>j?q:j +break +case"JOINTS":s=f.a;++s.f +i=s.r +s.r=q>i?q:i +break +case"TEXCOORD":s=f.a;++s.z +h=s.Q +s.Q=q>h?q:h +break +case"WEIGHTS":s=f.a;++s.x +g=s.y +s.y=q>g?q:g +break}else f.b.p($.lW(),a)}}} +S.hJ.prototype={ +$3:function(a,b,c){var u=a+1 +if(u!==b){this.a.B($.pZ(),H.a([c,u,b],[P.c])) +return 0}return b}} +S.hK.prototype={ +$1:function(a){var u=this.a +if(!u.k3.u(a)&&!J.qP(a,"_"))u.p($.lW(),a)}} +S.hM.prototype={ +$2:function(a,b){var u,t,s,r,q,p,o,n,m=this +if(b===-1)return +u=m.b.f.i(0,b) +if(u==null){m.c.j($.D(),H.a([b],[P.c]),a) +return}t=m.a +t.dx.l(0,a,u) +s=m.c +u.O(C.W,a,s) +r=u.fr +if(r!=null)r.O(C.Y,a,s) +if(a==="POSITION")r=u.db==null||u.cy==null +else r=!1 +if(r)s.p($.mN(),"POSITION") +r=u.ch +q=u.z +p=new V.k(r,q,u.cx) +o=s.k2.i(0,H.a(a.split("_"),[P.d])[0]) +if(o!=null)if(!o.D(0,p))s.j($.mM(),H.a([p,o],[P.c]),a) +else if(a==="NORMAL"){r=s.c +r.push("NORMAL") +n=s.M() +s.U(u,new F.jC(n,5126===q?null:u.gbI())) +r.pop()}else if(a==="TANGENT"){r=s.c +r.push("TANGENT") +n=s.M() +s.U(u,new F.jD(n,5126===q?null:u.gbI())) +r.pop()}else if(C.a.S(a,"COLOR_")&&5126===q){r=s.c +r.push(a) +s.U(u,new F.e4(s.M())) +r.pop()}r=u.y +if(!(r!==-1&&r%4!==0))if(u.ga9()%4!==0){r=u.fr +r=r!=null&&r.Q===-1}else r=!1 +else r=!0 +if(r)s.p($.mL(),a) +r=t.fr +if(r===-1)t.dy=t.fr=u.Q +else if(r!==u.Q)s.p($.pw(),a) +r=u.fr +if(r!=null&&r.Q===-1){if(r.db===-1)r.db=u.ga9() +t.bZ(u,a,s)}}} +S.hN.prototype={ +$1:function(a){return a}, +$S:14} +S.hO.prototype={ +$2:function(a,b){if(b!==-1)if(b+1>this.a.db)this.b.j($.pv(),H.a([a,b],[P.c]),"material") +else this.c[b]=-1}} +S.hP.prototype={ +$1:function(a){return a!==-1}, +$S:3} +S.hQ.prototype={ +$2:function(a,b){var u,t,s,r,q,p,o,n=this +if(b===-1)return +u=n.b.f.i(0,b) +if(u==null)n.c.j($.D(),H.a([b],[P.c]),a) +else{t=n.c +u.O(C.W,a,t) +s=n.a +r=s.dx.i(0,a) +if(r==null)t.p($.pu(),a) +else if(r.Q!==u.Q)t.p($.pt(),a) +if(a==="POSITION")q=u.db==null||u.cy==null +else q=!1 +if(q)t.p($.mN(),"POSITION") +p=new V.k(u.ch,u.z,u.cx) +o=t.k3.i(0,a) +if(o!=null&&!o.D(0,p))t.j($.mM(),H.a([p,o],[P.c]),a) +q=u.y +if(!(q!==-1&&q%4!==0))if(u.ga9()%4!==0){q=u.fr +q=q!=null&&q.Q===-1}else q=!1 +else q=!0 +if(q)t.p($.mL(),a) +q=u.fr +if(q!=null&&q.Q===-1){if(q.db===-1)q.db=u.ga9() +s.bZ(u,a,t)}}n.a.fx[n.d].l(0,a,u)}} +S.hL.prototype={ +$0:function(){return P.at([M.Q,P.G])}} +S.fy.prototype={ +W:function(a,b,c,d){var u,t,s=this,r=s.a +if(d>r)a.j($.oA(),H.a([b,d,r],[P.c]),s.cy) +if(d===s.c)a.j($.oB(),H.a([d,b],[P.c]),s.cy) +if(s.x){r=s.cx +u=s.Q +r[u]=d;++u +s.Q=u +if(u===3){s.Q=0 +u=r[0] +t=r[1] +if(u!==t){r=r[2] +r=t===r||r===u}else r=!0 +if(r)++s.ch}}return!0}, +as:function(a){var u=this.ch +if(u>0)a.j($.oC(),H.a([u,this.b],[P.c]),this.cy) +return!0}, +$aY:function(){return[P.h]}} +V.ad.prototype={ +E:function(a,b){var u,t,s,r=this,q=r.x +r.fr=a.Q.i(0,q) +u=r.z +r.id=a.fx.i(0,u) +t=r.ch +r.fy=a.cy.i(0,t) +if(q!==-1){s=r.fr +if(s==null)b.j($.D(),H.a([q],[P.c]),"camera") +else s.c=!0}if(u!==-1){q=r.id +if(q==null)b.j($.D(),H.a([u],[P.c]),"skin") +else q.c=!0}if(t!==-1){q=r.fy +if(q==null)b.j($.D(),H.a([t],[P.c]),"mesh") +else{q.c=!0 +q=q.x +if(q!=null){u=r.dx +if(u!=null){q=q.i(0,0).fx +q=q==null?null:q.length +q=q!==u.length}else q=!1 +if(q){q=$.pB() +u=u.length +t=r.fy.x.i(0,0).fx +b.j(q,H.a([u,t==null?null:t.length],[P.c]),"weights")}if(r.id!=null){q=r.fy.x +if(q.b0(q,new V.i3()))b.P($.pz())}else{q=r.fy.x +if(q.bv(q,new V.i4()))b.P($.pA())}}}}q=r.y +if(q!=null){u=new Array(q.gh(q)) +u.fixed$length=Array +u=H.a(u,[V.ad]) +r.fx=u +F.my(q,u,a.db,"children",b,new V.i5(r,b))}}, +cn:function(a){var u,t,s,r +this.dy.A(0,a) +u=this.fx +if(u!=null)for(t=u.length,s=0;s0&&r.fy.length===u){r.z=!0 +throw H.e(C.b5)}q=q.c +t=q!=null?q.i(0,p):null +if(f!=null)r.fy.push(new E.bE(a,t,null,f,b)) +else{s=c!=null?C.c.k(c):d +q=e?"":r.bT(s) +r.fy.push(new E.bE(a,t,q,null,b))}}, +p:function(a,b){return this.a6(a,null,null,b,!1,null)}, +B:function(a,b){return this.a6(a,b,null,null,!1,null)}, +j:function(a,b,c){return this.a6(a,b,null,c,!1,null)}, +P:function(a){return this.a6(a,null,null,null,!1,null)}, +ar:function(a,b,c){return this.a6(a,b,null,null,c,null)}, +V:function(a,b){return this.a6(a,null,b,null,!1,null)}, +aE:function(a,b,c){return this.a6(a,b,c,null,!1,null)}, +bu:function(a,b){return this.a6(a,null,null,null,!1,b)}, +Y:function(a,b,c){return this.a6(a,b,null,null,!1,c)}} +M.ea.prototype={ +$1:function(a){return a.a}} +M.e9.prototype={ +$0:function(){return H.a([],[[F.Y,P.G]])}} +M.eb.prototype={ +$1:function(a){var u +a.toString +u=H.ot(a,"~","~0") +return H.ot(u,"/","~1")}} +M.ee.prototype={ +$1:function(a){return a.a===this.a}} +M.ef.prototype={ +$0:function(){return C.d.b1(C.I,new M.ec(this.a),new M.ed())}} +M.ec.prototype={ +$1:function(a){return a.a===this.a}} +M.ed.prototype={ +$0:function(){return}} +M.eg.prototype={ +$2:function(a,b){this.a.Q.l(0,new D.bA(a,this.b.a),b)}} +M.bF.prototype={$iar:1} +Y.cI.prototype={ +k:function(a){return this.b}} +Y.cG.prototype={ +k:function(a){return this.b}} +Y.bZ.prototype={ +k:function(a){return this.b}} +Y.b4.prototype={ +k:function(a){return this.b}} +Y.bC.prototype={} +Y.fv.prototype={ +$1:function(a){var u,t,s,r=this.a +if(!r.c)if(J.H(a)<9){r.a.F() +this.b.L(C.a3) +return}else{u=Y.rk(a) +t=r.a +s=this.b +switch(u){case C.az:r.b=new Y.fK(s,t) +break +case C.aA:u=new Uint8Array(13) +r.b=new Y.i9(C.r,C.p,u,new Uint8Array(32),s,t) +break +case C.aB:r.b=new Y.jS(new Uint8Array(30),s,t) +break +default:t.F() +s.L(C.bd) +return}r.c=!0}r.b.A(0,a)}} +Y.fx.prototype={ +$1:function(a){this.a.a.F() +this.b.L(a)}, +$S:6} +Y.fw.prototype={ +$0:function(){var u=this.a.b +u.b.F() +u=u.a +if(u.a.a===0)u.L(C.a3)}} +Y.fu.prototype={ +$2:function(a,b){var u,t,s +for(u=b.length,t=J.K(a),s=0;s>>0 +k.c=2 +break +case 2:q=k.e+r +k.e=q +if(q<2)throw H.e(C.br) +if(j.$1(k.d)){q=k.e +k.r=new Uint8Array(q-2)}k.c=3 +break +case 3:s=Math.min(u.gh(a)-t,k.e-k.f-2) +q=j.$1(k.d) +p=k.f +o=p+s +if(q){q=k.r +k.f=o;(q&&C.i).a_(q,p,o,a,t) +if(k.f===k.e-2){k.b.F() +a=k.r +n=a[0] +u=a[1] +q=a[2] +p=a[3] +o=a[4] +m=a[5] +if(m===3)l=C.m +else l=m===1?C.a5:C.H +m=k.a.a +if(m.a!==0)H.O(P.aM("Future already completed")) +m.ag(new Y.bC("image/jpeg",n,l,(p<<8|o)>>>0,(u<<8|q)>>>0,C.p,C.r,!1,!1)) +return}}else{k.f=o +if(o===k.e-2)k.c=255}t+=s +continue}++t}}} +Y.fM.prototype={ +$1:function(a){return(a&240)===192&&a!==196&&a!==200&&a!==204||a===222}, +$S:3} +Y.fL.prototype={ +$1:function(a){return!(a===1||(a&248)===208||a===216||a===217||a===255)}, +$S:3} +Y.i9.prototype={ +A:function(a,b){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g=this,f=new Y.ia(g) +for(u=J.K(b),t=g.dx,s=g.db,r=0,q=0;r!==u.gh(b);){p=u.i(b,r) +switch(g.y){case 0:r+=8 +g.y=1 +continue +case 1:g.c=(g.c<<8|p)>>>0 +if(++g.d===4)g.y=2 +break +case 2:o=(g.e<<8|p)>>>0 +g.e=o +if(++g.f===4){switch(o){case 1229472850:if(g.c!==13){g.b.F() +u=g.a +if(u.a.a===0)u.L(C.n) +return}g.z=!0 +break +case 1951551059:g.Q=!0 +break +case 1665684045:if(g.c!==32){g.b.F() +u=g.a +if(u.a.a===0)u.L(C.n) +return}break +case 1934772034:if(g.c!==1){g.b.F() +u=g.a +if(u.a.a===0)u.L(C.n) +return}break +case 1883789683:if(g.c!==9){g.b.F() +u=g.a +if(u.a.a===0)u.L(C.n) +return}break +case 1732332865:if(g.c!==4){g.b.F() +u=g.a +if(u.a.a===0)u.L(C.n) +return}break +case 1766015824:g.ch=C.z +g.cx=C.y +break +case 1229209940:g.b.F() +if(!g.z)g.a.L(C.bq) +u=s.buffer +u.toString +H.aR(u,0,null) +b=new DataView(u,0) +n=b.getUint32(0,!1) +m=b.getUint32(4,!1) +l=b.getUint8(8) +switch(b.getUint8(9)){case 0:k=g.Q?C.a6:C.a5 +break +case 2:case 3:k=g.Q?C.w:C.m +break +case 4:k=C.a6 +break +case 6:k=C.w +break +default:k=C.H}u=g.cx +if(u===C.p)u=g.cx=C.q +t=g.ch +if(t===C.r)t=g.ch=C.t +s=g.cy +o=g.a.a +if(o.a!==0)H.O(P.aM("Future already completed")) +o.ag(new Y.bC("image/png",l,k,n,m,u,t,s,!1)) +return}if(g.c===0)g.y=4 +else g.y=3}break +case 3:o=u.gh(b) +j=g.c +i=g.x +q=Math.min(o-r,j-i) +switch(g.e){case 1229472850:o=i+q +g.x=o +C.i.a_(s,i,o,b,r) +break +case 1665684045:case 1732332865:case 1883789683:o=i+q +g.x=o +C.i.a_(t,i,o,b,r) +break +case 1934772034:g.ch=C.t +g.cx=C.q +g.x=i+1 +break +default:g.x=i+q}if(g.x===g.c){switch(g.e){case 1665684045:if(g.cx===C.p)g.d8() +break +case 1732332865:if(g.ch===C.r)g.d9() +break +case 1883789683:o=t.buffer +o.toString +H.aR(o,0,null) +h=new DataView(o,0) +if(h.getUint32(0,!1)!==h.getUint32(4,!1))g.cy=!0 +break}g.y=4}r+=q +continue +case 4:if(++g.r===4){f.$0() +g.y=1}break}++r}}, +d9:function(){var u,t=this +if(t.ch===C.t)return +u=t.dx.buffer +u.toString +switch(H.hU(u,0,null).getUint32(0,!1)){case 45455:t.ch=C.t +break +case 1e5:t.ch=C.de +break +default:t.ch=C.z}}, +d8:function(){var u,t,s=this +if(s.cx===C.q)return +u=s.dx.buffer +u.toString +t=H.hU(u,0,null) +if(t.getUint32(0,!1)===31270&&t.getUint32(4,!1)===32900&&t.getUint32(8,!1)===64e3&&t.getUint32(12,!1)===33e3&&t.getUint32(16,!1)===3e4&&t.getUint32(20,!1)===6e4&&t.getUint32(24,!1)===15e3&&t.getUint32(28,!1)===6000)s.cx=C.q +else s.cx=C.y}} +Y.ia.prototype={ +$0:function(){var u=this.a +u.r=u.x=u.f=u.e=u.d=u.c=0}} +Y.jS.prototype={ +A:function(a,b){var u,t,s,r,q,p,o,n=this,m=J.H(b),l=n.d,k=n.c +m=l+Math.min(m,30-l) +n.d=m +C.i.cY(k,l,m,b) +m=n.d +if(m>=25)m=m<30&&k[15]!==76 +else m=!0 +if(m)return +n.b.F() +m=k.buffer +m.toString +u=H.hU(m,0,null) +if(u.getUint32(0,!1)!==1380533830||u.getUint32(8,!1)!==1464156752){n.bX(C.a7) +return}switch(u.getUint32(12,!1)){case 1448097824:t=u.getUint16(26,!0)&16383 +s=u.getUint16(28,!0)&16383 +r=C.m +q=!1 +p=!1 +break +case 1448097868:m=k[21] +l=k[22] +t=1+((m|(l&63)<<8)>>>0) +m=k[23] +k=k[24] +s=1+((l>>>6|m<<2|(k&15)<<10)>>>0) +r=(k&16)===16?C.w:C.m +q=!1 +p=!1 +break +case 1448097880:o=k[20] +p=(o&2)===2 +q=(o&32)===32 +r=(o&16)===16?C.w:C.m +t=((k[24]|k[25]<<8|k[26]<<16)>>>0)+1 +s=((k[27]|k[28]<<8|k[29]<<16)>>>0)+1 +break +default:n.bX(C.a7) +return}m=q?C.z:C.t +n.a.Z(Y.rj("image/webp",8,r,t,s,q?C.y:C.q,m,p,!1))}, +bX:function(a){var u +this.b.F() +u=this.a +if(u.a.a===0)u.L(a)}} +Y.dr.prototype={$iar:1} +Y.dp.prototype={$iar:1} +Y.as.prototype={ +k:function(a){return this.a}, +$iar:1} +N.c3.prototype={ +k:function(a){return this.b}} +N.dj.prototype={ +b7:function(){var u,t=this,s=P.d,r=P.c,q=P.V(s,r) +q.l(0,"pointer",t.a) +u=t.b +if(u!=null)q.l(0,"mimeType",u) +u=t.c +if(u!=null)q.l(0,"storage",C.bX[u.a]) +u=t.e +if(u!=null)q.l(0,"uri",u) +u=t.d +if(u!=null)q.l(0,"byteLength",u) +u=t.f +if(u==null)s=null +else{s=P.V(s,r) +s.l(0,"width",u.d) +s.l(0,"height",u.e) +r=u.c +if(r!==C.H)s.l(0,"format",C.cx[r.a]) +r=u.f +if(r!==C.p)s.l(0,"primaries",C.cq[r.a]) +r=u.r +if(r!==C.r)s.l(0,"transfer",C.cp[r.a]) +r=u.b +if(r>0)s.l(0,"bits",r)}if(s!=null)q.l(0,"image",s) +return q}} +N.ie.prototype={ +aJ:function(a){return this.e6(a)}, +e6:function(a){var u=0,t=P.cT(-1),s,r=2,q,p=[],o=this,n,m +var $async$aJ=P.cU(function(b,c){if(b===1){q=c +u=r}while(true)switch(u){case 0:r=4 +u=7 +return P.c5(o.aT(),$async$aJ) +case 7:u=8 +return P.c5(o.aU(),$async$aJ) +case 8:if(a)O.uG(o.a,o.b) +o.a.ev(o.b) +r=2 +u=6 +break +case 4:r=3 +m=q +if(H.z(m) instanceof M.bF){u=1 +break}else throw m +u=6 +break +case 3:u=2 +break +case 6:case 1:return P.cP(s,t) +case 2:return P.cO(q,t)}}) +return P.cQ($async$aJ,t)}, +aT:function(){var u=0,t=P.cT(-1),s=1,r,q=[],p=this,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2 +var $async$aT=P.cU(function(a3,a4){if(a3===1){r=a4 +u=s}while(true)switch(u){case 0:a=p.b +a0=a.c +C.d.sh(a0,0) +a0.push("buffers") +k=p.a.y,j=k.b,i=a.dy,h=[P.c],k=k.a,g=k.length,f=0 +case 2:if(!(f=g +o=e?null:k[f] +if(o==null){u=3 +break}a0.push(C.c.k(f)) +d=new N.dj(a.M()) +d.b="application/gltf-buffer" +n=new N.ig(p,d,f) +m=null +s=6 +a2=H +u=9 +return P.c5(n.$1(o),$async$aT) +case 9:m=a2.oi(a4,"$iaf") +s=1 +u=8 +break +case 6:s=5 +a1=r +e=H.z(a1) +if(!!J.m(e).$iar){l=e +a.j($.lT(),H.a([l],h),"uri")}else throw a1 +u=8 +break +case 5:u=1 +break +case 8:if(m!=null){d.d=J.H(m) +if(J.H(m)b)a.B($.oQ(),H.a([J.H(m)-b],h))}e=o +if(e.Q==null)e.Q=m}}i.push(d.b7()) +a0.pop() +case 3:++f +u=2 +break +case 4:return P.cP(null,t) +case 1:return P.cO(r,t)}}) +return P.cQ($async$aT,t)}, +aU:function(){var u=0,t=P.cT(-1),s=1,r,q=[],p=this,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3,a4,a5 +var $async$aU=P.cU(function(a7,a8){if(a7===1){r=a8 +u=s}while(true)switch(u){case 0:a3=p.b +a4=a3.c +C.d.sh(a4,0) +a4.push("images") +h=p.a.ch,g=h.b,f=a3.dy,e=[P.c],d=a3.k1,h=h.a,c=h.length,b=0 +case 2:if(!(b=c +o=a?null:h[b] +if(o==null){u=3 +break}a4.push(C.c.k(b)) +a0=new N.dj(a3.M()) +n=new N.ih(p,a0) +m=null +try{m=n.$1(o)}catch(a6){a=H.z(a6) +if(!!J.m(a).$iar){l=a +a3.j($.lT(),H.a([l],e),"uri")}else throw a6}k=null +u=m!=null?5:6 +break +case 5:s=8 +u=11 +return P.c5(Y.rl(m),$async$aU) +case 11:k=a8 +a=C.d.D(d,k.a) +if(!a)a3.B($.oU(),H.a([k.a],e)) +s=1 +u=10 +break +case 8:s=7 +a5=r +a=H.z(a5) +a2=J.m(a) +if(!!a2.$idr)a3.P($.oX()) +else if(!!a2.$idp)a3.P($.oW()) +else if(!!a2.$ias){j=a +a3.B($.oR(),H.a([j],e))}else if(!!a2.$iar){i=a +a3.j($.lT(),H.a([i],e),"uri")}else throw a5 +u=10 +break +case 7:u=1 +break +case 10:if(k!=null){a0.b=k.a +if(o.y!=null&&o.y!==k.a)a3.B($.oT(),H.a([k.a,o.y],e)) +a=k.d +if(a!==0&&(a&a-1)>>>0===0){a=k.e +a=!(a!==0&&(a&a-1)>>>0===0)}else a=!0 +if(a)a3.B($.oV(),H.a([k.d,k.e],e)) +a=k +if(a.f===C.y||a.r===C.z||k.y||k.x)a3.P($.oS()) +o.cx=k +a0.f=k}case 6:f.push(a0.b7()) +a4.pop() +case 3:++b +u=2 +break +case 4:return P.cP(null,t) +case 1:return P.cO(r,t)}}) +return P.cQ($async$aU,t)}} +N.ig.prototype={ +$1:function(a){var u,t,s,r=this +if(a.a.a===0){u=a.x +if(u!=null){t=r.b +t.c=C.aD +t.e=u.k(0) +return r.a.c.$1(u)}else{u=a.Q +if(u!=null){r.b.c=C.aC +return u}else{u=r.a +t=u.b +if(t.id&&r.c===0&&!a.z){r.b.c=C.dh +s=u.c.$0() +if(s==null)t.P($.pm()) +return s}}}}return}} +N.ih.prototype={ +$1:function(a){var u,t,s=this +if(a.a.a===0){u=a.z +if(u!=null){t=s.b +t.c=C.aD +t.e=u.k(0) +return s.a.d.$1(u)}else{u=a.Q +if(u!=null&&a.y!=null){s.b.c=C.aC +t=[P.l,P.h] +return P.mc(H.a([u],[t]),t)}else if(a.ch!=null){s.b.c=C.dg +a.er() +u=a.Q +if(u!=null){t=[P.l,P.h] +return P.mc(H.a([u],[t]),t)}}}}return}} +O.lQ.prototype={ +$2:function(a,b){var u,t,s,r,q,p,o,n,m=O.lk(b) +if((m==null?null:m.dx)!=null){m=this.a +u=m.c +C.d.sh(u,0) +u.push("accessors") +u.push(C.c.k(a)) +t=b.dx.ge0() +if(t!=null)for(u=t.length,s=b.Q,r=[P.c],q=0,p=-1,o=0;o=s)m.j($.oK(),H.a([q,n,s],r),"sparse");++q}}}} +O.lR.prototype={ +$1:function(a){return a.cx===0}} +O.lS.prototype={ +$2:function(a,b){var u,t,s,r,q,p,o,n,m,l=this,k=b.fr,j=b.cx,i=new Array(j) +i.fixed$length=Array +u=H.a(i,[[P.Z,P.h]]) +i=new Array(j) +i.fixed$length=Array +t=H.a(i,[[P.Z,P.w]]) +i=P.h +r=[i] +q=b.dx +p=0 +while(!0){if(!(pr){k=$.oH() +j=q+"/JOINTS_"+m +a.j(k,H.a([g.f,g.r,l,r,n],p),j) +continue}i=s[m].gn() +if(i!==0){if(!o.A(0,l)){k=$.oG() +j=q+"/JOINTS_"+m +a.j(k,H.a([g.f,g.r,l],p),j) +h=!1}else h=!0 +if(i<0){k=$.oM() +j=q+"/WEIGHTS_"+m +a.j(k,H.a([g.f,g.r,i],p),j)}else if(h){k=g.y +j=$.mX() +j[0]=k+i +g.y=j[0] +g.z+=2e-7}}else if(l!==0){k=$.oI() +j=q+"/JOINTS_"+m +a.j(k,H.a([g.f,g.r,l],p),j)}}if(4===++g.r){if(Math.abs(g.y-1)>g.z)for(m=0;m= "+H.b(a[2])+"."}} +E.eK.prototype={ +$1:function(a){return"Matrix element at index "+H.b(a[0])+" (component index "+H.b(a[1])+") contains invalid value: "+H.b(a[2])+"."}} +E.eQ.prototype={ +$1:function(a){return"Image data is invalid. "+H.b(a[0])}} +E.eP.prototype={ +$1:function(a){return"Recognized image format "+("'"+H.b(a[0])+"'")+" does not match declared image format "+("'"+H.b(a[1])+"'")+"."}} +E.en.prototype={ +$1:function(a){return"Unexpected end of image stream."}} +E.eo.prototype={ +$1:function(a){return"Image format not recognized."}} +E.ep.prototype={ +$1:function(a){return"'"+H.b(a[0])+"' MIME type requires an extension."}} +E.eO.prototype={ +$1:function(a){return"Image has non-power-of-two dimensions: "+H.b(a[0])+"x"+H.b(a[1])+"."}} +E.eN.prototype={ +$1:function(a){return"Image contains unsupported features like non-default colorspace information, non-square pixels, or animation."}} +E.es.prototype={ +$1:function(a){return"Data URI is used in GLB container."}} +E.eI.prototype={ +$1:function(a){return"Joints accessor element at index "+H.b(a[0])+" (component index "+H.b(a[1])+") has value "+H.b(a[2])+" that is greater than the maximum joint index ("+H.b(a[3])+") set by skin "+H.b(a[4])+"."}} +E.ex.prototype={ +$1:function(a){return"Joints accessor element at index "+H.b(a[0])+" (component index "+H.b(a[1])+") has value "+H.b(a[2])+" that is already in use for the vertex."}} +E.em.prototype={ +$1:function(a){return"Weights accessor element at index "+H.b(a[0])+" (component index "+H.b(a[1])+") has negative value "+H.b(a[2])+"."}} +E.ek.prototype={ +$1:function(a){return"Weights accessor elements (at indices "+H.b(a[0])+".."+H.b(a[1])+") have non-normalized sum: "+H.b(a[2])+"."}} +E.el.prototype={ +$1:function(a){return"Joints accessor element at index "+H.b(a[0])+" (component index "+H.b(a[1])+") is used with zero weight but has non-zero value ("+H.b(a[2])+")."}} +E.fB.prototype={} +E.fC.prototype={ +$1:function(a){return J.aa(a[0])}} +E.ik.prototype={} +E.iv.prototype={ +$1:function(a){return"Invalid array length "+H.b(a[0])+". Valid lengths are: "+J.aF(H.aW(a[1],"$it"),E.o9(),P.d).k(0)+"."}} +E.iw.prototype={ +$1:function(a){var u=a[0] +return"Type mismatch. Array element "+H.b(typeof u==="string"?"'"+u+"'":J.aa(u))+" is not a "+("'"+H.b(a[1])+"'")+"."}} +E.iB.prototype={ +$1:function(a){return"Duplicate element."}} +E.iz.prototype={ +$1:function(a){return"Index must be a non-negative integer."}} +E.it.prototype={ +$1:function(a){return"Invalid JSON data. Parser output: "+H.b(a[0])}} +E.ip.prototype={ +$1:function(a){return"Invalid URI "+("'"+H.b(a[0])+"'")+". Parser output:\n"+H.b(a[1])}} +E.ix.prototype={ +$1:function(a){return"Entity cannot be empty."}} +E.iq.prototype={ +$1:function(a){a.toString +return"Exactly one of "+new H.aw(a,E.bn(),[H.i(a,0),P.d]).k(0)+" properties must be defined."}} +E.iA.prototype={ +$1:function(a){return"Value "+("'"+H.b(a[0])+"'")+" does not match regexp pattern "+("'"+H.b(a[1])+"'")+"."}} +E.il.prototype={ +$1:function(a){var u=a[0] +return"Type mismatch. Property value "+H.b(typeof u==="string"?"'"+u+"'":J.aa(u))+" is not a "+("'"+H.b(a[1])+"'")+"."}} +E.iu.prototype={ +$1:function(a){var u=a[0] +return"Invalid value "+H.b(typeof u==="string"?"'"+u+"'":J.aa(u))+". Valid values are "+J.aF(H.aW(a[1],"$it"),E.o9(),P.d).k(0)+"."}} +E.io.prototype={ +$1:function(a){return"Value "+H.b(a[0])+" is out of range."}} +E.ir.prototype={ +$1:function(a){return"Value "+H.b(a[0])+" is not a multiple of "+H.b(a[1])+"."}} +E.im.prototype={ +$1:function(a){return"Property "+("'"+H.b(a[0])+"'")+" must be defined."}} +E.iy.prototype={ +$1:function(a){return"Unexpected property."}} +E.is.prototype={ +$1:function(a){return"Dependency failed. "+("'"+H.b(a[0])+"'")+" must be defined."}} +E.iC.prototype={} +E.j9.prototype={ +$1:function(a){return"Unknown glTF major asset version: "+H.b(a[0])+"."}} +E.j8.prototype={ +$1:function(a){return"Unknown glTF minor asset version: "+H.b(a[0])+"."}} +E.iZ.prototype={ +$1:function(a){return"Asset minVersion "+("'"+H.b(a[0])+"'")+" is greater than version "+("'"+H.b(a[1])+"'")+"."}} +E.iX.prototype={ +$1:function(a){return"Invalid value "+H.b(a[0])+" for GL type "+("'"+H.b(a[1])+"'")+"."}} +E.iY.prototype={ +$1:function(a){return"Integer value is written with fractional part: "+H.b(a[0])+"."}} +E.iW.prototype={ +$1:function(a){return"Only (u)byte and (u)short accessors can be normalized."}} +E.iU.prototype={ +$1:function(a){return"Offset "+H.b(a[0])+" is not a multiple of componentType length "+H.b(a[1])+"."}} +E.iV.prototype={ +$1:function(a){return"Matrix accessors must be aligned to 4-byte boundaries."}} +E.j4.prototype={ +$1:function(a){return"Sparse accessor overrides more elements ("+H.b(a[0])+") than the base accessor contains ("+H.b(a[1])+")."}} +E.j5.prototype={ +$1:function(a){return"Animated TRS properties will not affect a skinned mesh."}} +E.iT.prototype={ +$1:function(a){return"Buffer's Data URI MIME-Type must be 'application/octet-stream' or 'application/gltf-buffer'. Found "+("'"+H.b(a[0])+"'")+" instead."}} +E.iS.prototype={ +$1:function(a){return"Buffer view's byteStride ("+H.b(a[0])+") is greater than byteLength ("+H.b(a[1])+")."}} +E.iR.prototype={ +$1:function(a){return"Only buffer views with raw vertex data can have byteStride."}} +E.iP.prototype={ +$1:function(a){return"xmag and ymag must not be zero."}} +E.iO.prototype={ +$1:function(a){return"zfar must be greater than znear."}} +E.iM.prototype={ +$1:function(a){return"Alpha cutoff is supported only for 'MASK' alpha mode."}} +E.iG.prototype={ +$1:function(a){return"Invalid attribute name."}} +E.jj.prototype={ +$1:function(a){return"All primitives must have the same number of morph targets."}} +E.ji.prototype={ +$1:function(a){return"All primitives should contain the same number of 'JOINTS' and 'WEIGHTS' attribute sets."}} +E.iL.prototype={ +$1:function(a){return"No POSITION attribute found."}} +E.iI.prototype={ +$1:function(a){return"Indices for indexed attribute semantic "+("'"+H.b(a[0])+"'")+" must start with 0 and be continuous. Total expected indices: "+H.b(a[1])+", total provided indices: "+H.b(a[2])+"."}} +E.iK.prototype={ +$1:function(a){return"TANGENT attribute without NORMAL found."}} +E.iH.prototype={ +$1:function(a){return"Number of JOINTS attribute semantics ("+H.b(a[0])+") does not match the number of WEIGHTS ("+H.b(a[1])+")."}} +E.iJ.prototype={ +$1:function(a){return"TANGENT attribute defined for POINTS rendering mode."}} +E.jh.prototype={ +$1:function(a){return"The length of weights array ("+H.b(a[0])+") does not match the number of morph targets ("+H.b(a[1])+")."}} +E.jf.prototype={ +$1:function(a){return"A node can have either a matrix or any combination of translation/rotation/scale (TRS) properties."}} +E.jb.prototype={ +$1:function(a){return"Do not specify default transform matrix."}} +E.j0.prototype={ +$1:function(a){return"Matrix must be decomposable to TRS."}} +E.jg.prototype={ +$1:function(a){return"Rotation quaternion must be normalized."}} +E.ja.prototype={ +$1:function(a){return"Unused extension "+("'"+H.b(a[0])+"'")+" cannot be required."}} +E.jc.prototype={ +$1:function(a){return"Extension "+("'"+H.b(a[0])+"'")+" cannot be optional."}} +E.jd.prototype={ +$1:function(a){return"Extension uses unreserved extension prefix "+("'"+H.b(a[0])+"'")+"."}} +E.je.prototype={ +$1:function(a){return"Extension name has invalid format."}} +E.j3.prototype={ +$1:function(a){return"Empty node encountered."}} +E.j2.prototype={ +$1:function(a){return"Node with a skinned mesh is not root. Parent transforms will not affect a skinned mesh."}} +E.j1.prototype={ +$1:function(a){return"Local transforms will not affect a skinned mesh."}} +E.j_.prototype={ +$1:function(a){return"A node with a skinned mesh is used in a scene that does not contain joint nodes."}} +E.j7.prototype={ +$1:function(a){return"Joints do not have a common root."}} +E.j6.prototype={ +$1:function(a){return"Skeleton node is not a common root."}} +E.iN.prototype={ +$1:function(a){return"Non-relative URI found: "+("'"+H.b(a[0])+"'")+"."}} +E.iE.prototype={ +$1:function(a){return"Multiple extensions are defined for this object: "+J.aF(H.aW(a[1],"$it"),E.bn(),P.d).k(0)+"."}} +E.iD.prototype={ +$1:function(a){return"Prefer JSON Objects for extras."}} +E.iQ.prototype={ +$1:function(a){return"This property should not be defined as it will not be used."}} +E.iF.prototype={ +$1:function(a){return"outerConeAngle ("+H.b(a[1])+") is less than or equal to innerConeAngle ("+H.b(a[0])+")."}} +E.fS.prototype={} +E.hq.prototype={ +$1:function(a){return"Accessor's total byteOffset "+H.b(a[0])+" isn't a multiple of componentType length "+H.b(a[1])+"."}} +E.hu.prototype={ +$1:function(a){return"Referenced bufferView's byteStride value "+H.b(a[0])+" is less than accessor element's length "+H.b(a[1])+"."}} +E.hg.prototype={ +$1:function(a){return"Accessor (offset: "+H.b(a[0])+", length: "+H.b(a[1])+") does not fit referenced bufferView ["+H.b(a[2])+"] length "+H.b(a[3])+"."}} +E.h2.prototype={ +$1:function(a){return"Override of previously set accessor usage. Initial: "+("'"+H.b(a[0])+"'")+", new: "+("'"+H.b(a[1])+"'")+"."}} +E.hv.prototype={ +$1:function(a){return"Animation channel has the same target as channel "+H.b(a[0])+"."}} +E.fZ.prototype={ +$1:function(a){return"Animation channel cannot target TRS properties of a node with defined matrix."}} +E.fY.prototype={ +$1:function(a){return"Animation channel cannot target WEIGHTS when mesh does not have morph targets."}} +E.h0.prototype={ +$1:function(a){return"accessor.min and accessor.max must be defined for animation input accessor."}} +E.h1.prototype={ +$1:function(a){return"Invalid Animation sampler input accessor format "+("'"+H.b(a[0])+"'")+". Must be one of "+J.aF(H.aW(a[1],"$it"),E.bn(),P.d).k(0)+"."}} +E.fX.prototype={ +$1:function(a){return"Invalid animation sampler output accessor format "+("'"+H.b(a[0])+"'")+" for path "+("'"+H.b(a[2])+"'")+". Must be one of "+J.aF(H.aW(a[1],"$it"),E.bn(),P.d).k(0)+"."}} +E.h_.prototype={ +$1:function(a){return"Animation sampler output accessor with "+("'"+H.b(a[0])+"'")+" interpolation must have at least "+H.b(a[1])+" elements. Got "+H.b(a[2])+"."}} +E.fW.prototype={ +$1:function(a){return"Animation sampler output accessor of count "+H.b(a[0])+" expected. Found "+H.b(a[1])+"."}} +E.h5.prototype={ +$1:function(a){return"Buffer refers to an unresolved GLB binary chunk."}} +E.h3.prototype={ +$1:function(a){return"BufferView does not fit buffer ("+H.b(a[0])+") byteLength ("+H.b(a[1])+")."}} +E.ht.prototype={ +$1:function(a){return"Override of previously set bufferView target or usage. Initial: "+("'"+H.b(a[0])+"'")+", new: "+("'"+H.b(a[1])+"'")+"."}} +E.hm.prototype={ +$1:function(a){return"Accessor of count "+H.b(a[0])+" expected. Found "+H.b(a[1])+"."}} +E.h7.prototype={ +$1:function(a){return"Invalid accessor format "+("'"+H.b(a[0])+"'")+" for this attribute semantic. Must be one of "+J.aF(H.aW(a[1],"$it"),E.bn(),P.d).k(0)+"."}} +E.h8.prototype={ +$1:function(a){return"accessor.min and accessor.max must be defined for POSITION attribute accessor."}} +E.h4.prototype={ +$1:function(a){return"bufferView.byteStride must be defined when two or more accessors use the same buffer view."}} +E.h6.prototype={ +$1:function(a){return"Vertex attribute data must be aligned to 4-byte boundaries."}} +E.he.prototype={ +$1:function(a){return"bufferView.byteStride must not be defined for indices accessor."}} +E.hd.prototype={ +$1:function(a){return"Invalid indices accessor format "+("'"+H.b(a[0])+"'")+". Must be one of "+J.aF(H.aW(a[1],"$it"),E.bn(),P.d).k(0)+". "}} +E.hc.prototype={ +$1:function(a){return"Number of vertices or indices ("+H.b(a[0])+") is not compatible with used drawing mode ("+("'"+H.b(a[1])+"'")+")."}} +E.hb.prototype={ +$1:function(a){return"Material is incompatible with mesh primitive: Texture binding "+("'"+H.b(a[0])+"'")+" needs 'TEXCOORD_"+H.b(a[1])+"' attribute."}} +E.hf.prototype={ +$1:function(a){return"All accessors of the same primitive must have the same count."}} +E.ha.prototype={ +$1:function(a){return"No base accessor for this attribute semantic."}} +E.h9.prototype={ +$1:function(a){return"Base accessor has different count."}} +E.hs.prototype={ +$1:function(a){return"Node is a part of a node loop."}} +E.hh.prototype={ +$1:function(a){return"Value overrides parent of node "+H.b(a[0])+"."}} +E.hk.prototype={ +$1:function(a){var u="The length of weights array ("+H.b(a[0])+") does not match the number of morph targets (",t=a[1] +return u+H.b(t==null?0:t)+")."}} +E.hj.prototype={ +$1:function(a){return"Node has skin defined, but mesh has no joints data."}} +E.hi.prototype={ +$1:function(a){return"Node uses skinned mesh, but has no skin defined."}} +E.hl.prototype={ +$1:function(a){return"Node "+H.b(a[0])+" is not a root node."}} +E.hn.prototype={ +$1:function(a){return"Invalid IBM accessor format "+("'"+H.b(a[0])+"'")+". Must be one of "+J.aF(H.aW(a[1],"$it"),E.bn(),P.d).k(0)+". "}} +E.fV.prototype={ +$1:function(a){return"Invalid MIME type "+("'"+H.b(a[0])+"'")+" for the texture source. Valid MIME types are "+J.aF(H.aW(a[1],"$it"),E.bn(),P.d).k(0)+"."}} +E.fU.prototype={ +$1:function(a){return"Extension is not declared in extensionsUsed."}} +E.fT.prototype={ +$1:function(a){return"Unexpected location for this extension."}} +E.ho.prototype={ +$1:function(a){return"Unresolved reference: "+H.b(a[0])+"."}} +E.hp.prototype={ +$1:function(a){return"Cannot validate an extension as it is not supported by the validator: "+("'"+H.b(a[0])+"'")+"."}} +E.hr.prototype={ +$1:function(a){return"This object may be unused."}} +E.eT.prototype={} +E.eZ.prototype={ +$1:function(a){return"Invalid GLB magic value ("+H.b(a[0])+")."}} +E.eY.prototype={ +$1:function(a){return"Invalid GLB version value "+H.b(a[0])+"."}} +E.eX.prototype={ +$1:function(a){return"Declared GLB length ("+H.b(a[0])+") is too small."}} +E.f6.prototype={ +$1:function(a){return"Length of "+H.b(a[0])+" chunk is not aligned to 4-byte boundaries."}} +E.eV.prototype={ +$1:function(a){return"Declared length ("+H.b(a[0])+") does not match GLB length ("+H.b(a[1])+")."}} +E.f5.prototype={ +$1:function(a){return"Chunk ("+H.b(a[0])+") length ("+H.b(a[1])+") does not fit total GLB length."}} +E.f1.prototype={ +$1:function(a){return"Chunk ("+H.b(a[0])+") cannot have zero length."}} +E.f2.prototype={ +$1:function(a){return"Chunk of type "+H.b(a[0])+" has already been used."}} +E.eW.prototype={ +$1:function(a){return"Unexpected end of chunk header."}} +E.eU.prototype={ +$1:function(a){return"Unexpected end of chunk data."}} +E.f_.prototype={ +$1:function(a){return"Unexpected end of header."}} +E.f4.prototype={ +$1:function(a){return"First chunk must be of JSON type. Found "+H.b(a[0])+" instead."}} +E.f3.prototype={ +$1:function(a){return"BIN chunk must be the second chunk."}} +E.f0.prototype={ +$1:function(a){return"Unknown GLB chunk type: "+H.b(a[0])+"."}} +E.bE.prototype={ +gbG:function(){var u=J.n2(this.a.c.$1(this.e)) +return u}, +gC:function(a){return C.a.gC(this.k(0))}, +K:function(a,b){if(b==null)return!1 +return b instanceof E.bE&&b.k(0)===this.k(0)}, +k:function(a){var u=this,t=u.c +if(t!=null&&t.length!==0)return H.b(t)+": "+u.gbG() +t=u.d +if(t!=null)return"@"+H.b(t)+": "+u.gbG() +return u.gbG()}} +D.bz.prototype={ +E:function(a,b){var u=this.d,t=this.e=a.ch.i(0,u) +if(u!==-1)if(t==null)b.j($.D(),H.a([u],[P.c]),"source") +else t.c=!0}, +bR:function(a,b){var u,t=this.e +t=t==null?null:t.cx +u=t==null?null:t.a +if(u!=null&&u!=="image/webp")b.j($.mO(),H.a([u,C.cr],[P.c]),"source")}, +$icB:1} +X.b8.prototype={ +E:function(a,b){var u,t,s=b.c +s.push("lights") +u=this.d +t=J.cr(s.slice(0),H.i(s,0)) +b.y.l(0,u,t) +u.aa(new X.fR(b,a)) +s.pop()}} +X.fR.prototype={ +$2:function(a,b){var u=this.a.c +u.push(C.c.k(a)) +u.pop()}} +X.ct.prototype={} +X.bI.prototype={} +X.bJ.prototype={ +E:function(a,b){var u,t,s=a.a.i(0,"KHR_lights_punctual") +if(s instanceof X.b8){u=this.d +t=this.e=s.d.i(0,u) +if(u!==-1)if(t==null)b.j($.D(),H.a([u],[P.c]),"light") +else t.c=!0}else b.B($.ce(),H.a(["/extensions/KHR_lights_punctual"],[P.c]))}} +A.bK.prototype={ +E:function(a,b){var u,t=this.e +if(t!=null){u=b.c +u.push("diffuseTexture") +t.E(a,b) +u.pop()}t=this.x +if(t!=null){u=b.c +u.push("specularGlossinessTexture") +t.E(a,b) +u.pop()}}} +S.bL.prototype={} +L.bM.prototype={ +E:function(a,b){var u,t +for(u=b.e,t=this;t!=null;){t=u.i(0,t) +if(t instanceof Y.ax){t.dx.l(0,b.M(),this.r) +break}}}} +D.aj.prototype={} +D.a_.prototype={} +D.bA.prototype={ +gC:function(a){var u=J.ai(this.a),t=J.ai(this.b) +return A.nU(A.dJ(A.dJ(0,C.c.gC(u)),C.c.gC(t)))}, +K:function(a,b){if(b==null)return!1 +return b instanceof D.bA&&this.b==b.b&&J.a5(this.a,b.a)}} +D.cu.prototype={} +D.dk.prototype={} +A.d3.prototype={ +bM:function(){var u=this,t=u.d=u.c.bE(u.gdl(),u.gdn(),u.gc7()),s=u.dy +s.e=t.geb() +s.f=t.gee() +s.r=new A.f9(u) +return u.e.a}, +aS:function(){this.d.F() +var u=this.e +if(u.a.a===0)u.Z(new K.ac("model/gltf-binary",null,this.fx))}, +dm:function(a){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f=this,e="model/gltf-binary",d="0" +f.d.aK() +for(u=J.K(a),t=K.ac,s=[t],t=[t],r=[P.c],q=f.a,p=0,o=0;p!==u.gh(a);)switch(f.r){case 0:n=u.gh(a) +m=f.x +o=Math.min(n-p,12-m) +n=m+o +f.x=n +C.i.a_(q,m,n,a,p) +p+=o +f.y=o +if(f.x!==12)break +l=f.b.getUint32(0,!0) +if(l!==1179937895){f.f.Y($.p1(),H.a([l],r),0) +f.d.F() +u=f.e.a +if(u.a===0){t=f.fx +u.ag(new K.ac(e,null,t))}return}k=f.b.getUint32(4,!0) +if(k!==2){f.f.Y($.p2(),H.a([k],r),4) +f.d.F() +u=f.e.a +if(u.a===0){t=f.fx +u.ag(new K.ac(e,null,t))}return}n=f.z=f.b.getUint32(8,!0) +if(n<=f.y)f.f.Y($.p4(),H.a([n],r),8) +f.r=1 +f.x=0 +break +case 1:n=u.gh(a) +m=f.x +o=Math.min(n-p,8-m) +n=m+o +f.x=n +C.i.a_(q,m,n,a,p) +p+=o +f.y+=o +if(f.x!==8)break +f.ch=f.b.getUint32(0,!0) +n=f.b.getUint32(4,!0) +f.cx=n +if((f.ch&3)!==0){m=f.f +j=$.oY() +i=f.y +m.Y(j,H.a(["0x"+C.a.ak(C.c.X(n,16),8,d)],r),i-8)}if(f.y+f.ch>f.z)f.f.Y($.oZ(),H.a(["0x"+C.a.ak(C.c.X(f.cx,16),8,d),f.ch],r),f.y-8) +if(f.Q===0&&f.cx!==1313821514)f.f.Y($.p9(),H.a(["0x"+C.a.ak(C.c.X(f.cx,16),8,d)],r),f.y-8) +n=f.cx +if(n===5130562&&f.Q>1&&!f.fr)f.f.Y($.p5(),H.a(["0x"+C.a.ak(C.c.X(n,16),8,d)],r),f.y-8) +h=new A.f7(f) +n=f.cx +switch(n){case 1313821514:if(f.ch===0){m=f.f +j=$.p0() +i=f.y +m.Y(j,H.a(["0x"+C.a.ak(C.c.X(n,16),8,d)],r),i-8)}h.$1$seen(f.cy) +f.cy=!0 +break +case 5130562:h.$1$seen(f.fr) +f.fr=!0 +break +default:f.f.Y($.pa(),H.a(["0x"+C.a.ak(C.c.X(n,16),8,d)],r),f.y-8) +f.r=4294967295}++f.Q +f.x=0 +break +case 1313821514:o=Math.min(u.gh(a)-p,f.ch-f.x) +if(f.db==null){n=f.dy +m=f.f +n=new K.cp(new P.bi(n,[H.i(n,0)]),new P.aN(new P.E($.p,s),t)) +n.e=m +f.db=n +f.dx=n.bM()}n=f.dy +g=p+o +m=u.T(a,p,g) +if(n.b>=4)H.O(n.bg()) +j=n.b +if((j&1)!==0)n.ai(m) +else if((j&3)===0){n=n.aQ() +m=new P.c_(m) +j=n.c +if(j==null)n.b=n.c=m +else{j.sau(m) +n.c=m}}n=f.x+=o +f.y+=o +if(n===f.ch){f.dy.a1() +f.r=1 +f.x=0}p=g +break +case 5130562:n=u.gh(a) +m=f.ch +o=Math.min(n-p,m-f.x) +n=f.fx +if(n==null)n=f.fx=new Uint8Array(m) +m=f.x +j=m+o +f.x=j +C.i.a_(n,m,j,a,p) +p+=o +f.y+=o +if(f.x===f.ch){f.r=1 +f.x=0}break +case 4294967295:n=u.gh(a) +m=f.ch +j=f.x +o=Math.min(n-p,m-j) +j+=o +f.x=j +p+=o +f.y+=o +if(j===m){f.r=1 +f.x=0}break}f.d.al()}, +dq:function(){var u,t,s=this +switch(s.r){case 0:s.f.bu($.p8(),s.y) +s.aS() +break +case 1:if(s.x!==0){s.f.bu($.p7(),s.y) +s.aS()}else{u=s.z +t=s.y +if(u!==t)s.f.Y($.p3(),H.a([u,t],[P.c]),s.y) +u=s.dx +if(u!=null)u.am(0,new A.f8(s),s.gc7(),P.A) +else s.e.Z(new K.ac("model/gltf-binary",null,s.fx))}break +default:if(s.ch>0)s.f.bu($.p6(),s.y) +s.aS()}}, +dr:function(a){var u +this.d.F() +u=this.e +if(u.a.a===0)u.L(a)}, +$icq:1} +A.f9.prototype={ +$0:function(){var u=this.a +if((u.dy.b&4)!==0)u.d.al() +else u.aS()}} +A.f7.prototype={ +$1$seen:function(a){var u=this.a +if(a){u.f.Y($.p_(),H.a(["0x"+C.a.ak(C.c.X(u.cx,16),8,"0")],[P.c]),u.y-8) +u.r=4294967295}else u.r=u.cx}, +$0:function(){return this.$1$seen(null)}} +A.f8.prototype={ +$1:function(a){var u=this.a,t=a==null?null:a.b +u.e.Z(new K.ac("model/gltf-binary",t,u.fx))}} +K.ac.prototype={} +K.cq.prototype={} +K.fe.prototype={ +$0:function(){return this.a.b.aK()}} +K.ff.prototype={ +$0:function(){return this.a.b.al()}} +K.fd.prototype={ +$0:function(){return this.a.b.F()}} +K.fg.prototype={ +$1:function(a){var u,t,s,r,q,p=this,o=null,n=p.a +if(!n.a){u=J.K(a) +if(u.gt(a)){n.b.F() +p.b.a1() +p.c.L(C.a_) +return}t=u.i(a,0) +if(103===t){u=p.b +s=p.d +r=new Uint8Array(12) +q=K.ac +q=new A.d3(r,new P.bi(u,[H.i(u,0)]),new P.aN(new P.E($.p,[q]),[q])) +s.id=!0 +q.f=s +u=r.buffer +u.toString +q.b=H.hU(u,0,o) +q.dy=P.nz(o,o,o,[P.l,P.h]) +p.c.Z(q) +n.a=!0}else{u=123===t||9===t||32===t||10===t||13===t||239===t +s=p.c +r=p.b +if(u){s.Z(K.rg(new P.bi(r,[H.i(r,0)]),p.d)) +n.a=!0}else{n.b.F() +r.a1() +s.L(C.a_) +return}}}p.b.A(0,a)}} +K.cp.prototype={ +bM:function(){var u=this,t=P.c,s=H.a([],[t]),r=new P.N("") +u.d=new P.l5(new P.dH(!1,r),new P.kH(C.a2.gct().a,new P.kT(new K.fb(u),s,[t]),r)) +u.b=u.a.bE(u.gdu(),u.gdw(),u.gdA()) +return u.c.a}, +dv:function(a){var u,t,s,r,q=this +q.b.aK() +if(q.f){t=J.K(a) +if(t.ga2(a)&&239===t.i(a,0))q.e.ar($.dR(),H.a(["BOM found at the beginning of UTF-8 stream."],[P.c]),!0) +q.f=!1}try{t=q.d +s=J.H(a) +t.a.cs(a,0,s) +q.b.al()}catch(r){t=H.z(r) +if(t instanceof P.ak){u=t +q.e.ar($.dR(),H.a([u],[P.c]),!0) +q.b.F() +q.c.b_()}else throw r}}, +dB:function(a){var u +this.b.F() +u=this.c +if(u.a.a===0)u.L(a)}, +dz:function(){var u,t,s,r=this +try{r.d.a1()}catch(t){s=H.z(t) +if(s instanceof P.ak){u=s +r.e.ar($.dR(),H.a([u],[P.c]),!0) +r.b.F() +r.c.b_()}else throw t}}, +$icq:1} +K.fb.prototype={ +$1:function(a){var u,t,s=a[0],r=s,q=P.c +if(H.a2(r,"$if",[P.d,q],"$af"))try{r=this.a +u=V.nc(s,r.e) +r.c.Z(new K.ac("model/gltf+json",u,null))}catch(t){if(H.z(t) instanceof M.bF){r=this.a +r.b.F() +r.c.b_()}else throw t}else{r=this.a +r.e.ar($.P(),H.a([s,"object"],[q]),!0) +r.b.F() +r.c.b_()}}} +K.d5.prototype={ +k:function(a){return"Invalid data: could not detect glTF format."}, +$iar:1} +F.lr.prototype={ +$2:function(a,b){this.a.$1(a) +if(!(typeof b==="number"&&Math.floor(b)===b&&b>=0)){this.b.l(0,a,-1) +this.c.p($.dQ(),a)}}} +F.ls.prototype={ +$2:function(a,b){this.a.$1(a) +if(!(typeof b==="number"&&Math.floor(b)===b&&b>=0)){this.b.l(0,a,-1) +this.c.p($.dQ(),a)}}} +F.lt.prototype={ +$1:function(a){return a.ae(0,P.d,P.h)}} +F.lq.prototype={ +$0:function(){return H.a([],[D.cu])}} +F.ae.prototype={ +i:function(a,b){return b==null||b<0||b>=this.a.length?null:this.a[b]}, +l:function(a,b,c){this.a[b]=c}, +gh:function(a){return this.b}, +sh:function(a,b){throw H.e(P.W("Changing length is not supported"))}, +k:function(a){return P.fF(this.a,"[","]")}, +aa:function(a){var u,t,s,r +for(u=this.b,t=this.a,s=0;s0.00674)a.j($.mG(),H.a([b-2,b,Math.sqrt(u.a)],[P.c]),u.b) +u.a=0}return!0}, +$aY:function(){return[P.G]}} +F.jD.prototype={ +W:function(a,b,c,d){var u=this,t=u.c,s=t!=null?t.$1(d):d +if(3===c){if(1!==s&&-1!==s)a.j($.oF(),H.a([b-3,b,s],[P.c]),u.b)}else{t=u.a+s*s +u.a=t +if(2===c){if(Math.abs(Math.sqrt(t)-1)>0.00674)a.j($.mG(),H.a([b-2,b,Math.sqrt(u.a)],[P.c]),u.b) +u.a=0}}return!0}, +$aY:function(){return[P.G]}} +F.e4.prototype={ +W:function(a,b,c,d){if(1d)a.j($.oJ(),H.a([b,d],[P.c]),this.a) +return!0}, +$aY:function(){return[P.w]}} +A.jP.prototype={ +b7:function(){var u,t,s,r,q,p,o,n,m,l,k,j,i=this,h=P.d,g=P.c,f=P.V(h,g),e=i.a +if(e!=null)f.l(0,"uri",e.k(0)) +e=i.c +u=e==null +if((u?null:e.a)!=null)f.l(0,"mimeType",u?null:e.a) +f.l(0,"validatorVersion","2.0.0-dev.3.2") +if(i.d)f.l(0,"validatedAt",new P.cm(Date.now(),!1).eo().en()) +e=i.b +t=e.fy +s=P.V(h,g) +r=H.a([0,0,0,0],[P.h]) +u=new Array(t.length) +u.fixed$length=Array +q=H.a(u,[[P.f,P.d,P.c]]) +for(u=q.length,p=0;p>>6}} +T.bO.prototype={ +cX:function(a){var u=a.a,t=this.a +t[15]=u[15] +t[14]=u[14] +t[13]=u[13] +t[12]=u[12] +t[11]=u[11] +t[10]=u[10] +t[9]=u[9] +t[8]=u[8] +t[7]=u[7] +t[6]=u[6] +t[5]=u[5] +t[4]=u[4] +t[3]=u[3] +t[2]=u[2] +t[1]=u[1] +t[0]=u[0]}, +k:function(a){var u=this +return"[0] "+u.aL(0).k(0)+"\n[1] "+u.aL(1).k(0)+"\n[2] "+u.aL(2).k(0)+"\n[3] "+u.aL(3).k(0)+"\n"}, +K:function(a,b){var u,t,s +if(b==null)return!1 +if(b instanceof T.bO){u=this.a +t=u[0] +s=b.a +u=t===s[0]&&u[1]===s[1]&&u[2]===s[2]&&u[3]===s[3]&&u[4]===s[4]&&u[5]===s[5]&&u[6]===s[6]&&u[7]===s[7]&&u[8]===s[8]&&u[9]===s[9]&&u[10]===s[10]&&u[11]===s[11]&&u[12]===s[12]&&u[13]===s[13]&&u[14]===s[14]&&u[15]===s[15]}else u=!1 +return u}, +gC:function(a){return A.mu(this.a)}, +aL:function(a){var u=new Float32Array(4),t=this.a +u[0]=t[a] +u[1]=t[4+a] +u[2]=t[8+a] +u[3]=t[12+a] +return new T.ds(u)}, +cu:function(){var u=this.a,t=u[0],s=u[5],r=u[1],q=u[4],p=t*s-r*q,o=u[6],n=u[2],m=t*o-n*q,l=u[7],k=u[3],j=t*l-k*q,i=r*o-n*s,h=r*l-k*s,g=n*l-k*o +o=u[8] +k=u[9] +l=u[10] +n=u[11] +return-(k*g-l*h+n*i)*u[12]+(o*g-l*j+n*m)*u[13]-(o*h-k*j+n*p)*u[14]+(o*i-k*m+l*p)*u[15]}, +cD:function(){var u=this.a,t=0+Math.abs(u[0])+Math.abs(u[1])+Math.abs(u[2])+Math.abs(u[3]),s=t>0?t:0 +t=0+Math.abs(u[4])+Math.abs(u[5])+Math.abs(u[6])+Math.abs(u[7]) +if(t>s)s=t +t=0+Math.abs(u[8])+Math.abs(u[9])+Math.abs(u[10])+Math.abs(u[11]) +if(t>s)s=t +t=0+Math.abs(u[12])+Math.abs(u[13])+Math.abs(u[14])+Math.abs(u[15]) +return t>s?t:s}, +cE:function(){var u=this.a +return u[0]===1&&u[1]===0&&u[2]===0&&u[3]===0&&u[4]===0&&u[5]===1&&u[6]===0&&u[7]===0&&u[8]===0&&u[9]===0&&u[10]===1&&u[11]===0&&u[12]===0&&u[13]===0&&u[14]===0&&u[15]===1}} +T.di.prototype={ +gaI:function(){var u=this.a,t=u[0],s=u[1],r=u[2],q=u[3] +return t*t+s*s+r*r+q*q}, +gh:function(a){var u=this.a,t=u[0],s=u[1],r=u[2],q=u[3] +return Math.sqrt(t*t+s*s+r*r+q*q)}, +k:function(a){var u=this.a +return H.b(u[0])+", "+H.b(u[1])+", "+H.b(u[2])+" @ "+H.b(u[3])}} +T.bh.prototype={ +be:function(a,b,c){var u=this.a +u[0]=a +u[1]=b +u[2]=c}, +k:function(a){var u=this.a +return"["+H.b(u[0])+","+H.b(u[1])+","+H.b(u[2])+"]"}, +K:function(a,b){var u,t,s +if(b==null)return!1 +if(b instanceof T.bh){u=this.a +t=u[0] +s=b.a +u=t===s[0]&&u[1]===s[1]&&u[2]===s[2]}else u=!1 +return u}, +gC:function(a){return A.mu(this.a)}, +gh:function(a){var u=this.a,t=u[0],s=u[1] +u=u[2] +return Math.sqrt(t*t+s*s+u*u)}, +gaI:function(){var u=this.a,t=u[0],s=u[1] +u=u[2] +return t*t+s*s+u*u}} +T.ds.prototype={ +k:function(a){var u=this.a +return H.b(u[0])+","+H.b(u[1])+","+H.b(u[2])+","+H.b(u[3])}, +K:function(a,b){var u,t,s +if(b==null)return!1 +if(b instanceof T.ds){u=this.a +t=u[0] +s=b.a +u=t===s[0]&&u[1]===s[1]&&u[2]===s[2]&&u[3]===s[3]}else u=!1 +return u}, +gC:function(a){return A.mu(this.a)}, +gh:function(a){var u=this.a,t=u[0],s=u[1],r=u[2] +u=u[3] +return Math.sqrt(t*t+s*s+r*r+u*u)}} +Q.dh.prototype={} +Q.m2.prototype={} +Q.dy.prototype={} +Q.lN.prototype={ +$3:function(a,b,c){var u=c.$1(J.aa(a)) +return u}} +Q.lJ.prototype={ +$2:function(a,b){var u=P.bm(new Q.lI(a,b,this.a)) +return new self.Promise(u)}, +$C:"$2", +$R:2} +Q.lI.prototype={ +$2:function(a,b){Q.dN(this.a,this.b).am(0,new Q.lF(a),new Q.lG(this.c,b),P.A)}, +$C:"$2", +$R:2} +Q.lF.prototype={ +$1:function(a){this.a.$1(P.mw(a))}} +Q.lG.prototype={ +$2:function(a,b){return this.a.$3(a,b,this.b)}, +$C:"$2", +$R:2, +$S:11} +Q.lK.prototype={ +$2:function(a,b){var u=P.bm(new Q.lH(a,b,this.a)) +return new self.Promise(u)}, +$C:"$2", +$R:2} +Q.lH.prototype={ +$2:function(a,b){Q.mA(this.a,this.b).am(0,new Q.lD(a),new Q.lE(this.c,b),P.A)}, +$C:"$2", +$R:2} +Q.lD.prototype={ +$1:function(a){this.a.$1(P.mw(a))}} +Q.lE.prototype={ +$2:function(a,b){return this.a.$3(a,b,this.b)}, +$C:"$2", +$R:2, +$S:11} +Q.lL.prototype={ +$0:function(){return"2.0.0-dev.3.2"}, +$C:"$0", +$R:0} +Q.lM.prototype={ +$0:function(){return P.mw(M.rc())}, +$C:"$0", +$R:0} +Q.lh.prototype={ +$1:function(a){var u=P.af,t=new P.E($.p,[u]),s=new P.aN(t,[u]) +J.qR(this.a.$1(J.aa(a)),P.bm(new Q.li(s)),P.bm(new Q.lj(s))) +return t}} +Q.li.prototype={ +$1:function(a){var u=this.a +if(!!J.m(a).$iaf)u.Z(a) +else u.L(new P.ab(!1,null,null,"options.externalResourceFunction: Promise must be fulfilled with Uint8Array."))}, +$S:6} +Q.lj.prototype={ +$1:function(a){return this.a.L(new Q.i2(J.aa(a)))}, +$S:5} +Q.lf.prototype={ +$1:function(a){if(a==null)return this.a.c +return this.b.$1(a)}, +$0:function(){return this.$1(null)}, +$C:"$1", +$R:0, +$D:function(){return[null]}} +Q.lg.prototype={ +$1:function(a){var u=this.a.$1(a) +return u==null?null:P.rU(u,H.i(u,0))}} +Q.i2.prototype={ +k:function(a){return"Node Exception: "+H.b(this.a)}, +$iar:1};(function aliases(){var u=J.bD.prototype +u.cZ=u.b6 +u=J.da.prototype +u.d_=u.k +u=P.J.prototype +u.d0=u.a_ +u=P.dD.prototype +u.d1=u.a1})();(function installTearOffs(){var u=hunkHelpers._static_1,t=hunkHelpers._static_0,s=hunkHelpers.installStaticTearOff,r=hunkHelpers.installInstanceTearOff,q=hunkHelpers._instance_0u,p=hunkHelpers._instance_1i,o=hunkHelpers._static_2,n=hunkHelpers._instance_1u +u(P,"tT","t4",1) +u(P,"tU","t5",1) +u(P,"tV","t6",1) +t(P,"o7","tJ",0) +s(P,"tW",1,null,["$2","$1"],["nX",function(a){return P.nX(a,null)}],13,0) +r(P.E.prototype,"gdc",0,1,function(){return[null]},["$2","$1"],["ao","dd"],13,0) +q(P.dB.prototype,"gdQ","a1",48) +var m +q(m=P.dw.prototype,"gcc","aV",0) +q(m,"gcd","aW",0) +r(m=P.cF.prototype,"geb",0,0,null,["$1","$0"],["cK","aK"],47,0) +q(m,"gee","al",0) +q(m,"gcc","aV",0) +q(m,"gcd","aW",0) +p(P.c2.prototype,"gcq","D",21) +o(M,"tP","qW",23) +o(M,"tO","qV",24) +o(M,"tM","qT",25) +o(M,"tN","qU",26) +n(M.Q.prototype,"gbI","ea",15) +o(Z,"tR","qY",27) +o(Z,"tQ","qX",28) +o(T,"tS","r_",29) +o(Q,"tX","r1",30) +o(V,"tY","r0",31) +o(G,"u0","r4",32) +o(G,"tZ","r2",33) +o(G,"u_","r3",34) +o(T,"uc","rm",35) +o(Y,"ur","rz",55) +o(Y,"uu","rI",37) +o(Y,"ut","rH",38) +o(Y,"us","rG",39) +o(Y,"dL","rW",40) +o(S,"uv","rC",41) +o(V,"ux","rF",42) +o(T,"uy","rR",43) +o(B,"uz","rS",44) +o(O,"uA","rT",45) +o(U,"uC","rX",46) +u(E,"bn","tG",10) +u(E,"o9","tD",10) +u(D,"u5","tA",9) +o(D,"u4","rf",49) +o(X,"ui","rs",50) +o(X,"uj","rt",51) +o(X,"uk","ru",52) +o(A,"ul","rv",53) +o(S,"um","rw",54) +o(L,"uo","rx",36) +n(m=A.d3.prototype,"gdl","dm",12) +q(m,"gdn","dq",0) +n(m,"gc7","dr",5) +n(m=K.cp.prototype,"gdu","dv",12) +n(m,"gdA","dB",5) +q(m,"gdw","dz",0) +u(U,"un","tB",9)})();(function inheritance(){var u=hunkHelpers.mixin,t=hunkHelpers.inherit,s=hunkHelpers.inheritMany +t(P.c,null) +s(P.c,[H.m5,J.bD,J.bu,P.t,H.e1,P.a7,H.ck,P.dz,H.aJ,P.Z,H.eR,H.d2,H.jF,H.cD,P.hD,H.e7,H.fH,H.jz,P.b3,H.co,H.dA,H.dn,H.hw,H.hx,H.fJ,H.kM,P.l0,P.k4,P.c1,P.bj,P.R,P.kf,P.cH,P.E,P.du,P.jn,P.jo,P.dB,P.l_,P.k9,P.cF,P.kN,P.kj,P.ki,P.kY,P.bw,P.l6,P.kD,P.kS,P.kK,P.kL,P.J,P.l2,P.jv,P.e5,P.ka,P.e3,P.dH,P.aT,P.cm,P.G,P.i7,P.dm,P.kl,P.ak,P.bB,P.l,P.f,P.cv,P.A,P.a1,P.d,P.N,P.me,P.bV,P.ah,P.bY,P.dG,P.jH,P.kU,P.af,V.fc,F.Y,V.cB,V.b0,V.aY,V.k,M.jO,M.j,M.bF,Y.cI,Y.cG,Y.bZ,Y.b4,Y.bC,Y.ft,Y.dr,Y.dp,Y.as,N.c3,N.dj,N.ie,O.d7,E.aL,E.fD,E.bE,D.aj,D.a_,D.bA,D.cu,D.dk,A.d3,K.ac,K.cq,K.cp,K.d5,A.jP,T.bO,T.di,T.bh,T.ds,Q.i2]) +s(J.bD,[J.d8,J.fI,J.da,J.b6,J.cs,J.bG,H.cz]) +s(J.da,[J.i8,J.bW,J.b7,Q.dh,Q.m2,Q.dy]) +t(J.m4,J.b6) +s(J.cs,[J.d9,J.fG]) +s(P.t,[H.kd,H.B,H.cw,H.mh,H.cC,H.kg,P.fE]) +s(H.kd,[H.cY,H.dI]) +t(H.kk,H.cY) +t(H.ke,H.dI) +t(H.cj,H.ke) +t(P.hA,P.a7) +s(P.hA,[H.cZ,H.bH,P.kB,P.kI]) +s(H.ck,[H.e2,H.ib,H.lP,H.jy,H.fN,H.lz,H.lA,H.lB,P.k6,P.k5,P.k7,P.k8,P.l1,P.l7,P.l8,P.ln,P.km,P.ku,P.kq,P.kr,P.ks,P.ko,P.kt,P.kn,P.kx,P.ky,P.kw,P.kv,P.jp,P.jq,P.jr,P.js,P.jt,P.kW,P.kV,P.kc,P.kb,P.kO,P.ll,P.kR,P.kQ,P.hB,P.hC,P.i1,P.jJ,P.jK,P.jL,P.l4,P.lc,P.lb,P.ld,P.le,P.l9,M.k0,M.k1,M.k2,M.k3,M.jZ,M.k_,M.jU,M.jV,M.jW,M.jX,Z.dU,Z.dV,V.fn,V.fo,V.fp,V.fl,V.fm,V.fj,V.fk,V.fh,V.fi,V.fq,V.fr,Y.hF,S.hR,S.hI,S.hJ,S.hK,S.hM,S.hN,S.hO,S.hP,S.hQ,S.hL,V.i3,V.i4,V.i5,B.ij,O.jk,M.ea,M.e9,M.eb,M.ee,M.ef,M.ec,M.ed,M.eg,Y.fv,Y.fx,Y.fw,Y.fu,Y.fM,Y.fL,Y.ia,N.ig,N.ih,O.lQ,O.lR,O.lS,O.lm,E.et,E.er,E.eq,E.ey,E.ev,E.ew,E.eu,E.eH,E.eJ,E.eA,E.eG,E.ez,E.eF,E.eD,E.eE,E.eC,E.eB,E.eM,E.eL,E.eK,E.eQ,E.eP,E.en,E.eo,E.ep,E.eO,E.eN,E.es,E.eI,E.ex,E.em,E.ek,E.el,E.fC,E.iv,E.iw,E.iB,E.iz,E.it,E.ip,E.ix,E.iq,E.iA,E.il,E.iu,E.io,E.ir,E.im,E.iy,E.is,E.j9,E.j8,E.iZ,E.iX,E.iY,E.iW,E.iU,E.iV,E.j4,E.j5,E.iT,E.iS,E.iR,E.iP,E.iO,E.iM,E.iG,E.jj,E.ji,E.iL,E.iI,E.iK,E.iH,E.iJ,E.jh,E.jf,E.jb,E.j0,E.jg,E.ja,E.jc,E.jd,E.je,E.j3,E.j2,E.j1,E.j_,E.j7,E.j6,E.iN,E.iE,E.iD,E.iQ,E.iF,E.hq,E.hu,E.hg,E.h2,E.hv,E.fZ,E.fY,E.h0,E.h1,E.fX,E.h_,E.fW,E.h5,E.h3,E.ht,E.hm,E.h7,E.h8,E.h4,E.h6,E.he,E.hd,E.hc,E.hb,E.hf,E.ha,E.h9,E.hs,E.hh,E.hk,E.hj,E.hi,E.hl,E.hn,E.fV,E.fU,E.fT,E.ho,E.hp,E.hr,E.eZ,E.eY,E.eX,E.f6,E.eV,E.f5,E.f1,E.f2,E.eW,E.eU,E.f_,E.f4,E.f3,E.f0,X.fR,A.f9,A.f7,A.f8,K.fe,K.ff,K.fd,K.fg,K.fb,F.lr,F.ls,F.lt,F.lq,A.jR,A.jQ,A.lx,Q.lN,Q.lJ,Q.lI,Q.lF,Q.lG,Q.lK,Q.lH,Q.lD,Q.lE,Q.lL,Q.lM,Q.lh,Q.li,Q.lj,Q.lf,Q.lg]) +t(P.hy,P.dz) +s(P.hy,[H.dq,F.ae]) +s(H.dq,[H.cl,P.bX]) +s(H.B,[H.av,H.d1,H.b9,P.kC,P.dl]) +s(H.av,[H.jw,H.aw,P.kJ,P.kA]) +t(H.d_,H.cw) +s(P.Z,[H.bN,H.dt,H.jl]) +t(H.d0,H.cC) +t(P.dF,P.hD) +t(P.cE,P.dF) +t(H.e8,P.cE) +s(H.e7,[H.b2,H.aI]) +s(P.b3,[H.i6,H.fO,H.jE,H.e0,H.ii,P.cA,P.ab,P.i0,P.jG,P.jB,P.be,P.e6,P.ei]) +s(H.jy,[H.jm,H.ch]) +t(H.dc,H.cz) +s(H.dc,[H.cJ,H.cL]) +t(H.cK,H.cJ) +t(H.dd,H.cK) +t(H.cM,H.cL) +t(H.cy,H.cM) +s(H.dd,[H.db,H.hV]) +s(H.cy,[H.hW,H.hX,H.hY,H.hZ,H.i_,H.de,H.bP]) +t(P.kZ,P.fE) +t(P.aN,P.kf) +s(P.dB,[P.dv,P.dE]) +t(P.kX,P.jn) +s(P.kX,[P.bi,P.kz]) +t(P.dw,P.cF) +s(P.kN,[P.kF,P.dC]) +s(P.kj,[P.c_,P.dx]) +t(P.kP,P.l6) +t(P.kE,P.kB) +s(P.kS,[P.c2,P.l3]) +t(P.ju,P.jv) +t(P.dD,P.ju) +t(P.kH,P.dD) +s(P.e5,[P.dW,P.eS,P.fP]) +t(P.eh,P.jo) +s(P.eh,[P.dY,P.dX,P.fQ,P.jN]) +s(P.e3,[P.e_,P.kT]) +t(P.l5,P.e_) +t(P.jM,P.eS) +s(P.G,[P.w,P.h]) +s(P.ab,[P.bU,P.fz]) +t(P.kh,P.dG) +s(V.fc,[V.fa,M.bq,M.br,M.bs,Z.cf,Z.bt,Z.cg,T.bv,G.bx,G.by,V.d4,Y.bS,Y.bg,S.cx,D.bz,X.b8,X.bI,X.bJ,A.bK,S.bL,L.bM]) +s(V.fa,[M.Q,Z.aZ,Q.b_,V.aH,G.b1,T.b5,Y.ax,S.ba,V.ad,T.bc,B.aK,O.bd,U.bf,X.ct]) +s(M.Q,[M.jY,M.jT]) +s(F.Y,[M.fA,M.hS,M.hG,M.hT,M.hH,Z.dT,Z.ic,S.fy,O.fs,F.jC,F.jD,F.e4]) +s(Y.bg,[Y.bR,Y.bQ]) +s(Y.ft,[Y.fK,Y.i9,Y.jS]) +s(E.fD,[E.ej,E.fB,E.ik,E.iC,E.fS,E.eT]) +u(H.dq,H.jF) +u(H.dI,P.J) +u(H.cJ,P.J) +u(H.cK,H.d2) +u(H.cL,P.J) +u(H.cM,H.d2) +u(P.dv,P.k9) +u(P.dE,P.l_) +u(P.dz,P.J) +u(P.dF,P.l2)})() +var v={mangledGlobalNames:{h:"int",w:"double",G:"num",d:"String",aT:"bool",A:"Null",l:"List"},mangledNames:{},getTypeFromName:getGlobalFromName,metadata:[],types:[{func:1,ret:-1},{func:1,ret:-1,args:[{func:1,ret:-1}]},{func:1,ret:P.w,args:[P.h]},{func:1,ret:P.aT,args:[P.h]},{func:1,args:[,]},{func:1,ret:-1,args:[P.c]},{func:1,ret:P.A,args:[P.c]},{func:1,ret:P.A,args:[,,]},{func:1,ret:P.A,args:[,]},{func:1,ret:-1,args:[M.j]},{func:1,ret:P.d,args:[P.c]},{func:1,ret:-1,args:[P.c,P.a1]},{func:1,ret:-1,args:[[P.l,P.h]]},{func:1,ret:-1,args:[P.c],opt:[P.a1]},{func:1,ret:P.h,args:[P.h]},{func:1,ret:P.w,args:[P.G]},{func:1,ret:-1,args:[,]},{func:1,ret:P.A,args:[,P.a1]},{func:1,ret:P.af,args:[,,]},{func:1,ret:P.af,args:[P.h]},{func:1,ret:P.A,args:[,],opt:[P.a1]},{func:1,ret:P.aT,args:[P.c]},{func:1,ret:[P.E,,],args:[,]},{func:1,ret:[M.Q,P.G],args:[[P.f,P.d,P.c],M.j]},{func:1,ret:M.bq,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:M.br,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:M.bs,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:Z.aZ,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:Z.bt,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:T.bv,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:Q.b_,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:V.aH,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:G.b1,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:G.bx,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:G.by,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:T.b5,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:L.bM,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:Y.bS,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:Y.bR,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:Y.bQ,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:Y.bg,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:S.ba,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:V.ad,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:T.bc,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:B.aK,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:O.bd,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:U.bf,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:-1,opt:[[P.R,,]]},{func:1,ret:[P.R,,]},{func:1,ret:D.bz,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:X.b8,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:X.bI,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:X.bJ,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:A.bK,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:S.bL,args:[[P.f,P.d,P.c],M.j]},{func:1,ret:Y.ax,args:[[P.f,P.d,P.c],M.j]}],interceptorsByTag:null,leafTags:null};(function constants(){var u=hunkHelpers.makeConstList +C.bp=J.bD.prototype +C.d=J.b6.prototype +C.bt=J.d8.prototype +C.c=J.d9.prototype +C.bu=J.cs.prototype +C.a=J.bG.prototype +C.bv=J.b7.prototype +C.cP=H.db.prototype +C.i=H.bP.prototype +C.ao=J.i8.prototype +C.O=J.bW.prototype +C.P=new V.k("MAT4",5126,!1) +C.A=new V.k("SCALAR",5126,!1) +C.aO=new V.k("VEC2",5121,!0) +C.aS=new V.k("VEC2",5123,!0) +C.aT=new V.k("VEC2",5126,!1) +C.R=new V.k("VEC3",5121,!0) +C.T=new V.k("VEC3",5123,!0) +C.j=new V.k("VEC3",5126,!1) +C.aW=new V.k("VEC4",5121,!1) +C.D=new V.k("VEC4",5121,!0) +C.aX=new V.k("VEC4",5123,!1) +C.E=new V.k("VEC4",5123,!0) +C.u=new V.k("VEC4",5126,!1) +C.aY=new V.aY("AnimationInput") +C.aZ=new V.aY("AnimationOutput") +C.b_=new V.aY("IBM") +C.b0=new V.aY("PrimitiveIndices") +C.W=new V.aY("VertexAttribute") +C.b1=new V.b0("IBM") +C.b2=new V.b0("Image") +C.X=new V.b0("IndexBuffer") +C.v=new V.b0("Other") +C.Y=new V.b0("VertexBuffer") +C.di=new P.dY() +C.b3=new P.dW() +C.b4=new P.dX() +C.Z=new H.eR([P.A]) +C.a_=new K.d5() +C.b5=new M.bF() +C.a0=function getTagFallback(o) { + var s = Object.prototype.toString.call(o); + return s.substring(8, s.length - 1); +} +C.b6=function() { + var toStringFunction = Object.prototype.toString; + function getTag(o) { + var s = toStringFunction.call(o); + return s.substring(8, s.length - 1); + } + function getUnknownTag(object, tag) { + if (/^HTML[A-Z].*Element$/.test(tag)) { + var name = toStringFunction.call(object); + if (name == "[object Object]") return null; + return "HTMLElement"; + } + } + function getUnknownTagGenericBrowser(object, tag) { + if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement"; + return getUnknownTag(object, tag); + } + function prototypeForTag(tag) { + if (typeof window == "undefined") return null; + if (typeof window[tag] == "undefined") return null; + var constructor = window[tag]; + if (typeof constructor != "function") return null; + return constructor.prototype; + } + function discriminator(tag) { return null; } + var isBrowser = typeof navigator == "object"; + return { + getTag: getTag, + getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, + prototypeForTag: prototypeForTag, + discriminator: discriminator }; +} +C.bb=function(getTagFallback) { + return function(hooks) { + if (typeof navigator != "object") return hooks; + var ua = navigator.userAgent; + if (ua.indexOf("DumpRenderTree") >= 0) return hooks; + if (ua.indexOf("Chrome") >= 0) { + function confirm(p) { + return typeof window == "object" && window[p] && window[p].name == p; + } + if (confirm("Window") && confirm("HTMLElement")) return hooks; + } + hooks.getTag = getTagFallback; + }; +} +C.b7=function(hooks) { + if (typeof dartExperimentalFixupGetTag != "function") return hooks; + hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); +} +C.b8=function(hooks) { + var getTag = hooks.getTag; + var prototypeForTag = hooks.prototypeForTag; + function getTagFixed(o) { + var tag = getTag(o); + if (tag == "Document") { + if (!!o.xmlVersion) return "!Document"; + return "!HTMLDocument"; + } + return tag; + } + function prototypeForTagFixed(tag) { + if (tag == "Document") return null; + return prototypeForTag(tag); + } + hooks.getTag = getTagFixed; + hooks.prototypeForTag = prototypeForTagFixed; +} +C.ba=function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Firefox") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "GeoGeolocation": "Geolocation", + "Location": "!Location", + "WorkerMessageEvent": "MessageEvent", + "XMLDocument": "!Document"}; + function getTagFirefox(o) { + var tag = getTag(o); + return quickMap[tag] || tag; + } + hooks.getTag = getTagFirefox; +} +C.b9=function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Trident/") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "HTMLDDElement": "HTMLElement", + "HTMLDTElement": "HTMLElement", + "HTMLPhraseElement": "HTMLElement", + "Position": "Geoposition" + }; + function getTagIE(o) { + var tag = getTag(o); + var newTag = quickMap[tag]; + if (newTag) return newTag; + if (tag == "Object") { + if (window.DataView && (o instanceof window.DataView)) return "DataView"; + } + return tag; + } + function prototypeForTagIE(tag) { + var constructor = window[tag]; + if (constructor == null) return null; + return constructor.prototype; + } + hooks.getTag = getTagIE; + hooks.prototypeForTag = prototypeForTagIE; +} +C.a1=function(hooks) { return hooks; } + +C.a2=new P.fP() +C.bc=new P.i7() +C.a3=new Y.dp() +C.bd=new Y.dr() +C.a4=new P.jM() +C.F=new P.ki() +C.f=new P.kP() +C.H=new Y.b4(0,"Format.Unknown") +C.m=new Y.b4(1,"Format.RGB") +C.w=new Y.b4(2,"Format.RGBA") +C.a5=new Y.b4(3,"Format.Luminance") +C.a6=new Y.b4(4,"Format.LuminanceAlpha") +C.a7=new Y.as("Wrong WebP header.") +C.bq=new Y.as("PNG header not found.") +C.br=new Y.as("Invalid JPEG marker segment length.") +C.n=new Y.as("Wrong chunk length.") +C.bs=new Y.as("Invalid start of file.") +C.bw=new P.fQ(null) +C.bx=H.a(u([0,0]),[P.w]) +C.by=H.a(u([0,0,0]),[P.w]) +C.bz=H.a(u([127,2047,65535,1114111]),[P.h]) +C.bA=H.a(u([16]),[P.h]) +C.bB=H.a(u([1,1]),[P.w]) +C.a8=H.a(u([1,1,1]),[P.w]) +C.a9=H.a(u([1,1,1,1]),[P.w]) +C.aa=H.a(u([2]),[P.h]) +C.bC=H.a(u([255,216]),[P.h]) +C.ab=H.a(u([0,0,32776,33792,1,10240,0,0]),[P.h]) +C.bE=H.a(u([137,80,78,71,13,10,26,10]),[P.h]) +C.N=H.v(U.bf) +C.be=new D.a_(D.u4()) +C.cN=new H.aI([C.N,C.be],[P.ah,D.a_]) +C.bk=new D.aj("EXT_texture_webp",C.cN,D.u5(),!1) +C.ar=H.v(V.d4) +C.M=H.v(V.ad) +C.bf=new D.a_(X.ui()) +C.bg=new D.a_(X.uk()) +C.cL=new H.aI([C.ar,C.bf,C.M,C.bg],[P.ah,D.a_]) +C.bn=new D.aj("KHR_lights_punctual",C.cL,null,!1) +C.l=H.v(Y.ax) +C.bh=new D.a_(A.ul()) +C.cI=new H.aI([C.l,C.bh],[P.ah,D.a_]) +C.bm=new D.aj("KHR_materials_pbrSpecularGlossiness",C.cI,null,!1) +C.bi=new D.a_(S.um()) +C.cJ=new H.aI([C.l,C.bi],[P.ah,D.a_]) +C.bj=new D.aj("KHR_materials_unlit",C.cJ,null,!1) +C.c9=H.a(u([]),[P.ah]) +C.cO=new H.b2(0,{},C.c9,[P.ah,D.a_]) +C.bo=new D.aj("KHR_mesh_quantization",C.cO,U.un(),!0) +C.ay=H.v(Y.bg) +C.au=H.v(Y.bQ) +C.av=H.v(Y.bR) +C.G=new D.a_(L.uo()) +C.cM=new H.aI([C.ay,C.G,C.au,C.G,C.av,C.G],[P.ah,D.a_]) +C.bl=new D.aj("KHR_texture_transform",C.cM,null,!1) +C.I=H.a(u([C.bk,C.bn,C.bm,C.bj,C.bo,C.bl]),[D.aj]) +C.o=H.a(u([3]),[P.h]) +C.ac=H.a(u([33071,33648,10497]),[P.h]) +C.bF=H.a(u([34962,34963]),[P.h]) +C.J=H.a(u([4]),[P.h]) +C.aL=new V.k("VEC2",5120,!1) +C.aM=new V.k("VEC2",5120,!0) +C.aN=new V.k("VEC2",5121,!1) +C.aP=new V.k("VEC2",5122,!1) +C.aQ=new V.k("VEC2",5122,!0) +C.aR=new V.k("VEC2",5123,!1) +C.bG=H.a(u([C.aL,C.aM,C.aN,C.aP,C.aQ,C.aR]),[V.k]) +C.bH=H.a(u([5121,5123,5125]),[P.h]) +C.ad=H.a(u(["image/jpeg","image/png"]),[P.d]) +C.bI=H.a(u([82,73,70,70]),[P.h]) +C.bJ=H.a(u([9728,9729]),[P.h]) +C.aF=new V.k("SCALAR",5121,!1) +C.aI=new V.k("SCALAR",5123,!1) +C.aK=new V.k("SCALAR",5125,!1) +C.ae=H.a(u([C.aF,C.aI,C.aK]),[V.k]) +C.bM=H.a(u(["camera","children","skin","matrix","mesh","rotation","scale","translation","weights","name"]),[P.d]) +C.bN=H.a(u([9728,9729,9984,9985,9986,9987]),[P.h]) +C.bO=H.a(u(["COLOR","JOINTS","TEXCOORD","WEIGHTS"]),[P.d]) +C.x=H.a(u([0,0,65490,45055,65535,34815,65534,18431]),[P.h]) +C.bP=H.a(u(["color","intensity","spot","type","range","name"]),[P.d]) +C.bQ=H.a(u(["buffer","byteOffset","byteLength","byteStride","target","name"]),[P.d]) +C.ag=H.a(u([0,0,26624,1023,65534,2047,65534,2047]),[P.h]) +C.bR=H.a(u(["LINEAR","STEP","CUBICSPLINE"]),[P.d]) +C.bS=H.a(u(["OPAQUE","MASK","BLEND"]),[P.d]) +C.bT=H.a(u(["pbrMetallicRoughness","normalTexture","occlusionTexture","emissiveTexture","emissiveFactor","alphaMode","alphaCutoff","doubleSided","name"]),[P.d]) +C.bU=H.a(u([5120,5121,5122,5123,5125,5126]),[P.h]) +C.bV=H.a(u(["inverseBindMatrices","skeleton","joints","name"]),[P.d]) +C.Q=new V.k("VEC3",5120,!1) +C.B=new V.k("VEC3",5120,!0) +C.S=new V.k("VEC3",5122,!1) +C.C=new V.k("VEC3",5122,!0) +C.bW=H.a(u([C.Q,C.B,C.S,C.C]),[V.k]) +C.bX=H.a(u(["data-uri","buffer-view","glb","external"]),[P.d]) +C.bY=H.a(u(["POINTS","LINES","LINE_LOOP","LINE_STRIP","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN"]),[P.d]) +C.bZ=H.a(u(["bufferView","byteOffset","componentType"]),[P.d]) +C.K=H.a(u([C.B,C.C]),[V.k]) +C.c_=H.a(u(["aspectRatio","yfov","zfar","znear"]),[P.d]) +C.c0=H.a(u(["copyright","generator","version","minVersion"]),[P.d]) +C.c1=H.a(u(["bufferView","byteOffset"]),[P.d]) +C.c2=H.a(u(["bufferView","mimeType","uri","name"]),[P.d]) +C.c3=H.a(u(["channels","samplers","name"]),[P.d]) +C.c4=H.a(u(["baseColorFactor","baseColorTexture","metallicFactor","roughnessFactor","metallicRoughnessTexture"]),[P.d]) +C.c5=H.a(u(["count","indices","values"]),[P.d]) +C.c6=H.a(u(["diffuseFactor","diffuseTexture","specularFactor","glossinessFactor","specularGlossinessTexture"]),[P.d]) +C.c7=H.a(u(["directional","point","spot"]),[P.d]) +C.c8=H.a(u([]),[P.d]) +C.ah=u([]) +C.cb=H.a(u(["extensions","extras"]),[P.d]) +C.cc=H.a(u([0,0,32722,12287,65534,34815,65534,18431]),[P.h]) +C.ce=H.a(u(["index","texCoord"]),[P.d]) +C.cf=H.a(u(["index","texCoord","scale"]),[P.d]) +C.cg=H.a(u(["index","texCoord","strength"]),[P.d]) +C.ch=H.a(u(["innerConeAngle","outerConeAngle"]),[P.d]) +C.ci=H.a(u(["input","interpolation","output"]),[P.d]) +C.cj=H.a(u(["attributes","indices","material","mode","targets"]),[P.d]) +C.ck=H.a(u(["bufferView","byteOffset","componentType","count","type","normalized","max","min","sparse","name"]),[P.d]) +C.cl=H.a(u(["light"]),[P.d]) +C.cm=H.a(u(["lights"]),[P.d]) +C.cn=H.a(u(["node","path"]),[P.d]) +C.co=H.a(u(["nodes","name"]),[P.d]) +C.cp=H.a(u([null,"linear","srgb","custom"]),[P.d]) +C.cq=H.a(u([null,"srgb","custom"]),[P.d]) +C.ai=H.a(u([0,0,24576,1023,65534,34815,65534,18431]),[P.h]) +C.cr=H.a(u(["image/webp"]),[P.d]) +C.cs=H.a(u(["offset","rotation","scale","texCoord"]),[P.d]) +C.aj=H.a(u(["orthographic","perspective"]),[P.d]) +C.ct=H.a(u(["primitives","weights","name"]),[P.d]) +C.b=new E.aL(0,"Severity.Error") +C.e=new E.aL(1,"Severity.Warning") +C.h=new E.aL(2,"Severity.Information") +C.cR=new E.aL(3,"Severity.Hint") +C.cu=H.a(u([C.b,C.e,C.h,C.cR]),[E.aL]) +C.cv=H.a(u([0,0,32754,11263,65534,34815,65534,18431]),[P.h]) +C.cw=H.a(u(["magFilter","minFilter","wrapS","wrapT","name"]),[P.d]) +C.cx=H.a(u([null,"rgb","rgba","luminance","luminance-alpha"]),[P.d]) +C.ak=H.a(u([0,0,65490,12287,65535,34815,65534,18431]),[P.h]) +C.cy=H.a(u(["sampler","source","name"]),[P.d]) +C.cz=H.a(u(["source"]),[P.d]) +C.aU=new V.k("VEC3",5121,!1) +C.aV=new V.k("VEC3",5123,!1) +C.cA=H.a(u([C.Q,C.B,C.aU,C.R,C.S,C.C,C.aV,C.T]),[V.k]) +C.cB=H.a(u(["target","sampler"]),[P.d]) +C.al=H.a(u(["translation","rotation","scale","weights"]),[P.d]) +C.cC=H.a(u(["type","orthographic","perspective","name"]),[P.d]) +C.cD=H.a(u(["uri","byteLength","name"]),[P.d]) +C.cE=H.a(u(["xmag","ymag","zfar","znear"]),[P.d]) +C.cF=H.a(u(["extensionsUsed","extensionsRequired","accessors","animations","asset","buffers","bufferViews","cameras","images","materials","meshes","nodes","samplers","scene","scenes","skins","textures"]),[P.d]) +C.U=new V.k("VEC4",5120,!0) +C.V=new V.k("VEC4",5122,!0) +C.cG=H.a(u([C.U,C.V]),[V.k]) +C.af=H.a(u([C.j]),[V.k]) +C.bD=H.a(u([C.u,C.D,C.U,C.E,C.V]),[V.k]) +C.aG=new V.k("SCALAR",5121,!0) +C.aE=new V.k("SCALAR",5120,!0) +C.aJ=new V.k("SCALAR",5123,!0) +C.aH=new V.k("SCALAR",5122,!0) +C.cd=H.a(u([C.A,C.aG,C.aE,C.aJ,C.aH]),[V.k]) +C.cH=new H.b2(4,{translation:C.af,rotation:C.bD,scale:C.af,weights:C.cd},C.al,[P.d,[P.l,V.k]]) +C.bK=H.a(u(["SCALAR","VEC2","VEC3","VEC4","MAT2","MAT3","MAT4"]),[P.d]) +C.k=new H.b2(7,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},C.bK,[P.d,P.h]) +C.am=new H.aI([5120,"BYTE",5121,"UNSIGNED_BYTE",5122,"SHORT",5123,"UNSIGNED_SHORT",5124,"INT",5125,"UNSIGNED_INT",5126,"FLOAT",35664,"FLOAT_VEC2",35665,"FLOAT_VEC3",35666,"FLOAT_VEC4",35667,"INT_VEC2",35668,"INT_VEC3",35669,"INT_VEC4",35670,"BOOL",35671,"BOOL_VEC2",35672,"BOOL_VEC3",35673,"BOOL_VEC4",35674,"FLOAT_MAT2",35675,"FLOAT_MAT3",35676,"FLOAT_MAT4",35678,"SAMPLER_2D"],[P.h,P.d]) +C.ca=H.a(u([]),[P.bV]) +C.an=new H.b2(0,{},C.ca,[P.bV,null]) +C.bL=H.a(u(["KHR","EXT","ADOBE","AGI","AGT","ALCM","ALI","AMZN","AVR","BLENDER","CAPTURE","CESIUM","CVTOOLS","FB","FOXIT","GOOGLE","KDAB","LLQ","MESHOPT","MOZ","MSFT","NV","OWLII","POLUTROPON","S8S","SI","SKFB","SKYLINE","WEB3D"]),[P.d]) +C.cK=new H.b2(29,{KHR:null,EXT:null,ADOBE:null,AGI:null,AGT:null,ALCM:null,ALI:null,AMZN:null,AVR:null,BLENDER:null,CAPTURE:null,CESIUM:null,CVTOOLS:null,FB:null,FOXIT:null,GOOGLE:null,KDAB:null,LLQ:null,MESHOPT:null,MOZ:null,MSFT:null,NV:null,OWLII:null,POLUTROPON:null,S8S:null,SI:null,SKFB:null,SKYLINE:null,WEB3D:null},C.bL,[P.d,P.A]) +C.cQ=new P.l3(C.cK,[P.d]) +C.cS=new H.cD("call") +C.cT=H.v(M.br) +C.cU=H.v(M.bs) +C.cV=H.v(M.bq) +C.L=H.v([M.Q,P.G]) +C.cW=H.v(Z.bt) +C.cX=H.v(Z.cf) +C.cY=H.v(Z.cg) +C.ap=H.v(Z.aZ) +C.cZ=H.v(T.bv) +C.aq=H.v(V.aH) +C.d_=H.v(Q.b_) +C.d0=H.v(G.bx) +C.d1=H.v(G.by) +C.d2=H.v(G.b1) +C.d3=H.v(A.bK) +C.d4=H.v(D.bz) +C.as=H.v(T.b5) +C.d5=H.v(X.b8) +C.d6=H.v(X.bI) +C.d7=H.v(X.ct) +C.d8=H.v(X.bJ) +C.d9=H.v(S.bL) +C.da=H.v(L.bM) +C.db=H.v(S.cx) +C.at=H.v(S.ba) +C.dc=H.v(Y.bS) +C.dd=H.v(T.bc) +C.aw=H.v(B.aK) +C.ax=H.v(O.bd) +C.p=new Y.cG(0,"_ColorPrimaries.Unknown") +C.q=new Y.cG(1,"_ColorPrimaries.sRGB") +C.y=new Y.cG(2,"_ColorPrimaries.Custom") +C.r=new Y.bZ(0,"_ColorTransfer.Unknown") +C.de=new Y.bZ(1,"_ColorTransfer.Linear") +C.t=new Y.bZ(2,"_ColorTransfer.sRGB") +C.z=new Y.bZ(3,"_ColorTransfer.Custom") +C.az=new Y.cI("_ImageCodec.JPEG") +C.aA=new Y.cI("_ImageCodec.PNG") +C.aB=new Y.cI("_ImageCodec.WebP") +C.df=new P.c1(null,2) +C.aC=new N.c3(0,"_Storage.DataUri") +C.dg=new N.c3(1,"_Storage.BufferView") +C.dh=new N.c3(2,"_Storage.GLB") +C.aD=new N.c3(3,"_Storage.External")})();(function staticFields(){$.ap=0 +$.ci=null +$.n7=null +$.og=null +$.o5=null +$.oq=null +$.lp=null +$.lC=null +$.mv=null +$.c6=null +$.cR=null +$.cS=null +$.mm=!1 +$.p=C.f +$.bl=[]})();(function lazyInitializers(){var u=hunkHelpers.lazy +u($,"uK","mB",function(){return H.oe("_$dart_dartClosure")}) +u($,"vx","mI",function(){return H.oe("_$dart_js")}) +u($,"x9","qo",function(){return H.aA(H.jA({ +toString:function(){return"$receiver$"}}))}) +u($,"xa","qp",function(){return H.aA(H.jA({$method$:null, +toString:function(){return"$receiver$"}}))}) +u($,"xb","qq",function(){return H.aA(H.jA(null))}) +u($,"xc","qr",function(){return H.aA(function(){var $argumentsExpr$='$arguments$' +try{null.$method$($argumentsExpr$)}catch(t){return t.message}}())}) +u($,"xf","qu",function(){return H.aA(H.jA(void 0))}) +u($,"xg","qv",function(){return H.aA(function(){var $argumentsExpr$='$arguments$' +try{(void 0).$method$($argumentsExpr$)}catch(t){return t.message}}())}) +u($,"xe","qt",function(){return H.aA(H.nA(null))}) +u($,"xd","qs",function(){return H.aA(function(){try{null.$method$}catch(t){return t.message}}())}) +u($,"xi","qx",function(){return H.aA(H.nA(void 0))}) +u($,"xh","qw",function(){return H.aA(function(){try{(void 0).$method$}catch(t){return t.message}}())}) +u($,"xk","mV",function(){return P.t3()}) +u($,"vh","dO",function(){var t=new P.E(C.f,[P.A]) +t.dI(null) +return t}) +u($,"xj","qy",function(){return P.t0()}) +u($,"xl","mW",function(){return H.rE(H.tw(H.a([-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-2,-2,-2,-2,-2,62,-2,62,-2,63,52,53,54,55,56,57,58,59,60,61,-2,-2,-2,-1,-2,-2,-2,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-2,-2,-2,-2,63,-2,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-2,-2,-2,-2,-2],[P.h])))}) +u($,"xq","qC",function(){return P.tv()}) +u($,"uI","aD",function(){return P.nx("^([0-9]+)\\.([0-9]+)$")}) +u($,"uJ","ow",function(){return P.nx("^([A-Z0-9]+)_[A-Za-z0-9_]+$")}) +u($,"v6","oO",function(){return E.x("BUFFER_EMBEDDED_BYTELENGTH_MISMATCH",new E.et(),C.b)}) +u($,"v7","oP",function(){return E.x("BUFFER_EXTERNAL_BYTELENGTH_MISMATCH",new E.er(),C.b)}) +u($,"v8","oQ",function(){return E.x("BUFFER_GLB_CHUNK_TOO_BIG",new E.eq(),C.e)}) +u($,"v_","mF",function(){return E.x("ACCESSOR_MIN_MISMATCH",new E.ey(),C.b)}) +u($,"uZ","mE",function(){return E.x("ACCESSOR_MAX_MISMATCH",new E.ev(),C.b)}) +u($,"uP","mD",function(){return E.x("ACCESSOR_ELEMENT_OUT_OF_MIN_BOUND",new E.ew(),C.b)}) +u($,"uO","mC",function(){return E.x("ACCESSOR_ELEMENT_OUT_OF_MAX_BOUND",new E.eu(),C.b)}) +u($,"v3","mG",function(){return E.x("ACCESSOR_VECTOR3_NON_UNIT",new E.eH(),C.b)}) +u($,"uV","oF",function(){return E.x("ACCESSOR_INVALID_SIGN",new E.eJ(),C.b)}) +u($,"uN","oz",function(){return E.x("ACCESSOR_ANIMATION_SAMPLER_OUTPUT_NON_NORMALIZED_QUATERNION",new E.eA(),C.b)}) +u($,"v0","oJ",function(){return E.x("ACCESSOR_NON_CLAMPED",new E.eG(),C.b)}) +u($,"uT","oD",function(){return E.x("ACCESSOR_INVALID_FLOAT",new E.ez(),C.b)}) +u($,"uQ","oA",function(){return E.x("ACCESSOR_INDEX_OOB",new E.eF(),C.b)}) +u($,"uS","oC",function(){return E.x("ACCESSOR_INDEX_TRIANGLE_DEGENERATE",new E.eD(),C.h)}) +u($,"uR","oB",function(){return E.x("ACCESSOR_INDEX_PRIMITIVE_RESTART",new E.eE(),C.b)}) +u($,"uL","ox",function(){return E.x("ACCESSOR_ANIMATION_INPUT_NEGATIVE",new E.eC(),C.b)}) +u($,"uM","oy",function(){return E.x("ACCESSOR_ANIMATION_INPUT_NON_INCREASING",new E.eB(),C.b)}) +u($,"v2","oL",function(){return E.x("ACCESSOR_SPARSE_INDICES_NON_INCREASING",new E.eM(),C.b)}) +u($,"v1","oK",function(){return E.x("ACCESSOR_SPARSE_INDEX_OOB",new E.eL(),C.b)}) +u($,"uU","oE",function(){return E.x("ACCESSOR_INVALID_IBM",new E.eK(),C.b)}) +u($,"va","oR",function(){return E.x("IMAGE_DATA_INVALID",new E.eQ(),C.b)}) +u($,"vc","oT",function(){return E.x("IMAGE_MIME_TYPE_INVALID",new E.eP(),C.b)}) +u($,"vf","oW",function(){return E.x("IMAGE_UNEXPECTED_EOS",new E.en(),C.b)}) +u($,"vg","oX",function(){return E.x("IMAGE_UNRECOGNIZED_FORMAT",new E.eo(),C.e)}) +u($,"vd","oU",function(){return E.x("IMAGE_NON_ENABLED_MIME_TYPE",new E.ep(),C.b)}) +u($,"ve","oV",function(){return E.x("IMAGE_NPOT_DIMENSIONS",new E.eO(),C.h)}) +u($,"vb","oS",function(){return E.x("IMAGE_FEATURES_UNSUPPORTED",new E.eN(),C.e)}) +u($,"v9","mH",function(){return E.x("DATA_URI_GLB",new E.es(),C.h)}) +u($,"uX","oH",function(){return E.x("ACCESSOR_JOINTS_INDEX_OOB",new E.eI(),C.b)}) +u($,"uW","oG",function(){return E.x("ACCESSOR_JOINTS_INDEX_DUPLICATE",new E.ex(),C.b)}) +u($,"v4","oM",function(){return E.x("ACCESSOR_WEIGHTS_NEGATIVE",new E.em(),C.b)}) +u($,"v5","oN",function(){return E.x("ACCESSOR_WEIGHTS_NON_NORMALIZED",new E.ek(),C.b)}) +u($,"uY","oI",function(){return E.x("ACCESSOR_JOINTS_USED_ZERO_WEIGHT",new E.el(),C.e)}) +u($,"vw","lT",function(){return new E.fB(C.b,"IO_ERROR",new E.fC())}) +u($,"wc","mQ",function(){return E.a0("ARRAY_LENGTH_NOT_IN_LIST",new E.iv(),C.b)}) +u($,"wd","cW",function(){return E.a0("ARRAY_TYPE_MISMATCH",new E.iw(),C.b)}) +u($,"wb","mP",function(){return E.a0("DUPLICATE_ELEMENTS",new E.iB(),C.b)}) +u($,"wf","dQ",function(){return E.a0("INVALID_INDEX",new E.iz(),C.b)}) +u($,"wg","dR",function(){return E.a0("INVALID_JSON",new E.it(),C.b)}) +u($,"wh","pH",function(){return E.a0("INVALID_URI",new E.ip(),C.b)}) +u($,"we","aX",function(){return E.a0("EMPTY_ENTITY",new E.ix(),C.b)}) +u($,"wi","mR",function(){return E.a0("ONE_OF_MISMATCH",new E.iq(),C.b)}) +u($,"wj","pI",function(){return E.a0("PATTERN_MISMATCH",new E.iA(),C.b)}) +u($,"wk","P",function(){return E.a0("TYPE_MISMATCH",new E.il(),C.b)}) +u($,"wp","mS",function(){return E.a0("VALUE_NOT_IN_LIST",new E.iu(),C.e)}) +u($,"wq","lU",function(){return E.a0("VALUE_NOT_IN_RANGE",new E.io(),C.b)}) +u($,"wo","pK",function(){return E.a0("VALUE_MULTIPLE_OF",new E.ir(),C.b)}) +u($,"wl","aE",function(){return E.a0("UNDEFINED_PROPERTY",new E.im(),C.b)}) +u($,"wm","pJ",function(){return E.a0("UNEXPECTED_PROPERTY",new E.iy(),C.e)}) +u($,"wn","ce",function(){return E.a0("UNSATISFIED_DEPENDENCY",new E.is(),C.b)}) +u($,"x4","qk",function(){return E.n("UNKNOWN_ASSET_MAJOR_VERSION",new E.j9(),C.b)}) +u($,"x5","ql",function(){return E.n("UNKNOWN_ASSET_MINOR_VERSION",new E.j8(),C.e)}) +u($,"wQ","q5",function(){return E.n("ASSET_MIN_VERSION_GREATER_THAN_VERSION",new E.iZ(),C.e)}) +u($,"wE","pV",function(){return E.n("INVALID_GL_VALUE",new E.iX(),C.b)}) +u($,"wC","pT",function(){return E.n("INTEGER_WRITTEN_AS_FLOAT",new E.iY(),C.e)}) +u($,"ws","pM",function(){return E.n("ACCESSOR_NORMALIZED_INVALID",new E.iW(),C.b)}) +u($,"wt","pN",function(){return E.n("ACCESSOR_OFFSET_ALIGNMENT",new E.iU(),C.b)}) +u($,"wr","pL",function(){return E.n("ACCESSOR_MATRIX_ALIGNMENT",new E.iV(),C.b)}) +u($,"wu","pO",function(){return E.n("ACCESSOR_SPARSE_COUNT_OUT_OF_RANGE",new E.j4(),C.b)}) +u($,"wv","pP",function(){return E.n("ANIMATION_CHANNEL_TARGET_NODE_SKIN",new E.j5(),C.e)}) +u($,"ww","pQ",function(){return E.n("BUFFER_DATA_URI_MIME_TYPE_INVALID",new E.iT(),C.b)}) +u($,"wy","pR",function(){return E.n("BUFFER_VIEW_TOO_BIG_BYTE_STRIDE",new E.iS(),C.b)}) +u($,"wx","lV",function(){return E.n("BUFFER_VIEW_INVALID_BYTE_STRIDE",new E.iR(),C.b)}) +u($,"wz","pS",function(){return E.n("CAMERA_XMAG_YMAG_ZERO",new E.iP(),C.e)}) +u($,"wA","mT",function(){return E.n("CAMERA_ZFAR_LEQUAL_ZNEAR",new E.iO(),C.b)}) +u($,"wG","pX",function(){return E.n("MATERIAL_ALPHA_CUTOFF_INVALID_MODE",new E.iM(),C.e)}) +u($,"wJ","lW",function(){return E.n("MESH_PRIMITIVE_INVALID_ATTRIBUTE",new E.iG(),C.b)}) +u($,"wP","q4",function(){return E.n("MESH_PRIMITIVES_UNEQUAL_TARGETS_COUNT",new E.jj(),C.b)}) +u($,"wO","q3",function(){return E.n("MESH_PRIMITIVES_UNEQUAL_JOINTS_COUNT",new E.ji(),C.e)}) +u($,"wL","q0",function(){return E.n("MESH_PRIMITIVE_NO_POSITION",new E.iL(),C.e)}) +u($,"wI","pZ",function(){return E.n("MESH_PRIMITIVE_INDEXED_SEMANTIC_CONTINUITY",new E.iI(),C.b)}) +u($,"wN","q2",function(){return E.n("MESH_PRIMITIVE_TANGENT_WITHOUT_NORMAL",new E.iK(),C.e)}) +u($,"wK","q_",function(){return E.n("MESH_PRIMITIVE_JOINTS_WEIGHTS_MISMATCH",new E.iH(),C.b)}) +u($,"wM","q1",function(){return E.n("MESH_PRIMITIVE_TANGENT_POINTS",new E.iJ(),C.e)}) +u($,"wH","pY",function(){return E.n("MESH_INVALID_WEIGHTS_COUNT",new E.jh(),C.b)}) +u($,"wU","q9",function(){return E.n("NODE_MATRIX_TRS",new E.jf(),C.b)}) +u($,"wS","q7",function(){return E.n("NODE_MATRIX_DEFAULT",new E.jb(),C.h)}) +u($,"wV","qa",function(){return E.n("NODE_MATRIX_NON_TRS",new E.j0(),C.b)}) +u($,"x1","qh",function(){return E.n("ROTATION_NON_UNIT",new E.jg(),C.b)}) +u($,"x7","qn",function(){return E.n("UNUSED_EXTENSION_REQUIRED",new E.ja(),C.b)}) +u($,"x0","qg",function(){return E.n("NON_REQUIRED_EXTENSION",new E.jc(),C.b)}) +u($,"x6","qm",function(){return E.n("UNRESERVED_EXTENSION_PREFIX",new E.jd(),C.e)}) +u($,"wD","pU",function(){return E.n("INVALID_EXTENSION_NAME_FORMAT",new E.je(),C.e)}) +u($,"wT","q8",function(){return E.n("NODE_EMPTY",new E.j3(),C.h)}) +u($,"wY","qd",function(){return E.n("NODE_SKINNED_MESH_NON_ROOT",new E.j2(),C.e)}) +u($,"wX","qc",function(){return E.n("NODE_SKINNED_MESH_LOCAL_TRANSFORMS",new E.j1(),C.e)}) +u($,"wW","qb",function(){return E.n("NODE_SKIN_NO_SCENE",new E.j_(),C.b)}) +u($,"x2","qi",function(){return E.n("SKIN_NO_COMMON_ROOT",new E.j7(),C.b)}) +u($,"x3","qj",function(){return E.n("SKIN_SKELETON_INVALID",new E.j6(),C.b)}) +u($,"x_","qf",function(){return E.n("NON_RELATIVE_URI",new E.iN(),C.e)}) +u($,"wR","q6",function(){return E.n("MULTIPLE_EXTENSIONS",new E.iE(),C.e)}) +u($,"wZ","qe",function(){return E.n("NON_OBJECT_EXTRAS",new E.iD(),C.h)}) +u($,"wB","mU",function(){return E.n("EXTRA_PROPERTY",new E.iQ(),C.h)}) +u($,"wF","pW",function(){return E.n("KHR_LIGHTS_PUNCTUAL_LIGHT_SPOT_ANGLES",new E.iF(),C.b)}) +u($,"vA","pc",function(){return E.o("ACCESSOR_TOTAL_OFFSET_ALIGNMENT",new E.hq(),C.b)}) +u($,"vy","pb",function(){return E.o("ACCESSOR_SMALL_BYTESTRIDE",new E.hu(),C.b)}) +u($,"vz","mJ",function(){return E.o("ACCESSOR_TOO_LONG",new E.hg(),C.b)}) +u($,"vB","pd",function(){return E.o("ACCESSOR_USAGE_OVERRIDE",new E.h2(),C.b)}) +u($,"vE","pg",function(){return E.o("ANIMATION_DUPLICATE_TARGETS",new E.hv(),C.b)}) +u($,"vC","pe",function(){return E.o("ANIMATION_CHANNEL_TARGET_NODE_MATRIX",new E.fZ(),C.b)}) +u($,"vD","pf",function(){return E.o("ANIMATION_CHANNEL_TARGET_NODE_WEIGHTS_NO_MORPHS",new E.fY(),C.b)}) +u($,"vH","pj",function(){return E.o("ANIMATION_SAMPLER_INPUT_ACCESSOR_WITHOUT_BOUNDS",new E.h0(),C.b)}) +u($,"vF","ph",function(){return E.o("ANIMATION_SAMPLER_INPUT_ACCESSOR_INVALID_FORMAT",new E.h1(),C.b)}) +u($,"vJ","pl",function(){return E.o("ANIMATION_SAMPLER_OUTPUT_ACCESSOR_INVALID_FORMAT",new E.fX(),C.b)}) +u($,"vG","pi",function(){return E.o("ANIMATION_SAMPLER_INPUT_ACCESSOR_TOO_FEW_ELEMENTS",new E.h_(),C.b)}) +u($,"vI","pk",function(){return E.o("ANIMATION_SAMPLER_OUTPUT_ACCESSOR_INVALID_COUNT",new E.fW(),C.b)}) +u($,"vK","pm",function(){return E.o("BUFFER_MISSING_GLB_DATA",new E.h5(),C.b)}) +u($,"vM","mK",function(){return E.o("BUFFER_VIEW_TOO_LONG",new E.h3(),C.b)}) +u($,"vL","pn",function(){return E.o("BUFFER_VIEW_TARGET_OVERRIDE",new E.ht(),C.b)}) +u($,"vN","po",function(){return E.o("INVALID_IBM_ACCESSOR_COUNT",new E.hm(),C.b)}) +u($,"vQ","mM",function(){return E.o("MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT",new E.h7(),C.b)}) +u($,"vW","mN",function(){return E.o("MESH_PRIMITIVE_POSITION_ACCESSOR_WITHOUT_BOUNDS",new E.h8(),C.b)}) +u($,"vP","pp",function(){return E.o("MESH_PRIMITIVE_ACCESSOR_WITHOUT_BYTESTRIDE",new E.h4(),C.b)}) +u($,"vO","mL",function(){return E.o("MESH_PRIMITIVE_ACCESSOR_UNALIGNED",new E.h6(),C.b)}) +u($,"vT","ps",function(){return E.o("MESH_PRIMITIVE_INDICES_ACCESSOR_WITH_BYTESTRIDE",new E.he(),C.b)}) +u($,"vS","pr",function(){return E.o("MESH_PRIMITIVE_INDICES_ACCESSOR_INVALID_FORMAT",new E.hd(),C.b)}) +u($,"vR","pq",function(){return E.o("MESH_PRIMITIVE_INCOMPATIBLE_MODE",new E.hc(),C.e)}) +u($,"vX","pv",function(){return E.o("MESH_PRIMITIVE_TOO_FEW_TEXCOORDS",new E.hb(),C.b)}) +u($,"vY","pw",function(){return E.o("MESH_PRIMITIVE_UNEQUAL_ACCESSOR_COUNT",new E.hf(),C.b)}) +u($,"vV","pu",function(){return E.o("MESH_PRIMITIVE_MORPH_TARGET_NO_BASE_ACCESSOR",new E.ha(),C.b)}) +u($,"vU","pt",function(){return E.o("MESH_PRIMITIVE_MORPH_TARGET_INVALID_ATTRIBUTE_COUNT",new E.h9(),C.b)}) +u($,"vZ","px",function(){return E.o("NODE_LOOP",new E.hs(),C.b)}) +u($,"w_","py",function(){return E.o("NODE_PARENT_OVERRIDE",new E.hh(),C.b)}) +u($,"w2","pB",function(){return E.o("NODE_WEIGHTS_INVALID",new E.hk(),C.b)}) +u($,"w0","pz",function(){return E.o("NODE_SKIN_WITH_NON_SKINNED_MESH",new E.hj(),C.b)}) +u($,"w1","pA",function(){return E.o("NODE_SKINNED_MESH_WITHOUT_SKIN",new E.hi(),C.e)}) +u($,"w3","pC",function(){return E.o("SCENE_NON_ROOT_NODE",new E.hl(),C.b)}) +u($,"w4","pD",function(){return E.o("SKIN_IBM_INVALID_FORMAT",new E.hn(),C.b)}) +u($,"w5","mO",function(){return E.o("TEXTURE_INVALID_IMAGE_MIME_TYPE",new E.fV(),C.b)}) +u($,"w6","pE",function(){return E.o("UNDECLARED_EXTENSION",new E.fU(),C.b)}) +u($,"w7","pF",function(){return E.o("UNEXPECTED_EXTENSION_OBJECT",new E.fT(),C.b)}) +u($,"w8","D",function(){return E.o("UNRESOLVED_REFERENCE",new E.ho(),C.b)}) +u($,"w9","pG",function(){return E.o("UNSUPPORTED_EXTENSION",new E.hp(),C.e)}) +u($,"wa","dP",function(){return E.o("UNUSED_OBJECT",new E.hr(),C.h)}) +u($,"vm","p1",function(){return E.a6("GLB_INVALID_MAGIC",new E.eZ(),C.b)}) +u($,"vn","p2",function(){return E.a6("GLB_INVALID_VERSION",new E.eY(),C.b)}) +u($,"vp","p4",function(){return E.a6("GLB_LENGTH_TOO_SMALL",new E.eX(),C.b)}) +u($,"vi","oY",function(){return E.a6("GLB_CHUNK_LENGTH_UNALIGNED",new E.f6(),C.b)}) +u($,"vo","p3",function(){return E.a6("GLB_LENGTH_MISMATCH",new E.eV(),C.b)}) +u($,"vj","oZ",function(){return E.a6("GLB_CHUNK_TOO_BIG",new E.f5(),C.b)}) +u($,"vl","p0",function(){return E.a6("GLB_EMPTY_CHUNK",new E.f1(),C.b)}) +u($,"vk","p_",function(){return E.a6("GLB_DUPLICATE_CHUNK",new E.f2(),C.b)}) +u($,"vs","p7",function(){return E.a6("GLB_UNEXPECTED_END_OF_CHUNK_HEADER",new E.eW(),C.b)}) +u($,"vr","p6",function(){return E.a6("GLB_UNEXPECTED_END_OF_CHUNK_DATA",new E.eU(),C.b)}) +u($,"vt","p8",function(){return E.a6("GLB_UNEXPECTED_END_OF_HEADER",new E.f_(),C.b)}) +u($,"vu","p9",function(){return E.a6("GLB_UNEXPECTED_FIRST_CHUNK",new E.f4(),C.b)}) +u($,"vq","p5",function(){return E.a6("GLB_UNEXPECTED_BIN_CHUNK",new E.f3(),C.b)}) +u($,"vv","pa",function(){return E.a6("GLB_UNKNOWN_CHUNK_TYPE",new E.f0(),C.e)}) +u($,"xm","mX",function(){return H.rD(1)}) +u($,"xn","qz",function(){return T.rA()}) +u($,"xr","qD",function(){return T.nG()}) +u($,"xo","qA",function(){var t=T.rP() +t.a[3]=1 +return t}) +u($,"xp","qB",function(){return T.nG()})})();(function nativeSupport(){!function(){var u=function(a){var o={} +o[a]=1 +return Object.keys(hunkHelpers.convertToFastObject(o))[0]} +v.getIsolateTag=function(a){return u("___dart_"+a+v.isolateTag)} +var t="___dart_isolate_tags_" +var s=Object[t]||(Object[t]=Object.create(null)) +var r="_ZxYxX" +for(var q=0;;q++){var p=u(r+"_"+q+"_") +if(!(p in s)){s[p]=1 +v.isolateTag=p +break}}v.dispatchPropertyName=v.getIsolateTag("dispatch_record")}() +hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer:J.bD,DataView:H.cz,ArrayBufferView:H.cz,Float32Array:H.db,Float64Array:H.hV,Int16Array:H.hW,Int32Array:H.hX,Int8Array:H.hY,Uint16Array:H.hZ,Uint32Array:H.i_,Uint8ClampedArray:H.de,CanvasPixelArray:H.de,Uint8Array:H.bP}) +hunkHelpers.setOrUpdateLeafTags({ArrayBuffer:true,DataView:true,ArrayBufferView:false,Float32Array:true,Float64Array:true,Int16Array:true,Int32Array:true,Int8Array:true,Uint16Array:true,Uint32Array:true,Uint8ClampedArray:true,CanvasPixelArray:true,Uint8Array:false}) +H.dc.$nativeSuperclassTag="ArrayBufferView" +H.cJ.$nativeSuperclassTag="ArrayBufferView" +H.cK.$nativeSuperclassTag="ArrayBufferView" +H.dd.$nativeSuperclassTag="ArrayBufferView" +H.cL.$nativeSuperclassTag="ArrayBufferView" +H.cM.$nativeSuperclassTag="ArrayBufferView" +H.cy.$nativeSuperclassTag="ArrayBufferView"})() +Function.prototype.$1=function(a){return this(a)} +Function.prototype.$0=function(){return this()} +Function.prototype.$2=function(a,b){return this(a,b)} +Function.prototype.$3=function(a,b,c){return this(a,b,c)} +Function.prototype.$4=function(a,b,c,d){return this(a,b,c,d)} +Function.prototype.$1$1=function(a){return this(a)} +Function.prototype.$1$0=function(){return this()} +Function.prototype.$1$2=function(a,b){return this(a,b)} +Function.prototype.$2$0=function(){return this()} +convertAllToFastObject(w) +convertToFastObject($);(function(a){if(typeof document==="undefined"){a(null) +return}if(typeof document.currentScript!='undefined'){a(document.currentScript) +return}var u=document.scripts +function onLoad(b){for(var s=0;s validator.version(); + +/** + * Returns an array of supported extensions names. + * @returns {string[]} + */ +exports.supportedExtensions = () => validator.supportedExtensions(); + +/** + * Validates an asset from bytes. + * @param {Uint8Array} data - Byte array containing glTF or GLB data. + * @param {ValidationOptions} options - Object with validation options. + * @returns {Promise} Promise with validation result in object form. + */ +exports.validateBytes = (data, options) => validator.validateBytes(data, options); + +/** + * Validates an asset from JSON string. + * @param {string} json - String containing glTF JSON. + * @param {ValidationOptions} options - Object with validation options. + * @returns {Promise} Promise with validation result in object form. + */ +exports.validateString = (json, options) => validator.validateString(json, options); + +/** + @typedef {Object} ValidationOptions + @property {string} uri - Absolute or relative asset URI that will be copied to validation report. + @property {ExternalResourceFunction} externalResourceFunction - Function for loading external resources. If omitted, external resources are not validated. + @property {boolean} validateAccessorData - Set to `false` to skip reading of accessor data. Default is `true`. + @property {boolean} writeTimestamp - Set to `false` to omit timestamp from the validation report. Default is `true`. + @property {number} maxIssues - Max number of reported issues. Use `0` for unlimited output. + @property {string[]} ignoredIssues - Array of ignored issue codes. + @property {Object} severityOverrides - Object with overridden severities for issue codes. + */ + +/** + * @callback ExternalResourceFunction + * @param {string} uri - Relative URI of the external resource. + * @returns {Promise} - Promise with Uint8Array data. + */ + +},{"./gltf_validator.dart.js":3}]},{},[2]); diff --git a/src/assets/js/ktx2Transcoders/msc_basis_transcoder.js b/src/assets/js/ktx2Transcoders/msc_basis_transcoder.js new file mode 100644 index 0000000..b04e598 --- /dev/null +++ b/src/assets/js/ktx2Transcoders/msc_basis_transcoder.js @@ -0,0 +1,21 @@ + +var MSC_TRANSCODER = (function() { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; + return ( +function(MSC_TRANSCODER) { + MSC_TRANSCODER = MSC_TRANSCODER || {}; + +var Module=typeof MSC_TRANSCODER!=="undefined"?MSC_TRANSCODER:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=function shell_read(filename,binary){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);return nodeFS["readFileSync"](filename,binary?null:"utf8")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);quit_=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit==="function"){quit_=function(status){quit(status)}}if(typeof print!=="undefined"){if(typeof console==="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!=="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!=="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function UTF16ToString(ptr,maxBytesToRead){var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder){return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr))}else{var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str}}function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}function lengthBytesUTF16(str){return str.length*2}function UTF32ToString(ptr,maxBytesToRead){var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str}function stringToUTF32(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;__ATINIT__.push({func:function(){___wasm_call_ctors()}});function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what+="";err(what);ABORT=true;EXITSTATUS=1;what="abort("+what+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}function hasPrefix(str,prefix){return String.prototype.startsWith?str.startsWith(prefix):str.indexOf(prefix)===0}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return hasPrefix(filename,dataURIPrefix)}var fileURIPrefix="file://";function isFileURI(filename){return hasPrefix(filename,fileURIPrefix)}var wasmBinaryFile="msc_basis_transcoder.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch==="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["L"];updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module["asm"]["O"];removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiatedSource)})})}else{return instantiateArrayBuffer(receiveInstantiatedSource)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync().catch(readyPromiseReject);return{}}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback(Module);continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){wasmTable.get(func)()}else{wasmTable.get(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}function getShiftFromSize(size){switch(size){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+size)}}function embind_init_charCodes(){var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes}var embind_charCodes=undefined;function readLatin1String(ptr){var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret}var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return"_"+name}else{return name}}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function("body","return function "+name+"() {\n"+' "use strict";'+" return body.apply(this, arguments);\n"+"};\n")(body)}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+": "+this.message}};return errorClass}var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")}var finalizationGroup=false;function detachFinalizer(handle){}function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}}function attachFinalizer(handle){if("undefined"===typeof FinalizationGroup){attachFinalizer=function(handle){return handle};return handle}finalizationGroup=new FinalizationGroup(function(iter){for(var result=iter.next();!result.done;result=iter.next()){var $$=result.value;if(!$$.ptr){console.warn("object already deleted: "+$$.ptr)}else{releaseClassHandle($$)}}});attachFinalizer=function(handle){finalizationGroup.register(handle,handle.$$,handle.$$);return handle};detachFinalizer=function(handle){finalizationGroup.unregister(handle.$$)};return attachFinalizer(handle)}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}var delayFunction=undefined;var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater}function ClassHandle(){}var registeredPointers={};function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError("Cannot register public name '"+name+"' twice")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,__emval_register(function(){clonedHandle["delete"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]()}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function dynCallLegacy(sig,ptr,args){var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)}function dynCall(sig,ptr,args){if(sig.indexOf("j")!=-1){return dynCallLegacy(sig,ptr,args)}return wasmTable.get(ptr).apply(null,args)}function getDynCaller(sig,ptr){var argCache=[];return function(){argCache.length=arguments.length;for(var i=0;i0?", ":"")+argsListWired}invokerFnBody+=(returns?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i>2)+i])}return array}function __embind_register_class_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,fn){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes)}var proto=classType.registeredClass.constructor;if(undefined===proto[methodName]){unboundTypesHandler.argCount=argCount-1;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-1]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));var func=craftInvokerFunction(humanName,invokerArgsArray,null,rawInvoker,fn);if(undefined===proto[methodName].overloadTable){func.argCount=argCount-1;proto[methodName]=func}else{proto[methodName].overloadTable[argCount-1]=func}return[]});return[]})}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);var args=[rawConstructor];var destructors=[];whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!")}classType.registeredClass.constructor_body[argCount-1]=function unboundTypeHandler(){throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){classType.registeredClass.constructor_body[argCount-1]=function constructor_body(){if(arguments.length!==argCount-1){throwBindingError(humanName+" called with "+arguments.length+" arguments, expected "+(argCount-1))}destructors.length=0;args.length=argCount;for(var i=1;i4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function count_emval_handles(){var count=0;for(var i=5;i>1])};case 2:return function(pointer){var heap=signed?HEAP32:HEAPU32;return this["fromWireType"](heap[pointer>>2])};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_enum(rawType,name,size,isSigned){var shift=getShiftFromSize(size);name=readLatin1String(name);function ctor(){}ctor.values={};registerType(rawType,{name:name,constructor:ctor,"fromWireType":function(c){return this.constructor.values[c]},"toWireType":function(destructors,c){return c.value},"argPackAdvance":8,"readValueFromPointer":enumReadValueFromPointer(name,shift,isSigned),destructorFunction:null});exposePublicSymbol(name,ctor)}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl}function __embind_register_enum_value(rawEnumType,name,enumValue){var enumType=requireRegisteredType(rawEnumType,"enum");name=readLatin1String(name);var Enum=enumType.constructor;var Value=Object.create(enumType.constructor.prototype,{value:{value:enumValue},constructor:{value:createNamedFunction(enumType.name+"_"+name,function(){})}});Enum.values[enumValue]=Value;Enum[name]=Value}function _embind_repr(v){if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 3:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError("Unknown float type: "+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(value){return value},"toWireType":function(destructors,value){if(typeof value!=="number"&&typeof value!=="boolean"){throw new TypeError('Cannot convert "'+_embind_repr(value)+'" to '+this.name)}return value},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null})}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError("Cannot call "+name+" due to unbound types",argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[]})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=function(value){return value};if(minRange===0){var bitshift=32-8*size;fromWireType=function(value){return value<>>bitshift}}var isUnsignedType=name.indexOf("unsigned")!=-1;registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":function(destructors,value){if(typeof value!=="number"&&typeof value!=="boolean"){throw new TypeError('Cannot convert "'+_embind_repr(value)+'" to '+this.name)}if(valuemaxRange){throw new TypeError('Passing a number "'+_embind_repr(value)+'" from JS side to C/C++ side to an argument of type "'+name+'", which is outside the valid range ['+minRange+", "+maxRange+"]!")}return isUnsignedType?value>>>0:value|0},"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var str;if(stdStringIsUTF8){var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr+4,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+4+i]=charCode}}else{for(var i=0;i>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":function(destructors,value){if(!(typeof value==="string")){throwBindingError("Cannot pass non-string to C++ string type "+name)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":function(){return undefined},"toWireType":function(destructors,o){return undefined}})}function requireHandle(handle){if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handle_array[handle].value}function __emval_as(handle,returnType,destructorsRef){handle=requireHandle(handle);returnType=requireRegisteredType(returnType,"emval::as");var destructors=[];var rd=__emval_register(destructors);HEAP32[destructorsRef>>2]=rd;return returnType["toWireType"](destructors,handle)}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}else{return symbol}}var emval_methodCallers=[];function __emval_call_void_method(caller,handle,methodName,args){caller=emval_methodCallers[caller];handle=requireHandle(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)}function __emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function __emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i>2)+i],"parameter "+i)}return a}function __emval_get_method_caller(argCount,argTypes){var types=__emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+"_$"+types.slice(1).map(function(t){return t.name}).join("_")+"$";var params=["retType"];var args=[retType];var argsList="";for(var i=0;i4){emval_handle_array[handle].refcount+=1}}function craftEmvalAllocator(argCount){var argsList="";for(var i=0;i>> 2) + "+i+'], "parameter '+i+'");\n'+"var arg"+i+" = argType"+i+".readValueFromPointer(args);\n"+"args += argType"+i+"['argPackAdvance'];\n"}functionBody+="var obj = new constructor("+argsList+");\n"+"return __emval_register(obj);\n"+"}\n";return new Function("requireRegisteredType","Module","__emval_register",functionBody)(requireRegisteredType,Module,__emval_register)}var emval_newers={};function __emval_new(handle,argCount,argTypes,args){handle=requireHandle(handle);var newer=emval_newers[argCount];if(!newer){newer=craftEmvalAllocator(argCount);emval_newers[argCount]=newer}return newer(handle,argTypes,args)}function __emval_new_cstring(v){return __emval_register(getStringOrSymbol(v))}function __emval_new_object(){return __emval_register({})}function __emval_run_destructors(handle){var destructors=emval_handle_array[handle].value;runDestructors(destructors);__emval_decref(handle)}function __emval_set_property(handle,key,value){handle=requireHandle(handle);key=requireHandle(key);value=requireHandle(value);handle[key]=value}function __emval_take_value(type,argv){type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](argv);return __emval_register(v)}function _abort(){abort()}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function _emscripten_get_heap_size(){return HEAPU8.length}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=_emscripten_get_heap_size();var maxHeapSize=2147483648;if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var SYSCALLS={mappings:{},buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},get64:function(low,high){return low}};function _fd_close(fd){return 0}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){}function _fd_write(fd,iov,iovcnt,pnum){var num=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j>2]=num;return 0}function _setTempRet0($i){setTempRet0($i|0)}embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");InternalError=Module["InternalError"]=extendError(Error,"InternalError");init_ClassHandle();init_RegisteredPointer();init_embind();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();var asmLibraryArg={"a":___assert_fail,"J":__embind_register_bool,"m":__embind_register_class,"w":__embind_register_class_class_function,"r":__embind_register_class_constructor,"l":__embind_register_class_function,"h":__embind_register_class_property,"I":__embind_register_emval,"v":__embind_register_enum,"c":__embind_register_enum_value,"y":__embind_register_float,"B":__embind_register_function,"i":__embind_register_integer,"g":__embind_register_memory_view,"z":__embind_register_std_string,"t":__embind_register_std_wstring,"K":__embind_register_void,"k":__emval_as,"n":__emval_call_void_method,"b":__emval_decref,"o":__emval_get_method_caller,"q":__emval_get_module_property,"e":__emval_get_property,"f":__emval_incref,"p":__emval_new,"d":__emval_new_cstring,"C":__emval_new_object,"j":__emval_run_destructors,"A":__emval_set_property,"u":__emval_take_value,"s":_abort,"F":_emscripten_memcpy_big,"G":_emscripten_resize_heap,"H":_fd_close,"D":_fd_seek,"x":_fd_write,"E":_setTempRet0};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["M"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["N"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["P"]).apply(null,arguments)};var ___getTypeName=Module["___getTypeName"]=function(){return(___getTypeName=Module["___getTypeName"]=Module["asm"]["Q"]).apply(null,arguments)};var ___embind_register_native_and_builtin_types=Module["___embind_register_native_and_builtin_types"]=function(){return(___embind_register_native_and_builtin_types=Module["___embind_register_native_and_builtin_types"]=Module["asm"]["R"]).apply(null,arguments)};var dynCall_jiji=Module["dynCall_jiji"]=function(){return(dynCall_jiji=Module["dynCall_jiji"]=Module["asm"]["S"]).apply(null,arguments)};var calledRun;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); + + + return MSC_TRANSCODER.ready +} +); +})(); +if (typeof exports === 'object' && typeof module === 'object') + module.exports = MSC_TRANSCODER; +else if (typeof define === 'function' && define['amd']) + define([], function() { return MSC_TRANSCODER; }); +else if (typeof exports === 'object') + exports["MSC_TRANSCODER"] = MSC_TRANSCODER; \ No newline at end of file diff --git a/src/assets/js/ktx2Transcoders/msc_basis_transcoder.wasm b/src/assets/js/ktx2Transcoders/msc_basis_transcoder.wasm new file mode 100644 index 0000000..ca01a2c Binary files /dev/null and b/src/assets/js/ktx2Transcoders/msc_basis_transcoder.wasm differ diff --git a/src/assets/js/ktx2Transcoders/uastc_astc.wasm b/src/assets/js/ktx2Transcoders/uastc_astc.wasm new file mode 100644 index 0000000..1e39925 Binary files /dev/null and b/src/assets/js/ktx2Transcoders/uastc_astc.wasm differ diff --git a/src/assets/js/ktx2Transcoders/uastc_bc7.wasm b/src/assets/js/ktx2Transcoders/uastc_bc7.wasm new file mode 100644 index 0000000..6b1c00e Binary files /dev/null and b/src/assets/js/ktx2Transcoders/uastc_bc7.wasm differ diff --git a/src/assets/js/ktx2Transcoders/uastc_rgba32_srgb.wasm b/src/assets/js/ktx2Transcoders/uastc_rgba32_srgb.wasm new file mode 100644 index 0000000..8677b65 Binary files /dev/null and b/src/assets/js/ktx2Transcoders/uastc_rgba32_srgb.wasm differ diff --git a/src/assets/js/ktx2Transcoders/uastc_rgba32_unorm.wasm b/src/assets/js/ktx2Transcoders/uastc_rgba32_unorm.wasm new file mode 100644 index 0000000..42bc266 Binary files /dev/null and b/src/assets/js/ktx2Transcoders/uastc_rgba32_unorm.wasm differ diff --git a/src/assets/js/materialsLibrary/babylonjs.materials.js b/src/assets/js/materialsLibrary/babylonjs.materials.js new file mode 100644 index 0000000..a75187d --- /dev/null +++ b/src/assets/js/materialsLibrary/babylonjs.materials.js @@ -0,0 +1,7574 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("babylonjs")); + else if(typeof define === 'function' && define.amd) + define("babylonjs-materials", ["babylonjs"], factory); + else if(typeof exports === 'object') + exports["babylonjs-materials"] = factory(require("babylonjs")); + else + root["MATERIALS"] = factory(root["BABYLON"]); +})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./legacy/legacy.ts"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "../../node_modules/tslib/tslib.es6.js": +/*!***********************************************************!*\ + !*** C:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***! + \***********************************************************/ +/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__createBinding", function() { return __createBinding; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldGet", function() { return __classPrivateFieldGet; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldSet", function() { return __classPrivateFieldSet; }); +/*! ***************************************************************************** +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) { + 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 __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +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 }; + } +} + +var __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); + +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +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; +}; + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} + + +/***/ }), + +/***/ "../../node_modules/webpack/buildin/global.js": +/*!***********************************!*\ + !*** (webpack)/buildin/global.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), + +/***/ "./cell/cell.fragment.ts": +/*!*******************************!*\ + !*** ./cell/cell.fragment.ts ***! + \*******************************/ +/*! exports provided: cellPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellPixelShader", function() { return cellPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'cellPixelShader'; +var shader = "precision highp float;\n\nuniform vec3 vEyePosition;\nuniform vec4 vDiffuseColor;\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n#include\n\n#include\n\nvec3 computeCustomDiffuseLighting(lightingInfo info,vec3 diffuseBase,float shadow)\n{\ndiffuseBase=info.diffuse*shadow;\n#ifdef CELLBASIC\nfloat level=1.0;\nif (info.ndl<0.5)\nlevel=0.5;\ndiffuseBase.rgb*vec3(level,level,level);\n#else\nfloat ToonThresholds[4];\nToonThresholds[0]=0.95;\nToonThresholds[1]=0.5;\nToonThresholds[2]=0.2;\nToonThresholds[3]=0.03;\nfloat ToonBrightnessLevels[5];\nToonBrightnessLevels[0]=1.0;\nToonBrightnessLevels[1]=0.8;\nToonBrightnessLevels[2]=0.6;\nToonBrightnessLevels[3]=0.35;\nToonBrightnessLevels[4]=0.2;\nif (info.ndl>ToonThresholds[0])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[0];\n}\nelse if (info.ndl>ToonThresholds[1])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[1];\n}\nelse if (info.ndl>ToonThresholds[2])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[2];\n}\nelse if (info.ndl>ToonThresholds[3])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[3];\n}\nelse\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[4];\n}\n#endif\nreturn max(diffuseBase,vec3(0.2));\n}\nvoid main(void)\n{\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n\nlightingInfo info;\nvec3 diffuseBase=vec3(0.,0.,0.);\nfloat shadow=1.;\nfloat glossiness=0.;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n\nvec4 color=vec4(finalDiffuse,alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var cellPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./cell/cell.vertex.ts": +/*!*****************************!*\ + !*** ./cell/cell.vertex.ts ***! + \*****************************/ +/*! exports provided: cellVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellVertexShader", function() { return cellVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'cellVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var cellVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./cell/cellMaterial.ts": +/*!******************************!*\ + !*** ./cell/cellMaterial.ts ***! + \******************************/ +/*! exports provided: CellMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellMaterial", function() { return CellMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _cell_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cell.fragment */ "./cell/cell.fragment.ts"); +/* harmony import */ var _cell_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cell.vertex */ "./cell/cell.vertex.ts"); + + + + + + + + + + + + + +var CellMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CellMaterialDefines, _super); + function CellMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.NDOTL = true; + _this.CUSTOMUSERLIGHTING = true; + _this.CELLBASIC = true; + _this.DEPTHPREPASS = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return CellMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var CellMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CellMaterial, _super); + function CellMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this._computeHighLevel = false; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + CellMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + CellMaterial.prototype.needAlphaTesting = function () { + return false; + }; + CellMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + CellMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new CellMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + } + } + // High level + defines.CELLBASIC = !this.computeHighLevel; + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + var shaderName = "cell"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix" + ]; + var samplers = ["diffuseSampler"]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights - 1 } + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + CellMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this._diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this._diffuseTexture.getTextureMatrix()); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + // Lights + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this._maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + CellMaterial.prototype.getAnimatables = function () { + var results = []; + if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) { + results.push(this._diffuseTexture); + } + return results; + }; + CellMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + return activeTextures; + }; + CellMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + return this._diffuseTexture === texture; + }; + CellMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this._diffuseTexture) { + this._diffuseTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + CellMaterial.prototype.getClassName = function () { + return "CellMaterial"; + }; + CellMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new CellMaterial(name, _this.getScene()); }, this); + }; + CellMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.CellMaterial"; + return serializationObject; + }; + // Statics + CellMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new CellMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], CellMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], CellMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])("diffuse") + ], CellMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("computeHighLevel") + ], CellMaterial.prototype, "_computeHighLevel", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], CellMaterial.prototype, "computeHighLevel", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], CellMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], CellMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], CellMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], CellMaterial.prototype, "maxSimultaneousLights", void 0); + return CellMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.CellMaterial"] = CellMaterial; + + +/***/ }), + +/***/ "./cell/index.ts": +/*!***********************!*\ + !*** ./cell/index.ts ***! + \***********************/ +/*! exports provided: CellMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _cellMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cellMaterial */ "./cell/cellMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellMaterial", function() { return _cellMaterial__WEBPACK_IMPORTED_MODULE_0__["CellMaterial"]; }); + + + + +/***/ }), + +/***/ "./custom/customMaterial.ts": +/*!**********************************!*\ + !*** ./custom/customMaterial.ts ***! + \**********************************/ +/*! exports provided: CustomShaderStructure, ShaderSpecialParts, CustomMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomShaderStructure", function() { return CustomShaderStructure; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShaderSpecialParts", function() { return ShaderSpecialParts; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomMaterial", function() { return CustomMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__); + + + + +var CustomShaderStructure = /** @class */ (function () { + function CustomShaderStructure() { + } + return CustomShaderStructure; +}()); + +var ShaderSpecialParts = /** @class */ (function () { + function ShaderSpecialParts() { + } + return ShaderSpecialParts; +}()); + +var CustomMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CustomMaterial, _super); + function CustomMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.CustomParts = new ShaderSpecialParts(); + _this.customShaderNameResolve = _this.Builder; + _this.FragmentShader = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore["defaultPixelShader"]; + _this.VertexShader = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore["defaultVertexShader"]; + return _this; + } + CustomMaterial.prototype.AttachAfterBind = function (mesh, effect) { + if (this._newUniformInstances) { + for (var el in this._newUniformInstances) { + var ea = el.toString().split('-'); + if (ea[0] == 'vec2') { + effect.setVector2(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'vec3') { + effect.setVector3(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'vec4') { + effect.setVector4(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'mat4') { + effect.setMatrix(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'float') { + effect.setFloat(ea[1], this._newUniformInstances[el]); + } + } + } + if (this._newSamplerInstances) { + for (var el in this._newSamplerInstances) { + var ea = el.toString().split('-'); + if (ea[0] == 'sampler2D' && this._newSamplerInstances[el].isReady && this._newSamplerInstances[el].isReady()) { + effect.setTexture(ea[1], this._newSamplerInstances[el]); + } + } + } + }; + CustomMaterial.prototype.ReviewUniform = function (name, arr) { + if (name == "uniform" && this._newUniforms) { + for (var ind = 0; ind < this._newUniforms.length; ind++) { + if (this._customUniform[ind].indexOf('sampler') == -1) { + arr.push(this._newUniforms[ind]); + } + } + } + if (name == "sampler" && this._newUniforms) { + for (var ind = 0; ind < this._newUniforms.length; ind++) { + if (this._customUniform[ind].indexOf('sampler') != -1) { + arr.push(this._newUniforms[ind]); + } + } + } + return arr; + }; + CustomMaterial.prototype.Builder = function (shaderName, uniforms, uniformBuffers, samplers, defines, attributes) { + var _this = this; + if (attributes && this._customAttributes && this._customAttributes.length > 0) { + attributes.push.apply(attributes, this._customAttributes); + } + this.ReviewUniform("uniform", uniforms); + this.ReviewUniform("sampler", samplers); + if (this._isCreatedShader) { + return this._createdShaderName; + } + this._isCreatedShader = false; + CustomMaterial.ShaderIndexer++; + var name = "custom_" + CustomMaterial.ShaderIndexer; + var fn_afterBind = this._afterBind.bind(this); + this._afterBind = function (m, e) { + if (!e) { + return; + } + _this.AttachAfterBind(m, e); + try { + fn_afterBind(m, e); + } + catch (e) { } + }; + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"] = this.VertexShader + .replace('#define CUSTOM_VERTEX_BEGIN', (this.CustomParts.Vertex_Begin ? this.CustomParts.Vertex_Begin : "")) + .replace('#define CUSTOM_VERTEX_DEFINITIONS', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Vertex_Definitions ? this.CustomParts.Vertex_Definitions : "")) + .replace('#define CUSTOM_VERTEX_MAIN_BEGIN', (this.CustomParts.Vertex_MainBegin ? this.CustomParts.Vertex_MainBegin : "")) + .replace('#define CUSTOM_VERTEX_UPDATE_POSITION', (this.CustomParts.Vertex_Before_PositionUpdated ? this.CustomParts.Vertex_Before_PositionUpdated : "")) + .replace('#define CUSTOM_VERTEX_UPDATE_NORMAL', (this.CustomParts.Vertex_Before_NormalUpdated ? this.CustomParts.Vertex_Before_NormalUpdated : "")) + .replace('#define CUSTOM_VERTEX_MAIN_END', (this.CustomParts.Vertex_MainEnd ? this.CustomParts.Vertex_MainEnd : "")); + if (this.CustomParts.Vertex_After_WorldPosComputed) { + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"] = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"].replace('#define CUSTOM_VERTEX_UPDATE_WORLDPOS', this.CustomParts.Vertex_After_WorldPosComputed); + } + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"] = this.FragmentShader + .replace('#define CUSTOM_FRAGMENT_BEGIN', (this.CustomParts.Fragment_Begin ? this.CustomParts.Fragment_Begin : "")) + .replace('#define CUSTOM_FRAGMENT_MAIN_BEGIN', (this.CustomParts.Fragment_MainBegin ? this.CustomParts.Fragment_MainBegin : "")) + .replace('#define CUSTOM_FRAGMENT_DEFINITIONS', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Fragment_Definitions ? this.CustomParts.Fragment_Definitions : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE', (this.CustomParts.Fragment_Custom_Diffuse ? this.CustomParts.Fragment_Custom_Diffuse : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_ALPHA', (this.CustomParts.Fragment_Custom_Alpha ? this.CustomParts.Fragment_Custom_Alpha : "")) + .replace('#define CUSTOM_FRAGMENT_BEFORE_LIGHTS', (this.CustomParts.Fragment_Before_Lights ? this.CustomParts.Fragment_Before_Lights : "")) + .replace('#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR', (this.CustomParts.Fragment_Before_FragColor ? this.CustomParts.Fragment_Before_FragColor : "")); + if (this.CustomParts.Fragment_Before_Fog) { + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"] = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"].replace('#define CUSTOM_FRAGMENT_BEFORE_FOG', this.CustomParts.Fragment_Before_Fog); + } + this._isCreatedShader = true; + this._createdShaderName = name; + return name; + }; + CustomMaterial.prototype.AddUniform = function (name, kind, param) { + if (!this._customUniform) { + this._customUniform = new Array(); + this._newUniforms = new Array(); + this._newSamplerInstances = {}; + this._newUniformInstances = {}; + } + if (param) { + if (kind.indexOf("sampler") != -1) { + this._newSamplerInstances[kind + "-" + name] = param; + } + else { + this._newUniformInstances[kind + "-" + name] = param; + } + } + this._customUniform.push("uniform " + kind + " " + name + ";"); + this._newUniforms.push(name); + return this; + }; + CustomMaterial.prototype.AddAttribute = function (name) { + if (!this._customAttributes) { + this._customAttributes = []; + } + this._customAttributes.push(name); + return this; + }; + CustomMaterial.prototype.Fragment_Begin = function (shaderPart) { + this.CustomParts.Fragment_Begin = shaderPart; + return this; + }; + CustomMaterial.prototype.Fragment_Definitions = function (shaderPart) { + this.CustomParts.Fragment_Definitions = shaderPart; + return this; + }; + CustomMaterial.prototype.Fragment_MainBegin = function (shaderPart) { + this.CustomParts.Fragment_MainBegin = shaderPart; + return this; + }; + CustomMaterial.prototype.Fragment_Custom_Diffuse = function (shaderPart) { + this.CustomParts.Fragment_Custom_Diffuse = shaderPart.replace("result", "diffuseColor"); + return this; + }; + CustomMaterial.prototype.Fragment_Custom_Alpha = function (shaderPart) { + this.CustomParts.Fragment_Custom_Alpha = shaderPart.replace("result", "alpha"); + return this; + }; + CustomMaterial.prototype.Fragment_Before_Lights = function (shaderPart) { + this.CustomParts.Fragment_Before_Lights = shaderPart; + return this; + }; + CustomMaterial.prototype.Fragment_Before_Fog = function (shaderPart) { + this.CustomParts.Fragment_Before_Fog = shaderPart; + return this; + }; + CustomMaterial.prototype.Fragment_Before_FragColor = function (shaderPart) { + this.CustomParts.Fragment_Before_FragColor = shaderPart.replace("result", "color"); + return this; + }; + CustomMaterial.prototype.Vertex_Begin = function (shaderPart) { + this.CustomParts.Vertex_Begin = shaderPart; + return this; + }; + CustomMaterial.prototype.Vertex_Definitions = function (shaderPart) { + this.CustomParts.Vertex_Definitions = shaderPart; + return this; + }; + CustomMaterial.prototype.Vertex_MainBegin = function (shaderPart) { + this.CustomParts.Vertex_MainBegin = shaderPart; + return this; + }; + CustomMaterial.prototype.Vertex_Before_PositionUpdated = function (shaderPart) { + this.CustomParts.Vertex_Before_PositionUpdated = shaderPart.replace("result", "positionUpdated"); + return this; + }; + CustomMaterial.prototype.Vertex_Before_NormalUpdated = function (shaderPart) { + this.CustomParts.Vertex_Before_NormalUpdated = shaderPart.replace("result", "normalUpdated"); + return this; + }; + CustomMaterial.prototype.Vertex_After_WorldPosComputed = function (shaderPart) { + this.CustomParts.Vertex_After_WorldPosComputed = shaderPart; + return this; + }; + CustomMaterial.prototype.Vertex_MainEnd = function (shaderPart) { + this.CustomParts.Vertex_MainEnd = shaderPart; + return this; + }; + CustomMaterial.ShaderIndexer = 1; + return CustomMaterial; +}(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["StandardMaterial"])); + +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.CustomMaterial"] = CustomMaterial; + + +/***/ }), + +/***/ "./custom/index.ts": +/*!*************************!*\ + !*** ./custom/index.ts ***! + \*************************/ +/*! exports provided: CustomShaderStructure, ShaderSpecialParts, CustomMaterial, ShaderAlebdoParts, PBRCustomMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _customMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./customMaterial */ "./custom/customMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomShaderStructure", function() { return _customMaterial__WEBPACK_IMPORTED_MODULE_0__["CustomShaderStructure"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderSpecialParts", function() { return _customMaterial__WEBPACK_IMPORTED_MODULE_0__["ShaderSpecialParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomMaterial", function() { return _customMaterial__WEBPACK_IMPORTED_MODULE_0__["CustomMaterial"]; }); + +/* harmony import */ var _pbrCustomMaterial__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pbrCustomMaterial */ "./custom/pbrCustomMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderAlebdoParts", function() { return _pbrCustomMaterial__WEBPACK_IMPORTED_MODULE_1__["ShaderAlebdoParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PBRCustomMaterial", function() { return _pbrCustomMaterial__WEBPACK_IMPORTED_MODULE_1__["PBRCustomMaterial"]; }); + + + + + +/***/ }), + +/***/ "./custom/pbrCustomMaterial.ts": +/*!*************************************!*\ + !*** ./custom/pbrCustomMaterial.ts ***! + \*************************************/ +/*! exports provided: ShaderAlebdoParts, PBRCustomMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShaderAlebdoParts", function() { return ShaderAlebdoParts; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PBRCustomMaterial", function() { return PBRCustomMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__); + + + + +var ShaderAlebdoParts = /** @class */ (function () { + function ShaderAlebdoParts() { + } + return ShaderAlebdoParts; +}()); + +var PBRCustomMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PBRCustomMaterial, _super); + function PBRCustomMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.CustomParts = new ShaderAlebdoParts(); + _this.customShaderNameResolve = _this.Builder; + _this.FragmentShader = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore["pbrPixelShader"]; + _this.VertexShader = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore["pbrVertexShader"]; + _this.FragmentShader = _this.FragmentShader.replace(/#include/g, babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].IncludesShadersStore["pbrBlockAlbedoOpacity"]); + _this.FragmentShader = _this.FragmentShader.replace(/#include/g, babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].IncludesShadersStore["pbrBlockReflectivity"]); + _this.FragmentShader = _this.FragmentShader.replace(/#include/g, babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].IncludesShadersStore["pbrBlockFinalColorComposition"]); + return _this; + } + PBRCustomMaterial.prototype.AttachAfterBind = function (mesh, effect) { + if (this._newUniformInstances) { + for (var el in this._newUniformInstances) { + var ea = el.toString().split('-'); + if (ea[0] == 'vec2') { + effect.setVector2(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'vec3') { + effect.setVector3(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'vec4') { + effect.setVector4(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'mat4') { + effect.setMatrix(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'float') { + effect.setFloat(ea[1], this._newUniformInstances[el]); + } + } + } + if (this._newSamplerInstances) { + for (var el in this._newSamplerInstances) { + var ea = el.toString().split('-'); + if (ea[0] == 'sampler2D' && this._newSamplerInstances[el].isReady && this._newSamplerInstances[el].isReady()) { + effect.setTexture(ea[1], this._newSamplerInstances[el]); + } + } + } + }; + PBRCustomMaterial.prototype.ReviewUniform = function (name, arr) { + if (name == "uniform" && this._newUniforms) { + for (var ind = 0; ind < this._newUniforms.length; ind++) { + if (this._customUniform[ind].indexOf('sampler') == -1) { + arr.push(this._newUniforms[ind]); + } + } + } + if (name == "sampler" && this._newUniforms) { + for (var ind = 0; ind < this._newUniforms.length; ind++) { + if (this._customUniform[ind].indexOf('sampler') != -1) { + arr.push(this._newUniforms[ind]); + } + } + } + return arr; + }; + PBRCustomMaterial.prototype.Builder = function (shaderName, uniforms, uniformBuffers, samplers, defines, attributes) { + var _this = this; + if (attributes && this._customAttributes && this._customAttributes.length > 0) { + attributes.push.apply(attributes, this._customAttributes); + } + this.ReviewUniform("uniform", uniforms); + this.ReviewUniform("sampler", samplers); + if (this._isCreatedShader) { + return this._createdShaderName; + } + this._isCreatedShader = false; + PBRCustomMaterial.ShaderIndexer++; + var name = "custom_" + PBRCustomMaterial.ShaderIndexer; + var fn_afterBind = this._afterBind.bind(this); + this._afterBind = function (m, e) { + if (!e) { + return; + } + _this.AttachAfterBind(m, e); + try { + fn_afterBind(m, e); + } + catch (e) { } + }; + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"] = this.VertexShader + .replace('#define CUSTOM_VERTEX_BEGIN', (this.CustomParts.Vertex_Begin ? this.CustomParts.Vertex_Begin : "")) + .replace('#define CUSTOM_VERTEX_DEFINITIONS', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Vertex_Definitions ? this.CustomParts.Vertex_Definitions : "")) + .replace('#define CUSTOM_VERTEX_MAIN_BEGIN', (this.CustomParts.Vertex_MainBegin ? this.CustomParts.Vertex_MainBegin : "")) + .replace('#define CUSTOM_VERTEX_UPDATE_POSITION', (this.CustomParts.Vertex_Before_PositionUpdated ? this.CustomParts.Vertex_Before_PositionUpdated : "")) + .replace('#define CUSTOM_VERTEX_UPDATE_NORMAL', (this.CustomParts.Vertex_Before_NormalUpdated ? this.CustomParts.Vertex_Before_NormalUpdated : "")) + .replace('#define CUSTOM_VERTEX_MAIN_END', (this.CustomParts.Vertex_MainEnd ? this.CustomParts.Vertex_MainEnd : "")); + if (this.CustomParts.Vertex_After_WorldPosComputed) { + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"] = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"].replace('#define CUSTOM_VERTEX_UPDATE_WORLDPOS', this.CustomParts.Vertex_After_WorldPosComputed); + } + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"] = this.FragmentShader + .replace('#define CUSTOM_FRAGMENT_BEGIN', (this.CustomParts.Fragment_Begin ? this.CustomParts.Fragment_Begin : "")) + .replace('#define CUSTOM_FRAGMENT_MAIN_BEGIN', (this.CustomParts.Fragment_MainBegin ? this.CustomParts.Fragment_MainBegin : "")) + .replace('#define CUSTOM_FRAGMENT_DEFINITIONS', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Fragment_Definitions ? this.CustomParts.Fragment_Definitions : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_ALBEDO', (this.CustomParts.Fragment_Custom_Albedo ? this.CustomParts.Fragment_Custom_Albedo : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_ALPHA', (this.CustomParts.Fragment_Custom_Alpha ? this.CustomParts.Fragment_Custom_Alpha : "")) + .replace('#define CUSTOM_FRAGMENT_BEFORE_LIGHTS', (this.CustomParts.Fragment_Before_Lights ? this.CustomParts.Fragment_Before_Lights : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_METALLICROUGHNESS', (this.CustomParts.Fragment_Custom_MetallicRoughness ? this.CustomParts.Fragment_Custom_MetallicRoughness : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_MICROSURFACE', (this.CustomParts.Fragment_Custom_MicroSurface ? this.CustomParts.Fragment_Custom_MicroSurface : "")) + .replace('#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR', (this.CustomParts.Fragment_Before_FragColor ? this.CustomParts.Fragment_Before_FragColor : "")); + if (this.CustomParts.Fragment_Before_Fog) { + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"] = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"].replace('#define CUSTOM_FRAGMENT_BEFORE_FOG', this.CustomParts.Fragment_Before_Fog); + } + this._isCreatedShader = true; + this._createdShaderName = name; + return name; + }; + PBRCustomMaterial.prototype.AddUniform = function (name, kind, param) { + if (!this._customUniform) { + this._customUniform = new Array(); + this._newUniforms = new Array(); + this._newSamplerInstances = {}; + this._newUniformInstances = {}; + } + if (param) { + if (kind.indexOf("sampler") != -1) { + this._newSamplerInstances[kind + "-" + name] = param; + } + else { + this._newUniformInstances[kind + "-" + name] = param; + } + } + this._customUniform.push("uniform " + kind + " " + name + ";"); + this._newUniforms.push(name); + return this; + }; + PBRCustomMaterial.prototype.AddAttribute = function (name) { + if (!this._customAttributes) { + this._customAttributes = []; + } + this._customAttributes.push(name); + return this; + }; + PBRCustomMaterial.prototype.Fragment_Begin = function (shaderPart) { + this.CustomParts.Fragment_Begin = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Definitions = function (shaderPart) { + this.CustomParts.Fragment_Definitions = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_MainBegin = function (shaderPart) { + this.CustomParts.Fragment_MainBegin = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Custom_Albedo = function (shaderPart) { + this.CustomParts.Fragment_Custom_Albedo = shaderPart.replace("result", "surfaceAlbedo"); + return this; + }; + PBRCustomMaterial.prototype.Fragment_Custom_Alpha = function (shaderPart) { + this.CustomParts.Fragment_Custom_Alpha = shaderPart.replace("result", "alpha"); + return this; + }; + PBRCustomMaterial.prototype.Fragment_Before_Lights = function (shaderPart) { + this.CustomParts.Fragment_Before_Lights = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Custom_MetallicRoughness = function (shaderPart) { + this.CustomParts.Fragment_Custom_MetallicRoughness = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Custom_MicroSurface = function (shaderPart) { + this.CustomParts.Fragment_Custom_MicroSurface = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Before_Fog = function (shaderPart) { + this.CustomParts.Fragment_Before_Fog = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Before_FragColor = function (shaderPart) { + this.CustomParts.Fragment_Before_FragColor = shaderPart.replace("result", "color"); + return this; + }; + PBRCustomMaterial.prototype.Vertex_Begin = function (shaderPart) { + this.CustomParts.Vertex_Begin = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Vertex_Definitions = function (shaderPart) { + this.CustomParts.Vertex_Definitions = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Vertex_MainBegin = function (shaderPart) { + this.CustomParts.Vertex_MainBegin = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Vertex_Before_PositionUpdated = function (shaderPart) { + this.CustomParts.Vertex_Before_PositionUpdated = shaderPart.replace("result", "positionUpdated"); + return this; + }; + PBRCustomMaterial.prototype.Vertex_Before_NormalUpdated = function (shaderPart) { + this.CustomParts.Vertex_Before_NormalUpdated = shaderPart.replace("result", "normalUpdated"); + return this; + }; + PBRCustomMaterial.prototype.Vertex_After_WorldPosComputed = function (shaderPart) { + this.CustomParts.Vertex_After_WorldPosComputed = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Vertex_MainEnd = function (shaderPart) { + this.CustomParts.Vertex_MainEnd = shaderPart; + return this; + }; + PBRCustomMaterial.ShaderIndexer = 1; + return PBRCustomMaterial; +}(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["PBRMaterial"])); + +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.PBRCustomMaterial"] = PBRCustomMaterial; + + +/***/ }), + +/***/ "./fire/fire.fragment.ts": +/*!*******************************!*\ + !*** ./fire/fire.fragment.ts ***! + \*******************************/ +/*! exports provided: firePixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firePixelShader", function() { return firePixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + +var name = 'firePixelShader'; +var shader = "precision highp float;\n\nuniform vec3 vEyePosition;\n\nvarying vec3 vPositionW;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n\nuniform sampler2D distortionSampler;\nuniform sampler2D opacitySampler;\n#ifdef DIFFUSE\nvarying vec2 vDistortionCoords1;\nvarying vec2 vDistortionCoords2;\nvarying vec2 vDistortionCoords3;\n#endif\n#include\n\n#include\nvec4 bx2(vec4 x)\n{\nreturn vec4(2.0)*x-vec4(1.0);\n}\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\n\nfloat alpha=1.0;\n#ifdef DIFFUSE\n\nconst float distortionAmount0=0.092;\nconst float distortionAmount1=0.092;\nconst float distortionAmount2=0.092;\nvec2 heightAttenuation=vec2(0.3,0.39);\nvec4 noise0=texture2D(distortionSampler,vDistortionCoords1);\nvec4 noise1=texture2D(distortionSampler,vDistortionCoords2);\nvec4 noise2=texture2D(distortionSampler,vDistortionCoords3);\nvec4 noiseSum=bx2(noise0)*distortionAmount0+bx2(noise1)*distortionAmount1+bx2(noise2)*distortionAmount2;\nvec4 perturbedBaseCoords=vec4(vDiffuseUV,0.0,1.0)+noiseSum*(vDiffuseUV.y*heightAttenuation.x+heightAttenuation.y);\nvec4 opacityColor=texture2D(opacitySampler,perturbedBaseCoords.xy);\n#ifdef ALPHATEST\nif (opacityColor.r<0.1)\ndiscard;\n#endif\n#include\nbaseColor=texture2D(diffuseSampler,perturbedBaseCoords.xy)*2.0;\nbaseColor*=opacityColor;\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\nvec3 diffuseBase=vec3(1.0,1.0,1.0);\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n\nvec4 color=vec4(baseColor.rgb,alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var firePixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./fire/fire.vertex.ts": +/*!*****************************!*\ + !*** ./fire/fire.vertex.ts ***! + \*****************************/ +/*! exports provided: fireVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fireVertexShader", function() { return fireVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + +var name = 'fireVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n\nuniform float time;\nuniform float speed;\n#ifdef DIFFUSE\nvarying vec2 vDistortionCoords1;\nvarying vec2 vDistortionCoords2;\nvarying vec2 vDistortionCoords3;\n#endif\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n\n#ifdef DIFFUSE\nvDiffuseUV=uv;\nvDiffuseUV.y-=0.2;\n#endif\n\n#include\n\n#include\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n#ifdef DIFFUSE\n\nvec3 layerSpeed=vec3(-0.2,-0.52,-0.1)*speed;\nvDistortionCoords1.x=uv.x;\nvDistortionCoords1.y=uv.y+layerSpeed.x*time/1000.0;\nvDistortionCoords2.x=uv.x;\nvDistortionCoords2.y=uv.y+layerSpeed.y*time/1000.0;\nvDistortionCoords3.x=uv.x;\nvDistortionCoords3.y=uv.y+layerSpeed.z*time/1000.0;\n#endif\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var fireVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./fire/fireMaterial.ts": +/*!******************************!*\ + !*** ./fire/fireMaterial.ts ***! + \******************************/ +/*! exports provided: FireMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FireMaterial", function() { return FireMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _fire_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fire.fragment */ "./fire/fire.fragment.ts"); +/* harmony import */ var _fire_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fire.vertex */ "./fire/fire.vertex.ts"); + + + + + + + + + + + + + + + +var FireMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FireMaterialDefines, _super); + function FireMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.UV1 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.BonesPerMesh = 0; + _this.NUM_BONE_INFLUENCERS = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return FireMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var FireMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FireMaterial, _super); + function FireMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.speed = 1.0; + _this._scaledDiffuse = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](); + _this._lastTime = 0; + return _this; + } + FireMaterial.prototype.needAlphaBlending = function () { + return false; + }; + FireMaterial.prototype.needAlphaTesting = function () { + return true; + }; + FireMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + FireMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new FireMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + } + defines.ALPHATEST = this._opacityTexture ? true : false; + // Misc. + if (defines._areMiscDirty) { + defines.POINTSIZE = (this.pointsCloud || scene.forcePointsCloud); + defines.FOG = (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE && this.fogEnabled); + } + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, false, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "fire"; + var join = defines.toString(); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: ["world", "view", "viewProjection", "vEyePosition", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix", + // Fire + "time", "speed" + ], + uniformBuffersNames: [], + samplers: ["diffuseSampler", + // Fire + "distortionSampler", "opacitySampler" + ], + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: null, + maxSimultaneousLights: 4, + transformFeedbackVaryings: null + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + FireMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this._diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this._diffuseTexture.getTextureMatrix()); + this._activeEffect.setTexture("distortionSampler", this._distortionTexture); + this._activeEffect.setTexture("opacitySampler", this._opacityTexture); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + this._activeEffect.setColor4("vDiffuseColor", this._scaledDiffuse, this.alpha * mesh.visibility); + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + // Time + this._lastTime += scene.getEngine().getDeltaTime(); + this._activeEffect.setFloat("time", this._lastTime); + // Speed + this._activeEffect.setFloat("speed", this.speed); + this._afterBind(mesh, this._activeEffect); + }; + FireMaterial.prototype.getAnimatables = function () { + var results = []; + if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) { + results.push(this._diffuseTexture); + } + if (this._distortionTexture && this._distortionTexture.animations && this._distortionTexture.animations.length > 0) { + results.push(this._distortionTexture); + } + if (this._opacityTexture && this._opacityTexture.animations && this._opacityTexture.animations.length > 0) { + results.push(this._opacityTexture); + } + return results; + }; + FireMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + if (this._distortionTexture) { + activeTextures.push(this._distortionTexture); + } + if (this._opacityTexture) { + activeTextures.push(this._opacityTexture); + } + return activeTextures; + }; + FireMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this._diffuseTexture === texture) { + return true; + } + if (this._distortionTexture === texture) { + return true; + } + if (this._opacityTexture === texture) { + return true; + } + return false; + }; + FireMaterial.prototype.getClassName = function () { + return "FireMaterial"; + }; + FireMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this._diffuseTexture) { + this._diffuseTexture.dispose(); + } + if (this._distortionTexture) { + this._distortionTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + FireMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new FireMaterial(name, _this.getScene()); }, this); + }; + FireMaterial.prototype.serialize = function () { + var serializationObject = _super.prototype.serialize.call(this); + serializationObject.customType = "BABYLON.FireMaterial"; + serializationObject.diffuseColor = this.diffuseColor.asArray(); + serializationObject.speed = this.speed; + if (this._diffuseTexture) { + serializationObject._diffuseTexture = this._diffuseTexture.serialize(); + } + if (this._distortionTexture) { + serializationObject._distortionTexture = this._distortionTexture.serialize(); + } + if (this._opacityTexture) { + serializationObject._opacityTexture = this._opacityTexture.serialize(); + } + return serializationObject; + }; + FireMaterial.Parse = function (source, scene, rootUrl) { + var material = new FireMaterial(source.name, scene); + material.diffuseColor = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"].FromArray(source.diffuseColor); + material.speed = source.speed; + material.alpha = source.alpha; + material.id = source.id; + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Tags"].AddTagsTo(material, source.tags); + material.backFaceCulling = source.backFaceCulling; + material.wireframe = source.wireframe; + if (source._diffuseTexture) { + material._diffuseTexture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].Parse(source._diffuseTexture, scene, rootUrl); + } + if (source._distortionTexture) { + material._distortionTexture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].Parse(source._distortionTexture, scene, rootUrl); + } + if (source._opacityTexture) { + material._opacityTexture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].Parse(source._opacityTexture, scene, rootUrl); + } + return material; + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], FireMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], FireMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("distortionTexture") + ], FireMaterial.prototype, "_distortionTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], FireMaterial.prototype, "distortionTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("opacityTexture") + ], FireMaterial.prototype, "_opacityTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], FireMaterial.prototype, "opacityTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])("diffuse") + ], FireMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FireMaterial.prototype, "speed", void 0); + return FireMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.FireMaterial"] = FireMaterial; + + +/***/ }), + +/***/ "./fire/index.ts": +/*!***********************!*\ + !*** ./fire/index.ts ***! + \***********************/ +/*! exports provided: FireMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _fireMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fireMaterial */ "./fire/fireMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FireMaterial", function() { return _fireMaterial__WEBPACK_IMPORTED_MODULE_0__["FireMaterial"]; }); + + + + +/***/ }), + +/***/ "./fur/fur.fragment.ts": +/*!*****************************!*\ + !*** ./fur/fur.fragment.ts ***! + \*****************************/ +/*! exports provided: furPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "furPixelShader", function() { return furPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'furPixelShader'; +var shader = "precision highp float;\n\nuniform vec3 vEyePosition;\nuniform vec4 vDiffuseColor;\n\nuniform vec4 furColor;\nuniform float furLength;\nvarying vec3 vPositionW;\nvarying float vfur_length;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n\n#ifdef HIGHLEVEL\nuniform float furOffset;\nuniform float furOcclusion;\nuniform sampler2D furTexture;\nvarying vec2 vFurUV;\n#endif\n#include\n#include\n#include\n#include\nfloat Rand(vec3 rv) {\nfloat x=dot(rv,vec3(12.9898,78.233,24.65487));\nreturn fract(sin(x)*43758.5453);\n}\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 baseColor=furColor;\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor*=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n#ifdef HIGHLEVEL\n\nvec4 furTextureColor=texture2D(furTexture,vec2(vFurUV.x,vFurUV.y));\nif (furTextureColor.a<=0.0 || furTextureColor.g[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase.rgb*baseColor.rgb,0.0,1.0);\n\n#ifdef HIGHLEVEL\nvec4 color=vec4(finalDiffuse,alpha);\n#else\nfloat r=vfur_length/furLength*0.5;\nvec4 color=vec4(finalDiffuse*(0.5+r),alpha);\n#endif\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var furPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./fur/fur.vertex.ts": +/*!***************************!*\ + !*** ./fur/fur.vertex.ts ***! + \***************************/ +/*! exports provided: furVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "furVertexShader", function() { return furVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'furVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\nattribute vec3 normal;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\nuniform float furLength;\nuniform float furAngle;\n#ifdef HIGHLEVEL\nuniform float furOffset;\nuniform vec3 furGravity;\nuniform float furTime;\nuniform float furSpacing;\nuniform float furDensity;\n#endif\n#ifdef HEIGHTMAP\nuniform sampler2D heightTexture;\n#endif\n#ifdef HIGHLEVEL\nvarying vec2 vFurUV;\n#endif\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\nvarying float vfur_length;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nfloat Rand(vec3 rv) {\nfloat x=dot(rv,vec3(12.9898,78.233,24.65487));\nreturn fract(sin(x)*43758.5453);\n}\nvoid main(void) {\n#include\n#include\n\nfloat r=Rand(position);\n#ifdef HEIGHTMAP\n#if __VERSION__>100\nvfur_length=furLength*texture(heightTexture,uv).x;\n#else\nvfur_length=furLength*texture2D(heightTexture,uv).r;\n#endif\n#else\nvfur_length=(furLength*r);\n#endif\nvec3 tangent1=vec3(normal.y,-normal.x,0);\nvec3 tangent2=vec3(-normal.z,0,normal.x);\nr=Rand(tangent1*r);\nfloat J=(2.0+4.0*r);\nr=Rand(tangent2*r);\nfloat K=(2.0+2.0*r);\ntangent1=tangent1*J+tangent2*K;\ntangent1=normalize(tangent1);\nvec3 newPosition=position+normal*vfur_length*cos(furAngle)+tangent1*vfur_length*sin(furAngle);\n#ifdef HIGHLEVEL\n\nvec3 forceDirection=vec3(0.0,0.0,0.0);\nforceDirection.x=sin(furTime+position.x*0.05)*0.2;\nforceDirection.y=cos(furTime*0.7+position.y*0.04)*0.2;\nforceDirection.z=sin(furTime*0.7+position.z*0.04)*0.2;\nvec3 displacement=vec3(0.0,0.0,0.0);\ndisplacement=furGravity+forceDirection;\nfloat displacementFactor=pow(furOffset,3.0);\nvec3 aNormal=normal;\naNormal.xyz+=displacement*displacementFactor;\nnewPosition=vec3(newPosition.x,newPosition.y,newPosition.z)+(normalize(aNormal)*furOffset*furSpacing);\n#endif\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\ngl_Position=viewProjection*finalWorld*vec4(newPosition,1.0);\nvec4 worldPos=finalWorld*vec4(newPosition,1.0);\nvPositionW=vec3(worldPos);\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#ifdef HIGHLEVEL\nvFurUV=vDiffuseUV*furDensity;\n#endif\n#else\n#ifdef HIGHLEVEL\nvFurUV=uv*furDensity;\n#endif\n#endif\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var furVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./fur/furMaterial.ts": +/*!****************************!*\ + !*** ./fur/furMaterial.ts ***! + \****************************/ +/*! exports provided: FurMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FurMaterial", function() { return FurMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _fur_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fur.fragment */ "./fur/fur.fragment.ts"); +/* harmony import */ var _fur_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fur.vertex */ "./fur/fur.vertex.ts"); + + + + + + + + + + + + + + + + + +var FurMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FurMaterialDefines, _super); + function FurMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.HEIGHTMAP = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.HIGHLEVEL = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return FurMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var FurMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FurMaterial, _super); + function FurMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.furLength = 1; + _this.furAngle = 0; + _this.furColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0.44, 0.21, 0.02); + _this.furOffset = 0.0; + _this.furSpacing = 12; + _this.furGravity = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, 0, 0); + _this.furSpeed = 100; + _this.furDensity = 20; + _this.furOcclusion = 0.0; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + _this.highLevelFur = true; + _this._furTime = 0; + return _this; + } + Object.defineProperty(FurMaterial.prototype, "furTime", { + get: function () { + return this._furTime; + }, + set: function (furTime) { + this._furTime = furTime; + }, + enumerable: false, + configurable: true + }); + FurMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + FurMaterial.prototype.needAlphaTesting = function () { + return false; + }; + FurMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + FurMaterial.prototype.updateFur = function () { + for (var i = 1; i < this._meshes.length; i++) { + var offsetFur = this._meshes[i].material; + offsetFur.furLength = this.furLength; + offsetFur.furAngle = this.furAngle; + offsetFur.furGravity = this.furGravity; + offsetFur.furSpacing = this.furSpacing; + offsetFur.furSpeed = this.furSpeed; + offsetFur.furColor = this.furColor; + offsetFur.diffuseTexture = this.diffuseTexture; + offsetFur.furTexture = this.furTexture; + offsetFur.highLevelFur = this.highLevelFur; + offsetFur.furTime = this.furTime; + offsetFur.furDensity = this.furDensity; + } + }; + // Methods + FurMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new FurMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + if (scene.texturesEnabled) { + if (this.diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this.diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + if (this.heightTexture && engine.getCaps().maxVertexTextureImageUnits) { + if (!this.heightTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.HEIGHTMAP = true; + } + } + } + } + // High level + if (this.highLevelFur !== defines.HIGHLEVEL) { + defines.HIGHLEVEL = true; + defines.markAsUnprocessed(); + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "fur"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix", + "furLength", "furAngle", "furColor", "furOffset", "furGravity", "furTime", "furSpacing", "furDensity", "furOcclusion" + ]; + var samplers = ["diffuseSampler", + "heightTexture", "furTexture" + ]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights } + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + FurMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (scene.getCachedMaterial() !== this) { + // Textures + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this._diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this._diffuseTexture.getTextureMatrix()); + } + if (this._heightTexture) { + this._activeEffect.setTexture("heightTexture", this._heightTexture); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._activeEffect.setFloat("furLength", this.furLength); + this._activeEffect.setFloat("furAngle", this.furAngle); + this._activeEffect.setColor4("furColor", this.furColor, 1.0); + if (this.highLevelFur) { + this._activeEffect.setVector3("furGravity", this.furGravity); + this._activeEffect.setFloat("furOffset", this.furOffset); + this._activeEffect.setFloat("furSpacing", this.furSpacing); + this._activeEffect.setFloat("furDensity", this.furDensity); + this._activeEffect.setFloat("furOcclusion", this.furOcclusion); + this._furTime += this.getScene().getEngine().getDeltaTime() / this.furSpeed; + this._activeEffect.setFloat("furTime", this._furTime); + this._activeEffect.setTexture("furTexture", this.furTexture); + } + this._afterBind(mesh, this._activeEffect); + }; + FurMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.diffuseTexture && this.diffuseTexture.animations && this.diffuseTexture.animations.length > 0) { + results.push(this.diffuseTexture); + } + if (this.heightTexture && this.heightTexture.animations && this.heightTexture.animations.length > 0) { + results.push(this.heightTexture); + } + return results; + }; + FurMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + if (this._heightTexture) { + activeTextures.push(this._heightTexture); + } + return activeTextures; + }; + FurMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this.diffuseTexture === texture) { + return true; + } + if (this._heightTexture === texture) { + return true; + } + return false; + }; + FurMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.diffuseTexture) { + this.diffuseTexture.dispose(); + } + if (this._meshes) { + for (var i = 1; i < this._meshes.length; i++) { + var mat = this._meshes[i].material; + if (mat) { + mat.dispose(forceDisposeEffect); + } + this._meshes[i].dispose(); + } + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + FurMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new FurMaterial(name, _this.getScene()); }, this); + }; + FurMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.FurMaterial"; + if (this._meshes) { + serializationObject.sourceMeshName = this._meshes[0].name; + serializationObject.quality = this._meshes.length; + } + return serializationObject; + }; + FurMaterial.prototype.getClassName = function () { + return "FurMaterial"; + }; + // Statics + FurMaterial.Parse = function (source, scene, rootUrl) { + var material = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new FurMaterial(source.name, scene); }, source, scene, rootUrl); + if (source.sourceMeshName && material.highLevelFur) { + scene.executeWhenReady(function () { + var sourceMesh = scene.getMeshByName(source.sourceMeshName); + if (sourceMesh) { + var furTexture = FurMaterial.GenerateTexture("Fur Texture", scene); + material.furTexture = furTexture; + FurMaterial.FurifyMesh(sourceMesh, source.quality); + } + }); + } + return material; + }; + FurMaterial.GenerateTexture = function (name, scene) { + // Generate fur textures + var texture = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["DynamicTexture"]("FurTexture " + name, 256, scene, true); + var context = texture.getContext(); + for (var i = 0; i < 20000; ++i) { + context.fillStyle = "rgba(255, " + Math.floor(Math.random() * 255) + ", " + Math.floor(Math.random() * 255) + ", 1)"; + context.fillRect((Math.random() * texture.getSize().width), (Math.random() * texture.getSize().height), 2, 2); + } + texture.update(false); + texture.wrapU = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].WRAP_ADDRESSMODE; + texture.wrapV = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].WRAP_ADDRESSMODE; + return texture; + }; + // Creates and returns an array of meshes used as shells for the Fur Material + // that can be disposed later in your code + // The quality is in interval [0, 100] + FurMaterial.FurifyMesh = function (sourceMesh, quality) { + var meshes = [sourceMesh]; + var mat = sourceMesh.material; + var i; + if (!(mat instanceof FurMaterial)) { + throw "The material of the source mesh must be a Fur Material"; + } + for (i = 1; i < quality; i++) { + var offsetFur = new FurMaterial(mat.name + i, sourceMesh.getScene()); + sourceMesh.getScene().materials.pop(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Tags"].EnableFor(offsetFur); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Tags"].AddTagsTo(offsetFur, "furShellMaterial"); + offsetFur.furLength = mat.furLength; + offsetFur.furAngle = mat.furAngle; + offsetFur.furGravity = mat.furGravity; + offsetFur.furSpacing = mat.furSpacing; + offsetFur.furSpeed = mat.furSpeed; + offsetFur.furColor = mat.furColor; + offsetFur.diffuseTexture = mat.diffuseTexture; + offsetFur.furOffset = i / quality; + offsetFur.furTexture = mat.furTexture; + offsetFur.highLevelFur = mat.highLevelFur; + offsetFur.furTime = mat.furTime; + offsetFur.furDensity = mat.furDensity; + var offsetMesh = sourceMesh.clone(sourceMesh.name + i); + offsetMesh.material = offsetFur; + offsetMesh.skeleton = sourceMesh.skeleton; + offsetMesh.position = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Zero(); + meshes.push(offsetMesh); + } + for (i = 1; i < meshes.length; i++) { + meshes[i].parent = sourceMesh; + } + sourceMesh.material._meshes = meshes; + return meshes; + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], FurMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], FurMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("heightTexture") + ], FurMaterial.prototype, "_heightTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], FurMaterial.prototype, "heightTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], FurMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furLength", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furAngle", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], FurMaterial.prototype, "furColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furOffset", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furSpacing", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsVector3"])() + ], FurMaterial.prototype, "furGravity", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furSpeed", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furDensity", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furOcclusion", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], FurMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], FurMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], FurMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], FurMaterial.prototype, "maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "highLevelFur", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furTime", null); + return FurMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.FurMaterial"] = FurMaterial; + + +/***/ }), + +/***/ "./fur/index.ts": +/*!**********************!*\ + !*** ./fur/index.ts ***! + \**********************/ +/*! exports provided: FurMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _furMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./furMaterial */ "./fur/furMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FurMaterial", function() { return _furMaterial__WEBPACK_IMPORTED_MODULE_0__["FurMaterial"]; }); + + + + +/***/ }), + +/***/ "./gradient/gradient.fragment.ts": +/*!***************************************!*\ + !*** ./gradient/gradient.fragment.ts ***! + \***************************************/ +/*! exports provided: gradientPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gradientPixelShader", function() { return gradientPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'gradientPixelShader'; +var shader = "precision highp float;\n\nuniform vec3 vEyePosition;\n\nuniform vec4 topColor;\nuniform vec4 bottomColor;\nuniform float offset;\nuniform float scale;\nuniform float smoothness;\n\nvarying vec3 vPositionW;\nvarying vec3 vPosition;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0]\n#include<__decl__lightFragment>[1]\n#include<__decl__lightFragment>[2]\n#include<__decl__lightFragment>[3]\n#include\n#include\n#include\n\n#include\nvoid main(void) {\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\nfloat h=vPosition.y*scale+offset;\nfloat mysmoothness=clamp(smoothness,0.01,max(smoothness,10.));\nvec4 baseColor=mix(bottomColor,topColor,max(pow(max(h,0.0),mysmoothness),0.0));\n\nvec3 diffuseColor=baseColor.rgb;\n\nfloat alpha=baseColor.a;\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n\n#ifdef EMISSIVE\nvec3 diffuseBase=baseColor.rgb;\n#else\nvec3 diffuseBase=vec3(0.,0.,0.);\n#endif\nlightingInfo info;\nfloat shadow=1.;\nfloat glossiness=0.;\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n\nvec4 color=vec4(finalDiffuse,alpha);\n#include\ngl_FragColor=color;\n#include\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var gradientPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./gradient/gradient.vertex.ts": +/*!*************************************!*\ + !*** ./gradient/gradient.vertex.ts ***! + \*************************************/ +/*! exports provided: gradientVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gradientVertexShader", function() { return gradientVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'gradientVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\nvarying vec3 vPosition;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\nvPosition=position;\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var gradientVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./gradient/gradientMaterial.ts": +/*!**************************************!*\ + !*** ./gradient/gradientMaterial.ts ***! + \**************************************/ +/*! exports provided: GradientMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GradientMaterial", function() { return GradientMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _gradient_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gradient.fragment */ "./gradient/gradient.fragment.ts"); +/* harmony import */ var _gradient_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gradient.vertex */ "./gradient/gradient.vertex.ts"); + + + + + + + + + + + + +var GradientMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GradientMaterialDefines, _super); + function GradientMaterialDefines() { + var _this = _super.call(this) || this; + _this.EMISSIVE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return GradientMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var GradientMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GradientMaterial, _super); + function GradientMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this._maxSimultaneousLights = 4; + // The gradient top color, red by default + _this.topColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 0, 0); + _this.topColorAlpha = 1.0; + // The gradient top color, blue by default + _this.bottomColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0, 0, 1); + _this.bottomColorAlpha = 1.0; + // Gradient offset + _this.offset = 0; + _this.scale = 1.0; + _this.smoothness = 1.0; + _this._disableLighting = false; + return _this; + } + GradientMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0 || this.topColorAlpha < 1.0 || this.bottomColorAlpha < 1.0); + }; + GradientMaterial.prototype.needAlphaTesting = function () { + return true; + }; + GradientMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + GradientMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new GradientMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + defines.EMISSIVE = this._disableLighting; + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, false, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "gradient"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", + "vFogInfos", "vFogColor", "pointSize", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", + "topColor", "bottomColor", "offset", "smoothness", "scale" + ]; + var samplers = []; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: 4 + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: 4 } + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + GradientMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, effect); + if (this._mustRebind(scene, effect)) { + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(effect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._activeEffect.setColor4("topColor", this.topColor, this.topColorAlpha); + this._activeEffect.setColor4("bottomColor", this.bottomColor, this.bottomColorAlpha); + this._activeEffect.setFloat("offset", this.offset); + this._activeEffect.setFloat("scale", this.scale); + this._activeEffect.setFloat("smoothness", this.smoothness); + this._afterBind(mesh, this._activeEffect); + }; + GradientMaterial.prototype.getAnimatables = function () { + return []; + }; + GradientMaterial.prototype.dispose = function (forceDisposeEffect) { + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + GradientMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new GradientMaterial(name, _this.getScene()); }, this); + }; + GradientMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.GradientMaterial"; + return serializationObject; + }; + GradientMaterial.prototype.getClassName = function () { + return "GradientMaterial"; + }; + // Statics + GradientMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new GradientMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], GradientMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], GradientMaterial.prototype, "maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], GradientMaterial.prototype, "topColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GradientMaterial.prototype, "topColorAlpha", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], GradientMaterial.prototype, "bottomColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GradientMaterial.prototype, "bottomColorAlpha", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GradientMaterial.prototype, "offset", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GradientMaterial.prototype, "scale", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GradientMaterial.prototype, "smoothness", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], GradientMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], GradientMaterial.prototype, "disableLighting", void 0); + return GradientMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.GradientMaterial"] = GradientMaterial; + + +/***/ }), + +/***/ "./gradient/index.ts": +/*!***************************!*\ + !*** ./gradient/index.ts ***! + \***************************/ +/*! exports provided: GradientMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _gradientMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gradientMaterial */ "./gradient/gradientMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GradientMaterial", function() { return _gradientMaterial__WEBPACK_IMPORTED_MODULE_0__["GradientMaterial"]; }); + + + + +/***/ }), + +/***/ "./grid/grid.fragment.ts": +/*!*******************************!*\ + !*** ./grid/grid.fragment.ts ***! + \*******************************/ +/*! exports provided: gridPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridPixelShader", function() { return gridPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + +var name = 'gridPixelShader'; +var shader = "#extension GL_OES_standard_derivatives : enable\n#define SQRT2 1.41421356\n#define PI 3.14159\nprecision highp float;\nuniform vec3 mainColor;\nuniform vec3 lineColor;\nuniform vec4 gridControl;\nuniform vec3 gridOffset;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\n#include\n\n#ifdef OPACITY\nvarying vec2 vOpacityUV;\nuniform sampler2D opacitySampler;\nuniform vec2 vOpacityInfos;\n#endif\nfloat getVisibility(float position) {\n\nfloat majorGridFrequency=gridControl.y;\nif (floor(position+0.5) == floor(position/majorGridFrequency+0.5)*majorGridFrequency)\n{\nreturn 1.0;\n}\nreturn gridControl.z;\n}\nfloat getAnisotropicAttenuation(float differentialLength) {\nconst float maxNumberOfLines=10.0;\nreturn clamp(1.0/(differentialLength+1.0)-1.0/maxNumberOfLines,0.0,1.0);\n}\nfloat isPointOnLine(float position,float differentialLength) {\nfloat fractionPartOfPosition=position-floor(position+0.5);\nfractionPartOfPosition/=differentialLength;\nfractionPartOfPosition=clamp(fractionPartOfPosition,-1.,1.);\nfloat result=0.5+0.5*cos(fractionPartOfPosition*PI);\nreturn result;\n}\nfloat contributionOnAxis(float position) {\nfloat differentialLength=length(vec2(dFdx(position),dFdy(position)));\ndifferentialLength*=SQRT2;\n\nfloat result=isPointOnLine(position,differentialLength);\n\nfloat visibility=getVisibility(position);\nresult*=visibility;\n\nfloat anisotropicAttenuation=getAnisotropicAttenuation(differentialLength);\nresult*=anisotropicAttenuation;\nreturn result;\n}\nfloat normalImpactOnAxis(float x) {\nfloat normalImpact=clamp(1.0-3.0*abs(x*x*x),0.0,1.0);\nreturn normalImpact;\n}\nvoid main(void) {\n\nfloat gridRatio=gridControl.x;\nvec3 gridPos=(vPosition+gridOffset.xyz)/gridRatio;\n\nfloat x=contributionOnAxis(gridPos.x);\nfloat y=contributionOnAxis(gridPos.y);\nfloat z=contributionOnAxis(gridPos.z);\n\nvec3 normal=normalize(vNormal);\nx*=normalImpactOnAxis(normal.x);\ny*=normalImpactOnAxis(normal.y);\nz*=normalImpactOnAxis(normal.z);\n\nfloat grid=clamp(x+y+z,0.,1.);\n\nvec3 color=mix(mainColor,lineColor,grid);\n#ifdef FOG\n#include\n#endif\nfloat opacity=1.0;\n#ifdef TRANSPARENT\nopacity=clamp(grid,0.08,gridControl.w*grid);\n#endif\n#ifdef OPACITY\nopacity*=texture2D(opacitySampler,vOpacityUV).a;\n#endif\n\ngl_FragColor=vec4(color.rgb,opacity);\n#ifdef TRANSPARENT\n#ifdef PREMULTIPLYALPHA\ngl_FragColor.rgb*=opacity;\n#endif\n#else\n#endif\n#include\n}"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var gridPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./grid/grid.vertex.ts": +/*!*****************************!*\ + !*** ./grid/grid.vertex.ts ***! + \*****************************/ +/*! exports provided: gridVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridVertexShader", function() { return gridVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + +var name = 'gridVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\nattribute vec3 normal;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#include\n\nuniform mat4 projection;\nuniform mat4 view;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\n#include\n#ifdef OPACITY\nvarying vec2 vOpacityUV;\nuniform mat4 opacityMatrix;\nuniform vec2 vOpacityInfos;\n#endif\nvoid main(void) {\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\n#include\nvec4 cameraSpacePosition=view*worldPos;\ngl_Position=projection*cameraSpacePosition;\n#ifdef OPACITY\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\nif (vOpacityInfos.x == 0.)\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\nvPosition=position;\nvNormal=normal;\n}"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var gridVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./grid/gridMaterial.ts": +/*!******************************!*\ + !*** ./grid/gridMaterial.ts ***! + \******************************/ +/*! exports provided: GridMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridMaterial", function() { return GridMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _grid_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./grid.fragment */ "./grid/grid.fragment.ts"); +/* harmony import */ var _grid_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./grid.vertex */ "./grid/grid.vertex.ts"); + + + + + + + + + + + + +var GridMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GridMaterialDefines, _super); + function GridMaterialDefines() { + var _this = _super.call(this) || this; + _this.OPACITY = false; + _this.TRANSPARENT = false; + _this.FOG = false; + _this.PREMULTIPLYALPHA = false; + _this.UV1 = false; + _this.UV2 = false; + _this.INSTANCES = false; + _this.THIN_INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return GridMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +/** + * The grid materials allows you to wrap any shape with a grid. + * Colors are customizable. + */ +var GridMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GridMaterial, _super); + /** + * constructor + * @param name The name given to the material in order to identify it afterwards. + * @param scene The scene the material is used in. + */ + function GridMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + /** + * Main color of the grid (e.g. between lines) + */ + _this.mainColor = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"].Black(); + /** + * Color of the grid lines. + */ + _this.lineColor = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"].Teal(); + /** + * The scale of the grid compared to unit. + */ + _this.gridRatio = 1.0; + /** + * Allows setting an offset for the grid lines. + */ + _this.gridOffset = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Zero(); + /** + * The frequency of thicker lines. + */ + _this.majorUnitFrequency = 10; + /** + * The visibility of minor units in the grid. + */ + _this.minorUnitVisibility = 0.33; + /** + * The grid opacity outside of the lines. + */ + _this.opacity = 1.0; + /** + * Determine RBG output is premultiplied by alpha value. + */ + _this.preMultiplyAlpha = false; + _this._gridControl = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector4"](_this.gridRatio, _this.majorUnitFrequency, _this.minorUnitVisibility, _this.opacity); + return _this; + } + /** + * Returns wehter or not the grid requires alpha blending. + */ + GridMaterial.prototype.needAlphaBlending = function () { + return this.opacity < 1.0 || this._opacityTexture && this._opacityTexture.isReady(); + }; + GridMaterial.prototype.needAlphaBlendingForMesh = function (mesh) { + return this.needAlphaBlending(); + }; + GridMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new GridMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + if (defines.TRANSPARENT !== (this.opacity < 1.0)) { + defines.TRANSPARENT = !defines.TRANSPARENT; + defines.markAsUnprocessed(); + } + if (defines.PREMULTIPLYALPHA != this.preMultiplyAlpha) { + defines.PREMULTIPLYALPHA = !defines.PREMULTIPLYALPHA; + defines.markAsUnprocessed(); + } + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this._opacityTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].OpacityTextureEnabled) { + if (!this._opacityTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.OPACITY = true; + } + } + } + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, false, this.fogEnabled, false, defines); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, scene.getEngine(), defines, !!useInstances); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Attributes + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, false, false); + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind, babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind]; + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Defines + var join = defines.toString(); + subMesh.setEffect(scene.getEngine().createEffect("grid", attribs, ["projection", "mainColor", "lineColor", "gridControl", "gridOffset", "vFogInfos", "vFogColor", "world", "view", + "opacityMatrix", "vOpacityInfos"], ["opacitySampler"], join, undefined, this.onCompiled, this.onError), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + GridMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + if (!defines.INSTANCES || defines.THIN_INSTANCE) { + this.bindOnlyWorldMatrix(world); + } + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + this._activeEffect.setMatrix("projection", scene.getProjectionMatrix()); + // Uniforms + if (this._mustRebind(scene, effect)) { + this._activeEffect.setColor3("mainColor", this.mainColor); + this._activeEffect.setColor3("lineColor", this.lineColor); + this._activeEffect.setVector3("gridOffset", this.gridOffset); + this._gridControl.x = this.gridRatio; + this._gridControl.y = Math.round(this.majorUnitFrequency); + this._gridControl.z = this.minorUnitVisibility; + this._gridControl.w = this.opacity; + this._activeEffect.setVector4("gridControl", this._gridControl); + if (this._opacityTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].OpacityTextureEnabled) { + this._activeEffect.setTexture("opacitySampler", this._opacityTexture); + this._activeEffect.setFloat2("vOpacityInfos", this._opacityTexture.coordinatesIndex, this._opacityTexture.level); + this._activeEffect.setMatrix("opacityMatrix", this._opacityTexture.getTextureMatrix()); + } + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + /** + * Dispose the material and its associated resources. + * @param forceDisposeEffect will also dispose the used effect when true + */ + GridMaterial.prototype.dispose = function (forceDisposeEffect) { + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + GridMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new GridMaterial(name, _this.getScene()); }, this); + }; + GridMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.GridMaterial"; + return serializationObject; + }; + GridMaterial.prototype.getClassName = function () { + return "GridMaterial"; + }; + GridMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new GridMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], GridMaterial.prototype, "mainColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], GridMaterial.prototype, "lineColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GridMaterial.prototype, "gridRatio", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], GridMaterial.prototype, "gridOffset", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GridMaterial.prototype, "majorUnitFrequency", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GridMaterial.prototype, "minorUnitVisibility", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GridMaterial.prototype, "opacity", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GridMaterial.prototype, "preMultiplyAlpha", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("opacityTexture") + ], GridMaterial.prototype, "_opacityTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], GridMaterial.prototype, "opacityTexture", void 0); + return GridMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.GridMaterial"] = GridMaterial; + + +/***/ }), + +/***/ "./grid/index.ts": +/*!***********************!*\ + !*** ./grid/index.ts ***! + \***********************/ +/*! exports provided: GridMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _gridMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gridMaterial */ "./grid/gridMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridMaterial", function() { return _gridMaterial__WEBPACK_IMPORTED_MODULE_0__["GridMaterial"]; }); + + + + +/***/ }), + +/***/ "./index.ts": +/*!******************!*\ + !*** ./index.ts ***! + \******************/ +/*! exports provided: CellMaterial, CustomShaderStructure, ShaderSpecialParts, CustomMaterial, ShaderAlebdoParts, PBRCustomMaterial, FireMaterial, FurMaterial, GradientMaterial, GridMaterial, LavaMaterial, MixMaterial, NormalMaterial, ShadowOnlyMaterial, SimpleMaterial, SkyMaterial, TerrainMaterial, TriPlanarMaterial, WaterMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _cell__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cell */ "./cell/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellMaterial", function() { return _cell__WEBPACK_IMPORTED_MODULE_0__["CellMaterial"]; }); + +/* harmony import */ var _custom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./custom */ "./custom/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomShaderStructure", function() { return _custom__WEBPACK_IMPORTED_MODULE_1__["CustomShaderStructure"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderSpecialParts", function() { return _custom__WEBPACK_IMPORTED_MODULE_1__["ShaderSpecialParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomMaterial", function() { return _custom__WEBPACK_IMPORTED_MODULE_1__["CustomMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderAlebdoParts", function() { return _custom__WEBPACK_IMPORTED_MODULE_1__["ShaderAlebdoParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PBRCustomMaterial", function() { return _custom__WEBPACK_IMPORTED_MODULE_1__["PBRCustomMaterial"]; }); + +/* harmony import */ var _fire__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fire */ "./fire/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FireMaterial", function() { return _fire__WEBPACK_IMPORTED_MODULE_2__["FireMaterial"]; }); + +/* harmony import */ var _fur__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fur */ "./fur/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FurMaterial", function() { return _fur__WEBPACK_IMPORTED_MODULE_3__["FurMaterial"]; }); + +/* harmony import */ var _gradient__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./gradient */ "./gradient/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GradientMaterial", function() { return _gradient__WEBPACK_IMPORTED_MODULE_4__["GradientMaterial"]; }); + +/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./grid */ "./grid/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridMaterial", function() { return _grid__WEBPACK_IMPORTED_MODULE_5__["GridMaterial"]; }); + +/* harmony import */ var _lava__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lava */ "./lava/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LavaMaterial", function() { return _lava__WEBPACK_IMPORTED_MODULE_6__["LavaMaterial"]; }); + +/* harmony import */ var _mix__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./mix */ "./mix/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MixMaterial", function() { return _mix__WEBPACK_IMPORTED_MODULE_7__["MixMaterial"]; }); + +/* harmony import */ var _normal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./normal */ "./normal/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NormalMaterial", function() { return _normal__WEBPACK_IMPORTED_MODULE_8__["NormalMaterial"]; }); + +/* harmony import */ var _shadowOnly__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./shadowOnly */ "./shadowOnly/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShadowOnlyMaterial", function() { return _shadowOnly__WEBPACK_IMPORTED_MODULE_9__["ShadowOnlyMaterial"]; }); + +/* harmony import */ var _simple__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./simple */ "./simple/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleMaterial", function() { return _simple__WEBPACK_IMPORTED_MODULE_10__["SimpleMaterial"]; }); + +/* harmony import */ var _sky__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sky */ "./sky/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SkyMaterial", function() { return _sky__WEBPACK_IMPORTED_MODULE_11__["SkyMaterial"]; }); + +/* harmony import */ var _terrain__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./terrain */ "./terrain/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TerrainMaterial", function() { return _terrain__WEBPACK_IMPORTED_MODULE_12__["TerrainMaterial"]; }); + +/* harmony import */ var _triPlanar__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./triPlanar */ "./triPlanar/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TriPlanarMaterial", function() { return _triPlanar__WEBPACK_IMPORTED_MODULE_13__["TriPlanarMaterial"]; }); + +/* harmony import */ var _water__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./water */ "./water/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WaterMaterial", function() { return _water__WEBPACK_IMPORTED_MODULE_14__["WaterMaterial"]; }); + + + + + + + + + + + + + + + + + + +/***/ }), + +/***/ "./lava/index.ts": +/*!***********************!*\ + !*** ./lava/index.ts ***! + \***********************/ +/*! exports provided: LavaMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _lavaMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lavaMaterial */ "./lava/lavaMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LavaMaterial", function() { return _lavaMaterial__WEBPACK_IMPORTED_MODULE_0__["LavaMaterial"]; }); + + + + +/***/ }), + +/***/ "./lava/lava.fragment.ts": +/*!*******************************!*\ + !*** ./lava/lava.fragment.ts ***! + \*******************************/ +/*! exports provided: lavaPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lavaPixelShader", function() { return lavaPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'lavaPixelShader'; +var shader = "precision highp float;\n\nuniform vec3 vEyePosition;\nuniform vec4 vDiffuseColor;\n\nvarying vec3 vPositionW;\n\nuniform float time;\nuniform float speed;\nuniform float movingSpeed;\nuniform vec3 fogColor;\nuniform sampler2D noiseTexture;\nuniform float fogDensity;\n\nvarying float noise;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0]\n#include<__decl__lightFragment>[1]\n#include<__decl__lightFragment>[2]\n#include<__decl__lightFragment>[3]\n#include\n#include\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n#include\n\n#include\nfloat random( vec3 scale,float seed ){\nreturn fract( sin( dot( gl_FragCoord.xyz+seed,scale ) )*43758.5453+seed ) ;\n}\nvoid main(void) {\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\n\nvec4 noiseTex=texture2D( noiseTexture,vDiffuseUV );\nvec2 T1=vDiffuseUV+vec2( 1.5,-1.5 )*time*0.02;\nvec2 T2=vDiffuseUV+vec2( -0.5,2.0 )*time*0.01*speed;\nT1.x+=noiseTex.x*2.0;\nT1.y+=noiseTex.y*2.0;\nT2.x-=noiseTex.y*0.2+time*0.001*movingSpeed;\nT2.y+=noiseTex.z*0.2+time*0.002*movingSpeed;\nfloat p=texture2D( noiseTexture,T1*3.0 ).a;\nvec4 lavaColor=texture2D( diffuseSampler,T2*4.0);\nvec4 temp=lavaColor*( vec4( p,p,p,p )*2. )+( lavaColor*lavaColor-0.1 );\nbaseColor=temp;\nfloat depth=gl_FragCoord.z*4.0;\nconst float LOG2=1.442695;\nfloat fogFactor=exp2(-fogDensity*fogDensity*depth*depth*LOG2 );\nfogFactor=1.0-clamp( fogFactor,0.0,1.0 );\nbaseColor=mix( baseColor,vec4( fogColor,baseColor.w ),fogFactor );\ndiffuseColor=baseColor.rgb;\n\n\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n#ifdef UNLIT\nvec3 diffuseBase=vec3(1.,1.,1.);\n#else\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\nfloat glossiness=0.;\n#include[0]\n#include[1]\n#include[2]\n#include[3]\n#endif\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n\nvec4 color=vec4(finalDiffuse,alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var lavaPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./lava/lava.vertex.ts": +/*!*****************************!*\ + !*** ./lava/lava.vertex.ts ***! + \*****************************/ +/*! exports provided: lavaVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lavaVertexShader", function() { return lavaVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'lavaVertexShader'; +var shader = "precision highp float;\n\nuniform float time;\nuniform float lowFrequencySpeed;\n\nvarying float noise;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n\n\n\nvec3 mod289(vec3 x)\n{\nreturn x-floor(x*(1.0/289.0))*289.0;\n}\nvec4 mod289(vec4 x)\n{\nreturn x-floor(x*(1.0/289.0))*289.0;\n}\nvec4 permute(vec4 x)\n{\nreturn mod289(((x*34.0)+1.0)*x);\n}\nvec4 taylorInvSqrt(vec4 r)\n{\nreturn 1.79284291400159-0.85373472095314*r;\n}\nvec3 fade(vec3 t) {\nreturn t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\nfloat pnoise(vec3 P,vec3 rep)\n{\nvec3 Pi0=mod(floor(P),rep);\nvec3 Pi1=mod(Pi0+vec3(1.0),rep);\nPi0=mod289(Pi0);\nPi1=mod289(Pi1);\nvec3 Pf0=fract(P);\nvec3 Pf1=Pf0-vec3(1.0);\nvec4 ix=vec4(Pi0.x,Pi1.x,Pi0.x,Pi1.x);\nvec4 iy=vec4(Pi0.yy,Pi1.yy);\nvec4 iz0=Pi0.zzzz;\nvec4 iz1=Pi1.zzzz;\nvec4 ixy=permute(permute(ix)+iy);\nvec4 ixy0=permute(ixy+iz0);\nvec4 ixy1=permute(ixy+iz1);\nvec4 gx0=ixy0*(1.0/7.0);\nvec4 gy0=fract(floor(gx0)*(1.0/7.0))-0.5;\ngx0=fract(gx0);\nvec4 gz0=vec4(0.5)-abs(gx0)-abs(gy0);\nvec4 sz0=step(gz0,vec4(0.0));\ngx0-=sz0*(step(0.0,gx0)-0.5);\ngy0-=sz0*(step(0.0,gy0)-0.5);\nvec4 gx1=ixy1*(1.0/7.0);\nvec4 gy1=fract(floor(gx1)*(1.0/7.0))-0.5;\ngx1=fract(gx1);\nvec4 gz1=vec4(0.5)-abs(gx1)-abs(gy1);\nvec4 sz1=step(gz1,vec4(0.0));\ngx1-=sz1*(step(0.0,gx1)-0.5);\ngy1-=sz1*(step(0.0,gy1)-0.5);\nvec3 g000=vec3(gx0.x,gy0.x,gz0.x);\nvec3 g100=vec3(gx0.y,gy0.y,gz0.y);\nvec3 g010=vec3(gx0.z,gy0.z,gz0.z);\nvec3 g110=vec3(gx0.w,gy0.w,gz0.w);\nvec3 g001=vec3(gx1.x,gy1.x,gz1.x);\nvec3 g101=vec3(gx1.y,gy1.y,gz1.y);\nvec3 g011=vec3(gx1.z,gy1.z,gz1.z);\nvec3 g111=vec3(gx1.w,gy1.w,gz1.w);\nvec4 norm0=taylorInvSqrt(vec4(dot(g000,g000),dot(g010,g010),dot(g100,g100),dot(g110,g110)));\ng000*=norm0.x;\ng010*=norm0.y;\ng100*=norm0.z;\ng110*=norm0.w;\nvec4 norm1=taylorInvSqrt(vec4(dot(g001,g001),dot(g011,g011),dot(g101,g101),dot(g111,g111)));\ng001*=norm1.x;\ng011*=norm1.y;\ng101*=norm1.z;\ng111*=norm1.w;\nfloat n000=dot(g000,Pf0);\nfloat n100=dot(g100,vec3(Pf1.x,Pf0.yz));\nfloat n010=dot(g010,vec3(Pf0.x,Pf1.y,Pf0.z));\nfloat n110=dot(g110,vec3(Pf1.xy,Pf0.z));\nfloat n001=dot(g001,vec3(Pf0.xy,Pf1.z));\nfloat n101=dot(g101,vec3(Pf1.x,Pf0.y,Pf1.z));\nfloat n011=dot(g011,vec3(Pf0.x,Pf1.yz));\nfloat n111=dot(g111,Pf1);\nvec3 fade_xyz=fade(Pf0);\nvec4 n_z=mix(vec4(n000,n100,n010,n110),vec4(n001,n101,n011,n111),fade_xyz.z);\nvec2 n_yz=mix(n_z.xy,n_z.zw,fade_xyz.y);\nfloat n_xyz=mix(n_yz.x,n_yz.y,fade_xyz.x);\nreturn 2.2*n_xyz;\n}\n\nfloat turbulence( vec3 p ) {\nfloat w=100.0;\nfloat t=-.5;\nfor (float f=1.0 ; f<=10.0 ; f++ ){\nfloat power=pow( 2.0,f );\nt+=abs( pnoise( vec3( power*p ),vec3( 10.0,10.0,10.0 ) )/power );\n}\nreturn t;\n}\nvoid main(void) {\n#include\n#include\n#ifdef NORMAL\n\nnoise=10.0*-.10*turbulence( .5*normal+time*1.15 );\n\nfloat b=lowFrequencySpeed*5.0*pnoise( 0.05*position +vec3(time*1.025),vec3( 100.0 ) );\n\nfloat displacement =-1.5*noise+b;\n\nvec3 newPosition=position+normal*displacement;\ngl_Position=viewProjection*finalWorld*vec4( newPosition,1.0 );\nvec4 worldPos=finalWorld*vec4(newPosition,1.0);\nvPositionW=vec3(worldPos);\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var lavaVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./lava/lavaMaterial.ts": +/*!******************************!*\ + !*** ./lava/lavaMaterial.ts ***! + \******************************/ +/*! exports provided: LavaMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LavaMaterial", function() { return LavaMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _lava_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lava.fragment */ "./lava/lava.fragment.ts"); +/* harmony import */ var _lava_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lava.vertex */ "./lava/lava.vertex.ts"); + + + + + + + + + + + + + +var LavaMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LavaMaterialDefines, _super); + function LavaMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.LIGHT0 = false; + _this.LIGHT1 = false; + _this.LIGHT2 = false; + _this.LIGHT3 = false; + _this.SPOTLIGHT0 = false; + _this.SPOTLIGHT1 = false; + _this.SPOTLIGHT2 = false; + _this.SPOTLIGHT3 = false; + _this.HEMILIGHT0 = false; + _this.HEMILIGHT1 = false; + _this.HEMILIGHT2 = false; + _this.HEMILIGHT3 = false; + _this.DIRLIGHT0 = false; + _this.DIRLIGHT1 = false; + _this.DIRLIGHT2 = false; + _this.DIRLIGHT3 = false; + _this.POINTLIGHT0 = false; + _this.POINTLIGHT1 = false; + _this.POINTLIGHT2 = false; + _this.POINTLIGHT3 = false; + _this.SHADOW0 = false; + _this.SHADOW1 = false; + _this.SHADOW2 = false; + _this.SHADOW3 = false; + _this.SHADOWS = false; + _this.SHADOWESM0 = false; + _this.SHADOWESM1 = false; + _this.SHADOWESM2 = false; + _this.SHADOWESM3 = false; + _this.SHADOWPOISSON0 = false; + _this.SHADOWPOISSON1 = false; + _this.SHADOWPOISSON2 = false; + _this.SHADOWPOISSON3 = false; + _this.SHADOWPCF0 = false; + _this.SHADOWPCF1 = false; + _this.SHADOWPCF2 = false; + _this.SHADOWPCF3 = false; + _this.SHADOWPCSS0 = false; + _this.SHADOWPCSS1 = false; + _this.SHADOWPCSS2 = false; + _this.SHADOWPCSS3 = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.UNLIT = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return LavaMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var LavaMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LavaMaterial, _super); + function LavaMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.speed = 1; + _this.movingSpeed = 1; + _this.lowFrequencySpeed = 1; + _this.fogDensity = 0.15; + _this._lastTime = 0; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this._disableLighting = false; + _this._unlit = false; + _this._maxSimultaneousLights = 4; + _this._scaledDiffuse = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](); + return _this; + } + LavaMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + LavaMaterial.prototype.needAlphaTesting = function () { + return false; + }; + LavaMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + LavaMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new LavaMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = true; + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "lava"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix", + "time", "speed", "movingSpeed", + "fogColor", "fogDensity", "lowFrequencySpeed" + ]; + var samplers = ["diffuseSampler", + "noiseTexture" + ]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights } + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + LavaMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + defines.UNLIT = this._unlit; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this.diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this.diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this.diffuseTexture.coordinatesIndex, this.diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this.diffuseTexture.getTextureMatrix()); + } + if (this.noiseTexture) { + this._activeEffect.setTexture("noiseTexture", this.noiseTexture); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + this._activeEffect.setColor4("vDiffuseColor", this._scaledDiffuse, this.alpha * mesh.visibility); + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._lastTime += scene.getEngine().getDeltaTime(); + this._activeEffect.setFloat("time", this._lastTime * this.speed / 1000); + if (!this.fogColor) { + this.fogColor = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"].Black(); + } + this._activeEffect.setColor3("fogColor", this.fogColor); + this._activeEffect.setFloat("fogDensity", this.fogDensity); + this._activeEffect.setFloat("lowFrequencySpeed", this.lowFrequencySpeed); + this._activeEffect.setFloat("movingSpeed", this.movingSpeed); + this._afterBind(mesh, this._activeEffect); + }; + LavaMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.diffuseTexture && this.diffuseTexture.animations && this.diffuseTexture.animations.length > 0) { + results.push(this.diffuseTexture); + } + if (this.noiseTexture && this.noiseTexture.animations && this.noiseTexture.animations.length > 0) { + results.push(this.noiseTexture); + } + return results; + }; + LavaMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + return activeTextures; + }; + LavaMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this.diffuseTexture === texture) { + return true; + } + return false; + }; + LavaMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.diffuseTexture) { + this.diffuseTexture.dispose(); + } + if (this.noiseTexture) { + this.noiseTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + LavaMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new LavaMaterial(name, _this.getScene()); }, this); + }; + LavaMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.LavaMaterial"; + return serializationObject; + }; + LavaMaterial.prototype.getClassName = function () { + return "LavaMaterial"; + }; + // Statics + LavaMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new LavaMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], LavaMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], LavaMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])() + ], LavaMaterial.prototype, "noiseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], LavaMaterial.prototype, "fogColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], LavaMaterial.prototype, "speed", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], LavaMaterial.prototype, "movingSpeed", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], LavaMaterial.prototype, "lowFrequencySpeed", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], LavaMaterial.prototype, "fogDensity", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], LavaMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], LavaMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], LavaMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("unlit") + ], LavaMaterial.prototype, "_unlit", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], LavaMaterial.prototype, "unlit", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], LavaMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], LavaMaterial.prototype, "maxSimultaneousLights", void 0); + return LavaMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.LavaMaterial"] = LavaMaterial; + + +/***/ }), + +/***/ "./legacy/legacy.ts": +/*!**************************!*\ + !*** ./legacy/legacy.ts ***! + \**************************/ +/*! exports provided: CellMaterial, CustomShaderStructure, ShaderSpecialParts, CustomMaterial, ShaderAlebdoParts, PBRCustomMaterial, FireMaterial, FurMaterial, GradientMaterial, GridMaterial, LavaMaterial, MixMaterial, NormalMaterial, ShadowOnlyMaterial, SimpleMaterial, SkyMaterial, TerrainMaterial, TriPlanarMaterial, WaterMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../index */ "./index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["CellMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomShaderStructure", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["CustomShaderStructure"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderSpecialParts", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["ShaderSpecialParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["CustomMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderAlebdoParts", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["ShaderAlebdoParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PBRCustomMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["PBRCustomMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FireMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["FireMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FurMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["FurMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GradientMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["GradientMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["GridMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LavaMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["LavaMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MixMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["MixMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NormalMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["NormalMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShadowOnlyMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["ShadowOnlyMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["SimpleMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SkyMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["SkyMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TerrainMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["TerrainMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TriPlanarMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["TriPlanarMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WaterMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["WaterMaterial"]; }); + + +/** + * Legacy support, defining window.BABYLON.GridMaterial... (global variable). + * + * This is the entry point for the UMD module. + * The entry point for a future ESM package should be index.ts + */ +var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined); +if (typeof globalObject !== "undefined") { + globalObject.BABYLON = globalObject.BABYLON || {}; + for (var mat in _index__WEBPACK_IMPORTED_MODULE_0__) { + globalObject.BABYLON[mat] = _index__WEBPACK_IMPORTED_MODULE_0__[mat]; + } +} + + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js"))) + +/***/ }), + +/***/ "./mix/index.ts": +/*!**********************!*\ + !*** ./mix/index.ts ***! + \**********************/ +/*! exports provided: MixMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _mixMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mixMaterial */ "./mix/mixMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MixMaterial", function() { return _mixMaterial__WEBPACK_IMPORTED_MODULE_0__["MixMaterial"]; }); + + + + +/***/ }), + +/***/ "./mix/mix.fragment.ts": +/*!*****************************!*\ + !*** ./mix/mix.fragment.ts ***! + \*****************************/ +/*! exports provided: mixPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixPixelShader", function() { return mixPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'mixPixelShader'; +var shader = "precision highp float;\n\nuniform vec3 vEyePosition;\nuniform vec4 vDiffuseColor;\n#ifdef SPECULARTERM\nuniform vec4 vSpecularColor;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n\n#ifdef DIFFUSE\nvarying vec2 vTextureUV;\nuniform sampler2D mixMap1Sampler;\nuniform vec2 vTextureInfos;\n#ifdef MIXMAP2\nuniform sampler2D mixMap2Sampler;\n#endif\nuniform sampler2D diffuse1Sampler;\nuniform sampler2D diffuse2Sampler;\nuniform sampler2D diffuse3Sampler;\nuniform sampler2D diffuse4Sampler;\nuniform vec2 diffuse1Infos;\nuniform vec2 diffuse2Infos;\nuniform vec2 diffuse3Infos;\nuniform vec2 diffuse4Infos;\n#ifdef MIXMAP2\nuniform sampler2D diffuse5Sampler;\nuniform sampler2D diffuse6Sampler;\nuniform sampler2D diffuse7Sampler;\nuniform sampler2D diffuse8Sampler;\nuniform vec2 diffuse5Infos;\nuniform vec2 diffuse6Infos;\nuniform vec2 diffuse7Infos;\nuniform vec2 diffuse8Infos;\n#endif\n#endif\n\n#include\n#include\n#include\n\n#include\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 finalMixColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n#ifdef MIXMAP2\nvec4 mixColor2=vec4(1.,1.,1.,1.);\n#endif\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularColor=vSpecularColor.rgb;\n#else\nfloat glossiness=0.;\n#endif\n\nfloat alpha=vDiffuseColor.a;\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n#ifdef DIFFUSE\nvec4 mixColor=texture2D(mixMap1Sampler,vTextureUV);\n#include\nmixColor.rgb*=vTextureInfos.y;\nvec4 diffuse1Color=texture2D(diffuse1Sampler,vTextureUV*diffuse1Infos);\nvec4 diffuse2Color=texture2D(diffuse2Sampler,vTextureUV*diffuse2Infos);\nvec4 diffuse3Color=texture2D(diffuse3Sampler,vTextureUV*diffuse3Infos);\nvec4 diffuse4Color=texture2D(diffuse4Sampler,vTextureUV*diffuse4Infos);\ndiffuse1Color.rgb*=mixColor.r;\ndiffuse2Color.rgb=mix(diffuse1Color.rgb,diffuse2Color.rgb,mixColor.g);\ndiffuse3Color.rgb=mix(diffuse2Color.rgb,diffuse3Color.rgb,mixColor.b);\nfinalMixColor.rgb=mix(diffuse3Color.rgb,diffuse4Color.rgb,1.0-mixColor.a);\n#ifdef MIXMAP2\nmixColor=texture2D(mixMap2Sampler,vTextureUV);\nmixColor.rgb*=vTextureInfos.y;\nvec4 diffuse5Color=texture2D(diffuse5Sampler,vTextureUV*diffuse5Infos);\nvec4 diffuse6Color=texture2D(diffuse6Sampler,vTextureUV*diffuse6Infos);\nvec4 diffuse7Color=texture2D(diffuse7Sampler,vTextureUV*diffuse7Infos);\nvec4 diffuse8Color=texture2D(diffuse8Sampler,vTextureUV*diffuse8Infos);\ndiffuse5Color.rgb=mix(finalMixColor.rgb,diffuse5Color.rgb,mixColor.r);\ndiffuse6Color.rgb=mix(diffuse5Color.rgb,diffuse6Color.rgb,mixColor.g);\ndiffuse7Color.rgb=mix(diffuse6Color.rgb,diffuse7Color.rgb,mixColor.b);\nfinalMixColor.rgb=mix(diffuse7Color.rgb,diffuse8Color.rgb,1.0-mixColor.a);\n#endif\n#endif\n#ifdef VERTEXCOLOR\nfinalMixColor.rgb*=vColor.rgb;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor*finalMixColor.rgb,0.0,1.0);\n\nvec4 color=vec4(finalDiffuse+finalSpecular,alpha);\n#include\ngl_FragColor=color;\n#include\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var mixPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./mix/mix.vertex.ts": +/*!***************************!*\ + !*** ./mix/mix.vertex.ts ***! + \***************************/ +/*! exports provided: mixVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixVertexShader", function() { return mixVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'mixVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vTextureUV;\nuniform mat4 textureMatrix;\nuniform vec2 vTextureInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vTextureInfos.x == 0.)\n{\nvTextureUV=vec2(textureMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvTextureUV=vec2(textureMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var mixVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./mix/mixMaterial.ts": +/*!****************************!*\ + !*** ./mix/mixMaterial.ts ***! + \****************************/ +/*! exports provided: MixMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MixMaterial", function() { return MixMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _mix_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mix.fragment */ "./mix/mix.fragment.ts"); +/* harmony import */ var _mix_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mix.vertex */ "./mix/mix.vertex.ts"); + + + + + + + + + + + + + +var MixMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MixMaterialDefines, _super); + function MixMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.SPECULARTERM = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.MIXMAP2 = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return MixMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var MixMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MixMaterial, _super); + function MixMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + /** + * Uniforms + */ + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.specularColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0, 0, 0); + _this.specularPower = 64; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + MixMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + MixMaterial.prototype.needAlphaTesting = function () { + return false; + }; + MixMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + MixMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new MixMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (scene.texturesEnabled) { + if (!this._mixTexture1 || !this._mixTexture1.isReady()) { + return false; + } + defines._needUVs = true; + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture1 || !this._diffuseTexture1.isReady()) { + return false; + } + defines.DIFFUSE = true; + if (!this._diffuseTexture2 || !this._diffuseTexture2.isReady()) { + return false; + } + if (!this._diffuseTexture3 || !this._diffuseTexture3.isReady()) { + return false; + } + if (!this._diffuseTexture4 || !this._diffuseTexture4.isReady()) { + return false; + } + if (this._mixTexture2) { + if (!this._mixTexture2.isReady()) { + return false; + } + defines.MIXMAP2 = true; + if (!this._diffuseTexture5 || !this._diffuseTexture5.isReady()) { + return false; + } + if (!this._diffuseTexture6 || !this._diffuseTexture6.isReady()) { + return false; + } + if (!this._diffuseTexture7 || !this._diffuseTexture7.isReady()) { + return false; + } + if (!this._diffuseTexture8 || !this._diffuseTexture8.isReady()) { + return false; + } + } + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "mix"; + var join = defines.toString(); + var uniforms = [ + "world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", "vSpecularColor", + "vFogInfos", "vFogColor", "pointSize", + "vTextureInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "textureMatrix", + "diffuse1Infos", "diffuse2Infos", "diffuse3Infos", "diffuse4Infos", + "diffuse5Infos", "diffuse6Infos", "diffuse7Infos", "diffuse8Infos" + ]; + var samplers = [ + "mixMap1Sampler", "mixMap2Sampler", + "diffuse1Sampler", "diffuse2Sampler", "diffuse3Sampler", "diffuse4Sampler", + "diffuse5Sampler", "diffuse6Sampler", "diffuse7Sampler", "diffuse8Sampler" + ]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights } + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + MixMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this._mixTexture1) { + this._activeEffect.setTexture("mixMap1Sampler", this._mixTexture1); + this._activeEffect.setFloat2("vTextureInfos", this._mixTexture1.coordinatesIndex, this._mixTexture1.level); + this._activeEffect.setMatrix("textureMatrix", this._mixTexture1.getTextureMatrix()); + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (this._diffuseTexture1) { + this._activeEffect.setTexture("diffuse1Sampler", this._diffuseTexture1); + this._activeEffect.setFloat2("diffuse1Infos", this._diffuseTexture1.uScale, this._diffuseTexture1.vScale); + } + if (this._diffuseTexture2) { + this._activeEffect.setTexture("diffuse2Sampler", this._diffuseTexture2); + this._activeEffect.setFloat2("diffuse2Infos", this._diffuseTexture2.uScale, this._diffuseTexture2.vScale); + } + if (this._diffuseTexture3) { + this._activeEffect.setTexture("diffuse3Sampler", this._diffuseTexture3); + this._activeEffect.setFloat2("diffuse3Infos", this._diffuseTexture3.uScale, this._diffuseTexture3.vScale); + } + if (this._diffuseTexture4) { + this._activeEffect.setTexture("diffuse4Sampler", this._diffuseTexture4); + this._activeEffect.setFloat2("diffuse4Infos", this._diffuseTexture4.uScale, this._diffuseTexture4.vScale); + } + } + } + if (this._mixTexture2) { + this._activeEffect.setTexture("mixMap2Sampler", this._mixTexture2); + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (this._diffuseTexture5) { + this._activeEffect.setTexture("diffuse5Sampler", this._diffuseTexture5); + this._activeEffect.setFloat2("diffuse5Infos", this._diffuseTexture5.uScale, this._diffuseTexture5.vScale); + } + if (this._diffuseTexture6) { + this._activeEffect.setTexture("diffuse6Sampler", this._diffuseTexture6); + this._activeEffect.setFloat2("diffuse6Infos", this._diffuseTexture6.uScale, this._diffuseTexture6.vScale); + } + if (this._diffuseTexture7) { + this._activeEffect.setTexture("diffuse7Sampler", this._diffuseTexture7); + this._activeEffect.setFloat2("diffuse7Infos", this._diffuseTexture7.uScale, this._diffuseTexture7.vScale); + } + if (this._diffuseTexture8) { + this._activeEffect.setTexture("diffuse8Sampler", this._diffuseTexture8); + this._activeEffect.setFloat2("diffuse8Infos", this._diffuseTexture8.uScale, this._diffuseTexture8.vScale); + } + } + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + if (defines.SPECULARTERM) { + this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower); + } + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + MixMaterial.prototype.getAnimatables = function () { + var results = []; + if (this._mixTexture1 && this._mixTexture1.animations && this._mixTexture1.animations.length > 0) { + results.push(this._mixTexture1); + } + if (this._mixTexture2 && this._mixTexture2.animations && this._mixTexture2.animations.length > 0) { + results.push(this._mixTexture2); + } + return results; + }; + MixMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + // Mix map 1 + if (this._mixTexture1) { + activeTextures.push(this._mixTexture1); + } + if (this._diffuseTexture1) { + activeTextures.push(this._diffuseTexture1); + } + if (this._diffuseTexture2) { + activeTextures.push(this._diffuseTexture2); + } + if (this._diffuseTexture3) { + activeTextures.push(this._diffuseTexture3); + } + if (this._diffuseTexture4) { + activeTextures.push(this._diffuseTexture4); + } + // Mix map 2 + if (this._mixTexture2) { + activeTextures.push(this._mixTexture2); + } + if (this._diffuseTexture5) { + activeTextures.push(this._diffuseTexture5); + } + if (this._diffuseTexture6) { + activeTextures.push(this._diffuseTexture6); + } + if (this._diffuseTexture7) { + activeTextures.push(this._diffuseTexture7); + } + if (this._diffuseTexture8) { + activeTextures.push(this._diffuseTexture8); + } + return activeTextures; + }; + MixMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + // Mix map 1 + if (this._mixTexture1 === texture) { + return true; + } + if (this._diffuseTexture1 === texture) { + return true; + } + if (this._diffuseTexture2 === texture) { + return true; + } + if (this._diffuseTexture3 === texture) { + return true; + } + if (this._diffuseTexture4 === texture) { + return true; + } + // Mix map 2 + if (this._mixTexture2 === texture) { + return true; + } + if (this._diffuseTexture5 === texture) { + return true; + } + if (this._diffuseTexture6 === texture) { + return true; + } + if (this._diffuseTexture7 === texture) { + return true; + } + if (this._diffuseTexture8 === texture) { + return true; + } + return false; + }; + MixMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this._mixTexture1) { + this._mixTexture1.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + MixMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new MixMaterial(name, _this.getScene()); }, this); + }; + MixMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.MixMaterial"; + return serializationObject; + }; + MixMaterial.prototype.getClassName = function () { + return "MixMaterial"; + }; + // Statics + MixMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new MixMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("mixTexture1") + ], MixMaterial.prototype, "_mixTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "mixTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("mixTexture2") + ], MixMaterial.prototype, "_mixTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "mixTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture1") + ], MixMaterial.prototype, "_diffuseTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture2") + ], MixMaterial.prototype, "_diffuseTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture3") + ], MixMaterial.prototype, "_diffuseTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture4") + ], MixMaterial.prototype, "_diffuseTexture4", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture4", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture1") + ], MixMaterial.prototype, "_diffuseTexture5", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture5", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture2") + ], MixMaterial.prototype, "_diffuseTexture6", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture6", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture3") + ], MixMaterial.prototype, "_diffuseTexture7", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture7", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture4") + ], MixMaterial.prototype, "_diffuseTexture8", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture8", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], MixMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], MixMaterial.prototype, "specularColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], MixMaterial.prototype, "specularPower", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], MixMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], MixMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], MixMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], MixMaterial.prototype, "maxSimultaneousLights", void 0); + return MixMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.MixMaterial"] = MixMaterial; + + +/***/ }), + +/***/ "./normal/index.ts": +/*!*************************!*\ + !*** ./normal/index.ts ***! + \*************************/ +/*! exports provided: NormalMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _normalMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./normalMaterial */ "./normal/normalMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NormalMaterial", function() { return _normalMaterial__WEBPACK_IMPORTED_MODULE_0__["NormalMaterial"]; }); + + + + +/***/ }), + +/***/ "./normal/normal.fragment.ts": +/*!***********************************!*\ + !*** ./normal/normal.fragment.ts ***! + \***********************************/ +/*! exports provided: normalPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalPixelShader", function() { return normalPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'normalPixelShader'; +var shader = "precision highp float;\n\nuniform vec3 vEyePosition;\nuniform vec4 vDiffuseColor;\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef LIGHTING\n\n#include\n\n#include<__decl__lightFragment>[0]\n#include<__decl__lightFragment>[1]\n#include<__decl__lightFragment>[2]\n#include<__decl__lightFragment>[3]\n#include\n#include\n#endif\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n#include\n\n#include\nvoid main(void) {\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef NORMAL\nbaseColor=mix(baseColor,vec4(vNormalW,1.0),0.5);\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n\n#ifdef LIGHTING\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\nfloat glossiness=0.;\n#include[0]\n#include[1]\n#include[2]\n#include[3]\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n#else\nvec3 finalDiffuse=baseColor.rgb;\n#endif\n\nvec4 color=vec4(finalDiffuse,alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var normalPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./normal/normal.vertex.ts": +/*!*********************************!*\ + !*** ./normal/normal.vertex.ts ***! + \*********************************/ +/*! exports provided: normalVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalVertexShader", function() { return normalVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'normalVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var normalVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./normal/normalMaterial.ts": +/*!**********************************!*\ + !*** ./normal/normalMaterial.ts ***! + \**********************************/ +/*! exports provided: NormalMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NormalMaterial", function() { return NormalMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _normal_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./normal.fragment */ "./normal/normal.fragment.ts"); +/* harmony import */ var _normal_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./normal.vertex */ "./normal/normal.vertex.ts"); + + + + + + + + + + + + + +var NormalMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NormalMaterialDefines, _super); + function NormalMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.LIGHT0 = false; + _this.LIGHT1 = false; + _this.LIGHT2 = false; + _this.LIGHT3 = false; + _this.SPOTLIGHT0 = false; + _this.SPOTLIGHT1 = false; + _this.SPOTLIGHT2 = false; + _this.SPOTLIGHT3 = false; + _this.HEMILIGHT0 = false; + _this.HEMILIGHT1 = false; + _this.HEMILIGHT2 = false; + _this.HEMILIGHT3 = false; + _this.DIRLIGHT0 = false; + _this.DIRLIGHT1 = false; + _this.DIRLIGHT2 = false; + _this.DIRLIGHT3 = false; + _this.POINTLIGHT0 = false; + _this.POINTLIGHT1 = false; + _this.POINTLIGHT2 = false; + _this.POINTLIGHT3 = false; + _this.SHADOW0 = false; + _this.SHADOW1 = false; + _this.SHADOW2 = false; + _this.SHADOW3 = false; + _this.SHADOWS = false; + _this.SHADOWESM0 = false; + _this.SHADOWESM1 = false; + _this.SHADOWESM2 = false; + _this.SHADOWESM3 = false; + _this.SHADOWPOISSON0 = false; + _this.SHADOWPOISSON1 = false; + _this.SHADOWPOISSON2 = false; + _this.SHADOWPOISSON3 = false; + _this.SHADOWPCF0 = false; + _this.SHADOWPCF1 = false; + _this.SHADOWPCF2 = false; + _this.SHADOWPCF3 = false; + _this.SHADOWPCSS0 = false; + _this.SHADOWPCSS1 = false; + _this.SHADOWPCSS2 = false; + _this.SHADOWPCSS3 = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.LIGHTING = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return NormalMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var NormalMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NormalMaterial, _super); + function NormalMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + NormalMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + NormalMaterial.prototype.needAlphaBlendingForMesh = function (mesh) { + return this.needAlphaBlending() || (mesh.visibility < 1.0); + }; + NormalMaterial.prototype.needAlphaTesting = function () { + return false; + }; + NormalMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + NormalMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new NormalMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = true; + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + defines.LIGHTING = !this._disableLighting; + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + var shaderName = "normal"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix" + ]; + var samplers = ["diffuseSampler"]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: 4 + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: 4 } + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + NormalMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this.diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this.diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this.diffuseTexture.coordinatesIndex, this.diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this.diffuseTexture.getTextureMatrix()); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + // Lights + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + NormalMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.diffuseTexture && this.diffuseTexture.animations && this.diffuseTexture.animations.length > 0) { + results.push(this.diffuseTexture); + } + return results; + }; + NormalMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + return activeTextures; + }; + NormalMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this.diffuseTexture === texture) { + return true; + } + return false; + }; + NormalMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.diffuseTexture) { + this.diffuseTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + NormalMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new NormalMaterial(name, _this.getScene()); }, this); + }; + NormalMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.NormalMaterial"; + return serializationObject; + }; + NormalMaterial.prototype.getClassName = function () { + return "NormalMaterial"; + }; + // Statics + NormalMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new NormalMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], NormalMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], NormalMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], NormalMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], NormalMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], NormalMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], NormalMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], NormalMaterial.prototype, "maxSimultaneousLights", void 0); + return NormalMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.NormalMaterial"] = NormalMaterial; + + +/***/ }), + +/***/ "./shadowOnly/index.ts": +/*!*****************************!*\ + !*** ./shadowOnly/index.ts ***! + \*****************************/ +/*! exports provided: ShadowOnlyMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _shadowOnlyMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./shadowOnlyMaterial */ "./shadowOnly/shadowOnlyMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShadowOnlyMaterial", function() { return _shadowOnlyMaterial__WEBPACK_IMPORTED_MODULE_0__["ShadowOnlyMaterial"]; }); + + + + +/***/ }), + +/***/ "./shadowOnly/shadowOnly.fragment.ts": +/*!*******************************************!*\ + !*** ./shadowOnly/shadowOnly.fragment.ts ***! + \*******************************************/ +/*! exports provided: shadowOnlyPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shadowOnlyPixelShader", function() { return shadowOnlyPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'shadowOnlyPixelShader'; +var shader = "precision highp float;\n\nuniform vec3 vEyePosition;\nuniform float alpha;\nuniform vec3 shadowColor;\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n#include\n\n#include\nvoid main(void) {\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\nfloat glossiness=0.;\n#include[0..1]\n\nvec4 color=vec4(shadowColor,(1.0-clamp(shadow,0.,1.))*alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var shadowOnlyPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./shadowOnly/shadowOnly.vertex.ts": +/*!*****************************************!*\ + !*** ./shadowOnly/shadowOnly.vertex.ts ***! + \*****************************************/ +/*! exports provided: shadowOnlyVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shadowOnlyVertexShader", function() { return shadowOnlyVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'shadowOnlyVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var shadowOnlyVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./shadowOnly/shadowOnlyMaterial.ts": +/*!******************************************!*\ + !*** ./shadowOnly/shadowOnlyMaterial.ts ***! + \******************************************/ +/*! exports provided: ShadowOnlyMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShadowOnlyMaterial", function() { return ShadowOnlyMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _shadowOnly_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shadowOnly.fragment */ "./shadowOnly/shadowOnly.fragment.ts"); +/* harmony import */ var _shadowOnly_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shadowOnly.vertex */ "./shadowOnly/shadowOnly.vertex.ts"); + + + + + + + + + + + + +var ShadowOnlyMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ShadowOnlyMaterialDefines, _super); + function ShadowOnlyMaterialDefines() { + var _this = _super.call(this) || this; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return ShadowOnlyMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var ShadowOnlyMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ShadowOnlyMaterial, _super); + function ShadowOnlyMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this._needAlphaBlending = true; + _this.shadowColor = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"].Black(); + return _this; + } + ShadowOnlyMaterial.prototype.needAlphaBlending = function () { + return this._needAlphaBlending; + }; + ShadowOnlyMaterial.prototype.needAlphaTesting = function () { + return false; + }; + ShadowOnlyMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + Object.defineProperty(ShadowOnlyMaterial.prototype, "activeLight", { + get: function () { + return this._activeLight; + }, + set: function (light) { + this._activeLight = light; + }, + enumerable: false, + configurable: true + }); + ShadowOnlyMaterial.prototype._getFirstShadowLightForMesh = function (mesh) { + for (var _i = 0, _a = mesh.lightSources; _i < _a.length; _i++) { + var light = _a[_i]; + if (light.shadowEnabled) { + return light; + } + } + return null; + }; + // Methods + ShadowOnlyMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + var _a; + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new ShadowOnlyMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Ensure that active light is the first shadow light + if (this._activeLight) { + for (var _i = 0, _b = mesh.lightSources; _i < _b.length; _i++) { + var light = _b[_i]; + if (light.shadowEnabled) { + if (this._activeLight === light) { + break; // We are good + } + var lightPosition = mesh.lightSources.indexOf(this._activeLight); + if (lightPosition !== -1) { + mesh.lightSources.splice(lightPosition, 1); + mesh.lightSources.splice(0, 0, this._activeLight); + } + break; + } + } + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, 1); + var shadowGenerator = (_a = this._getFirstShadowLightForMesh(mesh)) === null || _a === void 0 ? void 0 : _a.getShadowGenerator(); + this._needAlphaBlending = true; + if (shadowGenerator && shadowGenerator.getClassName && shadowGenerator.getClassName() === 'CascadedShadowGenerator') { + var csg = shadowGenerator; + this._needAlphaBlending = !csg.autoCalcDepthBounds; + } + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, false, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, 1); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + var shaderName = "shadowOnly"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", + "vFogInfos", "vFogColor", "pointSize", "alpha", "shadowColor", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6" + ]; + var samplers = new Array(); + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: 1 + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: 1 } + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + ShadowOnlyMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + this._activeEffect.setFloat("alpha", this.alpha); + this._activeEffect.setColor3("shadowColor", this.shadowColor); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + // Lights + if (scene.lightsEnabled) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, 1); + var light = this._getFirstShadowLightForMesh(mesh); + if (light) { + // Make sure the uniforms for this light will be rebound for other materials using this light when rendering the current frame. + // Indeed, there is an optimization in Light that binds the light uniforms only once per frame for a given light (if using ubo). + // Doing this way assumes that all uses of this light are the same, meaning all parameters passed to Light._bindLlight + // are the same, notably useSpecular. However, isReadyForSubMesh (see above) is passing false for this parameter, which may not be + // the value the other materials may pass. + light._renderId = -1; + } + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE || defines["SHADOWCSM0"]) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + ShadowOnlyMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new ShadowOnlyMaterial(name, _this.getScene()); }, this); + }; + ShadowOnlyMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.ShadowOnlyMaterial"; + return serializationObject; + }; + ShadowOnlyMaterial.prototype.getClassName = function () { + return "ShadowOnlyMaterial"; + }; + // Statics + ShadowOnlyMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new ShadowOnlyMaterial(source.name, scene); }, source, scene, rootUrl); + }; + return ShadowOnlyMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.ShadowOnlyMaterial"] = ShadowOnlyMaterial; + + +/***/ }), + +/***/ "./simple/index.ts": +/*!*************************!*\ + !*** ./simple/index.ts ***! + \*************************/ +/*! exports provided: SimpleMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _simpleMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./simpleMaterial */ "./simple/simpleMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleMaterial", function() { return _simpleMaterial__WEBPACK_IMPORTED_MODULE_0__["SimpleMaterial"]; }); + + + + +/***/ }), + +/***/ "./simple/simple.fragment.ts": +/*!***********************************!*\ + !*** ./simple/simple.fragment.ts ***! + \***********************************/ +/*! exports provided: simplePixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simplePixelShader", function() { return simplePixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'simplePixelShader'; +var shader = "precision highp float;\n\nuniform vec3 vEyePosition;\nuniform vec4 vDiffuseColor;\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n#include\n\n#include\nvoid main(void) {\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\nfloat glossiness=0.;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n\nvec4 color=vec4(finalDiffuse,alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var simplePixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./simple/simple.vertex.ts": +/*!*********************************!*\ + !*** ./simple/simple.vertex.ts ***! + \*********************************/ +/*! exports provided: simpleVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simpleVertexShader", function() { return simpleVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'simpleVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var simpleVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./simple/simpleMaterial.ts": +/*!**********************************!*\ + !*** ./simple/simpleMaterial.ts ***! + \**********************************/ +/*! exports provided: SimpleMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleMaterial", function() { return SimpleMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _simple_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./simple.fragment */ "./simple/simple.fragment.ts"); +/* harmony import */ var _simple_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simple.vertex */ "./simple/simple.vertex.ts"); + + + + + + + + + + + + + +var SimpleMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SimpleMaterialDefines, _super); + function SimpleMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return SimpleMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var SimpleMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SimpleMaterial, _super); + function SimpleMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + SimpleMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + SimpleMaterial.prototype.needAlphaTesting = function () { + return false; + }; + SimpleMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + SimpleMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new SimpleMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + var shaderName = "simple"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix" + ]; + var samplers = ["diffuseSampler"]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this._maxSimultaneousLights - 1 } + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + SimpleMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this._diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this._diffuseTexture.getTextureMatrix()); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + // Lights + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + SimpleMaterial.prototype.getAnimatables = function () { + var results = []; + if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) { + results.push(this._diffuseTexture); + } + return results; + }; + SimpleMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + return activeTextures; + }; + SimpleMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this.diffuseTexture === texture) { + return true; + } + return false; + }; + SimpleMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this._diffuseTexture) { + this._diffuseTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + SimpleMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new SimpleMaterial(name, _this.getScene()); }, this); + }; + SimpleMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.SimpleMaterial"; + return serializationObject; + }; + SimpleMaterial.prototype.getClassName = function () { + return "SimpleMaterial"; + }; + // Statics + SimpleMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new SimpleMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], SimpleMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], SimpleMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])("diffuse") + ], SimpleMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], SimpleMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], SimpleMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], SimpleMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], SimpleMaterial.prototype, "maxSimultaneousLights", void 0); + return SimpleMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.SimpleMaterial"] = SimpleMaterial; + + +/***/ }), + +/***/ "./sky/index.ts": +/*!**********************!*\ + !*** ./sky/index.ts ***! + \**********************/ +/*! exports provided: SkyMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _skyMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./skyMaterial */ "./sky/skyMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SkyMaterial", function() { return _skyMaterial__WEBPACK_IMPORTED_MODULE_0__["SkyMaterial"]; }); + + + + +/***/ }), + +/***/ "./sky/sky.fragment.ts": +/*!*****************************!*\ + !*** ./sky/sky.fragment.ts ***! + \*****************************/ +/*! exports provided: skyPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skyPixelShader", function() { return skyPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + +var name = 'skyPixelShader'; +var shader = "precision highp float;\n\nvarying vec3 vPositionW;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n\nuniform vec3 cameraPosition;\nuniform vec3 cameraOffset;\nuniform float luminance;\nuniform float turbidity;\nuniform float rayleigh;\nuniform float mieCoefficient;\nuniform float mieDirectionalG;\nuniform vec3 sunPosition;\n\n#include\n\nconst float e=2.71828182845904523536028747135266249775724709369995957;\nconst float pi=3.141592653589793238462643383279502884197169;\nconst float n=1.0003;\nconst float N=2.545E25;\nconst float pn=0.035;\nconst vec3 lambda=vec3(680E-9,550E-9,450E-9);\nconst vec3 K=vec3(0.686,0.678,0.666);\nconst float v=4.0;\nconst float rayleighZenithLength=8.4E3;\nconst float mieZenithLength=1.25E3;\nconst vec3 up=vec3(0.0,1.0,0.0);\nconst float EE=1000.0;\nconst float sunAngularDiameterCos=0.999956676946448443553574619906976478926848692873900859324;\nconst float cutoffAngle=pi/1.95;\nconst float steepness=1.5;\nvec3 totalRayleigh(vec3 lambda)\n{\nreturn (8.0*pow(pi,3.0)*pow(pow(n,2.0)-1.0,2.0)*(6.0+3.0*pn))/(3.0*N*pow(lambda,vec3(4.0))*(6.0-7.0*pn));\n}\nvec3 simplifiedRayleigh()\n{\nreturn 0.0005/vec3(94,40,18);\n}\nfloat rayleighPhase(float cosTheta)\n{\nreturn (3.0/(16.0*pi))*(1.0+pow(cosTheta,2.0));\n}\nvec3 totalMie(vec3 lambda,vec3 K,float T)\n{\nfloat c=(0.2*T )*10E-18;\nreturn 0.434*c*pi*pow((2.0*pi)/lambda,vec3(v-2.0))*K;\n}\nfloat hgPhase(float cosTheta,float g)\n{\nreturn (1.0/(4.0*pi))*((1.0-pow(g,2.0))/pow(1.0-2.0*g*cosTheta+pow(g,2.0),1.5));\n}\nfloat sunIntensity(float zenithAngleCos)\n{\nreturn EE*max(0.0,1.0-exp((-(cutoffAngle-acos(zenithAngleCos))/steepness)));\n}\nfloat A=0.15;\nfloat B=0.50;\nfloat C=0.10;\nfloat D=0.20;\nfloat EEE=0.02;\nfloat F=0.30;\nfloat W=1000.0;\nvec3 Uncharted2Tonemap(vec3 x)\n{\nreturn ((x*(A*x+C*B)+D*EEE)/(x*(A*x+B)+D*F))-EEE/F;\n}\nvoid main(void) {\n\n#include\n\nfloat sunfade=1.0-clamp(1.0-exp((sunPosition.y/450000.0)),0.0,1.0);\nfloat rayleighCoefficient=rayleigh-(1.0*(1.0-sunfade));\nvec3 sunDirection=normalize(sunPosition);\nfloat sunE=sunIntensity(dot(sunDirection,up));\nvec3 betaR=simplifiedRayleigh()*rayleighCoefficient;\nvec3 betaM=totalMie(lambda,K,turbidity)*mieCoefficient;\nfloat zenithAngle=acos(max(0.0,dot(up,normalize(vPositionW-cameraPosition+cameraOffset))));\nfloat sR=rayleighZenithLength/(cos(zenithAngle)+0.15*pow(93.885-((zenithAngle*180.0)/pi),-1.253));\nfloat sM=mieZenithLength/(cos(zenithAngle)+0.15*pow(93.885-((zenithAngle*180.0)/pi),-1.253));\nvec3 Fex=exp(-(betaR*sR+betaM*sM));\nfloat cosTheta=dot(normalize(vPositionW-cameraPosition),sunDirection);\nfloat rPhase=rayleighPhase(cosTheta*0.5+0.5);\nvec3 betaRTheta=betaR*rPhase;\nfloat mPhase=hgPhase(cosTheta,mieDirectionalG);\nvec3 betaMTheta=betaM*mPhase;\nvec3 Lin=pow(sunE*((betaRTheta+betaMTheta)/(betaR+betaM))*(1.0-Fex),vec3(1.5));\nLin*=mix(vec3(1.0),pow(sunE*((betaRTheta+betaMTheta)/(betaR+betaM))*Fex,vec3(1.0/2.0)),clamp(pow(1.0-dot(up,sunDirection),5.0),0.0,1.0));\nvec3 direction=normalize(vPositionW-cameraPosition);\nfloat theta=acos(direction.y);\nfloat phi=atan(direction.z,direction.x);\nvec2 uv=vec2(phi,theta)/vec2(2.0*pi,pi)+vec2(0.5,0.0);\nvec3 L0=vec3(0.1)*Fex;\nfloat sundisk=smoothstep(sunAngularDiameterCos,sunAngularDiameterCos+0.00002,cosTheta);\nL0+=(sunE*19000.0*Fex)*sundisk;\nvec3 whiteScale=1.0/Uncharted2Tonemap(vec3(W));\nvec3 texColor=(Lin+L0);\ntexColor*=0.04 ;\ntexColor+=vec3(0.0,0.001,0.0025)*0.3;\nfloat g_fMaxLuminance=1.0;\nfloat fLumScaled=0.1/luminance;\nfloat fLumCompressed=(fLumScaled*(1.0+(fLumScaled/(g_fMaxLuminance*g_fMaxLuminance))))/(1.0+fLumScaled);\nfloat ExposureBias=fLumCompressed;\nvec3 curr=Uncharted2Tonemap((log2(2.0/pow(luminance,4.0)))*texColor);\n\n\n\nvec3 retColor=curr*whiteScale;\n\n\nfloat alpha=1.0;\n#ifdef VERTEXCOLOR\nretColor.rgb*=vColor.rgb;\n#endif\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n\nvec4 color=clamp(vec4(retColor.rgb,alpha),0.0,1.0);\n\n#include\ngl_FragColor=color;\n#include\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var skyPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./sky/sky.vertex.ts": +/*!***************************!*\ + !*** ./sky/sky.vertex.ts ***! + \***************************/ +/*! exports provided: skyVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skyVertexShader", function() { return skyVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + +var name = 'skyVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n\nuniform mat4 world;\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\nvoid main(void) {\ngl_Position=viewProjection*world*vec4(position,1.0);\nvec4 worldPos=world*vec4(position,1.0);\nvPositionW=vec3(worldPos);\n\n#include\n\n#include\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var skyVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./sky/skyMaterial.ts": +/*!****************************!*\ + !*** ./sky/skyMaterial.ts ***! + \****************************/ +/*! exports provided: SkyMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SkyMaterial", function() { return SkyMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _sky_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sky.fragment */ "./sky/sky.fragment.ts"); +/* harmony import */ var _sky_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sky.vertex */ "./sky/sky.vertex.ts"); + + + + + + + + + + + + +/** @hidden */ +var SkyMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SkyMaterialDefines, _super); + function SkyMaterialDefines() { + var _this = _super.call(this) || this; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return SkyMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +/** + * This is the sky material which allows to create dynamic and texture free effects for skyboxes. + * @see https://doc.babylonjs.com/extensions/sky + */ +var SkyMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SkyMaterial, _super); + /** + * Instantiates a new sky material. + * This material allows to create dynamic and texture free + * effects for skyboxes by taking care of the atmosphere state. + * @see https://doc.babylonjs.com/extensions/sky + * @param name Define the name of the material in the scene + * @param scene Define the scene the material belong to + */ + function SkyMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + /** + * Defines the overall luminance of sky in interval ]0, 1[. + */ + _this.luminance = 1.0; + /** + * Defines the amount (scattering) of haze as opposed to molecules in atmosphere. + */ + _this.turbidity = 10.0; + /** + * Defines the sky appearance (light intensity). + */ + _this.rayleigh = 2.0; + /** + * Defines the mieCoefficient in interval [0, 0.1] which affects the property .mieDirectionalG. + */ + _this.mieCoefficient = 0.005; + /** + * Defines the amount of haze particles following the Mie scattering theory. + */ + _this.mieDirectionalG = 0.8; + /** + * Defines the distance of the sun according to the active scene camera. + */ + _this.distance = 500; + /** + * Defines the sun inclination, in interval [-0.5, 0.5]. When the inclination is not 0, the sun is said + * "inclined". + */ + _this.inclination = 0.49; + /** + * Defines the solar azimuth in interval [0, 1]. The azimuth is the angle in the horizontal plan between + * an object direction and a reference direction. + */ + _this.azimuth = 0.25; + /** + * Defines the sun position in the sky on (x,y,z). If the property .useSunPosition is set to false, then + * the property is overriden by the inclination and the azimuth and can be read at any moment. + */ + _this.sunPosition = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, 100, 0); + /** + * Defines if the sun position should be computed (inclination and azimuth) according to the given + * .sunPosition property. + */ + _this.useSunPosition = false; + /** + * Defines an offset vector used to get a horizon offset. + * @example skyMaterial.cameraOffset.y = camera.globalPosition.y // Set horizon relative to 0 on the Y axis + */ + _this.cameraOffset = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Zero(); + // Private members + _this._cameraPosition = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Zero(); + return _this; + } + /** + * Specifies if the material will require alpha blending + * @returns a boolean specifying if alpha blending is needed + */ + SkyMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + /** + * Specifies if this material should be rendered in alpha test mode + * @returns false as the sky material doesn't need alpha testing. + */ + SkyMaterial.prototype.needAlphaTesting = function () { + return false; + }; + /** + * Get the texture used for alpha test purpose. + * @returns null as the sky material has no texture. + */ + SkyMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + /** + * Get if the submesh is ready to be used and all its information available. + * Child classes can use it to update shaders + * @param mesh defines the mesh to check + * @param subMesh defines which submesh to check + * @param useInstances specifies that instances should be used + * @returns a boolean indicating that the submesh is ready or not + */ + SkyMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new SkyMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, false, defines); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, false); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + var shaderName = "sky"; + var join = defines.toString(); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, attribs, ["world", "viewProjection", "view", + "vFogInfos", "vFogColor", "pointSize", "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", + "luminance", "turbidity", "rayleigh", "mieCoefficient", "mieDirectionalG", "sunPosition", + "cameraPosition", "cameraOffset" + ], [], join, fallbacks, this.onCompiled, this.onError), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + /** + * Binds the submesh to this material by preparing the effect and shader to draw + * @param world defines the world transformation matrix + * @param mesh defines the mesh containing the submesh + * @param subMesh defines the submesh to bind the material to + */ + SkyMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + if (this._mustRebind(scene, effect)) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + // Sky + var camera = scene.activeCamera; + if (camera) { + var cameraWorldMatrix = camera.getWorldMatrix(); + this._cameraPosition.x = cameraWorldMatrix.m[12]; + this._cameraPosition.y = cameraWorldMatrix.m[13]; + this._cameraPosition.z = cameraWorldMatrix.m[14]; + this._activeEffect.setVector3("cameraPosition", this._cameraPosition); + } + this._activeEffect.setVector3("cameraOffset", this.cameraOffset); + if (this.luminance > 0) { + this._activeEffect.setFloat("luminance", this.luminance); + } + this._activeEffect.setFloat("turbidity", this.turbidity); + this._activeEffect.setFloat("rayleigh", this.rayleigh); + this._activeEffect.setFloat("mieCoefficient", this.mieCoefficient); + this._activeEffect.setFloat("mieDirectionalG", this.mieDirectionalG); + if (!this.useSunPosition) { + var theta = Math.PI * (this.inclination - 0.5); + var phi = 2 * Math.PI * (this.azimuth - 0.5); + this.sunPosition.x = this.distance * Math.cos(phi); + this.sunPosition.y = this.distance * Math.sin(phi) * Math.sin(theta); + this.sunPosition.z = this.distance * Math.sin(phi) * Math.cos(theta); + } + this._activeEffect.setVector3("sunPosition", this.sunPosition); + this._afterBind(mesh, this._activeEffect); + }; + /** + * Get the list of animatables in the material. + * @returns the list of animatables object used in the material + */ + SkyMaterial.prototype.getAnimatables = function () { + return []; + }; + /** + * Disposes the material + * @param forceDisposeEffect specifies if effects should be forcefully disposed + */ + SkyMaterial.prototype.dispose = function (forceDisposeEffect) { + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + /** + * Makes a duplicate of the material, and gives it a new name + * @param name defines the new name for the duplicated material + * @returns the cloned material + */ + SkyMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new SkyMaterial(name, _this.getScene()); }, this); + }; + /** + * Serializes this material in a JSON representation + * @returns the serialized material object + */ + SkyMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.SkyMaterial"; + return serializationObject; + }; + /** + * Gets the current class name of the material e.g. "SkyMaterial" + * Mainly use in serialization. + * @returns the class name + */ + SkyMaterial.prototype.getClassName = function () { + return "SkyMaterial"; + }; + /** + * Creates a sky material from parsed material data + * @param source defines the JSON representation of the material + * @param scene defines the hosting scene + * @param rootUrl defines the root URL to use to load textures and relative dependencies + * @returns a new sky material + */ + SkyMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new SkyMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "luminance", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "turbidity", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "rayleigh", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "mieCoefficient", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "mieDirectionalG", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "distance", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "inclination", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "azimuth", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsVector3"])() + ], SkyMaterial.prototype, "sunPosition", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "useSunPosition", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "cameraOffset", void 0); + return SkyMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.SkyMaterial"] = SkyMaterial; + + +/***/ }), + +/***/ "./terrain/index.ts": +/*!**************************!*\ + !*** ./terrain/index.ts ***! + \**************************/ +/*! exports provided: TerrainMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _terrainMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./terrainMaterial */ "./terrain/terrainMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TerrainMaterial", function() { return _terrainMaterial__WEBPACK_IMPORTED_MODULE_0__["TerrainMaterial"]; }); + + + + +/***/ }), + +/***/ "./terrain/terrain.fragment.ts": +/*!*************************************!*\ + !*** ./terrain/terrain.fragment.ts ***! + \*************************************/ +/*! exports provided: terrainPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "terrainPixelShader", function() { return terrainPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'terrainPixelShader'; +var shader = "precision highp float;\n\nuniform vec3 vEyePosition;\nuniform vec4 vDiffuseColor;\n#ifdef SPECULARTERM\nuniform vec4 vSpecularColor;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n\n#ifdef DIFFUSE\nvarying vec2 vTextureUV;\nuniform sampler2D textureSampler;\nuniform vec2 vTextureInfos;\nuniform sampler2D diffuse1Sampler;\nuniform sampler2D diffuse2Sampler;\nuniform sampler2D diffuse3Sampler;\nuniform vec2 diffuse1Infos;\nuniform vec2 diffuse2Infos;\nuniform vec2 diffuse3Infos;\n#endif\n#ifdef BUMP\nuniform sampler2D bump1Sampler;\nuniform sampler2D bump2Sampler;\nuniform sampler2D bump3Sampler;\n#endif\n\n#include\n#include\n#include\n\n#include\n\n#ifdef BUMP\n#extension GL_OES_standard_derivatives : enable\n\nmat3 cotangent_frame(vec3 normal,vec3 p,vec2 uv)\n{\n\nvec3 dp1=dFdx(p);\nvec3 dp2=dFdy(p);\nvec2 duv1=dFdx(uv);\nvec2 duv2=dFdy(uv);\n\nvec3 dp2perp=cross(dp2,normal);\nvec3 dp1perp=cross(normal,dp1);\nvec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;\nvec3 binormal=dp2perp*duv1.y+dp1perp*duv2.y;\n\nfloat invmax=inversesqrt(max(dot(tangent,tangent),dot(binormal,binormal)));\nreturn mat3(tangent*invmax,binormal*invmax,normal);\n}\nvec3 perturbNormal(vec3 viewDir,vec3 mixColor)\n{\nvec3 bump1Color=texture2D(bump1Sampler,vTextureUV*diffuse1Infos).xyz;\nvec3 bump2Color=texture2D(bump2Sampler,vTextureUV*diffuse2Infos).xyz;\nvec3 bump3Color=texture2D(bump3Sampler,vTextureUV*diffuse3Infos).xyz;\nbump1Color.rgb*=mixColor.r;\nbump2Color.rgb=mix(bump1Color.rgb,bump2Color.rgb,mixColor.g);\nvec3 map=mix(bump2Color.rgb,bump3Color.rgb,mixColor.b);\nmap=map*255./127.-128./127.;\nmat3 TBN=cotangent_frame(vNormalW*vTextureInfos.y,-viewDir,vTextureUV);\nreturn normalize(TBN*map);\n}\n#endif\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularColor=vSpecularColor.rgb;\n#else\nfloat glossiness=0.;\n#endif\n\nfloat alpha=vDiffuseColor.a;\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n#ifdef DIFFUSE\nbaseColor=texture2D(textureSampler,vTextureUV);\n#if defined(BUMP) && defined(DIFFUSE)\nnormalW=perturbNormal(viewDirectionW,baseColor.rgb);\n#endif\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vTextureInfos.y;\nvec4 diffuse1Color=texture2D(diffuse1Sampler,vTextureUV*diffuse1Infos);\nvec4 diffuse2Color=texture2D(diffuse2Sampler,vTextureUV*diffuse2Infos);\nvec4 diffuse3Color=texture2D(diffuse3Sampler,vTextureUV*diffuse3Infos);\ndiffuse1Color.rgb*=baseColor.r;\ndiffuse2Color.rgb=mix(diffuse1Color.rgb,diffuse2Color.rgb,baseColor.g);\nbaseColor.rgb=mix(diffuse2Color.rgb,diffuse3Color.rgb,baseColor.b);\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor*baseColor.rgb,0.0,1.0);\n\nvec4 color=vec4(finalDiffuse+finalSpecular,alpha);\n#include\ngl_FragColor=color;\n#include\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var terrainPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./terrain/terrain.vertex.ts": +/*!***********************************!*\ + !*** ./terrain/terrain.vertex.ts ***! + \***********************************/ +/*! exports provided: terrainVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "terrainVertexShader", function() { return terrainVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'terrainVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vTextureUV;\nuniform mat4 textureMatrix;\nuniform vec2 vTextureInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vTextureInfos.x == 0.)\n{\nvTextureUV=vec2(textureMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvTextureUV=vec2(textureMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var terrainVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./terrain/terrainMaterial.ts": +/*!************************************!*\ + !*** ./terrain/terrainMaterial.ts ***! + \************************************/ +/*! exports provided: TerrainMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TerrainMaterial", function() { return TerrainMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _terrain_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./terrain.fragment */ "./terrain/terrain.fragment.ts"); +/* harmony import */ var _terrain_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./terrain.vertex */ "./terrain/terrain.vertex.ts"); + + + + + + + + + + + + + +var TerrainMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TerrainMaterialDefines, _super); + function TerrainMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.BUMP = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.SPECULARTERM = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return TerrainMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var TerrainMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TerrainMaterial, _super); + function TerrainMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.specularColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0, 0, 0); + _this.specularPower = 64; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + TerrainMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + TerrainMaterial.prototype.needAlphaTesting = function () { + return false; + }; + TerrainMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + TerrainMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new TerrainMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (scene.texturesEnabled) { + if (!this.mixTexture || !this.mixTexture.isReady()) { + return false; + } + defines._needUVs = true; + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this.diffuseTexture1 || !this.diffuseTexture1.isReady()) { + return false; + } + if (!this.diffuseTexture2 || !this.diffuseTexture2.isReady()) { + return false; + } + if (!this.diffuseTexture3 || !this.diffuseTexture3.isReady()) { + return false; + } + defines.DIFFUSE = true; + } + if (this.bumpTexture1 && this.bumpTexture2 && this.bumpTexture3 && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].BumpTextureEnabled) { + if (!this.bumpTexture1.isReady()) { + return false; + } + if (!this.bumpTexture2.isReady()) { + return false; + } + if (!this.bumpTexture3.isReady()) { + return false; + } + defines._needNormals = true; + defines.BUMP = true; + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "terrain"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", "vSpecularColor", + "vFogInfos", "vFogColor", "pointSize", + "vTextureInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "textureMatrix", + "diffuse1Infos", "diffuse2Infos", "diffuse3Infos" + ]; + var samplers = ["textureSampler", "diffuse1Sampler", "diffuse2Sampler", "diffuse3Sampler", + "bump1Sampler", "bump2Sampler", "bump3Sampler" + ]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights } + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + TerrainMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this.mixTexture) { + this._activeEffect.setTexture("textureSampler", this._mixTexture); + this._activeEffect.setFloat2("vTextureInfos", this._mixTexture.coordinatesIndex, this._mixTexture.level); + this._activeEffect.setMatrix("textureMatrix", this._mixTexture.getTextureMatrix()); + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (this._diffuseTexture1) { + this._activeEffect.setTexture("diffuse1Sampler", this._diffuseTexture1); + this._activeEffect.setFloat2("diffuse1Infos", this._diffuseTexture1.uScale, this._diffuseTexture1.vScale); + } + if (this._diffuseTexture2) { + this._activeEffect.setTexture("diffuse2Sampler", this._diffuseTexture2); + this._activeEffect.setFloat2("diffuse2Infos", this._diffuseTexture2.uScale, this._diffuseTexture2.vScale); + } + if (this._diffuseTexture3) { + this._activeEffect.setTexture("diffuse3Sampler", this._diffuseTexture3); + this._activeEffect.setFloat2("diffuse3Infos", this._diffuseTexture3.uScale, this._diffuseTexture3.vScale); + } + } + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].BumpTextureEnabled && scene.getEngine().getCaps().standardDerivatives) { + if (this._bumpTexture1) { + this._activeEffect.setTexture("bump1Sampler", this._bumpTexture1); + } + if (this._bumpTexture2) { + this._activeEffect.setTexture("bump2Sampler", this._bumpTexture2); + } + if (this._bumpTexture3) { + this._activeEffect.setTexture("bump3Sampler", this._bumpTexture3); + } + } + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + if (defines.SPECULARTERM) { + this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower); + } + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + TerrainMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.mixTexture && this.mixTexture.animations && this.mixTexture.animations.length > 0) { + results.push(this.mixTexture); + } + return results; + }; + TerrainMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._mixTexture) { + activeTextures.push(this._mixTexture); + } + if (this._diffuseTexture1) { + activeTextures.push(this._diffuseTexture1); + } + if (this._diffuseTexture2) { + activeTextures.push(this._diffuseTexture2); + } + if (this._diffuseTexture3) { + activeTextures.push(this._diffuseTexture3); + } + if (this._bumpTexture1) { + activeTextures.push(this._bumpTexture1); + } + if (this._bumpTexture2) { + activeTextures.push(this._bumpTexture2); + } + if (this._bumpTexture3) { + activeTextures.push(this._bumpTexture3); + } + return activeTextures; + }; + TerrainMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this._mixTexture === texture) { + return true; + } + if (this._diffuseTexture1 === texture) { + return true; + } + if (this._diffuseTexture2 === texture) { + return true; + } + if (this._diffuseTexture3 === texture) { + return true; + } + if (this._bumpTexture1 === texture) { + return true; + } + if (this._bumpTexture2 === texture) { + return true; + } + if (this._bumpTexture3 === texture) { + return true; + } + return false; + }; + TerrainMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.mixTexture) { + this.mixTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + TerrainMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new TerrainMaterial(name, _this.getScene()); }, this); + }; + TerrainMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.TerrainMaterial"; + return serializationObject; + }; + TerrainMaterial.prototype.getClassName = function () { + return "TerrainMaterial"; + }; + // Statics + TerrainMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new TerrainMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("mixTexture") + ], TerrainMaterial.prototype, "_mixTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "mixTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture1") + ], TerrainMaterial.prototype, "_diffuseTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "diffuseTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture2") + ], TerrainMaterial.prototype, "_diffuseTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "diffuseTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture3") + ], TerrainMaterial.prototype, "_diffuseTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "diffuseTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("bumpTexture1") + ], TerrainMaterial.prototype, "_bumpTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "bumpTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("bumpTexture2") + ], TerrainMaterial.prototype, "_bumpTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "bumpTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("bumpTexture3") + ], TerrainMaterial.prototype, "_bumpTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "bumpTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], TerrainMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], TerrainMaterial.prototype, "specularColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], TerrainMaterial.prototype, "specularPower", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], TerrainMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], TerrainMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], TerrainMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], TerrainMaterial.prototype, "maxSimultaneousLights", void 0); + return TerrainMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.TerrainMaterial"] = TerrainMaterial; + + +/***/ }), + +/***/ "./triPlanar/index.ts": +/*!****************************!*\ + !*** ./triPlanar/index.ts ***! + \****************************/ +/*! exports provided: TriPlanarMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _triPlanarMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./triPlanarMaterial */ "./triPlanar/triPlanarMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TriPlanarMaterial", function() { return _triPlanarMaterial__WEBPACK_IMPORTED_MODULE_0__["TriPlanarMaterial"]; }); + + + + +/***/ }), + +/***/ "./triPlanar/triPlanarMaterial.ts": +/*!****************************************!*\ + !*** ./triPlanar/triPlanarMaterial.ts ***! + \****************************************/ +/*! exports provided: TriPlanarMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TriPlanarMaterial", function() { return TriPlanarMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _triplanar_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./triplanar.fragment */ "./triPlanar/triplanar.fragment.ts"); +/* harmony import */ var _triplanar_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./triplanar.vertex */ "./triPlanar/triplanar.vertex.ts"); + + + + + + + + + + + + + +var TriPlanarMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TriPlanarMaterialDefines, _super); + function TriPlanarMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSEX = false; + _this.DIFFUSEY = false; + _this.DIFFUSEZ = false; + _this.BUMPX = false; + _this.BUMPY = false; + _this.BUMPZ = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.SPECULARTERM = false; + _this.NORMAL = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return TriPlanarMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var TriPlanarMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TriPlanarMaterial, _super); + function TriPlanarMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.tileSize = 1; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.specularColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0.2, 0.2, 0.2); + _this.specularPower = 64; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + TriPlanarMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + TriPlanarMaterial.prototype.needAlphaTesting = function () { + return false; + }; + TriPlanarMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + TriPlanarMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new TriPlanarMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + if (scene.texturesEnabled) { + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + var textures = [this.diffuseTextureX, this.diffuseTextureY, this.diffuseTextureZ]; + var textureDefines = ["DIFFUSEX", "DIFFUSEY", "DIFFUSEZ"]; + for (var i = 0; i < textures.length; i++) { + if (textures[i]) { + if (!textures[i].isReady()) { + return false; + } + else { + defines[textureDefines[i]] = true; + } + } + } + } + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].BumpTextureEnabled) { + var textures = [this.normalTextureX, this.normalTextureY, this.normalTextureZ]; + var textureDefines = ["BUMPX", "BUMPY", "BUMPZ"]; + for (var i = 0; i < textures.length; i++) { + if (textures[i]) { + if (!textures[i].isReady()) { + return false; + } + else { + defines[textureDefines[i]] = true; + } + } + } + } + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "triplanar"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", "vSpecularColor", + "vFogInfos", "vFogColor", "pointSize", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", + "tileSize" + ]; + var samplers = ["diffuseSamplerX", "diffuseSamplerY", "diffuseSamplerZ", + "normalSamplerX", "normalSamplerY", "normalSamplerZ" + ]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights } + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + TriPlanarMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + this._activeEffect.setFloat("tileSize", this.tileSize); + if (scene.getCachedMaterial() !== this) { + // Textures + if (this.diffuseTextureX) { + this._activeEffect.setTexture("diffuseSamplerX", this.diffuseTextureX); + } + if (this.diffuseTextureY) { + this._activeEffect.setTexture("diffuseSamplerY", this.diffuseTextureY); + } + if (this.diffuseTextureZ) { + this._activeEffect.setTexture("diffuseSamplerZ", this.diffuseTextureZ); + } + if (this.normalTextureX) { + this._activeEffect.setTexture("normalSamplerX", this.normalTextureX); + } + if (this.normalTextureY) { + this._activeEffect.setTexture("normalSamplerY", this.normalTextureY); + } + if (this.normalTextureZ) { + this._activeEffect.setTexture("normalSamplerZ", this.normalTextureZ); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + if (defines.SPECULARTERM) { + this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower); + } + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + TriPlanarMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.mixTexture && this.mixTexture.animations && this.mixTexture.animations.length > 0) { + results.push(this.mixTexture); + } + return results; + }; + TriPlanarMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTextureX) { + activeTextures.push(this._diffuseTextureX); + } + if (this._diffuseTextureY) { + activeTextures.push(this._diffuseTextureY); + } + if (this._diffuseTextureZ) { + activeTextures.push(this._diffuseTextureZ); + } + if (this._normalTextureX) { + activeTextures.push(this._normalTextureX); + } + if (this._normalTextureY) { + activeTextures.push(this._normalTextureY); + } + if (this._normalTextureZ) { + activeTextures.push(this._normalTextureZ); + } + return activeTextures; + }; + TriPlanarMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this._diffuseTextureX === texture) { + return true; + } + if (this._diffuseTextureY === texture) { + return true; + } + if (this._diffuseTextureZ === texture) { + return true; + } + if (this._normalTextureX === texture) { + return true; + } + if (this._normalTextureY === texture) { + return true; + } + if (this._normalTextureZ === texture) { + return true; + } + return false; + }; + TriPlanarMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.mixTexture) { + this.mixTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + TriPlanarMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new TriPlanarMaterial(name, _this.getScene()); }, this); + }; + TriPlanarMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.TriPlanarMaterial"; + return serializationObject; + }; + TriPlanarMaterial.prototype.getClassName = function () { + return "TriPlanarMaterial"; + }; + // Statics + TriPlanarMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new TriPlanarMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])() + ], TriPlanarMaterial.prototype, "mixTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTextureX") + ], TriPlanarMaterial.prototype, "_diffuseTextureX", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "diffuseTextureX", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexturY") + ], TriPlanarMaterial.prototype, "_diffuseTextureY", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "diffuseTextureY", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTextureZ") + ], TriPlanarMaterial.prototype, "_diffuseTextureZ", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "diffuseTextureZ", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("normalTextureX") + ], TriPlanarMaterial.prototype, "_normalTextureX", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "normalTextureX", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("normalTextureY") + ], TriPlanarMaterial.prototype, "_normalTextureY", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "normalTextureY", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("normalTextureZ") + ], TriPlanarMaterial.prototype, "_normalTextureZ", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "normalTextureZ", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], TriPlanarMaterial.prototype, "tileSize", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], TriPlanarMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], TriPlanarMaterial.prototype, "specularColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], TriPlanarMaterial.prototype, "specularPower", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], TriPlanarMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], TriPlanarMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], TriPlanarMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], TriPlanarMaterial.prototype, "maxSimultaneousLights", void 0); + return TriPlanarMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.TriPlanarMaterial"] = TriPlanarMaterial; + + +/***/ }), + +/***/ "./triPlanar/triplanar.fragment.ts": +/*!*****************************************!*\ + !*** ./triPlanar/triplanar.fragment.ts ***! + \*****************************************/ +/*! exports provided: triplanarPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "triplanarPixelShader", function() { return triplanarPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'triplanarPixelShader'; +var shader = "precision highp float;\n\nuniform vec3 vEyePosition;\nuniform vec4 vDiffuseColor;\n#ifdef SPECULARTERM\nuniform vec4 vSpecularColor;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n\n#ifdef DIFFUSEX\nvarying vec2 vTextureUVX;\nuniform sampler2D diffuseSamplerX;\n#ifdef BUMPX\nuniform sampler2D normalSamplerX;\n#endif\n#endif\n#ifdef DIFFUSEY\nvarying vec2 vTextureUVY;\nuniform sampler2D diffuseSamplerY;\n#ifdef BUMPY\nuniform sampler2D normalSamplerY;\n#endif\n#endif\n#ifdef DIFFUSEZ\nvarying vec2 vTextureUVZ;\nuniform sampler2D diffuseSamplerZ;\n#ifdef BUMPZ\nuniform sampler2D normalSamplerZ;\n#endif\n#endif\n#ifdef NORMAL\nvarying mat3 tangentSpace;\n#endif\n#include\n#include\n#include\n#include\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 baseColor=vec4(0.,0.,0.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n\n#ifdef NORMAL\nvec3 normalW=tangentSpace[2];\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\nvec4 baseNormal=vec4(0.0,0.0,0.0,1.0);\nnormalW*=normalW;\n#ifdef DIFFUSEX\nbaseColor+=texture2D(diffuseSamplerX,vTextureUVX)*normalW.x;\n#ifdef BUMPX\nbaseNormal+=texture2D(normalSamplerX,vTextureUVX)*normalW.x;\n#endif\n#endif\n#ifdef DIFFUSEY\nbaseColor+=texture2D(diffuseSamplerY,vTextureUVY)*normalW.y;\n#ifdef BUMPY\nbaseNormal+=texture2D(normalSamplerY,vTextureUVY)*normalW.y;\n#endif\n#endif\n#ifdef DIFFUSEZ\nbaseColor+=texture2D(diffuseSamplerZ,vTextureUVZ)*normalW.z;\n#ifdef BUMPZ\nbaseNormal+=texture2D(normalSamplerZ,vTextureUVZ)*normalW.z;\n#endif\n#endif\n#ifdef NORMAL\nnormalW=normalize((2.0*baseNormal.xyz-1.0)*tangentSpace);\n#endif\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularBase=vec3(0.,0.,0.);\nvec3 specularColor=vSpecularColor.rgb;\n#else\nfloat glossiness=0.;\n#endif\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n\nvec4 color=vec4(finalDiffuse+finalSpecular,alpha);\n#include\ngl_FragColor=color;\n#include\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var triplanarPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./triPlanar/triplanar.vertex.ts": +/*!***************************************!*\ + !*** ./triPlanar/triplanar.vertex.ts ***! + \***************************************/ +/*! exports provided: triplanarVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "triplanarVertexShader", function() { return triplanarVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'triplanarVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSEX\nvarying vec2 vTextureUVX;\n#endif\n#ifdef DIFFUSEY\nvarying vec2 vTextureUVY;\n#endif\n#ifdef DIFFUSEZ\nvarying vec2 vTextureUVZ;\n#endif\nuniform float tileSize;\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying mat3 tangentSpace;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void)\n{\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef DIFFUSEX\nvTextureUVX=worldPos.zy/tileSize;\n#endif\n#ifdef DIFFUSEY\nvTextureUVY=worldPos.xz/tileSize;\n#endif\n#ifdef DIFFUSEZ\nvTextureUVZ=worldPos.xy/tileSize;\n#endif\n#ifdef NORMAL\n\nvec3 xtan=vec3(0,0,1);\nvec3 xbin=vec3(0,1,0);\nvec3 ytan=vec3(1,0,0);\nvec3 ybin=vec3(0,0,1);\nvec3 ztan=vec3(1,0,0);\nvec3 zbin=vec3(0,1,0);\nvec3 normalizedNormal=normalize(normal);\nnormalizedNormal*=normalizedNormal;\nvec3 worldBinormal=normalize(xbin*normalizedNormal.x+ybin*normalizedNormal.y+zbin*normalizedNormal.z);\nvec3 worldTangent=normalize(xtan*normalizedNormal.x+ytan*normalizedNormal.y+ztan*normalizedNormal.z);\nworldTangent=(world*vec4(worldTangent,1.0)).xyz;\nworldBinormal=(world*vec4(worldBinormal,1.0)).xyz;\nvec3 worldNormal=(world*vec4(normalize(normal),1.0)).xyz;\ntangentSpace[0]=worldTangent;\ntangentSpace[1]=worldBinormal;\ntangentSpace[2]=worldNormal;\n#endif\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var triplanarVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./water/index.ts": +/*!************************!*\ + !*** ./water/index.ts ***! + \************************/ +/*! exports provided: WaterMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _waterMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./waterMaterial */ "./water/waterMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WaterMaterial", function() { return _waterMaterial__WEBPACK_IMPORTED_MODULE_0__["WaterMaterial"]; }); + + + + +/***/ }), + +/***/ "./water/water.fragment.ts": +/*!*********************************!*\ + !*** ./water/water.fragment.ts ***! + \*********************************/ +/*! exports provided: waterPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "waterPixelShader", function() { return waterPixelShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + + + +var name = 'waterPixelShader'; +var shader = "#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\nprecision highp float;\n\nuniform vec3 vEyePosition;\nuniform vec4 vDiffuseColor;\n#ifdef SPECULARTERM\nuniform vec4 vSpecularColor;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n#include\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n\n#ifdef BUMP\nvarying vec2 vNormalUV;\nvarying vec2 vNormalUV2;\nuniform sampler2D normalSampler;\nuniform vec2 vNormalInfos;\n#endif\nuniform sampler2D refractionSampler;\nuniform sampler2D reflectionSampler;\n\nconst float LOG2=1.442695;\nuniform vec3 cameraPosition;\nuniform vec4 waterColor;\nuniform float colorBlendFactor;\nuniform vec4 waterColor2;\nuniform float colorBlendFactor2;\nuniform float bumpHeight;\nuniform float time;\n\nvarying vec3 vRefractionMapTexCoord;\nvarying vec3 vReflectionMapTexCoord;\nvarying vec3 vPosition;\n#include\n#include\n\n#include\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef BUMP\n#ifdef BUMPSUPERIMPOSE\nbaseColor=0.6*texture2D(normalSampler,vNormalUV)+0.4*texture2D(normalSampler,vec2(vNormalUV2.x,vNormalUV2.y));\n#else\nbaseColor=texture2D(normalSampler,vNormalUV);\n#endif\nvec3 bumpColor=baseColor.rgb;\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\nbaseColor.rgb*=vNormalInfos.y;\n#else\nvec3 bumpColor=vec3(1.0);\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec2 perturbation=bumpHeight*(baseColor.rg-0.5);\n#ifdef BUMPAFFECTSREFLECTION\nvec3 normalW=normalize(vNormalW+vec3(perturbation.x*8.0,0.0,perturbation.y*8.0));\nif (normalW.y<0.0) {\nnormalW.y=-normalW.y;\n}\n#else\nvec3 normalW=normalize(vNormalW);\n#endif\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\nvec2 perturbation=bumpHeight*(vec2(1.0,1.0)-0.5);\n#endif\n#ifdef FRESNELSEPARATE\n#ifdef REFLECTION\n\nvec2 projectedRefractionTexCoords=clamp(vRefractionMapTexCoord.xy/vRefractionMapTexCoord.z+perturbation*0.5,0.0,1.0);\nvec4 refractiveColor=texture2D(refractionSampler,projectedRefractionTexCoords);\n#ifdef IS_REFRACTION_LINEAR\nrefractiveColor.rgb=toGammaSpace(refractiveColor.rgb);\n#endif\nvec2 projectedReflectionTexCoords=clamp(vec2(\nvReflectionMapTexCoord.x/vReflectionMapTexCoord.z+perturbation.x*0.3,\nvReflectionMapTexCoord.y/vReflectionMapTexCoord.z+perturbation.y\n),0.0,1.0);\nvec4 reflectiveColor=texture2D(reflectionSampler,projectedReflectionTexCoords);\n#ifdef IS_REFLECTION_LINEAR\nreflectiveColor.rgb=toGammaSpace(reflectiveColor.rgb);\n#endif\nvec3 upVector=vec3(0.0,1.0,0.0);\nfloat fresnelTerm=clamp(abs(pow(dot(viewDirectionW,upVector),3.0)),0.05,0.65);\nfloat IfresnelTerm=1.0-fresnelTerm;\nrefractiveColor=colorBlendFactor*waterColor+(1.0-colorBlendFactor)*refractiveColor;\nreflectiveColor=IfresnelTerm*colorBlendFactor2*waterColor+(1.0-colorBlendFactor2*IfresnelTerm)*reflectiveColor;\nvec4 combinedColor=refractiveColor*fresnelTerm+reflectiveColor*IfresnelTerm;\nbaseColor=combinedColor;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularBase=vec3(0.,0.,0.);\nvec3 specularColor=vSpecularColor.rgb;\n#else\nfloat glossiness=0.;\n#endif\n#include[0..maxSimultaneousLights]\nvec3 finalDiffuse=clamp(baseColor.rgb,0.0,1.0);\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\n#else\n#ifdef REFLECTION\n\nvec2 projectedRefractionTexCoords=clamp(vRefractionMapTexCoord.xy/vRefractionMapTexCoord.z+perturbation,0.0,1.0);\nvec4 refractiveColor=texture2D(refractionSampler,projectedRefractionTexCoords);\n#ifdef IS_REFRACTION_LINEAR\nrefractiveColor.rgb=toGammaSpace(refractiveColor.rgb);\n#endif\nvec2 projectedReflectionTexCoords=clamp(vReflectionMapTexCoord.xy/vReflectionMapTexCoord.z+perturbation,0.0,1.0);\nvec4 reflectiveColor=texture2D(reflectionSampler,projectedReflectionTexCoords);\n#ifdef IS_REFLECTION_LINEAR\nreflectiveColor.rgb=toGammaSpace(reflectiveColor.rgb);\n#endif\nvec3 upVector=vec3(0.0,1.0,0.0);\nfloat fresnelTerm=max(dot(viewDirectionW,upVector),0.0);\nvec4 combinedColor=refractiveColor*fresnelTerm+reflectiveColor*(1.0-fresnelTerm);\nbaseColor=colorBlendFactor*waterColor+(1.0-colorBlendFactor)*combinedColor;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularBase=vec3(0.,0.,0.);\nvec3 specularColor=vSpecularColor.rgb;\n#else\nfloat glossiness=0.;\n#endif\n#include[0..maxSimultaneousLights]\nvec3 finalDiffuse=clamp(baseColor.rgb,0.0,1.0);\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\n#endif\n\nvec4 color=vec4(finalDiffuse+finalSpecular,alpha);\n#include\n#include\n\n\n#ifdef IMAGEPROCESSINGPOSTPROCESS\ncolor.rgb=toLinearSpace(color.rgb);\n#elif defined(IMAGEPROCESSING)\ncolor.rgb=toLinearSpace(color.rgb);\ncolor=applyImageProcessing(color);\n#endif\ngl_FragColor=color;\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var waterPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./water/water.vertex.ts": +/*!*******************************!*\ + !*** ./water/water.vertex.ts ***! + \*******************************/ +/*! exports provided: waterVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "waterVertexShader", function() { return waterVertexShader; }); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + + +var name = 'waterVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef BUMP\nvarying vec2 vNormalUV;\n#ifdef BUMPSUPERIMPOSE\nvarying vec2 vNormalUV2;\n#endif\nuniform mat4 normalMatrix;\nuniform vec2 vNormalInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n\nuniform mat4 worldReflectionViewProjection;\nuniform vec2 windDirection;\nuniform float waveLength;\nuniform float time;\nuniform float windForce;\nuniform float waveHeight;\nuniform float waveSpeed;\nuniform float waveCount;\n\nvarying vec3 vPosition;\nvarying vec3 vRefractionMapTexCoord;\nvarying vec3 vReflectionMapTexCoord;\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef BUMP\nif (vNormalInfos.x == 0.)\n{\nvNormalUV=vec2(normalMatrix*vec4((uv*1.0)/waveLength+time*windForce*windDirection,1.0,0.0));\n#ifdef BUMPSUPERIMPOSE\nvNormalUV2=vec2(normalMatrix*vec4((uv*0.721)/waveLength+time*1.2*windForce*windDirection,1.0,0.0));\n#endif\n}\nelse\n{\nvNormalUV=vec2(normalMatrix*vec4((uv2*1.0)/waveLength+time*windForce*windDirection ,1.0,0.0));\n#ifdef BUMPSUPERIMPOSE\nvNormalUV2=vec2(normalMatrix*vec4((uv2*0.721)/waveLength+time*1.2*windForce*windDirection ,1.0,0.0));\n#endif\n}\n#endif\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\nfloat finalWaveCount=1.0/(waveCount*0.5);\nvec3 p=position;\nfloat newY=(sin(((p.x/finalWaveCount)+time*waveSpeed))*waveHeight*windDirection.x*5.0)\n+(cos(((p.z/finalWaveCount)+time*waveSpeed))*waveHeight*windDirection.y*5.0);\np.y+=abs(newY);\ngl_Position=viewProjection*finalWorld*vec4(p,1.0);\n#ifdef REFLECTION\nworldPos=viewProjection*finalWorld*vec4(p,1.0);\n\nvPosition=position;\nvRefractionMapTexCoord.x=0.5*(worldPos.w+worldPos.x);\nvRefractionMapTexCoord.y=0.5*(worldPos.w+worldPos.y);\nvRefractionMapTexCoord.z=worldPos.w;\nworldPos=worldReflectionViewProjection*vec4(position,1.0);\nvReflectionMapTexCoord.x=0.5*(worldPos.w+worldPos.x);\nvReflectionMapTexCoord.y=0.5*(worldPos.w+worldPos.y);\nvReflectionMapTexCoord.z=worldPos.w;\n#endif\n#include\n}\n"; +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__["Effect"].ShadersStore[name] = shader; +/** @hidden */ +var waterVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./water/waterMaterial.ts": +/*!********************************!*\ + !*** ./water/waterMaterial.ts ***! + \********************************/ +/*! exports provided: WaterMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WaterMaterial", function() { return WaterMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _water_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./water.fragment */ "./water/water.fragment.ts"); +/* harmony import */ var _water_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./water.vertex */ "./water/water.vertex.ts"); + + + + + + + + + + + + + + + + + + + + +var WaterMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WaterMaterialDefines, _super); + function WaterMaterialDefines() { + var _this = _super.call(this) || this; + _this.BUMP = false; + _this.REFLECTION = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.SPECULARTERM = false; + _this.LOGARITHMICDEPTH = false; + _this.FRESNELSEPARATE = false; + _this.BUMPSUPERIMPOSE = false; + _this.BUMPAFFECTSREFLECTION = false; + _this.IMAGEPROCESSING = false; + _this.VIGNETTE = false; + _this.VIGNETTEBLENDMODEMULTIPLY = false; + _this.VIGNETTEBLENDMODEOPAQUE = false; + _this.TONEMAPPING = false; + _this.TONEMAPPING_ACES = false; + _this.CONTRAST = false; + _this.EXPOSURE = false; + _this.COLORCURVES = false; + _this.COLORGRADING = false; + _this.COLORGRADING3D = false; + _this.SAMPLER3DGREENDEPTH = false; + _this.SAMPLER3DBGRMAP = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return WaterMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var WaterMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WaterMaterial, _super); + /** + * Constructor + */ + function WaterMaterial(name, scene, renderTargetSize) { + if (renderTargetSize === void 0) { renderTargetSize = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector2"](512, 512); } + var _this = _super.call(this, name, scene) || this; + _this.renderTargetSize = renderTargetSize; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.specularColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0, 0, 0); + _this.specularPower = 64; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + /** + * Defines the wind force. + */ + _this.windForce = 6; + /** + * Defines the direction of the wind in the plane (X, Z). + */ + _this.windDirection = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector2"](0, 1); + /** + * Defines the height of the waves. + */ + _this.waveHeight = 0.4; + /** + * Defines the bump height related to the bump map. + */ + _this.bumpHeight = 0.4; + /** + * Defines wether or not: to add a smaller moving bump to less steady waves. + */ + _this._bumpSuperimpose = false; + /** + * Defines wether or not color refraction and reflection differently with .waterColor2 and .colorBlendFactor2. Non-linear (physically correct) fresnel. + */ + _this._fresnelSeparate = false; + /** + * Defines wether or not bump Wwves modify the reflection. + */ + _this._bumpAffectsReflection = false; + /** + * Defines the water color blended with the refraction (near). + */ + _this.waterColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0.1, 0.1, 0.6); + /** + * Defines the blend factor related to the water color. + */ + _this.colorBlendFactor = 0.2; + /** + * Defines the water color blended with the reflection (far). + */ + _this.waterColor2 = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0.1, 0.1, 0.6); + /** + * Defines the blend factor related to the water color (reflection, far). + */ + _this.colorBlendFactor2 = 0.2; + /** + * Defines the maximum length of a wave. + */ + _this.waveLength = 0.1; + /** + * Defines the waves speed. + */ + _this.waveSpeed = 1.0; + /** + * Defines the number of times waves are repeated. This is typically used to adjust waves count according to the ground's size where the material is applied on. + */ + _this.waveCount = 20; + /** + * Sets or gets whether or not automatic clipping should be enabled or not. Setting to true will save performances and + * will avoid calculating useless pixels in the pixel shader of the water material. + */ + _this.disableClipPlane = false; + _this._renderTargets = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SmartArray"](16); + /* + * Private members + */ + _this._mesh = null; + _this._reflectionTransform = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Matrix"].Zero(); + _this._lastTime = 0; + _this._lastDeltaTime = 0; + _this._createRenderTargets(scene, renderTargetSize); + // Create render targets + _this.getRenderTargetTextures = function () { + _this._renderTargets.reset(); + _this._renderTargets.push(_this._reflectionRTT); + _this._renderTargets.push(_this._refractionRTT); + return _this._renderTargets; + }; + _this._imageProcessingConfiguration = _this.getScene().imageProcessingConfiguration; + if (_this._imageProcessingConfiguration) { + _this._imageProcessingObserver = _this._imageProcessingConfiguration.onUpdateParameters.add(function () { + _this._markAllSubMeshesAsImageProcessingDirty(); + }); + } + return _this; + } + Object.defineProperty(WaterMaterial.prototype, "hasRenderTargetTextures", { + /** + * Gets a boolean indicating that current material needs to register RTT + */ + get: function () { + return true; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WaterMaterial.prototype, "useLogarithmicDepth", { + get: function () { + return this._useLogarithmicDepth; + }, + set: function (value) { + this._useLogarithmicDepth = value && this.getScene().getEngine().getCaps().fragmentDepthSupported; + this._markAllSubMeshesAsMiscDirty(); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WaterMaterial.prototype, "refractionTexture", { + // Get / Set + get: function () { + return this._refractionRTT; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WaterMaterial.prototype, "reflectionTexture", { + get: function () { + return this._reflectionRTT; + }, + enumerable: false, + configurable: true + }); + // Methods + WaterMaterial.prototype.addToRenderList = function (node) { + if (this._refractionRTT && this._refractionRTT.renderList) { + this._refractionRTT.renderList.push(node); + } + if (this._reflectionRTT && this._reflectionRTT.renderList) { + this._reflectionRTT.renderList.push(node); + } + }; + WaterMaterial.prototype.enableRenderTargets = function (enable) { + var refreshRate = enable ? 1 : 0; + if (this._refractionRTT) { + this._refractionRTT.refreshRate = refreshRate; + } + if (this._reflectionRTT) { + this._reflectionRTT.refreshRate = refreshRate; + } + }; + WaterMaterial.prototype.getRenderList = function () { + return this._refractionRTT ? this._refractionRTT.renderList : []; + }; + Object.defineProperty(WaterMaterial.prototype, "renderTargetsEnabled", { + get: function () { + return !(this._refractionRTT && this._refractionRTT.refreshRate === 0); + }, + enumerable: false, + configurable: true + }); + WaterMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + WaterMaterial.prototype.needAlphaTesting = function () { + return false; + }; + WaterMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + WaterMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh._materialDefines = new WaterMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this.bumpTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].BumpTextureEnabled) { + if (!this.bumpTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.BUMP = true; + } + } + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].ReflectionTextureEnabled) { + defines.REFLECTION = true; + } + } + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + if (defines._areMiscDirty) { + if (this._fresnelSeparate) { + defines.FRESNELSEPARATE = true; + } + if (this._bumpSuperimpose) { + defines.BUMPSUPERIMPOSE = true; + } + if (this._bumpAffectsReflection) { + defines.BUMPAFFECTSREFLECTION = true; + } + } + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, true, this._maxSimultaneousLights, this._disableLighting); + // Image processing + if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) { + if (!this._imageProcessingConfiguration.isReady()) { + return false; + } + this._imageProcessingConfiguration.prepareDefines(defines); + defines.IS_REFLECTION_LINEAR = (this.reflectionTexture != null && !this.reflectionTexture.gammaSpace); + defines.IS_REFRACTION_LINEAR = (this.refractionTexture != null && !this.refractionTexture.gammaSpace); + } + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Configure this + this._mesh = mesh; + if (this._waitingRenderList) { + for (var i = 0; i < this._waitingRenderList.length; i++) { + this.addToRenderList(scene.getNodeByID(this._waitingRenderList[i])); + } + this._waitingRenderList = null; + } + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + if (defines.LOGARITHMICDEPTH) { + fallbacks.addFallback(0, "LOGARITHMICDEPTH"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "water"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", "vSpecularColor", + "vFogInfos", "vFogColor", "pointSize", + "vNormalInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "normalMatrix", + "logarithmicDepthConstant", + // Water + "worldReflectionViewProjection", "windDirection", "waveLength", "time", "windForce", + "cameraPosition", "bumpHeight", "waveHeight", "waterColor", "waterColor2", "colorBlendFactor", "colorBlendFactor2", "waveSpeed", + "waveCount" + ]; + var samplers = ["normalSampler", + // Water + "refractionSampler", "reflectionSampler" + ]; + var uniformBuffers = new Array(); + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["ImageProcessingConfiguration"]) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["ImageProcessingConfiguration"].PrepareUniforms(uniforms, defines); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["ImageProcessingConfiguration"].PrepareSamplers(samplers, defines); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this._maxSimultaneousLights } + }, engine), defines); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + WaterMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect || !this._mesh) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this.bumpTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].BumpTextureEnabled) { + this._activeEffect.setTexture("normalSampler", this.bumpTexture); + this._activeEffect.setFloat2("vNormalInfos", this.bumpTexture.coordinatesIndex, this.bumpTexture.level); + this._activeEffect.setMatrix("normalMatrix", this.bumpTexture.getTextureMatrix()); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindEyePosition(effect, scene); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + if (defines.SPECULARTERM) { + this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower); + } + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + // Log. depth + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLogDepth(defines, this._activeEffect, scene); + // Water + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].ReflectionTextureEnabled) { + this._activeEffect.setTexture("refractionSampler", this._refractionRTT); + this._activeEffect.setTexture("reflectionSampler", this._reflectionRTT); + } + var wrvp = this._mesh.getWorldMatrix().multiply(this._reflectionTransform).multiply(scene.getProjectionMatrix()); + // Add delta time. Prevent adding delta time if it hasn't changed. + var deltaTime = scene.getEngine().getDeltaTime(); + if (deltaTime !== this._lastDeltaTime) { + this._lastDeltaTime = deltaTime; + this._lastTime += this._lastDeltaTime; + } + this._activeEffect.setMatrix("worldReflectionViewProjection", wrvp); + this._activeEffect.setVector2("windDirection", this.windDirection); + this._activeEffect.setFloat("waveLength", this.waveLength); + this._activeEffect.setFloat("time", this._lastTime / 100000); + this._activeEffect.setFloat("windForce", this.windForce); + this._activeEffect.setFloat("waveHeight", this.waveHeight); + this._activeEffect.setFloat("bumpHeight", this.bumpHeight); + this._activeEffect.setColor4("waterColor", this.waterColor, 1.0); + this._activeEffect.setFloat("colorBlendFactor", this.colorBlendFactor); + this._activeEffect.setColor4("waterColor2", this.waterColor2, 1.0); + this._activeEffect.setFloat("colorBlendFactor2", this.colorBlendFactor2); + this._activeEffect.setFloat("waveSpeed", this.waveSpeed); + this._activeEffect.setFloat("waveCount", this.waveCount); + // image processing + if (this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess) { + this._imageProcessingConfiguration.bind(this._activeEffect); + } + this._afterBind(mesh, this._activeEffect); + }; + WaterMaterial.prototype._createRenderTargets = function (scene, renderTargetSize) { + var _this = this; + // Render targets + this._refractionRTT = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["RenderTargetTexture"](name + "_refraction", { width: renderTargetSize.x, height: renderTargetSize.y }, scene, false, true); + this._refractionRTT.wrapU = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].TEXTURE_MIRROR_ADDRESSMODE; + this._refractionRTT.wrapV = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].TEXTURE_MIRROR_ADDRESSMODE; + this._refractionRTT.ignoreCameraViewport = true; + this._reflectionRTT = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["RenderTargetTexture"](name + "_reflection", { width: renderTargetSize.x, height: renderTargetSize.y }, scene, false, true); + this._reflectionRTT.wrapU = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].TEXTURE_MIRROR_ADDRESSMODE; + this._reflectionRTT.wrapV = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].TEXTURE_MIRROR_ADDRESSMODE; + this._reflectionRTT.ignoreCameraViewport = true; + var isVisible; + var clipPlane = null; + var savedViewMatrix; + var mirrorMatrix = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Matrix"].Zero(); + this._refractionRTT.onBeforeRender = function () { + if (_this._mesh) { + isVisible = _this._mesh.isVisible; + _this._mesh.isVisible = false; + } + // Clip plane + if (!_this.disableClipPlane) { + clipPlane = scene.clipPlane; + var positiony = _this._mesh ? _this._mesh.position.y : 0.0; + scene.clipPlane = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Plane"].FromPositionAndNormal(new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, positiony + 0.05, 0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, 1, 0)); + } + }; + this._refractionRTT.onAfterRender = function () { + if (_this._mesh) { + _this._mesh.isVisible = isVisible; + } + // Clip plane + if (!_this.disableClipPlane) { + scene.clipPlane = clipPlane; + } + }; + this._reflectionRTT.onBeforeRender = function () { + if (_this._mesh) { + isVisible = _this._mesh.isVisible; + _this._mesh.isVisible = false; + } + // Clip plane + if (!_this.disableClipPlane) { + clipPlane = scene.clipPlane; + var positiony = _this._mesh ? _this._mesh.position.y : 0.0; + scene.clipPlane = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Plane"].FromPositionAndNormal(new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, positiony - 0.05, 0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, -1, 0)); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Matrix"].ReflectionToRef(scene.clipPlane, mirrorMatrix); + } + // Transform + savedViewMatrix = scene.getViewMatrix(); + mirrorMatrix.multiplyToRef(savedViewMatrix, _this._reflectionTransform); + scene.setTransformMatrix(_this._reflectionTransform, scene.getProjectionMatrix()); + scene.getEngine().cullBackFaces = false; + scene._mirroredCameraPosition = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].TransformCoordinates(scene.activeCamera.position, mirrorMatrix); + }; + this._reflectionRTT.onAfterRender = function () { + if (_this._mesh) { + _this._mesh.isVisible = isVisible; + } + // Clip plane + scene.clipPlane = clipPlane; + // Transform + scene.setTransformMatrix(savedViewMatrix, scene.getProjectionMatrix()); + scene.getEngine().cullBackFaces = true; + scene._mirroredCameraPosition = null; + }; + }; + WaterMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.bumpTexture && this.bumpTexture.animations && this.bumpTexture.animations.length > 0) { + results.push(this.bumpTexture); + } + if (this._reflectionRTT && this._reflectionRTT.animations && this._reflectionRTT.animations.length > 0) { + results.push(this._reflectionRTT); + } + if (this._refractionRTT && this._refractionRTT.animations && this._refractionRTT.animations.length > 0) { + results.push(this._refractionRTT); + } + return results; + }; + WaterMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._bumpTexture) { + activeTextures.push(this._bumpTexture); + } + return activeTextures; + }; + WaterMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this._bumpTexture === texture) { + return true; + } + return false; + }; + WaterMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.bumpTexture) { + this.bumpTexture.dispose(); + } + var index = this.getScene().customRenderTargets.indexOf(this._refractionRTT); + if (index != -1) { + this.getScene().customRenderTargets.splice(index, 1); + } + index = -1; + index = this.getScene().customRenderTargets.indexOf(this._reflectionRTT); + if (index != -1) { + this.getScene().customRenderTargets.splice(index, 1); + } + if (this._reflectionRTT) { + this._reflectionRTT.dispose(); + } + if (this._refractionRTT) { + this._refractionRTT.dispose(); + } + // Remove image-processing observer + if (this._imageProcessingConfiguration && this._imageProcessingObserver) { + this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + WaterMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new WaterMaterial(name, _this.getScene()); }, this); + }; + WaterMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.WaterMaterial"; + serializationObject.renderList = []; + if (this._refractionRTT && this._refractionRTT.renderList) { + for (var i = 0; i < this._refractionRTT.renderList.length; i++) { + serializationObject.renderList.push(this._refractionRTT.renderList[i].id); + } + } + return serializationObject; + }; + WaterMaterial.prototype.getClassName = function () { + return "WaterMaterial"; + }; + // Statics + WaterMaterial.Parse = function (source, scene, rootUrl) { + var mat = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new WaterMaterial(source.name, scene); }, source, scene, rootUrl); + mat._waitingRenderList = source.renderList; + return mat; + }; + WaterMaterial.CreateDefaultMesh = function (name, scene) { + var mesh = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Mesh"].CreateGround(name, 512, 512, 32, scene, false); + return mesh; + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("bumpTexture") + ], WaterMaterial.prototype, "_bumpTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], WaterMaterial.prototype, "bumpTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], WaterMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], WaterMaterial.prototype, "specularColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "specularPower", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], WaterMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], WaterMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], WaterMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], WaterMaterial.prototype, "maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "windForce", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsVector2"])() + ], WaterMaterial.prototype, "windDirection", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "waveHeight", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "bumpHeight", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("bumpSuperimpose") + ], WaterMaterial.prototype, "_bumpSuperimpose", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsMiscDirty") + ], WaterMaterial.prototype, "bumpSuperimpose", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("fresnelSeparate") + ], WaterMaterial.prototype, "_fresnelSeparate", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsMiscDirty") + ], WaterMaterial.prototype, "fresnelSeparate", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("bumpAffectsReflection") + ], WaterMaterial.prototype, "_bumpAffectsReflection", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsMiscDirty") + ], WaterMaterial.prototype, "bumpAffectsReflection", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], WaterMaterial.prototype, "waterColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "colorBlendFactor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], WaterMaterial.prototype, "waterColor2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "colorBlendFactor2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "waveLength", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "waveSpeed", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "waveCount", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "disableClipPlane", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "useLogarithmicDepth", null); + return WaterMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.WaterMaterial"] = WaterMaterial; + + +/***/ }), + +/***/ "babylonjs/Misc/decorators": +/*!****************************************************************************************************!*\ + !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***! + \****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__; + +/***/ }) + +/******/ }); +}); +//# sourceMappingURL=babylonjs.materials.js.map \ No newline at end of file diff --git a/src/assets/js/serializers/babylonjs.serializers.min.js b/src/assets/js/serializers/babylonjs.serializers.min.js new file mode 100644 index 0000000..57b0f24 --- /dev/null +++ b/src/assets/js/serializers/babylonjs.serializers.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babylonjs")):"function"==typeof define&&define.amd?define("babylonjs-serializers",["babylonjs"],t):"object"==typeof exports?exports["babylonjs-serializers"]=t(require("babylonjs")):e.SERIALIZERS=t(e.BABYLON)}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=16)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),a=function(){function e(){}return e._CreateBufferView=function(e,t,r,n,a){var o={buffer:e,byteLength:r};return t&&(o.byteOffset=t),a&&(o.name=a),n&&(o.byteStride=n),o},e._CreateAccessor=function(e,t,r,n,a,o,i,s){var u={name:t,bufferView:e,componentType:n,count:a,type:r};return null!=i&&(u.min=i),null!=s&&(u.max=s),null!=o&&(u.byteOffset=o),u},e._CalculateMinMaxPositions=function(t,r,a,o){var i,s,u,l=[1/0,1/0,1/0],c=[-1/0,-1/0,-1/0];if(a)for(var f=r,h=r+a;fc[p]&&(c[p]=d),++i}}return{min:l,max:c}},e._GetRightHandedPositionVector3=function(e){return new n.Vector3(e.x,e.y,-e.z)},e._GetRightHandedPositionVector3FromRef=function(e){e.z*=-1},e._GetRightHandedPositionArray3FromRef=function(e){e[2]*=-1},e._GetRightHandedNormalVector3=function(e){return new n.Vector3(e.x,e.y,-e.z)},e._GetRightHandedNormalVector3FromRef=function(e){e.z*=-1},e._GetRightHandedNormalArray3FromRef=function(e){e[2]*=-1},e._GetRightHandedVector4FromRef=function(e){e.z*=-1,e.w*=-1},e._GetRightHandedArray4FromRef=function(e){e[2]*=-1,e[3]*=-1},e._GetRightHandedQuaternionFromRef=function(e){e.x*=-1,e.y*=-1},e._GetRightHandedQuaternionArrayFromRef=function(e){e[0]*=-1,e[1]*=-1},e._NormalizeTangentFromRef=function(e){var t=Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z);t>0&&(e.x/=t,e.y/=t,e.z/=t)},e._GetRightHandedMatrixFromRef=function(e){var t=e.m;n.Matrix.FromValuesToRef(t[0],t[1],-t[2],t[3],t[4],t[5],-t[6],t[7],-t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15],e)},e._GetDataAccessorElementCount=function(e){switch(e){case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16;case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":return 4}},e}()},function(e,t,r){"use strict";r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return l}));Object.create;Object.create;var n=r(0),a=r(10),o=r(1),i=r(3),s=r(7),u=function(){function e(e,t){this._includeCoordinateSystemConversionNodes=!1,this._extensions={},this._glTF={asset:{generator:"BabylonJS",version:"2.0"}},this._babylonScene=e,this._bufferViews=[],this._accessors=[],this._meshes=[],this._scenes=[],this._nodes=[],this._images=[],this._materials=[],this._materialMap=[],this._textures=[],this._samplers=[],this._skins=[],this._animations=[],this._imageData={},this._orderedImageData=[],this._options=t||{},this._animationSampleRate=t&&t.animationSampleRate?t.animationSampleRate:1/60,this._includeCoordinateSystemConversionNodes=!(!t||!t.includeCoordinateSystemConversionNodes),this._glTFMaterialExporter=new a.a(this),this._loadExtensions()}return e.prototype._applyExtension=function(e,t,r,n){var a=this;if(r>=t.length)return Promise.resolve(e);var o=n(t[r],e);return o?o.then((function(e){return a._applyExtension(e,t,r+1,n)})):this._applyExtension(e,t,r+1,n)},e.prototype._applyExtensions=function(t,r){for(var n=[],a=0,o=e._ExtensionNames;a=f;--i)o.setUInt32(r[i],a),a+=4;break;case n.Material.TriangleStripDrawMode:e.indexCount>=3&&(o.setUInt32(r[e.indexStart+2],a+4),o.setUInt32(r[e.indexStart+1],a+8))}},e.prototype.reorderVertexAttributeDataBasedOnPrimitiveMode=function(e,t,r,a,o,i,s,u){if(u&&r===n.Material.ClockWiseSideOrientation)switch(t){case n.Material.TriangleFillMode:this.reorderTriangleFillMode(e,t,r,a,o,i,s,u);break;case n.Material.TriangleStripDrawMode:this.reorderTriangleStripDrawMode(e,t,r,a,o,i,s,u);break;case n.Material.TriangleFanDrawMode:this.reorderTriangleFanMode(e,t,r,a,o,i,s,u)}},e.prototype.reorderTriangleFillMode=function(e,t,r,a,o,i,s,u){var l=this.getVertexBufferFromMesh(a,e.getMesh());if(l){var c=l.byteStride/n.VertexBuffer.GetTypeByteLength(l.type);if(e.verticesCount%3!=0)n.Tools.Error("The submesh vertices for the triangle fill mode is not divisible by 3!");else{var f=[],h=0;switch(a){case n.VertexBuffer.PositionKind:case n.VertexBuffer.NormalKind:for(var p=e.verticesStart;p=e.verticesStart;--p)h=p*c,f.push(n.Vector4.FromArray(o,h));break;case n.VertexBuffer.ColorKind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,4===l.getSize()?f.push(n.Vector4.FromArray(o,h)):f.push(n.Vector3.FromArray(o,h));break;case n.VertexBuffer.UVKind:case n.VertexBuffer.UV2Kind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(n.Vector2.FromArray(o,h));break;default:n.Tools.Error("Unsupported Vertex Buffer type: "+a)}this.writeVertexAttributeData(f,i+12,a,o,s,u)}else n.Tools.Warn("reorderTriangleStripDrawMode: Vertex buffer kind "+a+" not present!")},e.prototype.reorderTriangleFanMode=function(e,t,r,a,o,i,s,u){var l=this.getVertexBufferFromMesh(a,e.getMesh());if(l){var c=l.byteStride/n.VertexBuffer.GetTypeByteLength(l.type),f=[],h=0;switch(a){case n.VertexBuffer.PositionKind:case n.VertexBuffer.NormalKind:for(var p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(n.Vector3.FromArray(o,h));break;case n.VertexBuffer.TangentKind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(n.Vector4.FromArray(o,h));break;case n.VertexBuffer.ColorKind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(n.Vector4.FromArray(o,h)),4===l.getSize()?f.push(n.Vector4.FromArray(o,h)):f.push(n.Vector3.FromArray(o,h));break;case n.VertexBuffer.UVKind:case n.VertexBuffer.UV2Kind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(n.Vector2.FromArray(o,h));break;default:n.Tools.Error("Unsupported Vertex Buffer type: "+a)}this.writeVertexAttributeData(f,i,a,o,s,u)}else n.Tools.Warn("reorderTriangleFanMode: Vertex buffer kind "+a+" not present!")},e.prototype.writeVertexAttributeData=function(e,t,r,a,i,s){for(var u=0,l=e;u0){var k=null!==c.overrideMaterialSideOrientation?c.overrideMaterialSideOrientation:V.sideOrientation;if(k==n.Material.ClockWiseSideOrientation&&this._babylonScene.useRightHandedSystem||k==n.Material.ClockWiseSideOrientation&&a&&c.overrideMaterialSideOrientation!==(null===(i=c.material)||void 0===i?void 0:i.sideOrientation)){var K=null!=h?this._bufferViews[h].byteOffset:null;null==K&&(K=0);var D=null;if(null!=h&&(D=c.getIndices()),D)this.reorderIndicesBasedOnPrimitiveMode(R,p,D,K,r);else for(var U=0,H=f;Un.Epsilon)return!1;return!(e instanceof n.Mesh&&null!==e.geometry||e instanceof n.InstancedMesh&&null!==e.sourceMesh.geometry)&&!this._includeCoordinateSystemConversionNodes}return!1},e.prototype.createSceneAsync=function(e,t){var r,a,o,i=this,s={nodes:[]},u=function(){for(var e=0,t=0,r=arguments.length;t0){i.weights=[];for(var u=0;u-1&&(c[h]=g),f=Math.max(f,h)}for(var m=0;m<=f;++m){var g,_=(g=c[m]).getTransformNode();if(_){var x=g.getInvertedAbsoluteTransform();s._convertToRightHandedSystem&&o.a._GetRightHandedMatrixFromRef(x),u.push(x),i.joints.push(t[_.uniqueId])}}var y=64*u.length,T=r.getByteOffset(),v=o.a._CreateBufferView(0,T,y,64,"InverseBindMatrices - "+n.name);s._bufferViews.push(v);var b=s._bufferViews.length-1,A=o.a._CreateAccessor(b,"InverseBindMatrices - "+n.name,"MAT4",5126,u.length,null,null,null),F=s._accessors.push(A)-1;i.inverseBindMatrices=F,s._skins.push(i),a[n.uniqueId]=s._skins.length-1,u.forEach((function(e){e.m.forEach((function(e){r.setFloat32(e)}))}))},s=this,u=0,l=e.skeletons;uthis._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint8(this._byteOffset,e),this._byteOffset+=1)},e.prototype.setUInt16=function(e,t){null!=t?tthis._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint16(this._byteOffset,e,!0),this._byteOffset+=2)},e.prototype.getUInt32=function(e){if(ethis._byteOffset?n.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(e.x=this._dataView.getFloat32(t,!0),e.y=this._dataView.getFloat32(t+4,!0),e.z=this._dataView.getFloat32(t+8,!0))},e.prototype.setVector3Float32FromRef=function(e,t){t+8>this._byteOffset?n.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._dataView.setFloat32(t,e.x,!0),this._dataView.setFloat32(t+4,e.y,!0),this._dataView.setFloat32(t+8,e.z,!0))},e.prototype.getVector4Float32FromRef=function(e,t){t+12>this._byteOffset?n.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(e.x=this._dataView.getFloat32(t,!0),e.y=this._dataView.getFloat32(t+4,!0),e.z=this._dataView.getFloat32(t+8,!0),e.w=this._dataView.getFloat32(t+12,!0))},e.prototype.setVector4Float32FromRef=function(e,t){t+12>this._byteOffset?n.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._dataView.setFloat32(t,e.x,!0),this._dataView.setFloat32(t+4,e.y,!0),this._dataView.setFloat32(t+8,e.z,!0),this._dataView.setFloat32(t+12,e.w,!0))},e.prototype.setFloat32=function(e,t){isNaN(e)&&n.Tools.Error("Invalid data being written!"),null!=t&&(tthis._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setFloat32(this._byteOffset,e,!0),this._byteOffset+=4},e.prototype.setUInt32=function(e,t){null!=t?tthis._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint32(this._byteOffset,e,!0),this._byteOffset+=4)},e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"GLTFData",(function(){return n}));var n=function(){function e(){this.glTFFiles={}}return e.prototype.downloadFiles=function(){function e(e,t){return-1!==e.indexOf(t,e.length-t.length)}for(var t in this.glTFFiles){var r=document.createElement("a");document.body.appendChild(r),r.setAttribute("type","hidden"),r.download=t;var n=this.glTFFiles[t],a=void 0;e(t,".glb")?a={type:"model/gltf-binary"}:e(t,".bin")?a={type:"application/octet-stream"}:e(t,".gltf")?a={type:"model/gltf+json"}:e(t,".jpeg")?a={type:"image/jpeg"}:e(t,".png")&&(a={type:"image/png"}),r.href=window.URL.createObjectURL(new Blob([n],a)),r.click()}},e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"__IGLTFExporterExtension",(function(){return n}));var n=0},function(e,t,r){"use strict";r.r(t),r.d(t,"OBJExport",(function(){return a}));var n=r(0),a=function(){function e(){}return e.OBJ=function(e,t,r,a){var o=[],i=1;t&&(r||(r="mat"),o.push("mtllib "+r+".mtl"));for(var s=0;s0;)E=A.inputs.shift(),F%m==0&&M.push(E),F++;A.inputs=M}var R=u[n.uniqueId],V=4*A.inputs.length;g=o.a._CreateBufferView(0,l.getByteOffset(),V,void 0,t+" keyframe data view"),c.push(g),A.inputs.forEach((function(e){l.setFloat32(e)})),_=o.a._CreateAccessor(c.length-1,t+" keyframes","SCALAR",5126,A.inputs.length,null,[A.inputsMin],[A.inputsMax]),f.push(_),x=f.length-1,T=A.outputs.length,V=4*o.a._GetDataAccessorElementCount(i)*A.outputs.length,g=o.a._CreateBufferView(0,l.getByteOffset(),V,void 0,t+" data view"),c.push(g),A.outputs.forEach((function(e){e.forEach((function(e){l.setFloat32(e)}))})),_=o.a._CreateAccessor(c.length-1,t+" data",i,5126,T,null,null,null),f.push(_),y=f.length-1,v={interpolation:A.samplerInterpolation,input:x,output:y},r.samplers.push(v),b={sampler:r.samplers.length-1,target:{node:R,path:s}},r.channels.push(b)}},e._CreateBakedAnimation=function(t,r,n,o,i,s,u,l,c,f,h,p){var d,m,g=a.Quaternion.Identity(),_=null,x=null,y=null,T=null,v=null,b=null;f.min=a.Tools.FloatRound(o/s);for(var A=r.getKeys(),F=0,E=A.length;F-1&&(this._textureInfos[n]=t)},e.prototype.postExportMaterialAdditionalTextures=function(e,t,r){return r instanceof n.PBRMaterial&&r.sheen.isEnabled&&r.sheen.texture?(this._exportedTextures.push(r.sheen.texture),[r.sheen.texture]):[]},e.prototype.postExportMaterialAsync=function(e,t,r){var a=this;return new Promise((function(e,o){var i;if(r instanceof n.PBRMaterial){if(!r.sheen.isEnabled)return void e(t);a._wasUsed=!0,null==t.extensions&&(t.extensions={});var s={sheenColorFactor:r.sheen.color.asArray(),sheenRoughnessFactor:null!==(i=r.sheen.roughness)&&void 0!==i?i:0};if(r.sheen.texture)(u=a._getTextureIndex(r.sheen.texture))>-1&&(s.sheenColorTexture=a._textureInfos[u]);if(r.sheen.textureRoughness&&!r.sheen.useRoughnessFromMainTexture)(u=a._getTextureIndex(r.sheen.textureRoughness))>-1&&(s.sheenRoughnessTexture=a._textureInfos[u]);else if(r.sheen.texture&&r.sheen.useRoughnessFromMainTexture){var u;(u=a._getTextureIndex(r.sheen.texture))>-1&&(s.sheenRoughnessTexture=a._textureInfos[u])}t.extensions.KHR_materials_sheen=s}e(t)}))},e}();a.b.RegisterExtension("KHR_materials_sheen",(function(e){return new c(e)}));var f=function(){function e(e){this.name="KHR_materials_unlit",this.enabled=!0,this.required=!1,this._wasUsed=!1}return Object.defineProperty(e.prototype,"wasUsed",{get:function(){return this._wasUsed},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){},e.prototype.postExportMaterialAsync=function(e,t,r){var a=this;return new Promise((function(e,o){var i=!1;r instanceof n.PBRMaterial?i=r.unlit:r instanceof n.StandardMaterial&&(i=r.disableLighting),i&&(a._wasUsed=!0,null==t.extensions&&(t.extensions={}),t.extensions.KHR_materials_unlit={}),e(t)}))},e}();a.b.RegisterExtension("KHR_materials_unlit",(function(e){return new f(e)}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),a=function(){function e(e){this._textureMap={},this._textureMap={},this._exporter=e}return e.FuzzyEquals=function(e,t,r){return n.Scalar.WithinEpsilon(e.r,t.r,r)&&n.Scalar.WithinEpsilon(e.g,t.g,r)&&n.Scalar.WithinEpsilon(e.b,t.b,r)},e.prototype._convertMaterialsToGLTFAsync=function(e,t,r){for(var a=[],o=0,i=e;os.width?(o=t&&t instanceof n.Texture?n.TextureTools.CreateResizedCopy(t,i.width,i.height,!0):this._createWhiteTexture(i.width,i.height,r),a=e):(a=e,o=t),{texture1:a,texture2:o}},e.prototype._convertPixelArrayToFloat32=function(e){if(e instanceof Uint8Array){for(var t=e.length,r=new Float32Array(e.length),n=0;ne._Epsilon?R.baseColor.r:1,x[S+1]/=R.baseColor.g>e._Epsilon?R.baseColor.g:1,x[S+2]/=R.baseColor.b>e._Epsilon?R.baseColor.b:1;var C=n.Color3.FromInts(x[S],x[S+1],x[S+2]).toGammaSpace();x[S]=255*C.r,x[S+1]=255*C.g,x[S+2]=255*C.b,e.FuzzyEquals(C,n.Color3.White(),e._Epsilon)||(w=!0),_[S+1]/=R.roughness>e._Epsilon?R.roughness:1,_[S+2]/=R.metallic>e._Epsilon?R.metallic:1;var B=n.Color3.FromInts(255,_[S+1],_[S+2]);e.FuzzyEquals(B,n.Color3.White(),e._Epsilon)||(V=!0)}if(V){var I=this._createBase64FromCanvasAsync(_,h,p,o).then((function(e){R.metallicRoughnessTextureBase64=e}));i.push(I)}if(w){I=this._createBase64FromCanvasAsync(x,h,p,o).then((function(e){R.baseColorTextureBase64=e}));i.push(I)}return Promise.all(i).then((function(){return R}))}return Promise.reject("_ConvertSpecularGlossinessTexturesToMetallicRoughness: Scene from textures is missing!")},e.prototype._convertSpecularGlossinessToMetallicRoughness=function(t){var r=this._getPerceivedBrightness(t.diffuseColor),a=this._getPerceivedBrightness(t.specularColor),o=1-this._getMaxComponent(t.specularColor),i=e._SolveMetallic(r,a,o),s=t.diffuseColor.scale(o/(1-e._DielectricSpecular.r)/Math.max(1-i,e._Epsilon)),u=t.specularColor.subtract(e._DielectricSpecular.scale(1-i)).scale(1/Math.max(i,e._Epsilon)),l=n.Color3.Lerp(s,u,i*i);return{baseColor:l=l.clampToRef(0,1,l),metallic:i,roughness:1-t.glossiness}},e.prototype._getPerceivedBrightness=function(e){return e?Math.sqrt(.299*e.r*e.r+.587*e.g*e.g+.114*e.b*e.b):0},e.prototype._getMaxComponent=function(e){return e?Math.max(e.r,Math.max(e.g,e.b)):0},e.prototype._convertMetalRoughFactorsToMetallicRoughnessAsync=function(e,t,r,n){var a=[],o={baseColor:e.albedoColor,metallic:e.metallic,roughness:e.roughness};return n&&(e.albedoTexture&&a.push(this._exportTextureAsync(e.albedoTexture,t).then((function(e){e&&(r.baseColorTexture=e)}))),e.metallicTexture&&a.push(this._exportTextureAsync(e.metallicTexture,t).then((function(e){e&&(r.metallicRoughnessTexture=e)})))),Promise.all(a).then((function(){return o}))},e.prototype._getGLTFTextureSampler=function(e){var t=this._getGLTFTextureWrapModesSampler(e),r=e instanceof n.Texture?e.samplingMode:null;if(null!=r)switch(r){case n.Texture.LINEAR_LINEAR:t.magFilter=9729,t.minFilter=9729;break;case n.Texture.LINEAR_NEAREST:t.magFilter=9729,t.minFilter=9728;break;case n.Texture.NEAREST_LINEAR:t.magFilter=9728,t.minFilter=9729;break;case n.Texture.NEAREST_LINEAR_MIPLINEAR:t.magFilter=9728,t.minFilter=9987;break;case n.Texture.NEAREST_NEAREST:t.magFilter=9728,t.minFilter=9728;break;case n.Texture.NEAREST_LINEAR_MIPNEAREST:t.magFilter=9728,t.minFilter=9985;break;case n.Texture.LINEAR_NEAREST_MIPNEAREST:t.magFilter=9729,t.minFilter=9984;break;case n.Texture.LINEAR_NEAREST_MIPLINEAR:t.magFilter=9729,t.minFilter=9986;break;case n.Texture.NEAREST_NEAREST_MIPLINEAR:t.magFilter=9728,t.minFilter=9986;break;case n.Texture.LINEAR_LINEAR_MIPLINEAR:t.magFilter=9729,t.minFilter=9987;break;case n.Texture.LINEAR_LINEAR_MIPNEAREST:t.magFilter=9729,t.minFilter=9985;break;case n.Texture.NEAREST_NEAREST_MIPNEAREST:t.magFilter=9728,t.minFilter=9984}return t},e.prototype._getGLTFTextureWrapMode=function(e){switch(e){case n.Texture.WRAP_ADDRESSMODE:return 10497;case n.Texture.CLAMP_ADDRESSMODE:return 33071;case n.Texture.MIRROR_ADDRESSMODE:return 33648;default:return n.Tools.Error("Unsupported Texture Wrap Mode "+e+"!"),10497}},e.prototype._getGLTFTextureWrapModesSampler=function(e){var t=this._getGLTFTextureWrapMode(e instanceof n.Texture?e.wrapU:n.Texture.WRAP_ADDRESSMODE),r=this._getGLTFTextureWrapMode(e instanceof n.Texture?e.wrapV:n.Texture.WRAP_ADDRESSMODE);return 10497===t&&10497===r?{}:{wrapS:t,wrapT:r}},e.prototype._convertSpecGlossFactorsToMetallicRoughnessAsync=function(e,t,r,a){var o=this;return Promise.resolve().then((function(){var i=o._exporter._samplers,s=o._exporter._textures,u={diffuseColor:e.albedoColor||n.Color3.White(),specularColor:e.reflectivityColor||n.Color3.White(),glossiness:e.microSurface||1},l=null,c=o._getGLTFTextureSampler(e.albedoTexture);return null!=c.magFilter&&null!=c.minFilter&&null!=c.wrapS&&null!=c.wrapT&&(i.push(c),l=i.length-1),e.reflectivityTexture&&!e.useMicroSurfaceFromReflectivityMapAlpha?Promise.reject("_ConvertPBRMaterial: Glossiness values not included in the reflectivity texture are currently not supported"):(e.albedoTexture||e.reflectivityTexture)&&a?o._convertSpecularGlossinessTexturesToMetallicRoughnessAsync(e.albedoTexture,e.reflectivityTexture,u,t).then((function(n){if(n.baseColorTextureBase64){var a=o._getTextureInfoFromBase64(n.baseColorTextureBase64,"bjsBaseColorTexture_"+s.length+".png",t,e.albedoTexture?e.albedoTexture.coordinatesIndex:null,l);a&&(r.baseColorTexture=a)}if(n.metallicRoughnessTextureBase64){var i=o._getTextureInfoFromBase64(n.metallicRoughnessTextureBase64,"bjsMetallicRoughnessTexture_"+s.length+".png",t,e.reflectivityTexture?e.reflectivityTexture.coordinatesIndex:null,l);i&&(r.metallicRoughnessTexture=i)}return n})):o._convertSpecularGlossinessToMetallicRoughness(u)}))},e.prototype._convertPBRMaterialAsync=function(e,t,r){var n=this,a={},o={name:e.name};return e.isMetallicWorkflow()?(e.albedoColor&&(a.baseColorFactor=[e.albedoColor.r,e.albedoColor.g,e.albedoColor.b,e.alpha]),this._convertMetalRoughFactorsToMetallicRoughnessAsync(e,t,a,r).then((function(i){return n.setMetallicRoughnessPbrMaterial(i,e,o,a,t,r)}))):this._convertSpecGlossFactorsToMetallicRoughnessAsync(e,t,a,r).then((function(i){return n.setMetallicRoughnessPbrMaterial(i,e,o,a,t,r)}))},e.prototype.setMetallicRoughnessPbrMaterial=function(t,r,a,o,i,s){var u=this._exporter._materialMap,l=this._exporter._materials,c=[];if(t){if(e._SetAlphaMode(a,r),e.FuzzyEquals(t.baseColor,n.Color3.White(),e._Epsilon)&&r.alpha>=e._Epsilon||(o.baseColorFactor=[t.baseColor.r,t.baseColor.g,t.baseColor.b,r.alpha]),null!=t.metallic&&1!==t.metallic&&(o.metallicFactor=t.metallic),null!=t.roughness&&1!==t.roughness&&(o.roughnessFactor=t.roughness),null==r.backFaceCulling||r.backFaceCulling||(r.twoSidedLighting||n.Tools.Warn(r.name+": Back-face culling enabled and two-sided lighting disabled is not supported in glTF."),a.doubleSided=!0),s){if(r.bumpTexture){var f=this._exportTextureAsync(r.bumpTexture,i).then((function(e){e&&(a.normalTexture=e,1!==r.bumpTexture.level&&(a.normalTexture.scale=r.bumpTexture.level))}));c.push(f)}if(r.ambientTexture){f=this._exportTextureAsync(r.ambientTexture,i).then((function(e){if(e){var t={index:e.index,texCoord:e.texCoord};a.occlusionTexture=t,r.ambientTextureStrength&&(t.strength=r.ambientTextureStrength)}}));c.push(f)}if(r.emissiveTexture){f=this._exportTextureAsync(r.emissiveTexture,i).then((function(e){e&&(a.emissiveTexture=e)}));c.push(f)}}e.FuzzyEquals(r.emissiveColor,n.Color3.Black(),e._Epsilon)||(a.emissiveFactor=r.emissiveColor.asArray()),a.pbrMetallicRoughness=o,l.push(a),u[r.uniqueId]=l.length-1}return this._finishMaterial(c,a,r,i)},e.prototype.getPixelsFromTexture=function(e){return e.textureType,n.Constants.TEXTURETYPE_UNSIGNED_INT,e.readPixels()},e.prototype._exportTextureAsync=function(e,t){var r=this,n=this._exporter._extensionsPreExportTextureAsync("exporter",e,t);return n?n.then((function(n){return n?r._exportTextureInfoAsync(n,t):r._exportTextureInfoAsync(e,t)})):this._exportTextureInfoAsync(e,t)},e.prototype._exportTextureInfoAsync=function(e,t){var r=this;return Promise.resolve().then((function(){var n=e.uid;if(n in r._textureMap)return r._textureMap[n];var a=r.getPixelsFromTexture(e);if(!a)return null;for(var o=r._exporter._samplers,i=r._getGLTFTextureSampler(e),s=null,u=null,l=0;l-1||(l.GLTF2.Exporter[f]=s[f])}}.call(this,r(11))},function(e,t,r){"use strict";r.r(t),function(e){var n=r(5);r.d(t,"OBJExport",(function(){return n.OBJExport}));var a=void 0!==e?e:"undefined"!=typeof window?window:void 0;if(void 0!==a)for(var o in n)a.BABYLON[o]=n[o]}.call(this,r(11))},function(e,t,r){"use strict";(function(e){var n=r(12);r.d(t,"a",(function(){return n.STLExport}));var a=void 0!==e?e:"undefined"!=typeof window?window:void 0;if(void 0!==a)for(var o in n)a.BABYLON[o]=n[o]}).call(this,r(11))},function(e,t,r){"use strict";r.r(t),r.d(t,"__IGLTFExporterExtension",(function(){return n.__IGLTFExporterExtension})),r.d(t,"_GLTFAnimation",(function(){return n._GLTFAnimation})),r.d(t,"GLTFData",(function(){return n.GLTFData})),r.d(t,"_Exporter",(function(){return n._Exporter})),r.d(t,"_BinaryWriter",(function(){return n._BinaryWriter})),r.d(t,"__IGLTFExporterExtensionV2",(function(){return n.__IGLTFExporterExtensionV2})),r.d(t,"_GLTFMaterialExporter",(function(){return n._GLTFMaterialExporter})),r.d(t,"GLTF2Export",(function(){return n.GLTF2Export})),r.d(t,"_GLTFUtilities",(function(){return n._GLTFUtilities})),r.d(t,"KHR_texture_transform",(function(){return n.KHR_texture_transform})),r.d(t,"KHR_lights_punctual",(function(){return n.KHR_lights_punctual})),r.d(t,"KHR_materials_sheen",(function(){return n.KHR_materials_sheen})),r.d(t,"KHR_materials_unlit",(function(){return n.KHR_materials_unlit})),r.d(t,"OBJExport",(function(){return a.OBJExport})),r.d(t,"STLExport",(function(){return o.a}));r(5),r(4),r(6),r(12);var n=r(13),a=r(14),o=r(15)}])})); \ No newline at end of file diff --git a/src/assets/js/zstddec.wasm b/src/assets/js/zstddec.wasm new file mode 100644 index 0000000..181bd3d Binary files /dev/null and b/src/assets/js/zstddec.wasm differ diff --git a/src/assets/mesh/outdoor/ZhuTi/FireExtinguisher_FireExtinguisher_AlbedoTransparency.png b/src/assets/mesh/outdoor/ZhuTi/FireExtinguisher_FireExtinguisher_AlbedoTransparency.png new file mode 100644 index 0000000..f21d889 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/FireExtinguisher_FireExtinguisher_AlbedoTransparency.png differ diff --git a/src/assets/mesh/outdoor/ZhuTi/LuZhuang.jpg b/src/assets/mesh/outdoor/ZhuTi/LuZhuang.jpg new file mode 100644 index 0000000..9aa634b Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/LuZhuang.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/QiCaiXiang.jpg b/src/assets/mesh/outdoor/ZhuTi/QiCaiXiang.jpg new file mode 100644 index 0000000..0ac3fd3 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/QiCaiXiang.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/SanXiang.jpg b/src/assets/mesh/outdoor/ZhuTi/SanXiang.jpg new file mode 100644 index 0000000..a6c37aa Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/SanXiang.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ShaDai.jpg b/src/assets/mesh/outdoor/ZhuTi/ShaDai.jpg new file mode 100644 index 0000000..2e50d6c Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ShaDai.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_BanGong.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_BanGong.jpg new file mode 100644 index 0000000..2de2247 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_BanGong.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_ChuGuan.png b/src/assets/mesh/outdoor/ZhuTi/ZHSY_ChuGuan.png new file mode 100644 index 0000000..59601e3 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_ChuGuan.png differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_GX1.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_GX1.jpg new file mode 100644 index 0000000..4325bb8 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_GX1.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_JYJ1.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_JYJ1.jpg new file mode 100644 index 0000000..ce8b8f9 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_JYJ1.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_JYJ2.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_JYJ2.jpg new file mode 100644 index 0000000..ca70a09 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_JYJ2.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_JingGai.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_JingGai.jpg new file mode 100644 index 0000000..2d94d0f Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_JingGai.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_JingGai1.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_JingGai1.jpg new file mode 100644 index 0000000..c95f69d Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_JingGai1.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_SXT.png b/src/assets/mesh/outdoor/ZhuTi/ZHSY_SXT.png new file mode 100644 index 0000000..8b3a004 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_SXT.png differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_SheDeng1.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_SheDeng1.jpg new file mode 100644 index 0000000..3a0b979 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_SheDeng1.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_floor1.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_floor1.jpg new file mode 100644 index 0000000..027e737 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_floor1.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_floor2.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_floor2.jpg new file mode 100644 index 0000000..d2277f7 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_floor2.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg1.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg1.jpg new file mode 100644 index 0000000..a2e59ea Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg1.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg2.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg2.jpg new file mode 100644 index 0000000..216f919 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg2.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg3.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg3.jpg new file mode 100644 index 0000000..fbc9e12 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg3.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg4.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg4.jpg new file mode 100644 index 0000000..9f77d31 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg4.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg5.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg5.jpg new file mode 100644 index 0000000..3c9c0b9 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg5.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg6.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg6.jpg new file mode 100644 index 0000000..892b1f7 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_gg6.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_glass1.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_glass1.jpg new file mode 100644 index 0000000..4882012 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_glass1.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_guitai1.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_guitai1.jpg new file mode 100644 index 0000000..4c54236 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_guitai1.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall1.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall1.jpg new file mode 100644 index 0000000..77cffcb Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall1.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall10.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall10.jpg new file mode 100644 index 0000000..f69ea05 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall10.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall11.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall11.jpg new file mode 100644 index 0000000..eb697c8 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall11.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall12.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall12.jpg new file mode 100644 index 0000000..7670ad4 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall12.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall2.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall2.jpg new file mode 100644 index 0000000..10326e8 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall2.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall3.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall3.jpg new file mode 100644 index 0000000..d11fb5f Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall3.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall4.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall4.jpg new file mode 100644 index 0000000..ce0f7cd Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall4.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall5.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall5.jpg new file mode 100644 index 0000000..b9ae9d1 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall5.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall6.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall6.jpg new file mode 100644 index 0000000..5a5a706 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall6.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall7.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall7.jpg new file mode 100644 index 0000000..53139a9 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall7.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall8.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall8.jpg new file mode 100644 index 0000000..7aeeb16 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall8.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall9.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall9.jpg new file mode 100644 index 0000000..96add60 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_wall9.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZHSY_yinxiang.jpg b/src/assets/mesh/outdoor/ZhuTi/ZHSY_yinxiang.jpg new file mode 100644 index 0000000..d205938 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZHSY_yinxiang.jpg differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZhuTi.bin b/src/assets/mesh/outdoor/ZhuTi/ZhuTi.bin new file mode 100644 index 0000000..1d3d241 Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/ZhuTi.bin differ diff --git a/src/assets/mesh/outdoor/ZhuTi/ZhuTi.gltf b/src/assets/mesh/outdoor/ZhuTi/ZhuTi.gltf new file mode 100644 index 0000000..4b84781 --- /dev/null +++ b/src/assets/mesh/outdoor/ZhuTi/ZhuTi.gltf @@ -0,0 +1,10098 @@ +{ + "asset": { + "version": "2.0", + "generator": "babylon.js glTF exporter for 3dsmax 2019 v20210811.2" + }, + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ], + "nodes": [ + { + "children": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 58, + 71, + 72, + 73, + 77, + 78 + ], + "translation": [ + 9.92874, + 1.61472869, + -0.625 + ], + "name": "ZhuTi", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 0, + "translation": [ + 11.50237, + -4.75472927, + -11.375 + ], + "rotation": [ + 0.430459321, + -0.4304594, + 0.560985565, + 0.560985446 + ], + "scale": [ + 0.99999994, + 1, + 0.99999994 + ], + "name": "ZHSY_ChuGuan1" + }, + { + "mesh": 1, + "translation": [ + 11.6764669, + -1.67602837, + -12.6976147 + ], + "rotation": [ + 0.7042259, + 0.06376507, + 0.06376506, + 0.7042257 + ], + "scale": [ + 1.75940943, + 1.75940931, + 1.75940943 + ], + "name": "ZHSY_GX2" + }, + { + "mesh": 2, + "translation": [ + 5.77240658, + -2.91259241, + -13.875 + ], + "name": "ZHSY_GX1", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 3, + "translation": [ + 11.50237, + -4.75472927, + -7.01406527 + ], + "rotation": [ + 0.430459321, + -0.4304594, + 0.560985565, + 0.560985446 + ], + "scale": [ + 0.99999994, + 1, + 0.99999994 + ], + "name": "ZHSY_ChuGuan2" + }, + { + "mesh": 4, + "translation": [ + 5.77240658, + -2.93947172, + -13.875 + ], + "name": "ZHSY_ChuGuan_fa1", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 5, + "translation": [ + 10.0309486, + -2.9134717, + -11.9006853 + ], + "rotation": [ + 0.7071068, + 0, + 0, + 0.7071067 + ], + "scale": [ + 1, + 1.2992444, + 1 + ], + "name": "ZHSY_ChuGuan_fa2" + }, + { + "mesh": 6, + "translation": [ + 3.35126162, + 4.785271, + 3.34500051 + ], + "scale": [ + 1, + 0.820413351, + 1 + ], + "name": "ZH_peng2", + "rotation": [ + 0, + 0, + 0, + 1 + ] + }, + { + "mesh": 7, + "translation": [ + 0.791261554, + -1.61472869, + -1.295 + ], + "name": "ZH_peng1", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 8, + "translation": [ + 10.5694408, + -1.61472869, + -14.3374252 + ], + "name": "ZH_wall", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 9, + "translation": [ + -5.80873966, + -1.61472869, + -19.855 + ], + "name": "ZH_WSJ", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 10, + "translation": [ + -5.942072, + -1.61472869, + 0.945 + ], + "name": "ZH_BLD_wall", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 11, + "translation": [ + -5.992072, + -1.61472869, + 0.945 + ], + "name": "ZH_BLD_men", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 12, + "translation": [ + -6.70873928, + 1.98527, + 0.465000153 + ], + "name": "ZH_BLD_DING", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 13, + "translation": [ + -8.135157, + 0.972169757, + -5.1428175 + ], + "name": "ZH_BLD_GG1", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 14, + "translation": [ + -6.70873928, + -1.414728, + 0.465 + ], + "name": "ZH_BLD_floor", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 15, + "translation": [ + -9.867939, + -1.61472869, + 6.015 + ], + "name": "ZH_XCF", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 16, + "translation": [ + 0.8112616, + -1.24315059, + 1.5718087 + ], + "rotation": [ + 0.7071068, + 0, + 0, + 0.7071067 + ], + "name": "ZH_Zhang1", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 17, + "translation": [ + 7.99126148, + 0.265364379, + 8.772022 + ], + "rotation": [ + 0.5, + -0.5, + 0.50000006, + 0.49999994 + ], + "scale": [ + 0.612656951, + 1, + 0.612656951 + ], + "name": "JYJ4" + }, + { + "mesh": 18, + "translation": [ + 8.011261, + -1.61472869, + 8.145001 + ], + "name": "JYJ_di", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 19, + "translation": [ + 0.791261554, + -1.464729, + 7.665001 + ], + "name": "JYJ_pai1", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 20, + "translation": [ + 0.8604315, + -1.46472871, + 6.475841 + ], + "rotation": [ + 0, + 0.7071068, + 0, + 0.7071067 + ], + "name": "JYJ_pai3", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 21, + "translation": [ + 0.791261554, + 0.265364379, + 8.772022 + ], + "rotation": [ + 0.5, + -0.5, + 0.50000006, + 0.49999994 + ], + "scale": [ + 0.612656951, + 1, + 0.612656951 + ], + "name": "JYJ2" + }, + { + "mesh": 22, + "translation": [ + 0.791261554, + 0.265364379, + -0.1879785 + ], + "rotation": [ + 0.5, + -0.5, + 0.50000006, + 0.49999994 + ], + "scale": [ + 0.612656951, + 1, + 0.612656951 + ], + "name": "JYJ1" + }, + { + "mesh": 23, + "translation": [ + 7.99312162, + -1.46472871, + 1.41223145 + ], + "name": "JYJ_pai2", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 24, + "translation": [ + 7.99126148, + 0.265364379, + -0.1879785 + ], + "rotation": [ + 0.5, + -0.5, + 0.50000006, + 0.49999994 + ], + "scale": [ + 0.612656951, + 1, + 0.612656951 + ], + "name": "JYJ3" + }, + { + "mesh": 25, + "translation": [ + 0.7053973, + -1.61472893, + -20.4177628 + ], + "rotation": [ + 0.7071068, + 0, + 0, + 0.7071067 + ], + "scale": [ + 1.19999993, + 1.19999993, + 1.19999993 + ], + "name": "ZH_QiCaiXiang1", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + } + }, + { + "mesh": 26, + "translation": [ + 2.19347835, + -1.61472893, + -20.4177628 + ], + "rotation": [ + 0.7071068, + 0, + 0, + 0.7071067 + ], + "scale": [ + 1.19999993, + 1.19999993, + 1.19999993 + ], + "name": "ZH_XFSX1", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + } + }, + { + "mesh": 27, + "translation": [ + 3.964494, + -1.60813165, + -20.4071083 + ], + "rotation": [ + 0, + -1, + 0, + -4.01339264e-7 + ], + "scale": [ + 0.7071132, + 0.8378718, + 0.8619252 + ], + "name": "ZH_XFSX2" + }, + { + "mesh": 28, + "translation": [ + 5.92361, + -1.3209219, + -18.9040813 + ], + "rotation": [ + 0.7071068, + 0, + 0, + 0.7071067 + ], + "name": "ZH_Zhang2", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 29, + "translation": [ + 6.92613, + -1.61472869, + -19.0283546 + ], + "name": "ZH_SB", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 30, + "translation": [ + -5.631099, + -0.72474426, + -5.31150055 + ], + "rotation": [ + 2.83789717e-7, + -0.7071067, + 0.7071068, + 2.837897e-7 + ], + "scale": [ + 1.19999993, + 1.19999993, + 1.19999993 + ], + "name": "ZH_QiCaiXiang2", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + } + }, + { + "mesh": 31, + "translation": [ + 7.335695, + -1.61472869, + -12.2124462 + ], + "name": "ZH_floor1", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 32, + "translation": [ + -13.4104786, + -1.585686, + -15.5089893 + ], + "name": "ZH_ZCD", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 33, + "translation": [ + -4.486186, + -1.61472893, + 17.1100979 + ], + "rotation": [ + 0, + -0.7071068, + 0, + 0.7071067 + ], + "scale": [ + 0.713963747, + 1, + 0.713963747 + ], + "name": "ZH_Zhang3" + }, + { + "mesh": 34, + "translation": [ + 10.0452023, + -0.950444, + -17.816864 + ], + "name": "ZH_Zhang4", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "children": [ + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57 + ], + "translation": [ + 3.19975758, + 2.427267, + 0.0264392085 + ], + "name": "SXT", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 35, + "translation": [ + 8.374398, + -1.16749752, + -16.6910038 + ], + "rotation": [ + -4.3846466e-8, + -0.814071953, + 0.580764055, + -6.14607245e-8 + ], + "name": "DENG_jia", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 36, + "translation": [ + 4.52646828, + -0.8181573, + -20.8517628 + ], + "rotation": [ + 0.122778483, + -0.696311533, + -0.122797079, + 0.696417 + ], + "scale": [ + 0.99999994, + 0.99999994, + 1 + ], + "name": "DENG3" + }, + { + "mesh": 37, + "translation": [ + 12.1759558, + -0.8181573, + -17.596199 + ], + "rotation": [ + 0.173648134, + -0.9848078, + -0.000013116507, + 0.00007438743 + ], + "name": "DENG2", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 38, + "translation": [ + 1.182063, + -1.10398865, + 20.8142643 + ], + "rotation": [ + -0.144716546, + 0.8207285, + -0.09597294, + 0.5442895 + ], + "scale": [ + 0.999999642, + 1.00000012, + 1 + ], + "name": "SXT11" + }, + { + "mesh": 39, + "translation": [ + -3.51171613, + 1.6201489, + -4.965723 + ], + "rotation": [ + -0.122787729, + 0.6963643, + -0.122787796, + 0.6963643 + ], + "name": "SXT13", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 40, + "translation": [ + 12.1407213, + -0.8290277, + 10.1825018 + ], + "rotation": [ + 0.173648134, + -0.9848078, + -0.000013116507, + 0.00007438743 + ], + "name": "SXT14", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 41, + "translation": [ + 12.1759558, + -0.8181573, + 11.4969378 + ], + "rotation": [ + 0.173648134, + -0.9848078, + -0.000013116507, + 0.00007438743 + ], + "name": "DENG4", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 42, + "translation": [ + -7.99335051, + -0.9171625, + 5.718923 + ], + "rotation": [ + -0.144716531, + 0.8207285, + -0.0959729254, + 0.5442895 + ], + "scale": [ + 0.999999642, + 1, + 0.99999994 + ], + "name": "SXT15" + }, + { + "mesh": 43, + "translation": [ + -7.749505, + 0.1717987, + -17.6757755 + ], + "rotation": [ + 0.160219654, + -0.908651, + -0.06695774, + 0.379736334 + ], + "scale": [ + 0.999999762, + 1, + 0.99999994 + ], + "name": "SXT12" + }, + { + "mesh": 44, + "translation": [ + 12.1759558, + -0.8181573, + -12.4860468 + ], + "rotation": [ + 0.173648134, + -0.9848078, + -0.000013116507, + 0.00007438743 + ], + "name": "DENG1", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 45, + "translation": [ + 12.1407213, + -0.8290277, + 14.4812069 + ], + "rotation": [ + 0.173648134, + -0.9848078, + -0.000013116507, + 0.00007438743 + ], + "name": "SXT10", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 46, + "translation": [ + 7.57432461, + -0.7180902, + 17.7828579 + ], + "rotation": [ + -0.1227971, + 0.6964171, + -0.122778483, + 0.6963114 + ], + "scale": [ + 0.99999994, + 0.99999994, + 1 + ], + "name": "SXT9" + }, + { + "mesh": 47, + "translation": [ + -4.709133, + -1.10398865, + 20.8142643 + ], + "rotation": [ + -0.144716546, + 0.8207285, + -0.09597294, + 0.5442895 + ], + "scale": [ + 0.999999642, + 1.00000012, + 1 + ], + "name": "SXT8" + }, + { + "mesh": 48, + "translation": [ + -6.525531, + -1.10398865, + 20.8142643 + ], + "rotation": [ + -0.144716546, + 0.8207285, + -0.09597294, + 0.5442895 + ], + "scale": [ + 0.999999642, + 1.00000012, + 1 + ], + "name": "SXT7" + }, + { + "mesh": 49, + "translation": [ + -12.1257057, + -0.9171625, + 6.343413 + ], + "rotation": [ + 0.170193121, + -0.9652135, + -0.0344669335, + 0.195471972 + ], + "scale": [ + 0.9999998, + 0.99999994, + 0.99999994 + ], + "name": "SXT6" + }, + { + "mesh": 50, + "translation": [ + -6.177763, + 1.59922969, + 11.5352087 + ], + "rotation": [ + 0.173648134, + -0.9848078, + 1.31793243e-7, + -7.474367e-7 + ], + "name": "SXT5", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 51, + "translation": [ + 6.45080328, + 1.59922969, + -4.81689453 + ], + "rotation": [ + 0.122787789, + -0.6963643, + -0.122787774, + 0.6963642 + ], + "scale": [ + 0.99999994, + 0.99999994, + 1 + ], + "name": "SXT4" + }, + { + "mesh": 52, + "translation": [ + 3.209519, + 1.59922969, + -4.816895 + ], + "rotation": [ + 0.122787789, + -0.6963643, + -0.122787774, + 0.6963642 + ], + "scale": [ + 0.99999994, + 0.99999994, + 1 + ], + "name": "SXT3" + }, + { + "mesh": 53, + "translation": [ + -1.16254151, + 1.59922969, + -4.81689548 + ], + "rotation": [ + 0.122787789, + -0.6963643, + -0.122787774, + 0.6963642 + ], + "scale": [ + 0.99999994, + 0.99999994, + 1 + ], + "name": "SXT2" + }, + { + "mesh": 54, + "translation": [ + -4.686629, + 1.59922969, + -4.81689548 + ], + "rotation": [ + 0.122787789, + -0.6963643, + -0.122787774, + 0.6963642 + ], + "scale": [ + 0.99999994, + 0.99999994, + 1 + ], + "name": "SXT1" + }, + { + "mesh": 55, + "translation": [ + 0.06948486, + -1.01218867, + 1.62935972 + ], + "rotation": [ + -4.3846466e-8, + -0.814071953, + 0.580764055, + -6.14607245e-8 + ], + "name": "SXT_jia", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "children": [ + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70 + ], + "translation": [ + 1.5052557, + -1.07250154, + -6.832127 + ], + "name": "miehuoqi", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 56, + "translation": [ + -6.249683, + -0.347487181, + 12.5175486 + ], + "name": "miehuoqi_SC1", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 57, + "translation": [ + -7.940666, + -0.347487181, + 4.004573 + ], + "rotation": [ + 0, + -0.7071068, + 0, + 0.7071067 + ], + "name": "miehuoqi_SC2", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 58, + "translation": [ + -7.73101854, + -0.347487181, + 4.004573 + ], + "rotation": [ + 0, + -0.7071068, + 0, + 0.7071067 + ], + "name": "miehuoqi_SC3", + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 59, + "translation": [ + 6.70445538, + -0.447345942, + 12.622817 + ], + "rotation": [ + 0, + -0.7071068, + 0, + 0.7071067 + ], + "name": "miehuoqi_ST1", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + }, + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 60, + "translation": [ + 3.69787836, + -0.447345942, + -13.7744408 + ], + "name": "miehuoqi_ST2", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + }, + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 61, + "translation": [ + 7.83736563, + -0.447345942, + -13.7744408 + ], + "name": "miehuoqi_ST3", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + }, + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 62, + "translation": [ + 6.400144, + -0.392227024, + 13.8857813 + ], + "rotation": [ + 0.7071068, + 0, + 0, + 0.7071067 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ], + "name": "miehuoqi_xiang1", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + } + }, + { + "mesh": 63, + "translation": [ + -0.799855947, + -0.392227024, + 13.8857813 + ], + "rotation": [ + 0.7071068, + 0, + 0, + 0.7071067 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ], + "name": "miehuoqi_xiang2", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + } + }, + { + "mesh": 64, + "translation": [ + 6.400144, + -0.392227024, + 4.92578 + ], + "rotation": [ + 0.7071068, + 0, + 0, + 0.7071067 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ], + "name": "miehuoqi_xiang3", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + } + }, + { + "mesh": 65, + "translation": [ + -0.799855947, + -0.392227024, + 4.92578 + ], + "rotation": [ + 0.7071068, + 0, + 0, + 0.7071067 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ], + "name": "miehuoqi_xiang4", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + } + }, + { + "mesh": 66, + "translation": [ + 4.25181866, + -0.542227566, + -13.8309956 + ], + "rotation": [ + 0.7071068, + 0, + 0, + 0.7071067 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ], + "name": "miehuoqi_xiang5", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + } + }, + { + "mesh": 67, + "translation": [ + 7.371445, + -0.542227566, + -13.8309956 + ], + "rotation": [ + 0.7071068, + 0, + 0, + 0.7071067 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ], + "name": "miehuoqi_xiang6", + "extras": { + "mr displacement use global settings": true, + "mr displacement view dependent": true, + "mr displacement method": 6, + "mr displacement smoothing on": true, + "mr displacement edge length": 2, + "mr displacement max displace": 20, + "mr displacement parametric subdivision level": 5 + } + }, + { + "mesh": 68, + "translation": [ + 5.26980162, + -1.63366389, + -11.2608032 + ], + "name": "ZH_JingGai", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 69, + "translation": [ + 7.51126146, + -1.61472869, + -9.135 + ], + "name": "ZH_GuanDi", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "children": [ + 74, + 75, + 76 + ], + "translation": [ + 7.5711, + -1.32011425, + -9.135 + ], + "name": "ZHSY_ChuGuan_ding", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 70, + "translation": [ + -0.235405266, + -0.294614345, + -3.07744622 + ], + "name": "ZH_floor2", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 71, + "translation": [ + 4.10325575, + -0.2885496, + -3.56261468 + ], + "scale": [ + 0.3086214, + 1, + 0.3086214 + ], + "name": "ZH_JingGai1", + "rotation": [ + 0, + 0, + 0, + 1 + ] + }, + { + "mesh": 72, + "translation": [ + -12.0572853, + -0.294614643, + 26.2450962 + ], + "rotation": [ + 0, + -0.7071068, + 0, + 0.7071067 + ], + "scale": [ + 0.713963747, + 1, + 0.713963747 + ], + "name": "ZH_Zhang4 (1)" + }, + { + "mesh": 73, + "translation": [ + -5.750074, + -1.41472793, + -0.457867563 + ], + "name": "ZHSY_guitiai", + "rotation": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ] + }, + { + "mesh": 74, + "translation": [ + -3.625666, + 4.78527164, + -3.56833553 + ], + "rotation": [ + 0, + 0, + 1, + 4.371139e-8 + ], + "name": "ZH_peng3", + "scale": [ + 1, + 1, + 1 + ] + } + ], + "meshes": [ + { + "primitives": [ + { + "attributes": { + "POSITION": 1, + "NORMAL": 2, + "TEXCOORD_0": 3 + }, + "indices": 0, + "material": 0, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 0, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZHSY_ChuGuan1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 5, + "NORMAL": 6, + "TEXCOORD_0": 7 + }, + "indices": 4, + "material": 1, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 1, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 9, + "NORMAL": 10, + "TEXCOORD_0": 11 + }, + "indices": 8, + "material": 0, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 2, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZHSY_GX2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 13, + "NORMAL": 14, + "TEXCOORD_0": 15 + }, + "indices": 12, + "material": 1, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 3, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZHSY_GX1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 17, + "NORMAL": 18, + "TEXCOORD_0": 19 + }, + "indices": 16, + "material": 0, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 4, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZHSY_ChuGuan2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 21, + "NORMAL": 22, + "TEXCOORD_0": 23 + }, + "indices": 20, + "material": 0, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 5, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZHSY_ChuGuan_fa1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 25, + "NORMAL": 26, + "TEXCOORD_0": 27 + }, + "indices": 24, + "material": 1, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 6, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZHSY_ChuGuan_fa2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 29, + "NORMAL": 30, + "TEXCOORD_0": 31 + }, + "indices": 28, + "material": 2, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 7, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 33, + "NORMAL": 34, + "TEXCOORD_0": 35 + }, + "indices": 32, + "material": 3, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 8, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_peng2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 37, + "NORMAL": 38, + "TEXCOORD_0": 39 + }, + "indices": 36, + "material": 4, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 9, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_peng1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 41, + "NORMAL": 42, + "TEXCOORD_0": 43 + }, + "indices": 40, + "material": 5, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 10, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 45, + "NORMAL": 46, + "TEXCOORD_0": 47 + }, + "indices": 44, + "material": 6, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 11, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 49, + "NORMAL": 50, + "TEXCOORD_0": 51 + }, + "indices": 48, + "material": 3, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 12, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 53, + "NORMAL": 54, + "TEXCOORD_0": 55 + }, + "indices": 52, + "material": 7, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 13, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_wall" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 57, + "NORMAL": 58, + "TEXCOORD_0": 59 + }, + "indices": 56, + "material": 6, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 14, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 61, + "NORMAL": 62, + "TEXCOORD_0": 63 + }, + "indices": 60, + "material": 3, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 15, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 65, + "NORMAL": 66, + "TEXCOORD_0": 67 + }, + "indices": 64, + "material": 8, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 16, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_WSJ" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 69, + "NORMAL": 70, + "TEXCOORD_0": 71 + }, + "indices": 68, + "material": 9, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 17, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 73, + "NORMAL": 74, + "TEXCOORD_0": 75 + }, + "indices": 72, + "material": 10, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 18, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 77, + "NORMAL": 78, + "TEXCOORD_0": 79 + }, + "indices": 76, + "material": 11, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 19, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_BLD_wall" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 81, + "NORMAL": 82, + "TEXCOORD_0": 83 + }, + "indices": 80, + "material": 11, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 20, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 85, + "NORMAL": 86, + "TEXCOORD_0": 87 + }, + "indices": 84, + "material": 9, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 21, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 89, + "NORMAL": 90, + "TEXCOORD_0": 91 + }, + "indices": 88, + "material": 7, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 22, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_BLD_men" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 93, + "NORMAL": 94, + "TEXCOORD_0": 95 + }, + "indices": 92, + "material": 12, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 23, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 97, + "NORMAL": 98, + "TEXCOORD_0": 99 + }, + "indices": 96, + "material": 3, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 24, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_BLD_DING" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 101, + "NORMAL": 102, + "TEXCOORD_0": 103 + }, + "indices": 100, + "material": 8, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 25, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 105, + "NORMAL": 106, + "TEXCOORD_0": 107 + }, + "indices": 104, + "material": 13, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 26, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_BLD_GG1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 109, + "NORMAL": 110, + "TEXCOORD_0": 111 + }, + "indices": 108, + "material": 14, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 27, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_BLD_floor" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 113, + "NORMAL": 114, + "TEXCOORD_0": 115 + }, + "indices": 112, + "material": 9, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 28, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 117, + "NORMAL": 118, + "TEXCOORD_0": 119 + }, + "indices": 116, + "material": 7, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 29, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_XCF" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 121, + "NORMAL": 122, + "TEXCOORD_0": 123 + }, + "indices": 120, + "material": 15, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 30, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_Zhang1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 125, + "NORMAL": 126, + "TEXCOORD_0": 127 + }, + "indices": 124, + "material": 15, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 31, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 129, + "NORMAL": 130, + "TEXCOORD_0": 131 + }, + "indices": 128, + "material": 16, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 32, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 133, + "NORMAL": 134, + "TEXCOORD_0": 135 + }, + "indices": 132, + "material": 17, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 33, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "JYJ4" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 137, + "NORMAL": 138, + "TEXCOORD_0": 139 + }, + "indices": 136, + "material": 16, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 34, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 141, + "NORMAL": 142, + "TEXCOORD_0": 143 + }, + "indices": 140, + "material": 18, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 35, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "JYJ_di" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 145, + "NORMAL": 146, + "TEXCOORD_0": 147 + }, + "indices": 144, + "material": 17, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 36, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "JYJ_pai1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 149, + "NORMAL": 150, + "TEXCOORD_0": 151 + }, + "indices": 148, + "material": 17, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 37, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "JYJ_pai3" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 153, + "NORMAL": 154, + "TEXCOORD_0": 155 + }, + "indices": 152, + "material": 15, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 38, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 157, + "NORMAL": 158, + "TEXCOORD_0": 159 + }, + "indices": 156, + "material": 16, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 39, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 161, + "NORMAL": 162, + "TEXCOORD_0": 163 + }, + "indices": 160, + "material": 17, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 40, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "JYJ2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 165, + "NORMAL": 166, + "TEXCOORD_0": 167 + }, + "indices": 164, + "material": 15, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 41, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 169, + "NORMAL": 170, + "TEXCOORD_0": 171 + }, + "indices": 168, + "material": 16, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 42, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 173, + "NORMAL": 174, + "TEXCOORD_0": 175 + }, + "indices": 172, + "material": 17, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 43, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "JYJ1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 177, + "NORMAL": 178, + "TEXCOORD_0": 179 + }, + "indices": 176, + "material": 17, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 44, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "JYJ_pai2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 181, + "NORMAL": 182, + "TEXCOORD_0": 183 + }, + "indices": 180, + "material": 15, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 45, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 185, + "NORMAL": 186, + "TEXCOORD_0": 187 + }, + "indices": 184, + "material": 16, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 46, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 189, + "NORMAL": 190, + "TEXCOORD_0": 191 + }, + "indices": 188, + "material": 17, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 47, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "JYJ3" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 193, + "NORMAL": 194, + "TEXCOORD_0": 195 + }, + "indices": 192, + "material": 19, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 48, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_QiCaiXiang1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 197, + "NORMAL": 198, + "TEXCOORD_0": 199 + }, + "indices": 196, + "material": 20, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 49, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_XFSX1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 201, + "NORMAL": 202, + "TEXCOORD_0": 203 + }, + "indices": 200, + "material": 21, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 50, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_XFSX2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 205, + "NORMAL": 206, + "TEXCOORD_0": 207 + }, + "indices": 204, + "material": 15, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 51, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_Zhang2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 209, + "NORMAL": 210, + "TEXCOORD_0": 211 + }, + "indices": 208, + "material": 22, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 52, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 213, + "NORMAL": 214, + "TEXCOORD_0": 215 + }, + "indices": 212, + "material": 16, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 53, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 217, + "NORMAL": 218, + "TEXCOORD_0": 219 + }, + "indices": 216, + "material": 23, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 54, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_SB" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 221, + "NORMAL": 222, + "TEXCOORD_0": 223 + }, + "indices": 220, + "material": 7, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 55, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_QiCaiXiang2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 225, + "NORMAL": 226, + "TEXCOORD_0": 227 + }, + "indices": 224, + "material": 24, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 56, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 229, + "NORMAL": 230, + "TEXCOORD_0": 231 + }, + "indices": 228, + "material": 2, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 57, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 233, + "NORMAL": 234, + "TEXCOORD_0": 235 + }, + "indices": 232, + "material": 25, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 58, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 237, + "NORMAL": 238, + "TEXCOORD_0": 239 + }, + "indices": 236, + "material": 26, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 59, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 241, + "NORMAL": 242, + "TEXCOORD_0": 243 + }, + "indices": 240, + "material": 27, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 60, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_floor1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 245, + "NORMAL": 246, + "TEXCOORD_0": 247 + }, + "indices": 244, + "material": 28, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 61, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_ZCD" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 249, + "NORMAL": 250, + "TEXCOORD_0": 251 + }, + "indices": 248, + "material": 29, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 62, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_Zhang3" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 253, + "NORMAL": 254, + "TEXCOORD_0": 255 + }, + "indices": 252, + "material": 3, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 63, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_Zhang4" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 257, + "NORMAL": 258, + "TEXCOORD_0": 259 + }, + "indices": 256, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 64, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "DENG_jia" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 261, + "NORMAL": 262, + "TEXCOORD_0": 263 + }, + "indices": 260, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 65, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "DENG3" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 265, + "NORMAL": 266, + "TEXCOORD_0": 267 + }, + "indices": 264, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 66, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "DENG2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 269, + "NORMAL": 270, + "TEXCOORD_0": 271 + }, + "indices": 268, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 67, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT11" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 273, + "NORMAL": 274, + "TEXCOORD_0": 275 + }, + "indices": 272, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 68, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT13" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 277, + "NORMAL": 278, + "TEXCOORD_0": 279 + }, + "indices": 276, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 69, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT14" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 281, + "NORMAL": 282, + "TEXCOORD_0": 283 + }, + "indices": 280, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 70, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "DENG4" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 285, + "NORMAL": 286, + "TEXCOORD_0": 287 + }, + "indices": 284, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 71, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT15" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 289, + "NORMAL": 290, + "TEXCOORD_0": 291 + }, + "indices": 288, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 72, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT12" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 293, + "NORMAL": 294, + "TEXCOORD_0": 295 + }, + "indices": 292, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 73, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "DENG1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 297, + "NORMAL": 298, + "TEXCOORD_0": 299 + }, + "indices": 296, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 74, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT10" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 301, + "NORMAL": 302, + "TEXCOORD_0": 303 + }, + "indices": 300, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 75, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT9" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 305, + "NORMAL": 306, + "TEXCOORD_0": 307 + }, + "indices": 304, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 76, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT8" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 309, + "NORMAL": 310, + "TEXCOORD_0": 311 + }, + "indices": 308, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 77, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT7" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 313, + "NORMAL": 314, + "TEXCOORD_0": 315 + }, + "indices": 312, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 78, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT6" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 317, + "NORMAL": 318, + "TEXCOORD_0": 319 + }, + "indices": 316, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 79, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT5" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 321, + "NORMAL": 322, + "TEXCOORD_0": 323 + }, + "indices": 320, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 80, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT4" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 325, + "NORMAL": 326, + "TEXCOORD_0": 327 + }, + "indices": 324, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 81, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT3" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 329, + "NORMAL": 330, + "TEXCOORD_0": 331 + }, + "indices": 328, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 82, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 333, + "NORMAL": 334, + "TEXCOORD_0": 335 + }, + "indices": 332, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 83, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 337, + "NORMAL": 338, + "TEXCOORD_0": 339 + }, + "indices": 336, + "material": 30, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 84, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 341, + "NORMAL": 342, + "TEXCOORD_0": 343 + }, + "indices": 340, + "material": 31, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 85, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "SXT_jia" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 345, + "NORMAL": 346, + "TEXCOORD_0": 347 + }, + "indices": 344, + "material": 32, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 86, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_SC1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 349, + "NORMAL": 350, + "TEXCOORD_0": 351 + }, + "indices": 348, + "material": 32, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 87, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_SC2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 353, + "NORMAL": 354, + "TEXCOORD_0": 355 + }, + "indices": 352, + "material": 32, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 88, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_SC3" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 357, + "NORMAL": 358, + "TEXCOORD_0": 359 + }, + "indices": 356, + "mode": 4, + "material": 41, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 89, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_ST1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 361, + "NORMAL": 362, + "TEXCOORD_0": 363 + }, + "indices": 360, + "mode": 4, + "material": 42, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 90, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_ST2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 365, + "NORMAL": 366, + "TEXCOORD_0": 367 + }, + "indices": 364, + "mode": 4, + "material": 43, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 91, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_ST3" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 369, + "NORMAL": 370, + "TEXCOORD_0": 371 + }, + "indices": 368, + "material": 33, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 92, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_xiang1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 373, + "NORMAL": 374, + "TEXCOORD_0": 375 + }, + "indices": 372, + "material": 33, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 93, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_xiang2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 377, + "NORMAL": 378, + "TEXCOORD_0": 379 + }, + "indices": 376, + "material": 33, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 94, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_xiang3" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 381, + "NORMAL": 382, + "TEXCOORD_0": 383 + }, + "indices": 380, + "material": 33, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 95, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_xiang4" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 385, + "NORMAL": 386, + "TEXCOORD_0": 387 + }, + "indices": 384, + "material": 33, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 96, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_xiang5" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 389, + "NORMAL": 390, + "TEXCOORD_0": 391 + }, + "indices": 388, + "material": 33, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 97, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "miehuoqi_xiang6" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 393, + "NORMAL": 394, + "TEXCOORD_0": 395 + }, + "indices": 392, + "material": 34, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 98, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_JingGai" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 397, + "NORMAL": 398, + "TEXCOORD_0": 399 + }, + "indices": 396, + "material": 9, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 99, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_GuanDi" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 401, + "NORMAL": 402, + "TEXCOORD_0": 403 + }, + "indices": 400, + "material": 24, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 100, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 405, + "NORMAL": 406, + "TEXCOORD_0": 407 + }, + "indices": 404, + "material": 2, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 101, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 409, + "NORMAL": 410, + "TEXCOORD_0": 411 + }, + "indices": 408, + "material": 25, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 102, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 413, + "NORMAL": 414, + "TEXCOORD_0": 415 + }, + "indices": 412, + "material": 26, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 103, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_floor2" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 417, + "NORMAL": 418, + "TEXCOORD_0": 419 + }, + "indices": 416, + "material": 35, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 104, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_JingGai1" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 421, + "NORMAL": 422, + "TEXCOORD_0": 423 + }, + "indices": 420, + "material": 29, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 105, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_Zhang4" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 425, + "NORMAL": 426, + "TEXCOORD_0": 427 + }, + "indices": 424, + "material": 36, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 106, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 429, + "NORMAL": 430, + "TEXCOORD_0": 431 + }, + "indices": 428, + "material": 37, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 107, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 433, + "NORMAL": 434, + "TEXCOORD_0": 435 + }, + "indices": 432, + "material": 38, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 108, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + }, + { + "attributes": { + "POSITION": 437, + "NORMAL": 438, + "TEXCOORD_0": 439 + }, + "indices": 436, + "material": 39, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 109, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZHSY_guitiai" + }, + { + "primitives": [ + { + "attributes": { + "POSITION": 441, + "NORMAL": 442, + "TEXCOORD_0": 443 + }, + "indices": 440, + "material": 40, + "mode": 4, + "extensions": { + "KHR_draco_mesh_compression": { + "bufferView": 110, + "attributes": { + "POSITION": 0, + "NORMAL": 1, + "TEXCOORD_0": 2 + } + } + } + } + ], + "name": "ZH_peng3" + } + ], + "accessors": [ + { + "componentType": 5123, + "count": 4008, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 2088, + "max": [ + 1.4820281308789602, + 8.1475903517567, + 1.7623247020399198 + ], + "min": [ + -1.481920831756699, + -0.16536818175669904, + -1.687159891756699 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 2088, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 2088, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 3720, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 944, + "max": [ + 0.016501031957059098, + 3.2533094138537817, + 2.572591251706446 + ], + "min": [ + -1.1844218138537814, + -0.02293448035378136, + 0.028578370046218642 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 944, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 944, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 2088, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 664, + "max": [ + 0.03392114308447171, + 2.5103909412541596, + 0.0381196106759873 + ], + "min": [ + -0.034655711254159796, + -0.031762358154159794, + -0.0338705712541598 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 664, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 664, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 9792, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 2741, + "max": [ + 5.808911937432704, + 0.21478894987529756, + 9.247540378685223 + ], + "min": [ + -1.6419092586852224, + -0.4026854496852225, + 0.2623556213147775 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 2741, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 2741, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 4008, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 2088, + "max": [ + 1.4820281308789602, + 8.1475903517567, + 1.7623247020399198 + ], + "min": [ + -1.481920831756699, + -0.16536818175669904, + -1.687159891756699 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 2088, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 2088, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 3312, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 1494, + "max": [ + 4.501599553823475, + -0.0931476763695294, + 7.151932235396448 + ], + "min": [ + -1.1511242438234757, + -0.19975076782347556, + 2.155041696176524 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 1494, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 1494, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 62928, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 49434, + "max": [ + 0.3970606194408841, + 4.087900710146493, + 0.09880100122859059 + ], + "min": [ + -5.396993919440884, + -0.036009209440883844, + -0.26507340344088387 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 49434, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 49434, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 4, + "max": [ + 8.371021790880791, + 0.0010217908807910639, + 8.211201245193188 + ], + "min": [ + -8.371021790880791, + -0.0010217908807910639, + -8.211021790880793 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 4, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 4, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 22650, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 8720, + "max": [ + 8.768979366721602, + 1.8656491957516939, + 8.608941716962704 + ], + "min": [ + -8.7689793667216, + -0.0010703667216016603, + -8.608977366721602 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 8720, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 8720, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 144, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 96, + "max": [ + 7.520322285295733, + 6.4005859732649695, + 9.28058597326497 + ], + "min": [ + -0.3205859732649698, + -0.0005859732649697857, + -0.3205859732649698 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 96, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 96, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 546, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 214, + "max": [ + 5.235185721009584, + 2.6012917022767503, + 32.24481869310871 + ], + "min": [ + -10.580572193108711, + -0.0023908931087102485, + -6.9299648931087106 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 214, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 214, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 354, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 142, + "max": [ + 5.313594221168284, + 2.7539884320087893, + 35.65450912343893 + ], + "min": [ + -23.779958621168284, + -0.001775621168284197, + 32.06065187883171 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 142, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 142, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 12, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 8, + "max": [ + 3.2109706459268743, + 2.300814137259964, + 35.17475841511079 + ], + "min": [ + -22.454754315926873, + 0.09843334407312457, + 32.24086138407313 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 8, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 8, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 240, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 160, + "max": [ + 0.40191539211804894, + 2.1276871323499966, + -6.427292224896539 + ], + "min": [ + -7.020360462118049, + 1.3354039178819508, + -6.478027342118049 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 160, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 160, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 429, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 194, + "max": [ + 5.9508850637856305, + 2.9012390796518184, + 2.390912611282427 + ], + "min": [ + -8.550885063785632, + -0.0008850734336969073, + -1.4608849837856315 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 194, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 194, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 12993, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 5301, + "max": [ + 5.835863208135262, + 4.101151988789339, + 2.256785795251175 + ], + "min": [ + -8.400868888135262, + -0.000868897783327622, + -1.3108688881352621 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 5301, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 5301, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 4, + "max": [ + 5.835067153650735, + 2.357355148506379, + 1.8871218336507356 + ], + "min": [ + 5.834921486349264, + 1.4802923263492644, + 0.6937424663492645 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 4, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 4, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 660, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 278, + "max": [ + 1.5341999121211014, + 3.600707806887073, + 5.120683635475798 + ], + "min": [ + -3.067350475475798, + -0.0006838796172300833, + -6.080683635475798 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 278, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 278, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 258, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 112, + "max": [ + 1.8343158859964594, + 0.3007996093511567, + 5.120683635475798 + ], + "min": [ + -3.067350475475798, + -0.0006836354757980834, + -6.080683635475798 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 112, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 112, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 72, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 48, + "max": [ + 1.4840691485234694, + 3.0987709607428435, + 4.362437081702375 + ], + "min": [ + 1.4527418182976255, + 0.2994080182976256, + -5.322436611702375 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 48, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 48, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 36, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 24, + "max": [ + 1.5336985207611549, + 3.098485863073491, + 2.4126608264041995 + ], + "min": [ + 1.5029800035958005, + 0.1996464845958005, + -3.3726599064041993 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 24, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 24, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 36, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 22, + "max": [ + -1.6429243716462185, + 2.4001334255301225, + -6.0446823555777325 + ], + "min": [ + -2.6432172855301226, + 0.1998650144698773, + -6.080133735530122 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 22, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 22, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 24, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 12, + "max": [ + -1.6429242307147651, + 2.4001334255490447, + -5.999830977220289 + ], + "min": [ + -2.643217285549045, + 0.19986470445095525, + -6.080133735549045 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 12, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 12, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 36, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 24, + "max": [ + 2.584579636564732, + 1.2012300144051762, + 6.915725153207593 + ], + "min": [ + -3.615725673207593, + -0.0008441532075932369, + -6.915725153207593 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 24, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 24, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 72, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 32, + "max": [ + 2.6847047695293895, + 0.09334335536714887, + 7.015737971058414 + ], + "min": [ + -3.7157377810584142, + -0.0008563610584142098, + -7.015737971058414 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 32, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 32, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1230, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 516, + "max": [ + 4.256585900291045, + 0.7619709014156382, + 11.248505518413916 + ], + "min": [ + -0.24081637941391687, + -1.742859088413917, + -0.032868693613916866 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 516, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 516, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 2928, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 1048, + "max": [ + 4.3267483948825, + 0.6016252207373498, + 8.957105178210341 + ], + "min": [ + 3.72601082178966, + -0.31552517821034, + 2.30187520178966 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 1048, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 1048, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 6, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 4, + "max": [ + 2.2207983885735207, + 0.0006738692547152536, + 5.520673869254715 + ], + "min": [ + -2.2206738692547154, + -0.0006738692547152536, + -5.520673869254715 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 4, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 4, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 228, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 144, + "max": [ + 0.414030416432583, + 3.0004761024740896, + 0.050683632475616136 + ], + "min": [ + -3.5414844454756147, + -0.0006836354756149668, + -11.150683635475616 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 144, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 144, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 132, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 88, + "max": [ + 0.8597033801024239, + 3.0004761024740896, + 0.050683632475616136 + ], + "min": [ + -2.978909815475615, + -0.0006836354756149668, + -11.150683635475616 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 88, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 88, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 19392, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 4992, + "max": [ + 7.820697996380395, + 9.000827925433681, + 0.37231093650979674 + ], + "min": [ + -0.6208297254336813, + -4.564730305433681, + -0.12775602543368125 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 4992, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 4992, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 166584, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 36052, + "max": [ + 2.0496057862439727, + 0.7630448284685346, + 3.0641339654190323 + ], + "min": [ + -0.6864399504190319, + -0.8029639954190319, + -1.738234475419032 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 36052, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 36052, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 28128, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 9724, + "max": [ + 1.986580671372764, + 0.33414404724745156, + 1.729248273625099 + ], + "min": [ + -0.6234668736250991, + -0.3741384886250992, + -1.3605305736250992 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 9724, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 9724, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 12, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 8, + "max": [ + 1.714028860272172, + 0.2701172428094365, + 2.740848587415003 + ], + "min": [ + -0.3509771492721724, + -0.3101261302721724, + 1.1212335597278276 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 8, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 8, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 3072, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 1088, + "max": [ + 0.5905229984471712, + 0.1511992154001099, + 2.3405294330562167 + ], + "min": [ + -7.790817293056217, + -0.0008172930562168101, + -11.050817293056218 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 1088, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 1088, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 360, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 128, + "max": [ + 0.5905229984471712, + 0.1511992154001099, + 2.3405294330562167 + ], + "min": [ + -7.790817293056217, + -0.0008172930562168101, + -11.050817293056218 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 128, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 128, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 480, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 256, + "max": [ + 7.5607868882981135, + 3.5010986479741195, + 2.9296876099884024 + ], + "min": [ + -0.3607804939884026, + -0.0007804499884026125, + -9.857985449988403 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 256, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 256, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 912, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 416, + "max": [ + 9.285594332682233, + 1.6951514731356285, + 7.259867095008791 + ], + "min": [ + -0.4361616656822316, + -0.0005933326822315816, + -0.06007820568223158 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 416, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 416, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 166584, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 36052, + "max": [ + 2.0496057862439727, + 0.7630448284685346, + 3.0641339654190323 + ], + "min": [ + -0.6864399504190319, + -0.8029639954190319, + -1.738234475419032 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 36052, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 36052, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 28128, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 9724, + "max": [ + 1.986580671372764, + 0.33414404724745156, + 1.729248273625099 + ], + "min": [ + -0.6234668736250991, + -0.3741384886250992, + -1.3605305736250992 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 9724, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 9724, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 12, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 8, + "max": [ + 1.714028860272172, + 0.2701172428094365, + 2.740848587415003 + ], + "min": [ + -0.3509771492721724, + -0.3101261302721724, + 1.1212335597278276 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 8, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 8, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 166584, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 36052, + "max": [ + 2.0496057862439727, + 0.7630448284685346, + 3.0641339654190323 + ], + "min": [ + -0.6864399504190319, + -0.8029639954190319, + -1.738234475419032 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 36052, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 36052, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 28128, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 9724, + "max": [ + 1.986580671372764, + 0.33414404724745156, + 1.729248273625099 + ], + "min": [ + -0.6234668736250991, + -0.3741384886250992, + -1.3605305736250992 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 9724, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 9724, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 12, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 8, + "max": [ + 1.714028860272172, + 0.2701172428094365, + 2.740848587415003 + ], + "min": [ + -0.3509771492721724, + -0.3101261302721724, + 1.1212335597278276 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 8, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 8, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1692, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 784, + "max": [ + 0.32647710309467115, + 2.070084574290972, + 8.991240302508697 + ], + "min": [ + -23.87585710309467, + -0.1514784800946713, + -9.912725103094672 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 784, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 784, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 166584, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 36052, + "max": [ + 2.0496057862439727, + 0.7630448284685346, + 3.0641339654190323 + ], + "min": [ + -0.6864399504190319, + -0.8029639954190319, + -1.738234475419032 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 36052, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 36052, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 28128, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 9724, + "max": [ + 1.986580671372764, + 0.33414404724745156, + 1.729248273625099 + ], + "min": [ + -0.6234668736250991, + -0.3741384886250992, + -1.3605305736250992 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 9724, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 9724, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 12, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 8, + "max": [ + 1.714028860272172, + 0.2701172428094365, + 2.740848587415003 + ], + "min": [ + -0.3509771492721724, + -0.3101261302721724, + 1.1212335597278276 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 8, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 8, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 252, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 168, + "max": [ + 0.5073110416630822, + 0.2876886244857042, + 0.00008545070818910538 + ], + "min": [ + -0.5072864881006292, + -0.24778377310062918, + -1.4202990781006293 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1614, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 720, + "max": [ + 1.0127707638344627, + 0.5948760585528292, + 0.00011142920710505155 + ], + "min": [ + -0.4285166638344626, + -0.3311192268344626, + -0.9898335638344625 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 720, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 720, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 17088, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 3648, + "max": [ + 0.7500524908456937, + 0.5141320151643777, + 0.3877993288303729 + ], + "min": [ + -0.15005495584569373, + -0.008133562845693706, + -0.3396478978456937 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 3648, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 3648, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 14280, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 3840, + "max": [ + 7.509818804388976, + 1.3416442838724407, + 0.2941794303338583 + ], + "min": [ + -0.04046110898897638, + -0.6204608043889763, + -0.2942677743889764 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 3840, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 3840, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 300, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 162, + "max": [ + 3.2752230204675588, + 0.620159397310627, + 0.4379347772257831 + ], + "min": [ + -0.7602462904675579, + -0.0002462904675578344, + -0.6196364904675579 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 162, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 162, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 28056, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 9620, + "max": [ + 5.773838992943905, + 0.8200030889647788, + 1.012652918602637 + ], + "min": [ + -0.08581294294390526, + -0.00038394435390526766, + -0.24617984394390527 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 9620, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 9620, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 20670, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 9934, + "max": [ + 6.425322662316425, + 1.30229074429913, + 1.0137653640981508 + ], + "min": [ + 3.2357806076835742, + -0.0001948149043125631, + -1.7868413823164255 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 9934, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 9934, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 360, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 240, + "max": [ + 1.3145727469450041, + 0.14714512719544653, + 0.7417883259276691 + ], + "min": [ + -0.5164009469450039, + -0.14719632594500395, + -0.7417641159450039 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 240, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 240, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 966, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 414, + "max": [ + 8.01921812724165, + 0.002539217310626869, + 32.999983417310624 + ], + "min": [ + -20.546976617310627, + -0.002539217310626869, + -8.605092217310627 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 414, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 414, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 222, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 96, + "max": [ + 6.848000875944578, + 0.0024400983946774096, + 31.37601909839468 + ], + "min": [ + -18.11908589839468, + -0.0024400983946774096, + -8.604993098394678 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 96, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 96, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 177, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 83, + "max": [ + 5.016291353683698, + 0.0012483782030153208, + 25.048142478203015 + ], + "min": [ + -11.745682778203015, + -0.0012483782030153208, + 4.593465621796985 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 83, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 83, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1416, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 338, + "max": [ + 4.356400503479215, + 0.0017481281816517122, + 23.959916128181654 + ], + "min": [ + -16.388636628181654, + -0.0017481281816517122, + -4.683164128181652 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 338, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 338, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 12, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 6, + "max": [ + -17.35245050290496, + 0.0003874841820179455, + 6.724833484182019 + ], + "min": [ + -20.182247484182017, + -0.0003874841820179455, + 0.37590516181798206 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 6, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 6, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 408, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 404, + "max": [ + 0.2063043510629311, + 0.03189873828363547, + 35.336333893103216 + ], + "min": [ + -0.20622083510321676, + -0.03138637550321675, + -3.068354603103217 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 404, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 404, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 18720, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 5532, + "max": [ + 0.24581185533613592, + 0.609729652496042, + 0.24607428737196813 + ], + "min": [ + -43.00276162233614, + -0.0026395294886981213, + -23.92139222233614 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 5532, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 5532, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 2622, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 580, + "max": [ + 0.0400526253604346, + 0.08776942173472502, + 0.0400526299604346 + ], + "min": [ + -0.04004590173472502, + -0.6643305017347251, + -0.04004589713472502 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 580, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 580, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 216, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 72, + "max": [ + 3.8591886791027283, + 4.085456282451321, + 1.6511988501995971 + ], + "min": [ + -3.8594183024513216, + -4.085455682451322, + -1.6510763424513215 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 72, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 72, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 612, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 268, + "max": [ + 0.17588454082573404, + 0.06943006202172985, + 0.056306352149056965 + ], + "min": [ + -0.17588216882573401, + -0.069430302825734, + -0.05629763882573399 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 268, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 268, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 612, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 268, + "max": [ + 0.17588445182774828, + 0.06942990374809864, + 0.05630637521195752 + ], + "min": [ + -0.17588229082774828, + -0.06943047412774828, + -0.056297626327748276 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 268, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 268, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659538535909173, + 0.0712838138635781, + 0.05956255410829518 + ], + "min": [ + -0.21659712835909176, + -0.07127181835909174, + -0.05956869195909174 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659627935933592, + 0.07125792682048467, + 0.05956229880821585 + ], + "min": [ + -0.2165962383593359, + -0.0712712683593359, + -0.0595689483593359 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659696435909173, + 0.07125884550448636, + 0.05956166770829518 + ], + "min": [ + -0.21659554935909175, + -0.07127034835909174, + -0.05956957835909174 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 612, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 268, + "max": [ + 0.17588445182774828, + 0.06942990374809864, + 0.05630637521195752 + ], + "min": [ + -0.17588229082774828, + -0.06943047412774828, + -0.056297626327748276 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 268, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 268, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659630935909174, + 0.07125838160448635, + 0.05956224770829518 + ], + "min": [ + -0.21659620435909174, + -0.07127081225909175, + -0.05956899835909174 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659650235909175, + 0.07125841550448635, + 0.05956210770829518 + ], + "min": [ + -0.21659601135909173, + -0.07127077835909175, + -0.059569138359091736 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 612, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 268, + "max": [ + 0.17588454082573404, + 0.06943021102172986, + 0.056306364649056966 + ], + "min": [ + -0.17588216882573401, + -0.06943015382573399, + -0.05629762632573399 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 268, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 268, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659696435909173, + 0.07125884550448636, + 0.059562277708295176 + ], + "min": [ + -0.21659554935909175, + -0.07127034835909174, + -0.05956896835909174 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659572835915278, + 0.07125786583348592, + 0.059562245183275346 + ], + "min": [ + -0.21659678635915278, + -0.07127132835915279, + -0.05956900115915278 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659560835909175, + 0.0712838886635781, + 0.05956199160829518 + ], + "min": [ + -0.21659690535909173, + -0.07127174355909174, + -0.05956925445909174 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659560835909175, + 0.07125775550448635, + 0.05956199160829518 + ], + "min": [ + -0.21659690535909173, + -0.07127143835909175, + -0.05956925445909174 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659630935909174, + 0.07125838160448635, + 0.05956224770829518 + ], + "min": [ + -0.21659620435909174, + -0.07127081225909175, + -0.05956899835909174 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659627935933592, + 0.07125807682048466, + 0.05956170580821585 + ], + "min": [ + -0.2165962383593359, + -0.0712711183593359, + -0.0595695413593359 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659683835866445, + 0.07125802320148933, + 0.05956169158343405 + ], + "min": [ + -0.21659566835866448, + -0.07127116835866447, + -0.05956955255866447 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659683835866445, + 0.07125802320148933, + 0.05956169158343405 + ], + "min": [ + -0.21659566835866448, + -0.07127116835866447, + -0.05956955255866447 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659683835866445, + 0.07125802320148933, + 0.05956169158343405 + ], + "min": [ + -0.21659566835866448, + -0.07127116835866447, + -0.05956955255866447 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1224, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 506, + "max": [ + 0.21659683835866445, + 0.07125802320148933, + 0.05956230258343405 + ], + "min": [ + -0.21659566835866448, + -0.07127116835866447, + -0.05956894155866447 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 506, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 10632, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 3358, + "max": [ + 7.786915220045168, + 18.692303136025146, + 6.433259909784533 + ], + "min": [ + -12.179681636025148, + -18.69230313602515, + -6.432885636025148 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 3358, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 3358, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 978, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 394, + "max": [ + 12.177669756271746, + -3.8715277490203257, + -1.2603185571452116 + ], + "min": [ + 7.757713243728255, + -4.426686156271745, + -1.575124126271745 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 394, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 394, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 29292, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 5895, + "max": [ + 0.18111416869621008, + 0.6327430195690654, + 0.09451976730653147 + ], + "min": [ + -0.1810987695690655, + -0.00003861956906663165, + -0.09452302326906549 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 5895, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 5895, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 29292, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 5895, + "max": [ + 0.18111416869621008, + 0.6327430195690654, + 0.09451976730653147 + ], + "min": [ + -0.1810987695690655, + -0.00003861956906663165, + -0.09452302326906549 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 5895, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 5895, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 29292, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 5895, + "max": [ + 0.18111416869621008, + 0.6327430195690654, + 0.09451976730653147 + ], + "min": [ + -0.1810987695690655, + -0.00003861956906663165, + -0.09452302326906549 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 5895, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 5895, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 17904, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 4787, + "max": [ + 0.19784075737044501, + 0.9899832358542392, + 0.25230559146676435 + ], + "min": [ + -0.19785223585423914, + -0.09529123585423915, + -0.19332923585423914 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 4787, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 4787, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 17904, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 4787, + "max": [ + 0.19784075737044501, + 0.9899832358542392, + 0.25230559146676435 + ], + "min": [ + -0.19785223585423914, + -0.09529123585423915, + -0.19332923585423914 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 4787, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 4787, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 17904, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 4787, + "max": [ + 0.19784075737044501, + 0.9899832358542392, + 0.25230559146676435 + ], + "min": [ + -0.19785223585423914, + -0.09529123585423915, + -0.19332923585423914 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 4787, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 4787, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 252, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 168, + "max": [ + 0.5073205624752962, + 0.16393594497843395, + 0.00008514012107108115 + ], + "min": [ + -0.5072861870621411, + -0.2477835230621412, + -1.4159567330621412 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 252, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 168, + "max": [ + 0.5073205624752962, + 0.16393594497843395, + 0.00008514012107108115 + ], + "min": [ + -0.5072861870621411, + -0.2477835230621412, + -1.4159567330621412 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 252, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 168, + "max": [ + 0.5073205624752962, + 0.16393594497843395, + 0.00008514012107108115 + ], + "min": [ + -0.5072861870621411, + -0.2477835230621412, + -1.4159567330621412 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 252, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 168, + "max": [ + 0.5073205624752962, + 0.16393594497843395, + 0.00008514012107108115 + ], + "min": [ + -0.5072861870621411, + -0.2477835230621412, + -1.4159567330621412 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 252, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 168, + "max": [ + 0.5073205624752962, + 0.16393594497843395, + 0.00008514012107108115 + ], + "min": [ + -0.5072861870621411, + -0.2477835230621412, + -1.4159567330621412 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 252, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 168, + "max": [ + 0.5073205624752962, + 0.16393594497843395, + 0.00008514012107108115 + ], + "min": [ + -0.5072861870621411, + -0.2477835230621412, + -1.4159567330621412 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 168, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1722, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 588, + "max": [ + 9.944465609205274, + 0.038902101149972536, + 31.055261227841665 + ], + "min": [ + -17.995887927841665, + -0.0021612278416651407, + -4.356456957841664 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 588, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 588, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 48, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 32, + "max": [ + 4.960605505707135, + 0.0005408044924610778, + 4.000546908380638 + ], + "min": [ + -4.960605505707135, + -4.700605505707135, + -4.000605505707135 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 32, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 32, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 36, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 16, + "max": [ + 5.136169505545992, + 0.0006055055459927974, + 4.475528142525789 + ], + "min": [ + -4.785038865545993, + -0.0006055055459927974, + -0.9231593055459928 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 16, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 16, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 51, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 19, + "max": [ + 5.136171505668071, + 0.000605505668070561, + 7.077992692216323 + ], + "min": [ + -4.785038865668071, + -0.000605505668070561, + -0.9231592056680706 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 19, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 19, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 45, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 23, + "max": [ + 5.016164531062688, + 0.0005981810626869316, + 7.077763591213452 + ], + "min": [ + -4.785032181062687, + -0.0005981810626869316, + 4.594115818937313 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 23, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 23, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 42, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 18, + "max": [ + 4.3550452495049745, + 0.0005578295049746689, + 7.078015762436673 + ], + "min": [ + -4.784991189504975, + -0.0005578295049746689, + 5.682884170495026 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 18, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 18, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1476, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 504, + "max": [ + 0.501459096557408, + 0.01293651199258378, + 20.036784045504486 + ], + "min": [ + -23.40583799655741, + -0.026459095057407067, + -0.5014590965574071 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 504, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 504, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 5760, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 1720, + "max": [ + -32.06748688984313, + 0.608531013795987, + -22.915803424732953 + ], + "min": [ + -41.78559681015687, + -0.0005931173094269259, + -23.91934581015687 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 1720, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 1720, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5125, + "count": 44202, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 11151, + "max": [ + 1.2615211356601355, + 1.5580558492457426, + 0.33935660620948527 + ], + "min": [ + -1.7861816056601354, + 0.6440240353398645, + -0.6896267056601355 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 11151, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 11151, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5125, + "count": 2598, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 1560, + "max": [ + 1.2620530017347251, + 1.5367513398384938, + 6.44338733125679 + ], + "min": [ + -3.1791847312567905, + -0.0005201752344475756, + -2.0776525112567907 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 1560, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 1560, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5125, + "count": 173556, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 61178, + "max": [ + -2.5910724173796007, + 1.7167950556897675, + 5.163443671123115 + ], + "min": [ + -3.1791068111231153, + -0.00044222649054142453, + -2.0808747811231156 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 61178, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 61178, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5125, + "count": 41412, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 13806, + "max": [ + 1.261517896674602, + 1.602315675367149, + -2.156920194257462 + ], + "min": [ + -1.738848816674602, + -0.13710961667460173, + -4.597316116674602 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 13806, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 13806, + "type": "VEC2", + "name": "accessorUVs" + }, + { + "componentType": 5123, + "count": 1944, + "type": "SCALAR", + "name": "accessorIndices" + }, + { + "componentType": 5126, + "count": 992, + "max": [ + 0.4508575377281314, + 0.030681520655536563, + 14.783524480546909 + ], + "min": [ + -14.608797980546909, + -0.0009310179393483807, + -0.4509297805469084 + ], + "type": "VEC3", + "name": "accessorPositions" + }, + { + "componentType": 5126, + "count": 992, + "type": "VEC3", + "name": "accessorNormals" + }, + { + "componentType": 5126, + "count": 992, + "type": "VEC2", + "name": "accessorUVs" + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 6918 + }, + { + "buffer": 0, + "byteOffset": 6920, + "byteLength": 3403 + }, + { + "buffer": 0, + "byteOffset": 10328, + "byteLength": 3039 + }, + { + "buffer": 0, + "byteOffset": 13368, + "byteLength": 9212 + }, + { + "buffer": 0, + "byteOffset": 22584, + "byteLength": 6975 + }, + { + "buffer": 0, + "byteOffset": 29560, + "byteLength": 4599 + }, + { + "buffer": 0, + "byteOffset": 34160, + "byteLength": 133948 + }, + { + "buffer": 0, + "byteOffset": 168112, + "byteLength": 203 + }, + { + "buffer": 0, + "byteOffset": 168320, + "byteLength": 22919 + }, + { + "buffer": 0, + "byteOffset": 191240, + "byteLength": 474 + }, + { + "buffer": 0, + "byteOffset": 191720, + "byteLength": 1202 + }, + { + "buffer": 0, + "byteOffset": 192928, + "byteLength": 851 + }, + { + "buffer": 0, + "byteOffset": 193784, + "byteLength": 232 + }, + { + "buffer": 0, + "byteOffset": 194016, + "byteLength": 552 + }, + { + "buffer": 0, + "byteOffset": 194568, + "byteLength": 981 + }, + { + "buffer": 0, + "byteOffset": 195552, + "byteLength": 18659 + }, + { + "buffer": 0, + "byteOffset": 214216, + "byteLength": 192 + }, + { + "buffer": 0, + "byteOffset": 214408, + "byteLength": 1056 + }, + { + "buffer": 0, + "byteOffset": 215464, + "byteLength": 561 + }, + { + "buffer": 0, + "byteOffset": 216032, + "byteLength": 274 + }, + { + "buffer": 0, + "byteOffset": 216312, + "byteLength": 223 + }, + { + "buffer": 0, + "byteOffset": 216536, + "byteLength": 249 + }, + { + "buffer": 0, + "byteOffset": 216792, + "byteLength": 247 + }, + { + "buffer": 0, + "byteOffset": 217040, + "byteLength": 302 + }, + { + "buffer": 0, + "byteOffset": 217344, + "byteLength": 339 + }, + { + "buffer": 0, + "byteOffset": 217688, + "byteLength": 2304 + }, + { + "buffer": 0, + "byteOffset": 219992, + "byteLength": 4126 + }, + { + "buffer": 0, + "byteOffset": 224120, + "byteLength": 187 + }, + { + "buffer": 0, + "byteOffset": 224312, + "byteLength": 714 + }, + { + "buffer": 0, + "byteOffset": 225032, + "byteLength": 569 + }, + { + "buffer": 0, + "byteOffset": 225608, + "byteLength": 15781 + }, + { + "buffer": 0, + "byteOffset": 241392, + "byteLength": 130308 + }, + { + "buffer": 0, + "byteOffset": 371704, + "byteLength": 40021 + }, + { + "buffer": 0, + "byteOffset": 411728, + "byteLength": 217 + }, + { + "buffer": 0, + "byteOffset": 411952, + "byteLength": 3341 + }, + { + "buffer": 0, + "byteOffset": 415296, + "byteLength": 878 + }, + { + "buffer": 0, + "byteOffset": 416176, + "byteLength": 1146 + }, + { + "buffer": 0, + "byteOffset": 417328, + "byteLength": 1228 + }, + { + "buffer": 0, + "byteOffset": 418560, + "byteLength": 130313 + }, + { + "buffer": 0, + "byteOffset": 548880, + "byteLength": 40021 + }, + { + "buffer": 0, + "byteOffset": 588904, + "byteLength": 217 + }, + { + "buffer": 0, + "byteOffset": 589128, + "byteLength": 130306 + }, + { + "buffer": 0, + "byteOffset": 719440, + "byteLength": 40021 + }, + { + "buffer": 0, + "byteOffset": 759464, + "byteLength": 217 + }, + { + "buffer": 0, + "byteOffset": 759688, + "byteLength": 2279 + }, + { + "buffer": 0, + "byteOffset": 761968, + "byteLength": 130306 + }, + { + "buffer": 0, + "byteOffset": 892280, + "byteLength": 40021 + }, + { + "buffer": 0, + "byteOffset": 932304, + "byteLength": 217 + }, + { + "buffer": 0, + "byteOffset": 932528, + "byteLength": 643 + }, + { + "buffer": 0, + "byteOffset": 933176, + "byteLength": 2779 + }, + { + "buffer": 0, + "byteOffset": 935960, + "byteLength": 14258 + }, + { + "buffer": 0, + "byteOffset": 950224, + "byteLength": 12383 + }, + { + "buffer": 0, + "byteOffset": 962608, + "byteLength": 818 + }, + { + "buffer": 0, + "byteOffset": 963432, + "byteLength": 37949 + }, + { + "buffer": 0, + "byteOffset": 1001384, + "byteLength": 25783 + }, + { + "buffer": 0, + "byteOffset": 1027168, + "byteLength": 557 + }, + { + "buffer": 0, + "byteOffset": 1027728, + "byteLength": 2443 + }, + { + "buffer": 0, + "byteOffset": 1030176, + "byteLength": 836 + }, + { + "buffer": 0, + "byteOffset": 1031016, + "byteLength": 682 + }, + { + "buffer": 0, + "byteOffset": 1031704, + "byteLength": 2053 + }, + { + "buffer": 0, + "byteOffset": 1033760, + "byteLength": 216 + }, + { + "buffer": 0, + "byteOffset": 1033976, + "byteLength": 1154 + }, + { + "buffer": 0, + "byteOffset": 1035136, + "byteLength": 18787 + }, + { + "buffer": 0, + "byteOffset": 1053928, + "byteLength": 2644 + }, + { + "buffer": 0, + "byteOffset": 1056576, + "byteLength": 668 + }, + { + "buffer": 0, + "byteOffset": 1057248, + "byteLength": 1249 + }, + { + "buffer": 0, + "byteOffset": 1058504, + "byteLength": 1249 + }, + { + "buffer": 0, + "byteOffset": 1059760, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1061960, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1064160, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1066360, + "byteLength": 1249 + }, + { + "buffer": 0, + "byteOffset": 1067616, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1069816, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1072016, + "byteLength": 1249 + }, + { + "buffer": 0, + "byteOffset": 1073272, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1075472, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1077672, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1079872, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1082072, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1084272, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1086472, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1088672, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1090872, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1093072, + "byteLength": 2200 + }, + { + "buffer": 0, + "byteOffset": 1095272, + "byteLength": 13575 + }, + { + "buffer": 0, + "byteOffset": 1108848, + "byteLength": 2046 + }, + { + "buffer": 0, + "byteOffset": 1110896, + "byteLength": 24898 + }, + { + "buffer": 0, + "byteOffset": 1135800, + "byteLength": 24898 + }, + { + "buffer": 0, + "byteOffset": 1160704, + "byteLength": 24898 + }, + { + "buffer": 0, + "byteOffset": 1185608, + "byteLength": 17796 + }, + { + "buffer": 0, + "byteOffset": 1203408, + "byteLength": 17796 + }, + { + "buffer": 0, + "byteOffset": 1221208, + "byteLength": 17796 + }, + { + "buffer": 0, + "byteOffset": 1239008, + "byteLength": 871 + }, + { + "buffer": 0, + "byteOffset": 1239880, + "byteLength": 871 + }, + { + "buffer": 0, + "byteOffset": 1240752, + "byteLength": 871 + }, + { + "buffer": 0, + "byteOffset": 1241624, + "byteLength": 871 + }, + { + "buffer": 0, + "byteOffset": 1242496, + "byteLength": 871 + }, + { + "buffer": 0, + "byteOffset": 1243368, + "byteLength": 871 + }, + { + "buffer": 0, + "byteOffset": 1244240, + "byteLength": 2054 + }, + { + "buffer": 0, + "byteOffset": 1246296, + "byteLength": 308 + }, + { + "buffer": 0, + "byteOffset": 1246608, + "byteLength": 275 + }, + { + "buffer": 0, + "byteOffset": 1246888, + "byteLength": 305 + }, + { + "buffer": 0, + "byteOffset": 1247200, + "byteLength": 322 + }, + { + "buffer": 0, + "byteOffset": 1247528, + "byteLength": 294 + }, + { + "buffer": 0, + "byteOffset": 1247824, + "byteLength": 1837 + }, + { + "buffer": 0, + "byteOffset": 1249664, + "byteLength": 6554 + }, + { + "buffer": 0, + "byteOffset": 1256224, + "byteLength": 36543 + }, + { + "buffer": 0, + "byteOffset": 1292768, + "byteLength": 5776 + }, + { + "buffer": 0, + "byteOffset": 1298544, + "byteLength": 205186 + }, + { + "buffer": 0, + "byteOffset": 1503736, + "byteLength": 46303 + }, + { + "buffer": 0, + "byteOffset": 1550040, + "byteLength": 2772 + } + ], + "buffers": [ + { + "name": "ZhuTi", + "byteLength": 1552816, + "uri": "ZhuTi.bin" + } + ], + "materials": [ + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 0, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_ChuGuan", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 1, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_GX1", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 2, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall2", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 3, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_gg1", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 4, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall1", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 5, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_gg2", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 6, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall3", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 7, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_gg5", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 8, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_gg3", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 9, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall4", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 10, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall5", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 11, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_glass1", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 12, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_gg4", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 13, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_yinxiang", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 14, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_floor1", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 15, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_JYJ2", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 16, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall6", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 17, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_JYJ1", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 18, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall7", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 19, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "QiCaiXiang", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 20, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "SanXiang", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 21, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ShaDai", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 22, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall8", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 23, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_gg6", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 24, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall11", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 25, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall9", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 26, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall10", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 27, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_floor2", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 28, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_wall12", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 29, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "LuZhuang", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 30, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_SXT", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorFactor": [ + 0.588, + 0.588, + 0.588, + 1 + ], + "metallicFactor": 0, + "roughnessFactor": 0.450053632 + }, + "name": "jiankong", + "extras": { + "启用": false + }, + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 31, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "FireExtinguisher_FireExtinguisher_AlbedoTransparency", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 32, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "mhq-xiang", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 33, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_JingGai", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 34, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_JingGai1", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 35, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_BanGong", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 36, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_guitai1", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 0, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_ChuGuan", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 35, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_BanGong", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "pbrMetallicRoughness": { + "baseColorTexture": { + "index": 37, + "texCoord": 0 + }, + "metallicFactor": 0, + "roughnessFactor": 0.450053632, + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ] + }, + "name": "ZHSY_SheDeng1", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "name": "default", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "name": "default", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + }, + { + "name": "default", + "emissiveFactor": [ + 0, + 0, + 0 + ], + "alphaMode": "OPAQUE", + "doubleSided": false + } + ], + "textures": [ + { + "sampler": 0, + "source": 0, + "name": "ZHSY_ChuGuan.png" + }, + { + "sampler": 0, + "source": 1, + "name": "ZHSY_GX1.jpg" + }, + { + "sampler": 0, + "source": 2, + "name": "ZHSY_wall2.jpg" + }, + { + "sampler": 0, + "source": 3, + "name": "ZHSY_gg1.jpg" + }, + { + "sampler": 0, + "source": 4, + "name": "ZHSY_wall1.jpg" + }, + { + "sampler": 0, + "source": 5, + "name": "ZHSY_gg2.jpg" + }, + { + "sampler": 0, + "source": 6, + "name": "ZHSY_wall3.jpg" + }, + { + "sampler": 0, + "source": 7, + "name": "ZHSY_gg5.jpg" + }, + { + "sampler": 0, + "source": 8, + "name": "ZHSY_gg3.jpg" + }, + { + "sampler": 0, + "source": 9, + "name": "ZHSY_wall4.jpg" + }, + { + "sampler": 0, + "source": 10, + "name": "ZHSY_wall5.jpg" + }, + { + "sampler": 0, + "source": 11, + "name": "ZHSY_glass1.jpg" + }, + { + "sampler": 0, + "source": 12, + "name": "ZHSY_gg4.jpg" + }, + { + "sampler": 0, + "source": 13, + "name": "ZHSY_yinxiang.jpg" + }, + { + "sampler": 0, + "source": 14, + "name": "ZHSY_floor1.jpg" + }, + { + "sampler": 0, + "source": 15, + "name": "ZHSY_JYJ2.jpg" + }, + { + "sampler": 0, + "source": 16, + "name": "ZHSY_wall6.jpg" + }, + { + "sampler": 0, + "source": 17, + "name": "ZHSY_JYJ1.jpg" + }, + { + "sampler": 0, + "source": 18, + "name": "ZHSY_wall7.jpg" + }, + { + "sampler": 0, + "source": 19, + "name": "QiCaiXiang.jpg" + }, + { + "sampler": 0, + "source": 20, + "name": "SanXiang.jpg" + }, + { + "sampler": 0, + "source": 21, + "name": "ShaDai.jpg" + }, + { + "sampler": 0, + "source": 22, + "name": "ZHSY_wall8.jpg" + }, + { + "sampler": 0, + "source": 23, + "name": "ZHSY_gg6.jpg" + }, + { + "sampler": 0, + "source": 24, + "name": "ZHSY_wall11.jpg" + }, + { + "sampler": 0, + "source": 25, + "name": "ZHSY_wall9.jpg" + }, + { + "sampler": 0, + "source": 26, + "name": "ZHSY_wall10.jpg" + }, + { + "sampler": 0, + "source": 27, + "name": "ZHSY_floor2.jpg" + }, + { + "sampler": 0, + "source": 28, + "name": "ZHSY_wall12.jpg" + }, + { + "sampler": 0, + "source": 29, + "name": "LuZhuang.jpg" + }, + { + "sampler": 0, + "source": 30, + "name": "ZHSY_SXT.png" + }, + { + "sampler": 0, + "source": 31, + "name": "FireExtinguisher_FireExtinguisher_AlbedoTransparency.png" + }, + { + "sampler": 0, + "source": 32, + "name": "mhq-xiang.jpg" + }, + { + "sampler": 0, + "source": 33, + "name": "ZHSY_JingGai.jpg" + }, + { + "sampler": 0, + "source": 34, + "name": "ZHSY_JingGai1.jpg" + }, + { + "sampler": 0, + "source": 35, + "name": "ZHSY_BanGong.jpg" + }, + { + "sampler": 0, + "source": 36, + "name": "ZHSY_guitai1.jpg" + }, + { + "sampler": 0, + "source": 37, + "name": "ZHSY_SheDeng1.jpg" + } + ], + "images": [ + { + "name": "ZHSY_ChuGuan", + "uri": "ZHSY_ChuGuan.png" + }, + { + "name": "ZHSY_GX1", + "uri": "ZHSY_GX1.jpg" + }, + { + "name": "ZHSY_wall2", + "uri": "ZHSY_wall2.jpg" + }, + { + "name": "ZHSY_gg1", + "uri": "ZHSY_gg1.jpg" + }, + { + "name": "ZHSY_wall1", + "uri": "ZHSY_wall1.jpg" + }, + { + "name": "ZHSY_gg2", + "uri": "ZHSY_gg2.jpg" + }, + { + "name": "ZHSY_wall3", + "uri": "ZHSY_wall3.jpg" + }, + { + "name": "ZHSY_gg5", + "uri": "ZHSY_gg5.jpg" + }, + { + "name": "ZHSY_gg3", + "uri": "ZHSY_gg3.jpg" + }, + { + "name": "ZHSY_wall4", + "uri": "ZHSY_wall4.jpg" + }, + { + "name": "ZHSY_wall5", + "uri": "ZHSY_wall5.jpg" + }, + { + "name": "ZHSY_glass1", + "uri": "ZHSY_glass1.jpg" + }, + { + "name": "ZHSY_gg4", + "uri": "ZHSY_gg4.jpg" + }, + { + "name": "ZHSY_yinxiang", + "uri": "ZHSY_yinxiang.jpg" + }, + { + "name": "ZHSY_floor1", + "uri": "ZHSY_floor1.jpg" + }, + { + "name": "ZHSY_JYJ2", + "uri": "ZHSY_JYJ2.jpg" + }, + { + "name": "ZHSY_wall6", + "uri": "ZHSY_wall6.jpg" + }, + { + "name": "ZHSY_JYJ1", + "uri": "ZHSY_JYJ1.jpg" + }, + { + "name": "ZHSY_wall7", + "uri": "ZHSY_wall7.jpg" + }, + { + "name": "QiCaiXiang", + "uri": "QiCaiXiang.jpg" + }, + { + "name": "SanXiang", + "uri": "SanXiang.jpg" + }, + { + "name": "ShaDai", + "uri": "ShaDai.jpg" + }, + { + "name": "ZHSY_wall8", + "uri": "ZHSY_wall8.jpg" + }, + { + "name": "ZHSY_gg6", + "uri": "ZHSY_gg6.jpg" + }, + { + "name": "ZHSY_wall11", + "uri": "ZHSY_wall11.jpg" + }, + { + "name": "ZHSY_wall9", + "uri": "ZHSY_wall9.jpg" + }, + { + "name": "ZHSY_wall10", + "uri": "ZHSY_wall10.jpg" + }, + { + "name": "ZHSY_floor2", + "uri": "ZHSY_floor2.jpg" + }, + { + "name": "ZHSY_wall12", + "uri": "ZHSY_wall12.jpg" + }, + { + "name": "LuZhuang", + "uri": "LuZhuang.jpg" + }, + { + "name": "ZHSY_SXT", + "uri": "ZHSY_SXT.png" + }, + { + "name": "FireExtinguisher_FireExtinguisher_AlbedoTransparency", + "uri": "FireExtinguisher_FireExtinguisher_AlbedoTransparency.png" + }, + { + "name": "mhq-xiang", + "uri": "mhq-xiang.jpg" + }, + { + "name": "ZHSY_JingGai", + "uri": "ZHSY_JingGai.jpg" + }, + { + "name": "ZHSY_JingGai1", + "uri": "ZHSY_JingGai1.jpg" + }, + { + "name": "ZHSY_BanGong", + "uri": "ZHSY_BanGong.jpg" + }, + { + "name": "ZHSY_guitai1", + "uri": "ZHSY_guitai1.jpg" + }, + { + "name": "ZHSY_SheDeng1", + "uri": "ZHSY_SheDeng1.jpg" + } + ], + "samplers": [ + { + "magFilter": 9729, + "minFilter": 9987, + "wrapS": 10497, + "wrapT": 10497 + } + ], + "extensionsRequired": [ + "KHR_draco_mesh_compression" + ], + "extensionsUsed": [ + "KHR_draco_mesh_compression" + ] +} diff --git a/src/assets/mesh/outdoor/ZhuTi/mhq-xiang.jpg b/src/assets/mesh/outdoor/ZhuTi/mhq-xiang.jpg new file mode 100644 index 0000000..43e793b Binary files /dev/null and b/src/assets/mesh/outdoor/ZhuTi/mhq-xiang.jpg differ diff --git a/src/assets/skybox/city/city.env b/src/assets/skybox/city/city.env new file mode 100644 index 0000000..33d339f Binary files /dev/null and b/src/assets/skybox/city/city.env differ diff --git a/src/assets/skybox/default/default_nx.jpg b/src/assets/skybox/default/default_nx.jpg new file mode 100644 index 0000000..7d438c7 Binary files /dev/null and b/src/assets/skybox/default/default_nx.jpg differ diff --git a/src/assets/skybox/default/default_ny.jpg b/src/assets/skybox/default/default_ny.jpg new file mode 100644 index 0000000..2eb0419 Binary files /dev/null and b/src/assets/skybox/default/default_ny.jpg differ diff --git a/src/assets/skybox/default/default_nz.jpg b/src/assets/skybox/default/default_nz.jpg new file mode 100644 index 0000000..02072e8 Binary files /dev/null and b/src/assets/skybox/default/default_nz.jpg differ diff --git a/src/assets/skybox/default/default_px.jpg b/src/assets/skybox/default/default_px.jpg new file mode 100644 index 0000000..4d8065e Binary files /dev/null and b/src/assets/skybox/default/default_px.jpg differ diff --git a/src/assets/skybox/default/default_py.jpg b/src/assets/skybox/default/default_py.jpg new file mode 100644 index 0000000..6745123 Binary files /dev/null and b/src/assets/skybox/default/default_py.jpg differ diff --git a/src/assets/skybox/default/default_pz.jpg b/src/assets/skybox/default/default_pz.jpg new file mode 100644 index 0000000..960d2c4 Binary files /dev/null and b/src/assets/skybox/default/default_pz.jpg differ diff --git a/tsconfig.json b/tsconfig.json index 6d92dc1..3919d68 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,6 +22,7 @@ }, "angularCompilerOptions": { "fullTemplateTypeCheck": true, - "strictInjectionParameters": true + "strictInjectionParameters": true, + "enableIvy": false } } diff --git a/yarn.lock b/yarn.lock index 20aebaa..4f6838d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,150 +2,152 @@ # yarn lockfile v1 -"@angular-devkit/architect@0.803.21": - version "0.803.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/architect/download/@angular-devkit/architect-0.803.21.tgz#0e76b6f646ebdbd9bb88d3972b2ca66fed950f7d" - integrity sha1-Dna29kbr29m7iNOXKyymb+2VD30= - dependencies: - "@angular-devkit/core" "8.3.21" - rxjs "6.4.0" - -"@angular-devkit/build-angular@~0.803.21": - version "0.803.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/build-angular/download/@angular-devkit/build-angular-0.803.21.tgz#f3d12ea09748b05eb2d835a7de7997599fb6b752" - integrity sha1-89EuoJdIsF6y2DWn3nmXWZ+2t1I= - dependencies: - "@angular-devkit/architect" "0.803.21" - "@angular-devkit/build-optimizer" "0.803.21" - "@angular-devkit/build-webpack" "0.803.21" - "@angular-devkit/core" "8.3.21" - "@babel/core" "7.7.5" - "@babel/preset-env" "7.7.6" - "@ngtools/webpack" "8.3.21" +"@angular-devkit/architect@0.900.7": + version "0.900.7" + resolved "https://registry.npmmirror.com/@angular-devkit/architect/download/@angular-devkit/architect-0.900.7.tgz?cache=0&sync_timestamp=1634778102244&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Farchitect%2Fdownload%2F%40angular-devkit%2Farchitect-0.900.7.tgz#11884bc3c3be8618a62c8e80d61c3410ab954719" + integrity sha1-EYhLw8O+hhimLI6A1hw0EKuVRxk= + dependencies: + "@angular-devkit/core" "9.0.7" + rxjs "6.5.3" + +"@angular-devkit/build-angular@~0.900.1": + version "0.900.7" + resolved "https://registry.npmmirror.com/@angular-devkit/build-angular/download/@angular-devkit/build-angular-0.900.7.tgz?cache=0&sync_timestamp=1634778103127&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Fbuild-angular%2Fdownload%2F%40angular-devkit%2Fbuild-angular-0.900.7.tgz#5d15d6fb1f96e3a1c3e7df786ef02ddad3ee7cb0" + integrity sha1-XRXW+x+W46HD5994bvAt2tPufLA= + dependencies: + "@angular-devkit/architect" "0.900.7" + "@angular-devkit/build-optimizer" "0.900.7" + "@angular-devkit/build-webpack" "0.900.7" + "@angular-devkit/core" "9.0.7" + "@babel/core" "7.7.7" + "@babel/generator" "7.7.7" + "@babel/preset-env" "7.7.7" + "@ngtools/webpack" "9.0.7" ajv "6.10.2" - autoprefixer "9.6.1" - browserslist "4.6.6" - cacache "12.0.2" - caniuse-lite "1.0.30000989" + autoprefixer "9.7.1" + babel-loader "8.0.6" + browserslist "^4.9.1" + cacache "13.0.1" + caniuse-lite "^1.0.30001032" circular-dependency-plugin "5.2.0" - clean-css "4.2.1" copy-webpack-plugin "5.1.1" - core-js "3.2.1" + core-js "3.6.4" + coverage-istanbul-loader "2.0.3" + cssnano "4.1.10" file-loader "4.2.0" find-cache-dir "3.0.0" - glob "7.1.4" - istanbul-instrumenter-loader "3.0.1" + glob "7.1.5" jest-worker "24.9.0" karma-source-map-support "1.4.0" - less "3.9.0" + less "3.10.3" less-loader "5.0.0" - license-webpack-plugin "2.1.2" + license-webpack-plugin "2.1.3" loader-utils "1.2.3" + magic-string "0.25.4" mini-css-extract-plugin "0.8.0" minimatch "3.0.4" - open "6.4.0" + open "7.0.0" parse5 "4.0.0" - postcss "7.0.17" + postcss "7.0.21" postcss-import "12.0.1" postcss-loader "3.0.0" raw-loader "3.1.0" regenerator-runtime "0.13.3" - rxjs "6.4.0" - sass "1.22.9" - sass-loader "7.2.0" + rimraf "3.0.0" + rollup "1.25.2" + rxjs "6.5.3" + sass "1.23.3" + sass-loader "8.0.0" semver "6.3.0" source-map "0.7.3" source-map-loader "0.2.4" - source-map-support "0.5.13" + source-map-support "0.5.16" speed-measure-webpack-plugin "1.3.1" style-loader "1.0.0" - stylus "0.54.5" + stylus "0.54.7" stylus-loader "3.0.2" - terser "4.3.9" - terser-webpack-plugin "1.4.3" - tree-kill "1.2.1" - webpack "4.39.2" + terser "4.5.1" + terser-webpack-plugin "2.3.3" + tree-kill "1.2.2" + webpack "4.41.2" webpack-dev-middleware "3.7.2" webpack-dev-server "3.9.0" - webpack-merge "4.2.1" + webpack-merge "4.2.2" webpack-sources "1.4.3" - webpack-subresource-integrity "1.1.0-rc.6" + webpack-subresource-integrity "1.3.4" worker-plugin "3.2.0" -"@angular-devkit/build-optimizer@0.803.21": - version "0.803.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/build-optimizer/download/@angular-devkit/build-optimizer-0.803.21.tgz#ecb3b6bba4b13ffbfbdbefb5997f690aa3635203" - integrity sha1-7LO2u6SxP/v72++1mX9pCqNjUgM= +"@angular-devkit/build-optimizer@0.900.7": + version "0.900.7" + resolved "https://registry.npmmirror.com/@angular-devkit/build-optimizer/download/@angular-devkit/build-optimizer-0.900.7.tgz?cache=0&sync_timestamp=1634778104019&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Fbuild-optimizer%2Fdownload%2F%40angular-devkit%2Fbuild-optimizer-0.900.7.tgz#cda2cd1034ee03ef02a09426f50dec920e56cf59" + integrity sha1-zaLNEDTuA+8CoJQm9Q3skg5Wz1k= dependencies: loader-utils "1.2.3" source-map "0.7.3" tslib "1.10.0" - typescript "3.5.3" + typescript "3.6.4" webpack-sources "1.4.3" -"@angular-devkit/build-webpack@0.803.21": - version "0.803.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/build-webpack/download/@angular-devkit/build-webpack-0.803.21.tgz#fd45754c0123f44fcde8fa6411ebea52d98054f0" - integrity sha1-/UV1TAEj9E/N6PpkEevqUtmAVPA= +"@angular-devkit/build-webpack@0.900.7": + version "0.900.7" + resolved "https://registry.npmmirror.com/@angular-devkit/build-webpack/download/@angular-devkit/build-webpack-0.900.7.tgz?cache=0&sync_timestamp=1634778104683&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Fbuild-webpack%2Fdownload%2F%40angular-devkit%2Fbuild-webpack-0.900.7.tgz#78ba1abe1fe3face8ed88e82a151c6d57daf0a4b" + integrity sha1-eLoavh/j+s6O2I6CoVHG1X2vCks= dependencies: - "@angular-devkit/architect" "0.803.21" - "@angular-devkit/core" "8.3.21" - rxjs "6.4.0" + "@angular-devkit/architect" "0.900.7" + "@angular-devkit/core" "9.0.7" + rxjs "6.5.3" -"@angular-devkit/core@8.3.21": - version "8.3.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/core/download/@angular-devkit/core-8.3.21.tgz#447022813e46333e930816c287722d06b9c4dd3a" - integrity sha1-RHAigT5GMz6TCBbCh3ItBrnE3To= +"@angular-devkit/core@9.0.7": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular-devkit/core/download/@angular-devkit/core-9.0.7.tgz?cache=0&sync_timestamp=1634778109540&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Fcore%2Fdownload%2F%40angular-devkit%2Fcore-9.0.7.tgz#97e452ad88d36391d621748487c5bab655edfe84" + integrity sha1-l+RSrYjTY5HWIXSEh8W6tlXt/oQ= dependencies: ajv "6.10.2" fast-json-stable-stringify "2.0.0" - magic-string "0.25.3" - rxjs "6.4.0" + magic-string "0.25.4" + rxjs "6.5.3" source-map "0.7.3" -"@angular-devkit/schematics@8.3.21": - version "8.3.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/schematics/download/@angular-devkit/schematics-8.3.21.tgz#80d515f480180be18a4130ea691f90153bcab3ea" - integrity sha1-gNUV9IAYC+GKQTDqaR+QFTvKs+o= +"@angular-devkit/schematics@9.0.7": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular-devkit/schematics/download/@angular-devkit/schematics-9.0.7.tgz?cache=0&sync_timestamp=1634778106353&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Fschematics%2Fdownload%2F%40angular-devkit%2Fschematics-9.0.7.tgz#df5936b0cf24a102d110da7ab3ab63feab7e28ff" + integrity sha1-31k2sM8koQLRENp6s6tj/qt+KP8= dependencies: - "@angular-devkit/core" "8.3.21" - rxjs "6.4.0" + "@angular-devkit/core" "9.0.7" + ora "4.0.2" + rxjs "6.5.3" -"@angular/animations@^8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/animations/download/@angular/animations-8.2.14.tgz?cache=0&sync_timestamp=1576712912708&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40angular%2Fanimations%2Fdownload%2F%40angular%2Fanimations-8.2.14.tgz#76736b21e56165e6ca4925fb69605bdcc56aba7d" - integrity sha1-dnNrIeVhZebKSSX7aWBb3MVqun0= - dependencies: - tslib "^1.9.0" +"@angular/animations@^9.0.0": + version "9.1.13" + resolved "https://registry.npmmirror.com/@angular/animations/download/@angular/animations-9.1.13.tgz?cache=0&sync_timestamp=1634753072212&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fanimations%2Fdownload%2F%40angular%2Fanimations-9.1.13.tgz#561305f7bf4a7a5ea3ff172d6fac31615667acb0" + integrity sha1-VhMF979Kel6j/xctb6wxYVZnrLA= -"@angular/cdk@^8.2.3": - version "8.2.3" - resolved "https://registry.npm.taobao.org/@angular/cdk/download/@angular/cdk-8.2.3.tgz#16b96ffa935cbf5a646757ecaf2b19c434678f72" - integrity sha1-Frlv+pNcv1pkZ1fsrysZxDRnj3I= - dependencies: - tslib "^1.7.1" +"@angular/cdk@^9.0.0": + version "9.2.4" + resolved "https://registry.npmmirror.com/@angular/cdk/download/@angular/cdk-9.2.4.tgz#8413958bd275e4c34be3b96f56444671dd30ba93" + integrity sha1-hBOVi9J15MNL47lvVkRGcd0wupM= optionalDependencies: parse5 "^5.0.0" -"@angular/cli@~8.3.21": - version "8.3.21" - resolved "https://registry.npm.taobao.org/@angular/cli/download/@angular/cli-8.3.21.tgz#cbb05b86b7f34ecd81d52ccad922359e66a16a15" - integrity sha1-y7BbhrfzTs2B1SzK2SI1nmahahU= +"@angular/cli@~9.0.1": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/cli/download/@angular/cli-9.0.7.tgz?cache=0&sync_timestamp=1634778101387&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fcli%2Fdownload%2F%40angular%2Fcli-9.0.7.tgz#67df7b13fd750a8ac142b4ab8488439439385885" + integrity sha1-Z997E/11CorBQrSrhIhDlDk4WIU= dependencies: - "@angular-devkit/architect" "0.803.21" - "@angular-devkit/core" "8.3.21" - "@angular-devkit/schematics" "8.3.21" - "@schematics/angular" "8.3.21" - "@schematics/update" "0.803.21" + "@angular-devkit/architect" "0.900.7" + "@angular-devkit/core" "9.0.7" + "@angular-devkit/schematics" "9.0.7" + "@schematics/angular" "9.0.7" + "@schematics/update" "0.900.7" "@yarnpkg/lockfile" "1.1.0" ansi-colors "4.1.1" debug "^4.1.1" ini "1.3.5" - inquirer "6.5.1" - npm-package-arg "6.1.0" + inquirer "7.0.0" + npm-package-arg "6.1.1" npm-pick-manifest "3.0.2" - open "6.4.0" - pacote "9.5.5" + open "7.0.0" + pacote "9.5.8" read-package-tree "5.3.1" rimraf "3.0.0" semver "6.3.0" @@ -153,82 +155,87 @@ universal-analytics "^0.4.20" uuid "^3.3.2" -"@angular/common@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/common/download/@angular/common-8.2.14.tgz#027e52b2951c14082d6e3af1a4ffa1356220e439" - integrity sha1-An5SspUcFAgtbjrxpP+hNWIg5Dk= - dependencies: - tslib "^1.9.0" +"@angular/common@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/common/download/@angular/common-9.0.7.tgz?cache=0&sync_timestamp=1634753070990&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fcommon%2Fdownload%2F%40angular%2Fcommon-9.0.7.tgz#a5d96515ac0db6d7fccb14e16d2bf713cf845a9d" + integrity sha1-pdllFawNttf8yxThbSv3E8+EWp0= -"@angular/compiler-cli@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/compiler-cli/download/@angular/compiler-cli-8.2.14.tgz#1997bec04a6b9d022954e5747505fe8906994594" - integrity sha1-GZe+wEprnQIpVOV0dQX+iQaZRZQ= +"@angular/compiler-cli@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/compiler-cli/download/@angular/compiler-cli-9.0.7.tgz?cache=0&sync_timestamp=1634753068949&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fcompiler-cli%2Fdownload%2F%40angular%2Fcompiler-cli-9.0.7.tgz#1ed5522c32bd7aac34df06dd2e7f27d51b07d900" + integrity sha1-HtVSLDK9eqw03wbdLn8n1RsH2QA= dependencies: canonical-path "1.0.0" - chokidar "^2.1.1" + chokidar "^3.0.0" convert-source-map "^1.5.1" dependency-graph "^0.7.2" + fs-extra "4.0.2" magic-string "^0.25.0" minimist "^1.2.0" reflect-metadata "^0.1.2" + semver "^6.3.0" source-map "^0.6.1" - tslib "^1.9.0" + sourcemap-codec "^1.4.8" yargs "13.1.0" -"@angular/compiler@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/compiler/download/@angular/compiler-8.2.14.tgz#46db7a9d1c17f236126518ff26480c160d5a6183" - integrity sha1-Rtt6nRwX8jYSZRj/JkgMFg1aYYM= - dependencies: - tslib "^1.9.0" +"@angular/compiler@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/compiler/download/@angular/compiler-9.0.7.tgz?cache=0&sync_timestamp=1634753069455&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fcompiler%2Fdownload%2F%40angular%2Fcompiler-9.0.7.tgz#3cf8f9f6dc6e787506a0bc9444c4abb857bb1068" + integrity sha1-PPj59txueHUGoLyURMSruFe7EGg= -"@angular/core@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/core/download/@angular/core-8.2.14.tgz#35566f5b19480369229477e7e0e0fde740bd5204" - integrity sha1-NVZvWxlIA2kilHfn4OD950C9UgQ= - dependencies: - tslib "^1.9.0" - -"@angular/forms@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/forms/download/@angular/forms-8.2.14.tgz#7d357c346a3884881beb044c50ec4a09d3d7ee8e" - integrity sha1-fTV8NGo4hIgb6wRMUOxKCdPX7o4= - dependencies: - tslib "^1.9.0" +"@angular/core@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/core/download/@angular/core-9.0.7.tgz#f75f4ed8ea721f44c9df77502fd114a88db988e3" + integrity sha1-919O2OpyH0TJ33dQL9EUqI25iOM= -"@angular/language-service@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/language-service/download/@angular/language-service-8.2.14.tgz#e18b27a6841577ce489ad31540150da5a444ca37" - integrity sha1-4YsnpoQVd85ImtMVQBUNpaREyjc= - -"@angular/material@^8.2.3": - version "8.2.3" - resolved "https://registry.npm.taobao.org/@angular/material/download/@angular/material-8.2.3.tgz#16543e4e06a3fde2651a25cfe126e88e714ae105" - integrity sha1-FlQ+Tgaj/eJlGiXP4SbojnFK4QU= - dependencies: - tslib "^1.7.1" - -"@angular/platform-browser-dynamic@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/platform-browser-dynamic/download/@angular/platform-browser-dynamic-8.2.14.tgz#4439a79fe10ec45170e6940a28835e9ff0918950" - integrity sha1-RDmnn+EOxFFw5pQKKINen/CRiVA= - dependencies: - tslib "^1.9.0" - -"@angular/platform-browser@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/platform-browser/download/@angular/platform-browser-8.2.14.tgz#31f082e8ba977f9b89964d721c38cbc32ce0e433" - integrity sha1-MfCC6LqXf5uJlk1yHDjLwyzg5DM= +"@angular/fire@^5.3.0": + version "5.4.2" + resolved "https://registry.npmmirror.com/@angular/fire/download/@angular/fire-5.4.2.tgz#fb2d54935de0d83789e940e5f57a6ffc0e1ef4eb" + integrity sha1-+y1Uk13g2DeJ6UDl9Xpv/A4e9Os= + +"@angular/forms@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/forms/download/@angular/forms-9.0.7.tgz?cache=0&sync_timestamp=1634753066771&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fforms%2Fdownload%2F%40angular%2Fforms-9.0.7.tgz#2445d6893d9264f9ba1c463ed3802c2a63174114" + integrity sha1-JEXWiT2SZPm6HEY+04AsKmMXQRQ= + +"@angular/language-service@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/language-service/download/@angular/language-service-9.0.7.tgz?cache=0&sync_timestamp=1634753067621&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Flanguage-service%2Fdownload%2F%40angular%2Flanguage-service-9.0.7.tgz#c204467383ee5f194a73a365ea7c543c6900bb54" + integrity sha1-wgRGc4PuXxlKc6Nl6nxUPGkAu1Q= + +"@angular/material@^9.0.0": + version "9.2.4" + resolved "https://registry.npmmirror.com/@angular/material/download/@angular/material-9.2.4.tgz#2666ef606fbb88d60f8e2f18c5e4f94a3dd572d8" + integrity sha1-JmbvYG+7iNYPji8YxeT5Sj3Vctg= + +"@angular/platform-browser-dynamic@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/platform-browser-dynamic/download/@angular/platform-browser-dynamic-9.0.7.tgz#7ca7e728fea0ba81b1009de1aa59a003b73c89af" + integrity sha1-fKfnKP6guoGxAJ3hqlmgA7c8ia8= + +"@angular/platform-browser@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/platform-browser/download/@angular/platform-browser-9.0.7.tgz?cache=0&sync_timestamp=1634753063837&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fplatform-browser%2Fdownload%2F%40angular%2Fplatform-browser-9.0.7.tgz#04543801bdd9d37e452bc344eea6d578565fd2c0" + integrity sha1-BFQ4Ab3Z035FK8NE7qbVeFZf0sA= + +"@angular/router@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/router/download/@angular/router-9.0.7.tgz?cache=0&sync_timestamp=1634753064604&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Frouter%2Fdownload%2F%40angular%2Frouter-9.0.7.tgz#0296d11a17a6b94c0463c9b166dc4244b8fea5e5" + integrity sha1-ApbRGhemuUwEY8mxZtxCRLj+peU= + +"@ant-design/colors@^3.1.0": + version "3.2.2" + resolved "https://registry.npm.taobao.org/@ant-design/colors/download/@ant-design/colors-3.2.2.tgz#5ad43d619e911f3488ebac303d606e66a8423903" + integrity sha1-WtQ9YZ6RHzSI66wwPWBuZqhCOQM= dependencies: - tslib "^1.9.0" + tinycolor2 "^1.4.1" -"@angular/router@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/router/download/@angular/router-8.2.14.tgz?cache=0&sync_timestamp=1576712899499&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40angular%2Frouter%2Fdownload%2F%40angular%2Frouter-8.2.14.tgz#5f9f9707710983c2143aead79dcd2da520ae3eb8" - integrity sha1-X5+XB3EJg8IUOurXnc0tpSCuPrg= +"@ant-design/icons-angular@^9.0.0": + version "9.0.1" + resolved "https://registry.nlark.com/@ant-design/icons-angular/download/@ant-design/icons-angular-9.0.1.tgz#5ac8bec5bc34d23120820c93f8511b59aa117bc5" + integrity sha1-Wsi+xbw00jEgggyT+FEbWaoRe8U= dependencies: - tslib "^1.9.0" + "@ant-design/colors" "^3.1.0" "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": version "7.5.5" @@ -237,15 +244,27 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@7.7.5": - version "7.7.5" - resolved "https://registry.npm.taobao.org/@babel/core/download/@babel/core-7.7.5.tgz?cache=0&sync_timestamp=1576716905281&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.7.5.tgz#ae1323cd035b5160293307f50647e83f8ba62f7e" - integrity sha1-rhMjzQNbUWApMwf1BkfoP4umL34= +"@babel/code-frame@^7.14.5", "@babel/code-frame@^7.15.8": + version "7.15.8" + resolved "https://registry.npmmirror.com/@babel/code-frame/download/@babel/code-frame-7.15.8.tgz?cache=0&sync_timestamp=1633554211186&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.15.8.tgz#45990c47adadb00c03677baa89221f7cc23d2503" + integrity sha1-RZkMR62tsAwDZ3uqiSIffMI9JQM= + dependencies: + "@babel/highlight" "^7.14.5" + +"@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.nlark.com/@babel/compat-data/download/@babel/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha1-Lbr4uFM0eWyvuw9Xk6kKL8AQsXY= + +"@babel/core@7.7.7": + version "7.7.7" + resolved "https://registry.npmmirror.com/@babel/core/download/@babel/core-7.7.7.tgz?cache=0&sync_timestamp=1633554214677&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.7.7.tgz#ee155d2e12300bcc0cff6a8ad46f2af5063803e9" + integrity sha1-7hVdLhIwC8wM/2qK1G8q9QY4A+k= dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.4" + "@babel/generator" "^7.7.7" "@babel/helpers" "^7.7.4" - "@babel/parser" "^7.7.5" + "@babel/parser" "^7.7.7" "@babel/template" "^7.7.4" "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" @@ -257,7 +276,28 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.7.4": +"@babel/core@^7.7.5": + version "7.15.8" + resolved "https://registry.npmmirror.com/@babel/core/download/@babel/core-7.15.8.tgz?cache=0&sync_timestamp=1633554214677&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.15.8.tgz#195b9f2bffe995d2c6c159e72fe525b4114e8c10" + integrity sha1-GVufK//pldLGwVnnL+UltBFOjBA= + dependencies: + "@babel/code-frame" "^7.15.8" + "@babel/generator" "^7.15.8" + "@babel/helper-compilation-targets" "^7.15.4" + "@babel/helper-module-transforms" "^7.15.8" + "@babel/helpers" "^7.15.4" + "@babel/parser" "^7.15.8" + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.6" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + semver "^6.3.0" + source-map "^0.5.0" + +"@babel/generator@7.7.7", "@babel/generator@^7.4.0", "@babel/generator@^7.7.4": version "7.7.7" resolved "https://registry.npm.taobao.org/@babel/generator/download/@babel/generator-7.7.7.tgz?cache=0&sync_timestamp=1576716816462&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fgenerator%2Fdownload%2F%40babel%2Fgenerator-7.7.7.tgz#859ac733c44c74148e1a72980a64ec84b85f4f45" integrity sha1-hZrHM8RMdBSOGnKYCmTshLhfT0U= @@ -267,6 +307,22 @@ lodash "^4.17.13" source-map "^0.5.0" +"@babel/generator@^7.15.4", "@babel/generator@^7.15.8", "@babel/generator@^7.7.7": + version "7.15.8" + resolved "https://registry.npmmirror.com/@babel/generator/download/@babel/generator-7.15.8.tgz?cache=0&sync_timestamp=1633554212021&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fgenerator%2Fdownload%2F%40babel%2Fgenerator-7.15.8.tgz#fa56be6b596952ceb231048cf84ee499a19c0cd1" + integrity sha1-+la+a1lpUs6yMQSM+E7kmaGcDNE= + dependencies: + "@babel/types" "^7.15.6" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.14.5": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-annotate-as-pure/download/@babel/helper-annotate-as-pure-7.15.4.tgz#3d0e43b00c5e49fdb6c57e421601a7a658d5f835" + integrity sha1-PQ5DsAxeSf22xX5CFgGnpljV+DU= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-annotate-as-pure@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-annotate-as-pure/download/@babel/helper-annotate-as-pure-7.7.4.tgz?cache=0&sync_timestamp=1574466437284&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-annotate-as-pure%2Fdownload%2F%40babel%2Fhelper-annotate-as-pure-7.7.4.tgz#bb3faf1e74b74bd547e867e48f551fa6b098b6ce" @@ -282,14 +338,23 @@ "@babel/helper-explode-assignable-expression" "^7.7.4" "@babel/types" "^7.7.4" -"@babel/helper-call-delegate@^7.7.4": - version "7.7.4" - resolved "https://registry.npm.taobao.org/@babel/helper-call-delegate/download/@babel/helper-call-delegate-7.7.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-call-delegate%2Fdownload%2F%40babel%2Fhelper-call-delegate-7.7.4.tgz#621b83e596722b50c0066f9dc37d3232e461b801" - integrity sha1-YhuD5ZZyK1DABm+dw30yMuRhuAE= +"@babel/helper-compilation-targets@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-compilation-targets/download/@babel/helper-compilation-targets-7.15.4.tgz#cf6d94f30fbefc139123e27dd6b02f65aeedb7b9" + integrity sha1-z22U8w++/BORI+J91rAvZa7tt7k= dependencies: - "@babel/helper-hoist-variables" "^7.7.4" - "@babel/traverse" "^7.7.4" - "@babel/types" "^7.7.4" + "@babel/compat-data" "^7.15.0" + "@babel/helper-validator-option" "^7.14.5" + browserslist "^4.16.6" + semver "^6.3.0" + +"@babel/helper-create-regexp-features-plugin@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-create-regexp-features-plugin/download/@babel/helper-create-regexp-features-plugin-7.14.5.tgz#c7d5ac5e9cf621c26057722fb7a8a4c5889358c4" + integrity sha1-x9WsXpz2IcJgV3Ivt6ikxYiTWMQ= + dependencies: + "@babel/helper-annotate-as-pure" "^7.14.5" + regexpu-core "^4.7.1" "@babel/helper-create-regexp-features-plugin@^7.7.4": version "7.7.4" @@ -316,6 +381,15 @@ "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-function-name@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-function-name/download/@babel/helper-function-name-7.15.4.tgz#845744dafc4381a4a5fb6afa6c3d36f98a787ebc" + integrity sha1-hFdE2vxDgaSl+2r6bD02+Yp4frw= + dependencies: + "@babel/helper-get-function-arity" "^7.15.4" + "@babel/template" "^7.15.4" + "@babel/types" "^7.15.4" + "@babel/helper-function-name@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-function-name/download/@babel/helper-function-name-7.7.4.tgz#ab6e041e7135d436d8f0a3eca15de5b67a341a2e" @@ -325,6 +399,13 @@ "@babel/template" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-get-function-arity@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.15.4.tgz#098818934a137fce78b536a3e015864be1e2879b" + integrity sha1-CYgYk0oTf854tTaj4BWGS+Hih5s= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-get-function-arity@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.7.4.tgz?cache=0&sync_timestamp=1574465620780&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-get-function-arity%2Fdownload%2F%40babel%2Fhelper-get-function-arity-7.7.4.tgz#cb46348d2f8808e632f0ab048172130e636005f0" @@ -332,6 +413,13 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-hoist-variables@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-hoist-variables/download/@babel/helper-hoist-variables-7.15.4.tgz#09993a3259c0e918f99d104261dfdfc033f178df" + integrity sha1-CZk6MlnA6Rj5nRBCYd/fwDPxeN8= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-hoist-variables@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-hoist-variables/download/@babel/helper-hoist-variables-7.7.4.tgz?cache=0&sync_timestamp=1574466436965&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-hoist-variables%2Fdownload%2F%40babel%2Fhelper-hoist-variables-7.7.4.tgz#612384e3d823fdfaaf9fce31550fe5d4db0f3d12" @@ -339,6 +427,13 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-member-expression-to-functions@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-member-expression-to-functions/download/@babel/helper-member-expression-to-functions-7.15.4.tgz#bfd34dc9bba9824a4658b0317ec2fd571a51e6ef" + integrity sha1-v9NNybupgkpGWLAxfsL9VxpR5u8= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-member-expression-to-functions@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-member-expression-to-functions/download/@babel/helper-member-expression-to-functions-7.7.4.tgz#356438e2569df7321a8326644d4b790d2122cb74" @@ -346,6 +441,13 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-module-imports@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-module-imports/download/@babel/helper-module-imports-7.15.4.tgz#e18007d230632dea19b47853b984476e7b4e103f" + integrity sha1-4YAH0jBjLeoZtHhTuYRHbntOED8= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-module-imports@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-module-imports/download/@babel/helper-module-imports-7.7.4.tgz?cache=0&sync_timestamp=1574466791934&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-module-imports%2Fdownload%2F%40babel%2Fhelper-module-imports-7.7.4.tgz#e5a92529f8888bf319a6376abfbd1cebc491ad91" @@ -353,6 +455,20 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-module-transforms@^7.15.8": + version "7.15.8" + resolved "https://registry.npmmirror.com/@babel/helper-module-transforms/download/@babel/helper-module-transforms-7.15.8.tgz?cache=0&sync_timestamp=1633554212863&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fhelper-module-transforms%2Fdownload%2F%40babel%2Fhelper-module-transforms-7.15.8.tgz#d8c0e75a87a52e374a8f25f855174786a09498b2" + integrity sha1-2MDnWoelLjdKjyX4VRdHhqCUmLI= + dependencies: + "@babel/helper-module-imports" "^7.15.4" + "@babel/helper-replace-supers" "^7.15.4" + "@babel/helper-simple-access" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + "@babel/helper-validator-identifier" "^7.15.7" + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.6" + "@babel/helper-module-transforms@^7.7.4", "@babel/helper-module-transforms@^7.7.5": version "7.7.5" resolved "https://registry.npm.taobao.org/@babel/helper-module-transforms/download/@babel/helper-module-transforms-7.7.5.tgz#d044da7ffd91ec967db25cd6748f704b6b244835" @@ -365,6 +481,13 @@ "@babel/types" "^7.7.4" lodash "^4.17.13" +"@babel/helper-optimise-call-expression@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-optimise-call-expression/download/@babel/helper-optimise-call-expression-7.15.4.tgz#f310a5121a3b9cc52d9ab19122bd729822dee171" + integrity sha1-8xClEho7nMUtmrGRIr1ymCLe4XE= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-optimise-call-expression@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-optimise-call-expression/download/@babel/helper-optimise-call-expression-7.7.4.tgz#034af31370d2995242aa4df402c3b7794b2dcdf2" @@ -377,6 +500,11 @@ resolved "https://registry.npm.taobao.org/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha1-u7P77phmHFaQNCN8wDlnupm08lA= +"@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" + integrity sha1-WsgizpfuxGdBq3ClF5ceRDpwxak= + "@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4": version "7.5.5" resolved "https://registry.npm.taobao.org/@babel/helper-regex/download/@babel/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351" @@ -395,6 +523,16 @@ "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-replace-supers@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-replace-supers/download/@babel/helper-replace-supers-7.15.4.tgz#52a8ab26ba918c7f6dee28628b07071ac7b7347a" + integrity sha1-UqirJrqRjH9t7ihiiwcHGse3NHo= + dependencies: + "@babel/helper-member-expression-to-functions" "^7.15.4" + "@babel/helper-optimise-call-expression" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" + "@babel/helper-replace-supers@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-replace-supers/download/@babel/helper-replace-supers-7.7.4.tgz#3c881a6a6a7571275a72d82e6107126ec9e2cdd2" @@ -405,6 +543,13 @@ "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-simple-access@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-simple-access/download/@babel/helper-simple-access-7.15.4.tgz#ac368905abf1de8e9781434b635d8f8674bcc13b" + integrity sha1-rDaJBavx3o6XgUNLY12PhnS8wTs= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-simple-access@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-simple-access/download/@babel/helper-simple-access-7.7.4.tgz#a169a0adb1b5f418cfc19f22586b2ebf58a9a294" @@ -413,6 +558,13 @@ "@babel/template" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-split-export-declaration@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.15.4.tgz#aecab92dcdbef6a10aa3b62ab204b085f776e257" + integrity sha1-rsq5Lc2+9qEKo7YqsgSwhfd24lc= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-split-export-declaration@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.7.4.tgz#57292af60443c4a3622cf74040ddc28e68336fd8" @@ -420,6 +572,16 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9", "@babel/helper-validator-identifier@^7.15.7": + version "7.15.7" + resolved "https://registry.nlark.com/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.15.7.tgz?cache=0&sync_timestamp=1631920000984&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-validator-identifier%2Fdownload%2F%40babel%2Fhelper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" + integrity sha1-Ig35k7/pBKSmsCq08zhaXr9uI4k= + +"@babel/helper-validator-option@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-validator-option/download/@babel/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" + integrity sha1-bnKh//GNXfy4eOHmLxoCHEty1aM= + "@babel/helper-wrap-function@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-wrap-function/download/@babel/helper-wrap-function-7.7.4.tgz?cache=0&sync_timestamp=1574466796638&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-wrap-function%2Fdownload%2F%40babel%2Fhelper-wrap-function-7.7.4.tgz#37ab7fed5150e22d9d7266e830072c0cdd8baace" @@ -430,6 +592,15 @@ "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helpers@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helpers/download/@babel/helpers-7.15.4.tgz#5f40f02050a3027121a3cf48d497c05c555eaf43" + integrity sha1-X0DwIFCjAnEho89I1JfAXFVer0M= + dependencies: + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" + "@babel/helpers@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helpers/download/@babel/helpers-7.7.4.tgz?cache=0&sync_timestamp=1574466423809&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelpers%2Fdownload%2F%40babel%2Fhelpers-7.7.4.tgz#62c215b9e6c712dadc15a9a0dcab76c92a940302" @@ -448,7 +619,21 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.4.3", "@babel/parser@^7.7.4", "@babel/parser@^7.7.5": +"@babel/highlight@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/highlight/download/@babel/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" + integrity sha1-aGGlLwOWZAUAH2qlNKAaJNmejNk= + dependencies: + "@babel/helper-validator-identifier" "^7.14.5" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.15.4", "@babel/parser@^7.15.8", "@babel/parser@^7.7.7": + version "7.15.8" + resolved "https://registry.npmmirror.com/@babel/parser/download/@babel/parser-7.15.8.tgz#7bacdcbe71bdc3ff936d510c15dcea7cf0b99016" + integrity sha1-e6zcvnG9w/+TbVEMFdzqfPC5kBY= + +"@babel/parser@^7.4.3", "@babel/parser@^7.7.4": version "7.7.7" resolved "https://registry.npm.taobao.org/@babel/parser/download/@babel/parser-7.7.7.tgz?cache=0&sync_timestamp=1576716816884&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fparser%2Fdownload%2F%40babel%2Fparser-7.7.7.tgz#1b886595419cf92d811316d5b715a53ff38b4937" integrity sha1-G4hllUGc+S2BExbVtxWlP/OLSTc= @@ -478,13 +663,16 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.7.4" -"@babel/plugin-proposal-object-rest-spread@^7.7.4": - version "7.7.7" - resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-object-rest-spread/download/@babel/plugin-proposal-object-rest-spread-7.7.7.tgz#9f27075004ab99be08c5c1bd653a2985813cb370" - integrity sha1-nycHUASrmb4IxcG9ZTophYE8s3A= +"@babel/plugin-proposal-object-rest-spread@^7.7.7": + version "7.15.6" + resolved "https://registry.nlark.com/@babel/plugin-proposal-object-rest-spread/download/@babel/plugin-proposal-object-rest-spread-7.15.6.tgz#ef68050c8703d07b25af402cb96cf7f34a68ed11" + integrity sha1-72gFDIcD0Hslr0AsuWz380po7RE= dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.7.4" + "@babel/compat-data" "^7.15.0" + "@babel/helper-compilation-targets" "^7.15.4" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.15.4" "@babel/plugin-proposal-optional-catch-binding@^7.7.4": version "7.7.4" @@ -494,13 +682,13 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.7.4" -"@babel/plugin-proposal-unicode-property-regex@^7.7.4": - version "7.7.7" - resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-unicode-property-regex/download/@babel/plugin-proposal-unicode-property-regex-7.7.7.tgz#433fa9dac64f953c12578b29633f456b68831c4e" - integrity sha1-Qz+p2sZPlTwSV4spYz9Fa2iDHE4= +"@babel/plugin-proposal-unicode-property-regex@^7.7.7": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/plugin-proposal-unicode-property-regex/download/@babel/plugin-proposal-unicode-property-regex-7.14.5.tgz?cache=0&sync_timestamp=1623280542681&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fplugin-proposal-unicode-property-regex%2Fdownload%2F%40babel%2Fplugin-proposal-unicode-property-regex-7.14.5.tgz#0f95ee0e757a5d647f378daa0eca7e93faa8bbe8" + integrity sha1-D5XuDnV6XWR/N42qDsp+k/qou+g= dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.7.4" - "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-create-regexp-features-plugin" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-async-generators@^7.7.4": version "7.7.4" @@ -530,6 +718,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-object-rest-spread/download/@babel/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha1-YOIl7cvZimQDMqLnLdPmbxr1WHE= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + "@babel/plugin-syntax-optional-catch-binding@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-optional-catch-binding/download/@babel/plugin-syntax-optional-catch-binding-7.7.4.tgz#a3e38f59f4b6233867b4a92dcb0ee05b2c334aa6" @@ -603,13 +798,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@^7.7.4": - version "7.7.7" - resolved "https://registry.npm.taobao.org/@babel/plugin-transform-dotall-regex/download/@babel/plugin-transform-dotall-regex-7.7.7.tgz#3e9713f1b69f339e87fa796b097d73ded16b937b" - integrity sha1-PpcT8bafM56H+nlrCX1z3tFrk3s= +"@babel/plugin-transform-dotall-regex@^7.7.7": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/plugin-transform-dotall-regex/download/@babel/plugin-transform-dotall-regex-7.14.5.tgz?cache=0&sync_timestamp=1623280544588&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fplugin-transform-dotall-regex%2Fdownload%2F%40babel%2Fplugin-transform-dotall-regex-7.14.5.tgz#2f6bf76e46bdf8043b4e7e16cf24532629ba0c7a" + integrity sha1-L2v3bka9+AQ7Tn4WzyRTJim6DHo= dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.7.4" - "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-create-regexp-features-plugin" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-duplicate-keys@^7.7.4": version "7.7.4" @@ -713,14 +908,12 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.7.4" -"@babel/plugin-transform-parameters@^7.7.4": - version "7.7.7" - resolved "https://registry.npm.taobao.org/@babel/plugin-transform-parameters/download/@babel/plugin-transform-parameters-7.7.7.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-parameters%2Fdownload%2F%40babel%2Fplugin-transform-parameters-7.7.7.tgz#7a884b2460164dc5f194f668332736584c760007" - integrity sha1-eohLJGAWTcXxlPZoMyc2WEx2AAc= +"@babel/plugin-transform-parameters@^7.15.4", "@babel/plugin-transform-parameters@^7.7.7": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/plugin-transform-parameters/download/@babel/plugin-transform-parameters-7.15.4.tgz#5f2285cc3160bf48c8502432716b48504d29ed62" + integrity sha1-XyKFzDFgv0jIUCQycWtIUE0p7WI= dependencies: - "@babel/helper-call-delegate" "^7.7.4" - "@babel/helper-get-function-arity" "^7.7.4" - "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-property-literals@^7.7.4": version "7.7.4" @@ -788,19 +981,19 @@ "@babel/helper-create-regexp-features-plugin" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/preset-env@7.7.6": - version "7.7.6" - resolved "https://registry.npm.taobao.org/@babel/preset-env/download/@babel/preset-env-7.7.6.tgz#39ac600427bbb94eec6b27953f1dfa1d64d457b2" - integrity sha1-OaxgBCe7uU7sayeVPx36HWTUV7I= +"@babel/preset-env@7.7.7": + version "7.7.7" + resolved "https://registry.npmmirror.com/@babel/preset-env/download/@babel/preset-env-7.7.7.tgz?cache=0&sync_timestamp=1633554217592&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fpreset-env%2Fdownload%2F%40babel%2Fpreset-env-7.7.7.tgz#c294167b91e53e7e36d820e943ece8d0c7fe46ac" + integrity sha1-wpQWe5HlPn422CDpQ+zo0Mf+Rqw= dependencies: "@babel/helper-module-imports" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-async-generator-functions" "^7.7.4" "@babel/plugin-proposal-dynamic-import" "^7.7.4" "@babel/plugin-proposal-json-strings" "^7.7.4" - "@babel/plugin-proposal-object-rest-spread" "^7.7.4" + "@babel/plugin-proposal-object-rest-spread" "^7.7.7" "@babel/plugin-proposal-optional-catch-binding" "^7.7.4" - "@babel/plugin-proposal-unicode-property-regex" "^7.7.4" + "@babel/plugin-proposal-unicode-property-regex" "^7.7.7" "@babel/plugin-syntax-async-generators" "^7.7.4" "@babel/plugin-syntax-dynamic-import" "^7.7.4" "@babel/plugin-syntax-json-strings" "^7.7.4" @@ -814,7 +1007,7 @@ "@babel/plugin-transform-classes" "^7.7.4" "@babel/plugin-transform-computed-properties" "^7.7.4" "@babel/plugin-transform-destructuring" "^7.7.4" - "@babel/plugin-transform-dotall-regex" "^7.7.4" + "@babel/plugin-transform-dotall-regex" "^7.7.7" "@babel/plugin-transform-duplicate-keys" "^7.7.4" "@babel/plugin-transform-exponentiation-operator" "^7.7.4" "@babel/plugin-transform-for-of" "^7.7.4" @@ -828,7 +1021,7 @@ "@babel/plugin-transform-named-capturing-groups-regex" "^7.7.4" "@babel/plugin-transform-new-target" "^7.7.4" "@babel/plugin-transform-object-super" "^7.7.4" - "@babel/plugin-transform-parameters" "^7.7.4" + "@babel/plugin-transform-parameters" "^7.7.7" "@babel/plugin-transform-property-literals" "^7.7.4" "@babel/plugin-transform-regenerator" "^7.7.5" "@babel/plugin-transform-reserved-words" "^7.7.4" @@ -840,76 +1033,1660 @@ "@babel/plugin-transform-unicode-regex" "^7.7.4" "@babel/types" "^7.7.4" browserslist "^4.6.0" - core-js-compat "^3.4.7" + core-js-compat "^3.6.0" invariant "^2.2.2" js-levenshtein "^1.1.3" semver "^5.5.0" -"@babel/template@^7.4.0", "@babel/template@^7.7.4": - version "7.7.4" - resolved "https://registry.npm.taobao.org/@babel/template/download/@babel/template-7.7.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftemplate%2Fdownload%2F%40babel%2Ftemplate-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" - integrity sha1-Qop9nuz/4n3qwKmOI7+ONnXSp3s= +"@babel/template@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/template/download/@babel/template-7.15.4.tgz#51898d35dcf3faa670c4ee6afcfd517ee139f194" + integrity sha1-UYmNNdzz+qZwxO5q/P1RfuE58ZQ= + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/template@^7.4.0", "@babel/template@^7.7.4": + version "7.7.4" + resolved "https://registry.npm.taobao.org/@babel/template/download/@babel/template-7.7.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftemplate%2Fdownload%2F%40babel%2Ftemplate-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" + integrity sha1-Qop9nuz/4n3qwKmOI7+ONnXSp3s= + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.7.4" + "@babel/types" "^7.7.4" + +"@babel/traverse@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/traverse/download/@babel/traverse-7.15.4.tgz#ff8510367a144bfbff552d9e18e28f3e2889c22d" + integrity sha1-/4UQNnoUS/v/VS2eGOKPPiiJwi0= + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.4" + "@babel/helper-function-name" "^7.15.4" + "@babel/helper-hoist-variables" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4": + version "7.7.4" + resolved "https://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.7.4.tgz?cache=0&sync_timestamp=1574465744239&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftraverse%2Fdownload%2F%40babel%2Ftraverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558" + integrity sha1-nB58YPtnn+T8+qQlAIMzM8IFhVg= + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.7.4" + "@babel/helper-function-name" "^7.7.4" + "@babel/helper-split-export-declaration" "^7.7.4" + "@babel/parser" "^7.7.4" + "@babel/types" "^7.7.4" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.15.4", "@babel/types@^7.15.6": + version "7.15.6" + resolved "https://registry.nlark.com/@babel/types/download/@babel/types-7.15.6.tgz?cache=0&sync_timestamp=1631216408117&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.15.6.tgz#99abdc48218b2881c058dd0a7ab05b99c9be758f" + integrity sha1-mavcSCGLKIHAWN0KerBbmcm+dY8= + dependencies: + "@babel/helper-validator-identifier" "^7.14.9" + to-fast-properties "^2.0.0" + +"@babel/types@^7.4.0", "@babel/types@^7.7.4": + version "7.7.4" + resolved "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" + integrity sha1-UWVw1TnkTd8wjAdWnCWP+U/ekZM= + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@babylonjs/core@4.2.0", "@babylonjs/core@^4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/core/download/@babylonjs/core-4.2.0.tgz#d1cfd43d7e3d2e58cde79083f04eeb607f6c8f18" + integrity sha1-0c/UPX49LljN55CD8E7rYH9sjxg= + dependencies: + tslib ">=1.10.0" + +"@babylonjs/gui@4.2.0", "@babylonjs/gui@^4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/gui/download/@babylonjs/gui-4.2.0.tgz#c2a35ca6724759731fe0c4ddbfe2490301847f93" + integrity sha1-wqNcpnJHWXMf4MTdv+JJAwGEf5M= + dependencies: + "@babylonjs/core" "4.2.0" + tslib ">=1.10.0" + +"@babylonjs/inspector@^4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/inspector/download/@babylonjs/inspector-4.2.0.tgz#70d901729097f79b166decccfc8ed2195d2b1c35" + integrity sha1-cNkBcpCX95sWbezM/I7SGV0rHDU= + dependencies: + "@babylonjs/core" "4.2.0" + "@babylonjs/gui" "4.2.0" + "@babylonjs/loaders" "4.2.0" + "@babylonjs/materials" "4.2.0" + "@babylonjs/serializers" "4.2.0" + babylonjs-gltf2interface "4.2.0" + tslib ">=1.10.0" + +"@babylonjs/loaders@4.2.0", "@babylonjs/loaders@^4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/loaders/download/@babylonjs/loaders-4.2.0.tgz#a9902dc277c16dcd22cd1907f86310e211c247cb" + integrity sha1-qZAtwnfBbc0izRkH+GMQ4hHCR8s= + dependencies: + "@babylonjs/core" "4.2.0" + babylonjs-gltf2interface "4.2.0" + tslib ">=1.10.0" + +"@babylonjs/materials@4.2.0", "@babylonjs/materials@^4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/materials/download/@babylonjs/materials-4.2.0.tgz#8d889e49f6824e4fc62622b221f36ab0b8334d6e" + integrity sha1-jYieSfaCTk/GJiKyIfNqsLgzTW4= + dependencies: + "@babylonjs/core" "4.2.0" + tslib ">=1.10.0" + +"@babylonjs/serializers@4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/serializers/download/@babylonjs/serializers-4.2.0.tgz#ca8c9b773c1985e8b49790ec65f6fdcf4cea0a49" + integrity sha1-yoybdzwZhei0l5DsZfb9z0zqCkk= + dependencies: + "@babylonjs/core" "4.2.0" + babylonjs-gltf2interface "4.2.0" + tslib ">=1.10.0" + +"@firebase/analytics-types@0.4.0": + version "0.4.0" + resolved "https://registry.npmmirror.com/@firebase/analytics-types/download/@firebase/analytics-types-0.4.0.tgz#d6716f9fa36a6e340bc0ecfe68af325aa6f60508" + integrity sha1-1nFvn6NqbjQLwOz+aK8yWqb2BQg= + +"@firebase/analytics@0.6.0": + version "0.6.0" + resolved "https://registry.npmmirror.com/@firebase/analytics/download/@firebase/analytics-0.6.0.tgz#49f508d3f9f419f08c503f1171ef5fa1c3ba52eb" + integrity sha1-SfUI0/n0GfCMUD8Rce9focO6Uus= + dependencies: + "@firebase/analytics-types" "0.4.0" + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/app-types@0.6.1": + version "0.6.1" + resolved "https://registry.npmmirror.com/@firebase/app-types/download/@firebase/app-types-0.6.1.tgz#dcbd23030a71c0c74fc95d4a3f75ba81653850e9" + integrity sha1-3L0jAwpxwMdPyV1KP3W6gWU4UOk= + +"@firebase/app@0.6.11": + version "0.6.11" + resolved "https://registry.npmmirror.com/@firebase/app/download/@firebase/app-0.6.11.tgz#f73f9e4571ba62f4029d8f9c9880a97e5a94eb1d" + integrity sha1-9z+eRXG6YvQCnY+cmICpflqU6x0= + dependencies: + "@firebase/app-types" "0.6.1" + "@firebase/component" "0.1.19" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + dom-storage "2.1.0" + tslib "^1.11.1" + xmlhttprequest "1.8.0" + +"@firebase/auth-interop-types@0.1.5": + version "0.1.5" + resolved "https://registry.npmmirror.com/@firebase/auth-interop-types/download/@firebase/auth-interop-types-0.1.5.tgz#9fc9bd7c879f16b8d1bb08373a0f48c3a8b74557" + integrity sha1-n8m9fIefFrjRuwg3Og9Iw6i3RVc= + +"@firebase/auth-types@0.10.1": + version "0.10.1" + resolved "https://registry.npmmirror.com/@firebase/auth-types/download/@firebase/auth-types-0.10.1.tgz#7815e71c9c6f072034415524b29ca8f1d1770660" + integrity sha1-eBXnHJxvByA0QVUkspyo8dF3BmA= + +"@firebase/auth@0.15.0": + version "0.15.0" + resolved "https://registry.npmmirror.com/@firebase/auth/download/@firebase/auth-0.15.0.tgz#45d6def6d6d9444432c005710df442991828275f" + integrity sha1-Rdbe9tbZREQywAVxDfRCmRgoJ18= + dependencies: + "@firebase/auth-types" "0.10.1" + +"@firebase/component@0.1.19": + version "0.1.19" + resolved "https://registry.npmmirror.com/@firebase/component/download/@firebase/component-0.1.19.tgz#bd2ac601652c22576b574c08c40da245933dbac7" + integrity sha1-vSrGAWUsIldrV0wIxA2iRZM9usc= + dependencies: + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/database-types@0.5.2": + version "0.5.2" + resolved "https://registry.npmmirror.com/@firebase/database-types/download/@firebase/database-types-0.5.2.tgz#23bec8477f84f519727f165c687761e29958b63c" + integrity sha1-I77IR3+E9RlyfxZcaHdh4plYtjw= + dependencies: + "@firebase/app-types" "0.6.1" + +"@firebase/database@0.6.13": + version "0.6.13" + resolved "https://registry.npmmirror.com/@firebase/database/download/@firebase/database-0.6.13.tgz#b96fe0c53757dd6404ee085fdcb45c0f9f525c17" + integrity sha1-uW/gxTdX3WQE7ghf3LRcD59SXBc= + dependencies: + "@firebase/auth-interop-types" "0.1.5" + "@firebase/component" "0.1.19" + "@firebase/database-types" "0.5.2" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + faye-websocket "0.11.3" + tslib "^1.11.1" + +"@firebase/firestore-types@1.14.0": + version "1.14.0" + resolved "https://registry.npmmirror.com/@firebase/firestore-types/download/@firebase/firestore-types-1.14.0.tgz#4516249d3c181849fd3c856831944dbd5c8c55fc" + integrity sha1-RRYknTwYGEn9PIVoMZRNvVyMVfw= + +"@firebase/firestore@1.18.0": + version "1.18.0" + resolved "https://registry.npmmirror.com/@firebase/firestore/download/@firebase/firestore-1.18.0.tgz#3430e8c60d3e6be1d174b3a258838b1944c93a4d" + integrity sha1-NDDoxg0+a+HRdLOiWIOLGUTJOk0= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/firestore-types" "1.14.0" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + "@firebase/webchannel-wrapper" "0.4.0" + "@grpc/grpc-js" "^1.0.0" + "@grpc/proto-loader" "^0.5.0" + node-fetch "2.6.1" + tslib "^1.11.1" + +"@firebase/functions-types@0.3.17": + version "0.3.17" + resolved "https://registry.npmmirror.com/@firebase/functions-types/download/@firebase/functions-types-0.3.17.tgz#348bf5528b238eeeeeae1d52e8ca547b21d33a94" + integrity sha1-NIv1Uosjju7urh1S6MpUeyHTOpQ= + +"@firebase/functions@0.5.1": + version "0.5.1" + resolved "https://registry.npmmirror.com/@firebase/functions/download/@firebase/functions-0.5.1.tgz#fa0568bdcdf7dfa7e5f4f66c1e06e376dc7e25b6" + integrity sha1-+gVovc3336fl9PZsHgbjdtx+JbY= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/functions-types" "0.3.17" + "@firebase/messaging-types" "0.5.0" + node-fetch "2.6.1" + tslib "^1.11.1" + +"@firebase/installations-types@0.3.4": + version "0.3.4" + resolved "https://registry.npmmirror.com/@firebase/installations-types/download/@firebase/installations-types-0.3.4.tgz#589a941d713f4f64bf9f4feb7f463505bab1afa2" + integrity sha1-WJqUHXE/T2S/n0/rf0Y1Bbqxr6I= + +"@firebase/installations@0.4.17": + version "0.4.17" + resolved "https://registry.npmmirror.com/@firebase/installations/download/@firebase/installations-0.4.17.tgz#1367b721e2c6c4880646bbc4f257e8616986a004" + integrity sha1-E2e3IeLGxIgGRrvE8lfoYWmGoAQ= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations-types" "0.3.4" + "@firebase/util" "0.3.2" + idb "3.0.2" + tslib "^1.11.1" + +"@firebase/logger@0.2.6": + version "0.2.6" + resolved "https://registry.npmmirror.com/@firebase/logger/download/@firebase/logger-0.2.6.tgz#3aa2ca4fe10327cabf7808bd3994e88db26d7989" + integrity sha1-OqLKT+EDJ8q/eAi9OZTojbJteYk= + +"@firebase/messaging-types@0.5.0": + version "0.5.0" + resolved "https://registry.npmmirror.com/@firebase/messaging-types/download/@firebase/messaging-types-0.5.0.tgz#c5d0ef309ced1758fda93ef3ac70a786de2e73c4" + integrity sha1-xdDvMJztF1j9qT7zrHCnht4uc8Q= + +"@firebase/messaging@0.7.1": + version "0.7.1" + resolved "https://registry.npmmirror.com/@firebase/messaging/download/@firebase/messaging-0.7.1.tgz#debbe7eb17c5b789231da6c166c506e19ecf1ed4" + integrity sha1-3rvn6xfFt4kjHabBZsUG4Z7PHtQ= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/messaging-types" "0.5.0" + "@firebase/util" "0.3.2" + idb "3.0.2" + tslib "^1.11.1" + +"@firebase/performance-types@0.0.13": + version "0.0.13" + resolved "https://registry.npmmirror.com/@firebase/performance-types/download/@firebase/performance-types-0.0.13.tgz#58ce5453f57e34b18186f74ef11550dfc558ede6" + integrity sha1-WM5UU/V+NLGBhvdO8RVQ38VY7eY= + +"@firebase/performance@0.4.2": + version "0.4.2" + resolved "https://registry.npmmirror.com/@firebase/performance/download/@firebase/performance-0.4.2.tgz#d5f134674b429d095ce0edfb50fcb4ab279c3cbe" + integrity sha1-1fE0Z0tCnQlc4O37UPy0qyecPL4= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/logger" "0.2.6" + "@firebase/performance-types" "0.0.13" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/polyfill@0.3.36": + version "0.3.36" + resolved "https://registry.nlark.com/@firebase/polyfill/download/@firebase/polyfill-0.3.36.tgz#c057cce6748170f36966b555749472b25efdb145" + integrity sha1-wFfM5nSBcPNpZrVVdJRysl79sUU= + dependencies: + core-js "3.6.5" + promise-polyfill "8.1.3" + whatwg-fetch "2.0.4" + +"@firebase/remote-config-types@0.1.9": + version "0.1.9" + resolved "https://registry.npmmirror.com/@firebase/remote-config-types/download/@firebase/remote-config-types-0.1.9.tgz#fe6bbe4d08f3b6e92fce30e4b7a9f4d6a96d6965" + integrity sha1-/mu+TQjztukvzjDkt6n01qltaWU= + +"@firebase/remote-config@0.1.28": + version "0.1.28" + resolved "https://registry.npmmirror.com/@firebase/remote-config/download/@firebase/remote-config-0.1.28.tgz#1c39916446f1ed82b4c07e556455bd232fcfd8e1" + integrity sha1-HDmRZEbx7YK0wH5VZFW9Iy/P2OE= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/logger" "0.2.6" + "@firebase/remote-config-types" "0.1.9" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/storage-types@0.3.13": + version "0.3.13" + resolved "https://registry.npmmirror.com/@firebase/storage-types/download/@firebase/storage-types-0.3.13.tgz#cd43e939a2ab5742e109eb639a313673a48b5458" + integrity sha1-zUPpOaKrV0LhCetjmjE2c6SLVFg= + +"@firebase/storage@0.3.43": + version "0.3.43" + resolved "https://registry.npmmirror.com/@firebase/storage/download/@firebase/storage-0.3.43.tgz#107fb5db2eff2561b5c4e35ee4cbff48f28c7e77" + integrity sha1-EH+12y7/JWG1xONe5Mv/SPKMfnc= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/storage-types" "0.3.13" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/util@0.3.2": + version "0.3.2" + resolved "https://registry.npmmirror.com/@firebase/util/download/@firebase/util-0.3.2.tgz#87de27f9cffc2324651cabf6ec133d0a9eb21b52" + integrity sha1-h94n+c/8IyRlHKv27BM9Cp6yG1I= + dependencies: + tslib "^1.11.1" + +"@firebase/webchannel-wrapper@0.4.0": + version "0.4.0" + resolved "https://registry.npmmirror.com/@firebase/webchannel-wrapper/download/@firebase/webchannel-wrapper-0.4.0.tgz#becce788818d3f47f0ac1a74c3c061ac1dcf4f6d" + integrity sha1-vszniIGNP0fwrBp0w8BhrB3PT20= + +"@grpc/grpc-js@^1.0.0": + version "1.4.1" + resolved "https://registry.npmmirror.com/@grpc/grpc-js/download/@grpc/grpc-js-1.4.1.tgz#799063a4ff7395987d4fceb2aab133629b003840" + integrity sha1-eZBjpP9zlZh9T86yqrEzYpsAOEA= + dependencies: + "@grpc/proto-loader" "^0.6.4" + "@types/node" ">=12.12.47" + +"@grpc/proto-loader@^0.5.0": + version "0.5.6" + resolved "https://registry.npmmirror.com/@grpc/proto-loader/download/@grpc/proto-loader-0.5.6.tgz#1dea4b8a6412b05e2d58514d507137b63a52a98d" + integrity sha1-HepLimQSsF4tWFFNUHE3tjpSqY0= + dependencies: + lodash.camelcase "^4.3.0" + protobufjs "^6.8.6" + +"@grpc/proto-loader@^0.6.4": + version "0.6.6" + resolved "https://registry.npmmirror.com/@grpc/proto-loader/download/@grpc/proto-loader-0.6.6.tgz#d8e51ea808ec5fa54d9defbecbf859336fb2da71" + integrity sha1-2OUeqAjsX6VNne++y/hZM2+y2nE= + dependencies: + "@types/long" "^4.0.1" + lodash.camelcase "^4.3.0" + long "^4.0.0" + protobufjs "^6.10.0" + yargs "^16.1.1" + +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.npm.taobao.org/@istanbuljs/schema/download/@istanbuljs/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha1-5F44TkuOwWvOL9kDr3hFD2v37Jg= + +"@mattlewis92/dom-autoscroller@^2.4.2": + version "2.4.2" + resolved "https://registry.nlark.com/@mattlewis92/dom-autoscroller/download/@mattlewis92/dom-autoscroller-2.4.2.tgz#ccb753fbcf6b3672b0273e0c3bda7924fe238013" + integrity sha1-zLdT+89rNnKwJz4MO9p5JP4jgBM= + +"@ngtools/webpack@9.0.7": + version "9.0.7" + resolved "https://registry.npmmirror.com/@ngtools/webpack/download/@ngtools/webpack-9.0.7.tgz?cache=0&sync_timestamp=1634778107073&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40ngtools%2Fwebpack%2Fdownload%2F%40ngtools%2Fwebpack-9.0.7.tgz#2d9397544afcf503530eafc764c64d40a99fa070" + integrity sha1-LZOXVEr89QNTDq/HZMZNQKmfoHA= + dependencies: + "@angular-devkit/core" "9.0.7" + enhanced-resolve "4.1.1" + rxjs "6.5.3" + webpack-sources "1.4.3" + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.npm.taobao.org/@protobufjs/aspromise/download/@protobufjs/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha1-m4sMxmPWaafY9vXQiToU00jzD78= + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.nlark.com/@protobufjs/base64/download/@protobufjs/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha1-TIVzDlm5ofHzSQR9vyQpYDS7JzU= + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.npm.taobao.org/@protobufjs/codegen/download/@protobufjs/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha1-fvN/DQEPsCitGtWXIuUG2SYoFcs= + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.nlark.com/@protobufjs/eventemitter/download/@protobufjs/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha1-NVy8mLr61ZePntCV85diHx0Ga3A= + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.npm.taobao.org/@protobufjs/fetch/download/@protobufjs/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU= + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.nlark.com/@protobufjs/float/download/@protobufjs/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E= + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.nlark.com/@protobufjs/inquire/download/@protobufjs/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik= + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.nlark.com/@protobufjs/path/download/@protobufjs/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha1-bMKyDFya1q0NzP0hynZz2Nf79o0= + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.nlark.com/@protobufjs/pool/download/@protobufjs/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q= + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.npm.taobao.org/@protobufjs/utf8/download/@protobufjs/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= + +"@scarf/scarf@^1.1.1": + version "1.1.1" + resolved "https://registry.npmmirror.com/@scarf/scarf/download/@scarf/scarf-1.1.1.tgz#d8b9f20037b3a37dbf8dcdc4b3b72f9285bfce35" + integrity sha1-2LnyADezo32/jc3Es7cvkoW/zjU= + +"@schematics/angular@9.0.7": + version "9.0.7" + resolved "https://registry.npmmirror.com/@schematics/angular/download/@schematics/angular-9.0.7.tgz?cache=0&sync_timestamp=1634778107865&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40schematics%2Fangular%2Fdownload%2F%40schematics%2Fangular-9.0.7.tgz#e09ab998c2b3aa7269d91378b08a0fbca5037ea6" + integrity sha1-4Jq5mMKzqnJp2RN4sIoPvKUDfqY= + dependencies: + "@angular-devkit/core" "9.0.7" + "@angular-devkit/schematics" "9.0.7" + +"@schematics/update@0.900.7": + version "0.900.7" + resolved "https://registry.nlark.com/@schematics/update/download/@schematics/update-0.900.7.tgz#0940630981dd4af16d19562a265ad20426f1c7cd" + integrity sha1-CUBjCYHdSvFtGVYqJlrSBCbxx80= + dependencies: + "@angular-devkit/core" "9.0.7" + "@angular-devkit/schematics" "9.0.7" + "@yarnpkg/lockfile" "1.1.0" + ini "1.3.5" + npm-package-arg "^7.0.0" + pacote "9.5.8" + rxjs "6.5.3" + semver "6.3.0" + semver-intersect "1.4.0" + +"@turf/along@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/along/download/@turf/along-5.1.5.tgz#61d6e6a6584acddab56ac5584e07bf8cbe5f8beb" + integrity sha1-YdbmplhKzdq1asVYTge/jL5fi+s= + dependencies: + "@turf/bearing" "^5.1.5" + "@turf/destination" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/area@5.1.x", "@turf/area@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/area/download/@turf/area-5.1.5.tgz#efd899bfd260cdbd1541b2a3c155f8a5d2eefa1d" + integrity sha1-79iZv9Jgzb0VQbKjwVX4pdLu+h0= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/bbox-clip@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/bbox-clip/download/@turf/bbox-clip-5.1.5.tgz#3364b5328dff9f3cf41d9e02edaff374d150cc84" + integrity sha1-M2S1Mo3/nzz0HZ4C7a/zdNFQzIQ= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + lineclip "^1.1.5" + +"@turf/bbox-polygon@5.1.x", "@turf/bbox-polygon@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/bbox-polygon/download/@turf/bbox-polygon-5.1.5.tgz#6aeba4ed51d85d296e0f7c38b88c339f01eee024" + integrity sha1-auuk7VHYXSluD3w4uIwznwHu4CQ= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/bbox@5.1.x", "@turf/bbox@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/bbox/download/@turf/bbox-5.1.5.tgz#3051df514ad4c50f4a4f9b8a2d15fd8b6840eda3" + integrity sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/bearing@5.1.x", "@turf/bearing@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/bearing/download/@turf/bearing-5.1.5.tgz#7a0b790136c4ef4797f0246305d45cbe2d27b3f7" + integrity sha1-egt5ATbE70eX8CRjBdRcvi0ns/c= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/bearing@6.x": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/bearing/download/@turf/bearing-6.5.0.tgz#462a053c6c644434bdb636b39f8f43fb0cd857b0" + integrity sha1-RioFPGxkRDS9tjazn49D+wzYV7A= + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/bezier-spline@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/bezier-spline/download/@turf/bezier-spline-5.1.5.tgz#59a27bba5d7b97ef15ab3fd5a40fbd2387049bca" + integrity sha1-WaJ7ul17l+8Vqz/VpA+9I4cEm8o= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/boolean-clockwise@5.1.x", "@turf/boolean-clockwise@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-clockwise/download/@turf/boolean-clockwise-5.1.5.tgz#3302b7dac62c5e291a0789e29af7283387fa9deb" + integrity sha1-MwK32sYsXikaB4nimvcoM4f6nes= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/boolean-contains@5.1.x", "@turf/boolean-contains@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-contains/download/@turf/boolean-contains-5.1.5.tgz#596d63aee636f7ad53ee99f9ff24c96994a0ef14" + integrity sha1-WW1jruY2961T7pn5/yTJaZSg7xQ= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/boolean-point-on-line" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/boolean-crosses@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-crosses/download/@turf/boolean-crosses-5.1.5.tgz#01bfaea2596f164de4a4d325094dc7c255c715d6" + integrity sha1-Ab+uollvFk3kpNMlCU3HwlXHFdY= + dependencies: + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/polygon-to-line" "^5.1.5" + +"@turf/boolean-disjoint@5.1.x": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/boolean-disjoint/download/@turf/boolean-disjoint-5.1.6.tgz#3fbd87084b269133f5fd15725deb3c6675fb8a9d" + integrity sha1-P72HCEsmkTP1/RVyXes8ZnX7ip0= + dependencies: + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/polygon-to-line" "^5.1.5" + +"@turf/boolean-equal@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-equal/download/@turf/boolean-equal-5.1.5.tgz#29f8f6d60bb84507dfd765b32254db8e72c938a4" + integrity sha1-Kfj21gu4RQff12WzIlTbjnLJOKQ= + dependencies: + "@turf/clean-coords" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + geojson-equality "0.1.6" + +"@turf/boolean-overlap@5.1.x", "@turf/boolean-overlap@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-overlap/download/@turf/boolean-overlap-5.1.5.tgz#0d4e64c52c770a28e93d9efcdf8a8b8373acce75" + integrity sha1-DU5kxSx3CijpPZ7834qLg3OsznU= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/line-overlap" "^5.1.5" + "@turf/meta" "^5.1.5" + geojson-equality "0.1.6" + +"@turf/boolean-parallel@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-parallel/download/@turf/boolean-parallel-5.1.5.tgz#739358475ea5b65c7e1827a3c3e0e8a687d3a85d" + integrity sha1-c5NYR16ltlx+GCejw+DopofTqF0= + dependencies: + "@turf/clean-coords" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/line-segment" "^5.1.5" + "@turf/rhumb-bearing" "^5.1.5" + +"@turf/boolean-point-in-polygon@5.1.x", "@turf/boolean-point-in-polygon@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-point-in-polygon/download/@turf/boolean-point-in-polygon-5.1.5.tgz#f01cc194d1e030a548bfda981cba43cfd62941b7" + integrity sha1-8BzBlNHgMKVIv9qYHLpDz9YpQbc= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/boolean-point-on-line@5.1.x", "@turf/boolean-point-on-line@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-point-on-line/download/@turf/boolean-point-on-line-5.1.5.tgz#f633c5ff802ad24bb8f158dadbaf6ff4a023dd7b" + integrity sha1-9jPF/4Aq0ku48Vja269v9KAj3Xs= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/boolean-within@5.1.x", "@turf/boolean-within@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-within/download/@turf/boolean-within-5.1.5.tgz#47105d56d0752a9d0fbfcd43c36a5f9149dc8697" + integrity sha1-RxBdVtB1Kp0Pv81Dw2pfkUnchpc= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/boolean-point-on-line" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/buffer@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/buffer/download/@turf/buffer-5.1.5.tgz#841c9627cfb974b122ac4e1a956f0466bc0231c4" + integrity sha1-hByWJ8+5dLEirE4alW8EZrwCMcQ= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/center" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/projection" "^5.1.5" + d3-geo "1.7.1" + turf-jsts "*" + +"@turf/center-mean@5.1.x", "@turf/center-mean@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/center-mean/download/@turf/center-mean-5.1.5.tgz#8c8e9875391e5f09f0e6e78f5d661b88b2108a0a" + integrity sha1-jI6YdTkeXwnw5uePXWYbiLIQigo= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/center-median@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/center-median/download/@turf/center-median-5.1.5.tgz#bb461bfe7a2a48601d8a4727685718723a14a872" + integrity sha1-u0Yb/noqSGAdikcnaFcYcjoUqHI= + dependencies: + "@turf/center-mean" "^5.1.5" + "@turf/centroid" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/center-of-mass@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/center-of-mass/download/@turf/center-of-mass-5.1.5.tgz#4d3bd79d88498dbab8324d4f69f0322f6520b9ca" + integrity sha1-TTvXnYhJjbq4Mk1PafAyL2Uguco= + dependencies: + "@turf/centroid" "^5.1.5" + "@turf/convex" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/center@5.1.x", "@turf/center@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/center/download/@turf/center-5.1.5.tgz#44ab2cd954f63c0d37757f7158a99c3ef5114b80" + integrity sha1-RKss2VT2PA03dX9xWKmcPvURS4A= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/centroid@5.1.x", "@turf/centroid@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/centroid/download/@turf/centroid-5.1.5.tgz#778ada74216335021ad8fd0e7a65a8349d53c769" + integrity sha1-d4radCFjNQIa2P0OemWoNJ1Tx2k= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/circle@5.1.x", "@turf/circle@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/circle/download/@turf/circle-5.1.5.tgz#9b1577835508ab52fb1c10b2a5065cba2b87b6a5" + integrity sha1-mxV3g1UIq1L7HBCypQZcuiuHtqU= + dependencies: + "@turf/destination" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/clean-coords@5.1.x", "@turf/clean-coords@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/clean-coords/download/@turf/clean-coords-5.1.5.tgz#12800a98a78c9a452a72ec428493c43acf2ada1f" + integrity sha1-EoAKmKeMmkUqcuxChJPEOs8q2h8= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/clone@5.1.x", "@turf/clone@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/clone/download/@turf/clone-5.1.5.tgz#253e8d35477181976e33adfab50a0f02a7f0e367" + integrity sha1-JT6NNUdxgZduM636tQoPAqfw42c= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/clone@^6.5.0": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/clone/download/@turf/clone-6.5.0.tgz#895860573881ae10a02dfff95f274388b1cda51a" + integrity sha1-iVhgVziBrhCgLf/5XydDiLHNpRo= + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/clusters-dbscan@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/clusters-dbscan/download/@turf/clusters-dbscan-5.1.5.tgz#5781fb4e656c747a0b8e9937df73181c0309e26f" + integrity sha1-V4H7TmVsdHoLjpk333MYHAMJ4m8= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + density-clustering "1.3.0" + +"@turf/clusters-kmeans@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/clusters-kmeans/download/@turf/clusters-kmeans-5.1.5.tgz#fd6dfea8b133ba8bdc2370ac3cacee1587a302f1" + integrity sha1-/W3+qLEzuovcI3CsPKzuFYejAvE= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + skmeans "0.9.7" + +"@turf/clusters@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/clusters/download/@turf/clusters-5.1.5.tgz#673a5e5f1b19c9cababc57c908eeadd682224dd4" + integrity sha1-ZzpeXxsZycq6vFfJCO6t1oIiTdQ= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/collect@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/collect/download/@turf/collect-5.1.5.tgz#fe98c9a8c218ecf24ffc33d7029517b7c19b2a3e" + integrity sha1-/pjJqMIY7PJP/DPXApUXt8GbKj4= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + rbush "^2.0.1" + +"@turf/combine@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/combine/download/@turf/combine-5.1.5.tgz#bb14bdefa55504357195fc1a124cd7d53a8c8905" + integrity sha1-uxS976VVBDVxlfwaEkzX1TqMiQU= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/concave@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/concave/download/@turf/concave-5.1.5.tgz#23bbaac387d034b96574a1bd70d059237a9d2110" + integrity sha1-I7uqw4fQNLlldKG9cNBZI3qdIRA= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/tin" "^5.1.5" + topojson-client "3.x" + topojson-server "3.x" + +"@turf/convex@5.1.x", "@turf/convex@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/convex/download/@turf/convex-5.1.5.tgz#0df9377dd002216ce9821b07f705e037dae3e01d" + integrity sha1-Dfk3fdACIWzpghsH9wXgN9rj4B0= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + concaveman "*" + +"@turf/destination@5.1.x", "@turf/destination@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/destination/download/@turf/destination-5.1.5.tgz#ed35381bdce83bbddcbd07a2e2bce2bddffbcc26" + integrity sha1-7TU4G9zoO73cvQei4rzivd/7zCY= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/difference@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/difference/download/@turf/difference-5.1.5.tgz#a24d690a7bca803f1090a9ee3b9d906fc4371f42" + integrity sha1-ok1pCnvKgD8QkKnuO52Qb8Q3H0I= + dependencies: + "@turf/area" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + turf-jsts "*" + +"@turf/dissolve@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/dissolve/download/@turf/dissolve-5.1.5.tgz#2cf133a9021d2163831c3d7a958d6507f9d81938" + integrity sha1-LPEzqQIdIWODHD16lY1lB/nYGTg= + dependencies: + "@turf/boolean-overlap" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/union" "^5.1.5" + geojson-rbush "2.1.0" + get-closest "*" + +"@turf/distance@5.1.x", "@turf/distance@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/distance/download/@turf/distance-5.1.5.tgz#39cf18204bbf87587d707e609a60118909156409" + integrity sha1-Oc8YIEu/h1h9cH5gmmARiQkVZAk= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/distance@6.x": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/distance/download/@turf/distance-6.5.0.tgz#21f04d5f86e864d54e2abde16f35c15b4f36149a" + integrity sha1-IfBNX4boZNVOKr3hbzXBW082FJo= + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/ellipse@5.1.x", "@turf/ellipse@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/ellipse/download/@turf/ellipse-5.1.5.tgz#d57cab853985920cde60228a78d80458025c54be" + integrity sha1-1XyrhTmFkgzeYCKKeNgEWAJcVL4= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/rhumb-destination" "^5.1.5" + "@turf/transform-rotate" "^5.1.5" + +"@turf/envelope@5.1.x", "@turf/envelope@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/envelope/download/@turf/envelope-5.1.5.tgz#5013309c53fdd43dfaf4b588a65c3fed7dbc108a" + integrity sha1-UBMwnFP91D369LWIplw/7X28EIo= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/bbox-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/explode@5.1.x", "@turf/explode@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/explode/download/@turf/explode-5.1.5.tgz#b12b2f774004a1b48f62ba95b20a1c655a3de118" + integrity sha1-sSsvd0AEobSPYrqVsgocZVo94Rg= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/flatten@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/flatten/download/@turf/flatten-5.1.5.tgz#da2927067133ed6169b0b9d607b9215688aa1358" + integrity sha1-2iknBnEz7WFpsLnWB7khVoiqE1g= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/flip@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/flip/download/@turf/flip-5.1.5.tgz#436f643a722f0ca53b9fce638e4693db3608a68a" + integrity sha1-Q29kOnIvDKU7n85jjkaT2zYIpoo= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/great-circle@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/great-circle/download/@turf/great-circle-5.1.5.tgz#debfb671ce475509cb637301c15fcfccfa359a93" + integrity sha1-3r+2cc5HVQnLY3MBwV/PzPo1mpM= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/helpers@*", "@turf/helpers@6.x", "@turf/helpers@^6.5.0": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/helpers/download/@turf/helpers-6.5.0.tgz#f79af094bd6b8ce7ed2bd3e089a8493ee6cae82e" + integrity sha1-95rwlL1rjOftK9PgiahJPubK6C4= + +"@turf/helpers@5.1.x", "@turf/helpers@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/helpers/download/@turf/helpers-5.1.5.tgz#153405227ab933d004a5bb9641a9ed999fcbe0cf" + integrity sha1-FTQFInq5M9AEpbuWQantmZ/L4M8= + +"@turf/hex-grid@5.1.x", "@turf/hex-grid@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/hex-grid/download/@turf/hex-grid-5.1.5.tgz#9b7ba5fecf5051f1e85892f713fce5c550502a6a" + integrity sha1-m3ul/s9QUfHoWJL3E/zlxVBQKmo= + dependencies: + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/intersect" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/interpolate@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/interpolate/download/@turf/interpolate-5.1.5.tgz#0f12f0ab756d6dd10afb290ca6e877bdef013eaa" + integrity sha1-DxLwq3VtbdEK+ykMpuh3ve8BPqo= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/centroid" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/hex-grid" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/point-grid" "^5.1.5" + "@turf/square-grid" "^5.1.5" + "@turf/triangle-grid" "^5.1.5" + +"@turf/intersect@5.1.x", "@turf/intersect@^5.1.5": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/intersect/download/@turf/intersect-5.1.6.tgz#13ffcceb7a529c2a7e5d6681ab3ba671f868e95f" + integrity sha1-E//M63pSnCp+XWaBqzumcfho6V8= + dependencies: + "@turf/clean-coords" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/truncate" "^5.1.5" + turf-jsts "*" + +"@turf/invariant@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/invariant/download/@turf/invariant-5.1.5.tgz#f59f4fefa09224b15dce1651f903c868d57a24e1" + integrity sha1-9Z9P76CSJLFdzhZR+QPIaNV6JOE= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/invariant@6.x", "@turf/invariant@^6.5.0": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/invariant/download/@turf/invariant-6.5.0.tgz#970afc988023e39c7ccab2341bd06979ddc7463f" + integrity sha1-lwr8mIAj45x8yrI0G9Bped3HRj8= + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/invariant@^5.1.5": + version "5.2.0" + resolved "https://registry.nlark.com/@turf/invariant/download/@turf/invariant-5.2.0.tgz#f0150ff7290b38577b73d088b7932c1ee0aa90a7" + integrity sha1-8BUP9ykLOFd7c9CIt5MsHuCqkKc= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/isobands@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/isobands/download/@turf/isobands-5.1.5.tgz#6b44cef584d551a31304187af23b4a1582e3f08d" + integrity sha1-a0TO9YTVUaMTBBh68jtKFYLj8I0= + dependencies: + "@turf/area" "^5.1.5" + "@turf/bbox" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/explode" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/isolines@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/isolines/download/@turf/isolines-5.1.5.tgz#8ab4e7f42bb3dfc54614e5bf155967f7e55d2de1" + integrity sha1-irTn9Cuz38VGFOW/FVln9+VdLeE= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/kinks@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/kinks/download/@turf/kinks-5.1.5.tgz#8abb6961d9bb0107213baddf2c2c2640d0256980" + integrity sha1-irtpYdm7AQchO63fLCwmQNAlaYA= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/length@5.1.x", "@turf/length@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/length/download/@turf/length-5.1.5.tgz#f3a5f864c2b996a8bb471794535a1faf12eebefb" + integrity sha1-86X4ZMK5lqi7RxeUU1ofrxLuvvs= + dependencies: + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/line-arc@5.1.x", "@turf/line-arc@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-arc/download/@turf/line-arc-5.1.5.tgz#0078a7447835a12ae414a211f9a64d1186150e15" + integrity sha1-AHinRHg1oSrkFKIR+aZNEYYVDhU= + dependencies: + "@turf/circle" "^5.1.5" + "@turf/destination" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/line-chunk@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-chunk/download/@turf/line-chunk-5.1.5.tgz#910a85c05c06d9d0f9c38977a05e0818d5085c42" + integrity sha1-kQqFwFwG2dD5w4l3oF4IGNUIXEI= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/length" "^5.1.5" + "@turf/line-slice-along" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/line-intersect@5.1.x", "@turf/line-intersect@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-intersect/download/@turf/line-intersect-5.1.5.tgz#0e29071ae403295e491723bc49f5cfac8d11ddf3" + integrity sha1-DikHGuQDKV5JFyO8SfXPrI0R3fM= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-segment" "^5.1.5" + "@turf/meta" "^5.1.5" + geojson-rbush "2.1.0" + +"@turf/line-offset@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-offset/download/@turf/line-offset-5.1.5.tgz#2ab5b2f089f8c913e231d994378e79dca90b5a1e" + integrity sha1-KrWy8In4yRPiMdmUN4553KkLWh4= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/line-overlap@5.1.x", "@turf/line-overlap@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-overlap/download/@turf/line-overlap-5.1.5.tgz#943c6f87a0386dc43dfac11d2b3ff9c112cd3f60" + integrity sha1-lDxvh6A4bcQ9+sEdKz/5wRLNP2A= + dependencies: + "@turf/boolean-point-on-line" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-segment" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/nearest-point-on-line" "^5.1.5" + geojson-rbush "2.1.0" + +"@turf/line-segment@5.1.x", "@turf/line-segment@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-segment/download/@turf/line-segment-5.1.5.tgz#3207aaee546ab24c3d8dc3cc63f91c770b8013e5" + integrity sha1-Mgeq7lRqskw9jcPMY/kcdwuAE+U= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/line-slice-along@5.1.x", "@turf/line-slice-along@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-slice-along/download/@turf/line-slice-along-5.1.5.tgz#eddad0a21ef479f2968a11bd2dd7289a2132e9a5" + integrity sha1-7drQoh70efKWihG9LdcomiEy6aU= + dependencies: + "@turf/bearing" "^5.1.5" + "@turf/destination" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/line-slice@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-slice/download/@turf/line-slice-5.1.5.tgz#1ecfce1462a378579754cedf4464cde26829f2b5" + integrity sha1-Hs/OFGKjeFeXVM7fRGTN4mgp8rU= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/nearest-point-on-line" "^5.1.5" + +"@turf/line-split@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-split/download/@turf/line-split-5.1.5.tgz#5b2df4c37619b72ef725b5163cf9926d5540acb7" + integrity sha1-Wy30w3YZty73JbUWPPmSbVVArLc= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/line-segment" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/nearest-point-on-line" "^5.1.5" + "@turf/square" "^5.1.5" + "@turf/truncate" "^5.1.5" + geojson-rbush "2.1.0" + +"@turf/line-to-polygon@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-to-polygon/download/@turf/line-to-polygon-5.1.5.tgz#213cf41a68f8224778ba39d3187dec3e8b81865a" + integrity sha1-ITz0Gmj4Ikd4ujnTGH3sPouBhlo= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/mask@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/mask/download/@turf/mask-5.1.5.tgz#9ab0fef1a272c98fe3ef492f9ffb618206b242d5" + integrity sha1-mrD+8aJyyY/j70kvn/thggayQtU= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/union" "^5.1.5" + rbush "^2.0.1" + +"@turf/meta@*", "@turf/meta@6.x", "@turf/meta@^6.5.0": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/meta/download/@turf/meta-6.5.0.tgz?cache=0&sync_timestamp=1625922345171&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40turf%2Fmeta%2Fdownload%2F%40turf%2Fmeta-6.5.0.tgz#b725c3653c9f432133eaa04d3421f7e51e0418ca" + integrity sha1-tyXDZTyfQyEz6qBNNCH35R4EGMo= + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/meta@5.1.x": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/meta/download/@turf/meta-5.1.6.tgz?cache=0&sync_timestamp=1625922345171&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40turf%2Fmeta%2Fdownload%2F%40turf%2Fmeta-5.1.6.tgz#c20a863eded0869fb28548dee889341bccb46a46" + integrity sha1-wgqGPt7Qhp+yhUje6Ik0G8y0akY= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/meta@^5.1.5": + version "5.2.0" + resolved "https://registry.nlark.com/@turf/meta/download/@turf/meta-5.2.0.tgz?cache=0&sync_timestamp=1625922345171&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40turf%2Fmeta%2Fdownload%2F%40turf%2Fmeta-5.2.0.tgz#3b1ad485ee0c3b0b1775132a32c384d53e4ba53d" + integrity sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/midpoint@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/midpoint/download/@turf/midpoint-5.1.5.tgz#e261f6b2b0ea8124cceff552a262dd465c9d05f0" + integrity sha1-4mH2srDqgSTM7/VSomLdRlydBfA= + dependencies: + "@turf/bearing" "^5.1.5" + "@turf/destination" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/nearest-point-on-line@5.1.x", "@turf/nearest-point-on-line@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/nearest-point-on-line/download/@turf/nearest-point-on-line-5.1.5.tgz#5606ae297f15947524bea51a2a9ef51ec1bf9c36" + integrity sha1-VgauKX8VlHUkvqUaKp71HsG/nDY= + dependencies: + "@turf/bearing" "^5.1.5" + "@turf/destination" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/nearest-point-to-line@5.1.x": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/nearest-point-to-line/download/@turf/nearest-point-to-line-5.1.6.tgz#d30b7606e56a3dce97f4db6d45d352470e0b3f88" + integrity sha1-0wt2BuVqPc6X9NttRdNSRw4LP4g= + dependencies: + "@turf/helpers" "6.x" + "@turf/invariant" "6.x" + "@turf/meta" "6.x" + "@turf/point-to-line-distance" "^5.1.5" + object-assign "*" + +"@turf/nearest-point@5.1.x", "@turf/nearest-point@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/nearest-point/download/@turf/nearest-point-5.1.5.tgz#12050de41c398443224c7978de0f6213900d34fb" + integrity sha1-EgUN5Bw5hEMiTHl43g9iE5ANNPs= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/planepoint@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/planepoint/download/@turf/planepoint-5.1.5.tgz#18bbdf006f759def5e42c6a006c9f9de81b2b7ff" + integrity sha1-GLvfAG91ne9eQsagBsn53oGyt/8= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/point-grid@5.1.x", "@turf/point-grid@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/point-grid/download/@turf/point-grid-5.1.5.tgz#305141248f50bafe36ce7e66ba4b97e7ab236887" + integrity sha1-MFFBJI9Quv42zn5mukuX56sjaIc= + dependencies: + "@turf/boolean-within" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/point-on-feature@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/point-on-feature/download/@turf/point-on-feature-5.1.5.tgz#30c7f032430277c6418d96d289e45b6bfb213fe7" + integrity sha1-MMfwMkMCd8ZBjZbSieRba/shP+c= + dependencies: + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/center" "^5.1.5" + "@turf/explode" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/nearest-point" "^5.1.5" + +"@turf/point-to-line-distance@5.1.x", "@turf/point-to-line-distance@^5.1.5": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/point-to-line-distance/download/@turf/point-to-line-distance-5.1.6.tgz#954f6cb68546420a030d8480392503264970d2d8" + integrity sha1-lU9stoVGQgoDDYSAOSUDJklw0tg= + dependencies: + "@turf/bearing" "6.x" + "@turf/distance" "6.x" + "@turf/helpers" "6.x" + "@turf/invariant" "6.x" + "@turf/meta" "6.x" + "@turf/projection" "6.x" + "@turf/rhumb-bearing" "6.x" + "@turf/rhumb-distance" "6.x" + +"@turf/points-within-polygon@5.1.x", "@turf/points-within-polygon@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/points-within-polygon/download/@turf/points-within-polygon-5.1.5.tgz#2b855a5df3aada57c2ee820a0754ab94928a2337" + integrity sha1-K4VaXfOq2lfC7oIKB1SrlJKKIzc= + dependencies: + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/polygon-tangents@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/polygon-tangents/download/@turf/polygon-tangents-5.1.5.tgz#2bf00991473025b178e250dc7cb9ae5409bbd652" + integrity sha1-K/AJkUcwJbF44lDcfLmuVAm71lI= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/polygon-to-line@5.1.x", "@turf/polygon-to-line@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/polygon-to-line/download/@turf/polygon-to-line-5.1.5.tgz#23bb448d84dc4c651999ac611a36d91c5925036a" + integrity sha1-I7tEjYTcTGUZmaxhGjbZHFklA2o= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/polygonize@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/polygonize/download/@turf/polygonize-5.1.5.tgz#0493fa11879f39d10b9ad02ce6a23e942d08aa32" + integrity sha1-BJP6EYefOdELmtAs5qI+lC0IqjI= + dependencies: + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/envelope" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/projection@5.1.x", "@turf/projection@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/projection/download/@turf/projection-5.1.5.tgz#24517eeeb2f36816ba9f712e7ae6d6a368edf757" + integrity sha1-JFF+7rLzaBa6n3EueubWo2jt91c= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/projection@6.x": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/projection/download/@turf/projection-6.5.0.tgz#d2aad862370bf03f2270701115464a8406c144b2" + integrity sha1-0qrYYjcL8D8icHARFUZKhAbBRLI= + dependencies: + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/random@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/random/download/@turf/random-5.1.5.tgz#b32efc934560ae8ba57e8ebb51f241c39fba2e7b" + integrity sha1-sy78k0Vgroulfo67UfJBw5+6Lns= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/rewind@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/rewind/download/@turf/rewind-5.1.5.tgz#9ea3db4a68b73c1fd1dd11f57631b143cfefa1c9" + integrity sha1-nqPbSmi3PB/R3RH1djGxQ8/vock= + dependencies: + "@turf/boolean-clockwise" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/rhumb-bearing@5.1.x", "@turf/rhumb-bearing@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/rhumb-bearing/download/@turf/rhumb-bearing-5.1.5.tgz#acf6a502427eb8c49e18cda6ae0effab0c5ddcd2" + integrity sha1-rPalAkJ+uMSeGM2mrg7/qwxd3NI= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/rhumb-bearing@6.x": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/rhumb-bearing/download/@turf/rhumb-bearing-6.5.0.tgz#8c41ad62b44fb4e57c14fe790488056684eee7b9" + integrity sha1-jEGtYrRPtOV8FP55BIgFZoTu57k= + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/rhumb-destination@5.1.x", "@turf/rhumb-destination@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/rhumb-destination/download/@turf/rhumb-destination-5.1.5.tgz#b1b2aeb921547f2ac0c1a994b6a130f92463c742" + integrity sha1-sbKuuSFUfyrAwamUtqEw+SRjx0I= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/rhumb-distance@5.1.x", "@turf/rhumb-distance@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/rhumb-distance/download/@turf/rhumb-distance-5.1.5.tgz#1806857625f4225384dad413e69f39538ff5f765" + integrity sha1-GAaFdiX0IlOE2tQT5p85U4/192U= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/rhumb-distance@6.x": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/rhumb-distance/download/@turf/rhumb-distance-6.5.0.tgz#ed068004b1469512b857070fbf5cb7b7eabbe592" + integrity sha1-7QaABLFGlRK4VwcPv1y3t+q75ZI= + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/sample@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/sample/download/@turf/sample-5.1.5.tgz#e9cb448a4789cc56ee3de2dd6781e2343435b411" + integrity sha1-6ctEikeJzFbuPeLdZ4HiNDQ1tBE= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/sector@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/sector/download/@turf/sector-5.1.5.tgz#ac2bb94c13edd6034f6fdc2b67008135d20f5e07" + integrity sha1-rCu5TBPt1gNPb9wrZwCBNdIPXgc= + dependencies: + "@turf/circle" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-arc" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/shortest-path@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/shortest-path/download/@turf/shortest-path-5.1.5.tgz#854ae8096f6bc3e1300faca77f3e8f67d8f935ab" + integrity sha1-hUroCW9rw+EwD6ynfz6PZ9j5Nas= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/bbox-polygon" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/clean-coords" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/transform-scale" "^5.1.5" + +"@turf/simplify@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/simplify/download/@turf/simplify-5.1.5.tgz#0ac8f27a2eb4218183edd9998c3275abe408b926" + integrity sha1-Csjyei60IYGD7dmZjDJ1q+QIuSY= dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.4" - "@babel/types" "^7.7.4" + "@turf/clean-coords" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" -"@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4": - version "7.7.4" - resolved "https://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.7.4.tgz?cache=0&sync_timestamp=1574465744239&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftraverse%2Fdownload%2F%40babel%2Ftraverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558" - integrity sha1-nB58YPtnn+T8+qQlAIMzM8IFhVg= +"@turf/square-grid@5.1.x", "@turf/square-grid@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/square-grid/download/@turf/square-grid-5.1.5.tgz#1bd5f7b9eb14f0b60bc231fefe7351d1a32f1a51" + integrity sha1-G9X3uesU8LYLwjH+/nNR0aMvGlE= dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.4" - "@babel/helper-function-name" "^7.7.4" - "@babel/helper-split-export-declaration" "^7.7.4" - "@babel/parser" "^7.7.4" - "@babel/types" "^7.7.4" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.13" + "@turf/boolean-contains" "^5.1.5" + "@turf/boolean-overlap" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/intersect" "^5.1.5" + "@turf/invariant" "^5.1.5" -"@babel/types@^7.4.0", "@babel/types@^7.7.4": - version "7.7.4" - resolved "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" - integrity sha1-UWVw1TnkTd8wjAdWnCWP+U/ekZM= +"@turf/square@5.1.x", "@turf/square@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/square/download/@turf/square-5.1.5.tgz#aa7b21e6033cc9252c3a5bd6f3d88dabd6fed180" + integrity sha1-qnsh5gM8ySUsOlvW89iNq9b+0YA= dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/standard-deviational-ellipse@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/standard-deviational-ellipse/download/@turf/standard-deviational-ellipse-5.1.5.tgz#85cd283b5e1aca58f21bd66412e414b56d852324" + integrity sha1-hc0oO14ayljyG9ZkEuQUtW2FIyQ= + dependencies: + "@turf/center-mean" "^5.1.5" + "@turf/ellipse" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/points-within-polygon" "^5.1.5" -"@ngtools/webpack@8.3.21": - version "8.3.21" - resolved "https://registry.npm.taobao.org/@ngtools/webpack/download/@ngtools/webpack-8.3.21.tgz#d28f2b66a8aeced5260c42ae722192ec5d5e4e56" - integrity sha1-0o8rZqiuztUmDEKuciGS7F1eTlY= +"@turf/tag@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/tag/download/@turf/tag-5.1.5.tgz#d1ee1a5088ecfd4a1411019c98239ccf2a497d20" + integrity sha1-0e4aUIjs/UoUEQGcmCOczypJfSA= dependencies: - "@angular-devkit/core" "8.3.21" - enhanced-resolve "4.1.0" - rxjs "6.4.0" - tree-kill "1.2.1" - webpack-sources "1.4.3" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" -"@schematics/angular@8.3.21": - version "8.3.21" - resolved "https://registry.npm.taobao.org/@schematics/angular/download/@schematics/angular-8.3.21.tgz#4902e0b6e8be47006859009bf96a026e3d39dd27" - integrity sha1-SQLgtui+RwBoWQCb+WoCbj053Sc= +"@turf/tesselate@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/tesselate/download/@turf/tesselate-5.1.5.tgz#32a594e9c21a00420a9f90d2c43df3e1166061cd" + integrity sha1-MqWU6cIaAEIKn5DSxD3z4RZgYc0= dependencies: - "@angular-devkit/core" "8.3.21" - "@angular-devkit/schematics" "8.3.21" + "@turf/helpers" "^5.1.5" + earcut "^2.0.0" -"@schematics/update@0.803.21": - version "0.803.21" - resolved "https://registry.npm.taobao.org/@schematics/update/download/@schematics/update-0.803.21.tgz#572c955bb132348bca03a128491ae264b0068a0a" - integrity sha1-VyyVW7EyNIvKA6EoSRriZLAGigo= +"@turf/tin@5.1.x", "@turf/tin@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/tin/download/@turf/tin-5.1.5.tgz#28223eafc5fbe9ae9acca81cdcfea5d1424c917d" + integrity sha1-KCI+r8X76a6azKgc3P6l0UJMkX0= dependencies: - "@angular-devkit/core" "8.3.21" - "@angular-devkit/schematics" "8.3.21" - "@yarnpkg/lockfile" "1.1.0" - ini "1.3.5" - pacote "9.5.5" - rxjs "6.4.0" - semver "6.3.0" - semver-intersect "1.4.0" + "@turf/helpers" "^5.1.5" + +"@turf/transform-rotate@5.1.x", "@turf/transform-rotate@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/transform-rotate/download/@turf/transform-rotate-5.1.5.tgz#d096edd9e300fe315069d54d8e458c409221edfb" + integrity sha1-0Jbt2eMA/jFQadVNjkWMQJIh7fs= + dependencies: + "@turf/centroid" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/rhumb-bearing" "^5.1.5" + "@turf/rhumb-destination" "^5.1.5" + "@turf/rhumb-distance" "^5.1.5" + +"@turf/transform-scale@5.1.x", "@turf/transform-scale@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/transform-scale/download/@turf/transform-scale-5.1.5.tgz#70fd3ae01856cf7bae9f15ad561cdfe8f89001b9" + integrity sha1-cP064BhWz3uunxWtVhzf6PiQAbk= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/center" "^5.1.5" + "@turf/centroid" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/rhumb-bearing" "^5.1.5" + "@turf/rhumb-destination" "^5.1.5" + "@turf/rhumb-distance" "^5.1.5" + +"@turf/transform-translate@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/transform-translate/download/@turf/transform-translate-5.1.5.tgz#530a257fb1dc7268dadcab34e67901eb2a3dec63" + integrity sha1-Uwolf7Hccmja3Ks05nkB6yo97GM= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/rhumb-destination" "^5.1.5" + +"@turf/triangle-grid@5.1.x", "@turf/triangle-grid@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/triangle-grid/download/@turf/triangle-grid-5.1.5.tgz#7b36762108554c14f28caff3c48b1cfc82c8dc81" + integrity sha1-ezZ2IQhVTBTyjK/zxIsc/ILI3IE= + dependencies: + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/intersect" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/truncate@5.1.x", "@turf/truncate@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/truncate/download/@turf/truncate-5.1.5.tgz#9eedfb3b18ba81f2c98d3ead09431cca1884ad89" + integrity sha1-nu37Oxi6gfLJjT6tCUMcyhiErYk= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/turf@^5.1.5": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/turf/download/@turf/turf-5.1.6.tgz#c3122592887ed234b75468b8a8c45bf886fbf8f6" + integrity sha1-wxIlkoh+0jS3VGi4qMRb+Ib7+PY= + dependencies: + "@turf/along" "5.1.x" + "@turf/area" "5.1.x" + "@turf/bbox" "5.1.x" + "@turf/bbox-clip" "5.1.x" + "@turf/bbox-polygon" "5.1.x" + "@turf/bearing" "5.1.x" + "@turf/bezier-spline" "5.1.x" + "@turf/boolean-clockwise" "5.1.x" + "@turf/boolean-contains" "5.1.x" + "@turf/boolean-crosses" "5.1.x" + "@turf/boolean-disjoint" "5.1.x" + "@turf/boolean-equal" "5.1.x" + "@turf/boolean-overlap" "5.1.x" + "@turf/boolean-parallel" "5.1.x" + "@turf/boolean-point-in-polygon" "5.1.x" + "@turf/boolean-point-on-line" "5.1.x" + "@turf/boolean-within" "5.1.x" + "@turf/buffer" "5.1.x" + "@turf/center" "5.1.x" + "@turf/center-mean" "5.1.x" + "@turf/center-median" "5.1.x" + "@turf/center-of-mass" "5.1.x" + "@turf/centroid" "5.1.x" + "@turf/circle" "5.1.x" + "@turf/clean-coords" "5.1.x" + "@turf/clone" "5.1.x" + "@turf/clusters" "5.1.x" + "@turf/clusters-dbscan" "5.1.x" + "@turf/clusters-kmeans" "5.1.x" + "@turf/collect" "5.1.x" + "@turf/combine" "5.1.x" + "@turf/concave" "5.1.x" + "@turf/convex" "5.1.x" + "@turf/destination" "5.1.x" + "@turf/difference" "5.1.x" + "@turf/dissolve" "5.1.x" + "@turf/distance" "5.1.x" + "@turf/ellipse" "5.1.x" + "@turf/envelope" "5.1.x" + "@turf/explode" "5.1.x" + "@turf/flatten" "5.1.x" + "@turf/flip" "5.1.x" + "@turf/great-circle" "5.1.x" + "@turf/helpers" "5.1.x" + "@turf/hex-grid" "5.1.x" + "@turf/interpolate" "5.1.x" + "@turf/intersect" "5.1.x" + "@turf/invariant" "5.1.x" + "@turf/isobands" "5.1.x" + "@turf/isolines" "5.1.x" + "@turf/kinks" "5.1.x" + "@turf/length" "5.1.x" + "@turf/line-arc" "5.1.x" + "@turf/line-chunk" "5.1.x" + "@turf/line-intersect" "5.1.x" + "@turf/line-offset" "5.1.x" + "@turf/line-overlap" "5.1.x" + "@turf/line-segment" "5.1.x" + "@turf/line-slice" "5.1.x" + "@turf/line-slice-along" "5.1.x" + "@turf/line-split" "5.1.x" + "@turf/line-to-polygon" "5.1.x" + "@turf/mask" "5.1.x" + "@turf/meta" "5.1.x" + "@turf/midpoint" "5.1.x" + "@turf/nearest-point" "5.1.x" + "@turf/nearest-point-on-line" "5.1.x" + "@turf/nearest-point-to-line" "5.1.x" + "@turf/planepoint" "5.1.x" + "@turf/point-grid" "5.1.x" + "@turf/point-on-feature" "5.1.x" + "@turf/point-to-line-distance" "5.1.x" + "@turf/points-within-polygon" "5.1.x" + "@turf/polygon-tangents" "5.1.x" + "@turf/polygon-to-line" "5.1.x" + "@turf/polygonize" "5.1.x" + "@turf/projection" "5.1.x" + "@turf/random" "5.1.x" + "@turf/rewind" "5.1.x" + "@turf/rhumb-bearing" "5.1.x" + "@turf/rhumb-destination" "5.1.x" + "@turf/rhumb-distance" "5.1.x" + "@turf/sample" "5.1.x" + "@turf/sector" "5.1.x" + "@turf/shortest-path" "5.1.x" + "@turf/simplify" "5.1.x" + "@turf/square" "5.1.x" + "@turf/square-grid" "5.1.x" + "@turf/standard-deviational-ellipse" "5.1.x" + "@turf/tag" "5.1.x" + "@turf/tesselate" "5.1.x" + "@turf/tin" "5.1.x" + "@turf/transform-rotate" "5.1.x" + "@turf/transform-scale" "5.1.x" + "@turf/transform-translate" "5.1.x" + "@turf/triangle-grid" "5.1.x" + "@turf/truncate" "5.1.x" + "@turf/union" "5.1.x" + "@turf/unkink-polygon" "5.1.x" + "@turf/voronoi" "5.1.x" + +"@turf/union@5.1.x", "@turf/union@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/union/download/@turf/union-5.1.5.tgz#53285b6094047fc58d96aac0ea90865ec34d454b" + integrity sha1-UyhbYJQEf8WNlqrA6pCGXsNNRUs= + dependencies: + "@turf/helpers" "^5.1.5" + turf-jsts "*" + +"@turf/unkink-polygon@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/unkink-polygon/download/@turf/unkink-polygon-5.1.5.tgz#7b01847c50fb574ae2579e19e44cba8526d213c3" + integrity sha1-ewGEfFD7V0riV54Z5Ey6hSbSE8M= + dependencies: + "@turf/area" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + rbush "^2.0.1" + +"@turf/voronoi@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/voronoi/download/@turf/voronoi-5.1.5.tgz#e856e9406dcc2f25d66ddc898584e27c2ebfca66" + integrity sha1-6FbpQG3MLyXWbdyJhYTifC6/ymY= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + d3-voronoi "1.1.2" + +"@types/cesium@^1.59.5": + version "1.70.0" + resolved "https://registry.npmmirror.com/@types/cesium/download/@types/cesium-1.70.0.tgz#081afd9d890e31a751db1df2526cb8cbf182c578" + integrity sha1-CBr9nYkOMadR2x3yUmy4y/GCxXg= + dependencies: + cesium "*" + +"@types/estree@*": + version "0.0.50" + resolved "https://registry.nlark.com/@types/estree/download/@types/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" + integrity sha1-Hgyqk2TT/M0pMcPtlv2+ql1MyoM= "@types/events@*": version "3.0.0" @@ -942,6 +2719,16 @@ dependencies: "@types/jasmine" "*" +"@types/json-schema@^7.0.5": + version "7.0.9" + resolved "https://registry.nlark.com/@types/json-schema/download/@types/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha1-l+3JA36gw4WFMgsolk3eOznkZg0= + +"@types/long@^4.0.1": + version "4.0.1" + resolved "https://registry.nlark.com/@types/long/download/@types/long-4.0.1.tgz?cache=0&sync_timestamp=1629708364799&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Flong%2Fdownload%2F%40types%2Flong-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" + integrity sha1-RZxl+hhn2v5qjzIsTFFpVmPMVek= + "@types/minimatch@*": version "3.0.3" resolved "https://registry.npm.taobao.org/@types/minimatch/download/@types/minimatch-3.0.3.tgz?cache=0&sync_timestamp=1572464707542&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fminimatch%2Fdownload%2F%40types%2Fminimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -952,16 +2739,52 @@ resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-13.1.4.tgz#4cfd90175a200ee9b02bd6b1cd19bc349741607e" integrity sha1-TP2QF1ogDumwK9axzRm8NJdBYH4= -"@types/node@~8.9.4": - version "8.9.5" - resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-8.9.5.tgz#162b864bc70be077e6db212b322754917929e976" - integrity sha1-FiuGS8cL4Hfm2yErMidUkXkp6XY= +"@types/node@>=12.12.47", "@types/node@>=13.7.0": + version "16.11.6" + resolved "https://registry.npmmirror.com/@types/node/download/@types/node-16.11.6.tgz?cache=0&sync_timestamp=1635213425908&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae" + integrity sha1-a+96KgrWhM9ukPz+Mc7KvZzgo64= + +"@types/node@^12.11.1": + version "12.20.36" + resolved "https://registry.npmmirror.com/@types/node/download/@types/node-12.20.36.tgz?cache=0&sync_timestamp=1635213425908&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-12.20.36.tgz#5bd54d2383e714fc4d2c258107ee70c5bad86d0c" + integrity sha1-W9VNI4PnFPxNLCWBB+5wxbrYbQw= + +"@types/prop-types@*": + version "15.7.4" + resolved "https://registry.nlark.com/@types/prop-types/download/@types/prop-types-15.7.4.tgz?cache=0&sync_timestamp=1629708829833&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fprop-types%2Fdownload%2F%40types%2Fprop-types-15.7.4.tgz#fcf7205c25dff795ee79af1e30da2c9790808f11" + integrity sha1-/PcgXCXf95Xuea8eMNosl5CAjxE= "@types/q@^0.0.32": version "0.0.32" resolved "https://registry.npm.taobao.org/@types/q/download/@types/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" integrity sha1-vShOV8hPEyXacCur/IKlMoGQwMU= +"@types/q@^1.5.1": + version "1.5.5" + resolved "https://registry.nlark.com/@types/q/download/@types/q-1.5.5.tgz#75a2a8e7d8ab4b230414505d92335d1dcb53a6df" + integrity sha1-daKo59irSyMEFFBdkjNdHctTpt8= + +"@types/react-dom@^17.0.10": + version "17.0.10" + resolved "https://registry.npmmirror.com/@types/react-dom/download/@types/react-dom-17.0.10.tgz#d6972ec018d23cf22b99597f1289343d99ea9d9d" + integrity sha1-1pcuwBjSPPIrmVl/Eok0PZnqnZ0= + dependencies: + "@types/react" "*" + +"@types/react@*": + version "17.0.33" + resolved "https://registry.npmmirror.com/@types/react/download/@types/react-17.0.33.tgz?cache=0&sync_timestamp=1635212002524&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Freact%2Fdownload%2F%40types%2Freact-17.0.33.tgz#e01ae3de7613dac1094569880bb3792732203ad5" + integrity sha1-4Brj3nYT2sEJRWmIC7N5JzIgOtU= + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/scheduler@*": + version "0.16.2" + resolved "https://registry.nlark.com/@types/scheduler/download/@types/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" + integrity sha1-GmL4lSVyPd4kuhsBsJK/XfitTTk= + "@types/selenium-webdriver@^3.0.0": version "3.0.16" resolved "https://registry.npm.taobao.org/@types/selenium-webdriver/download/@types/selenium-webdriver-3.0.16.tgz#50a4755f8e33edacd9c406729e9b930d2451902a" @@ -972,6 +2795,11 @@ resolved "https://registry.npm.taobao.org/@types/source-list-map/download/@types/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" integrity sha1-AHiDYGP/rxdBI0m7o2QIfgrALsk= +"@types/swiper@^5.2.1": + version "5.4.3" + resolved "https://registry.nlark.com/@types/swiper/download/@types/swiper-5.4.3.tgz#a1420bd9737626e630bb116d711efde34f5b9e99" + integrity sha1-oUIL2XN2JuYwuxFtcR79409bnpk= + "@types/webpack-sources@^0.1.5": version "0.1.5" resolved "https://registry.npm.taobao.org/@types/webpack-sources/download/@types/webpack-sources-0.1.5.tgz#be47c10f783d3d6efe1471ff7f042611bd464a92" @@ -1150,11 +2978,6 @@ JSONStream@^1.3.4: jsonparse "^1.2.0" through ">=2.2.7 <3" -abbrev@1: - version "1.1.1" - resolved "https://registry.npm.taobao.org/abbrev/download/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg= - accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -1168,6 +2991,11 @@ acorn@^6.2.1: resolved "https://registry.npm.taobao.org/acorn/download/acorn-6.4.0.tgz#b659d2ffbafa24baf5db1cdbb2c94a983ecd2784" integrity sha1-tlnS/7r6JLr12xzbsslKmD7NJ4Q= +acorn@^7.1.0: + version "7.4.1" + resolved "https://registry.nlark.com/acorn/download/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo= + adm-zip@^0.4.9: version "0.4.13" resolved "https://registry.npm.taobao.org/adm-zip/download/adm-zip-0.4.13.tgz#597e2f8cc3672151e1307d3e95cddbc75672314a" @@ -1199,6 +3027,14 @@ agentkeepalive@^3.4.1: dependencies: humanize-ms "^1.2.1" +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/aggregate-error/download/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha1-kmcP9Q9TWb23o+DUDQ7DDFc3aHo= + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + ajv-errors@^1.0.0: version "1.0.1" resolved "https://registry.npm.taobao.org/ajv-errors/download/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" @@ -1209,6 +3045,11 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: resolved "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha1-75FuJxxkrBIXH9g4TqrmsjRYVNo= +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.nlark.com/ajv-keywords/download/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha1-MfKdpatuANHC0yms97WSlhTVAU0= + ajv@6.10.2, ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.5: version "6.10.2" resolved "https://registry.npm.taobao.org/ajv/download/ajv-6.10.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2Fajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" @@ -1219,20 +3060,47 @@ ajv@6.10.2, ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^5.0.0: - version "5.5.2" - resolved "https://registry.npm.taobao.org/ajv/download/ajv-5.5.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2Fajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.nlark.com/ajv/download/ajv-6.12.6.tgz?cache=0&sync_timestamp=1631471007166&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fajv%2Fdownload%2Fajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ= dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" + fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.npm.taobao.org/amdefine/download/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= +alphanum-sort@^1.0.0: + version "1.0.2" + resolved "https://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= + +angular-calendar@^0.28.2: + version "0.28.28" + resolved "https://registry.npmmirror.com/angular-calendar/download/angular-calendar-0.28.28.tgz#25d0a37f70badb570abaed0e2704dc560561958f" + integrity sha1-JdCjf3C621cKuu0OJwTcVgVhlY8= + dependencies: + "@scarf/scarf" "^1.1.1" + angular-draggable-droppable "^4.6.0" + angular-resizable-element "^3.4.0" + calendar-utils "^0.8.5" + positioning "^2.0.1" + tslib "^1.14.1" + +angular-draggable-droppable@^4.6.0: + version "4.6.0" + resolved "https://registry.nlark.com/angular-draggable-droppable/download/angular-draggable-droppable-4.6.0.tgz#9e8671e2c13854dcabea3df2b15208af3dc85a2b" + integrity sha1-noZx4sE4VNyr6j3ysVIIrz3IWis= + dependencies: + "@mattlewis92/dom-autoscroller" "^2.4.2" + tslib "^1.9.0" + +angular-resizable-element@^3.4.0: + version "3.4.0" + resolved "https://registry.nlark.com/angular-resizable-element/download/angular-resizable-element-3.4.0.tgz#9f0f65c32dc3c1ce5c9f5be2ba1e738443ba31d3" + integrity sha1-nw9lwy3Dwc5cn1viuh5zhEO6MdM= + dependencies: + tslib "^1.9.0" ansi-colors@4.1.1: version "4.1.1" @@ -1276,6 +3144,11 @@ ansi-regex@^5.0.0: resolved "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U= +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.nlark.com/ansi-regex/download/ansi-regex-5.0.1.tgz?cache=0&sync_timestamp=1631634988487&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-regex%2Fdownload%2Fansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ= + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -1288,6 +3161,13 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.0.0: + version "4.3.0" + resolved "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha1-7dgDYornHATIWuegkG7a00tkiTc= + dependencies: + color-convert "^2.0.1" + anymatch@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -1304,6 +3184,14 @@ anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" +anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.nlark.com/anymatch/download/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha1-wFV8CWrzLxBhmPT04qODU343hxY= + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + app-root-path@^2.2.1: version "2.2.1" resolved "https://registry.npm.taobao.org/app-root-path/download/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" @@ -1316,19 +3204,11 @@ append-transform@^1.0.0: dependencies: default-require-extensions "^2.0.0" -aproba@^1.0.3, aproba@^1.1.1: +aproba@^1.1.1: version "1.2.0" resolved "https://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha1-aALmJk79GMeQobDVF/DyYnvyyUo= -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.npm.taobao.org/are-we-there-yet/download/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha1-SzXClE8GKov82mZBB2A1D+nd/CE= - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - argparse@^1.0.7: version "1.0.10" resolved "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1467,18 +3347,18 @@ atob@^2.1.2: resolved "https://registry.npm.taobao.org/atob/download/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k= -autoprefixer@9.6.1: - version "9.6.1" - resolved "https://registry.npm.taobao.org/autoprefixer/download/autoprefixer-9.6.1.tgz#51967a02d2d2300bb01866c1611ec8348d355a47" - integrity sha1-UZZ6AtLSMAuwGGbBYR7INI01Wkc= +autoprefixer@9.7.1: + version "9.7.1" + resolved "https://registry.npmmirror.com/autoprefixer/download/autoprefixer-9.7.1.tgz#9ffc44c55f5ca89253d9bb7186cefb01ef57747f" + integrity sha1-n/xExV9cqJJT2btxhs77Ae9XdH8= dependencies: - browserslist "^4.6.3" - caniuse-lite "^1.0.30000980" + browserslist "^4.7.2" + caniuse-lite "^1.0.30001006" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.17" - postcss-value-parser "^4.0.0" + postcss "^7.0.21" + postcss-value-parser "^4.0.2" aws-sign2@~0.7.0: version "0.7.0" @@ -1497,7 +3377,7 @@ axobject-query@2.0.2: dependencies: ast-types-flow "0.0.7" -babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: +babel-code-frame@^6.22.0: version "6.26.0" resolved "https://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= @@ -1506,26 +3386,15 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babel-generator@^6.18.0: - version "6.26.1" - resolved "https://registry.npm.taobao.org/babel-generator/download/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha1-GERAjTuPDTWkBOp6wYDwh6YBvZA= - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.npm.taobao.org/babel-messages/download/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= +babel-loader@8.0.6: + version "8.0.6" + resolved "https://registry.npmmirror.com/babel-loader/download/babel-loader-8.0.6.tgz?cache=0&sync_timestamp=1634769533620&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fbabel-loader%2Fdownload%2Fbabel-loader-8.0.6.tgz#e33bdb6f362b03f4bb141a0c21ab87c501b70dfb" + integrity sha1-4zvbbzYrA/S7FBoMIauHxQG3Dfs= dependencies: - babel-runtime "^6.22.0" + find-cache-dir "^2.0.0" + loader-utils "^1.0.2" + mkdirp "^0.5.1" + pify "^4.0.1" babel-plugin-dynamic-import-node@^2.3.0: version "2.3.0" @@ -1534,54 +3403,10 @@ babel-plugin-dynamic-import-node@^2.3.0: dependencies: object.assign "^4.1.0" -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.16.0: - version "6.26.0" - resolved "https://registry.npm.taobao.org/babel-template/download/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.18.0, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.npm.taobao.org/babel-traverse/download/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.18.0, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.npm.taobao.org/babel-types/download/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.npm.taobao.org/babylon/download/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha1-ry87iPpvXB5MY00aD46sT1WzleM= +babylonjs-gltf2interface@4.2.0: + version "4.2.0" + resolved "https://registry.npmmirror.com/babylonjs-gltf2interface/download/babylonjs-gltf2interface-4.2.0.tgz#b0ef1e11e3574cf2c6f573d0c5c34857a2a7b322" + integrity sha1-sO8eEeNXTPLG9XPQxcNIV6KnsyI= backo2@1.0.2: version "1.0.2" @@ -1712,6 +3537,11 @@ bonjour@^3.5.0: multicast-dns "^6.0.1" multicast-dns-service-types "^1.1.0" +boolbase@^1.0.0, boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/boolbase/download/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1807,16 +3637,18 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.6.6: - version "4.6.6" - resolved "https://registry.npm.taobao.org/browserslist/download/browserslist-4.6.6.tgz?cache=0&sync_timestamp=1578024984944&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbrowserslist%2Fdownload%2Fbrowserslist-4.6.6.tgz#6e4bf467cde520bc9dbdf3747dafa03531cec453" - integrity sha1-bkv0Z83lILydvfN0fa+gNTHOxFM= +browserslist@^4.0.0, browserslist@^4.16.6, browserslist@^4.17.5, browserslist@^4.7.2, browserslist@^4.9.1: + version "4.17.5" + resolved "https://registry.npmmirror.com/browserslist/download/browserslist-4.17.5.tgz#c827bbe172a4c22b123f5e337533ceebadfdd559" + integrity sha1-yCe74XKkwisSP14zdTPO66391Vk= dependencies: - caniuse-lite "^1.0.30000984" - electron-to-chromium "^1.3.191" - node-releases "^1.1.25" + caniuse-lite "^1.0.30001271" + electron-to-chromium "^1.3.878" + escalade "^3.1.1" + node-releases "^2.0.1" + picocolors "^1.0.0" -browserslist@^4.6.0, browserslist@^4.6.3, browserslist@^4.8.2: +browserslist@^4.6.0: version "4.8.3" resolved "https://registry.npm.taobao.org/browserslist/download/browserslist-4.8.3.tgz?cache=0&sync_timestamp=1578024984944&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbrowserslist%2Fdownload%2Fbrowserslist-4.8.3.tgz#65802fcd77177c878e015f0e3189f2c4f627ba44" integrity sha1-ZYAvzXcXfIeOAV8OMYnyxPYnukQ= @@ -1832,6 +3664,11 @@ browserstack@^1.5.1: dependencies: https-proxy-agent "^2.2.1" +bson-objectid@^1.3.1: + version "1.3.1" + resolved "https://registry.nlark.com/bson-objectid/download/bson-objectid-1.3.1.tgz#11e4ce4c3419161fd388113781bb62c1dfbce34b" + integrity sha1-EeTOTDQZFh/TiBE3gbtiwd+840s= + buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.npm.taobao.org/buffer-alloc-unsafe/download/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" @@ -1899,26 +3736,29 @@ bytes@3.1.0: resolved "https://registry.npm.taobao.org/bytes/download/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY= -cacache@12.0.2: - version "12.0.2" - resolved "https://registry.npm.taobao.org/cacache/download/cacache-12.0.2.tgz?cache=0&sync_timestamp=1569877543868&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-12.0.2.tgz#8db03205e36089a3df6954c66ce92541441ac46c" - integrity sha1-jbAyBeNgiaPfaVTGbOklQUQaxGw= +cacache@13.0.1, cacache@^13.0.1: + version "13.0.1" + resolved "https://registry.nlark.com/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1630000121314&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz#a8000c21697089082f85287a1aec6e382024a71c" + integrity sha1-qAAMIWlwiQgvhSh6GuxuOCAkpxw= dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" + chownr "^1.1.2" figgy-pudding "^3.5.1" + fs-minipass "^2.0.0" glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" + graceful-fs "^4.2.2" + infer-owner "^1.0.4" lru-cache "^5.1.1" - mississippi "^3.0.0" + minipass "^3.0.0" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" mkdirp "^0.5.1" move-concurrently "^1.0.1" + p-map "^3.0.0" promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" + rimraf "^2.7.1" + ssri "^7.0.0" unique-filename "^1.1.1" - y18n "^4.0.0" cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: version "12.0.3" @@ -1956,6 +3796,19 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +calendar-utils@^0.8.5: + version "0.8.5" + resolved "https://registry.nlark.com/calendar-utils/download/calendar-utils-0.8.5.tgz#8d3aacc7ef3c5fbae4a1a3fc00458ac144efb69d" + integrity sha1-jTqsx+88X7rkoaP8AEWKwUTvtp0= + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/call-bind/download/call-bind-1.0.2.tgz?cache=0&sync_timestamp=1621222550090&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcall-bind%2Fdownload%2Fcall-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha1-sdTonmiBGcPJqQOtMKuy9qkZvjw= + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/caller-callsite/download/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -1985,12 +3838,22 @@ camelcase@^5.0.0: resolved "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA= -caniuse-lite@1.0.30000989: - version "1.0.30000989" - resolved "https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30000989.tgz?cache=0&sync_timestamp=1578188987801&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30000989.tgz#b9193e293ccf7e4426c5245134b8f2a56c0ac4b9" - integrity sha1-uRk+KTzPfkQmxSRRNLjypWwKxLk= +caniuse-api@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/caniuse-api/download/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" + integrity sha1-Xk2Q4idJYdRikZl99Znj7QCO5MA= + dependencies: + browserslist "^4.0.0" + caniuse-lite "^1.0.0" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001006, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001271: + version "1.0.30001271" + resolved "https://registry.npmmirror.com/caniuse-lite/download/caniuse-lite-1.0.30001271.tgz#0dda0c9bcae2cf5407cd34cac304186616cc83e8" + integrity sha1-DdoMm8riz1QHzTTKwwQYZhbMg+g= -caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000984, caniuse-lite@^1.0.30001017: +caniuse-lite@^1.0.30001017: version "1.0.30001019" resolved "https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30001019.tgz?cache=0&sync_timestamp=1578188987801&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30001019.tgz#857e3fccaad2b2feb3f1f6d8a8f62d747ea648e1" integrity sha1-hX4/zKrSsv6z8fbYqPYtdH6mSOE= @@ -2005,6 +3868,16 @@ caseless@~0.12.0: resolved "https://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= +cesium-typings@^1.50.0: + version "1.50.2" + resolved "https://registry.npmmirror.com/cesium-typings/download/cesium-typings-1.50.2.tgz#fceb28a31bb64860c72111533ff0dffdddd2f197" + integrity sha1-/Osooxu2SGDHIRFTP/Df/d3S8Zc= + +cesium@*, cesium@^1.50.0, cesium@^1.64.0: + version "1.86.1" + resolved "https://registry.npmmirror.com/cesium/download/cesium-1.86.1.tgz#c98c5453c133ed3d62c95de798c02d1d4d7f5b2e" + integrity sha1-yYxUU8Ez7T1iyV3nmMAtHU1/Wy4= + chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz?cache=0&sync_timestamp=1573282918610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -2016,7 +3889,7 @@ chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1573282918610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ= @@ -2045,7 +3918,7 @@ chardet@^0.7.0: optionalDependencies: fsevents "~2.1.2" -chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.1.1, chokidar@^2.1.8: +chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.1.8: version "2.1.8" resolved "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" integrity sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc= @@ -2064,11 +3937,31 @@ chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.1.1, chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" +chokidar@^3.0.0: + version "3.5.2" + resolved "https://registry.nlark.com/chokidar/download/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" + integrity sha1-26OXb8rbAW9m/TZQIdkWANAcHnU= + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + chownr@^1.1.1: version "1.1.3" resolved "https://registry.npm.taobao.org/chownr/download/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" integrity sha1-Qtg31SOWiNVfMDADpQgjD6ZycUI= +chownr@^1.1.2, chownr@^1.1.4: + version "1.1.4" + resolved "https://registry.npm.taobao.org/chownr/download/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha1-b8nXtC0ypYNZYzdmbn0ICE2izGs= + chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.npm.taobao.org/chrome-trace-event/download/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" @@ -2089,6 +3982,11 @@ circular-dependency-plugin@5.2.0: resolved "https://registry.npm.taobao.org/circular-dependency-plugin/download/circular-dependency-plugin-5.2.0.tgz#e09dbc2dd3e2928442403e2d45b41cea06bc0a93" integrity sha1-4J28LdPikoRCQD4tRbQc6ga8CpM= +class-transformer@^0.4.0: + version "0.4.0" + resolved "https://registry.nlark.com/class-transformer/download/class-transformer-0.4.0.tgz#b52144117b423c516afb44cc1c76dbad31c2165b" + integrity sha1-tSFEEXtCPFFq+0TMHHbbrTHCFls= + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -2099,12 +3997,10 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -clean-css@4.2.1: - version "4.2.1" - resolved "https://registry.npm.taobao.org/clean-css/download/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17" - integrity sha1-LUEe92uFabbQyEBo2r6FsKpeXBc= - dependencies: - source-map "~0.6.0" +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.nlark.com/clean-stack/download/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha1-7oRy27Ep5yezHooQpCfe6d/kAIs= cli-cursor@^3.1.0: version "3.1.0" @@ -2113,6 +4009,11 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-spinners@^2.2.0: + version "2.6.1" + resolved "https://registry.npmmirror.com/cli-spinners/download/cli-spinners-2.6.1.tgz?cache=0&sync_timestamp=1633109759784&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcli-spinners%2Fdownload%2Fcli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" + integrity sha1-rclU6+KBw3pjGb+kAebdJIj/tw0= + cli-width@^2.0.0: version "2.2.0" resolved "https://registry.npm.taobao.org/cli-width/download/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" @@ -2127,6 +4028,15 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.nlark.com/cliui/download/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha1-oCZe5lVHb8gHrqnfPfjfd4OAi08= + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.npm.taobao.org/clone-deep/download/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" @@ -2136,25 +4046,34 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + clone@^2.1.1, clone@^2.1.2: version "2.1.2" resolved "https://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= -co@^4.6.0: - version "4.6.0" - resolved "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= +coa@^2.0.2: + version "2.0.2" + resolved "https://registry.npm.taobao.org/coa/download/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" + integrity sha1-Q/bCEVG07yv1cYfbDXPeIp4+fsM= + dependencies: + "@types/q" "^1.5.1" + chalk "^2.4.1" + q "^1.1.2" code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -codelyzer@^5.0.0: - version "5.2.1" - resolved "https://registry.npm.taobao.org/codelyzer/download/codelyzer-5.2.1.tgz#44fd431e128009f38c761828c33ebacba9549d32" - integrity sha1-RP1DHhKACfOMdhgowz66y6lUnTI= +codelyzer@^5.1.2: + version "5.2.2" + resolved "https://registry.nlark.com/codelyzer/download/codelyzer-5.2.2.tgz#d0530a455784e6bea0b6d7e97166c73c30a5347f" + integrity sha1-0FMKRVeE5r6gttfpcWbHPDClNH8= dependencies: app-root-path "^2.2.1" aria-query "^3.0.0" @@ -2174,18 +4093,46 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.9.0: +color-convert@^1.9.0, color-convert@^1.9.3: version "1.9.3" resolved "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg= dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM= + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +color-name@^1.0.0, color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha1-wqCah6y95pVD3m9j+jmVyCbFNqI= + +color-string@^1.6.0: + version "1.6.0" + resolved "https://registry.nlark.com/color-string/download/color-string-1.6.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcolor-string%2Fdownload%2Fcolor-string-1.6.0.tgz#c3915f61fe267672cb7e1e064c9d692219f6c312" + integrity sha1-w5FfYf4mdnLLfh4GTJ1pIhn2wxI= + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + +color@^3.0.0: + version "3.2.1" + resolved "https://registry.nlark.com/color/download/color-3.2.1.tgz?cache=0&sync_timestamp=1628105303224&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcolor%2Fdownload%2Fcolor-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164" + integrity sha1-NUTcGYyvRJDD7MmnkLVP6f9F4WQ= + dependencies: + color-convert "^1.9.3" + color-string "^1.6.0" + colors@1.1.2: version "1.1.2" resolved "https://registry.npm.taobao.org/colors/download/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" @@ -2203,9 +4150,9 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.11.0, commander@^2.12.1, commander@^2.20.0, commander@~2.20.3: +commander@2, commander@^2.11.0, commander@^2.12.1, commander@^2.20.0, commander@~2.20.3: version "2.20.3" - resolved "https://registry.npm.taobao.org/commander/download/commander-2.20.3.tgz?cache=0&sync_timestamp=1573464098030&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + resolved "https://registry.npmmirror.com/commander/download/commander-2.20.3.tgz?cache=0&sync_timestamp=1634886357672&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcommander%2Fdownload%2Fcommander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha1-/UhehMA+tIgcIHIrpIA16FMa6zM= commondir@^1.0.1: @@ -2273,6 +4220,16 @@ concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" +concaveman@*: + version "1.2.1" + resolved "https://registry.nlark.com/concaveman/download/concaveman-1.2.1.tgz#47d20b4521125c15fabf453653c2696d9ee41e0b" + integrity sha1-R9ILRSESXBX6v0U2U8JpbZ7kHgs= + dependencies: + point-in-polygon "^1.1.0" + rbush "^3.0.1" + robust-predicates "^2.0.4" + tinyqueue "^2.0.3" + connect-history-api-fallback@^1.6.0: version "1.6.0" resolved "https://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" @@ -2293,11 +4250,6 @@ console-browserify@^1.1.0: resolved "https://registry.npm.taobao.org/console-browserify/download/console-browserify-1.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconsole-browserify%2Fdownload%2Fconsole-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" integrity sha1-ZwY871fOts9Jk6KrOlWECujEkzY= -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.npm.taobao.org/console-control-strings/download/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/constants-browserify/download/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" @@ -2315,7 +4267,7 @@ content-type@~1.0.4: resolved "https://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha1-4TjMdeBAxyexlm/l5fjJruJW/js= -convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: +convert-source-map@^1.5.1, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.npm.taobao.org/convert-source-map/download/convert-source-map-1.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconvert-source-map%2Fdownload%2Fconvert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha1-F6LLiC1/d9NJBYXizmxSRCSjpEI= @@ -2372,20 +4324,25 @@ copy-webpack-plugin@5.1.1: serialize-javascript "^2.1.2" webpack-log "^2.0.0" -core-js-compat@^3.4.7: - version "3.6.1" - resolved "https://registry.npm.taobao.org/core-js-compat/download/core-js-compat-3.6.1.tgz#39638c935c83c93a793abb628b252ec43e85783a" - integrity sha1-OWOMk1yDyTp5OrtiiyUuxD6FeDo= +core-js-compat@^3.6.0: + version "3.19.0" + resolved "https://registry.npmmirror.com/core-js-compat/download/core-js-compat-3.19.0.tgz#b3b93f93c8721b3ed52b91f12f964cc410967f8b" + integrity sha1-s7k/k8hyGz7VK5HxL5ZMxBCWf4s= dependencies: - browserslist "^4.8.2" + browserslist "^4.17.5" semver "7.0.0" -core-js@3.2.1: - version "3.2.1" - resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.2.1.tgz#cd41f38534da6cc59f7db050fe67307de9868b09" - integrity sha1-zUHzhTTabMWffbBQ/mcwfemGiwk= +core-js@3.6.4: + version "3.6.4" + resolved "https://registry.npmmirror.com/core-js/download/core-js-3.6.4.tgz?cache=0&sync_timestamp=1635142975023&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcore-js%2Fdownload%2Fcore-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647" + integrity sha1-RAqDU2tFgRS5yyrBWAujd9xHBkc= -core-js@^2.2.0, core-js@^2.4.0: +core-js@3.6.5: + version "3.6.5" + resolved "https://registry.npmmirror.com/core-js/download/core-js-3.6.5.tgz?cache=0&sync_timestamp=1635142975023&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcore-js%2Fdownload%2Fcore-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" + integrity sha1-c5XcJzrzf7LlDpvT2f6EEoUjHRo= + +core-js@^2.2.0: version "2.6.11" resolved "https://registry.npm.taobao.org/core-js/download/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" integrity sha1-OIMUafmSK97Y7iHJ3EaYXgOZMIw= @@ -2405,6 +4362,17 @@ cosmiconfig@^5.0.0: js-yaml "^3.13.1" parse-json "^4.0.0" +coverage-istanbul-loader@2.0.3: + version "2.0.3" + resolved "https://registry.nlark.com/coverage-istanbul-loader/download/coverage-istanbul-loader-2.0.3.tgz#87d42f03fa0fd3fa8743ec76945d9d67f105722a" + integrity sha1-h9QvA/oP0/qHQ+x2lF2dZ/EFcio= + dependencies: + convert-source-map "^1.7.0" + istanbul-lib-instrument "^4.0.0" + loader-utils "^1.2.3" + merge-source-map "^1.1.0" + schema-utils "^2.6.1" + create-ecdh@^4.0.0: version "4.0.3" resolved "https://registry.npm.taobao.org/create-ecdh/download/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" @@ -2464,10 +4432,40 @@ crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" -css-parse@1.7.x: - version "1.7.0" - resolved "https://registry.npm.taobao.org/css-parse/download/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b" - integrity sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs= +css-color-names@0.0.4, css-color-names@^0.0.4: + version "0.0.4" + resolved "https://registry.npm.taobao.org/css-color-names/download/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= + +css-declaration-sorter@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/css-declaration-sorter/download/css-declaration-sorter-4.0.1.tgz?cache=0&sync_timestamp=1630965711521&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcss-declaration-sorter%2Fdownload%2Fcss-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22" + integrity sha1-wZiUD2OnbX42wecQGLABchBUyyI= + dependencies: + postcss "^7.0.1" + timsort "^0.3.0" + +css-parse@~2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/css-parse/download/css-parse-2.0.0.tgz#a468ee667c16d81ccf05c58c38d2a97c780dbfd4" + integrity sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q= + dependencies: + css "^2.0.0" + +css-select-base-adapter@^0.1.1: + version "0.1.1" + resolved "https://registry.npm.taobao.org/css-select-base-adapter/download/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" + integrity sha1-Oy/0lyzDYquIVhUHqVQIoUMhNdc= + +css-select@^2.0.0: + version "2.1.0" + resolved "https://registry.nlark.com/css-select/download/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" + integrity sha1-ajRlM1ZjWTSoG6ymjQJVQyEF2+8= + dependencies: + boolbase "^1.0.0" + css-what "^3.2.1" + domutils "^1.7.0" + nth-check "^1.0.2" css-selector-tokenizer@^0.7.1: version "0.7.1" @@ -2478,17 +4476,133 @@ css-selector-tokenizer@^0.7.1: fastparse "^1.1.1" regexpu-core "^1.0.0" +css-tree@1.0.0-alpha.37: + version "1.0.0-alpha.37" + resolved "https://registry.nlark.com/css-tree/download/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" + integrity sha1-mL69YsTB2flg7DQM+fdSLjBwmiI= + dependencies: + mdn-data "2.0.4" + source-map "^0.6.1" + +css-tree@^1.1.2: + version "1.1.3" + resolved "https://registry.nlark.com/css-tree/download/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" + integrity sha1-60hw+2/XcHMn7JXC/yqwm16NuR0= + dependencies: + mdn-data "2.0.14" + source-map "^0.6.1" + +css-what@^3.2.1: + version "3.4.2" + resolved "https://registry.npmmirror.com/css-what/download/css-what-3.4.2.tgz?cache=0&sync_timestamp=1633864103961&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcss-what%2Fdownload%2Fcss-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" + integrity sha1-6nAm/LAXd+295SEk4h8yfnrpUOQ= + +css@^2.0.0: + version "2.2.4" + resolved "https://registry.npm.taobao.org/css/download/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" + integrity sha1-xkZ1XHOXHyu6amAeLPL9cbEpiSk= + dependencies: + inherits "^2.0.3" + source-map "^0.6.1" + source-map-resolve "^0.5.2" + urix "^0.1.0" + cssauron@^1.4.0: version "1.4.0" resolved "https://registry.npm.taobao.org/cssauron/download/cssauron-1.4.0.tgz#a6602dff7e04a8306dc0db9a551e92e8b5662ad8" integrity sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg= dependencies: - through X.X.X + through X.X.X + +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.npm.taobao.org/cssesc/download/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + integrity sha1-yBSQPkViM3GgR3tAEJqq++6t27Q= + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha1-N3QZGZA7hoVl4cCep0dEXNGJg+4= + +cssnano-preset-default@^4.0.7: + version "4.0.8" + resolved "https://registry.nlark.com/cssnano-preset-default/download/cssnano-preset-default-4.0.8.tgz?cache=0&sync_timestamp=1629280558765&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcssnano-preset-default%2Fdownload%2Fcssnano-preset-default-4.0.8.tgz#920622b1fc1e95a34e8838203f1397a504f2d3ff" + integrity sha1-kgYisfwelaNOiDggPxOXpQTy0/8= + dependencies: + css-declaration-sorter "^4.0.1" + cssnano-util-raw-cache "^4.0.1" + postcss "^7.0.0" + postcss-calc "^7.0.1" + postcss-colormin "^4.0.3" + postcss-convert-values "^4.0.1" + postcss-discard-comments "^4.0.2" + postcss-discard-duplicates "^4.0.2" + postcss-discard-empty "^4.0.1" + postcss-discard-overridden "^4.0.1" + postcss-merge-longhand "^4.0.11" + postcss-merge-rules "^4.0.3" + postcss-minify-font-values "^4.0.2" + postcss-minify-gradients "^4.0.2" + postcss-minify-params "^4.0.2" + postcss-minify-selectors "^4.0.2" + postcss-normalize-charset "^4.0.1" + postcss-normalize-display-values "^4.0.2" + postcss-normalize-positions "^4.0.2" + postcss-normalize-repeat-style "^4.0.2" + postcss-normalize-string "^4.0.2" + postcss-normalize-timing-functions "^4.0.2" + postcss-normalize-unicode "^4.0.1" + postcss-normalize-url "^4.0.1" + postcss-normalize-whitespace "^4.0.2" + postcss-ordered-values "^4.1.2" + postcss-reduce-initial "^4.0.3" + postcss-reduce-transforms "^4.0.2" + postcss-svgo "^4.0.3" + postcss-unique-selectors "^4.0.1" + +cssnano-util-get-arguments@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/cssnano-util-get-arguments/download/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" + integrity sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8= + +cssnano-util-get-match@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/cssnano-util-get-match/download/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d" + integrity sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= + +cssnano-util-raw-cache@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/cssnano-util-raw-cache/download/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282" + integrity sha1-sm1f1fcqEd/np4RvtMZyYPlr8oI= + dependencies: + postcss "^7.0.0" + +cssnano-util-same-parent@^4.0.0: + version "4.0.1" + resolved "https://registry.npm.taobao.org/cssnano-util-same-parent/download/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" + integrity sha1-V0CC+yhZ0ttDOFWDXZqEVuoYu/M= + +cssnano@4.1.10: + version "4.1.10" + resolved "https://registry.nlark.com/cssnano/download/cssnano-4.1.10.tgz?cache=0&sync_timestamp=1629280559695&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcssnano%2Fdownload%2Fcssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2" + integrity sha1-CsQfCxPRPUZUh+ERt3jULaYxuLI= + dependencies: + cosmiconfig "^5.0.0" + cssnano-preset-default "^4.0.7" + is-resolvable "^1.0.0" + postcss "^7.0.0" + +csso@^4.0.2: + version "4.2.0" + resolved "https://registry.nlark.com/csso/download/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529" + integrity sha1-6jpWE0bo3J9UbW/r7dUBh884lSk= + dependencies: + css-tree "^1.1.2" -cssesc@^0.1.0: - version "0.1.0" - resolved "https://registry.npm.taobao.org/cssesc/download/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" - integrity sha1-yBSQPkViM3GgR3tAEJqq++6t27Q= +csstype@^3.0.2: + version "3.0.9" + resolved "https://registry.nlark.com/csstype/download/csstype-3.0.9.tgz?cache=0&sync_timestamp=1631540658518&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcsstype%2Fdownload%2Fcsstype-3.0.9.tgz#6410af31b26bd0520933d02cbc64fce9ce3fbf0b" + integrity sha1-ZBCvMbJr0FIJM9AsvGT86c4/vws= custom-event@~1.0.0: version "1.0.1" @@ -2500,6 +4614,23 @@ cyclist@^1.0.1: resolved "https://registry.npm.taobao.org/cyclist/download/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= +d3-array@1: + version "1.2.4" + resolved "https://registry.npmmirror.com/d3-array/download/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f" + integrity sha1-Y1zk1e6nWfb2BYY9vPww7cc39x8= + +d3-geo@1.7.1: + version "1.7.1" + resolved "https://registry.nlark.com/d3-geo/download/d3-geo-1.7.1.tgz#44bbc7a218b1fd859f3d8fd7c443ca836569ce99" + integrity sha1-RLvHohix/YWfPY/XxEPKg2Vpzpk= + dependencies: + d3-array "1" + +d3-voronoi@1.1.2: + version "1.1.2" + resolved "https://registry.npm.taobao.org/d3-voronoi/download/d3-voronoi-1.1.2.tgz#1687667e8f13a2d158c80c1480c5a29cb0d8973c" + integrity sha1-Fodmfo8TotFYyAwUgMWinLDYlzw= + damerau-levenshtein@^1.0.4: version "1.0.5" resolved "https://registry.npm.taobao.org/damerau-levenshtein/download/damerau-levenshtein-1.0.5.tgz#780cf7144eb2e8dbd1c3bb83ae31100ccc31a414" @@ -2512,19 +4643,17 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +date-fns@^2.10.0: + version "2.25.0" + resolved "https://registry.npmmirror.com/date-fns/download/date-fns-2.25.0.tgz?cache=0&sync_timestamp=1633421799894&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fdate-fns%2Fdownload%2Fdate-fns-2.25.0.tgz#8c5c8f1d958be3809a9a03f4b742eba894fc5680" + integrity sha1-jFyPHZWL44CamgP0t0LrqJT8VoA= + date-format@^2.0.0: version "2.1.0" resolved "https://registry.npm.taobao.org/date-format/download/date-format-2.1.0.tgz#31d5b5ea211cf5fd764cd38baf9d033df7e125cf" integrity sha1-MdW16iEc9f12TNOLr50DPffhJc8= -debug@*, debug@^4.1.0, debug@^4.1.1: - version "4.1.1" - resolved "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E= - dependencies: - ms "^2.1.1" - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8= @@ -2545,6 +4674,13 @@ debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: dependencies: ms "^2.1.1" +debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E= + dependencies: + ms "^2.1.1" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.npm.taobao.org/debuglog/download/debuglog-1.0.1.tgz?cache=0&sync_timestamp=1571696609964&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebuglog%2Fdownload%2Fdebuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -2560,7 +4696,7 @@ decode-uri-component@^0.2.0: resolved "https://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= -deep-equal@^1.0.1: +deep-equal@^1.0.0, deep-equal@^1.0.1: version "1.1.1" resolved "https://registry.npm.taobao.org/deep-equal/download/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" integrity sha1-tcmMlCzv+vfLBR4k4UNKJaLmB2o= @@ -2572,11 +4708,6 @@ deep-equal@^1.0.1: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.npm.taobao.org/deep-extend/download/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha1-xPp8lUBKF6nD6Mp+FTcxK3NjMKw= - default-gateway@^4.2.0: version "4.2.0" resolved "https://registry.npm.taobao.org/default-gateway/download/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" @@ -2592,6 +4723,13 @@ default-require-extensions@^2.0.0: dependencies: strip-bom "^3.0.0" +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/defaults/download/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.npm.taobao.org/define-properties/download/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -2652,10 +4790,10 @@ delayed-stream@~1.0.0: resolved "https://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= +density-clustering@1.3.0: + version "1.3.0" + resolved "https://registry.nlark.com/density-clustering/download/density-clustering-1.3.0.tgz#dc9f59c8f0ab97e1624ac64930fd3194817dcac5" + integrity sha1-3J9ZyPCrl+FiSsZJMP0xlIF9ysU= depd@~1.1.2: version "1.1.2" @@ -2680,18 +4818,6 @@ destroy@~1.0.4: resolved "https://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.npm.taobao.org/detect-indent/download/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.npm.taobao.org/detect-libc/download/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - detect-node@^2.0.4: version "2.0.4" resolved "https://registry.npm.taobao.org/detect-node/download/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" @@ -2761,11 +4887,56 @@ dom-serialize@^2.2.0: extend "^3.0.0" void-elements "^2.0.0" +dom-serializer@0: + version "0.2.2" + resolved "https://registry.nlark.com/dom-serializer/download/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha1-GvuB9TNxcXXUeGVd68XjMtn5u1E= + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +dom-storage@2.1.0: + version "2.1.0" + resolved "https://registry.nlark.com/dom-storage/download/dom-storage-2.1.0.tgz#00fb868bc9201357ea243c7bcfd3304c1e34ea39" + integrity sha1-APuGi8kgE1fqJDx7z9MwTB406jk= + +dom7@^2.1.5: + version "2.1.5" + resolved "https://registry.nlark.com/dom7/download/dom7-2.1.5.tgz?cache=0&sync_timestamp=1629879480312&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdom7%2Fdownload%2Fdom7-2.1.5.tgz#a79411017800b31d8400070cdaebbfc92c1f6377" + integrity sha1-p5QRAXgAsx2EAAcM2uu/ySwfY3c= + dependencies: + ssr-window "^2.0.0" + domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" integrity sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto= +domelementtype@1: + version "1.3.1" + resolved "https://registry.npm.taobao.org/domelementtype/download/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha1-0EjESzew0Qp/Kj1f7j9DM9eQSB8= + +domelementtype@^2.0.1: + version "2.2.0" + resolved "https://registry.npm.taobao.org/domelementtype/download/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" + integrity sha1-mgtsJ4LtahxzI9QiZxg9+b2LHVc= + +domutils@^1.7.0: + version "1.7.0" + resolved "https://registry.nlark.com/domutils/download/domutils-1.7.0.tgz?cache=0&sync_timestamp=1630106606599&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdomutils%2Fdownload%2Fdomutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha1-Vuo0HoNOBuZ0ivehyyXaZ+qfjCo= + dependencies: + dom-serializer "0" + domelementtype "1" + +dot-prop@^5.2.0: + version "5.3.0" + resolved "https://registry.npm.taobao.org/dot-prop/download/dot-prop-5.3.0.tgz?cache=0&sync_timestamp=1605778235569&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdot-prop%2Fdownload%2Fdot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + integrity sha1-kMzOcIzZzYLMTcjD3dmr3VWyDog= + dependencies: + is-obj "^2.0.0" + duplexify@^3.4.2, duplexify@^3.6.0: version "3.7.1" resolved "https://registry.npm.taobao.org/duplexify/download/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" @@ -2776,6 +4947,22 @@ duplexify@^3.4.2, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" +e-ngx-cesium@^6.3.2: + version "6.3.2" + resolved "https://registry.npmmirror.com/e-ngx-cesium/download/e-ngx-cesium-6.3.2.tgz#230a50708e7a4a3583b88a9a6cdeb931060c50a4" + integrity sha1-IwpQcI56SjWDuIqabN65MQYMUKQ= + dependencies: + "@turf/turf" "^5.1.5" + cesium "^1.50.0" + cesium-typings "^1.50.0" + font-awesome "^4.7.0" + lodash "^4.17.4" + +earcut@^2.0.0: + version "2.2.3" + resolved "https://registry.nlark.com/earcut/download/earcut-2.2.3.tgz#d44ced2ff5a18859568e327dd9c7d46b16f55cf4" + integrity sha1-1EztL/WhiFlWjjJ92cfUaxb1XPQ= + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -2784,16 +4971,28 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +echarts@^4.6.0: + version "4.9.0" + resolved "https://registry.nlark.com/echarts/download/echarts-4.9.0.tgz?cache=0&sync_timestamp=1632191355993&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fecharts%2Fdownload%2Fecharts-4.9.0.tgz#a9b9baa03f03a2a731e6340c55befb57a9e1347d" + integrity sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0= + dependencies: + zrender "4.3.2" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.191, electron-to-chromium@^1.3.322: +electron-to-chromium@^1.3.322: version "1.3.326" resolved "https://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.326.tgz#71715aca9afd328ea208a3bc4651c15b869f0d1b" integrity sha1-cXFaypr9Mo6iCKO8RlHBW4afDRs= +electron-to-chromium@^1.3.878: + version "1.3.879" + resolved "https://registry.npmmirror.com/electron-to-chromium/download/electron-to-chromium-1.3.879.tgz#4aba9700cfb241fb95c6ed69e31785e3d1605a43" + integrity sha1-SrqXAM+yQfuVxu1p4xeF49FgWkM= + elliptic@^6.0.0: version "6.5.2" resolved "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" @@ -2881,16 +5080,7 @@ engine.io@~3.2.0: engine.io-parser "~2.1.0" ws "~3.3.1" -enhanced-resolve@4.1.0: - version "4.1.0" - resolved "https://registry.npm.taobao.org/enhanced-resolve/download/enhanced-resolve-4.1.0.tgz?cache=0&sync_timestamp=1572991863401&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fenhanced-resolve%2Fdownload%2Fenhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" - integrity sha1-Qcfgv9/nSsH/4eV61qXGyfN0Kn8= - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - tapable "^1.0.0" - -enhanced-resolve@^4.1.0: +enhanced-resolve@4.1.1, enhanced-resolve@^4.1.0: version "4.1.1" resolved "https://registry.npm.taobao.org/enhanced-resolve/download/enhanced-resolve-4.1.1.tgz?cache=0&sync_timestamp=1572991863401&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fenhanced-resolve%2Fdownload%2Fenhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" integrity sha1-KTfiuAZs0P584JkKmPDXGjUYn2Y= @@ -2904,6 +5094,11 @@ ent@~2.2.0: resolved "https://registry.npm.taobao.org/ent/download/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.nlark.com/entities/download/entities-2.2.0.tgz?cache=0&sync_timestamp=1628508126700&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fentities%2Fdownload%2Fentities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha1-CY3JDruD2N/6CJ1VJWs1HTTE2lU= + err-code@^1.0.0: version "1.1.2" resolved "https://registry.npm.taobao.org/err-code/download/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" @@ -2940,6 +5135,32 @@ es-abstract@^1.17.0-next.1: string.prototype.trimleft "^2.1.1" string.prototype.trimright "^2.1.1" +es-abstract@^1.17.2, es-abstract@^1.19.1: + version "1.19.1" + resolved "https://registry.npmmirror.com/es-abstract/download/es-abstract-1.19.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fes-abstract%2Fdownload%2Fes-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" + integrity sha1-1IhXlodpFpWd547aoN9FZicRXsM= + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.1" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.1" + is-string "^1.0.7" + is-weakref "^1.0.1" + object-inspect "^1.11.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.npm.taobao.org/es-to-primitive/download/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -2961,6 +5182,11 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha1-2M/ccACWXFoBdLSoLqpcBVJ0LkA= + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -3151,16 +5377,16 @@ extsprintf@^1.2.0: resolved "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-1.1.0.tgz?cache=0&sync_timestamp=1575383522243&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" - integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= - fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz?cache=0&sync_timestamp=1575383522243&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU= + fast-json-stable-stringify@2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-json-stable-stringify%2Fdownload%2Ffast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -3176,6 +5402,13 @@ fastparse@^1.1.1: resolved "https://registry.npm.taobao.org/fastparse/download/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" integrity sha1-kXKMWllC7O2FMSg8eUQe5BIsNak= +faye-websocket@0.11.3, faye-websocket@~0.11.1: + version "0.11.3" + resolved "https://registry.nlark.com/faye-websocket/download/faye-websocket-0.11.3.tgz?cache=0&sync_timestamp=1621894499766&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffaye-websocket%2Fdownload%2Ffaye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha1-XA6aiWjokSwoZjn96XeosgnyUI4= + dependencies: + websocket-driver ">=0.5.1" + faye-websocket@^0.10.0: version "0.10.0" resolved "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" @@ -3183,13 +5416,6 @@ faye-websocket@^0.10.0: dependencies: websocket-driver ">=0.5.1" -faye-websocket@~0.11.1: - version "0.11.3" - resolved "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" - integrity sha1-XA6aiWjokSwoZjn96XeosgnyUI4= - dependencies: - websocket-driver ">=0.5.1" - figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.1" resolved "https://registry.npm.taobao.org/figgy-pudding/download/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" @@ -3262,7 +5488,7 @@ find-cache-dir@3.0.0: make-dir "^3.0.0" pkg-dir "^4.1.0" -find-cache-dir@^2.1.0: +find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: version "2.1.0" resolved "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" integrity sha1-jQ+UzRP+Q8bHwmGg2GEVypGMBfc= @@ -3271,6 +5497,15 @@ find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" +find-cache-dir@^3.2.0: + version "3.3.2" + resolved "https://registry.nlark.com/find-cache-dir/download/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" + integrity sha1-swxbbv8HMHMa6pu9nb7L2AJW1ks= + dependencies: + commondir "^1.0.1" + make-dir "^3.0.2" + pkg-dir "^4.1.0" + find-up@^3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/find-up/download/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -3286,6 +5521,26 @@ find-up@^4.0.0: locate-path "^5.0.0" path-exists "^4.0.0" +firebase@^7.6.2: + version "7.24.0" + resolved "https://registry.npmmirror.com/firebase/download/firebase-7.24.0.tgz#dab53b9c0f1c9538d2d6f4f51769897b0b6d60d8" + integrity sha1-2rU7nA8clTjS1vT1F2mJewttYNg= + dependencies: + "@firebase/analytics" "0.6.0" + "@firebase/app" "0.6.11" + "@firebase/app-types" "0.6.1" + "@firebase/auth" "0.15.0" + "@firebase/database" "0.6.13" + "@firebase/firestore" "1.18.0" + "@firebase/functions" "0.5.1" + "@firebase/installations" "0.4.17" + "@firebase/messaging" "0.7.1" + "@firebase/performance" "0.4.2" + "@firebase/polyfill" "0.3.36" + "@firebase/remote-config" "0.1.28" + "@firebase/storage" "0.3.43" + "@firebase/util" "0.3.2" + flatted@^2.0.0: version "2.0.1" resolved "https://registry.npm.taobao.org/flatted/download/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" @@ -3306,6 +5561,11 @@ follow-redirects@^1.0.0: dependencies: debug "^3.0.0" +font-awesome@^4.7.0: + version "4.7.0" + resolved "https://registry.npm.taobao.org/font-awesome/download/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133" + integrity sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM= + for-in@^1.0.2: version "1.0.2" resolved "https://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -3357,6 +5617,15 @@ fs-access@^1.0.0: dependencies: null-check "^1.0.0" +fs-extra@4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/fs-extra/download/fs-extra-4.0.2.tgz?cache=0&sync_timestamp=1620079845472&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffs-extra%2Fdownload%2Ffs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b" + integrity sha1-+RcExT0bRh+JNFKwwwfZmXZHq2s= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^7.0.1: version "7.0.1" resolved "https://registry.npm.taobao.org/fs-extra/download/fs-extra-7.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffs-extra%2Fdownload%2Ffs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -3366,13 +5635,20 @@ fs-extra@^7.0.1: jsonfile "^4.0.0" universalify "^0.1.0" -fs-minipass@^1.2.5: +fs-minipass@^1.2.7: version "1.2.7" - resolved "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-1.2.7.tgz?cache=0&sync_timestamp=1569875077546&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffs-minipass%2Fdownload%2Ffs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + resolved "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" integrity sha1-zP+FcIQef+QmVpPaiJNsVa7X98c= dependencies: minipass "^2.6.0" +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha1-f1A2/b8SxjwWkZDL5BmchSJx+fs= + dependencies: + minipass "^3.0.0" + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.npm.taobao.org/fs-write-stream-atomic/download/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -3401,40 +5677,66 @@ fsevents@~2.1.2: resolved "https://registry.npm.taobao.org/fsevents/download/fsevents-2.1.2.tgz?cache=0&sync_timestamp=1576322957668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" integrity sha1-TAofs0vGjlQ7S4Kp7Dkr+9qECAU= +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.npm.taobao.org/fsevents/download/fsevents-2.3.2.tgz?cache=0&sync_timestamp=1612536409579&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro= + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0= -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.npm.taobao.org/gauge/download/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - genfun@^5.0.0: version "5.0.0" resolved "https://registry.npm.taobao.org/genfun/download/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" integrity sha1-ndlxCgaQClxKW/V6yl2k5S/nZTc= +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.nlark.com/gensync/download/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha1-MqbudsPX9S1GsrGuXZP+qFgKJeA= + +geojson-equality@0.1.6: + version "0.1.6" + resolved "https://registry.npm.taobao.org/geojson-equality/download/geojson-equality-0.1.6.tgz#a171374ef043e5d4797995840bae4648e0752d72" + integrity sha1-oXE3TvBD5dR5eZWEC65GSOB1LXI= + dependencies: + deep-equal "^1.0.0" + +geojson-rbush@2.1.0: + version "2.1.0" + resolved "https://registry.nlark.com/geojson-rbush/download/geojson-rbush-2.1.0.tgz#3bd73be391fc10b0ae693d9b8acea2aae0b83a8d" + integrity sha1-O9c745H8ELCuaT2bis6iquC4Oo0= + dependencies: + "@turf/helpers" "*" + "@turf/meta" "*" + rbush "*" + get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha1-+Xj6TJDR3+f/LWvtoqUV5xO9z0o= -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha1-T5RBKoLbMvNuOwuXQfipf+sDH34= +get-closest@*: + version "0.0.4" + resolved "https://registry.npm.taobao.org/get-closest/download/get-closest-0.0.4.tgz#269ac776d1e6022aa0fd586dd708e8a7d32269af" + integrity sha1-JprHdtHmAiqg/Vht1wjop9Miaa8= + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/get-intrinsic/download/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha1-FfWfN2+FXERpY5SPDSTNNje0q8Y= + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.npm.taobao.org/get-stream/download/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -3442,6 +5744,14 @@ get-stream@^4.0.0, get-stream@^4.1.0: dependencies: pump "^3.0.0" +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/get-symbol-description/download/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha1-f9uByQAQH71WTdXxowr1qtweWNY= + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -3469,22 +5779,17 @@ glob-parent@~5.1.0: dependencies: is-glob "^4.0.1" -glob@7.0.x: - version "7.0.6" - resolved "https://registry.npm.taobao.org/glob/download/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" - integrity sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo= +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.npmmirror.com/glob-parent/download/glob-parent-5.1.2.tgz?cache=0&sync_timestamp=1632954190616&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fglob-parent%2Fdownload%2Fglob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ= dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" + is-glob "^4.0.1" -glob@7.1.4: - version "7.1.4" - resolved "https://registry.npm.taobao.org/glob/download/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha1-qmCKL2xXetNX4a5aXCbZqNGWklU= +glob@7.1.5: + version "7.1.5" + resolved "https://registry.npmmirror.com/glob/download/glob-7.1.5.tgz#6714c69bee20f3c3e64c4dd905553e532b40cdc0" + integrity sha1-ZxTGm+4g88PmTE3ZBVU+UytAzcA= dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -3510,11 +5815,6 @@ globals@^11.1.0: resolved "https://registry.npm.taobao.org/globals/download/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4= -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.npm.taobao.org/globals/download/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo= - globby@^5.0.0: version "5.0.0" resolved "https://registry.npm.taobao.org/globby/download/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" @@ -3555,6 +5855,11 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" integrity sha1-ShL/G2A3bvCYYsIJPt2Qgyi+hCM= +graceful-fs@^4.2.2: + version "4.2.8" + resolved "https://registry.nlark.com/graceful-fs/download/graceful-fs-4.2.8.tgz?cache=0&sync_timestamp=1628194007768&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fgraceful-fs%2Fdownload%2Fgraceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha1-5BK40z9eAGWTy9PO5t+fLOu+gCo= + handle-thing@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/handle-thing/download/handle-thing-2.0.0.tgz#0e039695ff50c93fc288557d696f3c1dc6776754" @@ -3591,6 +5896,11 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/has-bigints/download/has-bigints-1.0.1.tgz?cache=0&sync_timestamp=1615461282623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-bigints%2Fdownload%2Fhas-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha1-ZP5qywIGc+O3jbA1pa9pqp0HsRM= + has-binary2@~1.0.2: version "1.0.3" resolved "https://registry.npm.taobao.org/has-binary2/download/has-binary2-1.0.3.tgz#7776ac627f3ea77250cfc332dab7ddf5e4f5d11d" @@ -3608,15 +5918,27 @@ has-flag@^3.0.0: resolved "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626716578584&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s= + has-symbols@^1.0.0, has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.1.tgz?cache=0&sync_timestamp=1573950719586&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-symbols%2Fdownload%2Fhas-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha1-n1IUdYpEGWxAbZvXbOv4HsLdMeg= -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.npm.taobao.org/has-unicode/download/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= +has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.2.tgz?cache=0&sync_timestamp=1614443617831&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-symbols%2Fdownload%2Fhas-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha1-Fl0wcMADCXUqEjakeTMeOsVvFCM= + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/has-tostringtag/download/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha1-fhM4GKfTlHNPlB5zw9P5KR5liyU= + dependencies: + has-symbols "^1.0.2" has-value@^0.3.1: version "0.3.1" @@ -3649,7 +5971,7 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.3: +has@^1.0.0, has@^1.0.3: version "1.0.3" resolved "https://registry.npm.taobao.org/has/download/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y= @@ -3672,6 +5994,11 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hex-color-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.nlark.com/hex-color-regex/download/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" + integrity sha1-TAb8y0YC/iYCs8k9+C1+fb8aio4= + hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.npm.taobao.org/hmac-drbg/download/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -3681,11 +6008,18 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hosted-git-info@^2.1.4, hosted-git-info@^2.6.0, hosted-git-info@^2.7.1: +hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: version "2.8.5" resolved "https://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" integrity sha1-dZz88sTRVq3lmwst+r3cQqa5xww= +hosted-git-info@^3.0.2: + version "3.0.8" + resolved "https://registry.nlark.com/hosted-git-info/download/hosted-git-info-3.0.8.tgz?cache=0&sync_timestamp=1621254855802&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhosted-git-info%2Fdownload%2Fhosted-git-info-3.0.8.tgz#6e35d4cc87af2c5f816e4cb9ce350ba87a3f370d" + integrity sha1-bjXUzIevLF+Bbky5zjULqHo/Nw0= + dependencies: + lru-cache "^6.0.0" + hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.npm.taobao.org/hpack.js/download/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" @@ -3696,6 +6030,16 @@ hpack.js@^2.1.6: readable-stream "^2.0.1" wbuf "^1.1.0" +hsl-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/hsl-regex/download/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" + integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= + +hsla-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/hsla-regex/download/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" + integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= + html-entities@^1.2.1: version "1.2.1" resolved "https://registry.npm.taobao.org/html-entities/download/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" @@ -3804,13 +6148,18 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha1-ICK0sl+93CHS9SSXSkdKr+czkIs= dependencies: safer-buffer ">= 2.1.2 < 3" +idb@3.0.2: + version "3.0.2" + resolved "https://registry.npmmirror.com/idb/download/idb-3.0.2.tgz?cache=0&sync_timestamp=1634549796511&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fidb%2Fdownload%2Fidb-3.0.2.tgz#c8e9122d5ddd40f13b60ae665e4862f8b13fa384" + integrity sha1-yOkSLV3dQPE7YK5mXkhi+LE/o4Q= + ieee754@^1.1.4: version "1.1.13" resolved "https://registry.npm.taobao.org/ieee754/download/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" @@ -3878,6 +6227,16 @@ imurmurhash@^0.1.4: resolved "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/indent-string/download/indent-string-4.0.0.tgz?cache=0&sync_timestamp=1618679442183&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Findent-string%2Fdownload%2Findent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha1-Yk+PRJfWGbLZdoUx1Y9BIoVNclE= + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/indexes-of/download/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= + indexof@0.0.1: version "0.0.1" resolved "https://registry.npm.taobao.org/indexof/download/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" @@ -3911,15 +6270,15 @@ inherits@2.0.3: resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@1.3.5, ini@^1.3.4, ini@~1.3.0: +ini@1.3.5, ini@^1.3.4: version "1.3.5" resolved "https://registry.npm.taobao.org/ini/download/ini-1.3.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fini%2Fdownload%2Fini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc= -inquirer@6.5.1: - version "6.5.1" - resolved "https://registry.npm.taobao.org/inquirer/download/inquirer-6.5.1.tgz#8bfb7a5ac02dac6ff641ac4c5ff17da112fcdb42" - integrity sha1-i/t6WsAtrG/2QaxMX/F9oRL820I= +inquirer@7.0.0: + version "7.0.0" + resolved "https://registry.npmmirror.com/inquirer/download/inquirer-7.0.0.tgz?cache=0&sync_timestamp=1633472834271&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Finquirer%2Fdownload%2Finquirer-7.0.0.tgz#9e2b032dde77da1db5db804758b8fea3a970519a" + integrity sha1-nisDLd532h2124BHWLj+o6lwUZo= dependencies: ansi-escapes "^4.2.1" chalk "^2.4.2" @@ -3935,6 +6294,11 @@ inquirer@6.5.1: strip-ansi "^5.1.0" through "^2.3.6" +install@^0.13.0: + version "0.13.0" + resolved "https://registry.nlark.com/install/download/install-0.13.0.tgz#6af6e9da9dd0987de2ab420f78e60d9c17260776" + integrity sha1-avbp2p3QmH3iq0IPeOYNnBcmB3Y= + internal-ip@^4.3.0: version "4.3.0" resolved "https://registry.npm.taobao.org/internal-ip/download/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" @@ -3943,6 +6307,15 @@ internal-ip@^4.3.0: default-gateway "^4.2.0" ipaddr.js "^1.9.0" +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/internal-slot/download/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha1-c0fjB97uovqsKsYgXUvH00ln9Zw= + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + invariant@^2.2.2: version "2.2.4" resolved "https://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finvariant%2Fdownload%2Finvariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -3975,6 +6348,11 @@ ipaddr.js@^1.9.0: resolved "https://registry.npm.taobao.org/ipaddr.js/download/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha1-v/OFQ+64mEglB5/zoqjmy9RngbM= +is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.nlark.com/is-absolute-url/download/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= + is-absolute-url@^3.0.3: version "3.0.3" resolved "https://registry.npm.taobao.org/is-absolute-url/download/is-absolute-url-3.0.3.tgz?cache=0&sync_timestamp=1569736493122&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-absolute-url%2Fdownload%2Fis-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" @@ -4004,6 +6382,18 @@ is-arrayish@^0.2.1: resolved "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha1-RXSirlb3qyBolvtDHq7tBm/fjwM= + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.nlark.com/is-bigint/download/is-bigint-1.0.4.tgz?cache=0&sync_timestamp=1628747500062&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-bigint%2Fdownload%2Fis-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha1-CBR6GHW8KzIAXUHM2Ckd/8ZpHfM= + dependencies: + has-bigints "^1.0.1" + is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -4018,6 +6408,14 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.nlark.com/is-boolean-object/download/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha1-XG3CACRt2TIa5LiFoRS7H3X2Nxk= + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -4028,6 +6426,23 @@ is-callable@^1.1.4, is-callable@^1.1.5: resolved "https://registry.npm.taobao.org/is-callable/download/is-callable-1.1.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-callable%2Fdownload%2Fis-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" integrity sha1-9+RrWWiQRW23Tn9ul2yzJz0G+qs= +is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.nlark.com/is-callable/download/is-callable-1.2.4.tgz?cache=0&sync_timestamp=1628259704725&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-callable%2Fdownload%2Fis-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha1-RzAdWN0CWUB4ZVR4U99tYf5HGUU= + +is-color-stop@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/is-color-stop/download/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" + integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= + dependencies: + css-color-names "^0.0.4" + hex-color-regex "^1.1.0" + hsl-regex "^1.0.0" + hsla-regex "^1.0.0" + rgb-regex "^1.0.1" + rgba-regex "^1.0.0" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -4070,6 +6485,11 @@ is-directory@^0.3.1: resolved "https://registry.npm.taobao.org/is-directory/download/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.nlark.com/is-docker/download/is-docker-2.2.1.tgz?cache=0&sync_timestamp=1630451108035&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-docker%2Fdownload%2Fis-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha1-M+6r4jz+hvFL3kQIoCwM+4U6zao= + is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -4087,13 +6507,6 @@ is-extglob@^2.1.0, is-extglob@^2.1.1: resolved "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.npm.taobao.org/is-finite/download/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= - dependencies: - number-is-nan "^1.0.0" - is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" @@ -4125,6 +6538,23 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/is-interactive/download/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha1-zqbmrlyHCnsKAAQHC3tYfgJSkS4= + +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/is-negative-zero/download/is-negative-zero-2.0.1.tgz?cache=0&sync_timestamp=1607123324574&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-negative-zero%2Fdownload%2Fis-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha1-PedGwY3aIxkkGlNnWQjY92bxHCQ= + +is-number-object@^1.0.4: + version "1.0.6" + resolved "https://registry.nlark.com/is-number-object/download/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha1-anqvg4x/BoalC0VT9+VKlklOifA= + dependencies: + has-tostringtag "^1.0.0" + is-number@^3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -4137,6 +6567,11 @@ is-number@^7.0.0: resolved "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss= +is-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/is-obj/download/is-obj-2.0.0.tgz?cache=0&sync_timestamp=1618600242427&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-obj%2Fdownload%2Fis-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" + integrity sha1-Rz+wXZc3BeP9liBUUBjKjiLvSYI= + is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/is-path-cwd/download/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" @@ -4199,11 +6634,36 @@ is-regex@^1.0.4, is-regex@^1.0.5: dependencies: has "^1.0.3" +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.nlark.com/is-regex/download/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha1-7vVmPNWfpMCuM5UFMj32hUuxWVg= + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-resolvable@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + integrity sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg= + +is-shared-array-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.npmmirror.com/is-shared-array-buffer/download/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" + integrity sha1-l7DIX72stZycRG/mU7gs8rW3z+Y= + is-stream@^1.1.0: version "1.1.0" resolved "https://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.nlark.com/is-string/download/is-string-1.0.7.tgz?cache=0&sync_timestamp=1628213433356&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-string%2Fdownload%2Fis-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha1-DdEr8gBvJVu1j2lREO/3SR7rwP0= + dependencies: + has-tostringtag "^1.0.0" + is-symbol@^1.0.2: version "1.0.3" resolved "https://registry.npm.taobao.org/is-symbol/download/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" @@ -4211,11 +6671,25 @@ is-symbol@^1.0.2: dependencies: has-symbols "^1.0.1" +is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.nlark.com/is-symbol/download/is-symbol-1.0.4.tgz?cache=0&sync_timestamp=1620502244179&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-symbol%2Fdownload%2Fis-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha1-ptrJO2NbBjymhyI23oiRClevE5w= + dependencies: + has-symbols "^1.0.2" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-weakref@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/is-weakref/download/is-weakref-1.0.1.tgz#842dba4ec17fa9ac9850df2d6efbc1737274f2a2" + integrity sha1-hC26TsF/qayYUN8tbvvBc3J08qI= + dependencies: + call-bind "^1.0.0" + is-windows@^1.0.2: version "1.0.2" resolved "https://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -4226,6 +6700,13 @@ is-wsl@^1.1.0: resolved "https://registry.npm.taobao.org/is-wsl/download/is-wsl-1.1.0.tgz?cache=0&sync_timestamp=1569219566107&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-wsl%2Fdownload%2Fis-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= +is-wsl@^2.1.0: + version "2.2.0" + resolved "https://registry.npm.taobao.org/is-wsl/download/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha1-dKTHbnfKn9P5MvKQwX6jJs0VcnE= + dependencies: + is-docker "^2.0.0" + isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -4284,26 +6765,16 @@ istanbul-api@^2.1.6: minimatch "^3.0.4" once "^1.4.0" -istanbul-instrumenter-loader@3.0.1: - version "3.0.1" - resolved "https://registry.npm.taobao.org/istanbul-instrumenter-loader/download/istanbul-instrumenter-loader-3.0.1.tgz#9957bd59252b373fae5c52b7b5188e6fde2a0949" - integrity sha1-mVe9WSUrNz+uXFK3tRiOb94qCUk= - dependencies: - convert-source-map "^1.5.0" - istanbul-lib-instrument "^1.7.3" - loader-utils "^1.1.0" - schema-utils "^0.3.0" - -istanbul-lib-coverage@^1.2.1: - version "1.2.1" - resolved "https://registry.npm.taobao.org/istanbul-lib-coverage/download/istanbul-lib-coverage-1.2.1.tgz?cache=0&sync_timestamp=1577062400885&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fistanbul-lib-coverage%2Fdownload%2Fistanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" - integrity sha1-zPftzQoLubj3Kf7rCTBHD5r2ZPA= - istanbul-lib-coverage@^2.0.5: version "2.0.5" resolved "https://registry.npm.taobao.org/istanbul-lib-coverage/download/istanbul-lib-coverage-2.0.5.tgz?cache=0&sync_timestamp=1577062400885&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fistanbul-lib-coverage%2Fdownload%2Fistanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" integrity sha1-Z18KtpUD+tSx2En3NrqsqAM0T0k= +istanbul-lib-coverage@^3.0.0: + version "3.2.0" + resolved "https://registry.npmmirror.com/istanbul-lib-coverage/download/istanbul-lib-coverage-3.2.0.tgz?cache=0&sync_timestamp=1634527209200&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fistanbul-lib-coverage%2Fdownload%2Fistanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" + integrity sha1-GJ55CdCjn6Wj361bA/cZR3cBkdM= + istanbul-lib-hook@^2.0.7: version "2.0.7" resolved "https://registry.npm.taobao.org/istanbul-lib-hook/download/istanbul-lib-hook-2.0.7.tgz#c95695f383d4f8f60df1f04252a9550e15b5b133" @@ -4311,19 +6782,6 @@ istanbul-lib-hook@^2.0.7: dependencies: append-transform "^1.0.0" -istanbul-lib-instrument@^1.7.3: - version "1.10.2" - resolved "https://registry.npm.taobao.org/istanbul-lib-instrument/download/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" - integrity sha1-H1XtEKw8R/K93dUweTUSZ1TQqco= - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.2.1" - semver "^5.3.0" - istanbul-lib-instrument@^3.3.0: version "3.3.0" resolved "https://registry.npm.taobao.org/istanbul-lib-instrument/download/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630" @@ -4337,6 +6795,16 @@ istanbul-lib-instrument@^3.3.0: istanbul-lib-coverage "^2.0.5" semver "^6.0.0" +istanbul-lib-instrument@^4.0.0: + version "4.0.3" + resolved "https://registry.npmmirror.com/istanbul-lib-instrument/download/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" + integrity sha1-hzxv/4l0UBGCIndGlqPyiQLXfB0= + dependencies: + "@babel/core" "^7.7.5" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.0.0" + semver "^6.3.0" + istanbul-lib-report@^2.0.8: version "2.0.8" resolved "https://registry.npm.taobao.org/istanbul-lib-report/download/istanbul-lib-report-2.0.8.tgz?cache=0&sync_timestamp=1577062405578&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fistanbul-lib-report%2Fdownload%2Fistanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33" @@ -4408,6 +6876,14 @@ jest-worker@24.9.0: merge-stream "^2.0.0" supports-color "^6.1.0" +jest-worker@^25.1.0: + version "25.5.0" + resolved "https://registry.npmmirror.com/jest-worker/download/jest-worker-25.5.0.tgz?cache=0&sync_timestamp=1634626737887&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fjest-worker%2Fdownload%2Fjest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1" + integrity sha1-JhHQcbec6g9D7lej0RhZOsFUfbE= + dependencies: + merge-stream "^2.0.0" + supports-color "^7.0.0" + js-levenshtein@^1.1.3: version "1.1.6" resolved "https://registry.npm.taobao.org/js-levenshtein/download/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" @@ -4436,11 +6912,6 @@ jsbn@~0.1.0: resolved "https://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.npm.taobao.org/jsesc/download/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - jsesc@^2.5.1: version "2.5.2" resolved "https://registry.npm.taobao.org/jsesc/download/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -4456,11 +6927,6 @@ json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-bet resolved "https://registry.npm.taobao.org/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk= -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -4495,6 +6961,13 @@ json5@^2.1.0: dependencies: minimist "^1.2.0" +json5@^2.1.2: + version "2.2.0" + resolved "https://registry.npm.taobao.org/json5/download/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha1-Lf7+cgxrpSXZ69kJlQ8FFTFsiaM= + dependencies: + minimist "^1.2.5" + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.npm.taobao.org/jsonfile/download/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -4640,10 +7113,10 @@ less-loader@5.0.0: loader-utils "^1.1.0" pify "^4.0.1" -less@3.9.0: - version "3.9.0" - resolved "https://registry.npm.taobao.org/less/download/less-3.9.0.tgz#b7511c43f37cf57dc87dffd9883ec121289b1474" - integrity sha1-t1EcQ/N89X3Iff/ZiD7BISibFHQ= +less@3.10.3: + version "3.10.3" + resolved "https://registry.npmmirror.com/less/download/less-3.10.3.tgz#417a0975d5eeecc52cff4bcfa3c09d35781e6792" + integrity sha1-QXoJddXu7MUs/0vPo8CdNXgeZ5I= dependencies: clone "^2.1.2" optionalDependencies: @@ -4656,10 +7129,10 @@ less@3.9.0: request "^2.83.0" source-map "~0.6.0" -license-webpack-plugin@2.1.2: - version "2.1.2" - resolved "https://registry.npm.taobao.org/license-webpack-plugin/download/license-webpack-plugin-2.1.2.tgz?cache=0&sync_timestamp=1571015201302&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flicense-webpack-plugin%2Fdownload%2Flicense-webpack-plugin-2.1.2.tgz#63f7c571537a450ec47dc98f5d5ffdbca7b3b14f" - integrity sha1-Y/fFcVN6RQ7EfcmPXV/9vKezsU8= +license-webpack-plugin@2.1.3: + version "2.1.3" + resolved "https://registry.npmmirror.com/license-webpack-plugin/download/license-webpack-plugin-2.1.3.tgz#656fa6a8b2e711ee35c27ac8e1659a87240ef7f3" + integrity sha1-ZW+mqLLnEe41wnrI4WWahyQO9/M= dependencies: "@types/webpack-sources" "^0.1.5" webpack-sources "^1.2.0" @@ -4671,12 +7144,17 @@ lie@~3.3.0: dependencies: immediate "~3.0.5" +lineclip@^1.1.5: + version "1.1.5" + resolved "https://registry.nlark.com/lineclip/download/lineclip-1.1.5.tgz#2bf26067d94354feabf91e42768236db5616fd13" + integrity sha1-K/JgZ9lDVP6r+R5CdoI221YW/RM= + loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.npm.taobao.org/loader-runner/download/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" integrity sha1-7UcGa/5TTX6ExMe5mYwqdWB9k1c= -loader-utils@1.2.3, loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: +loader-utils@1.2.3, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: version "1.2.3" resolved "https://registry.npm.taobao.org/loader-utils/download/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" integrity sha1-H/XcaRHJ8KBiUxpMBLYJQGEIwsc= @@ -4700,16 +7178,38 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.npm.taobao.org/lodash.camelcase/download/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= + lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.npm.taobao.org/lodash.clonedeep/download/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= -lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5: +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.npm.taobao.org/lodash.memoize/download/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= + +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.nlark.com/lodash.uniq/download/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= + +lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4: version "4.17.15" resolved "https://registry.npm.taobao.org/lodash/download/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg= +log-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/log-symbols/download/log-symbols-3.0.0.tgz?cache=0&sync_timestamp=1618723146520&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flog-symbols%2Fdownload%2Flog-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha1-86CFFqXeqJMzan3uFNGKHP2rd8Q= + dependencies: + chalk "^2.4.2" + log4js@^4.0.0: version "4.5.1" resolved "https://registry.npm.taobao.org/log4js/download/log4js-4.5.1.tgz#e543625e97d9e6f3e6e7c9fc196dd6ab2cae30b5" @@ -4726,6 +7226,11 @@ loglevel@^1.6.4: resolved "https://registry.npm.taobao.org/loglevel/download/loglevel-1.6.6.tgz?cache=0&sync_timestamp=1573148120654&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floglevel%2Fdownload%2Floglevel-1.6.6.tgz#0ee6300cc058db6b3551fa1c4bf73b83bb771312" integrity sha1-DuYwDMBY22s1UfocS/c7g7t3ExI= +long@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/long/download/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha1-mntxz7fTYaGU6lVSQckvdGjVvyg= + loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.npm.taobao.org/loose-envify/download/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -4748,10 +7253,17 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -magic-string@0.25.3: - version "0.25.3" - resolved "https://registry.npm.taobao.org/magic-string/download/magic-string-0.25.3.tgz#34b8d2a2c7fec9d9bdf9929a3fd81d271ef35be9" - integrity sha1-NLjSosf+ydm9+ZKaP9gdJx7zW+k= +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.nlark.com/lru-cache/download/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ= + dependencies: + yallist "^4.0.0" + +magic-string@0.25.4: + version "0.25.4" + resolved "https://registry.npm.taobao.org/magic-string/download/magic-string-0.25.4.tgz#325b8a0a79fc423db109b77fd5a19183b7ba5143" + integrity sha1-MluKCnn8Qj2xCbd/1aGRg7e6UUM= dependencies: sourcemap-codec "^1.4.4" @@ -4777,6 +7289,13 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" +make-dir@^3.0.2: + version "3.1.0" + resolved "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8= + dependencies: + semver "^6.0.0" + make-error@^1.1.1: version "1.3.5" resolved "https://registry.npm.taobao.org/make-error/download/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" @@ -4832,6 +7351,16 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +mdn-data@2.0.14: + version "2.0.14" + resolved "https://registry.nlark.com/mdn-data/download/mdn-data-2.0.14.tgz?cache=0&sync_timestamp=1631835908136&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" + integrity sha1-cRP8QoGRfWPOKbQ0RvcB5owlulA= + +mdn-data@2.0.4: + version "2.0.4" + resolved "https://registry.nlark.com/mdn-data/download/mdn-data-2.0.4.tgz?cache=0&sync_timestamp=1631835908136&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" + integrity sha1-aZs8OKxvHXKAkaZGULZdOIUC/Vs= + media-typer@0.3.0: version "0.3.0" resolved "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -4846,7 +7375,7 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -memory-fs@^0.4.0, memory-fs@^0.4.1: +memory-fs@^0.4.1: version "0.4.1" resolved "https://registry.npm.taobao.org/memory-fs/download/memory-fs-0.4.1.tgz?cache=0&sync_timestamp=1570537491040&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmemory-fs%2Fdownload%2Fmemory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= @@ -4867,6 +7396,13 @@ merge-descriptors@1.0.1: resolved "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= +merge-source-map@^1.1.0: + version "1.1.0" + resolved "https://registry.nlark.com/merge-source-map/download/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" + integrity sha1-L93n5gIJOfcJBqaPLXrmheTIxkY= + dependencies: + source-map "^0.6.1" + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/merge-stream/download/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -4968,12 +7504,38 @@ minimist@^1.2.0: resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= +minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI= + minimist@~0.0.1: version "0.0.10" resolved "https://registry.npm.taobao.org/minimist/download/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/minipass-collect/download/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha1-IrgTv3Rdxu26JXa5QAIq1u3Ixhc= + dependencies: + minipass "^3.0.0" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.nlark.com/minipass-flush/download/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha1-gucTXX6JpQ/+ZGEKeHlTxMTLs3M= + dependencies: + minipass "^3.0.0" + +minipass-pipeline@^1.2.2: + version "1.2.4" + resolved "https://registry.npm.taobao.org/minipass-pipeline/download/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha1-aEcveXEcCEZXwGfFxq2Tzd6oIUw= + dependencies: + minipass "^3.0.0" + +minipass@^2.3.5, minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" resolved "https://registry.npm.taobao.org/minipass/download/minipass-2.9.0.tgz?cache=0&sync_timestamp=1571953917221&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminipass%2Fdownload%2Fminipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha1-5xN2Ln0+Mv7YAxFc+T4EvKn8yaY= @@ -4981,7 +7543,14 @@ minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.2.1: +minipass@^3.0.0, minipass@^3.1.1: + version "3.1.5" + resolved "https://registry.nlark.com/minipass/download/minipass-3.1.5.tgz?cache=0&sync_timestamp=1631656307506&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fminipass%2Fdownload%2Fminipass-3.1.5.tgz#71f6251b0a33a49c01b3cf97ff77eda030dff732" + integrity sha1-cfYlGwozpJwBs8+X/3ftoDDf9zI= + dependencies: + yallist "^4.0.0" + +minizlib@^1.3.3: version "1.3.3" resolved "https://registry.npm.taobao.org/minizlib/download/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" integrity sha1-IpDeloGKNMKVUcio0wEha9Zahh0= @@ -5012,13 +7581,20 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" +mkdirp@^0.5.5, mkdirp@~0.5.1, mkdirp@~0.5.x: + version "0.5.5" + resolved "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.5.tgz?cache=0&sync_timestamp=1604053732604&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8= + dependencies: + minimist "^1.2.5" + move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" @@ -5086,15 +7662,6 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" -needle@^2.2.1: - version "2.4.0" - resolved "https://registry.npm.taobao.org/needle/download/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" - integrity sha1-aDPnSXXERGQlkOFadQKIxfk5tXw= - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -5105,6 +7672,46 @@ neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: resolved "https://registry.npm.taobao.org/neo-async/download/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha1-rCetpmFn+ohJpq3dg39rGJrSCBw= +ng-zorro-antd@^9.3.0: + version "9.3.0" + resolved "https://registry.nlark.com/ng-zorro-antd/download/ng-zorro-antd-9.3.0.tgz#f80dbe2715e578c475728773449442f0099f152c" + integrity sha1-+A2+JxXleMR1codzRJRC8AmfFSw= + dependencies: + "@angular/cdk" "^9.0.0" + "@ant-design/icons-angular" "^9.0.0" + date-fns "^2.10.0" + resize-observer-polyfill "^1.5.1" + tslib "^1.10.0" + +ngx-cookie-service@^3.0.2: + version "3.1.3" + resolved "https://registry.nlark.com/ngx-cookie-service/download/ngx-cookie-service-3.1.3.tgz#1d2d144170036e8ab823a2a7c8cc62f8edf81f3d" + integrity sha1-HS0UQXADboq4I6KnyMxi+O34Hz0= + dependencies: + tslib "^1.10.0" + +ngx-countdown@^11.0.0: + version "11.0.3" + resolved "https://registry.nlark.com/ngx-countdown/download/ngx-countdown-11.0.3.tgz#5468581cb7ffcdc9230b8d13a7f18f8aff7e0263" + integrity sha1-VGhYHLf/zckjC40Tp/GPiv9+AmM= + dependencies: + tslib "^2.0.0" + +ngx-echarts@^4.2.2: + version "4.2.2" + resolved "https://registry.nlark.com/ngx-echarts/download/ngx-echarts-4.2.2.tgz#9eb5f69f923084869ea014f117915cd6cc366343" + integrity sha1-nrX2n5IwhIaeoBTxF5Fc1sw2Y0M= + dependencies: + tslib "^1.9.0" + +ngx-perfect-scrollbar@^8.0.0: + version "8.0.0" + resolved "https://registry.nlark.com/ngx-perfect-scrollbar/download/ngx-perfect-scrollbar-8.0.0.tgz#19c1bbf9b1a36d89b00a68f7834e39427d29182f" + integrity sha1-GcG7+bGjbYmwCmj3g045Qn0pGC8= + dependencies: + perfect-scrollbar "^1.4.0" + resize-observer-polyfill "^1.5.0" + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.npm.taobao.org/nice-try/download/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -5119,6 +7726,11 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" +node-fetch@2.6.1: + version "2.6.1" + resolved "https://registry.npmmirror.com/node-fetch/download/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha1-BFvTI2Mfdu0uK1VXM5RBa2OaAFI= + node-forge@0.9.0: version "0.9.0" resolved "https://registry.npm.taobao.org/node-forge/download/node-forge-0.9.0.tgz?cache=0&sync_timestamp=1569524669712&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-forge%2Fdownload%2Fnode-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579" @@ -5153,36 +7765,17 @@ node-libs-browser@^2.2.1: util "^0.11.0" vm-browserify "^1.0.1" -node-pre-gyp@*: - version "0.14.0" - resolved "https://registry.npm.taobao.org/node-pre-gyp/download/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" - integrity sha1-mgWWUzuHcom8rU4UOYLKPZBN3IM= - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4.4.2" - -node-releases@^1.1.25, node-releases@^1.1.44: +node-releases@^1.1.44: version "1.1.44" resolved "https://registry.npm.taobao.org/node-releases/download/node-releases-1.1.44.tgz#cd66438a6eb875e3eb012b6a12e48d9f4326ffd7" integrity sha1-zWZDim64dePrAStqEuSNn0Mm/9c= dependencies: semver "^6.3.0" -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.npm.taobao.org/nopt/download/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= - dependencies: - abbrev "1" - osenv "^0.1.4" +node-releases@^2.0.1: + version "2.0.1" + resolved "https://registry.npmmirror.com/node-releases/download/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" + integrity sha1-PR05XyBPHy8ppUNYuftnh2WtL8U= normalize-package-data@^2.0.0, normalize-package-data@^2.4.0: version "2.5.0" @@ -5221,6 +7814,11 @@ normalize-url@1.9.1: query-string "^4.1.0" sort-keys "^1.0.0" +normalize-url@^3.0.0: + version "3.3.0" + resolved "https://registry.nlark.com/normalize-url/download/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" + integrity sha1-suHE3E98bVd0PfczpPWXjRhlBVk= + npm-bundled@^1.0.1: version "1.1.1" resolved "https://registry.npm.taobao.org/npm-bundled/download/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" @@ -5233,17 +7831,7 @@ npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: resolved "https://registry.npm.taobao.org/npm-normalize-package-bin/download/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" integrity sha1-bnmkHyP9I1wGIyGCKNp9nCO49uI= -npm-package-arg@6.1.0: - version "6.1.0" - resolved "https://registry.npm.taobao.org/npm-package-arg/download/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" - integrity sha1-Fa4eJ1ilAn77TCUFVLhac323/ME= - dependencies: - hosted-git-info "^2.6.0" - osenv "^0.1.5" - semver "^5.5.0" - validate-npm-package-name "^3.0.0" - -npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: +npm-package-arg@6.1.1, npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: version "6.1.1" resolved "https://registry.npm.taobao.org/npm-package-arg/download/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" integrity sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc= @@ -5253,7 +7841,17 @@ npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.12, npm-packlist@^1.1.6: +npm-package-arg@^7.0.0: + version "7.0.0" + resolved "https://registry.nlark.com/npm-package-arg/download/npm-package-arg-7.0.0.tgz?cache=0&sync_timestamp=1623784558058&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnpm-package-arg%2Fdownload%2Fnpm-package-arg-7.0.0.tgz#52cdf08b491c0c59df687c4c925a89102ef794a5" + integrity sha1-Us3wi0kcDFnfaHxMklqJEC73lKU= + dependencies: + hosted-git-info "^3.0.2" + osenv "^0.1.5" + semver "^5.6.0" + validate-npm-package-name "^3.0.0" + +npm-packlist@^1.1.12: version "1.4.7" resolved "https://registry.npm.taobao.org/npm-packlist/download/npm-packlist-1.4.7.tgz#9e954365a06b80b18111ea900945af4f88ed4848" integrity sha1-npVDZaBrgLGBEeqQCUWvT4jtSEg= @@ -5261,7 +7859,7 @@ npm-packlist@^1.1.12, npm-packlist@^1.1.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" -npm-pick-manifest@3.0.2: +npm-pick-manifest@3.0.2, npm-pick-manifest@^3.0.0: version "3.0.2" resolved "https://registry.npm.taobao.org/npm-pick-manifest/download/npm-pick-manifest-3.0.2.tgz?cache=0&sync_timestamp=1576390636485&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnpm-pick-manifest%2Fdownload%2Fnpm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" integrity sha1-9Nnl/UviFT5fTl+be+jcQZqZq7c= @@ -5270,15 +7868,6 @@ npm-pick-manifest@3.0.2: npm-package-arg "^6.0.0" semver "^5.4.1" -npm-pick-manifest@^2.2.3: - version "2.2.3" - resolved "https://registry.npm.taobao.org/npm-pick-manifest/download/npm-pick-manifest-2.2.3.tgz?cache=0&sync_timestamp=1576390636485&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnpm-pick-manifest%2Fdownload%2Fnpm-pick-manifest-2.2.3.tgz#32111d2a9562638bb2c8f2bf27f7f3092c8fae40" - integrity sha1-MhEdKpViY4uyyPK/J/fzCSyPrkA= - dependencies: - figgy-pudding "^3.5.1" - npm-package-arg "^6.0.0" - semver "^5.4.1" - npm-registry-fetch@^4.0.0: version "4.0.2" resolved "https://registry.npm.taobao.org/npm-registry-fetch/download/npm-registry-fetch-4.0.2.tgz#2b1434f93ccbe6b6385f8e45f45db93e16921d7a" @@ -5299,15 +7888,12 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.npm.taobao.org/npmlog/download/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha1-CKfyqL9zRgR3mp76StXMcXq7lUs= +nth-check@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/nth-check/download/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha1-sr0pXDfj3VijvwcAN2Zjuk2c8Fw= dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" + boolbase "~1.0.0" null-check@^1.0.0: version "1.0.0" @@ -5329,9 +7915,9 @@ oauth-sign@~0.9.0: resolved "https://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU= -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@*, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" - resolved "https://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + resolved "https://registry.nlark.com/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= object-component@0.0.3: @@ -5348,6 +7934,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-inspect@^1.11.0, object-inspect@^1.9.0: + version "1.11.0" + resolved "https://registry.nlark.com/object-inspect/download/object-inspect-1.11.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" + integrity sha1-nc6xRs7dQUig2eUauI00z1CZIrE= + object-inspect@^1.7.0: version "1.7.0" resolved "https://registry.npm.taobao.org/object-inspect/download/object-inspect-1.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" @@ -5380,6 +7971,16 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.nlark.com/object.assign/download/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha1-DtVKNC7Os3s4/3brgxoOeIy2OUA= + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + object.getownpropertydescriptors@^2.0.3: version "2.1.0" resolved "https://registry.npm.taobao.org/object.getownpropertydescriptors/download/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" @@ -5388,6 +7989,15 @@ object.getownpropertydescriptors@^2.0.3: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +object.getownpropertydescriptors@^2.1.0: + version "2.1.3" + resolved "https://registry.npmmirror.com/object.getownpropertydescriptors/download/object.getownpropertydescriptors-2.1.3.tgz?cache=0&sync_timestamp=1633321702182&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fobject.getownpropertydescriptors%2Fdownload%2Fobject.getownpropertydescriptors-2.1.3.tgz#b223cf38e17fefb97a63c10c91df72ccb386df9e" + integrity sha1-siPPOOF/77l6Y8EMkd9yzLOG354= + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + object.pick@^1.3.0: version "1.3.0" resolved "https://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -5395,6 +8005,15 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" +object.values@^1.1.0: + version "1.1.5" + resolved "https://registry.npmmirror.com/object.values/download/object.values-1.1.5.tgz?cache=0&sync_timestamp=1633327129170&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fobject.values%2Fdownload%2Fobject.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha1-lZ9j486e8QhyAzMIITHkpFm3Fqw= + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.npm.taobao.org/obuf/download/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" @@ -5426,12 +8045,12 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -open@6.4.0: - version "6.4.0" - resolved "https://registry.npm.taobao.org/open/download/open-6.4.0.tgz?cache=0&sync_timestamp=1571165370049&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fopen%2Fdownload%2Fopen-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" - integrity sha1-XBPpbQ3IlGhhZPGJZez+iJ7PyKk= +open@7.0.0: + version "7.0.0" + resolved "https://registry.npmmirror.com/open/download/open-7.0.0.tgz#7e52999b14eb73f90f0f0807fe93897c4ae73ec9" + integrity sha1-flKZmxTrc/kPDwgH/pOJfErnPsk= dependencies: - is-wsl "^1.1.0" + is-wsl "^2.1.0" opn@^5.5.0: version "5.5.0" @@ -5448,6 +8067,19 @@ optimist@^0.6.1, optimist@~0.6.0: minimist "~0.0.1" wordwrap "~0.0.2" +ora@4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/ora/download/ora-4.0.2.tgz?cache=0&sync_timestamp=1631556531519&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fora%2Fdownload%2Fora-4.0.2.tgz#0e1e68fd45b135d28648b27cf08081fa6e8a297d" + integrity sha1-Dh5o/UWxNdKGSLJ88ICB+m6KKX0= + dependencies: + chalk "^2.4.2" + cli-cursor "^3.1.0" + cli-spinners "^2.2.0" + is-interactive "^1.0.0" + log-symbols "^3.0.0" + strip-ansi "^5.2.0" + wcwidth "^1.0.1" + original@^1.0.0: version "1.0.2" resolved "https://registry.npm.taobao.org/original/download/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" @@ -5479,7 +8111,7 @@ os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: resolved "https://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -osenv@^0.1.4, osenv@^0.1.5: +osenv@^0.1.5: version "0.1.5" resolved "https://registry.npm.taobao.org/osenv/download/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" integrity sha1-hc36+uso6Gd/QW4odZK18/SepBA= @@ -5509,6 +8141,13 @@ p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.1: dependencies: p-try "^2.0.0" +p-limit@^2.2.2: + version "2.3.0" + resolved "https://registry.nlark.com/p-limit/download/p-limit-2.3.0.tgz?cache=0&sync_timestamp=1628813055527&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fp-limit%2Fdownload%2Fp-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE= + dependencies: + p-try "^2.0.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/p-locate/download/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -5528,6 +8167,13 @@ p-map@^2.0.0: resolved "https://registry.npm.taobao.org/p-map/download/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" integrity sha1-MQko/u+cnsxltosXaTAYpmXOoXU= +p-map@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/p-map/download/p-map-3.0.0.tgz?cache=0&sync_timestamp=1627082442645&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fp-map%2Fdownload%2Fp-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" + integrity sha1-1wTZr4orpoTiYA2aIVmD1BQal50= + dependencies: + aggregate-error "^3.0.0" + p-retry@^3.0.1: version "3.0.1" resolved "https://registry.npm.taobao.org/p-retry/download/p-retry-3.0.1.tgz?cache=0&sync_timestamp=1572521210242&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-retry%2Fdownload%2Fp-retry-3.0.1.tgz#316b4c8893e2c8dc1cfa891f406c4b422bebf328" @@ -5540,13 +8186,14 @@ p-try@^2.0.0: resolved "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha1-yyhoVA4xPWHeWPr741zpAE1VQOY= -pacote@9.5.5: - version "9.5.5" - resolved "https://registry.npm.taobao.org/pacote/download/pacote-9.5.5.tgz#63355a393614c3424e735820c3731e2cbbedaeeb" - integrity sha1-YzVaOTYUw0JOc1ggw3MeLLvtrus= +pacote@9.5.8: + version "9.5.8" + resolved "https://registry.npmmirror.com/pacote/download/pacote-9.5.8.tgz#23480efdc4fa74515855c9ecf39cf64078f99786" + integrity sha1-I0gO/cT6dFFYVcns85z2QHj5l4Y= dependencies: bluebird "^3.5.3" cacache "^12.0.2" + chownr "^1.1.2" figgy-pudding "^3.5.1" get-stream "^4.1.0" glob "^7.1.3" @@ -5560,7 +8207,7 @@ pacote@9.5.5: normalize-package-data "^2.4.0" npm-package-arg "^6.1.0" npm-packlist "^1.1.12" - npm-pick-manifest "^2.2.3" + npm-pick-manifest "^3.0.0" npm-registry-fetch "^4.0.0" osenv "^0.1.5" promise-inflight "^1.0.1" @@ -5570,7 +8217,7 @@ pacote@9.5.5: safe-buffer "^5.1.2" semver "^5.6.0" ssri "^6.0.1" - tar "^4.4.8" + tar "^4.4.10" unique-filename "^1.1.1" which "^1.3.1" @@ -5705,16 +8352,36 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" +perfect-scrollbar@^1.4.0: + version "1.5.3" + resolved "https://registry.npmmirror.com/perfect-scrollbar/download/perfect-scrollbar-1.5.3.tgz#dbdd84071f8460db9ff893214ed501596ad9dc5a" + integrity sha1-292EBx+EYNuf+JMhTtUBWWrZ3Fo= + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +picocolors@^0.2.1: + version "0.2.1" + resolved "https://registry.npmmirror.com/picocolors/download/picocolors-0.2.1.tgz?cache=0&sync_timestamp=1634093378416&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fpicocolors%2Fdownload%2Fpicocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" + integrity sha1-VwZw95NkaFHRuhNZlpYqutWHhZ8= + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmmirror.com/picocolors/download/picocolors-1.0.0.tgz?cache=0&sync_timestamp=1634093378416&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fpicocolors%2Fdownload%2Fpicocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha1-y1vcdP8/UYkiNur3nWi8RFZKuBw= + picomatch@^2.0.4, picomatch@^2.0.7: version "2.2.1" resolved "https://registry.npm.taobao.org/picomatch/download/picomatch-2.2.1.tgz?cache=0&sync_timestamp=1578174759917&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpicomatch%2Fdownload%2Fpicomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" integrity sha1-IbrIiLbthgH4Mc54FuM1vHefCko= +picomatch@^2.2.1: + version "2.3.0" + resolved "https://registry.nlark.com/picomatch/download/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI= + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -5756,68 +8423,341 @@ pkg-dir@^4.1.0: dependencies: find-up "^4.0.0" +point-in-polygon@^1.1.0: + version "1.1.0" + resolved "https://registry.nlark.com/point-in-polygon/download/point-in-polygon-1.1.0.tgz#b0af2616c01bdee341cbf2894df643387ca03357" + integrity sha1-sK8mFsAb3uNBy/KJTfZDOHygM1c= + portfinder@^1.0.25: version "1.0.25" resolved "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" integrity sha1-JU/TN/+6hp9LnTftwpgFnLTTXso= dependencies: - async "^2.6.2" - debug "^3.1.1" - mkdirp "^0.5.1" + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.1" + +positioning@^2.0.1: + version "2.0.1" + resolved "https://registry.nlark.com/positioning/download/positioning-2.0.1.tgz#4f1b3a65ed4b830e0922a3fcdf6de58a545bd398" + integrity sha1-Txs6Ze1Lgw4JIqP8323lilRb05g= + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +postcss-calc@^7.0.1: + version "7.0.5" + resolved "https://registry.npm.taobao.org/postcss-calc/download/postcss-calc-7.0.5.tgz#f8a6e99f12e619c2ebc23cf6c486fdc15860933e" + integrity sha1-+KbpnxLmGcLrwjz2xIb9wVhgkz4= + dependencies: + postcss "^7.0.27" + postcss-selector-parser "^6.0.2" + postcss-value-parser "^4.0.2" + +postcss-colormin@^4.0.3: + version "4.0.3" + resolved "https://registry.nlark.com/postcss-colormin/download/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" + integrity sha1-rgYLzpPteUrHEmTwgTLVUJVr04E= + dependencies: + browserslist "^4.0.0" + color "^3.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-convert-values@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-convert-values/download/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" + integrity sha1-yjgT7U2g+BL51DcDWE5Enr4Ymn8= + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-discard-comments@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-discard-comments/download/postcss-discard-comments-4.0.2.tgz?cache=0&sync_timestamp=1621449811540&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-discard-comments%2Fdownload%2Fpostcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" + integrity sha1-H7q9LCRr/2qq15l7KwkY9NevQDM= + dependencies: + postcss "^7.0.0" + +postcss-discard-duplicates@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-discard-duplicates/download/postcss-discard-duplicates-4.0.2.tgz?cache=0&sync_timestamp=1621449811996&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-discard-duplicates%2Fdownload%2Fpostcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" + integrity sha1-P+EzzTyCKC5VD8myORdqkge3hOs= + dependencies: + postcss "^7.0.0" + +postcss-discard-empty@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-discard-empty/download/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" + integrity sha1-yMlR6fc+2UKAGUWERKAq2Qu592U= + dependencies: + postcss "^7.0.0" + +postcss-discard-overridden@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-discard-overridden/download/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" + integrity sha1-ZSrvipZybwKfXj4AFG7npOdV/1c= + dependencies: + postcss "^7.0.0" + +postcss-import@12.0.1: + version "12.0.1" + resolved "https://registry.npm.taobao.org/postcss-import/download/postcss-import-12.0.1.tgz#cf8c7ab0b5ccab5649024536e565f841928b7153" + integrity sha1-z4x6sLXMq1ZJAkU25WX4QZKLcVM= + dependencies: + postcss "^7.0.1" + postcss-value-parser "^3.2.3" + read-cache "^1.0.0" + resolve "^1.1.7" + +postcss-load-config@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/postcss-load-config/download/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" + integrity sha1-yE1pK3u3tB3c7ZTuYuirMbQXsAM= + dependencies: + cosmiconfig "^5.0.0" + import-cwd "^2.0.0" + +postcss-loader@3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/postcss-loader/download/postcss-loader-3.0.0.tgz#6b97943e47c72d845fa9e03f273773d4e8dd6c2d" + integrity sha1-a5eUPkfHLYRfqeA/Jzdz1OjdbC0= + dependencies: + loader-utils "^1.1.0" + postcss "^7.0.0" + postcss-load-config "^2.0.0" + schema-utils "^1.0.0" + +postcss-merge-longhand@^4.0.11: + version "4.0.11" + resolved "https://registry.nlark.com/postcss-merge-longhand/download/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" + integrity sha1-YvSaE+Sg7gTnuY9CuxYGLKJUniQ= + dependencies: + css-color-names "0.0.4" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + stylehacks "^4.0.0" + +postcss-merge-rules@^4.0.3: + version "4.0.3" + resolved "https://registry.nlark.com/postcss-merge-rules/download/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" + integrity sha1-NivqT/Wh+Y5AdacTxsslrv75plA= + dependencies: + browserslist "^4.0.0" + caniuse-api "^3.0.0" + cssnano-util-same-parent "^4.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + vendors "^1.0.0" + +postcss-minify-font-values@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-minify-font-values/download/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" + integrity sha1-zUw0TM5HQ0P6xdgiBqssvLiv1aY= + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-minify-gradients@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-minify-gradients/download/postcss-minify-gradients-4.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-minify-gradients%2Fdownload%2Fpostcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" + integrity sha1-k7KcL/UJnFNe7NpWxKpuZlpmNHE= + dependencies: + cssnano-util-get-arguments "^4.0.0" + is-color-stop "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-minify-params@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-minify-params/download/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" + integrity sha1-a5zvAwwR41Jh+V9hjJADbWgNuHQ= + dependencies: + alphanum-sort "^1.0.0" + browserslist "^4.0.0" + cssnano-util-get-arguments "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + uniqs "^2.0.0" + +postcss-minify-selectors@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-minify-selectors/download/postcss-minify-selectors-4.0.2.tgz?cache=0&sync_timestamp=1621449812496&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-minify-selectors%2Fdownload%2Fpostcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" + integrity sha1-4uXrQL/uUA0M2SQ1APX46kJi+9g= + dependencies: + alphanum-sort "^1.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + +postcss-normalize-charset@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-normalize-charset/download/postcss-normalize-charset-4.0.1.tgz?cache=0&sync_timestamp=1621449813014&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-normalize-charset%2Fdownload%2Fpostcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" + integrity sha1-izWt067oOhNrBHHg1ZvlilAoXdQ= + dependencies: + postcss "^7.0.0" + +postcss-normalize-display-values@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-display-values/download/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a" + integrity sha1-Db4EpM6QY9RmftK+R2u4MMglk1o= + dependencies: + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-positions@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-positions/download/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f" + integrity sha1-BfdX+E8mBDc3g2ipH4ky1LECkX8= + dependencies: + cssnano-util-get-arguments "^4.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-repeat-style@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-repeat-style/download/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c" + integrity sha1-xOu8KJ85kaAo1EdRy90RkYsXkQw= + dependencies: + cssnano-util-get-arguments "^4.0.0" + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-string@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-string/download/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c" + integrity sha1-zUTECrB6DHo23F6Zqs4eyk7CaQw= + dependencies: + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-timing-functions@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-timing-functions/download/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9" + integrity sha1-jgCcoqOUnNr4rSPmtquZy159KNk= + dependencies: + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-unicode@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-normalize-unicode/download/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb" + integrity sha1-hBvUj9zzAZrUuqdJOj02O1KuHPs= + dependencies: + browserslist "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-url@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-normalize-url/download/postcss-normalize-url-4.0.1.tgz?cache=0&sync_timestamp=1623330254932&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-normalize-url%2Fdownload%2Fpostcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" + integrity sha1-EOQ3+GvHx+WPe5ZS7YeNqqlfquE= + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^3.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-whitespace@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-whitespace/download/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82" + integrity sha1-vx1AcP5Pzqh9E0joJdjMDF+qfYI= + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-ordered-values@^4.1.2: + version "4.1.2" + resolved "https://registry.nlark.com/postcss-ordered-values/download/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" + integrity sha1-DPdcgg7H1cTSgBiVWeC1ceusDu4= + dependencies: + cssnano-util-get-arguments "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-reduce-initial@^4.0.3: + version "4.0.3" + resolved "https://registry.nlark.com/postcss-reduce-initial/download/postcss-reduce-initial-4.0.3.tgz?cache=0&sync_timestamp=1621449818195&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-reduce-initial%2Fdownload%2Fpostcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" + integrity sha1-f9QuvqXpyBRgljniwuhK4nC6SN8= + dependencies: + browserslist "^4.0.0" + caniuse-api "^3.0.0" + has "^1.0.0" + postcss "^7.0.0" + +postcss-reduce-transforms@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-reduce-transforms/download/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" + integrity sha1-F++kBerMbge+NBSlyi0QdGgdTik= + dependencies: + cssnano-util-get-match "^4.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +postcss-selector-parser@^3.0.0: + version "3.1.2" + resolved "https://registry.nlark.com/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz?cache=0&sync_timestamp=1620753051451&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" + integrity sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA= + dependencies: + dot-prop "^5.2.0" + indexes-of "^1.0.1" + uniq "^1.0.1" -postcss-import@12.0.1: - version "12.0.1" - resolved "https://registry.npm.taobao.org/postcss-import/download/postcss-import-12.0.1.tgz#cf8c7ab0b5ccab5649024536e565f841928b7153" - integrity sha1-z4x6sLXMq1ZJAkU25WX4QZKLcVM= +postcss-selector-parser@^6.0.2: + version "6.0.6" + resolved "https://registry.nlark.com/postcss-selector-parser/download/postcss-selector-parser-6.0.6.tgz?cache=0&sync_timestamp=1620753051451&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-6.0.6.tgz#2c5bba8174ac2f6981ab631a42ab0ee54af332ea" + integrity sha1-LFu6gXSsL2mBq2MaQqsO5UrzMuo= dependencies: - postcss "^7.0.1" - postcss-value-parser "^3.2.3" - read-cache "^1.0.0" - resolve "^1.1.7" + cssesc "^3.0.0" + util-deprecate "^1.0.2" -postcss-load-config@^2.0.0: - version "2.1.0" - resolved "https://registry.npm.taobao.org/postcss-load-config/download/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" - integrity sha1-yE1pK3u3tB3c7ZTuYuirMbQXsAM= +postcss-svgo@^4.0.3: + version "4.0.3" + resolved "https://registry.nlark.com/postcss-svgo/download/postcss-svgo-4.0.3.tgz#343a2cdbac9505d416243d496f724f38894c941e" + integrity sha1-NDos26yVBdQWJD1Jb3JPOIlMlB4= dependencies: - cosmiconfig "^5.0.0" - import-cwd "^2.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + svgo "^1.0.0" -postcss-loader@3.0.0: - version "3.0.0" - resolved "https://registry.npm.taobao.org/postcss-loader/download/postcss-loader-3.0.0.tgz#6b97943e47c72d845fa9e03f273773d4e8dd6c2d" - integrity sha1-a5eUPkfHLYRfqeA/Jzdz1OjdbC0= +postcss-unique-selectors@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-unique-selectors/download/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" + integrity sha1-lEaRHzKJv9ZMbWgPBzwDsfnuS6w= dependencies: - loader-utils "^1.1.0" + alphanum-sort "^1.0.0" postcss "^7.0.0" - postcss-load-config "^2.0.0" - schema-utils "^1.0.0" + uniqs "^2.0.0" -postcss-value-parser@^3.2.3: +postcss-value-parser@^3.0.0, postcss-value-parser@^3.2.3: version "3.3.1" resolved "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha1-n/giVH4okyE88cMO+lGsX9G6goE= -postcss-value-parser@^4.0.0: - version "4.0.2" - resolved "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" - integrity sha1-SCKCwJpCcG0fyaBptz9E7Ag5Hck= +postcss-value-parser@^4.0.2: + version "4.1.0" + resolved "https://registry.nlark.com/postcss-value-parser/download/postcss-value-parser-4.1.0.tgz?cache=0&sync_timestamp=1624607970310&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" + integrity sha1-RD9qIM7WSBor2k+oUypuVdeJoss= -postcss@7.0.17: - version "7.0.17" - resolved "https://registry.npm.taobao.org/postcss/download/postcss-7.0.17.tgz?cache=0&sync_timestamp=1577778306542&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f" - integrity sha1-TaG9/1Mi1KCsqrTYfz54JDa60x8= +postcss@7.0.21: + version "7.0.21" + resolved "https://registry.npmmirror.com/postcss/download/postcss-7.0.21.tgz?cache=0&sync_timestamp=1634821212090&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fpostcss%2Fdownload%2Fpostcss-7.0.21.tgz#06bb07824c19c2021c5d056d5b10c35b989f7e17" + integrity sha1-BrsHgkwZwgIcXQVtWxDDW5iffhc= dependencies: chalk "^2.4.2" source-map "^0.6.1" supports-color "^6.1.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.17: +postcss@^7.0.0, postcss@^7.0.1: version "7.0.26" resolved "https://registry.npm.taobao.org/postcss/download/postcss-7.0.26.tgz?cache=0&sync_timestamp=1577778306542&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-7.0.26.tgz#5ed615cfcab35ba9bbb82414a4fa88ea10429587" integrity sha1-XtYVz8qzW6m7uCQUpPqI6hBClYc= @@ -5826,6 +8766,14 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.17: source-map "^0.6.1" supports-color "^6.1.0" +postcss@^7.0.21, postcss@^7.0.27: + version "7.0.39" + resolved "https://registry.npmmirror.com/postcss/download/postcss-7.0.39.tgz?cache=0&sync_timestamp=1634821212090&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fpostcss%2Fdownload%2Fpostcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" + integrity sha1-liQ3XZZWMOLh8sAqk1yCpZy0gwk= + dependencies: + picocolors "^0.2.1" + source-map "^0.6.1" + prepend-http@^1.0.0: version "1.0.4" resolved "https://registry.npm.taobao.org/prepend-http/download/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" @@ -5851,6 +8799,11 @@ promise-inflight@^1.0.1: resolved "https://registry.npm.taobao.org/promise-inflight/download/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= +promise-polyfill@8.1.3: + version "8.1.3" + resolved "https://registry.nlark.com/promise-polyfill/download/promise-polyfill-8.1.3.tgz#8c99b3cf53f3a91c68226ffde7bde81d7f904116" + integrity sha1-jJmzz1PzqRxoIm/9573oHX+QQRY= + promise-retry@^1.1.1: version "1.1.1" resolved "https://registry.npm.taobao.org/promise-retry/download/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" @@ -5866,6 +8819,25 @@ promise@^7.1.1: dependencies: asap "~2.0.3" +protobufjs@^6.10.0, protobufjs@^6.8.6: + version "6.11.2" + resolved "https://registry.nlark.com/protobufjs/download/protobufjs-6.11.2.tgz#de39fabd4ed32beaa08e9bb1e30d08544c1edf8b" + integrity sha1-3jn6vU7TK+qgjpux4w0IVEwe34s= + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.1" + "@types/node" ">=13.7.0" + long "^4.0.0" + protoduck@^5.0.1: version "5.0.1" resolved "https://registry.npm.taobao.org/protoduck/download/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" @@ -5974,7 +8946,7 @@ q@1.4.1: resolved "https://registry.npm.taobao.org/q/download/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4= -q@^1.4.1: +q@^1.1.2, q@^1.4.1: version "1.5.1" resolved "https://registry.npm.taobao.org/q/download/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= @@ -6017,6 +8989,16 @@ querystringify@^2.1.1: resolved "https://registry.npm.taobao.org/querystringify/download/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" integrity sha1-YOWl/WSn+L+k0qsu1v30yFutFU4= +quickselect@^1.0.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/quickselect/download/quickselect-1.1.1.tgz#852e412ce418f237ad5b660d70cffac647ae94c2" + integrity sha1-hS5BLOQY8jetW2YNcM/6xkeulMI= + +quickselect@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/quickselect/download/quickselect-2.0.0.tgz#f19680a486a5eefb581303e023e98faaf25dd018" + integrity sha1-8ZaApIal7vtYEwPgI+mPqvJd0Bg= + randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.1.0" resolved "https://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -6055,15 +9037,19 @@ raw-loader@3.1.0: loader-utils "^1.1.0" schema-utils "^2.0.1" -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.npm.taobao.org/rc/download/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha1-zZJL9SAKB1uDwYjNa54hG3/A0+0= +rbush@*, rbush@^3.0.1: + version "3.0.1" + resolved "https://registry.npm.taobao.org/rbush/download/rbush-3.0.1.tgz#5fafa8a79b3b9afdfe5008403a720cc1de882ecf" + integrity sha1-X6+op5s7mv3+UAhAOnIMwd6ILs8= dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" + quickselect "^2.0.0" + +rbush@^2.0.1: + version "2.0.2" + resolved "https://registry.npm.taobao.org/rbush/download/rbush-2.0.2.tgz#bb6005c2731b7ba1d5a9a035772927d16a614605" + integrity sha1-u2AFwnMbe6HVqaA1dykn0WphRgU= + dependencies: + quickselect "^1.0.1" read-cache@^1.0.0: version "1.0.0" @@ -6093,7 +9079,7 @@ read-package-tree@5.3.1: readdir-scoped-modules "^1.0.0" util-promisify "^2.1.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha1-Hsoc9xGu+BTAT2IlKjamL2yyO1c= @@ -6141,7 +9127,14 @@ readdirp@~3.3.0: dependencies: picomatch "^2.0.7" -reflect-metadata@^0.1.2: +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.nlark.com/readdirp/download/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc= + dependencies: + picomatch "^2.2.1" + +reflect-metadata@^0.1.13, reflect-metadata@^0.1.2: version "0.1.13" resolved "https://registry.npm.taobao.org/reflect-metadata/download/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" integrity sha1-Z648pXyXKiqhZCsQ/jY/4y1J3Ag= @@ -6153,21 +9146,28 @@ regenerate-unicode-properties@^8.1.0: dependencies: regenerate "^1.4.0" +regenerate-unicode-properties@^9.0.0: + version "9.0.0" + resolved "https://registry.nlark.com/regenerate-unicode-properties/download/regenerate-unicode-properties-9.0.0.tgz#54d09c7115e1f53dc2314a974b32c1c344efe326" + integrity sha1-VNCccRXh9T3CMUqXSzLBw0Tv4yY= + dependencies: + regenerate "^1.4.2" + regenerate@^1.2.1, regenerate@^1.4.0: version "1.4.0" resolved "https://registry.npm.taobao.org/regenerate/download/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" integrity sha1-SoVuxLVuQHfFV1icroXnpMiGmhE= +regenerate@^1.4.2: + version "1.4.2" + resolved "https://registry.nlark.com/regenerate/download/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha1-uTRtiCfo9aMve6KWN9OYtpAUhIo= + regenerator-runtime@0.13.3: version "0.13.3" resolved "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" integrity sha1-fPanfY9cb2Drc8X8GVWyzrAea/U= -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk= - regenerator-transform@^0.14.0: version "0.14.1" resolved "https://registry.npm.taobao.org/regenerator-transform/download/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb" @@ -6212,6 +9212,18 @@ regexpu-core@^4.6.0: unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.1.0" +regexpu-core@^4.7.1: + version "4.8.0" + resolved "https://registry.nlark.com/regexpu-core/download/regexpu-core-4.8.0.tgz?cache=0&sync_timestamp=1631619113277&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregexpu-core%2Fdownload%2Fregexpu-core-4.8.0.tgz#e5605ba361b67b1718478501327502f4479a98f0" + integrity sha1-5WBbo2G2excYR4UBMnUC9EeamPA= + dependencies: + regenerate "^1.4.2" + regenerate-unicode-properties "^9.0.0" + regjsgen "^0.5.2" + regjsparser "^0.7.0" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.0.0" + regjsgen@^0.2.0: version "0.2.0" resolved "https://registry.npm.taobao.org/regjsgen/download/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" @@ -6222,6 +9234,11 @@ regjsgen@^0.5.0: resolved "https://registry.npm.taobao.org/regjsgen/download/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" integrity sha1-SPC/Gl6iBRlpKcDZeYtC0e2YRDw= +regjsgen@^0.5.2: + version "0.5.2" + resolved "https://registry.npmmirror.com/regjsgen/download/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" + integrity sha1-kv8pX7He7L9uzaslQ9IH6RqjNzM= + regjsparser@^0.1.4: version "0.1.5" resolved "https://registry.npm.taobao.org/regjsparser/download/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" @@ -6236,6 +9253,13 @@ regjsparser@^0.6.0: dependencies: jsesc "~0.5.0" +regjsparser@^0.7.0: + version "0.7.0" + resolved "https://registry.nlark.com/regjsparser/download/regjsparser-0.7.0.tgz?cache=0&sync_timestamp=1630946857014&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregjsparser%2Fdownload%2Fregjsparser-0.7.0.tgz#a6b667b54c885e18b52554cb4960ef71187e9968" + integrity sha1-prZntUyIXhi1JVTLSWDvcRh+mWg= + dependencies: + jsesc "~0.5.0" + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -6251,13 +9275,6 @@ repeat-string@^1.6.1: resolved "https://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.npm.taobao.org/repeating/download/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - request@^2.83.0, request@^2.87.0, request@^2.88.0: version "2.88.0" resolved "https://registry.npm.taobao.org/request/download/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" @@ -6304,6 +9321,11 @@ requires-port@^1.0.0: resolved "https://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= +resize-observer-polyfill@^1.5.0, resize-observer-polyfill@^1.5.1: + version "1.5.1" + resolved "https://registry.nlark.com/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz?cache=0&sync_timestamp=1618847256390&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fresize-observer-polyfill%2Fdownload%2Fresize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" + integrity sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ= + resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/resolve-cwd/download/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -6356,6 +9378,16 @@ rfdc@^1.1.4: resolved "https://registry.npm.taobao.org/rfdc/download/rfdc-1.1.4.tgz#ba72cc1367a0ccd9cf81a870b3b58bd3ad07f8c2" integrity sha1-unLME2egzNnPgahws7WL060H+MI= +rgb-regex@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/rgb-regex/download/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" + integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= + +rgba-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/rgba-regex/download/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" + integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= + rimraf@3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/rimraf/download/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" @@ -6363,7 +9395,7 @@ rimraf@3.0.0: dependencies: glob "^7.1.3" -rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@^2.7.1: version "2.7.1" resolved "https://registry.npm.taobao.org/rimraf/download/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha1-NXl/E6f9rcVmFCwp1PB8ytSD4+w= @@ -6378,6 +9410,20 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +robust-predicates@^2.0.4: + version "2.0.4" + resolved "https://registry.npm.taobao.org/robust-predicates/download/robust-predicates-2.0.4.tgz?cache=0&sync_timestamp=1617635634579&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frobust-predicates%2Fdownload%2Frobust-predicates-2.0.4.tgz#0a2367a93abd99676d075981707f29cfb402248b" + integrity sha1-CiNnqTq9mWdtB1mBcH8pz7QCJIs= + +rollup@1.25.2: + version "1.25.2" + resolved "https://registry.npmmirror.com/rollup/download/rollup-1.25.2.tgz?cache=0&sync_timestamp=1635229318454&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Frollup%2Fdownload%2Frollup-1.25.2.tgz#739f508bd8f7ece52bb6c1fcda83466af82b7f6d" + integrity sha1-c59Qi9j37OUrtsH82oNGavgrf20= + dependencies: + "@types/estree" "*" + "@types/node" "*" + acorn "^7.1.0" + run-async@^2.2.0: version "2.3.0" resolved "https://registry.npm.taobao.org/run-async/download/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -6392,10 +9438,10 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@6.4.0, rxjs@~6.4.0: - version "6.4.0" - resolved "https://registry.npm.taobao.org/rxjs/download/rxjs-6.4.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frxjs%2Fdownload%2Frxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" - integrity sha1-87sP572n+2nerAwW8XtQsLh5BQQ= +rxjs@6.5.3: + version "6.5.3" + resolved "https://registry.npmmirror.com/rxjs/download/rxjs-6.5.3.tgz?cache=0&sync_timestamp=1633554533803&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Frxjs%2Fdownload%2Frxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a" + integrity sha1-UQ4mMX9NuRp+sd532d2boKSJmjo= dependencies: tslib "^1.9.0" @@ -6406,6 +9452,13 @@ rxjs@^6.4.0: dependencies: tslib "^1.9.0" +rxjs@~6.5.4: + version "6.5.5" + resolved "https://registry.npmmirror.com/rxjs/download/rxjs-6.5.5.tgz?cache=0&sync_timestamp=1633554533803&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Frxjs%2Fdownload%2Frxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha1-xciE4wlMjP7jG/J+uH5UzPyH+ew= + dependencies: + tslib "^1.9.0" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -6416,6 +9469,11 @@ safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha1-t02uxJsRSPiMZLaNSbHoFcHy9Rk= +safe-buffer@^5.2.1: + version "5.2.1" + resolved "https://registry.nlark.com/safe-buffer/download/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY= + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -6423,26 +9481,26 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@^2.1.2, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo= -sass-loader@7.2.0: - version "7.2.0" - resolved "https://registry.npm.taobao.org/sass-loader/download/sass-loader-7.2.0.tgz#e34115239309d15b2527cb62b5dfefb62a96ff7f" - integrity sha1-40EVI5MJ0VslJ8titd/vtiqW/38= +sass-loader@8.0.0: + version "8.0.0" + resolved "https://registry.npmmirror.com/sass-loader/download/sass-loader-8.0.0.tgz?cache=0&sync_timestamp=1634036031107&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fsass-loader%2Fdownload%2Fsass-loader-8.0.0.tgz#e7b07a3e357f965e6b03dd45b016b0a9746af797" + integrity sha1-57B6PjV/ll5rA91FsBawqXRq95c= dependencies: clone-deep "^4.0.1" - loader-utils "^1.0.1" - neo-async "^2.5.0" - pify "^4.0.1" - semver "^5.5.0" + loader-utils "^1.2.3" + neo-async "^2.6.1" + schema-utils "^2.1.0" + semver "^6.3.0" -sass@1.22.9: - version "1.22.9" - resolved "https://registry.npm.taobao.org/sass/download/sass-1.22.9.tgz#41a2ed6038027f58be2bd5041293452a29c2cb84" - integrity sha1-QaLtYDgCf1i+K9UEEpNFKinCy4Q= +sass@1.23.3: + version "1.23.3" + resolved "https://registry.npmmirror.com/sass/download/sass-1.23.3.tgz?cache=0&sync_timestamp=1634867108339&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fsass%2Fdownload%2Fsass-1.23.3.tgz#f07503b9e8d2bcf06ef69e8beea5d085589b1620" + integrity sha1-8HUDuejSvPBu9p6L7qXQhVibFiA= dependencies: chokidar ">=2.0.0 <4.0.0" @@ -6453,23 +9511,11 @@ saucelabs@^1.5.0: dependencies: https-proxy-agent "^2.2.1" -sax@0.5.x: - version "0.5.8" - resolved "https://registry.npm.taobao.org/sax/download/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" - integrity sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE= - -sax@>=0.6.0, sax@^1.2.4: +sax@>=0.6.0, sax@~1.2.4: version "1.2.4" - resolved "https://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + resolved "https://registry.nlark.com/sax/download/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha1-KBYjTiN4vdxOU1T6tcqold9xANk= -schema-utils@^0.3.0: - version "0.3.0" - resolved "https://registry.npm.taobao.org/schema-utils/download/schema-utils-0.3.0.tgz?cache=0&sync_timestamp=1574946791935&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fschema-utils%2Fdownload%2Fschema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" - integrity sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8= - dependencies: - ajv "^5.0.0" - schema-utils@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz?cache=0&sync_timestamp=1574946791935&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fschema-utils%2Fdownload%2Fschema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" @@ -6487,6 +9533,15 @@ schema-utils@^2.0.0, schema-utils@^2.0.1: ajv "^6.10.2" ajv-keywords "^3.4.1" +schema-utils@^2.1.0, schema-utils@^2.6.1, schema-utils@^2.6.4: + version "2.7.1" + resolved "https://registry.nlark.com/schema-utils/download/schema-utils-2.7.1.tgz?cache=0&sync_timestamp=1626694902084&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fschema-utils%2Fdownload%2Fschema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7" + integrity sha1-HKTzLRskxZDCA7jnpQvw6kzTlNc= + dependencies: + "@types/json-schema" "^7.0.5" + ajv "^6.12.4" + ajv-keywords "^3.5.2" + select-hose@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" @@ -6585,7 +9640,7 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= @@ -6647,11 +9702,32 @@ shebang-regex@^1.0.0: resolved "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.nlark.com/side-channel/download/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha1-785cj9wQTudRslxY1CkAEfpeos8= + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.npm.taobao.org/simple-swizzle/download/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= + dependencies: + is-arrayish "^0.3.1" + +skmeans@0.9.7: + version "0.9.7" + resolved "https://registry.npm.taobao.org/skmeans/download/skmeans-0.9.7.tgz#72670cebb728508f56e29c0e10d11e623529ce5d" + integrity sha1-cmcM67coUI9W4pwOENEeYjUpzl0= + slash@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/slash/download/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -6786,11 +9862,6 @@ source-list-map@^2.0.0: resolved "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha1-OZO9hzv8SEecyp6jpUeDXHwVSzQ= -source-list-map@~0.1.7: - version "0.1.8" - resolved "https://registry.npm.taobao.org/source-list-map/download/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" - integrity sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY= - source-map-loader@0.2.4: version "0.2.4" resolved "https://registry.npm.taobao.org/source-map-loader/download/source-map-loader-0.2.4.tgz#c18b0dc6e23bf66f6792437557c569a11e072271" @@ -6799,7 +9870,7 @@ source-map-loader@0.2.4: async "^2.5.0" loader-utils "^1.1.0" -source-map-resolve@^0.5.0: +source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: version "0.5.3" resolved "https://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" integrity sha1-GQhmvs51U+H48mei7oLGBrVQmho= @@ -6810,15 +9881,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.5.13.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha1-MbJKnC5zwt6FBmwP631Edn7VKTI= - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-support@^0.5.5, source-map-support@^0.5.6, source-map-support@~0.5.12: +source-map-support@0.5.16, source-map-support@^0.5.5, source-map-support@^0.5.6, source-map-support@~0.5.12: version "0.5.16" resolved "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.5.16.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" integrity sha1-CuBp5/47p1OMZMmFFeNTOerFoEI= @@ -6838,14 +9901,7 @@ source-map-url@^0.4.0: resolved "https://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@0.1.x: - version "0.1.43" - resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" - integrity sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y= - dependencies: - amdefine ">=0.0.4" - -source-map@0.7.3: +source-map@0.7.3, source-map@^0.7.3: version "0.7.3" resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha1-UwL4FpAxc1ImVECS5kmB91F1A4M= @@ -6860,18 +9916,16 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha1-dHIq8y6WFOnCh6jQu95IteLxomM= -source-map@~0.4.1: - version "0.4.4" - resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - integrity sha1-66T12pwNyZneaAMti092FzZSA2s= - dependencies: - amdefine ">=0.0.4" - sourcemap-codec@^1.4.4: version "1.4.7" resolved "https://registry.npm.taobao.org/sourcemap-codec/download/sourcemap-codec-1.4.7.tgz#5b2cd184e3fe51fd30ba049f7f62bf499b4f73ae" integrity sha1-WyzRhOP+Uf0wugSff2K/SZtPc64= +sourcemap-codec@^1.4.8: + version "1.4.8" + resolved "https://registry.nlark.com/sourcemap-codec/download/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" + integrity sha1-6oBL2UhXQC5pktBaOO8a41qatMQ= + spdx-correct@^3.0.0: version "3.1.0" resolved "https://registry.npm.taobao.org/spdx-correct/download/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" @@ -6960,6 +10014,11 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" +ssr-window@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/ssr-window/download/ssr-window-2.0.0.tgz?cache=0&sync_timestamp=1629879256060&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fssr-window%2Fdownload%2Fssr-window-2.0.0.tgz#98c301aef99523317f8d69618f0010791096efc4" + integrity sha1-mMMBrvmVIzF/jWlhjwAQeRCW78Q= + ssri@^6.0.0, ssri@^6.0.1: version "6.0.1" resolved "https://registry.npm.taobao.org/ssri/download/ssri-6.0.1.tgz?cache=0&sync_timestamp=1571961736774&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" @@ -6967,6 +10026,19 @@ ssri@^6.0.0, ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" +ssri@^7.0.0: + version "7.1.1" + resolved "https://registry.nlark.com/ssri/download/ssri-7.1.1.tgz?cache=0&sync_timestamp=1621364918494&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fssri%2Fdownload%2Fssri-7.1.1.tgz#33e44f896a967158e3c63468e47ec46613b95b5f" + integrity sha1-M+RPiWqWcVjjxjRo5H7EZhO5W18= + dependencies: + figgy-pudding "^3.5.1" + minipass "^3.1.1" + +stable@^0.1.8: + version "0.1.8" + resolved "https://registry.npm.taobao.org/stable/download/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" + integrity sha1-g26zyDgv4pNv6vVEYxAXzn1Ho88= + static-extend@^0.1.1: version "0.1.2" resolved "https://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -7037,7 +10109,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: +string-width@^2.0.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring-width%2Fdownload%2Fstring-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4= @@ -7063,6 +10135,23 @@ string-width@^4.1.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.npmmirror.com/string-width/download/string-width-4.2.3.tgz?cache=0&sync_timestamp=1632421054789&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fstring-width%2Fdownload%2Fstring-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha1-JpxxF9J7Ba0uU2gwqOyJXvnG0BA= + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.npm.taobao.org/string.prototype.trimend/download/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha1-51rpDClCxjUEaGwYsoe0oLGkX4A= + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + string.prototype.trimleft@^2.1.1: version "2.1.1" resolved "https://registry.npm.taobao.org/string.prototype.trimleft/download/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" @@ -7079,6 +10168,14 @@ string.prototype.trimright@^2.1.1: define-properties "^1.1.3" function-bind "^1.1.1" +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.npm.taobao.org/string.prototype.trimstart/download/string.prototype.trimstart-1.0.4.tgz?cache=0&sync_timestamp=1614127357785&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring.prototype.trimstart%2Fdownload%2Fstring.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha1-s2OZr0qymZtMnGSL16P7K7Jv7u0= + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -7107,7 +10204,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.1.0: +strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4= @@ -7121,6 +10218,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmmirror.com/strip-ansi/download/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk= + dependencies: + ansi-regex "^5.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/strip-bom/download/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -7131,11 +10235,6 @@ strip-eof@^1.0.0: resolved "https://registry.npm.taobao.org/strip-eof/download/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - style-loader@1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/style-loader/download/style-loader-1.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstyle-loader%2Fdownload%2Fstyle-loader-1.0.0.tgz#1d5296f9165e8e2c85d24eee0b7caf9ec8ca1f82" @@ -7144,6 +10243,15 @@ style-loader@1.0.0: loader-utils "^1.2.3" schema-utils "^2.0.1" +stylehacks@^4.0.0: + version "4.0.3" + resolved "https://registry.nlark.com/stylehacks/download/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" + integrity sha1-Zxj8r00eB9ihMYaQiB6NlnJqcdU= + dependencies: + browserslist "^4.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + stylus-loader@3.0.2: version "3.0.2" resolved "https://registry.npm.taobao.org/stylus-loader/download/stylus-loader-3.0.2.tgz#27a706420b05a38e038e7cacb153578d450513c6" @@ -7153,17 +10261,19 @@ stylus-loader@3.0.2: lodash.clonedeep "^4.5.0" when "~3.6.x" -stylus@0.54.5: - version "0.54.5" - resolved "https://registry.npm.taobao.org/stylus/download/stylus-0.54.5.tgz#42b9560931ca7090ce8515a798ba9e6aa3d6dc79" - integrity sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk= +stylus@0.54.7: + version "0.54.7" + resolved "https://registry.nlark.com/stylus/download/stylus-0.54.7.tgz?cache=0&sync_timestamp=1630739872131&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fstylus%2Fdownload%2Fstylus-0.54.7.tgz#c6ce4793965ee538bcebe50f31537bfc04d88cd2" + integrity sha1-xs5Hk5Ze5Ti86+UPMVN7/ATYjNI= dependencies: - css-parse "1.7.x" - debug "*" - glob "7.0.x" - mkdirp "0.5.x" - sax "0.5.x" - source-map "0.1.x" + css-parse "~2.0.0" + debug "~3.1.0" + glob "^7.1.3" + mkdirp "~0.5.x" + safer-buffer "^2.1.2" + sax "~1.2.4" + semver "^6.0.0" + source-map "^0.7.3" supports-color@^2.0.0: version "2.0.0" @@ -7184,6 +10294,40 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" +supports-color@^7.0.0: + version "7.2.0" + resolved "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1626703400240&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha1-G33NyzK4E4gBs+R4umpRyqiWSNo= + dependencies: + has-flag "^4.0.0" + +svgo@^1.0.0: + version "1.3.2" + resolved "https://registry.npmmirror.com/svgo/download/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" + integrity sha1-ttxRHAYzRsnkFbgeQ0ARRbltQWc= + dependencies: + chalk "^2.4.1" + coa "^2.0.2" + css-select "^2.0.0" + css-select-base-adapter "^0.1.1" + css-tree "1.0.0-alpha.37" + csso "^4.0.2" + js-yaml "^3.13.1" + mkdirp "~0.5.1" + object.values "^1.1.0" + sax "~1.2.4" + stable "^0.1.8" + unquote "~1.1.1" + util.promisify "~1.0.0" + +swiper@^5.3.6: + version "5.4.5" + resolved "https://registry.npmmirror.com/swiper/download/swiper-5.4.5.tgz#a350f654bf68426dbb651793824925512d223c0f" + integrity sha1-o1D2VL9oQm27ZReTgkklUS0iPA8= + dependencies: + dom7 "^2.1.5" + ssr-window "^2.0.0" + symbol-observable@1.2.0: version "1.2.0" resolved "https://registry.npm.taobao.org/symbol-observable/download/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" @@ -7194,20 +10338,35 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.npm.taobao.org/tapable/download/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha1-ofzMBrWNth/XpF2i2kT186Pme6I= -tar@^4.4.2, tar@^4.4.8: - version "4.4.13" - resolved "https://registry.npm.taobao.org/tar/download/tar-4.4.13.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftar%2Fdownload%2Ftar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha1-Q7NkvFKIjVVSmGN7ENYHkCVKtSU= +tar@^4.4.10: + version "4.4.19" + resolved "https://registry.nlark.com/tar/download/tar-4.4.19.tgz?cache=0&sync_timestamp=1629994977916&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftar%2Fdownload%2Ftar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha1-Lk1yY98m8rkU3uEMglqxMhI3QvM= dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" + +terser-webpack-plugin@2.3.3: + version "2.3.3" + resolved "https://registry.nlark.com/terser-webpack-plugin/download/terser-webpack-plugin-2.3.3.tgz?cache=0&sync_timestamp=1631202287446&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.3.tgz#b89043168bd414153bab86f4362ac23d537b78b0" + integrity sha1-uJBDFovUFBU7q4b0NirCPVN7eLA= + dependencies: + cacache "^13.0.1" + find-cache-dir "^3.2.0" + jest-worker "^25.1.0" + p-limit "^2.2.2" + schema-utils "^2.6.4" + serialize-javascript "^2.1.2" + source-map "^0.6.1" + terser "^4.4.3" + webpack-sources "^1.4.3" -terser-webpack-plugin@1.4.3, terser-webpack-plugin@^1.4.1: +terser-webpack-plugin@^1.4.1: version "1.4.3" resolved "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-1.4.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" integrity sha1-Xsry29xfuZdF/QZ5H0b8ndscmnw= @@ -7222,19 +10381,19 @@ terser-webpack-plugin@1.4.3, terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.9: - version "4.3.9" - resolved "https://registry.npm.taobao.org/terser/download/terser-4.3.9.tgz?cache=0&sync_timestamp=1578021305565&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser%2Fdownload%2Fterser-4.3.9.tgz#e4be37f80553d02645668727777687dad26bbca8" - integrity sha1-5L43+AVT0CZFZocnd3aH2tJrvKg= +terser@4.5.1, terser@^4.1.2: + version "4.5.1" + resolved "https://registry.nlark.com/terser/download/terser-4.5.1.tgz#63b52d6b6ce344aa6fedcd0ee06a695799eb50bd" + integrity sha1-Y7Uta2zjRKpv7c0O4GppV5nrUL0= dependencies: commander "^2.20.0" source-map "~0.6.1" source-map-support "~0.5.12" -terser@^4.1.2: - version "4.5.1" - resolved "https://registry.npm.taobao.org/terser/download/terser-4.5.1.tgz?cache=0&sync_timestamp=1578021305565&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser%2Fdownload%2Fterser-4.5.1.tgz#63b52d6b6ce344aa6fedcd0ee06a695799eb50bd" - integrity sha1-Y7Uta2zjRKpv7c0O4GppV5nrUL0= +terser@^4.4.3: + version "4.8.0" + resolved "https://registry.nlark.com/terser/download/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" + integrity sha1-YwVjQ9fHC7KfOvZlhlpG/gOg3xc= dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -7265,6 +10424,21 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" +timsort@^0.3.0: + version "0.3.0" + resolved "https://registry.npm.taobao.org/timsort/download/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" + integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= + +tinycolor2@^1.4.1: + version "1.4.2" + resolved "https://registry.npm.taobao.org/tinycolor2/download/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" + integrity sha1-P2pNEHGtB2dtf6Ry4frECnGdiAM= + +tinyqueue@^2.0.3: + version "2.0.3" + resolved "https://registry.npm.taobao.org/tinyqueue/download/tinyqueue-2.0.3.tgz#64d8492ebf39e7801d7bd34062e29b45b2035f08" + integrity sha1-ZNhJLr8554Ade9NAYuKbRbIDXwg= + tmp@0.0.30: version "0.0.30" resolved "https://registry.npm.taobao.org/tmp/download/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" @@ -7289,11 +10463,6 @@ to-arraybuffer@^1.0.0: resolved "https://registry.npm.taobao.org/to-arraybuffer/download/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -7336,6 +10505,20 @@ toidentifier@1.0.0: resolved "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM= +topojson-client@3.x: + version "3.1.0" + resolved "https://registry.nlark.com/topojson-client/download/topojson-client-3.1.0.tgz#22e8b1ed08a2b922feeb4af6f53b6ef09a467b99" + integrity sha1-Iuix7QiiuSL+60r29Ttu8JpGe5k= + dependencies: + commander "2" + +topojson-server@3.x: + version "3.0.1" + resolved "https://registry.npm.taobao.org/topojson-server/download/topojson-server-3.0.1.tgz#d2b3ec095b6732299be76a48406111b3201a34f5" + integrity sha1-0rPsCVtnMimb52pIQGERsyAaNPU= + dependencies: + commander "2" + tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" @@ -7344,15 +10527,10 @@ tough-cookie@~2.4.3: psl "^1.1.24" punycode "^1.4.1" -tree-kill@1.2.1: - version "1.2.1" - resolved "https://registry.npm.taobao.org/tree-kill/download/tree-kill-1.2.1.tgz?cache=0&sync_timestamp=1576105318345&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftree-kill%2Fdownload%2Ftree-kill-1.2.1.tgz#5398f374e2f292b9dcc7b2e71e30a5c3bb6c743a" - integrity sha1-U5jzdOLykrncx7LnHjClw7tsdDo= - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.npm.taobao.org/trim-right/download/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= +tree-kill@1.2.2: + version "1.2.2" + resolved "https://registry.npm.taobao.org/tree-kill/download/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha1-TKCakJLIi3OnzcXooBtQeweQoMw= ts-node@~7.0.0: version "7.0.1" @@ -7368,11 +10546,21 @@ ts-node@~7.0.0: source-map-support "^0.5.6" yn "^2.0.0" -tslib@1.10.0, tslib@^1.10.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: +tslib@1.10.0, tslib@^1.10.0, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: version "1.10.0" resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha1-w8GflZc/sKYpc/sJ2Q2WHuQ+XIo= +tslib@>=1.10.0, tslib@^2.0.0: + version "2.3.1" + resolved "https://registry.nlark.com/tslib/download/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha1-6KM1rdXOrlGqJh0ypJAVjvBC7wE= + +tslib@^1.11.1, tslib@^1.14.1: + version "1.14.1" + resolved "https://registry.nlark.com/tslib/download/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA= + tslint@~5.15.0: version "5.15.0" resolved "https://registry.npm.taobao.org/tslint/download/tslint-5.15.0.tgz#6ffb180986d63afa1e531feb2a134dbf961e27d3" @@ -7411,6 +10599,11 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +turf-jsts@*: + version "1.2.3" + resolved "https://registry.npm.taobao.org/turf-jsts/download/turf-jsts-1.2.3.tgz#59757f542afbff9a577bbf411f183b8f48d38aa4" + integrity sha1-WXV/VCr7/5pXe79BHxg7j0jTiqQ= + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" @@ -7434,10 +10627,15 @@ typedarray@^0.0.6: resolved "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@3.5.3, typescript@~3.5.3: - version "3.5.3" - resolved "https://registry.npm.taobao.org/typescript/download/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977" - integrity sha1-yDD2V/k/HqhGgZ6SkJL1/lmD6Xc= +typescript@3.6.4: + version "3.6.4" + resolved "https://registry.npmmirror.com/typescript/download/typescript-3.6.4.tgz?cache=0&sync_timestamp=1635235316384&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ftypescript%2Fdownload%2Ftypescript-3.6.4.tgz#b18752bb3792bc1a0281335f7f6ebf1bbfc5b91d" + integrity sha1-sYdSuzeSvBoCgTNff26/G7/FuR0= + +typescript@~3.7.5: + version "3.7.7" + resolved "https://registry.npmmirror.com/typescript/download/typescript-3.7.7.tgz?cache=0&sync_timestamp=1635235316384&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ftypescript%2Fdownload%2Ftypescript-3.7.7.tgz#c931733e2ec10dda56b855b379cc488a72a81199" + integrity sha1-yTFzPi7BDdpWuFWzecxIinKoEZk= uglify-js@^3.1.4: version "3.7.3" @@ -7452,11 +10650,26 @@ ultron@~1.1.0: resolved "https://registry.npm.taobao.org/ultron/download/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" integrity sha1-n+FTahCmZKZSZqHjzPhf02MCvJw= +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/unbox-primitive/download/unbox-primitive-1.0.1.tgz?cache=0&sync_timestamp=1616706427948&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funbox-primitive%2Fdownload%2Funbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha1-CF4hViXsMWJXTciFmr7nilmxRHE= + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.npm.taobao.org/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" integrity sha1-JhmADEyCWADv3YNDr33Zkzy+KBg= +unicode-canonical-property-names-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-2.0.0.tgz?cache=0&sync_timestamp=1631615391251&other_urls=https%3A%2F%2Fregistry.nlark.com%2Funicode-canonical-property-names-ecmascript%2Fdownload%2Funicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" + integrity sha1-MBrNxSVjFnDTn2FG4Od/9rvevdw= + unicode-match-property-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.npm.taobao.org/unicode-match-property-ecmascript/download/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" @@ -7465,16 +10678,34 @@ unicode-match-property-ecmascript@^1.0.4: unicode-canonical-property-names-ecmascript "^1.0.4" unicode-property-aliases-ecmascript "^1.0.4" +unicode-match-property-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/unicode-match-property-ecmascript/download/unicode-match-property-ecmascript-2.0.0.tgz?cache=0&sync_timestamp=1631618607567&other_urls=https%3A%2F%2Fregistry.nlark.com%2Funicode-match-property-ecmascript%2Fdownload%2Funicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" + integrity sha1-VP0W4OyxZ88Ezx91a9zJLrp5dsM= + dependencies: + unicode-canonical-property-names-ecmascript "^2.0.0" + unicode-property-aliases-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript@^1.1.0: version "1.1.0" resolved "https://registry.npm.taobao.org/unicode-match-property-value-ecmascript/download/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" integrity sha1-W0tCbgjROoA2Xg1lesemwexGonc= +unicode-match-property-value-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/unicode-match-property-value-ecmascript/download/unicode-match-property-value-ecmascript-2.0.0.tgz?cache=0&sync_timestamp=1631618158421&other_urls=https%3A%2F%2Fregistry.nlark.com%2Funicode-match-property-value-ecmascript%2Fdownload%2Funicode-match-property-value-ecmascript-2.0.0.tgz#1a01aa57247c14c568b89775a54938788189a714" + integrity sha1-GgGqVyR8FMVouJd1pUk4eIGJpxQ= + unicode-property-aliases-ecmascript@^1.0.4: version "1.0.5" resolved "https://registry.npm.taobao.org/unicode-property-aliases-ecmascript/download/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" integrity sha1-qcxsx85joKMCP8meNBuUQx1AWlc= +unicode-property-aliases-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/unicode-property-aliases-ecmascript/download/unicode-property-aliases-ecmascript-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Funicode-property-aliases-ecmascript%2Fdownload%2Funicode-property-aliases-ecmascript-2.0.0.tgz#0a36cb9a585c4f6abd51ad1deddb285c165297c8" + integrity sha1-CjbLmlhcT2q9Ua0d7dsoXBZSl8g= + union-value@^1.0.0: version "1.0.1" resolved "https://registry.npm.taobao.org/union-value/download/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -7485,6 +10716,16 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/uniq/download/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/uniqs/download/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= + unique-filename@^1.1.1: version "1.1.1" resolved "https://registry.npm.taobao.org/unique-filename/download/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" @@ -7518,6 +10759,11 @@ unpipe@1.0.0, unpipe@~1.0.0: resolved "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= +unquote@~1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/unquote/download/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" + integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= + unset-value@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" @@ -7572,7 +10818,7 @@ useragent@2.3.0: lru-cache "4.1.x" tmp "0.0.x" -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= @@ -7584,6 +10830,16 @@ util-promisify@^2.1.0: dependencies: object.getownpropertydescriptors "^2.0.3" +util.promisify@~1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.1.tgz?cache=0&sync_timestamp=1610159885628&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil.promisify%2Fdownload%2Futil.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" + integrity sha1-a693dLgO6w91INi4HQeYKlmruu4= + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.2" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.0" + util@0.10.3: version "0.10.3" resolved "https://registry.npm.taobao.org/util/download/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" @@ -7628,6 +10884,11 @@ vary@~1.1.2: resolved "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= +vendors@^1.0.0: + version "1.0.4" + resolved "https://registry.npm.taobao.org/vendors/download/vendors-1.0.4.tgz?cache=0&sync_timestamp=1615203397897&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvendors%2Fdownload%2Fvendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" + integrity sha1-4rgApT56Kbk1BsPPQRANFsTErY4= + verror@1.10.0: version "1.10.0" resolved "https://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -7637,6 +10898,11 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +viewerjs@^1.6.2: + version "1.10.2" + resolved "https://registry.npmmirror.com/viewerjs/download/viewerjs-1.10.2.tgz#de16fa10668e4da6325969836a3264a046e3ef9a" + integrity sha1-3hb6EGaOTaYyWWmDajJkoEbj75o= + vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz?cache=0&sync_timestamp=1572870717730&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvm-browserify%2Fdownload%2Fvm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" @@ -7663,6 +10929,13 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/wcwidth/download/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + webdriver-js-extender@2.1.0: version "2.1.0" resolved "https://registry.npm.taobao.org/webdriver-js-extender/download/webdriver-js-extender-2.1.0.tgz#57d7a93c00db4cc8d556e4d3db4b5db0a80c3bb7" @@ -7688,14 +10961,6 @@ webdriver-manager@^12.0.6: semver "^5.3.0" xml2js "^0.4.17" -webpack-core@^0.6.8: - version "0.6.9" - resolved "https://registry.npm.taobao.org/webpack-core/download/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" - integrity sha1-/FcViMhVjad76e+23r3Fo7FyvcI= - dependencies: - source-list-map "~0.1.7" - source-map "~0.4.1" - webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.2: version "3.7.2" resolved "https://registry.npm.taobao.org/webpack-dev-middleware/download/webpack-dev-middleware-3.7.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-dev-middleware%2Fdownload%2Fwebpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" @@ -7754,14 +11019,14 @@ webpack-log@^2.0.0: ansi-colors "^3.0.0" uuid "^3.3.2" -webpack-merge@4.2.1: - version "4.2.1" - resolved "https://registry.npm.taobao.org/webpack-merge/download/webpack-merge-4.2.1.tgz#5e923cf802ea2ace4fd5af1d3247368a633489b4" - integrity sha1-XpI8+ALqKs5P1a8dMkc2imM0ibQ= +webpack-merge@4.2.2: + version "4.2.2" + resolved "https://registry.nlark.com/webpack-merge/download/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" + integrity sha1-onxS6ng9E5iv0gh/VH17nS9DY00= dependencies: - lodash "^4.17.5" + lodash "^4.17.15" -webpack-sources@1.4.3, webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1: +webpack-sources@1.4.3, webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-sources@^1.3.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: version "1.4.3" resolved "https://registry.npm.taobao.org/webpack-sources/download/webpack-sources-1.4.3.tgz?cache=0&sync_timestamp=1574264193174&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-sources%2Fdownload%2Fwebpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" integrity sha1-7t2OwLko+/HL/plOItLYkPMwqTM= @@ -7769,17 +11034,17 @@ webpack-sources@1.4.3, webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-s source-list-map "^2.0.0" source-map "~0.6.1" -webpack-subresource-integrity@1.1.0-rc.6: - version "1.1.0-rc.6" - resolved "https://registry.npm.taobao.org/webpack-subresource-integrity/download/webpack-subresource-integrity-1.1.0-rc.6.tgz?cache=0&sync_timestamp=1569916474449&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-subresource-integrity%2Fdownload%2Fwebpack-subresource-integrity-1.1.0-rc.6.tgz#37f6f1264e1eb378e41465a98da80fad76ab8886" - integrity sha1-N/bxJk4es3jkFGWpjagPrXariIY= +webpack-subresource-integrity@1.3.4: + version "1.3.4" + resolved "https://registry.nlark.com/webpack-subresource-integrity/download/webpack-subresource-integrity-1.3.4.tgz#4554e0c622d6787f880eba009cdb73139c107bad" + integrity sha1-RVTgxiLWeH+IDroAnNtzE5wQe60= dependencies: - webpack-core "^0.6.8" + webpack-sources "^1.3.0" -webpack@4.39.2: - version "4.39.2" - resolved "https://registry.npm.taobao.org/webpack/download/webpack-4.39.2.tgz#c9aa5c1776d7c309d1b3911764f0288c8c2816aa" - integrity sha1-yapcF3bXwwnRs5EXZPAojIwoFqo= +webpack@4.41.2: + version "4.41.2" + resolved "https://registry.npmmirror.com/webpack/download/webpack-4.41.2.tgz?cache=0&sync_timestamp=1635182771106&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fwebpack%2Fdownload%2Fwebpack-4.41.2.tgz#c34ec76daa3a8468c9b61a50336d8e3303dce74e" + integrity sha1-w07Hbao6hGjJthpQM22OMwPc504= dependencies: "@webassemblyjs/ast" "1.8.5" "@webassemblyjs/helper-module-context" "1.8.5" @@ -7819,11 +11084,27 @@ websocket-extensions@>=0.1.1: resolved "https://registry.npm.taobao.org/websocket-extensions/download/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" integrity sha1-XS/yKXcAPsaHpLhwc9+7rBRszyk= +whatwg-fetch@2.0.4: + version "2.0.4" + resolved "https://registry.npm.taobao.org/whatwg-fetch/download/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + integrity sha1-3eal3zFfnTmZGqF2IYU9cguFVm8= + when@~3.6.x: version "3.6.4" resolved "https://registry.npm.taobao.org/when/download/when-3.6.4.tgz#473b517ec159e2b85005497a13983f095412e34e" integrity sha1-RztRfsFZ4rhQBUl6E5g/CVQS404= +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/which-boxed-primitive/download/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha1-E3V7yJsgmwSf5dhkMOIc9AqJqOY= + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/which-module/download/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -7836,13 +11117,6 @@ which@^1.2.1, which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.npm.taobao.org/wide-align/download/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha1-rgdOa9wMFKQx6ATmJFScYzsABFc= - dependencies: - string-width "^1.0.2 || 2" - wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" @@ -7870,6 +11144,15 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.nlark.com/wrap-ansi/download/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM= + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -7909,6 +11192,11 @@ xmlhttprequest-ssl@~1.5.4: resolved "https://registry.npm.taobao.org/xmlhttprequest-ssl/download/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= +xmlhttprequest@1.8.0: + version "1.8.0" + resolved "https://registry.nlark.com/xmlhttprequest/download/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= + xtend@^4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" @@ -7919,16 +11207,26 @@ xtend@^4.0.0, xtend@~4.0.1: resolved "https://registry.npm.taobao.org/y18n/download/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha1-le+U+F7MgdAHwmThkKEg8KPIVms= +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.npm.taobao.org/y18n/download/y18n-5.0.8.tgz?cache=0&sync_timestamp=1617822642544&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fy18n%2Fdownload%2Fy18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha1-f0k00PfKjFb5UxSTndzS3ZHOHVU= + yallist@^2.1.2: version "2.1.2" resolved "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.npm.taobao.org/yallist/download/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha1-27fa+b/YusmrRev2ArjLrQ1dCP0= +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/yallist/download/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI= + yargs-parser@^11.1.1: version "11.1.1" resolved "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" @@ -7945,6 +11243,11 @@ yargs-parser@^13.0.0: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.nlark.com/yargs-parser/download/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha1-LrfcOwKJcY/ClfNidThFxBoMlO4= + yargs@12.0.5: version "12.0.5" resolved "https://registry.npm.taobao.org/yargs/download/yargs-12.0.5.tgz?cache=0&sync_timestamp=1577940993299&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" @@ -7980,6 +11283,19 @@ yargs@13.1.0: y18n "^4.0.0" yargs-parser "^13.0.0" +yargs@^16.1.1: + version "16.2.0" + resolved "https://registry.npmmirror.com/yargs/download/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha1-HIK/D2tqZur85+8w43b0mhJHf2Y= + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yeast@0.1.2: version "0.1.2" resolved "https://registry.npm.taobao.org/yeast/download/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" @@ -7990,7 +11306,12 @@ yn@^2.0.0: resolved "https://registry.npm.taobao.org/yn/download/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= -zone.js@~0.9.1: - version "0.9.1" - resolved "https://registry.npm.taobao.org/zone.js/download/zone.js-0.9.1.tgz#e37c6e5c54c13fae4de26b5ffe8d8e9212da6d9b" - integrity sha1-43xuXFTBP65N4mtf/o2OkhLabZs= +zone.js@~0.10.2: + version "0.10.3" + resolved "https://registry.npm.taobao.org/zone.js/download/zone.js-0.10.3.tgz#3e5e4da03c607c9dcd92e37dd35687a14a140c16" + integrity sha1-Pl5NoDxgfJ3NkuN901aHoUoUDBY= + +zrender@4.3.2: + version "4.3.2" + resolved "https://registry.nlark.com/zrender/download/zrender-4.3.2.tgz#ec7432f9415c82c73584b6b7b8c47e1b016209c6" + integrity sha1-7HQy+UFcgsc1hLa3uMR+GwFiCcY=