text
stringlengths
2
1.05M
(function () { 'use strict'; angular.module('BlurAdmin.pages.transbox.history') .controller('HistoryPageCtrl', HistoryPageCtrl) .controller('HistoryModalCtrl', HistoryModalCtrl) ; function HistoryPageCtrl($scope, $filter, editableOptions, editableThemes, Http, Config, $uibModal, $window, Common, toastr, toastrConfig) { $scope.open = function (page, size, ctrl, params, saveCB, cancelCB) { $uibModal.open({ animation: true, templateUrl: page, size: size, controller: ctrl, bindToController: true, resolve: { params: params }, windowTopClass : "transfer-history-modal-top-class" }).result.then(function (result) { saveCB(result); }, function (result) { cancelCB(result); }); }; //器官种类 //$scope.organTypes = ["心","肝","费"]; // $scope.getOrganTypes = function () { Http.get(Config.apiPath.transfersOrganType, "").then(function (data) { //$scope.openToast('warning', '温馨提示', 'data:'+data); $scope.organTypes = data; }, function (msg) { $scope.organTypes = ['肝', '心', '肺']; }); //} //转运目的地 Http.get(Config.apiPath.hospitalName, "").then(function (data) { //$scope.openToast('warning', '温馨提示', 'data:'+data); $scope.hospitalNames = data; }, function (msg) { $scope.openToast('warning', '温馨提示', '查询医院名称错误'); }); var defaultConfig = angular.copy(toastrConfig); $scope.types = ['success', 'error', 'info', 'warning']; var openedToasts = []; $scope.options = { autoDismiss: false, positionClass: 'toast-top-right', type: 'error', timeOut: '5000', extendedTimeOut: '2000', allowHtml: false, closeButton: false, tapToDismiss: true, progressBar: false, newestOnTop: true, maxOpened: 0, preventDuplicates: false, preventOpenDuplicates: false, title: "保存失败", msg: "请正确填写所有医院信息" }; $scope.openToast = function (type, title, msg, duration) { if (!type || !title || !msg) { return; } $scope.options.type = type; $scope.options.title = title; $scope.options.msg = msg; $scope.options.timeOut = duration ? duration : '3000'; angular.extend(toastrConfig, $scope.options); openedToasts.push(toastr[$scope.options.type]($scope.options.msg, $scope.options.title)); var strOptions = {}; for (var o in $scope.options) if (o != 'msg' && o != 'title') strOptions[o] = $scope.options[o]; $scope.optionsStr = "toastr." + $scope.options.type + "(\'" + $scope.options.msg + "\', \'" + $scope.options.title + "\', " + JSON.stringify(strOptions, null, 2) + ")"; }; $scope.$on('$destroy', function iVeBeenDismissed() { angular.extend(toastrConfig, defaultConfig); }); $scope.data = { pageData: { totalItems: 0, transfers: [], displayedPages: 0 }, pagination: { currentPage: 1, maxSize: 20, previousText: '上一页', nextText: '下一页', isLoading: true }, selectAll: false, detailModal: {}, selectedTransfer: {}, searchOptions: { transferNumber: '', organSegNumber: '', organType: '', transferPersonName: '', fromCity: '', toHospitalName: '', beginDate: '', endDate: '' }, beginDate: { options: { formatYear: 'yyyy', startingDay: 1, showWeeks: false, language: 'zh-CN', }, isOpen: false, altInputFormats: ['yyyy-MM-dd'], format: 'yyyy-MM-dd', modelOptions: { timezone: 'Asia/beijing' } }, endDate: { options: { formatYear: 'yyyy', startingDay: 1, showWeeks: false, language: 'zh-CN', }, isOpen: false, altInputFormats: ['yyyy-MM-dd'], format: 'yyyy-MM-dd', modelOptions: { timezone: 'Asia/beijing' } }, newTransfer: { model: '', boxNumber: '', status: '', buyFrom: '', buyAt: '', remark: '' }, modalPageIndex: 0, //0 for basic info, 1 for realtime info //below is for xiyangyang data show pageState: 2, humidity: {}, // 统计湿度max/min temperature: {}, // 统计温度max/min openData: [], collisionData: [], crashData: [] //总的crash 数据 } $scope.toggleBeginDatepicker = function () { $scope.data.beginDate.isOpen = !$scope.data.beginDate.isOpen; } $scope.toggleEndDatepicker = function () { $scope.data.endDate.isOpen = !$scope.data.endDate.isOpen; } $scope.getDateString = function (obj) { return Config.getDateStringFromObject(obj); } $scope.data.searchOptions.organType = '0'; $scope.data.searchOptions.toHospitalName = '0'; //get all transfers that status is not 'done' $scope.getTransfersSql = function (tableState) { $scope.tableStateParam = tableState; if (!tableState) { return; } $scope.data.selectAll = false; $scope.data.pagination.isLoading = true; var pagination = tableState.pagination; var start = pagination.start || 0; // This is NOT the page number, but the index of item in the list that you want to use to display the table. var number = pagination.number || $scope.data.pagination.maxSize; // Number of entries showed per page. var params = { start: start, number: number } params.reverse = $scope.reverse; params.type = $scope.dataType; if (Config.userInfo.type === 'hospital' && Config.userInfo.hospitalInfo) { params.hospitalid = Config.userInfo.hospitalInfo.hospitalid; } if (!$.isEmptyObject($scope.data.searchOptions.transferNumber)) { params.transferNumber = $scope.data.searchOptions.transferNumber } if (!$.isEmptyObject($scope.data.searchOptions.organSegNumber)) { params.organSegNumber = $scope.data.searchOptions.organSegNumber } if (!$.isEmptyObject($scope.data.searchOptions.organType)) { params.organType = $scope.data.searchOptions.organType } if (!$.isEmptyObject($scope.data.searchOptions.transferPersonName)) { params.transferPersonName = $scope.data.searchOptions.transferPersonName } if (!$.isEmptyObject($scope.data.searchOptions.fromCity)) { params.fromCity = $scope.data.searchOptions.fromCity } if (!$.isEmptyObject($scope.data.searchOptions.toHospitalName)) { params.toHospitalName = $scope.data.searchOptions.toHospitalName } if ($scope.data.searchOptions.beginDate) { params.beginDate = moment($scope.data.searchOptions.beginDate).format('YYYY-MM-DD'); } if ($scope.data.searchOptions.endDate) { params.endDate = moment($scope.data.searchOptions.endDate).format('YYYY-MM-DD'); } params.status = "done"; Http.get(Config.apiPath.transfersSql, params).then(function (data) { $scope.data.pageData = data; tableState.pagination.numberOfPages = data.numberOfPages; $scope.data.pageData.displayedPages = Math.ceil(parseFloat(data.totalItems) / parseInt(data.numberOfPages)); $scope.data.pageData.tableState = tableState; $scope.data.pagination.isLoading = false; }, function (msg) { console.log(msg); $scope.data.pagination.isLoading = false; }); } $scope.sortBySql = function (propertyName) { //排序的符号 $scope.reverse = ($scope.propertyName === propertyName) ? !$scope.reverse : false; $scope.propertyName = propertyName; var tableStateParam = $scope.tableStateParam; $scope.data.selectAll = false; $scope.data.pagination.isLoading = true; //排序的类型 $scope.dataType = propertyName; var pagination = tableStateParam.pagination; $scope.tableStateParam.pagination.start = 0; var start = pagination.start || 0; start = 0; // This is NOT the page number, but the index of item in the list that you want to use to display the table. var number = pagination.number || $scope.data.pagination.maxSize; // Number of entries showed per page. var params = { start: start, number: number, type: propertyName } params.reverse = $scope.reverse; if (Config.userInfo.type === 'hospital' && Config.userInfo.hospitalInfo) { params.hospitalid = Config.userInfo.hospitalInfo.hospitalid; } if (!$.isEmptyObject($scope.data.searchOptions.transferNumber)) { params.transferNumber = $scope.data.searchOptions.transferNumber } if (!$.isEmptyObject($scope.data.searchOptions.organSegNumber)) { params.organSegNumber = $scope.data.searchOptions.organSegNumber } if (!$.isEmptyObject($scope.data.searchOptions.organType)) { params.organType = $scope.data.searchOptions.organType } if (!$.isEmptyObject($scope.data.searchOptions.transferPersonName)) { params.transferPersonName = $scope.data.searchOptions.transferPersonName } if (!$.isEmptyObject($scope.data.searchOptions.fromCity)) { params.fromCity = $scope.data.searchOptions.fromCity } if (!$.isEmptyObject($scope.data.searchOptions.toHospitalName)) { params.toHospitalName = $scope.data.searchOptions.toHospitalName } if ($scope.data.searchOptions.beginDate) { params.beginDate = moment($scope.data.searchOptions.beginDate).format('YYYY-MM-DD'); } if ($scope.data.searchOptions.endDate) { params.endDate = moment($scope.data.searchOptions.endDate).format('YYYY-MM-DD'); } Http.get(Config.apiPath.transfersSql, params).then(function (data) { $scope.data.pageData = data; tableStateParam.pagination.numberOfPages = data.numberOfPages; $scope.data.pageData.displayedPages = Math.ceil(parseFloat(data.totalItems) / parseInt(data.numberOfPages)); $scope.data.pageData.tableState = tableStateParam; $scope.data.pagination.isLoading = false; //$scope.openToast('warning', '温馨提示', 's:'+data.numberOfPages+","+$scope.data.pageData.displayedPages); }, function (msg) { console.log(msg); $scope.data.pagination.isLoading = false; //$scope.openToast('warning', '温馨提示', msg); }); } //get all transfers that status is not 'done' $scope.getTransfers = function (tableState) { if (!tableState) { return; } $scope.data.selectAll = false; $scope.data.pagination.isLoading = true; var pagination = tableState.pagination; var start = pagination.start || 0; // This is NOT the page number, but the index of item in the list that you want to use to display the table. var number = pagination.number || $scope.data.pagination.maxSize; // Number of entries showed per page. var params = { start: start, number: number, type: 'done' } if (Config.userInfo.type === 'hospital' && Config.userInfo.hospitalInfo) { params.hospitalid = Config.userInfo.hospitalInfo.hospitalid; } if (!$.isEmptyObject($scope.data.searchOptions.transferNumber)) { params.transferNumber = $scope.data.searchOptions.transferNumber } if (!$.isEmptyObject($scope.data.searchOptions.organSegNumber)) { params.organSegNumber = $scope.data.searchOptions.organSegNumber } if (!$.isEmptyObject($scope.data.searchOptions.organType)) { params.organType = $scope.data.searchOptions.organType } if (!$.isEmptyObject($scope.data.searchOptions.transferPersonName)) { params.transferPersonName = $scope.data.searchOptions.transferPersonName } if (!$.isEmptyObject($scope.data.searchOptions.fromCity)) { params.fromCity = $scope.data.searchOptions.fromCity } if (!$.isEmptyObject($scope.data.searchOptions.toHospitalName)) { params.toHospitalName = $scope.data.searchOptions.toHospitalName } if ($scope.data.searchOptions.beginDate) { params.beginDate = moment($scope.data.searchOptions.beginDate).format('YYYY-MM-DD'); } if ($scope.data.searchOptions.endDate) { params.endDate = moment($scope.data.searchOptions.endDate).format('YYYY-MM-DD'); } Http.get(Config.apiPath.transfers, params).then(function (data) { $scope.data.pageData = data; tableState.pagination.numberOfPages = data.numberOfPages; $scope.data.pageData.displayedPages = Math.ceil(parseFloat(data.totalItems) / parseInt(data.numberOfPages)); $scope.data.pageData.tableState = tableState; $scope.data.pagination.isLoading = false; }, function (msg) { console.log(msg); $scope.data.pagination.isLoading = false; }); } $scope.refreshTable = function () { if (parseInt($scope.data.pageData.numberOfPages) <= 1 && $scope.data.pageData.tableState) { $scope.getTransfersSql($scope.data.pageData.tableState); } else { angular .element('#transferTablePagination') .isolateScope() .selectPage(1); } } $scope.searchTransfers = function () { $scope.refreshTable(); } $scope.switchSelectAll = function () { $scope.data.selectAll = !$scope.data.selectAll; if ($scope.data.selectAll) { for (var i = 0; i < $scope.data.pageData.transfers.length; i++) { $scope.data.pageData.transfers[i].checked = true; } } else { for (var i = 0; i < $scope.data.pageData.transfers.length; i++) { $scope.data.pageData.transfers[i].checked = false; } } } $scope.checkTransfer = function (event, index) { event.stopPropagation(); } /* ================= create a new box begin ================= */ $scope.pickTransfer = function (transfer) { console.log(transfer); var params = { transferId:transfer.transferid, organSegNumber: transfer.organNum, //transferNumber: transfer.transferNumber, deviceId: transfer.deviceId, segNumber: transfer.segNumber, type: transfer.type, organCount: transfer.organCount, bloodType: transfer.blood, bloodSampleCount: transfer.bloodNum, sampleOrgan:transfer.sampleOrgan, organizationSampleCount: transfer.sampleOrganNum, getOrganAt: transfer.startAt, transferNumber: transfer.transferNumber, fromCity: transfer.fromCity, h_name: transfer.hospitalName, tracfficType: transfer.tracfficType, tracfficNumber: transfer.tracfficNumber, tp_name: transfer.name, phone: transfer.phone, o_name: transfer.opoName, contactPerson: transfer.contactName, contactPhone: transfer.contactPhone, boxPin:transfer.boxPin //organSegNumber:"1354", }; console.log(params); // Http.get('/transferInfo', params).then(function (data) { // $scope.data.selectedTransfer = data; // $scope.initData(); // 调用获取相关数据 // $scope.openDetailModal(); //打开model // // }, function (msg) { // // }); $scope.open('app/pages/transbox/history/modal/detail.html', 'lg', HistoryModalCtrl, {name: params}, function (item) { }, function (err) { console.log(err); }); }; $scope.openDetailModal = function () { // var options = { // animation: true, // templateUrl: 'app/pages/transbox/history/modal/detail.html', // size: 'lg', // controller: 'HistoryModalCtrl', // controllerAs: 'DetailModalCtrl', // bindToController: true, // scope: $scope, // // backdrop: 'static', // windowTopClass: 'transfer-modal-top-class' // } // $scope.data.detailModal = $uibModal.open(options); // // $scope.data.detailModal.closed.then(function () { // console.log('modal is closed.'); // console.log($scope.data.newTransfer); // }); }; $scope.isDetailTransferParamsCorrect = function () { var opo = $scope.data.newTransfer; console.log(opo); if ($.isEmptyObject(opo.name) || $.isEmptyObject(opo.grade) || $.isEmptyObject(opo.district)) { return false; } if ($.isEmptyObject(opo.address) || $.isEmptyObject(opo.contactPerson) || $.isEmptyObject(opo.contactPhone)) { return false; } return true; } $scope.createDetailBox = function () { if (!$scope.isDetailBoxParamsCorrect()) { $scope.openToast('warning', '温馨提示', '请正确填写所有OPO信息'); return; } var opoInfo = { name: $scope.data.newBox.name, grade: $scope.data.newBox.grade, contactPerson: $scope.data.newBox.contactPerson, district: $scope.data.newBox.district, address: $scope.data.newBox.address, contactPhone: $scope.data.newBox.contactPhone } if (!$.isEmptyObject($scope.data.newBox.remark)) { opoInfo.remark = $scope.data.newBox.remark; } Http.post(Config.apiPath.opo, opoInfo).then(function (data) { $scope.openToast('success', '创建成功', '您已成功创建一个OPO'); $scope.initDetailBoxParams(); $scope.closeDetailModal(); $scope.refreshPage(); // $scope.getBoxs(); }, function (msg) { $scope.openToast('error', '创建失败', msg); }); } $scope.closeDetailModal = function () { $scope.data.detailModal.close(); }; /* ================= create a new hospital end ================= */ $scope.openExportPage = function () { var url = "app/pages/transbox/history/widgets/export.html"; var win = $window.open(url, true); win.focus(); } $scope.exportTransfers = function () { var transferIds = []; var organSegs = []; var phones = []; var organs = []; for (var i = 0; i < $scope.data.pageData.transfers.length; i++) { var trans = $scope.data.pageData.transfers[i]; if (trans.checked) { transferIds.push(trans.transferid); organSegs.push(trans.segNumber); phones.push(trans.phone); organs.push(trans.type); } } if (transferIds.length > 0) { for (var i = 0; i < transferIds.length; i++) { var transferid = transferIds[i]; var organSeg = organSegs[i]; var phone = phones[i]; var organ = organs[i]; var strWindowFeatures = "location=yes,height=570,width=520,scrollbars=yes,status=yes"; //local //var URL = 'http://116.62.28.28:8080/transbox/api/export/' + transferid; var URL = 'http://116.62.28.28:8080/transbox/downloadPdf.do?action=pdf&organSeg=' + organSeg+'&phone='+phone+'&organ='+organ; //release //var URL = 'http://www.lifeperfusor.com/transbox/api/export/' + transferid; // var xmlHttp; // if (window.XMLHttpRequest) { // xmlHttp = new XMLHttpRequest(); // if (xmlHttp.overrideMimeType) // xmlHttp.overrideMimeType('text/xml'); // } else if (window.ActiveXObject) { // try { // xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); // } catch (e) { // try { // xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); // } catch (e) { // } // } // } // //var url = "http://127.0.0.1:8080/transbox/transfer.do?action=shutDownTransfer&organSeg="+$scope.data.organSeg+"&boxNo="+$scope.data.boxNo; // xmlHttp.open("GET", URL, true);// 异步处理返回 // //xmlHttp.onreadystatechange = callback; // xmlHttp.setRequestHeader("Content-Type", // "application/x-www-form-urlencoded;"); // xmlHttp.send(); var win = window.open(URL, "_blank", strWindowFeatures); } } else { $scope.openToast('warning', '温馨提示', '请先选择转运记录'); } } $scope.propertyName = 'transferNumber'; $scope.reverse = true; $scope.sortBy = function (propertyName) { $scope.reverse = ($scope.propertyName === propertyName) ? !$scope.reverse : false; $scope.propertyName = propertyName; }; } // modal controller function HistoryModalCtrl($scope, Http, params,$uibModal, Common, $timeout) { var teams = [ { "id": 1, "title": "团队组长", "name": "王某某", "post": "主治医生", "phone": "18300000000", "address": "浙江大学医学院附属第一医院", "leaderNum": 2, "attendNum": 4, "brief": "coco", "isShow": true }, { "id": 2, "title": "团队组员", "name": "王某某", "post": "主治医生", "phone": "18300000000", "address": "浙江大学医学院附属第一医院", "leaderNum": 2, "attendNum": 4, "brief": "coco", "isShow": true }, { "id": 3, "title": "团队组员", "name": "王某某", "post": "主治医生", "phone": "18300000000", "address": "浙江大学医学院附属第一医院", "leaderNum": 2, "attendNum": 4, "brief": "coco", "isShow": true } ]; $scope.item = { id: 1, title: "", name: "", post: "", phone: "", address: "", leaderNum: "", attendNum: "", brief: "", isShow: true } $scope.teams = teams; //修改team $scope.modifyTeam = function (index) { $scope.teams[index].isShow = !$scope.teams[index].isShow; } //删除team $scope.delTeam = function (index) { $scope.teams.splice(index, 1); } //增加team $scope.addTeam = function(){ $scope.item.isShow = !$scope.item.isShow; } var params1 = { organSegNumber: params.name.segNumber, transferNumber: params.name.transferNumber, transferId:params.name.transferId } $scope.openInfoForWindow = function (transferId) { // localStorage.transferInfo = transferInfo; var url ='http://www.lifeperfusor.com/transbox/transbox-adminPage/src/app/pages/transbox/history/modal/detailWindow.html?transferId='+transferId; window.open(url,'_blank'); } var transferId =params.name.transferId; //$timeout(function () { // 根据传过来的参数 获取记录 Http.get('/transferInfo', params1).then( function (data) { $scope.infoBase = data[0][0]; $scope.infoRecord = data[1]; console.log("js init2"); if($scope.infoBase.avgHumidity){ $scope.infoBase.avgHumidity = $scope.infoBase.avgHumidity.toFixed(1) } // if ($scope.infoBase) { // console.log("init data"); $scope.initData(); // } // $scope.beginTimer(); // start timer }, function (msg) { }); // }, 0); //历史的基本信息 $scope.transferInfo = params.name; $scope.data = { modalPageIndex: 0, humidity: {}, // 统计湿度max/min temperature: {}, // 统计温度max/min openData: [], collisionData: [], crashData: [] //总的crash 数据 }; // morris $scope.info = {}; $scope.lineModerationData = []; $scope.lineData = []; $scope.colors = ["#379DF2", "#F8B513"]; $scope.initDate = function (x) { var date = new Date(x); var m = date.getMonth() + 1; m = m < 10 ? ('0' + m) : m; var d = date.getDate(); d = d < 10 ? ('0' + d) : d; var h = date.getHours(); var minute = date.getMinutes(); minute = minute < 10 ? ('0' + minute) : minute; return m + '-' + d + ' ' + h + ':' + minute; }; // page data 开箱 $scope.getCrashInfo = function () { var p1 = { transferid: transferId, type: "open" }; Http.get("/records2", p1).then(function (suc) { $scope.data.openData = suc; $scope.getCollisionData(); }, function (fail) { }); }; //碰撞 $scope.getCollisionData = function () { var p2 = { transferid: transferId, type: "collision" }; Http.get("/records2", p2).then(function (suc) { // init数组 $scope.data.crashData = []; $scope.data.collisionData = suc; var oSize = $scope.data.openData.length; var cSize = $scope.data.collisionData.length; if (oSize > 0 || cSize > 0) { var size = oSize > cSize ? oSize : cSize; for (var i = 0; i < size; i++) { $scope.data.crashData.push({ oInfo: $scope.data.openData[i] ? $scope.data.openData[i] : '--', cInfo: $scope.data.collisionData[i] ? $scope.data.collisionData[i] : '--' }) } } else { $scope.data.crashData.push({ oInfo: '--', cInfo: '--' }) } }, function (fail) { }); }; $scope.initData = function () { // $scope.info = Config.baseInfo; // if ($scope.info.records.length < 1) { // return; // } $scope.getCrashInfo(); console.log("two"); // 湿度 var dataX = []; var dataY = []; var humidity = []; var count = $scope.infoBase.count; var lineSize = 40; var sizeInt =1; if(count<=lineSize){ }else{ sizeInt = parseInt(count/lineSize) } for (var i = 0; i < $scope.infoRecord.length; i++) { if(i%sizeInt==0) { var temp = $scope.infoRecord[i]; if (temp.humidity) { humidity.push(parseInt(temp.humidity)); dataX.push(temp.recordAt1); dataY.push(temp.humidity); } } } $scope.dataX = dataX; $scope.dataY = dataY; // if (humidity.length > 0) { // $scope.data.humidity.max = Common.arrMaxNum2(humidity) + "%"; // $scope.data.humidity.min = Common.arrMinNum2(humidity) + "%"; // $scope.data.humidity.avg = Common.arrAverageNum2(humidity) + "%"; // } // 温度 var tDataX = []; var tDataY = []; var temperature = []; var unTemperature = 0; var temperatureTotal = 0; for (var j = 0; j < $scope.infoRecord.length; j++) { var item = $scope.infoRecord[j]; // if (item.temperature && item.avgTemperature) { if(item.temperature<0||item.temperature>6){ temperature.push(parseFloat(item.temperature)); tDataX.push(item.recordAt1); tDataY.push(item.temperature); unTemperature++; temperatureTotal++; }else if(item.temperature&&j%sizeInt==0) { temperature.push(parseFloat(item.temperature)); tDataX.push(item.recordAt1); tDataY.push(item.temperature); temperatureTotal++; //tData.push({y: item.recordAt, x: item.temperature,lineColor: "red", markerType: "circle" }) } } console.log("four"); $scope.tDataX = tDataX; $scope.tDataY = tDataY; $scope.unTemperature = unTemperature; $scope.temperatureTotal = temperatureTotal; // if (temperature.length > 0) { // $scope.data.temperature.max = Common.arrMaxNum2(temperature) + "℃"; // $scope.data.temperature.min = Common.arrMinNum2(temperature) + "℃"; // } // // 开始时间 // $scope.info.startAtShow = moment($scope.info.startAt).format('MM-DD HH:mm'); // // 获取器官时间 // $scope.info.getOrganAtShow = moment($scope.info.getOrganAt).format('YYYY-MM-DD HH:mm'); }; // $scope.initData(); $scope.getShowtime = function (time) { if (time == '--') { return '--' } else { return moment(time).format('YYYY-MM-DD HH:mm'); } }; // fullPage $scope.mainOptions = { navigation: true, navigationPosition: 'right', scrollingSpeed: 1000 }; console.log("five"); // diff var script = document.createElement('script'); script.src = "http://webapi.amap.com/maps?v=1.3&key=6178b4ecd30a43f661ad2abf15f35595"; document.head.appendChild(script); var script1 = document.createElement('script'); script1.src = "https://img.hcharts.cn/highcharts/highcharts.js"; document.head.appendChild(script1); $scope.modalCheckBasicInfo = function () { if ($scope.data.modalPageIndex != 0) { $scope.data.modalPageIndex = 0; $('#baseInfo').addClass('btn-blue-solid'); $('#sensorInfo').removeClass('btn-blue-solid'); $('#functionInfo').removeClass('btn-blue-solid'); $('#teamInfo').removeClass('btn-blue-solid'); $('#patientInfo').removeClass('btn-blue-solid'); } }; $scope.modalCheckDataInfo = function () { if ($scope.data.modalPageIndex != 1) { $scope.data.modalPageIndex = 1; $('#sensorInfo').addClass('btn-blue-solid'); $('#baseInfo').removeClass('btn-blue-solid'); $('#functionInfo').removeClass('btn-blue-solid'); $('#teamInfo').removeClass('btn-blue-solid'); $('#patientInfo').removeClass('btn-blue-solid'); } }; $scope.modalCheckFunctionInfo = function () { if ($scope.data.modalPageIndex != 2) { $scope.data.modalPageIndex = 2; $('#functionInfo').addClass('btn-blue-solid'); $('#baseInfo').removeClass('btn-blue-solid'); $('#sensorInfo').removeClass('btn-blue-solid'); $('#teamInfo').removeClass('btn-blue-solid'); $('#patientInfo').removeClass('btn-blue-solid'); } }; $scope.modalCheckTeamInfo = function () { if ($scope.data.modalPageIndex != 3) { $scope.data.modalPageIndex = 3; $('#teamInfo').addClass('btn-blue-solid'); $('#baseInfo').removeClass('btn-blue-solid'); $('#sensorInfo').removeClass('btn-blue-solid'); $('#functionInfo').removeClass('btn-blue-solid'); $('#patientInfo').removeClass('btn-blue-solid'); } }; $scope.modalCheckPatientInfo = function () { if ($scope.data.modalPageIndex != 4) { $scope.data.modalPageIndex = 4; $('#patientInfo').addClass('btn-blue-solid'); $('#baseInfo').removeClass('btn-blue-solid'); $('#sensorInfo').removeClass('btn-blue-solid'); $('#functionInfo').removeClass('btn-blue-solid'); $('#teamInfo').removeClass('btn-blue-solid'); } }; /** * 导出 excel */ $scope.exportExcel = function (tId) { var transferid = tId; var strWindowFeatures = "location=yes,height=570,width=520,scrollbars=yes,status=yes"; //local //var URL = 'http://localhost:1337/transbox/api/export/' + transferid; var URL = 'http://116.62.28.28:8080/transbox/download.do?transfer_id=' + transferid; //release // var URL = 'http://www.lifeperfusor.com/transbox/api/export/' + transferid; var win = window.open(URL, "_blank", strWindowFeatures); }; } })();
/* -*- mode: js; indent-tabs-mode: nil -*- */ "use strict"; function inject() { writeln("script %r", format("data:text/javascript,var injected=%r;", [].slice.call(arguments))); } function showcommitShort() { writeln("script %r", format("data:text/javascript,var showcommitShort=%r;", [].slice.call(arguments))); } function showcommitLong() { writeln("script %r", format("data:text/javascript,var showcommitLong=%r;", [].slice.call(arguments))); } function injectCustom(path, query) { if (query && query.params.expr) { writeln("script %r", format("data:text/javascript,var injectedCustom=%r;", eval(query.params.expr))); } }
'use strict' const PDFDocument = require('pdfkit') const blobStream = require('blob-stream') const FileSaver = require('file-saver') const path = require('path') const fs = require('fs') const qr = require('qr-image') const request = require('request') module.exports = (shares, tx, nRequired, filename = false) => { let url = 'http://localhost:5000' if (!filename) url = window.location.origin return new Promise((resolve, reject) => { request({url: `${url}/assets/FLO_secret_share_logo.greyOnBlack.highres.png`, encoding: null}, (err, res, logo) => { if (err) console.log(err) const timeStamp = Date.now() shares.forEach((share, i) => { const doc = new PDFDocument({ autoFirstPage: false }) doc.font('Courier') const mainTextWidht = 450 console.log(`Share: ${i}`) doc.addPage({ margins: { top: 0, bottom: 0, left: 0, right: 0 } }) doc.lineWidth(25) doc.lineJoin('miter') .rect(0, 0, 612, 792) .stroke("black") .stroke() doc.image(logo, 20, 20, {width: 50}) doc.fontSize(25) doc.save() doc.translate(80, 30) .text('SharedSecret 1.0', { align: 'left' }) doc.translate(0,-5) .fontSize(10) .text('Powered by the FLO Blockchain') doc.fontSize(12) .moveDown(2) .text('A secret has been encrypted and posted on the blockchain of the FLO cryptocurrency in the the following transaction:', { align: 'justify', width: mainTextWidht }) .moveDown() doc.save() doc.fontSize(10) .translate(50, 0) .moveDown(1) .text(tx, { link: `https://florincoin.info/tx/${tx}`, align: 'center', width: 100 }) .moveDown(1) let qrtx = qr.svgObject(`https://florincoin.info/tx/${tx}`) doc.translate(280, 97).scale(1.5) .path(qrtx.path) .fill('black', 'even-odd') .stroke() .restore() doc.fontSize(12) .moveDown() .text(`The key to decrypt this secret has been split in ${shares.length} shares like this one. By design, the secret can be decrypted with any ${nRequired} of these shares.`, { align: 'justify', width: mainTextWidht }) .moveDown() .text(`Bellow is the part of the key that belongs to this share`, { align: 'justify', width: mainTextWidht }) .moveDown() doc.save() const qrShare = qr.svgObject(share, {level: 'H'}) doc.translate(260, 250).scale(1.5) .path(qrShare.path) .fill('black', 'even-odd') .stroke() .restore() doc.fontSize(7.4) .text(share, { width: 200, align: 'center' }) doc.fontSize(12) .moveDown(2) .text('Theoretically, the combination of these shares that yields to the recover of the master key to decode the secret can be executed without SharedSecrets.', { align: 'justify', width: mainTextWidht }) .moveDown() .text('However, we offer a client-side script that reads the QR-codes of each share and decode the message for the user in possession of the minimum number of shares to recover the decryption key.', { align: 'justify', width: mainTextWidht }) .moveDown() doc.fontSize(7) .text(`http://sharedsecret.net/get?tx=${tx}&ns=${nRequired}`, { align: 'center', width: mainTextWidht }) doc.save() const getQR = qr.svgObject(`http://sharedsecret.net/get?tx=${tx}&ns=${nRequired}`) doc.translate(195, 605).scale(1.5) .path(getQR.path) .fill('black', 'even-odd') .stroke() .restore() doc.fontSize(12) doc.moveDown(10) doc.fontSize(5) .text('SharedSecret 1.0', { align: 'center', width: mainTextWidht }) .restore() if (filename) { filename += `.${timeStamp}.share.${i + 1}.pdf` const pathFile = path.resolve(__dirname, '../scratch', filename) const tmpOutput = fs.createWriteStream(pathFile) doc.pipe(tmpOutput) doc.end() tmpOutput.on('finish', () => { console.log('done') }) } else { const tempFileName = `SecretShare.${timeStamp}.share.${i + 1}.pdf` const stream = doc.pipe(blobStream()) doc.end() stream.on('finish', () => { const blob = stream.toBlob('application/pdf') FileSaver.saveAs(blob, tempFileName) resolve(url) }) } }) }) }) }
let error = true let res = [ db.init.drop(), db.init.insert({ hello: "world" }), ] printjson(res)
(function(window,document,Laya){ var __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec; var BlendMode=laya.webgl.canvas.BlendMode,Event=laya.events.Event,HTMLCanvas=laya.resource.HTMLCanvas; var Handler=laya.utils.Handler,IndexBuffer2D=laya.webgl.utils.IndexBuffer2D,Loader=laya.net.Loader,MathUtil=laya.maths.MathUtil; var Matrix=laya.maths.Matrix,Render=laya.renders.Render,RenderContext=laya.renders.RenderContext,RenderSprite=laya.renders.RenderSprite; var Shader=laya.webgl.shader.Shader,Sprite=laya.display.Sprite,Stat=laya.utils.Stat,Texture=laya.resource.Texture; var Utils=laya.utils.Utils,Value2D=laya.webgl.shader.d2.value.Value2D,VertexBuffer2D=laya.webgl.utils.VertexBuffer2D; var WebGL=laya.webgl.WebGL,WebGLContext=laya.webgl.WebGLContext; /** *<code>EmitterBase</code> 类是粒子发射器类 */ //class laya.particle.emitter.EmitterBase var EmitterBase=(function(){ function EmitterBase(){ this._frameTime=0; this._emissionRate=60; this._emissionTime=0; this.minEmissionTime=1 / 60; this._particleTemplate=null; } __class(EmitterBase,'laya.particle.emitter.EmitterBase'); var __proto=EmitterBase.prototype; /** *开始发射粒子 *@param duration 发射持续的时间 */ __proto.start=function(duration){ (duration===void 0)&& (duration=1.7976931348623157e+308); if (this._emissionRate !=0) this._emissionTime=duration; } /** *停止发射粒子 *@param clearParticles 是否清理当前的粒子 */ __proto.stop=function(){ this._emissionTime=0; } /** *清理当前的活跃粒子 *@param clearTexture 是否清理贴图数据,若清除贴图数据将无法再播放 */ __proto.clear=function(){ this._emissionTime=0; } /** *发射一个粒子 * */ __proto.emit=function(){} /** *时钟前进 *@param passedTime 前进时间 * */ __proto.advanceTime=function(passedTime){ (passedTime===void 0)&& (passedTime=1); this._emissionTime-=passedTime; if (this._emissionTime < 0)return; this._frameTime+=passedTime; if (this._frameTime < this.minEmissionTime)return; while (this._frameTime > this.minEmissionTime){ this._frameTime-=this.minEmissionTime; this.emit(); } } /** *设置粒子粒子模板 *@param particleTemplate 粒子模板 * */ __getset(0,__proto,'particleTemplate',null,function(particleTemplate){ this._particleTemplate=particleTemplate; }); /** *设置粒子发射速率 *@param emissionRate 粒子发射速率 (个/秒) */ /** *获取粒子发射速率 *@return 发射速率 粒子发射速率 (个/秒) */ __getset(0,__proto,'emissionRate',function(){ return this._emissionRate; },function(_emissionRate){ if (_emissionRate <=0)return; this._emissionRate=_emissionRate; (_emissionRate > 0)&& (this.minEmissionTime=1 / _emissionRate); }); return EmitterBase; })() /** *@private */ //class laya.particle.ParticleData var ParticleData=(function(){ function ParticleData(){ this.position=null; this.velocity=null; this.startColor=null; this.endColor=null; this.sizeRotation=null; this.radius=null; this.radian=null; this.durationAddScale=NaN; this.time=NaN; } __class(ParticleData,'laya.particle.ParticleData'); ParticleData.Create=function(settings,position,velocity,time){ var particleData=new ParticleData(); particleData.position=position; MathUtil.scaleVector3(velocity,settings.emitterVelocitySensitivity,ParticleData._tempVelocity); var horizontalVelocity=MathUtil.lerp(settings.minHorizontalVelocity,settings.maxHorizontalVelocity,Math.random()); var horizontalAngle=Math.random()*Math.PI *2; ParticleData._tempVelocity[0]+=horizontalVelocity *Math.cos(horizontalAngle); ParticleData._tempVelocity[2]+=horizontalVelocity *Math.sin(horizontalAngle); ParticleData._tempVelocity[1]+=MathUtil.lerp(settings.minVerticalVelocity,settings.maxVerticalVelocity,Math.random()); particleData.velocity=ParticleData._tempVelocity; particleData.startColor=ParticleData._tempStartColor; particleData.endColor=ParticleData._tempEndColor; var i=0; if (settings.disableColor){ for (i=0;i < 3;i++){ particleData.startColor[i]=255; particleData.endColor[i]=255; } particleData.startColor[i]=MathUtil.lerp(settings.minStartColor[i],settings.maxStartColor[i],Math.random()); particleData.endColor[i]=MathUtil.lerp(settings.minEndColor[i],settings.maxEndColor[i],Math.random()); } else{ if (settings.colorComponentInter){ for (i=0;i < 4;i++){ particleData.startColor[i]=MathUtil.lerp(settings.minStartColor[i],settings.maxStartColor[i],Math.random()); particleData.endColor[i]=MathUtil.lerp(settings.minEndColor[i],settings.maxEndColor[i],Math.random()); } }else { MathUtil.lerpVector4(settings.minStartColor,settings.maxStartColor,Math.random(),particleData.startColor); MathUtil.lerpVector4(settings.minEndColor,settings.maxEndColor,Math.random(),particleData.endColor); } } particleData.sizeRotation=ParticleData._tempSizeRotation; var sizeRandom=Math.random(); particleData.sizeRotation[0]=MathUtil.lerp(settings.minStartSize,settings.maxStartSize,sizeRandom); particleData.sizeRotation[1]=MathUtil.lerp(settings.minEndSize,settings.maxEndSize,sizeRandom); particleData.sizeRotation[2]=MathUtil.lerp(settings.minRotateSpeed,settings.maxRotateSpeed,Math.random()); particleData.radius=ParticleData._tempRadius; var radiusRandom=Math.random(); particleData.radius[0]=MathUtil.lerp(settings.minStartRadius,settings.maxStartRadius,radiusRandom); particleData.radius[1]=MathUtil.lerp(settings.minEndRadius,settings.maxEndRadius,radiusRandom); particleData.radian=ParticleData._tempRadian; particleData.radian[0]=MathUtil.lerp(settings.minHorizontalStartRadian,settings.maxHorizontalStartRadian,Math.random()); particleData.radian[1]=MathUtil.lerp(settings.minVerticalStartRadian,settings.maxVerticalStartRadian,Math.random()); var useEndRadian=settings.useEndRadian; particleData.radian[2]=useEndRadian?MathUtil.lerp(settings.minHorizontalEndRadian,settings.maxHorizontalEndRadian,Math.random()):particleData.radian[0]; particleData.radian[3]=useEndRadian?MathUtil.lerp(settings.minVerticalEndRadian,settings.maxVerticalEndRadian,Math.random()):particleData.radian[1]; particleData.durationAddScale=settings.ageAddScale *Math.random(); particleData.time=time; return particleData; } __static(ParticleData, ['_tempVelocity',function(){return this._tempVelocity=new Float32Array(3);},'_tempStartColor',function(){return this._tempStartColor=new Float32Array(4);},'_tempEndColor',function(){return this._tempEndColor=new Float32Array(4);},'_tempSizeRotation',function(){return this._tempSizeRotation=new Float32Array(3);},'_tempRadius',function(){return this._tempRadius=new Float32Array(2);},'_tempRadian',function(){return this._tempRadian=new Float32Array(4);} ]); return ParticleData; })() /** *@private */ //class laya.particle.ParticleEmitter var ParticleEmitter=(function(){ function ParticleEmitter(templet,particlesPerSecond,initialPosition){ this._templet=null; this._timeBetweenParticles=NaN; this._previousPosition=null; this._timeLeftOver=0; this._tempVelocity=new Float32Array([0,0,0]); this._tempPosition=new Float32Array([0,0,0]); this._templet=templet; this._timeBetweenParticles=1.0 / particlesPerSecond; this._previousPosition=initialPosition; } __class(ParticleEmitter,'laya.particle.ParticleEmitter'); var __proto=ParticleEmitter.prototype; __proto.update=function(elapsedTime,newPosition){ elapsedTime=elapsedTime / 1000; if (elapsedTime > 0){ MathUtil.subtractVector3(newPosition,this._previousPosition,this._tempVelocity); MathUtil.scaleVector3(this._tempVelocity,1 / elapsedTime,this._tempVelocity); var timeToSpend=this._timeLeftOver+elapsedTime; var currentTime=-this._timeLeftOver; while (timeToSpend > this._timeBetweenParticles){ currentTime+=this._timeBetweenParticles; timeToSpend-=this._timeBetweenParticles; MathUtil.lerpVector3(this._previousPosition,newPosition,currentTime / elapsedTime,this._tempPosition); this._templet.addParticleArray(this._tempPosition,this._tempVelocity); } this._timeLeftOver=timeToSpend; } this._previousPosition[0]=newPosition[0]; this._previousPosition[1]=newPosition[1]; this._previousPosition[2]=newPosition[2]; } return ParticleEmitter; })() /** *<code>ParticleSettings</code> 类是粒子配置数据类 */ //class laya.particle.ParticleSetting var ParticleSetting=(function(){ function ParticleSetting(){ this.textureName=null; this.textureCount=1; this.maxPartices=100; this.duration=1; this.ageAddScale=0; this.emitterVelocitySensitivity=1; this.minStartSize=100; this.maxStartSize=100; this.minEndSize=100; this.maxEndSize=100; this.minHorizontalVelocity=0; this.maxHorizontalVelocity=0; this.minVerticalVelocity=0; this.maxVerticalVelocity=0; this.endVelocity=1; this.minRotateSpeed=0; this.maxRotateSpeed=0; this.minStartRadius=0; this.maxStartRadius=0; this.minEndRadius=0; this.maxEndRadius=0; this.minHorizontalStartRadian=0; this.maxHorizontalStartRadian=0; this.minVerticalStartRadian=0; this.maxVerticalStartRadian=0; this.useEndRadian=true; this.minHorizontalEndRadian=0; this.maxHorizontalEndRadian=0; this.minVerticalEndRadian=0; this.maxVerticalEndRadian=0; this.colorComponentInter=false; this.disableColor=false; this.blendState=0; this.emitterType="null"; this.emissionRate=0; this.sphereEmitterRadius=1; this.sphereEmitterVelocity=0; this.sphereEmitterVelocityAddVariance=0; this.ringEmitterRadius=30; this.ringEmitterVelocity=0; this.ringEmitterVelocityAddVariance=0; this.ringEmitterUp=2; this.gravity=new Float32Array([0,0,0]); this.minStartColor=new Float32Array([1,1,1,1]); this.maxStartColor=new Float32Array([1,1,1,1]); this.minEndColor=new Float32Array([1,1,1,1]); this.maxEndColor=new Float32Array([1,1,1,1]); this.pointEmitterPosition=new Float32Array([0,0,0]); this.pointEmitterPositionVariance=new Float32Array([0,0,0]); this.pointEmitterVelocity=new Float32Array([0,0,0]); this.pointEmitterVelocityAddVariance=new Float32Array([0,0,0]); this.boxEmitterCenterPosition=new Float32Array([0,0,0]); this.boxEmitterSize=new Float32Array([0,0,0]); this.boxEmitterVelocity=new Float32Array([0,0,0]); this.boxEmitterVelocityAddVariance=new Float32Array([0,0,0]); this.sphereEmitterCenterPosition=new Float32Array([0,0,0]); this.ringEmitterCenterPosition=new Float32Array([0,0,0]); this.positionVariance=new Float32Array([0,0,0]); } __class(ParticleSetting,'laya.particle.ParticleSetting'); ParticleSetting.checkSetting=function(setting){ var key; for (key in ParticleSetting._defaultSetting){ if (!setting.hasOwnProperty(key)){ setting[key]=ParticleSetting._defaultSetting[key]; } } } __static(ParticleSetting, ['_defaultSetting',function(){return this._defaultSetting=new ParticleSetting();} ]); return ParticleSetting; })() /** * *<code>ParticleTemplateBase</code> 类是粒子模板基类 * */ //class laya.particle.ParticleTemplateBase var ParticleTemplateBase=(function(){ function ParticleTemplateBase(){ this.settings=null; this.texture=null; } __class(ParticleTemplateBase,'laya.particle.ParticleTemplateBase'); var __proto=ParticleTemplateBase.prototype; /** *添加一个粒子 *@param position 粒子位置 *@param velocity 粒子速度 * */ __proto.addParticleArray=function(position,velocity){} return ParticleTemplateBase; })() /** *@private */ //class laya.particle.particleUtils.CanvasShader var CanvasShader=(function(){ function CanvasShader(){ this.u_Duration=NaN; this.u_EndVelocity=NaN; this.u_Gravity=null; this.a_Position=null; this.a_Velocity=null; this.a_StartColor=null; this.a_EndColor=null; this.a_SizeRotation=null; this.a_Radius=null; this.a_Radian=null; this.a_AgeAddScale=NaN; this.gl_Position=null; this.v_Color=null; this.oSize=NaN; this._color=new Float32Array(4); this._position=new Float32Array(3); } __class(CanvasShader,'laya.particle.particleUtils.CanvasShader'); var __proto=CanvasShader.prototype; __proto.getLen=function(position){ return Math.sqrt(position[0] *position[0]+position[1] *position[1]+position[2] *position[2]); } __proto.ComputeParticlePosition=function(position,velocity,age,normalizedAge){ this._position[0]=position[0]; this._position[1]=position[1]; this._position[2]=position[2]; var startVelocity=this.getLen(velocity); var endVelocity=startVelocity *this.u_EndVelocity; var velocityIntegral=startVelocity *normalizedAge+(endVelocity-startVelocity)*normalizedAge *normalizedAge / 2.0; var lenVelocity=NaN; lenVelocity=this.getLen(velocity); var i=0,len=0; len=3; for (i=0;i < len;i++){ this._position[i]=this._position[i]+(velocity[i] / lenVelocity)*velocityIntegral *this.u_Duration; this._position[i]+=this.u_Gravity[i] *age *normalizedAge; }; var radius=MathUtil.lerp(this.a_Radius[0],this.a_Radius[1],normalizedAge); var radianHorizontal=MathUtil.lerp(this.a_Radian[0],this.a_Radian[2],normalizedAge); var radianVertical=MathUtil.lerp(this.a_Radian[1],this.a_Radian[3],normalizedAge); var r=Math.cos(radianVertical)*radius; this._position[1]+=Math.sin(radianVertical)*radius; this._position[0]+=Math.cos(radianHorizontal)*r; this._position[2]+=Math.sin(radianHorizontal)*r; return new Float32Array([this._position[0],this._position[1],0.0,1.0]); } __proto.ComputeParticleSize=function(startSize,endSize,normalizedAge){ var size=MathUtil.lerp(startSize,endSize,normalizedAge); return size; } __proto.ComputeParticleRotation=function(rot,age){ return rot *age; } __proto.ComputeParticleColor=function(startColor,endColor,normalizedAge){ var rst=this._color; MathUtil.lerpVector4(startColor,endColor,normalizedAge,rst); rst[3]=rst[3]*normalizedAge *(1.0-normalizedAge)*(1.0-normalizedAge)*6.7; return rst; } __proto.clamp=function(value,min,max){ if(value<min)return min; if(value>max)return max; return value; } __proto.getData=function(age){ age *=1.0+this.a_AgeAddScale; var normalizedAge=this.clamp(age / this.u_Duration,0.0,1.0); this.gl_Position=this.ComputeParticlePosition(this.a_Position,this.a_Velocity,age,normalizedAge); var pSize=this.ComputeParticleSize(this.a_SizeRotation[0],this.a_SizeRotation[1],normalizedAge); var rotation=this.ComputeParticleRotation(this.a_SizeRotation[2],age); this.v_Color=this.ComputeParticleColor(this.a_StartColor,this.a_EndColor,normalizedAge); var matric=new Matrix(); var scale=NaN; scale=pSize/this.oSize*2; matric.scale(scale,scale); matric.rotate(rotation); matric.setTranslate(this.gl_Position[0],-this.gl_Position[1]); var alpha=NaN; alpha=this.v_Color[3]; return [this.v_Color,alpha,matric,this.v_Color[0]*alpha,this.v_Color[1]*alpha,this.v_Color[2]*alpha]; } return CanvasShader; })() /** * *@private * *@created 2015-8-25 下午3:41:07 */ //class laya.particle.particleUtils.CMDParticle var CMDParticle=(function(){ function CMDParticle(){ this.maxIndex=0; this.cmds=null; this.id=0; } __class(CMDParticle,'laya.particle.particleUtils.CMDParticle'); var __proto=CMDParticle.prototype; __proto.setCmds=function(cmds){ this.cmds=cmds; this.maxIndex=cmds.length-1; } return CMDParticle; })() //class laya.particle.particleUtils.PicTool var PicTool=(function(){ function PicTool(){}; __class(PicTool,'laya.particle.particleUtils.PicTool'); PicTool.getCanvasPic=function(img,color){ img=img.bitmap; var canvas=new HTMLCanvas("2D"); var ctx=canvas.getContext('2d'); canvas.size(img.width,img.height); var red=(color >> 16 & 0xFF); var green=(color >> 8 & 0xFF); var blue=(color & 0xFF); if(Render.isConchApp){ ctx.setFilter(red/255,green/255,blue/255,0); } ctx.drawImage(img.source,0,0); if (!Render.isConchApp){ var imgdata=ctx.getImageData(0,0,canvas.width,canvas.height); var data=imgdata.data; for (var i=0,n=data.length;i < n;i+=4){ if (data[i+3]==0)continue ; data[i]=red; data[i+1]=green; data[i+2]=blue; } ctx.putImageData(imgdata,0,0); } return canvas; } PicTool.getRGBPic=function(img){ var rst; rst=[new Texture(PicTool.getCanvasPic(img,0xFF0000)),new Texture(PicTool.getCanvasPic(img,0x00FF00)),new Texture(PicTool.getCanvasPic(img,0x0000FF))]; return rst; } return PicTool; })() /** * *@private */ //class laya.particle.emitter.Emitter2D extends laya.particle.emitter.EmitterBase var Emitter2D=(function(_super){ function Emitter2D(_template){ this.setting=null; this._posRange=null; this._canvasTemplate=null; this._emitFun=null; Emitter2D.__super.call(this); this.template=_template; } __class(Emitter2D,'laya.particle.emitter.Emitter2D',_super); var __proto=Emitter2D.prototype; __proto.emit=function(){ _super.prototype.emit.call(this); if(this._emitFun!=null) this._emitFun(); } __proto.getRandom=function(value){ return (Math.random()*2-1)*value; } __proto.webGLEmit=function(){ var pos=new Float32Array(3); pos[0]=this.getRandom(this._posRange[0]); pos[1]=this.getRandom(this._posRange[1]); pos[2]=this.getRandom(this._posRange[2]); var v=new Float32Array(3); v[0]=0; v[1]=0; v[2]=0; this._particleTemplate.addParticleArray(pos,v); } __proto.canvasEmit=function(){ var pos=new Float32Array(3); pos[0]=this.getRandom(this._posRange[0]); pos[1]=this.getRandom(this._posRange[1]); pos[2]=this.getRandom(this._posRange[2]); var v=new Float32Array(3); v[0]=0; v[1]=0; v[2]=0; this._particleTemplate.addParticleArray(pos,v); } __getset(0,__proto,'template',function(){ return this._particleTemplate; },function(template){ this._particleTemplate=template; if (!template){ this._emitFun=null; this.setting=null; this._posRange=null; }; this.setting=template.settings; this._posRange=this.setting.positionVariance; if((this._particleTemplate instanceof laya.particle.ParticleTemplate2D )){ this._emitFun=this.webGLEmit; }else if((this._particleTemplate instanceof laya.particle.ParticleTemplateCanvas )){ this._canvasTemplate=template; this._emitFun=this.canvasEmit; } }); return Emitter2D; })(EmitterBase) /** *@private */ //class laya.particle.ParticleTemplateWebGL extends laya.particle.ParticleTemplateBase var ParticleTemplateWebGL=(function(_super){ function ParticleTemplateWebGL(parSetting){ this._vertices=null; this._vertexBuffer=null; this._indexBuffer=null; this._floatCountPerVertex=29; this._firstActiveElement=0; this._firstNewElement=0; this._firstFreeElement=0; this._firstRetiredElement=0; this._currentTime=0; this._drawCounter=0; ParticleTemplateWebGL.__super.call(this); this.settings=parSetting; } __class(ParticleTemplateWebGL,'laya.particle.ParticleTemplateWebGL',_super); var __proto=ParticleTemplateWebGL.prototype; __proto.initialize=function(){ this._vertices=new Float32Array(this.settings.maxPartices *this._floatCountPerVertex *4); var particleOffset=0; for (var i=0;i < this.settings.maxPartices;i++){ var random=Math.random(); var cornerYSegement=this.settings.textureCount ? 1.0 / this.settings.textureCount :1.0; var cornerY=NaN; for (cornerY=0;cornerY < this.settings.textureCount;cornerY+=cornerYSegement){ if (random < cornerY+cornerYSegement) break ; } particleOffset=i *this._floatCountPerVertex *4; this._vertices[particleOffset+this._floatCountPerVertex *0+0]=-1; this._vertices[particleOffset+this._floatCountPerVertex *0+1]=-1; this._vertices[particleOffset+this._floatCountPerVertex *0+2]=0; this._vertices[particleOffset+this._floatCountPerVertex *0+3]=cornerY; this._vertices[particleOffset+this._floatCountPerVertex *1+0]=1; this._vertices[particleOffset+this._floatCountPerVertex *1+1]=-1; this._vertices[particleOffset+this._floatCountPerVertex *1+2]=1; this._vertices[particleOffset+this._floatCountPerVertex *1+3]=cornerY; this._vertices[particleOffset+this._floatCountPerVertex *2+0]=1; this._vertices[particleOffset+this._floatCountPerVertex *2+1]=1; this._vertices[particleOffset+this._floatCountPerVertex *2+2]=1; this._vertices[particleOffset+this._floatCountPerVertex *2+3]=cornerY+cornerYSegement; this._vertices[particleOffset+this._floatCountPerVertex *3+0]=-1; this._vertices[particleOffset+this._floatCountPerVertex *3+1]=1; this._vertices[particleOffset+this._floatCountPerVertex *3+2]=0; this._vertices[particleOffset+this._floatCountPerVertex *3+3]=cornerY+cornerYSegement; } } __proto.loadContent=function(){} __proto.update=function(elapsedTime){ this._currentTime+=elapsedTime / 1000; this.retireActiveParticles(); this.freeRetiredParticles(); if (this._firstActiveElement==this._firstFreeElement) this._currentTime=0; if (this._firstRetiredElement==this._firstActiveElement) this._drawCounter=0; } __proto.retireActiveParticles=function(){ var epsilon=0.0001; var particleDuration=this.settings.duration; while (this._firstActiveElement !=this._firstNewElement){ var offset=this._firstActiveElement *this._floatCountPerVertex *4; var index=offset+28; var particleAge=this._currentTime-this._vertices[index]; particleAge *=(1.0+this._vertices[offset+27]); if (particleAge+epsilon < particleDuration) break ; this._vertices[index]=this._drawCounter; this._firstActiveElement++; if (this._firstActiveElement >=this.settings.maxPartices) this._firstActiveElement=0; } } __proto.freeRetiredParticles=function(){ while (this._firstRetiredElement !=this._firstActiveElement){ var age=this._drawCounter-this._vertices[this._firstRetiredElement *this._floatCountPerVertex *4+28]; if (age < 3) break ; this._firstRetiredElement++; if (this._firstRetiredElement >=this.settings.maxPartices) this._firstRetiredElement=0; } } __proto.addNewParticlesToVertexBuffer=function(){} __proto.addParticleArray=function(position,velocity){ var nextFreeParticle=this._firstFreeElement+1; if (nextFreeParticle >=this.settings.maxPartices) nextFreeParticle=0; if (nextFreeParticle===this._firstRetiredElement) return; var particleData=ParticleData.Create(this.settings,position,velocity,this._currentTime); var startIndex=this._firstFreeElement *this._floatCountPerVertex *4; for (var i=0;i < 4;i++){ var j=0,offset=0; for (j=0,offset=4;j < 3;j++) this._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.position[j]; for (j=0,offset=7;j < 3;j++) this._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.velocity[j]; for (j=0,offset=10;j < 4;j++) this._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.startColor[j]; for (j=0,offset=14;j < 4;j++) this._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.endColor[j]; for (j=0,offset=18;j < 3;j++) this._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.sizeRotation[j]; for (j=0,offset=21;j < 2;j++) this._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.radius[j]; for (j=0,offset=23;j < 4;j++) this._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.radian[j]; this._vertices[startIndex+i *this._floatCountPerVertex+27]=particleData.durationAddScale; this._vertices[startIndex+i *this._floatCountPerVertex+28]=particleData.time; } this._firstFreeElement=nextFreeParticle; } return ParticleTemplateWebGL; })(ParticleTemplateBase) /** *@private */ //class laya.particle.ParticleTemplateCanvas extends laya.particle.ParticleTemplateBase var ParticleTemplateCanvas=(function(_super){ function ParticleTemplateCanvas(particleSetting){ this._ready=false; this.textureList=[]; this.particleList=[]; this.pX=0; this.pY=0; this.activeParticles=[]; this.deadParticles=[]; this.iList=[]; this._maxNumParticles=0; this.textureWidth=NaN; this.dTextureWidth=NaN; this.colorChange=true; this.step=1/60; this.canvasShader=new CanvasShader(); ParticleTemplateCanvas.__super.call(this); this.settings=particleSetting; this._maxNumParticles=particleSetting.maxPartices; this.texture=new Texture(); this.texture.on(/*laya.events.Event.LOADED*/"loaded",this,this._textureLoaded); this.texture.load(particleSetting.textureName); } __class(ParticleTemplateCanvas,'laya.particle.ParticleTemplateCanvas',_super); var __proto=ParticleTemplateCanvas.prototype; __proto._textureLoaded=function(e){ this.setTexture(this.texture); this._ready=true; } __proto.clear=function(clearTexture){ (clearTexture===void 0)&& (clearTexture=true); this.deadParticles.length=0; this.activeParticles.length=0; this.textureList.length=0; } /** *设置纹理 *@param texture * */ __proto.setTexture=function(texture){ this.texture=texture; this.textureWidth=texture.width; this.dTextureWidth=1/this.textureWidth; this.pX=-texture.width*0.5; this.pY=-texture.height*0.5; this.textureList=ParticleTemplateCanvas.changeTexture(texture,this.textureList); this.particleList.length=0; this.deadParticles.length=0; this.activeParticles.length=0; } /** *创建一个粒子数据 *@return * */ __proto._createAParticleData=function(position,velocity){ this.canvasShader.u_EndVelocity=this.settings.endVelocity; this.canvasShader.u_Gravity=this.settings.gravity; this.canvasShader.u_Duration=this.settings.duration; var particle; particle=ParticleData.Create(this.settings,position,velocity,0); this.canvasShader.a_Position=particle.position; this.canvasShader.a_Velocity=particle.velocity; this.canvasShader.a_StartColor=particle.startColor; this.canvasShader.a_EndColor=particle.endColor; this.canvasShader.a_SizeRotation=particle.sizeRotation; this.canvasShader.a_Radius=particle.radius; this.canvasShader.a_Radian=particle.radian; this.canvasShader.a_AgeAddScale=particle.durationAddScale; this.canvasShader.oSize=this.textureWidth; var rst=new CMDParticle(); var i=0,len=this.settings.duration/(1+particle.durationAddScale); var params=[]; var mStep=NaN; for(i=0;i<len;i+=this.step){ params.push(this.canvasShader.getData(i)); } rst.id=this.particleList.length; this.particleList.push(rst); rst.setCmds(params); return rst; } __proto.addParticleArray=function(position,velocity){ if(!this._ready)return; var tParticle; if(this.particleList.length<this._maxNumParticles){ tParticle=this._createAParticleData(position,velocity); this.iList[tParticle.id]=0; this.activeParticles.push(tParticle); }else{ if(this.deadParticles.length>0){ tParticle=this.deadParticles.pop(); this.iList[tParticle.id]=0; this.activeParticles.push(tParticle); } } } __proto.advanceTime=function(passedTime){ (passedTime===void 0)&& (passedTime=1); if(!this._ready)return; var particleList=this.activeParticles; var pool=this.deadParticles; var i=0,len=particleList.length; var tcmd; var tI=0; var iList=this.iList; for(i=len-1;i>-1;i--){ tcmd=particleList[i]; tI=iList[tcmd.id]; if(tI>=tcmd.maxIndex){ tI=0; particleList.splice(i,1); pool.push(tcmd); }else{ tI+=1; } iList[tcmd.id]=tI; } } __proto.render=function(context,x,y){ if(!this._ready)return; if(this.activeParticles.length<1)return; if (this.textureList.length < 2)return; if (this.settings.disableColor){ this.noColorRender(context,x,y); }else{ this.canvasRender(context,x,y); } } __proto.noColorRender=function(context,x,y){ var particleList=this.activeParticles; var i=0,len=particleList.length; var tcmd; var tParam; var tAlpha=NaN; var px=this.pX,py=this.pY; var pw=-px*2,ph=-py*2; var tI=0; var textureList=this.textureList; var iList=this.iList; var preAlpha=NaN; context.translate(x,y); preAlpha=context.ctx.globalAlpha; for(i=0;i<len;i++){ tcmd=particleList[i]; tI=iList[tcmd.id]; tParam=tcmd.cmds[tI]; if (!tParam)continue ; if ((tAlpha=tParam[1])<=0.01)continue ; context.setAlpha(preAlpha*tAlpha); context.drawTextureWithTransform(this.texture,px,py,pw,ph,tParam[2],1); } context.setAlpha(preAlpha); context.translate(-x,-y); } __proto.canvasRender=function(context,x,y){ var particleList=this.activeParticles; var i=0,len=particleList.length; var tcmd; var tParam; var tAlpha=NaN; var px=this.pX,py=this.pY; var pw=-px*2,ph=-py*2; var tI=0; var textureList=this.textureList; var iList=this.iList; var preAlpha=NaN; var preB; context.translate(x,y); preAlpha=context.ctx.globalAlpha; preB=context.ctx.globalCompositeOperation; context.blendMode("lighter"); for(i=0;i<len;i++){ tcmd=particleList[i]; tI=iList[tcmd.id]; tParam=tcmd.cmds[tI]; if (!tParam)continue ; if ((tAlpha=tParam[1])<=0.01)continue ; context.save(); context.transformByMatrix(tParam[2]); if(tParam[3]>0.01){ context.setAlpha(preAlpha*tParam[3]); context.drawTexture(textureList[0],px,py,pw,ph); } if(tParam[4]>0.01){ context.setAlpha(preAlpha*tParam[4]); context.drawTexture(textureList[1],px,py,pw,ph); } if(tParam[5]>0.01){ context.setAlpha(preAlpha*tParam[5]); context.drawTexture(textureList[2],px,py,pw,ph); } context.restore(); } context.setAlpha(preAlpha); context.translate(-x,-y); context.blendMode(preB); } ParticleTemplateCanvas.changeTexture=function(texture,rst,settings){ if(!rst)rst=[]; rst.length=0; if (settings&&settings.disableColor){ rst.push(texture,texture,texture); }else{ Utils.copyArray(rst,PicTool.getRGBPic(texture)); } return rst; } return ParticleTemplateCanvas; })(ParticleTemplateBase) /** *@private */ //class laya.particle.ParticleTemplate2D extends laya.particle.ParticleTemplateWebGL var ParticleTemplate2D=(function(_super){ function ParticleTemplate2D(parSetting){ this._vertexBuffer2D=null; this._indexBuffer2D=null; this.x=0; this.y=0; this._blendFn=null; this._startTime=0; this.sv=new ParticleShaderValue(); ParticleTemplate2D.__super.call(this,parSetting); var _this=this; Laya.loader.load(this.settings.textureName,Handler.create(null,function(texture){ (texture.bitmap).enableMerageInAtlas=false; _this.texture=texture; })); this.sv.u_Duration=this.settings.duration; this.sv.u_Gravity=this.settings.gravity; this.sv.u_EndVelocity=this.settings.endVelocity; this._blendFn=BlendMode.fns[parSetting.blendState]; this.initialize(); this._vertexBuffer=this._vertexBuffer2D=VertexBuffer2D.create(-1,/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8); this._indexBuffer=this._indexBuffer2D=IndexBuffer2D.create(/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4); this.loadContent(); } __class(ParticleTemplate2D,'laya.particle.ParticleTemplate2D',_super); var __proto=ParticleTemplate2D.prototype; Laya.imps(__proto,{"laya.webgl.submit.ISubmit":true}) __proto.getRenderType=function(){return-111} __proto.releaseRender=function(){} __proto.addParticleArray=function(position,velocity){ position[0]+=this.x; position[1]+=this.y; _super.prototype.addParticleArray.call(this,position,velocity); } __proto.loadContent=function(){ var indexes=new Uint16Array(this.settings.maxPartices *6); for (var i=0;i < this.settings.maxPartices;i++){ indexes[i *6+0]=(i *4+0); indexes[i *6+1]=(i *4+1); indexes[i *6+2]=(i *4+2); indexes[i *6+3]=(i *4+0); indexes[i *6+4]=(i *4+2); indexes[i *6+5]=(i *4+3); } this._indexBuffer2D.clear(); this._indexBuffer2D.append(indexes); this._indexBuffer2D.upload(); } __proto.addNewParticlesToVertexBuffer=function(){ this._vertexBuffer2D.clear(); this._vertexBuffer2D.append(this._vertices); var start=0; if (this._firstNewElement < this._firstFreeElement){ start=this._firstNewElement *4 *this._floatCountPerVertex *4; this._vertexBuffer2D.subUpload(start,start,start+(this._firstFreeElement-this._firstNewElement)*4 *this._floatCountPerVertex *4); }else { start=this._firstNewElement *4 *this._floatCountPerVertex *4; this._vertexBuffer2D.subUpload(start,start,start+(this.settings.maxPartices-this._firstNewElement)*4 *this._floatCountPerVertex *4); if (this._firstFreeElement > 0){ this._vertexBuffer2D.setNeedUpload(); this._vertexBuffer2D.subUpload(0,0,this._firstFreeElement *4 *this._floatCountPerVertex *4); } } this._firstNewElement=this._firstFreeElement; } __proto.renderSubmit=function(){ if (this.texture&&this.texture.loaded){ this.update(Laya.timer.delta); this.sv.u_CurrentTime=this._currentTime; if (this._firstNewElement !=this._firstFreeElement){ this.addNewParticlesToVertexBuffer(); } this.blend(); if (this._firstActiveElement !=this._firstFreeElement){ var gl=WebGL.mainContext; this._vertexBuffer2D.bind(this._indexBuffer2D); this.sv.u_texture=this.texture.source; this.sv.upload(); if (this._firstActiveElement < this._firstFreeElement){ WebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,(this._firstFreeElement-this._firstActiveElement)*6,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,this._firstActiveElement *6 *2); } else{ WebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,(this.settings.maxPartices-this._firstActiveElement)*6,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,this._firstActiveElement *6 *2); if (this._firstFreeElement > 0) WebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._firstFreeElement *6,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,0); } Stat.drawCall++; } this._drawCounter++; } return 1; } __proto.blend=function(){ if (BlendMode.activeBlendFunction!==this._blendFn){ var gl=WebGL.mainContext; gl.enable(/*laya.webgl.WebGLContext.BLEND*/0x0BE2); this._blendFn(gl); BlendMode.activeBlendFunction=this._blendFn; } } __proto.dispose=function(){ this._indexBuffer2D.dispose(); } ParticleTemplate2D.activeBlendType=-1; return ParticleTemplate2D; })(ParticleTemplateWebGL) /** *@private */ //class laya.particle.shader.value.ParticleShaderValue extends laya.webgl.shader.d2.value.Value2D var ParticleShaderValue=(function(_super){ function ParticleShaderValue(){ this.a_CornerTextureCoordinate=[4,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,0]; this.a_Position=[3,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,16]; this.a_Velocity=[3,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,28]; this.a_StartColor=[4,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,40]; this.a_EndColor=[4,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,56]; this.a_SizeRotation=[3,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,72]; this.a_Radius=[2,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,84]; this.a_Radian=[4,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,92]; this.a_AgeAddScale=[1,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,108]; this.a_Time=[1,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,112]; this.u_CurrentTime=NaN; this.u_Duration=NaN; this.u_Gravity=null; this.u_EndVelocity=NaN; this.u_texture=null; ParticleShaderValue.__super.call(this,0,0); } __class(ParticleShaderValue,'laya.particle.shader.value.ParticleShaderValue',_super); var __proto=ParticleShaderValue.prototype; __proto.upload=function(){ this.refresh(); ParticleShaderValue.pShader.upload(this); } __static(ParticleShaderValue, ['pShader',function(){return this.pShader=new ParticleShader();} ]); return ParticleShaderValue; })(Value2D) /** *<code>Particle2D</code> 类是2D粒子播放类 * */ //class laya.particle.Particle2D extends laya.display.Sprite var Particle2D=(function(_super){ function Particle2D(setting){ this._matrix4=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]; this._particleTemplate=null; this._canvasTemplate=null; this._emitter=null; this.autoPlay=true; Particle2D.__super.call(this); if (setting)this.setParticleSetting(setting); } __class(Particle2D,'laya.particle.Particle2D',_super); var __proto=Particle2D.prototype; /** *加载粒子文件 *@param url 粒子文件地址 */ __proto.load=function(url){ Laya.loader.load(url,Handler.create(this,this.setParticleSetting),null,/*laya.net.Loader.JSON*/"json"); } /** *设置粒子配置数据 *@param settings 粒子配置数据 */ __proto.setParticleSetting=function(setting){ var _$this=this; if (!setting)return this.stop(); ParticleSetting.checkSetting(setting); if(/*__JS__ */!window.ConchParticleTemplate2D||Render.isWebGL)this.customRenderEnable=true; if (Render.isWebGL){ this._particleTemplate=new ParticleTemplate2D(setting); this.graphics._saveToCmd(Render.context._drawParticle,[this._particleTemplate]); } else if (Render.isConchApp&&/*__JS__ */window.ConchParticleTemplate2D){ this._particleTemplate=/*__JS__ */new ConchParticleTemplate2D(); var _this=this; Laya.loader.load(setting.textureName,Handler.create(null,function(texture){ /*__JS__ */_this._particleTemplate.texture=texture; _this._particleTemplate.settings=setting; if (Render.isConchNode){ /*__JS__ */_this.graphics.drawParticle(_this._particleTemplate); } else{ _this.graphics._saveToCmd(Render.context._drawParticle,[_$this._particleTemplate]); } })); this._emitter={start:function (){}}; /*__JS__ */this.play=this._particleTemplate.play.bind(this._particleTemplate); /*__JS__ */this.stop=this._particleTemplate.stop.bind(this._particleTemplate); if (this.autoPlay)this.play(); return; } else { this._particleTemplate=this._canvasTemplate=new ParticleTemplateCanvas(setting); } if (!this._emitter){ this._emitter=new Emitter2D(this._particleTemplate); }else { (this._emitter).template=this._particleTemplate; } if (this.autoPlay){ this.emitter.start(); this.play(); } } /** *播放 */ __proto.play=function(){ Laya.timer.frameLoop(1,this,this._loop); } /** *停止 */ __proto.stop=function(){ Laya.timer.clear(this,this._loop); } /**@private */ __proto._loop=function(){ this.advanceTime(1 / 60); } /** *时钟前进 *@param passedTime 时钟前进时间 */ __proto.advanceTime=function(passedTime){ (passedTime===void 0)&& (passedTime=1); if (this._canvasTemplate){ this._canvasTemplate.advanceTime(passedTime); } if (this._emitter){ this._emitter.advanceTime(passedTime); } } __proto.customRender=function(context,x,y){ if (Render.isWebGL){ this._matrix4[0]=context.ctx._curMat.a; this._matrix4[1]=context.ctx._curMat.b; this._matrix4[4]=context.ctx._curMat.c; this._matrix4[5]=context.ctx._curMat.d; this._matrix4[12]=context.ctx._curMat.tx; this._matrix4[13]=context.ctx._curMat.ty; var sv=(this._particleTemplate).sv; sv.u_mmat=this._matrix4; } if (this._canvasTemplate){ this._canvasTemplate.render(context,x,y); } } __proto.destroy=function(destroyChild){ (destroyChild===void 0)&& (destroyChild=true); if ((this._particleTemplate instanceof laya.particle.ParticleTemplate2D )) (this._particleTemplate).dispose(); _super.prototype.destroy.call(this,destroyChild); } /** *设置 粒子文件地址 *@param path 粒子文件地址 */ __getset(0,__proto,'url',null,function(url){ this.load(url); }); /** *获取粒子发射器 */ __getset(0,__proto,'emitter',function(){ return this._emitter; }); return Particle2D; })(Sprite) /** *@private */ //class laya.particle.shader.ParticleShader extends laya.webgl.shader.Shader var ParticleShader=(function(_super){ function ParticleShader(){ ParticleShader.__super.call(this,ParticleShader.vs,ParticleShader.ps,"ParticleShader"); } __class(ParticleShader,'laya.particle.shader.ParticleShader',_super); __static(ParticleShader, ['vs',function(){return this.vs="attribute vec4 a_CornerTextureCoordinate;\nattribute vec3 a_Position;\nattribute vec3 a_Velocity;\nattribute vec4 a_StartColor;\nattribute vec4 a_EndColor;\nattribute vec3 a_SizeRotation;\nattribute vec2 a_Radius;\nattribute vec4 a_Radian;\nattribute float a_AgeAddScale;\nattribute float a_Time;\n\nvarying vec4 v_Color;\nvarying vec2 v_TextureCoordinate;\n\nuniform float u_CurrentTime;\nuniform float u_Duration;\nuniform float u_EndVelocity;\nuniform vec3 u_Gravity;\n\n#ifdef PARTICLE3D\n uniform mat4 u_WorldMat;\n uniform mat4 u_View;\n uniform mat4 u_Projection;\n uniform vec2 u_ViewportScale;\n#else\n uniform vec2 size;\n uniform mat4 mmat;\n uniform mat4 u_mmat;\n#endif\n\nvec4 ComputeParticlePosition(in vec3 position, in vec3 velocity,in float age,in float normalizedAge)\n{\n\n float startVelocity = length(velocity);//起始标量速度\n float endVelocity = startVelocity * u_EndVelocity;//结束标量速度\n\n float velocityIntegral = startVelocity * normalizedAge +(endVelocity - startVelocity) * normalizedAge *normalizedAge/2.0;//计算当前速度的标量(单位空间),vt=v0*t+(1/2)*a*(t^2)\n \n vec3 addPosition = normalize(velocity) * velocityIntegral * u_Duration;//计算受自身速度影响的位置,转换标量到矢量 \n addPosition += u_Gravity * age * normalizedAge;//计算受重力影响的位置\n \n float radius=mix(a_Radius.x, a_Radius.y, normalizedAge); //计算粒子受半径和角度影响(无需计算角度和半径时,可用宏定义优化屏蔽此计算)\n float radianHorizontal =mix(a_Radian.x,a_Radian.z,normalizedAge);\n float radianVertical =mix(a_Radian.y,a_Radian.w,normalizedAge);\n \n float r =cos(radianVertical)* radius;\n addPosition.y += sin(radianVertical) * radius;\n \n addPosition.x += cos(radianHorizontal) *r;\n addPosition.z += sin(radianHorizontal) *r;\n \n #ifdef PARTICLE3D\n position+=addPosition;\n return u_Projection*u_View*u_WorldMat*(vec4(position, 1.0));\n #else\n addPosition.y=-addPosition.y;//2D粒子位置更新需要取负,2D粒子坐标系Y轴正向朝上\n position+=addPosition;\n return vec4(position,1.0);\n #endif\n}\n\nfloat ComputeParticleSize(in float startSize,in float endSize, in float normalizedAge)\n{ \n float size = mix(startSize, endSize, normalizedAge);\n \n #ifdef PARTICLE3D\n //Project the size into screen coordinates.\n return size * u_Projection[1][1];\n #else\n return size;\n #endif\n}\n\nmat2 ComputeParticleRotation(in float rot,in float age)\n{ \n float rotation =rot * age;\n //计算2x2旋转矩阵.\n float c = cos(rotation);\n float s = sin(rotation);\n return mat2(c, -s, s, c);\n}\n\nvec4 ComputeParticleColor(in vec4 startColor,in vec4 endColor,in float normalizedAge)\n{\n vec4 color=mix(startColor,endColor,normalizedAge);\n //硬编码设置,使粒子淡入很快,淡出很慢,6.7的缩放因子把置归一在0到1之间,可以谷歌x*(1-x)*(1-x)*6.7的制图表\n color.a *= normalizedAge * (1.0-normalizedAge) * (1.0-normalizedAge) * 6.7;\n \n return color;\n}\n\nvoid main()\n{\n float age = u_CurrentTime - a_Time;\n age *= 1.0 + a_AgeAddScale;\n float normalizedAge = clamp(age / u_Duration,0.0,1.0);\n gl_Position = ComputeParticlePosition(a_Position, a_Velocity, age, normalizedAge);//计算粒子位置\n float pSize = ComputeParticleSize(a_SizeRotation.x,a_SizeRotation.y, normalizedAge);\n mat2 rotation = ComputeParticleRotation(a_SizeRotation.z, age);\n \n #ifdef PARTICLE3D\n gl_Position.xy += (rotation*a_CornerTextureCoordinate.xy) * pSize * u_ViewportScale;\n #else\n mat4 mat=u_mmat*mmat;\n gl_Position=vec4((mat*gl_Position).xy,0.0,1.0);\n gl_Position.xy += (rotation*a_CornerTextureCoordinate.xy) * pSize*vec2(mat[0][0],mat[1][1]);\n gl_Position=vec4((gl_Position.x/size.x-0.5)*2.0,(0.5-gl_Position.y/size.y)*2.0,0.0,1.0);\n #endif\n \n v_Color = ComputeParticleColor(a_StartColor,a_EndColor, normalizedAge);\n v_TextureCoordinate =a_CornerTextureCoordinate.zw;\n}\n\n"/*__INCLUDESTR__D:/LayaPublishWork/LayaWorkDir/LayaAir/publish/LayaAirPublish/src/particle/src/laya/particle/shader/files/Particle.vs*/;},'ps',function(){return this.ps="#ifdef FSHIGHPRECISION\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n\nvarying vec4 v_Color;\nvarying vec2 v_TextureCoordinate;\nuniform sampler2D u_texture;\n\nvoid main()\n{ \n gl_FragColor=texture2D(u_texture,v_TextureCoordinate)*v_Color;\n}"/*__INCLUDESTR__D:/LayaPublishWork/LayaWorkDir/LayaAir/publish/LayaAirPublish/src/particle/src/laya/particle/shader/files/Particle.ps*/;} ]); return ParticleShader; })(Shader) })(window,document,Laya);
/** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule DraftEditorContents.react * @typechecks * */ 'use strict'; var _assign = require('object-assign'); var _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var DraftEditorBlock = require('./DraftEditorBlock.react'); var DraftOffsetKey = require('./DraftOffsetKey'); var EditorState = require('./EditorState'); var React = require('react'); var cx = require('fbjs/lib/cx'); var joinClasses = require('fbjs/lib/joinClasses'); var nullthrows = require('fbjs/lib/nullthrows'); /** * `DraftEditorContents` is the container component for all block components * rendered for a `DraftEditor`. It is optimized to aggressively avoid * re-rendering blocks whenever possible. * * This component is separate from `DraftEditor` because certain props * (for instance, ARIA props) must be allowed to update without affecting * the contents of the editor. */ var DraftEditorContents = function (_React$Component) { _inherits(DraftEditorContents, _React$Component); function DraftEditorContents() { _classCallCheck(this, DraftEditorContents); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } DraftEditorContents.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { var prevEditorState = this.props.editorState; var nextEditorState = nextProps.editorState; var prevDirectionMap = prevEditorState.getDirectionMap(); var nextDirectionMap = nextEditorState.getDirectionMap(); // Text direction has changed for one or more blocks. We must re-render. if (prevDirectionMap !== nextDirectionMap) { return true; } var didHaveFocus = prevEditorState.getSelection().getHasFocus(); var nowHasFocus = nextEditorState.getSelection().getHasFocus(); if (didHaveFocus !== nowHasFocus) { return true; } var nextNativeContent = nextEditorState.getNativelyRenderedContent(); var wasComposing = prevEditorState.isInCompositionMode(); var nowComposing = nextEditorState.isInCompositionMode(); // If the state is unchanged or we're currently rendering a natively // rendered state, there's nothing new to be done. if (prevEditorState === nextEditorState || nextNativeContent !== null && nextEditorState.getCurrentContent() === nextNativeContent || wasComposing && nowComposing) { return false; } var prevContent = prevEditorState.getCurrentContent(); var nextContent = nextEditorState.getCurrentContent(); var prevDecorator = prevEditorState.getDecorator(); var nextDecorator = nextEditorState.getDecorator(); return wasComposing !== nowComposing || prevContent !== nextContent || prevDecorator !== nextDecorator || nextEditorState.mustForceSelection(); }; DraftEditorContents.prototype.render = function render() { var _props = this.props; var blockRenderMap = _props.blockRenderMap; var blockRendererFn = _props.blockRendererFn; var customStyleMap = _props.customStyleMap; var customStyleFn = _props.customStyleFn; var editorState = _props.editorState; var content = editorState.getCurrentContent(); var selection = editorState.getSelection(); var forceSelection = editorState.mustForceSelection(); var decorator = editorState.getDecorator(); var directionMap = nullthrows(editorState.getDirectionMap()); var blocksAsArray = content.getBlocksAsArray(); var processedBlocks = []; var currentDepth = null; var lastWrapperTemplate = null; for (var ii = 0; ii < blocksAsArray.length; ii++) { var _block = blocksAsArray[ii]; var key = _block.getKey(); var blockType = _block.getType(); var customRenderer = blockRendererFn(_block); var CustomComponent = void 0, customProps = void 0, customEditable = void 0; if (customRenderer) { CustomComponent = customRenderer.component; customProps = customRenderer.props; customEditable = customRenderer.editable; } var direction = directionMap.get(key); var offsetKey = DraftOffsetKey.encode(key, 0, 0); var componentProps = { contentState: content, block: _block, blockProps: customProps, customStyleMap: customStyleMap, customStyleFn: customStyleFn, decorator: decorator, direction: direction, forceSelection: forceSelection, key: key, offsetKey: offsetKey, selection: selection, tree: editorState.getBlockTree(key) }; var configForType = blockRenderMap.get(blockType); var wrapperTemplate = configForType.wrapper; var _Element = configForType.element || blockRenderMap.get('unstyled').element; var depth = _block.getDepth(); var className = this.props.blockStyleFn(_block); // List items are special snowflakes, since we handle nesting and // counters manually. if (_Element === 'li') { var shouldResetCount = lastWrapperTemplate !== wrapperTemplate || currentDepth === null || depth > currentDepth; className = joinClasses(className, getListItemClasses(blockType, depth, shouldResetCount, direction)); } var Component = CustomComponent || DraftEditorBlock; var childProps = { className: className, 'data-block': true, 'data-editor': this.props.editorKey, 'data-offset-key': offsetKey, key: key }; if (customEditable !== undefined) { childProps = _extends({}, childProps, { contentEditable: customEditable, suppressContentEditableWarning: true }); } var child = React.createElement(_Element, childProps, React.createElement(Component, componentProps)); processedBlocks.push({ block: child, wrapperTemplate: wrapperTemplate, key: key, offsetKey: offsetKey }); if (wrapperTemplate) { currentDepth = _block.getDepth(); } else { currentDepth = null; } lastWrapperTemplate = wrapperTemplate; } // Group contiguous runs of blocks that have the same wrapperTemplate var outputBlocks = []; for (var _ii = 0; _ii < processedBlocks.length;) { var info = processedBlocks[_ii]; if (info.wrapperTemplate) { var blocks = []; do { blocks.push(processedBlocks[_ii].block); _ii++; } while (_ii < processedBlocks.length && processedBlocks[_ii].wrapperTemplate === info.wrapperTemplate); var wrapperElement = React.cloneElement(info.wrapperTemplate, { key: info.key + '-wrap', 'data-offset-key': info.offsetKey }, blocks); outputBlocks.push(wrapperElement); } else { outputBlocks.push(info.block); _ii++; } } return React.createElement( 'div', { 'data-contents': 'true' }, outputBlocks ); }; return DraftEditorContents; }(React.Component); /** * Provide default styling for list items. This way, lists will be styled with * proper counters and indentation even if the caller does not specify * their own styling at all. If more than five levels of nesting are needed, * the necessary CSS classes can be provided via `blockStyleFn` configuration. */ function getListItemClasses(type, depth, shouldResetCount, direction) { return cx({ 'public/DraftStyleDefault/unorderedListItem': type === 'unordered-list-item', 'public/DraftStyleDefault/orderedListItem': type === 'ordered-list-item', 'public/DraftStyleDefault/reset': shouldResetCount, 'public/DraftStyleDefault/depth0': depth === 0, 'public/DraftStyleDefault/depth1': depth === 1, 'public/DraftStyleDefault/depth2': depth === 2, 'public/DraftStyleDefault/depth3': depth === 3, 'public/DraftStyleDefault/depth4': depth === 4, 'public/DraftStyleDefault/listLTR': direction === 'LTR', 'public/DraftStyleDefault/listRTL': direction === 'RTL' }); } module.exports = DraftEditorContents;
/* * Copyright 2016 The COMPEIT Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ kurentoAgent = function() { var participants = {}; var server_cb = null; var room_cb = null; var user_cb = null; var local_media_cb = null; var remote_media_offer_cb = null; var remote_media_audio_change_cb = null; var remote_media_video_change_cb = null; var remote_sender_stopped_cb = null; var my_webRtcPeer = null; var my_video = null; var my_conn = null; function Participant(user_id, rVid) { this.uid = user_id; this.video = rVid; this.webRtcPeer = null; this.offerToReceiveVideo = function(wp, offerSdp){ console.log('Invoking SDP offer callback function '+ this.uid); console.log('offerSdp ' + JSON.stringify(offerSdp)); my_conn.sendServerMessage({'event': 'receive_start', 'offerSdp': offerSdp, 'sender':this.uid }); }; this.onIceCandidate = function(candidate) { console.log('Receiver candidate: ' + JSON.stringify(candidate)) my_conn.sendServerMessage({'event': 'on_ice_candidate', 'candidate': candidate, 'sender':this.uid }); }; Object.defineProperty(this, 'webRtcPeer', { writable: true}); Object.defineProperty(this, 'video', { writable: true}); this.stop = function() { my_conn.sendServerMessage({'event': 'receive_stop'}); }; this.dispose = function() { console.log('Disposing participant ' + this.uid); this.webRtcPeer.dispose(); //hideSpinner(this.video); }; this.getVideo = function() { return this.video; } } function onError(error) { return console.error(error); } function user_msg(user_id, msg) { console.log('user: ' + user_id + ' msg: '+JSON.stringify(msg)); if ('event' in msg) { switch (msg['event']) { case 'mediaOffer': if (remote_media_offer_cb) { if ('width' in msg && 'height' in msg) { remote_media_offer_cb(user_id, msg['width'], msg['height']); } else { remote_media_offer_cb(user_id, undefined, undefined); } } break; } } } function room_msg(user, msg) { console.log('msg('+user.id+'): '+JSON.stringify(msg)); if (msg && 'event' in msg) { switch (msg['event']) { case 'mute': if (remote_media_audio_change_cb) { remote_media_audio_change_cb(user.id, 'muted'); } break; case 'unmute': if (remote_media_audio_change_cb) { remote_media_audio_change_cb(user.id, 'unmuted'); } break; } } } function server_msg(evt, msg) { console.log('event: ' + evt + ' msg: '+JSON.stringify(msg)); switch (evt) { case 'send_started': my_webRtcPeer.processAnswer(msg['sdp_answer']); break; case 'send_started': break; case 'on_ice_candidate': //console.log('server candidate '); if ('sender' in msg) { participant = participants[msg['sender']]; participant.webRtcPeer.addIceCandidate(msg['candidate']); } else { my_webRtcPeer.addIceCandidate(msg['candidate']); } break; case 'receive_started': console.log('receive_started: '+msg['sender']); participant = participants[msg['sender']]; participant.webRtcPeer.processAnswer(msg['sdp_answer']); break; case 'receive_stopped': break; case 'sender_stopped': var user_id = msg['sender']; if (remote_sender_stopped_cb) { remote_sender_stopped_cb(user_id); } if (user_id in participants) { my_webRtcPeer.dispose(); my_webRtcPeer = null; participants[user_id].dispose(); delete participants[user_id]; } break; } } function onIceCandidate(candidate) { console.log('Sender candidate ' + JSON.stringify(candidate)); my_conn.sendServerMessage({'event': 'on_ice_candidate', 'candidate': candidate }); } function onLocalOffer(error, offerSdp) { if (error) return onError(error); console.log('offerSdp ' + JSON.stringify(offerSdp)); my_conn.sendServerMessage({'event': 'send_start', 'offerSdp': offerSdp }); } function onLoadedMetadata() { var width = my_video.videoWidth; var height = my_video.videoHeight; console.log('w+h: '+width+'x'+height); if (local_media_cb) { local_media_cb(width, height); } } function create_constraints(minwidth, minheight, minframerate, maxwidth, maxheight, maxframerate) { var mediaConstraints = { audio: true, video: { mandatory : { maxWidth : 320, maxHeight: 200, maxFrameRate : 30, minFrameRate : 30 } } }; if (minwidth != undefined) { mediaConstraints['video']['mandatory']['minWidth'] = minwidth; mediaConstraints['video']['mandatory']['maxWidth'] = minwidth; } if (maxwidth != undefined) { mediaConstraints['video']['mandatory']['maxWidth'] = maxwidth; } if (minheight != undefined) { mediaConstraints['video']['mandatory']['minHeight'] = minheight; mediaConstraints['video']['mandatory']['maxHeight'] = minheight; } if (maxheight != undefined) { mediaConstraints['video']['mandatory']['maxHeight'] = maxheight; } if (maxframerate != undefined) { mediaConstraints['video']['mandatory']['minFrameRate'] = minframerate; mediaConstraints['video']['mandatory']['maxFrameRate'] = minframerate; } if (maxframerate != undefined) { mediaConstraints['video']['mandatory']['maxFrameRate'] = maxframerate; } return mediaConstraints; } return { init: function(connectionAgent) { my_conn = connectionAgent.registerType('kurento', server_msg.bind(this), room_msg.bind(this), user_msg.bind(this)); }, startLocal: function(myVideo, minwidth, minheight, minframerate, maxwidth, maxheight, maxframerate) { if (!my_webRtcPeer) { if (myVideo != undefined) { my_video = myVideo; } my_video.onloadedmetadata = onLoadedMetadata.bind(this); //showSpinner(my_video); var mediaConstraints = create_constraints(minwidth, minheight, minframerate, maxwidth, maxheight, maxframerate); var options = { mediaConstraints: mediaConstraints, localVideo: my_video, onicecandidate : onIceCandidate.bind(this) }; my_webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function(error) { if(error) return onError(error); this.generateOffer(onLocalOffer); }); var peer = my_webRtcPeer.peerConnection; peer.oniceconnectionstatechange = function() { console.log('ice connection state changed: '+ peer.iceConnectionState); }; } }, changeLocal: function(minwidth, minheight, minframerate, maxwidth, maxheight, maxframerate) { stopLocal(); startLocal(undefined, minwidth, minheight, minframerate, maxwidth, maxheight, maxframerate); }, muteAudioLocal: function() { var streams = my_webRtcPeer.peerConnection.getLocalStreams(); if (!streams.length) return; for (var i = 0, stream; stream = streams[i]; i++) { var audioTracks = stream.getAudioTracks(); // if MediaStream has reference to microphone if (audioTracks[0]) { audioTracks[0].enabled = false; } } my_conn.sendRoomMessage({'event': 'mute'}); }, unmuteAudioLocal: function() { var streams = my_webRtcPeer.peerConnection.getLocalStreams(); if (!streams.length) return; for (var i = 0, stream; stream = streams[i]; i++) { var audioTracks = stream.getAudioTracks(); // if MediaStream has reference to microphone if (audioTracks[0]) { audioTracks[0].enabled = true; } } my_conn.sendRoomMessage({'event': 'unmute'}); }, stopLocal: function() { my_conn.sendServerMessage({'event': 'send_stop'}); my_webRtcPeer.dispose(); my_webRtcPeer = null; }, connectRemote: function(remoteVideo, user_id, minwidth, minheight, minframerate, maxwidth, maxheight, maxframerate) { if (user_id in participants) { participants[user_id].dispose(); delete participants[user_id]; } //showSpinner(rVid); var participant = new Participant(user_id, remoteVideo); participants[user_id] = participant; var mediaConstraints = create_constraints(minwidth, minheight, minframerate, maxwidth, maxheight, maxframerate); var options = { mediaConstraints: mediaConstraints, remoteVideo: remoteVideo, onicecandidate : participant.onIceCandidate.bind(participant) } participant.webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options, function(error) { if(error) return onError(error); this.generateOffer(participant.offerToReceiveVideo.bind(participant)); }); }, changeRemote: function(user_id, minwidth, minheight, minframerate, maxwidth, maxheight, maxframerate) { if (user_id in participants) { var video = participants[user_id].video; stopRemote(user_id); connectRemote(video, user_id, minwidth, minheight, minframerate, maxwidth, maxheight, maxframerate); } }, stopRemote: function(user_id) { if (user_id in participants) { my_conn.sendServerMessage({'event': 'send_stop'}); my_webRtcPeer.dispose(); my_webRtcPeer = null; participants[user_id].dispose(); delete participants[user_id]; } }, offerUserMedia: function(user_id) { if (my_video.videoWidth && my_video.videoHeight) { my_conn.sendUserMessage(user_id, {'event': 'mediaOffer', 'width': my_video.videoWidth, 'height': my_video.videoHeight}); } else { my_conn.sendUserMessage(user_id, {'event': 'mediaOffer'}); } }, onLocalMedia: function(cb) { local_media_cb = cb; }, onRemoteMediaOffer: function(cb) { remote_media_offer_cb = cb; }, onRemoteMediaVideoChange: function(cb) { remote_media_video_change_cb = cb; }, onRemoteMediaAudioChange: function(cb) { remote_media_audio_change_cb = cb; }, onRemoteSenderStopped: function(cb) { remote_sender_stopped_cb = cb; } } }();
'use strict'; const utils = require('../common/utils'); module.exports = function (routing, settings) { let _self = this; _self.routing = routing; _self.service = _self.routing.service; _self.settings = settings || {}; _self.security = _self.service.security; _self.path = _self.settings.path ? _self.settings.path : '/anxeb/view'; _self.routing.mount.route(utils.general.path.join(_self.path, '*')).get(function (req, res, next) { let requestedView = utils.general.url.create(req.url).pathname.substring(_self.path.length + 1).replaceAll('./', ''); let route = _self.routing.retrieve.byView(requestedView); if (route) { _self.security.route.checkpoint({ access : route.access, path : route.path, roles : route.roles, owners : route.owners }, req, res, next).then(function () { res.set('Route-Type', route.type); res.set('Access-Type', route.access); for (let q in req.query) { if (q.startsWith('_')) { req.params[q.substring(1)] = req.query[q]; delete req.query[q]; } } route.methods.get.dispatch(req, res, next, { partial : req.query.partial ? req.query.partial.isTrue() : true }); }); } else { _self.service.log.exception.view_not_found.args(requestedView, _self.service.key).throw(); } }); };
import { battleField } from '../entity/battleField'; export let isCheckedPositionsFree = ({ x, y }, checkedPositions) => checkedPositions.every(e => e.every(({offsetX, offsetY}) => battleField[x + offsetX][y + offsetY].isEmpty()) );
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=raw-transaction-status.js.map
import _without from 'lodash-es/without'; import { event as d3_event, mouse as d3_mouse, select as d3_select } from 'd3-selection'; import { geoVecLength } from '../geo'; import { modeBrowse, modeSelect, modeSelectData, modeSelectNote, modeSelectError } from '../modes'; import { osmEntity, osmNote, qaError } from '../osm'; export function behaviorSelect(context) { var lastMouse = null; var suppressMenu = true; var tolerance = 4; var p1 = null; function point() { return d3_mouse(context.container().node()); } function keydown() { var e = d3_event; if (e && e.shiftKey) { context.surface() .classed('behavior-multiselect', true); } if (e && e.keyCode === 93) { // context menu e.preventDefault(); e.stopPropagation(); } } function keyup() { var e = d3_event; if (!e || !e.shiftKey) { context.surface() .classed('behavior-multiselect', false); } if (e && e.keyCode === 93) { // context menu e.preventDefault(); e.stopPropagation(); contextmenu(); } } function mousedown() { if (!p1) p1 = point(); d3_select(window) .on('mouseup.select', mouseup, true); var isShowAlways = +context.storage('edit-menu-show-always') === 1; suppressMenu = !isShowAlways; } function mousemove() { if (d3_event) lastMouse = d3_event; } function mouseup() { click(); } function contextmenu() { var e = d3_event; e.preventDefault(); e.stopPropagation(); if (!+e.clientX && !+e.clientY) { if (lastMouse) { e.sourceEvent = lastMouse; } else { return; } } if (!p1) p1 = point(); suppressMenu = false; click(); } function click() { d3_select(window) .on('mouseup.select', null, true); if (!p1) return; var p2 = point(); var dist = geoVecLength(p1, p2); p1 = null; if (dist > tolerance) { return; } var isMultiselect = d3_event.shiftKey || d3_select('#surface .lasso').node(); var isShowAlways = +context.storage('edit-menu-show-always') === 1; var datum = d3_event.target.__data__ || (lastMouse && lastMouse.target.__data__); var mode = context.mode(); var entity = datum && datum.properties && datum.properties.entity; if (entity) datum = entity; if (datum && datum.type === 'midpoint') { datum = datum.parents[0]; } if (datum instanceof osmEntity) { // clicked an entity.. var selectedIDs = context.selectedIDs(); context.selectedNoteID(null); context.selectedErrorID(null); if (!isMultiselect) { if (selectedIDs.length > 1 && (!suppressMenu && !isShowAlways)) { // multiple things already selected, just show the menu... mode.suppressMenu(false).reselect(); } else { // select a single thing.. context.enter(modeSelect(context, [datum.id]).suppressMenu(suppressMenu)); } } else { if (selectedIDs.indexOf(datum.id) !== -1) { // clicked entity is already in the selectedIDs list.. if (!suppressMenu && !isShowAlways) { // don't deselect clicked entity, just show the menu. mode.suppressMenu(false).reselect(); } else { // deselect clicked entity, then reenter select mode or return to browse mode.. selectedIDs = _without(selectedIDs, datum.id); context.enter(selectedIDs.length ? modeSelect(context, selectedIDs) : modeBrowse(context)); } } else { // clicked entity is not in the selected list, add it.. selectedIDs = selectedIDs.concat([datum.id]); context.enter(modeSelect(context, selectedIDs).suppressMenu(suppressMenu)); } } } else if (datum && datum.__featurehash__ && !isMultiselect) { // clicked Data.. context .selectedNoteID(null) .enter(modeSelectData(context, datum)); } else if (datum instanceof osmNote && !isMultiselect) { // clicked a Note.. context .selectedNoteID(datum.id) .enter(modeSelectNote(context, datum.id)); } else if (datum instanceof qaError & !isMultiselect) { // clicked an external QA error context .selectedErrorID(datum.id) .enter(modeSelectError(context, datum.id, datum.service)); } else { // clicked nothing.. context.selectedNoteID(null); context.selectedErrorID(null); if (!isMultiselect && mode.id !== 'browse') { context.enter(modeBrowse(context)); } } // reset for next time.. suppressMenu = true; } function behavior(selection) { lastMouse = null; suppressMenu = true; p1 = null; d3_select(window) .on('keydown.select', keydown) .on('keyup.select', keyup) .on('contextmenu.select-window', function() { // Edge and IE really like to show the contextmenu on the // menubar when user presses a keyboard menu button // even after we've already preventdefaulted the key event. var e = d3_event; if (+e.clientX === 0 && +e.clientY === 0) { d3_event.preventDefault(); d3_event.stopPropagation(); } }); selection .on('mousedown.select', mousedown) .on('mousemove.select', mousemove) .on('contextmenu.select', contextmenu); if (d3_event && d3_event.shiftKey) { context.surface() .classed('behavior-multiselect', true); } } behavior.off = function(selection) { d3_select(window) .on('keydown.select', null) .on('keyup.select', null) .on('contextmenu.select-window', null) .on('mouseup.select', null, true); selection .on('mousedown.select', null) .on('mousemove.select', null) .on('contextmenu.select', null); context.surface() .classed('behavior-multiselect', false); }; return behavior; }
(function($) { var win = $(window); win.on("load", function() { var blog = $("<div class=\"wrapper style3\">" + "<div class=\"inner\">" + "<div class=\"container\">" + "<div class=\"row\">" + "<div class=\"col-8 col-12-medium\">" + "<!-- Article list -->" + "<section class=\"box article-list\">" + "<h2 class=\"icon fa-file-alt\">Skyebright news</h2>" + "<!-- Excerpt -->" + "<article class=\"box excerpt\">" + "<a href=\"#\" class=\"image left\"><img src=\"images/pic04.jpg\" alt=\"\" /></a>" + "<div>" + "<header>" + "<span class=\"date\">March 15th</span>" + "<h3><a href=\"#\">Our website is now live!</a></h3>" + "</header>" + "<p>In a series of new changes we are making to the skyebright company, our most recent and significant change has been " + "to revamp our online presence! We have finally made a website which is able to represent us and our interests as a company, " + "and offer our patrons a view into what is it is like to be with <span class='skyblue' >Skyebright</span>!</p>" + "</div>" + "</article>" + "<!-- Excerpt -->" + "<article class=\"box excerpt\">" + "<a href=\"#\" class=\"image left\"><img src=\"images/pic05.jpg\" alt=\"\" /></a>" + "<div>" + "<header>" + "<span class=\"date\">March 1st</span>" + "<h3><a href=\"#\">We're going local!</a></h3>" + "</header>" + "<p>We are currently in the process of purchasing a local office in order to be able to serve more students! " + "We hope that it will be somewhere in the sunridge area of Calgary nearby to the registry but nothing is set in stone" + " as of now. We are also looking to hire new instructors! Stay tuned for more!</p>" + "</div>" + "</article>" + "</section>" + "</div>" + "<div class=\"col-4 col-12-medium\">" + "<!-- Spotlight -->" + "<section class=\"box spotlight\">" + "<h2 class=\"icon fa-file-alt\">Spotlight</h2>" + "<article>" + "<a href=\"#\" class=\"image featured\"><img src=\"images/pic07.jpg\" alt=\"\"></a>" + "<header style='margin-bottom:1em'>" + "<h3><a href=\"#\">City Council votes to lower residential Speed Limits!</a></h3>" + "<p>A bold move for neighborhood safety</p>" + "</header>" + "<p>All residential speed limits will now be slowed down to 40km/h, thats 10km/h less than the original 50. " + "City council voted 10-4 on the bylaw Monday February 1st. About the change, set to take effect on May 31, " + "Mayor Naheed Nenshi has said \"" + "if you dont see a sign on a road, that means the speed limit is 40\"" + "<br/>“Injuries and deaths on our city streets are expensive, and it’s also incredibly damaging to people’s " + "well-being,” Ward 7 Councillor Druh Farrell said. Everyone makes mistakes, but the price for a mistake shouldn’t be" + " injury and death.”</p>" + "<footer>" + "<a href=\"#\" class=\"button alt icon solid fa-file-alt\">Continue Reading</a>" + "</footer>" + "</article>" + "</section>" + "</div>" + "</div>" + "</div>" + "</div>" + "</div>"); blog.appendTo($("#main-wrapper")); var footer = $( "<div id=\"footer-wrapper\">\n" + "<footer id=\"footer\" class=\"container\">\n" + "<div class=\"row\">\n" + "<div class=\"col-3 col-6-medium col-12-small\">\n" + "\n" + "<!-- Links -->\n" + "<section>\n" + "<h2>Links</h2>\n" + "<ul class=\"divided\">\n" + "<li><a href=\"contact.html\" class='footerLink'>Contact us</a></li>\n" + "<li><a href=\"assets/learnerhandbook.pdf\" class='footerLink'>Class 7 Licensing handbook </a></li>\n" + "<li><a href=\"assets/DrivingSmallVehiclesHandbook _2021-01.pdf\" class='footerLink'>Additional Handbook </a></li>\n" + "<li><a href=\"https://www.alberta.ca/get-drivers-licence-steps.aspx\" class='footerLink'>Steps To Getting a License</a></li>\n" + "</ul>\n" + "</section>\n" + "\n" + "</div>\n" + "<div class=\"col-3 col-6-medium col-12-small\">\n" + "\n" + "<!-- Links -->\n" + "<section style='margin-bottom:2.5em'>\n" + "<h2>Business Hours</h2>\n" + "<ul class=\"divided\" >\n" + "<li><a class='footerLink' href=\"https://www.google.com/maps?q=skyebright+driving+academy&um=1&ie=UTF-8\">Monday - Sunday: 8:00am-8:00pm</a></li>\n" + "<li><a class='footerLink' href=\"https://www.google.com/maps?q=skyebright+driving+academy&um=1&ie=UTF-8\">Find us on Google - <i aria-hidden=true class='fab fa-google'></i></a></li>\n" + "</ul>\n" + "</section>\n" + "</div>\n" + "<div class=\"col-6 col-12-medium imp-medium\">\n" + "<!-- Contact -->\n" + "<section>\n" + "<h2>Get in touch</h2>\n" + "<div>\n" + "<div class=\"row\">\n" + "<div class=\"col-6 col-12-small\">\n" + "<dl class=\"contact\">\n" + "<dt>WWW</dt>\n" + "<dd><a href=\"skyebright.ca\" class='footerLink'>skyebright.ca</a></dd>\n" + "<dt>Email</dt>\n" + "<dd><a href=\"#\" class='footerLink'>skyebrightdriving@gmail.com</a></dd>\n" + // "<dd><i aria-hidden=\"true\" class='fab fa-google'></i></dd>"+ consider adding this back later "</dl>\n" + "</div>\n" + "<div class=\"col-6 col-12-small\">\n" + "<dl class=\"contact\">\n" + "<dt>Address</dt>\n" + "<dd>\n" + "Calgary, AB, Canada\n" + "</dd>\n" + "<dt>Phone</dt>\n" + "<dd><a style=\"\" class=\"contact\" href=\"tel:+1-403-978-7421\">(403) 978-7421</a></dd>\n" + "</dl>\n" + "</div>\n" + "</div>\n" + "</div>\n" + "</section>\n" + "\n" + "</div>\n" + "<div class=\"col-12\">\n" + "<div id=\"copyright\">\n" + "<ul class=\"menu\">\n" + "<li>&copy; All rights reserved</li><li>Design: <a href=\"http://pages.cpsc.ucalgary.ca/~ali.alkhazaly\">Ali Al-Khaz'Aly</a> & HTML5UP</li>\n" + "</ul>\n" + "</div>\n" + "</div>\n" + "</div>\n" + "</footer>\n" + "</div>" ) footer.appendTo($("#page-wrapper")); }); })(jQuery);
var _c_o__driver__target_8h = [ [ "CANrxMemoryBarrier", "group___c_o__driver.html#ga0cf4099f9e716769492013b92fdd5a50", null ], [ "CLEAR_CANrxNew", "group___c_o__driver.html#gafe9d8f1d14567463a15d31924fc28876", null ], [ "CO_LITTLE_ENDIAN", "_c_o__driver__target_8h.html#aed3e1bffaf912485092fc20193705f35", null ], [ "CO_LOCK_CAN_SEND", "group___c_o__driver.html#ga7566ee901bbf1a0d76d771d72d2f826f", null ], [ "CO_LOCK_EMCY", "group___c_o__driver.html#ga3052a84235f56d535a14705e0cfda799", null ], [ "CO_LOCK_OD", "group___c_o__driver.html#ga3850830931ced2bd3d7e15821572bbcc", null ], [ "CO_UNLOCK_CAN_SEND", "group___c_o__driver.html#ga511a5a0bf905c2207d5c9e26d35fe3cc", null ], [ "CO_UNLOCK_EMCY", "group___c_o__driver.html#ga720a798f2bf7fe20d9c95a212b4df417", null ], [ "CO_UNLOCK_OD", "group___c_o__driver.html#ga2477f5d24fd31a9f4052cf451b87809f", null ], [ "IS_CANrxNew", "group___c_o__driver.html#ga535c175d53f76b78ac586dd7e313e764", null ], [ "SET_CANrxNew", "group___c_o__driver.html#gaf9658047fbf7d12298cfa627a4db1fbb", null ], [ "bool_t", "group___c_o__data_types.html#ga449976458a084f880dc8e3d29e7eb6f5", null ], [ "char_t", "group___c_o__data_types.html#ga40bb5262bf908c328fbcfbe5d29d0201", null ], [ "domain_t", "group___c_o__data_types.html#gadc433a2a90dacd3b2b3801dd9431c254", null ], [ "float32_t", "group___c_o__data_types.html#ga4611b605e45ab401f02cab15c5e38715", null ], [ "float64_t", "group___c_o__data_types.html#gabf48e6de81b13463344ee4ebcf05d8b6", null ], [ "oChar_t", "group___c_o__data_types.html#ga00f664c467579d7b2839d6926b6f33a6", null ], [ "CO_CANinterrupt", "group___c_o__driver.html#gae5e1af799bd59ed0a39495241ce6f5e3", null ] ];
import ServiceDlg from 'Dialogs/ServiceDlg' import BaseSvc from './BaseSvc' import React from 'react' export default class DialogSvc extends BaseSvc { ///////////////////////////////////////////////////////////////// // // ///////////////////////////////////////////////////////////////// constructor (opts) { super (opts) this.disableOK = this.disableOK.bind(this) this.close = this.close.bind(this) } ///////////////////////////////////////////////////////////////// // // ///////////////////////////////////////////////////////////////// setComponent (component) { this.component = component this.setState ({ close: this.close, open: false }) } ///////////////////////////////////////////////////////////////// // // ///////////////////////////////////////////////////////////////// setState (state, assign = false) { return new Promise ((resolve) => { const dialogSvcState = assign ? Object.assign({}, this.getState(), state) : Object.assign({}, state, { close: this.close }) const componentState = Object.assign({}, this.component.state, { dialogSvc: dialogSvcState }) this.component.setState(componentState, () => { resolve() }) }) } ///////////////////////////////////////////////////////////////// // // ///////////////////////////////////////////////////////////////// disableOK (disable) { this.setState ({ disableOK: disable }, true) } ///////////////////////////////////////////////////////////////// // // ///////////////////////////////////////////////////////////////// getState () { return this.component.state.dialogSvc } ///////////////////////////////////////////////////////////////// // // ///////////////////////////////////////////////////////////////// name() { return 'DialogSvc' } ///////////////////////////////////////////////////////////////// // // ///////////////////////////////////////////////////////////////// close (result) { this.setState ({ open: false }, false).then(() => { this.emit('dialog.close', result) }) } ///////////////////////////////////////////////////////////////// // // ///////////////////////////////////////////////////////////////// render() { const state = this.getState() return <ServiceDlg {...state}/> } }
/** * Copyright 2018 The AMP HTML Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS-IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import test from 'ava'; import { create } from '../../transpile-tests/transformers/chunk/transforms'; import { defaults } from '../../transpile-tests/options'; import { promises as fsPromises } from 'fs'; import { generator } from '../generator'; test('generate extern for iife name', async t => { const externFixtureContent = await fsPromises.readFile( 'test/iife/fixtures/iife.extern.js', 'utf8', ); const outputOptions = { format: 'iife', name: 'wrapper', }; const transforms = create({}); const options = await defaults(outputOptions, [], transforms); for (const externFilePath of options.externs) { const fileContent = await fsPromises.readFile(externFilePath, 'utf8'); if (fileContent === externFixtureContent) { t.pass(); return; } } t.fail('None of the externs match the expected format'); }); generator('iife', 'iife-wrapped-safely', undefined, ['iife'], undefined, 'wrapper');
// 01.引入http模块 var http = require('http'); // 02.创建服务 // request获取url传过来的信息 // response给浏览器响应信息 http.createServer(function (request, response) { // 03.添加响应头 response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Hello World'); }).listen(8081); // 监听网站端口 console.log('Server running at http://127.0.0.1:8081/');
import config from '@/app.config.js' import Vue from 'vue' /* 剪切板 */ import VueClipboard from 'vue-clipboard2'; Vue.use(VueClipboard); /** * 自定义公共函数 */ var myfn = {}; /** * 获取系统时间 */ myfn.getSystemTime = function(data) { return new Date() } /** * 时间补位0 */ myfn.fillZero = function(time, digits = 2) { return Number(time) <= Number(new Array(digits).join('9')) ? new Array(digits).join('0') + time : time + '' } /** * 时间处理-换算上午/下午 */ myfn.calculateAMPM = function(hours) { if (Number(hours) >= 0 && Number(hours) <= 10) { text = `早上好`; } else if (Number(hours) > 10 && Number(hours) <= 14) { text = `中午好`; } else if (Number(hours) > 14 && Number(hours) <= 18) { text = `下午好`; } else if (Number(hours) > 18 && Number(hours) <= 24) { text = `晚上好`; } return text; } /** * 时间处理-将星期转换为中文 */ myfn.getWeekText = function(week) { return ['日','一','二','三','四','五','六'][week]; } /** * 时间处理-时区换算 */ myfn.getOffsetUTCText = function(OffsetUTC) { return Math.abs(OffsetUTC/60)>0?'+'+Math.abs(OffsetUTC/60):'-'+Math.abs(OffsetUTC/60); } /** * 获取系统时间详情 */ myfn.getSystemDetailTime = function(data) { let time = new Date() return { year: time.getFullYear(), //根据本地时间返回指定日期对象的年份(四位数年份时返回四位数字)。 month: myfn.fillZero(time.getMonth() + 1), //根据本地时间返回指定日期对象的月份(0-11)。 day: myfn.fillZero(time.getDate()), //根据本地时间返回指定日期对象的月份中的第几天(1-31)。 week: time.getDay(), //根据本地时间返回指定日期对象的星期中的第几天(0-6)。 weekText:myfn.getWeekText(time.getDay()), hours: myfn.fillZero(time.getHours()), //根据本地时间返回指定日期对象的小时(0-23)。 minutes: myfn.fillZero(time.getMinutes()), //根据本地时间返回指定日期对象的分钟(0-59)。 seconds: myfn.fillZero(time.getSeconds()), //根据本地时间返回指定日期对象的秒数(0-59)。 millisecond: myfn.fillZero(time.getMilliseconds(), 3), //根据本地时间返回指定日期对象的毫秒(0-999)。 time: time.getTime(), //返回从1970-1-1 00:00:00 UTC(协调世界时)到该日期经过的毫秒数,对于1970-1-1 00:00:00 UTC之前的时间返回负值。 OffsetUTC: myfn.getOffsetUTCText(time.getTimezoneOffset()), //返回当前时区的时区偏移。 OffsetYear: time.getYear(), //根据特定日期返回年份 (通常 2-3 位数). 使用 getFullYear() . yearUTC: time.getUTCFullYear(), //根据世界时返回特定日期对象所在的年份(4位数). monthUTC: myfn.fillZero(time.getUTCMonth()), //根据世界时返回特定日期对象的月份(0-11). dayUTC: myfn.fillZero(time.getUTCDate()), //根据世界时返回特定日期对象一个月的第几天(1-31). weekUTC: myfn.fillZero(time.getUTCDay()), //根据世界时返回特定日期对象一个星期的第几天(0-6). hoursUTC: myfn.fillZero(time.getUTCHours()), //根据世界时返回特定日期对象当前的小时(0-23). minutesUTC: myfn.fillZero(time.getUTCMinutes()), //根据世界时返回特定日期对象的分钟数(0-59). secondsUTC: myfn.fillZero(time.getUTCSeconds()), //根据世界时返回特定日期对象的秒数(0-59). millisecondUTC: myfn.fillZero(time.getUTCMilliseconds()), //根据世界时返回特定日期对象的毫秒数(0-999). } } /** * 系统剪贴板内容 */ myfn.setClipboardData = function(data) { console.log(Vue.prototype) return new Promise((success, fail) => { // #ifndef H5 uni.setClipboardData({ data: data, success: () => { uni.showToast({ title: '复制成功' }) } }) // #endif // #ifdef H5 Vue.prototype.$copyText(data).then( res => { uni.showToast({ title: '复制成功' }) } ) // #endif }); } /** * 获取系统剪贴板内容 * @returns {Promise} 剪贴板内容 */ myfn.getClipboardData = function() { return new Promise((success, fail) => { // #ifndef H5 uni.getClipboardData({ success, fail }); // #endif // #ifdef H5 navigator.clipboard.readText().then(success).catch(fail); // #endif }); } /** * 传入对象返回url参数 * @param {Object} data {a:1} * @returns {string} */ myfn.getParam = function(data) { let url = ''; for (var k in data) { let value = data[k] !== undefined ? data[k] : ''; url += `&${k}=${encodeURIComponent(value)}` } return url ? url.substring(1) : '' } /** * 将url和参数拼接成完整地址 * @param {string} url url地址 * @param {Json} data json对象 * @returns {string} */ myfn.getUrl = function(url, data) { //看原始url地址中开头是否带?,然后拼接处理好的参数 return url += (url.indexOf('?') < 0 ? '?' : '') + myfn.getParam(data) } /** * 获取当前页面路由 */ myfn.getPageUrl = function() { let routes = getCurrentPages(); // 获取当前打开过的页面路由数组 let curRoute = routes[routes.length - 1].route //获取当前页面路由 let curParam = routes[routes.length - 1].options; //获取路由参数 // 拼接参数 // #ifdef H5 return config.h5Url + '/' + myfn.getUrl(curRoute, curParam) // #endif // #ifndef H5 return myfn.getUrl(curRoute, curParam) // #endif } /** * @param {string} url 需要下载的图片 * @returns {Promise} 返回下载状态 */ myfn.downLoadImg = function(url) { return new Promise(() => { // #ifndef H5 uni.authorize({ scope: 'scope.writePhotosAlbum', success() { uni.downloadFile({ url: url, success: (res) => { if (res.statusCode === 200) { uni.saveImageToPhotosAlbum({ filePath: res.tempFilePath, success: function() { console.log('success') uni.showToast({ title: "保存成功", icon: "none" }); }, fail: function(error) { console.log(error) uni.showToast({ title: "保存失败,请稍后重试", icon: "none" }); } }); } else { uni.showToast({ title: "保存失败,请稍后重试", icon: "none", }); } }, fail(err) { uni.showToast({ title: "下载失败,请点击并长按图片即可下载图片", icon: "none" }); } }); }, fail(err) { uni.showToast({ title: "授权失败,请前往‘我的-设置’中开启授权", icon: "none" }); } }) // #endif // #ifdef H5 let http = url.split('?')[0] let file = http.split('/') let imgName = file[file.length - 1] var oA = document.createElement("a"); oA.download = imgName; oA.href = url; document.body.appendChild(oA); oA.click(); oA.remove(); // #endif }); } /** * 跳转小程序 * @param {string} url 需要下载的图片 * @returns {Promise} 返回下载状态 */ myfn.navigateToMini = function(item, path, extraData) { return new Promise(() => { // #ifndef H5 || MP-BAIDU || APP-PLUS-NVUE || APP-NVUE uni.navigateToMiniProgram({ appId: item.appID, path: path ? path : '', extraData: extraData ? extraData : {} }) // #endif /* 百度小程序 */ // #ifdef MP-BAIDU uni.navigateToMiniProgram({ appKey: item.appID, path: path ? path : '', extraData: extraData ? extraData : {} }) // #endif /* h5 */ // #ifdef H5 window.location.href = item.url // #endif /* app */ // #ifdef APP-PLUS-NVUE || APP-NVUE // #endif }); } /** * 上传图片到阿里云 * @param {Object} data {a:1} * @returns {string} */ myfn.upImgALi = function(data) { // 上传至 阿里云oss vk.callFunctionUtil.uploadFile({ title: "上传中...", filePath: res.tempFilePaths[0], suffix: "png", // 不传suffix会自动获取,但H5环境下获取不到后缀,但可以通过file.name 获取 type: "aliyun-oss", success(res) { // 上传成功 } }); } /** * 上传图片列表到云存储 * @param {Object} data {a:1} * @returns {string} */ myfn.upImgList = function(data) { if (vk.pubfn.isNotNull(data)) { data.map(function(res) { vk.callFunctionUtil.uploadFile({ title: "上传中...", filePath: res.tempFilePaths[0], suffix: "png", // 不传suffix会自动获取,但H5环境下获取不到后缀,但可以通过file.name 获取 type: "unicloud", success(res) { // 上传成功 } }); }) } } /** */ myfn.cropImg = function(file) { return new Promise((resolve, reject) => { let ext let filePathProcessed = file.path // 处理结果 // #ifdef H5 ext = file.name.split('.').pop() resolve({ path: filePathProcessed, ext, fileType: file.fileType }) // #endif // #ifndef H5 uni.getImageInfo({ src: file.path, success(info) { ext = info.type.toLowerCase() resolve({ path: filePathProcessed, ext, fileType: file.fileType }) }, fail(err) { reject(new Error(err.errMsg || '未能获取图片类型')) } }) // #endif }) } export default myfn;
$(function(e){ 'use strict'; new Morris.Area({ element: 'morrisBar1', data: [ {x: '2013-03-30 22:00:00', y: 0, z: 6}, {x: '2013-03-31 00:00:00', y: 3, z: 0}, {x: '2013-03-31 02:00:00', y: 3, z: 6}, {x: '2013-03-31 04:00:00', y: 2, z: 4} ], xkey: 'x', ykeys: ['y', 'z'], labels: ['Series A', 'Series B'], lineColors: ['#17B794', '#172f71'], lineWidth: 1, fillOpacity: 0.5, gridTextSize: 11, hideHover: 'auto', resize: true }); }); /*---- morrisBar2----*/ $(function(e){ 'use strict'; new Morris.Area({ element: 'morrisBar2', data: [ {x: '2010 Q4', y: 3, z: 7}, {x: '2011 Q1', y: 3, z: 4}, {x: '2011 Q2', y: null, z: 1}, {x: '2011 Q3', y: 2, z: 5}, {x: '2011 Q4', y: 8, z: 2}, {x: '2012 Q1', y: 4, z: 4} ], xkey: 'x', ykeys: ['y', 'z'], lineColors: ['#172f71','#17B794'], labels: ['Y', 'Z'] }).on('click', function(i, row){ console.log(i, row); }); /*---- morrisBar3----*/ new Morris.Area({ element: 'morrisBar3', behaveLikeLine: true, data: [ {x: '2011 Q1', y: 3, z: 3}, {x: '2011 Q2', y: 2, z: 1}, {x: '2011 Q3', y: 2, z: 4}, {x: '2011 Q4', y: 3, z: 3} ], xkey: 'x', ykeys: ['y', 'z'], lineColors: ['#172f71','#17B794'], labels: ['Y', 'Z'] }); /*---- morrisBar4----*/ new Morris.Bar({ element: 'morrisBar4', data: [ {x: '2011 Q1', y: 0}, {x: '2011 Q2', y: 1}, {x: '2011 Q3', y: 2}, {x: '2011 Q4', y: 3}, {x: '2012 Q1', y: 4}, {x: '2012 Q2', y: 5}, {x: '2012 Q3', y: 6}, {x: '2012 Q4', y: 7}, {x: '2013 Q1', y: 8} ], xkey: 'x', ykeys: ['y'], labels: ['Y'], barColors: function (row, series, type) { if (type === 'bar') { var red = Math.ceil(0 * row.y / this.ymax); return 'rgb( 29, 193, 157 )'; } else { return '#000'; } } }); var day_data = [ {"period": "Jan", "licensed": 3407, "sorned": 660}, {"period": "Feb", "licensed": 3351, "sorned": 629}, {"period": "Mar", "licensed": 3269, "sorned": 618}, {"period": "Apr", "licensed": 3246, "sorned": 661}, {"period": "May", "licensed": 3257, "sorned": 667}, {"period": "June", "licensed": 3248, "sorned": 627}, {"period": "July", "licensed": 3171, "sorned": 660}, {"period": "Aug", "licensed": 3171, "sorned": 676}, {"period": "Sept", "licensed": 3201, "sorned": 656}, {"period": "Oct", "licensed": 3215, "sorned": 622} ]; /*---- morrisBar5----*/ new Morris.Bar({ element: 'morrisBar5', data: day_data, xkey: 'period', ykeys: ['licensed', 'sorned'], labels: ['Licensed', 'SORN'], Colors: ['#17B794', '#172f71'], xLabelAngle: 0 }); var nReloads = 0; function data(offset) { var ret = []; for (var x = 0; x <= 360; x += 10) { var v = (offset + x) % 360; ret.push({ x: x, y: Math.sin(Math.PI * v / 180).toFixed(4), z: Math.cos(Math.PI * v / 180).toFixed(4) }); } return ret; } /*---- morrisBar6----*/ var graph = Morris.Line({ element: 'morrisBar6', data: data(0), xkey: 'x', ykeys: ['y', 'z'], labels: ['data1', 'data2'], parseTime: false, ymin: -1.0, ymax: 1.0, hideHover: true }); function update() { nReloads++; graph.setData(data(5 * nReloads)); $('#reloadStatus').text(nReloads + ' reloads'); } setInterval(update, 100); /*---- morrisBar7----*/ var day_data = [ {"period": "2012-10-01", "licensed": 3407, "sorned": 660}, {"period": "2012-09-30", "licensed": 3351, "sorned": 629}, {"period": "2012-09-29", "licensed": 3269, "sorned": 618}, {"period": "2012-09-20", "licensed": 3246, "sorned": 661}, {"period": "2012-09-19", "licensed": 3257, "sorned": 667}, {"period": "2012-09-18", "licensed": 3248, "sorned": 627}, {"period": "2012-09-17", "licensed": 3171, "sorned": 660}, {"period": "2012-09-16", "licensed": 3171, "sorned": 676}, {"period": "2012-09-15", "licensed": 3201, "sorned": 656}, {"period": "2012-09-10", "licensed": 3215, "sorned": 622} ]; new Morris.Line({ element: 'morrisBar7', data: day_data, xkey: 'period', ykeys: ['licensed', 'sorned'], labels: ['Licensed', 'SORN'] }); /*---- morrisBar8----*/ new Morris.Donut({ element: 'morrisBar8', data: [ {value: 50, label: 'data1'}, {value: 35, label: 'data2'}, {value: 10, label: 'data3'} ], colors: [ '#17B794', '#4c42c5', '#24CBE5' ], formatter: function (x) { return x + "%"} }).on('click', function(i, row){ console.log(i, row); }); /*---- morrisBar9----*/ new Morris.Donut({ element: 'morrisBar9', data: [ {value: 35, label: 'data1'}, {value: 25, label: 'data2'}, {value: 15, label: 'data3'}, {value: 15, label: 'data4'}, {value: 10, label: 'data5'}, {value: 10, label: 'data6'} ], backgroundColor: '#fff', labelColor: '#060', colors: [ '#17B794', '#172f71', '#f1c40f', '#24CBE5', '#64E572', '#FF9655', '#f1c40f' ], formatter: function (x) { return x + "%"} }); });
/* @flow */ "use strict"; import { Graphics } from 'pixi.js'; import { Body } from 'matter-js'; export default class Entity { graphic: ?Graphics; body: ?Body; destroyed: boolean = false; constructor(body: ?Body, graphic: ?Graphics) { this.body = body; this.graphic = graphic; if(this.body != null) { this.body.entity = this; } } update(){ } destroy(){ this.destroyed = true; } }
import { NotImplementedError } from '../extensions/index.js'; /** * Given a string, return its encoding version. * * @param {String} str * @return {String} * * @example * For aabbbc should return 2a3bc * */ export default function encodeLine(str) { let res = ''; let sum = 1; for (let i = 0; i < str.length; i++) { if (str[i] === str[i + 1]) { sum += 1; } else { if (sum > 1) { res += sum + str[i]; } else { res += str[i]; } sum = 1; } } return res; }
console.log('main starting'); var a = require('a'); var b = require('b'); console.log('in main, a.done=' + a.done + ', b.done=' + b.done);
import React from 'react' import PropTypes from 'prop-types' import { BLOCKS, INLINES } from '@contentful/rich-text-types' import Image from './Image' import Paragraph from './Paragraph' import Carousel from './Carousel' import Heading from './Heading' import List from './List' import Quote from './Quote' import Hr from './Hr' const renderParagraph = (_node, children) => <Paragraph>{children}</Paragraph> const renderHeading = heading => (_node, children) => ( <Heading>{React.createElement(heading, null, children)}</Heading> ) const renderList = listType => (_node, children) => ( <List>{React.createElement(listType, null, children)}</List> ) const renderCarousel = node => <Carousel {...node.data.target.fields} /> const renderQuote = (_node, children) => <Quote>{children}</Quote> const renderHr = () => <Hr /> const renderImage = node => <Image {...node.data.target.fields} /> const renderAssetHyperlink = (node, children) => ( <a href={node.data.target.fields.file['en-GB'].url}>{children}</a> ) const rendeUrlHyperlink = (node, children) => ( <a href={node.data.uri}>{children}</a> ) const renderEmbeddedEntry = node => { if (node.data.target.sys.contentType.sys.id === 'carousel') { return renderCarousel(node) } return null } export default { renderNode: { [BLOCKS.PARAGRAPH]: renderParagraph, [BLOCKS.HEADING_1]: renderHeading('h1'), [BLOCKS.HEADING_2]: renderHeading('h2'), [BLOCKS.HEADING_3]: renderHeading('h3'), [BLOCKS.HEADING_4]: renderHeading('h4'), [BLOCKS.HEADING_5]: renderHeading('h5'), [BLOCKS.HEADING_6]: renderHeading('h6'), [BLOCKS.UL_LIST]: renderList('ul'), [BLOCKS.OL_LIST]: renderList('ol'), [BLOCKS.QUOTE]: renderQuote, [BLOCKS.HR]: renderHr, [BLOCKS.EMBEDDED_ENTRY]: renderEmbeddedEntry, [BLOCKS.EMBEDDED_ASSET]: renderImage, [INLINES.HYPERLINK]: rendeUrlHyperlink, [INLINES.ENTRY_HYPERLINK]: () => null, [INLINES.ASSET_HYPERLINK]: renderAssetHyperlink, [INLINES.EMBEDDED_ENTRY]: () => null, }, } renderImage.propTypes = { data: PropTypes.object.isRequired, }
'use strict'; const isAngleBracketComponent = require('../helpers/is-angle-bracket-component'); const isInteractiveElement = require('../helpers/is-interactive-element'); const parseConfig = require('../helpers/parse-interactive-element-config'); const Rule = require('./_base'); const DISALLOWED_DOM_EVENTS = new Set([ // Mouse events: 'click', 'dblclick', 'mousedown', 'mousemove', 'mouseover', 'mouseout', 'mouseup', // Keyboard events: 'keydown', 'keypress', 'keyup', // TODO: add any more relevant events. ]); function isDisallowedDomEvent(name) { const nameLower = name.toLowerCase(); return nameLower.startsWith('on') && DISALLOWED_DOM_EVENTS.has(name.slice(2)); } module.exports = class NoInvalidInteractive extends Rule { parseConfig(config) { return parseConfig(this.ruleName, config); } isCustomInteractiveElement(node) { let additionalInteractiveTags = this.config.additionalInteractiveTags || []; if (additionalInteractiveTags.includes(node.tag)) { return true; } else { return false; } } visitor() { this._element = null; const ignoredTags = this.config.ignoredTags || []; let visitor = { enter(node) { let isInteractive = isInteractiveElement(node) || this.isCustomInteractiveElement(node) || isAngleBracketComponent(this.scope, node); this._element = !isInteractive ? node : null; }, exit(node) { if (this._element === node) { this._element = null; } }, }; return { ElementModifierStatement(node) { if (!this._element) { return; } if (ignoredTags.includes(this._element.tag)) { return; } let modifierName = node.path.original; if (['action', 'on'].includes(modifierName)) { if (this._element.tag === 'img') { if (isSomeEventHandlersFor(node, ['error', 'load'])) { return; } } // Allow {{action "foo" on="reset"}} on form tags // Allow {{action "foo" on="submit"}} on form tags if (this._element.tag === 'form') { if (isSomeEventHandlersFor(node, ['submit', 'reset', 'change'])) { return; } } // Allow {{on "scroll" this.handleScroll}} if (modifierName === 'on') { let eventNameNode = node.params[0]; if ( eventNameNode && eventNameNode.type === 'StringLiteral' && !DISALLOWED_DOM_EVENTS.has(eventNameNode.value) ) { return; } } this.log({ message: 'Interaction added to non-interactive element', node, source: this.sourceForNode(this._element), }); } }, AttrNode(node) { if (!this._element) { return; } if (ignoredTags.includes(this._element.tag)) { return; } if (node.value.type !== 'MustacheStatement') { return; } let helperName = node.value.path.original; // Allow onreset={{action "foo"}}, onsubmit={{action "foo"}} on form tags if ( this._element.tag === 'form' && ['onchange', 'onreset', 'onsubmit'].includes(node.name) ) { return; } // Allow onerror={{action "foo"}} and onload={{action "foo"}} on any tag if (this._element.tag === 'img' && ['onerror', 'onload'].includes(node.name)) { return; } if (helperName === 'action') { this.log({ message: 'Interaction added to non-interactive element', node, source: this.sourceForNode(this._element), }); } else if (isDisallowedDomEvent(node.name)) { this.log({ message: 'Interaction added to non-interactive element', node, source: this.sourceForNode(this._element), }); } }, ElementNode: visitor, ComponentNode: visitor, }; } }; function onModifierHasAction(node, name) { if (node.params.length === 0) { return false; } const param = node.params[0]; if (param.type !== 'StringLiteral') { return false; } return param.original === name; } function actionModifierHasAction(node, name) { let hashPairs = node.hash.pairs || []; let i; let l = hashPairs.length; let hashItem; for (i = 0; i < l; i++) { hashItem = hashPairs[i]; if (hashItem.key === 'on' && hashItem.value.value === name) { return true; } } return false; } function isSomeEventHandlersFor(node, names = []) { return names.some((name) => isEventHandlerFor(node, name)); } function isEventHandlerFor(node, name) { if (node.path.original === 'on') { return onModifierHasAction(node, name); } else { return actionModifierHasAction(node, name); } }
import React, { useCallback } from "react" import { StyleSheet, View, Text, TouchableOpacity } from "react-native" import { i18n } from "inline-i18n" import useRouterState from "../../hooks/useRouterState" import { memo } from "../../utils/toolbox" import useThemedStyleSets from "../../hooks/useThemedStyleSets" const styles = StyleSheet.create({ container: { alignItems: "center", paddingTop: 14, paddingBottom: 8, }, firstLine: { paddingBottom: 2, }, secondLine: { flexDirection: "row", alignItems: "flex-start", }, label: { fontStyle: 'italic', }, linkLike: { textDecorationLine: 'underline', alignSelf: "flex-end", }, }) const NotYetTagged = ({ passage, eva: { style: themedStyle={} }, }) => { const { baseThemedStyle, labelThemedStyle, altThemedStyleSets } = useThemedStyleSets(themedStyle) const [ linkThemedStyle={}, ] = altThemedStyleSets const { historyPush } = useRouterState() const goTag = useCallback( () => { historyPush("/Read/VerseTagger", { passage, }) }, [ historyPush, passage ], ) return ( <View style={[ styles.container, baseThemedStyle, ]} > <Text style={[ styles.firstLine, labelThemedStyle, ]} > {i18n("Not yet tagged.")} </Text> <View style={styles.secondLine}> <Text style={[ styles.label, labelThemedStyle, ]} > {passage.ref.bookId <= 39 ? i18n("Know Hebrew?") : i18n("Know Greek?")} {` `} </Text> <TouchableOpacity onPress={goTag} > <Text style={[ styles.linkLike, linkThemedStyle, ]} > {i18n("Help us tag it")} </Text> </TouchableOpacity> </View> </View> ) } export default memo((NotYetTagged), { name: 'NotYetTagged' })
import React, { Component } from 'react' import { BrowserRouter as Router, Route, Switch } from 'react-router-dom' import { Container, CssBaseline, Typography } from '@material-ui/core' import './App.scss' import { LocaleContext, Languages } from './locales' import { BusinessRouters, GeneralRouters, BackdoorRouters } from './routers' /** * routers2 includes `exact` */ const RouteList = ({ routes1, routes2, routes3 }) => { const r1 = routes1.map(router => <Route path={router.path} component={router.component} key={router.path} />) const r2 = routes2.map(router => { const { title, icon, ...rest } = router return <Route key={router.path} {...rest} /> }) const r3 = routes3.map(router => <Route path={router.path} component={router.component} key={router.path} />) const list = r1.concat(r2, r3) return <Switch>{list}</Switch> } class App extends Component { constructor(props) { super(props) this.state = { locale: Languages[0], changeLocale: this.changeLocale, } } changeLocale = idx => { this.setState({ locale: Languages[idx] }) } render() { return ( <LocaleContext.Provider value={this.state}> <Router> <div className="App"> <CssBaseline /> <Container fixed> <Typography component="div" style={{ height: '100vh' }}> <RouteList routes1={BusinessRouters} routes2={GeneralRouters} routes3={BackdoorRouters} /> </Typography> </Container> </div> </Router> </LocaleContext.Provider> ) } } export default App
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Header, Left, Right, Body, Text, Title, Button, Item, Input } from 'native-base'; import { translate } from 'react-i18next'; import { View, Keyboard } from 'react-native'; import * as commonSelectors from '../../store/selectors/common'; import * as commonActions from '../../store/actions/common'; import * as notificationActions from '../../store/actions/notification'; import Icon from '../../elements/Icon'; import styles from './styles'; import material from '../../theme/variables/material'; @connect( state => ({ searchString: commonSelectors.getSearchString(state), unReadNotification: state.notification.unRead }), { ...commonActions, ...notificationActions } ) @translate('translations') export default class extends Component { constructor(props) { super(props); this.state = { type: props.type, title: props.title, notifyNumber: props.notifyNumber || 0 }; } componentDidMount() { this.props.onItemRef && this.props.onItemRef(this); } setNotifyNumber(number) { this.setState({ notifyNumber: number }); } show(type, title) { this.setState({ type, title }); } _leftClick = e => { const { onLeftClick } = this.props; Keyboard.dismiss(); onLeftClick && onLeftClick(this.state.type); }; _search = (value, force = false) => { if (this.props.searchString !== value || force) { this.props.search(value); } }; _onPressSearch = () => { const { forwardTo } = this.props; forwardTo('search'); }; renderName(name, t) { switch (name) { case 'Home': return t('labels.home'); case 'Setting': return t('labels.setting'); case 'Notification': return t('labels.notification'); case 'Register': return t('labels.register'); } } _onPressNotification = () => { const { forwardTo, throwNotification } = this.props; throwNotification(); forwardTo('notification'); }; renderHeaderBack(title) { const { t } = this.props; const left = ( <Button transparent onPress={this._leftClick}> <Icon style={styles.btnBack} name="ios-arrow-back" /> </Button> ); const center = ( <Title style={styles.textTitle} full> {this.renderName(title, t)} </Title> ); return this.renderHeader(left, center); } // public data not event renderHeaderSearch(iconName = 'menu') { const left = ( <Button transparent onPress={this._leftClick}> <Icon style={styles.menuIcon} name={iconName} /> </Button> ); const center = ( <Item style={styles.searchContainer}> <Icon name="search" style={styles.searchIcon} /> <Input value={this.props.searchString} autoCapitalize="none" autoCorrect={false} onChangeText={this._search} placeholderTextColor="#222" style={styles.searchInput} placeholder="Search" returnKeyType="search" underlineColorAndroid="transparent" /> <Icon name="ios-close" style={styles.searchIcon} /> </Item> ); const right = ( <Button transparent> <Icon style={styles.searchIcon} name="search" /> </Button> ); return this.renderHeader(left, center, right); } renderHeaderHome(title) { const { t } = this.props; const numberNotification = this.props.unReadNotification !== 0 ? ( <View style={styles.badgeContainer}> <Text small white> {this.props.unReadNotification} </Text> </View> ) : null; const left = ( <Button transparent onPress={this._leftClick}> <Icon style={styles.menuIcon} name="menu" /> </Button> ); const center = ( <Title white style={{ alignSelf: 'center' }}> {this.renderName(title, t)} </Title> ); const right = ( <View style={styles.rowIconContainer}> <Button transparent onPress={() => this._onPressNotification()}> {numberNotification} <Icon style={styles.icon} name="ios-notifications" /> </Button> <Button transparent onPress={() => this._onPressSearch()}> <Icon style={styles.icon} name="search" /> </Button> </View> ); return this.renderHeader(left, center, right); } renderHeader(left, center, right, props) { // let rightStyle = null; // if (right) { // rightStyle = { flex: 0.5 }; // } else { // rightStyle = {}; // } return ( <Header noShadow {...props} style={styles.container}> <Left style={{ flex: 0.5 }}>{left}</Left> <Body style={{ flex: 1 }}>{center}</Body> <Right style={{ flex: 0.5 }}>{right}</Right> </Header> ); } render() { // events will be const { type, title } = this.state; // event will be invoke via pageInstance switch (type) { case 'none': return false; case 'back': return this.renderHeaderBack(title); case 'home': return this.renderHeaderHome(title); case 'searchBack': return this.renderHeaderSearch('ios-arrow-back'); default: return this.renderHeaderSearch(); } } }
import style from 'styled-components'; export const Container = style.div` display: flex; flex-direction: column; align-items: center; @media ${props => props.theme.mediaQueries.above600} { flex-direction: row; justify-content: center; } @media ${props => props.theme.mediaQueries.above768}{ justify-content: space-between; margin: 0 4% 0 4% }) `; export const ProductListContainer = style.div` display: flex; flex-direction: column; align-items: center; @media ${props => props.theme.mediaQueries.above600}{ flex-direction: row; justify-content: center; flex-wrap: wrap; max-width: 100%; })`; export const FilterContainer = style.div` display: flex; flex-direction: column; align-items: center; @media ${props => props.theme.mediaQueries.above600} { flex-direction: row; justify-content: center; } `;
module.exports = () => 'VALUE RETURNING LAMBDA'
import React from 'react'; import { Form, FormGroup, Input, Row, Col} from 'reactstrap'; import PregnancyvitalsBloodsugar from './AddBloodsugar'; import PregnancyvitalsThroid from './AddThyroid' import PregnancyvitalsBloodpressure from './AddBloodpresssure' // const desease = ["thyroid", "bloodPressure", "bloodSugar"] class AddPregnancyvitals extends React.Component { state = { deseaseType: "Thyroid" }; handleChange = e => { this.setState({ [e.target.name]: e.target.value }); }; handleForm = deseaseType => { if (deseaseType === "Thyroid") { return <PregnancyvitalsThroid deseaseType={this.state.deseaseType} />; } if (deseaseType === "Blood Sugar") { return <PregnancyvitalsBloodsugar deseaseType={this.state.deseaseType} />; } if (deseaseType === "Blood Pressure") { return ( <PregnancyvitalsBloodpressure deseaseType={this.state.deseaseType} /> ); } }; // handleClick = (data, files) =>{ // console.log(data) // if(data=== null || files===undefined){ // return false // } // const formdata = new FormData(); // for(let key in data){ // formdata.append(key,data[key]) // } // formdata.append("deseaseType", this.state.deseaseType) // for(let i=0; i<files.length; i++){ // formdata.append(files[i]) // } // const config = { // headers: { // 'Content-Type': 'multipart/form-data' // } // }; // Axios.post(baseURL+`users/thyroid`, config, formdata) // .then((res)=>{ // console.log(res) // }).catch((err)=>{ // console.log(err) // }) // } render() { const { deseaseType } = this.state; return ( <div> <Form> <Row className="mt-3"> <Col xs="12" className="col-md-4"> <FormGroup> <Input type="select" name="deseaseType" onChange={this.handleChange} > <option>Thyroid</option> <option>Blood Sugar</option> <option>Blood Pressure</option> </Input> </FormGroup> </Col> </Row> </Form> {this.handleForm(deseaseType)} </div> ); } } export default AddPregnancyvitals;
import React from 'react' import { Link } from 'react-router-dom' function Header() { return ( <header style={headerStyle}> <h1>Todo List App</h1> <Link style={linkStyle} to="/">Home</Link> | <Link style={linkStyle} to="/about">About</Link> </header> ) } const headerStyle = { background: '#333', color: '#FFF', textAlign: 'center', padding: '10px' } const linkStyle = { color: '#FFF', textDecoration: 'none' } export default Header
/** * Namespace for all classes, static methods and static properties. * * @class * @singleton */ OO.ui = {}; OO.ui.bind = $.proxy; /** * @property {Object} */ OO.ui.Keys = { UNDEFINED: 0, BACKSPACE: 8, DELETE: 46, LEFT: 37, RIGHT: 39, UP: 38, DOWN: 40, ENTER: 13, END: 35, HOME: 36, TAB: 9, PAGEUP: 33, PAGEDOWN: 34, ESCAPE: 27, SHIFT: 16, SPACE: 32 }; /** * Constants for MouseEvent.which * * @property {Object} */ OO.ui.MouseButtons = { LEFT: 1, MIDDLE: 2, RIGHT: 3 }; /** * @property {number} * @private */ OO.ui.elementId = 0; /** * Generate a unique ID for element * * @return {string} ID */ OO.ui.generateElementId = function () { OO.ui.elementId++; return 'ooui-' + OO.ui.elementId; }; /** * Check if an element is focusable. * Inspired by :focusable in jQueryUI v1.11.4 - 2015-04-14 * * @param {jQuery} $element Element to test * @return {boolean} Element is focusable */ OO.ui.isFocusableElement = function ( $element ) { var nodeName, element = $element[ 0 ]; // Anything disabled is not focusable if ( element.disabled ) { return false; } // Check if the element is visible if ( !( // This is quicker than calling $element.is( ':visible' ) $.expr.pseudos.visible( element ) && // Check that all parents are visible !$element.parents().addBack().filter( function () { return $.css( this, 'visibility' ) === 'hidden'; } ).length ) ) { return false; } // Check if the element is ContentEditable, which is the string 'true' if ( element.contentEditable === 'true' ) { return true; } // Anything with a non-negative numeric tabIndex is focusable. // Use .prop to avoid browser bugs if ( $element.prop( 'tabIndex' ) >= 0 ) { return true; } // Some element types are naturally focusable // (indexOf is much faster than regex in Chrome and about the // same in FF: https://jsperf.com/regex-vs-indexof-array2) nodeName = element.nodeName.toLowerCase(); if ( [ 'input', 'select', 'textarea', 'button', 'object' ].indexOf( nodeName ) !== -1 ) { return true; } // Links and areas are focusable if they have an href if ( ( nodeName === 'a' || nodeName === 'area' ) && $element.attr( 'href' ) !== undefined ) { return true; } return false; }; /** * Find a focusable child. * * @param {jQuery} $container Container to search in * @param {boolean} [backwards] Search backwards * @return {jQuery} Focusable child, or an empty jQuery object if none found */ OO.ui.findFocusable = function ( $container, backwards ) { var $focusable = $( [] ), // $focusableCandidates is a superset of things that // could get matched by isFocusableElement $focusableCandidates = $container .find( 'input, select, textarea, button, object, a, area, [contenteditable], [tabindex]' ); if ( backwards ) { $focusableCandidates = Array.prototype.reverse.call( $focusableCandidates ); } $focusableCandidates.each( function () { var $this = $( this ); if ( OO.ui.isFocusableElement( $this ) ) { $focusable = $this; return false; } } ); return $focusable; }; /** * Get the user's language and any fallback languages. * * These language codes are used to localize user interface elements in the user's language. * * In environments that provide a localization system, this function should be overridden to * return the user's language(s). The default implementation returns English (en) only. * * @return {string[]} Language codes, in descending order of priority */ OO.ui.getUserLanguages = function () { return [ 'en' ]; }; /** * Get a value in an object keyed by language code. * * @param {Object.<string,Mixed>} obj Object keyed by language code * @param {string|null} [lang] Language code, if omitted or null defaults to any user language * @param {string} [fallback] Fallback code, used if no matching language can be found * @return {Mixed} Local value */ OO.ui.getLocalValue = function ( obj, lang, fallback ) { var i, len, langs; // Requested language if ( obj[ lang ] ) { return obj[ lang ]; } // Known user language langs = OO.ui.getUserLanguages(); for ( i = 0, len = langs.length; i < len; i++ ) { lang = langs[ i ]; if ( obj[ lang ] ) { return obj[ lang ]; } } // Fallback language if ( obj[ fallback ] ) { return obj[ fallback ]; } // First existing language // eslint-disable-next-line no-unreachable-loop for ( lang in obj ) { return obj[ lang ]; } return undefined; }; /** * Check if a node is contained within another node. * * Similar to jQuery#contains except a list of containers can be supplied * and a boolean argument allows you to include the container in the match list * * @param {HTMLElement|HTMLElement[]} containers Container node(s) to search in * @param {HTMLElement} contained Node to find * @param {boolean} [matchContainers] Include the container(s) in the list of nodes to match, * otherwise only match descendants * @return {boolean} The node is in the list of target nodes */ OO.ui.contains = function ( containers, contained, matchContainers ) { var i; if ( !Array.isArray( containers ) ) { containers = [ containers ]; } for ( i = containers.length - 1; i >= 0; i-- ) { if ( ( matchContainers && contained === containers[ i ] ) || $.contains( containers[ i ], contained ) ) { return true; } } return false; }; /** * Return a function, that, as long as it continues to be invoked, will not * be triggered. The function will be called after it stops being called for * N milliseconds. If `immediate` is passed, trigger the function on the * leading edge, instead of the trailing. * * Ported from: http://underscorejs.org/underscore.js * * @param {Function} func Function to debounce * @param {number} [wait=0] Wait period in milliseconds * @param {boolean} [immediate] Trigger on leading edge * @return {Function} Debounced function */ OO.ui.debounce = function ( func, wait, immediate ) { var timeout; return function () { var context = this, args = arguments, later = function () { timeout = null; if ( !immediate ) { func.apply( context, args ); } }; if ( immediate && !timeout ) { func.apply( context, args ); } if ( !timeout || wait ) { clearTimeout( timeout ); timeout = setTimeout( later, wait ); } }; }; /** * Puts a console warning with provided message. * * @param {string} message Message */ OO.ui.warnDeprecation = function ( message ) { if ( OO.getProp( window, 'console', 'warn' ) !== undefined ) { // eslint-disable-next-line no-console console.warn( message ); } }; /** * Returns a function, that, when invoked, will only be triggered at most once * during a given window of time. If called again during that window, it will * wait until the window ends and then trigger itself again. * * As it's not knowable to the caller whether the function will actually run * when the wrapper is called, return values from the function are entirely * discarded. * * @param {Function} func Function to throttle * @param {number} wait Throttle window length, in milliseconds * @return {Function} Throttled function */ OO.ui.throttle = function ( func, wait ) { var context, args, timeout, previous = Date.now() - wait, run = function () { timeout = null; previous = Date.now(); func.apply( context, args ); }; return function () { // Check how long it's been since the last time the function was // called, and whether it's more or less than the requested throttle // period. If it's less, run the function immediately. If it's more, // set a timeout for the remaining time -- but don't replace an // existing timeout, since that'd indefinitely prolong the wait. var remaining = Math.max( wait - ( Date.now() - previous ), 0 ); context = this; args = arguments; if ( !timeout ) { // If time is up, do setTimeout( run, 0 ) so the function // always runs asynchronously, just like Promise#then . timeout = setTimeout( run, remaining ); } }; }; /** * Reconstitute a JavaScript object corresponding to a widget created by * the PHP implementation. * * This is an alias for `OO.ui.Element.static.infuse()`. * * @param {string|HTMLElement|jQuery} node A single node for the widget to infuse. * String must be a selector (deprecated). * @param {Object} [config] Configuration options * @return {OO.ui.Element} * The `OO.ui.Element` corresponding to this (infusable) document node. */ OO.ui.infuse = function ( node, config ) { if ( typeof node === 'string' ) { // Deprecate passing a selector, which was accidentally introduced in Ibf95b0dee. // @since 0.41.0 OO.ui.warnDeprecation( 'Passing a selector to infuse is deprecated. Use an HTMLElement or jQuery collection instead.' ); } return OO.ui.Element.static.infuse( node, config ); }; /** * Get a localized message. * * After the message key, message parameters may optionally be passed. In the default * implementation, any occurrences of $1 are replaced with the first parameter, $2 with the * second parameter, etc. * Alternative implementations of OO.ui.msg may use any substitution system they like, as long * as they support unnamed, ordered message parameters. * * In environments that provide a localization system, this function should be overridden to * return the message translated in the user's language. The default implementation always * returns English messages. An example of doing this with * [jQuery.i18n](https://github.com/wikimedia/jquery.i18n) follows. * * @example * var i, iLen, button, * messagePath = 'oojs-ui/dist/i18n/', * languages = [ $.i18n().locale, 'ur', 'en' ], * languageMap = {}; * * for ( i = 0, iLen = languages.length; i < iLen; i++ ) { * languageMap[ languages[ i ] ] = messagePath + languages[ i ].toLowerCase() + '.json'; * } * * $.i18n().load( languageMap ).done( function() { * // Replace the built-in `msg` only once we've loaded the internationalization. * // OOUI uses `OO.ui.deferMsg` for all initially-loaded messages. So long as * // you put off creating any widgets until this promise is complete, no English * // will be displayed. * OO.ui.msg = $.i18n; * * // A button displaying "OK" in the default locale * button = new OO.ui.ButtonWidget( { * label: OO.ui.msg( 'ooui-dialog-message-accept' ), * icon: 'check' * } ); * $( document.body ).append( button.$element ); * * // A button displaying "OK" in Urdu * $.i18n().locale = 'ur'; * button = new OO.ui.ButtonWidget( { * label: OO.ui.msg( 'ooui-dialog-message-accept' ), * icon: 'check' * } ); * $( document.body ).append( button.$element ); * } ); * * @param {string} key Message key * @param {...Mixed} [params] Message parameters * @return {string} Translated message with parameters substituted */ OO.ui.msg = function ( key ) { // `OO.ui.msg.messages` is defined in code generated during the build process var messages = OO.ui.msg.messages, message = messages[ key ], params = Array.prototype.slice.call( arguments, 1 ); if ( typeof message === 'string' ) { // Perform $1 substitution message = message.replace( /\$(\d+)/g, function ( unused, n ) { var i = parseInt( n, 10 ); return params[ i - 1 ] !== undefined ? params[ i - 1 ] : '$' + n; } ); } else { // Return placeholder if message not found message = '[' + key + ']'; } return message; }; /** * Package a message and arguments for deferred resolution. * * Use this when you are statically specifying a message and the message may not yet be present. * * @param {string} key Message key * @param {...Mixed} [params] Message parameters * @return {Function} Function that returns the resolved message when executed */ OO.ui.deferMsg = function () { var args = arguments; return function () { return OO.ui.msg.apply( OO.ui, args ); }; }; /** * Resolve a message. * * If the message is a function it will be executed, otherwise it will pass through directly. * * @param {Function|string|Mixed} msg * @return {string|Mixed} Resolved message when there was something to resolve, pass through * otherwise */ OO.ui.resolveMsg = function ( msg ) { if ( typeof msg === 'function' ) { return msg(); } return msg; }; /** * @param {string} url * @return {boolean} */ OO.ui.isSafeUrl = function ( url ) { // Keep this function in sync with php/Tag.php var i, protocolAllowList; function stringStartsWith( haystack, needle ) { return haystack.substr( 0, needle.length ) === needle; } protocolAllowList = [ 'bitcoin', 'ftp', 'ftps', 'geo', 'git', 'gopher', 'http', 'https', 'irc', 'ircs', 'magnet', 'mailto', 'mms', 'news', 'nntp', 'redis', 'sftp', 'sip', 'sips', 'sms', 'ssh', 'svn', 'tel', 'telnet', 'urn', 'worldwind', 'xmpp' ]; if ( url === '' ) { return true; } for ( i = 0; i < protocolAllowList.length; i++ ) { if ( stringStartsWith( url, protocolAllowList[ i ] + ':' ) ) { return true; } } // This matches '//' too if ( stringStartsWith( url, '/' ) || stringStartsWith( url, './' ) ) { return true; } if ( stringStartsWith( url, '?' ) || stringStartsWith( url, '#' ) ) { return true; } return false; }; /** * Check if the user has a 'mobile' device. * * For our purposes this means the user is primarily using an * on-screen keyboard, touch input instead of a mouse and may * have a physically small display. * * It is left up to implementors to decide how to compute this * so the default implementation always returns false. * * @return {boolean} User is on a mobile device */ OO.ui.isMobile = function () { return false; }; /** * Get the additional spacing that should be taken into account when displaying elements that are * clipped to the viewport, e.g. dropdown menus and popups. This is meant to be overridden to avoid * such menus overlapping any fixed headers/toolbars/navigation used by the site. * * @return {Object} Object with the properties 'top', 'right', 'bottom', 'left', each representing * the extra spacing from that edge of viewport (in pixels) */ OO.ui.getViewportSpacing = function () { return { top: 0, right: 0, bottom: 0, left: 0 }; }; /** * Get the default overlay, which is used by various widgets when they are passed `$overlay: true`. * See <https://www.mediawiki.org/wiki/OOUI/Concepts#Overlays>. * * @return {jQuery} Default overlay node */ OO.ui.getDefaultOverlay = function () { if ( !OO.ui.$defaultOverlay ) { OO.ui.$defaultOverlay = $( '<div>' ).addClass( 'oo-ui-defaultOverlay' ); $( document.body ).append( OO.ui.$defaultOverlay ); } return OO.ui.$defaultOverlay; };
// @flow import Config from "react-native-config"; import AsyncStorage from "@react-native-community/async-storage"; import { concatMap } from "rxjs/operators"; import { setEnvUnsafe, isEnvDefault, changes, } from "@ledgerhq/live-common/lib/env"; import type { EnvName } from "@ledgerhq/live-common/lib/env"; import logger from "./logger"; export type FeatureCommon = { name: EnvName, title: string, description: string, shadow?: boolean, }; export type FeatureToggle = { type: "toggle", valueOn?: any, valueOff?: any, }; export type FeatureInteger = { type: "integer", minValue?: number, maxValue?: number, }; export type Feature = FeatureCommon & (FeatureToggle | FeatureInteger); export const experimentalFeatures: Feature[] = [ { type: "toggle", name: "EXPERIMENTAL_CURRENCIES_JS_BRIDGE", title: "Tezos JS impl", description: "Tezos JS impl", valueOn: "tezos", valueOff: "", }, { type: "toggle", name: "MANAGER_DEV_MODE", title: "Developer mode", description: "Show developer and testnet apps in the Manager.", }, { type: "integer", name: "FORCE_PROVIDER", title: "Manager provider", description: "Changing the app provider in the Manager may make it impossible to install or uninstall apps on your Ledger device.", minValue: 1, }, { type: "toggle", name: "EXPERIMENTAL_EXPLORERS", title: "Experimental Explorers API", description: "Try an upcoming version of Ledger's blockchain explorers. Changing this setting may affect the account balance and synchronization as well as the send feature.", }, ...(__DEV__ ? [ { type: "toggle", name: "EXPERIMENTAL_SWAP", title: "New SWAP interface ", description: "Use the new experimental swap interface", }, ] : []), ]; const storageKey = "experimentalFlags"; export const getStorageEnv = async () => { try { const maybeData = await AsyncStorage.getItem(storageKey); return maybeData ? JSON.parse(maybeData) : {}; } catch (error) { logger.critical(error); return {}; } }; export const setStorageEnvs = async (key: EnvName, val: string) => { try { const envs = await getStorageEnv(); envs[key] = val; await AsyncStorage.setItem(storageKey, JSON.stringify(envs)); } catch (error) { logger.critical(error); } }; export const isReadOnly = (key: EnvName) => key in Config; export const enabledExperimentalFeatures = (): string[] => // $FlowFixMe experimentalFeatures.map(e => e.name).filter(k => !isEnvDefault(k)); (async () => { const envs = await getStorageEnv(); /* eslint-disable guard-for-in */ for (const k in envs) { setEnvUnsafe(k, envs[k]); } for (const k in Config) { setEnvUnsafe(k, Config[k]); } /* eslint-enable guard-for-in */ const saveEnvs = async (name, value) => { if (experimentalFeatures.find(f => f.name === name) && !isReadOnly(name)) { await setStorageEnvs(name, value); } }; changes .pipe(concatMap(({ name, value }) => saveEnvs(name, value))) .subscribe(); })();
/** * Using Rails-like standard naming convention for endpoints. * GET /api/feedbacks -> index * POST /api/feedbacks -> create * GET /api/feedbacks/:id -> show * PUT /api/feedbacks/:id -> update * DELETE /api/feedbacks/:id -> destroy */ 'use strict'; import _ from 'lodash'; var Feedback = require('./feedback.model'); function handleError(res, statusCode) { statusCode = statusCode || 500; return function(err) { res.status(statusCode).send(err); }; } function responseWithResult(res, statusCode) { statusCode = statusCode || 200; return function(entity) { if (entity) { res.status(statusCode).json(entity); } }; } function handleEntityNotFound(res) { return function(entity) { if (!entity) { res.status(404).end(); return null; } return entity; }; } function saveUpdates(updates) { return function(entity) { var updated = _.merge(entity, updates); return updated.saveAsync() .spread(updated => { return updated; }); }; } function removeEntity(res) { return function(entity) { if (entity) { return entity.removeAsync() .then(() => { res.status(204).end(); }); } }; } // Gets a list of Feedbacks export function index(req, res) { Feedback.findAsync() .then(responseWithResult(res)) .catch(handleError(res)); } // Gets a single Feedback from the DB export function show(req, res) { Feedback.findByIdAsync(req.params.id) .then(handleEntityNotFound(res)) .then(responseWithResult(res)) .catch(handleError(res)); } // Creates a new Feedback in the DB export function create(req, res) { Feedback.createAsync(req.body) .then(responseWithResult(res, 201)) .catch(handleError(res)); } // Updates an existing Feedback in the DB export function update(req, res) { if (req.body._id) { delete req.body._id; } Feedback.findByIdAsync(req.params.id) .then(handleEntityNotFound(res)) .then(saveUpdates(req.body)) .then(responseWithResult(res)) .catch(handleError(res)); } // Deletes a Feedback from the DB export function destroy(req, res) { Feedback.findByIdAsync(req.params.id) .then(handleEntityNotFound(res)) .then(removeEntity(res)) .catch(handleError(res)); }
import vcProgress from './src/vc-progress' vcProgress.install = function (Vue) { Vue.component(vcProgress.name, vcProgress) } export default vcProgress
const path = require("path"); const fs = require("fs-extra"); // Used to extract title text from Markdown title tags in note source files const HASH_TITLE_REGEX = /\# (.*)/; const DASH_TITLE_REGEX = /(.*)\n[=-]+\n/; const extractName = (path, contents) => { const hashTitle = HASH_TITLE_REGEX.exec(contents); const dashTitle = DASH_TITLE_REGEX.exec(contents); if (hashTitle && hashTitle[1]) { return hashTitle[1]; } else if (dashTitle && dashTitle[1]) { return dashTitle[1]; } else { return withoutExtension(path.split("/").pop()); } }; const HASH_SUBTITLE_REGEX = /\# (.*)(\n*)\#\#(.*)/; const DASH_SUBTITLE_REGEX = /(.*)\n[=]+\n(\n*)(.*)\n[-]+\n/; const extractSubtitle = (contents) => { const hashSubtitle = HASH_SUBTITLE_REGEX.exec(contents); const dashSubtitle = DASH_SUBTITLE_REGEX.exec(contents); if (hashSubtitle && hashSubtitle[3]) { return hashSubtitle[3]; } else if (dashSubtitle && dashSubtitle[3]) { return dashSubtitle[3]; } else { return ""; } }; const withoutExtension = (name) => path.parse("/" + name).name; const removeIgnorableItems = (name) => name[0] !== "." && name[0] !== "_" && name !== "README"; const buildTOC = (NOTES_DIRECTORY) => fs .readdirSync(NOTES_DIRECTORY) .filter(removeIgnorableItems) .map((section) => { return { name: section[0].toUpperCase() + section.slice(1), id: section, items: fs .readdirSync(NOTES_DIRECTORY + "/" + section) .filter(removeIgnorableItems) .map((article) => { const contents = fs.readFileSync( NOTES_DIRECTORY + "/" + section + "/" + article, "utf-8" ); return { name: extractName(path, contents), subtitle: extractSubtitle(contents), id: withoutExtension(article), slug: "/about/notes/" + withoutExtension(section) + "/" + withoutExtension(article), }; }), slug: "/about/notes/" + path.parse("/" + section).name, }; }); module.exports = buildTOC;
var Backbone = require('backbone') var TestResults = Backbone.Model.extend({ initialize: function(){ this.reset() } , reset: function(){ this.set({ topLevelError: null , failed: 0 , passed: 0 , pending: 0 , total: 0 , tests: new Backbone.Collection , all: false }) } , addResult: function(result){ var total = this.get('total') , pending = this.get('pending') , passed = this.get('passed') , failed = this.get('failed') total++ if (result.pending) pending++ else if (result.failed == 0) passed++ else failed++ this.set({ total: total , pending: pending , passed: passed , failed: failed , items: result.items }) this.get('tests').push(result) } }) module.exports = TestResults
const fs = require("fs"); const path = require("path"); const _ = require("lodash"); const libraryPath = path.normalize(path.join(process.cwd(), "library")); const allBooks = fs .readdirSync("library") .reduce((books, file) => { const book = require(path.join(libraryPath, file)); return [...books, book]; }, []) .sort((bookA, bookB) => { return bookA.volumeInfo.title .toLowerCase() .localeCompare(bookB.volumeInfo.title.toLowerCase()); }); // Add metadata // 1. Reading status const readingStatus = allBooks.reduce( (statusesCount, book) => { if (!!book.readingStatus) { return { ...statusesCount, [book.readingStatus]: statusesCount[book.readingStatus] + 1 }; } else { return { ...statusesCount, Unknown: statusesCount["Unknown"] + 1 }; } }, { Read: 0, Unread: 0, Unknown: 0, Skimmed: 0 } ); // 2. Book review const bookReview = allBooks.reduce( (bookReviewCount, book) => { if (!!book.bookReview) { return { ...bookReviewCount, "Has review": bookReviewCount["Has review"] + 1 }; } else { return { ...bookReviewCount, "No review": bookReviewCount["No review"] + 1 }; } }, { "Has review": 0, "No review": 0 } ); // 3. Book category const categories = allBooks.reduce((categoriesCount, book) => { const bookCategories = _.get(book, "volumeInfo.categories", []); bookCategories.forEach(category => { if (!categoriesCount[category]) { categoriesCount[category] = 1; } else { categoriesCount[category] = categoriesCount[category] + 1; } }); return categoriesCount; }, {}); const booksWithMetaData = { facetCount: { all: { ...readingStatus, ...bookReview, ...categories }, readingStatus, bookReview, categories }, books: allBooks }; // Write aggregated books fs.writeFileSync( path.join(process.cwd(), "allBooks.json"), JSON.stringify(booksWithMetaData, null, 4), "utf8" );
/****************************************************************************** * * Copyright 2012 Tavendo GmbH. All rights reserved. * ******************************************************************************/ var hubRestApi = get_appliance_url("hub-web", "http://localhost:8080"); var channelBaseUri = "http://tavendo.de/webmq/demo/pubsub/"; var sendTime = null; var recvTime = null; var receivedMessages = null; var receivedMessagesClear = null; var curlLine = null; var pubTopic = null; var pubMessage = null; var pubMessageBtn = null; function updateCurl() { var cbody = encodeURI('"' + $("#pub_message").val() + '"'); curlLine.value = 'curl -d "topicuri=' + channelBaseUri + $("#pub_topic").val() + '&body=' + cbody + '" "' + hubRestApi + '"'; } function setupDemo() { receivedMessages = document.getElementById('sub_message'); receivedMessages.value = ""; receivedMessages.disabled = true; receivedMessagesClear = document.getElementById('sub_message_clear'); receivedMessagesClear.disabled = true; receivedMessagesClear.onclick = function () { receivedMessages.value = ""; receivedMessages.scrollTop = receivedMessages.scrollHeight; receivedMessagesClear.disabled = true; } curlLine = document.getElementById('pub_curl'); //curlLine.disabled = true; curlLine.readOnly = true; pubTopic = document.getElementById('pub_topic'); pubMessage = document.getElementById('pub_message'); $("#pub_message").val("Hello, world."); pubMessageBtn = document.getElementById('pub_publish'); pubMessageBtn.onclick = function () { sendTime = (new Date).getTime(); sess.publish("event:" + $("#pub_topic").val(), $("#pub_message").val(), false); } pubMessageBtn.disabled = false; // using jQuery because IE8 handles .onkeyup differently $(pubTopic).keyup(function(e) { ab.log(e); if (isValueChar(e)) { if (checkChannelId(pubTopic.value)) { updateCurl(); $("#pub_topic_full").text(channelBaseUri + pubTopic.value); pubMessageBtn.disabled = false; } else { pubMessageBtn.disabled = true; } } }); $(pubMessage).keyup(function(e) { if (isValueChar(e)) { updateCurl(); } }); $("#helpButton").click(function() { $(".info_bar").toggle() }); } function onMessage(topicUri, event) { //console.log(topicUri); //console.log(event); if (sendTime) { recvTime = (new Date).getTime(); $("#sub_message_details_time").text((recvTime - sendTime) + " ms / " + event.length + " bytes"); sendTime = null; } else { $("#sub_message_details_time").text(" - / " + event.length + " bytes"); } receivedMessages.value += event + "\r\n"; receivedMessages.scrollTop = receivedMessages.scrollHeight; receivedMessagesClear.disabled = false; } function onChannelSwitch(oldChannelId, newChannelId) { if (oldChannelId) { sess.unsubscribe("event:" + oldChannelId); } else { // initial setup // $("#pub_topic").val(newChannelId); $("#pub_topic_full").text(channelBaseUri + newChannelId); updateCurl(); } sess.prefix("event", channelBaseUri); sess.subscribe("event:" + newChannelId, onMessage); $('#new-window').attr('href', window.location.pathname + '?channel=' + newChannelId); //$('#pubsub_new_window_link').html(window.location.origin + window.location.pathname + '?channel=' + newChannelId); $('#pubsub_new_window_link').html(window.location.protocol + "//" + window.location.host + window.location.pathname + '?channel=' + newChannelId); $("#sub_topic_full").text(channelBaseUri + newChannelId); }
// Loader $(window).load(() => { setTimeout(() => { $("#loading").css({ opacity: 0 }); $("#loading").hide(); }, 500); }); $(document).ready(() => { // Mega Menu Icon $(".nav_icon").click(function () { $(this).toggleClass("open"); $(".nav_menu").toggleClass("open"); $(".header_footer").toggleClass("fixed"); $(".nav_content-logo").toggleClass("fixed"); $("body").toggleClass("hidden"); }); // Init ScrollMagic const controller = new ScrollMagic.Controller(); // Scenes const aboutScene = new ScrollMagic.Scene({ triggerElement: ".about_wrapper", duration: "200%", }) .setPin(".about_wrapper") .setClassToggle(".about_wrapper", "fade-in") .addTo(controller); const magentaScene = new ScrollMagic.Scene({ triggerElement: "body", duration: "300%", triggerHook: 0.1, }) .setPin(".background_detail_magenta") .addTo(controller); const lampScene = new ScrollMagic.Scene({ triggerElement: ".studio", duration: "1000%", triggerHook: 1, }) .setPin(".studio_lamp") .setClassToggle(".studio_lamp", "fade-in") .addTo(controller); const amareloScene = new ScrollMagic.Scene({ triggerElement: ".universe_content", triggerHook: 0.1, }) .setClassToggle(".background_detail_amarelo", "transform") .addTo(controller); const lampMoveScene = new ScrollMagic.Scene({ triggerElement: ".universe_content", triggerHook: 0.1, }) .setClassToggle(".studio_lamp", "transform") .addTo(controller); const universeScene = new ScrollMagic.Scene({ triggerElement: ".universe_content", duration: "678%", triggerHook: 0, }) .setPin(".universe_content_infos") .setClassToggle(".universe_content_infos", "fade-in") .addTo(controller); const detachShowScene = new ScrollMagic.Scene({ triggerElement: ".universe_content-detach", duration: "100%", triggerHook: 0, }) .setPin(".universe_content-detach") .setClassToggle(".universe_content-detach", "fade-in") .addTo(controller); const brandingShowScene = new ScrollMagic.Scene({ triggerElement: ".universe_content-branding", duration: "100%", triggerHook: 0, }) .setPin(".universe_content-branding") .setClassToggle(".universe_content-branding", "fade-in") .addTo(controller); const designShowScene = new ScrollMagic.Scene({ triggerElement: ".universe_content-design", duration: "100%", triggerHook: 0, }) .setPin(".universe_content-design") .setClassToggle(".universe_content-design", "fade-in") .addTo(controller); const amareloHideScene = new ScrollMagic.Scene({ triggerElement: ".universe_content-services", triggerHook: 0.1, }) .setClassToggle(".background_detail_amarelo", "hide") .addTo(controller); const fisiologyEffectScene = new ScrollMagic.Scene({ triggerElement: ".effect-fisiology", duration: "100%", triggerHook: 0.3, }) .setPin(".effect-fisiology") .setClassToggle(".effect-fisiology", "fade-in") .addTo(controller); const termicEffectScene = new ScrollMagic.Scene({ triggerElement: ".effect-termic", duration: "100%", triggerHook: 0.3, }) .setPin(".effect-termic") .setClassToggle(".effect-termic", "fade-in") .addTo(controller); const mecanicEffectScene = new ScrollMagic.Scene({ triggerElement: ".effect-mecanic", duration: "100%", triggerHook: 0.3, }) .setPin(".effect-mecanic") .setClassToggle(".effect-mecanic", "fade-in") .addTo(controller); // Carousel Proejcts const carousel = $(".projects_content-carousel").flickity({ cellAlign: "left", prevNextButtons: false, pageDots: false, }); // Dots $(".projects_content-dots-prev").on("click", () => { carousel.flickity("previous"); }); $(".projects_content-dots-next").on("click", () => { carousel.flickity("next"); }); }); // Studio $(window).on("scroll", () => { const windowHeight = $(window).height(); // Show video if ($(this).scrollTop() >= windowHeight / 1.7) { $(".studio_video").css({ opacity: 0.4 }); } else { $(".studio_video").css({ opacity: 0 }); } // Change text about with scroll if ($(this).scrollTop() > windowHeight * 1.3) { $(".about_content-paragraph").html( "Somos percepção e caminho, criamos conceitos, estratégias, acreditamos que a marca se comunica com o seu propósito, esse é o verdadeiro sentido." ); } else { $(".about_content-paragraph").html( "Nós aumentamos o potencial competitivo e resultados de nossos clientes, gerando ligação emocional entre consumidores e a marca através da ousadia, estratégia, arte e design." ); } });
import { useEffect, useState, useRef } from 'react'; import loadScript from './loadScript.js'; export default function useGoogleMapsApi({ key, libraries = '' }) { let api = useRef( window.google && window.google.maps ? window.google.maps : null ); let [state, setState] = useState(api.current ? 'ready' : 'loading'); useEffect(() => { if (api.current) return; let cancel = false; (async () => { try { await loadScript( `https://maps.googleapis.com/maps/api/js?key=${key}&libraries=${libraries}` ); if (cancel) return; api.current = window.google.maps; setState('ready'); } catch (error) { if (cancel) return; setState('error'); } })(); return () => (cancel = true); }, []); // eslint-disable-line return { api: api.current, isError: state === 'error', isLoading: state === 'loading', isReady: state === 'ready', }; }
import Bookshelf from '../../db'; /* eslint-disable object-shorthand */ /** * @typedef Event * @property {string} id - ID * @property {string} type.required - Type * @property {string} status.required - Status * @property {string} ship_id - ID of the ship where the event is taking place * @property {string} occurs_at - ISO 8601 String Date-time when event will occur * @property {object} metadata - JSON representation of any data related to the event * @property {boolean} is_active - Boolean stating if the task is active * @property {string} created_at - ISO 8601 String Date-time when object was created * @property {string} updated_at - ISO 8601 String Date-time when object was last updated */ export const Event = Bookshelf.Model.extend({ tableName: 'event', hasTimestamps: true, setActive: function (active) { this.save({ is_active: !!active }); } });
define(['vue','vue-resource','underscore','moment', 'text!templates/staff/purchase/temp_table_purchase_staff.html'], function(Vue, VueResource, _, moment, template) { Vue.use(VueResource); Vue.http.headers.common['X-CSRF-TOKEN'] = document.querySelector('#token').getAttribute('value'); var Component = Vue.extend({ template: template, props: { user: { type: Object } }, data(){ return { items: [], purchase_items: [], purchases: [], date: moment().format('MM-DD-YYYY'), datePickerMsg: '', search: '' } }, created(){ this.fetchAll(); this.initDT(); }, ready(){ }, methods: { initDT(){ let self = this; require(['datepicker-bootstrap'], function(){ $('#datepicker-purchase').datepicker({ format: "mm/dd/yyyy" }); $("#datepicker-purchase").on("changeDate", function(e) { let date = moment(e.date).format('MMMM DD, YYYY'); self.getRecordsByDate(date); }); }); }, getRecordsByDate(date){ let self = this; let resource = self.$resource('api/purchase/date/staff{/date}'); resource.get({date: date}).then((resp) => { if (resp.status === 200) { let json = JSON.parse(resp.body); self.datePickerMsg = json.purchase_items.length + ' record/s in database.'; $.each(json, function(index, val) { self[index]= val; }); } }, (resp) => { console.log(resp); }); }, getItem(i){ return _.where(this.items, {id: i}); }, getPurchase(purchase_id){ return _.where(this.purchases, {id: purchase_id}); }, getItemWhat(model, index){ let self = this; let rs = self.getItem(model.product_id); if (rs.length) { model[index] = rs[0][index]; return rs[0][index]; } }, getPurchasedDate(model){ let self = this; let rs = self.getPurchase(model.purchase_id); if (rs.length) { return moment(rs[0].date).format('MMMM DD, YYYY dddd'); } }, getPurchasedTime(model){ let self = this; let rs = self.getPurchase(model.purchase_id); if (rs.length) { return moment(rs[0].date).format('hh:mm a'); } }, fetchAll(){ let self = this; self.datePickerMsg = ''; self.date = moment().format('MM/DD/YYYY'); self.$http.get('/api/fetch_purchases_staff').then((resp) => { // console.log('ok'); if (resp.status === 200) { let json = JSON.parse(resp.body); $.each(json, function(index, val) { self[index] = val; }); } }, (resp) => { console.log(resp); }); } }, computed: { getTotal(){ let self = this; let purchase_item = {}; let total = 0; for (var i = self.purchase_items.length - 1; i >= 0; i--) { purchase_item = self.purchase_items[i]; total += Number(purchase_item.qty) * Number(purchase_item.old_price); } return total; } }, watch: { } }); return Component; });
var gulp=require('gulp'), fs = require('fs-extra'), concat=require('gulp-concat'), uglify = require('gulp-uglify'), BUILD_JSON=require('./build.json'), BUILD_NAME='elliptical.soa.js', MIN_NAME='elliptical.soa.min.js', REPO_NAME='elliptical soa', DIST='./dist'; gulp.task('default',function(){ console.log(REPO_NAME + ' ..."tasks: gulp build|gulp minify"'); }); gulp.task('build',function(){ concatStream(BUILD_NAME) .pipe(gulp.dest(DIST)); }); gulp.task('minify',function(){ concatStream(MIN_NAME) .pipe(uglify()) .pipe(gulp.dest(DIST)); }); function srcStream(src){ if(src===undefined) src=BUILD_JSON; return gulp.src(src); } function concatStream(name,src){ if(src===undefined) src=BUILD_JSON; return srcStream(src) .pipe(concat(name)) } function fileStream(src,dest){ gulp.src(src) .pipe(gulp.dest(dest)); } function concatFileStream(src,dest,name){ gulp.src(src) .pipe(concat(name)) .pipe(gulp.dest(dest)); } function minFileStream(src,dest,name){ gulp.src(src) .pipe(concat(name)) .pipe(uglify()) .pipe(gulp.dest(dest)); }
var replaceVars = { "janvier":"January","février":"February","mars":"March","avril":"April","mai":"May","juin":"June","juillet":"July","août":"August","septembre":"September","octobre":"October","novembre":"November","décembre":"December", "enero":"January","febrero":"February","marzo":"March","abril":"April","mayo":"May","junio":"June","julio":"July","agosto":"August","septiembre":"September","octubre":"October","noviembre":"November","diciembre":"December", "Janeiro":"January","Fevereiro":"February","Março":"March","Abril":"April","Maio":"May","Junho":"June","Julho":"July","Agosto":"August","Setembro":"September","Outubro":"October","Novembro":"November","Dezembro":"December", }; var engRegex = /January|February|March|April|May|June|July|August|September|October|November|December'/g ; var regex = /janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre|enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|Janeiro|Fevereiro|Março|Abril|Maio|Junho|Julho|Agosto|Setembro|Outubro|Novembro|Dezembro'/g ; var lg; function parseDdmmyyyy(str) { var parts = str.split('/'); return new Date(parts[2], parts[1] - 1, parts[0]); } $(function() { switch(lg){ case 'fr': $.extend($.fn.pickadate.defaults, { monthsFull: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'], monthsShort: [ 'Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec' ], weekdaysFull: [ 'Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi' ], weekdaysShort: [ 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' ], today: 'Aujourd\'hui', clear: 'Effacer', close: 'Fermer', firstDay: 1, //format: 'dd mmmm yyyy', }); break; case 'es': $.extend($.fn.pickadate.defaults, { monthsFull: [ 'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre' ], monthsShort: [ 'ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic' ], weekdaysFull: [ 'domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado' ], weekdaysShort: [ 'dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb' ], today: 'hoy', clear: 'borrar', close: 'cerrar', firstDay: 1, //format: 'dddd d !de mmmm !de yyyy', }); break; case 'pt': $.extend($.fn.pickadate.defaults, { monthsFull: [ 'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro' ], monthsShort: [ 'jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez' ], weekdaysFull: [ 'Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado' ], weekdaysShort: [ 'dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sab' ], today: 'Hoje', clear: 'Limpar', close: 'Fechar', firstDay: 1, //format: 'd !de mmmm !de yyyy', }); break; default: break; } $.extend($.fn.pickadate.defaults, { selectMonths: true, selectYears: 5, yearend: '31/12/2018', closeOnSelect: true, clear: false, //format : 'dd MMMM, yyyy', //formatSubmit: 'yyyy/mm/dd' //formatSubmit: 'yyyy/mm/dd' }); $(document).on('mousedown', '.dp-mdate', function(e) { setTimeout(function (){ $('.picker').one('mouseup',function(){ var elmt = $(this); setTimeout(function (){ elmt.click(); elmt.focus(); },100) }) }, 20) }) $(document).on('mousedown', '.dp-mtime', function(e) { setTimeout(function (){ $('.clockpicker').one('mouseup',function(){ var elmt = $(this); setTimeout(function (){ $('.dp-mtime').click(); },100) }) }, 20) }) if(lg == 'fr'){ $('.dp-mdate').pickadate({ disable: [6, 7] }); } else { $('.dp-mdate').pickadate({ disable: [1, 7] }); } //$('.dp-mdate').pickadate('picker').set('select',new Date()).set('min',new Date(Date.now() + 1 * 24 * 60 * 60 * 1000)); $('.dp-mtime').pickatime({ twelvehour : false, defaultTime : '10:00', }); $('#firstContactModal').on('open',function(){ if($('.clockpicker-hours .clockpicker-tick').length > 10){ var removableElmts = []; $('.clockpicker-hours .clockpicker-tick').each(function(){ if($('.clockpicker-hours .clockpicker-tick').index($(this)) < 10 || $('.clockpicker-hours .clockpicker-tick').index($(this)) > 18){ removableElmts.push($(this)); } }); for(i=0;i<removableElmts.length;i++){ removableElmts[i].remove(); } } }); var url = window.location.pathname.split('/')[4]; if($(window).width() < 920){ $('nav ul li').eq(1).hide(); } ($(window).width() < 800) ? $('#services p').addClass('center') : $('#services p').removeClass('center'); $(window).bind('scroll', function () { if ($('li').hasClass('active')){ $('.collapsible-body').slideUp(); $('li, div').removeClass('active'); } }); $('.prev-btn, .next-btn').on('click',function(){ $(this).closest('.modal').modal("close"); }) $('#videoModal').modal({ dismissible:true, complete: function (){ var videoURL = $('#presVideo').prop('src'); videoURL = videoURL.replace("&autoplay=1", ""); $('#presVideo').prop('src',''); $('#presVideo').prop('src',videoURL); } }); $('#register, #contactModal').modal({ dismissible:true, complete:function(){ var form; ($(this).attr('id') == 'register')? form = $("#registerForm") : form = $("#contactForm"); if(!(form.find("[name=email], [name=full_name]").val()=="")){ var formSerialize = form.serialize(); ($(this).attr('id') == 'register') ? actionName = 'register' : actionName = 'contact'; ($('.locale-flag').hasClass('france')) ? locale="fr" : locale="en"; var url = locale+"/contact/"+actionName+"/abort"; $.post(url, formSerialize, function(data) {}, 'JSON'); } }, }); $('#retrievePwdForm').on('submit',function(e){ e.preventDefault(); ($('.locale-flag').hasClass('france')) ? locale="fr" : locale="en"; var formSerialize = $(this).serialize(); //var rurl = locale + "/password/reset"; $.post(rurl, formSerialize) .done(function(data){ $('.modal').modal('close'); $('#retrievePwdForm').find("[type=email]").val(""); $('#retrievePwdSuccess').modal('open'); }) .fail(function(data){ console.log(data); }) }); $('.contact-submit').on('click',function(e){ e.preventDefault(); var tmp = $(this).closest('form').serialize().split('&'); tmp[1] = tmp[1].split('='); tmp[1][1] = $('.dp-mdate').pickadate('picker').get('select', 'dd/mm/yyyy'); tmp[1] = tmp[1].join('='); tmp = tmp.join('&'); $.post(curl, tmp) .done(function(data){ $.each($('.red-text'),function(){ $(this).remove(); }); try { var data = JSON.parse(data); var whereIsTheError = 0; $.each(data, function(key, value){ $.each($('form[name="contact_form"] input'),function(){ if($(this).attr('name').indexOf(key) != -1){ // Determine which modal to reopen to show the error if($(this).closest('#firstContactModal').length > 0){ whereIsTheError = 1; } else { if(whereIsTheError == 0){ whereIsTheError = 2; } } $(this).after('<div class="red-text"><strong>'+value+'</strong></div>'); return false; } }) }) $('#thirdContactModal').modal("close"); (whereIsTheError == 1) ? $('#firstContactModal').modal("open") : $('#secondContactModal').modal("open"); } catch(e){ $('#thirdContactModal').modal("close"); $('#contactSuccess').modal("open"); } }) .fail(function(data){ console.log(data); }) }); function submitModalForm(actionName){ ($('.locale-flag').hasClass('france')) ? locale="fr" : locale="en"; var url= locale+"/contact/"+actionName+"/sent"; var formSerialize = $('#'+actionName+'Form').serialize(); $.post(url, formSerialize, function(data) { success : { $('.modal').modal('close'); $('#' + actionName +'Form').find("[type=text], [type=email], textarea").val(""); $('#' + actionName +'Success').modal('open'); } }, 'JSON' ); } $('.js-scrollTo').on('click', function() { // Au clic sur un élément var page = $(this).attr('href'); // Page cible var speed = 750; // Durée de l'animation (en ms) $('html, body').animate( { scrollTop: $(page).offset().top }, speed ); // Go return false; }); var l = Number($('.calendar-element').attr('data-l')); var c = Number($('.calendar-element').attr('data-c')); var calendarWidth = $('.calendar-holder').width(); var scale = calendarWidth / l; function getPercentage(min,max){ var result = min / max; return result * 100; } var sd = 0; var actCurDate = $('.curDate'); actCurDate.each(function(i,e){ $(e).css({'left': Math.round(10000 * (c /l )) / 100 + '%' }); }); $.each($('.activity-component'), function (){ var $this = $(this); pxWidthSD = 0; pxWidthP = scale; pctWidthSD = getPercentage(pxWidthSD, calendarWidth); pctWidthP = getPercentage(pxWidthP, calendarWidth); //$this.css({'margin-left': pctWidthSD + "%" }); //$this.css({'width': pctWidthP + "%" }); $this.find('.stage-element').each(function(){ var ssd = $(this).data("sd"); var p = $(this).data("p"); sPctWidthSD = (ssd - sd) / l; sPctWidthP = Math.max(3,(p + 1)) / (l + 1); $(this).css({'margin-left': Math.round(10000 * sPctWidthSD) / 100 + "%", 'width': Math.round(10000 * sPctWidthP) / 100 + "%", 'background' : ssd >= c ? '#5CD08F' : (ssd + p > c ? 'linear-gradient(to right, transparent, transparent ' + Math.round(10000 * (c - ssd) / p) / 100 + '%, #7942d0 '+ Math.round(10000 * (c - ssd) / p) / 100 +'%), repeating-linear-gradient(61deg, #7942d0, #7942d0 0.5rem, transparent 0.5px, transparent 1rem)' : 'gray'), 'height' : '7px', 'border-radius' : '0.3rem', }); }); $this.find('.event').each(function(){ var sd = 0; var p = l; var ed = $(this).data("od"); var ep = $(this).data("p"); sPctWidthSD = (ed - sd) / p; sPctWidthP = Math.max(3,(ep + 1)) / (p + 1); $(this).css({'margin-left': Math.round(10000 * sPctWidthSD) / 100 + "%", 'width': Math.max(1,Math.round(10000 * sPctWidthP) / 100) + "%", 'height' : '15px', 'border-radius' : '0.3rem', }); }); }); /* $('.stages-holder').on('mouseenter',function(){ $(this).closest('.activity-holder').find('.act-info .fixed-action-btn').css('visibility',''); }).on('mouseleave',function(){ var $this = $(this); var interval = setInterval(function(){ if(!$this.closest('.activity-holder').find('.act-info .fixed-action-btn').is(':hover')) { $this.closest('.activity-holder').find('.act-info .fixed-action-btn').css('visibility','hidden'); clearInterval(interval); } },50); })*/ $('.stages-holder').on('mouseover',function(){ var holderIndex = $('.stages-holder').index($(this)); const $fixedBtn = $('.act-elmt-info').find('.fixed-action-btn').eq(holderIndex); $fixedBtn.css('visibility',''); }).on('mouseout',function(){ var holderIndex = $('.stages-holder').index($(this)); var interval = setInterval(function(){ if(!$('.act-elmt-info').find('.fixed-action-btn').eq(holderIndex).is(':hover')) { $('.act-elmt-info').find('.fixed-action-btn').eq(holderIndex).css('visibility','hidden'); clearInterval(interval); } },50); }) $('.act-info .fixed-action-btn').each(function(i,e){ const $fixedBtns = $('.act-info .fixed-action-btn'); $(e).css('top', Math.round(100 * ($fixedBtns.index($(this)) / $fixedBtns.length)) + '%'); }); function CountDownTimer(dt, d, h, m, s) { var end = new Date(dt); var _second = 1000; var _minute = _second * 60; var _hour = _minute * 60; var _day = _hour * 24; var timer; function showRemaining() { var now = new Date(); var distance = end - now; if (distance < 0) { clearInterval(timer); document.getElementById(id).innerHTML = 'EXPIRED!'; return; } var days = Math.floor(distance / _day); var hours = Math.floor((distance % _day) / _hour); var minutes = Math.floor((distance % _hour) / _minute); var seconds = Math.floor((distance % _minute) / _second); document.getElementById(d).innerHTML = ""; document.getElementById(h).innerHTML = ""; document.getElementById(m).innerHTML = ""; document.getElementById(s).innerHTML = ""; document .getElementById(d).innerHTML = days; document.getElementById(h).innerHTML += hours; document.getElementById(m).innerHTML += minutes; document.getElementById(s).innerHTML += seconds; } timer = setInterval(showRemaining, 1000); } function isEmail(email) { var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; return regex.test(email); } $('.get-notified-launch-btn').on('click',function(){ var $this = $(this); $('.error-email').remove(); if(isEmail($('[name="follower"]').val())){ $.post(sdurl,$this.closest('form').serialize()) .done(function(data){ $('#subscribed').modal('open'); $('[name="follower"]').empty(); }) .fail(function(data){ console.log(data); }) } else { $('[name="follower"]').after('<div class="orange-text error-email">The email address is not correct, please type again</div>') } }) //CountDownTimer('10/11/2020 17:00:00','ct-d','ct-h','ct-m','ct-s'); if($(document).width() < 601){ $('#header .brand-logo img').attr('src','/lib/img/logo_dd_l.png'); } var sg = getCookie("signup"); if (sg){ $('#sendMailPwdDef').modal('open'); eraseCookie('signup'); } /* if($('main').width() < 950){ $('.m-title > *').css('text-align','center').appendTo('.s-title'); $('.countdown-page > ul').css('flex-direction','column'); $('.macbook-with-dd img').css({ 'margin-left' : 0, 'width' : '100%', }); $('.cta-dd').css({ 'max-width' : '100%', 'margin' : '0 5vw', 'text-align': 'center', }); }*/ });
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './containers/App'; import HomePage from './containers/HomePage'; import JSONToXMLPage from './containers/JSONToXMLPage'; export default ( <Route path="/" component={App}> // Each react-router setup should have an index route, I presume; in other // words, this is the homepage. <IndexRoute component={HomePage} /> // In our example, jsonToXML is the container component that will host // the drop to convert contents from JSON to XML <Route path="/jsonToXML" component={JSONToXMLPage} /> </Route> );
var b = 1; var data; $(function(){ r = $('#rorder').val(); if (r.length>0) { var t = setInterval(function() { $.getJsonp(apiBaseUrl+'/recharge/result',{o:r},function(json) { if (typeof json.url!='undefined') { clearInterval(t); if (json.type==1) { location.href = json.url; return; } else if(json.type==2) { data = {o:json.order}; $.getContent(apiBaseUrl+'/pay/pay-order',data,'payorder'); $.getContent(apiBaseUrl+'/pay/result',data,'payresult'); } } }); },1000); } else { data = {o:$("#order").val()}; $.getContent(apiBaseUrl+'/pay/result',data,'payresult'); } }); function success_payorder(json) { } function success_payresult(json){ if (json.code == 0) { setTimeout(function(){ $.getContent(apiBaseUrl+'/pay/result',data,'payresult'); },2000); }else if(json.code == 100){ $(".shopCart_total").html(json.count); var html = (json.success.length > 0 || json.some.length > 0) ? '<h3 class="payment-success-title">伙购成功!请耐心等待揭晓结果 !</h3>' : '<h3 class="failure-pay-title">支付失败!您下手太慢了 !</h3>'; html += "<summary>"; html += '<a href="'+memberBaseUrl+'/default/buy-list">查看伙购记录</a><a href="/list.html">继续伙购</a>'; html += '</summary>'; if (json.some.length > 0) { html += '<div class="payment-success-piece">'; html += '<span><i>'+json.some.length+'</i>件商品部分人次失败</span>'; html += '</div>'; html += '<table class="payment-success-table">'; html += '<thead>'; html += '<tr>'; html += '<td width="65%">商品名称</td>'; html += '<td width="35%"></td>'; html += '</tr>'; html += '</thead>'; html += '<tbody>'; $.each(json.some,function(i,v){ html += '<tr>'; html += '<td>'; html += '<a href="/product/'+v.product_id+'.html" title="'+v.name+'" target="_blank" style="width:auto">'+v.name+'</a>'; html += '</td>'; html += '<td>'; html += '成功支付¥'+v.nums+'.00,剩余金额¥'+parseInt(v.post_nums-v.nums)+'.00已退回您的账户,<a href="'+memberBaseUrl+'" style="color:red;display:inline">查看</a>'; html += '</td>'; html += '</tr>'; }) html += '</tbody>'; html += '</table>'; }; if (json.fail.length > 0) { html += '<div class="payment-success-piece">'; html += '<span><i>'+json.fail.length+'</i>件商品伙购失败</span>'; html += '</div>'; html += '<table class="payment-success-table">'; html += '<thead>'; html += '<tr>'; html += '<td width="65%">商品名称</td>'; html += '<td width="35%"></td>'; html += '</tr>'; html += '</thead>'; html += '<tbody>'; $.each(json.fail,function(i,v){ html += '<tr>'; html += '<td>'; html += '<a href="/product/'+v.product_id+'.html" title="'+v.name+'" target="_blank" style="width:auto">'+v.name+'</a>'; html += '</td>'; html += '<td>'; html += '支付失败,支付金额¥'+v.nums+'.00已退回您的账户,<a href="'+memberBaseUrl+'" style="color:red;display:inline">查看</a>'; html += '</td>'; html += '</tr>'; }) html += '</tbody>'; html += '</table>'; }; if (json.success.length > 0) { html += '<div class="payment-success-piece">'; html += '<span><i>'+json.success.length+'</i>件商品伙购成功</span>'; html += '</div>'; html += '<table class="payment-success-table">'; html += '<thead>'; html += '<tr>'; html += '<td width="42%">商品名称</td>'; html += '<td width="20%">伙购时间</td>'; html += '<td width="20%">伙购人次</td>'; html += '<td width="18%"></td>'; html += '</tr>'; html += '</thead>'; html += '<tbody>'; $.each(json.success,function(i,v){ html += '<tr>'; html += '<td>'; html += '<a href="/product/'+v.product_id+'.html" title="'+v.name+'" target="_blank">'+v.name+'</a>'; html += '</td>'; html += '<td>'; html += v.item_buy_time; html += '</td>'; html += '<td>'; html += v.nums; html += '</td>'; html += '<td>'; html += '<a class="orange" href="'+memberBaseUrl+'/default/buy-detail?id='+v.period_id+'">查看所有伙购码</a>'; html += '</td>'; html += '</tr>'; }) html += '</tbody>'; html += '</table>'; } $("section .payment-result").html(html); }else if (json.code == 201) { var html = '<h3 class="failure-pay-title">支付失败!您下手太慢了 !</h3>'; html += '<summary>'; html += '<a href="'+memberBaseUrl+'/default/buy-list">查看伙购记录</a><a href="/list.html">继续伙购</a>'; html += '</summary>'; $("section .payment-result").html(html); }; }
import { lazy, Suspense, useEffect, createContext, useReducer, Fragment } from 'react'; import { BrowserRouter, Switch, Route, useLocation } from 'react-router-dom'; import { Transition, TransitionGroup } from 'react-transition-group'; import classNames from 'classnames'; import { Helmet } from 'react-helmet'; import Navbar from 'components/Navbar'; import ThemeProvider from 'components/ThemeProvider'; import { tokens } from 'components/ThemeProvider/theme'; import VisuallyHidden from 'components/VisuallyHidden'; import { useLocalStorage } from 'hooks'; import { msToNum } from 'utils/style'; import { reflow } from 'utils/transition'; import prerender from 'utils/prerender'; import { initialState, reducer } from 'app/reducer'; import './reset.css'; import './index.css'; const Home = lazy(() => import('pages/Home')); const Contact = lazy(() => import('pages/Contact')); // const Articles = lazy(() => import('pages/Articles')); const Page404 = lazy(() => import('pages/404')); export const AppContext = createContext(); export const TransitionContext = createContext(); const repoPrompt = ` __ __ __ \u005C \u005C \u005C \u005C \u005C\u2215\n \u005C \u005C\u2215\u005C \u005C\n \u005C\u2215 \u005C\u2215 \n\nTaking a peek huh? Check out the source code: https://github.com/HamishMW/portfolio `; const App = () => { const [storedTheme] = useLocalStorage('theme', 'dark'); const [state, dispatch] = useReducer(reducer, initialState); useEffect(() => { if (!prerender) { console.info(`${repoPrompt}\n\n`); } window.history.scrollRestoration = 'manual'; }, []); useEffect(() => { dispatch({ type: 'setTheme', value: storedTheme }); }, [storedTheme]); return ( <AppContext.Provider value={{ ...state, dispatch }}> <ThemeProvider themeId={state.theme}> <BrowserRouter> <AppRoutes /> </BrowserRouter> </ThemeProvider> </AppContext.Provider> ); }; const AppRoutes = () => { const location = useLocation(); const { pathname } = location; return ( <Fragment> <Helmet> <link rel="canonical" href={`https://zachcargill.com${pathname}`} /> </Helmet> <VisuallyHidden showOnFocus as="a" className="skip-to-main" href="#MainContent"> Skip to main content </VisuallyHidden> <Navbar location={location} /> <TransitionGroup component="main" className="app" tabIndex={-1} id="MainContent"> <Transition key={pathname} timeout={msToNum(tokens.base.durationS)} onEnter={reflow} > {status => ( <TransitionContext.Provider value={{ status }}> <div className={classNames('app__page', `app__page--${status}`)}> <Suspense fallback={<Fragment />}> <Switch location={location}> <Route exact path="/" component={Home} /> <Route path="/contact" component={Contact} /> {/* <Route path="/articles" component={Articles} /> */} <Route component={Page404} /> </Switch> </Suspense> </div> </TransitionContext.Provider> )} </Transition> </TransitionGroup> </Fragment> ); }; export default App;
import React from "react"; import { FacebookProvider, Comments } from 'react-facebook'; const ArticleCommentSection = ({}) => { return ( <div className="facebookComments"> <FacebookProvider style={{'display': 'block'}} appId='510092146640696'> <Comments href={`https://www.stuyspec.com${window.location.pathname}`} tabs="none" /> </FacebookProvider> </div> ) } export default ArticleCommentSection;
/* * * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ 'use strict'; var assert = require('assert'); var fs = require('fs'); var path = require('path'); var grpc = require('..'); /** * This is used for testing functions with multiple asynchronous calls that * can happen in different orders. This should be passed the number of async * function invocations that can occur last, and each of those should call this * function's return value * @param {function()} done The function that should be called when a test is * complete. * @param {number} count The number of calls to the resulting function if the * test passes. * @return {function()} The function that should be called at the end of each * sequence of asynchronous functions. */ function multiDone(done, count) { return function() { count -= 1; if (count <= 0) { done(); } }; } var fakeSuccessfulGoogleCredentials = { getRequestMetadata: function(service_url, callback) { setTimeout(function() { callback(null, {Authorization: 'success'}); }, 0); } }; var fakeFailingGoogleCredentials = { getRequestMetadata: function(service_url, callback) { setTimeout(function() { callback(new Error('Authentication failure')); }, 0); } }; var key_data, pem_data, ca_data; before(function() { var key_path = path.join(__dirname, './data/server1.key'); var pem_path = path.join(__dirname, './data/server1.pem'); var ca_path = path.join(__dirname, '../test/data/ca.pem'); key_data = fs.readFileSync(key_path); pem_data = fs.readFileSync(pem_path); ca_data = fs.readFileSync(ca_path); }); describe('channel credentials', function() { describe('#createSsl', function() { it('works with no arguments', function() { var creds; assert.doesNotThrow(function() { creds = grpc.credentials.createSsl(); }); assert.notEqual(creds, null); }); it('works with just one Buffer argument', function() { var creds; assert.doesNotThrow(function() { creds = grpc.credentials.createSsl(ca_data); }); assert.notEqual(creds, null); }); it('works with 3 Buffer arguments', function() { var creds; assert.doesNotThrow(function() { creds = grpc.credentials.createSsl(ca_data, key_data, pem_data); }); assert.notEqual(creds, null); }); it('works if the first argument is null', function() { var creds; assert.doesNotThrow(function() { creds = grpc.credentials.createSsl(null, key_data, pem_data); }); assert.notEqual(creds, null); }); it('fails if the first argument is a non-Buffer value', function() { assert.throws(function() { grpc.credentials.createSsl('test'); }, TypeError); }); it('fails if the second argument is a non-Buffer value', function() { assert.throws(function() { grpc.credentials.createSsl(null, 'test', pem_data); }, TypeError); }); it('fails if the third argument is a non-Buffer value', function() { assert.throws(function() { grpc.credentials.createSsl(null, key_data, 'test'); }, TypeError); }); it('fails if only 1 of the last 2 arguments is provided', function() { assert.throws(function() { grpc.credentials.createSsl(null, key_data); }); assert.throws(function() { grpc.credentials.createSsl(null, null, pem_data); }); }); }); }); describe('server credentials', function() { describe('#createSsl', function() { it('accepts a buffer and array as the first 2 arguments', function() { var creds; assert.doesNotThrow(function() { creds = grpc.ServerCredentials.createSsl(ca_data, []); }); assert.notEqual(creds, null); }); it('accepts a boolean as the third argument', function() { var creds; assert.doesNotThrow(function() { creds = grpc.ServerCredentials.createSsl(ca_data, [], true); }); assert.notEqual(creds, null); }); it('accepts an object with two buffers in the second argument', function() { var creds; assert.doesNotThrow(function() { creds = grpc.ServerCredentials.createSsl(null, [{private_key: key_data, cert_chain: pem_data}]); }); assert.notEqual(creds, null); }); it('accepts multiple objects in the second argument', function() { var creds; assert.doesNotThrow(function() { creds = grpc.ServerCredentials.createSsl(null, [{private_key: key_data, cert_chain: pem_data}, {private_key: key_data, cert_chain: pem_data}]); }); assert.notEqual(creds, null); }); it('fails if the second argument is not an Array', function() { assert.throws(function() { grpc.ServerCredentials.createSsl(ca_data, 'test'); }, TypeError); }); it('fails if the first argument is a non-Buffer value', function() { assert.throws(function() { grpc.ServerCredentials.createSsl('test', []); }, TypeError); }); it('fails if the third argument is a non-boolean value', function() { assert.throws(function() { grpc.ServerCredentials.createSsl(ca_data, [], 'test'); }, TypeError); }); it('fails if the array elements are not objects', function() { assert.throws(function() { grpc.ServerCredentials.createSsl(ca_data, 'test'); }, TypeError); }); it('fails if the object does not have a Buffer private_key', function() { assert.throws(function() { grpc.ServerCredentials.createSsl(null, [{private_key: 'test', cert_chain: pem_data}]); }, TypeError); }); it('fails if the object does not have a Buffer cert_chain', function() { assert.throws(function() { grpc.ServerCredentials.createSsl(null, [{private_key: key_data, cert_chain: 'test'}]); }, TypeError); }); }); }); describe('client credentials', function() { var Client; var server; var port; var client_ssl_creds; var client_options = {}; before(function() { var proto = grpc.load(__dirname + '/test_service.proto'); server = new grpc.Server(); server.addProtoService(proto.TestService.service, { unary: function(call, cb) { call.sendMetadata(call.metadata); cb(null, {}); }, clientStream: function(stream, cb){ stream.on('data', function(data) {}); stream.on('end', function() { stream.sendMetadata(stream.metadata); cb(null, {}); }); }, serverStream: function(stream) { stream.sendMetadata(stream.metadata); stream.end(); }, bidiStream: function(stream) { stream.on('data', function(data) {}); stream.on('end', function() { stream.sendMetadata(stream.metadata); stream.end(); }); } }); var creds = grpc.ServerCredentials.createSsl(null, [{private_key: key_data, cert_chain: pem_data}]); port = server.bind('localhost:0', creds); server.start(); Client = proto.TestService; client_ssl_creds = grpc.credentials.createSsl(ca_data); var host_override = 'foo.test.google.fr'; client_options['grpc.ssl_target_name_override'] = host_override; client_options['grpc.default_authority'] = host_override; }); after(function() { server.forceShutdown(); }); it('Should accept SSL creds for a client', function(done) { var client = new Client('localhost:' + port, client_ssl_creds, client_options); client.unary({}, function(err, data) { assert.ifError(err); done(); }); }); it('Should update metadata with SSL creds', function(done) { var metadataUpdater = function(service_url, callback) { var metadata = new grpc.Metadata(); metadata.set('plugin_key', 'plugin_value'); callback(null, metadata); }; var creds = grpc.credentials.createFromMetadataGenerator(metadataUpdater); var combined_creds = grpc.credentials.combineChannelCredentials( client_ssl_creds, creds); var client = new Client('localhost:' + port, combined_creds, client_options); var call = client.unary({}, function(err, data) { assert.ifError(err); }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); done(); }); }); it('Should update metadata for two simultaneous calls', function(done) { done = multiDone(done, 2); var metadataUpdater = function(service_url, callback) { var metadata = new grpc.Metadata(); metadata.set('plugin_key', 'plugin_value'); callback(null, metadata); }; var creds = grpc.credentials.createFromMetadataGenerator(metadataUpdater); var combined_creds = grpc.credentials.combineChannelCredentials( client_ssl_creds, creds); var client = new Client('localhost:' + port, combined_creds, client_options); var call = client.unary({}, function(err, data) { assert.ifError(err); }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); done(); }); var call2 = client.unary({}, function(err, data) { assert.ifError(err); }); call2.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); done(); }); }); it.skip('should propagate errors that the updater emits', function(done) { var metadataUpdater = function(service_url, callback) { var error = new Error('Authentication error'); error.code = grpc.status.UNAUTHENTICATED; callback(error); }; var creds = grpc.credentials.createFromMetadataGenerator(metadataUpdater); var combined_creds = grpc.credentials.combineChannelCredentials( client_ssl_creds, creds); var client = new Client('localhost:' + port, combined_creds, client_options); client.unary({}, function(err, data) { assert(err); assert.strictEqual(err.message, 'Authentication error'); assert.strictEqual(err.code, grpc.status.UNAUTHENTICATED); done(); }); }); it('should successfully wrap a Google credential', function(done) { var creds = grpc.credentials.createFromGoogleCredential( fakeSuccessfulGoogleCredentials); var combined_creds = grpc.credentials.combineChannelCredentials( client_ssl_creds, creds); var client = new Client('localhost:' + port, combined_creds, client_options); var call = client.unary({}, function(err, data) { assert.ifError(err); }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('authorization'), ['success']); done(); }); }); it('Should not add metadata with just SSL credentials', function(done) { // Tests idempotency of credentials composition var metadataUpdater = function(service_url, callback) { var metadata = new grpc.Metadata(); metadata.set('plugin_key', 'plugin_value'); callback(null, metadata); }; var creds = grpc.credentials.createFromMetadataGenerator(metadataUpdater); grpc.credentials.combineChannelCredentials(client_ssl_creds, creds); var client = new Client('localhost:' + port, client_ssl_creds, client_options); var call = client.unary({}, function(err, data) { assert.ifError(err); }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), []); done(); }); }); it.skip('should get an error from a Google credential', function(done) { var creds = grpc.credentials.createFromGoogleCredential( fakeFailingGoogleCredentials); var combined_creds = grpc.credentials.combineChannelCredentials( client_ssl_creds, creds); var client = new Client('localhost:' + port, combined_creds, client_options); client.unary({}, function(err, data) { assert(err); assert.strictEqual(err.message, 'Authentication failure'); done(); }); }); describe('Per-rpc creds', function() { var client; var updater_creds; before(function() { client = new Client('localhost:' + port, client_ssl_creds, client_options); var metadataUpdater = function(service_url, callback) { var metadata = new grpc.Metadata(); metadata.set('plugin_key', 'plugin_value'); callback(null, metadata); }; updater_creds = grpc.credentials.createFromMetadataGenerator( metadataUpdater); }); it('Should update metadata on a unary call', function(done) { var call = client.unary({}, {credentials: updater_creds}, function(err, data) { assert.ifError(err); }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); done(); }); }); it('should update metadata on a client streaming call', function(done) { var call = client.clientStream({credentials: updater_creds}, function(err, data) { assert.ifError(err); }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); done(); }); call.end(); }); it('should update metadata on a server streaming call', function(done) { var call = client.serverStream({}, {credentials: updater_creds}); call.on('data', function() {}); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); done(); }); }); it('should update metadata on a bidi streaming call', function(done) { var call = client.bidiStream({credentials: updater_creds}); call.on('data', function() {}); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); done(); }); call.end(); }); it('should be able to use multiple plugin credentials', function(done) { var altMetadataUpdater = function(service_url, callback) { var metadata = new grpc.Metadata(); metadata.set('other_plugin_key', 'other_plugin_value'); callback(null, metadata); }; var alt_updater_creds = grpc.credentials.createFromMetadataGenerator( altMetadataUpdater); var combined_updater = grpc.credentials.combineCallCredentials( updater_creds, alt_updater_creds); var call = client.unary({}, {credentials: combined_updater}, function(err, data) { assert.ifError(err); }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); assert.deepEqual(metadata.get('other_plugin_key'), ['other_plugin_value']); done(); }); }); }); });
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=144)}([function(e,t,n){"use strict";function r(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e<r.length;e++)n[r[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}n.r(t),n.d(t,"BaseTransition",(function(){return Gn})),n.d(t,"Comment",(function(){return Gr})),n.d(t,"Fragment",(function(){return Wr})),n.d(t,"KeepAlive",(function(){return er})),n.d(t,"Static",(function(){return Kr})),n.d(t,"Suspense",(function(){return cn})),n.d(t,"Teleport",(function(){return Lr})),n.d(t,"Text",(function(){return Hr})),n.d(t,"Transition",(function(){return Ci})),n.d(t,"TransitionGroup",(function(){return $i})),n.d(t,"callWithAsyncErrorHandling",(function(){return Ot})),n.d(t,"callWithErrorHandling",(function(){return St})),n.d(t,"camelize",(function(){return D})),n.d(t,"capitalize",(function(){return H})),n.d(t,"cloneVNode",(function(){return so})),n.d(t,"compile",(function(){return xc})),n.d(t,"computed",(function(){return Go})),n.d(t,"createApp",(function(){return mc})),n.d(t,"createBlock",(function(){return eo})),n.d(t,"createCommentVNode",(function(){return fo})),n.d(t,"createHydrationRenderer",(function(){return Nr})),n.d(t,"createRenderer",(function(){return kr})),n.d(t,"createSSRApp",(function(){return yc})),n.d(t,"createSlots",(function(){return ni})),n.d(t,"createStaticVNode",(function(){return lo})),n.d(t,"createTextVNode",(function(){return ao})),n.d(t,"createVNode",(function(){return uo})),n.d(t,"customRef",(function(){return ht})),n.d(t,"defineAsyncComponent",(function(){return Or})),n.d(t,"defineComponent",(function(){return Sr})),n.d(t,"defineEmit",(function(){return qo})),n.d(t,"defineProps",(function(){return Ko})),n.d(t,"devtools",(function(){return Kt})),n.d(t,"getCurrentInstance",(function(){return Fo})),n.d(t,"getTransitionRawChildren",(function(){return Qn})),n.d(t,"h",(function(){return Yo})),n.d(t,"handleError",(function(){return Ct})),n.d(t,"hydrate",(function(){return gc})),n.d(t,"initCustomFormatter",(function(){return Zo})),n.d(t,"inject",(function(){return yo})),n.d(t,"isProxy",(function(){return et})),n.d(t,"isReactive",(function(){return Qe})),n.d(t,"isReadonly",(function(){return Ze})),n.d(t,"isRef",(function(){return ot})),n.d(t,"isVNode",(function(){return to})),n.d(t,"markRaw",(function(){return nt})),n.d(t,"mergeProps",(function(){return go})),n.d(t,"nextTick",(function(){return Bt})),n.d(t,"onActivated",(function(){return nr})),n.d(t,"onBeforeMount",(function(){return Nn})),n.d(t,"onBeforeUnmount",(function(){return Rn})),n.d(t,"onBeforeUpdate",(function(){return An})),n.d(t,"onDeactivated",(function(){return rr})),n.d(t,"onErrorCaptured",(function(){return Ln})),n.d(t,"onMounted",(function(){return Tn})),n.d(t,"onRenderTracked",(function(){return Mn})),n.d(t,"onRenderTriggered",(function(){return Pn})),n.d(t,"onUnmounted",(function(){return Fn})),n.d(t,"onUpdated",(function(){return In})),n.d(t,"openBlock",(function(){return Yr})),n.d(t,"popScopeId",(function(){return yn})),n.d(t,"provide",(function(){return mo})),n.d(t,"proxyRefs",(function(){return pt})),n.d(t,"pushScopeId",(function(){return mn})),n.d(t,"queuePostFlushCb",(function(){return Dt})),n.d(t,"reactive",(function(){return Ke})),n.d(t,"readonly",(function(){return Xe})),n.d(t,"ref",(function(){return it})),n.d(t,"registerRuntimeCompiler",(function(){return Vo})),n.d(t,"render",(function(){return vc})),n.d(t,"renderList",(function(){return ei})),n.d(t,"renderSlot",(function(){return dn})),n.d(t,"resolveComponent",(function(){return Br})),n.d(t,"resolveDirective",(function(){return Ur})),n.d(t,"resolveDynamicComponent",(function(){return $r})),n.d(t,"resolveTransitionHooks",(function(){return qn})),n.d(t,"setBlockTracking",(function(){return Zr})),n.d(t,"setDevtoolsHook",(function(){return qt})),n.d(t,"setTransitionHooks",(function(){return Jn})),n.d(t,"shallowReactive",(function(){return qe})),n.d(t,"shallowReadonly",(function(){return Ye})),n.d(t,"shallowRef",(function(){return ct})),n.d(t,"ssrContextKey",(function(){return Jo})),n.d(t,"ssrUtils",(function(){return oi})),n.d(t,"toDisplayString",(function(){return d})),n.d(t,"toHandlerKey",(function(){return G})),n.d(t,"toHandlers",(function(){return ti})),n.d(t,"toRaw",(function(){return tt})),n.d(t,"toRef",(function(){return mt})),n.d(t,"toRefs",(function(){return vt})),n.d(t,"transformVNodeArgs",(function(){return ro})),n.d(t,"triggerRef",(function(){return at})),n.d(t,"unref",(function(){return lt})),n.d(t,"useContext",(function(){return Xo})),n.d(t,"useCssModule",(function(){return Si})),n.d(t,"useCssVars",(function(){return Oi})),n.d(t,"useSSRContext",(function(){return Qo})),n.d(t,"useTransitionState",(function(){return Wn})),n.d(t,"vModelCheckbox",(function(){return qi})),n.d(t,"vModelDynamic",(function(){return tc})),n.d(t,"vModelRadio",(function(){return Yi})),n.d(t,"vModelSelect",(function(){return Ji})),n.d(t,"vModelText",(function(){return Ki})),n.d(t,"vShow",(function(){return sc})),n.d(t,"version",(function(){return ri})),n.d(t,"warn",(function(){return xt})),n.d(t,"watch",(function(){return $n})),n.d(t,"watchEffect",(function(){return Bn})),n.d(t,"withCtx",(function(){return hn})),n.d(t,"withDirectives",(function(){return dr})),n.d(t,"withKeys",(function(){return uc})),n.d(t,"withModifiers",(function(){return ic})),n.d(t,"withScopeId",(function(){return bn}));const o=r("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl"),i=r("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function c(e){if(E(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=c(A(r)?a(r):r);if(o)for(const e in o)t[e]=o[e]}return t}if(R(e))return e}const u=/;(?![^(]*\))/g,s=/:(.+)/;function a(e){const t={};return e.split(u).forEach(e=>{if(e){const n=e.split(s);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function l(e){let t="";if(A(e))t=e;else if(E(e))for(let n=0;n<e.length;n++)t+=l(e[n])+" ";else if(R(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function f(e,t){if(e===t)return!0;let n=N(e),r=N(t);if(n||r)return!(!n||!r)&&e.getTime()===t.getTime();if(n=E(e),r=E(t),n||r)return!(!n||!r)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=f(e[r],t[r]);return n}(e,t);if(n=R(e),r=R(t),n||r){if(!n||!r)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const r=e.hasOwnProperty(n),o=t.hasOwnProperty(n);if(r&&!o||!r&&o||!f(e[n],t[n]))return!1}}return String(e)===String(t)}function p(e,t){return e.findIndex(e=>f(e,t))}const d=e=>null==e?"":R(e)?JSON.stringify(e,h,2):String(e),h=(e,t)=>j(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n])=>(e[t+" =>"]=n,e),{})}:k(t)?{[`Set(${t.size})`]:[...t.values()]}:!R(t)||E(t)||L(t)?t:String(t),v={},g=[],m=()=>{},y=()=>!1,b=/^on[^a-z]/,x=e=>b.test(e),_=e=>e.startsWith("onUpdate:"),S=Object.assign,O=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},C=Object.prototype.hasOwnProperty,w=(e,t)=>C.call(e,t),E=Array.isArray,j=e=>"[object Map]"===M(e),k=e=>"[object Set]"===M(e),N=e=>e instanceof Date,T=e=>"function"==typeof e,A=e=>"string"==typeof e,I=e=>"symbol"==typeof e,R=e=>null!==e&&"object"==typeof e,F=e=>R(e)&&T(e.then)&&T(e.catch),P=Object.prototype.toString,M=e=>P.call(e),L=e=>"[object Object]"===M(e),B=e=>A(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,V=r(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},U=/-(\w)/g,D=$(e=>e.replace(U,(e,t)=>t?t.toUpperCase():"")),z=/\B([A-Z])/g,W=$(e=>e.replace(z,"-$1").toLowerCase()),H=$(e=>e.charAt(0).toUpperCase()+e.slice(1)),G=$(e=>e?"on"+H(e):""),K=(e,t)=>e!==t&&(e==e||t==t),q=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},X=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Y=e=>{const t=parseFloat(e);return isNaN(t)?e:t},J=new WeakMap,Q=[];let Z;const ee=Symbol(""),te=Symbol("");function ne(e,t=v){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const n=function(e,t){const n=function(){if(!n.active)return t.scheduler?void 0:e();if(!Q.includes(n)){ie(n);try{return ue.push(ce),ce=!0,Q.push(n),Z=n,e()}finally{Q.pop(),ae(),Z=Q[Q.length-1]}}};return n.id=oe++,n.allowRecurse=!!t.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||n(),n}function re(e){e.active&&(ie(e),e.options.onStop&&e.options.onStop(),e.active=!1)}let oe=0;function ie(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let ce=!0;const ue=[];function se(){ue.push(ce),ce=!1}function ae(){const e=ue.pop();ce=void 0===e||e}function le(e,t,n){if(!ce||void 0===Z)return;let r=J.get(e);r||J.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new Set),o.has(Z)||(o.add(Z),Z.deps.push(o))}function fe(e,t,n,r,o,i){const c=J.get(e);if(!c)return;const u=new Set,s=e=>{e&&e.forEach(e=>{(e!==Z||e.allowRecurse)&&u.add(e)})};if("clear"===t)c.forEach(s);else if("length"===n&&E(e))c.forEach((e,t)=>{("length"===t||t>=r)&&s(e)});else switch(void 0!==n&&s(c.get(n)),t){case"add":E(e)?B(n)&&s(c.get("length")):(s(c.get(ee)),j(e)&&s(c.get(te)));break;case"delete":E(e)||(s(c.get(ee)),j(e)&&s(c.get(te)));break;case"set":j(e)&&s(c.get(ee))}u.forEach(e=>{e.options.scheduler?e.options.scheduler(e):e()})}const pe=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(I)),de=ye(),he=ye(!1,!0),ve=ye(!0),ge=ye(!0,!0),me={};function ye(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_raw"===r&&o===(e?Ge:He).get(n))return n;const i=E(n);if(!e&&i&&w(me,r))return Reflect.get(me,r,o);const c=Reflect.get(n,r,o);return(I(r)?pe.has(r):"__proto__"===r||"__v_isRef"===r)?c:(e||le(n,0,r),t?c:ot(c)?i&&B(r)?c:c.value:R(c)?e?Xe(c):Ke(c):c)}}function be(e=!1){return function(t,n,r,o){const i=t[n];if(!e&&(r=tt(r),!E(t)&&ot(i)&&!ot(r)))return i.value=r,!0;const c=E(t)&&B(n)?Number(n)<t.length:w(t,n),u=Reflect.set(t,n,r,o);return t===tt(o)&&(c?K(r,i)&&fe(t,"set",n,r):fe(t,"add",n,r)),u}}["includes","indexOf","lastIndexOf"].forEach(e=>{const t=Array.prototype[e];me[e]=function(...e){const n=tt(this);for(let e=0,t=this.length;e<t;e++)le(n,0,e+"");const r=t.apply(n,e);return-1===r||!1===r?t.apply(n,e.map(tt)):r}}),["push","pop","shift","unshift","splice"].forEach(e=>{const t=Array.prototype[e];me[e]=function(...e){se();const n=t.apply(this,e);return ae(),n}});const xe={get:de,set:be(),deleteProperty:function(e,t){const n=w(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&fe(e,"delete",t,void 0),r},has:function(e,t){const n=Reflect.has(e,t);return I(t)&&pe.has(t)||le(e,0,t),n},ownKeys:function(e){return le(e,0,E(e)?"length":ee),Reflect.ownKeys(e)}},_e={get:ve,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},Se=S({},xe,{get:he,set:be(!0)}),Oe=S({},_e,{get:ge}),Ce=e=>R(e)?Ke(e):e,we=e=>R(e)?Xe(e):e,Ee=e=>e,je=e=>Reflect.getPrototypeOf(e);function ke(e,t,n=!1,r=!1){const o=tt(e=e.__v_raw),i=tt(t);t!==i&&!n&&le(o,0,t),!n&&le(o,0,i);const{has:c}=je(o),u=n?we:r?Ee:Ce;return c.call(o,t)?u(e.get(t)):c.call(o,i)?u(e.get(i)):void 0}function Ne(e,t=!1){const n=this.__v_raw,r=tt(n),o=tt(e);return e!==o&&!t&&le(r,0,e),!t&&le(r,0,o),e===o?n.has(e):n.has(e)||n.has(o)}function Te(e,t=!1){return e=e.__v_raw,!t&&le(tt(e),0,ee),Reflect.get(e,"size",e)}function Ae(e){e=tt(e);const t=tt(this),n=je(t).has.call(t,e);return t.add(e),n||fe(t,"add",e,e),this}function Ie(e,t){t=tt(t);const n=tt(this),{has:r,get:o}=je(n);let i=r.call(n,e);i||(e=tt(e),i=r.call(n,e));const c=o.call(n,e);return n.set(e,t),i?K(t,c)&&fe(n,"set",e,t):fe(n,"add",e,t),this}function Re(e){const t=tt(this),{has:n,get:r}=je(t);let o=n.call(t,e);o||(e=tt(e),o=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return o&&fe(t,"delete",e,void 0),i}function Fe(){const e=tt(this),t=0!==e.size,n=e.clear();return t&&fe(e,"clear",void 0,void 0),n}function Pe(e,t){return function(n,r){const o=this,i=o.__v_raw,c=tt(i),u=e?we:t?Ee:Ce;return!e&&le(c,0,ee),i.forEach((e,t)=>n.call(r,u(e),u(t),o))}}function Me(e,t,n){return function(...r){const o=this.__v_raw,i=tt(o),c=j(i),u="entries"===e||e===Symbol.iterator&&c,s="keys"===e&&c,a=o[e](...r),l=t?we:n?Ee:Ce;return!t&&le(i,0,s?te:ee),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:u?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function Le(e){return function(...t){return"delete"!==e&&this}}const Be={get(e){return ke(this,e)},get size(){return Te(this)},has:Ne,add:Ae,set:Ie,delete:Re,clear:Fe,forEach:Pe(!1,!1)},Ve={get(e){return ke(this,e,!1,!0)},get size(){return Te(this)},has:Ne,add:Ae,set:Ie,delete:Re,clear:Fe,forEach:Pe(!1,!0)},$e={get(e){return ke(this,e,!0)},get size(){return Te(this,!0)},has(e){return Ne.call(this,e,!0)},add:Le("add"),set:Le("set"),delete:Le("delete"),clear:Le("clear"),forEach:Pe(!0,!1)};function Ue(e,t){const n=t?Ve:e?$e:Be;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(w(n,r)&&r in t?n:t,r,o)}["keys","values","entries",Symbol.iterator].forEach(e=>{Be[e]=Me(e,!1,!1),$e[e]=Me(e,!0,!1),Ve[e]=Me(e,!1,!0)});const De={get:Ue(!1,!1)},ze={get:Ue(!1,!0)},We={get:Ue(!0,!1)},He=new WeakMap,Ge=new WeakMap;function Ke(e){return e&&e.__v_isReadonly?e:Je(e,!1,xe,De)}function qe(e){return Je(e,!1,Se,ze)}function Xe(e){return Je(e,!0,_e,We)}function Ye(e){return Je(e,!0,Oe,We)}function Je(e,t,n,r){if(!R(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=t?Ge:He,i=o.get(e);if(i)return i;const c=function(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>M(e).slice(8,-1))(e))}(e);if(0===c)return e;const u=new Proxy(e,2===c?r:n);return o.set(e,u),u}function Qe(e){return Ze(e)?Qe(e.__v_raw):!(!e||!e.__v_isReactive)}function Ze(e){return!(!e||!e.__v_isReadonly)}function et(e){return Qe(e)||Ze(e)}function tt(e){return e&&tt(e.__v_raw)||e}function nt(e){return X(e,"__v_skip",!0),e}const rt=e=>R(e)?Ke(e):e;function ot(e){return Boolean(e&&!0===e.__v_isRef)}function it(e){return st(e)}function ct(e){return st(e,!0)}class ut{constructor(e,t=!1){this._rawValue=e,this._shallow=t,this.__v_isRef=!0,this._value=t?e:rt(e)}get value(){return le(tt(this),0,"value"),this._value}set value(e){K(tt(e),this._rawValue)&&(this._rawValue=e,this._value=this._shallow?e:rt(e),fe(tt(this),"set","value",e))}}function st(e,t=!1){return ot(e)?e:new ut(e,t)}function at(e){fe(tt(e),"set","value",void 0)}function lt(e){return ot(e)?e.value:e}const ft={get:(e,t,n)=>lt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return ot(o)&&!ot(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function pt(e){return Qe(e)?e:new Proxy(e,ft)}class dt{constructor(e){this.__v_isRef=!0;const{get:t,set:n}=e(()=>le(this,0,"value"),()=>fe(this,"set","value"));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function ht(e){return new dt(e)}function vt(e){const t=E(e)?new Array(e.length):{};for(const n in e)t[n]=mt(e,n);return t}class gt{constructor(e,t){this._object=e,this._key=t,this.__v_isRef=!0}get value(){return this._object[this._key]}set value(e){this._object[this._key]=e}}function mt(e,t){return ot(e[t])?e[t]:new gt(e,t)}class yt{constructor(e,t,n){this._setter=t,this._dirty=!0,this.__v_isRef=!0,this.effect=ne(e,{lazy:!0,scheduler:()=>{this._dirty||(this._dirty=!0,fe(tt(this),"set","value"))}}),this.__v_isReadonly=n}get value(){return this._dirty&&(this._value=this.effect(),this._dirty=!1),le(tt(this),0,"value"),this._value}set value(e){this._setter(e)}}const bt=[];function xt(e,...t){se();const n=bt.length?bt[bt.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=function(){let e=bt[bt.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}();if(r)St(r,n,11,[e+t.join(""),n&&n.proxy,o.map(({vnode:e})=>`at <${Ho(n,e.type)}>`).join("\n"),o]);else{const n=["[Vue warn]: "+e,...t];o.length&&n.push("\n",...function(e){const t=[];return e.forEach((e,n)=>{t.push(...0===n?[]:["\n"],...function({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=" at <"+Ho(e.component,e.type,!!e.component&&null==e.component.parent),o=">"+n;return e.props?[r,..._t(e.props),o]:[r+o]}(e))}),t}(o)),console.warn(...n)}ae()}function _t(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(n=>{t.push(...function e(t,n,r){return A(n)?(n=JSON.stringify(n),r?n:[`${t}=${n}`]):"number"==typeof n||"boolean"==typeof n||null==n?r?n:[`${t}=${n}`]:ot(n)?(n=e(t,tt(n.value),!0),r?n:[t+"=Ref<",n,">"]):T(n)?[`${t}=fn${n.name?`<${n.name}>`:""}`]:(n=tt(n),r?n:[t+"=",n])}(n,e[n]))}),n.length>3&&t.push(" ..."),t}function St(e,t,n,r){let o;try{o=r?e(...r):e()}catch(e){Ct(e,t,n)}return o}function Ot(e,t,n,r){if(T(e)){const o=St(e,t,n,r);return o&&F(o)&&o.catch(e=>{Ct(e,t,n)}),o}const o=[];for(let i=0;i<e.length;i++)o.push(Ot(e[i],t,n,r));return o}function Ct(e,t,n,r=!0){if(t){let r=t.parent;const o=t.proxy,i=n;for(;r;){const t=r.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,o,i))return;r=r.parent}const c=t.appContext.config.errorHandler;if(c)return void St(c,null,10,[e,o,i])}!function(e,t,n,r=!0){console.error(e)}(e,0,0,r)}let wt=!1,Et=!1;const jt=[];let kt=0;const Nt=[];let Tt=null,At=0;const It=[];let Rt=null,Ft=0;const Pt=Promise.resolve();let Mt=null,Lt=null;function Bt(e){const t=Mt||Pt;return e?t.then(this?e.bind(this):e):t}function Vt(e){jt.length&&jt.includes(e,wt&&e.allowRecurse?kt+1:kt)||e===Lt||(jt.push(e),$t())}function $t(){wt||Et||(Et=!0,Mt=Pt.then(Gt))}function Ut(e,t,n,r){E(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?r+1:r)||n.push(e),$t()}function Dt(e){Ut(e,Rt,It,Ft)}function zt(e,t=null){if(Nt.length){for(Lt=t,Tt=[...new Set(Nt)],Nt.length=0,At=0;At<Tt.length;At++)Tt[At]();Tt=null,At=0,Lt=null,zt(e,t)}}function Wt(e){if(It.length){const e=[...new Set(It)];if(It.length=0,Rt)return void Rt.push(...e);for(Rt=e,Rt.sort((e,t)=>Ht(e)-Ht(t)),Ft=0;Ft<Rt.length;Ft++)Rt[Ft]();Rt=null,Ft=0}}const Ht=e=>null==e.id?1/0:e.id;function Gt(e){Et=!1,wt=!0,zt(e),jt.sort((e,t)=>Ht(e)-Ht(t));try{for(kt=0;kt<jt.length;kt++){const e=jt[kt];e&&St(e,null,14)}}finally{kt=0,jt.length=0,Wt(),wt=!1,Mt=null,(jt.length||It.length)&&Gt(e)}}let Kt;function qt(e){Kt=e}function Xt(e,t,...n){const r=e.vnode.props||v;let o=n;const i=t.startsWith("update:"),c=i&&t.slice(7);if(c&&c in r){const e=("modelValue"===c?"model":c)+"Modifiers",{number:t,trim:i}=r[e]||v;i?o=n.map(e=>e.trim()):t&&(o=n.map(Y))}let u=G(D(t)),s=r[u];!s&&i&&(u=G(W(t)),s=r[u]),s&&Ot(s,e,6,o);const a=r[u+"Once"];if(a){if(e.emitted){if(e.emitted[u])return}else(e.emitted={})[u]=!0;Ot(a,e,6,o)}}function Yt(e,t,n=!1){if(!t.deopt&&void 0!==e.__emits)return e.__emits;const r=e.emits;let o={},i=!1;if(!T(e)){const r=e=>{i=!0,S(o,Yt(e,t,!0))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return r||i?(E(r)?r.forEach(e=>o[e]=null):S(o,r),e.__emits=o):e.__emits=null}function Jt(e,t){return!(!e||!x(t))&&(t=t.slice(2).replace(/Once$/,""),w(e,t[0].toLowerCase()+t.slice(1))||w(e,W(t))||w(e,t))}let Qt=null;function Zt(e){Qt=e}function en(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:i,propsOptions:[c],slots:u,attrs:s,emit:a,render:l,renderCache:f,data:p,setupState:d,ctx:h}=e;let v;Qt=e;try{let e;if(4&n.shapeFlag){const t=o||r;v=po(l.call(t,t,f,i,d,p,h)),e=s}else{v=po(t(i,t.length>1?{attrs:s,slots:u,emit:a}:null)),e=t.props?s:tn(s)}let g=v;if(!1!==t.inheritAttrs&&e){const t=Object.keys(e),{shapeFlag:n}=g;t.length&&(1&n||6&n)&&(c&&t.some(_)&&(e=nn(e,c)),g=so(g,e))}n.dirs&&(g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&(g.transition=n.transition),v=g}catch(t){Ct(t,e,1),v=uo(Gr)}return Qt=null,v}const tn=e=>{let t;for(const n in e)("class"===n||"style"===n||x(n))&&((t||(t={}))[n]=e[n]);return t},nn=(e,t)=>{const n={};for(const r in e)_(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function rn(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const i=r[o];if(t[i]!==e[i]&&!Jt(n,i))return!0}return!1}function on({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const cn={__isSuspense:!0,process(e,t,n,r,o,i,c,u,s){null==e?function(e,t,n,r,o,i,c,u){const{p:s,o:{createElement:a}}=u,l=a("div"),f=e.suspense=un(e,o,r,t,l,n,i,c,u);s(null,f.pendingBranch=e.ssContent,l,null,r,f,i),f.deps>0?(s(null,e.ssFallback,t,n,r,null,i),ln(f,e.ssFallback)):f.resolve()}(t,n,r,o,i,c,u,s):function(e,t,n,r,o,i,{p:c,um:u,o:{createElement:s}}){const a=t.suspense=e.suspense;a.vnode=t,t.el=e.el;const l=t.ssContent,f=t.ssFallback,{activeBranch:p,pendingBranch:d,isInFallback:h,isHydrating:v}=a;if(d)a.pendingBranch=l,no(l,d)?(c(d,l,a.hiddenContainer,null,o,a,i),a.deps<=0?a.resolve():h&&(c(p,f,n,r,o,null,i),ln(a,f))):(a.pendingId++,v?(a.isHydrating=!1,a.activeBranch=d):u(d,o,a),a.deps=0,a.effects.length=0,a.hiddenContainer=s("div"),h?(c(null,l,a.hiddenContainer,null,o,a,i),a.deps<=0?a.resolve():(c(p,f,n,r,o,null,i),ln(a,f))):p&&no(l,p)?(c(p,l,n,r,o,a,i),a.resolve(!0)):(c(null,l,a.hiddenContainer,null,o,a,i),a.deps<=0&&a.resolve()));else if(p&&no(l,p))c(p,l,n,r,o,a,i),ln(a,l);else{const e=t.props&&t.props.onPending;if(T(e)&&e(),a.pendingBranch=l,a.pendingId++,c(null,l,a.hiddenContainer,null,o,a,i),a.deps<=0)a.resolve();else{const{timeout:e,pendingId:t}=a;e>0?setTimeout(()=>{a.pendingId===t&&a.fallback(f)},e):0===e&&a.fallback(f)}}}(e,t,n,r,o,c,s)},hydrate:function(e,t,n,r,o,i,c,u){const s=t.suspense=un(t,r,n,e.parentNode,document.createElement("div"),null,o,i,c,!0),a=u(e,s.pendingBranch=t.ssContent,n,s,i);return 0===s.deps&&s.resolve(),a},create:un};function un(e,t,n,r,o,i,c,u,s,a=!1){const{p:l,m:f,um:p,n:d,o:{parentNode:h,remove:v}}=s,g=Y(e.props&&e.props.timeout),m={vnode:e,parent:t,parentComponent:n,isSVG:c,container:r,hiddenContainer:o,anchor:i,deps:0,pendingId:0,timeout:"number"==typeof g?g:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:a,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:r,pendingId:o,effects:i,parentComponent:c,container:u}=m;if(m.isHydrating)m.isHydrating=!1;else if(!e){const e=n&&r.transition&&"out-in"===r.transition.mode;e&&(n.transition.afterLeave=()=>{o===m.pendingId&&f(r,u,t,0)});let{anchor:t}=m;n&&(t=d(n),p(n,c,m,!0)),e||f(r,u,t,0)}ln(m,r),m.pendingBranch=null,m.isInFallback=!1;let s=m.parent,a=!1;for(;s;){if(s.pendingBranch){s.effects.push(...i),a=!0;break}s=s.parent}a||Dt(i),m.effects=[];const l=t.props&&t.props.onResolve;T(l)&&l()},fallback(e){if(!m.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:r,container:o,isSVG:i}=m,c=t.props&&t.props.onFallback;T(c)&&c();const u=d(n),s=()=>{m.isInFallback&&(l(null,e,o,u,r,null,i),ln(m,e))},a=e.transition&&"out-in"===e.transition.mode;a&&(n.transition.afterLeave=s),p(n,r,null,!0),m.isInFallback=!0,a||s()},move(e,t,n){m.activeBranch&&f(m.activeBranch,e,t,n),m.container=e},next:()=>m.activeBranch&&d(m.activeBranch),registerDep(e,t){const n=!!m.pendingBranch;n&&m.deps++;const r=e.vnode.el;e.asyncDep.catch(t=>{Ct(t,e,0)}).then(o=>{if(e.isUnmounted||m.isUnmounted||m.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:i}=e;Bo(e,o),r&&(i.el=r);const s=!r&&e.subTree.el;t(e,i,h(r||e.subTree.el),r?null:d(e.subTree),m,c,u),s&&v(s),on(e,i.el),n&&0==--m.deps&&m.resolve()})},unmount(e,t){m.isUnmounted=!0,m.activeBranch&&p(m.activeBranch,n,e,t),m.pendingBranch&&p(m.pendingBranch,n,e,t)}};return m}function sn(e){return T(e)&&(e=e()),E(e)&&(e=function(e){let t;for(let n=0;n<e.length;n++){const r=e[n];if(!to(r))return;if(r.type!==Gr||"v-if"===r.children){if(t)return;t=r}}return t}(e)),po(e)}function an(e,t){t&&t.pendingBranch?E(e)?t.effects.push(...e):t.effects.push(e):Dt(e)}function ln(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,o=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=o,on(r,o))}let fn=0;const pn=e=>fn+=e;function dn(e,t,n={},r){let o=e[t];fn++,Yr();const i=o&&function e(t){return t.some(t=>!to(t)||t.type!==Gr&&!(t.type===Wr&&!e(t.children)))?t:null}(o(n)),c=eo(Wr,{key:n.key||"_"+t},i||(r?r():[]),i&&1===e._?64:-2);return fn--,c}function hn(e,t=Qt){if(!t)return e;const n=(...n)=>{fn||Yr(!0);const r=Qt;Zt(t);const o=e(...n);return Zt(r),fn||Jr(),o};return n._c=!0,n}let vn=null;const gn=[];function mn(e){gn.push(vn=e)}function yn(){gn.pop(),vn=gn[gn.length-1]||null}function bn(e){return t=>hn((function(){mn(e);const n=t.apply(this,arguments);return yn(),n}))}function xn(e,t,n,r){const[o,i]=e.propsOptions;if(t)for(const i in t){const c=t[i];if(V(i))continue;let u;o&&w(o,u=D(i))?n[u]=c:Jt(e.emitsOptions,i)||(r[i]=c)}if(i){const t=tt(n);for(let r=0;r<i.length;r++){const c=i[r];n[c]=_n(o,t,c,t[c],e)}}}function _n(e,t,n,r,o){const i=e[n];if(null!=i){const e=w(i,"default");if(e&&void 0===r){const e=i.default;i.type!==Function&&T(e)?(Po(o),r=e(t),Po(null)):r=e}i[0]&&(w(t,n)||e?!i[1]||""!==r&&r!==W(n)||(r=!0):r=!1)}return r}function Sn(e,t,n=!1){if(!t.deopt&&e.__props)return e.__props;const r=e.props,o={},i=[];let c=!1;if(!T(e)){const r=e=>{c=!0;const[n,r]=Sn(e,t,!0);S(o,n),r&&i.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!r&&!c)return e.__props=g;if(E(r))for(let e=0;e<r.length;e++){const t=D(r[e]);On(t)&&(o[t]=v)}else if(r)for(const e in r){const t=D(e);if(On(t)){const n=r[e],c=o[t]=E(n)||T(n)?{type:n}:n;if(c){const e=En(Boolean,c.type),n=En(String,c.type);c[0]=e>-1,c[1]=n<0||e<n,(e>-1||w(c,"default"))&&i.push(t)}}}return e.__props=[o,i]}function On(e){return"$"!==e[0]}function Cn(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function wn(e,t){return Cn(e)===Cn(t)}function En(e,t){if(E(t)){for(let n=0,r=t.length;n<r;n++)if(wn(t[n],e))return n}else if(T(t))return wn(t,e)?0:-1;return-1}function jn(e,t,n=Ro,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;se(),Po(n);const o=Ot(t,n,e,r);return Po(null),ae(),o});return r?o.unshift(i):o.push(i),i}}const kn=e=>(t,n=Ro)=>!Lo&&jn(e,t,n),Nn=kn("bm"),Tn=kn("m"),An=kn("bu"),In=kn("u"),Rn=kn("bum"),Fn=kn("um"),Pn=kn("rtg"),Mn=kn("rtc"),Ln=(e,t=Ro)=>{jn("ec",e,t)};function Bn(e,t){return Un(e,null,t)}const Vn={};function $n(e,t,n){return Un(e,t,n)}function Un(e,t,{immediate:n,deep:r,flush:o,onTrack:i,onTrigger:c}=v,u=Ro){let s,a,l=!1;if(ot(e)?(s=()=>e.value,l=!!e._shallow):Qe(e)?(s=()=>e,r=!0):s=E(e)?()=>e.map(e=>ot(e)?e.value:Qe(e)?zn(e):T(e)?St(e,u,2):void 0):T(e)?t?()=>St(e,u,2):()=>{if(!u||!u.isUnmounted)return a&&a(),St(e,u,3,[f])}:m,t&&r){const e=s;s=()=>zn(e())}const f=e=>{a=g.options.onStop=()=>{St(e,u,4)}};let p=E(e)?[]:Vn;const d=()=>{if(g.active)if(t){const e=g();(r||l||K(e,p))&&(a&&a(),Ot(t,u,3,[e,p===Vn?void 0:p,f]),p=e)}else g()};let h;d.allowRecurse=!!t,h="sync"===o?d:"post"===o?()=>Er(d,u&&u.suspense):()=>{!u||u.isMounted?function(e){Ut(e,Tt,Nt,At)}(d):d()};const g=ne(s,{lazy:!0,onTrack:i,onTrigger:c,scheduler:h});return Do(g,u),t?n?d():p=g():"post"===o?Er(g,u&&u.suspense):g(),()=>{re(g),u&&O(u.effects,g)}}function Dn(e,t,n){const r=this.proxy;return Un(A(e)?()=>r[e]:e.bind(r),t.bind(r),n,this)}function zn(e,t=new Set){if(!R(e)||t.has(e))return e;if(t.add(e),ot(e))zn(e.value,t);else if(E(e))for(let n=0;n<e.length;n++)zn(e[n],t);else if(k(e)||j(e))e.forEach(e=>{zn(e,t)});else for(const n in e)zn(e[n],t);return e}function Wn(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Tn(()=>{e.isMounted=!0}),Rn(()=>{e.isUnmounting=!0}),e}const Hn=[Function,Array],Gn={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Hn,onEnter:Hn,onAfterEnter:Hn,onEnterCancelled:Hn,onBeforeLeave:Hn,onLeave:Hn,onAfterLeave:Hn,onLeaveCancelled:Hn,onBeforeAppear:Hn,onAppear:Hn,onAfterAppear:Hn,onAppearCancelled:Hn},setup(e,{slots:t}){const n=Fo(),r=Wn();let o;return()=>{const i=t.default&&Qn(t.default(),!0);if(!i||!i.length)return;const c=tt(e),{mode:u}=c,s=i[0];if(r.isLeaving)return Xn(s);const a=Yn(s);if(!a)return Xn(s);const l=qn(a,c,r,n);Jn(a,l);const f=n.subTree,p=f&&Yn(f);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===o?o=e:e!==o&&(o=e,d=!0)}if(p&&p.type!==Gr&&(!no(a,p)||d)){const e=qn(p,c,r,n);if(Jn(p,e),"out-in"===u)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.update()},Xn(s);"in-out"===u&&(e.delayLeave=(e,t,n)=>{Kn(r,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete l.delayedLeave},l.delayedLeave=n})}return s}}};function Kn(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function qn(e,t,n,r){const{appear:o,mode:i,persisted:c=!1,onBeforeEnter:u,onEnter:s,onAfterEnter:a,onEnterCancelled:l,onBeforeLeave:f,onLeave:p,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:v,onAppear:g,onAfterAppear:m,onAppearCancelled:y}=t,b=String(e.key),x=Kn(n,e),_=(e,t)=>{e&&Ot(e,r,9,t)},S={mode:i,persisted:c,beforeEnter(t){let r=u;if(!n.isMounted){if(!o)return;r=v||u}t._leaveCb&&t._leaveCb(!0);const i=x[b];i&&no(e,i)&&i.el._leaveCb&&i.el._leaveCb(),_(r,[t])},enter(e){let t=s,r=a,i=l;if(!n.isMounted){if(!o)return;t=g||s,r=m||a,i=y||l}let c=!1;const u=e._enterCb=t=>{c||(c=!0,_(t?i:r,[e]),S.delayedLeave&&S.delayedLeave(),e._enterCb=void 0)};t?(t(e,u),t.length<=1&&u()):u()},leave(t,r){const o=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return r();_(f,[t]);let i=!1;const c=t._leaveCb=n=>{i||(i=!0,r(),_(n?h:d,[t]),t._leaveCb=void 0,x[o]===e&&delete x[o])};x[o]=e,p?(p(t,c),p.length<=1&&c()):c()},clone:e=>qn(e,t,n,r)};return S}function Xn(e){if(Zn(e))return(e=so(e)).children=null,e}function Yn(e){return Zn(e)?e.children?e.children[0]:void 0:e}function Jn(e,t){6&e.shapeFlag&&e.component?Jn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Qn(e,t=!1){let n=[],r=0;for(let o=0;o<e.length;o++){const i=e[o];i.type===Wr?(128&i.patchFlag&&r++,n=n.concat(Qn(i.children,t))):(t||i.type!==Gr)&&n.push(i)}if(r>1)for(let e=0;e<n.length;e++)n[e].patchFlag=-2;return n}const Zn=e=>e.type.__isKeepAlive,er={name:"KeepAlive",__isKeepAlive:!0,inheritRef:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=new Map,r=new Set;let o=null;const i=Fo(),c=i.suspense,u=i.ctx,{renderer:{p:s,m:a,um:l,o:{createElement:f}}}=u,p=f("div");function d(e){cr(e),l(e,i,c)}function h(e){n.forEach((t,n)=>{const r=Wo(t.type);!r||e&&e(r)||v(n)})}function v(e){const t=n.get(e);o&&t.type===o.type?o&&cr(o):d(t),n.delete(e),r.delete(e)}u.activate=(e,t,n,r,o)=>{const i=e.component;a(e,t,n,0,c),s(i.vnode,e,t,n,i,c,r,o),Er(()=>{i.isDeactivated=!1,i.a&&q(i.a);const t=e.props&&e.props.onVnodeMounted;t&&Ar(t,i.parent,e)},c)},u.deactivate=e=>{const t=e.component;a(e,p,null,1,c),Er(()=>{t.da&&q(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Ar(n,t.parent,e),t.isDeactivated=!0},c)},$n(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>tr(e,t)),t&&h(e=>!tr(t,e))},{flush:"post",deep:!0});let g=null;const m=()=>{null!=g&&n.set(g,ur(i.subTree))};return Tn(m),In(m),Rn(()=>{n.forEach(e=>{const{subTree:t,suspense:n}=i,r=ur(t);if(e.type!==r.type)d(e);else{cr(r);const e=r.component.da;e&&Er(e,n)}})}),()=>{if(g=null,!t.default)return null;const i=t.default(),c=i[0];if(i.length>1)return o=null,i;if(!to(c)||!(4&c.shapeFlag||128&c.shapeFlag))return o=null,c;let u=ur(c);const s=u.type,a=Wo(s),{include:l,exclude:f,max:p}=e;if(l&&(!a||!tr(l,a))||f&&a&&tr(f,a))return o=u,c;const d=null==u.key?s:u.key,h=n.get(d);return u.el&&(u=so(u),128&c.shapeFlag&&(c.ssContent=u)),g=d,h?(u.el=h.el,u.component=h.component,u.transition&&Jn(u,u.transition),u.shapeFlag|=512,r.delete(d),r.add(d)):(r.add(d),p&&r.size>parseInt(p,10)&&v(r.values().next().value)),u.shapeFlag|=256,o=u,c}}};function tr(e,t){return E(e)?e.some(e=>tr(e,t)):A(e)?e.split(",").indexOf(t)>-1:!!e.test&&e.test(t)}function nr(e,t){or(e,"a",t)}function rr(e,t){or(e,"da",t)}function or(e,t,n=Ro){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}e()});if(jn(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Zn(e.parent.vnode)&&ir(r,t,n,e),e=e.parent}}function ir(e,t,n,r){const o=jn(t,e,r,!0);Fn(()=>{O(r[t],o)},n)}function cr(e){let t=e.shapeFlag;256&t&&(t-=256),512&t&&(t-=512),e.shapeFlag=t}function ur(e){return 128&e.shapeFlag?e.ssContent:e}const sr=e=>"_"===e[0]||"$stable"===e,ar=e=>E(e)?e.map(po):[po(e)],lr=(e,t,n)=>hn(e=>ar(t(e)),n),fr=(e,t)=>{const n=e._ctx;for(const r in e){if(sr(r))continue;const o=e[r];if(T(o))t[r]=lr(0,o,n);else if(null!=o){const e=ar(o);t[r]=()=>e}}},pr=(e,t)=>{const n=ar(t);e.slots.default=()=>n};function dr(e,t){if(null===Qt)return e;const n=Qt.proxy,r=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[o,i,c,u=v]=t[e];T(o)&&(o={mounted:o,updated:o}),r.push({dir:o,instance:n,value:i,oldValue:void 0,arg:c,modifiers:u})}return e}function hr(e,t,n,r){const o=e.dirs,i=t&&t.dirs;for(let c=0;c<o.length;c++){const u=o[c];i&&(u.oldValue=i[c].value);const s=u.dir[r];s&&Ot(s,n,8,[e.el,u,e,t])}}function vr(){return{app:null,config:{isNativeTag:y,performance:!1,globalProperties:{},optionMergeStrategies:{},isCustomElement:y,errorHandler:void 0,warnHandler:void 0},mixins:[],components:{},directives:{},provides:Object.create(null)}}let gr=0;function mr(e,t){return function(n,r=null){null==r||R(r)||(r=null);const o=vr(),i=new Set;let c=!1;const u=o.app={_uid:gr++,_component:n,_props:r,_container:null,_context:o,version:ri,get config(){return o.config},set config(e){},use:(e,...t)=>(i.has(e)||(e&&T(e.install)?(i.add(e),e.install(u,...t)):T(e)&&(i.add(e),e(u,...t))),u),mixin:e=>(o.mixins.includes(e)||(o.mixins.push(e),(e.props||e.emits)&&(o.deopt=!0)),u),component:(e,t)=>t?(o.components[e]=t,u):o.components[e],directive:(e,t)=>t?(o.directives[e]=t,u):o.directives[e],mount(i,s){if(!c){const a=uo(n,r);return a.appContext=o,s&&t?t(a,i):e(a,i),c=!0,u._container=i,i.__vue_app__=u,a.component.proxy}},unmount(){c&&e(null,u._container)},provide:(e,t)=>(o.provides[e]=t,u)};return u}}let yr=!1;const br=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,xr=e=>8===e.nodeType;function _r(e){const{mt:t,p:n,o:{patchProp:r,nextSibling:o,parentNode:i,remove:c,insert:u,createComment:s}}=e,a=(n,r,c,u,s=!1)=>{const v=xr(n)&&"["===n.data,g=()=>d(n,r,c,u,v),{type:m,ref:y,shapeFlag:b}=r,x=n.nodeType;r.el=n;let _=null;switch(m){case Hr:3!==x?_=g():(n.data!==r.children&&(yr=!0,n.data=r.children),_=o(n));break;case Gr:_=8!==x||v?g():o(n);break;case Kr:if(1===x){_=n;const e=!r.children.length;for(let t=0;t<r.staticCount;t++)e&&(r.children+=_.outerHTML),t===r.staticCount-1&&(r.anchor=_),_=o(_);return _}_=g();break;case Wr:_=v?p(n,r,c,u,s):g();break;default:if(1&b)_=1!==x||r.type!==n.tagName.toLowerCase()?g():l(n,r,c,u,s);else if(6&b){const e=i(n),a=()=>{t(r,e,null,c,u,br(e),s)},l=r.type.__asyncLoader;l?l().then(a):a(),_=v?h(n):o(n)}else 64&b?_=8!==x?g():r.type.hydrate(n,r,c,u,s,e,f):128&b&&(_=r.type.hydrate(n,r,c,u,br(i(n)),s,e,a))}return null!=y&&jr(y,null,u,r),_},l=(e,t,n,o,i)=>{i=i||!!t.dynamicChildren;const{props:u,patchFlag:s,shapeFlag:a,dirs:l}=t;if(-1!==s){if(l&&hr(t,null,n,"created"),u)if(!i||16&s||32&s)for(const t in u)!V(t)&&x(t)&&r(e,t,null,u[t]);else u.onClick&&r(e,"onClick",null,u.onClick);let p;if((p=u&&u.onVnodeBeforeMount)&&Ar(p,n,t),l&&hr(t,null,n,"beforeMount"),((p=u&&u.onVnodeMounted)||l)&&an(()=>{p&&Ar(p,n,t),l&&hr(t,null,n,"mounted")},o),16&a&&(!u||!u.innerHTML&&!u.textContent)){let r=f(e.firstChild,t,e,n,o,i);for(;r;){yr=!0;const e=r;r=r.nextSibling,c(e)}}else 8&a&&e.textContent!==t.children&&(yr=!0,e.textContent=t.children)}return e.nextSibling},f=(e,t,r,o,i,c)=>{c=c||!!t.dynamicChildren;const u=t.children,s=u.length;for(let t=0;t<s;t++){const s=c?u[t]:u[t]=po(u[t]);e?e=a(e,s,o,i,c):(yr=!0,n(null,s,r,null,o,i,br(r)))}return e},p=(e,t,n,r,c)=>{const a=i(e),l=f(o(e),t,a,n,r,c);return l&&xr(l)&&"]"===l.data?o(t.anchor=l):(yr=!0,u(t.anchor=s("]"),a,l),l)},d=(e,t,r,u,s)=>{if(yr=!0,t.el=null,s){const t=h(e);for(;;){const n=o(e);if(!n||n===t)break;c(n)}}const a=o(e),l=i(e);return c(e),n(null,t,l,a,r,u,br(l)),a},h=e=>{let t=0;for(;e;)if((e=o(e))&&xr(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return o(e);t--}return e};return[(e,t)=>{yr=!1,a(t.firstChild,e,null,null),Wt(),yr&&console.error("Hydration completed but contains mismatches.")},a]}function Sr(e){return T(e)?{setup:e,name:e.name}:e}function Or(e){T(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,timeout:i,suspensible:c=!0,onError:u}=e;let s,a=null,l=0;const f=()=>{let e;return a||(e=a=t().catch(e=>{if(e=e instanceof Error?e:new Error(String(e)),u)return new Promise((t,n)=>{u(e,()=>t((l++,a=null,f())),()=>n(e),l+1)});throw e}).then(t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),s=t,t)))};return Sr({__asyncLoader:f,name:"AsyncComponentWrapper",setup(){const e=Ro;if(s)return()=>Cr(s,e);const t=t=>{a=null,Ct(t,e,13,!r)};if(c&&e.suspense)return f().then(t=>()=>Cr(t,e)).catch(e=>(t(e),()=>r?uo(r,{error:e}):null));const u=it(!1),l=it(),p=it(!!o);return o&&setTimeout(()=>{p.value=!1},o),null!=i&&setTimeout(()=>{if(!u.value&&!l.value){const e=new Error(`Async component timed out after ${i}ms.`);t(e),l.value=e}},i),f().then(()=>{u.value=!0}).catch(e=>{t(e),l.value=e}),()=>u.value&&s?Cr(s,e):l.value&&r?uo(r,{error:l.value}):n&&!p.value?uo(n):void 0}})}function Cr(e,{vnode:{ref:t,props:n,children:r}}){const o=uo(e,n,r);return o.ref=t,o}const wr={scheduler:Vt,allowRecurse:!0},Er=an,jr=(e,t,n,r)=>{if(E(e))return void e.forEach((e,o)=>jr(e,t&&(E(t)?t[o]:t),n,r));let o;o=!r||r.type.__asyncLoader?null:4&r.shapeFlag?r.component.exposed||r.component.proxy:r.el;const{i:i,r:c}=e,u=t&&t.r,s=i.refs===v?i.refs={}:i.refs,a=i.setupState;if(null!=u&&u!==c&&(A(u)?(s[u]=null,w(a,u)&&(a[u]=null)):ot(u)&&(u.value=null)),A(c)){const e=()=>{s[c]=o,w(a,c)&&(a[c]=o)};o?(e.id=-1,Er(e,n)):e()}else if(ot(c)){const e=()=>{c.value=o};o?(e.id=-1,Er(e,n)):e()}else T(c)&&St(c,i,12,[o,s])};function kr(e){return Tr(e)}function Nr(e){return Tr(e,_r)}function Tr(e,t){const{insert:n,remove:r,patchProp:o,forcePatchProp:i,createElement:c,createText:u,createComment:s,setText:a,setElementText:l,parentNode:f,nextSibling:p,setScopeId:d=m,cloneNode:h,insertStaticContent:y}=e,b=(e,t,n,r=null,o=null,i=null,c=!1,u=!1)=>{e&&!no(e,t)&&(r=Z(e),G(e,o,i,!0),e=null),-2===t.patchFlag&&(u=!1,t.dynamicChildren=null);const{type:s,ref:a,shapeFlag:l}=t;switch(s){case Hr:x(e,t,n,r);break;case Gr:_(e,t,n,r);break;case Kr:null==e&&O(t,n,r,c);break;case Wr:I(e,t,n,r,o,i,c,u);break;default:1&l?C(e,t,n,r,o,i,c,u):6&l?R(e,t,n,r,o,i,c,u):(64&l||128&l)&&s.process(e,t,n,r,o,i,c,u,te)}null!=a&&o&&jr(a,e&&e.ref,i,t)},x=(e,t,r,o)=>{if(null==e)n(t.el=u(t.children),r,o);else{const n=t.el=e.el;t.children!==e.children&&a(n,t.children)}},_=(e,t,r,o)=>{null==e?n(t.el=s(t.children||""),r,o):t.el=e.el},O=(e,t,n,r)=>{[e.el,e.anchor]=y(e.children,t,n,r)},C=(e,t,n,r,o,i,c,u)=>{c=c||"svg"===t.type,null==e?E(t,n,r,o,i,c,u):N(e,t,o,i,c,u)},E=(e,t,r,i,u,s,a)=>{let f,p;const{type:d,props:v,shapeFlag:g,transition:m,scopeId:y,patchFlag:b,dirs:x}=e;if(e.el&&void 0!==h&&-1===b)f=e.el=h(e.el);else{if(f=e.el=c(e.type,s,v&&v.is),8&g?l(f,e.children):16&g&&k(e.children,f,null,i,u,s&&"foreignObject"!==d,a||!!e.dynamicChildren),x&&hr(e,null,i,"created"),v){for(const t in v)V(t)||o(f,t,null,v[t],s,e.children,i,u,Q);(p=v.onVnodeBeforeMount)&&Ar(p,i,e)}j(f,y,e,i)}x&&hr(e,null,i,"beforeMount");const _=(!u||u&&!u.pendingBranch)&&m&&!m.persisted;_&&m.beforeEnter(f),n(f,t,r),((p=v&&v.onVnodeMounted)||_||x)&&Er(()=>{p&&Ar(p,i,e),_&&m.enter(f),x&&hr(e,null,i,"mounted")},u)},j=(e,t,n,r)=>{if(t&&d(e,t),r){const o=r.type.__scopeId;o&&o!==t&&d(e,o+"-s"),n===r.subTree&&j(e,r.vnode.scopeId,r.vnode,r.parent)}},k=(e,t,n,r,o,i,c,u=0)=>{for(let s=u;s<e.length;s++){const u=e[s]=c?ho(e[s]):po(e[s]);b(null,u,t,n,r,o,i,c)}},N=(e,t,n,r,c,u)=>{const s=t.el=e.el;let{patchFlag:a,dynamicChildren:f,dirs:p}=t;a|=16&e.patchFlag;const d=e.props||v,h=t.props||v;let g;if((g=h.onVnodeBeforeUpdate)&&Ar(g,n,t,e),p&&hr(t,e,n,"beforeUpdate"),a>0){if(16&a)A(s,t,d,h,n,r,c);else if(2&a&&d.class!==h.class&&o(s,"class",null,h.class,c),4&a&&o(s,"style",d.style,h.style,c),8&a){const u=t.dynamicProps;for(let t=0;t<u.length;t++){const a=u[t],l=d[a],f=h[a];(f!==l||i&&i(s,a))&&o(s,a,l,f,c,e.children,n,r,Q)}}1&a&&e.children!==t.children&&l(s,t.children)}else u||null!=f||A(s,t,d,h,n,r,c);const m=c&&"foreignObject"!==t.type;f?T(e.dynamicChildren,f,s,n,r,m):u||$(e,t,s,null,n,r,m),((g=h.onVnodeUpdated)||p)&&Er(()=>{g&&Ar(g,n,t,e),p&&hr(t,e,n,"updated")},r)},T=(e,t,n,r,o,i)=>{for(let c=0;c<t.length;c++){const u=e[c],s=t[c],a=u.type===Wr||!no(u,s)||6&u.shapeFlag||64&u.shapeFlag?f(u.el):n;b(u,s,a,null,r,o,i,!0)}},A=(e,t,n,r,c,u,s)=>{if(n!==r){for(const a in r){if(V(a))continue;const l=r[a],f=n[a];(l!==f||i&&i(e,a))&&o(e,a,f,l,s,t.children,c,u,Q)}if(n!==v)for(const i in n)V(i)||i in r||o(e,i,n[i],null,s,t.children,c,u,Q)}},I=(e,t,r,o,i,c,s,a)=>{const l=t.el=e?e.el:u(""),f=t.anchor=e?e.anchor:u("");let{patchFlag:p,dynamicChildren:d}=t;p>0&&(a=!0),null==e?(n(l,r,o),n(f,r,o),k(t.children,r,f,i,c,s,a)):p>0&&64&p&&d&&e.dynamicChildren?(T(e.dynamicChildren,d,r,i,c,s),(null!=t.key||i&&t===i.subTree)&&Ir(e,t,!0)):$(e,t,r,f,i,c,s,a)},R=(e,t,n,r,o,i,c,u)=>{null==e?512&t.shapeFlag?o.ctx.activate(t,n,r,c,u):P(t,n,r,o,i,c,u):M(e,t,u)},P=(e,t,n,r,o,i,c)=>{const u=e.component=function(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Ao,i={uid:Io++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,update:null,render:null,proxy:null,exposed:null,withProxy:null,effects:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Sn(r,o),emitsOptions:Yt(r,o),emit:null,emitted:null,ctx:v,data:v,props:v,attrs:v,slots:v,refs:v,setupState:v,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Xt.bind(null,i),i}(e,r,o);if(Zn(e)&&(u.ctx.renderer=te),function(e,t=!1){Lo=t;const{props:n,children:r,shapeFlag:o}=e.vnode,i=4&o;(function(e,t,n,r=!1){const o={},i={};X(i,oo,1),xn(e,t,o,i),e.props=n?r?o:qe(o):e.type.props?o:i,e.attrs=i})(e,n,i,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=t,X(t,"_",n)):fr(t,e.slots={})}else e.slots={},t&&pr(e,t);X(e.slots,oo,1)})(e,r);i&&function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,No);const{setup:r}=n;if(r){const n=e.setupContext=r.length>1?Uo(e):null;Ro=e,se();const o=St(r,e,0,[e.props,n]);if(ae(),Ro=null,F(o)){if(t)return o.then(t=>{Bo(e,t)});e.asyncDep=o}else Bo(e,o)}else $o(e)}(e,t);Lo=!1}(u),u.asyncDep){if(o&&o.registerDep(u,L),!e.el){const e=u.subTree=uo(Gr);_(null,e,t,n)}}else L(u,e,t,n,o,i,c)},M=(e,t,n)=>{const r=t.component=e.component;if(function(e,t,n){const{props:r,children:o,component:i}=e,{props:c,children:u,patchFlag:s}=t,a=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&s>=0))return!(!o&&!u||u&&u.$stable)||r!==c&&(r?!c||rn(r,c,a):!!c);if(1024&s)return!0;if(16&s)return r?rn(r,c,a):!!c;if(8&s){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(c[n]!==r[n]&&!Jt(a,n))return!0}}return!1}(e,t,n)){if(r.asyncDep&&!r.asyncResolved)return void B(r,t,n);r.next=t,function(e){const t=jt.indexOf(e);t>-1&&jt.splice(t,1)}(r.update),r.update()}else t.component=e.component,t.el=e.el,r.vnode=t},L=(e,t,n,r,o,i,c)=>{e.update=ne((function(){if(e.isMounted){let t,{next:n,bu:r,u:u,parent:s,vnode:a}=e,l=n;n?(n.el=a.el,B(e,n,c)):n=a,r&&q(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&Ar(t,s,n,a);const p=en(e),d=e.subTree;e.subTree=p,b(d,p,f(d.el),Z(d),e,o,i),n.el=p.el,null===l&&on(e,p.el),u&&Er(u,o),(t=n.props&&n.props.onVnodeUpdated)&&Er(()=>{Ar(t,s,n,a)},o)}else{let c;const{el:u,props:s}=t,{bm:a,m:l,parent:f}=e;a&&q(a),(c=s&&s.onVnodeBeforeMount)&&Ar(c,f,t);const p=e.subTree=en(e);if(u&&ie?ie(t.el,p,e,o):(b(null,p,n,r,e,o,i),t.el=p.el),l&&Er(l,o),c=s&&s.onVnodeMounted){const e=t;Er(()=>{Ar(c,f,e)},o)}const{a:d}=e;d&&256&t.shapeFlag&&Er(d,o),e.isMounted=!0,t=n=r=null}}),wr)},B=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:c}}=e,u=tt(o),[s]=e.propsOptions;if(!(r||c>0)||16&c){let r;xn(e,t,o,i);for(const i in u)t&&(w(t,i)||(r=W(i))!==i&&w(t,r))||(s?!n||void 0===n[i]&&void 0===n[r]||(o[i]=_n(s,t||v,i,void 0,e)):delete o[i]);if(i!==u)for(const e in i)t&&w(t,e)||delete i[e]}else if(8&c){const n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){const c=n[r],a=t[c];if(s)if(w(i,c))i[c]=a;else{const t=D(c);o[t]=_n(s,u,t,a,e)}else i[c]=a}}fe(e,"set","$attrs")}(e,t.props,r,n),((e,t)=>{const{vnode:n,slots:r}=e;let o=!0,i=v;if(32&n.shapeFlag){const e=t._;e?1===e?o=!1:S(r,t):(o=!t.$stable,fr(t,r)),i=t}else t&&(pr(e,t),i={default:1});if(o)for(const e in r)sr(e)||e in i||delete r[e]})(e,t.children),zt(void 0,e.update)},$=(e,t,n,r,o,i,c,u=!1)=>{const s=e&&e.children,a=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:d}=t;if(p>0){if(128&p)return void z(s,f,n,r,o,i,c,u);if(256&p)return void U(s,f,n,r,o,i,c,u)}8&d?(16&a&&Q(s,o,i),f!==s&&l(n,f)):16&a?16&d?z(s,f,n,r,o,i,c,u):Q(s,o,i,!0):(8&a&&l(n,""),16&d&&k(f,n,r,o,i,c,u))},U=(e,t,n,r,o,i,c,u)=>{const s=(e=e||g).length,a=(t=t||g).length,l=Math.min(s,a);let f;for(f=0;f<l;f++){const r=t[f]=u?ho(t[f]):po(t[f]);b(e[f],r,n,null,o,i,c,u)}s>a?Q(e,o,i,!0,!1,l):k(t,n,r,o,i,c,u,l)},z=(e,t,n,r,o,i,c,u)=>{let s=0;const a=t.length;let l=e.length-1,f=a-1;for(;s<=l&&s<=f;){const r=e[s],a=t[s]=u?ho(t[s]):po(t[s]);if(!no(r,a))break;b(r,a,n,null,o,i,c,u),s++}for(;s<=l&&s<=f;){const r=e[l],s=t[f]=u?ho(t[f]):po(t[f]);if(!no(r,s))break;b(r,s,n,null,o,i,c,u),l--,f--}if(s>l){if(s<=f){const e=f+1,l=e<a?t[e].el:r;for(;s<=f;)b(null,t[s]=u?ho(t[s]):po(t[s]),n,l,o,i,c),s++}}else if(s>f)for(;s<=l;)G(e[s],o,i,!0),s++;else{const p=s,d=s,h=new Map;for(s=d;s<=f;s++){const e=t[s]=u?ho(t[s]):po(t[s]);null!=e.key&&h.set(e.key,s)}let v,m=0;const y=f-d+1;let x=!1,_=0;const S=new Array(y);for(s=0;s<y;s++)S[s]=0;for(s=p;s<=l;s++){const r=e[s];if(m>=y){G(r,o,i,!0);continue}let a;if(null!=r.key)a=h.get(r.key);else for(v=d;v<=f;v++)if(0===S[v-d]&&no(r,t[v])){a=v;break}void 0===a?G(r,o,i,!0):(S[a-d]=s+1,a>=_?_=a:x=!0,b(r,t[a],n,null,o,i,c,u),m++)}const O=x?function(e){const t=e.slice(),n=[0];let r,o,i,c,u;const s=e.length;for(r=0;r<s;r++){const s=e[r];if(0!==s){if(o=n[n.length-1],e[o]<s){t[r]=o,n.push(r);continue}for(i=0,c=n.length-1;i<c;)u=(i+c)/2|0,e[n[u]]<s?i=u+1:c=u;s<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,c=n[i-1];i-- >0;)n[i]=c,c=t[c];return n}(S):g;for(v=O.length-1,s=y-1;s>=0;s--){const e=d+s,u=t[e],l=e+1<a?t[e+1].el:r;0===S[s]?b(null,u,n,l,o,i,c):x&&(v<0||s!==O[v]?H(u,n,l,2):v--)}}},H=(e,t,r,o,i=null)=>{const{el:c,type:u,transition:s,children:a,shapeFlag:l}=e;if(6&l)H(e.component.subTree,t,r,o);else if(128&l)e.suspense.move(t,r,o);else if(64&l)u.move(e,t,r,te);else if(u!==Wr)if(u!==Kr)if(2!==o&&1&l&&s)if(0===o)s.beforeEnter(c),n(c,t,r),Er(()=>s.enter(c),i);else{const{leave:e,delayLeave:o,afterLeave:i}=s,u=()=>n(c,t,r),a=()=>{e(c,()=>{u(),i&&i()})};o?o(c,u,a):a()}else n(c,t,r);else(({el:e,anchor:t},r,o)=>{let i;for(;e&&e!==t;)i=p(e),n(e,r,o),e=i;n(t,r,o)})(e,t,r);else{n(c,t,r);for(let e=0;e<a.length;e++)H(a[e],t,r,o);n(e.anchor,t,r)}},G=(e,t,n,r=!1,o=!1)=>{const{type:i,props:c,ref:u,children:s,dynamicChildren:a,shapeFlag:l,patchFlag:f,dirs:p}=e;if(null!=u&&jr(u,null,n,null),256&l)return void t.ctx.deactivate(e);const d=1&l&&p;let h;if((h=c&&c.onVnodeBeforeUnmount)&&Ar(h,t,e),6&l)J(e.component,n,r);else{if(128&l)return void e.suspense.unmount(n,r);d&&hr(e,null,t,"beforeUnmount"),a&&(i!==Wr||f>0&&64&f)?Q(a,t,n,!1,!0):(i===Wr&&(128&f||256&f)||!o&&16&l)&&Q(s,t,n),64&l&&(r||!Rr(e.props))&&e.type.remove(e,te),r&&K(e)}((h=c&&c.onVnodeUnmounted)||d)&&Er(()=>{h&&Ar(h,t,e),d&&hr(e,null,t,"unmounted")},n)},K=e=>{const{type:t,el:n,anchor:o,transition:i}=e;if(t===Wr)return void Y(n,o);if(t===Kr)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=p(e),r(e),e=n;r(t)})(e);const c=()=>{r(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:r}=i,o=()=>t(n,c);r?r(e.el,c,o):o()}else c()},Y=(e,t)=>{let n;for(;e!==t;)n=p(e),r(e),e=n;r(t)},J=(e,t,n)=>{const{bum:r,effects:o,update:i,subTree:c,um:u}=e;if(r&&q(r),o)for(let e=0;e<o.length;e++)re(o[e]);i&&(re(i),G(c,e,t,n)),u&&Er(u,t),Er(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Q=(e,t,n,r=!1,o=!1,i=0)=>{for(let c=i;c<e.length;c++)G(e[c],t,n,r,o)},Z=e=>6&e.shapeFlag?Z(e.component.subTree):128&e.shapeFlag?e.suspense.next():p(e.anchor||e.el),ee=(e,t)=>{null==e?t._vnode&&G(t._vnode,null,null,!0):b(t._vnode||null,e,t),Wt(),t._vnode=e},te={p:b,um:G,m:H,r:K,mt:P,mc:k,pc:$,pbc:T,n:Z,o:e};let oe,ie;return t&&([oe,ie]=t(te)),{render:ee,hydrate:oe,createApp:mr(ee,oe)}}function Ar(e,t,n,r=null){Ot(e,t,7,[n,r])}function Ir(e,t,n=!1){const r=e.children,o=t.children;if(E(r)&&E(o))for(let e=0;e<r.length;e++){const t=r[e];let i=o[e];1&i.shapeFlag&&!i.dynamicChildren&&((i.patchFlag<=0||32===i.patchFlag)&&(i=o[e]=ho(o[e]),i.el=t.el),n||Ir(t,i))}}const Rr=e=>e&&(e.disabled||""===e.disabled),Fr=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Pr=(e,t)=>{const n=e&&e.to;return A(n)?t?t(n):null:n};function Mr(e,t,n,{o:{insert:r},m:o},i=2){0===i&&r(e.targetAnchor,t,n);const{el:c,anchor:u,shapeFlag:s,children:a,props:l}=e,f=2===i;if(f&&r(c,t,n),(!f||Rr(l))&&16&s)for(let e=0;e<a.length;e++)o(a[e],t,n,2);f&&r(u,t,n)}const Lr={__isTeleport:!0,process(e,t,n,r,o,i,c,u,s){const{mc:a,pc:l,pbc:f,o:{insert:p,querySelector:d,createText:h}}=s,v=Rr(t.props),{shapeFlag:g,children:m}=t;if(null==e){const e=t.el=h(""),s=t.anchor=h("");p(e,n,r),p(s,n,r);const l=t.target=Pr(t.props,d),f=t.targetAnchor=h("");l&&(p(f,l),c=c||Fr(l));const y=(e,t)=>{16&g&&a(m,e,t,o,i,c,u)};v?y(n,s):l&&y(l,f)}else{t.el=e.el;const r=t.anchor=e.anchor,a=t.target=e.target,p=t.targetAnchor=e.targetAnchor,h=Rr(e.props),g=h?n:a,m=h?r:p;if(c=c||Fr(a),t.dynamicChildren?(f(e.dynamicChildren,t.dynamicChildren,g,o,i,c),Ir(e,t,!0)):u||l(e,t,g,m,o,i,c),v)h||Mr(t,n,r,s,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Pr(t.props,d);e&&Mr(t,e,null,s,0)}else h&&Mr(t,a,p,s,1)}},remove(e,{r:t,o:{remove:n}}){const{shapeFlag:r,children:o,anchor:i}=e;if(n(i),16&r)for(let e=0;e<o.length;e++)t(o[e])},move:Mr,hydrate:function(e,t,n,r,o,{o:{nextSibling:i,parentNode:c,querySelector:u}},s){const a=t.target=Pr(t.props,u);if(a){const u=a._lpa||a.firstChild;16&t.shapeFlag&&(Rr(t.props)?(t.anchor=s(i(e),t,c(e),n,r,o),t.targetAnchor=u):(t.anchor=i(e),t.targetAnchor=s(u,t,a,n,r,o)),a._lpa=t.targetAnchor&&i(t.targetAnchor))}return t.anchor&&i(t.anchor)}};function Br(e){return Dr("components",e)||e}const Vr=Symbol();function $r(e){return A(e)?Dr("components",e,!1)||e:e||Vr}function Ur(e){return Dr("directives",e)}function Dr(e,t,n=!0){const r=Qt||Ro;if(r){const n=r.type;if("components"===e){if("_self"===t)return n;const e=Wo(n);if(e&&(e===t||e===D(t)||e===H(D(t))))return n}return zr(r[e]||n[e],t)||zr(r.appContext[e],t)}}function zr(e,t){return e&&(e[t]||e[D(t)]||e[H(D(t))])}const Wr=Symbol(void 0),Hr=Symbol(void 0),Gr=Symbol(void 0),Kr=Symbol(void 0),qr=[];let Xr=null;function Yr(e=!1){qr.push(Xr=e?null:[])}function Jr(){qr.pop(),Xr=qr[qr.length-1]||null}let Qr=1;function Zr(e){Qr+=e}function eo(e,t,n,r,o){const i=uo(e,t,n,r,o,!0);return i.dynamicChildren=Xr||g,Jr(),Qr>0&&Xr&&Xr.push(i),i}function to(e){return!!e&&!0===e.__v_isVNode}function no(e,t){return e.type===t.type&&e.key===t.key}function ro(e){}const oo="__vInternal",io=({key:e})=>null!=e?e:null,co=({ref:e})=>null!=e?A(e)||ot(e)||T(e)?{i:Qt,r:e}:e:null,uo=function(e,t=null,n=null,r=0,o=null,i=!1){if(e&&e!==Vr||(e=Gr),to(e)){const r=so(e,t,!0);return n&&vo(r,n),r}var u;if(T(u=e)&&"__vccOpts"in u&&(e=e.__vccOpts),t){(et(t)||oo in t)&&(t=S({},t));let{class:e,style:n}=t;e&&!A(e)&&(t.class=l(e)),R(n)&&(et(n)&&!E(n)&&(n=S({},n)),t.style=c(n))}const s=A(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:R(e)?4:T(e)?2:0,a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&io(t),ref:t&&co(t),scopeId:vn,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null};if(vo(a,n),128&s){const{content:e,fallback:t}=function(e){const{shapeFlag:t,children:n}=e;let r,o;return 32&t?(r=sn(n.default),o=sn(n.fallback)):(r=sn(n),o=po(null)),{content:r,fallback:o}}(a);a.ssContent=e,a.ssFallback=t}return Qr>0&&!i&&Xr&&(r>0||6&s)&&32!==r&&Xr.push(a),a};function so(e,t,n=!1){const{props:r,ref:o,patchFlag:i}=e,c=t?go(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&io(c),ref:t&&t.ref?n&&o?E(o)?o.concat(co(t)):[o,co(t)]:co(t):o,scopeId:e.scopeId,children:e.children,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Wr?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&so(e.ssContent),ssFallback:e.ssFallback&&so(e.ssFallback),el:e.el,anchor:e.anchor}}function ao(e=" ",t=0){return uo(Hr,null,e,t)}function lo(e,t){const n=uo(Kr,null,e);return n.staticCount=t,n}function fo(e="",t=!1){return t?(Yr(),eo(Gr,null,e)):uo(Gr,null,e)}function po(e){return null==e||"boolean"==typeof e?uo(Gr):E(e)?uo(Wr,null,e):"object"==typeof e?null===e.el?e:so(e):uo(Hr,null,String(e))}function ho(e){return null===e.el?e:so(e)}function vo(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(E(t))n=16;else if("object"==typeof t){if(1&r||64&r){const n=t.default;return void(n&&(n._c&&pn(1),vo(e,n()),n._c&&pn(-1)))}{n=32;const r=t._;r||oo in t?3===r&&Qt&&(1024&Qt.vnode.patchFlag?(t._=2,e.patchFlag|=1024):t._=1):t._ctx=Qt}}else T(t)?(t={default:t,_ctx:Qt},n=32):(t=String(t),64&r?(n=16,t=[ao(t)]):n=8);e.children=t,e.shapeFlag|=n}function go(...e){const t=S({},e[0]);for(let n=1;n<e.length;n++){const r=e[n];for(const e in r)if("class"===e)t.class!==r.class&&(t.class=l([t.class,r.class]));else if("style"===e)t.style=c([t.style,r.style]);else if(x(e)){const n=t[e],o=r[e];n!==o&&(t[e]=n?[].concat(n,r[e]):o)}else""!==e&&(t[e]=r[e])}return t}function mo(e,t){if(Ro){let n=Ro.provides;const r=Ro.parent&&Ro.parent.provides;r===n&&(n=Ro.provides=Object.create(r)),n[e]=t}}function yo(e,t,n=!1){const r=Ro||Qt;if(r){const o=null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&T(t)?t():t}}let bo=!1;function xo(e,t,n=[],r=[],o=[],i=!1){const{mixins:c,extends:u,data:s,computed:a,methods:l,watch:f,provide:p,inject:d,components:h,directives:g,beforeMount:y,mounted:b,beforeUpdate:x,updated:_,activated:O,deactivated:C,beforeUnmount:w,unmounted:j,render:k,renderTracked:N,renderTriggered:A,errorCaptured:I,expose:F}=t,P=e.proxy,M=e.ctx,L=e.appContext.mixins;if(i&&k&&e.render===m&&(e.render=k),i||(bo=!0,_o("beforeCreate","bc",t,e,L),bo=!1,Oo(e,L,n,r,o)),u&&xo(e,u,n,r,o,!0),c&&Oo(e,c,n,r,o),d)if(E(d))for(let e=0;e<d.length;e++){const t=d[e];M[t]=yo(t)}else for(const e in d){const t=d[e];M[e]=R(t)?yo(t.from||e,t.default,!0):yo(t)}if(l)for(const e in l){const t=l[e];T(t)&&(M[e]=t.bind(P))}if(i?s&&n.push(s):(n.length&&n.forEach(t=>Co(e,t,P)),s&&Co(e,s,P)),a)for(const e in a){const t=a[e],n=Go({get:T(t)?t.bind(P,P):T(t.get)?t.get.bind(P,P):m,set:!T(t)&&T(t.set)?t.set.bind(P):m});Object.defineProperty(M,e,{enumerable:!0,configurable:!0,get:()=>n.value,set:e=>n.value=e})}if(f&&r.push(f),!i&&r.length&&r.forEach(e=>{for(const t in e)wo(e[t],M,P,t)}),p&&o.push(p),!i&&o.length&&o.forEach(e=>{const t=T(e)?e.call(P):e;Reflect.ownKeys(t).forEach(e=>{mo(e,t[e])})}),i&&(h&&S(e.components||(e.components=S({},e.type.components)),h),g&&S(e.directives||(e.directives=S({},e.type.directives)),g)),i||_o("created","c",t,e,L),y&&Nn(y.bind(P)),b&&Tn(b.bind(P)),x&&An(x.bind(P)),_&&In(_.bind(P)),O&&nr(O.bind(P)),C&&rr(C.bind(P)),I&&Ln(I.bind(P)),N&&Mn(N.bind(P)),A&&Pn(A.bind(P)),w&&Rn(w.bind(P)),j&&Fn(j.bind(P)),E(F)&&!i)if(F.length){const t=e.exposed||(e.exposed=pt({}));F.forEach(e=>{t[e]=mt(P,e)})}else e.exposed||(e.exposed=v)}function _o(e,t,n,r,o){So(e,t,o,r);const{extends:i,mixins:c}=n;i&&function e(t,n,r,o){r.extends&&e(t,n,r.extends,o);const i=r[t];i&&Ot(i.bind(o.proxy),o,n)}(e,t,i,r),c&&So(e,t,c,r);const u=n[e];u&&Ot(u.bind(r.proxy),r,t)}function So(e,t,n,r){for(let o=0;o<n.length;o++){const i=n[o].mixins;i&&So(e,t,i,r);const c=n[o][e];c&&Ot(c.bind(r.proxy),r,t)}}function Oo(e,t,n,r,o){for(let i=0;i<t.length;i++)xo(e,t[i],n,r,o,!0)}function Co(e,t,n){const r=t.call(n,n);R(r)&&(e.data===v?e.data=Ke(r):S(e.data,r))}function wo(e,t,n,r){const o=r.includes(".")?function(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}(n,r):()=>n[r];if(A(e)){const n=t[e];T(n)&&$n(o,n)}else if(T(e))$n(o,e.bind(n));else if(R(e))if(E(e))e.forEach(e=>wo(e,t,n,r));else{const r=T(e.handler)?e.handler.bind(n):t[e.handler];T(r)&&$n(o,r,e)}}function Eo(e,t,n){const r=n.appContext.config.optionMergeStrategies,{mixins:o,extends:i}=t;i&&Eo(e,i,n),o&&o.forEach(t=>Eo(e,t,n));for(const o in t)e[o]=r&&w(r,o)?r[o](e[o],t[o],n.proxy,o):t[o]}const jo=e=>e&&(e.proxy?e.proxy:jo(e.parent)),ko=S(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>jo(e.parent),$root:e=>e.root&&e.root.proxy,$emit:e=>e.emit,$options:e=>function(e){const t=e.type,{__merged:n,mixins:r,extends:o}=t;if(n)return n;const i=e.appContext.mixins;if(!i.length&&!r&&!o)return t;const c={};return i.forEach(t=>Eo(c,t,e)),Eo(c,t,e),t.__merged=c}(e),$forceUpdate:e=>()=>Vt(e.update),$nextTick:e=>Bt.bind(e.proxy),$watch:e=>Dn.bind(e)}),No={get({_:e},t){const{ctx:n,setupState:r,data:o,props:i,accessCache:c,type:u,appContext:s}=e;if("__v_skip"===t)return!0;let a;if("$"!==t[0]){const u=c[t];if(void 0!==u)switch(u){case 0:return r[t];case 1:return o[t];case 3:return n[t];case 2:return i[t]}else{if(r!==v&&w(r,t))return c[t]=0,r[t];if(o!==v&&w(o,t))return c[t]=1,o[t];if((a=e.propsOptions[0])&&w(a,t))return c[t]=2,i[t];if(n!==v&&w(n,t))return c[t]=3,n[t];bo||(c[t]=4)}}const l=ko[t];let f,p;return l?("$attrs"===t&&le(e,0,t),l(e)):(f=u.__cssModules)&&(f=f[t])?f:n!==v&&w(n,t)?(c[t]=3,n[t]):(p=s.config.globalProperties,w(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;if(o!==v&&w(o,t))o[t]=n;else if(r!==v&&w(r,t))r[t]=n;else if(t in e.props)return!1;return!("$"===t[0]&&t.slice(1)in e||(i[t]=n,0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:i}},c){let u;return void 0!==n[c]||e!==v&&w(e,c)||t!==v&&w(t,c)||(u=i[0])&&w(u,c)||w(r,c)||w(ko,c)||w(o.config.globalProperties,c)}},To=S({},No,{get(e,t){if(t!==Symbol.unscopables)return No.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!o(t)}),Ao=vr();let Io=0,Ro=null;const Fo=()=>Ro||Qt,Po=e=>{Ro=e};let Mo,Lo=!1;function Bo(e,t,n){T(t)?e.render=t:R(t)&&(e.setupState=pt(t)),$o(e)}function Vo(e){Mo=e}function $o(e,t){const n=e.type;e.render||(Mo&&n.template&&!n.render&&(n.render=Mo(n.template,{isCustomElement:e.appContext.config.isCustomElement,delimiters:n.delimiters})),e.render=n.render||m,e.render._rc&&(e.withProxy=new Proxy(e.ctx,To))),Ro=e,se(),xo(e,n),ae(),Ro=null}function Uo(e){return{attrs:e.attrs,slots:e.slots,emit:e.emit,expose:t=>{e.exposed=pt(t)}}}function Do(e,t=Ro){t&&(t.effects||(t.effects=[])).push(e)}const zo=/(?:^|[-_])(\w)/g;function Wo(e){return T(e)&&e.displayName||e.name}function Ho(e,t,n=!1){let r=Wo(t);if(!r&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(r=e[1])}if(!r&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};r=n(e.components||e.parent.type.components)||n(e.appContext.components)}return r?r.replace(zo,e=>e.toUpperCase()).replace(/[-_]/g,""):n?"App":"Anonymous"}function Go(e){const t=function(e){let t,n;return T(e)?(t=e,n=m):(t=e.get,n=e.set),new yt(t,n,T(e)||!e.set)}(e);return Do(t.effect),t}function Ko(){return null}function qo(){return null}function Xo(){const e=Fo();return e.setupContext||(e.setupContext=Uo(e))}function Yo(e,t,n){const r=arguments.length;return 2===r?R(t)&&!E(t)?to(t)?uo(e,null,[t]):uo(e,t):uo(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&to(n)&&(n=[n]),uo(e,t,n))}const Jo=Symbol(""),Qo=()=>{{const e=yo(Jo);return e||xt("Server rendering context not provided. Make sure to only call useSsrContext() conditionally in the server build."),e}};function Zo(){}function ei(e,t){let n;if(E(e)||A(e)){n=new Array(e.length);for(let r=0,o=e.length;r<o;r++)n[r]=t(e[r],r)}else if("number"==typeof e){n=new Array(e);for(let r=0;r<e;r++)n[r]=t(r+1,r)}else if(R(e))if(e[Symbol.iterator])n=Array.from(e,t);else{const r=Object.keys(e);n=new Array(r.length);for(let o=0,i=r.length;o<i;o++){const i=r[o];n[o]=t(e[i],i,o)}}else n=[];return n}function ti(e){const t={};for(const n in e)t[G(n)]=e[n];return t}function ni(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(E(r))for(let t=0;t<r.length;t++)e[r[t].name]=r[t].fn;else r&&(e[r.name]=r.fn)}return e}const ri="3.0.5",oi=null,ii="http://www.w3.org/2000/svg",ci="undefined"!=typeof document?document:null;let ui,si;const ai={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n)=>t?ci.createElementNS(ii,e):ci.createElement(e,n?{is:n}:void 0),createText:e=>ci.createTextNode(e),createComment:e=>ci.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ci.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode:e=>e.cloneNode(!0),insertStaticContent(e,t,n,r){const o=r?si||(si=ci.createElementNS(ii,"svg")):ui||(ui=ci.createElement("div"));o.innerHTML=e;const i=o.firstChild;let c=i,u=c;for(;c;)u=c,ai.insert(c,t,n),c=o.firstChild;return[i,u]}},li=/\s*!important$/;function fi(e,t,n){if(E(n))n.forEach(n=>fi(e,t,n));else if(t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=di[t];if(n)return n;let r=D(t);if("filter"!==r&&r in e)return di[t]=r;r=H(r);for(let n=0;n<pi.length;n++){const o=pi[n]+r;if(o in e)return di[t]=o}return t}(e,t);li.test(n)?e.setProperty(W(r),n.replace(li,""),"important"):e[r]=n}}const pi=["Webkit","Moz","ms"],di={},hi="http://www.w3.org/1999/xlink";let vi=Date.now;"undefined"!=typeof document&&vi()>document.createEvent("Event").timeStamp&&(vi=()=>performance.now());let gi=0;const mi=Promise.resolve(),yi=()=>{gi=0};function bi(e,t,n,r){e.addEventListener(t,n,r)}const xi=/(?:Once|Passive|Capture)$/,_i=/^on[a-z]/;function Si(e="$style"){{const t=Fo();if(!t)return v;const n=t.type.__cssModules;if(!n)return v;return n[e]||v}}function Oi(e){const t=Fo();if(!t)return;const n=()=>function e(t,n){if(128&t.shapeFlag){const r=t.suspense;t=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{e(r.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el){const e=t.el.style;for(const t in n)e.setProperty("--"+t,n[t])}else t.type===Wr&&t.children.forEach(t=>e(t,n))}(t.subTree,e(t.proxy));Tn(()=>Bn(n,{flush:"post"})),In(n)}const Ci=(e,{slots:t})=>Yo(Gn,ji(e),t);Ci.displayName="Transition";const wi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ei=Ci.props=S({},Gn.props,wi);function ji(e){let{name:t="v",type:n,css:r=!0,duration:o,enterFromClass:i=t+"-enter-from",enterActiveClass:c=t+"-enter-active",enterToClass:u=t+"-enter-to",appearFromClass:s=i,appearActiveClass:a=c,appearToClass:l=u,leaveFromClass:f=t+"-leave-from",leaveActiveClass:p=t+"-leave-active",leaveToClass:d=t+"-leave-to"}=e;const h={};for(const t in e)t in wi||(h[t]=e[t]);if(!r)return h;const v=function(e){if(null==e)return null;if(R(e))return[ki(e.enter),ki(e.leave)];{const t=ki(e);return[t,t]}}(o),g=v&&v[0],m=v&&v[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:x,onLeave:_,onLeaveCancelled:O,onBeforeAppear:C=y,onAppear:w=b,onAppearCancelled:E=x}=h,j=(e,t,n)=>{Ti(e,t?l:u),Ti(e,t?a:c),n&&n()},k=(e,t)=>{Ti(e,d),Ti(e,p),t&&t()},N=e=>(t,r)=>{const o=e?w:b,c=()=>j(t,e,r);o&&o(t,c),Ai(()=>{Ti(t,e?s:i),Ni(t,e?l:u),o&&o.length>1||Ri(t,n,g,c)})};return S(h,{onBeforeEnter(e){y&&y(e),Ni(e,i),Ni(e,c)},onBeforeAppear(e){C&&C(e),Ni(e,s),Ni(e,a)},onEnter:N(!1),onAppear:N(!0),onLeave(e,t){const r=()=>k(e,t);Ni(e,f),Li(),Ni(e,p),Ai(()=>{Ti(e,f),Ni(e,d),_&&_.length>1||Ri(e,n,m,r)}),_&&_(e,r)},onEnterCancelled(e){j(e,!1),x&&x(e)},onAppearCancelled(e){j(e,!0),E&&E(e)},onLeaveCancelled(e){k(e),O&&O(e)}})}function ki(e){return Y(e)}function Ni(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e._vtc||(e._vtc=new Set)).add(t)}function Ti(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Ai(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Ii=0;function Ri(e,t,n,r){const o=e._endId=++Ii,i=()=>{o===e._endId&&r()};if(n)return setTimeout(i,n);const{type:c,timeout:u,propCount:s}=Fi(e,t);if(!c)return r();const a=c+"end";let l=0;const f=()=>{e.removeEventListener(a,p),i()},p=t=>{t.target===e&&++l>=s&&f()};setTimeout(()=>{l<s&&f()},u+1),e.addEventListener(a,p)}function Fi(e,t){const n=window.getComputedStyle(e),r=e=>(n[e]||"").split(", "),o=r("transitionDelay"),i=r("transitionDuration"),c=Pi(o,i),u=r("animationDelay"),s=r("animationDuration"),a=Pi(u,s);let l=null,f=0,p=0;return"transition"===t?c>0&&(l="transition",f=c,p=i.length):"animation"===t?a>0&&(l="animation",f=a,p=s.length):(f=Math.max(c,a),l=f>0?c>a?"transition":"animation":null,p=l?"transition"===l?i.length:s.length:0),{type:l,timeout:f,propCount:p,hasTransform:"transition"===l&&/\b(transform|all)(,|$)/.test(n.transitionProperty)}}function Pi(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>Mi(t)+Mi(e[n])))}function Mi(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Li(){return document.body.offsetHeight}const Bi=new WeakMap,Vi=new WeakMap,$i={name:"TransitionGroup",props:S({},Ei,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Fo(),r=Wn();let o,i;return In(()=>{if(!o.length)return;const t=e.moveClass||(e.name||"v")+"-move";if(!function(e,t,n){const r=e.cloneNode();e._vtc&&e._vtc.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display="none";const o=1===t.nodeType?t:t.parentNode;o.appendChild(r);const{hasTransform:i}=Fi(r);return o.removeChild(r),i}(o[0].el,n.vnode.el,t))return;o.forEach(Ui),o.forEach(Di);const r=o.filter(zi);Li(),r.forEach(e=>{const n=e.el,r=n.style;Ni(n,t),r.transform=r.webkitTransform=r.transitionDuration="";const o=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",o),n._moveCb=null,Ti(n,t))};n.addEventListener("transitionend",o)})}),()=>{const c=tt(e),u=ji(c),s=c.tag||Wr;o=i,i=t.default?Qn(t.default()):[];for(let e=0;e<i.length;e++){const t=i[e];null!=t.key&&Jn(t,qn(t,u,r,n))}if(o)for(let e=0;e<o.length;e++){const t=o[e];Jn(t,qn(t,u,r,n)),Bi.set(t,t.el.getBoundingClientRect())}return uo(s,null,i)}}};function Ui(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function Di(e){Vi.set(e,e.el.getBoundingClientRect())}function zi(e){const t=Bi.get(e),n=Vi.get(e),r=t.left-n.left,o=t.top-n.top;if(r||o){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${r}px,${o}px)`,t.transitionDuration="0s",e}}const Wi=e=>{const t=e.props["onUpdate:modelValue"];return E(t)?e=>q(t,e):t};function Hi(e){e.target.composing=!0}function Gi(e){const t=e.target;t.composing&&(t.composing=!1,function(e,t){const n=document.createEvent("HTMLEvents");n.initEvent("input",!0,!0),e.dispatchEvent(n)}(t))}const Ki={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e._assign=Wi(o);const i=r||"number"===e.type;bi(e,t?"change":"input",t=>{if(t.target.composing)return;let r=e.value;n?r=r.trim():i&&(r=Y(r)),e._assign(r)}),n&&bi(e,"change",()=>{e.value=e.value.trim()}),t||(bi(e,"compositionstart",Hi),bi(e,"compositionend",Gi),bi(e,"change",Gi))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{trim:n,number:r}},o){if(e._assign=Wi(o),e.composing)return;if(document.activeElement===e){if(n&&e.value.trim()===t)return;if((r||"number"===e.type)&&Y(e.value)===t)return}const i=null==t?"":t;e.value!==i&&(e.value=i)}},qi={created(e,t,n){e._assign=Wi(n),bi(e,"change",()=>{const t=e._modelValue,n=Zi(e),r=e.checked,o=e._assign;if(E(t)){const e=p(t,n),i=-1!==e;if(r&&!i)o(t.concat(n));else if(!r&&i){const n=[...t];n.splice(e,1),o(n)}}else if(k(t)){const e=new Set(t);r?e.add(n):e.delete(n),o(e)}else o(ec(e,r))})},mounted:Xi,beforeUpdate(e,t,n){e._assign=Wi(n),Xi(e,t,n)}};function Xi(e,{value:t,oldValue:n},r){e._modelValue=t,E(t)?e.checked=p(t,r.props.value)>-1:k(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=f(t,ec(e,!0)))}const Yi={created(e,{value:t},n){e.checked=f(t,n.props.value),e._assign=Wi(n),bi(e,"change",()=>{e._assign(Zi(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=Wi(r),t!==n&&(e.checked=f(t,r.props.value))}},Ji={created(e,{value:t,modifiers:{number:n}},r){const o=k(t);bi(e,"change",()=>{const t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Y(Zi(e)):Zi(e));e._assign(e.multiple?o?new Set(t):t:t[0])}),e._assign=Wi(r)},mounted(e,{value:t}){Qi(e,t)},beforeUpdate(e,t,n){e._assign=Wi(n)},updated(e,{value:t}){Qi(e,t)}};function Qi(e,t){const n=e.multiple;if(!n||E(t)||k(t)){for(let r=0,o=e.options.length;r<o;r++){const o=e.options[r],i=Zi(o);if(n)o.selected=E(t)?p(t,i)>-1:t.has(i);else if(f(Zi(o),t))return void(e.selectedIndex=r)}n||(e.selectedIndex=-1)}}function Zi(e){return"_value"in e?e._value:e.value}function ec(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const tc={created(e,t,n){nc(e,t,n,null,"created")},mounted(e,t,n){nc(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){nc(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){nc(e,t,n,r,"updated")}};function nc(e,t,n,r,o){let i;switch(e.tagName){case"SELECT":i=Ji;break;case"TEXTAREA":i=Ki;break;default:switch(n.props&&n.props.type){case"checkbox":i=qi;break;case"radio":i=Yi;break;default:i=Ki}}const c=i[o];c&&c(e,t,n,r)}const rc=["ctrl","shift","alt","meta"],oc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>rc.some(n=>e[n+"Key"]&&!t.includes(n))},ic=(e,t)=>(n,...r)=>{for(let e=0;e<t.length;e++){const r=oc[t[e]];if(r&&r(n,t))return}return e(n,...r)},cc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},uc=(e,t)=>n=>{if(!("key"in n))return;const r=W(n.key);return t.some(e=>e===r||cc[e]===r)?e(n):void 0},sc={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ac(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){r&&t!==n?t?(r.beforeEnter(e),ac(e,!0),r.enter(e)):r.leave(e,()=>{ac(e,!1)}):ac(e,t)},beforeUnmount(e,{value:t}){ac(e,t)}};function ac(e,t){e.style.display=t?e._vod:"none"}const lc=S({patchProp:(e,t,n,r,o=!1,c,u,s,a)=>{switch(t){case"class":!function(e,t,n){if(null==t&&(t=""),n)e.setAttribute("class",t);else{const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),e.className=t}}(e,r,o);break;case"style":!function(e,t,n){const r=e.style;if(n)if(A(n))t!==n&&(r.cssText=n);else{for(const e in n)fi(r,e,n[e]);if(t&&!A(t))for(const e in t)null==n[e]&&fi(r,e,"")}else e.removeAttribute("style")}(e,n,r);break;default:x(t)?_(t)||function(e,t,n,r,o=null){const i=e._vei||(e._vei={}),c=i[t];if(r&&c)c.value=r;else{const[n,u]=function(e){let t;if(xi.test(e)){let n;for(t={};n=e.match(xi);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e.slice(2).toLowerCase(),t]}(t);r?bi(e,n,i[t]=function(e,t){const n=e=>{(e.timeStamp||vi())>=n.attached-1&&Ot(function(e,t){if(E(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e(t))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=gi||(mi.then(yi),gi=vi()),n}(r,o),u):c&&(function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,c,u),i[t]=void 0)}}(e,t,0,r,u):function(e,t,n,r){return r?"innerHTML"===t||!!(t in e&&_i.test(t)&&T(n)):"spellcheck"!==t&&"draggable"!==t&&(("form"!==t||"string"!=typeof n)&&(("list"!==t||"INPUT"!==e.tagName)&&((!_i.test(t)||!A(n))&&t in e)))}(e,t,r,o)?function(e,t,n,r,o,i,c){if("innerHTML"===t||"textContent"===t)return r&&c(r,o,i),void(e[t]=null==n?"":n);if("value"!==t||"PROGRESS"===e.tagName){if(""===n||null==n){const r=typeof e[t];if(""===n&&"boolean"===r)return void(e[t]=!0);if(null==n&&"string"===r)return e[t]="",void e.removeAttribute(t);if("number"===r)return e[t]=0,void e.removeAttribute(t)}try{e[t]=n}catch(e){}}else{e._value=n;const t=null==n?"":n;e.value!==t&&(e.value=t)}}(e,t,r,c,u,s,a):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,n,r){if(r&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(hi,t.slice(6,t.length)):e.setAttributeNS(hi,t,n);else{const r=i(t);null==n||r&&!1===n?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}(e,t,r,o))}},forcePatchProp:(e,t)=>"value"===t},ai);let fc,pc=!1;function dc(){return fc||(fc=kr(lc))}function hc(){return fc=pc?fc:Nr(lc),pc=!0,fc}const vc=(...e)=>{dc().render(...e)},gc=(...e)=>{hc().hydrate(...e)},mc=(...e)=>{const t=dc().createApp(...e),{mount:n}=t;return t.mount=e=>{const r=bc(e);if(!r)return;const o=t._component;T(o)||o.render||o.template||(o.template=r.innerHTML),r.innerHTML="";const i=n(r);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t},yc=(...e)=>{const t=hc().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=bc(e);if(t)return n(t,!0)},t};function bc(e){return A(e)?document.querySelector(e):e}const xc=()=>{}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(93))},function(e,t,n){var r=n(2),o=n(38),i=n(6),c=n(29),u=n(43),s=n(73),a=o("wks"),l=r.Symbol,f=s?l:l&&l.withoutSetter||c;e.exports=function(e){return i(a,e)||(u&&i(l,e)?a[e]=l[e]:a[e]=f("Symbol."+e)),a[e]}},function(e,t,n){var r=n(2),o=n(19).f,i=n(10),c=n(11),u=n(36),s=n(65),a=n(30);e.exports=function(e,t){var n,l,f,p,d,h=e.target,v=e.global,g=e.stat;if(n=v?r:g?r[h]||u(h,{}):(r[h]||{}).prototype)for(l in t){if(p=t[l],f=e.noTargetGet?(d=o(n,l))&&d.value:n[l],!a(v?l:h+(g?".":"#")+l,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;s(p,f)}(e.sham||f&&f.sham)&&i(p,"sham",!0),c(n,l,p,e)}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(9),o=n(61),i=n(7),c=n(21),u=Object.defineProperty;t.f=r?u:function(e,t,n){if(i(e),t=c(t,!0),i(n),o)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(1);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(9),o=n(8),i=n(20);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(2),o=n(10),i=n(6),c=n(36),u=n(63),s=n(15),a=s.get,l=s.enforce,f=String(String).split("String");(e.exports=function(e,t,n,u){var s,a=!!u&&!!u.unsafe,p=!!u&&!!u.enumerable,d=!!u&&!!u.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),(s=l(n)).source||(s.source=f.join("string"==typeof t?t:""))),e!==r?(a?!d&&e[t]&&(p=!0):delete e[t],p?e[t]=n:o(e,t,n)):p?e[t]=n:c(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&a(this).source||u(this)}))},function(e,t,n){var r=n(35),o=n(14);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(25),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r,o,i,c=n(64),u=n(2),s=n(5),a=n(10),l=n(6),f=n(37),p=n(27),d=n(22),h=u.WeakMap;if(c){var v=f.state||(f.state=new h),g=v.get,m=v.has,y=v.set;r=function(e,t){return t.facade=e,y.call(v,e,t),t},o=function(e){return g.call(v,e)||{}},i=function(e){return m.call(v,e)}}else{var b=p("state");d[b]=!0,r=function(e,t){return t.facade=e,a(e,b,t),t},o=function(e){return l(e,b)?e[b]:{}},i=function(e){return l(e,b)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(14);e.exports=function(e){return Object(r(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(8).f,o=n(6),i=n(3)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(9),o=n(60),i=n(20),c=n(12),u=n(21),s=n(6),a=n(61),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=c(e),t=u(t,!0),a)try{return l(e,t)}catch(e){}if(s(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(5);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports={}},function(e,t,n){var r=n(66),o=n(2),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(67),o=n(40).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports={}},function(e,t,n){var r=n(38),o=n(29),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){e.exports=!1},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(1),o=/#|\.prototype\./,i=function(e,t){var n=u[c(e)];return n==a||n!=s&&("function"==typeof t?r(t):!!t)},c=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},u=i.data={},s=i.NATIVE="N",a=i.POLYFILL="P";e.exports=i},function(e,t,n){var r=n(17);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(9),o=n(1),i=n(6),c=Object.defineProperty,u={},s=function(e){throw e};e.exports=function(e,t){if(i(u,e))return u[e];t||(t={});var n=[][e],a=!!i(t,"ACCESSORS")&&t.ACCESSORS,l=i(t,0)?t[0]:s,f=i(t,1)?t[1]:void 0;return u[e]=!!n&&!o((function(){if(a&&!r)return!0;var e={length:-1};a?c(e,1,{enumerable:!0,get:s}):e[1]=1,n.call(e,l,f)}))}},function(e,t,n){var r,o=n(7),i=n(99),c=n(40),u=n(22),s=n(100),a=n(62),l=n(27),f=l("IE_PROTO"),p=function(){},d=function(e){return"<script>"+e+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;h=r?function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=a("iframe")).style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F);for(var n=c.length;n--;)delete h.prototype[c[n]];return h()};u[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=o(e),n=new p,p.prototype=null,n[f]=e):n=h(),void 0===t?n:i(n,t)}},function(e,t,n){"use strict";var r,o,i=n(54),c=n(81),u=RegExp.prototype.exec,s=String.prototype.replace,a=u,l=(r=/a/,o=/b*/g,u.call(r,"a"),u.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),f=c.UNSUPPORTED_Y||c.BROKEN_CARET,p=void 0!==/()??/.exec("")[1];(l||p||f)&&(a=function(e){var t,n,r,o,c=this,a=f&&c.sticky,d=i.call(c),h=c.source,v=0,g=e;return a&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),g=String(e).slice(c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==e[c.lastIndex-1])&&(h="(?: "+h+")",g=" "+g,v++),n=new RegExp("^(?:"+h+")",d)),p&&(n=new RegExp("^"+h+"$(?!\\s)",d)),l&&(t=c.lastIndex),r=u.call(a?n:c,g),a?r?(r.input=r.input.slice(v),r[0]=r[0].slice(v),r.index=c.lastIndex,c.lastIndex+=r[0].length):c.lastIndex=0:l&&r&&(c.lastIndex=c.global?r.index+r[0].length:t),p&&r&&r.length>1&&s.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r}),e.exports=a},function(e,t,n){var r=n(1),o=n(17),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(2),o=n(10);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(2),o=n(36),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){var r=n(28),o=n(37);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.2",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(25),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(71),o=n(35),i=n(16),c=n(13),u=n(42),s=[].push,a=function(e){var t=1==e,n=2==e,a=3==e,l=4==e,f=6==e,p=7==e,d=5==e||f;return function(h,v,g,m){for(var y,b,x=i(h),_=o(x),S=r(v,g,3),O=c(_.length),C=0,w=m||u,E=t?w(h,O):n||p?w(h,0):void 0;O>C;C++)if((d||C in _)&&(b=S(y=_[C],C,x),e))if(t)E[C]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return C;case 2:s.call(E,y)}else switch(e){case 4:return!1;case 7:s.call(E,y)}return f?-1:a||l?l:E}};e.exports={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterOut:a(7)}},function(e,t,n){var r=n(5),o=n(31),i=n(3)("species");e.exports=function(e,t){var n;return o(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r=n(1);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){"use strict";var r=n(1);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){"use strict";var r=n(4),o=n(68).indexOf,i=n(44),c=n(32),u=[].indexOf,s=!!u&&1/[1].indexOf(1,-0)<0,a=i("indexOf"),l=c("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:s||!a||!l},{indexOf:function(e){return s?u.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(21),o=n(8),i=n(20);e.exports=function(e,t,n){var c=r(t);c in e?o.f(e,c,i(0,n)):e[c]=n}},function(e,t,n){var r=n(1),o=n(3),i=n(74),c=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[c]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){var r=n(67),o=n(40);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(5),o=n(50);e.exports=function(e,t,n){var i,c;return o&&"function"==typeof(i=t.constructor)&&i!==n&&r(c=i.prototype)&&c!==n.prototype&&o(e,c),e}},function(e,t,n){var r=n(7),o=n(110);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,i){return r(n),o(i),t?e.call(n,i):n.__proto__=i,n}}():void 0)},function(e,t,n){var r=n(14),o="["+n(52)+"]",i=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),u=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(i,"")),2&e&&(n=n.replace(c,"")),n}};e.exports={start:u(1),end:u(2),trim:u(3)}},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){var r={};r[n(3)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){"use strict";var r=n(7);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";n(82);var r=n(11),o=n(1),i=n(3),c=n(34),u=n(10),s=i("species"),a=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l="$0"==="a".replace(/./,"$0"),f=i("replace"),p=!!/./[f]&&""===/./[f]("a","$0"),d=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var h=i(e),v=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),g=v&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!v||!g||"replace"===e&&(!a||!l||p)||"split"===e&&!d){var m=/./[h],y=n(h,""[e],(function(e,t,n,r,o){return t.exec===c?v&&!o?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=y[0],x=y[1];r(String.prototype,e,b),r(RegExp.prototype,h,2==t?function(e,t){return x.call(e,this,t)}:function(e){return x.call(e,this)})}f&&u(RegExp.prototype[h],"sham",!0)}},function(e,t,n){"use strict";var r=n(83).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){var r=n(22),o=n(5),i=n(6),c=n(8).f,u=n(29),s=n(133),a=u("meta"),l=0,f=Object.isExtensible||function(){return!0},p=function(e){c(e,a,{value:{objectID:"O"+ ++l,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,a)){if(!f(e))return"F";if(!t)return"E";p(e)}return e[a].objectID},getWeakData:function(e,t){if(!i(e,a)){if(!f(e))return!0;if(!t)return!1;p(e)}return e[a].weakData},onFreeze:function(e){return s&&d.REQUIRED&&f(e)&&!i(e,a)&&p(e),e}};r[a]=!0},,function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(9),o=n(1),i=n(62);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(2),o=n(5),i=r.document,c=o(i)&&o(i.createElement);e.exports=function(e){return c?i.createElement(e):{}}},function(e,t,n){var r=n(37),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(2),o=n(63),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){var r=n(6),o=n(94),i=n(19),c=n(8);e.exports=function(e,t){for(var n=o(t),u=c.f,s=i.f,a=0;a<n.length;a++){var l=n[a];r(e,l)||u(e,l,s(t,l))}}},function(e,t,n){var r=n(2);e.exports=r},function(e,t,n){var r=n(6),o=n(12),i=n(68).indexOf,c=n(22);e.exports=function(e,t){var n,u=o(e),s=0,a=[];for(n in u)!r(c,n)&&r(u,n)&&a.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~i(a,n)||a.push(n));return a}},function(e,t,n){var r=n(12),o=n(13),i=n(39),c=function(e){return function(t,n,c){var u,s=r(t),a=o(s.length),l=i(c,a);if(e&&n!=n){for(;a>l;)if((u=s[l++])!=u)return!0}else for(;a>l;l++)if((e||l in s)&&s[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:c(!0),indexOf:c(!1)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(41).forEach,o=n(44),i=n(32),c=o("forEach"),u=i("forEach");e.exports=c&&u?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){var r=n(72);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(43);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r,o,i=n(2),c=n(96),u=i.process,s=u&&u.versions,a=s&&s.v8;a?o=(r=a.split("."))[0]+r[1]:c&&(!(r=c.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=c.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var r=n(12),o=n(24).f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return c&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return c.slice()}}(e):o(r(e))}},function(e,t,n){var r=n(3);t.f=r},function(e,t,n){var r=n(66),o=n(6),i=n(77),c=n(8).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||c(t,e,{value:i.f(e)})}},function(e,t,n){var r=n(53),o=n(17),i=n(3)("toStringTag"),c="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:c?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r=n(5),o=n(17),i=n(3)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){"use strict";var r=n(1);function o(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){"use strict";var r=n(4),o=n(34);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(e,t,n){var r=n(25),o=n(14),i=function(e){return function(t,n){var i,c,u=String(o(t)),s=r(n),a=u.length;return s<0||s>=a?e?"":void 0:(i=u.charCodeAt(s))<55296||i>56319||s+1===a||(c=u.charCodeAt(s+1))<56320||c>57343?e?u.charAt(s):i:e?u.slice(s,s+2):c-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,n){"use strict";var r=n(4),o=n(123),i=n(86),c=n(50),u=n(18),s=n(10),a=n(11),l=n(3),f=n(28),p=n(26),d=n(85),h=d.IteratorPrototype,v=d.BUGGY_SAFARI_ITERATORS,g=l("iterator"),m=function(){return this};e.exports=function(e,t,n,l,d,y,b){o(n,t,l);var x,_,S,O=function(e){if(e===d&&k)return k;if(!v&&e in E)return E[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},C=t+" Iterator",w=!1,E=e.prototype,j=E[g]||E["@@iterator"]||d&&E[d],k=!v&&j||O(d),N="Array"==t&&E.entries||j;if(N&&(x=i(N.call(new e)),h!==Object.prototype&&x.next&&(f||i(x)===h||(c?c(x,h):"function"!=typeof x[g]&&s(x,g,m)),u(x,C,!0,!0),f&&(p[C]=m))),"values"==d&&j&&"values"!==j.name&&(w=!0,k=function(){return j.call(this)}),f&&!b||E[g]===k||s(E,g,k),p[t]=k,d)if(_={values:O("values"),keys:y?k:O("keys"),entries:O("entries")},b)for(S in _)(v||w||!(S in E))&&a(E,S,_[S]);else r({target:t,proto:!0,forced:v||w},_);return _}},function(e,t,n){"use strict";var r,o,i,c=n(86),u=n(10),s=n(6),a=n(3),l=n(28),f=a("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=c(c(i)))!==Object.prototype&&(r=o):p=!0),null==r&&(r={}),l||s(r,f)||u(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(e,t,n){var r=n(6),o=n(16),i=n(27),c=n(124),u=i("IE_PROTO"),s=Object.prototype;e.exports=c?Object.getPrototypeOf:function(e){return e=o(e),r(e,u)?e[u]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){var r=n(11);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){var r=n(7),o=n(135),i=n(13),c=n(71),u=n(136),s=n(137),a=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var l,f,p,d,h,v,g,m=n&&n.that,y=!(!n||!n.AS_ENTRIES),b=!(!n||!n.IS_ITERATOR),x=!(!n||!n.INTERRUPTED),_=c(t,m,1+y+x),S=function(e){return l&&s(l),new a(!0,e)},O=function(e){return y?(r(e),x?_(e[0],e[1],S):_(e[0],e[1])):x?_(e,S):_(e)};if(b)l=e;else{if("function"!=typeof(f=u(e)))throw TypeError("Target is not iterable");if(o(f)){for(p=0,d=i(e.length);d>p;p++)if((h=O(e[p]))&&h instanceof a)return h;return new a(!1)}l=f.call(e)}for(v=l.next;!(g=v.call(l)).done;){try{h=O(g.value)}catch(e){throw s(l),e}if("object"==typeof h&&h&&h instanceof a)return h}return new a(!1)}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){n(98),n(101),n(102),n(103),n(45),n(104),n(105),n(106),n(107),n(108),n(109),n(111),n(112),n(113),n(114),n(115),n(117),n(119),n(82),n(121),n(122),n(125),n(126),n(128),n(130),n(132),n(140);var r=n(143);e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===r(e)&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"06cf":function(e,t,n){var r=n("83ab"),o=n("d1e7"),i=n("5c6c"),c=n("fc6a"),u=n("c04e"),s=n("5135"),a=n("0cfb"),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=c(e),t=u(t,!0),a)try{return l(e,t)}catch(e){}if(s(e,t))return i(!o.f.call(e,t),e[t])}},"0cfb":function(e,t,n){var r=n("83ab"),o=n("d039"),i=n("cc12");e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"1be4":function(e,t,n){var r=n("d066");e.exports=r("document","documentElement")},"1d80":function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},"23cb":function(e,t,n){var r=n("a691"),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},"241c":function(e,t,n){var r=n("ca84"),o=n("7839").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},"37e8":function(e,t,n){var r=n("83ab"),o=n("9bf2"),i=n("825a"),c=n("df75");e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=c(t),u=r.length,s=0;u>s;)o.f(e,n=r[s++],t[n]);return e}},"3bbe":function(e,t,n){var r=n("861d");e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"428f":function(e,t,n){var r=n("da84");e.exports=r},"44ad":function(e,t,n){var r=n("d039"),o=n("c6b6"),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},"4d64":function(e,t,n){var r=n("fc6a"),o=n("50c4"),i=n("23cb"),c=function(e){return function(t,n,c){var u,s=r(t),a=o(s.length),l=i(c,a);if(e&&n!=n){for(;a>l;)if((u=s[l++])!=u)return!0}else for(;a>l;l++)if((e||l in s)&&s[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:c(!0),indexOf:c(!1)}},"50c4":function(e,t,n){var r=n("a691"),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},5135:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},5692:function(e,t,n){var r=n("c430"),o=n("c6cd");(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.2",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},5899:function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(e,t,n){var r=n("1d80"),o="["+n("5899")+"]",i=RegExp("^"+o+o+"*"),c=RegExp(o+o+"*$"),u=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(i,"")),2&e&&(n=n.replace(c,"")),n}};e.exports={start:u(1),end:u(2),trim:u(3)}},"5c6c":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"69f3":function(e,t,n){var r,o,i,c=n("7f9a"),u=n("da84"),s=n("861d"),a=n("9112"),l=n("5135"),f=n("c6cd"),p=n("f772"),d=n("d012"),h=u.WeakMap;if(c){var v=f.state||(f.state=new h),g=v.get,m=v.has,y=v.set;r=function(e,t){return t.facade=e,y.call(v,e,t),t},o=function(e){return g.call(v,e)||{}},i=function(e){return m.call(v,e)}}else{var b=p("state");d[b]=!0,r=function(e,t){return t.facade=e,a(e,b,t),t},o=function(e){return l(e,b)?e[b]:{}},i=function(e){return l(e,b)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},"6eeb":function(e,t,n){var r=n("da84"),o=n("9112"),i=n("5135"),c=n("ce4e"),u=n("8925"),s=n("69f3"),a=s.get,l=s.enforce,f=String(String).split("String");(e.exports=function(e,t,n,u){var s,a=!!u&&!!u.unsafe,p=!!u&&!!u.enumerable,d=!!u&&!!u.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),(s=l(n)).source||(s.source=f.join("string"==typeof t?t:""))),e!==r?(a?!d&&e[t]&&(p=!0):delete e[t],p?e[t]=n:o(e,t,n)):p?e[t]=n:c(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&a(this).source||u(this)}))},7156:function(e,t,n){var r=n("861d"),o=n("d2bb");e.exports=function(e,t,n){var i,c;return o&&"function"==typeof(i=t.constructor)&&i!==n&&r(c=i.prototype)&&c!==n.prototype&&o(e,c),e}},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7c73":function(e,t,n){var r,o=n("825a"),i=n("37e8"),c=n("7839"),u=n("d012"),s=n("1be4"),a=n("cc12"),l=n("f772"),f=l("IE_PROTO"),p=function(){},d=function(e){return"<script>"+e+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;h=r?function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=a("iframe")).style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F);for(var n=c.length;n--;)delete h.prototype[c[n]];return h()};u[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=o(e),n=new p,p.prototype=null,n[f]=e):n=h(),void 0===t?n:i(n,t)}},"7f9a":function(e,t,n){var r=n("da84"),o=n("8925"),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},"825a":function(e,t,n){var r=n("861d");e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},"83ab":function(e,t,n){var r=n("d039");e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(e,t){e.exports=function(e){return"object"===r(e)?null!==e:"function"==typeof e}},8925:function(e,t,n){var r=n("c6cd"),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},"8bbf":function(e,t){e.exports=n(0)},"90e3":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},9112:function(e,t,n){var r=n("83ab"),o=n("9bf2"),i=n("5c6c");e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},"94ca":function(e,t,n){var r=n("d039"),o=/#|\.prototype\./,i=function(e,t){var n=u[c(e)];return n==a||n!=s&&("function"==typeof t?r(t):!!t)},c=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},u=i.data={},s=i.NATIVE="N",a=i.POLYFILL="P";e.exports=i},"9bf2":function(e,t,n){var r=n("83ab"),o=n("0cfb"),i=n("825a"),c=n("c04e"),u=Object.defineProperty;t.f=r?u:function(e,t,n){if(i(e),t=c(t,!0),i(n),o)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},a560:function(e,t,n){},a691:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},a9e3:function(e,t,n){"use strict";var r=n("83ab"),o=n("da84"),i=n("94ca"),c=n("6eeb"),u=n("5135"),s=n("c6b6"),a=n("7156"),l=n("c04e"),f=n("d039"),p=n("7c73"),d=n("241c").f,h=n("06cf").f,v=n("9bf2").f,g=n("58a8").trim,m=o.Number,y=m.prototype,b="Number"==s(p(y)),x=function(e){var t,n,r,o,i,c,u,s,a=l(e,!1);if("string"==typeof a&&a.length>2)if(43===(t=(a=g(a)).charCodeAt(0))||45===t){if(88===(n=a.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(a.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+a}for(c=(i=a.slice(2)).length,u=0;u<c;u++)if((s=i.charCodeAt(u))<48||s>o)return NaN;return parseInt(i,r)}return+a};if(i("Number",!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var _,S=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof S&&(b?f((function(){y.valueOf.call(n)})):"Number"!=s(n))?a(new m(x(t)),n,S):x(t)},O=r?d(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),C=0;O.length>C;C++)u(m,_=O[C])&&!u(S,_)&&v(S,_,h(m,_));S.prototype=y,y.constructor=S,c(o,"Number",S)}},c04e:function(e,t,n){var r=n("861d");e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},c430:function(e,t){e.exports=!1},c6b6:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},c6cd:function(e,t,n){var r=n("da84"),o=n("ce4e"),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":r(window))&&(n=window)}e.exports=n},ca84:function(e,t,n){var r=n("5135"),o=n("fc6a"),i=n("4d64").indexOf,c=n("d012");e.exports=function(e,t){var n,u=o(e),s=0,a=[];for(n in u)!r(c,n)&&r(u,n)&&a.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~i(a,n)||a.push(n));return a}},cc12:function(e,t,n){var r=n("da84"),o=n("861d"),i=r.document,c=o(i)&&o(i.createElement);e.exports=function(e){return c?i.createElement(e):{}}},ce4e:function(e,t,n){var r=n("da84"),o=n("9112");e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},d012:function(e,t){e.exports={}},d039:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},d066:function(e,t,n){var r=n("428f"),o=n("da84"),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},d1e7:function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},d2bb:function(e,t,n){var r=n("825a"),o=n("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,i){return r(n),o(i),t?e.call(n,i):n.__proto__=i,n}}():void 0)},da84:function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==("undefined"==typeof globalThis?"undefined":r(globalThis))&&globalThis)||n("object"==("undefined"==typeof window?"undefined":r(window))&&window)||n("object"==("undefined"==typeof self?"undefined":r(self))&&self)||n("object"==r(t)&&t)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},df75:function(e,t,n){var r=n("ca84"),o=n("7839");e.exports=Object.keys||function(e){return r(e,o)}},f772:function(e,t,n){var r=n("5692"),o=n("90e3"),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},fb15:function(e,t,n){"use strict";if(n.r(t),n.d(t,"BlocksNode",(function(){return p})),n.d(t,"BlocksTree",(function(){return h})),"undefined"!=typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=n("8bbf"),c={class:"org-tree-container"};n("a9e3");var u={class:"org-tree-node-label"},s={key:0},a={key:1},l={key:0,class:"org-tree-node-children"};var f=Object(i.defineComponent)({name:"blocks-node",props:{data:{type:Object,required:!0},props:{type:Object,default:function(){return{label:"label",expand:"expand",children:"children"}}},collapsable:{type:Boolean,default:!1},renderContent:Function,labelWidth:[String,Number],labelClassName:[String,Function]},setup:function(e,t){t.slots,t.attrs;var n=t.emit,r=(t.expose,Object(i.computed)((function(){return!(Array.isArray(e.data[e.props.children])&&e.data[e.props.children].length>0)}))),o=Object(i.computed)((function(){return e.labelWidth?"number"==typeof e.labelWidth?"".concat(e.labelWidth,"px"):e.labelWidth:"auto"})),c=Object(i.ref)(e.data[e.props.expand]||!0),u=Object(i.computed)((function(){return{"org-tree-node":!0,"is-leaf":r.value,collapsed:!r.value&&e.collapsable&&!c.value}})),s=Object(i.computed)((function(){var t,n,r,o="function"==typeof e.labelClassName?e.labelClassName(e.data):e.labelClassName;return r=!!o,(n=o)in(t={"org-tree-node-label-inner":!0})?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t})),a=Object(i.computed)((function(){return{"org-tree-node-btn":!0,expanded:!!c.value}})),l=function(){c.value=!c.value},f={isExpanded:function(){return c.value},toggleExpand:l};return{nodeClass:u,innerLabelClass:s,isLeaf:r,nodeExpandBtnClass:a,onExpandBtnClick:function(t){l(),n("node-expand",t,e.data,f)},labelWidth:o,expanded:c,data:e.data,nodeContext:f}}});f.render=function(e,t){var n=Object(i.resolveComponent)("_self");return Object(i.openBlock)(),Object(i.createBlock)("div",{class:e.nodeClass},[Object(i.createVNode)("div",u,[Object(i.createVNode)("div",{class:e.innerLabelClass,style:{width:e.labelWidth},onClick:t[2]||(t[2]=function(t){return e.$emit("node-click",t,e.data,e.nodeContext)}),onMouseout:t[3]||(t[3]=function(t){return e.$emit("node-mouseout",t,e.data,e.nodeContext)}),onMouseover:t[4]||(t[4]=function(t){return e.$emit("node-mouseover",t,e.data,e.nodeContext)}),onFocus:t[5]||(t[5]=function(t){return e.$emit("node-focus",t,e.data,e.nodeContext)})},[Object(i.renderSlot)(e.$slots,"node",{data:e.data,context:e.nodeContext},(function(){return[e.renderContent?(Object(i.openBlock)(),Object(i.createBlock)("span",a,Object(i.toDisplayString)(e.renderContent(e.data)),1)):(Object(i.openBlock)(),Object(i.createBlock)("span",s,Object(i.toDisplayString)(e.data[e.props.label]),1))]})),e.collapsable&&!e.isLeaf?(Object(i.openBlock)(),Object(i.createBlock)("span",{key:0,class:e.nodeExpandBtnClass,onClick:t[1]||(t[1]=Object(i.withModifiers)((function(){return e.onExpandBtnClick&&e.onExpandBtnClick.apply(e,arguments)}),["stop"]))},null,2)):Object(i.createCommentVNode)("",!0)],38)]),e.collapsable&&e.expanded&&!e.isLeaf||!e.collapsable&&!e.isLeaf?(Object(i.openBlock)(),Object(i.createBlock)("div",l,[(Object(i.openBlock)(!0),Object(i.createBlock)(i.Fragment,null,Object(i.renderList)(e.data[e.props.children],(function(r){return Object(i.openBlock)(),Object(i.createBlock)(n,{data:r,props:e.props,collapsable:e.collapsable,renderContent:e.renderContent,labelWidth:e.labelWidth,labelClassName:e.labelClassName,onNodeExpand:t[6]||(t[6]=function(t,n,r){return e.$emit("node-expand",t,n,r)}),onNodeFocus:t[7]||(t[7]=function(t,n,r){return e.$emit("node-focus",t,n,r)}),onNodeClick:t[8]||(t[8]=function(t,n,r){return e.$emit("node-click",t,n,r)}),onNodeMouseover:t[9]||(t[9]=function(t,n,r){return e.$emit("node-mouseover",t,n,r)}),onNodeMouseout:t[10]||(t[10]=function(t,n,r){return e.$emit("node-mouseout",t,n,r)})},{node:Object(i.withCtx)((function(t){var n=t.data,r=t.context;return[Object(i.renderSlot)(e.$slots,"node",{data:n,context:r})]})),_:2},1032,["data","props","collapsable","renderContent","labelWidth","labelClassName"])})),256))])):Object(i.createCommentVNode)("",!0)],2)};var p=f,d=Object(i.defineComponent)({name:"blocks-tree",components:{"blocks-node":p},props:{data:{type:Object,required:!0},props:{type:Object,default:function(){return{label:"label",expand:"expand",children:"children"}}},horizontal:Boolean,collapsable:Boolean,renderContent:Function,labelWidth:[String,Number],labelClassName:[Function,String]}});d.render=function(e,t){var n=Object(i.resolveComponent)("blocks-node");return Object(i.openBlock)(),Object(i.createBlock)("div",c,[Object(i.createVNode)("div",{class:["org-tree",{horizontal:e.horizontal,collapsable:e.collapsable}]},[Object(i.createVNode)(n,{data:e.data,props:e.props,horizontal:e.horizontal,"label-width":e.labelWidth,collapsable:e.collapsable,"render-content":e.renderContent,"label-class-name":e.labelClassName,onNodeExpand:t[1]||(t[1]=function(t,n,r){return e.$emit("node-expand",t,n,r)}),onNodeFocus:t[2]||(t[2]=function(t,n,r){return e.$emit("node-focus",t,n,r)}),onNodeClick:t[3]||(t[3]=function(t,n,r){return e.$emit("node-click",t,n,r)}),onNodeMouseover:t[4]||(t[4]=function(t,n,r){return e.$emit("node-mouseover",t,n,r)}),onNodeMouseout:t[5]||(t[5]=function(t,n,r){return e.$emit("node-mouseout",t,n,r)})},{node:Object(i.withCtx)((function(t){var n=t.data,r=t.context;return[Object(i.renderSlot)(e.$slots,"node",{data:n,context:r})]})),_:1},8,["data","props","horizontal","label-width","collapsable","render-content","label-class-name"])],2)])};var h=d;n("a560");h.install=function(e,t){e.component(t&&t.treeName?t.treeName:"blocks-tree",h),e.component(t&&t.nodeName?t.nodeName:"blocks-node",h)};var v=h;t.default=v},fc6a:function(e,t,n){var r=n("44ad"),o=n("1d80");e.exports=function(e){return r(o(e))}}})},function(e,t,n){},function(e,t,n){"use strict";var r=n(4),o=n(70);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(23),o=n(24),i=n(69),c=n(7);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(c(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";var r=n(4),o=n(39),i=n(25),c=n(13),u=n(16),s=n(42),a=n(46),l=n(47),f=n(32),p=l("splice"),d=f("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,v=Math.min;r({target:"Array",proto:!0,forced:!p||!d},{splice:function(e,t){var n,r,l,f,p,d,g=u(this),m=c(g.length),y=o(e,m),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=m-y):(n=b-2,r=v(h(i(t),0),m-y)),m+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(l=s(g,r),f=0;f<r;f++)(p=y+f)in g&&a(l,f,g[p]);if(l.length=r,n<r){for(f=y;f<m-r;f++)d=f+n,(p=f+r)in g?g[d]=g[p]:delete g[d];for(f=m;f>m-r+n;f--)delete g[f-1]}else if(n>r)for(f=m-r;f>y;f--)d=f+n-1,(p=f+r-1)in g?g[d]=g[p]:delete g[d];for(f=0;f<n;f++)g[f+y]=arguments[f+2];return g.length=m-r+n,l}})},function(e,t,n){var r=n(23);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(2),o=n(75),i=n(70),c=n(10);for(var u in o){var s=r[u],a=s&&s.prototype;if(a&&a.forEach!==i)try{c(a,"forEach",i)}catch(e){a.forEach=i}}},function(e,t,n){"use strict";var r=n(4),o=n(2),i=n(23),c=n(28),u=n(9),s=n(43),a=n(73),l=n(1),f=n(6),p=n(31),d=n(5),h=n(7),v=n(16),g=n(12),m=n(21),y=n(20),b=n(33),x=n(48),_=n(24),S=n(76),O=n(69),C=n(19),w=n(8),E=n(60),j=n(10),k=n(11),N=n(38),T=n(27),A=n(22),I=n(29),R=n(3),F=n(77),P=n(78),M=n(18),L=n(15),B=n(41).forEach,V=T("hidden"),$=R("toPrimitive"),U=L.set,D=L.getterFor("Symbol"),z=Object.prototype,W=o.Symbol,H=i("JSON","stringify"),G=C.f,K=w.f,q=S.f,X=E.f,Y=N("symbols"),J=N("op-symbols"),Q=N("string-to-symbol-registry"),Z=N("symbol-to-string-registry"),ee=N("wks"),te=o.QObject,ne=!te||!te.prototype||!te.prototype.findChild,re=u&&l((function(){return 7!=b(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=G(z,t);r&&delete z[t],K(e,t,n),r&&e!==z&&K(z,t,r)}:K,oe=function(e,t){var n=Y[e]=b(W.prototype);return U(n,{type:"Symbol",tag:e,description:t}),u||(n.description=t),n},ie=a?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof W},ce=function(e,t,n){e===z&&ce(J,t,n),h(e);var r=m(t,!0);return h(n),f(Y,r)?(n.enumerable?(f(e,V)&&e[V][r]&&(e[V][r]=!1),n=b(n,{enumerable:y(0,!1)})):(f(e,V)||K(e,V,y(1,{})),e[V][r]=!0),re(e,r,n)):K(e,r,n)},ue=function(e,t){h(e);var n=g(t),r=x(n).concat(fe(n));return B(r,(function(t){u&&!se.call(n,t)||ce(e,t,n[t])})),e},se=function(e){var t=m(e,!0),n=X.call(this,t);return!(this===z&&f(Y,t)&&!f(J,t))&&(!(n||!f(this,t)||!f(Y,t)||f(this,V)&&this[V][t])||n)},ae=function(e,t){var n=g(e),r=m(t,!0);if(n!==z||!f(Y,r)||f(J,r)){var o=G(n,r);return!o||!f(Y,r)||f(n,V)&&n[V][r]||(o.enumerable=!0),o}},le=function(e){var t=q(g(e)),n=[];return B(t,(function(e){f(Y,e)||f(A,e)||n.push(e)})),n},fe=function(e){var t=e===z,n=q(t?J:g(e)),r=[];return B(n,(function(e){!f(Y,e)||t&&!f(z,e)||r.push(Y[e])})),r};(s||(k((W=function(){if(this instanceof W)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=I(e),n=function(e){this===z&&n.call(J,e),f(this,V)&&f(this[V],t)&&(this[V][t]=!1),re(this,t,y(1,e))};return u&&ne&&re(z,t,{configurable:!0,set:n}),oe(t,e)}).prototype,"toString",(function(){return D(this).tag})),k(W,"withoutSetter",(function(e){return oe(I(e),e)})),E.f=se,w.f=ce,C.f=ae,_.f=S.f=le,O.f=fe,F.f=function(e){return oe(R(e),e)},u&&(K(W.prototype,"description",{configurable:!0,get:function(){return D(this).description}}),c||k(z,"propertyIsEnumerable",se,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:W}),B(x(ee),(function(e){P(e)})),r({target:"Symbol",stat:!0,forced:!s},{for:function(e){var t=String(e);if(f(Q,t))return Q[t];var n=W(t);return Q[t]=n,Z[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(f(Z,e))return Z[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!u},{create:function(e,t){return void 0===t?b(e):ue(b(e),t)},defineProperty:ce,defineProperties:ue,getOwnPropertyDescriptor:ae}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:le,getOwnPropertySymbols:fe}),r({target:"Object",stat:!0,forced:l((function(){O.f(1)}))},{getOwnPropertySymbols:function(e){return O.f(v(e))}}),H)&&r({target:"JSON",stat:!0,forced:!s||l((function(){var e=W();return"[null]"!=H([e])||"{}"!=H({a:e})||"{}"!=H(Object(e))}))},{stringify:function(e,t,n){for(var r,o=[e],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=t,(d(t)||void 0!==e)&&!ie(e))return p(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),o[1]=t,H.apply(null,o)}});W.prototype[$]||j(W.prototype,$,W.prototype.valueOf),M(W,"Symbol"),A[V]=!0},function(e,t,n){var r=n(9),o=n(8),i=n(7),c=n(48);e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=c(t),u=r.length,s=0;u>s;)o.f(e,n=r[s++],t[n]);return e}},function(e,t,n){var r=n(23);e.exports=r("document","documentElement")},function(e,t,n){"use strict";var r=n(4),o=n(9),i=n(2),c=n(6),u=n(5),s=n(8).f,a=n(65),l=i.Symbol;if(o&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var f={},p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof p?new l(e):void 0===e?l():l(e);return""===e&&(f[t]=!0),t};a(p,l);var d=p.prototype=l.prototype;d.constructor=p;var h=d.toString,v="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;s(d,"description",{configurable:!0,get:function(){var e=u(this)?this.valueOf():this,t=h.call(e);if(c(f,e))return"";var n=v?t.slice(7,-1):t.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},function(e,t,n){n(78)("toStringTag")},function(e,t,n){"use strict";var r=n(4),o=n(1),i=n(31),c=n(5),u=n(16),s=n(13),a=n(46),l=n(42),f=n(47),p=n(3),d=n(74),h=p("isConcatSpreadable"),v=d>=51||!o((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),g=f("concat"),m=function(e){if(!c(e))return!1;var t=e[h];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,forced:!v||!g},{concat:function(e){var t,n,r,o,i,c=u(this),f=l(c,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(m(i=-1===t?c:arguments[t])){if(p+(o=s(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,p++)n in i&&a(f,p,i[n])}else{if(p>=9007199254740991)throw TypeError("Maximum allowed index exceeded");a(f,p++,i)}return f.length=p,f}})},function(e,t,n){"use strict";var r=n(4),o=n(35),i=n(12),c=n(44),u=[].join,s=o!=Object,a=c("join",",");r({target:"Array",proto:!0,forced:s||!a},{join:function(e){return u.call(i(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(31),c=n(39),u=n(13),s=n(12),a=n(46),l=n(3),f=n(47),p=n(32),d=f("slice"),h=p("slice",{ACCESSORS:!0,0:0,1:2}),v=l("species"),g=[].slice,m=Math.max;r({target:"Array",proto:!0,forced:!d||!h},{slice:function(e,t){var n,r,l,f=s(this),p=u(f.length),d=c(e,p),h=c(void 0===t?p:t,p);if(i(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[v])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(f,d,h);for(r=new(void 0===n?Array:n)(m(h-d,0)),l=0;d<h;d++,l++)d in f&&a(r,l,f[d]);return r.length=l,r}})},function(e,t,n){n(4)({global:!0},{globalThis:n(2)})},function(e,t,n){var r=n(2);n(18)(r.JSON,"JSON",!0)},function(e,t,n){n(18)(Math,"Math",!0)},function(e,t,n){"use strict";var r=n(9),o=n(2),i=n(30),c=n(11),u=n(6),s=n(17),a=n(49),l=n(21),f=n(1),p=n(33),d=n(24).f,h=n(19).f,v=n(8).f,g=n(51).trim,m=o.Number,y=m.prototype,b="Number"==s(p(y)),x=function(e){var t,n,r,o,i,c,u,s,a=l(e,!1);if("string"==typeof a&&a.length>2)if(43===(t=(a=g(a)).charCodeAt(0))||45===t){if(88===(n=a.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(a.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+a}for(c=(i=a.slice(2)).length,u=0;u<c;u++)if((s=i.charCodeAt(u))<48||s>o)return NaN;return parseInt(i,r)}return+a};if(i("Number",!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var _,S=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof S&&(b?f((function(){y.valueOf.call(n)})):"Number"!=s(n))?a(new m(x(t)),n,S):x(t)},O=r?d(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),C=0;O.length>C;C++)u(m,_=O[C])&&!u(S,_)&&v(S,_,h(m,_));S.prototype=y,y.constructor=S,c(o,"Number",S)}},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){var r=n(4),o=n(1),i=n(12),c=n(19).f,u=n(9),s=o((function(){c(1)}));r({target:"Object",stat:!0,forced:!u||s,sham:!u},{getOwnPropertyDescriptor:function(e,t){return c(i(e),t)}})},function(e,t,n){var r=n(4),o=n(1),i=n(76).f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},function(e,t,n){var r=n(4),o=n(16),i=n(48);r({target:"Object",stat:!0,forced:n(1)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},function(e,t,n){n(4)({target:"Object",stat:!0},{setPrototypeOf:n(50)})},function(e,t,n){var r=n(53),o=n(11),i=n(116);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,n){"use strict";var r=n(53),o=n(79);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){var r=n(4),o=n(118);r({global:!0,forced:parseInt!=o},{parseInt:o})},function(e,t,n){var r=n(2),o=n(51).trim,i=n(52),c=r.parseInt,u=/^[+-]?0[Xx]/,s=8!==c(i+"08")||22!==c(i+"0x16");e.exports=s?function(e,t){var n=o(String(e));return c(n,t>>>0||(u.test(n)?16:10))}:c},function(e,t,n){var r=n(9),o=n(2),i=n(30),c=n(49),u=n(8).f,s=n(24).f,a=n(80),l=n(54),f=n(81),p=n(11),d=n(1),h=n(15).set,v=n(120),g=n(3)("match"),m=o.RegExp,y=m.prototype,b=/a/g,x=/a/g,_=new m(b)!==b,S=f.UNSUPPORTED_Y;if(r&&i("RegExp",!_||S||d((function(){return x[g]=!1,m(b)!=b||m(x)==x||"/a/i"!=m(b,"i")})))){for(var O=function(e,t){var n,r=this instanceof O,o=a(e),i=void 0===t;if(!r&&o&&e.constructor===O&&i)return e;_?o&&!i&&(e=e.source):e instanceof O&&(i&&(t=l.call(e)),e=e.source),S&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var u=c(_?new m(e,t):m(e,t),r?this:y,O);return S&&n&&h(u,{sticky:n}),u},C=function(e){e in O||u(O,e,{configurable:!0,get:function(){return m[e]},set:function(t){m[e]=t}})},w=s(m),E=0;w.length>E;)C(w[E++]);y.constructor=O,O.prototype=y,p(o,"RegExp",O)}v("RegExp")},function(e,t,n){"use strict";var r=n(23),o=n(8),i=n(3),c=n(9),u=i("species");e.exports=function(e){var t=r(e),n=o.f;c&&t&&!t[u]&&n(t,u,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(11),o=n(7),i=n(1),c=n(54),u=RegExp.prototype,s=u.toString,a=i((function(){return"/a/b"!=s.call({source:"a",flags:"b"})})),l="toString"!=s.name;(a||l)&&r(RegExp.prototype,"toString",(function(){var e=o(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in u)?c.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var r=n(83).charAt,o=n(15),i=n(84),c=o.set,u=o.getterFor("String Iterator");i(String,"String",(function(e){c(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=u(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(85).IteratorPrototype,o=n(33),i=n(20),c=n(18),u=n(26),s=function(){return this};e.exports=function(e,t,n){var a=t+" Iterator";return e.prototype=o(r,{next:i(1,n)}),c(e,a,!1,!0),u[a]=s,e}},function(e,t,n){var r=n(1);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var r=n(55),o=n(7),i=n(13),c=n(14),u=n(56),s=n(57);r("match",1,(function(e,t,n){return[function(t){var n=c(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var c=o(e),a=String(this);if(!c.global)return s(c,a);var l=c.unicode;c.lastIndex=0;for(var f,p=[],d=0;null!==(f=s(c,a));){var h=String(f[0]);p[d]=h,""===h&&(c.lastIndex=u(a,i(c.lastIndex),l)),d++}return 0===d?null:p}]}))},function(e,t,n){"use strict";var r=n(55),o=n(7),i=n(13),c=n(25),u=n(14),s=n(56),a=n(127),l=n(57),f=Math.max,p=Math.min;r("replace",2,(function(e,t,n,r){var d=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,h=r.REPLACE_KEEPS_$0,v=d?"$":"$0";return[function(n,r){var o=u(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!d&&h||"string"==typeof r&&-1===r.indexOf(v)){var u=n(t,e,this,r);if(u.done)return u.value}var g=o(e),m=String(this),y="function"==typeof r;y||(r=String(r));var b=g.global;if(b){var x=g.unicode;g.lastIndex=0}for(var _=[];;){var S=l(g,m);if(null===S)break;if(_.push(S),!b)break;""===String(S[0])&&(g.lastIndex=s(m,i(g.lastIndex),x))}for(var O,C="",w=0,E=0;E<_.length;E++){S=_[E];for(var j=String(S[0]),k=f(p(c(S.index),m.length),0),N=[],T=1;T<S.length;T++)N.push(void 0===(O=S[T])?O:String(O));var A=S.groups;if(y){var I=[j].concat(N,k,m);void 0!==A&&I.push(A);var R=String(r.apply(void 0,I))}else R=a(j,m,k,N,A,r);k>=w&&(C+=m.slice(w,k)+R,w=k+j.length)}return C+m.slice(w)}]}))},function(e,t,n){var r=n(16),o=Math.floor,i="".replace,c=/\$([$&'`]|\d\d?|<[^>]*>)/g,u=/\$([$&'`]|\d\d?)/g;e.exports=function(e,t,n,s,a,l){var f=n+e.length,p=s.length,d=u;return void 0!==a&&(a=r(a),d=c),i.call(l,d,(function(r,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(f);case"<":c=a[i.slice(1,-1)];break;default:var u=+i;if(0===u)return r;if(u>p){var l=o(u/10);return 0===l?r:l<=p?void 0===s[l-1]?i.charAt(1):s[l-1]+i.charAt(1):r}c=s[u-1]}return void 0===c?"":c}))}},function(e,t,n){"use strict";var r=n(55),o=n(80),i=n(7),c=n(14),u=n(129),s=n(56),a=n(13),l=n(57),f=n(34),p=n(1),d=[].push,h=Math.min,v=!p((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(c(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!o(e))return t.call(r,e,i);for(var u,s,a,l=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,v=new RegExp(e.source,p+"g");(u=f.call(v,r))&&!((s=v.lastIndex)>h&&(l.push(r.slice(h,u.index)),u.length>1&&u.index<r.length&&d.apply(l,u.slice(1)),a=u[0].length,h=s,l.length>=i));)v.lastIndex===u.index&&v.lastIndex++;return h===r.length?!a&&v.test("")||l.push(""):l.push(r.slice(h)),l.length>i?l.slice(0,i):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=c(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var c=n(r,e,this,o,r!==t);if(c.done)return c.value;var f=i(e),p=String(this),d=u(f,RegExp),g=f.unicode,m=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(v?"y":"g"),y=new d(v?f:"^(?:"+f.source+")",m),b=void 0===o?4294967295:o>>>0;if(0===b)return[];if(0===p.length)return null===l(y,p)?[p]:[];for(var x=0,_=0,S=[];_<p.length;){y.lastIndex=v?_:0;var O,C=l(y,v?p:p.slice(_));if(null===C||(O=h(a(y.lastIndex+(v?0:_)),p.length))===x)_=s(p,_,g);else{if(S.push(p.slice(x,_)),S.length===b)return S;for(var w=1;w<=C.length-1;w++)if(S.push(C[w]),S.length===b)return S;_=x=O}}return S.push(p.slice(x)),S}]}),!v)},function(e,t,n){var r=n(7),o=n(72),i=n(3)("species");e.exports=function(e,t){var n,c=r(e).constructor;return void 0===c||null==(n=r(c)[i])?t:o(n)}},function(e,t,n){"use strict";var r=n(4),o=n(51).trim;r({target:"String",proto:!0,forced:n(131)("trim")},{trim:function(){return o(this)}})},function(e,t,n){var r=n(1),o=n(52);e.exports=function(e){return r((function(){return!!o[e]()||"​…᠎"!="​…᠎"[e]()||o[e].name!==e}))}},function(e,t,n){"use strict";var r,o=n(2),i=n(87),c=n(58),u=n(134),s=n(139),a=n(5),l=n(15).enforce,f=n(64),p=!o.ActiveXObject&&"ActiveXObject"in o,d=Object.isExtensible,h=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},v=e.exports=u("WeakMap",h,s);if(f&&p){r=s.getConstructor(h,"WeakMap",!0),c.REQUIRED=!0;var g=v.prototype,m=g.delete,y=g.has,b=g.get,x=g.set;i(g,{delete:function(e){if(a(e)&&!d(e)){var t=l(this);return t.frozen||(t.frozen=new r),m.call(this,e)||t.frozen.delete(e)}return m.call(this,e)},has:function(e){if(a(e)&&!d(e)){var t=l(this);return t.frozen||(t.frozen=new r),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(a(e)&&!d(e)){var t=l(this);return t.frozen||(t.frozen=new r),y.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(a(e)&&!d(e)){var n=l(this);n.frozen||(n.frozen=new r),y.call(this,e)?x.call(this,e,t):n.frozen.set(e,t)}else x.call(this,e,t);return this}})}},function(e,t,n){var r=n(1);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var r=n(4),o=n(2),i=n(30),c=n(11),u=n(58),s=n(88),a=n(89),l=n(5),f=n(1),p=n(138),d=n(18),h=n(49);e.exports=function(e,t,n){var v=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),m=v?"set":"add",y=o[e],b=y&&y.prototype,x=y,_={},S=function(e){var t=b[e];c(b,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!l(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(i(e,"function"!=typeof y||!(g||b.forEach&&!f((function(){(new y).entries().next()})))))x=n.getConstructor(t,e,v,m),u.REQUIRED=!0;else if(i(e,!0)){var O=new x,C=O[m](g?{}:-0,1)!=O,w=f((function(){O.has(1)})),E=p((function(e){new y(e)})),j=!g&&f((function(){for(var e=new y,t=5;t--;)e[m](t,t);return!e.has(-0)}));E||((x=t((function(t,n){a(t,x,e);var r=h(new y,t,x);return null!=n&&s(n,r[m],{that:r,AS_ENTRIES:v}),r}))).prototype=b,b.constructor=x),(w||j)&&(S("delete"),S("has"),v&&S("get")),(j||C)&&S(m),g&&b.clear&&delete b.clear}return _[e]=x,r({global:!0,forced:x!=y},_),d(x,e),g||n.setStrong(x,e,v),x}},function(e,t,n){var r=n(3),o=n(26),i=r("iterator"),c=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||c[i]===e)}},function(e,t,n){var r=n(79),o=n(26),i=n(3)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(7);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},function(e,t,n){var r=n(3)("iterator"),o=!1;try{var i=0,c={next:function(){return{done:!!i++}},return:function(){o=!0}};c[r]=function(){return this},Array.from(c,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(87),o=n(58).getWeakData,i=n(7),c=n(5),u=n(89),s=n(88),a=n(41),l=n(6),f=n(15),p=f.set,d=f.getterFor,h=a.find,v=a.findIndex,g=0,m=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=v(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,a){var f=e((function(e,r){u(e,f,t),p(e,{type:t,id:g++,frozen:void 0}),null!=r&&s(r,e[a],{that:e,AS_ENTRIES:n})})),h=d(t),v=function(e,t,n){var r=h(e),c=o(i(t),!0);return!0===c?m(r).set(t,n):c[r.id]=n,e};return r(f.prototype,{delete:function(e){var t=h(this);if(!c(e))return!1;var n=o(e);return!0===n?m(t).delete(e):n&&l(n,t.id)&&delete n[t.id]},has:function(e){var t=h(this);if(!c(e))return!1;var n=o(e);return!0===n?m(t).has(e):n&&l(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=h(this);if(c(e)){var n=o(e);return!0===n?m(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return v(this,e,t)}}:{add:function(e){return v(this,e,!0)}}),f}}},function(e,t,n){var r=n(2),o=n(75),i=n(141),c=n(10),u=n(3),s=u("iterator"),a=u("toStringTag"),l=i.values;for(var f in o){var p=r[f],d=p&&p.prototype;if(d){if(d[s]!==l)try{c(d,s,l)}catch(e){d[s]=l}if(d[a]||c(d,a,f),o[f])for(var h in i)if(d[h]!==i[h])try{c(d,h,i[h])}catch(e){d[h]=i[h]}}}},function(e,t,n){"use strict";var r=n(12),o=n(142),i=n(26),c=n(15),u=n(84),s=c.set,a=c.getterFor("Array Iterator");e.exports=u(Array,"Array",(function(e,t){s(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=a(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){var r=n(3),o=n(33),i=n(8),c=r("unscopables"),u=Array.prototype;null==u[c]&&i.f(u,c,{configurable:!0,value:o(null)}),e.exports=function(e){u[c][e]=!0}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(90),i=n.n(o),c=(n(91),n(45),Object(r.createVNode)("h1",null,"Orientation",-1)),u=Object(r.createVNode)("option",{value:"0"},"Vertical",-1),s=Object(r.createVNode)("option",{value:"1"},"Horizontal",-1),a=Object(r.createVNode)("h1",null,"Basic",-1),l=Object(r.createVNode)("h1",null,"With slots",-1),f=Object(r.createVNode)("br",null,null,-1),p={key:0};n(92),n(95),n(97);var d=Object(r.defineComponent)({setup:function(){var e=Object(r.ref)([]),t=Object(r.ref)("0");return{treeData:Object(r.reactive)({label:"root",expand:!0,some_id:1,children:[{label:"child 1",some_id:2},{label:"child 2",some_id:3},{label:"subparent 1",some_id:4,expand:!1,children:[{label:"subchild 1",some_id:5},{label:"subchild 2",some_id:6,expand:!1,children:[{label:"subchild 11",some_id:7},{label:"subchild 22",some_id:8}]}]}]}),selected:e,toggleSelect:function t(n,r){r?e.value.push(n.some_id):e.value.splice(e.value.indexOf(n.some_id),1),n.children&&n.children.length&&n.children.forEach((function(e){t(e,r)}))},treeOrientation:t}}});d.render=function(e,t,n,o,i,d){var h=Object(r.resolveComponent)("blocks-tree");return Object(r.openBlock)(),Object(r.createBlock)(r.Fragment,null,[c,Object(r.withDirectives)(Object(r.createVNode)("select",{"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.treeOrientation=t})},[u,s],512),[[r.vModelSelect,e.treeOrientation]]),a,Object(r.createVNode)("div",null,[Object(r.createVNode)(h,{data:e.treeData,horizontal:"1"==e.treeOrientation,collapsable:!0},null,8,["data","horizontal"])]),l,Object(r.createVNode)("div",null,[Object(r.createVNode)(h,{data:e.treeData,horizontal:"1"==e.treeOrientation,collapsable:!0},{node:Object(r.withCtx)((function(t){var n=t.data,o=t.context;return[Object(r.createVNode)("span",null,[Object(r.createVNode)("input",{type:"checkbox",checked:e.selected.indexOf(n.some_id)>-1,onChange:function(t){return e.toggleSelect(n,t.target.checked)}},null,40,["checked","onChange"]),Object(r.createTextVNode)(" "+Object(r.toDisplayString)(n.label),1)]),f,n.children&&n.children.length?(Object(r.openBlock)(),Object(r.createBlock)("span",p,[Object(r.createVNode)("a",{href:"#",onClick:o.toggleExpand},"toggle expand",8,["onClick"])])):Object(r.createCommentVNode)("v-if",!0)]})),_:1},8,["data","horizontal"]),Object(r.createVNode)("div",null," Selected: "+Object(r.toDisplayString)(e.selected),1)])],64)};var h=d;Object(r.createApp)(h).use(i.a).mount("#app")}]);
self.__precacheManifest = (self.__precacheManifest || []).concat([ { "revision": "4cd67a6ded9815bf2b9984e97c050d89", "url": "/anylate/index.html" }, { "revision": "0b4b9100ed07e6516b78", "url": "/anylate/static/css/2.ff4a97c2.chunk.css" }, { "revision": "06a9b2c202fdad24a9b0", "url": "/anylate/static/css/main.92ce02b8.chunk.css" }, { "revision": "0b4b9100ed07e6516b78", "url": "/anylate/static/js/2.137e58b2.chunk.js" }, { "revision": "06a9b2c202fdad24a9b0", "url": "/anylate/static/js/main.aa5e557f.chunk.js" }, { "revision": "1bfeaac4417f489f59a1", "url": "/anylate/static/js/runtime-main.7df6f404.js" }, { "revision": "7f06b4e30317f784d61d26686aed0ab2", "url": "/anylate/static/media/KaTeX_AMS-Regular.7f06b4e3.woff" }, { "revision": "aaf4eee9fba9907d61c3935e0b6a54ae", "url": "/anylate/static/media/KaTeX_AMS-Regular.aaf4eee9.ttf" }, { "revision": "e78e28b4834954df047e4925e9dbf354", "url": "/anylate/static/media/KaTeX_AMS-Regular.e78e28b4.woff2" }, { "revision": "021dd4dc61ee5f5cdf315f43b48c094b", "url": "/anylate/static/media/KaTeX_Caligraphic-Bold.021dd4dc.ttf" }, { "revision": "1e802ca9dedc4ed4e3c6f645e4316128", "url": "/anylate/static/media/KaTeX_Caligraphic-Bold.1e802ca9.woff" }, { "revision": "4ec58befa687e9752c3c91cd9bcf1bcb", "url": "/anylate/static/media/KaTeX_Caligraphic-Bold.4ec58bef.woff2" }, { "revision": "7edb53b6693d75b8a2232481eea1a52c", "url": "/anylate/static/media/KaTeX_Caligraphic-Regular.7edb53b6.woff2" }, { "revision": "d3b46c3a530116933081d9d74e3e9fe8", "url": "/anylate/static/media/KaTeX_Caligraphic-Regular.d3b46c3a.woff" }, { "revision": "d49f2d55ce4f40f982d8ba63d746fbf9", "url": "/anylate/static/media/KaTeX_Caligraphic-Regular.d49f2d55.ttf" }, { "revision": "a31e7cba7b7221ebf1a2ae545fb306b2", "url": "/anylate/static/media/KaTeX_Fraktur-Bold.a31e7cba.ttf" }, { "revision": "c4c8cab7d5be97b2bb283e531c077355", "url": "/anylate/static/media/KaTeX_Fraktur-Bold.c4c8cab7.woff" }, { "revision": "d5b59ec9764e10f4a82369ae29f3ac58", "url": "/anylate/static/media/KaTeX_Fraktur-Bold.d5b59ec9.woff2" }, { "revision": "32a5339eb809f381a7357ba56f82aab3", "url": "/anylate/static/media/KaTeX_Fraktur-Regular.32a5339e.woff2" }, { "revision": "a48dad4f58c82e38a10da0ceebb86370", "url": "/anylate/static/media/KaTeX_Fraktur-Regular.a48dad4f.ttf" }, { "revision": "b7d9c46bff5d51da6209e355cc4a235d", "url": "/anylate/static/media/KaTeX_Fraktur-Regular.b7d9c46b.woff" }, { "revision": "22086eb5d97009c3e99bcc1d16ce6865", "url": "/anylate/static/media/KaTeX_Main-Bold.22086eb5.woff" }, { "revision": "8e1e01c4b1207c0a383d9a2b4f86e637", "url": "/anylate/static/media/KaTeX_Main-Bold.8e1e01c4.woff2" }, { "revision": "9ceff51b3cb7ce6eb4e8efa8163a1472", "url": "/anylate/static/media/KaTeX_Main-Bold.9ceff51b.ttf" }, { "revision": "284a17fe5baf72ff8217d4c7e70c0f82", "url": "/anylate/static/media/KaTeX_Main-BoldItalic.284a17fe.woff2" }, { "revision": "4c57dbc44bfff1fdf08a59cf556fdab3", "url": "/anylate/static/media/KaTeX_Main-BoldItalic.4c57dbc4.woff" }, { "revision": "e8b44b990516dab7937bf240fde8b46a", "url": "/anylate/static/media/KaTeX_Main-BoldItalic.e8b44b99.ttf" }, { "revision": "29c86397e75cdcb3135af8295f1c2e28", "url": "/anylate/static/media/KaTeX_Main-Italic.29c86397.ttf" }, { "revision": "99be0e10c38cd42466e6fe1665ef9536", "url": "/anylate/static/media/KaTeX_Main-Italic.99be0e10.woff" }, { "revision": "e533d5a2506cf053cd671b335ec04dde", "url": "/anylate/static/media/KaTeX_Main-Italic.e533d5a2.woff2" }, { "revision": "5c734d78610fa35282f3379f866707f2", "url": "/anylate/static/media/KaTeX_Main-Regular.5c734d78.woff2" }, { "revision": "5c94aef490324b0925dbe5f643e8fd04", "url": "/anylate/static/media/KaTeX_Main-Regular.5c94aef4.ttf" }, { "revision": "b741441f6d71014d0453ca3ebc884dd4", "url": "/anylate/static/media/KaTeX_Main-Regular.b741441f.woff" }, { "revision": "9a2834a9ff8ab411153571e0e55ac693", "url": "/anylate/static/media/KaTeX_Math-BoldItalic.9a2834a9.ttf" }, { "revision": "b13731ef4e2bfc3d8d859271e39550fc", "url": "/anylate/static/media/KaTeX_Math-BoldItalic.b13731ef.woff" }, { "revision": "d747bd1e7a6a43864285edd73dcde253", "url": "/anylate/static/media/KaTeX_Math-BoldItalic.d747bd1e.woff2" }, { "revision": "291e76b8871b84560701bd29f9d1dcc7", "url": "/anylate/static/media/KaTeX_Math-Italic.291e76b8.ttf" }, { "revision": "4ad08b826b8065e1eab85324d726538c", "url": "/anylate/static/media/KaTeX_Math-Italic.4ad08b82.woff2" }, { "revision": "f0303906c2a67ac63bf1e8ccd638a89e", "url": "/anylate/static/media/KaTeX_Math-Italic.f0303906.woff" }, { "revision": "3fb419559955e3ce75619f1a5e8c6c84", "url": "/anylate/static/media/KaTeX_SansSerif-Bold.3fb41955.woff" }, { "revision": "6e0830bee40435e72165345e0682fbfc", "url": "/anylate/static/media/KaTeX_SansSerif-Bold.6e0830be.woff2" }, { "revision": "7dc027cba9f7b11ec92af4a311372a85", "url": "/anylate/static/media/KaTeX_SansSerif-Bold.7dc027cb.ttf" }, { "revision": "4059868e460d2d2e6be18e180d20c43d", "url": "/anylate/static/media/KaTeX_SansSerif-Italic.4059868e.ttf" }, { "revision": "727a9b0d97d72d2fc0228fe4e07fb4d8", "url": "/anylate/static/media/KaTeX_SansSerif-Italic.727a9b0d.woff" }, { "revision": "fba01c9c6fb2866a0f95bcacb2c187a5", "url": "/anylate/static/media/KaTeX_SansSerif-Italic.fba01c9c.woff2" }, { "revision": "2555754a67062cac3a0913b715ab982f", "url": "/anylate/static/media/KaTeX_SansSerif-Regular.2555754a.woff" }, { "revision": "5c58d168c0b66d2c32234a6718e74dfb", "url": "/anylate/static/media/KaTeX_SansSerif-Regular.5c58d168.ttf" }, { "revision": "d929cd671b19f0cfea55b6200fb47461", "url": "/anylate/static/media/KaTeX_SansSerif-Regular.d929cd67.woff2" }, { "revision": "755e2491f13b5269f0afd5a56f7aa692", "url": "/anylate/static/media/KaTeX_Script-Regular.755e2491.woff2" }, { "revision": "d12ea9efb375f9dc331f562e69892638", "url": "/anylate/static/media/KaTeX_Script-Regular.d12ea9ef.ttf" }, { "revision": "d524c9a5b62a17f98f4a97af37fea735", "url": "/anylate/static/media/KaTeX_Script-Regular.d524c9a5.woff" }, { "revision": "048c39cba4dfb0460682a45e84548e4b", "url": "/anylate/static/media/KaTeX_Size1-Regular.048c39cb.woff2" }, { "revision": "08b5f00e7140f7a10e62c8e2484dfa5a", "url": "/anylate/static/media/KaTeX_Size1-Regular.08b5f00e.woff" }, { "revision": "7342d45b052c3a2abc21049959fbab7f", "url": "/anylate/static/media/KaTeX_Size1-Regular.7342d45b.ttf" }, { "revision": "81d6b8d5ca77d63d5033d6991549a659", "url": "/anylate/static/media/KaTeX_Size2-Regular.81d6b8d5.woff2" }, { "revision": "af24b0e4b7e52656ca77914695c99930", "url": "/anylate/static/media/KaTeX_Size2-Regular.af24b0e4.woff" }, { "revision": "eb130dcc661de766c999c60ba1525a88", "url": "/anylate/static/media/KaTeX_Size2-Regular.eb130dcc.ttf" }, { "revision": "0d8926405d832a4b065e516bd385d812", "url": "/anylate/static/media/KaTeX_Size3-Regular.0d892640.woff" }, { "revision": "7e02a40c41e52dc3b2b6b197bbdf05ea", "url": "/anylate/static/media/KaTeX_Size3-Regular.7e02a40c.ttf" }, { "revision": "b311ca09df2c89a10fbb914b5a053805", "url": "/anylate/static/media/KaTeX_Size3-Regular.b311ca09.woff2" }, { "revision": "68895bb880a61a7fc019dbfaa5121bb4", "url": "/anylate/static/media/KaTeX_Size4-Regular.68895bb8.woff" }, { "revision": "6a3255dfc1ba41c46e7e807f8ab16c49", "url": "/anylate/static/media/KaTeX_Size4-Regular.6a3255df.woff2" }, { "revision": "ad7672524b64b730dfd176140a8945cb", "url": "/anylate/static/media/KaTeX_Size4-Regular.ad767252.ttf" }, { "revision": "257023560753aeb0b89b7e434d3da17f", "url": "/anylate/static/media/KaTeX_Typewriter-Regular.25702356.ttf" }, { "revision": "3fe216d2a5f736c560cde71984554b64", "url": "/anylate/static/media/KaTeX_Typewriter-Regular.3fe216d2.woff" }, { "revision": "6cc31ea5c223c88705a13727a71417fa", "url": "/anylate/static/media/KaTeX_Typewriter-Regular.6cc31ea5.woff2" } ]);
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Defines the {@link CKEDITOR.lang} object, for the * Lithuanian language. */ /**#@+ @type String @example */ /** * Constains the dictionary of language entries. * @namespace */ CKEDITOR.lang['lt'] = { /** * The language reading direction. Possible values are "rtl" for * Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right * languages (like English). * @default 'ltr' */ dir : 'ltr', /* * Screenreader titles. Please note that screenreaders are not always capable * of reading non-English words. So be careful while translating it. */ editorTitle : 'Rich text editor, %1, press ALT 0 for help.', // MISSING // ARIA descriptions. toolbar : 'Toolbar', // MISSING editor : 'Rich Text Editor', // MISSING // Toolbar buttons without dialogs. source : 'Šaltinis', newPage : 'Naujas puslapis', save : 'Išsaugoti', preview : 'Peržiūra', cut : 'Iškirpti', copy : 'Kopijuoti', paste : 'Įdėti', print : 'Spausdinti', underline : 'Pabrauktas', bold : 'Pusjuodis', italic : 'Kursyvas', selectAll : 'Pažymėti viską', removeFormat : 'Panaikinti formatą', strike : 'Perbrauktas', subscript : 'Apatinis indeksas', superscript : 'Viršutinis indeksas', horizontalrule : 'Įterpti horizontalią liniją', pagebreak : 'Įterpti puslapių skirtuką', pagebreakAlt : 'Page Break', // MISSING unlink : 'Panaikinti nuorodą', undo : 'Atšaukti', redo : 'Atstatyti', // Common messages and labels. common : { browseServer : 'Naršyti po serverį', url : 'URL', protocol : 'Protokolas', upload : 'Siųsti', uploadSubmit : 'Siųsti į serverį', image : 'Vaizdas', flash : 'Flash', form : 'Forma', checkbox : 'Žymimasis langelis', radio : 'Žymimoji akutė', textField : 'Teksto laukas', textarea : 'Teksto sritis', hiddenField : 'Nerodomas laukas', button : 'Mygtukas', select : 'Atrankos laukas', imageButton : 'Vaizdinis mygtukas', notSet : '<nėra nustatyta>', id : 'Id', name : 'Vardas', langDir : 'Teksto kryptis', langDirLtr : 'Iš kairės į dešinę (LTR)', langDirRtl : 'Iš dešinės į kairę (RTL)', langCode : 'Kalbos kodas', longDescr : 'Ilgas aprašymas URL', cssClass : 'Stilių lentelės klasės', advisoryTitle : 'Konsultacinė antraštė', cssStyle : 'Stilius', ok : 'OK', cancel : 'Nutraukti', close : 'Close', // MISSING preview : 'Preview', // MISSING generalTab : 'Bendros savybės', advancedTab : 'Papildomas', validateNumberFailed : 'This value is not a number.', // MISSING confirmNewPage : 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?', // MISSING confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING options : 'Options', // MISSING target : 'Target', // MISSING targetNew : 'New Window (_blank)', // MISSING targetTop : 'Topmost Window (_top)', // MISSING targetSelf : 'Same Window (_self)', // MISSING targetParent : 'Parent Window (_parent)', // MISSING langDirLTR : 'Left to Right (LTR)', // MISSING langDirRTL : 'Right to Left (RTL)', // MISSING styles : 'Style', // MISSING cssClasses : 'Stylesheet Classes', // MISSING width : 'Plotis', height : 'Aukštis', align : 'Lygiuoti', alignLeft : 'Kairę', alignRight : 'Dešinę', alignCenter : 'Centrą', alignTop : 'Viršūnę', alignMiddle : 'Vidurį', alignBottom : 'Apačią', invalidHeight : 'Height must be a number.', // MISSING invalidWidth : 'Width must be a number.', // MISSING // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>' // MISSING }, contextmenu : { options : 'Context Menu Options' // MISSING }, // Special char dialog. specialChar : { toolbar : 'Įterpti specialų simbolį', title : 'Pasirinkite specialų simbolį', options : 'Special Character Options' // MISSING }, // Link dialog. link : { toolbar : 'Įterpti/taisyti nuorodą', other : '<kitas>', menu : 'Taisyti nuorodą', title : 'Nuoroda', info : 'Nuorodos informacija', target : 'Paskirties vieta', upload : 'Siųsti', advanced : 'Papildomas', type : 'Nuorodos tipas', toUrl : 'URL', // MISSING toAnchor : 'Žymė šiame puslapyje', toEmail : 'El.paštas', targetFrame : '<kadras>', targetPopup : '<išskleidžiamas langas>', targetFrameName : 'Paskirties kadro vardas', targetPopupName : 'Paskirties lango vardas', popupFeatures : 'Išskleidžiamo lango savybės', popupResizable : 'Resizable', // MISSING popupStatusBar : 'Būsenos juosta', popupLocationBar: 'Adreso juosta', popupToolbar : 'Mygtukų juosta', popupMenuBar : 'Meniu juosta', popupFullScreen : 'Visas ekranas (IE)', popupScrollBars : 'Slinkties juostos', popupDependent : 'Priklausomas (Netscape)', popupLeft : 'Kairė pozicija', popupTop : 'Viršutinė pozicija', id : 'Id', // MISSING langDir : 'Teksto kryptis', langDirLTR : 'Iš kairės į dešinę (LTR)', langDirRTL : 'Iš dešinės į kairę (RTL)', acccessKey : 'Prieigos raktas', name : 'Vardas', langCode : 'Teksto kryptis', tabIndex : 'Tabuliavimo indeksas', advisoryTitle : 'Konsultacinė antraštė', advisoryContentType : 'Konsultacinio turinio tipas', cssClasses : 'Stilių lentelės klasės', charset : 'Susietų išteklių simbolių lentelė', styles : 'Stilius', selectAnchor : 'Pasirinkite žymę', anchorName : 'Pagal žymės vardą', anchorId : 'Pagal žymės Id', emailAddress : 'El.pašto adresas', emailSubject : 'Žinutės tema', emailBody : 'Žinutės turinys', noAnchors : '(Šiame dokumente žymių nėra)', noUrl : 'Prašome įvesti nuorodos URL', noEmail : 'Prašome įvesti el.pašto adresą' }, // Anchor dialog anchor : { toolbar : 'Įterpti/modifikuoti žymę', menu : 'Žymės savybės', title : 'Žymės savybės', name : 'Žymės vardas', errorName : 'Prašome įvesti žymės vardą' }, // List style dialog list: { numberedTitle : 'Numbered List Properties', // MISSING bulletedTitle : 'Bulleted List Properties', // MISSING type : 'Type', // MISSING start : 'Start', // MISSING validateStartNumber :'List start number must be a whole number.', // MISSING circle : 'Circle', // MISSING disc : 'Disc', // MISSING square : 'Square', // MISSING none : 'None', // MISSING notset : '<not set>', // MISSING armenian : 'Armenian numbering', // MISSING georgian : 'Georgian numbering (an, ban, gan, etc.)', // MISSING lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', // MISSING upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', // MISSING lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', // MISSING upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', // MISSING lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', // MISSING decimal : 'Decimal (1, 2, 3, etc.)', // MISSING decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' // MISSING }, // Find And Replace Dialog findAndReplace : { title : 'Surasti ir pakeisti', find : 'Rasti', replace : 'Pakeisti', findWhat : 'Surasti tekstą:', replaceWith : 'Pakeisti tekstu:', notFoundMsg : 'Nurodytas tekstas nerastas.', matchCase : 'Skirti didžiąsias ir mažąsias raides', matchWord : 'Atitikti pilną žodį', matchCyclic : 'Match cyclic', // MISSING replaceAll : 'Pakeisti viską', replaceSuccessMsg : '%1 occurrence(s) replaced.' // MISSING }, // Table Dialog table : { toolbar : 'Lentelė', title : 'Lentelės savybės', menu : 'Lentelės savybės', deleteTable : 'Šalinti lentelę', rows : 'Eilutės', columns : 'Stulpeliai', border : 'Rėmelio dydis', widthPx : 'taškais', widthPc : 'procentais', widthUnit : 'width unit', // MISSING cellSpace : 'Tarpas tarp langelių', cellPad : 'Trapas nuo langelio rėmo iki teksto', caption : 'Antraštė', summary : 'Santrauka', headers : 'Antraštės', headersNone : 'Nėra', headersColumn : 'Pirmas stulpelis', headersRow : 'Pirma eilutė', headersBoth : 'Abu', invalidRows : 'Number of rows must be a number greater than 0.', // MISSING invalidCols : 'Number of columns must be a number greater than 0.', // MISSING invalidBorder : 'Border size must be a number.', // MISSING invalidWidth : 'Table width must be a number.', // MISSING invalidHeight : 'Table height must be a number.', // MISSING invalidCellSpacing : 'Cell spacing must be a number.', // MISSING invalidCellPadding : 'Cell padding must be a number.', // MISSING cell : { menu : 'Langelis', insertBefore : 'Įterpti langelį prieš', insertAfter : 'Įterpti langelį po', deleteCell : 'Šalinti langelius', merge : 'Sujungti langelius', mergeRight : 'Sujungti su dešine', mergeDown : 'Sujungti su apačia', splitHorizontal : 'Skaidyti langelį horizontaliai', splitVertical : 'Skaidyti langelį vertikaliai', title : 'Cell Properties', // MISSING cellType : 'Cell Type', // MISSING rowSpan : 'Rows Span', // MISSING colSpan : 'Columns Span', // MISSING wordWrap : 'Word Wrap', // MISSING hAlign : 'Horizontal Alignment', // MISSING vAlign : 'Vertical Alignment', // MISSING alignBaseline : 'Baseline', // MISSING bgColor : 'Background Color', // MISSING borderColor : 'Border Color', // MISSING data : 'Data', // MISSING header : 'Header', // MISSING yes : 'Yes', // MISSING no : 'No', // MISSING invalidWidth : 'Cell width must be a number.', // MISSING invalidHeight : 'Cell height must be a number.', // MISSING invalidRowSpan : 'Rows span must be a whole number.', // MISSING invalidColSpan : 'Columns span must be a whole number.', // MISSING chooseColor : 'Choose' // MISSING }, row : { menu : 'Eilutė', insertBefore : 'Įterpti eilutę prieš', insertAfter : 'Įterpti eilutę po', deleteRow : 'Šalinti eilutes' }, column : { menu : 'Stulpelis', insertBefore : 'Įterpti stulpelį prieš', insertAfter : 'Įterpti stulpelį po', deleteColumn : 'Šalinti stulpelius' } }, // Button Dialog. button : { title : 'Mygtuko savybės', text : 'Tekstas (Reikšmė)', type : 'Tipas', typeBtn : 'Mygtukas', typeSbm : 'Siųsti', typeRst : 'Išvalyti' }, // Checkbox and Radio Button Dialogs. checkboxAndRadio : { checkboxTitle : 'Žymimojo langelio savybės', radioTitle : 'Žymimosios akutės savybės', value : 'Reikšmė', selected : 'Pažymėtas' }, // Form Dialog. form : { title : 'Formos savybės', menu : 'Formos savybės', action : 'Veiksmas', method : 'Metodas', encoding : 'Encoding' // MISSING }, // Select Field Dialog. select : { title : 'Atrankos lauko savybės', selectInfo : 'Informacija', opAvail : 'Galimos parinktys', value : 'Reikšmė', size : 'Dydis', lines : 'eilučių', chkMulti : 'Leisti daugeriopą atranką', opText : 'Tekstas', opValue : 'Reikšmė', btnAdd : 'Įtraukti', btnModify : 'Modifikuoti', btnUp : 'Aukštyn', btnDown : 'Žemyn', btnSetValue : 'Laikyti pažymėta reikšme', btnDelete : 'Trinti' }, // Textarea Dialog. textarea : { title : 'Teksto srities savybės', cols : 'Ilgis', rows : 'Plotis' }, // Text Field Dialog. textfield : { title : 'Teksto lauko savybės', name : 'Vardas', value : 'Reikšmė', charWidth : 'Ilgis simboliais', maxChars : 'Maksimalus simbolių skaičius', type : 'Tipas', typeText : 'Tekstas', typePass : 'Slaptažodis' }, // Hidden Field Dialog. hidden : { title : 'Nerodomo lauko savybės', name : 'Vardas', value : 'Reikšmė' }, // Image Dialog. image : { title : 'Vaizdo savybės', titleButton : 'Vaizdinio mygtuko savybės', menu : 'Vaizdo savybės', infoTab : 'Vaizdo informacija', btnUpload : 'Siųsti į serverį', upload : 'Nusiųsti', alt : 'Alternatyvus Tekstas', lockRatio : 'Išlaikyti proporciją', unlockRatio : 'Unlock Ratio', // MISSING resetSize : 'Atstatyti dydį', border : 'Rėmelis', hSpace : 'Hor.Erdvė', vSpace : 'Vert.Erdvė', alertUrl : 'Prašome įvesti vaizdo URL', linkTab : 'Nuoroda', button2Img : 'Do you want to transform the selected image button on a simple image?', // MISSING img2Button : 'Do you want to transform the selected image on a image button?', // MISSING urlMissing : 'Image source URL is missing.', // MISSING validateBorder : 'Border must be a whole number.', // MISSING validateHSpace : 'HSpace must be a whole number.', // MISSING validateVSpace : 'VSpace must be a whole number.' // MISSING }, // Flash Dialog flash : { properties : 'Flash savybės', propertiesTab : 'Properties', // MISSING title : 'Flash savybės', chkPlay : 'Automatinis paleidimas', chkLoop : 'Ciklas', chkMenu : 'Leisti Flash meniu', chkFull : 'Allow Fullscreen', // MISSING scale : 'Mastelis', scaleAll : 'Rodyti visą', scaleNoBorder : 'Be rėmelio', scaleFit : 'Tikslus atitikimas', access : 'Script Access', // MISSING accessAlways : 'Always', // MISSING accessSameDomain: 'Same domain', // MISSING accessNever : 'Never', // MISSING alignAbsBottom : 'Absoliučią apačią', alignAbsMiddle : 'Absoliutų vidurį', alignBaseline : 'Apatinę liniją', alignTextTop : 'Teksto viršūnę', quality : 'Quality', // MISSING qualityBest : 'Best', // MISSING qualityHigh : 'High', // MISSING qualityAutoHigh : 'Auto High', // MISSING qualityMedium : 'Medium', // MISSING qualityAutoLow : 'Auto Low', // MISSING qualityLow : 'Low', // MISSING windowModeWindow: 'Window', // MISSING windowModeOpaque: 'Opaque', // MISSING windowModeTransparent : 'Transparent', // MISSING windowMode : 'Window mode', // MISSING flashvars : 'Variables for Flash', // MISSING bgcolor : 'Fono spalva', hSpace : 'Hor.Erdvė', vSpace : 'Vert.Erdvė', validateSrc : 'Prašome įvesti nuorodos URL', validateHSpace : 'HSpace must be a number.', // MISSING validateVSpace : 'VSpace must be a number.' // MISSING }, // Speller Pages Dialog spellCheck : { toolbar : 'Rašybos tikrinimas', title : 'Spell Check', // MISSING notAvailable : 'Sorry, but service is unavailable now.', // MISSING errorLoading : 'Error loading application service host: %s.', // MISSING notInDic : 'Žodyne nerastas', changeTo : 'Pakeisti į', btnIgnore : 'Ignoruoti', btnIgnoreAll : 'Ignoruoti visus', btnReplace : 'Pakeisti', btnReplaceAll : 'Pakeisti visus', btnUndo : 'Atšaukti', noSuggestions : '- Nėra pasiūlymų -', progress : 'Vyksta rašybos tikrinimas...', noMispell : 'Rašybos tikrinimas baigtas: Nerasta rašybos klaidų', noChanges : 'Rašybos tikrinimas baigtas: Nėra pakeistų žodžių', oneChange : 'Rašybos tikrinimas baigtas: Vienas žodis pakeistas', manyChanges : 'Rašybos tikrinimas baigtas: Pakeista %1 žodžių', ieSpellDownload : 'Rašybos tikrinimas neinstaliuotas. Ar Jūs norite jį dabar atsisiųsti?' }, smiley : { toolbar : 'Veideliai', title : 'Įterpti veidelį', options : 'Smiley Options' // MISSING }, elementsPath : { eleLabel : 'Elements path', // MISSING eleTitle : '%1 element' // MISSING }, numberedlist : 'Numeruotas sąrašas', bulletedlist : 'Suženklintas sąrašas', indent : 'Padidinti įtrauką', outdent : 'Sumažinti įtrauką', justify : { left : 'Lygiuoti kairę', center : 'Centruoti', right : 'Lygiuoti dešinę', block : 'Lygiuoti abi puses' }, blockquote : 'Citata', clipboard : { title : 'Įdėti', cutError : 'Jūsų naršyklės saugumo nustatymai neleidžia redaktoriui automatiškai įvykdyti iškirpimo operacijų. Tam prašome naudoti klaviatūrą (Ctrl/Cmd+X).', copyError : 'Jūsų naršyklės saugumo nustatymai neleidžia redaktoriui automatiškai įvykdyti kopijavimo operacijų. Tam prašome naudoti klaviatūrą (Ctrl/Cmd+C).', pasteMsg : 'Žemiau esančiame įvedimo lauke įdėkite tekstą, naudodami klaviatūrą (<STRONG>Ctrl/Cmd+V</STRONG>) ir paspauskite mygtuką <STRONG>OK</STRONG>.', securityMsg : 'Dėl jūsų naršyklės saugumo nustatymų, redaktorius negali tiesiogiai pasiekti laikinosios atminties. Jums reikia nukopijuoti dar kartą į šį langą.', pasteArea : 'Paste Area' // MISSING }, pastefromword : { confirmCleanup : 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?', // MISSING toolbar : 'Įdėti iš Word', title : 'Įdėti iš Word', error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING }, pasteText : { button : 'Įdėti kaip gryną tekstą', title : 'Įdėti kaip gryną tekstą' }, templates : { button : 'Šablonai', title : 'Turinio šablonai', options : 'Template Options', // MISSING insertOption : 'Pakeisti dabartinį turinį pasirinktu šablonu', selectPromptMsg : 'Pasirinkite norimą šabloną<br>(<b>Dėmesio!</b> esamas turinys bus prarastas):', emptyListMsg : '(Šablonų sąrašas tuščias)' }, showBlocks : 'Rodyti blokus', stylesCombo : { label : 'Stilius', panelTitle : 'Formatting Styles', // MISSING panelTitle1 : 'Block Styles', // MISSING panelTitle2 : 'Inline Styles', // MISSING panelTitle3 : 'Object Styles' // MISSING }, format : { label : 'Šrifto formatas', panelTitle : 'Šrifto formatas', tag_p : 'Normalus', tag_pre : 'Formuotas', tag_address : 'Kreipinio', tag_h1 : 'Antraštinis 1', tag_h2 : 'Antraštinis 2', tag_h3 : 'Antraštinis 3', tag_h4 : 'Antraštinis 4', tag_h5 : 'Antraštinis 5', tag_h6 : 'Antraštinis 6', tag_div : 'Normal (DIV)' // MISSING }, div : { title : 'Create Div Container', // MISSING toolbar : 'Create Div Container', // MISSING cssClassInputLabel : 'Stylesheet Classes', // MISSING styleSelectLabel : 'Style', // MISSING IdInputLabel : 'Id', // MISSING languageCodeInputLabel : ' Language Code', // MISSING inlineStyleInputLabel : 'Inline Style', // MISSING advisoryTitleInputLabel : 'Advisory Title', // MISSING langDirLabel : 'Language Direction', // MISSING langDirLTRLabel : 'Left to Right (LTR)', // MISSING langDirRTLLabel : 'Right to Left (RTL)', // MISSING edit : 'Edit Div', // MISSING remove : 'Remove Div' // MISSING }, iframe : { title : 'IFrame Properties', // MISSING toolbar : 'IFrame', // MISSING noUrl : 'Please type the iframe URL', // MISSING scrolling : 'Enable scrollbars', // MISSING border : 'Show frame border' // MISSING }, font : { label : 'Šriftas', voiceLabel : 'Font', // MISSING panelTitle : 'Šriftas' }, fontSize : { label : 'Šrifto dydis', voiceLabel : 'Font Size', // MISSING panelTitle : 'Šrifto dydis' }, colorButton : { textColorTitle : 'Teksto spalva', bgColorTitle : 'Fono spalva', panelTitle : 'Colors', // MISSING auto : 'Automatinis', more : 'Daugiau spalvų...' }, colors : { '000' : 'Black', // MISSING '800000' : 'Maroon', // MISSING '8B4513' : 'Saddle Brown', // MISSING '2F4F4F' : 'Dark Slate Gray', // MISSING '008080' : 'Teal', // MISSING '000080' : 'Navy', // MISSING '4B0082' : 'Indigo', // MISSING '696969' : 'Dark Gray', // MISSING 'B22222' : 'Fire Brick', // MISSING 'A52A2A' : 'Brown', // MISSING 'DAA520' : 'Golden Rod', // MISSING '006400' : 'Dark Green', // MISSING '40E0D0' : 'Turquoise', // MISSING '0000CD' : 'Medium Blue', // MISSING '800080' : 'Purple', // MISSING '808080' : 'Gray', // MISSING 'F00' : 'Red', // MISSING 'FF8C00' : 'Dark Orange', // MISSING 'FFD700' : 'Gold', // MISSING '008000' : 'Green', // MISSING '0FF' : 'Cyan', // MISSING '00F' : 'Blue', // MISSING 'EE82EE' : 'Violet', // MISSING 'A9A9A9' : 'Dim Gray', // MISSING 'FFA07A' : 'Light Salmon', // MISSING 'FFA500' : 'Orange', // MISSING 'FFFF00' : 'Yellow', // MISSING '00FF00' : 'Lime', // MISSING 'AFEEEE' : 'Pale Turquoise', // MISSING 'ADD8E6' : 'Light Blue', // MISSING 'DDA0DD' : 'Plum', // MISSING 'D3D3D3' : 'Light Grey', // MISSING 'FFF0F5' : 'Lavender Blush', // MISSING 'FAEBD7' : 'Antique White', // MISSING 'FFFFE0' : 'Light Yellow', // MISSING 'F0FFF0' : 'Honeydew', // MISSING 'F0FFFF' : 'Azure', // MISSING 'F0F8FF' : 'Alice Blue', // MISSING 'E6E6FA' : 'Lavender', // MISSING 'FFF' : 'White' // MISSING }, scayt : { title : 'Spell Check As You Type', // MISSING opera_title : 'Not supported by Opera', // MISSING enable : 'Enable SCAYT', // MISSING disable : 'Disable SCAYT', // MISSING about : 'About SCAYT', // MISSING toggle : 'Toggle SCAYT', // MISSING options : 'Options', // MISSING langs : 'Languages', // MISSING moreSuggestions : 'More suggestions', // MISSING ignore : 'Ignore', // MISSING ignoreAll : 'Ignore All', // MISSING addWord : 'Add Word', // MISSING emptyDic : 'Dictionary name should not be empty.', // MISSING optionsTab : 'Options', // MISSING allCaps : 'Ignore All-Caps Words', // MISSING ignoreDomainNames : 'Ignore Domain Names', // MISSING mixedCase : 'Ignore Words with Mixed Case', // MISSING mixedWithDigits : 'Ignore Words with Numbers', // MISSING languagesTab : 'Languages', // MISSING dictionariesTab : 'Dictionaries', // MISSING dic_field_name : 'Dictionary name', // MISSING dic_create : 'Create', // MISSING dic_restore : 'Restore', // MISSING dic_delete : 'Delete', // MISSING dic_rename : 'Rename', // MISSING dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING aboutTab : 'About' // MISSING }, about : { title : 'About CKEditor', // MISSING dlgTitle : 'About CKEditor', // MISSING moreInfo : 'For licensing information please visit our web site:', // MISSING copy : 'Copyright &copy; $1. All rights reserved.' // MISSING }, maximize : 'Maximize', // MISSING minimize : 'Minimize', // MISSING fakeobjects : { anchor : 'Anchor', // MISSING flash : 'Flash Animation', // MISSING iframe : 'IFrame', // MISSING hiddenfield : 'Hidden Field', // MISSING unknown : 'Unknown Object' // MISSING }, resize : 'Drag to resize', // MISSING colordialog : { title : 'Select color', // MISSING options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, toolbarCollapse : 'Collapse Toolbar', // MISSING toolbarExpand : 'Expand Toolbar', // MISSING bidi : { ltr : 'Text direction from left to right', // MISSING rtl : 'Text direction from right to left' // MISSING } };
import { to_headers } from '../../utils/http.js'; import { hash } from '../hash.js'; import { decode_params } from './utils.js'; /** @param {string} body */ function error(body) { return new Response(body, { status: 500 }); } /** @param {unknown} s */ function is_string(s) { return typeof s === 'string' || s instanceof String; } const text_types = new Set([ 'application/xml', 'application/json', 'application/x-www-form-urlencoded', 'multipart/form-data' ]); /** * Decides how the body should be parsed based on its mime type. Should match what's in parse_body * * @param {string | undefined | null} content_type The `content-type` header of a request/response. * @returns {boolean} */ export function is_text(content_type) { if (!content_type) return true; // defaults to json const type = content_type.split(';')[0].toLowerCase(); // get the mime type return type.startsWith('text/') || type.endsWith('+xml') || text_types.has(type); } /** * @param {import('types/hooks').RequestEvent} event * @param {import('types/internal').SSREndpoint} route * @param {RegExpExecArray} match * @returns {Promise<Response | undefined>} */ export async function render_endpoint(event, route, match) { const mod = await route.load(); /** @type {import('types/endpoint').RequestHandler} */ const handler = mod[event.request.method.toLowerCase().replace('delete', 'del')]; // 'delete' is a reserved word if (!handler) { return; } // we're mutating `request` so that we don't have to do { ...request, params } // on the next line, since that breaks the getters that replace path, query and // origin. We could revert that once we remove the getters event.params = route.params ? decode_params(route.params(match)) : {}; const response = await handler(event); const preface = `Invalid response from route ${event.url.pathname}`; if (typeof response !== 'object') { return error(`${preface}: expected an object, got ${typeof response}`); } if (response.fallthrough) { return; } const { status = 200, body = {} } = response; const headers = response.headers instanceof Headers ? response.headers : to_headers(response.headers); const type = headers.get('content-type'); if (!is_text(type) && !(body instanceof Uint8Array || is_string(body))) { return error( `${preface}: body must be an instance of string or Uint8Array if content-type is not a supported textual content-type` ); } /** @type {import('types/hooks').StrictBody} */ let normalized_body; if (is_pojo(body) && (!type || type.startsWith('application/json'))) { headers.set('content-type', 'application/json; charset=utf-8'); normalized_body = JSON.stringify(body); } else { normalized_body = /** @type {import('types/hooks').StrictBody} */ (body); } if ( (typeof normalized_body === 'string' || normalized_body instanceof Uint8Array) && !headers.has('etag') ) { const cache_control = headers.get('cache-control'); if (!cache_control || !/(no-store|immutable)/.test(cache_control)) { headers.set('etag', `"${hash(normalized_body)}"`); } } return new Response(normalized_body, { status, headers }); } /** @param {any} body */ function is_pojo(body) { if (typeof body !== 'object') return false; if (body) { if (body instanceof Uint8Array) return false; // body could be a node Readable, but we don't want to import // node built-ins, so we use duck typing if (body._readableState && body._writableState && body._events) return false; // similarly, it could be a web ReadableStream if (body[Symbol.toStringTag] === 'ReadableStream') return false; } return true; }
var fs = require('fs'); var filename = '06.txt'; var grid_size = 1000; // pre-fill our grid system var grid = setUpGrid(grid_size); var directions_p1 = { "turn on" : turnOn, "turn off" : turnOff, "toggle" : toggle } ; var directions_p2 = { "turn on" : increaseByOne, "turn off" : decrease, "toggle" : increaseByTwo } var instructions = fs.readFileSync(filename).toString().trim().split('\n'); var regex = /^(turn on|toggle|turn off)\s+(\d+,\d+)\sthrough\s(\d+,\d+)$/ig; function setUpGrid(size) { var grid = []; for (var i = 0; i < size; i++) { grid.push(Array.apply(null, Array(size)).map(function () { return 0; })); } return grid; } function stringToCoords(s) { var parts = s.split(','); return { 'x': parseInt(parts[0]), 'y': parseInt(parts[1]) }; } function turnOn(lights, start, finish) { for (var x = start.x; x <= finish.x; x++) { for (var y = start.y; y <= finish.y; y++) { lights[x][y] = 1; } } } function turnOff(lights, start, finish) { for (var x = start.x; x <= finish.x; x++) { for (var y = start.y; y <= finish.y; y++) { lights[x][y] = 0; } } } function toggle(lights, start, finish) { for (var x = start.x; x <= finish.x; x++) { for (var y = start.y; y <= finish.y; y++) { lights[x][y] = (lights[x][y] ? 0 : 1); } } } // part 2 functions function increase(lights, start, finish, by) { for (var x = start.x; x <= finish.x; x++) { for (var y = start.y; y <= finish.y; y++) { lights[x][y] = lights[x][y] + by; } } } function decrease(lights, start, finish) { for (var x = start.x; x <= finish.x; x++) { for (var y = start.y; y <= finish.y; y++) { lights[x][y] = Math.max(lights[x][y] - 1, 0); } } } function increaseByOne(lights, start, finish) { increase(lights, start, finish, 1); } function increaseByTwo(lights, start, finish) { increase(lights, start, finish, 2); } // part 1 solution instructions.forEach(function (instruction) { var match = /^(turn on|toggle|turn off)\s+(\d+,\d+)\sthrough\s(\d+,\d+)$/ig.exec(instruction.trim()); directions_p1[match[1]](grid, stringToCoords(match[2]), stringToCoords(match[3])); }); console.log(grid.reduce(function (total, row) { return total + row.reduce(function (rowTotal, column) { return rowTotal + column; }, 0) }, 0)); // part 2 solution grid = setUpGrid(grid_size); instructions.forEach(function (instruction) { var match = /^(turn on|toggle|turn off)\s+(\d+,\d+)\sthrough\s(\d+,\d+)$/ig.exec(instruction.trim()); directions_p2[match[1]](grid, stringToCoords(match[2]), stringToCoords(match[3])); }); console.log(grid.reduce(function (total, row) { return total + row.reduce(function (rowTotal, column) { return rowTotal + column; }, 0) }, 0));
var mongoose = require('mongoose'); var Schema = mongoose.Schema; const CommentSchema = new Schema({ postId: { type: String, required: true, default: null }, parentId: { type: String, default: null }, depth: { type: Number, default: 0 }, user: { type: String, required: true }, content: { type: String, default: '' }, timestamp: { type: Date, default: Date.now }, upvotes: { type: Number, default: 1, min: 0 }, downvotes: { type: Number, default: 0, min: 0 } }); module.exports = mongoose.model("Comment", CommentSchema, "comments");
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @template T * @unrestricted */ Common.CharacterIdMap = class { constructor() { /** @type {!Map<T, string>} */ this._elementToCharacter = new Map(); /** @type {!Map<string, T>} */ this._characterToElement = new Map(); this._charCode = 33; } /** * @param {T} object * @return {string} */ toChar(object) { var character = this._elementToCharacter.get(object); if (!character) { if (this._charCode >= 0xFFFF) throw new Error('CharacterIdMap ran out of capacity!'); character = String.fromCharCode(this._charCode++); this._elementToCharacter.set(object, character); this._characterToElement.set(character, object); } return character; } /** * @param {string} character * @return {?T} */ fromChar(character) { var object = this._characterToElement.get(character); if (object === undefined) return null; return object; } };
module.exports = ({ os, nameUni, adress, city, cep, uf, userName, userLocal, fone, email, printModel, ns, pagCount, ip, mask, gateway, description, dataAtend, timeCheg, timeStart, timeFinish, timeOut, nameTec, nameUserAssinatura }) => { const today = new Date(); return ` <!doctype html> <html> <head> <meta charset="utf-8"> <title>RAT Manual PDF</title> <style> p { } .invoice-box { max-width: 800px; margin: auto; padding: 10px; border: 1px solid #eee; box-shadow: 0 0 10px rgba(0, 0, 0, .15); font-size: 11px; line-height: 14px; font-family: 'Helvetica Neue', 'Helvetica', color: #555; } .margin-top { margin-top: 50px; } .justify-center { text-align: center; } .invoice-box table { width: 100%; line-height: inherit; text-align: left; } .invoice-box table td { padding: 5px; vertical-align: top; } .invoice-box table tr td:nth-child(2) { text-align: left; } .invoice-box table tr.top table td { padding-bottom: 10px; } .invoice-box table tr.top table td.title { font-size: 11px; line-height: 12px; color: #333; } .invoice-box table tr.information table td { padding-bottom: 20px; } .invoice-box table tr.heading td { background: #eee; border-bottom: 1px solid #ddd; font-weight: bold; font-size: 11px; line-height: 12px; } .invoice-box table tr.details td { padding-bottom: 15px; } .invoice-box table tr.item td { border-bottom: 1px solid #eee; } .invoice-box table tr.item.last td { border-bottom: none; } @media only screen and (max-width: 600px) { .invoice-box table tr.top table td { width: 100%; display: block; text-align: center; } .invoice-box table tr.information table td { width: 100%; display: block; text-align: center; } } </style> </head> <body> <div class="invoice-box"> <table cellpadding="0" cellspacing="0"> <tr class="top"> <td colspan="2"> <table> <tr> <td> <h4>RELATÓRIO DE MANUTENÇÃO</h4> <H2>OS: ${os}</H2> </td> <td class="title"><img src="https://i.ibb.co/dt7Z28c/logo2.png" alt="logo2" border="0"></td> </tr> </table> </td> </tr> </table> <div> <table cellpadding="0" cellspacing="0"> <tr class="heading"> <td>DADOS DO PROJETO</td> <td></td> </tr> </table> </div> <div> <table> <td> <p><b>Nome da Unidade:</b> ${nameUni}</p> </td> </table> </div> <div> <table cellpadding="0" cellspacing="0"> <tr class="item"> <td><b>Endereço:</b> ${adress}</td> <td><b>CEP:</b> ${cep}</td> </tr> <tr class="item"> <td><b>Cidade:</b> ${city}</td> <td><b>UF: </b>${uf}</td> </tr> <tr class="item"> <td><b>Nome do Contato:</b> ${userName}</td> <td></td> </tr> <tr class="item"> <td><b>Departamento/Cargo:</b> ${userLocal}</td> <td></td> </tr> <tr class="item"> <td><b>Telefone/Fax:</b> ${fone}</td> <td><b>E-mail:</b> ${email}</td> </tr> <tr class="heading" > <td>DADOS DA IMPRESSORA</td> <td></td> </tr> </table> </div> <div> <table> <td> <p><b>N° Série:</b> ${ns} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Contador de Pág:</b> ${pagCount}</p> </td> </table> </div> <div> <table cellpadding="0" cellspacing="0"> <tr class="item"> <td><b>Modelo:</b> ${printModel}</td> <td></td> </tr> <tr class="item"> <td><b>IP:</b> ${ip}</td> <td></td> </tr> <tr class="item"> <td><b>Máscara de rede:</b> ${mask}</td> <td></td> </tr> <tr class="item"> <td><b>Gateway:</b> ${gateway}</td> <td></td> </tr> <tr class="heading"> <td >RESUMO DOS SERVIÇOS EXECUTADOS</td> <td></td> </tr> </table> </div> <div class="description"> <table> <td> <p>${description}</p> </td> </table> </div> <table cellpadding="0" cellspacing="0"> </tr> <tr class="heading"> <td>VALIDAÇÃO DO ATENDIMENTO</td> <td></td> </tr> <tr class="item"> <td><b>Data de Atendimento:</b> ${dataAtend}</td> <td></td> </tr> <tr class="item"> <td>Hora de Chegada: ${timeCheg}</td> <td>Hora de Início: ${timeStart}</td> </tr> <tr class="item"> <td>Hora de Conclusão: ${timeFinish}</td> <td>Hora de Saída: ${timeOut}</td> </tr> <tr class="item"> <td><b>Nome do Técnico:</b> ${nameTec}</td> <td></td> </tr> <tr> <td><b>Nome do Usuário(a) Local:</b> ${nameUserAssinatura}</td> <td></td> </tr> <tr> <td><b>Assinatura + Carimbo do Usuário(a) do Local:</b></td> <td></td> </tr> </table> </div> </body> </html> `; };
var r=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},t=function(r,t,a){return void 0===t&&(t=0),void 0===a&&(a=Math.pow(10,t)),Math.round(a*r)/a+0},a=function(r,t,a){return void 0===t&&(t=0),void 0===a&&(a=1),r>a?a:r>t?r:t},n={grad:.9,turn:360,rad:360/(2*Math.PI)},u=function(r){var t=r/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},h=function(r){return 255*(r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r)},o=96.422,e=100,c=82.521,i=function(r){var t,n,u={x:.9555766*(t=r).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return n={r:h(.032404542*u.x-.015371385*u.y-.004985314*u.z),g:h(-.00969266*u.x+.018760108*u.y+41556e-8*u.z),b:h(556434e-9*u.x-.002040259*u.y+.010572252*u.z),a:r.a},{r:a(n.r,0,255),g:a(n.g,0,255),b:a(n.b,0,255),a:a(n.a)}},l=function(r){var t=u(r.r),n=u(r.g),h=u(r.b);return function(r){return{x:a(r.x,0,o),y:a(r.y,0,e),z:a(r.z,0,c),a:a(r.a)}}(function(r){return{x:1.0478112*r.x+.0228866*r.y+-.050127*r.z,y:.0295424*r.x+.9904844*r.y+-.0170491*r.z,z:-.0092345*r.x+.0150436*r.y+.7521316*r.z,a:r.a}}({x:100*(.4124564*t+.3575761*n+.1804375*h),y:100*(.2126729*t+.7151522*n+.072175*h),z:100*(.0193339*t+.119192*n+.9503041*h),a:r.a}))},b=216/24389,d=24389/27,f=function(r){return{l:a(r.l,0,100),c:r.c,h:(t=r.h,(t=isFinite(t)?t%360:0)>0?t:t+360),a:r.a};var t},p=function(r){return{l:t(r.l,2),c:t(r.c,2),h:t(r.h,2),a:t(r.a,2)}},v=function(t){var a=t.l,n=t.c,u=t.h,h=t.a,o=void 0===h?1:h;if(!r(a)||!r(n)||!r(u))return null;var e=f({l:Number(a),c:Number(n),h:Number(u),a:Number(o)});return M(e)},y=function(r){var a=function(r){var t=l(r),a=t.x/o,n=t.y/e,u=t.z/c;return a=a>b?Math.cbrt(a):(d*a+16)/116,{l:116*(n=n>b?Math.cbrt(n):(d*n+16)/116)-16,a:500*(a-n),b:200*(n-(u=u>b?Math.cbrt(u):(d*u+16)/116)),alpha:t.a}}(r),n=t(a.a,3),u=t(a.b,3),h=Math.atan2(u,n)/Math.PI*180;return{l:a.l,c:Math.sqrt(n*n+u*u),h:h<0?h+360:h,a:a.alpha}},M=function(r){return t={l:r.l,a:r.c*Math.cos(r.h*Math.PI/180),b:r.c*Math.sin(r.h*Math.PI/180),alpha:r.a},n=t.a/500+(a=(t.l+16)/116),u=a-t.b/200,i({x:(Math.pow(n,3)>b?Math.pow(n,3):(116*n-16)/d)*o,y:(t.l>8?Math.pow((t.l+16)/116,3):t.l/d)*e,z:(Math.pow(u,3)>b?Math.pow(u,3):(116*u-16)/d)*c,a:t.alpha});var t,a,n,u},x=/^lch\(\s*([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,s=function(r){var t=x.exec(r);if(!t)return null;var a,u,h=f({l:Number(t[1]),c:Number(t[2]),h:(a=t[3],u=t[4],void 0===u&&(u="deg"),Number(a)*(n[u]||1)),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return M(h)};module.exports=function(r,t){r.prototype.toLch=function(){return p(y(this.rgba))},r.prototype.toLchString=function(){return r=p(y(this.rgba)),t=r.l,a=r.c,n=r.h,(u=r.a)<1?"lch("+t+"% "+a+" "+n+" / "+u+")":"lch("+t+"% "+a+" "+n+")";var r,t,a,n,u},t.string.push([s,"lch"]),t.object.push([v,"lch"])};
"use strict"; var ShareObj = (function () { function ShareObj() { } return ShareObj; }()); exports.ShareObj = ShareObj;
load("8b38e12cab5de21ec5393724c0d9b7dd.js"); //------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- (function() { var ary = new Array(10); var obj0 = new Object(); var a; var b; var c; var d; var e; var f; var g; var h; a = 1078; b = -61609; c = 59887; d = -51644; e = 63337; f = 42816; g = -43248; h = -48176; obj0.a = -63430; obj0.b = 46853; obj0.c = -46216; obj0.d = 61084; obj0.e = 6851; ary[0] = -53479; ary[1] = 27411; ary[100] = -26255; a = (((f | g) & (+ (57579 * -59934))) >= (h & ((-1761 <= d) ? obj0.b : (g ^ 58748)))); if(((((obj0.b == 4636) ? (10200 ^ obj0.e) : g) & -28083) == ((f * (45564 >= 56371)) + ((f - obj0.b) ^ (-64907 ? obj0.d : d))))) { obj0.a = (+ ((a++ ) - d)); } else { a = obj0.e; } a = ((((obj0.b - -12350) & (e * g)) ^ ((h != -50) ? (-7996 != 12764) : obj0.d)) * ((c - obj0.e) & (obj0.c | (13946 | -26296)))); obj0.e = (- (g + e)); WScript.Echo("a = " + (a>>3)); WScript.Echo("b = " + (b>>3)); WScript.Echo("c = " + (c>>3)); WScript.Echo("d = " + (d>>3)); WScript.Echo("e = " + (e>>3)); WScript.Echo("f = " + (f>>3)); WScript.Echo("g = " + (g>>3)); WScript.Echo("h = " + (h>>3)); WScript.Echo("obj0.a = " + (obj0.a>>3)); WScript.Echo("obj0.b = " + (obj0.b>>3)); WScript.Echo("obj0.c = " + (obj0.c>>3)); WScript.Echo("obj0.d = " + (obj0.d>>3)); WScript.Echo("obj0.e = " + (obj0.e>>3)); WScript.Echo("ary[0] = " + (ary[0]>>3)); WScript.Echo("ary[1] = " + (ary[1]>>3)); WScript.Echo("ary[100] = " + (ary[100]>>3)); WScript.Echo('done'); })();
/** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule GraphQLRange * @typechecks */ 'use strict'; const GraphQLMutatorConstants = require('GraphQLMutatorConstants'); const GraphQLSegment = require('GraphQLSegment'); const RelayConnectionInterface = require('RelayConnectionInterface'); const RelayRecord = require('RelayRecord'); const forEachObject = require('forEachObject'); const invariant = require('invariant'); const rangeOperationToMetadataKey = require('rangeOperationToMetadataKey'); const serializeRelayQueryCall = require('serializeRelayQueryCall'); const warning = require('warning'); const { END_CURSOR, HAS_NEXT_PAGE, HAS_PREV_PAGE, START_CURSOR, } = RelayConnectionInterface; /** * @param {array<object>} queryCalls * @return {object} */ function callsArrayToObject(queryCalls) { const calls = {}; for (let ii = 0; ii < queryCalls.length; ii++) { if (RelayConnectionInterface.isConnectionCall(queryCalls[ii])) { const queryCall = queryCalls[ii]; let {value} = queryCall; // assuming that range calls will only have a single argument if (Array.isArray(value) && value.length) { value = value[0]; } // Ignore the whole call when the value is null if (value === null) { continue; } calls[queryCall.name] = value; } } // update first and last call values to be numbers if (calls.first) { invariant( !isNaN(calls.first), 'GraphQLRange: Expected `first` argument to be a number, got ' + '`%s`.', calls.first ); calls.first = +calls.first; } else if (calls.last) { invariant( !isNaN(calls.last), 'GraphQLRange: Expected `last` argument to be a number, got ' + '`%s`.', calls.last ); calls.last = +calls.last; } return calls; } /** * Returns whether this is currently a set of static calls that GraphQLRange * supports. Static calls define ranges that do not change over a period * of time, given the same set of arguments. * * @param {object} calls * @return {?boolean} */ function isStaticCall(calls) { return calls.hasOwnProperty('surrounds') || calls.hasOwnProperty('find'); } /** * Returns whether this is currently a set of calls that GraphQLRange * supports * * @param {object} calls * @return {boolean} */ function isValidRangeCall(calls) { const hasFirst = calls.hasOwnProperty('first'); const hasLast = calls.hasOwnProperty('last'); // Currently only supports: first(), after().first(), last(), before().last() // before().first(), after().last(), after().before().first(), and // after().before().last() // first() can never be called with last(). return ((hasFirst || hasLast) && !(hasFirst && hasLast)); } /** * Returns whether the call values are supported by GraphQLRange * * @param {object} calls * @return {boolean} */ function isValidRangeCallValues(calls) { return (calls.hasOwnProperty('first') && calls.first > 0) || (calls.hasOwnProperty('last') && calls.last > 0); } /** * Validates edge to ensure it has all the fields needed to be store properly. * * @param {object} edge */ function validateEdge(edge) { invariant( RelayRecord.getDataIDForObject(edge) !== undefined, 'GraphQLStore: `edge` must have a data id' ); invariant( edge.node !== undefined, 'GraphQLStore: `edge` must have `node` field' ); } /** * @param {array<object>} edges */ function validateEdges(edges) { edges.forEach(validateEdge); } /** * @internal * * A range represents an ordered set of edges. Methods are provided for adding * edges (`appendEdge`, `prependEdge`, `addItems`) and removing them * (`removeEdgeWithID`). * * Within a range, each contiguous group of edges is modeled using a * `GraphQLSegment`, but this is an implementation detail that `GraphQLRange` * hides from its callers. * * Ranges model GraphQL connections, which are the means of traversing from a * node to a set of associated objects; for example, in the following query the * "friends" connection produces a range containing edges that lead to the * requested friend nodes: * * node(4) { * friends.first(2) { * edges { * node { * id, * name, * }, * }, * }, * } * * @see `GraphQLSegment` * @see http://facebook.github.io/relay/docs/graphql-connections.html */ class GraphQLRange { constructor() { this.reset(); } reset() { // List of segments where each segment is a continuous chunk. // There are gaps in between the segments. The first segment in the list // should be cursors beginning at the top of the range (i.e. first(N)). // The last segment in the list should be cursors at the bottom of // the range (i.e. last(N)). this._orderedSegments = [ new GraphQLSegment(), new GraphQLSegment(), ]; // GraphQLRange nodes can also support static queries like surrounds, // find, whose contents won't ever change for a given set of arguments. // Store these queries' results in this map, since you can't do first() // or last() queries on these ranges. this._staticQueriesMap = {}; this._hasFirst = false; this._hasLast = false; } /** * @param {number} index */ _resetSegment(index) { invariant( index >= 0 && index < this._orderedSegments.length, 'cannot reset non-existent segment' ); this._orderedSegments[index] = new GraphQLSegment(); } /** * @param {string} cursor * @return {?number} */ _getSegmentIndexByCursor(cursor) { // TODO: revisit if we end up having too many segments for (let ii = 0; ii < this._orderedSegments.length; ii++) { if (this._orderedSegments[ii].containsEdgeWithCursor(cursor)) { return ii; } } return null; } /** * @param {string} id * @return {?number} */ _getSegmentIndexByID(id) { // TODO: revisit if we end up having too many segments for (let ii = 0; ii < this._orderedSegments.length; ii++) { if (this._orderedSegments[ii].containsEdgeWithID(id)) { return ii; } } return null; } /** * Add edges' data into the static queries map for the query calls, * overwriting any previously existing data for these calls. * @param {array<object>} queryCalls * @param {array} edges */ _addStaticEdges(queryCalls, edges) { const calls = _callsToString(queryCalls); const edgeIDsToStore = []; const cursorsToStore = []; for (let ii = 0; ii < edges.length; ii++) { const edge = edges[ii]; edgeIDsToStore.push(RelayRecord.getDataIDForObject(edge)); cursorsToStore.push(edge.cursor); } this._staticQueriesMap[calls] = { edgeIDs: edgeIDsToStore, cursors: cursorsToStore, }; } /** * Add edges into the range based on the query calls. New edges will replace * previous edges in the range. * @param {array<object>} queryCalls * @param {array} edges * @param {object} pageInfo */ addItems(queryCalls, edges, pageInfo) { validateEdges(edges); const calls = callsArrayToObject(queryCalls); let segmentCount, segmentIndex; if (isStaticCall(calls)) { this._addStaticEdges(queryCalls, edges); return; } if (!isValidRangeCall(calls)) { console.error( 'GraphQLRange currently only handles first(<count>), ' + 'after(<cursor>).first(<count>), last(<count>), ' + 'before(<cursor>).last(<count>), before(<cursor>).first(<count>), ' + 'and after(<cursor>).last(<count>)' ); return; } // Skip the update if cursors are invalid if (calls.before === null || calls.after === null) { console.error( 'GraphQLRange received null as a cursor.' ); return; } if (calls.first) { // before().first() calls can produce gaps if (calls.before && !calls.after) { // make a new segment if there is a gap if (pageInfo[HAS_NEXT_PAGE] === true) { if (this._getSegmentIndexByCursor(calls.before) === 0) { this._orderedSegments.unshift( new GraphQLSegment() ); } // When there is a gap from before().first() query, this is the same // as just storing a first(). this._addAfterFirstItems( edges, pageInfo[HAS_NEXT_PAGE], undefined, calls.before ); } else { // Since there is no gap, we can stitch into the beginning // of existing segment this._addBeforeLastItems( edges, pageInfo[HAS_PREV_PAGE], calls.before ); } } else { // These elements are added from paging to extend the the range. if (!calls.after) { segmentIndex = 0; segmentCount = this.getFirstSegment().getCount(); if ( segmentCount && (calls.first > segmentCount || edges.length > segmentCount) && !this.getFirstSegment().getFirstCursor() ) { // this is a range for which we don't have a cursor, and we've // fetched more data by increasing the `first(N)` variable; we // blow away and replace the first segment in order to side-step // issues where the order of IDs in the range may change between // queries this._resetSegment(segmentIndex); } } this._addAfterFirstItems( edges, pageInfo[HAS_NEXT_PAGE], calls.after, calls.before ); } } else if (calls.last) { // after().last() calls can produce gaps if (calls.after && !calls.before) { // make a new segment if there is a gap if (pageInfo[HAS_PREV_PAGE] === true) { if (this._getSegmentIndexByCursor(calls.after) === this._orderedSegments.length - 1) { this._orderedSegments.push(new GraphQLSegment()); } // When there is a gap from after().last() query, this is the same as // just storing a last(). this._addBeforeLastItems( edges, pageInfo[HAS_PREV_PAGE], undefined, calls.after ); } else { // Since there is no gap, we can stitch to the end // of existing segment this._addAfterFirstItems( edges, pageInfo[HAS_NEXT_PAGE], calls.after ); } } else { // These elements are added from paging to extend the the range. if (!calls.before) { segmentIndex = this._orderedSegments.length - 1; segmentCount = this.getLastSegment().getCount(); if ( segmentCount && (calls.last > segmentCount || edges.length > segmentCount) && !this.getLastSegment().getLastCursor() ) { // this is a range for which we don't have a cursor, and we've // fetched more data by increasing the `last(N)` variable; we // blow away and replace the last segment in order to side-step // issues where the order of IDs in the range may change between // queries this._resetSegment(segmentIndex); } } this._addBeforeLastItems( edges, pageInfo[HAS_PREV_PAGE], calls.before, calls.after ); } } } /** * @return {GraphQLSegment} */ getFirstSegment() { return this._orderedSegments[0]; } /** * @return {GraphQLSegment} */ getLastSegment() { return this._orderedSegments[this._orderedSegments.length - 1]; } /** * Tries to concat segments at segmentIndex and segmentIndex + 1. * This is an all or nothing operation. * If concat is successful, we'll remove the segment at segmentIndex + 1 * from the orderedSegments after all elements has been added to the segment * at segmentIndex. * If concat is unsuccessful, nothing will be changed. * @param {number} segmentIndex */ _concatSegments(segmentIndex) { invariant( (segmentIndex + 1) < this._orderedSegments.length && segmentIndex >= 0, 'GraphQLRange cannot concat segments outside the range ' + 'of orderedSegments' ); const firstSegment = this._orderedSegments[segmentIndex]; const secondSegment = this._orderedSegments[segmentIndex + 1]; if (firstSegment.concatSegment(secondSegment)) { this._orderedSegments.splice(segmentIndex + 1, 1); } else { console.warn( 'GraphQLRange was unable to concat segment %d and segment %d', segmentIndex, segmentIndex + 1 ); } } /** * Adds the edge to the front of the range. New edge will replace previous * edge that have the same id. * @param {object} edge */ prependEdge(edge) { validateEdge(edge); this._hasFirst = true; this._removeEdgeIfApplicable(edge); const segment = this.getFirstSegment(); segment.prependEdge(edge); } /** * Adds the edge to the end of the range. New edge will replace previous * edge that have the same id. * @param {object} edge */ appendEdge(edge) { validateEdge(edge); this._hasLast = true; this._removeEdgeIfApplicable(edge); const segment = this.getLastSegment(); segment.appendEdge(edge); } /** * Removes edge in range if it matches id in input edge. * @param {object} edge */ _removeEdgeIfApplicable(edge) { const id = RelayRecord.getDataIDForObject(edge); const index = this._getSegmentIndexByID(id); if (index != null) { this._orderedSegments[index].removeEdge(id); } } /** * Remove any edges in the range if it matches any of the ids in the input. * This function is used to prevent us from adding any id that already exist * in the range. * * @param {array} edges */ _removeEdgesIfApplicable(edges) { for (let ii = 0; ii < edges.length; ii++) { this._removeEdgeIfApplicable(edges[ii]); } } /** * Add items into the correct segment with the cursor. If no cursor * is present, items are added to the very first segment. * * @param {array} edges * @param {boolean} hasNextPage * @param {?string} afterCursor * @param {?string} beforeCursor */ _addAfterFirstItems( edges, hasNextPage, afterCursor, beforeCursor ) { let segment; let segmentIndex; let lastCursor; if (afterCursor !== undefined) { segmentIndex = this._getSegmentIndexByCursor(afterCursor); if (segmentIndex == null) { warning( false, 'GraphQLRange cannot find a segment that has the cursor: %s', afterCursor ); return; } segment = this._orderedSegments[segmentIndex]; lastCursor = segment.getLastCursor(); if (lastCursor !== afterCursor) { edges = this._reconcileAfterFirstEdges(segment, edges, afterCursor); afterCursor = lastCursor; if (!edges) { return; } } } else { segmentIndex = 0; segment = this._orderedSegments[segmentIndex]; lastCursor = segment.getLastCursor(); if (lastCursor !== undefined) { edges = this._reconcileAfterFirstEdges(segment, edges); afterCursor = lastCursor; if (!edges) { return; } } } if (beforeCursor !== undefined) { if (segmentIndex === this._orderedSegments.length - 1) { console.warn( 'GraphQLRange cannot add because there is no next segment' ); return; } else if (this._orderedSegments[segmentIndex + 1].getFirstCursor() !== beforeCursor) { warning( false, 'GraphQLRange cannot add because beforeCursor does not match first ' + 'cursor of the next segment' ); return; } } if (afterCursor === undefined) { this._hasFirst = true; } this._removeEdgesIfApplicable(edges); segment.addEdgesAfterCursor(edges, afterCursor); if (!hasNextPage) { if (beforeCursor !== undefined) { // If we have a beforeCursor and there is no next page, // then there is no gap between the current segment and the next. // We can concat the two segments when there is no gap. this._concatSegments(segmentIndex); } else { this._hasLast = true; // If this segment already has the last element, we don't // need any segments after this. this._orderedSegments.splice( segmentIndex + 1, this._orderedSegments.length - 1 - segmentIndex ); } } } /** * In the case the cursor does not correspond last cursor, * walk through the edges to see if we can trim edges to * only those after the last cursor. Returns undefined when * the input cannot be reconciled. * * @param {GraphQLSegment} segment * @param {array} edges * @param {?string} cursor * @return {?array} trimmed edges */ _reconcileAfterFirstEdges(segment, edges, cursor) { const metadata = segment.getMetadataAfterCursor(edges.length + 1, cursor); const edgeIDs = metadata.edgeIDs; if (edgeIDs.length > edges.length) { // Already have more edges than the input. return undefined; } for (let ii = 0; ii < edgeIDs.length; ii++) { if (edgeIDs[ii] !== RelayRecord.getDataIDForObject(edges[ii])) { warning( false, 'Relay was unable to reconcile edges on a connection. This most ' + 'likely occurred while trying to handle a server response that ' + 'includes connection edges with nodes that lack an `id` field.' ); return undefined; } } return edges.slice(edgeIDs.length); } /** * Add items into the correct segment with the cursor. If no cursor * is present, items are added to the very last segment. * @param {array} edges * @param {boolean} hasPrevPage * @param {?string} beforeCursor * @param {?string} afterCursor */ _addBeforeLastItems( edges, hasPrevPage, beforeCursor, afterCursor ) { let segment; let segmentIndex; let firstCursor; if (beforeCursor !== undefined) { segmentIndex = this._getSegmentIndexByCursor(beforeCursor); if (segmentIndex == null) { warning( false, 'GraphQLRange cannot find a segment that has the cursor: %s', beforeCursor ); return; } segment = this._orderedSegments[segmentIndex]; firstCursor = segment.getFirstCursor(); if (firstCursor !== beforeCursor) { edges = this._reconcileBeforeLastEdges(segment, edges, beforeCursor); beforeCursor = firstCursor; if (!edges) { return; } } } else { segmentIndex = this._orderedSegments.length - 1; segment = this._orderedSegments[segmentIndex]; firstCursor = segment.getFirstCursor(); if (firstCursor !== undefined) { edges = this._reconcileBeforeLastEdges(segment, edges, beforeCursor); beforeCursor = firstCursor; if (!edges) { return; } } } if (afterCursor !== undefined) { if (segmentIndex === 0) { console.warn( 'GraphQLRange cannot add because there is no previous segment' ); return; } else if (this._orderedSegments[segmentIndex - 1].getLastCursor() !== afterCursor) { warning( false, 'GraphQLRange cannot add because afterCursor does not match last ' + 'cursor of the previous segment' ); return; } } if (beforeCursor === undefined) { this._hasLast = true; } this._removeEdgesIfApplicable(edges); segment.addEdgesBeforeCursor(edges, beforeCursor); if (!hasPrevPage) { if (afterCursor !== undefined) { // If we have an afterCursor and there is no previous page, // then there is no gap between the current segment and the previous. // We can concat the two segments when there is no gap. this._concatSegments(segmentIndex - 1); } else { this._hasFirst = true; // If this segment already has the first element, we don't // need any segments before this. this._orderedSegments.splice(0, segmentIndex); } } } /** * In the case the cursor does not correspond first cursor, * walk through the edges to see if we can trim edges to * only those before the first cursor. Returns undefined when * the input cannot be reconciled. * * @param {GraphQLSegment} segment * @param {array} edges * @param {?string} cursor * @return {?array} trimmed edges */ _reconcileBeforeLastEdges(segment, edges, cursor) { const metadata = segment.getMetadataBeforeCursor(edges.length + 1, cursor); const edgeIDs = metadata.edgeIDs; if (edgeIDs.length > edges.length) { // Already have more edges than the input. return undefined; } for (let ii = 1; ii <= edgeIDs.length; ii++) { if (edgeIDs[edgeIDs.length - ii] !== RelayRecord.getDataIDForObject(edges[edges.length - ii])) { warning( false, 'Relay was unable to reconcile edges on a connection. This most ' + 'likely occurred while trying to handle a server response that ' + 'includes connection edges with nodes that lack an `id` field.' ); return undefined; } } return edges.slice(0, edges.length - edgeIDs.length); } /** * Removes an edge from this range such that the edge will never be reachable * regardless of the client session. This is used by delete mutations. * * @param {string} id */ removeEdgeWithID(id) { for (let ii = 0; ii < this._orderedSegments.length; ii++) { this._orderedSegments[ii].removeAllEdges(id); } } /** * @param {array<object>} queryCalls * @param {?object} queuedRecord * @return {object} includes fields: requestedEdgeIDs, diffCalls */ retrieveRangeInfoForQuery(queryCalls, queuedRecord) { const calls = callsArrayToObject(queryCalls); if (isStaticCall(calls)) { return this._retrieveRangeInfoForStaticCalls( queryCalls, ); } // Convert to name => true, so we can test for whether the key exists // without comparing to undefined if (!isValidRangeCall(calls)) { console.error( 'GraphQLRange currently only handles first(<count>), ' + 'after(<cursor>).first(<count>), last(<count>), ' + 'before(<cursor>).last(<count>), before(<cursor>).first(<count>), ' + 'and after(<cursor>).last(<count>)' ); return { requestedEdgeIDs: [], diffCalls: [], pageInfo: RelayConnectionInterface.getDefaultPageInfo(), }; } if ((calls.first && calls.before) || (calls.last && calls.after)) { // TODO #7556678: add support for first/before and last/after return { requestedEdgeIDs: [], diffCalls: [], pageInfo: RelayConnectionInterface.getDefaultPageInfo(), }; } if (!isValidRangeCallValues(calls)) { console.error( 'GraphQLRange only supports first(<count>) or last(<count>) ' + 'where count is greater than 0' ); return { requestedEdgeIDs: [], diffCalls: [], pageInfo: RelayConnectionInterface.getDefaultPageInfo(), }; } if (calls.first) { return this._retrieveRangeInfoForFirstQuery( queryCalls, queuedRecord ); } else if (calls.last) { return this._retrieveRangeInfoForLastQuery( queryCalls, queuedRecord ); } } /** * @param {array<object>} queryCalls * @return {object} includes fields: requestedEdgeIDs, diffCalls */ _retrieveRangeInfoForStaticCalls(queryCalls) { const calls = _callsToString(queryCalls); const storedInfo = this._staticQueriesMap[calls]; if (storedInfo) { return { requestedEdgeIDs: storedInfo.edgeIDs, diffCalls: [], pageInfo: { [START_CURSOR]: storedInfo.cursors[0], [END_CURSOR]: storedInfo.cursors[storedInfo.cursors.length - 1], [HAS_NEXT_PAGE]: true, [HAS_PREV_PAGE]: true, }, }; } // if we don't have the data for this static call already, // return empty arrays with the corresponding diffCalls return { requestedEdgeIDs: [], diffCalls: queryCalls, pageInfo: RelayConnectionInterface.getDefaultPageInfo(), }; } /** * @param {object} queuedRecord * @return {?array<string>} */ _getAppendedIDsForQueuedRecord(queuedRecord) { return queuedRecord[ rangeOperationToMetadataKey[GraphQLMutatorConstants.APPEND] ]; } /** * @param {object} queuedRecord * @return {?array<string>} */ _getRemovedIDsForQueuedRecord(queuedRecord) { return queuedRecord[ rangeOperationToMetadataKey[GraphQLMutatorConstants.REMOVE] ]; } /** * @param {object} queuedRecord * @return {?array<string>} */ _getPrependedIDsForQueuedRecord(queuedRecord) { return queuedRecord[ rangeOperationToMetadataKey[GraphQLMutatorConstants.PREPEND] ]; } /** * @param {array<object>} queryCalls * @param {?object} queuedRecord * @return {object} includes fields: requestedEdgeIDs, diffCalls */ _retrieveRangeInfoForFirstQuery( queryCalls, queuedRecord ) { let appendEdgeIDs; let prependEdgeIDs; let removeIDs; if (queuedRecord) { appendEdgeIDs = this._getAppendedIDsForQueuedRecord(queuedRecord); prependEdgeIDs = this._getPrependedIDsForQueuedRecord(queuedRecord); removeIDs = this._getRemovedIDsForQueuedRecord(queuedRecord); } const calls = callsArrayToObject(queryCalls); let countNeeded = calls.first + (removeIDs ? removeIDs.length : 0); let segment; let segmentIndex; const pageInfo = { ...RelayConnectionInterface.getDefaultPageInfo(), }; const afterCursor = calls.after; if (afterCursor !== undefined) { segmentIndex = this._getSegmentIndexByCursor(afterCursor); if (segmentIndex == null) { console.warn( 'GraphQLRange cannot find a segment that has the cursor: ' + afterCursor ); return { requestedEdgeIDs: [], diffCalls: [], pageInfo: pageInfo, }; } segment = this._orderedSegments[segmentIndex]; } else { const prependEdgesCount = prependEdgeIDs ? prependEdgeIDs.length : 0; countNeeded -= prependEdgesCount; segmentIndex = 0; segment = this._orderedSegments[segmentIndex]; } const requestedMetadata = segment.getMetadataAfterCursor(countNeeded, afterCursor); let requestedEdgeIDs = requestedMetadata.edgeIDs; const requestedCursors = requestedMetadata.cursors; const diffCalls = []; if (requestedCursors.length) { pageInfo[START_CURSOR] = requestedCursors[0]; pageInfo[END_CURSOR] = requestedCursors[requestedCursors.length - 1]; } const lastID = requestedEdgeIDs[requestedEdgeIDs.length - 1]; // Only requested segment that does not include very last item from // the range can have next page and diff calls if (!this._hasLast || segmentIndex !== this._orderedSegments.length - 1 || (lastID && lastID !== segment.getLastID())) { pageInfo[HAS_NEXT_PAGE] = true; if (requestedEdgeIDs.length < countNeeded) { countNeeded -= requestedEdgeIDs.length; const lastCursor = segment.getLastCursor(); // If segment has null cursors, retrieve whole range. if (lastCursor === null) { diffCalls.push({name: 'first', value: calls.first}); } else { if (lastCursor !== undefined) { diffCalls.push({name: 'after', value: lastCursor}); } // If this is not the last segment, we should not request edges // that would overlap the first element of the next segment. if (segmentIndex !== this._orderedSegments.length - 1) { const nextSegment = this._orderedSegments[segmentIndex + 1]; const firstCursor = nextSegment.getFirstCursor(); if (firstCursor !== undefined) { diffCalls.push({name: 'before', value: firstCursor}); } } diffCalls.push({name: 'first', value: countNeeded}); } } } if (queuedRecord) { if (prependEdgeIDs && prependEdgeIDs.length && !calls.after) { requestedEdgeIDs = prependEdgeIDs.concat(requestedEdgeIDs); } if (appendEdgeIDs && appendEdgeIDs.length && !pageInfo[HAS_NEXT_PAGE]) { requestedEdgeIDs = requestedEdgeIDs.concat(appendEdgeIDs); } if (removeIDs && removeIDs.length) { requestedEdgeIDs = requestedEdgeIDs.filter(function(edgeID) { return (removeIDs.indexOf(edgeID) === -1); }); } if (requestedEdgeIDs.length > calls.first) { requestedEdgeIDs = requestedEdgeIDs.slice(0, calls.first); } } return { requestedEdgeIDs: requestedEdgeIDs, diffCalls: diffCalls, pageInfo: pageInfo, }; } /** * @param {array<object>} queryCalls * @param {?object} queuedRecord * @return {object} includes fields: requestedEdgeIDs, diffCalls */ _retrieveRangeInfoForLastQuery( queryCalls, queuedRecord ) { let appendEdgeIDs; let prependEdgeIDs; let removeIDs; if (queuedRecord) { appendEdgeIDs = this._getAppendedIDsForQueuedRecord(queuedRecord); prependEdgeIDs = this._getPrependedIDsForQueuedRecord(queuedRecord); removeIDs = this._getRemovedIDsForQueuedRecord(queuedRecord); } const calls = callsArrayToObject(queryCalls); let countNeeded = calls.last + (removeIDs ? removeIDs.length : 0); let segment; let segmentIndex; const pageInfo = { ...RelayConnectionInterface.getDefaultPageInfo(), }; const beforeCursor = calls.before; if (beforeCursor !== undefined) { segmentIndex = this._getSegmentIndexByCursor(beforeCursor); if (segmentIndex == null) { console.warn( 'GraphQLRange cannot find a segment that has the cursor: ' + beforeCursor ); return { requestedEdgeIDs: [], diffCalls: [], pageInfo: pageInfo, }; } segment = this._orderedSegments[segmentIndex]; } else { const appendEdgesCount = appendEdgeIDs ? appendEdgeIDs.length : 0; countNeeded -= appendEdgesCount; segmentIndex = this._orderedSegments.length - 1; segment = this._orderedSegments[segmentIndex]; } const requestedMetadata = segment.getMetadataBeforeCursor(countNeeded, beforeCursor); let requestedEdgeIDs = requestedMetadata.edgeIDs; const requestedCursors = requestedMetadata.cursors; const diffCalls = []; if (requestedCursors.length) { pageInfo[START_CURSOR] = requestedCursors[0]; pageInfo[END_CURSOR] = requestedCursors[requestedCursors.length - 1]; } const firstID = requestedEdgeIDs[0]; // Only requested segment that does not include very first item from // the range can have next page and diff calls if (!this._hasFirst || segmentIndex !== 0 || (firstID && firstID !== segment.getFirstID())) { pageInfo[HAS_PREV_PAGE] = true; if (requestedEdgeIDs.length < countNeeded) { countNeeded -= requestedEdgeIDs.length; const firstCursor = segment.getFirstCursor(); // If segment has null cursors, retrieve whole range. if (firstCursor === null) { diffCalls.push({name: 'last', value: calls.last}); } else { if (firstCursor !== undefined) { diffCalls.push({name: 'before', value: firstCursor}); } // If this is not the first segment, we should not request edges // that would overlap the last element of the previous segment. if (segmentIndex !== 0) { const prevSegment = this._orderedSegments[segmentIndex - 1]; const lastCursor = prevSegment.getLastCursor(); if (lastCursor !== undefined) { diffCalls.push({name: 'after', value: lastCursor}); } } diffCalls.push({name: 'last', value: countNeeded}); } } } if (queuedRecord) { if (appendEdgeIDs && appendEdgeIDs.length && !calls.before) { requestedEdgeIDs = requestedEdgeIDs.concat(appendEdgeIDs); } if (prependEdgeIDs && prependEdgeIDs.length && !pageInfo[HAS_PREV_PAGE]) { requestedEdgeIDs = prependEdgeIDs.concat(requestedEdgeIDs); } if (removeIDs && removeIDs.length) { requestedEdgeIDs = requestedEdgeIDs.filter(function(edgeID) { return (removeIDs.indexOf(edgeID) === -1); }); } if (requestedEdgeIDs.length > calls.last) { const length = requestedEdgeIDs.length; requestedEdgeIDs = requestedEdgeIDs.slice(length - calls.last, length); } } return { requestedEdgeIDs: requestedEdgeIDs, diffCalls: diffCalls, pageInfo: pageInfo, }; } static fromJSON(descriptor) { const [ hasFirst, hasLast, staticQueriesMap, orderedSegments, ] = descriptor; const range = new GraphQLRange(); range._hasFirst = hasFirst; range._hasLast = hasLast; range._staticQueriesMap = staticQueriesMap; range._orderedSegments = orderedSegments.map( segmentDescriptor => GraphQLSegment.fromJSON(segmentDescriptor) ); return range; } toJSON() { return [ this._hasFirst, this._hasLast, this._staticQueriesMap, this._orderedSegments, ]; } __debug() { return { orderedSegments: this._orderedSegments, }; } getEdgeIDs() { const edgeIDs = []; this._orderedSegments.forEach(segment => { edgeIDs.push(...segment.getEdgeIDs()); }); forEachObject(this._staticQueriesMap, (query) => { edgeIDs.push(...query.edgeIDs); }); return edgeIDs; } getSegmentedEdgeIDs() { return this._orderedSegments.map(segment => segment.getEdgeIDs()); } } /** * @param {array<object>} calls * @return {string} */ function _callsToString(calls) { return calls.map( call => serializeRelayQueryCall(call).substring(1) ).join(','); } module.exports = GraphQLRange;
// "creatureSizes": [{ // "id": 2, // "entityTypeId": 127108918, // "name": "Tiny", // "weightType": 1 // }, { // "traits": { // "size": "grg", // "sizeId": 7, const SIZES = [ { name: "Tiny", value: "tiny", size: 0.5 }, { name: "Small", value: "sm", size: 0.8 }, { name: "Medium", value: "med", size: 1 }, { name: "Large", value: "lg", size: 2 }, { name: "Huge", value: "huge", size: 3 }, { name: "Gargantuan", value: "grg", size: 4 }, ]; export function getSizeFromId(sizeId, DDB_CONFIG) { const size = DDB_CONFIG.creatureSizes.find((s) => s.id == sizeId).name; const sizeData = SIZES.find((s) => size == s.name); return sizeData; } export function getSize (monster, DDB_CONFIG) { const sizeData = getSizeFromId(monster.sizeId, DDB_CONFIG); let token = { scale: 1, value: sizeData.size, }; if (token.value < 1) { token.scale = token.value; token.value = 1; } const data = { value: sizeData.value, token: token, }; return data; }
/* Copyright 2019-2020 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ import React, { Component } from 'react'; import { connect } from 'react-redux'; import isEqual from 'lodash.isequal'; import { Link } from 'react-router-dom'; import { injectIntl } from 'react-intl'; import { getErrorMessage, getFilters, getTitle, urls } from '@tektoncd/dashboard-utils'; import { InlineNotification } from 'carbon-components-react'; import { FormattedDate, Table } from '@tektoncd/dashboard-components'; import { LabelFilter } from '..'; import { fetchTriggerTemplates } from '../../actions/triggerTemplates'; import { getSelectedNamespace, getTriggerTemplates, getTriggerTemplatesErrorMessage, isFetchingTriggerTemplates, isWebSocketConnected } from '../../reducers'; export /* istanbul ignore next */ class TriggerTemplates extends Component { componentDidMount() { document.title = getTitle({ page: 'TriggerTemplates' }); this.fetchTriggerTemplates(); } componentDidUpdate(prevProps) { const { filters, namespace, webSocketConnected } = this.props; const { filters: prevFilters, namespace: prevNamespace, webSocketConnected: prevWebSocketConnected } = prevProps; if ( !isEqual(filters, prevFilters) || namespace !== prevNamespace || (webSocketConnected && prevWebSocketConnected === false) ) { this.fetchTriggerTemplates(); } } fetchTriggerTemplates() { const { filters, namespace } = this.props; this.props.fetchTriggerTemplates({ filters, namespace }); } render() { const { error, intl, loading, selectedNamespace, triggerTemplates } = this.props; const initialHeaders = [ { key: 'name', header: intl.formatMessage({ id: 'dashboard.tableHeader.name', defaultMessage: 'Name' }) }, { key: 'namespace', header: intl.formatMessage({ id: 'dashboard.tableHeader.namespace', defaultMessage: 'Namespace' }) }, { key: 'date', header: intl.formatMessage({ id: 'dashboard.tableHeader.createdTime', defaultMessage: 'Created' }) } ]; const triggerTemplatesFormatted = triggerTemplates.map(template => ({ id: `${template.metadata.namespace}:${template.metadata.name}`, name: ( <Link to={urls.triggerTemplates.byName({ namespace: template.metadata.namespace, triggerTemplateName: template.metadata.name })} title={template.metadata.name} > {template.metadata.name} </Link> ), namespace: template.metadata.namespace, date: ( <FormattedDate date={template.metadata.creationTimestamp} relative /> ) })); return ( <> {error && ( <InlineNotification kind="error" title={intl.formatMessage({ id: 'dashboard.error.title', defaultMessage: 'Error:' })} subtitle={getErrorMessage(error)} iconDescription={intl.formatMessage({ id: 'dashboard.notification.clear', defaultMessage: 'Clear Notification' })} data-testid="errorNotificationComponent" lowContrast /> )} <h1>TriggerTemplates</h1> <LabelFilter {...this.props} /> <Table headers={initialHeaders} rows={triggerTemplatesFormatted} loading={loading && !triggerTemplatesFormatted.length} selectedNamespace={selectedNamespace} emptyTextAllNamespaces={intl.formatMessage( { id: 'dashboard.emptyState.allNamespaces', defaultMessage: 'No {kind} in any namespace.' }, { kind: 'TriggerTemplates' } )} emptyTextSelectedNamespace={intl.formatMessage( { id: 'dashboard.emptyState.selectedNamespace', defaultMessage: 'No {kind} in namespace {selectedNamespace}' }, { kind: 'TriggerTemplates', selectedNamespace } )} /> </> ); } } function mapStateToProps(state, props) { const { namespace: namespaceParam } = props.match.params; const filters = getFilters(props.location); const namespace = namespaceParam || getSelectedNamespace(state); return { error: getTriggerTemplatesErrorMessage(state), filters, loading: isFetchingTriggerTemplates(state), triggerTemplates: getTriggerTemplates(state, { filters, namespace }), selectedNamespace: namespace, webSocketConnected: isWebSocketConnected(state) }; } const mapDispatchToProps = { fetchTriggerTemplates }; export default connect( mapStateToProps, mapDispatchToProps )(injectIntl(TriggerTemplates));
"use strict"; //# sourceMappingURL=star-and-crescent-icon.d.js.map
const router = require('express').Router(); const { Tag, Product, ProductTag } = require('../../models'); // The `/api/tags` endpoint router.get('/', async (req, res) => { // find all tags // be sure to include its associated Product data try { const tagData = await Tag.findAll({ include: [ {model: Product}] }); res.status(200).json(tagData); } catch (err) { res.status(500).json(err); } }); router.get('/:id', async (req, res) => { // find a single tag by its `id` // be sure to include its associated Product data try{ const tagData = await Tag.findByPk(req.params.id, { include: [ {model: Product} ] }); res.status(200).json(tagData); } catch(err) { res.status(500).json(err) } }); router.post('/', async (req, res) => { // create a new tag try{ const tagData = await Tag.create({ tag_name: req.body.tag_name, }); res.status(200).json(tagData); } catch (err) { res.status(400).json(err); } }); router.put('/:id', async (req, res) => { // update a tag's name by its `id` value const updateTag = await Tag.update( { tag_name: req.body.tag_name }, { where: { id: req.params.id } } ); res.json(updateTag); }); router.delete('/:id', async (req, res) => { // delete on tag by its `id` value try { const tagData = await Tag.destroy({ where: { id: req.params.id } }); if (!tagData){ res.status(404).json({ message: 'This ID does not exist, nothing will be deleted.' }); return; } res.status(200).json( {message: `You have successfully deleted this tag.`});; } catch (err) { res.status(500).json(err) } }); module.exports = router;
mycallback( {"ELECTION CODE": "G2008", "EXPENDITURE PURPOSE DESCRIP": "Food and Beverage", "BENEFICIARY CANDIDATE OFFICE": "", "PAYEE ZIP": "802024003", "MEMO CODE": "", "PAYEE STATE": "CO", "PAYEE LAST NAME": "", "PAYEE CITY": "Denver", "PAYEE SUFFIX": "", "CONDUIT STREET 2": "", "CONDUIT STREET 1": "", "PAYEE FIRST NAME": "", "BACK REFERENCE SCHED NAME": "", "BENEFICIARY COMMITTEE NAME": "", "PAYEE PREFIX": "", "MEMO TEXT/DESCRIPTION": "", "FILER COMMITTEE ID NUMBER": "C00441006", "EXPENDITURE AMOUNT (F3L Bundled)": "556.32", "BENEFICIARY CANDIDATE MIDDLE NAME": "", "BENEFICIARY CANDIDATE LAST NAME": "", "_record_type": "fec.version.v7_0.SB", "PAYEE STREET 2": "", "PAYEE STREET 1": "321 17th Street", "SEMI-ANNUAL REFUNDED BUNDLED AMT": "", "Reference to SI or SL system code that identifies the Account": "", "CONDUIT CITY": "", "ENTITY TYPE": "ORG", "BENEFICIARY CANDIDATE FEC ID": "", "BENEFICIARY COMMITTEE FEC ID": "", "BENEFICIARY CANDIDATE STATE": "", "BENEFICIARY CANDIDATE FIRST NAME": "", "PAYEE MIDDLE NAME": "", "ELECTION OTHER DESCRIPTION": "", "_src_file": "2011/20110411/721716.fec_1.yml", "CONDUIT STATE": "", "CATEGORY CODE": "", "EXPENDITURE PURPOSE CODE": "", "BENEFICIARY CANDIDATE DISTRICT": "", "TRANSACTION ID NUMBER": "BB1B0BCE4BD80481B997", "BACK REFERENCE TRAN ID NUMBER": "", "EXPENDITURE DATE": "20081031", "BENEFICIARY CANDIDATE PREFIX": "", "CONDUIT NAME": "", "PAYEE ORGANIZATION NAME": "Brown Palace", "BENEFICIARY CANDIDATE SUFFIX": "", "CONDUIT ZIP": "", "FORM TYPE": "SB17"});
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; const Alert = ({ alerts }) => ( <div className='alert-wrapper'> {alerts.map((alert) => ( <div key={alert.id} className={`alert alert-${alert.alertType}`}> {alert.msg} </div> ))} </div> ); Alert.propTypes = { alerts: PropTypes.array.isRequired }; const mapStateToProps = (state) => ({ alerts: state.alert }); export default connect(mapStateToProps)(Alert);
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; // components import Spinner from 'components/ui/Spinner'; import WidgetCard from 'components/widgets/list/WidgetCard'; class WidgetList extends PureComponent { static defaultProps = { showActions: false, showRemove: false, showEmbed: false } static propTypes = { widgets: PropTypes.array.isRequired, showActions: PropTypes.bool, showRemove: PropTypes.bool, showEmbed: PropTypes.bool, showFavourite: PropTypes.bool, loading: PropTypes.bool, mode: PropTypes.oneOf(['grid', 'list']).isRequired, onWidgetClick: PropTypes.func, onWidgetRemove: PropTypes.func }; handleWidgetRemoved = () => { this.props.onWidgetRemove(); } render() { const { widgets, showRemove, showActions, showEmbed, showFavourite, mode, loading } = this.props; const newClassName = classNames({ column: true, 'list-item': true, 'small-12': true, [`-${mode}`]: true, 'medium-4': mode === 'grid' }); return ( <div className="c-widget-list"> {loading && <Spinner className="-light" isLoading />} <ul className="row list"> {widgets.map(widget => ( <li key={widget.id} className={newClassName} > <WidgetCard widget={widget} onWidgetClick={this.props.onWidgetClick} onWidgetRemove={this.handleWidgetRemoved} showActions={showActions} showRemove={showRemove} showEmbed={showEmbed} showFavourite={showFavourite} mode={mode === 'grid' ? 'thumbnail' : 'full'} /> </li> ))} </ul> </div> ); } } export default WidgetList;
$(document).ready(function(){ /*Should work in the day time Realtime kødata på Dokk1 https://www.odaa.dk/dataset/kodata/resource/38d6520a-b1b9-4224-a7ae-23d4b14f598f# They have this structure http://www.odaa.dk/api/3/action/datastore_search?resource_id=251528ca-8ec9-4b70-9960-83c4d0c4e7b6 */ //Sun //var resource_id = '251528ca-8ec9-4b70-9960-83c4d0c4e7b6'; // Kø dokk1 var resource_id = '38d6520a-b1b9-4224-a7ae-23d4b14f598f'; $.ajax({ url: '/proxy_odaa.php', async:true, type: "POST", dataType: "json", data: { resource_id: resource_id // This is parsed to the php curl function }, cache:false, success: function (json) { for (var key in json['result']['records']){ console.log(json['result']['records'][key]['ServiceTypeName']); /*Number of people currently waiting in line for this service*/ console.log(json['result']['records'][key]['WaitingCustomersMQ']); // Avg. waiting pr. person in line (avg over last 10 people) console.log(json['result']['records'][key]['AvgWaitingSQ']); /*Often undefined*/ //console.log(json['result']['records'][key]['WaitingCustomersSQ ']); /*Don't get this one*/ //console.log(json['result']['records'][key]['LongestWaitingTimeTicketSQ']); /*Longest waiting in line. Often makes no sense since the timer begins in the middle of the night and this, this value is grossly exaggerated*/ console.log(json['result']['records'][key]['LongestWaitingTimeTicketMQ']); var d = JSON.stringify(json['result']['records'][key]['AvgWaitingSQ']).slice(-9, -1); console.log(d); console.log(d.slice(-8,-6)); console.log(d.slice(-5,-3)); console.log(d.slice(-2)); console.log(''); $("#koe_list").append('<li style="list-style:none"><h1>' + json['result']['records'][key]['ServiceTypeName'] + '</h1>' + '<hr class="slim-margin"><h2>' + 'Antal personer i kø: ' + json['result']['records'][key]['WaitingCustomersMQ'] + '<br>' + 'Gennemsnitlig ventetid for de sidste 10 personer: ' + d /* + d.slice(-8,-6) + ' time(r), ' + d.slice(-5,-3) + ' minut(ter), ' + d.slice(-2) + ' sekund(er).' */ + '<br><br>' + '</h2></li>'); } }, error: function (xhr, ajaxOptions, thrownError) { console.log("shit fucked up dog"); } }); });
import React from 'react' import { connect } from 'react-redux' import { Field, reduxForm } from 'redux-form' import { createComment } from "../actions/comments"; import { addCommentModalClose } from "../actions/modal"; import { uuid } from "../utils/helpers"; let AddComment = ({ id, add, handleSubmit, closeAddCommentModal }) => { const onSubmit = (values) => { add({ comment: { ...values, id: uuid(), timestamp: Date.now(), parentId: id } }) closeAddCommentModal() } return ( <div className=""> <h2 className="title">Add Comment</h2> <form onSubmit={handleSubmit(onSubmit)}> <div className="field"> <label className="label">Author</label> <div className="control"> <Field name="author" component="input" type="text" className="input" placeholder="Text input" required/> </div> </div> <div className="field"> <label className="label">Body</label> <div className="control"> <Field name="body" component="textarea" className="textarea" placeholder="Text input" required/> </div> </div> <div className="field"> <div className="control spacer"> <button className="button button--transition is-link">Submit</button> <button onClick={() => closeAddCommentModal()} className="button button--transition is-danger" >Cancel</button> </div> </div> </form> </div> ) } const mapDispatchToProps = (dispatch) => ({ add: (data) => dispatch(createComment(data)), closeAddCommentModal: (data) => dispatch(addCommentModalClose(data)) }) AddComment = reduxForm({ form: 'addComment' })(AddComment) export default connect( null, mapDispatchToProps )(AddComment)
import Vue from 'vue' import './assets/styles/reset.css' import App from './App.vue' import router from './router' import store from './store' Vue.config.productionTip = false new Vue({ router, store, render: h => h(App) }).$mount('#app')
import React from 'react' import ReactDOM from 'react-dom' import Maintenance from './Maintenance' it('renders without crashing', () => { const div = document.createElement('div') ReactDOM.render(<Maintenance />, div) ReactDOM.unmountComponentAtNode(div) })
import photoArray from "../db/photo.js"; import refs from "./refs.js"; const { modal, closeModalBtn, modalImg } = refs; export function actionWhenModalOpen() { closeModalBtn.addEventListener("click", closeByClick); window.addEventListener("keydown", closeByEsc); modal.addEventListener("click", closeByWrapper); window.addEventListener('keydown', slider) } export function closeByClick() { modal.classList.remove("is-open"); refresh(); } export function closeByEsc(e) { if (e.code === "Escape") { modal.classList.remove("is-open"); refresh(); } } export function closeByWrapper(e) { if (!e.target.classList.contains("lightbox__image")) { modal.classList.remove("is-open"); refresh(); } } export function refresh() { closeModalBtn.removeEventListener("click", closeByClick); window.removeEventListener("keydown", closeByEsc); modal.removeEventListener("click", closeByWrapper); window.removeEventListener('keydown', slider); modalImg.src = ''; } //функция слайдера function slider(e) { const imgArr = photoArray.map(obj => obj.image) const index = imgArr.indexOf(modalImg.src) if (e.code === 'ArrowRight') { modalImg.src = imgArr[index+1] } if (e.code === 'ArrowLeft') { modalImg.src = imgArr[index-1] } }
/* * Copyright (c) 2021. Written by Leonid Artemev (me@artemev.it) */ import { initializeApp } from "firebase/app"; import React from "react"; import { YMaps } from "react-yandex-maps"; import "./App.css"; import Paperbase from "./Paperbase"; // Example base just for testing const firebaseConfig = { apiKey: "AIzaSyC6WH1YmjMMJeynlJ3cPWCJ1plcs8SWQ-g", authDomain: "fluid-emissary-132723.firebaseapp.com", projectId: "fluid-emissary-132723", storageBucket: "fluid-emissary-132723.appspot.com", messagingSenderId: "681155421321", appId: "1:681155421321:web:0e8229f259c692b0aed258", databaseURL: "fluid-emissary-132723-default-rtdb.europe-west1.firebasedatabase.app", }; initializeApp(firebaseConfig); function App() { return ( <div className="App"> <YMaps query={{ apikey: "03a21dbf-0bd0-4788-901d-53dabb409285" }}> <Paperbase /> </YMaps> </div> ); } export default App;
QUnit.test('Map#mapKeys', assert => { const { mapKeys } = Map.prototype; const { from } = Array; assert.isFunction(mapKeys); assert.arity(mapKeys, 1); assert.name(mapKeys, 'mapKeys'); assert.looksNative(mapKeys); assert.nonEnumerable(Map.prototype, 'mapKeys'); const map = new Map([[1, 2]]); const context = {}; map.mapKeys(function (value, key, that) { assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(value, 2, 'correct value in callback'); assert.same(key, 1, 'correct key in callback'); assert.same(that, map, 'correct link to map in callback'); assert.same(this, context, 'correct callback context'); }, context); assert.true(new Map().mapKeys(it => it) instanceof Map); assert.deepEqual(from(new Map([ ['a', 1], [1, 2], ['b', 3], [2, 'q'], ['c', {}], [3, 4], ['d', true], [4, 5], ]).mapKeys((value, key) => `${ key }${ value }`)), [ ['a1', 1], ['12', 2], ['b3', 3], ['2q', 'q'], ['c[object Object]', {}], ['34', 4], ['dtrue', true], ['45', 5], ]); assert.throws(() => mapKeys.call(new Set(), () => { /* empty */ }), TypeError); assert.throws(() => mapKeys.call({}, () => { /* empty */ }), TypeError); assert.throws(() => mapKeys.call([], () => { /* empty */ }), TypeError); assert.throws(() => mapKeys.call(undefined, () => { /* empty */ }), TypeError); assert.throws(() => mapKeys.call(null, () => { /* empty */ }), TypeError); });
/** * @license Apache-2.0 * * Copyright (c) 2019 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* eslint-disable no-underscore-dangle */ 'use strict'; // MODULES // var logger = require( 'debug' ); // VARIABLES // var debug = logger( 'repl:presentation:command:reload_presentation' ); // MAIN // /** * Returns a callback to be invoked upon calling the `reloadPresentation` command. * * @private * @param {Presentation} pres - presentation instance * @returns {Function} callback */ function command( pres ) { return onCommand; /** * Reloads a presentation. * * @private */ function onCommand() { pres._repl.once( 'drain', onDrain ); /** * Callback invoked upon a `drain` event. * * @private */ function onDrain() { var pos; try { pres.reload().show(); } catch ( error ) { debug( 'Error: %s', error.message ); // Infer the current cursor column position based on the length of the command prompt string: pos = pres._repl._prompt().length; // FIXME: how to address multi-column characters? // FIXME: handle non-TTY output streams! /* * Print the error message on the previous line and generate the expected display prompt and cursor position. * * [ANSI escape sequences][1]: * * - `\u001b`: ESC, the escape character * - `[1A`: move cursor up one line * - `[nD`: move cursor back (to the left) `n` columns (cells) * - `[0J`: clear the screen beginning from the current cursor position to the end of the screen * * [1]: https://en.wikipedia.org/wiki/ANSI_escape_code */ pres._repl._ostream.write( '\u001b[1A\u001b['+pos+'DError: '+error.message+'\u001b[0J\n' ); // Show a new display prompt: pres._repl._displayPrompt(); } } } } // EXPORTS // module.exports = command;
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/indoqa-rebass-theme",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,o){r.apply(this,[e,t,o].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){n(303),e.exports=n(112)},function(e,t,n){"use strict";e.exports=n(190)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),d=n(178),f=r(d),h=n(7),m=r(h),y=n(294),v=r(y),b=n(295),g=r(b),_=n(296),P=r(_),T=n(293),C=r(T),x=n(3),O=r(x),E=function(e){function t(e,n){var r=n.rebass;a(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),l=u({},O.default,r),s=l.pureRender;return s&&(o.shouldComponentUpdate=f.default.shouldComponentUpdate.bind(o)),o}return l(t,e),s(t,[{key:"render",value:function(){var e=this.props,t=e.is,n=e.tagName,r=e.baseStyle,a=e.style,i=e.baseRef,l=o(e,["is","tagName","baseStyle","style","baseRef"]),s=this.context.rebass,c=u({},O.default,s),d=c.scale,f=c.colors,h=c.borderRadius,y=l.className,b=y?y.split(" "):[],_=b.reduce(function(e,t){return(0,m.default)(e,s?s[t]:{})},{}),T=t||l.Component||n||"div",x=l.p,E=l.pt,w=l.pr,M=l.pb,L=l.pl,k=l.px,S=l.py,j=l.m,N=l.mt,R=l.mr,A=l.mb,I=l.ml,D=l.mx,U=l.my,B=l.rounded,F=l.pill,z=l.circle,H=l.theme,W=l.color,V=l.backgroundColor,q=l.inverted,K=o(l,["p","pt","pr","pb","pl","px","py","m","mt","mr","mb","ml","mx","my","rounded","pill","circle","theme","color","backgroundColor","inverted"]),Y=(0,m.default)({boxSizing:"border-box"},r,_,(0,v.default)({m:j,mt:N,mr:R,mb:A,ml:I,mx:D,my:U},d),(0,g.default)({p:x,pt:E,pr:w,pb:M,pl:L,px:k,py:S},d),(0,C.default)({theme:H,color:W,backgroundColor:V,inverted:q},f,s),(0,P.default)({rounded:B,pill:F,circle:z},h),a);return p.default.createElement(T,u({},K,{ref:function(e){return i(e)},style:Y}))}}]),t}(p.default.Component);E.contextTypes={rebass:p.default.PropTypes.object},E.defaultProps={baseRef:function(e){return e}},E.propTypes={tagName:p.default.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.func,p.default.PropTypes.element]),className:p.default.PropTypes.string,baseStyle:p.default.PropTypes.object,style:p.default.PropTypes.object,baseRef:p.default.PropTypes.func,m:p.default.PropTypes.oneOf([0,1,2,3,4]),mt:p.default.PropTypes.oneOf([0,1,2,3,4]),mr:p.default.PropTypes.oneOf([0,1,2,3,4]),mb:p.default.PropTypes.oneOf([0,1,2,3,4]),ml:p.default.PropTypes.oneOf([0,1,2,3,4]),mx:p.default.PropTypes.oneOf([0,1,2,3,4]),my:p.default.PropTypes.oneOf([0,1,2,3,4]),p:p.default.PropTypes.oneOf([0,1,2,3,4]),pt:p.default.PropTypes.oneOf([0,1,2,3,4]),pr:p.default.PropTypes.oneOf([0,1,2,3,4]),pb:p.default.PropTypes.oneOf([0,1,2,3,4]),pl:p.default.PropTypes.oneOf([0,1,2,3,4]),px:p.default.PropTypes.oneOf([0,1,2,3,4]),py:p.default.PropTypes.oneOf([0,1,2,3,4]),color:p.default.PropTypes.string,backgroundColor:p.default.PropTypes.string,theme:p.default.PropTypes.oneOf(["primary","secondary","default","info","success","warning","error"]),inverted:p.default.PropTypes.bool,rounded:p.default.PropTypes.oneOfType([p.default.PropTypes.bool,p.default.PropTypes.oneOf(["top","right","bottom","left"])]),circle:p.default.PropTypes.bool,pill:p.default.PropTypes.bool},t.default=E},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r='"Roboto Mono", Menlo, Consolas, monospace',o={black:"#111",white:"#fff",gray:"#ddd",midgray:"#888",blue:"#08e",red:"#f52",orange:"#f70",green:"#1c7"},a=n({},o,{primary:o.blue,secondary:o.midgray,default:o.black,info:o.blue,success:o.green,warning:o.orange,error:o.red}),i=a.white,l=[0,8,16,32,64],u=[48,32,24,20,16,14,12],s=[0,2,4,8,16],c=600,p=2,d="rgba(0, 0, 0, .25)",f={scale:l,fontSizes:u,bold:c,monospace:r,zIndex:s,colors:a,inverted:i,borderRadius:p,borderColor:d,pureRender:!0};t.default=f},function(e,t,n){"use strict";function r(e,t,n,r,o,a,i,l){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,a,i,l],c=0;u=new Error(t.replace(/%s/g,function(){return s[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}e.exports=r},function(e,t){"use strict";function n(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}e.exports=n},function(e,t,n){"use strict";var r=n(10),o=r;e.exports=o},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(a){return!1}}var o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,i,l=n(e),u=1;u<arguments.length;u++){r=Object(arguments[u]);for(var s in r)o.call(r,s)&&(l[s]=r[s]);if(Object.getOwnPropertySymbols){i=Object.getOwnPropertySymbols(r);for(var c=0;c<i.length;c++)a.call(r,i[c])&&(l[i[c]]=r[i[c]])}}return l}},function(e,t,n){"use strict";function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function o(e,t){var n=r(e);n._hostNode=t,t[m]=n}function a(e){var t=e._hostNode;t&&(delete t[m],e._hostNode=null)}function i(e,t){if(!(e._flags&h.hasCachedChildNodes)){var n=e._renderedChildren,a=t.firstChild;e:for(var i in n)if(n.hasOwnProperty(i)){var l=n[i],u=r(l)._domID;if(0!==u){for(;null!==a;a=a.nextSibling)if(1===a.nodeType&&a.getAttribute(f)===String(u)||8===a.nodeType&&a.nodeValue===" react-text: "+u+" "||8===a.nodeType&&a.nodeValue===" react-empty: "+u+" "){o(l,a);continue e}c("32",u)}}e._flags|=h.hasCachedChildNodes}}function l(e){if(e[m])return e[m];for(var t=[];!e[m];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,r;e&&(r=e[m]);e=t.pop())n=r,t.length&&i(r,e);return n}function u(e){var t=l(e);return null!=t&&t._hostNode===e?t:null}function s(e){if(void 0===e._hostNode?c("33"):void 0,e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent?void 0:c("34"),e=e._hostParent;for(;t.length;e=t.pop())i(e,e._hostNode);return e._hostNode}var c=n(5),p=n(22),d=n(73),f=(n(4),p.ID_ATTRIBUTE_NAME),h=d,m="__reactInternalInstance$"+Math.random().toString(36).slice(2),y={getClosestInstanceFromNode:l,getInstanceFromNode:u,getNodeFromInstance:s,precacheChildNodes:i,precacheNode:o,uncacheNode:a};e.exports=y},function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=r},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";var r=null;e.exports={debugTool:r}},function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var a=n(7),i=n(18),l=(n(6),n(86),Object.prototype.hasOwnProperty),u="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,s={key:!0,ref:!0,__self:!0,__source:!0},c=function(e,t,n,r,o,a,i){var l={$$typeof:u,type:e,key:t,ref:n,props:i,_owner:a};return l};c.createElement=function(e,t,n){var a,u={},p=null,d=null,f=null,h=null;if(null!=t){r(t)&&(d=t.ref),o(t)&&(p=""+t.key),f=void 0===t.__self?null:t.__self,h=void 0===t.__source?null:t.__source;for(a in t)l.call(t,a)&&!s.hasOwnProperty(a)&&(u[a]=t[a])}var m=arguments.length-2;if(1===m)u.children=n;else if(m>1){for(var y=Array(m),v=0;v<m;v++)y[v]=arguments[v+2];u.children=y}if(e&&e.defaultProps){var b=e.defaultProps;for(a in b)void 0===u[a]&&(u[a]=b[a])}return c(e,p,d,f,h,i.current,u)},c.createFactory=function(e){var t=c.createElement.bind(null,e);return t.type=e,t},c.cloneAndReplaceKey=function(e,t){var n=c(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},c.cloneElement=function(e,t,n){var u,p=a({},e.props),d=e.key,f=e.ref,h=e._self,m=e._source,y=e._owner;if(null!=t){r(t)&&(f=t.ref,y=i.current),o(t)&&(d=""+t.key);var v;e.type&&e.type.defaultProps&&(v=e.type.defaultProps);for(u in t)l.call(t,u)&&!s.hasOwnProperty(u)&&(void 0===t[u]&&void 0!==v?p[u]=v[u]:p[u]=t[u])}var b=arguments.length-2;if(1===b)p.children=n;else if(b>1){for(var g=Array(b),_=0;_<b;_++)g[_]=arguments[_+2];p.children=g}return c(e.type,d,f,h,m,y,p)},c.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===u},c.REACT_ELEMENT_TYPE=u,e.exports=c},function(e,t,n){"use strict";function r(){w.ReactReconcileTransaction&&P?void 0:c("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=w.ReactReconcileTransaction.getPooled(!0)}function a(e,t,n,o,a,i){r(),P.batchedUpdates(e,t,n,o,a,i)}function i(e,t){return e._mountOrder-t._mountOrder}function l(e){var t=e.dirtyComponentsLength;t!==v.length?c("124",t,v.length):void 0,v.sort(i),b++;for(var n=0;n<t;n++){var r=v[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var a;if(h.logTopLevelRenders){var l=r;r._currentElement.props===r._renderedComponent._currentElement&&(l=r._renderedComponent),a="React update: "+l.getName(),console.time(a)}if(m.performUpdateIfNecessary(r,e.reconcileTransaction,b),a&&console.timeEnd(a),o)for(var u=0;u<o.length;u++)e.callbackQueue.enqueue(o[u],r.getPublicInstance())}}function u(e){return r(),P.isBatchingUpdates?(v.push(e),void(null==e._updateBatchNumber&&(e._updateBatchNumber=b+1))):void P.batchedUpdates(u,e)}function s(e,t){P.isBatchingUpdates?void 0:c("125"),g.enqueue(e,t),_=!0}var c=n(5),p=n(7),d=n(69),f=n(17),h=n(76),m=n(23),y=n(30),v=(n(4),[]),b=0,g=d.getPooled(),_=!1,P=null,T={initialize:function(){this.dirtyComponentsLength=v.length},close:function(){this.dirtyComponentsLength!==v.length?(v.splice(0,this.dirtyComponentsLength),O()):v.length=0}},C={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[T,C];p(o.prototype,y.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,d.release(this.callbackQueue),this.callbackQueue=null,w.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return y.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),f.addPoolingTo(o);var O=function(){for(;v.length||_;){if(v.length){var e=o.getPooled();e.perform(l,null,e),o.release(e)}if(_){_=!1;var t=g;g=d.getPooled(),t.notifyAll(),d.release(t)}}},E={injectReconcileTransaction:function(e){e?void 0:c("126"),w.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:c("127"),"function"!=typeof e.batchedUpdates?c("128"):void 0,"boolean"!=typeof e.isBatchingUpdates?c("129"):void 0,P=e}},w={ReactReconcileTransaction:null,batchedUpdates:a,enqueueUpdate:u,flushBatchedUpdates:O,injection:E,asap:s};e.exports=w},function(e,t,n){"use strict";var r=n(32),o=r({bubbled:null,captured:null}),a=r({topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topInvalid:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null}),i={topLevelTypes:a,PropagationPhases:o};e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];l?this[a]=l(n):"target"===a?this.target=r:this[a]=n[a]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return u?this.isDefaultPrevented=i.thatReturnsTrue:this.isDefaultPrevented=i.thatReturnsFalse,this.isPropagationStopped=i.thatReturnsFalse,this}var o=n(7),a=n(17),i=n(10),l=(n(6),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),u={type:null,target:null,currentTarget:i.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=i.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=i.thatReturnsTrue)},persist:function(){this.isPersistent=i.thatReturnsTrue},isPersistent:i.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n<l.length;n++)this[l[n]]=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=function(){};r.prototype=n.prototype;var i=new r;o(i,e.prototype),e.prototype=i,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,a.addPoolingTo(e,a.fourArgumentPooler)},a.addPoolingTo(r,a.fourArgumentPooler),e.exports=r},function(e,t){"use strict";var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=n},function(e,t,n){"use strict";var r=n(5),o=(n(4),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),a=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},l=function(e,t,n,r){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r),a}return new o(e,t,n,r)},u=function(e,t,n,r,o){var a=this;if(a.instancePool.length){var i=a.instancePool.pop();return a.call(i,e,t,n,r,o),i}return new a(e,t,n,r,o)},s=function(e){var t=this;e instanceof t?void 0:r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=10,p=o,d=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||p,n.poolSize||(n.poolSize=c),n.release=s,n},f={addPoolingTo:d,oneArgumentPooler:o,twoArgumentPooler:a,threeArgumentPooler:i,fourArgumentPooler:l,fiveArgumentPooler:u};e.exports=f},function(e,t){"use strict";var n={current:null};e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.hide,r=o(e,["hide"]),i=t.rebass,u=a({},p.default,i),c=u.fontSizes,d=u.bold,f=n?{position:"absolute",height:1,width:1,overflow:"hidden",clip:"rect(1px, 1px, 1px, 1px)"}:{};return l.default.createElement(s.default,a({},r,{tagName:"label",className:"Label",baseStyle:a({fontSize:c[5],fontWeight:d,lineHeight:1},f)}))};d.propTypes={hide:l.default.PropTypes.bool},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){var r,o;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var i in r)a.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}var a={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(r=[],o=function(){return n}.apply(t,r),!(void 0!==o&&(e.exports=o)))}()},function(e,t,n){"use strict";function r(e){if(y){var t=e.node,n=e.children;if(n.length)for(var r=0;r<n.length;r++)v(t,n[r],null);else null!=e.html?p(t,e.html):null!=e.text&&f(t,e.text)}}function o(e,t){e.parentNode.replaceChild(t.node,e),r(t)}function a(e,t){y?e.children.push(t):e.node.appendChild(t.node)}function i(e,t){y?e.html=t:p(e.node,t)}function l(e,t){y?e.text=t:f(e.node,t)}function u(){return this.node.nodeName}function s(e){return{node:e,children:[],html:null,text:null,toString:u}}var c=n(40),p=n(38),d=n(54),f=n(93),h=1,m=11,y="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),v=d(function(e,t,n){t.node.nodeType===m||t.node.nodeType===h&&"object"===t.node.nodeName.toLowerCase()&&(null==t.node.namespaceURI||t.node.namespaceURI===c.html)?(r(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),r(t))});s.insertTreeBefore=v,s.replaceChildWithTree=o,s.queueChild=a,s.queueHTML=i,s.queueText=l,e.exports=s},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=n(5),a=(n(4),{MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=a,n=e.Properties||{},i=e.DOMAttributeNamespaces||{},u=e.DOMAttributeNames||{},s=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&l._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){l.properties.hasOwnProperty(p)?o("48",p):void 0;var d=p.toLowerCase(),f=n[p],h={attributeName:d,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseProperty:r(f,t.MUST_USE_PROPERTY),hasBooleanValue:r(f,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(f,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(f,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(f,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:o("50",p),u.hasOwnProperty(p)){var m=u[p];h.attributeName=m}i.hasOwnProperty(p)&&(h.attributeNamespace=i[p]),s.hasOwnProperty(p)&&(h.propertyName=s[p]),c.hasOwnProperty(p)&&(h.mutationMethod=c[p]),l.properties[p]=h}}}),i=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",l={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:i,ATTRIBUTE_NAME_CHAR:i+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<l._isCustomAttributeFunctions.length;t++){var n=l._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},injection:a};e.exports=l},function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(219),a=(n(11),n(6),{mountComponent:function(e,t,n,o,a,i){var l=e.mountComponent(t,n,o,a,i);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),l},getHostNode:function(e){return e.getHostNode()},unmountComponent:function(e,t){o.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,a){var i=e._currentElement;if(t!==i||a!==e._context){var l=o.shouldUpdateRefs(i,t);l&&o.detachRefs(e,i),e.receiveComponent(t,n,a),l&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t,n){e._updateBatchNumber===n&&e.performUpdateIfNecessary(t)}});e.exports=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.small,r=e.bold,i=o(e,["small","bold"]),u=t.rebass,c=a({},p.default,u),d=c.fontSizes,f=c.bold;return l.default.createElement(s.default,a({},i,{tagName:"p",className:"Text",baseStyle:{fontSize:n?d[6]:d[4],fontWeight:r?f:null,margin:0}}))};d.propTypes={small:l.default.PropTypes.bool,bold:l.default.PropTypes.bool},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(5),o=n(41),a=n(42),i=n(48),l=n(85),u=n(87),s=(n(4),{}),c=null,p=function(e,t){e&&(a.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return p(e,!0)},f=function(e){return p(e,!1)},h=function(e){return"."+e._rootNodeID},m={injection:{injectEventPluginOrder:o.injectEventPluginOrder,injectEventPluginsByName:o.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?r("94",t,typeof n):void 0;var a=h(e),i=s[t]||(s[t]={});i[a]=n;var l=o.registrationNameModules[t];l&&l.didPutListener&&l.didPutListener(e,t,n)},getListener:function(e,t){var n=s[t],r=h(e);return n&&n[r]},deleteListener:function(e,t){var n=o.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=s[t];if(r){var a=h(e);delete r[a]}},deleteAllListeners:function(e){var t=h(e);for(var n in s)if(s.hasOwnProperty(n)&&s[n][t]){var r=o.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(e,n),delete s[n][t]}},extractEvents:function(e,t,n,r){for(var a,i=o.plugins,u=0;u<i.length;u++){var s=i[u];if(s){var c=s.extractEvents(e,t,n,r);c&&(a=l(a,c))}}return a},enqueueEvents:function(e){e&&(c=l(c,e))},processEventQueue:function(e){var t=c;c=null,e?u(t,d):u(t,f),c?r("95"):void 0,i.rethrowCaughtError()},__purge:function(){s={}},__getListenerBank:function(){return s}};e.exports=m},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return g(e,r)}function o(e,t,n){var o=t?b.bubbled:b.captured,a=r(e,n,o);a&&(n._dispatchListeners=y(n._dispatchListeners,a),n._dispatchInstances=y(n._dispatchInstances,e))}function a(e){e&&e.dispatchConfig.phasedRegistrationNames&&m.traverseTwoPhase(e._targetInst,o,e)}function i(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?m.getParentInstance(t):null;m.traverseTwoPhase(n,o,e)}}function l(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=g(e,r);o&&(n._dispatchListeners=y(n._dispatchListeners,o),n._dispatchInstances=y(n._dispatchInstances,e))}}function u(e){e&&e.dispatchConfig.registrationName&&l(e._targetInst,null,e)}function s(e){v(e,a)}function c(e){v(e,i)}function p(e,t,n,r){m.traverseEnterLeave(n,r,l,e,t)}function d(e){v(e,u)}var f=n(14),h=n(26),m=n(42),y=n(85),v=n(87),b=(n(6),f.PropagationPhases),g=h.getListener,_={accumulateTwoPhaseDispatches:s,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:p};e.exports=_},function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=n},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(15),a=n(57),i={view:function(e){if(e.view)return e.view;var t=a(e);if(t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";var r=n(5),o=(n(4),{reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,o,a,i,l,u){this.isInTransaction()?r("27"):void 0;var s,c;try{this._isInTransaction=!0,s=!0,this.initializeAll(0),c=e.call(t,n,o,a,i,l,u),s=!1}finally{try{if(s)try{this.closeAll(0)}catch(p){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=a.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===a.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(o){}}}},closeAll:function(e){this.isInTransaction()?void 0:r("28");for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,i=t[n],l=this.wrapperInitData[n];try{o=!0,l!==a.OBSERVED_ERROR&&i.close&&i.close.call(this,l),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(u){}}}this.wrapperInitData.length=0}}),a={Mixin:o,OBSERVED_ERROR:{}};e.exports=a},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=t.Toolbar=t.Textarea=t.Text=t.Table=t.Switch=t.Stat=t.Space=t.Slider=t.SequenceMapStep=t.SequenceMap=t.Select=t.SectionHeader=t.Section=t.Rating=t.Radio=t.Progress=t.Pre=t.PanelHeader=t.PanelFooter=t.Panel=t.PageHeader=t.Overlay=t.NavItem=t.Message=t.Menu=t.Media=t.LinkBlock=t.Label=t.InlineForm=t.Input=t.HeadingLink=t.Heading=t.Footer=t.Fixed=t.Embed=t.DropdownMenu=t.Dropdown=t.Drawer=t.DotIndicator=t.Donut=t.Divider=t.Container=t.Close=t.Checkbox=t.CardImage=t.Card=t.ButtonOutline=t.ButtonCircle=t.Button=t.Breadcrumbs=t.Blockquote=t.Block=t.Banner=t.Badge=t.Avatar=t.Arrow=t.config=t.Base=void 0;var a=n(2);Object.defineProperty(t,"Base",{enumerable:!0,get:function(){return o(a).default}});var i=n(3);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return o(i).default}});var l=n(94);Object.defineProperty(t,"Arrow",{enumerable:!0,get:function(){return o(l).default}});var u=n(247);Object.defineProperty(t,"Avatar",{enumerable:!0,get:function(){return o(u).default}});var s=n(248);Object.defineProperty(t,"Badge",{enumerable:!0,get:function(){return o(s).default}});var c=n(249);Object.defineProperty(t,"Banner",{enumerable:!0,get:function(){return o(c).default}});var p=n(250);Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return o(p).default}});var d=n(251);Object.defineProperty(t,"Blockquote",{enumerable:!0,get:function(){return o(d).default}});var f=n(252);Object.defineProperty(t,"Breadcrumbs",{enumerable:!0,get:function(){return o(f).default}});var h=n(62);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return o(h).default}});var m=n(253);Object.defineProperty(t,"ButtonCircle",{enumerable:!0,get:function(){return o(m).default}});var y=n(95);Object.defineProperty(t,"ButtonOutline",{enumerable:!0,get:function(){return o(y).default}});var v=n(254);Object.defineProperty(t,"Card",{enumerable:!0,get:function(){return o(v).default}});var b=n(255);Object.defineProperty(t,"CardImage",{enumerable:!0,get:function(){return o(b).default}});var g=n(256);Object.defineProperty(t,"Checkbox",{enumerable:!0,get:function(){return o(g).default}});var _=n(257);Object.defineProperty(t,"Close",{enumerable:!0,get:function(){return o(_).default}});var P=n(258);Object.defineProperty(t,"Container",{enumerable:!0,get:function(){return o(P).default}});var T=n(259);Object.defineProperty(t,"Divider",{enumerable:!0,get:function(){return o(T).default}});var C=n(260);Object.defineProperty(t,"Donut",{enumerable:!0,get:function(){return o(C).default}});var x=n(261);Object.defineProperty(t,"DotIndicator",{enumerable:!0,get:function(){return o(x).default}});var O=n(262);Object.defineProperty(t,"Drawer",{enumerable:!0,get:function(){return o(O).default}});var E=n(263);Object.defineProperty(t,"Dropdown",{enumerable:!0,get:function(){return o(E).default}});var w=n(264);Object.defineProperty(t,"DropdownMenu",{enumerable:!0,get:function(){return o(w).default}});var M=n(265);Object.defineProperty(t,"Embed",{enumerable:!0,get:function(){return o(M).default}});var L=n(266);Object.defineProperty(t,"Fixed",{enumerable:!0,get:function(){return o(L).default}});var k=n(267);Object.defineProperty(t,"Footer",{enumerable:!0,get:function(){return o(k).default}});var S=n(63);Object.defineProperty(t,"Heading",{enumerable:!0,get:function(){return o(S).default}});var j=n(96);Object.defineProperty(t,"HeadingLink",{enumerable:!0,get:function(){return o(j).default}});var N=n(97);Object.defineProperty(t,"Input",{enumerable:!0,get:function(){return o(N).default}});var R=n(268);Object.defineProperty(t,"InlineForm",{enumerable:!0,get:function(){return o(R).default}});var A=n(19);Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return o(A).default}});var I=n(98);Object.defineProperty(t,"LinkBlock",{enumerable:!0,get:function(){return o(I).default}});var D=n(269); Object.defineProperty(t,"Media",{enumerable:!0,get:function(){return o(D).default}});var U=n(99);Object.defineProperty(t,"Menu",{enumerable:!0,get:function(){return o(U).default}});var B=n(270);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return o(B).default}});var F=n(271);Object.defineProperty(t,"NavItem",{enumerable:!0,get:function(){return o(F).default}});var z=n(272);Object.defineProperty(t,"Overlay",{enumerable:!0,get:function(){return o(z).default}});var H=n(273);Object.defineProperty(t,"PageHeader",{enumerable:!0,get:function(){return o(H).default}});var W=n(274);Object.defineProperty(t,"Panel",{enumerable:!0,get:function(){return o(W).default}});var V=n(275);Object.defineProperty(t,"PanelFooter",{enumerable:!0,get:function(){return o(V).default}});var q=n(276);Object.defineProperty(t,"PanelHeader",{enumerable:!0,get:function(){return o(q).default}});var K=n(277);Object.defineProperty(t,"Pre",{enumerable:!0,get:function(){return o(K).default}});var Y=n(278);Object.defineProperty(t,"Progress",{enumerable:!0,get:function(){return o(Y).default}});var X=n(279);Object.defineProperty(t,"Radio",{enumerable:!0,get:function(){return o(X).default}});var G=n(280);Object.defineProperty(t,"Rating",{enumerable:!0,get:function(){return o(G).default}});var Q=n(281);Object.defineProperty(t,"Section",{enumerable:!0,get:function(){return o(Q).default}});var $=n(282);Object.defineProperty(t,"SectionHeader",{enumerable:!0,get:function(){return o($).default}});var Z=n(283);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return o(Z).default}});var J=n(284);Object.defineProperty(t,"SequenceMap",{enumerable:!0,get:function(){return o(J).default}});var ee=n(100);Object.defineProperty(t,"SequenceMapStep",{enumerable:!0,get:function(){return o(ee).default}});var te=n(285);Object.defineProperty(t,"Slider",{enumerable:!0,get:function(){return o(te).default}});var ne=n(286);Object.defineProperty(t,"Space",{enumerable:!0,get:function(){return o(ne).default}});var re=n(287);Object.defineProperty(t,"Stat",{enumerable:!0,get:function(){return o(re).default}});var oe=n(288);Object.defineProperty(t,"Switch",{enumerable:!0,get:function(){return o(oe).default}});var ae=n(289);Object.defineProperty(t,"Table",{enumerable:!0,get:function(){return o(ae).default}});var ie=n(24);Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return o(ie).default}});var le=n(290);Object.defineProperty(t,"Textarea",{enumerable:!0,get:function(){return o(le).default}});var ue=n(291);Object.defineProperty(t,"Toolbar",{enumerable:!0,get:function(){return o(ue).default}});var se=n(292);Object.defineProperty(t,"Tooltip",{enumerable:!0,get:function(){return o(se).default}});var ce=n(31),pe=r(ce);t.default=pe},function(e,t,n){"use strict";var r=n(4),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=o},function(e,t){"use strict";function n(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function r(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(var i=0;i<r.length;i++)if(!o.call(t,r[i])||!n(e[r[i]],t[r[i]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=r},function(e,t){"use strict";var n={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},r={getHostProps:function(e,t){if(!t.disabled)return t;var r={};for(var o in t)!n[o]&&t.hasOwnProperty(o)&&(r[o]=t[o]);return r}};e.exports=r},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,y)||(e[y]=h++,d[e[y]]={}),d[e[y]]}var o,a=n(7),i=n(14),l=n(41),u=n(211),s=n(84),c=n(242),p=n(58),d={},f=!1,h=0,m={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},y="_reactListenersID"+String(Math.random()).slice(2),v=a({},u,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),a=l.registrationNameDependencies[e],u=i.topLevelTypes,s=0;s<a.length;s++){var c=a[s];o.hasOwnProperty(c)&&o[c]||(c===u.topWheel?p("wheel")?v.ReactEventListener.trapBubbledEvent(u.topWheel,"wheel",n):p("mousewheel")?v.ReactEventListener.trapBubbledEvent(u.topWheel,"mousewheel",n):v.ReactEventListener.trapBubbledEvent(u.topWheel,"DOMMouseScroll",n):c===u.topScroll?p("scroll",!0)?v.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",n):v.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",v.ReactEventListener.WINDOW_HANDLE):c===u.topFocus||c===u.topBlur?(p("focus",!0)?(v.ReactEventListener.trapCapturedEvent(u.topFocus,"focus",n),v.ReactEventListener.trapCapturedEvent(u.topBlur,"blur",n)):p("focusin")&&(v.ReactEventListener.trapBubbledEvent(u.topFocus,"focusin",n),v.ReactEventListener.trapBubbledEvent(u.topBlur,"focusout",n)),o[u.topBlur]=!0,o[u.topFocus]=!0):m.hasOwnProperty(c)&&v.ReactEventListener.trapBubbledEvent(c,m[c],n),o[c]=!0)}},trapBubbledEvent:function(e,t,n){return v.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return v.ReactEventListener.trapCapturedEvent(e,t,n)},supportsEventPageXY:function(){if(!document.createEvent)return!1;var e=document.createEvent("MouseEvent");return null!=e&&"pageX"in e},ensureScrollValueMonitoring:function(){if(void 0===o&&(o=v.supportsEventPageXY()),!o&&!f){var e=s.refreshScrollValues;v.ReactEventListener.monitorScrollValue(e),f=!0}}});e.exports=v},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(29),a=n(84),i=n(56),l={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:i,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+a.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+a.currentScrollTop}};o.augmentClass(r,l),e.exports=r},function(e,t){"use strict";function n(e){var t=""+e,n=o.exec(t);if(!n)return t;var r,a="",i=0,l=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#x27;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}l!==i&&(a+=t.substring(l,i)),l=i+1,a+=r}return l!==i?a+t.substring(l,i):a}function r(e){return"boolean"==typeof e||"number"==typeof e?""+e:n(e)}var o=/["'&<>]/;e.exports=r},function(e,t,n){"use strict";var r,o=n(9),a=n(40),i=/^[ \r\n\t\f]/,l=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,u=n(54),s=u(function(e,t){if(e.namespaceURI!==a.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML="<svg>"+t+"</svg>";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(o.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(s=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&l.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),c=null}e.exports=s},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){c.insertTreeBefore(e,t,n)}function a(e,t,n){Array.isArray(t)?l(e,t[0],t[1],n):y(e,t,n)}function i(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],u(e,t,n),e.removeChild(n)}e.removeChild(t)}function l(e,t,n,r){for(var o=t;;){var a=o.nextSibling;if(y(e,o,r),o===n)break;o=a}}function u(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function s(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&y(r,document.createTextNode(n),o):n?(m(o,n),u(r,o,t)):u(r,e,t)}var c=n(21),p=n(185),d=n(80),f=(n(8),n(11),n(54)),h=n(38),m=n(93),y=f(function(e,t,n){e.insertBefore(t,n)}),v=p.dangerouslyReplaceNodeWithMarkup,b={dangerouslyReplaceNodeWithMarkup:v,replaceDelimitedText:s,processUpdates:function(e,t){for(var n=0;n<t.length;n++){var l=t[n];switch(l.type){case d.INSERT_MARKUP:o(e,l.content,r(e,l.afterNode));break;case d.MOVE_EXISTING:a(e,l.fromNode,r(e,l.afterNode));break;case d.SET_MARKUP:h(e,l.content);break;case d.TEXT_CONTENT:m(e,l.content);break;case d.REMOVE_NODE:i(e,l.fromNode)}}}};e.exports=b},function(e,t){"use strict";var n={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};e.exports=n},function(e,t,n){"use strict";function r(){if(l)for(var e in u){var t=u[e],n=l.indexOf(e);if(n>-1?void 0:i("96",e),!s.plugins[n]){t.extractEvents?void 0:i("97",e),s.plugins[n]=t;var r=t.eventTypes;for(var a in r)o(r[a],t,a)?void 0:i("98",a,e)}}}function o(e,t,n){s.eventNameDispatchConfigs.hasOwnProperty(n)?i("99",n):void 0,s.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var l=r[o];a(l,t,n)}return!0}return!!e.registrationName&&(a(e.registrationName,t,n),!0)}function a(e,t,n){s.registrationNameModules[e]?i("100",e):void 0,s.registrationNameModules[e]=t,s.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=n(5),l=(n(4),null),u={},s={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){l?i("101"):void 0,l=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];u.hasOwnProperty(n)&&u[n]===o||(u[n]?i("102",n):void 0,u[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return s.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=s.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){l=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];s.plugins.length=0;var t=s.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=s.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=s},function(e,t,n){"use strict";function r(e){return e===b.topMouseUp||e===b.topTouchEnd||e===b.topTouchCancel}function o(e){return e===b.topMouseMove||e===b.topTouchMove}function a(e){return e===b.topMouseDown||e===b.topTouchStart}function i(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=g.getNodeFromInstance(r),t?y.invokeGuardedCallbackWithCatch(o,n,e):y.invokeGuardedCallback(o,n,e),e.currentTarget=null}function l(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)i(e,t,n[o],r[o]);else n&&i(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null}function u(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function s(e){var t=u(e);return e._dispatchInstances=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)?h("103"):void 0,e.currentTarget=t?g.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r}function p(e){return!!e._dispatchListeners}var d,f,h=n(5),m=n(14),y=n(48),v=(n(4),n(6),{injectComponentTree:function(e){d=e},injectTreeTraversal:function(e){f=e}}),b=m.topLevelTypes,g={isEndish:r,isMoveish:o,isStartish:a,executeDirectDispatch:c,executeDispatchesInOrder:l,executeDispatchesInOrderStopAtTrue:s,hasDispatches:p,getInstanceFromNode:function(e){return d.getInstanceFromNode(e)},getNodeFromInstance:function(e){return d.getNodeFromInstance(e)},isAncestor:function(e,t){return f.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return f.getLowestCommonAncestor(e,t)},getParentInstance:function(e){return f.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return f.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,r,o){return f.traverseEnterLeave(e,t,n,r,o)},injection:v};e.exports=g},function(e,t){"use strict";function n(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function r(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var o={escape:n,unescape:r};e.exports=o},function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?l("87"):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?l("88"):void 0}function a(e){r(e),null!=e.checked||null!=e.onChange?l("89"):void 0}function i(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var l=n(5),u=n(82),s=n(51),c=n(52),p=(n(4),n(6),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),d={value:function(e,t,n){return!e[t]||p[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func},f={},h={checkPropTypes:function(e,t,n){for(var r in d){if(d.hasOwnProperty(r))var o=d[r](t,r,e,s.prop,null,c);if(o instanceof Error&&!(o.message in f)){f[o.message]=!0;i(n)}}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(a(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(a(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=h},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||a}var o=n(5),a=n(49),i=(n(86),n(25));n(4),n(6);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?o("85"):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};e.exports=r},function(e,t,n){"use strict";var r=n(5),o=(n(4),!1),a={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o?r("104"):void 0,a.replaceNodeWithMarkup=e.replaceNodeWithMarkup,a.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};e.exports=a},function(e,t,n){"use strict";function r(e){var t=Function.prototype.toString,n=Object.prototype.hasOwnProperty,r=RegExp("^"+t.call(n).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");try{var o=t.call(e);return r.test(o)}catch(a){return!1}}function o(e){return"."+e}function a(e){return parseInt(e.substr(1),10)}function i(e){if(C)return v.get(e);var t=o(e);return g[t]}function l(e){if(C)v.delete(e);else{var t=o(e);delete g[t]}}function u(e,t,n){var r={element:t,parentID:n,text:null,childIDs:[],isMounted:!1,updateCount:0};if(C)v.set(e,r);else{var a=o(e);g[a]=r}}function s(e){if(C)b.add(e);else{var t=o(e);_[t]=!0}}function c(e){if(C)b.delete(e);else{var t=o(e);delete _[t]}}function p(){return C?Array.from(v.keys()):Object.keys(g).map(a)}function d(){return C?Array.from(b.keys()):Object.keys(_).map(a)}function f(e){var t=i(e);if(t){var n=t.childIDs;l(e),n.forEach(f)}}function h(e,t,n){return"\n in "+e+(t?" (at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+")":n?" (created by "+n+")":"")}function m(e){return null==e?"#empty":"string"==typeof e||"number"==typeof e?"#text":"string"==typeof e.type?e.type:e.type.displayName||e.type.name||"Unknown"}function y(e){var t,n=O.getDisplayName(e),r=O.getElement(e),o=O.getOwnerID(e);return o&&(t=O.getDisplayName(o)),h(n,r&&r._source,t)}var v,b,g,_,P=n(5),T=n(18),C=(n(4),n(6),"function"==typeof Array.from&&"function"==typeof Map&&r(Map)&&null!=Map.prototype&&"function"==typeof Map.prototype.keys&&r(Map.prototype.keys)&&"function"==typeof Set&&r(Set)&&null!=Set.prototype&&"function"==typeof Set.prototype.keys&&r(Set.prototype.keys));C?(v=new Map,b=new Set):(g={},_={});var x=[],O={onSetChildren:function(e,t){var n=i(e);n.childIDs=t;for(var r=0;r<t.length;r++){var o=t[r],a=i(o);a?void 0:P("140"),null==a.childIDs&&"object"==typeof a.element&&null!=a.element?P("141"):void 0,a.isMounted?void 0:P("71"),null==a.parentID&&(a.parentID=e),a.parentID!==e?P("142",o,a.parentID,e):void 0}},onBeforeMountComponent:function(e,t,n){u(e,t,n)},onBeforeUpdateComponent:function(e,t){var n=i(e);n&&n.isMounted&&(n.element=t)},onMountComponent:function(e){var t=i(e);t.isMounted=!0;var n=0===t.parentID;n&&s(e)},onUpdateComponent:function(e){var t=i(e);t&&t.isMounted&&t.updateCount++},onUnmountComponent:function(e){var t=i(e);if(t){t.isMounted=!1;var n=0===t.parentID;n&&c(e)}x.push(e)},purgeUnmountedComponents:function(){if(!O._preventPurging){for(var e=0;e<x.length;e++){var t=x[e];f(t)}x.length=0}},isMounted:function(e){var t=i(e);return!!t&&t.isMounted},getCurrentStackAddendum:function(e){var t="";if(e){var n=e.type,r="function"==typeof n?n.displayName||n.name:n,o=e._owner;t+=h(r||"Unknown",e._source,o&&o.getName())}var a=T.current,i=a&&a._debugID;return t+=O.getStackAddendumByID(i)},getStackAddendumByID:function(e){for(var t="";e;)t+=y(e),e=O.getParentID(e);return t},getChildIDs:function(e){var t=i(e);return t?t.childIDs:[]},getDisplayName:function(e){var t=O.getElement(e);return t?m(t):null},getElement:function(e){var t=i(e);return t?t.element:null},getOwnerID:function(e){var t=O.getElement(e);return t&&t._owner?t._owner._debugID:null},getParentID:function(e){var t=i(e);return t?t.parentID:null},getSource:function(e){var t=i(e),n=t?t.element:null,r=null!=n?n._source:null;return r},getText:function(e){var t=O.getElement(e);return"string"==typeof t?t:"number"==typeof t?""+t:null},getUpdateCount:function(e){var t=i(e);return t?t.updateCount:0},getRegisteredIDs:p,getRootIDs:d};e.exports=O},function(e,t,n){"use strict";function r(e,t,n,r){try{return t(n,r)}catch(a){return void(null===o&&(o=a))}}var o=null,a={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var e=o;throw o=null,e}}};e.exports=a},function(e,t,n){"use strict";function r(e,t){}var o=(n(6),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")}});e.exports=o},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(32),o=r({prop:null,context:null,childContext:null});e.exports=o},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){"use strict";function r(e){u.enqueueUpdate(e)}function o(e){var t=typeof e;if("object"!==t)return t;var n=e.constructor&&e.constructor.name||t,r=Object.keys(e);return r.length>0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function a(e,t){var n=l.get(e);if(!n){return null}return n}var i=n(5),l=(n(18),n(28)),u=(n(11),n(13)),s=(n(4),n(6),{isMounted:function(e){var t=l.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){s.validateCallback(t,n);var o=a(e);return o?(o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],void r(o)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=a(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=a(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=a(e,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?i("122",t,o(e)):void 0}});e.exports=s},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e};e.exports=n},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return!!r&&!!n[r]}function r(e){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t,n){"use strict";function r(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,a=n(9);a.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,a=typeof t;return"string"===o||"number"===o?"string"===a||"number"===a:"object"===a&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?s.escape(e.key):t.toString(36)}function o(e,t,n,a){var d=typeof e;if("undefined"!==d&&"boolean"!==d||(e=null),null===e||"string"===d||"number"===d||l.isValidElement(e))return n(a,e,""===t?c+r(e,0):t),1;var f,h,m=0,y=""===t?c:t+p;if(Array.isArray(e))for(var v=0;v<e.length;v++)f=e[v],h=y+r(f,v),m+=o(f,h,n,a);else{var b=u(e);if(b){var g,_=b.call(e);if(b!==e.entries)for(var P=0;!(g=_.next()).done;)f=g.value,h=y+r(f,P++),m+=o(f,h,n,a);else for(;!(g=_.next()).done;){var T=g.value;T&&(f=T[1],h=y+s.escape(T[0])+p+r(f,0),m+=o(f,h,n,a))}}else if("object"===d){var C="",x=String(e);i("31","[object Object]"===x?"object with keys {"+Object.keys(e).join(", ")+"}":x,C)}}return m}function a(e,t,n){return null==e?0:o(e,"",t,n)}var i=n(5),l=(n(18),n(12)),u=n(89),s=(n(4),n(43)),c=(n(6),"."),p=":";e.exports=a},function(e,t,n){"use strict";var r=(n(7),n(10)),o=(n(6),r);e.exports=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.href,r=e.big,i=e.baseStyle,u=e._className,c=o(e,["href","big","baseStyle","_className"]),d=t.rebass,f=a({},p.default,d),h=f.fontSizes,m=f.bold,y=f.scale,v=n?"a":"button",b=y[3],g=a({},i,{fontFamily:"inherit",fontSize:h[5],fontWeight:m,lineHeight:y[2]+"px",minHeight:b,textDecoration:"none",display:"inline-block",margin:0,paddingTop:r?y[2]:y[1],paddingBottom:r?y[2]:y[1],paddingLeft:y[2],paddingRight:y[2],cursor:"pointer",border:0});return l.default.createElement(s.default,a({},c,{tagName:v,className:u||"Button",href:n,baseStyle:g}))};d.propTypes={href:l.default.PropTypes.string,color:l.default.PropTypes.string,backgroundColor:l.default.PropTypes.string,rounded:l.default.PropTypes.oneOfType([l.default.PropTypes.bool,l.default.PropTypes.oneOf(["top","right","bottom","left"])]),pill:l.default.PropTypes.bool,big:l.default.PropTypes.bool,theme:l.default.PropTypes.oneOf(["primary","secondary","default","info","success","warning","error"])},d.defaultProps={color:"white",backgroundColor:"primary",inverted:!0,rounded:!0},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(20),s=r(u),c=n(2),p=r(c),d=n(3),f=r(d),h=function(e,t){var n=e.level,r=e.size,i=e.big,u=e.alt,c=e._className,d=o(e,["level","size","big","alt","_className"]),h=t.rebass,m=a({},f.default,h),y=m.fontSizes,v=m.bold,b="h"+n,g=function(e){return y[e]},_=g("number"==typeof r?r:n);u&&(_=g(4)),i&&(_*=2);var P=(0,s.default)(c||"Heading",{Heading_alt:u});return l.default.createElement(p.default,a({},d,{tagName:b,className:P,baseStyle:{fontSize:_,fontWeight:v,lineHeight:1.25,margin:0,opacity:u?.5:null}}))};h.propTypes={big:l.default.PropTypes.bool,level:l.default.PropTypes.oneOf([1,2,3,4,5,6]),size:l.default.PropTypes.oneOf([0,1,2,3,4,5,6]),alt:l.default.PropTypes.bool},h.defaultProps={level:2},h.contextTypes={rebass:l.default.PropTypes.object},t.default=h},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function i(){m&&f&&(m=!1,f.length?h=f.concat(h):y=-1,h.length&&l())}function l(){if(!m){var e=o(i);m=!0;for(var t=h.length;t;){for(f=h,h=[];++y<t;)f&&f[y].run();y=-1,t=h.length}f=null,m=!1,a(e)}}function u(e,t){this.fun=e,this.array=t}function s(){}var c,p,d=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{p="function"==typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var f,h=[],m=!1,y=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new u(e,t)),1!==h.length||m||o(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=s,d.addListener=s,d.once=s,d.off=s,d.removeListener=s,d.removeAllListeners=s,d.emit=s,d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(10),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var a={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},i={isUnitlessNumber:r,shorthandPropertyExpansions:a};e.exports=i},function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=n(5),a=n(7),i=n(17);n(4);a(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?o("24"):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n<e.length;n++)e[n].call(t[n]);e.length=0,t.length=0}},checkpoint:function(){return this._callbacks?this._callbacks.length:0; },rollback:function(e){this._callbacks&&(this._callbacks.length=e,this._contexts.length=e)},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e){return!!s.hasOwnProperty(e)||!u.hasOwnProperty(e)&&(l.test(e)?(s[e]=!0,!0):(u[e]=!0,!1))}function o(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&t<1||e.hasOverloadedBooleanValue&&t===!1}var a=n(22),i=(n(8),n(11),n(244)),l=(n(6),new RegExp("^["+a.ATTRIBUTE_NAME_START_CHAR+"]["+a.ATTRIBUTE_NAME_CHAR+"]*$")),u={},s={},c={createMarkupForID:function(e){return a.ID_ATTRIBUTE_NAME+"="+i(e)},setAttributeForID:function(e,t){e.setAttribute(a.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return a.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(a.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=a.properties.hasOwnProperty(e)?a.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+i(t)}return a.isCustomAttribute(e)?null==t?"":e+"="+i(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+i(t):""},setValueForProperty:function(e,t,n){var r=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(r){var i=r.mutationMethod;if(i)i(e,n);else{if(o(r,n))return void this.deleteValueForProperty(e,t);if(r.mustUseProperty)e[r.propertyName]=n;else{var l=r.attributeName,u=r.attributeNamespace;u?e.setAttributeNS(u,l,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(l,""):e.setAttribute(l,""+n)}}}else if(a.isCustomAttribute(t))return void c.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){if(r(t)){null==n?e.removeAttribute(t):e.setAttribute(t,""+n)}},deleteValueForAttribute:function(e,t){e.removeAttribute(t)},deleteValueForProperty:function(e,t){var n=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseProperty){var o=n.propertyName;n.hasBooleanValue?e[o]=!1:e[o]=""}else e.removeAttribute(n.attributeName)}else a.isCustomAttribute(t)&&e.removeAttribute(t)}};e.exports=c},function(e,t,n){"use strict";function r(e){return(""+e).replace(_,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function a(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function i(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);v(e,a,r),o.release(r)}function l(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var o=e.result,a=e.keyPrefix,i=e.func,l=e.context,u=i.call(l,t,e.count++);Array.isArray(u)?s(u,o,n,y.thatReturnsArgument):null!=u&&(m.isValidElement(u)&&(u=m.cloneAndReplaceKey(u,a+(!u.key||t&&t.key===u.key?"":r(u.key)+"/")+n)),o.push(u))}function s(e,t,n,o,a){var i="";null!=n&&(i=r(n)+"/");var s=l.getPooled(t,i,o,a);v(e,u,s),l.release(s)}function c(e,t,n){if(null==e)return e;var r=[];return s(e,r,null,t,n),r}function p(e,t,n){return null}function d(e,t){return v(e,p,null)}function f(e){var t=[];return s(e,t,null,y.thatReturnsArgument),t}var h=n(17),m=n(12),y=n(10),v=n(60),b=h.twoArgumentPooler,g=h.fourArgumentPooler,_=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,b),l.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(l,g);var P={forEach:i,map:c,mapIntoWithKeyPrefixInternal:s,count:d,toArray:f};e.exports=P},function(e,t,n){"use strict";function r(e,t){var n=T.hasOwnProperty(t)?T[t]:null;x.hasOwnProperty(t)&&(n!==_.OVERRIDE_BASE?p("73",t):void 0),e&&(n!==_.DEFINE_MANY&&n!==_.DEFINE_MANY_MERGED?p("74",t):void 0)}function o(e,t){if(t){"function"==typeof t?p("75"):void 0,h.isValidElement(t)?p("76"):void 0;var n=e.prototype,o=n.__reactAutoBindPairs;t.hasOwnProperty(g)&&C.mixins(e,t.mixins);for(var a in t)if(t.hasOwnProperty(a)&&a!==g){var i=t[a],s=n.hasOwnProperty(a);if(r(s,a),C.hasOwnProperty(a))C[a](e,i);else{var c=T.hasOwnProperty(a),d="function"==typeof i,f=d&&!c&&!s&&t.autobind!==!1;if(f)o.push(a,i),n[a]=i;else if(s){var m=T[a];!c||m!==_.DEFINE_MANY_MERGED&&m!==_.DEFINE_MANY?p("77",m,a):void 0,m===_.DEFINE_MANY_MERGED?n[a]=l(n[a],i):m===_.DEFINE_MANY&&(n[a]=u(n[a],i))}else n[a]=i}}}else;}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in C;o?p("78",n):void 0;var a=n in e;a?p("79",n):void 0,e[n]=r}}}function i(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:p("80");for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?p("81",n):void 0,e[n]=t[n]);return e}function l(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return i(o,n),i(o,r),o}}function u(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function s(e,t){var n=t.bind(e);return n}function c(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=s(e,o)}}var p=n(5),d=n(7),f=n(45),h=n(12),m=(n(51),n(50),n(49)),y=n(25),v=(n(4),n(32)),b=n(16),g=(n(6),b({mixins:null})),_=v({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),P=[],T={mixins:_.DEFINE_MANY,statics:_.DEFINE_MANY,propTypes:_.DEFINE_MANY,contextTypes:_.DEFINE_MANY,childContextTypes:_.DEFINE_MANY,getDefaultProps:_.DEFINE_MANY_MERGED,getInitialState:_.DEFINE_MANY_MERGED,getChildContext:_.DEFINE_MANY_MERGED,render:_.DEFINE_ONCE,componentWillMount:_.DEFINE_MANY,componentDidMount:_.DEFINE_MANY,componentWillReceiveProps:_.DEFINE_MANY,shouldComponentUpdate:_.DEFINE_ONCE,componentWillUpdate:_.DEFINE_MANY,componentDidUpdate:_.DEFINE_MANY,componentWillUnmount:_.DEFINE_MANY,updateComponent:_.OVERRIDE_BASE},C={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)o(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=d({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=d({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=l(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=d({},e.propTypes,t)},statics:function(e,t){a(e,t)},autobind:function(){}},x={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},O=function(){};d(O.prototype,f.prototype,x);var E={createClass:function(e){var t=function(e,n,r){this.__reactAutoBindPairs.length&&c(this),this.props=e,this.context=n,this.refs=y,this.updater=r||m,this.state=null;var o=this.getInitialState?this.getInitialState():null;"object"!=typeof o||Array.isArray(o)?p("82",t.displayName||"ReactCompositeComponent"):void 0,this.state=o};t.prototype=new O,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],P.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:p("83");for(var n in T)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){P.push(e)}}};e.exports=E},function(e,t){"use strict";var n={hasCachedChildNodes:1};e.exports=n},function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=u.getValue(e);null!=t&&o(this,Boolean(e.multiple),t)}}function o(e,t,n){var r,o,a=s.getNodeFromInstance(e).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<a.length;o++){var i=r.hasOwnProperty(a[o].value);a[o].selected!==i&&(a[o].selected=i)}}else{for(r=""+n,o=0;o<a.length;o++)if(a[o].value===r)return void(a[o].selected=!0);a.length&&(a[0].selected=!0)}}function a(e){var t=this._currentElement.props,n=u.executeOnChange(t,e);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),c.asap(r,this),n}var i=n(7),l=n(34),u=n(44),s=n(8),c=n(13),p=(n(6),!1),d={getHostProps:function(e,t){return i({},l.getHostProps(e,t),{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=u.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,listeners:null,onChange:a.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||p||(p=!0)},getSelectValueContext:function(e){return e._wrapperState.initialValue},postUpdateWrapper:function(e){var t=e._currentElement.props;e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var r=u.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,o(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?o(e,Boolean(t.multiple),t.defaultValue):o(e,Boolean(t.multiple),t.multiple?[]:""))}};e.exports=d},function(e,t){"use strict";var n,r={injectEmptyComponentFactory:function(e){n=e}},o={create:function(e){return n(e)}};o.injection=r,e.exports=o},function(e,t){"use strict";var n={logTopLevelRenders:!1};e.exports=n},function(e,t,n){"use strict";function r(e){return u?void 0:i("111",e.type),new u(e)}function o(e){return new c(e)}function a(e){return e instanceof c}var i=n(5),l=n(7),u=(n(4),null),s={},c=null,p={injectGenericComponentClass:function(e){u=e},injectTextComponentClass:function(e){c=e},injectComponentClasses:function(e){l(s,e)}},d={createInternalComponent:r,createInstanceForText:o,isTextComponent:a,injection:p};e.exports=d},function(e,t,n){"use strict";function r(e){return a(document.documentElement,e)}var o=n(205),a=n(115),i=n(66),l=n(67),u={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=l();return{focusedElem:e,selectionRange:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t=l(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(u.hasSelectionCapabilities(n)&&u.setSelection(n,o),i(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if(void 0===r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var a=e.createTextRange();a.collapse(!0),a.moveStart("character",n),a.moveEnd("character",r-n),a.select()}else o.setOffsets(e,t)}};e.exports=u},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===R?e.documentElement:e.firstChild:null}function a(e){return e.getAttribute&&e.getAttribute(S)||""}function i(e,t,n,r,o){var a;if(P.logTopLevelRenders){var i=e._currentElement.props,l=i.type;a="React mount: "+("string"==typeof l?l:l.displayName||l.name),console.time(a)}var u=x.mountComponent(e,n,null,b(e,t),o,0);a&&console.timeEnd(a),e._renderedComponent._topLevelWrapper=e,B._mountImageIntoNode(u,t,e,r,n)}function l(e,t,n,r){var o=E.ReactReconcileTransaction.getPooled(!n&&g.useCreateElement);o.perform(i,null,e,t,o,n,r),E.ReactReconcileTransaction.release(o)}function u(e,t,n){for(x.unmountComponent(e,n),t.nodeType===R&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function s(e){var t=o(e);if(t){var n=v.getInstanceFromNode(t);return!(!n||!n._hostParent)}}function c(e){return!(!e||e.nodeType!==N&&e.nodeType!==R&&e.nodeType!==A)}function p(e){var t=o(e),n=t&&v.getInstanceFromNode(t);return n&&!n._hostParent?n:null}function d(e){var t=p(e);return t?t._hostContainerInfo._topLevelWrapper:null}var f=n(5),h=n(21),m=n(22),y=n(35),v=(n(18),n(8)),b=n(198),g=n(201),_=n(12),P=n(76),T=n(28),C=(n(11),n(214)),x=n(23),O=n(53),E=n(13),w=n(25),M=n(91),L=(n(4),n(38)),k=n(59),S=(n(6),m.ID_ATTRIBUTE_NAME),j=m.ROOT_ATTRIBUTE_NAME,N=1,R=9,A=11,I={},D=1,U=function(){this.rootID=D++};U.prototype.isReactComponent={},U.prototype.render=function(){return this.props};var B={TopLevelWrapper:U,_instancesByReactRootID:I,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r,o){return B.scrollMonitor(r,function(){O.enqueueElementInternal(e,t,n),o&&O.enqueueCallbackInternal(e,o)}),e},_renderNewRootComponent:function(e,t,n,r){c(t)?void 0:f("37"),y.ensureScrollValueMonitoring();var o=M(e,!1);E.batchedUpdates(l,o,t,n,r);var a=o._instance.rootID;return I[a]=o,o},renderSubtreeIntoContainer:function(e,t,n,r){return null!=e&&T.has(e)?void 0:f("38"),B._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){O.validateCallback(r,"ReactDOM.render"),_.isValidElement(t)?void 0:f("39","string"==typeof t?" Instead of passing a string like 'div', pass React.createElement('div') or <div />.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or <Foo />.":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,l=_(U,null,null,null,null,null,t);if(e){var u=T.get(e);i=u._processChildContext(u._context)}else i=w;var c=d(n);if(c){var p=c._currentElement,h=p.props;if(k(h,t)){var m=c._renderedComponent.getPublicInstance(),y=r&&function(){r.call(m)};return B._updateRootComponent(c,l,i,n,y),m}B.unmountComponentAtNode(n)}var v=o(n),b=v&&!!a(v),g=s(n),P=b&&!c&&!g,C=B._renderNewRootComponent(l,n,P,i)._renderedComponent.getPublicInstance();return r&&r.call(C),C},render:function(e,t,n){return B._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){c(e)?void 0:f("40");var t=d(e);if(!t){s(e),1===e.nodeType&&e.hasAttribute(j);return!1}return delete I[t._instance.rootID],E.batchedUpdates(u,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,a,i){if(c(t)?void 0:f("41"),a){var l=o(t);if(C.canReuseMarkup(e,l))return void v.precacheNode(n,l);var u=l.getAttribute(C.CHECKSUM_ATTR_NAME);l.removeAttribute(C.CHECKSUM_ATTR_NAME);var s=l.outerHTML;l.setAttribute(C.CHECKSUM_ATTR_NAME,u);var p=e,d=r(p,s),m=" (client) "+p.substring(d-20,d+20)+"\n (server) "+s.substring(d-20,d+20);t.nodeType===R?f("42",m):void 0}if(t.nodeType===R?f("43"):void 0,i.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else L(t,e),v.precacheNode(n,t.firstChild)}};e.exports=B},function(e,t,n){"use strict";var r=n(32),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";var r=n(5),o=n(12),a=(n(4),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?a.EMPTY:o.isValidElement(e)?"function"==typeof e.type?a.COMPOSITE:a.HOST:void r("26",e)}});e.exports=a},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e){this.message=e,this.stack=""}function a(e){function t(t,n,r,a,i,l,u){a=a||E,l=l||r;if(null==n[r]){var s=T[i];return t?new o("Required "+s+" `"+l+"` was not specified in "+("`"+a+"`.")):null}return e(n,r,a,i,l)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function i(e){function t(t,n,r,a,i,l){var u=t[n],s=b(u);if(s!==e){var c=T[a],p=g(u);return new o("Invalid "+c+" `"+i+"` of type "+("`"+p+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return a(t)}function l(){return a(x.thatReturns(null))}function u(e){function t(t,n,r,a,i){if("function"!=typeof e)return new o("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var l=t[n];if(!Array.isArray(l)){var u=T[a],s=b(l);return new o("Invalid "+u+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<l.length;c++){var p=e(l,c,r,a,i+"["+c+"]",C);if(p instanceof Error)return p}return null}return a(t)}function s(){function e(e,t,n,r,a){var i=e[t];if(!P.isValidElement(i)){var l=T[r],u=b(i);return new o("Invalid "+l+" `"+a+"` of type "+("`"+u+"` supplied to `"+n+"`, expected a single ReactElement."))}return null}return a(e)}function c(e){function t(t,n,r,a,i){if(!(t[n]instanceof e)){var l=T[a],u=e.name||E,s=_(t[n]);return new o("Invalid "+l+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return a(t)}function p(e){function t(t,n,a,i,l){for(var u=t[n],s=0;s<e.length;s++)if(r(u,e[s]))return null;var c=T[i],p=JSON.stringify(e);return new o("Invalid "+c+" `"+l+"` of value `"+u+"` "+("supplied to `"+a+"`, expected one of "+p+"."))}return Array.isArray(e)?a(t):x.thatReturnsNull}function d(e){function t(t,n,r,a,i){if("function"!=typeof e)return new o("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],u=b(l);if("object"!==u){var s=T[a];return new o("Invalid "+s+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an object."))}for(var c in l)if(l.hasOwnProperty(c)){var p=e(l,c,r,a,i+"."+c,C);if(p instanceof Error)return p}return null}return a(t)}function f(e){function t(t,n,r,a,i){for(var l=0;l<e.length;l++){var u=e[l];if(null==u(t,n,r,a,i,C))return null}var s=T[a];return new o("Invalid "+s+" `"+i+"` supplied to "+("`"+r+"`."))}return Array.isArray(e)?a(t):x.thatReturnsNull}function h(){function e(e,t,n,r,a){if(!y(e[t])){var i=T[r];return new o("Invalid "+i+" `"+a+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return a(e)}function m(e){function t(t,n,r,a,i){var l=t[n],u=b(l);if("object"!==u){var s=T[a];return new o("Invalid "+s+" `"+i+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `object`."))}for(var c in e){var p=e[c];if(p){var d=p(l,c,r,a,i+"."+c,C);if(d)return d}}return null}return a(t)}function y(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(y);if(null===e||P.isValidElement(e))return!0;var t=O(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!y(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!y(o[1]))return!1}return!0;default:return!1}}function v(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":v(t,e)?"symbol":t}function g(e){var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function _(e){return e.constructor&&e.constructor.name?e.constructor.name:E}var P=n(12),T=n(50),C=n(52),x=n(10),O=n(89),E=(n(6),"<<anonymous>>"),w={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),symbol:i("symbol"),any:l(),arrayOf:u,element:s(),instanceOf:c,node:h(),objectOf:d,oneOf:p,oneOfType:f,shape:m};o.prototype=Error.prototype,e.exports=w},function(e,t){"use strict";e.exports="15.3.2"},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function r(e,t){return null==t?o("30"):void 0,null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}var o=n(5);n(4);e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t){"use strict";function n(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}e.exports=n},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=n(81);e.exports=r},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);if("function"==typeof t)return t}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(){return!a&&o.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var o=n(9),a=null;e.exports=r},function(e,t,n){"use strict";function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function o(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function a(e,t){var n;if(null===e||e===!1)n=s.create(a);else if("object"==typeof e){var l=e;!l||"function"!=typeof l.type&&"string"!=typeof l.type?i("130",null==l.type?l.type:typeof l.type,r(l._owner)):void 0,"string"==typeof l.type?n=c.createInternalComponent(l):o(l.type)?(n=new l.type(l),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new p(l)}else"string"==typeof e||"number"==typeof e?n=c.createInstanceForText(e):i("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}var i=n(5),l=n(7),u=n(194),s=n(75),c=n(77),p=(n(4),n(6),function(e){this.construct(e)});l(p.prototype,u.Mixin,{_instantiateReactComponent:a});e.exports=a},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!r[e.type]:"textarea"===t}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){"use strict";var r=n(9),o=n(37),a=n(38),i=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){a(e,o(t))})),e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=function(e,t){var n=e.direction,r=(e.children,o(e,["direction","children"]));t.rebass;return l.default.createElement(s.default,a({},r,{className:"Arrow",baseStyle:{display:"inline-block",width:0,height:0,marginLeft:".5em",verticalAlign:"middle",borderRight:".3125em solid transparent",borderLeft:".3125em solid transparent",borderTop:"down"===n?".4375em solid":null,borderBottom:"up"===n?".4375em solid":null}}))};c.propTypes={direction:l.default.PropTypes.oneOf(["up","down"])},c.defaultProps={direction:"down"},c.contextTypes={rebass:l.default.PropTypes.object},t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(62),s=r(u),c=function(e,t){var n=e.style,r=o(e,["style"]),i=(t.rebass,a({backgroundColor:"transparent"},n));return l.default.createElement(s.default,a({},r,{_className:"ButtonOutline",baseStyle:{boxShadow:"inset 0 0 0 1px"},style:i}))};c.propTypes={href:l.default.PropTypes.string,color:l.default.PropTypes.string,rounded:l.default.PropTypes.oneOfType([l.default.PropTypes.bool,l.default.PropTypes.oneOf(["top","right","bottom","left"])]),pill:l.default.PropTypes.bool,big:l.default.PropTypes.bool},c.defaultProps={color:"primary",inverted:!1,rounded:!0},c.contextTypes={rebass:l.default.PropTypes.object},t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(63),s=r(u),c=function(e,t){var n=e.level,r=e.size,i=e.href,u=e.style,c=o(e,["level","size","href","style"]);t.rebass;return l.default.createElement(s.default,{_className:"HeadingLink",level:n,size:r,style:u},l.default.createElement("a",a({},c,{href:i,style:{color:"inherit",textDecoration:"none"}})))};c.propTypes={level:l.default.PropTypes.oneOf([1,2,3,4,5,6]),size:l.default.PropTypes.oneOf([1,2,3,4,5,6]),href:l.default.PropTypes.string},c.defaultProps={level:2,href:"#!"},c.contextTypes={rebass:l.default.PropTypes.object},t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(20),s=r(u),c=n(2),p=r(c),d=n(19),f=r(d),h=n(24),m=r(h),y=n(3),v=r(y),b=function(e,t){var n=e.label,r=e.name,i=e.type,u=e.message,c=e.hideLabel,d=(e.children,e.style),h=e.autoOff,y=e.m,b=e.mt,g=e.mr,_=e.mb,P=e.ml,T=e.mx,C=e.my,x=e.p,O=e.pt,E=e.pr,w=e.pb,M=e.pl,L=e.px,k=e.py,S=o(e,["label","name","type","message","hideLabel","children","style","autoOff","m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py"]),j=t.rebass,N=a({},v.default,j),R=N.scale,A=N.colors,I=N.borderColor,D=S.invalid||S["aria-invalid"],U={style:d,m:y,mt:b,mr:g,mb:_,ml:P,mx:T,my:C,p:x,pt:O,pr:E,pb:w,pl:M,px:L,py:k},B={root:{marginBottom:R[2],color:D?A.error:null},input:{fontFamily:"inherit",fontSize:"inherit",boxSizing:"border-box",display:"block",width:"100%",height:R[3],margin:0,paddingLeft:R[1],paddingRight:R[1],color:"inherit",backgroundColor:"rgba(255, 255, 255, .25)",borderWidth:1,borderStyle:"solid",borderColor:D?A.error:I}},F=(0,s.default)("Input",{isInvalid:D,isDisabled:S.disabled,isReadonly:S.readOnly}),z=h?{autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"off"}:{};return l.default.createElement(p.default,a({},U,{className:F,baseStyle:B.root}),l.default.createElement(f.default,{htmlFor:r,hide:c,children:n}),l.default.createElement(p.default,a({},z,S,{tagName:"input",type:i,name:r,baseStyle:B.input})),u&&l.default.createElement(m.default,{small:!0,children:u}))};b.propTypes={label:l.default.PropTypes.string.isRequired,name:l.default.PropTypes.string.isRequired,type:l.default.PropTypes.string,message:l.default.PropTypes.string,hideLabel:l.default.PropTypes.bool,autoOff:l.default.PropTypes.bool,rounded:l.default.PropTypes.oneOfType([l.default.PropTypes.bool,l.default.PropTypes.oneOf(["top","right","bottom","left"])])},b.defaultProps={type:"text",rounded:!0},b.contextTypes={rebass:l.default.PropTypes.object},t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=function(e,t){var n=e._className,r=o(e,["_className"]),i=(t.rebass,{display:"block",textDecoration:"none",color:"inherit"});return l.default.createElement(s.default,a({},r,{className:n||"LinkBlock",baseStyle:i}))};c.propTypes={is:l.default.PropTypes.oneOfType([l.default.PropTypes.string,l.default.PropTypes.object,l.default.PropTypes.func])},c.defaultProps={is:"a"},c.contextTypes={rebass:l.default.PropTypes.object},t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),i=r(a),l=n(2),u=r(l),s=n(3),c=r(s),p=function(e,t){var n=t.rebass,r=o({},c.default,n),a=r.scale,l=r.colors,s=r.borderColor,p=r.borderRadius;return i.default.createElement(u.default,o({},e,{className:"Menu",baseStyle:{display:"flex",flexDirection:"column",minWidth:128,marginBottom:a[2],overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:s,borderRadius:p,color:l.black,backgroundColor:l.white}}))};p.defaultProps={rounded:!0},p.contextTypes={rebass:i.default.PropTypes.object},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(98),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.width,r=e.first,i=e.active,u=e.children,c=o(e,["width","first","active","children"]),d=t.rebass,f=a({},p.default,d),h=f.scale,m=f.colors,y={link:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",lineHeight:1.25,flex:"1 1 "+n,paddingLeft:h[1],paddingRight:h[1]},dot:{position:"relative",zIndex:1,display:"inline-block",width:h[2],height:h[2],marginBottom:h[1],borderRadius:99999,backgroundColor:"currentcolor"},line:{position:"absolute",top:h[2]/2,transform:"translate(-50%, -50%)",left:0,right:0,height:4,backgroundColor:"currentcolor"},label:{},active:{color:m.primary}};return l.default.createElement(s.default,a({_className:"SequenceMap_Step",style:a({},y.link,i?y.active:{})},c),l.default.createElement("div",{style:y.dot}),!r&&l.default.createElement("div",{style:y.line}),l.default.createElement("div",{style:y.label},u))};d.contextTypes={rebass:l.default.PropTypes.object},d.propTypes={width:l.default.PropTypes.string,first:l.default.PropTypes.bool,active:l.default.PropTypes.bool},t.default=d},function(e,t,n){"use strict";function r(){}function o(e){try{return e.then}catch(t){return v=t,b}}function a(e,t){try{return e(t)}catch(n){return v=n,b}}function i(e,t,n){try{e(t,n)}catch(r){return v=r,b}}function l(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,e!==r&&m(e,this)}function u(e,t,n){return new e.constructor(function(o,a){var i=new l(r);i.then(o,a),s(e,new h(t,n,i))})}function s(e,t){for(;3===e._81;)e=e._65;return l._10&&l._10(e),0===e._81?0===e._45?(e._45=1,void(e._54=t)):1===e._45?(e._45=2,void(e._54=[e._54,t])):void e._54.push(t):void c(e,t)}function c(e,t){y(function(){var n=1===e._81?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._81?p(t.promise,e._65):d(t.promise,e._65));var r=a(n,e._65);r===b?d(t.promise,v):p(t.promise,r)})}function p(e,t){if(t===e)return d(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"==typeof t||"function"==typeof t)){var n=o(t);if(n===b)return d(e,v);if(n===e.then&&t instanceof l)return e._81=3,e._65=t,void f(e);if("function"==typeof n)return void m(n.bind(t),e)}e._81=1,e._65=t,f(e)}function d(e,t){e._81=2,e._65=t,l._97&&l._97(e,t),f(e)}function f(e){if(1===e._45&&(s(e,e._54),e._54=null),2===e._45){for(var t=0;t<e._54.length;t++)s(e,e._54[t]);e._54=null}}function h(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function m(e,t){var n=!1,r=i(e,function(e){n||(n=!0,p(t,e))},function(e){n||(n=!0,d(t,e))});n||r!==b||(n=!0,d(t,v))}var y=n(297),v=null,b={}; e.exports=l,l._10=null,l._97=null,l._61=r,l.prototype.then=function(e,t){if(this.constructor!==l)return u(this,e,t);var n=new l(r);return s(this,new h(e,t,n)),n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),s=r(u),c=n(105),p=r(c),d=n(103),f=r(d);n(298);var h=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),l(t,[{key:"getChildContext",value:function(){return{rebass:(0,p.default)(this.props.customTheme)}}},{key:"render",value:function(){return s.default.createElement("div",{className:"MaterialThemeProvider"},s.default.createElement(f.default,null,this.props.children))}}]),t}(s.default.Component);h.propTypes={children:u.PropTypes.node,customTheme:u.PropTypes.object},h.childContextTypes={rebass:u.PropTypes.object},t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=r(o);n(299);var i=function(e,t){var n=e.children,r=t.rebass,o=r.fontFamily;return a.default.createElement("div",{style:{fontFamily:o}},n)};i.propTypes={children:a.default.PropTypes.node},i.contextTypes={rebass:a.default.PropTypes.object},t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(102),a=r(o);t.default=a.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=r(o),i="0 2px 1px -1px gray",l="background-color 200ms linear",u="box-shadow 200ms",s={name:"Material",fontFamily:"Roboto, sans-serif",Button:{boxShadow:i,fontWeight:"500",textTransform:"uppercase",transition:u},ButtonCircle:{boxShadow:i,transition:u},Menu:{boxShadow:"0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.12)"},NavItem:{fontWeight:300,transition:l},Drawer:{padding:"0px"}};t.default=function(e){return(0,a.default)(s,e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=r(o),i=n(104),l=r(i),u=n(107),s=r(u),c={Heading:{marginBottom:"10px",marginTop:"30px"}},p=a.default.createElement(l.default,{customTheme:c},a.default.createElement(s.default,null)),d=function(){return p};t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=r(o),i=n(109),l=r(i),u=n(108),s=r(u),c=n(110),p=r(c),d=n(111),f=r(d),h=a.default.createElement("div",null,a.default.createElement(l.default,null),a.default.createElement(s.default,null),a.default.createElement(p.default,null),a.default.createElement(f.default,null));t.default=function(){return h}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=r(o),i=n(31),l=n(180),u=r(l),s=a.default.createElement("div",null,a.default.createElement(i.Heading,{level:2},"Buttons Circle (Floating Action Buttons) "),a.default.createElement(i.ButtonCircle,{size:40},a.default.createElement(u.default,{name:"heart"})),a.default.createElement(i.Space,{x:1}),a.default.createElement(i.ButtonCircle,{size:30},a.default.createElement(u.default,{name:"heart"})),a.default.createElement(i.Space,{x:1}),a.default.createElement(i.ButtonCircle,{size:40,backgroundColor:"error"},a.default.createElement(u.default,{name:"heart"})));t.default=function(){return s}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=r(o),i=n(31),l=a.default.createElement("div",null,a.default.createElement(i.Heading,{level:2},"Buttons "),a.default.createElement(i.Button,{theme:"primary"}," Primary "),a.default.createElement(i.Space,{x:1}),a.default.createElement(i.Button,{theme:"secondary"}," Button 2 "),a.default.createElement(i.Space,{x:1}),a.default.createElement(i.Button,{theme:"error"}," Error "));t.default=function(){return l}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),s=r(u),c=n(31),p=s.default.createElement(c.Heading,{level:2}," Dropdown "),d=s.default.createElement(c.Arrow,{direction:"down"}),f=s.default.createElement(c.NavItem,{is:"a"},"Hello"),h=s.default.createElement(c.NavItem,{is:"a"},"Hi"),m=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={dropdown:!1},n}return i(t,e),l(t,[{key:"render",value:function(){var e=this;return s.default.createElement("div",null,p,s.default.createElement(c.Dropdown,null,s.default.createElement(c.Button,{onClick:function(){e.setState({dropdown:!e.state.dropdown})}},"Dropdown",d),s.default.createElement(c.DropdownMenu,{open:this.state.dropdown,onDismiss:function(){e.setState({dropdown:!e.state.dropdown})}},f,h)))}}]),t}(s.default.Component);t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=r(o),i=n(31),l=a.default.createElement(i.Heading,{level:2}," Menu "),u=a.default.createElement(i.NavItem,{is:"a"},"Menu"),s=a.default.createElement(i.NavItem,{is:"a"},"NavItem"),c=a.default.createElement(i.NavItem,{is:"a"},"NavItem");t.default=function(){return a.default.createElement("div",null,l,a.default.createElement(i.Menu,{rounded:!0,style:{width:"200px"}},u,s,c))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(1),a=r(o),i=n(179),l=n(106),u=r(l),s=a.default.createElement(u.default,null),c=function(){(0,i.render)(s,document.getElementById("app"))},p=function(){},d=function(){p(),c()};d()},function(e,t){"use strict";function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e.replace(a,"ms-"))}var o=n(113),a=/^-ms-/;e.exports=r},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=n(123);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?i(!1):void 0,"number"!=typeof t?i(!1):void 0,0===t||t-1 in e?void 0:i(!1),"function"==typeof e.callee?i(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),o=0;o<t;o++)r[o]=e[o];return r}function o(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function a(e){return o(e)?Array.isArray(e)?e.slice():r(e):[e]}var i=n(4);e.exports=a},function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,t){var n=s;s?void 0:u(!1);var o=r(e),a=o&&l(o);if(a){n.innerHTML=a[1]+e+a[2];for(var c=a[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:u(!1),i(p).forEach(t));for(var d=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var a=n(9),i=n(116),l=n(118),u=n(4),s=a.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;e.exports=o},function(e,t,n){"use strict";function r(e){return i?void 0:a(!1),d.hasOwnProperty(e)||(e="*"),l.hasOwnProperty(e)||("*"===e?i.innerHTML="<link />":i.innerHTML="<"+e+"></"+e+">",l[e]=!i.firstChild),l[e]?d[e]:null}var o=n(9),a=n(4),i=o.canUseDOM?document.createElement("div"):null,l={},u=[1,'<select multiple="true">',"</select>"],s=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],d={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:u,option:u,caption:s,colgroup:s,tbody:s,tfoot:s,thead:s,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,l[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e).replace(a,"-ms-")}var o=n(120),a=/^ms-/;e.exports=r},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(122);e.exports=r},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t,n){e.exports={bookmark:n(126),calendar:n(127),camera:n(128),chat:n(129),check:n(130),chevronDown:n(131),chevronLeft:n(132),chevronRight:n(133),chevronUp:n(134),clock:n(135),close:n(136),cloud:n(137),cog:n(138),compose:n(139),expand:n(140),external:n(141),file:n(142),folder:n(143),geolocation:n(144),grid:n(145),heart:n(146),home:n(147),info:n(148),link:n(149),list:n(150),lock:n(151),mail:n(152),musicNote:n(153),next:n(154),no:n(155),pause:n(156),picture:n(157),pin:n(158),play:n(159),previous:n(160),refresh:n(161),repost:n(162),search:n(163),shoppingCart:n(164),skull:n(165),speakerVolume:n(166),speaker:n(167),star:n(168),tag:n(169),trash:n(170),triangleDown:n(171),triangleLeft:n(172),triangleRight:n(173),triangleUp:n(174),user:n(175),video:n(176),warning:n(177)}},function(e,t){e.exports=["M6 2 L26 2 L26 30","L16 24 L6 30 Z"].join(" ")},function(e,t){e.exports=["M2 4 L6 4 L6 2 A2 2 0 0 1 10 2 L10 4 L22 4 L22 2 A2 2 0 0 1 26 2 L26 4 L30 4 L30 10 L2 10 M2 12 L30 12 L30 30 L2 30"].join(" ")},function(e,t){e.exports=["M0 6 L8 6 L10 2 L22 2 L24 6 L32 6 L32 28 L0 28 z M9 17 A7 7 0 0 0 23 17 A7 7 0 0 0 9 17"].join(" ")},function(e,t){e.exports=["M32 16 A16 12 0 0 0 0 16 A16 12 0 0 0 16 28 L18 28 C20 30 24 32 28 32 C27 31 26 28 26 25.375 L26 25.375 A16 12 0 0 0 32 16"].join(" ")},function(e,t){e.exports=["M1 14 L5 10 L13 18 L27 4 L31 8 L13 26 z"].join(" ")},function(e,t){e.exports=["M1 12 L16 26 L31 12 L27 8 L16 18 L5 8 z"].join(" ")},function(e,t){e.exports=["M20 1 L24 5 L14 16 L24 27 L20 31 L6 16 z"].join(" ")},function(e,t){e.exports=["M12 1 L26 16 L12 31 L8 27 L18 16 L8 5 z"].join(" ")},function(e,t){e.exports=["M1 20 L16 6 L31 20 L27 24 L16 14 L5 24 z"].join(" ")},function(e,t){e.exports=["M16 0 A16 16 0 0 0 0 16 A16 16 0 0 0 16 32 A16 16 0 0 0 32 16 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 28 16 A12 12 0 0 1 16 28 A12 12 0 0 1 4 16 A12 12 0 0 1 16 4 M14 6 L14 17.25 L22 22 L24.25 18.5 L18 14.75 L18 6z"].join(" ")},function(e,t){e.exports=["M4 8 L8 4 L16 12 L24 4 L28 8 L20 16 L28 24 L24 28 L16 20 L8 28 L4 24 L12 16 z"].join(" ")},function(e,t){e.exports=["M7 14 A7 7 0 0 0 0 21 A7 7 0 0 0 7 28 H27 A5 5 0 0 0 32 23 A5 5 0 0 0 27 18 A10 10 0 0 0 28 14 A10 10 0 0 0 18 4 A10 10 0 0 0 8 14 A7 7 0 0 0 7 14"].join(" ")},function(e,t){e.exports=["M14 0 H18 L19 6 L20.707 6.707 L26 3.293 L28.707 6 L25.293 11.293 L26 13 L32 14 V18 L26 19 L25.293 20.707 L28.707 26 L26 28.707 L20.707 25.293 L19 26 L18 32 L14 32 L13 26 L11.293 25.293 L6 28.707 L3.293 26 L6.707 20.707 L6 19 L0 18 L0 14 L6 13 L6.707 11.293 L3.293 6 L6 3.293 L11.293 6.707 L13 6 L14 0 z M16 10 A6 6 0 0 0 16 22 A6 6 0 0 0 16 10"].join(" ")},function(e,t){e.exports=["M4 4 L16 4 L16 8 L8 8 L8 24 L24 24 L24 16 L28 16 L28 28 L4 28 z M26 2 L30 6 L16 20 L12 20 L12 16 z"].join(" ")},function(e,t){e.exports=["M16 4 L28 4 L28 16 L24 12 L20 16 L16 12 L20 8z M4 16 L8 20 L12 16 L16 20 L12 24 L16 28 L4 28z"].join(" ")},function(e,t){e.exports=["M4 4 L12 4 L12 8 L8 8 L8 24 L24 24 L24 20 L28 20 L28 28 L4 28 z M16 4 L28 4 L28 16 L24 12 L16 20 L12 16 L20 8z"].join(" ")},function(e,t){e.exports=["M4 2 L4 30 L28 30 L28 10 L20 2 z"].join(" ")},function(e,t){e.exports=["M0 4 L0 28 L32 28 L32 8 L16 8 L12 4 z"].join(" ")},function(e,t){e.exports=["M2 18 L30 2 L14 30 L14 18z"].join(" ")},function(e,t){e.exports=["M2 2 L10 2 L10 10 L2 10z M12 2 L20 2 L20 10 L12 10z M22 2 L30 2 L30 10 L22 10z M2 12 L10 12 L10 20 L2 20z M12 12 L20 12 L20 20 L12 20z M22 12 L30 12 L30 20 L22 20z M2 22 L10 22 L10 30 L2 30z M12 22 L20 22 L20 30 L12 30z M22 22 L30 22 L30 30 L22 30z"].join(" ")},function(e,t){e.exports=["M0 10 C0 6, 3 2, 8 2 C12 2, 15 5, 16 6 C17 5, 20 2, 24 2 C30 2, 32 6, 32 10 C32 18, 18 29, 16 30 C14 29, 0 18, 0 10"].join(" ")},function(e,t){e.exports=["M16 0 L32 16 L28 16 L28 30 L20 30 L20 20 L12 20 L12 30 L4 30 L4 16 L0 16 Z"].join(" ")},function(e,t){e.exports=["M16 0 A16 16 0 0 1 16 32 A16 16 0 0 1 16 0 M19 15 L13 15 L13 26 L19 26 z M16 6 A3 3 0 0 0 16 12 A3 3 0 0 0 16 6"].join(" ")},function(e,t){e.exports=["M0 16 A8 8 0 0 1 8 8 L14 8 A8 8 0 0 1 22 16 L18 16 A4 4 0 0 0 14 12 L8 12 A4 4 0 0 0 4 16 A4 4 0 0 0 8 20 L10 24 L8 24 A8 8 0 0 1 0 16z M22 8 L24 8 A8 8 0 0 1 32 16 A8 8 0 0 1 24 24 L18 24 A8 8 0 0 1 10 16 L14 16 A4 4 0 0 0 18 20 L24 20 A4 4 0 0 0 28 16 A4 4 0 0 0 24 12z"].join(" ")},function(e,t){e.exports=["M3 8 A3 3 0 0 0 9 8 A3 3 0 0 0 3 8 M12 6 L28 6 L28 10 L12 10z M3 16 A3 3 0 0 0 9 16 A3 3 0 0 0 3 16 M12 14 L28 14 L28 18 L12 18z M3 24 A3 3 0 0 0 9 24 A3 3 0 0 0 3 24 M12 22 L28 22 L28 26 L12 26z"].join(" ")},function(e,t){e.exports=["M22 16 L22 12 A6 6 0 0 0 10 12 L10 16 z M4 16 L6 16 L6 12 A10 10 0 0 1 26 12 L26 16 L28 16 L28 30 L4 30 z"].join(" ")},function(e,t){e.exports=["M0 6 L16 16 L32 6 z M0 9 L0 26 L32 26 L32 9 L16 19 z"].join(" ")},function(e,t){e.exports=["M0 24 A6 6 0 0 0 12 24 V8 H26 V18 A6 6 0 0 0 18 24 A6 6 0 0 0 30 24 V2 H8 V18 A6 6 0 0 0 0 24"].join(" ")},function(e,t){e.exports=["M4 4 L24 14 V4 H28 V28 H24 V18 L4 28 z"].join(" ")},function(e,t){e.exports=["M16 0 A16 16 0 0 0 0 16 A16 16 0 0 0 16 32 A16 16 0 0 0 32 16 A16 16 0 0 0 16 0 M16 6 A10 10 0 0 1 20.675 7 L7 20.675 A10 10 0 0 1 6 16 A10 10 0 0 1 16 6 M26 16 A10 10 0 0 1 16 26 A10 10 0 0 1 11.325 25 L25 11.325 A10 10 0 0 1 26 16"].join(" ")},function(e,t){e.exports=["M4 4 H12 V28 H4 z M20 4 H28 V28 H20 z"].join(" ")},function(e,t){e.exports=["M0 4 L0 28 L32 28 L32 4 z M4 24 L10 10 L15 18 L18 14 L24 24z M25 7 A4 4 0 0 1 25 15 A4 4 0 0 1 25 7"].join(" ")},function(e,t){e.exports=["M4 12 A12 12 0 0 1 28 12 C28 20, 16 32, 16 32 C16 32, 4 20 4 12 M11 12 A5 5 0 0 0 21 12 A5 5 0 0 0 11 12 Z"].join(" ")},function(e,t){e.exports=["M4 4 L28 16 L4 28 z"].join(" ")},function(e,t){e.exports=["M4 4 H8 V14 L28 4 V28 L8 18 V28 H4 z"].join(" ")},function(e,t){e.exports=["M16 2 A14 14 0 0 0 2 16 A14 14 0 0 0 16 30 A14 14 0 0 0 26 26 L 23.25 23 A10 10 0 0 1 16 26 A10 10 0 0 1 6 16 A10 10 0 0 1 16 6 A10 10 0 0 1 23.25 9 L19 13 L30 13 L30 2 L26 6 A14 14 0 0 0 16 2"].join(" ")},function(e,t){e.exports=["M7 7 L14 14 L9 14 L9 20 L16 20 L16 24 L5 24 L5 14 L0 14 z M16 8 L27 8 L27 18 L32 18 L25 25 L18 18 L23 18 L23 12 L16 12z"].join(" ")},function(e,t){e.exports=["M12 0 A12 12 0 0 0 0 12 A12 12 0 0 0 12 24 A12 12 0 0 0 18.5 22.25 L28 32 L32 28 L22.25 18.5 A12 12 0 0 0 24 12 A12 12 0 0 0 12 0 M12 4 A8 8 0 0 1 12 20 A8 8 0 0 1 12 4"].join(" ")},function(e,t){e.exports=["M0 4 L5 4 L6 8 L30 8 L28 22 L6 22 L3.5 6 L0 6z M10 24 A3 3 0 0 0 10 30 A3 3 0 0 0 10 24 M24 24 A3 3 0 0 0 24 30 A3 3 0 0 0 24 24"].join(" ")},function(e,t){e.exports=["M16 0 C6 0 2 4 2 14 L2 22 L6 24 L6 30 L26 30 L26 24 L30 22 L30 14 C30 4 26 0 16 0 M9 12 A4.5 4.5 0 0 1 9 21 A4.5 4.5 0 0 1 9 12 M23 12 A4.5 4.5 0 0 1 23 21 A4.5 4.5 0 0 1 23 12"].join(" ")},function(e,t){e.exports=["M2 12 L8 12 L16 6 L16 26 L8 20 L2 20 z M32 16 A16 16 0 0 1 27.25 27.375 L25.25 25.25 A13 13 0 0 0 29 16 A13 13 0 0 0 25.25 6.75 L27.25 4.625 A16 16 0 0 1 32 16 M25 16 A9 9 0 0 1 22.375 22.375 L20.25 20.25 A6 6 0 0 0 22 16 A6 6 0 0 0 20.25 11.75 L22.375 9.625 A9 9 0 0 1 25 16"].join(" ")},function(e,t){e.exports=["M2 12 L8 12 L16 6 L16 26 L8 20 L2 20 z"].join(" ")},function(e,t){e.exports=["M16 0 L21 11 L32 12 L23 19 L26 31 L16 25 L6 31 L9 19 L0 12 L11 11"].join(" ")},function(e,t){e.exports=["M0 18 L16 2 L29 3 L30 16 L14 32 z M20 9 A3 3 0 0 0 26 9 A3 3 0 0 0 20 9"].join(" ")},function(e,t){e.exports=["M4 4 L10 4 L12 2 L20 2 L22 4 L28 4 L29 8 L3 8 z M5 10 L27 10 L26 30 L6 30 z"].join(" ")},function(e,t){e.exports=["M4 8 H28 L16 26 z"].join(" ")},function(e,t){e.exports=["M24 4 V28 L6 16 z"].join(" ")},function(e,t){e.exports=["M8 4 V28 L26 16 z"].join(" ")},function(e,t){e.exports=["M4 24 H28 L16 6 z"].join(" ")},function(e,t){e.exports=["M10 8 A6 6 0 0 1 22 8 L22 12 A6 6 0 0 1 10 12 z M2 26 C3 23 10 20 14 20 L18 20 C22 20 29 23 30 26 L30 28 L2 28 z"].join(" ")},function(e,t){e.exports=["M0 6 L0 26 L24 26 L24 19 L32 23 L32 9 L24 13 L24 6 z"].join(" ")},function(e,t){e.exports=["M15 0 H17 L32 29 L31 30 L1 30 L0 29 z M19 8 L13 8 L14 20 L18 20 z M16 22 A3 3 0 0 0 16 28 A3 3 0 0 0 16 22"].join(" ")},function(e,t,n){e.exports=n(193)},function(e,t,n){"use strict";e.exports=n(195)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(125),s=r(u),c=function(e){var t=e.name,n=void 0===t?"warning":t,r=e.size,i=void 0===r?"1em":r,u=e.fill,c=void 0===u?"currentColor":u,p=e.width,d=e.height,f=o(e,["name","size","fill","width","height"]),h=s.default[n];return l.default.createElement("svg",a({},f,{width:p||i,height:d||i,fill:c,"data-id":"geomicon-"+n,viewBox:"0 0 32 32"}),l.default.createElement("path",{d:h}))};c.propTypes={name:l.default.PropTypes.oneOf(Object.keys(s.default)),size:l.default.PropTypes.oneOfType([l.default.PropTypes.string,l.default.PropTypes.number]),fill:l.default.PropTypes.string},t.default=c},function(e,t,n){"use strict";var r=n(8),o=n(66),a={focusDOMComponent:function(){o(r.getNodeFromInstance(this))}};e.exports=a},function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function a(e){switch(e){case M.topCompositionStart:return L.compositionStart;case M.topCompositionEnd:return L.compositionEnd;case M.topCompositionUpdate:return L.compositionUpdate}}function i(e,t){return e===M.topKeyDown&&t.keyCode===P}function l(e,t){switch(e){case M.topKeyUp:return _.indexOf(t.keyCode)!==-1;case M.topKeyDown:return t.keyCode!==P;case M.topKeyPress:case M.topMouseDown:case M.topBlur:return!0;default:return!1}}function u(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function s(e,t,n,r){var o,s;if(T?o=a(e):S?l(e,n)&&(o=L.compositionEnd):i(e,n)&&(o=L.compositionStart),!o)return null;O&&(S||o!==L.compositionStart?o===L.compositionEnd&&S&&(s=S.getData()):S=y.getPooled(r));var c=v.getPooled(o,t,n,r);if(s)c.data=s;else{var p=u(n);null!==p&&(c.data=p)}return h.accumulateTwoPhaseDispatches(c),c}function c(e,t){switch(e){case M.topCompositionEnd:return u(t);case M.topKeyPress:var n=t.which;return n!==E?null:(k=!0,w);case M.topTextInput:var r=t.data;return r===w&&k?null:r;default:return null}}function p(e,t){if(S){if(e===M.topCompositionEnd||!T&&l(e,t)){var n=S.getData();return y.release(S),S=null,n}return null}switch(e){case M.topPaste:return null;case M.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case M.topCompositionEnd:return O?null:t.data;default:return null}}function d(e,t,n,r){var o;if(o=x?c(e,n):p(e,n),!o)return null;var a=b.getPooled(L.beforeInput,t,n,r);return a.data=o,h.accumulateTwoPhaseDispatches(a),a}var f=n(14),h=n(27),m=n(9),y=n(188),v=n(227),b=n(230),g=n(16),_=[9,13,27,32],P=229,T=m.canUseDOM&&"CompositionEvent"in window,C=null;m.canUseDOM&&"documentMode"in document&&(C=document.documentMode);var x=m.canUseDOM&&"TextEvent"in window&&!C&&!r(),O=m.canUseDOM&&(!T||C&&C>8&&C<=11),E=32,w=String.fromCharCode(E),M=f.topLevelTypes,L={beforeInput:{phasedRegistrationNames:{bubbled:g({onBeforeInput:null}),captured:g({onBeforeInputCapture:null})},dependencies:[M.topCompositionEnd,M.topKeyPress,M.topTextInput,M.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:g({onCompositionEnd:null}),captured:g({onCompositionEndCapture:null})},dependencies:[M.topBlur,M.topCompositionEnd,M.topKeyDown,M.topKeyPress,M.topKeyUp,M.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:g({onCompositionStart:null}),captured:g({onCompositionStartCapture:null})},dependencies:[M.topBlur,M.topCompositionStart,M.topKeyDown,M.topKeyPress,M.topKeyUp,M.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:g({onCompositionUpdate:null}),captured:g({onCompositionUpdateCapture:null})},dependencies:[M.topBlur,M.topCompositionUpdate,M.topKeyDown,M.topKeyPress,M.topKeyUp,M.topMouseDown]}},k=!1,S=null,j={eventTypes:L,extractEvents:function(e,t,n,r){return[s(e,t,n,r),d(e,t,n,r)]}};e.exports=j},function(e,t,n){"use strict";var r=n(68),o=n(9),a=(n(11),n(114),n(237)),i=n(121),l=n(124),u=(n(6),l(function(e){return i(e)})),s=!1,c="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(d){s=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var f={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=u(r)+":",n+=a(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var i in t)if(t.hasOwnProperty(i)){var l=a(i,t[i],n);if("float"!==i&&"cssFloat"!==i||(i=c),l)o[i]=l;else{var u=s&&r.shorthandPropertyExpansions[i];if(u)for(var p in u)o[p]="";else o[i]=""}}}};e.exports=f},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function o(e){var t=x.getPooled(k.change,j,e,O(e));_.accumulateTwoPhaseDispatches(t),C.batchedUpdates(a,t)}function a(e){g.enqueueEvents(e),g.processEventQueue(!1)}function i(e,t){S=e,j=t,S.attachEvent("onchange",o)}function l(){S&&(S.detachEvent("onchange",o),S=null,j=null)}function u(e,t){if(e===L.topChange)return t}function s(e,t,n){e===L.topFocus?(l(),i(t,n)):e===L.topBlur&&l()}function c(e,t){S=e,j=t,N=e.value,R=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(S,"value",D),S.attachEvent?S.attachEvent("onpropertychange",d):S.addEventListener("propertychange",d,!1)}function p(){S&&(delete S.value,S.detachEvent?S.detachEvent("onpropertychange",d):S.removeEventListener("propertychange",d,!1),S=null,j=null,N=null,R=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==N&&(N=t,o(e))}}function f(e,t){if(e===L.topInput)return t}function h(e,t,n){e===L.topFocus?(p(),c(t,n)):e===L.topBlur&&p()}function m(e,t){if((e===L.topSelectionChange||e===L.topKeyUp||e===L.topKeyDown)&&S&&S.value!==N)return N=S.value,j}function y(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function v(e,t){if(e===L.topClick)return t}var b=n(14),g=n(26),_=n(27),P=n(9),T=n(8),C=n(13),x=n(15),O=n(57),E=n(58),w=n(92),M=n(16),L=b.topLevelTypes,k={change:{phasedRegistrationNames:{bubbled:M({onChange:null}),captured:M({onChangeCapture:null})},dependencies:[L.topBlur,L.topChange,L.topClick,L.topFocus,L.topInput,L.topKeyDown,L.topKeyUp,L.topSelectionChange]}},S=null,j=null,N=null,R=null,A=!1;P.canUseDOM&&(A=E("change")&&(!document.documentMode||document.documentMode>8));var I=!1;P.canUseDOM&&(I=E("input")&&(!document.documentMode||document.documentMode>11));var D={get:function(){return R.get.call(this)},set:function(e){N=""+e,R.set.call(this,e)}},U={eventTypes:k,extractEvents:function(e,t,n,o){var a,i,l=t?T.getNodeFromInstance(t):window;if(r(l)?A?a=u:i=s:w(l)?I?a=f:(a=m,i=h):y(l)&&(a=v),a){var c=a(e,t);if(c){var p=x.getPooled(k.change,c,n,o);return p.type="change",_.accumulateTwoPhaseDispatches(p),p}}i&&i(e,l,t)}};e.exports=U},function(e,t,n){"use strict";var r=n(5),o=n(21),a=n(9),i=n(117),l=n(10),u=(n(4),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(a.canUseDOM?void 0:r("56"),t?void 0:r("57"),"HTML"===e.nodeName?r("58"):void 0,"string"==typeof t){var n=i(t,l)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}});e.exports=u},function(e,t,n){"use strict";var r=n(16),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];e.exports=o},function(e,t,n){"use strict";var r=n(14),o=n(27),a=n(8),i=n(36),l=n(16),u=r.topLevelTypes,s={mouseEnter:{registrationName:l({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:l({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},c={eventTypes:s,extractEvents:function(e,t,n,r){if(e===u.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==u.topMouseOut&&e!==u.topMouseOver)return null;var l;if(r.window===r)l=r;else{var c=r.ownerDocument;l=c?c.defaultView||c.parentWindow:window}var p,d;if(e===u.topMouseOut){p=t;var f=n.relatedTarget||n.toElement;d=f?a.getClosestInstanceFromNode(f):null}else p=null,d=t;if(p===d)return null;var h=null==p?l:a.getNodeFromInstance(p),m=null==d?l:a.getNodeFromInstance(d),y=i.getPooled(s.mouseLeave,p,n,r);y.type="mouseleave",y.target=h,y.relatedTarget=m;var v=i.getPooled(s.mouseEnter,d,n,r);return v.type="mouseenter",v.target=m,v.relatedTarget=h,o.accumulateEnterLeaveDispatches(y,v,p,d),[y,v]}};e.exports=c},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(7),a=n(17),i=n(90);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[i()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);var l=t>1?1-t:void 0;return this._fallbackText=o.slice(e,l),this._fallbackText}}),a.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(22),o=r.injection.MUST_USE_PROPERTY,a=r.injection.HAS_BOOLEAN_VALUE,i=r.injection.HAS_NUMERIC_VALUE,l=r.injection.HAS_POSITIVE_NUMERIC_VALUE,u=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,s={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:a,allowTransparency:0,alt:0,as:0,async:a,autoComplete:0,autoPlay:a,capture:a,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|a,cite:0,classID:0,className:0,cols:l,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:a,coords:0,crossOrigin:0,data:0,dateTime:0,default:a,defer:a,dir:0,disabled:a,download:u,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:a,formTarget:0,frameBorder:0,headers:0,height:0,hidden:a,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:a,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|a,muted:o|a,name:0,nonce:0,noValidate:a,open:a,optimum:0,pattern:0,placeholder:0,playsInline:a,poster:0,preload:0,profile:0,radioGroup:0,readOnly:a,referrerPolicy:0,rel:0,required:a,reversed:a,role:0,rows:l,rowSpan:i,sandbox:0,scope:0,scoped:a,scrolling:0,seamless:a,selected:o|a,shape:0,size:l,sizes:0,span:l,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:i,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:a,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=s},function(e,t,n){"use strict";var r=n(7),o=n(71),a=n(45),i=n(217),l=n(72),u=n(200),s=n(12),c=n(82),p=n(83),d=n(243),f=(n(6),s.createElement),h=s.createFactory,m=s.cloneElement,y=r,v={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:d},Component:a,PureComponent:i,createElement:f,cloneElement:m,isValidElement:s.isValidElement,PropTypes:c,createClass:l.createClass,createFactory:h,createMixin:function(e){return e},DOM:u,version:p,__spread:y};e.exports=v},function(e,t,n){(function(t){"use strict";function r(e,t,n,r){var o=void 0===e[n];null!=t&&o&&(e[n]=a(t,!0))}var o=n(23),a=n(91),i=(n(43),n(59)),l=n(60),u=(n(6),{instantiateChildren:function(e,t,n,o){if(null==e)return null;var a={};return l(e,r,a),a},updateChildren:function(e,t,n,r,l,u,s,c,p){if(t||e){var d,f;for(d in t)if(t.hasOwnProperty(d)){f=e&&e[d];var h=f&&f._currentElement,m=t[d];if(null!=f&&i(h,m))o.receiveComponent(f,m,l,c),t[d]=f;else{f&&(r[d]=o.getHostNode(f),o.unmountComponent(f,!1));var y=a(m,!0);t[d]=y;var v=o.mountComponent(y,l,u,s,c,p);n.push(v)}}for(d in e)!e.hasOwnProperty(d)||t&&t.hasOwnProperty(d)||(f=e[d],r[d]=o.getHostNode(f),o.unmountComponent(f,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];o.unmountComponent(r,t)}}});e.exports=u}).call(t,n(64))},function(e,t,n){"use strict";var r=n(39),o=n(202),a={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};e.exports=a},function(e,t,n){"use strict";var r=n(246),o={shouldComponentUpdate:function(e,t){return r(this,e,t); }};e.exports=o},function(e,t,n){"use strict";function r(e){}function o(e,t){}function a(e){return!(!e.prototype||!e.prototype.isReactComponent)}function i(e){return!(!e.prototype||!e.prototype.isPureReactComponent)}var l=n(5),u=n(7),s=n(46),c=n(18),p=n(12),d=n(48),f=n(28),h=(n(11),n(81)),m=(n(51),n(23)),y=n(236),v=n(25),b=(n(4),n(33)),g=n(59),_=(n(6),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var e=f.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return o(e,t),t};var P=1,T={construct:function(e){this._currentElement=e,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,u){this._context=u,this._mountOrder=P++,this._hostParent=t,this._hostContainerInfo=n;var s,c=this._currentElement.props,d=this._processContext(u),h=this._currentElement.type,m=e.getUpdateQueue(),y=a(h),b=this._constructComponent(y,c,d,m);y||null!=b&&null!=b.render?i(h)?this._compositeType=_.PureClass:this._compositeType=_.ImpureClass:(s=b,o(h,s),null===b||b===!1||p.isValidElement(b)?void 0:l("105",h.displayName||h.name||"Component"),b=new r(h),this._compositeType=_.StatelessFunctional);b.props=c,b.context=d,b.refs=v,b.updater=m,this._instance=b,f.set(b,this);var g=b.state;void 0===g&&(b.state=g=null),"object"!=typeof g||Array.isArray(g)?l("106",this.getName()||"ReactCompositeComponent"):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var T;return T=b.unstable_handleError?this.performInitialMountWithErrorHandling(s,t,n,e,u):this.performInitialMount(s,t,n,e,u),b.componentDidMount&&e.getReactMountReady().enqueue(b.componentDidMount,b),T},_constructComponent:function(e,t,n,r){return this._constructComponentWithoutOwner(e,t,n,r)},_constructComponentWithoutOwner:function(e,t,n,r){var o=this._currentElement.type;return e?new o(t,n,r):o(t,n,r)},performInitialMountWithErrorHandling:function(e,t,n,r,o){var a,i=r.checkpoint();try{a=this.performInitialMount(e,t,n,r,o)}catch(l){r.rollback(i),this._instance.unstable_handleError(l),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),i=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(i),a=this.performInitialMount(e,t,n,r,o)}return a},performInitialMount:function(e,t,n,r,o){var a=this._instance,i=0;a.componentWillMount&&(a.componentWillMount(),this._pendingStateQueue&&(a.state=this._processPendingState(a.props,a.context))),void 0===e&&(e=this._renderValidatedComponent());var l=h.getType(e);this._renderedNodeType=l;var u=this._instantiateReactComponent(e,l!==h.EMPTY);this._renderedComponent=u;var s=m.mountComponent(u,r,t,n,this._processChildContext(o),i);return s},getHostNode:function(){return m.getHostNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";d.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(m.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,f.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return v;var r={};for(var o in n)r[o]=e[o];return r},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t,n=this._currentElement.type,r=this._instance;if(r.getChildContext&&(t=r.getChildContext()),t){"object"!=typeof n.childContextTypes?l("107",this.getName()||"ReactCompositeComponent"):void 0;for(var o in t)o in n.childContextTypes?void 0:l("108",this.getName()||"ReactCompositeComponent",o);return u({},e,t)}return e},_checkContextTypes:function(e,t,n){y(e,t,n,this.getName(),null,this._debugID)},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?m.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(e,t,n,r,o){var a=this._instance;null==a?l("136",this.getName()||"ReactCompositeComponent"):void 0;var i,u=!1;this._context===o?i=a.context:(i=this._processContext(o),u=!0);var s=t.props,c=n.props;t!==n&&(u=!0),u&&a.componentWillReceiveProps&&a.componentWillReceiveProps(c,i);var p=this._processPendingState(c,i),d=!0;this._pendingForceUpdate||(a.shouldComponentUpdate?d=a.shouldComponentUpdate(c,p,i):this._compositeType===_.PureClass&&(d=!b(s,c)||!b(a.state,p))),this._updateBatchNumber=null,d?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,c,p,i,e,o)):(this._currentElement=n,this._context=o,a.props=c,a.state=p,a.context=i)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var a=u({},o?r[0]:n.state),i=o?1:0;i<r.length;i++){var l=r[i];u(a,"function"==typeof l?l.call(n,a,e,t):l)}return a},_performComponentUpdate:function(e,t,n,r,o,a){var i,l,u,s=this._instance,c=Boolean(s.componentDidUpdate);c&&(i=s.props,l=s.state,u=s.context),s.componentWillUpdate&&s.componentWillUpdate(t,n,r),this._currentElement=e,this._context=a,s.props=t,s.state=n,s.context=r,this._updateRenderedComponent(o,a),c&&o.getReactMountReady().enqueue(s.componentDidUpdate.bind(s,i,l,u),s)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent(),a=0;if(g(r,o))m.receiveComponent(n,o,e,this._processChildContext(t));else{var i=m.getHostNode(n);m.unmountComponent(n,!1);var l=h.getType(o);this._renderedNodeType=l;var u=this._instantiateReactComponent(o,l!==h.EMPTY);this._renderedComponent=u;var s=m.mountComponent(u,e,this._hostParent,this._hostContainerInfo,this._processChildContext(t),a);this._replaceNodeWithMarkup(i,s,n)}},_replaceNodeWithMarkup:function(e,t,n){s.replaceNodeWithMarkup(e,t,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e,t=this._instance;return e=t.render()},_renderValidatedComponent:function(){var e;if(this._compositeType!==_.StatelessFunctional){c.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{c.current=null}}else e=this._renderValidatedComponentWithoutOwnerOrContext();return null===e||e===!1||p.isValidElement(e)?void 0:l("109",this.getName()||"ReactCompositeComponent"),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?l("110"):void 0;var r=t.getPublicInstance(),o=n.refs===v?n.refs={}:n.refs;o[e]=r},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return this._compositeType===_.StatelessFunctional?null:e},_instantiateReactComponent:null},C={Mixin:T};e.exports=C},function(e,t,n){"use strict";var r=n(8),o=n(210),a=n(79),i=n(23),l=n(13),u=n(83),s=n(238),c=n(88),p=n(245);n(6);o.inject();var d={findDOMNode:s,render:a.render,unmountComponentAtNode:a.unmountComponentAtNode,version:u,unstable_batchedUpdates:l.batchedUpdates,unstable_renderSubtreeIntoContainer:p};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=c(e)),e?r.getNodeFromInstance(e):null}},Mount:a,Reconciler:i});e.exports=d},function(e,t,n){"use strict";var r=n(34),o={getHostProps:r.getHostProps};e.exports=o},function(e,t,n){"use strict";function r(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function o(e,t){t&&($[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?m("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?m("60"):void 0,"object"==typeof t.dangerouslySetInnerHTML&&q in t.dangerouslySetInnerHTML?void 0:m("61")),null!=t.style&&"object"!=typeof t.style?m("62",r(e)):void 0)}function a(e,t,n,r){if(!(r instanceof A)){var o=e._hostContainerInfo,a=o._node&&o._node.nodeType===Y,l=a?o._node:o._ownerDocument;z(t,l),r.getReactMountReady().enqueue(i,{inst:e,registrationName:t,listener:n})}}function i(){var e=this;x.putListener(e.inst,e.registrationName,e.listener)}function l(){var e=this;k.postMountWrapper(e)}function u(){var e=this;N.postMountWrapper(e)}function s(){var e=this;S.postMountWrapper(e)}function c(){var e=this;e._rootNodeID?void 0:m("63");var t=F(e);switch(t?void 0:m("64"),e._tag){case"iframe":case"object":e._wrapperState.listeners=[E.trapBubbledEvent(C.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in X)X.hasOwnProperty(n)&&e._wrapperState.listeners.push(E.trapBubbledEvent(C.topLevelTypes[n],X[n],t));break;case"source":e._wrapperState.listeners=[E.trapBubbledEvent(C.topLevelTypes.topError,"error",t)];break;case"img":e._wrapperState.listeners=[E.trapBubbledEvent(C.topLevelTypes.topError,"error",t),E.trapBubbledEvent(C.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[E.trapBubbledEvent(C.topLevelTypes.topReset,"reset",t),E.trapBubbledEvent(C.topLevelTypes.topSubmit,"submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[E.trapBubbledEvent(C.topLevelTypes.topInvalid,"invalid",t)]}}function p(){j.postUpdateWrapper(this)}function d(e){ee.call(J,e)||(Z.test(e)?void 0:m("65",e),J[e]=!0)}function f(e,t){return e.indexOf("-")>=0||null!=t.is}function h(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var m=n(5),y=n(7),v=n(181),b=n(183),g=n(21),_=n(40),P=n(22),T=n(70),C=n(14),x=n(26),O=n(41),E=n(35),w=n(196),M=n(73),L=n(8),k=n(203),S=n(204),j=n(74),N=n(207),R=(n(11),n(215)),A=n(220),I=(n(10),n(37)),D=(n(4),n(58),n(16)),U=(n(33),n(61),n(6),M),B=x.deleteListener,F=L.getNodeFromInstance,z=E.listenTo,H=O.registrationNameModules,W={string:!0,number:!0},V=D({style:null}),q=D({__html:null}),K={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},Y=11,X={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},G={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Q={listing:!0,pre:!0,textarea:!0},$=y({menuitem:!0},G),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,J={},ee={}.hasOwnProperty,te=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=te++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var a=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(c,this);break;case"button":a=w.getHostProps(this,a,t);break;case"input":k.mountWrapper(this,a,t),a=k.getHostProps(this,a),e.getReactMountReady().enqueue(c,this);break;case"option":S.mountWrapper(this,a,t),a=S.getHostProps(this,a);break;case"select":j.mountWrapper(this,a,t),a=j.getHostProps(this,a),e.getReactMountReady().enqueue(c,this);break;case"textarea":N.mountWrapper(this,a,t),a=N.getHostProps(this,a),e.getReactMountReady().enqueue(c,this)}o(this,a);var i,p;null!=t?(i=t._namespaceURI,p=t._tag):n._tag&&(i=n._namespaceURI,p=n._tag),(null==i||i===_.svg&&"foreignobject"===p)&&(i=_.html),i===_.html&&("svg"===this._tag?i=_.svg:"math"===this._tag&&(i=_.mathml)),this._namespaceURI=i;var d;if(e.useCreateElement){var f,h=n._ownerDocument;if(i===_.html)if("script"===this._tag){var m=h.createElement("div"),y=this._currentElement.type;m.innerHTML="<"+y+"></"+y+">",f=m.removeChild(m.firstChild)}else f=a.is?h.createElement(this._currentElement.type,a.is):h.createElement(this._currentElement.type);else f=h.createElementNS(i,this._currentElement.type);L.precacheNode(this,f),this._flags|=U.hasCachedChildNodes,this._hostParent||T.setAttributeForRoot(f),this._updateDOMProperties(null,a,e);var b=g(f);this._createInitialChildren(e,a,r,b),d=b}else{var P=this._createOpenTagMarkupAndPutListeners(e,a),C=this._createContentMarkup(e,a,r);d=!C&&G[this._tag]?P+"/>":P+">"+C+"</"+this._currentElement.type+">"}switch(this._tag){case"input":e.getReactMountReady().enqueue(l,this),a.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),a.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"select":a.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"button":a.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(s,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(H.hasOwnProperty(r))o&&a(this,r,o,e);else{r===V&&(o&&(o=this._previousStyleCopy=y({},t.style)),o=b.createMarkupForStyles(o,this));var i=null;null!=this._tag&&f(this._tag,t)?K.hasOwnProperty(r)||(i=T.createMarkupForCustomAttribute(r,o)):i=T.createMarkupForProperty(r,o),i&&(n+=" "+i)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+T.createMarkupForRoot()),n+=" "+T.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var a=W[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)r=I(a);else if(null!=i){var l=this.mountChildren(i,e,n);r=l.join("")}}return Q[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&g.queueHTML(r,o.__html);else{var a=W[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)g.queueText(r,a);else if(null!=i)for(var l=this.mountChildren(i,e,n),u=0;u<l.length;u++)g.queueChild(r,l[u])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,r){var a=t.props,i=this._currentElement.props;switch(this._tag){case"button":a=w.getHostProps(this,a),i=w.getHostProps(this,i);break;case"input":a=k.getHostProps(this,a),i=k.getHostProps(this,i);break;case"option":a=S.getHostProps(this,a),i=S.getHostProps(this,i);break;case"select":a=j.getHostProps(this,a),i=j.getHostProps(this,i);break;case"textarea":a=N.getHostProps(this,a),i=N.getHostProps(this,i)}switch(o(this,i),this._updateDOMProperties(a,i,e),this._updateDOMChildren(a,i,e,r),this._tag){case"input":k.updateWrapper(this);break;case"textarea":N.updateWrapper(this);break;case"select":e.getReactMountReady().enqueue(p,this)}},_updateDOMProperties:function(e,t,n){var r,o,i;for(r in e)if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&null!=e[r])if(r===V){var l=this._previousStyleCopy;for(o in l)l.hasOwnProperty(o)&&(i=i||{},i[o]="");this._previousStyleCopy=null}else H.hasOwnProperty(r)?e[r]&&B(this,r):f(this._tag,e)?K.hasOwnProperty(r)||T.deleteValueForAttribute(F(this),r):(P.properties[r]||P.isCustomAttribute(r))&&T.deleteValueForProperty(F(this),r);for(r in t){var u=t[r],s=r===V?this._previousStyleCopy:null!=e?e[r]:void 0;if(t.hasOwnProperty(r)&&u!==s&&(null!=u||null!=s))if(r===V)if(u?u=this._previousStyleCopy=y({},u):this._previousStyleCopy=null,s){for(o in s)!s.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(i=i||{},i[o]="");for(o in u)u.hasOwnProperty(o)&&s[o]!==u[o]&&(i=i||{},i[o]=u[o])}else i=u;else if(H.hasOwnProperty(r))u?a(this,r,u,n):s&&B(this,r);else if(f(this._tag,t))K.hasOwnProperty(r)||T.setValueForAttribute(F(this),r,u);else if(P.properties[r]||P.isCustomAttribute(r)){var c=F(this);null!=u?T.setValueForProperty(c,r,u):T.deleteValueForProperty(c,r)}}i&&b.setValueForStyles(F(this),i,this)},_updateDOMChildren:function(e,t,n,r){var o=W[typeof e.children]?e.children:null,a=W[typeof t.children]?t.children:null,i=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,l=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,u=null!=o?null:e.children,s=null!=a?null:t.children,c=null!=o||null!=i,p=null!=a||null!=l;null!=u&&null==s?this.updateChildren(null,n,r):c&&!p&&this.updateTextContent(""),null!=a?o!==a&&this.updateTextContent(""+a):null!=l?i!==l&&this.updateMarkup(""+l):null!=s&&this.updateChildren(s,n,r)},getHostNode:function(){return F(this)},unmountComponent:function(e){switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":var t=this._wrapperState.listeners;if(t)for(var n=0;n<t.length;n++)t[n].remove();break;case"html":case"head":case"body":m("66",this._tag)}this.unmountChildren(e),L.uncacheNode(this),x.deleteAllListeners(this),this._rootNodeID=0,this._domID=0,this._wrapperState=null},getPublicInstance:function(){return F(this)}},y(h.prototype,h.Mixin,R.Mixin),e.exports=h},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===o?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var o=(n(61),9);e.exports=r},function(e,t,n){"use strict";var r=n(7),o=n(21),a=n(8),i=function(e){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};r(i.prototype,{mountComponent:function(e,t,n,r){var i=n._idCounter++;this._domID=i,this._hostParent=t,this._hostContainerInfo=n;var l=" react-empty: "+this._domID+" ";if(e.useCreateElement){var u=n._ownerDocument,s=u.createComment(l);return a.precacheNode(this,s),o(s)}return e.renderToStaticMarkup?"":"<!--"+l+"-->"},receiveComponent:function(){},getHostNode:function(){return a.getNodeFromInstance(this)},unmountComponent:function(){a.uncacheNode(this)}}),e.exports=i},function(e,t,n){"use strict";var r=n(12),o=r.createFactory,a={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};e.exports=a},function(e,t){"use strict";var n={useCreateElement:!0};e.exports=n},function(e,t,n){"use strict";var r=n(39),o=n(8),a={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=a},function(e,t,n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);p.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var i=c.getNodeFromInstance(this),l=i;l.parentNode;)l=l.parentNode;for(var u=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),d=0;d<u.length;d++){var f=u[d];if(f!==i&&f.form===i.form){var h=c.getInstanceFromNode(f);h?void 0:a("90"),p.asap(r,h)}}}return n}var a=n(5),i=n(7),l=n(34),u=n(70),s=n(44),c=n(8),p=n(13),d=(n(4),n(6),{getHostProps:function(e,t){var n=s.getValue(t),r=s.getChecked(t),o=i({type:void 0,step:void 0,min:void 0,max:void 0},l.getHostProps(e,t),{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return o},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&u.setValueForProperty(c.getNodeFromInstance(e),"checked",n||!1);var r=c.getNodeFromInstance(e),o=s.getValue(t);if(null!=o){var a=""+o;a!==r.value&&(r.value=a)}else null==t.value&&null!=t.defaultValue&&(r.defaultValue=""+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(r.defaultChecked=!!t.defaultChecked)},postMountWrapper:function(e){var t=e._currentElement.props,n=c.getNodeFromInstance(e);switch(t.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":n.value="",n.value=n.defaultValue;break;default:n.value=n.value}var r=n.name;""!==r&&(n.name=""),n.defaultChecked=!n.defaultChecked,n.defaultChecked=!n.defaultChecked,""!==r&&(n.name=r)}});e.exports=d},function(e,t,n){"use strict";function r(e){var t="";return a.forEach(e,function(e){null!=e&&("string"==typeof e||"number"==typeof e?t+=e:u||(u=!0))}),t}var o=n(7),a=n(71),i=n(8),l=n(74),u=(n(6),!1),s={mountWrapper:function(e,t,n){var o=null;if(null!=n){var a=n;"optgroup"===a._tag&&(a=a._hostParent),null!=a&&"select"===a._tag&&(o=l.getSelectValueContext(a))}var i=null;if(null!=o){var u;if(u=null!=t.value?t.value+"":r(t.children),i=!1,Array.isArray(o)){for(var s=0;s<o.length;s++)if(""+o[s]===u){i=!0;break}}else i=""+o===u}e._wrapperState={selected:i}},postMountWrapper:function(e){var t=e._currentElement.props;if(null!=t.value){var n=i.getNodeFromInstance(e);n.setAttribute("value",t.value)}},getHostProps:function(e,t){var n=o({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);var a=r(t.children);return a&&(n.children=a),n}};e.exports=s},function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var a=o.text.length,i=a+r;return{start:a,end:i}}function a(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,a=t.focusNode,i=t.focusOffset,l=t.getRangeAt(0);try{l.startContainer.nodeType,l.endContainer.nodeType}catch(u){return null}var s=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),c=s?0:l.toString().length,p=l.cloneRange();p.selectNodeContents(e),p.setEnd(l.startContainer,l.startOffset);var d=r(p.startContainer,p.startOffset,p.endContainer,p.endOffset),f=d?0:p.toString().length,h=f+c,m=document.createRange();m.setStart(n,o),m.setEnd(a,i);var y=m.collapsed;return{start:y?h:f,end:y?f:h}}function i(e,t){var n,r,o=document.selection.createRange().duplicate();void 0===t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function l(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),a=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>a){var i=a;a=o,o=i}var l=s(e,o),u=s(e,a);if(l&&u){var p=document.createRange();p.setStart(l.node,l.offset),n.removeAllRanges(),o>a?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=n(9),s=n(241),c=n(90),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:a,setOffsets:p?i:l};e.exports=d},function(e,t,n){"use strict";var r=n(5),o=n(7),a=n(39),i=n(21),l=n(8),u=n(37),s=(n(4),n(61),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(s.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,a=" react-text: "+o+" ",s=" /react-text ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var c=n._ownerDocument,p=c.createComment(a),d=c.createComment(s),f=i(c.createDocumentFragment());return i.queueChild(f,i(p)),this._stringText&&i.queueChild(f,i(c.createTextNode(this._stringText))),i.queueChild(f,i(d)),l.precacheNode(this,p),this._closingComment=d,f}var h=u(this._stringText);return e.renderToStaticMarkup?h:"<!--"+a+"-->"+h+"<!--"+s+"-->"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();a.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=l.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,l.uncacheNode(this)}}),e.exports=s},function(e,t,n){"use strict";function r(){this._rootNodeID&&p.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=u.executeOnChange(t,e);return c.asap(r,this),n}var a=n(5),i=n(7),l=n(34),u=n(44),s=n(8),c=n(13),p=(n(4),n(6),{getHostProps:function(e,t){null!=t.dangerouslySetInnerHTML?a("91"):void 0;var n=i({},l.getHostProps(e,t),{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=u.getValue(t),r=n;if(null==n){var i=t.defaultValue,l=t.children;null!=l&&(null!=i?a("92"):void 0,Array.isArray(l)&&(l.length<=1?void 0:a("93"),l=l[0]),i=""+l),null==i&&(i=""),r=i}e._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=s.getNodeFromInstance(e),r=u.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=s.getNodeFromInstance(e);t.value=t.textContent}});e.exports=p},function(e,t,n){"use strict";function r(e,t){"_hostNode"in e?void 0:u("33"),"_hostNode"in t?void 0:u("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var o=0,a=t;a;a=a._hostParent)o++;for(;n-o>0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var i=n;i--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function o(e,t){"_hostNode"in e?void 0:u("35"),"_hostNode"in t?void 0:u("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function a(e){return"_hostNode"in e?void 0:u("36"),e._hostParent}function i(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=r.length;o-- >0;)t(r[o],!1,n);for(o=0;o<r.length;o++)t(r[o],!0,n)}function l(e,t,n,o,a){for(var i=e&&t?r(e,t):null,l=[];e&&e!==i;)l.push(e),e=e._hostParent;for(var u=[];t&&t!==i;)u.push(t),t=t._hostParent;var s;for(s=0;s<l.length;s++)n(l[s],!0,o);for(s=u.length;s-- >0;)n(u[s],!1,a)}var u=n(5);n(4);e.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:a,traverseTwoPhase:i,traverseEnterLeave:l}},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(7),a=n(13),i=n(30),l=n(10),u={initialize:l,close:function(){d.isBatchingUpdates=!1}},s={initialize:l,close:a.flushBatchedUpdates.bind(a)},c=[s,u];o(r.prototype,i.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,a){var i=d.isBatchingUpdates;d.isBatchingUpdates=!0,i?e(t,n,r,o,a):p.perform(e,null,t,n,r,o,a)}};e.exports=d},function(e,t,n){"use strict";function r(){T||(T=!0,v.EventEmitter.injectReactEventListener(y),v.EventPluginHub.injectEventPluginOrder(i),v.EventPluginUtils.injectComponentTree(p),v.EventPluginUtils.injectTreeTraversal(f),v.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:P,EnterLeaveEventPlugin:l,ChangeEventPlugin:a,SelectEventPlugin:_,BeforeInputEventPlugin:o}),v.HostComponent.injectGenericComponentClass(c),v.HostComponent.injectTextComponentClass(h),v.DOMProperty.injectDOMPropertyConfig(u),v.DOMProperty.injectDOMPropertyConfig(g),v.EmptyComponent.injectEmptyComponentFactory(function(e){return new d(e)}),v.Updates.injectReconcileTransaction(b),v.Updates.injectBatchingStrategy(m),v.Component.injectEnvironment(s))}var o=n(182),a=n(184),i=n(186),l=n(187),u=n(189),s=n(192),c=n(197),p=n(8),d=n(199),f=n(208),h=n(206),m=n(209),y=n(212),v=n(213),b=n(218),g=n(222),_=n(223),P=n(224),T=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=n(26),a={handleTopLevel:function(e,t,n,a){var i=o.extractEvents(e,t,n,a);r(i)}};e.exports=a},function(e,t,n){"use strict";function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t, this.ancestors=[]}function a(e){var t=f(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o=n;do e.ancestors.push(o),o=o&&r(o);while(o);for(var a=0;a<e.ancestors.length;a++)n=e.ancestors[a],m._handleTopLevel(e.topLevelType,n,e.nativeEvent,f(e.nativeEvent))}function i(e){var t=h(window);e(t)}var l=n(7),u=n(65),s=n(9),c=n(17),p=n(8),d=n(13),f=n(57),h=n(119);l(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(o,c.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:s.canUseDOM?window:null,setHandleTopLevel:function(e){m._handleTopLevel=e},setEnabled:function(e){m._enabled=!!e},isEnabled:function(){return m._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?u.listen(r,t,m.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?u.capture(r,t,m.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=i.bind(null,e);u.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(m._enabled){var n=o.getPooled(e,t);try{d.batchedUpdates(a,n)}finally{o.release(n)}}}};e.exports=m},function(e,t,n){"use strict";var r=n(22),o=n(26),a=n(42),i=n(46),l=n(72),u=n(75),s=n(35),c=n(77),p=n(13),d={Component:i.injection,Class:l.injection,DOMProperty:r.injection,EmptyComponent:u.injection,EventPluginHub:o.injection,EventPluginUtils:a.injection,EventEmitter:s.injection,HostComponent:c.injection,Updates:p.injection};e.exports=d},function(e,t,n){"use strict";var r=n(235),o=/\/?>/,a=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return a.test(e)?e:e.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(i.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};e.exports=i},function(e,t,n){"use strict";function r(e,t,n){return{type:d.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:d.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getHostNode(e),toIndex:n,afterNode:t}}function a(e,t){return{type:d.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function i(e){return{type:d.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function l(e){return{type:d.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e,t){return t&&(e=e||[],e.push(t)),e}function s(e,t){p.processChildrenUpdates(e,t)}var c=n(5),p=n(46),d=(n(28),n(11),n(80)),f=(n(18),n(23)),h=n(191),m=(n(10),n(239)),y=(n(4),{Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return h.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o,a){var i,l=0;return i=m(t,l),h.updateChildren(e,i,n,r,o,this,this._hostContainerInfo,a,l),i},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],a=0;for(var i in r)if(r.hasOwnProperty(i)){var l=r[i],u=0,s=f.mountComponent(l,t,this,this._hostContainerInfo,n,u);l._mountIndex=a++,o.push(s)}return o},updateTextContent:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[l(e)];s(this,r)},updateMarkup:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[i(e)];s(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},a=[],i=this._reconcilerUpdateChildren(r,e,a,o,t,n);if(i||r){var l,c=null,p=0,d=0,h=0,m=null;for(l in i)if(i.hasOwnProperty(l)){var y=r&&r[l],v=i[l];y===v?(c=u(c,this.moveChild(y,m,p,d)),d=Math.max(y._mountIndex,d),y._mountIndex=p):(y&&(d=Math.max(y._mountIndex,d)),c=u(c,this._mountChildAtIndex(v,a[h],m,p,t,n)),h++),p++,m=f.getHostNode(v)}for(l in o)o.hasOwnProperty(l)&&(c=u(c,this._unmountChild(r[l],o[l])));c&&s(this,c),this._renderedChildren=i}},unmountChildren:function(e){var t=this._renderedChildren;h.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex<r)return o(e,t,n)},createChild:function(e,t,n){return r(n,t,e._mountIndex)},removeChild:function(e,t){return a(e,t)},_mountChildAtIndex:function(e,t,n,r,o,a){return e._mountIndex=r,this.createChild(e,n,t)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}});e.exports=y},function(e,t,n){"use strict";var r=n(5),o=(n(4),{isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){o.isValidOwner(n)?void 0:r("119"),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){o.isValidOwner(n)?void 0:r("120");var a=n.getPublicInstance();a&&a.refs[t]===e.getPublicInstance()&&n.detachRef(t)}});e.exports=o},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||l}function o(){}var a=n(7),i=n(45),l=n(49),u=n(25);o.prototype=i.prototype,r.prototype=new o,r.prototype.constructor=r,a(r.prototype,i.prototype),r.prototype.isPureReactComponent=!0,e.exports=r},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=a.getPooled(null),this.useCreateElement=e}var o=n(7),a=n(69),i=n(17),l=n(35),u=n(78),s=(n(11),n(30)),c=n(53),p={initialize:u.getSelectionInformation,close:u.restoreSelection},d={initialize:function(){var e=l.isEnabled();return l.setEnabled(!1),e},close:function(e){l.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[p,d,f],m={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return c},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){a.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,s.Mixin,m),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):a.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):a.removeComponentAsRefFrom(t,e,n)}var a=n(216),i={};i.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},i.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t.ref!==e.ref||"string"==typeof t.ref&&t._owner!==e._owner},i.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},e.exports=i},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1,this.updateQueue=new l(this)}var o=n(7),a=n(17),i=n(30),l=(n(11),n(221)),u=[],s={enqueue:function(){}},c={getTransactionWrappers:function(){return u},getReactMountReady:function(){return s},getUpdateQueue:function(){return this.updateQueue},destructor:function(){},checkpoint:function(){},rollback:function(){}};o(r.prototype,i.Mixin,c),a.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){}var a=n(53),i=(n(30),n(6),function(){function e(t){r(this,e),this.transaction=t}return e.prototype.isMounted=function(e){return!1},e.prototype.enqueueCallback=function(e,t,n){this.transaction.isInTransaction()&&a.enqueueCallback(e,t,n)},e.prototype.enqueueForceUpdate=function(e){this.transaction.isInTransaction()?a.enqueueForceUpdate(e):o(e,"forceUpdate")},e.prototype.enqueueReplaceState=function(e,t){this.transaction.isInTransaction()?a.enqueueReplaceState(e,t):o(e,"replaceState")},e.prototype.enqueueSetState=function(e,t){this.transaction.isInTransaction()?a.enqueueSetState(e,t):o(e,"setState")},e}());e.exports=i},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},r={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(r).forEach(function(e){o.Properties[e]=0,r[e]&&(o.DOMAttributeNames[e]=r[e])}),e.exports=o},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&s.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e,t){if(P||null==b||b!==p())return null;var n=r(b);if(!_||!h(_,n)){_=n;var o=c.getPooled(v.select,g,e,t);return o.type="select",o.target=b,i.accumulateTwoPhaseDispatches(o),o}return null}var a=n(14),i=n(27),l=n(9),u=n(8),s=n(78),c=n(15),p=n(67),d=n(92),f=n(16),h=n(33),m=a.topLevelTypes,y=l.canUseDOM&&"documentMode"in document&&document.documentMode<=11,v={select:{phasedRegistrationNames:{bubbled:f({onSelect:null}),captured:f({onSelectCapture:null})},dependencies:[m.topBlur,m.topContextMenu,m.topFocus,m.topKeyDown,m.topKeyUp,m.topMouseDown,m.topMouseUp,m.topSelectionChange]}},b=null,g=null,_=null,P=!1,T=!1,C=f({onSelect:null}),x={eventTypes:v,extractEvents:function(e,t,n,r){if(!T)return null;var a=t?u.getNodeFromInstance(t):window;switch(e){case m.topFocus:(d(a)||"true"===a.contentEditable)&&(b=a,g=t,_=null);break;case m.topBlur:b=null,g=null,_=null;break;case m.topMouseDown:P=!0;break;case m.topContextMenu:case m.topMouseUp:return P=!1,o(n,r);case m.topSelectionChange:if(y)break;case m.topKeyDown:case m.topKeyUp:return o(n,r)}return null},didPutListener:function(e,t,n){t===C&&(T=!0)}};e.exports=x},function(e,t,n){"use strict";function r(e){return"."+e._rootNodeID}var o=n(5),a=n(14),i=n(65),l=n(27),u=n(8),s=n(225),c=n(226),p=n(15),d=n(229),f=n(231),h=n(36),m=n(228),y=n(232),v=n(233),b=n(29),g=n(234),_=n(10),P=n(55),T=(n(4),n(16)),C=a.topLevelTypes,x={abort:{phasedRegistrationNames:{bubbled:T({onAbort:!0}),captured:T({onAbortCapture:!0})}},animationEnd:{phasedRegistrationNames:{bubbled:T({onAnimationEnd:!0}),captured:T({onAnimationEndCapture:!0})}},animationIteration:{phasedRegistrationNames:{bubbled:T({onAnimationIteration:!0}),captured:T({onAnimationIterationCapture:!0})}},animationStart:{phasedRegistrationNames:{bubbled:T({onAnimationStart:!0}),captured:T({onAnimationStartCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:T({onBlur:!0}),captured:T({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:T({onCanPlay:!0}),captured:T({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:T({onCanPlayThrough:!0}),captured:T({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:T({onClick:!0}),captured:T({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:T({onContextMenu:!0}),captured:T({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:T({onCopy:!0}),captured:T({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:T({onCut:!0}),captured:T({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:T({onDoubleClick:!0}),captured:T({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:T({onDrag:!0}),captured:T({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:T({onDragEnd:!0}),captured:T({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:T({onDragEnter:!0}),captured:T({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:T({onDragExit:!0}),captured:T({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:T({onDragLeave:!0}),captured:T({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:T({onDragOver:!0}),captured:T({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:T({onDragStart:!0}),captured:T({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:T({onDrop:!0}),captured:T({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:T({onDurationChange:!0}),captured:T({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:T({onEmptied:!0}),captured:T({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:T({onEncrypted:!0}),captured:T({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:T({onEnded:!0}),captured:T({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:T({onError:!0}),captured:T({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:T({onFocus:!0}),captured:T({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:T({onInput:!0}),captured:T({onInputCapture:!0})}},invalid:{phasedRegistrationNames:{bubbled:T({onInvalid:!0}),captured:T({onInvalidCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:T({onKeyDown:!0}),captured:T({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:T({onKeyPress:!0}),captured:T({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:T({onKeyUp:!0}),captured:T({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:T({onLoad:!0}),captured:T({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:T({onLoadedData:!0}),captured:T({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:T({onLoadedMetadata:!0}),captured:T({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:T({onLoadStart:!0}),captured:T({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:T({onMouseDown:!0}),captured:T({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:T({onMouseMove:!0}),captured:T({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:T({onMouseOut:!0}),captured:T({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:T({onMouseOver:!0}),captured:T({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:T({onMouseUp:!0}),captured:T({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:T({onPaste:!0}),captured:T({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:T({onPause:!0}),captured:T({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:T({onPlay:!0}),captured:T({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:T({onPlaying:!0}),captured:T({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:T({onProgress:!0}),captured:T({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:T({onRateChange:!0}),captured:T({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:T({onReset:!0}),captured:T({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:T({onScroll:!0}),captured:T({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:T({onSeeked:!0}),captured:T({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:T({onSeeking:!0}),captured:T({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:T({onStalled:!0}),captured:T({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:T({onSubmit:!0}),captured:T({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:T({onSuspend:!0}),captured:T({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:T({onTimeUpdate:!0}),captured:T({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:T({onTouchCancel:!0}),captured:T({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:T({onTouchEnd:!0}),captured:T({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:T({onTouchMove:!0}),captured:T({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:T({onTouchStart:!0}),captured:T({onTouchStartCapture:!0})}},transitionEnd:{phasedRegistrationNames:{bubbled:T({onTransitionEnd:!0}),captured:T({onTransitionEndCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:T({onVolumeChange:!0}),captured:T({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:T({onWaiting:!0}),captured:T({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:T({onWheel:!0}),captured:T({onWheelCapture:!0})}}},O={topAbort:x.abort,topAnimationEnd:x.animationEnd,topAnimationIteration:x.animationIteration,topAnimationStart:x.animationStart,topBlur:x.blur,topCanPlay:x.canPlay,topCanPlayThrough:x.canPlayThrough,topClick:x.click,topContextMenu:x.contextMenu,topCopy:x.copy,topCut:x.cut,topDoubleClick:x.doubleClick,topDrag:x.drag,topDragEnd:x.dragEnd,topDragEnter:x.dragEnter,topDragExit:x.dragExit,topDragLeave:x.dragLeave,topDragOver:x.dragOver,topDragStart:x.dragStart,topDrop:x.drop,topDurationChange:x.durationChange,topEmptied:x.emptied,topEncrypted:x.encrypted,topEnded:x.ended,topError:x.error,topFocus:x.focus,topInput:x.input,topInvalid:x.invalid,topKeyDown:x.keyDown,topKeyPress:x.keyPress,topKeyUp:x.keyUp,topLoad:x.load,topLoadedData:x.loadedData,topLoadedMetadata:x.loadedMetadata,topLoadStart:x.loadStart,topMouseDown:x.mouseDown,topMouseMove:x.mouseMove,topMouseOut:x.mouseOut,topMouseOver:x.mouseOver,topMouseUp:x.mouseUp,topPaste:x.paste,topPause:x.pause,topPlay:x.play,topPlaying:x.playing,topProgress:x.progress,topRateChange:x.rateChange,topReset:x.reset,topScroll:x.scroll,topSeeked:x.seeked,topSeeking:x.seeking,topStalled:x.stalled,topSubmit:x.submit,topSuspend:x.suspend,topTimeUpdate:x.timeUpdate,topTouchCancel:x.touchCancel,topTouchEnd:x.touchEnd,topTouchMove:x.touchMove,topTouchStart:x.touchStart,topTransitionEnd:x.transitionEnd,topVolumeChange:x.volumeChange,topWaiting:x.waiting,topWheel:x.wheel};for(var E in O)O[E].dependencies=[E];var w=T({onClick:null}),M={},L={eventTypes:x,extractEvents:function(e,t,n,r){var a=O[e];if(!a)return null;var i;switch(e){case C.topAbort:case C.topCanPlay:case C.topCanPlayThrough:case C.topDurationChange:case C.topEmptied:case C.topEncrypted:case C.topEnded:case C.topError:case C.topInput:case C.topInvalid:case C.topLoad:case C.topLoadedData:case C.topLoadedMetadata:case C.topLoadStart:case C.topPause:case C.topPlay:case C.topPlaying:case C.topProgress:case C.topRateChange:case C.topReset:case C.topSeeked:case C.topSeeking:case C.topStalled:case C.topSubmit:case C.topSuspend:case C.topTimeUpdate:case C.topVolumeChange:case C.topWaiting:i=p;break;case C.topKeyPress:if(0===P(n))return null;case C.topKeyDown:case C.topKeyUp:i=f;break;case C.topBlur:case C.topFocus:i=d;break;case C.topClick:if(2===n.button)return null;case C.topContextMenu:case C.topDoubleClick:case C.topMouseDown:case C.topMouseMove:case C.topMouseOut:case C.topMouseOver:case C.topMouseUp:i=h;break;case C.topDrag:case C.topDragEnd:case C.topDragEnter:case C.topDragExit:case C.topDragLeave:case C.topDragOver:case C.topDragStart:case C.topDrop:i=m;break;case C.topTouchCancel:case C.topTouchEnd:case C.topTouchMove:case C.topTouchStart:i=y;break;case C.topAnimationEnd:case C.topAnimationIteration:case C.topAnimationStart:i=s;break;case C.topTransitionEnd:i=v;break;case C.topScroll:i=b;break;case C.topWheel:i=g;break;case C.topCopy:case C.topCut:case C.topPaste:i=c}i?void 0:o("86",e);var u=i.getPooled(a,t,n,r);return l.accumulateTwoPhaseDispatches(u),u},didPutListener:function(e,t,n){if(t===w){var o=r(e),a=u.getNodeFromInstance(e);M[o]||(M[o]=i.listen(a,"click",_))}},willDeleteListener:function(e,t){if(t===w){var n=r(e);M[n].remove(),delete M[n]}}};e.exports=L},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(15),a={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(15),a={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(15),a={data:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(36),a={dataTransfer:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(29),a={relatedTarget:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(15),a={data:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(29),a=n(55),i=n(240),l=n(56),u={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:l,charCode:function(e){return"keypress"===e.type?a(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?a(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,u),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(29),a=n(56),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:a};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(15),a={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(36),a={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,a),e.exports=r},function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0,a=e.length,i=a&-4;o<i;){for(var l=Math.min(o+4096,i);o<l;o+=4)n+=(t+=e.charCodeAt(o))+(t+=e.charCodeAt(o+1))+(t+=e.charCodeAt(o+2))+(t+=e.charCodeAt(o+3));t%=r,n%=r}for(;o<a;o++)n+=t+=e.charCodeAt(o);return t%=r,n%=r,t|n<<16}var r=65521;e.exports=n},function(e,t,n){(function(t){"use strict";function r(e,t,n,r,u,s){for(var c in e)if(e.hasOwnProperty(c)){var p;try{"function"!=typeof e[c]?o("84",r||"React class",a[n],c):void 0,p=e[c](t,c,r,n,null,i)}catch(d){p=d}if(p instanceof Error&&!(p.message in l)){l[p.message]=!0}}}var o=n(5),a=n(50),i=n(52),l=(n(4),n(6),{});e.exports=r}).call(t,n(64))},function(e,t,n){"use strict";function r(e,t,n){var r=null==t||"boolean"==typeof t||""===t;if(r)return"";var o=isNaN(t);if(o||0===t||a.hasOwnProperty(e)&&a[e])return""+t;if("string"==typeof t){t=t.trim()}return t+"px"}var o=n(68),a=(n(6),o.isUnitlessNumber);e.exports=r},function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=i.get(e);return t?(t=l(t),t?a.getNodeFromInstance(t):null):void("function"==typeof e.render?o("44"):o("45",Object.keys(e)))}var o=n(5),a=(n(18),n(8)),i=n(28),l=n(88);n(4),n(6);e.exports=r},function(e,t,n){(function(t){"use strict";function r(e,t,n,r){if(e&&"object"==typeof e){var o=e,a=void 0===o[n];a&&null!=t&&(o[n]=t)}}function o(e,t){if(null==e)return e;var n={};return a(e,r,n),n}var a=(n(43),n(60));n(6);e.exports=o}).call(t,n(64))},function(e,t,n){"use strict";function r(e){if(e.key){var t=a[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var o=n(55),a={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),a=0,i=0;o;){if(3===o.nodeType){if(i=a+o.textContent.length,a<=t&&i>=t)return{node:o,offset:t-a};a=i}o=n(r(o))}}e.exports=o},function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(l[e])return l[e];if(!i[e])return e;var t=i[e];for(var n in t)if(t.hasOwnProperty(n)&&n in u)return l[e]=t[n];return""}var a=n(9),i={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},l={},u={};a.canUseDOM&&(u=document.createElement("div").style,"AnimationEvent"in window||(delete i.animationend.animation,delete i.animationiteration.animation,delete i.animationstart.animation),"TransitionEvent"in window||delete i.transitionend.transition),e.exports=o},function(e,t,n){"use strict";function r(e){return a.isValidElement(e)?void 0:o("143"),e}var o=n(5),a=n(12);n(4);e.exports=r},function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=n(37);e.exports=r},function(e,t,n){"use strict";var r=n(79);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=n(33);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.size,r=(e.children,o(e,["size","children"])),i=t.rebass,u=a({},p.default,i),c=u.colors;return l.default.createElement(s.default,a({},r,{tagName:"img",className:"Avatar",width:n,height:n,baseStyle:{maxWidth:"none",width:n,height:n,backgroundColor:c.gray}}))};d.propTypes={size:l.default.PropTypes.number},d.defaultProps={size:48,circle:!0},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),i=r(a),l=n(2),u=r(l),s=n(3),c=r(s),p=function(e,t){var n=t.rebass,r=o({},c.default,n),a=r.fontSizes,l=r.bold,s=r.scale,p=r.colors,d={fontSize:a[6],fontWeight:l, display:"inline-flex",alignItems:"center",justifyContent:"center",width:e.circle?s[2]:null,height:s[2],paddingTop:0,paddingBottom:0,paddingLeft:e.circle?0:s[1],paddingRight:e.circle?0:s[1],overflow:"hidden",color:p.white,backgroundColor:p.default};return i.default.createElement(u.default,o({},e,{className:"Badge",inverted:!0,baseStyle:d}))};p.propTypes={theme:i.default.PropTypes.oneOf(["primary","secondary","default","info","success","warning","error"]),rounded:i.default.PropTypes.oneOfType([i.default.PropTypes.bool,i.default.PropTypes.oneOf(["top","right","bottom","left"])]),pill:i.default.PropTypes.bool,circle:i.default.PropTypes.bool},p.defaultProps={theme:"default",rounded:!0},p.contextTypes={rebass:i.default.PropTypes.object},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.align,r=e.backgroundImage,i=o(e,["align","backgroundImage"]),u=t.rebass,c=a({},p.default,u),d=c.scale,f=c.colors,h=c.fontSizes,m={left:"flex-start",center:"center",right:"flex-end"},y=m[n],v={fontSize:h[1],display:"flex",flexDirection:"column",alignItems:y,justifyContent:"center",textAlign:"center"===n?"center":null,padding:d[4],marginBottom:d[3],color:f.white,backgroundColor:f.primary,minHeight:"100vh",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:r?"url("+r+")":null};return l.default.createElement(s.default,a({},i,{className:"Banner",baseStyle:v}))};d.propTypes={align:l.default.PropTypes.oneOf(["left","center","right"]),backgroundImage:l.default.PropTypes.string},d.defaultProps={align:"center"},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.borderColor,r=e.border,i=e.borderTop,u=e.borderRight,c=e.borderBottom,d=e.borderLeft,f=o(e,["borderColor","border","borderTop","borderRight","borderBottom","borderLeft"]),h=t.rebass,m=a({},p.default,h),y=m.scale,v=m.colors;n=v[n]||n||v.primary;var b={marginTop:y[2],marginBottom:y[2],borderStyle:r?"solid":"none",borderTopStyle:i?"solid":null,borderRightStyle:u?"solid":null,borderBottomStyle:c?"solid":null,borderLeftStyle:d?"solid":null,borderWidth:4,borderColor:n};return l.default.createElement(s.default,a({},f,{className:"Block",baseStyle:b}))};d.propTypes={color:l.default.PropTypes.string,backgroundColor:l.default.PropTypes.string,borderColor:l.default.PropTypes.string,border:l.default.PropTypes.bool,borderTop:l.default.PropTypes.bool,borderRight:l.default.PropTypes.bool,borderBottom:l.default.PropTypes.bool,borderLeft:l.default.PropTypes.bool,m:l.default.PropTypes.oneOf([0,1,2,3,4]),mt:l.default.PropTypes.oneOf([0,1,2,3,4]),mr:l.default.PropTypes.oneOf([0,1,2,3,4]),mb:l.default.PropTypes.oneOf([0,1,2,3,4]),ml:l.default.PropTypes.oneOf([0,1,2,3,4]),mx:l.default.PropTypes.oneOf([0,1,2,3,4]),my:l.default.PropTypes.oneOf([0,1,2,3,4]),p:l.default.PropTypes.oneOf([0,1,2,3,4]),pt:l.default.PropTypes.oneOf([0,1,2,3,4]),pr:l.default.PropTypes.oneOf([0,1,2,3,4]),pb:l.default.PropTypes.oneOf([0,1,2,3,4]),pl:l.default.PropTypes.oneOf([0,1,2,3,4]),px:l.default.PropTypes.oneOf([0,1,2,3,4]),py:l.default.PropTypes.oneOf([0,1,2,3,4]),rounded:l.default.PropTypes.oneOfType([l.default.PropTypes.bool,l.default.PropTypes.oneOf(["top","right","bottom","left"])])},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.source,r=e.href,i=e.children,u=o(e,["source","href","children"]),c=t.rebass,d=a({},p.default,c),f=d.fontSizes,h=d.scale,m={root:{fontSize:f[3],fontStyle:"italic",margin:0,marginBottom:h[2]},p:{margin:0,marginBottom:h[1]},cite:{fontSize:f[5],fontStyle:"normal"},source:{color:"inherit"}};return l.default.createElement(s.default,a({},u,{tagName:"blockquote",className:"Blockquote",baseStyle:m.root}),l.default.createElement("p",{style:m.p},i),l.default.createElement("cite",{style:m.cite},"— ",l.default.createElement("a",{href:r,style:m.source,children:n})))};d.propTypes={source:l.default.PropTypes.string,href:l.default.PropTypes.string},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.links,r=(e.children,o(e,["links","children"])),i=t.rebass,u=a({},p.default,i),c=u.fontSizes,d=u.scale,f={root:{fontSize:c[5],display:"flex",marginBottom:d[2],alignItems:"center"},spacer:{marginLeft:".5em",marginRight:".5em"}};return l.default.createElement(s.default,a({},r,{className:"Breadcrumbs",baseStyle:f.root}),n.map(function(e,t){return l.default.createElement("div",{key:t},l.default.createElement(s.default,a({is:"a"},e,{style:{color:"inherit",textDecoration:t===n.length-1?"none":null}})),t<n.length-1&&l.default.createElement("span",{style:f.spacer},"/"))}))};d.propTypes={links:l.default.PropTypes.array.isRequired},d.defaultProps={links:[]},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(62),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.size,r=e.children,i=e.style,u=o(e,["size","children","style"]),c=t.rebass,d=a({},p.default,c),f=d.scale,h={root:a({fontSize:"inherit",width:n||f[3],height:n||f[3],padding:0,borderRadius:99999},i),inner:{display:"flex",alignItems:"center",height:"100%",justifyContent:"center"}};return l.default.createElement(s.default,a({},u,{_className:"ButtonCircle",style:h.root}),l.default.createElement("div",{style:h.inner},r))};d.propTypes={href:l.default.PropTypes.string,color:l.default.PropTypes.string,backgroundColor:l.default.PropTypes.string,size:l.default.PropTypes.number},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.width,r=o(e,["width"]),i=t.rebass,u=a({},p.default,i),c=u.scale,d=u.borderColor,f={width:n,padding:c[1],marginBottom:c[2],borderWidth:1,borderStyle:"solid",borderColor:d,overflow:"hidden"};return l.default.createElement(s.default,a({},r,{className:"Card",baseStyle:f}))};d.propTypes={width:l.default.PropTypes.oneOfType([l.default.PropTypes.number,l.default.PropTypes.string])},d.defaultProps={rounded:!0},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.src,r=(e.children,o(e,["src","children"])),i=t.rebass,u=a({},p.default,i),c=u.scale;return l.default.createElement(s.default,a({},r,{tagName:"img",className:"CardImage",src:n,baseStyle:{display:"block",width:"calc(100% + "+2*c[1]+"px)",maxWidth:"none",height:"auto",margin:-c[1],marginBottom:c[1]}}))};d.propTypes={src:l.default.PropTypes.string.isRequired},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(20),s=r(u),c=n(2),p=r(c),d=n(19),f=r(d),h=n(3),m=r(h),y=function(e,t){var n=e.label,r=e.name,i=e.checked,u=(e.children,e.backgroundColor),c=e.theme,d=e.inverted,h=e.rounded,y=e.stacked,v=e.style,b=e.m,g=e.mt,_=e.mr,P=e.mb,T=e.ml,C=e.mx,x=e.my,O=e.p,E=e.pt,w=e.pr,M=e.pb,L=e.pl,k=e.px,S=e.py,j=o(e,["label","name","checked","children","backgroundColor","theme","inverted","rounded","stacked","style","m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py"]),N=t.rebass,R=a({},m.default,N),A=R.scale,I=R.colors,D=R.borderRadius,U=j["aria-invalid"]||j.invalid,B={style:v,m:b,mt:g,mr:_,mb:P,ml:T,mx:C,my:x,p:O,pt:E,pr:w,pb:M,pl:L,px:k,py:S},F={backgroundColor:u,theme:c,inverted:d,rounded:h},z={root:{position:"relative",display:"flex",alignItems:"center",flexDirection:y?"column":null,paddingBottom:A[1],color:U?I.error:null,cursor:"pointer"},input:{position:"absolute",zIndex:-1,opacity:0},box:{display:"flex",alignItems:"center",justifyContent:"center",width:A[2],height:A[2],marginRight:y?null:A[1],marginBottom:y?A[1]:null,backgroundColor:i?"currentcolor":"transparent",borderRadius:D,borderStyle:"solid",borderWidth:2,borderColor:i?null:I.gray,transition:"background-color .1s ease-out"},icon:{display:i?null:"none",width:"75%",height:"75%",marginTop:1,fill:I.white}},H=(0,s.default)("Checkbox",{isInvalid:U,isDisabled:j.disabled,isReadonly:j.readOnly});return l.default.createElement(p.default,a({},B,{tagName:f.default,className:H,baseStyle:z.root}),l.default.createElement("input",a({},j,{name:r,type:"checkbox",checked:i,style:z.input})),l.default.createElement(p.default,a({},F,{className:"Checkbox_box",baseStyle:z.box}),l.default.createElement("svg",{viewBox:"0 0 32 32",style:z.icon},l.default.createElement("path",{d:"M1 14 L5 10 L13 18 L27 4 L31 8 L13 26 z"}))),n)};y.propTypes={label:l.default.PropTypes.string.isRequired,name:l.default.PropTypes.string.isRequired,stacked:l.default.PropTypes.bool},t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),i=r(a),l=n(2),u=r(l),s=function(e,t){t.rebass;return i.default.createElement(u.default,o({},e,{tagName:"button",className:"Close",title:"Close",baseStyle:{fontSize:"1.5em",lineHeight:1,fontWeight:"bold",margin:0,padding:0,cursor:"pointer",color:"inherit",backgroundColor:"transparent",border:0,WebkitAppearance:"none"},children:"×"}))};s.contextTypes={rebass:i.default.PropTypes.object},t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),i=r(a),l=n(2),u=r(l),s=n(3),c=r(s),p=function(e,t){var n=t.rebass,r=o({},c.default,n),a=r.scale;return i.default.createElement(u.default,o({},e,{className:"Container",baseStyle:{maxWidth:1024,paddingLeft:a[2],paddingRight:a[2],margin:"auto"}}))};p.contextTypes={rebass:i.default.PropTypes.object},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.width,r=o(e,["width"]),i=t.rebass,u=a({},p.default,i),c=u.scale,d=u.borderColor;return l.default.createElement(s.default,a({},r,{tagName:"hr",className:"Divider",baseStyle:{width:n,marginTop:c[2],marginBottom:c[2],border:0,borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:d}}))};d.propTypes={width:l.default.PropTypes.number},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d="M",f="A",h="L",m=function(e){return Math.PI*e/180},y=function(e,t,n){return e+t*Math.cos(m(n))},v=function(e,t,n){return e+t*Math.sin(m(n))},b=function(e,t,n){var r=Math.abs(e)/2,o=r,a=r-Math.abs(n),i=360*Math.abs(t%1)-90,l=t>.5?1:0,u=1===t?[f,o,o,0,0,1,r,r+o,f,o,o,0,0,1,r,r-o]:[f,o,o,0,l,1,y(r,o,i),v(r,o,i)],s=1===t?[f,a,a,0,0,0,r,r+a,f,a,a,0,0,0,r,r-a]:[f,a,a,0,l,0,r,r-a];return[d,r,r-o].concat(u,[h,y(r,a,i),v(r,a,i)],s).join(" ")},g=function(e,t){var n=Math.abs(e)/2,r=n,o=n-Math.abs(t);return[d,n,0,f,r,r,0,0,1,n,e,f,r,r,0,0,1,n,0,d,n,n-o,f,o,o,0,0,0,n,n+o,f,o,o,0,0,0,n,n-o].join(" ")},_=function(e,t){var n=e.value,r=e.size,i=e.strokeWidth,u=e.children,c=o(e,["value","size","strokeWidth","children"]),d=t.rebass,f=a({},p.default,d),h=f.bold,m="0 0 "+r+" "+r,y={root:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:r/4,fontWeight:h,lineHeight:1,width:r,height:r},svg:{position:"absolute",top:0,right:0,bottom:0,left:0,fill:"currentcolor"},bg:{opacity:1/16},percentage:{marginRight:"-.25em"},unit:{fontSize:".5em",verticalAlign:"super"}};return l.default.createElement(s.default,a({},c,{className:"Donut",baseStyle:y.root}),l.default.createElement("svg",{viewBox:m,width:r,height:r,style:y.svg},l.default.createElement("path",{d:g(r,i),style:y.bg}),l.default.createElement("path",{d:b(r,n,i)})),u,!u&&l.default.createElement("span",{style:y.percentage},Math.round(100*n),l.default.createElement("span",{style:y.unit},"%")))};_.propTypes={value:l.default.PropTypes.number,size:l.default.PropTypes.number,strokeWidth:l.default.PropTypes.number,color:l.default.PropTypes.string},_.defaultProps={value:0,size:128,strokeWidth:8,color:"primary"},_.contextTypes={rebass:l.default.PropTypes.object},t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.length,r=e.active,i=e.onClick,u=(e.children,o(e,["length","active","onClick","children"])),c=t.rebass,d=a({},p.default,c),f=d.scale,h={root:{display:"inline-flex"},button:{fontSize:16,display:"flex",alignItems:"center",justifyContent:"center",margin:0,padding:0,width:f[2],height:f[3],color:"inherit",backgroundColor:"transparent",border:0,cursor:"pointer"},dot:{width:f[1],height:f[1],margin:"auto",backgroundColor:"currentcolor",borderRadius:99999}},m=function(e){return function(t){t.preventDefault(),i(e)}},y=Array.from({length:n},function(e,t){return t});return l.default.createElement(s.default,a({},u,{className:"DotIndicator",baseStyle:h.root}),y.map(function(e){return l.default.createElement("button",{key:e,style:a({},h.button,{opacity:e!==r?.375:.875}),onClick:m(e)},l.default.createElement("div",{style:h.dot}))}))};d.propTypes={length:l.default.PropTypes.number,active:l.default.PropTypes.number,onClick:l.default.PropTypes.func},d.defaultProps={onClick:function(){}},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.open,r=e.size,i=e.position,u=e.onDismiss,c=o(e,["open","size","position","onDismiss"]),d=t.rebass,f=a({},p.default,d),h=f.scale,m=f.zIndex,y={top:{top:0,right:0,left:0},right:{top:0,right:0,bottom:0},bottom:{right:0,bottom:0,left:0},left:{top:0,bottom:0,left:0}},v=void 0,b=void 0,g=void 0;"top"===i||"bottom"===i?b=r:v=r;var _={top:"translateY(-100%)",right:"translateX(100%)",bottom:"translateY(100%)",left:"translateX(-100%)"};n||(g=_[i]);var P={dismiss:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:m[3],display:n?null:"none"},content:a({position:"fixed"},y[i],{zIndex:m[4],width:v,height:b,padding:h[2],transform:g,transition:"transform .2s ease-out",overflowX:"hidden",overflowY:"scroll"})};return l.default.createElement("div",{className:"Drawer"},l.default.createElement("div",{style:P.dismiss,onClick:u}),l.default.createElement(s.default,a({},c,{className:"Drawer Drawer_content",baseStyle:P.content})))};d.propTypes={size:l.default.PropTypes.number,open:l.default.PropTypes.bool,position:l.default.PropTypes.oneOf(["top","right","bottom","left"]),onDismiss:l.default.PropTypes.func},d.defaultProps={open:!1,size:320,position:"left",onDismiss:function(){},color:"white",backgroundColor:"default"},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),i=r(a),l=n(2),u=r(l),s=function(e){return i.default.createElement(u.default,o({},e,{className:"Dropdown",baseStyle:{position:"relative"}}))};t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(99),p=r(c),d=n(3),f=r(d),h=function(e,t){var n=e.open,r=e.right,i=e.top,u=e.children,c=e.onDismiss,d=o(e,["open","right","top","children","onDismiss"]),h=t.rebass,m=a({},f.default,h),y=m.zIndex,v={root:{display:n?null:"none",position:"absolute",left:r?"auto":0,right:r?0:"auto",top:i?"auto":"100%",bottom:i?"100%":"auto",zIndex:4},overlay:{position:"fixed",display:n?null:"none",top:0,right:0,bottom:0,left:0},content:{position:"relative",zIndex:y[1]}};return l.default.createElement(s.default,a({},d,{className:"DropdownMenu",baseStyle:v.root}),l.default.createElement("div",{style:v.overlay,onClick:c}),l.default.createElement("div",{style:v.content},l.default.createElement(p.default,a({},d,{children:u}))))};h.propTypes={open:l.default.PropTypes.bool,right:l.default.PropTypes.bool,top:l.default.PropTypes.bool,onDismiss:l.default.PropTypes.func},h.defaultProps={open:!1,onDismiss:function(){}},h.contextTypes={rebass:l.default.PropTypes.object},t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=function(e,t){var n=e.ratio,r=e.children,i=o(e,["ratio","children"]),u=(t.rebass,{style:{position:"absolute",width:"100%",height:"100%",top:0,bottom:0,left:0,border:0}}),c=l.default.Children.map(r,function(e){return l.default.cloneElement(e,u)});return l.default.createElement(s.default,a({},i,{className:"Embed",children:c,baseStyle:{position:"relative",height:0,padding:0,paddingBottom:100*n+"%",overflow:"hidden"}}))};c.propTypes={ratio:l.default.PropTypes.number},c.defaultProps={ratio:9/16},c.contextTypes={rebass:l.default.PropTypes.object},t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left,u=e.zIndex,c=o(e,["top","right","bottom","left","zIndex"]),p={position:"fixed",top:t?0:null,right:n?0:null,bottom:r?0:null,left:i?0:null,zIndex:u};return l.default.createElement(s.default,a({},c,{className:"Fixed",baseStyle:p}))};c.propTypes={top:l.default.PropTypes.bool,right:l.default.PropTypes.bool,bottom:l.default.PropTypes.bool,left:l.default.PropTypes.bool,zIndex:l.default.PropTypes.number},t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),i=r(a),l=n(2),u=r(l),s=n(3),c=r(s),p=function(e,t){var n=t.rebass,r=o({},c.default,n),a=r.scale,l=r.fontSizes,s=r.borderColor;return i.default.createElement(u.default,o({},e,{tagName:"footer",className:"Footer",baseStyle:{display:"flex",flexWrap:"wrap",alignItems:"center",marginTop:a[3],paddingTop:a[3],paddingBottom:a[3],fontSize:l[5],borderTopWidth:1,borderTopStyle:"solid",borderTopColor:s}}))};p.contextTypes={rebass:i.default.PropTypes.object},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(97),s=r(u),c=n(95),p=r(c),d=n(2),f=r(d),h=function(e,t){var n=e.label,r=e.name,i=e.value,u=e.placeholder,c=e.onChange,d=e.buttonLabel,h=e.onClick,m=o(e,["label","name","value","placeholder","onChange","buttonLabel","onClick"]),y=(t.rebass,{root:{display:"flex",alignItems:"center"},input:{flex:"1 1 auto"},button:{marginLeft:-1}});return l.default.createElement(f.default,a({},m,{tagName:"form",className:"InlineForm",baseStyle:y.root}),l.default.createElement(s.default,{name:r,label:n,value:i,placeholder:u,onChange:c,style:y.input,mb:0,hideLabel:!0,rounded:"left"}),l.default.createElement(p.default,{type:"submit",children:d,onClick:h,style:y.button,rounded:"right"}))};h.contextTypes={rebass:l.default.PropTypes.object},h.propTypes={label:l.default.PropTypes.string.isRequired,name:l.default.PropTypes.string.isRequired,value:l.default.PropTypes.oneOfType([l.default.PropTypes.number,l.default.PropTypes.string]),placeholder:l.default.PropTypes.string,onChange:l.default.PropTypes.func,buttonLabel:l.default.PropTypes.string,onClick:l.default.PropTypes.func},h.defaultProps={buttonLabel:"Go",onClick:function(){},onChange:function(){}},t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.img,r=e.right,i=e.align,u=e.children,c=o(e,["img","right","align","children"]),d=t.rebass,f=a({},p.default,d),h=f.scale,m={top:"flex-start",center:"center",bottom:"flex-end"},y=m[i];return l.default.createElement(s.default,a({},c,{className:"Media",baseStyle:{display:"flex",marginBottom:h[2],alignItems:y}}),l.default.createElement("img",{src:n,style:{flex:"none",maxWidth:"none",marginRight:r?0:h[2],marginLeft:r?h[2]:0,order:r?9999:null}}),l.default.createElement("div",{children:u}))};d.propTypes={img:l.default.PropTypes.string,right:l.default.PropTypes.bool,align:l.default.PropTypes.oneOf(["top","center","bottom"])},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),i=r(a),l=n(2),u=r(l),s=n(3),c=r(s),p=function(e,t){var n=t.rebass,r=o({},c.default,n),a=r.bold,l=r.scale;return i.default.createElement(u.default,o({},e,{className:"Message",baseStyle:{fontWeight:a,display:"flex",alignItems:"center",padding:l[2],marginBottom:l[2]}}))};p.propTypes={theme:i.default.PropTypes.oneOf(["primary","secondary","default","info","success","warning","error"])},p.defaultProps={theme:"default",inverted:!0,rounded:!0},p.contextTypes={rebass:i.default.PropTypes.object},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.small,r=o(e,["small"]),i=t.rebass,u=a({},p.default,i),c=u.fontSizes,d=u.scale,f=u.bold;return l.default.createElement(s.default,a({},r,{className:"NavItem",baseStyle:{fontSize:n?c[6]:c[5],fontWeight:f,lineHeight:"1rem",textDecoration:"none",display:"flex",alignItems:"center",alignSelf:"stretch",paddingTop:n?d[1]/2:d[1],paddingBottom:n?d[1]/2:d[1],paddingLeft:d[1],paddingRight:d[1],color:"inherit",cursor:"pointer"}}))};d.propTypes={small:l.default.PropTypes.bool,is:l.default.PropTypes.oneOfType([l.default.PropTypes.string,l.default.PropTypes.object,l.default.PropTypes.func])},d.defaultProps={is:"a"},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.open,r=e.dark,i=e.fullWidth,u=e.box,c=e.onDismiss,d=e.children,f=o(e,["open","dark","fullWidth","box","onDismiss","children"]),h=t.rebass,m=a({},p.default,h),y=m.zIndex,v=m.scale,b=m.colors,g=m.borderRadius,_={padding:v[3],backgroundColor:b.white,borderRadius:g},P={root:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:y[2],display:n?"flex":"none",flexDirection:"column",alignItems:"center",justifyContent:"center"},dismiss:{position:"fixed",top:0,right:0,bottom:0,left:0,backgroundColor:r?b.black:b.white,opacity:.875},inner:a({position:"relative",zIndex:y[1],minWidth:320,width:i?"100%":null},u?_:{})};return l.default.createElement("div",{className:"Overlay",style:P.root},l.default.createElement("div",{style:P.dismiss,onClick:c}),l.default.createElement(s.default,a({},f,{baseStyle:P.inner,children:d})))};d.propTypes={open:l.default.PropTypes.bool,dark:l.default.PropTypes.bool,box:l.default.PropTypes.bool,fullWidth:l.default.PropTypes.bool,onDismiss:l.default.PropTypes.func},d.defaultProps={open:!1,dark:!0,onDismiss:function(){}},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(63),p=r(c),d=n(24),f=r(d),h=n(3),m=r(h),y=function(e,t){var n=e.heading,r=e.description,i=e.children,u=o(e,["heading","description","children"]),c=t.rebass,d=a({},m.default,c),h=d.scale,y=d.borderColor;return l.default.createElement(s.default,a({},u,{tagName:"header",className:"PageHeader",baseStyle:{display:"flex",flexWrap:"wrap",alignItems:"center",paddingTop:h[3],paddingBottom:h[2],marginTop:h[4],marginBottom:h[4],borderBottomWidth:2,borderBottomStyle:"solid",borderColor:y}}),l.default.createElement("div",{style:{flex:"1 1 auto"}},l.default.createElement(p.default,{level:1,children:n}),r&&l.default.createElement(f.default,{children:r})),i)};y.propTypes={heading:l.default.PropTypes.string,description:l.default.PropTypes.string},y.contextTypes={rebass:l.default.PropTypes.object},t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){ var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.theme,r=e.children,i=o(e,["theme","children"]),u=t.rebass,c=a({},p.default,u),d=c.scale,f=c.colors,h=c.borderRadius,m=f[n],y=l.default.Children.map(r,function(e){return e&&e.props&&"default"===e.props.theme?l.default.cloneElement(e,{theme:n}):e});return l.default.createElement(s.default,a({},i,{className:"Panel",baseStyle:{padding:d[2],marginBottom:d[2],borderWidth:1,borderStyle:"solid",borderColor:m,borderRadius:h,backgroundColor:f.white},children:y}))};d.propTypes={theme:l.default.PropTypes.oneOf(["primary","secondary","default","info","success","warning","error"])},d.defaultProps={theme:"default"},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.theme,r=o(e,["theme"]),i=t.rebass,u=a({},p.default,i),c=u.scale,d=u.colors,f=u.borderRadius,h=u.fontSizes,m=d[n];return l.default.createElement(s.default,a({},r,{className:"PanelFooter",baseStyle:{fontSize:h[6],display:"flex",alignItems:"center",marginTop:c[2],marginRight:-c[2],marginBottom:-c[2],marginLeft:-c[2],padding:c[2],borderTopWidth:1,borderTopStyle:"solid",borderColor:m,borderRadius:"0 0 "+f+"px "+f+"px"}}))};d.propTypes={theme:l.default.PropTypes.oneOf(["primary","secondary","default","info","success","warning","error"])},d.defaultProps={theme:"default"},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),i=r(a),l=n(2),u=r(l),s=n(3),c=r(s),p=function(e,t){var n=t.rebass,r=o({},c.default,n),a=r.bold,l=r.scale,s=r.borderRadius;return i.default.createElement(u.default,o({},e,{className:"PanelHeader",inverted:!0,baseStyle:{display:"flex",alignItems:"center",fontWeight:a,marginTop:-l[2]-1,marginRight:-l[2]-1,marginLeft:-l[2]-1,marginBottom:l[2],padding:l[2],borderRadius:s+"px "+s+"px 0 0"}}))};p.propTypes={theme:i.default.PropTypes.oneOf(["primary","secondary","default","info","success","warning","error"])},p.defaultProps={theme:"default",inverted:!0},p.contextTypes={rebass:i.default.PropTypes.object},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),i=r(a),l=n(2),u=r(l),s=n(3),c=r(s),p=function(e,t){var n=t.rebass,r=o({},c.default,n),a=r.monospace,l=r.scale,s=r.borderColor;return i.default.createElement(u.default,o({},e,{tagName:"pre",className:"Pre",baseStyle:{fontFamily:a,paddingLeft:l[2],marginBottom:l[2],borderLeft:"4px solid "+s,overflowX:"scroll"}}))};p.contextTypes={rebass:i.default.PropTypes.object},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.value,r=o(e,["value"]),i=t.rebass,u=a({},p.default,i),c=u.scale,d="\n .Progress_progress::-webkit-progress-bar {\n background-color: rgba(0, 0, 0, .125);\n }\n .Progress_progress::-webkit-progress-value {\n background-color: currentcolor;\n }\n .Progress_progress::-moz-progress-bar {\n background-color: currentcolor;\n }\n ".replace(/\n/g,"").replace(/\s\s+/g," "),f={root:{marginBottom:c[2],overflow:"hidden",backgroundColor:"rgba(0, 0, 0, .125)",borderRadius:9999},progress:{display:"block",width:"100%",height:8,overflow:"hidden",border:0,WebkitAppearance:"none",appearance:"none"}};return l.default.createElement(s.default,a({},r,{className:"Progress",baseStyle:f.root}),l.default.createElement("style",{dangerouslySetInnerHTML:{__html:d}}),l.default.createElement("progress",a({},r,{className:"Progress_progress",value:n,children:n,style:f.progress})))};d.propTypes={value:l.default.PropTypes.number,color:l.default.PropTypes.string},d.defaultProps={color:"primary"},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(20),s=r(u),c=n(2),p=r(c),d=n(19),f=r(d),h=n(3),m=r(h),y=function(e,t){var n=e.label,r=e.name,i=e.checked,u=(e.children,e.backgroundColor),c=e.theme,d=e.circle,h=e.inverted,y=e.stacked,v=e.style,b=e.m,g=e.mt,_=e.mr,P=e.mb,T=e.ml,C=e.mx,x=e.my,O=e.p,E=e.pt,w=e.pr,M=e.pb,L=e.pl,k=e.px,S=e.py,j=o(e,["label","name","checked","children","backgroundColor","theme","circle","inverted","stacked","style","m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py"]),N=t.rebass,R=a({},m.default,N),A=R.scale,I=R.colors,D=j["aria-invalid"]||j.invalid,U={style:v,m:b,mt:g,mr:_,mb:P,ml:T,mx:C,my:x,p:O,pt:E,pr:w,pb:M,pl:L,px:k,py:S},B={backgroundColor:u,theme:c,circle:d,inverted:h},F={root:{position:"relative",display:"flex",alignItems:"center",flexDirection:y?"column":null,paddingBottom:A[1],color:D?I.error:null,cursor:"pointer"},input:{position:"absolute",zIndex:-1,opacity:0},dot:{width:A[2],height:A[2],marginRight:y?null:A[1],marginBottom:y?A[1]:null,backgroundColor:i?I.white:"currentcolor",borderWidth:5,borderStyle:i?"solid":null,borderColor:i?"currentcolor":null,opacity:i?null:.25,transition:"border .1s ease-out"}},z=(0,s.default)("Radio",{isInvalid:D,isDisabled:j.disabled,isReadonly:j.readOnly});return l.default.createElement(p.default,a({},U,{tagName:f.default,className:z,baseStyle:F.root}),l.default.createElement("input",a({},j,{name:r,checked:i,type:"radio",style:F.input})),l.default.createElement(p.default,a({},B,{className:"Radio_dot",baseStyle:F.dot})),n)};y.propTypes={label:l.default.PropTypes.string.isRequired,name:l.default.PropTypes.string.isRequired,stacked:l.default.PropTypes.bool},y.defaultProps={circle:!0},y.contextTypes={rebass:l.default.PropTypes.object},t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.value,r=e.onClick,i=o(e,["value","onClick"]),u=t.rebass,c=a({},p.default,u),d=c.fontSizes,f=c.colors,h=Array.from({length:5},function(e,t){return t}),m={root:{display:"inline-flex",fontSize:d[4]},star:{position:"relative",fontSize:"inherit",lineHeight:1,margin:0,marginRight:".25em",padding:".25em 0",border:0,color:"inherit",backgroundColor:"transparent",cursor:r?"pointer":null}},y=function(e){var t=e<n,r=t?null:f.gray;return{color:r}},v=function(e){var t=e<n,r=t?null:"none",o=n>e&&n<e+1?"rect(0, .5em, 1em, 0)":null;return{position:"absolute",top:".25em",left:0,display:r,clip:o}},b=function(e){return function(t){r&&r(e+1)}};return l.default.createElement(s.default,a({},i,{className:"Rating",baseStyle:m.root}),h.map(function(e){return l.default.createElement("button",{key:e,style:m.star,onClick:b(e)},l.default.createElement("span",{style:y(e)},"☆ "),l.default.createElement("span",{style:v(e)},"★"))}))};d.propTypes={value:l.default.PropTypes.number,onClick:l.default.PropTypes.func},d.defaultProps={value:0,color:"orange"},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),i=r(a),l=n(2),u=r(l),s=n(3),c=r(s),p=function(e,t){var n=t.rebass,r=o({},c.default,n),a=r.scale;return i.default.createElement(u.default,o({},e,{tagName:"section",className:"Section",baseStyle:{paddingTop:a[4],paddingBottom:a[4]}}))};p.contextTypes={rebass:i.default.PropTypes.object},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(96),p=r(c),d=n(24),f=r(d),h=n(3),m=r(h),y=function(e,t){var n=e.heading,r=e.href,i=e.description,u=e.children,c=o(e,["heading","href","description","children"]),d=t.rebass,h=a({},m.default,d),y=h.scale,v=h.borderColor;return l.default.createElement(s.default,a({},c,{tagName:"header",className:"SectionHeader",baseStyle:{display:"flex",alignItems:"center",paddingBottom:y[1],marginTop:y[3],marginBottom:y[3],borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:v}}),l.default.createElement("div",{style:{flex:"1 1 auto"}},l.default.createElement(p.default,{href:r||"#"+(n||""),children:n}),i&&l.default.createElement(f.default,{children:i})),u)};y.propTypes={heading:l.default.PropTypes.string,href:l.default.PropTypes.string,description:l.default.PropTypes.string},y.contextTypes={rebass:l.default.PropTypes.object},t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(20),s=r(u),c=n(2),p=r(c),d=n(19),f=r(d),h=n(24),m=r(h),y=n(94),v=r(y),b=n(3),g=r(b),_=function(e,t){var n=e.label,r=e.name,i=e.options,u=e.message,c=e.hideLabel,d=(e.children,e.style),h=e.m,y=e.mt,b=e.mr,_=e.mb,P=e.ml,T=e.mx,C=e.my,x=e.p,O=e.pt,E=e.pr,w=e.pb,M=e.pl,L=e.px,k=e.py,S=o(e,["label","name","options","message","hideLabel","children","style","m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py"]),j=t.rebass,N=a({},g.default,j),R=N.scale,A=N.colors,I=N.borderColor,D=S["aria-invalid"]||S.invalid,U={style:d,m:h,mt:y,mr:b,mb:_,ml:P,mx:T,my:C,p:x,pt:O,pr:E,pb:w,pl:M,px:L,py:k},B={root:{marginBottom:R[2],color:D?A.error:null},select:{fontFamily:"inherit",fontSize:"inherit",boxSizing:"border-box",display:"block",width:"100%",paddingLeft:R[1],paddingRight:R[1],height:R[3],color:"inherit",backgroundColor:"transparent",backgroundImage:"none",borderWidth:1,borderStyle:"solid",borderColor:D?A.error:I,MozAppearance:"none",WebkitAppearance:"none"},wrapper:{position:"relative"},arrow:{position:"absolute",right:0,top:0,margin:R[3]/2,transform:"translate(50%, -50%)"}},F=(0,s.default)("Select",{isInvalid:D,isDisabled:S.disabled,isReadonly:S.readOnly});return l.default.createElement(p.default,a({},U,{className:F,baseStyle:B.root}),l.default.createElement(f.default,{htmlFor:r,hide:c,children:n}),l.default.createElement("div",{style:B.wrapper},l.default.createElement(p.default,a({},S,{tagName:"select",name:r,baseStyle:B.select}),i.map(function(e,t){return l.default.createElement("option",a({key:t},e))})),l.default.createElement(v.default,{style:B.arrow})),u&&l.default.createElement(m.default,{small:!0,children:u}))};_.propTypes={label:l.default.PropTypes.string.isRequired,name:l.default.PropTypes.string.isRequired,options:l.default.PropTypes.array.isRequired,message:l.default.PropTypes.string,hideLabel:l.default.PropTypes.bool},_.defaultProps={options:[],rounded:!0},_.contextTypes={rebass:l.default.PropTypes.object},t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(100),p=r(c),d=n(3),f=r(d),h=function(e,t){var n=e.steps,r=e.active,i=e.children,u=o(e,["steps","active","children"]),c=t.rebass,d=a({},f.default,c),h=d.fontSizes,m=d.bold,y=d.colors,v=l.default.Children.map(i,function(e,t){return l.default.cloneElement(e,{width:1/i.length*100+"%",first:0===t})}),b={display:"flex",alignItems:"flex-start",justifyContent:"space-between",fontSize:h[5],fontWeight:m,color:y.gray},g=n.map(function(e,t){return l.default.createElement(p.default,a({key:t,first:0===t,width:100/n.length+"%",active:t<=r},e))});return l.default.createElement(s.default,a({},u,{children:v||g,className:"SequenceMap",baseStyle:b}))};h.contextTypes={rebass:l.default.PropTypes.object},h.propTypes={steps:l.default.PropTypes.array,active:l.default.PropTypes.number},h.defaultProps={steps:[]},h.Step=p.default,t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(19),s=r(u),c=n(2),p=r(c),d=n(3),f=r(d),h=function(e,t){var n=e.label,r=e.name,i=e.fill,u=e.hideLabel,c=(e.children,e.style),d=e.m,h=e.mt,m=e.mr,y=e.mb,v=e.ml,b=e.mx,g=e.my,_=e.p,P=e.pt,T=e.pr,C=e.pb,x=e.pl,O=e.px,E=e.py,w=o(e,["label","name","fill","hideLabel","children","style","m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py"]),M=t.rebass,L=a({},f.default,M),k=L.scale,S=w.max||100,j=w.min||0,N=(w.value-j)/(S-j)*100,R={style:c,m:d,mt:h,mr:m,mb:y,ml:v,mx:b,my:g,p:_,pt:P,pr:T,pb:C,pl:x,px:O,py:E},A="\n .Slider_input::-webkit-slider-thumb {\n width: 24px;\n height: 24px;\n background-color: currentcolor;\n border: 0;\n border-radius: 999px;\n -webkit-appearance: none;\n }\n .Slider_input::-moz-range-thumb {\n width: 24px;\n height: 24px;\n background-color: currentcolor;\n border: 0;\n border-radius: 999px;\n }\n ".replace(/\n/g,"").replace(/\s\s+/g," "),I=i?"linear-gradient(90deg, currentcolor, currentcolor "+N+"%, transparent "+N+"%)":null,D={root:{paddingBottom:k[2]},input:{boxSizing:"border-box",display:"block",width:"100%",margin:0,marginTop:k[1],cursor:"pointer",color:"inherit",backgroundColor:"rgba(0, 0, 0, 0.125)",backgroundImage:I,backgroundClip:"content-box",height:6,borderRadius:999,WebkitAppearance:"none",appearance:"none"}};return l.default.createElement(p.default,a({},R,{className:"Slider",baseStyle:D.root}),l.default.createElement("style",{dangerouslySetInnerHTML:{__html:A}}),l.default.createElement(s.default,{htmlFor:r,hide:u,children:n}),l.default.createElement("input",a({},w,{type:"range",name:r,className:"Slider_input",style:D.input})))};h.propTypes={label:l.default.PropTypes.string.isRequired,name:l.default.PropTypes.string.isRequired,fill:l.default.PropTypes.bool,hideLabel:l.default.PropTypes.bool},h.contextTypes={rebass:l.default.PropTypes.object},t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.x,r=e.auto,i=(e.children,o(e,["x","auto","children"])),u=t.rebass,c=a({},p.default,u),d=c.scale;return l.default.createElement(s.default,a({},i,{className:"Space",baseStyle:{display:"inline-block",flex:r?"1 1 auto":null,width:d[n]}}))};d.propTypes={x:l.default.PropTypes.oneOf([1,2,3,4]),auto:l.default.PropTypes.bool},d.defaultProps={x:1},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.value,r=e.label,i=e.unit,u=e.topLabel,c=o(e,["value","label","unit","topLabel"]),d=t.rebass,f=a({},p.default,d),h=f.fontSizes,m=f.bold,y=f.scale,v={root:{display:"inline-block"},value:{fontSize:h[0],letterSpace:"-.125em",fontWeight:m,lineHeight:1,marginTop:u?y[1]/2:null,marginBottom:u?null:y[1]/2},unit:{fontSize:h[3]},label:{fontSize:h[6],fontWeight:m,lineHeight:1}};return l.default.createElement(s.default,a({},c,{className:"Stat",baseStyle:v.root}),u&&l.default.createElement("div",{style:v.label},r),l.default.createElement("div",{style:v.value},n,i&&l.default.createElement("span",{style:v.unit},i)),!u&&l.default.createElement("div",{style:v.label},r))};d.propTypes={value:l.default.PropTypes.oneOfType([l.default.PropTypes.number,l.default.PropTypes.string]),unit:l.default.PropTypes.string,label:l.default.PropTypes.string,topLabel:l.default.PropTypes.bool},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.checked,r=o(e,["checked"]),i=t.rebass,u=a({},p.default,i),c=u.scale,d=u.colors,f=u.borderColor,h=n?d.success:f,m=n?"translateX("+.5*c[3]+"px)":"translateX(0)",y={root:{display:"inline-flex",width:1.5*c[3],height:c[3],color:h,backgroundColor:n?"currentcolor":null,borderRadius:99999,boxShadow:"inset 0 0 0 2px",cursor:"pointer"},dot:{width:c[3],height:c[3],transitionProperty:"transform, color",transitionDuration:".1s",transitionTimingFunction:"ease-out",transform:m,boxShadow:"inset 0 0 0 2px",borderRadius:99999,color:h,backgroundColor:d.white}};return l.default.createElement(s.default,a({},r,{className:"Switch",role:"checkbox","aria-checked":n,baseStyle:y.root}),l.default.createElement("div",{style:y.dot}))};d.propTypes={checked:l.default.PropTypes.bool},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.headings,r=e.data,i=o(e,["headings","data"]),u=t.rebass,c=a({},p.default,u),d=c.fontSizes,f=c.scale,h=c.borderColor,m={root:{maxWidth:"100%",overflowX:"scroll",marginBottom:f[2],borderColor:h},table:{fontSize:d[5],lineHeight:1.25,borderCollapse:"separate",borderSpacing:0,width:"100%"},thead:{},tbody:{},tr:{},th:{textAlign:"left",verticalAlign:"bottom",padding:f[1],paddingLeft:0,borderBottomStyle:"solid",borderBottomWidth:2,borderColor:"inherit"},td:{padding:f[1],paddingLeft:0,borderBottomStyle:"solid",borderBottomWidth:1,borderColor:"inherit"}};return l.default.createElement(s.default,a({},i,{className:"Table",baseStyle:m.root}),l.default.createElement("table",{style:m.table},l.default.createElement("thead",{style:m.thead},l.default.createElement("tr",{style:m.tr},n.map(function(e,t){return l.default.createElement("th",{key:t,style:m.th,children:e})}))),l.default.createElement("tbody",{style:m.tbody},r.map(function(e,t){return l.default.createElement("tr",{key:t,style:m.tr},e.map(function(e,t){return l.default.createElement("td",{key:t,style:m.td,children:e})}))}))))};d.propTypes={headings:l.default.PropTypes.array,data:l.default.PropTypes.arrayOf(l.default.PropTypes.array)},d.defaultProps={headings:[],data:[]},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(20),s=r(u),c=n(2),p=r(c),d=n(19),f=r(d),h=n(24),m=r(h),y=n(3),v=r(y),b=function(e,t){var n=e.label,r=e.name,i=e.message,u=e.hideLabel,c=(e.children,e.style),d=e.m,h=e.mt,y=e.mr,b=e.mb,g=e.ml,_=e.mx,P=e.my,T=e.p,C=e.pt,x=e.pr,O=e.pb,E=e.pl,w=e.px,M=e.py,L=o(e,["label","name","message","hideLabel","children","style","m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py"]),k=t.rebass,S=a({},v.default,k),j=S.scale,N=S.colors,R=S.borderColor,A=L["aria-invalid"]||L.invalid,I={style:c,m:d,mt:h,mr:y,mb:b,ml:g,mx:_,my:P,p:T,pt:C,pr:x,pb:O,pl:E,px:w,py:M},D={root:{marginBottom:j[2],color:A?N.error:null},textarea:{fontFamily:"inherit",fontSize:"inherit",boxSizing:"border-box",display:"block",width:"100%",padding:j[1],borderWidth:1,borderStyles:"solid",borderColor:R}},U=(0,s.default)("Textarea",{isInvalid:A,isDisabled:L.disabled,isReadonly:L.readOnly});return l.default.createElement(p.default,a({},I,{className:U,baseStyle:D.root}),l.default.createElement(f.default,{htmlFor:r,hide:u,children:n}),l.default.createElement(p.default,a({},L,{tagName:"textarea",name:r,baseStyle:D.textarea})),i&&l.default.createElement(m.default,{small:!0,children:i}))};b.propTypes={label:l.default.PropTypes.string.isRequired,name:l.default.PropTypes.string.isRequired,message:l.default.PropTypes.string,hideLabel:l.default.PropTypes.bool},b.defaultProps={rounded:!0},b.contextTypes={rebass:l.default.PropTypes.object},t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),i=r(a),l=n(2),u=r(l),s=n(3),c=r(s),p=function(e,t){var n=t.rebass,r=o({},c.default,n),a=r.scale,l=r.colors;return i.default.createElement(u.default,o({},e,{className:"Toolbar",baseStyle:{display:"flex",alignItems:"center",minHeight:48,paddingLeft:a[1],paddingRight:a[1],color:l.white,backgroundColor:l.primary}}))};p.contextTypes={rebass:i.default.PropTypes.object},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),l=r(i),u=n(2),s=r(u),c=n(3),p=r(c),d=function(e,t){var n=e.title,r=e.children,i=o(e,["title","children"]),u=t.rebass,c=a({},p.default,u),d=c.fontSizes,f=c.scale,h=c.colors,m="\n .Tooltip_box { display: none }\n .Tooltip:hover .Tooltip_box { display: block }\n ".replace(/\n/g,"").replace(/\s\s+/g," "),y={root:{position:"relative",display:"inline-block",cursor:"pointer"},box:{position:"absolute",bottom:"100%",left:"50%",fontSize:d[6],whiteSpace:"nowrap",paddingTop:f[1]/2,paddingBottom:f[1]/2,paddingLeft:f[1],paddingRight:f[1],color:h.white,backgroundColor:h.black,transform:"translate(-50%, -8px)"},arrow:{position:"absolute",top:"100%",left:"50%",border:"6px solid transparent",borderTopColor:h.black,transform:"translate(-50%, 0)"}};return l.default.createElement("span",{className:"Tooltip","aria-label":n,style:y.root},l.default.createElement("style",{dangerouslySetInnerHTML:{__html:m}}),l.default.createElement(s.default,a({},i,{baseStyle:y.box,className:"Tooltip Tooltip_box"}),n,l.default.createElement("div",{className:"Tooltip_arrow",style:y.arrow})),r)};d.propTypes={title:l.default.PropTypes.string},d.defaultProps={inverted:!0,rounded:!0},d.contextTypes={rebass:l.default.PropTypes.object},t.default=d},function(e,t){"use strict";function n(e,t,n){t=t||{};var r=e||{},o=r.color,a=r.backgroundColor,i=r.theme,l=r.inverted,u={};if(o&&t[o]?u.color=t[o]:"string"==typeof o&&(u.color=o),a&&t[a]?u.backgroundColor=t[a]:"string"==typeof a&&(u.backgroundColor=a),i&&t[i]){var s=n&&n.inverted;l?(u.color=s||t.white,u.backgroundColor=t[i]):u.color=t[i]}return u}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=t||[],r=e||{},o=r.m,a=r.mx,i=r.my,s=r.mt,c=r.mr,p=r.mb,d=r.ml,f=(0,l.default)({},u("margin",o,n),u("marginTop",s,n),u("marginBottom",p,n),u("marginTop",i,n),u("marginBottom",i,n),u("marginLeft",d,n),u("marginRight",c,n),u("marginLeft",a,n),u("marginRight",a,n));return f}Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),l=r(i),u=function(e,t,n){return"number"==typeof t?o({},e,n[t]):null};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=t||[],r=e||{},o=r.p,a=r.px,i=r.py,s=r.pt,c=r.pr,p=r.pb,d=r.pl,f=(0,l.default)({},u("padding",o,n),u("paddingTop",s,n),u("paddingBottom",p,n),u("paddingTop",i,n),u("paddingBottom",i,n),u("paddingLeft",d,n),u("paddingRight",c,n),u("paddingLeft",a,n),u("paddingRight",a,n));return f}Object.defineProperty(t,"__esModule",{value:!0});var i=n(7),l=r(i),u=function(e,t,n){return"number"==typeof t?o({},e,n[t]):null};t.default=a},function(e,t){"use strict";function n(e){var t=arguments.length<=1||void 0===arguments[1]?2:arguments[1],n=e||{},r=n.rounded,o=n.pill,a=n.circle,i=void 0;if(r===!0?i=t:r===!1&&(i=0),"string"==typeof r){var l={top:t+"px "+t+"px 0 0",right:"0 "+t+"px "+t+"px 0",bottom:"0 0 "+t+"px "+t+"px",left:t+"px 0 0 "+t+"px"};i=l[r]||null}return(o||a)&&(i=99999),"undefined"==typeof i?{}:{borderRadius:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t){(function(t){"use strict";function n(e){l.length||(i(),u=!0),l[l.length]=e}function r(){for(;s<l.length;){var e=s;if(s+=1,l[e].call(),s>c){for(var t=0,n=l.length-s;t<n;t++)l[t]=l[t+s];l.length-=s,s=0}}l.length=0,s=0,u=!1}function o(e){var t=1,n=new d(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}function a(e){return function(){function t(){clearTimeout(n),clearInterval(r),e()}var n=setTimeout(t,0),r=setInterval(t,50)}}e.exports=n;var i,l=[],u=!1,s=0,c=1024,p="undefined"!=typeof t?t:self,d=p.MutationObserver||p.WebKitMutationObserver;i="function"==typeof d?o(r):a(r),n.requestFlush=i,n.makeRequestCallFromTimer=a}).call(t,function(){return this}())},function(e,t){},298,function(e,t,n){"use strict";function r(e){var t=new o(o._61);return t._81=1,t._65=e,t}var o=n(101);e.exports=o;var a=r(!0),i=r(!1),l=r(null),u=r(void 0),s=r(0),c=r("");o.resolve=function(e){if(e instanceof o)return e;if(null===e)return l;if(void 0===e)return u;if(e===!0)return a;if(e===!1)return i;if(0===e)return s;if(""===e)return c;if("object"==typeof e||"function"==typeof e)try{var t=e.then;if("function"==typeof t)return new o(t.bind(e))}catch(n){return new o(function(e,t){t(n)})}return r(e)},o.all=function(e){var t=Array.prototype.slice.call(e);return new o(function(e,n){function r(i,l){if(l&&("object"==typeof l||"function"==typeof l)){if(l instanceof o&&l.then===o.prototype.then){for(;3===l._81;)l=l._65;return 1===l._81?r(i,l._65):(2===l._81&&n(l._65),void l.then(function(e){r(i,e)},n))}var u=l.then;if("function"==typeof u){var s=new o(u.bind(l));return void s.then(function(e){r(i,e)},n)}}t[i]=l,0===--a&&e(t)}if(0===t.length)return e([]);for(var a=t.length,i=0;i<t.length;i++)r(i,t[i])})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){e.forEach(function(e){o.resolve(e).then(t,n)})})},o.prototype.catch=function(e){return this.then(null,e)}},function(e,t,n){"use strict";function r(){s=!1,l._10=null,l._97=null}function o(e){function t(t){(e.allRejections||i(p[t].error,e.whitelist||u))&&(p[t].displayId=c++,e.onUnhandled?(p[t].logged=!0,e.onUnhandled(p[t].displayId,p[t].error)):(p[t].logged=!0,a(p[t].displayId,p[t].error)))}function n(t){p[t].logged&&(e.onHandled?e.onHandled(p[t].displayId,p[t].error):p[t].onUnhandled||(console.warn("Promise Rejection Handled (id: "+p[t].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+p[t].displayId+".")))}e=e||{},s&&r(),s=!0;var o=0,c=0,p={};l._10=function(e){2===e._81&&p[e._72]&&(p[e._72].logged?n(e._72):clearTimeout(p[e._72].timeout),delete p[e._72])},l._97=function(e,n){0===e._45&&(e._72=o++,p[e._72]={displayId:null,error:n,timeout:setTimeout(t.bind(null,e._72),i(n,u)?100:2e3),logged:!1})}}function a(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):");var n=(t&&(t.stack||t))+"";n.split("\n").forEach(function(e){console.warn(" "+e)})}function i(e,t){return t.some(function(t){return e instanceof t})}var l=n(101),u=[ReferenceError,TypeError,RangeError],s=!1;t.disable=r,t.enable=o},function(e,t){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return m.iterable&&(t[Symbol.iterator]=function(){ return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function a(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function i(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function l(e){var t=new FileReader;return t.readAsArrayBuffer(e),i(t)}function u(e){var t=new FileReader;return t.readAsText(e),i(t)}function s(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(m.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(m.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(e){if(!m.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob?(this.blob=function(){var e=a(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(l)},this.text=function(){var e=a(this);if(e)return e;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=a(this);return e?e:Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e){var t=e.toUpperCase();return y.indexOf(t)>-1?t:e}function p(e,t){t=t||{};var n=t.body;if(p.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=c(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function f(e){var t=new o,n=(e.getAllResponseHeaders()||"").trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),o=n.join(":").trim();t.append(r,o)}),t}function h(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var m={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];o||(o=[],this.map[e]=o),o.push(r)},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},o.prototype.getAll=function(e){return this.map[t(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},m.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this)},s.call(p.prototype),s.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];h.redirect=function(e,t){if(v.indexOf(t)===-1)throw new RangeError("Invalid status code");return new h(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=p,e.Response=h,e.fetch=function(e,t){return new Promise(function(n,r){function o(){return"responseURL"in i?i.responseURL:/^X-Request-URL:/m.test(i.getAllResponseHeaders())?i.getResponseHeader("X-Request-URL"):void 0}var a;a=p.prototype.isPrototypeOf(e)&&!t?e:new p(e,t);var i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:f(i),url:o()},t="response"in i?i.response:i.responseText;n(new h(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(a.method,a.url,!0),"include"===a.credentials&&(i.withCredentials=!0),"responseType"in i&&m.blob&&(i.responseType="blob"),a.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"==typeof a._bodyInit?null:a._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,n){"undefined"==typeof Promise&&(n(301).enable(),window.Promise=n(300)),n(302)}])); //# sourceMappingURL=indoqa-rebass-theme-docs-176105abcfbd036b5060.js.map
// This file is generated R_addrs_0 = [ [], [] ] Dwr.ScriptLoaded('dwr_db_R_addrs_0.js');
'use strict'; const express = require('express'); const path = require('path'); const middleware = require('./middleware'); const routes = require('./routes'); const app = express(); app.use(function(req, res, next) { res.header("Access-Control-Allow-Origin", "*"); res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); res.header("Access-Control-Allow-Methods", "GET, PUT, POST, OPTIONS"); next(); }); app.use(middleware.morgan('dev')); app.use(middleware.cookieParser()); app.use(middleware.bodyParser.urlencoded({extended: false})); app.use(middleware.bodyParser.json()); app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'ejs'); app.use(middleware.auth.session); app.use(middleware.passport.initialize()); app.use(middleware.passport.session()); app.use(middleware.flash()); app.use(express.static(path.join(__dirname, '../public'))); app.use('/api', routes.api); app.use('/', routes.auth); module.exports = app;
/* Copyright 2018 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ const express = require('express'); const app = express(); const bodyParser = require('body-parser') const multer = require('multer'); const port = 5000; app.use((req, res, next) => { res.setHeader('Content-Type', 'text/plain') // enable CORS res.set('Access-Control-Allow-Origin', '*'); res.set('Access-Control-Allow-Methods', 'POST, GET, OPTIONS'); res.set('Access-Control-Allow-Headers', 'X-CUSTOM, Content-Type'); next(); }) const upload = multer(); const formParser = upload.fields([]); const jsonParser = bodyParser.json(); const textParser = bodyParser.text(); app.post('/', [formParser, jsonParser, textParser], (req, res) => { res.write(JSON.stringify(req.headers, null, 2)) res.write('\n\n') const contentType = req.get('content-type'); if (contentType.includes('text/plain')) { res.write(req.body) } if (contentType.includes('application/json') || contentType.includes('multipart/form-data')) { res.write(JSON.stringify(req.body, null, 2)) } res.end() }); const server = app.listen(port, () => { const host = server.address().address; const port = server.address().port; console.log('App listening at http://%s:%s', host, port); });
// npm pack <pkg> // Packs the specified package into a .tgz file, which can then // be installed. module.exports = pack var npm = require("./npm.js") , install = require("./install.js") , cache = require("./cache.js") , fs = require("graceful-fs") , chain = require("slide").chain , path = require("path") , cwd = process.cwd() , writeStream = require('fs-write-stream-atomic') pack.usage = "npm pack <pkg>" // if it can be installed, it can be packed. pack.completion = install.completion function pack (args, silent, cb) { if (typeof cb !== "function") cb = silent, silent = false if (args.length === 0) args = ["."] chain(args.map(function (arg) { return function (cb) { pack_(arg, cb) }}), function (er, files) { if (er || silent) return cb(er, files) printFiles(files, cb) }) } function printFiles (files, cb) { files = files.map(function (file) { return path.relative(cwd, file) }) console.log(files.join("\n")) cb() } // add to cache, then cp to the cwd function pack_ (pkg, cb) { cache.add(pkg, null, null, false, function (er, data) { if (er) return cb(er) var name = data.name // scoped packages get special treatment if (name[0] === "@") name = name.substr(1).replace(/\//g, "-") var fname = name + "-" + data.version + ".tgz" , cached = path.resolve( npm.cache , data.name , data.version , "package.tgz" ) , from = fs.createReadStream(cached) , to = writeStream(fname) , errState = null from.on("error", cb_) to.on("error", cb_) to.on("close", cb_) from.pipe(to) function cb_ (er) { if (errState) return if (er) return cb(errState = er) cb(null, fname) } }) }
/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @fileoverview Polyfills to bring the server's partial JavaScript * implementation to include some features of JavaScript 6. * @author fraser@google.com (Neil Fraser) */ // Global objects. var WeakMap = new 'WeakMap'; (function() { // Hack to work around restriction that the 'new hack' only works on // literal strings. Note name must not contain any double quotes or // backslashes, because we have no easy way to escape them yet! var builtin = function(name) { return eval('new "' + name + '"'); }; var classes = ['WeakMap']; // Prototypes of global constructors. for (var i = 0; i < classes.length; i++) { var constructor = builtin(classes[i]); Object.defineProperty(constructor, 'prototype', { configurable: false, enumerable: false, writable: false, value: builtin(classes[i] + '.prototype') }); Object.defineProperty(constructor.prototype, 'constructor', { configurable: true, enumerable: false, writable: true, value: constructor }); } // Struct is a list of tuples: // [Object, 'Object', [static methods], [instance methods]] var struct = [ [Object, 'Object', ['is', 'setPrototypeOf'], []], [String, 'String', [], ['endsWith', 'includes', 'repeat', 'startsWith']], [Number, 'Number', ['isFinite', 'isInteger', 'isNaN', 'isSafeInteger'], []], [Math, 'Math', ['acosh', 'asinh', 'atanh', 'cbrt', 'clz32', 'cosh', 'expm1', 'fround', 'hypot', 'imul', 'log10', 'log1p', 'log2', 'sign', 'sinh', 'tanh', 'trunc'], []], [WeakMap, 'WeakMap', [], ['delete', 'get', 'has', 'set']], ]; for (var i = 0; i < struct.length; i++) { var obj = struct[i][0]; var objName = struct[i][1]; var staticMethods = struct[i][2]; var instanceMethods = struct[i][3]; for (var j = 0; j < staticMethods.length; j++) { var member = staticMethods[j]; Object.defineProperty(obj, member, {configurable: true, enumerable: false, writable: true, value: builtin(objName + '.' + member)}); } for (var j = 0; j < instanceMethods.length; j++) { var member = instanceMethods[j]; Object.defineProperty(obj.prototype, member, {configurable: true, enumerable: false, writable: true, value: builtin(objName + '.prototype.' + member)}); } } })(); /////////////////////////////////////////////////////////////////////////////// // Array constructor polyfills /////////////////////////////////////////////////////////////////////////////// Array.from = function(arrayLike/*, mapFn, thisArg */) { // Polyfill adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from // The length property of the from method is 1. var isCallable = function (fn) { return typeof fn === 'function' || Object.prototype.toString.call(fn) === '[object Function]'; }; var toInteger = function (value) { var number = Number(value); if (isNaN(number)) { return 0; } if (number === 0 || !isFinite(number)) { return number; } return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number)); }; var toLength = function (value) { var len = toInteger(value); return Math.min(Math.max(len, 0), Number.MAX_SAFE_INTEGER); }; // 1. Let C be the this value. var C = this; // 2. Let items be ToObject(arrayLike). var items = Object(arrayLike); // 3. ReturnIfAbrupt(items). if (arrayLike == null) { throw new TypeError('Array.from requires an array-like object - not null or undefined'); } // 4. If mapfn is undefined, then let mapping be false. var mapFn = arguments.length > 1 ? arguments[1] : void undefined; var T; if (typeof mapFn !== 'undefined') { // 5. else // 5. a If IsCallable(mapfn) is false, throw a TypeError exception. if (!isCallable(mapFn)) { throw new TypeError('Array.from: when provided, the second argument must be a function'); } // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined. if (arguments.length > 2) { T = arguments[2]; } } // 10. Let lenValue be Get(items, "length"). // 11. Let len be ToLength(lenValue). var len = toLength(items.length); // 13. If IsConstructor(C) is true, then // 13. a. Let A be the result of calling the [[Construct]] internal method // of C with an argument list containing the single item len. // 14. a. Else, Let A be ArrayCreate(len). var A = isCallable(C) ? Object(new C(len)) : new Array(len); // 16. Let k be 0. var k = 0; // 17. Repeat, while k < len… (also steps a - h) var kValue; while (k < len) { kValue = items[k]; if (mapFn) { A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k); } else { A[k] = kValue; } k += 1; } // 18. Let putStatus be Put(A, "length", len, true). A.length = len; // 20. Return A. return A; }; Object.defineProperty(Array, 'from', {enumerable: false}); /////////////////////////////////////////////////////////////////////////////// // Array.prototype polyfills /////////////////////////////////////////////////////////////////////////////// Array.prototype.find = function(callback/*, thisArg*/) { // Polyfill copied from: // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/find if (this === null || this === undefined) { throw new TypeError('Array.prototype.find called on ' + this); } else if (typeof callback !== 'function') { throw new TypeError('callback is type ' + typeof callback + ', not type function'); } var o = Object(this); var len = o.length >>> 0; var thisArg = arguments[1]; for (var k = 0; k < len; k++) { var kValue = o[k]; if (callback.call(thisArg, kValue, k, o)) { return kValue; } } return undefined; }; Object.defineProperty(Array.prototype, 'find', {enumerable: false}); Array.prototype.findIndex = function(callback/*, thisArg*/) { // Polyfill copied from: // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex if (this === null || this === undefined) { throw new TypeError('Array.prototype.findIndex called on ' + this); } else if (typeof callback !== 'function') { throw new TypeError('callback is type ' + typeof callback + ', not type function'); } var o = Object(this); var len = o.length >>> 0; var thisArg = arguments[1]; for (var k = 0; k < len; k++) { var kValue = o[k]; if (callback.call(thisArg, kValue, k, o)) { return k; } } return -1; }; Object.defineProperty(Array.prototype, 'findIndex', {enumerable: false}); (function() { function toInteger(value) { var number = Number(value); if (isNaN(number)) { return 0; } else if (number === 0 || !isFinite(number)) { return number; } return Math.trunc(number); } function toLength(value) { var len = toInteger(value); if (len <= 0) { return 0; } return Math.min(len, Number.MAX_SAFE_INTEGER); // Handles len === Infinity. } // For cycle detection in array to string and error conversion; see // spec bug github.com/tc39/ecma262/issues/289. var visited = []; Array.prototype.join = function(separator) { // This implements Array.prototype.join from ES6 §22.1.3.12, with // the addition of cycle detection as discussed in // https://github.com/tc39/ecma262/issues/289. // // The only difference from the ES5 version of the spec is that // .length is normalised using the specification function // ToLength rather than ToUint32. // // Variable names reflect those in the spec. // // N.B. This function is defined in a closure! var isObj = (typeof this === 'object' || typeof this === 'function') && this !== null; if (isObj) { if (visited.indexOf(this) !== -1) { return ''; } visited.push(this); } try { // TODO(cpcallen): setPerms(callerPerms()); var len = toLength(this.length); var sep = (separator === undefined) ? ',' : String(separator); if (!len) { return ''; } var r = ''; for (var k = 0; k < len; k++) { if (k > 0) { r += sep; } var element = this[k]; if (element !== undefined && element !== null) { r += String(element); } } return r; } finally { if (isObj) { visited.pop(); } } }; })(); Object.defineProperty(Array.prototype, 'join', {enumerable: false}); /////////////////////////////////////////////////////////////////////////////// // Number polyfills /////////////////////////////////////////////////////////////////////////////// Object.defineProperty(Number, 'EPSILON', {configurable: false, enumerable: false, writable: false, value: Math.pow(2, -52)}); Object.defineProperty(Number, 'MAX_SAFE_INTEGER', {configurable: false, enumerable: false, writable: false, // Fortunately 2**53 is also safe as long as you don't increment it!: value: Math.pow(2, 53) - 1 }); Object.defineProperty(Number, 'MIN_SAFE_INTEGER', {configurable: false, enumerable: false, writable: false, value: -Number.MAX_SAFE_INTEGER});
/** * Version: 1.0 Alpha-1 * Build Date: 13-Nov-2007 * Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved. * License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/. * Website: http://www.datejs.com/ or http://www.coolite.com/datejs/ */ Date.CultureInfo={timeUnitNamePrefixes:{week:"wk", quarter:"Q", half:"H"},name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}} return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}} return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}} return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);} if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;} var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);} if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);} if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);} if(x.hour||x.hours){this.addHours(x.hour||x.hours);} if(x.month||x.months){this.addMonths(x.month||x.months);} if(x.year||x.years){this.addYears(x.year||x.years);} if(x.day||x.days){this.addDays(x.day||x.days);} return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");} return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;} if(!x.second&&x.second!==0){x.second=-1;} if(!x.minute&&x.minute!==0){x.minute=-1;} if(!x.hour&&x.hour!==0){x.hour=-1;} if(!x.day&&x.day!==0){x.day=-1;} if(!x.month&&x.month!==0){x.month=-1;} if(!x.year&&x.year!==0){x.year=-1;} if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());} if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());} if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());} if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());} if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());} if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());} if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());} if(x.timezone){this.setTimezone(x.timezone);} if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);} return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;} var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}} return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];}; /* FIX: Joel - Date.prototype._toString=Date.prototype.toString; */ if(Date.prototype._toString==undefined) {Date.prototype._toString=Date.prototype.toString;} /*end Fix*/ Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();}; Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;} return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);} var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;} return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);} var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";} return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}}; (function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;} break;} return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];} rx.push(r[0]);s=r[1];} return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];} return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];} throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));} return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;} if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;} try{r=(px[i].call(this,s));}catch(e){r=null;} if(r){return r;}} throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;} try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);} rx.push(r[0]);s=r[1];} return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];} return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;} rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;} s=q[1];} if(!r){throw new $P.Exception(s);} if(q){throw new $P.Exception(q[1]);} if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}} return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;} rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;} if(!last&&q[1].length===0){last=true;} if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}} p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}} if(rx[1].length<best[1].length){best=rx;} if(best[1].length===0){break;}} if(best[0].length===0){return best;} if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);} best[1]=q[1];} return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);} return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];} if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);} var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}} return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}} this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");} var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});} return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;} for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}} if(this.now){return new Date();} var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);} if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;} if(!this.unit){this.unit="day";} if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;} if(this.unit=="week"){this.unit="day";this.value=this.value*7;} this[this.unit+"s"]=this.value*orient;} return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;} if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();} if(this.month&&!this.day){this.day=1;} return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));} fn=_C[keys]=_.any.apply(null,px);} return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));} return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){} return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;} try{r=Date.Grammar.start.call({},s);}catch(e){return null;} return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;} return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(React.createElement(React.Fragment, null, React.createElement("path", { d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 9h10.5v3.5H4V9zm0 5.5h10.5V18H5c-.55 0-1-.45-1-1v-2.5zM19 18h-2.5V9H20v8c0 .55-.45 1-1 1z" })), 'WebRounded');
/** * Created by vcernomschi on 5/16/16. */ 'use strict' import path from 'path'; import fs from 'fs'; import os from 'os'; import fsExtra from 'fs-extra'; import syncExec from 'sync-exec'; import AWS from 'aws-sdk'; import S3CoverageSynchronizer from './S3CoverageSynchronizer'; import GitHubMsgPublisher from './GitHubMsgPublisher'; import CoverageComparator from './CoverageComparator'; /** * */ export class GitDiffWalker { /** * @returns {String} * @constructor */ static get TARGET_BRANCH() { console.log('TRAVIS_BRANCH: ', process.env['TRAVIS_BRANCH']) return process.env['TRAVIS_BRANCH']; } /** * @returns {String} * @constructor */ static get CMD() { return (process.env['PR_MERGE'] === 'true') ? 'git diff --name-only @~..@' : `git diff --name-only ${GitDiffWalker.TARGET_BRANCH}`; } /** * @returns {String} * @constructor */ static get NONE() { return 'none'; } /** * @returns {String} * @constructor */ static get FULL_CI_RUN() { return '[ci full]'; } /** * @returns {String} * @constructor */ static get SRC() { return 'src'; } /** * @returns {String} * @constructor */ static get FRONTEND_MICROAPP_PATHS() { return 'FRONTEND_MICROAPP_PATHS'; } /** * @returns {String} * @constructor */ static get BACKEND_MICROAPP_PATHS() { return 'BACKEND_MICROAPP_PATHS'; } /** * @returns {String} * @constructor */ static get BACKEND_MICROAPP_IDENTIFIERS() { return 'BACKEND_MICROAPP_IDENTIFIERS'; } /** * @returns {String} * @constructor */ static get CI_FULL() { return 'CI_FULL'; } /** * @returns {String} * @constructor */ static get IS_SKIP_TESTS() { return 'IS_SKIP_TESTS'; } /** * @returns {String} * @constructor */ static get DEEPKG_JSON() { return 'deepkg.json'; } /** * @returns {String} * @constructor */ static get CWD() { return path.join(__dirname, '../../..'); } /** * @returns {String} * @constructor */ static get VARS_SHELL_PATH() { return path.join(__dirname, '../_vars.sh'); } static removeDuplicates() { let result = []; for (let i = 0; i < arguments.length; i++) { let _argument = arguments[i].toString().split(','); for (let j = 0; j < _argument.length; j++) { if (result.indexOf(_argument[j]) === -1) { result.push(_argument[j]); } } } return result.join(','); } /** * @returns {String} * @constructor */ static get TEST_PATHS_TPL() { let content = []; content.push('#!\/bin\/bash'); content.push(''); content.push(`${GitDiffWalker.FRONTEND_MICROAPP_PATHS}="{frontendMicroAppPaths}"`); content.push(`${GitDiffWalker.BACKEND_MICROAPP_PATHS}="{backendMicroAppPaths}"`); content.push(`${GitDiffWalker.BACKEND_MICROAPP_IDENTIFIERS}="{backendMicroAppIdentifiers}"`); content.push(`${GitDiffWalker.CI_FULL}="{ciFull}"`); content.push(`${GitDiffWalker.IS_SKIP_TESTS}="{isSkipTests}"`); content.push(''); return content.join(os.EOL); } /** * @returns {String} */ static get commitMessage() { return process.env['TRAVIS_COMMIT_MESSAGE']; } /** * @returns {String} */ static getAllChangedFiles() { console.log(`Run command: ${GitDiffWalker.CMD} for cwd: ${GitDiffWalker.CWD}`); let result = syncExec(GitDiffWalker.CMD, { cwd: GitDiffWalker.CWD, }); console.log('Changed files: ', result.stdout.toString().trim()); return (parseInt(result.status) !== 0) ? `Command '${GitDiffWalker.CMD}' failed in '${GitDiffWalker.CWD}' with exit code ${result.status}` : result.stdout.toString().trim(); } getAllMicroAppPath(srcPath) { if (!CoverageComparator.accessSync(srcPath)) { return []; } return fs.readdirSync(srcPath).filter(function (file) { return GitDiffWalker.getFullPath(fs.statSync(path.join(srcPath, file)).isDirectory()); }); } /** * */ constructor() { this._files = GitDiffWalker.getAllChangedFiles().split('\n'); this._allMicroAppPaths = this.getAllMicroAppPaths(path.join(__dirname, '../../..', GitDiffWalker.SRC)); this._allMicroAppIdentifiers = this.getAllMicroAppIdentifiers(); this.getBackendMicroAppPaths(); this.getBackendTestMicroAppPaths(); this.getBackendCodeMicroAppPaths(); this.getFrontendMicroAppPaths(); } /** * @returns {String[]} */ get files() { return this._files; } /** * @returns {String[]} */ getFullPath(name) { return path.join(__dirname, '../../..', GitDiffWalker.SRC, name); } /** * @param srcpath * @returns {String[]} */ getAllMicroAppPaths(srcPath) { if (!CoverageComparator.accessSync(srcPath)) { return []; } return fs.readdirSync(srcPath).filter((file) => { return fs.statSync(path.join(srcPath, file)).isDirectory(); }); } /** * Get changed microapplication identifiers from deepkg.json where were changed code or backend tests * @returns {String[]} */ getAllMicroAppIdentifiers() { let indentifiers = []; for (let microAppPath of this._allMicroAppPaths) { let microAppFullPath = this.getFullPath(microAppPath); if (!CoverageComparator.accessSync(microAppFullPath)) { continue; } let content = fsExtra.readJsonSync( path.join(microAppFullPath, GitDiffWalker.DEEPKG_JSON), {throws: false} ); indentifiers.push(content.identifier); } return indentifiers; } /** * @returns {boolean} */ get isSkipTests() { let re = /^(?!src\/).+|(.+\/docs\/.+)/i; for (let file of this.files) { if (!re.test(file)) { return false; } } return true; } /** * Check is full CI without for PR and !PR when coverage exists in S3 * @returns {boolean} */ static get isFullCIRunSync() { return ((typeof process.env['MAJOR_VERSIONS'] !== 'undefined' && process.env['MAJOR_VERSIONS'].indexOf(GitDiffWalker.TARGET_BRANCH) > -1) || (typeof GitDiffWalker.commitMessage !== 'undefined' && GitDiffWalker.commitMessage.indexOf(GitDiffWalker.FULL_CI_RUN) > -1)); } /** * Returns as first argument in callback boolean result if is full ci * @param {Function} callback */ isFullCIRun(callback) { if (GitHubMsgPublisher.isPullRequest) { callback(GitDiffWalker.isFullCIRunSync); } else { let params = { Bucket: S3CoverageSynchronizer.BUCKET_NAME, Key: `${S3CoverageSynchronizer.REPORT_PREFIX}summary-report/coverage-summary.json`, }; let s3 = new AWS.S3({}); s3.headObject(params, function (err) { if (err) { callback(true); } else { callback(GitDiffWalker.isFullCIRunSync); } }); } } /** * @returns {boolean} */ get isFrontedCodeChanged() { let testsRe = /^src\/(.+)\/tests\/frontend\/.+$/i; let re = /^src\/(.+)\/frontend\/.+$/i; for (let file of this.files) { if (!testsRe.test(file) && re.test(file)) { return true; } } return false; } /** * @returns {boolean} */ get isFrontendTestsChanged() { let re = /^src\/(.+)\/tests\/frontend\/.+$/i; for (let file of this.files) { if (re.test(file)) { return true; } } return false; } /** * @returns {boolean} */ get isBackendTestsChanged() { let re = /^src\/(.+)\/tests\/backend\/.+$/i; for (let file of this.files) { if (re.test(file)) { return true; } } return false; } /** * @returns {boolean} */ get isBackendCodeChanged() { let testsRe = /^src\/(.+)\/tests\/backend\/.+$/i; let re = /^src\/(.+)\/(backend|data)\/.+$/i; for (let file of this.files) { if (!testsRe.test(file) && re.test(file)) { return true; } } return false; } /** * Get changed microapplication paths where were changed frontend * @returns {String[]} */ getFrontendMicroAppPaths() { let re = /^src\/(.+)\/frontend\/.+$/i; let paths = []; for (let file of this.files) { if (re.test(file)) { let fullPath = this.getFullPath(file.replace(re, '$1').replace(/(\/|\\).+/, '')); if (paths.indexOf(fullPath) === -1) { paths.push(fullPath); } } } this._frontendMicroAppPaths = paths; return paths; } /** * Get changed microapplication paths where were changed frontend * @returns {String[]} */ getFrontendMicroAppNames() { let names = []; for (let file of this._frontendMicroAppPaths) { names.push(file.substring(file.lastIndexOf(path.sep) + 1)); } this._frontendMicroAppNames = names; return names; } /** * Get changed microapplication paths where were changed backend code or backend tests * @returns {String[]} */ getBackendMicroAppPaths() { let re = /^src\/(.+)\/(backend|data)\/.+$/i; let paths = []; for (let file of this.files) { if (re.test(file)) { let fullPath = this.getFullPath(file.replace(re, '$1').replace(/(\/|\\).+/, '')); if (paths.indexOf(fullPath) === -1) { paths.push(fullPath); } } } this._backendMicroAppPaths = paths; return paths; } /** * Get changed microapplication paths where were changed only backend tests * @returns {String[]} */ getBackendTestMicroAppPaths() { let re = /^src\/(.+)\/tests\/backend\/.+$/i; let paths = []; for (let file of this.files) { if (re.test(file)) { let fullPath = this.getFullPath(file.replace(re, '$1').replace(/(\/|\\).+/, '')); if (paths.indexOf(fullPath) === -1) { paths.push(fullPath); } } } this._backendTestMicroAppPaths = paths; return paths; } /** * Get changed microapplication paths where were changed only backend code * @returns {String[]} */ getBackendCodeMicroAppPaths() { let testsRe = /^src\/(.+)\/tests\/backend\/.+$/i; let re = /^src\/(.+)\/(backend|data)\/.+$/i; let paths = []; for (let file of this.files) { if (!testsRe.test(file) && re.test(file)) { let fullPath = this.getFullPath(file.replace(re, '$1').replace(/(\/|\\).+/, '')); if (paths.indexOf(fullPath) === -1) { paths.push(fullPath); } } } this._backendCodeMicroAppPaths = paths; return paths; } /** * Get changed microapplication identifiers from deepkg.json where were changed code or backend tests * @returns {String[]} */ getBackendMicroAppIdentifiers() { let indentifiers = []; let microAppPaths = this._backendMicroAppPaths; for (let microAppPath of microAppPaths) { let microAppFullPath = this.getFullPath(microAppPath); if (!CoverageComparator.accessSync(microAppFullPath)) { continue; } let content = fsExtra.readJsonSync( path.join(microAppFullPath, GitDiffWalker.DEEPKG_JSON), {throws: false} ); indentifiers.push(content.identifier); } this._backendMicroAppIdentifiers = indentifiers; return indentifiers; } /** * Get changed microapplication names where were changed backend code or backend tests * @returns {String[]} */ getBackendMicroAppNames() { let names = []; for (let file of this._backendMicroAppPaths) { names.push(file.substring(file.lastIndexOf(path.sep) + 1)); } this._backendMicroAppNames = names; return names; } /** * Get changed microapplication names where were changed backend code * @returns {String[]} */ getBackendCodeMicroAppNames() { let names = []; for (let file of this._backendCodeMicroAppPaths) { names.push(file.substring(file.lastIndexOf(path.sep) + 1)); } this._backendCodeMicroAppNames = names; return names; } /** * Get changed microapplication names where were changed backend tests * @returns {String[]} */ getBackendTestMicroAppNames() { let names = []; for (let file of this._backendTestMicroAppPaths) { names.push(file.substring(file.lastIndexOf(path.sep) + 1)); } this._backendTestMicroAppNames = names; return names; } setTestPaths() { let backendMicroAppPaths = GitDiffWalker.NONE; let frontendMicroAppPaths = GitDiffWalker.NONE; let backendMicroAppIdentifiers = GitDiffWalker.NONE; if (this.isFrontedCodeChanged || this.isFrontendTestsChanged) { frontendMicroAppPaths = this.getFrontendMicroAppNames(); } if (this.isBackendTestsChanged || this.isBackendCodeChanged) { backendMicroAppPaths = this.getBackendMicroAppNames(); //changes backend code and frontend, need to remove duplicates if (this.isBackendCodeChanged && typeof this._frontendMicroAppNames !== 'undefined' && this._frontendMicroAppNames.length > 0) { frontendMicroAppPaths = GitDiffWalker.removeDuplicates( this.getFrontendMicroAppNames(), this.getBackendCodeMicroAppNames() ); } else if (this.isBackendCodeChanged) { frontendMicroAppPaths = this.getBackendCodeMicroAppNames(); } backendMicroAppIdentifiers = this.getBackendMicroAppIdentifiers(); } this.isFullCIRun((isFullCIRun) => { if (isFullCIRun) { frontendMicroAppPaths = backendMicroAppPaths = this._allMicroAppPaths; backendMicroAppIdentifiers = this._allMicroAppIdentifiers; } let varsContent = GitDiffWalker.TEST_PATHS_TPL .replace(/\{frontendMicroAppPaths\}/g, frontendMicroAppPaths) .replace(/\{backendMicroAppPaths\}/g, backendMicroAppPaths) .replace(/\{backendMicroAppIdentifiers\}/g, backendMicroAppIdentifiers) .replace(/\{ciFull\}/g, isFullCIRun) .replace(/\{isSkipTests\}/g, `${this.isSkipTests && !isFullCIRun}`); fsExtra.writeFileSync(GitDiffWalker.VARS_SHELL_PATH, varsContent, 'utf8'); console.log("TRAVIS_COMMIT_MESSAGE: ", GitDiffWalker.commitMessage); console.log(`isFullCIRun: ${isFullCIRun}`); console.log(`isSkipTests: ${this.isSkipTests && !isFullCIRun}`); console.log(`isFrontedCodeChanged: ${this.isFrontedCodeChanged}`); console.log(`isFrontendTestsChanged: ${this.isFrontendTestsChanged}`); console.log(`isBackendCodeChanged: ${this.isBackendCodeChanged}`); console.log(`isBackendTestsChanged: ${this.isBackendTestsChanged}`); console.log(`frontend paths: ${this.getFrontendMicroAppPaths()}`); console.log(`frontend names: ${this.getFrontendMicroAppNames()}`); console.log(`backend all paths: ${this.getBackendMicroAppPaths()}`); console.log(`backend tests paths: ${this.getBackendTestMicroAppPaths()}`); console.log(`backend code paths: ${this.getBackendCodeMicroAppPaths()}`); console.log(`backend identifiers: ${this.getBackendMicroAppIdentifiers()}`); console.log(`backend all names: ${this.getBackendMicroAppNames()}`); console.log(`backend tests names: ${this.getBackendTestMicroAppNames()}`); console.log(`backend code names: ${this.getBackendCodeMicroAppNames()}`); }); } } let walker = new GitDiffWalker(); walker.setTestPaths();
"use strict"; import "babel/polyfill"; import Knex from "knex"; export default function(api) { return { pool: { live: () => { var pool = api.bookshelf.knex.client.pool || { live: false }; pool = pool.live === undefined ? false : pool.live; return pool; } }, db: { version() { return api.bookshelf.knex.migrate.currentVersion(); }, rollback() { return api.bookshelf.knex.migrate.rollback(); }, migrate: { make(name) { if (name === null) { return Promise.reject("The file name is required."); } return api.bookshelf.knex.migrate.make(name); }, run() { return api.bookshelf.knex.migrate.latest(); } }, seed: { make(name) { if (name === null) { return Promise.reject("The file name is required."); } return api.bookshelf.knex.seed.make(name); }, run() { return api.bookshelf.knex.seed.run(); } }, create() { var _knex, config, knex, sql; knex = api.bookshelf.knex; sql = "create database " + api.config.bookshelf.connection.database; switch (api.config.bookshelf.client) { case "sqlite": case "sqlite3": return Promise.resolve(); case "pg": case "postgres": case "postgresql": sql += " template template0"; config = JSON.parse(JSON.stringify(api.config.bookshelf)); config.connection.database = "template1"; // 別のDBに接続後、データベースを作成 _knex = Knex(config); return _knex.raw(sql).then(_knex.destroy); case "mysql": case "mysql2": case "maria": // Only MariaDB error case "mariadb": // Error: No database selected case "mariasql": // https://github.com/tgriesser/bookshelf/issues/415 config = JSON.parse(JSON.stringify(api.config.bookshelf)); config.connection.database = "information_schema"; // 別のDBに接続後、データベースを作成 _knex = Knex(config); return _knex.raw(sql).then(_knex.destroy); default: return knex.raw(sql); }; }, drop() { var _knex, config, knex, sql; knex = api.bookshelf.knex; sql = "drop database " + api.config.bookshelf.connection.database; switch (api.config.bookshelf.client) { case "sqlite": case "sqlite3": // TODO: remove file return Promise.resolve(); case "pg": case "postgres": case "postgresql": config = JSON.parse(JSON.stringify(api.config.bookshelf)); config.connection.database = "template1"; // 別のDBに接続後、データベースを削除 _knex = Knex(config); return knex.destroy().then(() => { return _knex.raw(sql).then(_knex.destroy); }); case "mysql": case "mysql2": case "maria": case "mariadb": case "mariasql": config = JSON.parse(JSON.stringify(api.config.bookshelf)); config.connection.database = "information_schema"; // 別のDBに接続後、データベースを削除 _knex = Knex(config); return knex.destroy().then(() => { return _knex.raw(sql).then(_knex.destroy); }); default: return knex.raw(sql); }; } } }; };
/* ------------------------------------------------------------------------------ * * # NoUI Sliders * * Demo JS code for extra_sliders_noui.html page * * ---------------------------------------------------------------------------- */ // Setup module // ------------------------------ var NouiSlider = function() { // // Setup module components // // NoUI slider examples var _componentNouiSlider = function() { if (typeof noUiSlider == 'undefined') { console.warn('Warning - nouislider.min.js is not loaded.'); return; } // Handles // ------------------------------ // Setup var slider_handles = document.getElementById('noui-slider-handles'); noUiSlider.create(slider_handles, { start: [40, 80], range: { 'min': [20], 'max': [100] }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Display values var slider_handles_vals = [ document.getElementById('noui-handles-lower-val'), document.getElementById('noui-handles-upper-val') ]; slider_handles.noUiSlider.on('update', function( values, handle ) { slider_handles_vals[handle].innerHTML = values[handle]; }); // Ranges // ------------------------------ // Setup var slider_range = document.getElementById('noui-slider-range'); noUiSlider.create(slider_range, { start: [60], range: { 'min': [20], 'max': [100] }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Display values var slider_range_val = document.getElementById('noui-range-val'); slider_range.noUiSlider.on('update', function( values, handle ) { slider_range_val.innerHTML = values[handle]; }); // Stepping // ------------------------------ // Setup var slider_stepping = document.getElementById('noui-slider-stepping'); noUiSlider.create(slider_stepping, { start: [40], step: 10, range: { 'min': [20], 'max': [100] }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Display values var slider_stepping_val = document.getElementById('noui-stepping-val'); slider_stepping.noUiSlider.on('update', function( values, handle ) { slider_stepping_val.innerHTML = values[handle]; }); // Non-linear slider // ------------------------------ // Define element var slider_nonlinear = document.getElementById('noui-slider-nonlinear'); // Create slider noUiSlider.create(slider_nonlinear, { start: [ 40 ], range: { 'min': [ 20 ], '30%': [ 40 ], '70%': [ 80 ], 'max': [ 100 ] }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define element for values var slider_nonlinear_val = document.getElementById('noui-nonlinear-val'); // Show the value for the *last* moved handle. slider_nonlinear.noUiSlider.on('update', function( values, handle ) { slider_nonlinear_val.innerHTML = values[handle]; }); // Non-linear stepping // ------------------------------ // Define element var slider_nonlinear_step = document.getElementById('noui-slider-nonlinear-stepping'); // Create slider noUiSlider.create(slider_nonlinear_step, { start: [ 5, 40 ], range: { 'min': [ 0 ], '10%': [ 5, 5 ], '50%': [ 40, 10 ], 'max': [ 100 ] }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_nonlinear_step_vals = [ document.getElementById('noui-nonlinear-stepping-lower-val'), document.getElementById('noui-nonlinear-stepping-upper-val') ]; // Show the values slider_nonlinear_step.noUiSlider.on('update', function( values, handle ) { slider_nonlinear_step_vals[handle].innerHTML = values[handle]; }); // Snapping between steps // ------------------------------ // Define element var slider_nonlinear_snap = document.getElementById('noui-slider-snapping'); // Create slider noUiSlider.create(slider_nonlinear_snap, { start: [50, 800], snap: true, connect: true, range: { 'min': 0, '10%': 50, '20%': 100, '30%': 150, '40%': 500, '50%': 800, 'max': 1000 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_nonlinear_snap_vals = [ document.getElementById('noui-slider-snapping-lower-val'), document.getElementById('noui-slider-snapping-upper-val') ]; // Show the values slider_nonlinear_snap.noUiSlider.on('update', function( values, handle ) { slider_nonlinear_snap_vals[handle].innerHTML = values[handle]; }); // Behaviours // ------------------------------ // // Slider behaviour // // Define element slider_behaviour = document.getElementById('noui-slider-behaviour'); // Create slider noUiSlider.create(slider_behaviour, { start: [ 40, 60 ], step: 10, behaviour: 'drag', connect: true, range: { 'min': 20, 'max': 80 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_behaviour_vals = [ document.getElementById('noui-slider-behaviour-lower-val'), document.getElementById('noui-slider-behaviour-upper-val') ]; // Show the values slider_behaviour.noUiSlider.on('update', function( values, handle ) { slider_behaviour_vals[handle].innerHTML = values[handle]; }); // // Tap behaviour // // Define element slider_tap_behaviour = document.getElementById('noui-slider-tap'); // Create slider noUiSlider.create(slider_tap_behaviour, { start: 40, behaviour: 'tap', connect: 'upper', range: { 'min': 20, 'max': 80 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_tap_behaviour_val = document.getElementById('noui-slider-tap-val'); // Show the values slider_tap_behaviour.noUiSlider.on('update', function( values, handle ) { slider_tap_behaviour_val.innerHTML = values[handle]; }); // // Drag behaviour // // Define element var slider_drag_behaviour = document.getElementById('noui-slider-drag'); // Create slider noUiSlider.create(slider_drag_behaviour, { start: [ 40, 60 ], behaviour: 'drag', connect: true, range: { 'min': 20, 'max': 80 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_drag_behaviour_vals = [ document.getElementById('noui-slider-drag-lower-val'), document.getElementById('noui-slider-drag-upper-val') ]; // Show the values slider_drag_behaviour.noUiSlider.on('update', function( values, handle ) { slider_drag_behaviour_vals[handle].innerHTML = values[handle]; }); // // Fixed dragging // // Define element slider_drag_fixed = document.getElementById('noui-slider-drag-fixed'); // Create slider noUiSlider.create(slider_drag_fixed, { start: [ 40, 60 ], behaviour: 'drag-fixed', connect: true, range: { 'min': 20, 'max': 80 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_drag_fixed_vals = [ document.getElementById('noui-slider-fixed-lower-val'), document.getElementById('noui-slider-fixed-upper-val') ]; // Show the values slider_drag_fixed.noUiSlider.on('update', function( values, handle ) { slider_drag_fixed_vals[handle].innerHTML = values[handle]; }); // // Snap behaviour // // Define element slider_snap_behaviour = document.getElementById('noui-slider-snap'); // Create slider noUiSlider.create(slider_snap_behaviour, { start: 40, behaviour: 'snap', connect: 'lower', range: { 'min': 20, 'max': 80 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_snap_behaviour_val = document.getElementById('noui-slider-snap-val'); // Show the values slider_snap_behaviour.noUiSlider.on('update', function( values, handle ) { slider_snap_behaviour_val.innerHTML = values[handle]; }); // // Combined options // // Define element slider_combined = document.getElementById('noui-slider-combined'); // Create slider noUiSlider.create(slider_combined, { start: [ 40, 60 ], behaviour: 'drag-tap', connect: true, range: { 'min': 20, 'max': 80 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_combined_vals = [ document.getElementById('noui-slider-combined-lower-val'), document.getElementById('noui-slider-combined-upper-val') ]; // Show the values slider_combined.noUiSlider.on('update', function( values, handle ) { slider_combined_vals[handle].innerHTML = values[handle]; }); // Other examples // ------------------------------ // // Tooltip // // Define element var slider_tooltip = document.getElementById('noui-slider-tooltip'); // Create slider noUiSlider.create(slider_tooltip, { start: [20, 80], tooltips: true, connect: true, range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_tooltip_vals = [ document.getElementById('noui-slider-tooltip-lower-val'), document.getElementById('noui-slider-tooltip-upper-val') ]; // Show the values slider_tooltip.noUiSlider.on('update', function( values, handle ) { slider_tooltip_vals[handle].innerHTML = values[handle]; }); // // Set minimum handles distance // // Define element var slider_margin = document.getElementById('noui-slider-margin'); // Create slider noUiSlider.create(slider_margin, { start: [ 20, 80 ], connect: true, margin: 30, range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_margin_vals = [ document.getElementById('noui-slider-margin-lower-val'), document.getElementById('noui-slider-margin-upper-val') ]; // Show the values slider_margin.noUiSlider.on('update', function( values, handle ) { slider_margin_vals[handle].innerHTML = values[handle]; }); // // RTL direction // // Define element var slider_direction = document.getElementById('noui-slider-direction'); // Create slider noUiSlider.create(slider_direction, { start: 20, direction: 'rtl', connect: 'lower', range: { 'min': 0, 'max': 100 } }); // Define elements for values var slider_direction_val = document.getElementById('noui-slider-direction-val'); // Show the values slider_direction.noUiSlider.on('update', function( values, handle ) { slider_direction_val.innerHTML = values[handle]; }); // // Connect lower side // // Define element var slider_connect_lower = document.getElementById('noui-slider-connect-lower'); // Create slider noUiSlider.create(slider_connect_lower, { start: 40, connect: 'lower', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_connect_lower_val = document.getElementById('noui-slider-connect-lower-val'); // Show the values slider_connect_lower.noUiSlider.on('update', function( values, handle ) { slider_connect_lower_val.innerHTML = values[handle]; }); // // Skip certain steps // // Define element var slider_skip = document.getElementById('noui-slider-skip-steps'); // Create slider noUiSlider.create(slider_skip, { range: { 'min': 0, '10%': 10, '20%': 20, '30%': 30, // Nope, 40 is no fun. '50%': 50, '60%': 60, '70%': 70, // I never liked 80. '90%': 90, 'max': 100 }, snap: true, connect: true, start: [20, 70], direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_skip_vals = [ document.getElementById('noui-slider-skip-lower-val'), document.getElementById('noui-slider-skip-upper-val') ]; // Show the values slider_skip.noUiSlider.on('update', function( values, handle ) { slider_skip_vals[handle].innerHTML = values[handle]; }); // // Connect upper side // // Define element var slider_connect_upper = document.getElementById('noui-slider-connect-upper'); // Create slider noUiSlider.create(slider_connect_upper, { start: 40, connect: 'upper', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Define elements for values var slider_connect_upper_val = document.getElementById('noui-slider-connect-upper-val'); // Show the values slider_connect_upper.noUiSlider.on('update', function( values, handle ) { slider_connect_upper_val.innerHTML = values[handle]; }); // Sliders with pips // ------------------------------ // Demo data for ranges var range_all_sliders = { 'min': [ 0 ], '10%': [ 5, 5 ], '50%': [ 40, 10 ], 'max': [ 100 ] }; // // Range slider pips // // Define element var pips_range = document.getElementById('noui-slider-pips-range'); // Create slider noUiSlider.create(pips_range, { range: range_all_sliders, start: 40, connect: 'lower', pips: { mode: 'range', density: 3 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // // Filtered pips // // Filter pips function filter500(value, type) { return value % 10 ? 2 : 1; } // Define element var pips_filter = document.getElementById('noui-slider-pips-filter'); // Create slider noUiSlider.create(pips_filter, { range: range_all_sliders, start: 40, connect: 'lower', pips: { mode: 'steps', density: 2, filter: filter500 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // // RTL version // // Define element pips_rtl = document.getElementById('noui-slider-pips-rtl'); // Create slider noUiSlider.create(pips_rtl, { range: range_all_sliders, start: 60, connect: 'lower', direction: 'rtl', pips: { mode: 'range', density: 3 } }); // // Positions mode // // Define element var pips_positions = document.getElementById('noui-slider-pips-positions'); // Create slider noUiSlider.create(pips_positions, { range: range_all_sliders, start: 18, connect: 'upper', pips: { mode: 'positions', values: [0,25,50,75,100], density: 4 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // // Count mode // // Define element var pips_count = document.getElementById('noui-slider-pips-count'); // Create slider noUiSlider.create(pips_count, { range: range_all_sliders, start: 20, connect: 'upper', pips: { mode: 'count', values: 6, density: 4 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // // Values mode // // Define element var pips_values = document.getElementById('noui-slider-pips-values'); // Create slider noUiSlider.create(pips_values, { range: range_all_sliders, start: 40, connect: 'upper', pips: { mode: 'values', values: [1, 10, 26, 57, 79, 99], density: 4 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Vertical sliders // ------------------------------ // // Basic examples // // First var slider_vertical_1 = document.getElementById('noui-slider-values1'); noUiSlider.create(slider_vertical_1, { start: 20, orientation: 'vertical', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Second var slider_vertical_2 = document.getElementById('noui-slider-values2'); noUiSlider.create(slider_vertical_2, { start: 40, orientation: 'vertical', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Third var slider_vertical_3 = document.getElementById('noui-slider-values3'); noUiSlider.create(slider_vertical_3, { start: 60, orientation: 'vertical', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Fourth var slider_vertical_4 = document.getElementById('noui-slider-values4'); noUiSlider.create(slider_vertical_4, { start: 80, orientation: 'vertical', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // // Connect to upper side // // First var slider_vertical_upper_1 = document.getElementById('noui-slider-upper1'); noUiSlider.create(slider_vertical_upper_1, { start: 20, orientation: 'vertical', connect: 'upper', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Second var slider_vertical_upper_2 = document.getElementById('noui-slider-upper2'); noUiSlider.create(slider_vertical_upper_2, { start: 40, orientation: 'vertical', connect: 'upper', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Third var slider_vertical_upper_3 = document.getElementById('noui-slider-upper3'); noUiSlider.create(slider_vertical_upper_3, { start: 60, orientation: 'vertical', connect: 'upper', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Fourth var slider_vertical_upper_4 = document.getElementById('noui-slider-upper4'); noUiSlider.create(slider_vertical_upper_4, { start: 80, orientation: 'vertical', connect: 'upper', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // // Connect to lower side // // First var slider_vertical_lower_1 = document.getElementById('noui-slider-lower1'); noUiSlider.create(slider_vertical_lower_1, { start: 20, orientation: 'vertical', connect: 'lower', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Second var slider_vertical_lower_2 = document.getElementById('noui-slider-lower2'); noUiSlider.create(slider_vertical_lower_2, { start: 40, orientation: 'vertical', connect: 'lower', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Third var slider_vertical_lower_3 = document.getElementById('noui-slider-lower3'); noUiSlider.create(slider_vertical_lower_3, { start: 60, orientation: 'vertical', connect: 'lower', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Fourth var slider_vertical_lower_4 = document.getElementById('noui-slider-lower4'); noUiSlider.create(slider_vertical_lower_4, { start: 80, orientation: 'vertical', connect: 'lower', range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // // Vertical range // // First var slider_range_1 = document.getElementById('noui-slider-range1'); noUiSlider.create(slider_range_1, { start: [ 15, 85 ], orientation: 'vertical', connect: true, range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Second var slider_range_2 = document.getElementById('noui-slider-range2'); noUiSlider.create(slider_range_2, { start: [ 30, 70 ], orientation: 'vertical', connect: true, range: { 'min': 0, 'max': 100 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // // Top to bottom pips // // First var slider_pips_top_1 = document.getElementById('noui-slider-top1'); noUiSlider.create(slider_pips_top_1, { range: range_all_sliders, start: 40, connect: 'lower', orientation: 'vertical', pips: { mode: 'range', density: 5 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // Second var slider_pips_top_2 = document.getElementById('noui-slider-top2'); noUiSlider.create(slider_pips_top_2, { range: range_all_sliders, start: 60, connect: 'lower', orientation: 'vertical', pips: { mode: 'range', density: 5 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' }); // // Bottom to top pips // // First var slider_pips_bottom_1 = document.getElementById('noui-slider-bottom1'); noUiSlider.create(slider_pips_bottom_1, { range: range_all_sliders, start: 40, connect: 'lower', orientation: 'vertical', direction: 'rtl', pips: { mode: 'range', density: 5 } }); // Second var slider_pips_bottom_2 = document.getElementById('noui-slider-bottom2'); noUiSlider.create(slider_pips_bottom_2, { range: range_all_sliders, start: 60, connect: 'lower', orientation: 'vertical', direction: 'rtl', pips: { mode: 'range', density: 5 } }); // Optional styling // ------------------------------ // // Colors // // Define elements var color1 = document.getElementById('noui-slider-color-demo1'), color2 = document.getElementById('noui-slider-color-demo2'), color3 = document.getElementById('noui-slider-color-demo3'), color4 = document.getElementById('noui-slider-color-demo4'), color5 = document.getElementById('noui-slider-color-demo5'), color6 = document.getElementById('noui-slider-color-demo6'); // Set common options var color_options = { start: [2, 8], connect: true, range: { 'min': 0, 'max': 10 }, direction: $('html').attr('dir') == 'rtl' ? 'rtl' : 'ltr' } // Create sliders noUiSlider.create(color1, color_options); noUiSlider.create(color2, color_options); noUiSlider.create(color3, color_options); noUiSlider.create(color4, color_options); noUiSlider.create(color5, color_options); noUiSlider.create(color6, color_options); // // Sizes and styles // // Define elements var default_size1 = document.getElementById('slider-default-lg'), default_size2 = document.getElementById('slider-default-md'), default_size3 = document.getElementById('slider-default-sm'), solid_size1 = document.getElementById('slider-solid-lg'), solid_size2 = document.getElementById('slider-solid-md'), solid_size3 = document.getElementById('slider-solid-sm'), white_size1 = document.getElementById('slider-white-lg'), white_size2 = document.getElementById('slider-white-md'), white_size3 = document.getElementById('slider-white-sm'); // Create sliders noUiSlider.create(default_size1, color_options); noUiSlider.create(default_size2, color_options); noUiSlider.create(default_size3, color_options); noUiSlider.create(solid_size1, color_options); noUiSlider.create(solid_size2, color_options); noUiSlider.create(solid_size3, color_options); noUiSlider.create(white_size1, color_options); noUiSlider.create(white_size2, color_options); noUiSlider.create(white_size3, color_options); }; // // Return objects assigned to module // return { init: function() { _componentNouiSlider(); } } }(); // Initialize module // ------------------------------ document.addEventListener('DOMContentLoaded', function() { NouiSlider.init(); });
const Hospital = require('../models/Hospital'); const jwt = require('jsonwebtoken'); const config = require('../config/auth.json'); module.exports = { /** * * @param {Request} req * @param {Response} res */ async index(req, res) { try { const { id_hospital } = req.cookies; let hospital; if (id_hospital.match(/^[0-9a-fA-F]{24}$/)) { hospital = await Hospital.findById(id_hospital); } if (!hospital) { return res.status(400).send({ error: 'Hospital não autenticado' }); } return res.json({ hospital }); } catch (error) { return res.status(401).send({ error: `Erro: ${error}` }); } }, /** * * @param {Request} req * @param {Response} res */ async logout(req, res) { try { const { id_hospital } = req.cookies; const hospital = await Hospital.findById(id_hospital); if (!hospital) { return res.status(400).send({ error: 'Hospital não encontrado' }); } res.clearCookie('token_access'); res.clearCookie('id_hospital'); res.removeHeader('id'); return res.status(200).end(); } catch (error) { return res.status(400).send({ error: `Erro: ${error}` }); } }, /** * * @param {Request} req * @param {Response} res */ async isLogged(req, res) { try { const { id_hospital } = req.cookies; const hospital = await Hospital.findById(id_hospital); if (!hospital) { return res.status(401).send({ error: 'Hospital não encontrado!' }); } res.setHeader('id', hospital._id); return res.json({ auth: 'isAuth' }); } catch (error) { return res.status(400).send({ error: `Erro: ${error}` }); } }, /** * * @param {Request} req * @param {Response} res */ async sendToken(req, res) { try { const { token_access } = req.cookies; if (!jwt.verify(token_access, config.secret)) { return res.status(401).send({ error: 'Hospital não autenticado!' }); } return res.send({ token: token_access }); } catch (error) { return res.status(400).send({ error: `Erro: ${error}` }); } }, };
export default class DebugTriggerService { /* @ngInject */ constructor ($document, $rootScope, DialogService) { this.$document = $document this.$rootScope = $rootScope this.DialogService = DialogService this.buffer = '' this.listener = null this.maxLength = 0 this.bindings = { config: this.handleConfig.bind(this), feedback: this.handleFeedback.bind(this), timelimit: this.handleTimelimit.bind(this) } for (let binding in this.bindings) { this.maxLength = Math.max(this.maxLength, binding.length) } } enable () { this.$document.on('keydown', this.handleKeyDown.bind(this)) } disable () { this.$document.off('keydown', this.handleKeyDown.bind(this)) } handleConfig () { this.$rootScope.$apply(() => { this.DialogService.showConfigurationEditor() }) } handleFeedback () { this.$rootScope.$apply(() => { this.DialogService.showFeedbackQuestionnaire([]) }) } handleTimelimit () { this.$rootScope.$apply(() => { this.DialogService.showTimeLimitReached({ duration_limit: 120 }) }) } checkBuffer () { if (!this.buffer.length) return for (let binding in this.bindings) { if (this.buffer.includes(binding)) { this.bindings[binding]() this.buffer = '' return } } console.log(this.buffer.length, this.maxLength) if (this.buffer.length >= this.maxLength) { this.buffer = '' } } handleKeyDown ($event) { let key = String.fromCharCode($event.which).toLowerCase() this.buffer += key for (let binding in this.bindings) { if (binding.indexOf(this.buffer) !== 0) { continue } if (binding.indexOf(this.buffer) === 0) { if (this.buffer === binding) { this.bindings[binding]() } else { return } } } this.buffer = key } }
#!/bin/sh ':'//; exec "$(command -v nodejs || command -v node)" "$0" "$@" ;// Statements must end before an expression. (function() { // prove that using strict is not enough 'use strict'; // The result of reversing an operator var isDefined = function(variable) { return variable !== undefined; }; var isChecked = {}; console.log(isDefined(isChecked));// true console.log(isDefined(isChecked.property));// false // vs var isDefined = function(variable) { return variable ==! undefined; }; isChecked = {}; console.log(isDefined(isChecked));// false console.log(isDefined(isChecked.property));// false })();
import React, { Component } from 'react'; import * as PropTypes from 'prop-types'; import { withRouter, Link } from 'react-router-dom'; import { compose } from 'ramda'; import { withStyles } from '@material-ui/core/styles'; import Button from '@material-ui/core/Button'; import { ArrowForwardIos } from '@material-ui/icons'; import { Fire } from 'mdi-material-ui'; import inject18n from '../../../components/i18n'; const styles = (theme) => ({ buttonHome: { marginRight: theme.spacing(2), padding: '2px 5px 2px 5px', minHeight: 20, textTransform: 'none', color: '#666666', backgroundColor: '#ffffff', }, button: { marginRight: theme.spacing(2), padding: '2px 5px 2px 5px', minHeight: 20, minWidth: 20, textTransform: 'none', }, icon: { marginRight: theme.spacing(1), }, arrow: { verticalAlign: 'middle', marginRight: 10, }, }); class TopMenuIncident extends Component { render() { const { t, location, match: { params: { incidentId }, }, classes, } = this.props; return ( <div> <Button component={Link} to="/dashboard/threats/incidents" variant="contained" size="small" color="inherit" classes={{ root: classes.buttonHome }} > <Fire className={classes.icon} fontSize="small" /> {t('Incidents')} </Button> <ArrowForwardIos color="inherit" classes={{ root: classes.arrow }} /> <Button component={Link} to={`/dashboard/threats/incidents/${incidentId}`} variant={ location.pathname === `/dashboard/threats/incidents/${incidentId}` ? 'contained' : 'text' } size="small" color={ location.pathname === `/dashboard/threats/incidents/${incidentId}` ? 'primary' : 'inherit' } classes={{ root: classes.button }} > {t('Overview')} </Button> <Button component={Link} to={`/dashboard/threats/incidents/${incidentId}/reports`} variant={ location.pathname === `/dashboard/threats/incidents/${incidentId}/reports` ? 'contained' : 'text' } size="small" color={ location.pathname === `/dashboard/threats/incidents/${incidentId}/reports` ? 'primary' : 'inherit' } classes={{ root: classes.button }} > {t('Reports')} </Button> <Button component={Link} to={`/dashboard/threats/incidents/${incidentId}/knowledge`} variant={ location.pathname.includes( `/dashboard/threats/incidents/${incidentId}/knowledge`, ) ? 'contained' : 'text' } size="small" color={ location.pathname.includes( `/dashboard/threats/incidents/${incidentId}/knowledge`, ) ? 'primary' : 'inherit' } classes={{ root: classes.button }} > {t('Knowledge')} </Button> <Button component={Link} to={`/dashboard/threats/incidents/${incidentId}/observables`} variant={ location.pathname.includes( `/dashboard/threats/incidents/${incidentId}/observables`, ) ? 'contained' : 'text' } size="small" color={ location.pathname.includes( `/dashboard/threats/incidents/${incidentId}/observables`, ) ? 'primary' : 'inherit' } classes={{ root: classes.button }} > {t('Observables')} </Button> <Button component={Link} to={`/dashboard/threats/incidents/${incidentId}/files`} variant={ location.pathname === `/dashboard/threats/incidents/${incidentId}/files` ? 'contained' : 'text' } size="small" color={ location.pathname === `/dashboard/threats/incidents/${incidentId}/files` ? 'primary' : 'inherit' } classes={{ root: classes.button }} > {t('Files')} </Button> </div> ); } } TopMenuIncident.propTypes = { classes: PropTypes.object, location: PropTypes.object, match: PropTypes.object, t: PropTypes.func, history: PropTypes.object, }; export default compose( inject18n, withRouter, withStyles(styles), )(TopMenuIncident);
/** * Copyright (c) 2015 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ (function() { App.component('tileLoadChart', { bindings: { chartData: '<', state: '<', parentState: '<' }, templateUrl: 'app/dashboard/tile-load-chart.html', controller: function () { this.options = { axis: { x: { type: 'timeseries', tick: { format: '%H:%M', } } }, grid: { x: { show: true }, y: { show: true } }, point: { show: false }, legend: { show: false } }; } }); })();
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See http://js.arcgis.com/3.15/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details. //>>built define({"widgets/Scalebar/setting/nls/strings":{unit:"Jednostka",style:"Styl",dual:"podw\u00f3jny",english:"angielski",metric:"metryczny",ruler:"linijka",line:"linia",_localized:{}}});
import mongoose from 'mongoose' const { MONGODB_URI } = process.env if (!MONGODB_URI) { throw new Error( 'Please define the MONGODB_URI environment variable inside .env.local' ) } /** * Global is used here to maintain a cached connection across hot reloads * in development. This prevents connections growing exponentially * during API Route usage. */ let cached = global.mongoose if (!cached) { cached = global.mongoose = { conn: null, promise: null } } async function dbConnect() { if (cached.conn) { return cached.conn } if (!cached.promise) { const opts = { useNewUrlParser: true, useUnifiedTopology: true, bufferCommands: false, bufferMaxEntries: 0, useFindAndModify: false, useCreateIndex: true, } cached.promise = mongoose.connect(MONGODB_URI, opts).then((mongoose) => { return mongoose }) } cached.conn = await cached.promise return cached.conn } export default dbConnect
import axios from 'axios'; const AUTH_KEY = { client_id: window.__SERVER_DATA__.client_id, client_secret: window.__SERVER_DATA__.client_key, grant_type: 'password', }; const BASE_URL = window.__SERVER_DATA__.base_url; export default { newAccount: payload => { const requestUrl = `${BASE_URL}/new-account`; delete axios.defaults.headers.common['Authorization']; return axios.post(requestUrl, payload); }, newAccountSuccess: payload => { const requestUrl = `${BASE_URL}/new-account-success`; delete axios.defaults.headers.common['Authorization']; return axios.post(requestUrl, payload); }, login: loginCredentials => { const requestUrl = `${BASE_URL}/oauth/token`; delete axios.defaults.headers.common['Authorization']; return axios.post(requestUrl, { ...AUTH_KEY, ...loginCredentials }); }, register: payload => { const requestUrl = `${BASE_URL}/register`; delete axios.defaults.headers.common['Authorization']; return axios.post(requestUrl, payload); }, forgot: email => { const requestUrl = `${BASE_URL}/password/email`; delete axios.defaults.headers.common['Authorization']; return axios.post(requestUrl, email); }, reset: payload => { const requestUrl = `${BASE_URL}/password/reset`; delete axios.defaults.headers.common['Authorization']; return axios.post(requestUrl, payload); }, };
import { FocusStyleManager } from '@blueprintjs/core' import { renderReactComponent } from '~mixins/react-helpers' import { PopOverlay } from './overlay' import './style.scss' window.addEventListener('load', async () => { FocusStyleManager.onlyShowFocusOnTabs() renderReactComponent('popout', PopOverlay) })
(function(){var APC_r_url="http://jqmt.qq.com/rpt.png?plf=3&";var APC_count=0,APC_idx=[],APC_task=[];function apc_CallBack(data){var idx=0;for(var i in data){if(i=="rCount"){APC_count=data[i];}else if(!isNaN(i)){APC_idx[idx]=i;APC_task[i]=data[i];idx++;}} APC_count=idx;APC_r_url+="cnt="+APC_count;if(APC_count<=0) return;else{APC_st(0,0);return;}} function APC_st(i,t){var p=new Image();p.idx=i;p.st=new Date();p.t=t;p.onload=function(){p.onload=null;APC_r_ok(this.idx,this.st,this.t)};p.onerror=function(){p.onerror=null;APC_r_err(this.idx,this.st,this.t)};p.src=APC_task[APC_idx[i]]+"?"+Math.random();} function APC_r_ok(i,st,t){var data=new Date(),tm=data.getTime()-st.getTime();APC_r_url+="&r"+i+"="+APC_idx[i]+","+tm+",0";if(i<APC_count-1) APC_st(i+1,0);else{APC_Rpt(APC_r_url);}} function APC_r_err(i,st,t){var data=new Date();var tm=data.getTime()-st.getTime();APC_r_url+="&r"+i+"="+APC_idx[i]+","+tm+",1";if(i<APC_count-1) APC_st(i+1,0);else {APC_Rpt(APC_r_url);}} function APC_Rpt(s){var p=new Image();p.src=s;} try{apc_CallBack({"rCount":2,'1842':'http://ping.cdn.qcloud.com/ping/ping.jpg','1362':'http://dlied1.cc.cdn.qq.com/dltest/dltest.gif'});}catch(e){}})();
/*! For license information please see index_bundle.js.LICENSE.txt */ (()=>{"use strict";var t={212:(t,e,n)=>{n.r(e),n.d(e,{ACESFilmicToneMapping:()=>nt,AddEquation:()=>T,AddOperation:()=>Q,AdditiveAnimationBlendMode:()=>qe,AdditiveBlending:()=>M,AlphaFormat:()=>Ot,AlwaysDepth:()=>k,AlwaysStencilFunc:()=>wn,AmbientLight:()=>id,AmbientLightProbe:()=>_d,AnimationClip:()=>Lu,AnimationLoader:()=>Ou,AnimationMixer:()=>Kd,AnimationObjectGroup:()=>Jd,AnimationUtils:()=>fu,ArcCurve:()=>Jc,ArrayCamera:()=>_l,ArrowHelper:()=>Gp,Audio:()=>Dd,AudioAnalyser:()=>Fd,AudioContext:()=>vd,AudioListener:()=>Pd,AudioLoader:()=>yd,AxesHelper:()=>kp,AxisHelper:()=>vm,BackSide:()=>f,BasicDepthPacking:()=>rn,BasicShadowMap:()=>h,BinaryTextureLoader:()=>bm,Bone:()=>ac,BooleanKeyframeTrack:()=>Mu,BoundingBoxHelper:()=>ym,Box2:()=>lp,Box3:()=>mi,Box3Helper:()=>Op,BoxBufferGeometry:()=>Ms,BoxGeometry:()=>Ms,BoxHelper:()=>zp,BufferAttribute:()=>Br,BufferGeometry:()=>es,BufferGeometryLoader:()=>hd,ByteType:()=>Tt,Cache:()=>Cu,Camera:()=>Es,CameraHelper:()=>Dp,CanvasRenderer:()=>Sm,CanvasTexture:()=>Bc,CatmullRomCurve3:()=>nh,CineonToneMapping:()=>et,CircleBufferGeometry:()=>Fc,CircleGeometry:()=>Fc,ClampToEdgeWrapping:()=>dt,Clock:()=>Td,Color:()=>Ir,ColorKeyframeTrack:()=>bu,CompressedTexture:()=>Oc,CompressedTextureLoader:()=>Bu,ConeBufferGeometry:()=>Hc,ConeGeometry:()=>Hc,CubeCamera:()=>Rs,CubeReflectionMapping:()=>st,CubeRefractionMapping:()=>at,CubeTexture:()=>Cs,CubeTextureLoader:()=>Uu,CubeUVReflectionMapping:()=>ct,CubeUVRefractionMapping:()=>ht,CubicBezierCurve:()=>ah,CubicBezierCurve3:()=>oh,CubicInterpolant:()=>vu,CullFaceBack:()=>o,CullFaceFront:()=>l,CullFaceFrontBack:()=>c,CullFaceNone:()=>a,Curve:()=>Yc,CurvePath:()=>mh,CustomBlending:()=>S,CustomToneMapping:()=>it,CylinderBufferGeometry:()=>Uc,CylinderGeometry:()=>Uc,Cylindrical:()=>ap,DataTexture:()=>oc,DataTexture2DArray:()=>Sa,DataTexture3D:()=>Ca,DataTextureLoader:()=>Hu,DataUtils:()=>qp,DecrementStencilOp:()=>dn,DecrementWrapStencilOp:()=>mn,DefaultLoadingManager:()=>Du,DepthFormat:()=>kt,DepthStencilFormat:()=>Vt,DepthTexture:()=>Sl,DirectionalLight:()=>nd,DirectionalLightHelper:()=>Rp,DiscreteInterpolant:()=>xu,DodecahedronBufferGeometry:()=>kc,DodecahedronGeometry:()=>kc,DoubleSide:()=>g,DstAlphaFactor:()=>O,DstColorFactor:()=>F,DynamicBufferAttribute:()=>om,DynamicCopyUsage:()=>Pn,DynamicDrawUsage:()=>Tn,DynamicReadUsage:()=>Ln,EdgesGeometry:()=>Xc,EdgesHelper:()=>xm,EllipseCurve:()=>Zc,EqualDepth:()=>j,EqualStencilFunc:()=>yn,EquirectangularReflectionMapping:()=>ot,EquirectangularRefractionMapping:()=>lt,Euler:()=>Ki,EventDispatcher:()=>zn,ExtrudeBufferGeometry:()=>Wh,ExtrudeGeometry:()=>Wh,FaceColors:()=>Jp,FileLoader:()=>zu,FlatShading:()=>v,Float16BufferAttribute:()=>jr,Float32Attribute:()=>fm,Float32BufferAttribute:()=>qr,Float64Attribute:()=>gm,Float64BufferAttribute:()=>Xr,FloatType:()=>Ct,Fog:()=>Cl,FogExp2:()=>Rl,Font:()=>Pm,FontLoader:()=>Cm,FrontSide:()=>m,Frustum:()=>Fs,GLBufferAttribute:()=>ep,GLSL1:()=>In,GLSL3:()=>Nn,GammaEncoding:()=>Ke,GreaterDepth:()=>X,GreaterEqualDepth:()=>q,GreaterEqualStencilFunc:()=>bn,GreaterStencilFunc:()=>_n,GridHelper:()=>Sp,Group:()=>Ml,HalfFloatType:()=>Pt,HemisphereLight:()=>Vu,HemisphereLightHelper:()=>wp,HemisphereLightProbe:()=>xd,IcosahedronBufferGeometry:()=>qh,IcosahedronGeometry:()=>qh,ImageBitmapLoader:()=>fd,ImageLoader:()=>Fu,ImageUtils:()=>ni,ImmediateRenderObject:()=>Dm,IncrementStencilOp:()=>un,IncrementWrapStencilOp:()=>pn,InstancedBufferAttribute:()=>uc,InstancedBufferGeometry:()=>cd,InstancedInterleavedBuffer:()=>tp,InstancedMesh:()=>gc,Int16Attribute:()=>um,Int16BufferAttribute:()=>Gr,Int32Attribute:()=>pm,Int32BufferAttribute:()=>Vr,Int8Attribute:()=>lm,Int8BufferAttribute:()=>Fr,IntType:()=>Lt,InterleavedBuffer:()=>Dl,InterleavedBufferAttribute:()=>Nl,Interpolant:()=>gu,InterpolateDiscrete:()=>Ue,InterpolateLinear:()=>He,InterpolateSmooth:()=>Ge,InvertStencilOp:()=>fn,JSONLoader:()=>Tm,KeepStencilOp:()=>cn,KeyframeTrack:()=>_u,LOD:()=>$l,LatheBufferGeometry:()=>Xh,LatheGeometry:()=>Xh,Layers:()=>$i,LensFlare:()=>Am,LessDepth:()=>V,LessEqualDepth:()=>W,LessEqualStencilFunc:()=>xn,LessStencilFunc:()=>vn,Light:()=>ku,LightProbe:()=>ad,Line:()=>wc,Line3:()=>up,LineBasicMaterial:()=>vc,LineCurve:()=>lh,LineCurve3:()=>ch,LineDashedMaterial:()=>pu,LineLoop:()=>Ac,LinePieces:()=>Yp,LineSegments:()=>Ec,LineStrip:()=>Xp,LinearEncoding:()=>Je,LinearFilter:()=>xt,LinearInterpolant:()=>yu,LinearMipMapLinearFilter:()=>wt,LinearMipMapNearestFilter:()=>Mt,LinearMipmapLinearFilter:()=>bt,LinearMipmapNearestFilter:()=>_t,LinearToneMapping:()=>$,Loader:()=>Iu,LoaderUtils:()=>ld,LoadingManager:()=>Pu,LoopOnce:()=>Oe,LoopPingPong:()=>Fe,LoopRepeat:()=>Be,LuminanceAlphaFormat:()=>Ht,LuminanceFormat:()=>Ut,MOUSE:()=>r,Material:()=>Er,MaterialLoader:()=>od,Math:()=>Xn,MathUtils:()=>Xn,Matrix3:()=>Zn,Matrix4:()=>ki,MaxEquation:()=>R,Mesh:()=>xs,MeshBasicMaterial:()=>Nr,MeshDepthMaterial:()=>ml,MeshDistanceMaterial:()=>fl,MeshFaceMaterial:()=>Kp,MeshLambertMaterial:()=>uu,MeshMatcapMaterial:()=>du,MeshNormalMaterial:()=>hu,MeshPhongMaterial:()=>lu,MeshPhysicalMaterial:()=>ou,MeshStandardMaterial:()=>au,MeshToonMaterial:()=>cu,MinEquation:()=>L,MirroredRepeatWrapping:()=>pt,MixOperation:()=>J,MultiMaterial:()=>$p,MultiplyBlending:()=>w,MultiplyOperation:()=>Z,NearestFilter:()=>mt,NearestMipMapLinearFilter:()=>yt,NearestMipMapNearestFilter:()=>gt,NearestMipmapLinearFilter:()=>vt,NearestMipmapNearestFilter:()=>ft,NeverDepth:()=>G,NeverStencilFunc:()=>gn,NoBlending:()=>x,NoColors:()=>Zp,NoToneMapping:()=>K,NormalAnimationBlendMode:()=>je,NormalBlending:()=>_,NotEqualDepth:()=>Y,NotEqualStencilFunc:()=>Mn,NumberKeyframeTrack:()=>wu,Object3D:()=>pr,ObjectLoader:()=>ud,ObjectSpaceNormalMap:()=>on,OctahedronBufferGeometry:()=>Yh,OctahedronGeometry:()=>Yh,OneFactor:()=>P,OneMinusDstAlphaFactor:()=>B,OneMinusDstColorFactor:()=>U,OneMinusSrcAlphaFactor:()=>z,OneMinusSrcColorFactor:()=>I,OrthographicCamera:()=>Qs,PCFShadowMap:()=>u,PCFSoftShadowMap:()=>d,PMREMGenerator:()=>da,ParametricGeometry:()=>Lm,Particle:()=>em,ParticleBasicMaterial:()=>rm,ParticleSystem:()=>nm,ParticleSystemMaterial:()=>sm,Path:()=>fh,PerspectiveCamera:()=>As,Plane:()=>zs,PlaneBufferGeometry:()=>Gs,PlaneGeometry:()=>Gs,PlaneHelper:()=>Bp,PointCloud:()=>tm,PointCloudMaterial:()=>im,PointLight:()=>td,PointLightHelper:()=>xp,Points:()=>Ic,PointsMaterial:()=>Lc,PolarGridHelper:()=>Tp,PolyhedronBufferGeometry:()=>Gc,PolyhedronGeometry:()=>Gc,PositionalAudio:()=>Bd,PropertyBinding:()=>Zd,PropertyMixer:()=>Ud,QuadraticBezierCurve:()=>hh,QuadraticBezierCurve3:()=>uh,Quaternion:()=>hi,QuaternionKeyframeTrack:()=>Tu,QuaternionLinearInterpolant:()=>Su,REVISION:()=>i,RGBADepthPacking:()=>sn,RGBAFormat:()=>Ft,RGBAIntegerFormat:()=>Zt,RGBA_ASTC_10x10_Format:()=>ye,RGBA_ASTC_10x5_Format:()=>fe,RGBA_ASTC_10x6_Format:()=>ge,RGBA_ASTC_10x8_Format:()=>ve,RGBA_ASTC_12x10_Format:()=>xe,RGBA_ASTC_12x12_Format:()=>_e,RGBA_ASTC_4x4_Format:()=>oe,RGBA_ASTC_5x4_Format:()=>le,RGBA_ASTC_5x5_Format:()=>ce,RGBA_ASTC_6x5_Format:()=>he,RGBA_ASTC_6x6_Format:()=>ue,RGBA_ASTC_8x5_Format:()=>de,RGBA_ASTC_8x6_Format:()=>pe,RGBA_ASTC_8x8_Format:()=>me,RGBA_BPTC_Format:()=>Me,RGBA_ETC2_EAC_Format:()=>ae,RGBA_PVRTC_2BPPV1_Format:()=>ie,RGBA_PVRTC_4BPPV1_Format:()=>ne,RGBA_S3TC_DXT1_Format:()=>Qt,RGBA_S3TC_DXT3_Format:()=>Kt,RGBA_S3TC_DXT5_Format:()=>$t,RGBDEncoding:()=>nn,RGBEEncoding:()=>$e,RGBEFormat:()=>Gt,RGBFormat:()=>Bt,RGBIntegerFormat:()=>Yt,RGBM16Encoding:()=>en,RGBM7Encoding:()=>tn,RGB_ETC1_Format:()=>re,RGB_ETC2_Format:()=>se,RGB_PVRTC_2BPPV1_Format:()=>ee,RGB_PVRTC_4BPPV1_Format:()=>te,RGB_S3TC_DXT1_Format:()=>Jt,RGFormat:()=>qt,RGIntegerFormat:()=>Xt,RawShaderMaterial:()=>Ks,Ray:()=>Gi,Raycaster:()=>np,RectAreaLight:()=>rd,RedFormat:()=>Wt,RedIntegerFormat:()=>jt,ReinhardToneMapping:()=>tt,RepeatWrapping:()=>ut,ReplaceStencilOp:()=>hn,ReverseSubtractEquation:()=>A,RingBufferGeometry:()=>Zh,RingGeometry:()=>Zh,SRGB8_ALPHA8_ASTC_10x10_Format:()=>Ie,SRGB8_ALPHA8_ASTC_10x5_Format:()=>Ce,SRGB8_ALPHA8_ASTC_10x6_Format:()=>Pe,SRGB8_ALPHA8_ASTC_10x8_Format:()=>De,SRGB8_ALPHA8_ASTC_12x10_Format:()=>Ne,SRGB8_ALPHA8_ASTC_12x12_Format:()=>ze,SRGB8_ALPHA8_ASTC_4x4_Format:()=>be,SRGB8_ALPHA8_ASTC_5x4_Format:()=>we,SRGB8_ALPHA8_ASTC_5x5_Format:()=>Se,SRGB8_ALPHA8_ASTC_6x5_Format:()=>Te,SRGB8_ALPHA8_ASTC_6x6_Format:()=>Ee,SRGB8_ALPHA8_ASTC_8x5_Format:()=>Ae,SRGB8_ALPHA8_ASTC_8x6_Format:()=>Le,SRGB8_ALPHA8_ASTC_8x8_Format:()=>Re,Scene:()=>Pl,SceneUtils:()=>Em,ShaderChunk:()=>ks,ShaderLib:()=>Ws,ShaderMaterial:()=>Ts,ShadowMaterial:()=>su,Shape:()=>gh,ShapeBufferGeometry:()=>Jh,ShapeGeometry:()=>Jh,ShapePath:()=>Vp,ShapeUtils:()=>Gh,ShortType:()=>Et,Skeleton:()=>hc,SkeletonHelper:()=>vp,SkinnedMesh:()=>sc,SmoothShading:()=>y,Sphere:()=>Ii,SphereBufferGeometry:()=>Qh,SphereGeometry:()=>Qh,Spherical:()=>sp,SphericalHarmonics3:()=>sd,SplineCurve:()=>dh,SpotLight:()=>Zu,SpotLightHelper:()=>pp,Sprite:()=>Zl,SpriteMaterial:()=>zl,SrcAlphaFactor:()=>N,SrcAlphaSaturateFactor:()=>H,SrcColorFactor:()=>D,StaticCopyUsage:()=>Cn,StaticDrawUsage:()=>Sn,StaticReadUsage:()=>An,StereoCamera:()=>Sd,StreamCopyUsage:()=>Dn,StreamDrawUsage:()=>En,StreamReadUsage:()=>Rn,StringKeyframeTrack:()=>Eu,SubtractEquation:()=>E,SubtractiveBlending:()=>b,TOUCH:()=>s,TangentSpaceNormalMap:()=>an,TetrahedronBufferGeometry:()=>Kh,TetrahedronGeometry:()=>Kh,TextGeometry:()=>Rm,Texture:()=>ri,TextureLoader:()=>Gu,TorusBufferGeometry:()=>$h,TorusGeometry:()=>$h,TorusKnotBufferGeometry:()=>tu,TorusKnotGeometry:()=>tu,Triangle:()=>Sr,TriangleFanDrawMode:()=>Ze,TriangleStripDrawMode:()=>Ye,TrianglesDrawMode:()=>Xe,TubeBufferGeometry:()=>eu,TubeGeometry:()=>eu,UVMapping:()=>rt,Uint16Attribute:()=>dm,Uint16BufferAttribute:()=>kr,Uint32Attribute:()=>mm,Uint32BufferAttribute:()=>Wr,Uint8Attribute:()=>cm,Uint8BufferAttribute:()=>Ur,Uint8ClampedAttribute:()=>hm,Uint8ClampedBufferAttribute:()=>Hr,Uniform:()=>$d,UniformsLib:()=>Vs,UniformsUtils:()=>Ss,UnsignedByteType:()=>St,UnsignedInt248Type:()=>zt,UnsignedIntType:()=>Rt,UnsignedShort4444Type:()=>Dt,UnsignedShort5551Type:()=>It,UnsignedShort565Type:()=>Nt,UnsignedShortType:()=>At,VSMShadowMap:()=>p,Vector2:()=>Yn,Vector3:()=>ui,Vector4:()=>ai,VectorKeyframeTrack:()=>Au,Vertex:()=>am,VertexColors:()=>Qp,VideoTexture:()=>zc,WebGL1Renderer:()=>Ll,WebGLCubeRenderTarget:()=>Ps,WebGLMultipleRenderTargets:()=>li,WebGLMultisampleRenderTarget:()=>ci,WebGLRenderTarget:()=>oi,WebGLRenderTargetCube:()=>wm,WebGLRenderer:()=>Al,WebGLUtils:()=>xl,WireframeGeometry:()=>nu,WireframeHelper:()=>_m,WrapAroundEnding:()=>We,XHRLoader:()=>Mm,ZeroCurvatureEnding:()=>ke,ZeroFactor:()=>C,ZeroSlopeEnding:()=>Ve,ZeroStencilOp:()=>ln,sRGBEncoding:()=>Qe});const i="135",r={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},s={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},a=0,o=1,l=2,c=3,h=0,u=1,d=2,p=3,m=0,f=1,g=2,v=1,y=2,x=0,_=1,M=2,b=3,w=4,S=5,T=100,E=101,A=102,L=103,R=104,C=200,P=201,D=202,I=203,N=204,z=205,O=206,B=207,F=208,U=209,H=210,G=0,k=1,V=2,W=3,j=4,q=5,X=6,Y=7,Z=0,J=1,Q=2,K=0,$=1,tt=2,et=3,nt=4,it=5,rt=300,st=301,at=302,ot=303,lt=304,ct=306,ht=307,ut=1e3,dt=1001,pt=1002,mt=1003,ft=1004,gt=1004,vt=1005,yt=1005,xt=1006,_t=1007,Mt=1007,bt=1008,wt=1008,St=1009,Tt=1010,Et=1011,At=1012,Lt=1013,Rt=1014,Ct=1015,Pt=1016,Dt=1017,It=1018,Nt=1019,zt=1020,Ot=1021,Bt=1022,Ft=1023,Ut=1024,Ht=1025,Gt=Ft,kt=1026,Vt=1027,Wt=1028,jt=1029,qt=1030,Xt=1031,Yt=1032,Zt=1033,Jt=33776,Qt=33777,Kt=33778,$t=33779,te=35840,ee=35841,ne=35842,ie=35843,re=36196,se=37492,ae=37496,oe=37808,le=37809,ce=37810,he=37811,ue=37812,de=37813,pe=37814,me=37815,fe=37816,ge=37817,ve=37818,ye=37819,xe=37820,_e=37821,Me=36492,be=37840,we=37841,Se=37842,Te=37843,Ee=37844,Ae=37845,Le=37846,Re=37847,Ce=37848,Pe=37849,De=37850,Ie=37851,Ne=37852,ze=37853,Oe=2200,Be=2201,Fe=2202,Ue=2300,He=2301,Ge=2302,ke=2400,Ve=2401,We=2402,je=2500,qe=2501,Xe=0,Ye=1,Ze=2,Je=3e3,Qe=3001,Ke=3007,$e=3002,tn=3004,en=3005,nn=3006,rn=3200,sn=3201,an=0,on=1,ln=0,cn=7680,hn=7681,un=7682,dn=7683,pn=34055,mn=34056,fn=5386,gn=512,vn=513,yn=514,xn=515,_n=516,Mn=517,bn=518,wn=519,Sn=35044,Tn=35048,En=35040,An=35045,Ln=35049,Rn=35041,Cn=35046,Pn=35050,Dn=35042,In="100",Nn="300 es";class zn{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const n=this._listeners[t];if(void 0!==n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const n=e.slice(0);for(let e=0,i=n.length;e<i;e++)n[e].call(this,t);t.target=null}}}const On=[];for(let t=0;t<256;t++)On[t]=(t<16?"0":"")+t.toString(16);let Bn=1234567;const Fn=Math.PI/180,Un=180/Math.PI;function Hn(){const t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(On[255&t]+On[t>>8&255]+On[t>>16&255]+On[t>>24&255]+"-"+On[255&e]+On[e>>8&255]+"-"+On[e>>16&15|64]+On[e>>24&255]+"-"+On[63&n|128]+On[n>>8&255]+"-"+On[n>>16&255]+On[n>>24&255]+On[255&i]+On[i>>8&255]+On[i>>16&255]+On[i>>24&255]).toUpperCase()}function Gn(t,e,n){return Math.max(e,Math.min(n,t))}function kn(t,e){return(t%e+e)%e}function Vn(t,e,n){return(1-n)*t+n*e}function Wn(t){return 0==(t&t-1)&&0!==t}function jn(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function qn(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}var Xn=Object.freeze({__proto__:null,DEG2RAD:Fn,RAD2DEG:Un,generateUUID:Hn,clamp:Gn,euclideanModulo:kn,mapLinear:function(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)},inverseLerp:function(t,e,n){return t!==e?(n-t)/(e-t):0},lerp:Vn,damp:function(t,e,n,i){return Vn(t,e,1-Math.exp(-n*i))},pingpong:function(t,e=1){return e-Math.abs(kn(t,2*e)-e)},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){return void 0!==t&&(Bn=t%2147483647),Bn=16807*Bn%2147483647,(Bn-1)/2147483646},degToRad:function(t){return t*Fn},radToDeg:function(t){return t*Un},isPowerOfTwo:Wn,ceilPowerOfTwo:jn,floorPowerOfTwo:qn,setQuaternionFromProperEuler:function(t,e,n,i,r){const s=Math.cos,a=Math.sin,o=s(n/2),l=a(n/2),c=s((e+i)/2),h=a((e+i)/2),u=s((e-i)/2),d=a((e-i)/2),p=s((i-e)/2),m=a((i-e)/2);switch(r){case"XYX":t.set(o*h,l*u,l*d,o*c);break;case"YZY":t.set(l*d,o*h,l*u,o*c);break;case"ZXZ":t.set(l*u,l*d,o*h,o*c);break;case"XZX":t.set(o*h,l*m,l*p,o*c);break;case"YXY":t.set(l*p,o*h,l*m,o*c);break;case"ZYZ":t.set(l*m,l*p,o*h,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}});class Yn{constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,s=this.y-t.y;return this.x=r*n-s*i+t.x,this.y=r*i+s*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}Yn.prototype.isVector2=!0;class Zn{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,i,r,s,a,o,l){const c=this.elements;return c[0]=t,c[1]=i,c[2]=a,c[3]=e,c[4]=r,c[5]=o,c[6]=n,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],a=n[3],o=n[6],l=n[1],c=n[4],h=n[7],u=n[2],d=n[5],p=n[8],m=i[0],f=i[3],g=i[6],v=i[1],y=i[4],x=i[7],_=i[2],M=i[5],b=i[8];return r[0]=s*m+a*v+o*_,r[3]=s*f+a*y+o*M,r[6]=s*g+a*x+o*b,r[1]=l*m+c*v+h*_,r[4]=l*f+c*y+h*M,r[7]=l*g+c*x+h*b,r[2]=u*m+d*v+p*_,r[5]=u*f+d*y+p*M,r[8]=u*g+d*x+p*b,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8];return e*s*c-e*a*l-n*r*c+n*a*o+i*r*l-i*s*o}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=c*s-a*l,u=a*o-c*r,d=l*r-s*o,p=e*h+n*u+i*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return t[0]=h*m,t[1]=(i*l-c*n)*m,t[2]=(a*n-i*s)*m,t[3]=u*m,t[4]=(c*e-i*o)*m,t[5]=(i*r-a*e)*m,t[6]=d*m,t[7]=(n*o-l*e)*m,t[8]=(s*e-n*r)*m,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,r,s,a){const o=Math.cos(r),l=Math.sin(r);return this.set(n*o,n*l,-n*(o*s+l*a)+s+t,-i*l,i*o,-i*(-l*s+o*a)+a+e,0,0,1),this}scale(t,e){const n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this}rotate(t){const e=Math.cos(t),n=Math.sin(t),i=this.elements,r=i[0],s=i[3],a=i[6],o=i[1],l=i[4],c=i[7];return i[0]=e*r+n*o,i[3]=e*s+n*l,i[6]=e*a+n*c,i[1]=-n*r+e*o,i[4]=-n*s+e*l,i[7]=-n*a+e*c,this}translate(t,e){const n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<9;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}function Jn(t){if(0===t.length)return-1/0;let e=t[0];for(let n=1,i=t.length;n<i;++n)t[n]>e&&(e=t[n]);return e}Zn.prototype.isMatrix3=!0;const Qn={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Kn(t,e){return new Qn[t](e)}function $n(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function ti(t,e=0){let n=3735928559^e,i=1103547991^e;for(let e,r=0;r<t.length;r++)e=t.charCodeAt(r),n=Math.imul(n^e,2654435761),i=Math.imul(i^e,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&i)+(n>>>0)}let ei;class ni{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===ei&&(ei=$n("canvas")),ei.width=t.width,ei.height=t.height;const n=ei.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ei}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}}let ii=0;class ri extends zn{constructor(t=ri.DEFAULT_IMAGE,e=ri.DEFAULT_MAPPING,n=dt,i=dt,r=xt,s=bt,a=Ft,o=St,l=1,c=Je){super(),Object.defineProperty(this,"id",{value:ii++}),this.uuid=Hn(),this.name="",this.image=t,this.mipmaps=[],this.mapping=e,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=s,this.anisotropy=l,this.format=a,this.internalFormat=null,this.type=o,this.offset=new Yn(0,0),this.repeat=new Yn(1,1),this.center=new Yn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Zn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this.userData=JSON.parse(JSON.stringify(t.userData)),this}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const i=this.image;if(void 0===i.uuid&&(i.uuid=Hn()),!e&&void 0===t.images[i.uuid]){let e;if(Array.isArray(i)){e=[];for(let t=0,n=i.length;t<n;t++)i[t].isDataTexture?e.push(si(i[t].image)):e.push(si(i[t]))}else e=si(i);t.images[i.uuid]={uuid:i.uuid,url:e}}n.image=i.uuid}return"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==rt)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case ut:t.x=t.x-Math.floor(t.x);break;case dt:t.x=t.x<0?0:1;break;case pt:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case ut:t.y=t.y-Math.floor(t.y);break;case dt:t.y=t.y<0?0:1;break;case pt:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&this.version++}}function si(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?ni.getDataURL(t):t.data?{data:Array.prototype.slice.call(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}ri.DEFAULT_IMAGE=void 0,ri.DEFAULT_MAPPING=rt,ri.prototype.isTexture=!0;class ai{constructor(t=0,e=0,n=0,i=1){this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,r;const s=.01,a=.1,o=t.elements,l=o[0],c=o[4],h=o[8],u=o[1],d=o[5],p=o[9],m=o[2],f=o[6],g=o[10];if(Math.abs(c-u)<s&&Math.abs(h-m)<s&&Math.abs(p-f)<s){if(Math.abs(c+u)<a&&Math.abs(h+m)<a&&Math.abs(p+f)<a&&Math.abs(l+d+g-3)<a)return this.set(1,0,0,0),this;e=Math.PI;const t=(l+1)/2,o=(d+1)/2,v=(g+1)/2,y=(c+u)/4,x=(h+m)/4,_=(p+f)/4;return t>o&&t>v?t<s?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(t),i=y/n,r=x/n):o>v?o<s?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(o),n=y/i,r=_/i):v<s?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(v),n=x/r,i=_/r),this.set(n,i,r,e),this}let v=Math.sqrt((f-p)*(f-p)+(h-m)*(h-m)+(u-c)*(u-c));return Math.abs(v)<.001&&(v=1),this.x=(f-p)/v,this.y=(h-m)/v,this.z=(u-c)/v,this.w=Math.acos((l+d+g-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}ai.prototype.isVector4=!0;class oi extends zn{constructor(t,e,n={}){super(),this.width=t,this.height=e,this.depth=1,this.scissor=new ai(0,0,t,e),this.scissorTest=!1,this.viewport=new ai(0,0,t,e),this.texture=new ri(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:t,height:e,depth:1},this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:xt,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}setTexture(t){t.image={width:this.width,height:this.height,depth:this.depth},this.texture=t}setSize(t,e,n=1){this.width===t&&this.height===e&&this.depth===n||(this.width=t,this.height=e,this.depth=n,this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return(new this.constructor).copy(this)}copy(t){return this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.image={...this.texture.image},this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}oi.prototype.isWebGLRenderTarget=!0;class li extends oi{constructor(t,e,n){super(t,e);const i=this.texture;this.texture=[];for(let t=0;t<n;t++)this.texture[t]=i.clone()}setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){this.width=t,this.height=e,this.depth=n;for(let i=0,r=this.texture.length;i<r;i++)this.texture[i].image.width=t,this.texture[i].image.height=e,this.texture[i].image.depth=n;this.dispose()}return this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e),this}copy(t){this.dispose(),this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this.texture.length=0;for(let e=0,n=t.texture.length;e<n;e++)this.texture[e]=t.texture[e].clone();return this}}li.prototype.isWebGLMultipleRenderTargets=!0;class ci extends oi{constructor(t,e,n={}){super(t,e,n),this.samples=4,this.ignoreDepthForMultisampleCopy=void 0===n.ignoreDepth||n.ignoreDepth,this.useRenderToTexture=void 0!==n.useRenderToTexture&&n.useRenderToTexture,this.useRenderbuffer=!1===this.useRenderToTexture}copy(t){return super.copy.call(this,t),this.samples=t.samples,this.useRenderToTexture=t.useRenderToTexture,this.useRenderbuffer=t.useRenderbuffer,this}}ci.prototype.isWebGLMultisampleRenderTarget=!0;class hi{constructor(t=0,e=0,n=0,i=1){this._x=t,this._y=e,this._z=n,this._w=i}static slerp(t,e,n,i){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(t,e,i)}static slerpFlat(t,e,n,i,r,s,a){let o=n[i+0],l=n[i+1],c=n[i+2],h=n[i+3];const u=r[s+0],d=r[s+1],p=r[s+2],m=r[s+3];if(0===a)return t[e+0]=o,t[e+1]=l,t[e+2]=c,void(t[e+3]=h);if(1===a)return t[e+0]=u,t[e+1]=d,t[e+2]=p,void(t[e+3]=m);if(h!==m||o!==u||l!==d||c!==p){let t=1-a;const e=o*u+l*d+c*p+h*m,n=e>=0?1:-1,i=1-e*e;if(i>Number.EPSILON){const r=Math.sqrt(i),s=Math.atan2(r,e*n);t=Math.sin(t*s)/r,a=Math.sin(a*s)/r}const r=a*n;if(o=o*t+u*r,l=l*t+d*r,c=c*t+p*r,h=h*t+m*r,t===1-a){const t=1/Math.sqrt(o*o+l*l+c*c+h*h);o*=t,l*=t,c*=t,h*=t}}t[e]=o,t[e+1]=l,t[e+2]=c,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,i,r,s){const a=n[i],o=n[i+1],l=n[i+2],c=n[i+3],h=r[s],u=r[s+1],d=r[s+2],p=r[s+3];return t[e]=a*p+c*h+o*d-l*u,t[e+1]=o*p+c*u+l*h-a*d,t[e+2]=l*p+c*d+a*u-o*h,t[e+3]=c*p-a*h-o*u-l*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=t._x,i=t._y,r=t._z,s=t._order,a=Math.cos,o=Math.sin,l=a(n/2),c=a(i/2),h=a(r/2),u=o(n/2),d=o(i/2),p=o(r/2);switch(s){case"XYZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"YXZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"ZXY":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"ZYX":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"YZX":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case"XZY":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!1!==e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],i=e[4],r=e[8],s=e[1],a=e[5],o=e[9],l=e[2],c=e[6],h=e[10],u=n+a+h;if(u>0){const t=.5/Math.sqrt(u+1);this._w=.25/t,this._x=(c-o)*t,this._y=(r-l)*t,this._z=(s-i)*t}else if(n>a&&n>h){const t=2*Math.sqrt(1+n-a-h);this._w=(c-o)/t,this._x=.25*t,this._y=(i+s)/t,this._z=(r+l)/t}else if(a>h){const t=2*Math.sqrt(1+a-n-h);this._w=(r-l)/t,this._x=(i+s)/t,this._y=.25*t,this._z=(o+c)/t}else{const t=2*Math.sqrt(1+h-n-a);this._w=(s-i)/t,this._x=(r+l)/t,this._y=(o+c)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Gn(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,s=t._w,a=e._x,o=e._y,l=e._z,c=e._w;return this._x=n*c+s*a+i*l-r*o,this._y=i*c+s*o+r*a-n*l,this._z=r*c+s*l+n*o-i*a,this._w=s*c-n*a-i*o-r*l,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const n=this._x,i=this._y,r=this._z,s=this._w;let a=s*t._w+n*t._x+i*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=n,this._y=i,this._z=r,this;const o=1-a*a;if(o<=Number.EPSILON){const t=1-e;return this._w=t*s+e*this._w,this._x=t*n+e*this._x,this._y=t*i+e*this._y,this._z=t*r+e*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(o),c=Math.atan2(l,a),h=Math.sin((1-e)*c)/l,u=Math.sin(e*c)/l;return this._w=s*h+this._w*u,this._x=n*h+this._x*u,this._y=i*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){this.copy(t).slerp(e,n)}random(){const t=Math.random(),e=Math.sqrt(1-t),n=Math.sqrt(t),i=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(e*Math.cos(i),n*Math.sin(r),n*Math.cos(r),e*Math.sin(i))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}}hi.prototype.isQuaternion=!0;class ui{constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(pi.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(pi.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.elements,s=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*s,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*s,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*s,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,o=t.w,l=o*e+s*i-a*n,c=o*n+a*e-r*i,h=o*i+r*n-s*e,u=-r*e-s*n-a*i;return this.x=l*o+u*-r+c*-a-h*-s,this.y=c*o+u*-s+h*-r-l*-a,this.z=h*o+u*-a+l*-s-c*-r,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=i*o-r*a,this.y=r*s-n*o,this.z=n*a-i*s,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return di.copy(this).projectOnVector(t),this.sub(di)}reflect(t){return this.sub(di.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(Gn(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){const i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=2*(Math.random()-.5),e=Math.random()*Math.PI*2,n=Math.sqrt(1-t**2);return this.x=n*Math.cos(e),this.y=n*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}ui.prototype.isVector3=!0;const di=new ui,pi=new hi;class mi{constructor(t=new ui(1/0,1/0,1/0),e=new ui(-1/0,-1/0,-1/0)){this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,a=-1/0;for(let o=0,l=t.length;o<l;o+=3){const l=t[o],c=t[o+1],h=t[o+2];l<e&&(e=l),c<n&&(n=c),h<i&&(i=h),l>r&&(r=l),c>s&&(s=c),h>a&&(a=h)}return this.min.set(e,n,i),this.max.set(r,s,a),this}setFromBufferAttribute(t){let e=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,a=-1/0;for(let o=0,l=t.count;o<l;o++){const l=t.getX(o),c=t.getY(o),h=t.getZ(o);l<e&&(e=l),c<n&&(n=c),h<i&&(i=h),l>r&&(r=l),c>s&&(s=c),h>a&&(a=h)}return this.min.set(e,n,i),this.max.set(r,s,a),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=gi.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t){return this.makeEmpty(),this.expandByObject(t)}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t){t.updateWorldMatrix(!1,!1);const e=t.geometry;void 0!==e&&(null===e.boundingBox&&e.computeBoundingBox(),vi.copy(e.boundingBox),vi.applyMatrix4(t.matrixWorld),this.union(vi));const n=t.children;for(let t=0,e=n.length;t<e;t++)this.expandByObject(n[t]);return this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)}intersectsSphere(t){return this.clampPoint(t.center,gi),gi.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Si),Ti.subVectors(this.max,Si),yi.subVectors(t.a,Si),xi.subVectors(t.b,Si),_i.subVectors(t.c,Si),Mi.subVectors(xi,yi),bi.subVectors(_i,xi),wi.subVectors(yi,_i);let e=[0,-Mi.z,Mi.y,0,-bi.z,bi.y,0,-wi.z,wi.y,Mi.z,0,-Mi.x,bi.z,0,-bi.x,wi.z,0,-wi.x,-Mi.y,Mi.x,0,-bi.y,bi.x,0,-wi.y,wi.x,0];return!!Li(e,yi,xi,_i,Ti)&&(e=[1,0,0,0,1,0,0,0,1],!!Li(e,yi,xi,_i,Ti)&&(Ei.crossVectors(Mi,bi),e=[Ei.x,Ei.y,Ei.z],Li(e,yi,xi,_i,Ti)))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return gi.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=.5*this.getSize(gi).length(),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(fi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),fi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),fi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),fi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),fi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),fi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),fi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),fi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(fi)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}mi.prototype.isBox3=!0;const fi=[new ui,new ui,new ui,new ui,new ui,new ui,new ui,new ui],gi=new ui,vi=new mi,yi=new ui,xi=new ui,_i=new ui,Mi=new ui,bi=new ui,wi=new ui,Si=new ui,Ti=new ui,Ei=new ui,Ai=new ui;function Li(t,e,n,i,r){for(let s=0,a=t.length-3;s<=a;s+=3){Ai.fromArray(t,s);const a=r.x*Math.abs(Ai.x)+r.y*Math.abs(Ai.y)+r.z*Math.abs(Ai.z),o=e.dot(Ai),l=n.dot(Ai),c=i.dot(Ai);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>a)return!1}return!0}const Ri=new mi,Ci=new ui,Pi=new ui,Di=new ui;class Ii{constructor(t=new ui,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const n=this.center;void 0!==e?n.copy(e):Ri.setFromPoints(t).getCenter(n);let i=0;for(let e=0,r=t.length;e<r;e++)i=Math.max(i,n.distanceToSquared(t[e]));return this.radius=Math.sqrt(i),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const n=this.center.distanceToSquared(t);return e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){Di.subVectors(t,this.center);const e=Di.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),n=.5*(t-this.radius);this.center.add(Di.multiplyScalar(n/t)),this.radius+=n}return this}union(t){return Pi.subVectors(t.center,this.center).normalize().multiplyScalar(t.radius),this.expandByPoint(Ci.copy(t.center).add(Pi)),this.expandByPoint(Ci.copy(t.center).sub(Pi)),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Ni=new ui,zi=new ui,Oi=new ui,Bi=new ui,Fi=new ui,Ui=new ui,Hi=new ui;class Gi{constructor(t=new ui,e=new ui(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Ni)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Ni.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Ni.copy(this.direction).multiplyScalar(e).add(this.origin),Ni.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){zi.copy(t).add(e).multiplyScalar(.5),Oi.copy(e).sub(t).normalize(),Bi.copy(this.origin).sub(zi);const r=.5*t.distanceTo(e),s=-this.direction.dot(Oi),a=Bi.dot(this.direction),o=-Bi.dot(Oi),l=Bi.lengthSq(),c=Math.abs(1-s*s);let h,u,d,p;if(c>0)if(h=s*o-a,u=s*a-o,p=r*c,h>=0)if(u>=-p)if(u<=p){const t=1/c;h*=t,u*=t,d=h*(h+s*u+2*a)+u*(s*h+u+2*o)+l}else u=r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u=-r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u<=-p?(h=Math.max(0,-(-s*r+a)),u=h>0?-r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l):u<=p?(h=0,u=Math.min(Math.max(-r,-o),r),d=u*(u+2*o)+l):(h=Math.max(0,-(s*r+a)),u=h>0?r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l);else u=s>0?-r:r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;return n&&n.copy(this.direction).multiplyScalar(h).add(this.origin),i&&i.copy(Oi).multiplyScalar(u).add(zi),d}intersectSphere(t,e){Ni.subVectors(t.center,this.origin);const n=Ni.dot(this.direction),i=Ni.dot(Ni)-n*n,r=t.radius*t.radius;if(i>r)return null;const s=Math.sqrt(r-i),a=n-s,o=n+s;return a<0&&o<0?null:a<0?this.at(o,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){const n=this.distanceToPlane(t);return null===n?null:this.at(n,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,r,s,a,o;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(n=(t.min.x-u.x)*l,i=(t.max.x-u.x)*l):(n=(t.max.x-u.x)*l,i=(t.min.x-u.x)*l),c>=0?(r=(t.min.y-u.y)*c,s=(t.max.y-u.y)*c):(r=(t.max.y-u.y)*c,s=(t.min.y-u.y)*c),n>s||r>i?null:((r>n||n!=n)&&(n=r),(s<i||i!=i)&&(i=s),h>=0?(a=(t.min.z-u.z)*h,o=(t.max.z-u.z)*h):(a=(t.max.z-u.z)*h,o=(t.min.z-u.z)*h),n>o||a>i?null:((a>n||n!=n)&&(n=a),(o<i||i!=i)&&(i=o),i<0?null:this.at(n>=0?n:i,e)))}intersectsBox(t){return null!==this.intersectBox(t,Ni)}intersectTriangle(t,e,n,i,r){Fi.subVectors(e,t),Ui.subVectors(n,t),Hi.crossVectors(Fi,Ui);let s,a=this.direction.dot(Hi);if(a>0){if(i)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}Bi.subVectors(this.origin,t);const o=s*this.direction.dot(Ui.crossVectors(Bi,Ui));if(o<0)return null;const l=s*this.direction.dot(Fi.cross(Bi));if(l<0)return null;if(o+l>a)return null;const c=-s*Bi.dot(Hi);return c<0?null:this.at(c/a,r)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class ki{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,i,r,s,a,o,l,c,h,u,d,p,m,f){const g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=r,g[5]=s,g[9]=a,g[13]=o,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=p,g[11]=m,g[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new ki).fromArray(this.elements)}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,n=t.elements,i=1/Vi.setFromMatrixColumn(t,0).length(),r=1/Vi.setFromMatrixColumn(t,1).length(),s=1/Vi.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*s,e[9]=n[9]*s,e[10]=n[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const e=this.elements,n=t.x,i=t.y,r=t.z,s=Math.cos(n),a=Math.sin(n),o=Math.cos(i),l=Math.sin(i),c=Math.cos(r),h=Math.sin(r);if("XYZ"===t.order){const t=s*c,n=s*h,i=a*c,r=a*h;e[0]=o*c,e[4]=-o*h,e[8]=l,e[1]=n+i*l,e[5]=t-r*l,e[9]=-a*o,e[2]=r-t*l,e[6]=i+n*l,e[10]=s*o}else if("YXZ"===t.order){const t=o*c,n=o*h,i=l*c,r=l*h;e[0]=t+r*a,e[4]=i*a-n,e[8]=s*l,e[1]=s*h,e[5]=s*c,e[9]=-a,e[2]=n*a-i,e[6]=r+t*a,e[10]=s*o}else if("ZXY"===t.order){const t=o*c,n=o*h,i=l*c,r=l*h;e[0]=t-r*a,e[4]=-s*h,e[8]=i+n*a,e[1]=n+i*a,e[5]=s*c,e[9]=r-t*a,e[2]=-s*l,e[6]=a,e[10]=s*o}else if("ZYX"===t.order){const t=s*c,n=s*h,i=a*c,r=a*h;e[0]=o*c,e[4]=i*l-n,e[8]=t*l+r,e[1]=o*h,e[5]=r*l+t,e[9]=n*l-i,e[2]=-l,e[6]=a*o,e[10]=s*o}else if("YZX"===t.order){const t=s*o,n=s*l,i=a*o,r=a*l;e[0]=o*c,e[4]=r-t*h,e[8]=i*h+n,e[1]=h,e[5]=s*c,e[9]=-a*c,e[2]=-l*c,e[6]=n*h+i,e[10]=t-r*h}else if("XZY"===t.order){const t=s*o,n=s*l,i=a*o,r=a*l;e[0]=o*c,e[4]=-h,e[8]=l*c,e[1]=t*h+r,e[5]=s*c,e[9]=n*h-i,e[2]=i*h-n,e[6]=a*c,e[10]=r*h+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(ji,t,qi)}lookAt(t,e,n){const i=this.elements;return Zi.subVectors(t,e),0===Zi.lengthSq()&&(Zi.z=1),Zi.normalize(),Xi.crossVectors(n,Zi),0===Xi.lengthSq()&&(1===Math.abs(n.z)?Zi.x+=1e-4:Zi.z+=1e-4,Zi.normalize(),Xi.crossVectors(n,Zi)),Xi.normalize(),Yi.crossVectors(Zi,Xi),i[0]=Xi.x,i[4]=Yi.x,i[8]=Zi.x,i[1]=Xi.y,i[5]=Yi.y,i[9]=Zi.y,i[2]=Xi.z,i[6]=Yi.z,i[10]=Zi.z,this}multiply(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],a=n[4],o=n[8],l=n[12],c=n[1],h=n[5],u=n[9],d=n[13],p=n[2],m=n[6],f=n[10],g=n[14],v=n[3],y=n[7],x=n[11],_=n[15],M=i[0],b=i[4],w=i[8],S=i[12],T=i[1],E=i[5],A=i[9],L=i[13],R=i[2],C=i[6],P=i[10],D=i[14],I=i[3],N=i[7],z=i[11],O=i[15];return r[0]=s*M+a*T+o*R+l*I,r[4]=s*b+a*E+o*C+l*N,r[8]=s*w+a*A+o*P+l*z,r[12]=s*S+a*L+o*D+l*O,r[1]=c*M+h*T+u*R+d*I,r[5]=c*b+h*E+u*C+d*N,r[9]=c*w+h*A+u*P+d*z,r[13]=c*S+h*L+u*D+d*O,r[2]=p*M+m*T+f*R+g*I,r[6]=p*b+m*E+f*C+g*N,r[10]=p*w+m*A+f*P+g*z,r[14]=p*S+m*L+f*D+g*O,r[3]=v*M+y*T+x*R+_*I,r[7]=v*b+y*E+x*C+_*N,r[11]=v*w+y*A+x*P+_*z,r[15]=v*S+y*L+x*D+_*O,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[4],i=t[8],r=t[12],s=t[1],a=t[5],o=t[9],l=t[13],c=t[2],h=t[6],u=t[10],d=t[14];return t[3]*(+r*o*h-i*l*h-r*a*u+n*l*u+i*a*d-n*o*d)+t[7]*(+e*o*d-e*l*u+r*s*u-i*s*d+i*l*c-r*o*c)+t[11]*(+e*l*h-e*a*d-r*s*h+n*s*d+r*a*c-n*l*c)+t[15]*(-i*a*c-e*o*h+e*a*u+i*s*h-n*s*u+n*o*c)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=t[9],u=t[10],d=t[11],p=t[12],m=t[13],f=t[14],g=t[15],v=h*f*l-m*u*l+m*o*d-a*f*d-h*o*g+a*u*g,y=p*u*l-c*f*l-p*o*d+s*f*d+c*o*g-s*u*g,x=c*m*l-p*h*l+p*a*d-s*m*d-c*a*g+s*h*g,_=p*h*o-c*m*o-p*a*u+s*m*u+c*a*f-s*h*f,M=e*v+n*y+i*x+r*_;if(0===M)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const b=1/M;return t[0]=v*b,t[1]=(m*u*r-h*f*r-m*i*d+n*f*d+h*i*g-n*u*g)*b,t[2]=(a*f*r-m*o*r+m*i*l-n*f*l-a*i*g+n*o*g)*b,t[3]=(h*o*r-a*u*r-h*i*l+n*u*l+a*i*d-n*o*d)*b,t[4]=y*b,t[5]=(c*f*r-p*u*r+p*i*d-e*f*d-c*i*g+e*u*g)*b,t[6]=(p*o*r-s*f*r-p*i*l+e*f*l+s*i*g-e*o*g)*b,t[7]=(s*u*r-c*o*r+c*i*l-e*u*l-s*i*d+e*o*d)*b,t[8]=x*b,t[9]=(p*h*r-c*m*r-p*n*d+e*m*d+c*n*g-e*h*g)*b,t[10]=(s*m*r-p*a*r+p*n*l-e*m*l-s*n*g+e*a*g)*b,t[11]=(c*a*r-s*h*r-c*n*l+e*h*l+s*n*d-e*a*d)*b,t[12]=_*b,t[13]=(c*m*i-p*h*i+p*n*u-e*m*u-c*n*f+e*h*f)*b,t[14]=(p*a*i-s*m*i-p*n*o+e*m*o+s*n*f-e*a*f)*b,t[15]=(s*h*i-c*a*i+c*n*o-e*h*o-s*n*u+e*a*u)*b,this}scale(t){const e=this.elements,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,a=t.y,o=t.z,l=r*s,c=r*a;return this.set(l*s+n,l*a-i*o,l*o+i*a,0,l*a+i*o,c*a+n,c*o-i*s,0,l*o-i*a,c*o+i*s,r*o*o+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,s){return this.set(1,n,r,0,t,1,s,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){const i=this.elements,r=e._x,s=e._y,a=e._z,o=e._w,l=r+r,c=s+s,h=a+a,u=r*l,d=r*c,p=r*h,m=s*c,f=s*h,g=a*h,v=o*l,y=o*c,x=o*h,_=n.x,M=n.y,b=n.z;return i[0]=(1-(m+g))*_,i[1]=(d+x)*_,i[2]=(p-y)*_,i[3]=0,i[4]=(d-x)*M,i[5]=(1-(u+g))*M,i[6]=(f+v)*M,i[7]=0,i[8]=(p+y)*b,i[9]=(f-v)*b,i[10]=(1-(u+m))*b,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.elements;let r=Vi.set(i[0],i[1],i[2]).length();const s=Vi.set(i[4],i[5],i[6]).length(),a=Vi.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],Wi.copy(this);const o=1/r,l=1/s,c=1/a;return Wi.elements[0]*=o,Wi.elements[1]*=o,Wi.elements[2]*=o,Wi.elements[4]*=l,Wi.elements[5]*=l,Wi.elements[6]*=l,Wi.elements[8]*=c,Wi.elements[9]*=c,Wi.elements[10]*=c,e.setFromRotationMatrix(Wi),n.x=r,n.y=s,n.z=a,this}makePerspective(t,e,n,i,r,s){void 0===s&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,o=2*r/(e-t),l=2*r/(n-i),c=(e+t)/(e-t),h=(n+i)/(n-i),u=-(s+r)/(s-r),d=-2*s*r/(s-r);return a[0]=o,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=h,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,n,i,r,s){const a=this.elements,o=1/(e-t),l=1/(n-i),c=1/(s-r),h=(e+t)*o,u=(n+i)*l,d=(s+r)*c;return a[0]=2*o,a[4]=0,a[8]=0,a[12]=-h,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<16;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}ki.prototype.isMatrix4=!0;const Vi=new ui,Wi=new ki,ji=new ui(0,0,0),qi=new ui(1,1,1),Xi=new ui,Yi=new ui,Zi=new ui,Ji=new ki,Qi=new hi;class Ki{constructor(t=0,e=0,n=0,i=Ki.DefaultOrder){this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){const i=t.elements,r=i[0],s=i[4],a=i[8],o=i[1],l=i[5],c=i[9],h=i[2],u=i[6],d=i[10];switch(e){case"XYZ":this._y=Math.asin(Gn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Gn(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(Gn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(o,r));break;case"ZYX":this._y=Math.asin(-Gn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(o,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(Gn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-Gn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===n&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return Ji.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Ji,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return Qi.setFromEuler(this),this.setFromQuaternion(Qi,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}toVector3(t){return t?t.set(this._x,this._y,this._z):new ui(this._x,this._y,this._z)}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}}Ki.prototype.isEuler=!0,Ki.DefaultOrder="XYZ",Ki.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class $i{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return 0!=(this.mask&t.mask)}isEnabled(t){return 0!=(this.mask&(1<<t|0))}}let tr=0;const er=new ui,nr=new hi,ir=new ki,rr=new ui,sr=new ui,ar=new ui,or=new hi,lr=new ui(1,0,0),cr=new ui(0,1,0),hr=new ui(0,0,1),ur={type:"added"},dr={type:"removed"};class pr extends zn{constructor(){super(),Object.defineProperty(this,"id",{value:tr++}),this.uuid=Hn(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=pr.DefaultUp.clone();const t=new ui,e=new Ki,n=new hi,i=new ui(1,1,1);e._onChange((function(){n.setFromEuler(e,!1)})),n._onChange((function(){e.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new ki},normalMatrix:{value:new Zn}}),this.matrix=new ki,this.matrixWorld=new ki,this.matrixAutoUpdate=pr.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new $i,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return nr.setFromAxisAngle(t,e),this.quaternion.multiply(nr),this}rotateOnWorldAxis(t,e){return nr.setFromAxisAngle(t,e),this.quaternion.premultiply(nr),this}rotateX(t){return this.rotateOnAxis(lr,t)}rotateY(t){return this.rotateOnAxis(cr,t)}rotateZ(t){return this.rotateOnAxis(hr,t)}translateOnAxis(t,e){return er.copy(t).applyQuaternion(this.quaternion),this.position.add(er.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(lr,t)}translateY(t){return this.translateOnAxis(cr,t)}translateZ(t){return this.translateOnAxis(hr,t)}localToWorld(t){return t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return t.applyMatrix4(ir.copy(this.matrixWorld).invert())}lookAt(t,e,n){t.isVector3?rr.copy(t):rr.set(t,e,n);const i=this.parent;this.updateWorldMatrix(!0,!1),sr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ir.lookAt(sr,rr,this.up):ir.lookAt(rr,sr,this.up),this.quaternion.setFromRotationMatrix(ir),i&&(ir.extractRotation(i.matrixWorld),nr.setFromRotationMatrix(ir),this.quaternion.premultiply(nr.invert()))}add(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.dispatchEvent(ur)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}const e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(dr)),this}removeFromParent(){const t=this.parent;return null!==t&&t.remove(this),this}clear(){for(let t=0;t<this.children.length;t++){const e=this.children[t];e.parent=null,e.dispatchEvent(dr)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),ir.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),ir.multiply(t.parent.matrixWorld)),t.applyMatrix4(ir),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,i=this.children.length;n<i;n++){const i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(sr,t,ar),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(sr,or,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverse(t)}traverseVisible(t){if(!1===this.visible)return;t(this);const e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverseVisible(t)}traverseAncestors(t){const e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].updateMatrixWorld(t)}updateWorldMatrix(t,e){const n=this.parent;if(!0===t&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===e){const t=this.children;for(let e=0,n=t.length;e<n;e++)t[e].updateWorldMatrix(!1,!0)}}toJSON(t){const e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const i={};function r(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),!0===this.castShadow&&(i.castShadow=!0),!0===this.receiveShadow&&(i.receiveShadow=!0),!1===this.visible&&(i.visible=!1),!1===this.frustumCulled&&(i.frustumCulled=!1),0!==this.renderOrder&&(i.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(i.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const n=e.shapes;if(Array.isArray(n))for(let e=0,i=n.length;e<i;e++){const i=n[e];r(t.shapes,i)}else r(t.shapes,n)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(r(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const e=[];for(let n=0,i=this.material.length;n<i;n++)e.push(r(t.materials,this.material[n]));i.material=e}else i.material=r(t.materials,this.material);if(this.children.length>0){i.children=[];for(let e=0;e<this.children.length;e++)i.children.push(this.children[e].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let e=0;e<this.animations.length;e++){const n=this.animations[e];i.animations.push(r(t.animations,n))}}if(e){const e=s(t.geometries),i=s(t.materials),r=s(t.textures),a=s(t.images),o=s(t.shapes),l=s(t.skeletons),c=s(t.animations);e.length>0&&(n.geometries=e),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),a.length>0&&(n.images=a),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c)}return n.object=i,n;function s(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e<t.children.length;e++){const n=t.children[e];this.add(n.clone())}return this}}pr.DefaultUp=new ui(0,1,0),pr.DefaultMatrixAutoUpdate=!0,pr.prototype.isObject3D=!0;const mr=new ui,fr=new ui,gr=new ui,vr=new ui,yr=new ui,xr=new ui,_r=new ui,Mr=new ui,br=new ui,wr=new ui;class Sr{constructor(t=new ui,e=new ui,n=new ui){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,i){i.subVectors(n,e),mr.subVectors(t,e),i.cross(mr);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(t,e,n,i,r){mr.subVectors(i,e),fr.subVectors(n,e),gr.subVectors(t,e);const s=mr.dot(mr),a=mr.dot(fr),o=mr.dot(gr),l=fr.dot(fr),c=fr.dot(gr),h=s*l-a*a;if(0===h)return r.set(-2,-1,-1);const u=1/h,d=(l*o-a*c)*u,p=(s*c-a*o)*u;return r.set(1-d-p,p,d)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,vr),vr.x>=0&&vr.y>=0&&vr.x+vr.y<=1}static getUV(t,e,n,i,r,s,a,o){return this.getBarycoord(t,e,n,i,vr),o.set(0,0),o.addScaledVector(r,vr.x),o.addScaledVector(s,vr.y),o.addScaledVector(a,vr.z),o}static isFrontFacing(t,e,n,i){return mr.subVectors(n,e),fr.subVectors(t,e),mr.cross(fr).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return mr.subVectors(this.c,this.b),fr.subVectors(this.a,this.b),.5*mr.cross(fr).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Sr.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Sr.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,i,r){return Sr.getUV(t,this.a,this.b,this.c,e,n,i,r)}containsPoint(t){return Sr.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Sr.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const n=this.a,i=this.b,r=this.c;let s,a;yr.subVectors(i,n),xr.subVectors(r,n),Mr.subVectors(t,n);const o=yr.dot(Mr),l=xr.dot(Mr);if(o<=0&&l<=0)return e.copy(n);br.subVectors(t,i);const c=yr.dot(br),h=xr.dot(br);if(c>=0&&h<=c)return e.copy(i);const u=o*h-c*l;if(u<=0&&o>=0&&c<=0)return s=o/(o-c),e.copy(n).addScaledVector(yr,s);wr.subVectors(t,r);const d=yr.dot(wr),p=xr.dot(wr);if(p>=0&&d<=p)return e.copy(r);const m=d*l-o*p;if(m<=0&&l>=0&&p<=0)return a=l/(l-p),e.copy(n).addScaledVector(xr,a);const f=c*p-d*h;if(f<=0&&h-c>=0&&d-p>=0)return _r.subVectors(r,i),a=(h-c)/(h-c+(d-p)),e.copy(i).addScaledVector(_r,a);const g=1/(f+m+u);return s=m*g,a=u*g,e.copy(n).addScaledVector(yr,s).addScaledVector(xr,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}let Tr=0;class Er extends zn{constructor(){super(),Object.defineProperty(this,"id",{value:Tr++}),this.uuid=Hn(),this.name="",this.type="Material",this.fog=!0,this.blending=_,this.side=m,this.vertexColors=!1,this.opacity=1,this.format=Ft,this.transparent=!1,this.blendSrc=N,this.blendDst=z,this.blendEquation=T,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=W,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=wn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=cn,this.stencilZFail=cn,this.stencilZPass=cn,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===n){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}if("shading"===e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===v;continue}const i=this[e];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function i(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==_&&(n.blending=this.blending),this.side!==m&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.format!==Ft&&(n.format=this.format),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){const e=i(t.textures),r=i(t.images);e.length>0&&(n.textures=e),r.length>0&&(n.images=r)}return n}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.format=t.format,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let n=null;if(null!==e){const t=e.length;n=new Array(t);for(let i=0;i!==t;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}Er.prototype.isMaterial=!0;const Ar={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Lr={h:0,s:0,l:0},Rr={h:0,s:0,l:0};function Cr(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}function Pr(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function Dr(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}class Ir{constructor(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}set(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this}setRGB(t,e,n){return this.r=t,this.g=e,this.b=n,this}setHSL(t,e,n){if(t=kn(t,1),e=Gn(e,0,1),n=Gn(n,0,1),0===e)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+e):n+e-n*e,r=2*n-i;this.r=Cr(r,i,t+1/3),this.g=Cr(r,i,t),this.b=Cr(r,i,t-1/3)}return this}setStyle(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let t;const i=n[1],r=n[2];switch(i){case"rgb":case"rgba":if(t=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(255,parseInt(t[1],10))/255,this.g=Math.min(255,parseInt(t[2],10))/255,this.b=Math.min(255,parseInt(t[3],10))/255,e(t[4]),this;if(t=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(100,parseInt(t[1],10))/100,this.g=Math.min(100,parseInt(t[2],10))/100,this.b=Math.min(100,parseInt(t[3],10))/100,e(t[4]),this;break;case"hsl":case"hsla":if(t=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r)){const n=parseFloat(t[1])/360,i=parseInt(t[2],10)/100,r=parseInt(t[3],10)/100;return e(t[4]),this.setHSL(n,i,r)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){const t=n[1],e=t.length;if(3===e)return this.r=parseInt(t.charAt(0)+t.charAt(0),16)/255,this.g=parseInt(t.charAt(1)+t.charAt(1),16)/255,this.b=parseInt(t.charAt(2)+t.charAt(2),16)/255,this;if(6===e)return this.r=parseInt(t.charAt(0)+t.charAt(1),16)/255,this.g=parseInt(t.charAt(2)+t.charAt(3),16)/255,this.b=parseInt(t.charAt(4)+t.charAt(5),16)/255,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=Ar[t.toLowerCase()];return void 0!==e?this.setHex(e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copyGammaToLinear(t,e=2){return this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this}copyLinearToGamma(t,e=2){const n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.r=Pr(t.r),this.g=Pr(t.g),this.b=Pr(t.b),this}copyLinearToSRGB(t){return this.r=Dr(t.r),this.g=Dr(t.g),this.b=Dr(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(t){const e=this.r,n=this.g,i=this.b,r=Math.max(e,n,i),s=Math.min(e,n,i);let a,o;const l=(s+r)/2;if(s===r)a=0,o=0;else{const t=r-s;switch(o=l<=.5?t/(r+s):t/(2-r-s),r){case e:a=(n-i)/t+(n<i?6:0);break;case n:a=(i-e)/t+2;break;case i:a=(e-n)/t+4}a/=6}return t.h=a,t.s=o,t.l=l,t}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(t,e,n){return this.getHSL(Lr),Lr.h+=t,Lr.s+=e,Lr.l+=n,this.setHSL(Lr.h,Lr.s,Lr.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Lr),t.getHSL(Rr);const n=Vn(Lr.h,Rr.h,e),i=Vn(Lr.s,Rr.s,e),r=Vn(Lr.l,Rr.l,e);return this.setHSL(n,i,r),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),!0===t.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}Ir.NAMES=Ar,Ir.prototype.isColor=!0,Ir.prototype.r=1,Ir.prototype.g=1,Ir.prototype.b=1;class Nr extends Er{constructor(t){super(),this.type="MeshBasicMaterial",this.color=new Ir(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Z,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}}Nr.prototype.isMeshBasicMaterial=!0;const zr=new ui,Or=new Yn;class Br{constructor(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.usage=Sn,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}copyColorsArray(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i),r=new Ir),e[n++]=r.r,e[n++]=r.g,e[n++]=r.b}return this}copyVector2sArray(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i),r=new Yn),e[n++]=r.x,e[n++]=r.y}return this}copyVector3sArray(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i),r=new ui),e[n++]=r.x,e[n++]=r.y,e[n++]=r.z}return this}copyVector4sArray(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i),r=new ai),e[n++]=r.x,e[n++]=r.y,e[n++]=r.z,e[n++]=r.w}return this}applyMatrix3(t){if(2===this.itemSize)for(let e=0,n=this.count;e<n;e++)Or.fromBufferAttribute(this,e),Or.applyMatrix3(t),this.setXY(e,Or.x,Or.y);else if(3===this.itemSize)for(let e=0,n=this.count;e<n;e++)zr.fromBufferAttribute(this,e),zr.applyMatrix3(t),this.setXYZ(e,zr.x,zr.y,zr.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)zr.x=this.getX(e),zr.y=this.getY(e),zr.z=this.getZ(e),zr.applyMatrix4(t),this.setXYZ(e,zr.x,zr.y,zr.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)zr.x=this.getX(e),zr.y=this.getY(e),zr.z=this.getZ(e),zr.applyNormalMatrix(t),this.setXYZ(e,zr.x,zr.y,zr.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)zr.x=this.getX(e),zr.y=this.getY(e),zr.z=this.getZ(e),zr.transformDirection(t),this.setXYZ(e,zr.x,zr.y,zr.z);return this}set(t,e=0){return this.array.set(t,e),this}getX(t){return this.array[t*this.itemSize]}setX(t,e){return this.array[t*this.itemSize]=e,this}getY(t){return this.array[t*this.itemSize+1]}setY(t,e){return this.array[t*this.itemSize+1]=e,this}getZ(t){return this.array[t*this.itemSize+2]}setZ(t,e){return this.array[t*this.itemSize+2]=e,this}getW(t){return this.array[t*this.itemSize+3]}setW(t,e){return this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=r,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(t.name=this.name),this.usage!==Sn&&(t.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(t.updateRange=this.updateRange),t}}Br.prototype.isBufferAttribute=!0;class Fr extends Br{constructor(t,e,n){super(new Int8Array(t),e,n)}}class Ur extends Br{constructor(t,e,n){super(new Uint8Array(t),e,n)}}class Hr extends Br{constructor(t,e,n){super(new Uint8ClampedArray(t),e,n)}}class Gr extends Br{constructor(t,e,n){super(new Int16Array(t),e,n)}}class kr extends Br{constructor(t,e,n){super(new Uint16Array(t),e,n)}}class Vr extends Br{constructor(t,e,n){super(new Int32Array(t),e,n)}}class Wr extends Br{constructor(t,e,n){super(new Uint32Array(t),e,n)}}class jr extends Br{constructor(t,e,n){super(new Uint16Array(t),e,n)}}jr.prototype.isFloat16BufferAttribute=!0;class qr extends Br{constructor(t,e,n){super(new Float32Array(t),e,n)}}class Xr extends Br{constructor(t,e,n){super(new Float64Array(t),e,n)}}let Yr=0;const Zr=new ki,Jr=new pr,Qr=new ui,Kr=new mi,$r=new mi,ts=new ui;class es extends zn{constructor(){super(),Object.defineProperty(this,"id",{value:Yr++}),this.uuid=Hn(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(Jn(t)>65535?Wr:kr)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return void 0!==this.attributes[t]}addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;void 0!==e&&(e.applyMatrix4(t),e.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const e=(new Zn).getNormalMatrix(t);n.applyNormalMatrix(e),n.needsUpdate=!0}const i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(t),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(t){return Zr.makeRotationFromQuaternion(t),this.applyMatrix4(Zr),this}rotateX(t){return Zr.makeRotationX(t),this.applyMatrix4(Zr),this}rotateY(t){return Zr.makeRotationY(t),this.applyMatrix4(Zr),this}rotateZ(t){return Zr.makeRotationZ(t),this.applyMatrix4(Zr),this}translate(t,e,n){return Zr.makeTranslation(t,e,n),this.applyMatrix4(Zr),this}scale(t,e,n){return Zr.makeScale(t,e,n),this.applyMatrix4(Zr),this}lookAt(t){return Jr.lookAt(t),Jr.updateMatrix(),this.applyMatrix4(Jr.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Qr).negate(),this.translate(Qr.x,Qr.y,Qr.z),this}setFromPoints(t){const e=[];for(let n=0,i=t.length;n<i;n++){const i=t[n];e.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new qr(e,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new mi);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new ui(-1/0,-1/0,-1/0),new ui(1/0,1/0,1/0));if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];Kr.setFromBufferAttribute(n),this.morphTargetsRelative?(ts.addVectors(this.boundingBox.min,Kr.min),this.boundingBox.expandByPoint(ts),ts.addVectors(this.boundingBox.max,Kr.max),this.boundingBox.expandByPoint(ts)):(this.boundingBox.expandByPoint(Kr.min),this.boundingBox.expandByPoint(Kr.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Ii);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new ui,1/0);if(t){const n=this.boundingSphere.center;if(Kr.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];$r.setFromBufferAttribute(n),this.morphTargetsRelative?(ts.addVectors(Kr.min,$r.min),Kr.expandByPoint(ts),ts.addVectors(Kr.max,$r.max),Kr.expandByPoint(ts)):(Kr.expandByPoint($r.min),Kr.expandByPoint($r.max))}Kr.getCenter(n);let i=0;for(let e=0,r=t.count;e<r;e++)ts.fromBufferAttribute(t,e),i=Math.max(i,n.distanceToSquared(ts));if(e)for(let r=0,s=e.length;r<s;r++){const s=e[r],a=this.morphTargetsRelative;for(let e=0,r=s.count;e<r;e++)ts.fromBufferAttribute(s,e),a&&(Qr.fromBufferAttribute(t,e),ts.add(Qr)),i=Math.max(i,n.distanceToSquared(ts))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const t=this.index,e=this.attributes;if(null===t||void 0===e.position||void 0===e.normal||void 0===e.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=t.array,i=e.position.array,r=e.normal.array,s=e.uv.array,a=i.length/3;void 0===e.tangent&&this.setAttribute("tangent",new Br(new Float32Array(4*a),4));const o=e.tangent.array,l=[],c=[];for(let t=0;t<a;t++)l[t]=new ui,c[t]=new ui;const h=new ui,u=new ui,d=new ui,p=new Yn,m=new Yn,f=new Yn,g=new ui,v=new ui;function y(t,e,n){h.fromArray(i,3*t),u.fromArray(i,3*e),d.fromArray(i,3*n),p.fromArray(s,2*t),m.fromArray(s,2*e),f.fromArray(s,2*n),u.sub(h),d.sub(h),m.sub(p),f.sub(p);const r=1/(m.x*f.y-f.x*m.y);isFinite(r)&&(g.copy(u).multiplyScalar(f.y).addScaledVector(d,-m.y).multiplyScalar(r),v.copy(d).multiplyScalar(m.x).addScaledVector(u,-f.x).multiplyScalar(r),l[t].add(g),l[e].add(g),l[n].add(g),c[t].add(v),c[e].add(v),c[n].add(v))}let x=this.groups;0===x.length&&(x=[{start:0,count:n.length}]);for(let t=0,e=x.length;t<e;++t){const e=x[t],i=e.start;for(let t=i,r=i+e.count;t<r;t+=3)y(n[t+0],n[t+1],n[t+2])}const _=new ui,M=new ui,b=new ui,w=new ui;function S(t){b.fromArray(r,3*t),w.copy(b);const e=l[t];_.copy(e),_.sub(b.multiplyScalar(b.dot(e))).normalize(),M.crossVectors(w,e);const n=M.dot(c[t])<0?-1:1;o[4*t]=_.x,o[4*t+1]=_.y,o[4*t+2]=_.z,o[4*t+3]=n}for(let t=0,e=x.length;t<e;++t){const e=x[t],i=e.start;for(let t=i,r=i+e.count;t<r;t+=3)S(n[t+0]),S(n[t+1]),S(n[t+2])}}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(void 0!==e){let n=this.getAttribute("normal");if(void 0===n)n=new Br(new Float32Array(3*e.count),3),this.setAttribute("normal",n);else for(let t=0,e=n.count;t<e;t++)n.setXYZ(t,0,0,0);const i=new ui,r=new ui,s=new ui,a=new ui,o=new ui,l=new ui,c=new ui,h=new ui;if(t)for(let u=0,d=t.count;u<d;u+=3){const d=t.getX(u+0),p=t.getX(u+1),m=t.getX(u+2);i.fromBufferAttribute(e,d),r.fromBufferAttribute(e,p),s.fromBufferAttribute(e,m),c.subVectors(s,r),h.subVectors(i,r),c.cross(h),a.fromBufferAttribute(n,d),o.fromBufferAttribute(n,p),l.fromBufferAttribute(n,m),a.add(c),o.add(c),l.add(c),n.setXYZ(d,a.x,a.y,a.z),n.setXYZ(p,o.x,o.y,o.z),n.setXYZ(m,l.x,l.y,l.z)}else for(let t=0,a=e.count;t<a;t+=3)i.fromBufferAttribute(e,t+0),r.fromBufferAttribute(e,t+1),s.fromBufferAttribute(e,t+2),c.subVectors(s,r),h.subVectors(i,r),c.cross(h),n.setXYZ(t+0,c.x,c.y,c.z),n.setXYZ(t+1,c.x,c.y,c.z),n.setXYZ(t+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(t,e){if(!t||!t.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const i in n){if(void 0===t.attributes[i])continue;const r=n[i].array,s=t.attributes[i],a=s.array,o=s.itemSize*e,l=Math.min(a.length,r.length-o);for(let t=0,e=o;t<l;t++,e++)r[e]=a[t]}return this}normalizeNormals(){const t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)ts.fromBufferAttribute(t,e),ts.normalize(),t.setXYZ(e,ts.x,ts.y,ts.z)}toNonIndexed(){function t(t,e){const n=t.array,i=t.itemSize,r=t.normalized,s=new n.constructor(e.length*i);let a=0,o=0;for(let r=0,l=e.length;r<l;r++){a=t.isInterleavedBufferAttribute?e[r]*t.data.stride+t.offset:e[r]*i;for(let t=0;t<i;t++)s[o++]=n[a++]}return new Br(s,i,r)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new es,n=this.index.array,i=this.attributes;for(const r in i){const s=t(i[r],n);e.setAttribute(r,s)}const r=this.morphAttributes;for(const i in r){const s=[],a=r[i];for(let e=0,i=a.length;e<i;e++){const i=t(a[e],n);s.push(i)}e.morphAttributes[i]=s}e.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let t=0,n=s.length;t<n;t++){const n=s[t];e.addGroup(n.start,n.count,n.materialIndex)}return e}toJSON(){const t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const n=this.attributes;for(const e in n){const i=n[e];t.data.attributes[e]=i.toJSON(t.data)}const i={};let r=!1;for(const e in this.morphAttributes){const n=this.morphAttributes[e],s=[];for(let e=0,i=n.length;e<i;e++){const i=n[e];s.push(i.toJSON(t.data))}s.length>0&&(i[e]=s,r=!0)}r&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const n=t.index;null!==n&&this.setIndex(n.clone(e));const i=t.attributes;for(const t in i){const n=i[t];this.setAttribute(t,n.clone(e))}const r=t.morphAttributes;for(const t in r){const n=[],i=r[t];for(let t=0,r=i.length;t<r;t++)n.push(i[t].clone(e));this.morphAttributes[t]=n}this.morphTargetsRelative=t.morphTargetsRelative;const s=t.groups;for(let t=0,e=s.length;t<e;t++){const e=s[t];this.addGroup(e.start,e.count,e.materialIndex)}const a=t.boundingBox;null!==a&&(this.boundingBox=a.clone());const o=t.boundingSphere;return null!==o&&(this.boundingSphere=o.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,void 0!==t.parameters&&(this.parameters=Object.assign({},t.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}}es.prototype.isBufferGeometry=!0;const ns=new ki,is=new Gi,rs=new Ii,ss=new ui,as=new ui,os=new ui,ls=new ui,cs=new ui,hs=new ui,us=new ui,ds=new ui,ps=new ui,ms=new Yn,fs=new Yn,gs=new Yn,vs=new ui,ys=new ui;class xs extends pr{constructor(t=new es,e=new Nr){super(),this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t){return super.copy(t),void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=t.material,this.geometry=t.geometry,this}updateMorphTargets(){const t=this.geometry;if(t.isBufferGeometry){const e=t.morphAttributes,n=Object.keys(e);if(n.length>0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e<n;e++){const n=t[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}}}else{const e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(t,e){const n=this.geometry,i=this.material,r=this.matrixWorld;if(void 0===i)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),rs.copy(n.boundingSphere),rs.applyMatrix4(r),!1===t.ray.intersectsSphere(rs))return;if(ns.copy(r).invert(),is.copy(t.ray).applyMatrix4(ns),null!==n.boundingBox&&!1===is.intersectsBox(n.boundingBox))return;let s;if(n.isBufferGeometry){const r=n.index,a=n.attributes.position,o=n.morphAttributes.position,l=n.morphTargetsRelative,c=n.attributes.uv,h=n.attributes.uv2,u=n.groups,d=n.drawRange;if(null!==r)if(Array.isArray(i))for(let n=0,p=u.length;n<p;n++){const p=u[n],m=i[p.materialIndex];for(let n=Math.max(p.start,d.start),i=Math.min(r.count,Math.min(p.start+p.count,d.start+d.count));n<i;n+=3){const i=r.getX(n),u=r.getX(n+1),d=r.getX(n+2);s=_s(this,m,t,is,a,o,l,c,h,i,u,d),s&&(s.faceIndex=Math.floor(n/3),s.face.materialIndex=p.materialIndex,e.push(s))}}else for(let n=Math.max(0,d.start),u=Math.min(r.count,d.start+d.count);n<u;n+=3){const u=r.getX(n),d=r.getX(n+1),p=r.getX(n+2);s=_s(this,i,t,is,a,o,l,c,h,u,d,p),s&&(s.faceIndex=Math.floor(n/3),e.push(s))}else if(void 0!==a)if(Array.isArray(i))for(let n=0,r=u.length;n<r;n++){const r=u[n],p=i[r.materialIndex];for(let n=Math.max(r.start,d.start),i=Math.min(a.count,Math.min(r.start+r.count,d.start+d.count));n<i;n+=3)s=_s(this,p,t,is,a,o,l,c,h,n,n+1,n+2),s&&(s.faceIndex=Math.floor(n/3),s.face.materialIndex=r.materialIndex,e.push(s))}else for(let n=Math.max(0,d.start),r=Math.min(a.count,d.start+d.count);n<r;n+=3)s=_s(this,i,t,is,a,o,l,c,h,n,n+1,n+2),s&&(s.faceIndex=Math.floor(n/3),e.push(s))}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function _s(t,e,n,i,r,s,a,o,l,c,h,u){ss.fromBufferAttribute(r,c),as.fromBufferAttribute(r,h),os.fromBufferAttribute(r,u);const d=t.morphTargetInfluences;if(s&&d){us.set(0,0,0),ds.set(0,0,0),ps.set(0,0,0);for(let t=0,e=s.length;t<e;t++){const e=d[t],n=s[t];0!==e&&(ls.fromBufferAttribute(n,c),cs.fromBufferAttribute(n,h),hs.fromBufferAttribute(n,u),a?(us.addScaledVector(ls,e),ds.addScaledVector(cs,e),ps.addScaledVector(hs,e)):(us.addScaledVector(ls.sub(ss),e),ds.addScaledVector(cs.sub(as),e),ps.addScaledVector(hs.sub(os),e)))}ss.add(us),as.add(ds),os.add(ps)}t.isSkinnedMesh&&(t.boneTransform(c,ss),t.boneTransform(h,as),t.boneTransform(u,os));const p=function(t,e,n,i,r,s,a,o){let l;if(l=e.side===f?i.intersectTriangle(a,s,r,!0,o):i.intersectTriangle(r,s,a,e.side!==g,o),null===l)return null;ys.copy(o),ys.applyMatrix4(t.matrixWorld);const c=n.ray.origin.distanceTo(ys);return c<n.near||c>n.far?null:{distance:c,point:ys.clone(),object:t}}(t,e,n,i,ss,as,os,vs);if(p){o&&(ms.fromBufferAttribute(o,c),fs.fromBufferAttribute(o,h),gs.fromBufferAttribute(o,u),p.uv=Sr.getUV(vs,ss,as,os,ms,fs,gs,new Yn)),l&&(ms.fromBufferAttribute(l,c),fs.fromBufferAttribute(l,h),gs.fromBufferAttribute(l,u),p.uv2=Sr.getUV(vs,ss,as,os,ms,fs,gs,new Yn));const t={a:c,b:h,c:u,normal:new ui,materialIndex:0};Sr.getNormal(ss,as,os,t.normal),p.face=t}return p}xs.prototype.isMesh=!0;class Ms extends es{constructor(t=1,e=1,n=1,i=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:r,depthSegments:s};const a=this;i=Math.floor(i),r=Math.floor(r),s=Math.floor(s);const o=[],l=[],c=[],h=[];let u=0,d=0;function p(t,e,n,i,r,s,p,m,f,g,v){const y=s/f,x=p/g,_=s/2,M=p/2,b=m/2,w=f+1,S=g+1;let T=0,E=0;const A=new ui;for(let s=0;s<S;s++){const a=s*x-M;for(let o=0;o<w;o++){const u=o*y-_;A[t]=u*i,A[e]=a*r,A[n]=b,l.push(A.x,A.y,A.z),A[t]=0,A[e]=0,A[n]=m>0?1:-1,c.push(A.x,A.y,A.z),h.push(o/f),h.push(1-s/g),T+=1}}for(let t=0;t<g;t++)for(let e=0;e<f;e++){const n=u+e+w*t,i=u+e+w*(t+1),r=u+(e+1)+w*(t+1),s=u+(e+1)+w*t;o.push(n,i,s),o.push(i,r,s),E+=6}a.addGroup(d,E,v),d+=E,u+=T}p("z","y","x",-1,-1,n,e,t,s,r,0),p("z","y","x",1,-1,n,e,-t,s,r,1),p("x","z","y",1,1,t,n,e,i,s,2),p("x","z","y",1,-1,t,n,-e,i,s,3),p("x","y","z",1,-1,t,e,n,i,r,4),p("x","y","z",-1,-1,t,e,-n,i,r,5),this.setIndex(o),this.setAttribute("position",new qr(l,3)),this.setAttribute("normal",new qr(c,3)),this.setAttribute("uv",new qr(h,2))}static fromJSON(t){return new Ms(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}function bs(t){const e={};for(const n in t){e[n]={};for(const i in t[n]){const r=t[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?e[n][i]=r.clone():Array.isArray(r)?e[n][i]=r.slice():e[n][i]=r}}return e}function ws(t){const e={};for(let n=0;n<t.length;n++){const i=bs(t[n]);for(const t in i)e[t]=i[t]}return e}const Ss={clone:bs,merge:ws};class Ts extends Er{constructor(t){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=bs(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){const e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uniforms={};for(const n in this.uniforms){const i=this.uniforms[n].value;i&&i.isTexture?e.uniforms[n]={type:"t",value:i.toJSON(t).uuid}:i&&i.isColor?e.uniforms[n]={type:"c",value:i.getHex()}:i&&i.isVector2?e.uniforms[n]={type:"v2",value:i.toArray()}:i&&i.isVector3?e.uniforms[n]={type:"v3",value:i.toArray()}:i&&i.isVector4?e.uniforms[n]={type:"v4",value:i.toArray()}:i&&i.isMatrix3?e.uniforms[n]={type:"m3",value:i.toArray()}:i&&i.isMatrix4?e.uniforms[n]={type:"m4",value:i.toArray()}:e.uniforms[n]={value:i}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;const n={};for(const t in this.extensions)!0===this.extensions[t]&&(n[t]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}}Ts.prototype.isShaderMaterial=!0;class Es extends pr{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new ki,this.projectionMatrix=new ki,this.projectionMatrixInverse=new ki}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}Es.prototype.isCamera=!0;class As extends Es{constructor(t=50,e=1,n=.1,i=2e3){super(),this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*Un*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Fn*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*Un*Math.atan(Math.tan(.5*Fn*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,n,i,r,s){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*Fn*this.fov)/this.zoom,n=2*e,i=this.aspect*n,r=-.5*i;const s=this.view;if(null!==this.view&&this.view.enabled){const t=s.fullWidth,a=s.fullHeight;r+=s.offsetX*i/t,e-=s.offsetY*n/a,i*=s.width/t,n*=s.height/a}const a=this.filmOffset;0!==a&&(r+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,e,e-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}As.prototype.isPerspectiveCamera=!0;const Ls=90;class Rs extends pr{constructor(t,e,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const i=new As(Ls,1,t,e);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new ui(1,0,0)),this.add(i);const r=new As(Ls,1,t,e);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new ui(-1,0,0)),this.add(r);const s=new As(Ls,1,t,e);s.layers=this.layers,s.up.set(0,0,1),s.lookAt(new ui(0,1,0)),this.add(s);const a=new As(Ls,1,t,e);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new ui(0,-1,0)),this.add(a);const o=new As(Ls,1,t,e);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new ui(0,0,1)),this.add(o);const l=new As(Ls,1,t,e);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new ui(0,0,-1)),this.add(l)}update(t,e){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[i,r,s,a,o,l]=this.children,c=t.xr.enabled,h=t.getRenderTarget();t.xr.enabled=!1;const u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(e,i),t.setRenderTarget(n,1),t.render(e,r),t.setRenderTarget(n,2),t.render(e,s),t.setRenderTarget(n,3),t.render(e,a),t.setRenderTarget(n,4),t.render(e,o),n.texture.generateMipmaps=u,t.setRenderTarget(n,5),t.render(e,l),t.setRenderTarget(h),t.xr.enabled=c}}class Cs extends ri{constructor(t,e,n,i,r,s,a,o,l,c){super(t=void 0!==t?t:[],e=void 0!==e?e:st,n,i,r,s,a,o,l,c),this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}Cs.prototype.isCubeTexture=!0;class Ps extends oi{constructor(t,e,n){Number.isInteger(e)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),e=n),super(t,t,e),e=e||{},this.texture=new Cs(void 0,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:xt,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.format=Ft,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const n={tEquirect:{value:null}},i="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",r="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",s=new Ms(5,5,5),a=new Ts({name:"CubemapFromEquirect",uniforms:bs(n),vertexShader:i,fragmentShader:r,side:f,blending:x});a.uniforms.tEquirect.value=e;const o=new xs(s,a),l=e.minFilter;return e.minFilter===bt&&(e.minFilter=xt),new Rs(1,10,this).update(t,o),e.minFilter=l,o.geometry.dispose(),o.material.dispose(),this}clear(t,e,n,i){const r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,n,i);t.setRenderTarget(r)}}Ps.prototype.isWebGLCubeRenderTarget=!0;const Ds=new ui,Is=new ui,Ns=new Zn;class zs{constructor(t=new ui(1,0,0),e=0){this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){const i=Ds.subVectors(n,e).cross(Is.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){const n=t.delta(Ds),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:e.copy(n).multiplyScalar(r).add(t.start)}intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||Ns.getNormalMatrix(t),i=this.coplanarPoint(Ds).applyMatrix4(t),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}zs.prototype.isPlane=!0;const Os=new Ii,Bs=new ui;class Fs{constructor(t=new zs,e=new zs,n=new zs,i=new zs,r=new zs,s=new zs){this.planes=[t,e,n,i,r,s]}set(t,e,n,i,r,s){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(i),a[4].copy(r),a[5].copy(s),this}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){const e=this.planes,n=t.elements,i=n[0],r=n[1],s=n[2],a=n[3],o=n[4],l=n[5],c=n[6],h=n[7],u=n[8],d=n[9],p=n[10],m=n[11],f=n[12],g=n[13],v=n[14],y=n[15];return e[0].setComponents(a-i,h-o,m-u,y-f).normalize(),e[1].setComponents(a+i,h+o,m+u,y+f).normalize(),e[2].setComponents(a+r,h+l,m+d,y+g).normalize(),e[3].setComponents(a-r,h-l,m-d,y-g).normalize(),e[4].setComponents(a-s,h-c,m-p,y-v).normalize(),e[5].setComponents(a+s,h+c,m+p,y+v).normalize(),this}intersectsObject(t){const e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),Os.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(Os)}intersectsSprite(t){return Os.center.set(0,0,0),Os.radius=.7071067811865476,Os.applyMatrix4(t.matrixWorld),this.intersectsSphere(Os)}intersectsSphere(t){const e=this.planes,n=t.center,i=-t.radius;for(let t=0;t<6;t++)if(e[t].distanceToPoint(n)<i)return!1;return!0}intersectsBox(t){const e=this.planes;for(let n=0;n<6;n++){const i=e[n];if(Bs.x=i.normal.x>0?t.max.x:t.min.x,Bs.y=i.normal.y>0?t.max.y:t.min.y,Bs.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(Bs)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Us(){let t=null,e=!1,n=null,i=null;function r(e,s){n(e,s),i=t.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==n&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(t){n=t},setContext:function(e){t=e}}}function Hs(t,e){const n=e.isWebGL2,i=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),i.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);const n=i.get(e);n&&(t.deleteBuffer(n.buffer),i.delete(e))},update:function(e,r){if(e.isGLBufferAttribute){const t=i.get(e);return void((!t||t.version<e.version)&&i.set(e,{buffer:e.buffer,type:e.type,bytesPerElement:e.elementSize,version:e.version}))}e.isInterleavedBufferAttribute&&(e=e.data);const s=i.get(e);void 0===s?i.set(e,function(e,i){const r=e.array,s=e.usage,a=t.createBuffer();t.bindBuffer(i,a),t.bufferData(i,r,s),e.onUploadCallback();let o=5126;return r instanceof Float32Array?o=5126:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?e.isFloat16BufferAttribute?n?o=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):o=5123:r instanceof Int16Array?o=5122:r instanceof Uint32Array?o=5125:r instanceof Int32Array?o=5124:r instanceof Int8Array?o=5120:(r instanceof Uint8Array||r instanceof Uint8ClampedArray)&&(o=5121),{buffer:a,type:o,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(e,r)):s.version<e.version&&(function(e,i,r){const s=i.array,a=i.updateRange;t.bindBuffer(r,e),-1===a.count?t.bufferSubData(r,0,s):(n?t.bufferSubData(r,a.offset*s.BYTES_PER_ELEMENT,s,a.offset,a.count):t.bufferSubData(r,a.offset*s.BYTES_PER_ELEMENT,s.subarray(a.offset,a.offset+a.count)),a.count=-1)}(s.buffer,e,r),s.version=e.version)}}}class Gs extends es{constructor(t=1,e=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:i};const r=t/2,s=e/2,a=Math.floor(n),o=Math.floor(i),l=a+1,c=o+1,h=t/a,u=e/o,d=[],p=[],m=[],f=[];for(let t=0;t<c;t++){const e=t*u-s;for(let n=0;n<l;n++){const i=n*h-r;p.push(i,-e,0),m.push(0,0,1),f.push(n/a),f.push(1-t/o)}}for(let t=0;t<o;t++)for(let e=0;e<a;e++){const n=e+l*t,i=e+l*(t+1),r=e+1+l*(t+1),s=e+1+l*t;d.push(n,i,s),d.push(i,r,s)}this.setIndex(d),this.setAttribute("position",new qr(p,3)),this.setAttribute("normal",new qr(m,3)),this.setAttribute("uv",new qr(f,2))}static fromJSON(t){return new Gs(t.width,t.height,t.widthSegments,t.heightSegments)}}const ks={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec;\n\t\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\t\treflectVec = reflect( - viewDir, normal );\n\t\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\t#else\n\t\t\t\treflectVec = refract( - viewDir, normal, refractionRatio );\n\t\t\t#endif\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tlightMapIrradiance *= PI;\n\t#endif\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointLightInfo( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotLightInfo( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalLightInfo( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= specularColorMapTexelToLinear( texture2D( specularColorMap, vUv ) ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= sheenColorMapTexelToLinear( texture2D( sheenColorMap, vUv ) ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\tvec3 FssEss = specularColor * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] > 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1, 2 ) * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform vec2 morphTargetsTextureSize;\n\t\tvec3 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset, const in int stride ) {\n\t\t\tfloat texelIndex = float( vertexIndex * stride + offset );\n\t\t\tfloat y = floor( texelIndex / morphTargetsTextureSize.x );\n\t\t\tfloat x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tvec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex );\n\t\t\treturn texture( morphTargetsTexture, morphUV ).xyz;\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\t#ifndef USE_MORPHNORMALS\n\t\t\t\tif ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 1 ) * morphTargetInfluences[ i ];\n\t\t\t#else\n\t\t\t\tif ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 2 ) * morphTargetInfluences[ i ];\n\t\t\t#endif\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionAlpha = 1.0;\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );\n\ttransmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( float roughness, float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( vec2 fragCoord, float roughness, float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance ) {\n\t\tif ( attenuationDistance == 0.0 ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( vec3 n, vec3 v, float roughness, vec3 diffuseColor, vec3 specularColor, float specularF90,\n\t\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\n\t\tvec3 attenuationColor, float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},Vs={common:{diffuse:{value:new Ir(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Zn},uv2Transform:{value:new Zn},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Yn(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ir(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ir(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Zn}},sprite:{diffuse:{value:new Ir(16777215)},opacity:{value:1},center:{value:new Yn(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Zn}}},Ws={basic:{uniforms:ws([Vs.common,Vs.specularmap,Vs.envmap,Vs.aomap,Vs.lightmap,Vs.fog]),vertexShader:ks.meshbasic_vert,fragmentShader:ks.meshbasic_frag},lambert:{uniforms:ws([Vs.common,Vs.specularmap,Vs.envmap,Vs.aomap,Vs.lightmap,Vs.emissivemap,Vs.fog,Vs.lights,{emissive:{value:new Ir(0)}}]),vertexShader:ks.meshlambert_vert,fragmentShader:ks.meshlambert_frag},phong:{uniforms:ws([Vs.common,Vs.specularmap,Vs.envmap,Vs.aomap,Vs.lightmap,Vs.emissivemap,Vs.bumpmap,Vs.normalmap,Vs.displacementmap,Vs.fog,Vs.lights,{emissive:{value:new Ir(0)},specular:{value:new Ir(1118481)},shininess:{value:30}}]),vertexShader:ks.meshphong_vert,fragmentShader:ks.meshphong_frag},standard:{uniforms:ws([Vs.common,Vs.envmap,Vs.aomap,Vs.lightmap,Vs.emissivemap,Vs.bumpmap,Vs.normalmap,Vs.displacementmap,Vs.roughnessmap,Vs.metalnessmap,Vs.fog,Vs.lights,{emissive:{value:new Ir(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ks.meshphysical_vert,fragmentShader:ks.meshphysical_frag},toon:{uniforms:ws([Vs.common,Vs.aomap,Vs.lightmap,Vs.emissivemap,Vs.bumpmap,Vs.normalmap,Vs.displacementmap,Vs.gradientmap,Vs.fog,Vs.lights,{emissive:{value:new Ir(0)}}]),vertexShader:ks.meshtoon_vert,fragmentShader:ks.meshtoon_frag},matcap:{uniforms:ws([Vs.common,Vs.bumpmap,Vs.normalmap,Vs.displacementmap,Vs.fog,{matcap:{value:null}}]),vertexShader:ks.meshmatcap_vert,fragmentShader:ks.meshmatcap_frag},points:{uniforms:ws([Vs.points,Vs.fog]),vertexShader:ks.points_vert,fragmentShader:ks.points_frag},dashed:{uniforms:ws([Vs.common,Vs.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ks.linedashed_vert,fragmentShader:ks.linedashed_frag},depth:{uniforms:ws([Vs.common,Vs.displacementmap]),vertexShader:ks.depth_vert,fragmentShader:ks.depth_frag},normal:{uniforms:ws([Vs.common,Vs.bumpmap,Vs.normalmap,Vs.displacementmap,{opacity:{value:1}}]),vertexShader:ks.meshnormal_vert,fragmentShader:ks.meshnormal_frag},sprite:{uniforms:ws([Vs.sprite,Vs.fog]),vertexShader:ks.sprite_vert,fragmentShader:ks.sprite_frag},background:{uniforms:{uvTransform:{value:new Zn},t2D:{value:null}},vertexShader:ks.background_vert,fragmentShader:ks.background_frag},cube:{uniforms:ws([Vs.envmap,{opacity:{value:1}}]),vertexShader:ks.cube_vert,fragmentShader:ks.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ks.equirect_vert,fragmentShader:ks.equirect_frag},distanceRGBA:{uniforms:ws([Vs.common,Vs.displacementmap,{referencePosition:{value:new ui},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ks.distanceRGBA_vert,fragmentShader:ks.distanceRGBA_frag},shadow:{uniforms:ws([Vs.lights,Vs.fog,{color:{value:new Ir(0)},opacity:{value:1}}]),vertexShader:ks.shadow_vert,fragmentShader:ks.shadow_frag}};function js(t,e,n,i,r){const s=new Ir(0);let a,o,l=0,c=null,h=0,u=null;function d(t,e){n.buffers.color.setClear(t.r,t.g,t.b,e,r)}return{getClearColor:function(){return s},setClearColor:function(t,e=1){s.set(t),l=e,d(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(t){l=t,d(s,l)},render:function(n,r){let p=!1,g=!0===r.isScene?r.background:null;g&&g.isTexture&&(g=e.get(g));const v=t.xr,y=v.getSession&&v.getSession();y&&"additive"===y.environmentBlendMode&&(g=null),null===g?d(s,l):g&&g.isColor&&(d(g,1),p=!0),(t.autoClear||p)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),g&&(g.isCubeTexture||g.mapping===ct)?(void 0===o&&(o=new xs(new Ms(1,1,1),new Ts({name:"BackgroundCubeMaterial",uniforms:bs(Ws.cube.uniforms),vertexShader:Ws.cube.vertexShader,fragmentShader:Ws.cube.fragmentShader,side:f,depthTest:!1,depthWrite:!1,fog:!1})),o.geometry.deleteAttribute("normal"),o.geometry.deleteAttribute("uv"),o.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(o.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(o)),o.material.uniforms.envMap.value=g,o.material.uniforms.flipEnvMap.value=g.isCubeTexture&&!1===g.isRenderTargetTexture?-1:1,c===g&&h===g.version&&u===t.toneMapping||(o.material.needsUpdate=!0,c=g,h=g.version,u=t.toneMapping),n.unshift(o,o.geometry,o.material,0,0,null)):g&&g.isTexture&&(void 0===a&&(a=new xs(new Gs(2,2),new Ts({name:"BackgroundMaterial",uniforms:bs(Ws.background.uniforms),vertexShader:Ws.background.vertexShader,fragmentShader:Ws.background.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(a)),a.material.uniforms.t2D.value=g,!0===g.matrixAutoUpdate&&g.updateMatrix(),a.material.uniforms.uvTransform.value.copy(g.matrix),c===g&&h===g.version&&u===t.toneMapping||(a.material.needsUpdate=!0,c=g,h=g.version,u=t.toneMapping),n.unshift(a,a.geometry,a.material,0,0,null))}}}function qs(t,e,n,i){const r=t.getParameter(34921),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),a=i.isWebGL2||null!==s,o={},l=d(null);let c=l;function h(e){return i.isWebGL2?t.bindVertexArray(e):s.bindVertexArrayOES(e)}function u(e){return i.isWebGL2?t.deleteVertexArray(e):s.deleteVertexArrayOES(e)}function d(t){const e=[],n=[],i=[];for(let t=0;t<r;t++)e[t]=0,n[t]=0,i[t]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:e,enabledAttributes:n,attributeDivisors:i,object:t,attributes:{},index:null}}function p(){const t=c.newAttributes;for(let e=0,n=t.length;e<n;e++)t[e]=0}function m(t){f(t,0)}function f(n,r){const s=c.newAttributes,a=c.enabledAttributes,o=c.attributeDivisors;s[n]=1,0===a[n]&&(t.enableVertexAttribArray(n),a[n]=1),o[n]!==r&&((i.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,r),o[n]=r)}function g(){const e=c.newAttributes,n=c.enabledAttributes;for(let i=0,r=n.length;i<r;i++)n[i]!==e[i]&&(t.disableVertexAttribArray(i),n[i]=0)}function v(e,n,r,s,a,o){!0!==i.isWebGL2||5124!==r&&5125!==r?t.vertexAttribPointer(e,n,r,s,a,o):t.vertexAttribIPointer(e,n,r,a,o)}function y(){x(),c!==l&&(c=l,h(c.object))}function x(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(r,l,u,y,x){let _=!1;if(a){const e=function(e,n,r){const a=!0===r.wireframe;let l=o[e.id];void 0===l&&(l={},o[e.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let h=c[a];return void 0===h&&(h=d(i.isWebGL2?t.createVertexArray():s.createVertexArrayOES()),c[a]=h),h}(y,u,l);c!==e&&(c=e,h(c.object)),_=function(t,e){const n=c.attributes,i=t.attributes;let r=0;for(const t in i){const e=n[t],s=i[t];if(void 0===e)return!0;if(e.attribute!==s)return!0;if(e.data!==s.data)return!0;r++}return c.attributesNum!==r||c.index!==e}(y,x),_&&function(t,e){const n={},i=t.attributes;let r=0;for(const t in i){const e=i[t],s={};s.attribute=e,e.data&&(s.data=e.data),n[t]=s,r++}c.attributes=n,c.attributesNum=r,c.index=e}(y,x)}else{const t=!0===l.wireframe;c.geometry===y.id&&c.program===u.id&&c.wireframe===t||(c.geometry=y.id,c.program=u.id,c.wireframe=t,_=!0)}!0===r.isInstancedMesh&&(_=!0),null!==x&&n.update(x,34963),_&&(function(r,s,a,o){if(!1===i.isWebGL2&&(r.isInstancedMesh||o.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;p();const l=o.attributes,c=a.getAttributes(),h=s.defaultAttributeValues;for(const e in c){const i=c[e];if(i.location>=0){let s=l[e];if(void 0===s&&("instanceMatrix"===e&&r.instanceMatrix&&(s=r.instanceMatrix),"instanceColor"===e&&r.instanceColor&&(s=r.instanceColor)),void 0!==s){const e=s.normalized,a=s.itemSize,l=n.get(s);if(void 0===l)continue;const c=l.buffer,h=l.type,u=l.bytesPerElement;if(s.isInterleavedBufferAttribute){const n=s.data,l=n.stride,d=s.offset;if(n&&n.isInstancedInterleavedBuffer){for(let t=0;t<i.locationSize;t++)f(i.location+t,n.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let t=0;t<i.locationSize;t++)m(i.location+t);t.bindBuffer(34962,c);for(let t=0;t<i.locationSize;t++)v(i.location+t,a/i.locationSize,h,e,l*u,(d+a/i.locationSize*t)*u)}else{if(s.isInstancedBufferAttribute){for(let t=0;t<i.locationSize;t++)f(i.location+t,s.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=s.meshPerAttribute*s.count)}else for(let t=0;t<i.locationSize;t++)m(i.location+t);t.bindBuffer(34962,c);for(let t=0;t<i.locationSize;t++)v(i.location+t,a/i.locationSize,h,e,a*u,a/i.locationSize*t*u)}}else if(void 0!==h){const n=h[e];if(void 0!==n)switch(n.length){case 2:t.vertexAttrib2fv(i.location,n);break;case 3:t.vertexAttrib3fv(i.location,n);break;case 4:t.vertexAttrib4fv(i.location,n);break;default:t.vertexAttrib1fv(i.location,n)}}}}g()}(r,l,u,y),null!==x&&t.bindBuffer(34963,n.get(x).buffer))},reset:y,resetDefaultState:x,dispose:function(){y();for(const t in o){const e=o[t];for(const t in e){const n=e[t];for(const t in n)u(n[t].object),delete n[t];delete e[t]}delete o[t]}},releaseStatesOfGeometry:function(t){if(void 0===o[t.id])return;const e=o[t.id];for(const t in e){const n=e[t];for(const t in n)u(n[t].object),delete n[t];delete e[t]}delete o[t.id]},releaseStatesOfProgram:function(t){for(const e in o){const n=o[e];if(void 0===n[t.id])continue;const i=n[t.id];for(const t in i)u(i[t].object),delete i[t];delete n[t.id]}},initAttributes:p,enableAttribute:m,disableUnusedAttributes:g}}function Xs(t,e,n,i){const r=i.isWebGL2;let s;this.setMode=function(t){s=t},this.render=function(e,i){t.drawArrays(s,e,i),n.update(i,s,1)},this.renderInstances=function(i,a,o){if(0===o)return;let l,c;if(r)l=t,c="drawArraysInstanced";else if(l=e.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](s,i,a,o),n.update(a,s,o)}}function Ys(t,e,n){let i;function r(e){if("highp"===e){if(t.getShaderPrecisionFormat(35633,36338).precision>0&&t.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(35633,36337).precision>0&&t.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const s="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&t instanceof WebGL2ComputeRenderingContext;let a=void 0!==n.precision?n.precision:"highp";const o=r(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);const l=s||e.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,h=t.getParameter(34930),u=t.getParameter(35660),d=t.getParameter(3379),p=t.getParameter(34076),m=t.getParameter(34921),f=t.getParameter(36347),g=t.getParameter(36348),v=t.getParameter(36349),y=u>0,x=s||e.has("OES_texture_float");return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===e.has("EXT_texture_filter_anisotropic")){const n=e.get("EXT_texture_filter_anisotropic");i=t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:r,precision:a,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:p,maxAttributes:m,maxVertexUniforms:f,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:x,floatVertexTextures:y&&x,maxSamples:s?t.getParameter(36183):0}}function Zs(t){const e=this;let n=null,i=0,r=!1,s=!1;const a=new zs,o=new Zn,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(t,n,i,r){const s=null!==t?t.length:0;let c=null;if(0!==s){if(c=l.value,!0!==r||null===c){const e=i+4*s,r=n.matrixWorldInverse;o.getNormalMatrix(r),(null===c||c.length<e)&&(c=new Float32Array(e));for(let e=0,n=i;e!==s;++e,n+=4)a.copy(t[e]).applyMatrix4(r,o),a.normal.toArray(c,n),c[n+3]=a.constant}l.value=c,l.needsUpdate=!0}return e.numPlanes=s,e.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(t,e,s){const a=0!==t.length||e||0!==i||r;return r=e,n=h(t,s,0),i=t.length,a},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1,c()},this.setState=function(e,a,o){const u=e.clippingPlanes,d=e.clipIntersection,p=e.clipShadows,m=t.get(e);if(!r||null===u||0===u.length||s&&!p)s?h(null):c();else{const t=s?0:i,e=4*t;let r=m.clippingState||null;l.value=r,r=h(u,a,e,o);for(let t=0;t!==e;++t)r[t]=n[t];m.clippingState=r,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=t}}}function Js(t){let e=new WeakMap;function n(t,e){return e===ot?t.mapping=st:e===lt&&(t.mapping=at),t}function i(t){const n=t.target;n.removeEventListener("dispose",i);const r=e.get(n);void 0!==r&&(e.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture&&!1===r.isRenderTargetTexture){const s=r.mapping;if(s===ot||s===lt){if(e.has(r))return n(e.get(r).texture,r.mapping);{const s=r.image;if(s&&s.height>0){const a=t.getRenderTarget(),o=new Ps(s.height/2);return o.fromEquirectangularTexture(t,r),e.set(r,o),t.setRenderTarget(a),r.addEventListener("dispose",i),n(o.texture,r.mapping)}return null}}}return r},dispose:function(){e=new WeakMap}}}Ws.physical={uniforms:ws([Ws.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Yn(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new Ir(0)},sheenColorMap:{value:null},sheenRoughness:{value:0},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Yn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Ir(0)},specularIntensity:{value:0},specularIntensityMap:{value:null},specularColor:{value:new Ir(1,1,1)},specularColorMap:{value:null}}]),vertexShader:ks.meshphysical_vert,fragmentShader:ks.meshphysical_frag};class Qs extends Es{constructor(t=-1,e=1,n=1,i=-1,r=.1,s=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,r,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-t,s=n+t,a=i+e,o=i-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=t*this.view.offsetX,s=r+t*this.view.width,a-=e*this.view.offsetY,o=a-e*this.view.height}this.projectionMatrix.makeOrthographic(r,s,a,o,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}Qs.prototype.isOrthographicCamera=!0;class Ks extends Ts{constructor(t){super(t),this.type="RawShaderMaterial"}}Ks.prototype.isRawShaderMaterial=!0;const $s=Math.pow(2,8),ta=[.125,.215,.35,.446,.526,.582],ea=5+ta.length,na={[Je]:0,[Qe]:1,[$e]:2,[tn]:3,[en]:4,[nn]:5,[Ke]:6},ia=new Qs,{_lodPlanes:ra,_sizeLods:sa,_sigmas:aa}=ma(),oa=new Ir;let la=null;const ca=(1+Math.sqrt(5))/2,ha=1/ca,ua=[new ui(1,1,1),new ui(-1,1,1),new ui(1,1,-1),new ui(-1,1,-1),new ui(0,ca,ha),new ui(0,ca,-ha),new ui(ha,0,ca),new ui(-ha,0,ca),new ui(ca,ha,0),new ui(-ca,ha,0)];class da{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._blurMaterial=function(t){const e=new Float32Array(20),n=new ui(0,1,0);return new Ks({name:"SphericalGaussianBlur",defines:{n:20},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:e},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n},inputEncoding:{value:na[Je]},outputEncoding:{value:na[Je]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:x,depthTest:!1,depthWrite:!1})}(),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,i=100){la=this._renderer.getRenderTarget();const r=this._allocateTargets();return this._sceneToCubeUV(t,n,i,r),e>0&&this._blur(r,0,0,e),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(t){return this._fromTexture(t)}fromCubemap(t){return this._fromTexture(t)}compileCubemapShader(){null===this._cubemapShader&&(this._cubemapShader=ya(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){null===this._equirectShader&&(this._equirectShader=va(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(let t=0;t<ra.length;t++)ra[t].dispose()}_cleanup(t){this._pingPongRenderTarget.dispose(),this._renderer.setRenderTarget(la),t.scissorTest=!1,ga(t,0,0,t.width,t.height)}_fromTexture(t){la=this._renderer.getRenderTarget();const e=this._allocateTargets(t);return this._textureToCubeUV(t,e),this._applyPMREM(e),this._cleanup(e),e}_allocateTargets(t){const e={magFilter:mt,minFilter:mt,generateMipmaps:!1,type:St,format:Gt,encoding:pa(t)?t.encoding:$e,depthBuffer:!1},n=fa(e);return n.depthBuffer=!t,this._pingPongRenderTarget=fa(e),n}_compileMaterial(t){const e=new xs(ra[0],t);this._renderer.compile(e,ia)}_sceneToCubeUV(t,e,n,i){const r=new As(90,1,e,n),s=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],o=this._renderer,l=o.autoClear,c=o.outputEncoding,h=o.toneMapping;o.getClearColor(oa),o.toneMapping=K,o.outputEncoding=Je,o.autoClear=!1;const u=new Nr({name:"PMREM.Background",side:f,depthWrite:!1,depthTest:!1}),d=new xs(new Ms,u);let p=!1;const m=t.background;m?m.isColor&&(u.color.copy(m),t.background=null,p=!0):(u.color.copy(oa),p=!0);for(let e=0;e<6;e++){const n=e%3;0==n?(r.up.set(0,s[e],0),r.lookAt(a[e],0,0)):1==n?(r.up.set(0,0,s[e]),r.lookAt(0,a[e],0)):(r.up.set(0,s[e],0),r.lookAt(0,0,a[e])),ga(i,n*$s,e>2?$s:0,$s,$s),o.setRenderTarget(i),p&&o.render(d,r),o.render(t,r)}d.geometry.dispose(),d.material.dispose(),o.toneMapping=h,o.outputEncoding=c,o.autoClear=l,t.background=m}_setEncoding(t,e){t.value=na[e.encoding]}_textureToCubeUV(t,e){const n=this._renderer,i=t.mapping===st||t.mapping===at;i?null==this._cubemapShader&&(this._cubemapShader=ya()):null==this._equirectShader&&(this._equirectShader=va());const r=i?this._cubemapShader:this._equirectShader,s=new xs(ra[0],r),a=r.uniforms;a.envMap.value=t,i||a.texelSize.value.set(1/t.image.width,1/t.image.height),this._setEncoding(a.inputEncoding,t),this._setEncoding(a.outputEncoding,e.texture),ga(e,0,0,3*$s,2*$s),n.setRenderTarget(e),n.render(s,ia)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;for(let e=1;e<ea;e++){const n=Math.sqrt(aa[e]*aa[e]-aa[e-1]*aa[e-1]),i=ua[(e-1)%ua.length];this._blur(t,e-1,e,n,i)}e.autoClear=n}_blur(t,e,n,i,r){const s=this._pingPongRenderTarget;this._halfBlur(t,s,e,n,i,"latitudinal",r),this._halfBlur(s,t,n,n,i,"longitudinal",r)}_halfBlur(t,e,n,i,r,s,a){const o=this._renderer,l=this._blurMaterial;"latitudinal"!==s&&"longitudinal"!==s&&console.error("blur direction must be either latitudinal or longitudinal!");const c=new xs(ra[i],l),h=l.uniforms,u=sa[n]-1,d=isFinite(r)?Math.PI/(2*u):2*Math.PI/39,p=r/d,m=isFinite(r)?1+Math.floor(3*p):20;m>20&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${m} samples when the maximum is set to 20`);const f=[];let g=0;for(let t=0;t<20;++t){const e=t/p,n=Math.exp(-e*e/2);f.push(n),0==t?g+=n:t<m&&(g+=2*n)}for(let t=0;t<f.length;t++)f[t]=f[t]/g;h.envMap.value=t.texture,h.samples.value=m,h.weights.value=f,h.latitudinal.value="latitudinal"===s,a&&(h.poleAxis.value=a),h.dTheta.value=d,h.mipInt.value=8-n,this._setEncoding(h.inputEncoding,t.texture),this._setEncoding(h.outputEncoding,t.texture);const v=sa[i];ga(e,3*Math.max(0,$s-2*v),(0===i?0:2*$s)+2*v*(i>4?i-8+4:0),3*v,2*v),o.setRenderTarget(e),o.render(c,ia)}}function pa(t){return void 0!==t&&t.type===St&&(t.encoding===Je||t.encoding===Qe||t.encoding===Ke)}function ma(){const t=[],e=[],n=[];let i=8;for(let r=0;r<ea;r++){const s=Math.pow(2,i);e.push(s);let a=1/s;r>4?a=ta[r-8+4-1]:0==r&&(a=0),n.push(a);const o=1/(s-1),l=-o/2,c=1+o/2,h=[l,l,c,l,c,c,l,l,c,c,l,c],u=6,d=6,p=3,m=2,f=1,g=new Float32Array(p*d*u),v=new Float32Array(m*d*u),y=new Float32Array(f*d*u);for(let t=0;t<u;t++){const e=t%3*2/3-1,n=t>2?0:-1,i=[e,n,0,e+2/3,n,0,e+2/3,n+1,0,e,n,0,e+2/3,n+1,0,e,n+1,0];g.set(i,p*d*t),v.set(h,m*d*t);const r=[t,t,t,t,t,t];y.set(r,f*d*t)}const x=new es;x.setAttribute("position",new Br(g,p)),x.setAttribute("uv",new Br(v,m)),x.setAttribute("faceIndex",new Br(y,f)),t.push(x),i>4&&i--}return{_lodPlanes:t,_sizeLods:e,_sigmas:n}}function fa(t){const e=new oi(3*$s,3*$s,t);return e.texture.mapping=ct,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function ga(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function va(){const t=new Yn(1,1);return new Ks({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:t},inputEncoding:{value:na[Je]},outputEncoding:{value:na[Je]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:x,depthTest:!1,depthWrite:!1})}function ya(){return new Ks({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:na[Je]},outputEncoding:{value:na[Je]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:x,depthTest:!1,depthWrite:!1})}function xa(t){let e=new WeakMap,n=null;function i(t){const n=t.target;n.removeEventListener("dispose",i);const r=e.get(n);void 0!==r&&(e.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture&&!1===r.isRenderTargetTexture){const s=r.mapping,a=s===ot||s===lt,o=s===st||s===at;if(a||o){if(e.has(r))return e.get(r).texture;{const s=r.image;if(a&&s&&s.height>0||o&&s&&function(t){let e=0;for(let n=0;n<6;n++)void 0!==t[n]&&e++;return 6===e}(s)){const s=t.getRenderTarget();null===n&&(n=new da(t));const o=a?n.fromEquirectangular(r):n.fromCubemap(r);return e.set(r,o),t.setRenderTarget(s),r.addEventListener("dispose",i),o.texture}return null}}}return r},dispose:function(){e=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function _a(t){const e={};function n(n){if(void 0!==e[n])return e[n];let i;switch(n){case"WEBGL_depth_texture":i=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=t.getExtension(n)}return e[n]=i,i}return{has:function(t){return null!==n(t)},init:function(t){t.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(t){const e=n(t);return null===e&&console.warn("THREE.WebGLRenderer: "+t+" extension not supported."),e}}}function Ma(t,e,n,i){const r={},s=new WeakMap;function a(t){const o=t.target;null!==o.index&&e.remove(o.index);for(const t in o.attributes)e.remove(o.attributes[t]);o.removeEventListener("dispose",a),delete r[o.id];const l=s.get(o);l&&(e.remove(l),s.delete(o)),i.releaseStatesOfGeometry(o),!0===o.isInstancedBufferGeometry&&delete o._maxInstanceCount,n.memory.geometries--}function o(t){const n=[],i=t.index,r=t.attributes.position;let a=0;if(null!==i){const t=i.array;a=i.version;for(let e=0,i=t.length;e<i;e+=3){const i=t[e+0],r=t[e+1],s=t[e+2];n.push(i,r,r,s,s,i)}}else{const t=r.array;a=r.version;for(let e=0,i=t.length/3-1;e<i;e+=3){const t=e+0,i=e+1,r=e+2;n.push(t,i,i,r,r,t)}}const o=new(Jn(n)>65535?Wr:kr)(n,1);o.version=a;const l=s.get(t);l&&e.remove(l),s.set(t,o)}return{get:function(t,e){return!0===r[e.id]||(e.addEventListener("dispose",a),r[e.id]=!0,n.memory.geometries++),e},update:function(t){const n=t.attributes;for(const t in n)e.update(n[t],34962);const i=t.morphAttributes;for(const t in i){const n=i[t];for(let t=0,i=n.length;t<i;t++)e.update(n[t],34962)}},getWireframeAttribute:function(t){const e=s.get(t);if(e){const n=t.index;null!==n&&e.version<n.version&&o(t)}else o(t);return s.get(t)}}}function ba(t,e,n,i){const r=i.isWebGL2;let s,a,o;this.setMode=function(t){s=t},this.setIndex=function(t){a=t.type,o=t.bytesPerElement},this.render=function(e,i){t.drawElements(s,i,a,e*o),n.update(i,s,1)},this.renderInstances=function(i,l,c){if(0===c)return;let h,u;if(r)h=t,u="drawElementsInstanced";else if(h=e.get("ANGLE_instanced_arrays"),u="drawElementsInstancedANGLE",null===h)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");h[u](s,l,a,i*o,c),n.update(l,s,c)}}function wa(t){const e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(t,n,i){switch(e.calls++,n){case 4:e.triangles+=i*(t/3);break;case 1:e.lines+=i*(t/2);break;case 3:e.lines+=i*(t-1);break;case 2:e.lines+=i*t;break;case 0:e.points+=i*t;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}class Sa extends ri{constructor(t=null,e=1,n=1,i=1){super(null),this.image={data:t,width:e,height:n,depth:i},this.magFilter=mt,this.minFilter=mt,this.wrapR=dt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}function Ta(t,e){return t[0]-e[0]}function Ea(t,e){return Math.abs(e[1])-Math.abs(t[1])}function Aa(t,e){let n=1;const i=e.isInterleavedBufferAttribute?e.data.array:e.array;i instanceof Int8Array?n=127:i instanceof Int16Array?n=32767:i instanceof Int32Array?n=2147483647:console.error("THREE.WebGLMorphtargets: Unsupported morph attribute data type: ",i),t.divideScalar(n)}function La(t,e,n){const i={},r=new Float32Array(8),s=new WeakMap,a=new ui,o=[];for(let t=0;t<8;t++)o[t]=[t,0];return{update:function(l,c,h,u){const d=l.morphTargetInfluences;if(!0===e.isWebGL2){const i=c.morphAttributes.position.length;let r=s.get(c);if(void 0===r||r.count!==i){void 0!==r&&r.texture.dispose();const t=void 0!==c.morphAttributes.normal,n=c.morphAttributes.position,o=c.morphAttributes.normal||[],l=!0===t?2:1;let h=c.attributes.position.count*l,u=1;h>e.maxTextureSize&&(u=Math.ceil(h/e.maxTextureSize),h=e.maxTextureSize);const d=new Float32Array(h*u*4*i),p=new Sa(d,h,u,i);p.format=Ft,p.type=Ct;const m=4*l;for(let e=0;e<i;e++){const i=n[e],r=o[e],s=h*u*4*e;for(let e=0;e<i.count;e++){a.fromBufferAttribute(i,e),!0===i.normalized&&Aa(a,i);const n=e*m;d[s+n+0]=a.x,d[s+n+1]=a.y,d[s+n+2]=a.z,d[s+n+3]=0,!0===t&&(a.fromBufferAttribute(r,e),!0===r.normalized&&Aa(a,r),d[s+n+4]=a.x,d[s+n+5]=a.y,d[s+n+6]=a.z,d[s+n+7]=0)}}r={count:i,texture:p,size:new Yn(h,u)},s.set(c,r)}let o=0;for(let t=0;t<d.length;t++)o+=d[t];const l=c.morphTargetsRelative?1:1-o;u.getUniforms().setValue(t,"morphTargetBaseInfluence",l),u.getUniforms().setValue(t,"morphTargetInfluences",d),u.getUniforms().setValue(t,"morphTargetsTexture",r.texture,n),u.getUniforms().setValue(t,"morphTargetsTextureSize",r.size)}else{const e=void 0===d?0:d.length;let n=i[c.id];if(void 0===n||n.length!==e){n=[];for(let t=0;t<e;t++)n[t]=[t,0];i[c.id]=n}for(let t=0;t<e;t++){const e=n[t];e[0]=t,e[1]=d[t]}n.sort(Ea);for(let t=0;t<8;t++)t<e&&n[t][1]?(o[t][0]=n[t][0],o[t][1]=n[t][1]):(o[t][0]=Number.MAX_SAFE_INTEGER,o[t][1]=0);o.sort(Ta);const s=c.morphAttributes.position,a=c.morphAttributes.normal;let l=0;for(let t=0;t<8;t++){const e=o[t],n=e[0],i=e[1];n!==Number.MAX_SAFE_INTEGER&&i?(s&&c.getAttribute("morphTarget"+t)!==s[n]&&c.setAttribute("morphTarget"+t,s[n]),a&&c.getAttribute("morphNormal"+t)!==a[n]&&c.setAttribute("morphNormal"+t,a[n]),r[t]=i,l+=i):(s&&!0===c.hasAttribute("morphTarget"+t)&&c.deleteAttribute("morphTarget"+t),a&&!0===c.hasAttribute("morphNormal"+t)&&c.deleteAttribute("morphNormal"+t),r[t]=0)}const h=c.morphTargetsRelative?1:1-l;u.getUniforms().setValue(t,"morphTargetBaseInfluence",h),u.getUniforms().setValue(t,"morphTargetInfluences",r)}}}}function Ra(t,e,n,i){let r=new WeakMap;function s(t){const e=t.target;e.removeEventListener("dispose",s),n.remove(e.instanceMatrix),null!==e.instanceColor&&n.remove(e.instanceColor)}return{update:function(t){const a=i.render.frame,o=t.geometry,l=e.get(t,o);return r.get(l)!==a&&(e.update(l),r.set(l,a)),t.isInstancedMesh&&(!1===t.hasEventListener("dispose",s)&&t.addEventListener("dispose",s),n.update(t.instanceMatrix,34962),null!==t.instanceColor&&n.update(t.instanceColor,34962)),l},dispose:function(){r=new WeakMap}}}Sa.prototype.isDataTexture2DArray=!0;class Ca extends ri{constructor(t=null,e=1,n=1,i=1){super(null),this.image={data:t,width:e,height:n,depth:i},this.magFilter=mt,this.minFilter=mt,this.wrapR=dt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}Ca.prototype.isDataTexture3D=!0;const Pa=new ri,Da=new Sa,Ia=new Ca,Na=new Cs,za=[],Oa=[],Ba=new Float32Array(16),Fa=new Float32Array(9),Ua=new Float32Array(4);function Ha(t,e,n){const i=t[0];if(i<=0||i>0)return t;const r=e*n;let s=za[r];if(void 0===s&&(s=new Float32Array(r),za[r]=s),0!==e){i.toArray(s,0);for(let i=1,r=0;i!==e;++i)r+=n,t[i].toArray(s,r)}return s}function Ga(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n<i;n++)if(t[n]!==e[n])return!1;return!0}function ka(t,e){for(let n=0,i=e.length;n<i;n++)t[n]=e[n]}function Va(t,e){let n=Oa[e];void 0===n&&(n=new Int32Array(e),Oa[e]=n);for(let i=0;i!==e;++i)n[i]=t.allocateTextureUnit();return n}function Wa(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function ja(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Ga(n,e))return;t.uniform2fv(this.addr,e),ka(n,e)}}function qa(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(void 0!==e.r)n[0]===e.r&&n[1]===e.g&&n[2]===e.b||(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(Ga(n,e))return;t.uniform3fv(this.addr,e),ka(n,e)}}function Xa(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Ga(n,e))return;t.uniform4fv(this.addr,e),ka(n,e)}}function Ya(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(Ga(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),ka(n,e)}else{if(Ga(n,i))return;Ua.set(i),t.uniformMatrix2fv(this.addr,!1,Ua),ka(n,i)}}function Za(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(Ga(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),ka(n,e)}else{if(Ga(n,i))return;Fa.set(i),t.uniformMatrix3fv(this.addr,!1,Fa),ka(n,i)}}function Ja(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(Ga(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),ka(n,e)}else{if(Ga(n,i))return;Ba.set(i),t.uniformMatrix4fv(this.addr,!1,Ba),ka(n,i)}}function Qa(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function Ka(t,e){const n=this.cache;Ga(n,e)||(t.uniform2iv(this.addr,e),ka(n,e))}function $a(t,e){const n=this.cache;Ga(n,e)||(t.uniform3iv(this.addr,e),ka(n,e))}function to(t,e){const n=this.cache;Ga(n,e)||(t.uniform4iv(this.addr,e),ka(n,e))}function eo(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function no(t,e){const n=this.cache;Ga(n,e)||(t.uniform2uiv(this.addr,e),ka(n,e))}function io(t,e){const n=this.cache;Ga(n,e)||(t.uniform3uiv(this.addr,e),ka(n,e))}function ro(t,e){const n=this.cache;Ga(n,e)||(t.uniform4uiv(this.addr,e),ka(n,e))}function so(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.safeSetTexture2D(e||Pa,r)}function ao(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(e||Ia,r)}function oo(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.safeSetTextureCube(e||Na,r)}function lo(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(e||Da,r)}function co(t,e){t.uniform1fv(this.addr,e)}function ho(t,e){const n=Ha(e,this.size,2);t.uniform2fv(this.addr,n)}function uo(t,e){const n=Ha(e,this.size,3);t.uniform3fv(this.addr,n)}function po(t,e){const n=Ha(e,this.size,4);t.uniform4fv(this.addr,n)}function mo(t,e){const n=Ha(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function fo(t,e){const n=Ha(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function go(t,e){const n=Ha(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function vo(t,e){t.uniform1iv(this.addr,e)}function yo(t,e){t.uniform2iv(this.addr,e)}function xo(t,e){t.uniform3iv(this.addr,e)}function _o(t,e){t.uniform4iv(this.addr,e)}function Mo(t,e){t.uniform1uiv(this.addr,e)}function bo(t,e){t.uniform2uiv(this.addr,e)}function wo(t,e){t.uniform3uiv(this.addr,e)}function So(t,e){t.uniform4uiv(this.addr,e)}function To(t,e,n){const i=e.length,r=Va(n,i);t.uniform1iv(this.addr,r);for(let t=0;t!==i;++t)n.safeSetTexture2D(e[t]||Pa,r[t])}function Eo(t,e,n){const i=e.length,r=Va(n,i);t.uniform1iv(this.addr,r);for(let t=0;t!==i;++t)n.setTexture3D(e[t]||Ia,r[t])}function Ao(t,e,n){const i=e.length,r=Va(n,i);t.uniform1iv(this.addr,r);for(let t=0;t!==i;++t)n.safeSetTextureCube(e[t]||Na,r[t])}function Lo(t,e,n){const i=e.length,r=Va(n,i);t.uniform1iv(this.addr,r);for(let t=0;t!==i;++t)n.setTexture2DArray(e[t]||Da,r[t])}function Ro(t,e,n){this.id=t,this.addr=n,this.cache=[],this.setValue=function(t){switch(t){case 5126:return Wa;case 35664:return ja;case 35665:return qa;case 35666:return Xa;case 35674:return Ya;case 35675:return Za;case 35676:return Ja;case 5124:case 35670:return Qa;case 35667:case 35671:return Ka;case 35668:case 35672:return $a;case 35669:case 35673:return to;case 5125:return eo;case 36294:return no;case 36295:return io;case 36296:return ro;case 35678:case 36198:case 36298:case 36306:case 35682:return so;case 35679:case 36299:case 36307:return ao;case 35680:case 36300:case 36308:case 36293:return oo;case 36289:case 36303:case 36311:case 36292:return lo}}(e.type)}function Co(t,e,n){this.id=t,this.addr=n,this.cache=[],this.size=e.size,this.setValue=function(t){switch(t){case 5126:return co;case 35664:return ho;case 35665:return uo;case 35666:return po;case 35674:return mo;case 35675:return fo;case 35676:return go;case 5124:case 35670:return vo;case 35667:case 35671:return yo;case 35668:case 35672:return xo;case 35669:case 35673:return _o;case 5125:return Mo;case 36294:return bo;case 36295:return wo;case 36296:return So;case 35678:case 36198:case 36298:case 36306:case 35682:return To;case 35679:case 36299:case 36307:return Eo;case 35680:case 36300:case 36308:case 36293:return Ao;case 36289:case 36303:case 36311:case 36292:return Lo}}(e.type)}function Po(t){this.id=t,this.seq=[],this.map={}}Co.prototype.updateCache=function(t){const e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),ka(e,t)},Po.prototype.setValue=function(t,e,n){const i=this.seq;for(let r=0,s=i.length;r!==s;++r){const s=i[r];s.setValue(t,e[s.id],n)}};const Do=/(\w+)(\])?(\[|\.)?/g;function Io(t,e){t.seq.push(e),t.map[e.id]=e}function No(t,e,n){const i=t.name,r=i.length;for(Do.lastIndex=0;;){const s=Do.exec(i),a=Do.lastIndex;let o=s[1];const l="]"===s[2],c=s[3];if(l&&(o|=0),void 0===c||"["===c&&a+2===r){Io(n,void 0===c?new Ro(o,t,e):new Co(o,t,e));break}{let t=n.map[o];void 0===t&&(t=new Po(o),Io(n,t)),n=t}}}function zo(t,e){this.seq=[],this.map={};const n=t.getProgramParameter(e,35718);for(let i=0;i<n;++i){const n=t.getActiveUniform(e,i);No(n,t.getUniformLocation(e,n.name),this)}}function Oo(t,e,n){const i=t.createShader(e);return t.shaderSource(i,n),t.compileShader(i),i}zo.prototype.setValue=function(t,e,n,i){const r=this.map[e];void 0!==r&&r.setValue(t,n,i)},zo.prototype.setOptional=function(t,e,n){const i=e[n];void 0!==i&&this.setValue(t,n,i)},zo.upload=function(t,e,n,i){for(let r=0,s=e.length;r!==s;++r){const s=e[r],a=n[s.id];!1!==a.needsUpdate&&s.setValue(t,a.value,i)}},zo.seqWithValue=function(t,e){const n=[];for(let i=0,r=t.length;i!==r;++i){const r=t[i];r.id in e&&n.push(r)}return n};let Bo=0;function Fo(t){switch(t){case Je:return["Linear","( value )"];case Qe:return["sRGB","( value )"];case $e:return["RGBE","( value )"];case tn:return["RGBM","( value, 7.0 )"];case en:return["RGBM","( value, 16.0 )"];case nn:return["RGBD","( value, 256.0 )"];case Ke:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",t),["Linear","( value )"]}}function Uo(t,e,n){const i=t.getShaderParameter(e,35713),r=t.getShaderInfoLog(e).trim();return i&&""===r?"":n.toUpperCase()+"\n\n"+r+"\n\n"+function(t){const e=t.split("\n");for(let t=0;t<e.length;t++)e[t]=t+1+": "+e[t];return e.join("\n")}(t.getShaderSource(e))}function Ho(t,e){const n=Fo(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Go(t,e){const n=Fo(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function ko(t,e){let n;switch(e){case $:n="Linear";break;case tt:n="Reinhard";break;case et:n="OptimizedCineon";break;case nt:n="ACESFilmic";break;case it:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Vo(t){return""!==t}function Wo(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function jo(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const qo=/^[ \t]*#include +<([\w\d./]+)>/gm;function Xo(t){return t.replace(qo,Yo)}function Yo(t,e){const n=ks[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return Xo(n)}const Zo=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Jo=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Qo(t){return t.replace(Jo,$o).replace(Zo,Ko)}function Ko(t,e,n,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),$o(0,e,n,i)}function $o(t,e,n,i){let r="";for(let t=parseInt(e);t<parseInt(n);t++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+t+" ]").replace(/UNROLLED_LOOP_INDEX/g,t);return r}function tl(t){let e="precision "+t.precision+" float;\nprecision "+t.precision+" int;";return"highp"===t.precision?e+="\n#define HIGH_PRECISION":"mediump"===t.precision?e+="\n#define MEDIUM_PRECISION":"lowp"===t.precision&&(e+="\n#define LOW_PRECISION"),e}function el(t,e,n,i){const r=t.getContext(),s=n.defines;let a=n.vertexShader,o=n.fragmentShader;const l=function(t){let e="SHADOWMAP_TYPE_BASIC";return t.shadowMapType===u?e="SHADOWMAP_TYPE_PCF":t.shadowMapType===d?e="SHADOWMAP_TYPE_PCF_SOFT":t.shadowMapType===p&&(e="SHADOWMAP_TYPE_VSM"),e}(n),c=function(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case st:case at:e="ENVMAP_TYPE_CUBE";break;case ct:case ht:e="ENVMAP_TYPE_CUBE_UV"}return e}(n),h=function(t){let e="ENVMAP_MODE_REFLECTION";if(t.envMap)switch(t.envMapMode){case at:case ht:e="ENVMAP_MODE_REFRACTION"}return e}(n),m=function(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case Z:e="ENVMAP_BLENDING_MULTIPLY";break;case J:e="ENVMAP_BLENDING_MIX";break;case Q:e="ENVMAP_BLENDING_ADD"}return e}(n),f=t.gammaFactor>0?t.gammaFactor:1,g=n.isWebGL2?"":function(t){return[t.extensionDerivatives||t.envMapCubeUV||t.bumpMap||t.tangentSpaceNormalMap||t.clearcoatNormalMap||t.flatShading||"physical"===t.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Vo).join("\n")}(n),v=function(t){const e=[];for(const n in t){const i=t[n];!1!==i&&e.push("#define "+n+" "+i)}return e.join("\n")}(s),y=r.createProgram();let x,_,M=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(x=[v].filter(Vo).join("\n"),x.length>0&&(x+="\n"),_=[g,v].filter(Vo).join("\n"),_.length>0&&(_+="\n")):(x=[tl(n),"#define SHADER_NAME "+n.shaderName,v,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+f,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+h:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphTargets&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargets&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Vo).join("\n"),_=[g,tl(n),"#define SHADER_NAME "+n.shaderName,v,"#define GAMMA_FACTOR "+f,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+h:"",n.envMap?"#define "+m:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==K?"#define TONE_MAPPING":"",n.toneMapping!==K?ks.tonemapping_pars_fragment:"",n.toneMapping!==K?ko("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.format===Bt?"#define OPAQUE":"",ks.encodings_pars_fragment,n.map?Ho("mapTexelToLinear",n.mapEncoding):"",n.matcap?Ho("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?Ho("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?Ho("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.specularColorMap?Ho("specularColorMapTexelToLinear",n.specularColorMapEncoding):"",n.sheenColorMap?Ho("sheenColorMapTexelToLinear",n.sheenColorMapEncoding):"",n.lightMap?Ho("lightMapTexelToLinear",n.lightMapEncoding):"",Go("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Vo).join("\n")),a=Xo(a),a=Wo(a,n),a=jo(a,n),o=Xo(o),o=Wo(o,n),o=jo(o,n),a=Qo(a),o=Qo(o),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(M="#version 300 es\n",x=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+x,_=["#define varying in",n.glslVersion===Nn?"":"out highp vec4 pc_fragColor;",n.glslVersion===Nn?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+_);const b=M+_+o,w=Oo(r,35633,M+x+a),S=Oo(r,35632,b);if(r.attachShader(y,w),r.attachShader(y,S),void 0!==n.index0AttributeName?r.bindAttribLocation(y,0,n.index0AttributeName):!0===n.morphTargets&&r.bindAttribLocation(y,0,"position"),r.linkProgram(y),t.debug.checkShaderErrors){const t=r.getProgramInfoLog(y).trim(),e=r.getShaderInfoLog(w).trim(),n=r.getShaderInfoLog(S).trim();let i=!0,s=!0;if(!1===r.getProgramParameter(y,35714)){i=!1;const e=Uo(r,w,"vertex"),n=Uo(r,S,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(y,35715)+"\n\nProgram Info Log: "+t+"\n"+e+"\n"+n)}else""!==t?console.warn("THREE.WebGLProgram: Program Info Log:",t):""!==e&&""!==n||(s=!1);s&&(this.diagnostics={runnable:i,programLog:t,vertexShader:{log:e,prefix:x},fragmentShader:{log:n,prefix:_}})}let T,E;return r.deleteShader(w),r.deleteShader(S),this.getUniforms=function(){return void 0===T&&(T=new zo(r,y)),T},this.getAttributes=function(){return void 0===E&&(E=function(t,e){const n={},i=t.getProgramParameter(e,35721);for(let r=0;r<i;r++){const i=t.getActiveAttrib(e,r),s=i.name;let a=1;35674===i.type&&(a=2),35675===i.type&&(a=3),35676===i.type&&(a=4),n[s]={type:i.type,location:t.getAttribLocation(e,s),locationSize:a}}return n}(r,y)),E},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(y),this.program=void 0},this.name=n.shaderName,this.id=Bo++,this.cacheKey=e,this.usedTimes=1,this.program=y,this.vertexShader=w,this.fragmentShader=S,this}function nl(t,e,n,i,r,s,a){const o=[],l=r.isWebGL2,c=r.logarithmicDepthBuffer,h=r.floatVertexTextures,u=r.maxVertexUniforms,d=r.vertexTextures;let p=r.precision;const m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},v=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoat","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap",,"roughnessMap","metalnessMap","gradientMap","alphaMap","alphaTest","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","morphTargetsCount","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","format","specularIntensityMap","specularColorMap","specularColorMapEncoding","transmission","transmissionMap","thicknessMap","sheen","sheenColorMap","sheenColorMapEncoding","sheenRoughnessMap"];function y(t){let e;return t&&t.isTexture?e=t.encoding:t&&t.isWebGLRenderTarget?(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),e=t.texture.encoding):e=Je,e}return{getParameters:function(s,o,v,x,_){const M=x.fog,b=s.isMeshStandardMaterial?x.environment:null,w=(s.isMeshStandardMaterial?n:e).get(s.envMap||b),S=m[s.type],T=_.isSkinnedMesh?function(t){const e=t.skeleton.bones;if(h)return 1024;{const t=u,n=Math.floor((t-20)/4),i=Math.min(n,e.length);return i<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+i+"."),0):i}}(_):0;let E,A;if(null!==s.precision&&(p=r.getMaxPrecision(s.precision),p!==s.precision&&console.warn("THREE.WebGLProgram.getParameters:",s.precision,"not supported, using",p,"instead.")),S){const t=Ws[S];E=t.vertexShader,A=t.fragmentShader}else E=s.vertexShader,A=s.fragmentShader;const L=t.getRenderTarget(),R=s.alphaTest>0,C=s.clearcoat>0;return{isWebGL2:l,shaderID:S,shaderName:s.type,vertexShader:E,fragmentShader:A,defines:s.defines,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:p,instancing:!0===_.isInstancedMesh,instancingColor:!0===_.isInstancedMesh&&null!==_.instanceColor,supportsVertexTextures:d,outputEncoding:null!==L?y(L.texture):t.outputEncoding,map:!!s.map,mapEncoding:y(s.map),matcap:!!s.matcap,matcapEncoding:y(s.matcap),envMap:!!w,envMapMode:w&&w.mapping,envMapEncoding:y(w),envMapCubeUV:!!w&&(w.mapping===ct||w.mapping===ht),lightMap:!!s.lightMap,lightMapEncoding:y(s.lightMap),aoMap:!!s.aoMap,emissiveMap:!!s.emissiveMap,emissiveMapEncoding:y(s.emissiveMap),bumpMap:!!s.bumpMap,normalMap:!!s.normalMap,objectSpaceNormalMap:s.normalMapType===on,tangentSpaceNormalMap:s.normalMapType===an,clearcoat:C,clearcoatMap:C&&!!s.clearcoatMap,clearcoatRoughnessMap:C&&!!s.clearcoatRoughnessMap,clearcoatNormalMap:C&&!!s.clearcoatNormalMap,displacementMap:!!s.displacementMap,roughnessMap:!!s.roughnessMap,metalnessMap:!!s.metalnessMap,specularMap:!!s.specularMap,specularIntensityMap:!!s.specularIntensityMap,specularColorMap:!!s.specularColorMap,specularColorMapEncoding:y(s.specularColorMap),alphaMap:!!s.alphaMap,alphaTest:R,gradientMap:!!s.gradientMap,sheen:s.sheen>0,sheenColorMap:!!s.sheenColorMap,sheenColorMapEncoding:y(s.sheenColorMap),sheenRoughnessMap:!!s.sheenRoughnessMap,transmission:s.transmission>0,transmissionMap:!!s.transmissionMap,thicknessMap:!!s.thicknessMap,combine:s.combine,vertexTangents:!!s.normalMap&&!!_.geometry&&!!_.geometry.attributes.tangent,vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!_.geometry&&!!_.geometry.attributes.color&&4===_.geometry.attributes.color.itemSize,vertexUvs:!!s.map||!!s.bumpMap||!!s.normalMap||!!s.specularMap||!!s.alphaMap||!!s.emissiveMap||!!s.roughnessMap||!!s.metalnessMap||!!s.clearcoatMap||!!s.clearcoatRoughnessMap||!!s.clearcoatNormalMap||!!s.displacementMap||!!s.transmissionMap||!!s.thicknessMap||!!s.specularIntensityMap||!!s.specularColorMap||!!s.sheenColorMap||s.sheenRoughnessMap,uvsVertexOnly:!(s.map||s.bumpMap||s.normalMap||s.specularMap||s.alphaMap||s.emissiveMap||s.roughnessMap||s.metalnessMap||s.clearcoatNormalMap||s.transmission>0||s.transmissionMap||s.thicknessMap||s.specularIntensityMap||s.specularColorMap||s.sheen>0||s.sheenColorMap||s.sheenRoughnessMap||!s.displacementMap),fog:!!M,useFog:s.fog,fogExp2:M&&M.isFogExp2,flatShading:!!s.flatShading,sizeAttenuation:s.sizeAttenuation,logarithmicDepthBuffer:c,skinning:!0===_.isSkinnedMesh&&T>0,maxBones:T,useVertexTexture:h,morphTargets:!!_.geometry&&!!_.geometry.morphAttributes.position,morphNormals:!!_.geometry&&!!_.geometry.morphAttributes.normal,morphTargetsCount:_.geometry&&_.geometry.morphAttributes.position?_.geometry.morphAttributes.position.length:0,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,format:s.format,dithering:s.dithering,shadowMapEnabled:t.shadowMap.enabled&&v.length>0,shadowMapType:t.shadowMap.type,toneMapping:s.toneMapped?t.toneMapping:K,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:s.premultipliedAlpha,doubleSided:s.side===g,flipSided:s.side===f,depthPacking:void 0!==s.depthPacking&&s.depthPacking,index0AttributeName:s.index0AttributeName,extensionDerivatives:s.extensions&&s.extensions.derivatives,extensionFragDepth:s.extensions&&s.extensions.fragDepth,extensionDrawBuffers:s.extensions&&s.extensions.drawBuffers,extensionShaderTextureLOD:s.extensions&&s.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:l||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||i.has("EXT_shader_texture_lod"),customProgramCacheKey:s.customProgramCacheKey()}},getProgramCacheKey:function(e){const n=[];if(e.shaderID?n.push(e.shaderID):(n.push(ti(e.fragmentShader)),n.push(ti(e.vertexShader))),void 0!==e.defines)for(const t in e.defines)n.push(t),n.push(e.defines[t]);if(!1===e.isRawShaderMaterial){for(let t=0;t<v.length;t++)n.push(e[v[t]]);n.push(t.outputEncoding),n.push(t.gammaFactor)}return n.push(e.customProgramCacheKey),n.join()},getUniforms:function(t){const e=m[t.type];let n;if(e){const t=Ws[e];n=Ss.clone(t.uniforms)}else n=t.uniforms;return n},acquireProgram:function(e,n){let i;for(let t=0,e=o.length;t<e;t++){const e=o[t];if(e.cacheKey===n){i=e,++i.usedTimes;break}}return void 0===i&&(i=new el(t,n,e,s),o.push(i)),i},releaseProgram:function(t){if(0==--t.usedTimes){const e=o.indexOf(t);o[e]=o[o.length-1],o.pop(),t.destroy()}},programs:o}}function il(){let t=new WeakMap;return{get:function(e){let n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,i){t.get(e)[n]=i},dispose:function(){t=new WeakMap}}}function rl(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function sl(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function al(t){const e=[];let n=0;const i=[],r=[],s=[],a={id:-1};function o(i,r,s,o,l,c){let h=e[n];const u=t.get(s);return void 0===h?(h={id:i.id,object:i,geometry:r,material:s,program:u.program||a,groupOrder:o,renderOrder:i.renderOrder,z:l,group:c},e[n]=h):(h.id=i.id,h.object=i,h.geometry=r,h.material=s,h.program=u.program||a,h.groupOrder=o,h.renderOrder=i.renderOrder,h.z=l,h.group=c),n++,h}return{opaque:i,transmissive:r,transparent:s,init:function(){n=0,i.length=0,r.length=0,s.length=0},push:function(t,e,n,a,l,c){const h=o(t,e,n,a,l,c);n.transmission>0?r.push(h):!0===n.transparent?s.push(h):i.push(h)},unshift:function(t,e,n,a,l,c){const h=o(t,e,n,a,l,c);n.transmission>0?r.unshift(h):!0===n.transparent?s.unshift(h):i.unshift(h)},finish:function(){for(let t=n,i=e.length;t<i;t++){const n=e[t];if(null===n.id)break;n.id=null,n.object=null,n.geometry=null,n.material=null,n.program=null,n.group=null}},sort:function(t,e){i.length>1&&i.sort(t||rl),r.length>1&&r.sort(e||sl),s.length>1&&s.sort(e||sl)}}}function ol(t){let e=new WeakMap;return{get:function(n,i){let r;return!1===e.has(n)?(r=new al(t),e.set(n,[r])):i>=e.get(n).length?(r=new al(t),e.get(n).push(r)):r=e.get(n)[i],r},dispose:function(){e=new WeakMap}}}function ll(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new ui,color:new Ir};break;case"SpotLight":n={position:new ui,direction:new ui,color:new Ir,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new ui,color:new Ir,distance:0,decay:0};break;case"HemisphereLight":n={direction:new ui,skyColor:new Ir,groundColor:new Ir};break;case"RectAreaLight":n={color:new Ir,position:new ui,halfWidth:new ui,halfHeight:new ui}}return t[e.id]=n,n}}}let cl=0;function hl(t,e){return(e.castShadow?1:0)-(t.castShadow?1:0)}function ul(t,e){const n=new ll,i=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yn};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yn,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=n,n}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let t=0;t<9;t++)r.probe.push(new ui);const s=new ui,a=new ki,o=new ki;return{setup:function(s,a){let o=0,l=0,c=0;for(let t=0;t<9;t++)r.probe[t].set(0,0,0);let h=0,u=0,d=0,p=0,m=0,f=0,g=0,v=0;s.sort(hl);const y=!0!==a?Math.PI:1;for(let t=0,e=s.length;t<e;t++){const e=s[t],a=e.color,x=e.intensity,_=e.distance,M=e.shadow&&e.shadow.map?e.shadow.map.texture:null;if(e.isAmbientLight)o+=a.r*x*y,l+=a.g*x*y,c+=a.b*x*y;else if(e.isLightProbe)for(let t=0;t<9;t++)r.probe[t].addScaledVector(e.sh.coefficients[t],x);else if(e.isDirectionalLight){const t=n.get(e);if(t.color.copy(e.color).multiplyScalar(e.intensity*y),e.castShadow){const t=e.shadow,n=i.get(e);n.shadowBias=t.bias,n.shadowNormalBias=t.normalBias,n.shadowRadius=t.radius,n.shadowMapSize=t.mapSize,r.directionalShadow[h]=n,r.directionalShadowMap[h]=M,r.directionalShadowMatrix[h]=e.shadow.matrix,f++}r.directional[h]=t,h++}else if(e.isSpotLight){const t=n.get(e);if(t.position.setFromMatrixPosition(e.matrixWorld),t.color.copy(a).multiplyScalar(x*y),t.distance=_,t.coneCos=Math.cos(e.angle),t.penumbraCos=Math.cos(e.angle*(1-e.penumbra)),t.decay=e.decay,e.castShadow){const t=e.shadow,n=i.get(e);n.shadowBias=t.bias,n.shadowNormalBias=t.normalBias,n.shadowRadius=t.radius,n.shadowMapSize=t.mapSize,r.spotShadow[d]=n,r.spotShadowMap[d]=M,r.spotShadowMatrix[d]=e.shadow.matrix,v++}r.spot[d]=t,d++}else if(e.isRectAreaLight){const t=n.get(e);t.color.copy(a).multiplyScalar(x),t.halfWidth.set(.5*e.width,0,0),t.halfHeight.set(0,.5*e.height,0),r.rectArea[p]=t,p++}else if(e.isPointLight){const t=n.get(e);if(t.color.copy(e.color).multiplyScalar(e.intensity*y),t.distance=e.distance,t.decay=e.decay,e.castShadow){const t=e.shadow,n=i.get(e);n.shadowBias=t.bias,n.shadowNormalBias=t.normalBias,n.shadowRadius=t.radius,n.shadowMapSize=t.mapSize,n.shadowCameraNear=t.camera.near,n.shadowCameraFar=t.camera.far,r.pointShadow[u]=n,r.pointShadowMap[u]=M,r.pointShadowMatrix[u]=e.shadow.matrix,g++}r.point[u]=t,u++}else if(e.isHemisphereLight){const t=n.get(e);t.skyColor.copy(e.color).multiplyScalar(x*y),t.groundColor.copy(e.groundColor).multiplyScalar(x*y),r.hemi[m]=t,m++}}p>0&&(e.isWebGL2||!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=Vs.LTC_FLOAT_1,r.rectAreaLTC2=Vs.LTC_FLOAT_2):!0===t.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=Vs.LTC_HALF_1,r.rectAreaLTC2=Vs.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=o,r.ambient[1]=l,r.ambient[2]=c;const x=r.hash;x.directionalLength===h&&x.pointLength===u&&x.spotLength===d&&x.rectAreaLength===p&&x.hemiLength===m&&x.numDirectionalShadows===f&&x.numPointShadows===g&&x.numSpotShadows===v||(r.directional.length=h,r.spot.length=d,r.rectArea.length=p,r.point.length=u,r.hemi.length=m,r.directionalShadow.length=f,r.directionalShadowMap.length=f,r.pointShadow.length=g,r.pointShadowMap.length=g,r.spotShadow.length=v,r.spotShadowMap.length=v,r.directionalShadowMatrix.length=f,r.pointShadowMatrix.length=g,r.spotShadowMatrix.length=v,x.directionalLength=h,x.pointLength=u,x.spotLength=d,x.rectAreaLength=p,x.hemiLength=m,x.numDirectionalShadows=f,x.numPointShadows=g,x.numSpotShadows=v,r.version=cl++)},setupView:function(t,e){let n=0,i=0,l=0,c=0,h=0;const u=e.matrixWorldInverse;for(let e=0,d=t.length;e<d;e++){const d=t[e];if(d.isDirectionalLight){const t=r.directional[n];t.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),t.direction.sub(s),t.direction.transformDirection(u),n++}else if(d.isSpotLight){const t=r.spot[l];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(u),t.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),t.direction.sub(s),t.direction.transformDirection(u),l++}else if(d.isRectAreaLight){const t=r.rectArea[c];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(u),o.identity(),a.copy(d.matrixWorld),a.premultiply(u),o.extractRotation(a),t.halfWidth.set(.5*d.width,0,0),t.halfHeight.set(0,.5*d.height,0),t.halfWidth.applyMatrix4(o),t.halfHeight.applyMatrix4(o),c++}else if(d.isPointLight){const t=r.point[i];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(u),i++}else if(d.isHemisphereLight){const t=r.hemi[h];t.direction.setFromMatrixPosition(d.matrixWorld),t.direction.transformDirection(u),t.direction.normalize(),h++}}},state:r}}function dl(t,e){const n=new ul(t,e),i=[],r=[];return{init:function(){i.length=0,r.length=0},state:{lightsArray:i,shadowsArray:r,lights:n},setupLights:function(t){n.setup(i,t)},setupLightsView:function(t){n.setupView(i,t)},pushLight:function(t){i.push(t)},pushShadow:function(t){r.push(t)}}}function pl(t,e){let n=new WeakMap;return{get:function(i,r=0){let s;return!1===n.has(i)?(s=new dl(t,e),n.set(i,[s])):r>=n.get(i).length?(s=new dl(t,e),n.get(i).push(s)):s=n.get(i)[r],s},dispose:function(){n=new WeakMap}}}class ml extends Er{constructor(t){super(),this.type="MeshDepthMaterial",this.depthPacking=rn,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}ml.prototype.isMeshDepthMaterial=!0;class fl extends Er{constructor(t){super(),this.type="MeshDistanceMaterial",this.referencePosition=new ui,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}function gl(t,e,n){let i=new Fs;const r=new Yn,s=new Yn,a=new ai,o=new ml({depthPacking:sn}),l=new fl,c={},h=n.maxTextureSize,d={0:f,1:m,2:g},v=new Ts({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Yn},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),y=v.clone();y.defines.HORIZONTAL_PASS=1;const _=new es;_.setAttribute("position",new Br(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const M=new xs(_,v),b=this;function w(n,i){const r=e.update(M);v.defines.VSM_SAMPLES!==n.blurSamples&&(v.defines.VSM_SAMPLES=n.blurSamples,y.defines.VSM_SAMPLES=n.blurSamples,v.needsUpdate=!0,y.needsUpdate=!0),v.uniforms.shadow_pass.value=n.map.texture,v.uniforms.resolution.value=n.mapSize,v.uniforms.radius.value=n.radius,t.setRenderTarget(n.mapPass),t.clear(),t.renderBufferDirect(i,null,r,v,M,null),y.uniforms.shadow_pass.value=n.mapPass.texture,y.uniforms.resolution.value=n.mapSize,y.uniforms.radius.value=n.radius,t.setRenderTarget(n.map),t.clear(),t.renderBufferDirect(i,null,r,y,M,null)}function S(e,n,i,r,s,a,h){let u=null;const m=!0===r.isPointLight?e.customDistanceMaterial:e.customDepthMaterial;if(u=void 0!==m?m:!0===r.isPointLight?l:o,t.localClippingEnabled&&!0===i.clipShadows&&0!==i.clippingPlanes.length||i.displacementMap&&0!==i.displacementScale||i.alphaMap&&i.alphaTest>0){const t=u.uuid,e=i.uuid;let n=c[t];void 0===n&&(n={},c[t]=n);let r=n[e];void 0===r&&(r=u.clone(),n[e]=r),u=r}return u.visible=i.visible,u.wireframe=i.wireframe,u.side=h===p?null!==i.shadowSide?i.shadowSide:i.side:null!==i.shadowSide?i.shadowSide:d[i.side],u.alphaMap=i.alphaMap,u.alphaTest=i.alphaTest,u.clipShadows=i.clipShadows,u.clippingPlanes=i.clippingPlanes,u.clipIntersection=i.clipIntersection,u.displacementMap=i.displacementMap,u.displacementScale=i.displacementScale,u.displacementBias=i.displacementBias,u.wireframeLinewidth=i.wireframeLinewidth,u.linewidth=i.linewidth,!0===r.isPointLight&&!0===u.isMeshDistanceMaterial&&(u.referencePosition.setFromMatrixPosition(r.matrixWorld),u.nearDistance=s,u.farDistance=a),u}function T(n,r,s,a,o){if(!1===n.visible)return;if(n.layers.test(r.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&o===p)&&(!n.frustumCulled||i.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,n.matrixWorld);const i=e.update(n),r=n.material;if(Array.isArray(r)){const e=i.groups;for(let l=0,c=e.length;l<c;l++){const c=e[l],h=r[c.materialIndex];if(h&&h.visible){const e=S(n,0,h,a,s.near,s.far,o);t.renderBufferDirect(s,null,i,e,n,c)}}}else if(r.visible){const e=S(n,0,r,a,s.near,s.far,o);t.renderBufferDirect(s,null,i,e,n,null)}}const l=n.children;for(let t=0,e=l.length;t<e;t++)T(l[t],r,s,a,o)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=u,this.render=function(e,n,o){if(!1===b.enabled)return;if(!1===b.autoUpdate&&!1===b.needsUpdate)return;if(0===e.length)return;const l=t.getRenderTarget(),c=t.getActiveCubeFace(),u=t.getActiveMipmapLevel(),d=t.state;d.setBlending(x),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(let l=0,c=e.length;l<c;l++){const c=e[l],u=c.shadow;if(void 0===u){console.warn("THREE.WebGLShadowMap:",c,"has no shadow.");continue}if(!1===u.autoUpdate&&!1===u.needsUpdate)continue;r.copy(u.mapSize);const m=u.getFrameExtents();if(r.multiply(m),s.copy(u.mapSize),(r.x>h||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/m.x),r.x=s.x*m.x,u.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/m.y),r.y=s.y*m.y,u.mapSize.y=s.y)),null===u.map&&!u.isPointLightShadow&&this.type===p){const t={minFilter:xt,magFilter:xt,format:Ft};u.map=new oi(r.x,r.y,t),u.map.texture.name=c.name+".shadowMap",u.mapPass=new oi(r.x,r.y,t),u.camera.updateProjectionMatrix()}if(null===u.map){const t={minFilter:mt,magFilter:mt,format:Ft};u.map=new oi(r.x,r.y,t),u.map.texture.name=c.name+".shadowMap",u.camera.updateProjectionMatrix()}t.setRenderTarget(u.map),t.clear();const f=u.getViewportCount();for(let t=0;t<f;t++){const e=u.getViewport(t);a.set(s.x*e.x,s.y*e.y,s.x*e.z,s.y*e.w),d.viewport(a),u.updateMatrices(c,t),i=u.getFrustum(),T(n,o,u.camera,c,this.type)}u.isPointLightShadow||this.type!==p||w(u,o),u.needsUpdate=!1}b.needsUpdate=!1,t.setRenderTarget(l,c,u)}}function vl(t,e,n){const i=n.isWebGL2,r=new function(){let e=!1;const n=new ai;let i=null;const r=new ai(0,0,0,0);return{setMask:function(n){i===n||e||(t.colorMask(n,n,n,n),i=n)},setLocked:function(t){e=t},setClear:function(e,i,s,a,o){!0===o&&(e*=a,i*=a,s*=a),n.set(e,i,s,a),!1===r.equals(n)&&(t.clearColor(e,i,s,a),r.copy(n))},reset:function(){e=!1,i=null,r.set(-1,0,0,0)}}},s=new function(){let e=!1,n=null,i=null,r=null;return{setTest:function(t){t?vt(2929):yt(2929)},setMask:function(i){n===i||e||(t.depthMask(i),n=i)},setFunc:function(e){if(i!==e){if(e)switch(e){case G:t.depthFunc(512);break;case k:t.depthFunc(519);break;case V:t.depthFunc(513);break;case W:t.depthFunc(515);break;case j:t.depthFunc(514);break;case q:t.depthFunc(518);break;case X:t.depthFunc(516);break;case Y:t.depthFunc(517);break;default:t.depthFunc(515)}else t.depthFunc(515);i=e}},setLocked:function(t){e=t},setClear:function(e){r!==e&&(t.clearDepth(e),r=e)},reset:function(){e=!1,n=null,i=null,r=null}}},c=new function(){let e=!1,n=null,i=null,r=null,s=null,a=null,o=null,l=null,c=null;return{setTest:function(t){e||(t?vt(2960):yt(2960))},setMask:function(i){n===i||e||(t.stencilMask(i),n=i)},setFunc:function(e,n,a){i===e&&r===n&&s===a||(t.stencilFunc(e,n,a),i=e,r=n,s=a)},setOp:function(e,n,i){a===e&&o===n&&l===i||(t.stencilOp(e,n,i),a=e,o=n,l=i)},setLocked:function(t){e=t},setClear:function(e){c!==e&&(t.clearStencil(e),c=e)},reset:function(){e=!1,n=null,i=null,r=null,s=null,a=null,o=null,l=null,c=null}}};let h={},u={},d=null,p=!1,m=null,v=null,y=null,Z=null,J=null,Q=null,K=null,$=!1,tt=null,et=null,nt=null,it=null,rt=null;const st=t.getParameter(35661);let at=!1,ot=0;const lt=t.getParameter(7938);-1!==lt.indexOf("WebGL")?(ot=parseFloat(/^WebGL (\d)/.exec(lt)[1]),at=ot>=1):-1!==lt.indexOf("OpenGL ES")&&(ot=parseFloat(/^OpenGL ES (\d)/.exec(lt)[1]),at=ot>=2);let ct=null,ht={};const ut=t.getParameter(3088),dt=t.getParameter(2978),pt=(new ai).fromArray(ut),mt=(new ai).fromArray(dt);function ft(e,n,i){const r=new Uint8Array(4),s=t.createTexture();t.bindTexture(e,s),t.texParameteri(e,10241,9728),t.texParameteri(e,10240,9728);for(let e=0;e<i;e++)t.texImage2D(n+e,0,6408,1,1,0,6408,5121,r);return s}const gt={};function vt(e){!0!==h[e]&&(t.enable(e),h[e]=!0)}function yt(e){!1!==h[e]&&(t.disable(e),h[e]=!1)}gt[3553]=ft(3553,3553,1),gt[34067]=ft(34067,34069,6),r.setClear(0,0,0,1),s.setClear(1),c.setClear(0),vt(2929),s.setFunc(W),bt(!1),wt(o),vt(2884),Mt(x);const xt={[T]:32774,[E]:32778,[A]:32779};if(i)xt[L]=32775,xt[R]=32776;else{const t=e.get("EXT_blend_minmax");null!==t&&(xt[L]=t.MIN_EXT,xt[R]=t.MAX_EXT)}const _t={[C]:0,[P]:1,[D]:768,[N]:770,[H]:776,[F]:774,[O]:772,[I]:769,[z]:771,[U]:775,[B]:773};function Mt(e,n,i,r,s,a,o,l){if(e!==x){if(!1===p&&(vt(3042),p=!0),e===S)s=s||n,a=a||i,o=o||r,n===v&&s===J||(t.blendEquationSeparate(xt[n],xt[s]),v=n,J=s),i===y&&r===Z&&a===Q&&o===K||(t.blendFuncSeparate(_t[i],_t[r],_t[a],_t[o]),y=i,Z=r,Q=a,K=o),m=e,$=null;else if(e!==m||l!==$){if(v===T&&J===T||(t.blendEquation(32774),v=T,J=T),l)switch(e){case _:t.blendFuncSeparate(1,771,1,771);break;case M:t.blendFunc(1,1);break;case b:t.blendFuncSeparate(0,0,769,771);break;case w:t.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}else switch(e){case _:t.blendFuncSeparate(770,771,1,771);break;case M:t.blendFunc(770,1);break;case b:t.blendFunc(0,769);break;case w:t.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}y=null,Z=null,Q=null,K=null,m=e,$=l}}else!0===p&&(yt(3042),p=!1)}function bt(e){tt!==e&&(e?t.frontFace(2304):t.frontFace(2305),tt=e)}function wt(e){e!==a?(vt(2884),e!==et&&(e===o?t.cullFace(1029):e===l?t.cullFace(1028):t.cullFace(1032))):yt(2884),et=e}function St(e,n,i){e?(vt(32823),it===n&&rt===i||(t.polygonOffset(n,i),it=n,rt=i)):yt(32823)}function Tt(e){void 0===e&&(e=33984+st-1),ct!==e&&(t.activeTexture(e),ct=e)}return{buffers:{color:r,depth:s,stencil:c},enable:vt,disable:yt,bindFramebuffer:function(e,n){return u[e]!==n&&(t.bindFramebuffer(e,n),u[e]=n,i&&(36009===e&&(u[36160]=n),36160===e&&(u[36009]=n)),!0)},useProgram:function(e){return d!==e&&(t.useProgram(e),d=e,!0)},setBlending:Mt,setMaterial:function(t,e){t.side===g?yt(2884):vt(2884);let n=t.side===f;e&&(n=!n),bt(n),t.blending===_&&!1===t.transparent?Mt(x):Mt(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha),s.setFunc(t.depthFunc),s.setTest(t.depthTest),s.setMask(t.depthWrite),r.setMask(t.colorWrite);const i=t.stencilWrite;c.setTest(i),i&&(c.setMask(t.stencilWriteMask),c.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),c.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),St(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),!0===t.alphaToCoverage?vt(32926):yt(32926)},setFlipSided:bt,setCullFace:wt,setLineWidth:function(e){e!==nt&&(at&&t.lineWidth(e),nt=e)},setPolygonOffset:St,setScissorTest:function(t){t?vt(3089):yt(3089)},activeTexture:Tt,bindTexture:function(e,n){null===ct&&Tt();let i=ht[ct];void 0===i&&(i={type:void 0,texture:void 0},ht[ct]=i),i.type===e&&i.texture===n||(t.bindTexture(e,n||gt[e]),i.type=e,i.texture=n)},unbindTexture:function(){const e=ht[ct];void 0!==e&&void 0!==e.type&&(t.bindTexture(e.type,null),e.type=void 0,e.texture=void 0)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texStorage2D:function(){try{t.texStorage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texSubImage2D:function(){try{t.texSubImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===pt.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),pt.copy(e))},viewport:function(e){!1===mt.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),mt.copy(e))},reset:function(){t.disable(3042),t.disable(2884),t.disable(2929),t.disable(32823),t.disable(3089),t.disable(2960),t.disable(32926),t.blendEquation(32774),t.blendFunc(1,0),t.blendFuncSeparate(1,0,1,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(513),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(519,0,4294967295),t.stencilOp(7680,7680,7680),t.clearStencil(0),t.cullFace(1029),t.frontFace(2305),t.polygonOffset(0,0),t.activeTexture(33984),t.bindFramebuffer(36160,null),!0===i&&(t.bindFramebuffer(36009,null),t.bindFramebuffer(36008,null)),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),h={},ct=null,ht={},u={},d=null,p=!1,m=null,v=null,y=null,Z=null,J=null,Q=null,K=null,$=!1,tt=null,et=null,nt=null,it=null,rt=null,pt.set(0,0,t.canvas.width,t.canvas.height),mt.set(0,0,t.canvas.width,t.canvas.height),r.reset(),s.reset(),c.reset()}}}function yl(t,e,n,i,r,s,a){const o=r.isWebGL2,l=r.maxTextures,c=r.maxCubemapSize,h=r.maxTextureSize,u=r.maxSamples,d=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):void 0,p=new WeakMap;let m,f=!1;try{f="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(t){}function g(t,e){return f?new OffscreenCanvas(t,e):$n("canvas")}function v(t,e,n,i){let r=1;if((t.width>i||t.height>i)&&(r=i/Math.max(t.width,t.height)),r<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const i=e?qn:Math.floor,s=i(r*t.width),a=i(r*t.height);void 0===m&&(m=g(s,a));const o=n?g(s,a):m;return o.width=s,o.height=a,o.getContext("2d").drawImage(t,0,0,s,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+s+"x"+a+")."),o}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+")."),t}return t}function y(t){return Wn(t.width)&&Wn(t.height)}function x(t,e){return t.generateMipmaps&&e&&t.minFilter!==mt&&t.minFilter!==xt}function _(e){t.generateMipmap(e)}function M(n,i,r){if(!1===o)return i;if(null!==n){if(void 0!==t[n])return t[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let s=i;return 6403===i&&(5126===r&&(s=33326),5131===r&&(s=33325),5121===r&&(s=33321)),6407===i&&(5126===r&&(s=34837),5131===r&&(s=34843),5121===r&&(s=32849)),6408===i&&(5126===r&&(s=34836),5131===r&&(s=34842),5121===r&&(s=32856)),33325!==s&&33326!==s&&34842!==s&&34836!==s||e.get("EXT_color_buffer_float"),s}function b(t){return t===mt||t===ft||t===vt?9728:9729}function w(e){const n=e.target;n.removeEventListener("dispose",w),function(e){const n=i.get(e);void 0!==n.__webglInit&&(t.deleteTexture(n.__webglTexture),i.remove(e))}(n),n.isVideoTexture&&p.delete(n),a.memory.textures--}function S(e){const n=e.target;n.removeEventListener("dispose",S),function(e){const n=e.texture,r=i.get(e),s=i.get(n);if(e){if(void 0!==s.__webglTexture&&(t.deleteTexture(s.__webglTexture),a.memory.textures--),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++)t.deleteFramebuffer(r.__webglFramebuffer[e]),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer[e]);else t.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer),r.__webglMultisampledFramebuffer&&t.deleteFramebuffer(r.__webglMultisampledFramebuffer),r.__webglColorRenderbuffer&&t.deleteRenderbuffer(r.__webglColorRenderbuffer),r.__webglDepthRenderbuffer&&t.deleteRenderbuffer(r.__webglDepthRenderbuffer);if(e.isWebGLMultipleRenderTargets)for(let e=0,r=n.length;e<r;e++){const r=i.get(n[e]);r.__webglTexture&&(t.deleteTexture(r.__webglTexture),a.memory.textures--),i.remove(n[e])}i.remove(n),i.remove(e)}}(n)}let T=0;function E(t,e){const r=i.get(t);if(t.isVideoTexture&&function(t){const e=a.render.frame;p.get(t)!==e&&(p.set(t,e),t.update())}(t),t.version>0&&r.__version!==t.version){const n=t.image;if(void 0===n)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==n.complete)return void D(r,t,e);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+e),n.bindTexture(3553,r.__webglTexture)}function A(e,r){const a=i.get(e);e.version>0&&a.__version!==e.version?function(e,i,r){if(6!==i.image.length)return;P(e,i),n.activeTexture(33984+r),n.bindTexture(34067,e.__webglTexture),t.pixelStorei(37440,i.flipY),t.pixelStorei(37441,i.premultiplyAlpha),t.pixelStorei(3317,i.unpackAlignment),t.pixelStorei(37443,0);const a=i&&(i.isCompressedTexture||i.image[0].isCompressedTexture),l=i.image[0]&&i.image[0].isDataTexture,h=[];for(let t=0;t<6;t++)h[t]=a||l?l?i.image[t].image:i.image[t]:v(i.image[t],!1,!0,c);const u=y(h[0])||o,d=s.convert(i.format),p=s.convert(i.type),m=M(i.internalFormat,d,p,i.encoding);let f;if(C(34067,i,u),a)for(let t=0;t<6;t++){f=h[t].mipmaps;for(let e=0;e<f.length;e++){const r=f[e];i.format!==Ft&&i.format!==Bt?null!==d?n.compressedTexImage2D(34069+t,e,m,r.width,r.height,0,r.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+t,e,m,r.width,r.height,0,d,p,r.data)}}else{f=i.mipmaps;for(let t=0;t<6;t++)if(l){n.texImage2D(34069+t,0,m,h[t].width,h[t].height,0,d,p,h[t].data);for(let e=0;e<f.length;e++){const i=f[e].image[t].image;n.texImage2D(34069+t,e+1,m,i.width,i.height,0,d,p,i.data)}}else{n.texImage2D(34069+t,0,m,d,p,h[t]);for(let e=0;e<f.length;e++){const i=f[e];n.texImage2D(34069+t,e+1,m,d,p,i.image[t])}}}x(i,u)&&_(34067),e.__version=i.version,i.onUpdate&&i.onUpdate(i)}(a,e,r):(n.activeTexture(33984+r),n.bindTexture(34067,a.__webglTexture))}const L={[ut]:10497,[dt]:33071,[pt]:33648},R={[mt]:9728,[ft]:9984,[vt]:9986,[xt]:9729,[_t]:9985,[bt]:9987};function C(n,s,a){if(a?(t.texParameteri(n,10242,L[s.wrapS]),t.texParameteri(n,10243,L[s.wrapT]),32879!==n&&35866!==n||t.texParameteri(n,32882,L[s.wrapR]),t.texParameteri(n,10240,R[s.magFilter]),t.texParameteri(n,10241,R[s.minFilter])):(t.texParameteri(n,10242,33071),t.texParameteri(n,10243,33071),32879!==n&&35866!==n||t.texParameteri(n,32882,33071),s.wrapS===dt&&s.wrapT===dt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(n,10240,b(s.magFilter)),t.texParameteri(n,10241,b(s.minFilter)),s.minFilter!==mt&&s.minFilter!==xt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===e.has("EXT_texture_filter_anisotropic")){const a=e.get("EXT_texture_filter_anisotropic");if(s.type===Ct&&!1===e.has("OES_texture_float_linear"))return;if(!1===o&&s.type===Pt&&!1===e.has("OES_texture_half_float_linear"))return;(s.anisotropy>1||i.get(s).__currentAnisotropy)&&(t.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,r.getMaxAnisotropy())),i.get(s).__currentAnisotropy=s.anisotropy)}}function P(e,n){void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",w),e.__webglTexture=t.createTexture(),a.memory.textures++)}function D(e,i,r){let a=3553;i.isDataTexture2DArray&&(a=35866),i.isDataTexture3D&&(a=32879),P(e,i),n.activeTexture(33984+r),n.bindTexture(a,e.__webglTexture),t.pixelStorei(37440,i.flipY),t.pixelStorei(37441,i.premultiplyAlpha),t.pixelStorei(3317,i.unpackAlignment),t.pixelStorei(37443,0);const l=function(t){return!o&&(t.wrapS!==dt||t.wrapT!==dt||t.minFilter!==mt&&t.minFilter!==xt)}(i)&&!1===y(i.image),c=v(i.image,l,!1,h),u=y(c)||o,d=s.convert(i.format);let p,m=s.convert(i.type),f=M(i.internalFormat,d,m,i.encoding);C(a,i,u);const g=i.mipmaps;if(i.isDepthTexture)f=6402,o?f=i.type===Ct?36012:i.type===Rt?33190:i.type===zt?35056:33189:i.type===Ct&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===kt&&6402===f&&i.type!==At&&i.type!==Rt&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=At,m=s.convert(i.type)),i.format===Vt&&6402===f&&(f=34041,i.type!==zt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=zt,m=s.convert(i.type))),n.texImage2D(3553,0,f,c.width,c.height,0,d,m,null);else if(i.isDataTexture)if(g.length>0&&u){for(let t=0,e=g.length;t<e;t++)p=g[t],n.texImage2D(3553,t,f,p.width,p.height,0,d,m,p.data);i.generateMipmaps=!1}else n.texImage2D(3553,0,f,c.width,c.height,0,d,m,c.data);else if(i.isCompressedTexture)for(let t=0,e=g.length;t<e;t++)p=g[t],i.format!==Ft&&i.format!==Bt?null!==d?n.compressedTexImage2D(3553,t,f,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,t,f,p.width,p.height,0,d,m,p.data);else if(i.isDataTexture2DArray)n.texImage3D(35866,0,f,c.width,c.height,c.depth,0,d,m,c.data);else if(i.isDataTexture3D)n.texImage3D(32879,0,f,c.width,c.height,c.depth,0,d,m,c.data);else{const t=function(t,e,n){return!0===x(t,n)?Math.log2(Math.max(e.width,e.height))+1:t.mipmaps.length>0?t.mipmaps.length:1}(i,c,u),r=o&&!0!==i.isVideoTexture,s=void 0===e.__version;if(g.length>0&&u){r&&s&&n.texStorage2D(3553,t,f,g[0].width,g[0].height);for(let t=0,e=g.length;t<e;t++)p=g[t],r?n.texSubImage2D(3553,t,0,0,d,m,p):n.texImage2D(3553,t,f,d,m,p);i.generateMipmaps=!1}else r?(s&&n.texStorage2D(3553,t,f,c.width,c.height),n.texSubImage2D(3553,0,0,0,d,m,c)):n.texImage2D(3553,0,f,d,m,c)}x(i,u)&&_(a),e.__version=i.version,i.onUpdate&&i.onUpdate(i)}function I(e,r,a,o,l){const c=s.convert(a.format),h=s.convert(a.type),u=M(a.internalFormat,c,h,a.encoding);i.get(r).__hasExternalTextures||(32879===l||35866===l?n.texImage3D(l,0,u,r.width,r.height,r.depth,0,c,h,null):n.texImage2D(l,0,u,r.width,r.height,0,c,h,null)),n.bindFramebuffer(36160,e),r.useRenderToTexture?d.framebufferTexture2DMultisampleEXT(36160,o,l,i.get(a).__webglTexture,0,O(r)):t.framebufferTexture2D(36160,o,l,i.get(a).__webglTexture,0),n.bindFramebuffer(36160,null)}function N(e,n,i){if(t.bindRenderbuffer(36161,e),n.depthBuffer&&!n.stencilBuffer){let r=33189;if(i||n.useRenderToTexture){const e=n.depthTexture;e&&e.isDepthTexture&&(e.type===Ct?r=36012:e.type===Rt&&(r=33190));const i=O(n);n.useRenderToTexture?d.renderbufferStorageMultisampleEXT(36161,i,r,n.width,n.height):t.renderbufferStorageMultisample(36161,i,r,n.width,n.height)}else t.renderbufferStorage(36161,r,n.width,n.height);t.framebufferRenderbuffer(36160,36096,36161,e)}else if(n.depthBuffer&&n.stencilBuffer){const r=O(n);i&&n.useRenderbuffer?t.renderbufferStorageMultisample(36161,r,35056,n.width,n.height):n.useRenderToTexture?d.renderbufferStorageMultisampleEXT(36161,r,35056,n.width,n.height):t.renderbufferStorage(36161,34041,n.width,n.height),t.framebufferRenderbuffer(36160,33306,36161,e)}else{const e=!0===n.isWebGLMultipleRenderTargets?n.texture[0]:n.texture,r=s.convert(e.format),a=s.convert(e.type),o=M(e.internalFormat,r,a,e.encoding),l=O(n);i&&n.useRenderbuffer?t.renderbufferStorageMultisample(36161,l,o,n.width,n.height):n.useRenderToTexture?d.renderbufferStorageMultisampleEXT(36161,l,o,n.width,n.height):t.renderbufferStorage(36161,o,n.width,n.height)}t.bindRenderbuffer(36161,null)}function z(e){const r=i.get(e),s=!0===e.isWebGLCubeRenderTarget;if(e.depthTexture&&!r.__autoAllocateDepthBuffer){if(s)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,r){if(r&&r.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,e),!r.depthTexture||!r.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");i.get(r.depthTexture).__webglTexture&&r.depthTexture.image.width===r.width&&r.depthTexture.image.height===r.height||(r.depthTexture.image.width=r.width,r.depthTexture.image.height=r.height,r.depthTexture.needsUpdate=!0),E(r.depthTexture,0);const s=i.get(r.depthTexture).__webglTexture,a=O(r);if(r.depthTexture.format===kt)r.useRenderToTexture?d.framebufferTexture2DMultisampleEXT(36160,36096,3553,s,0,a):t.framebufferTexture2D(36160,36096,3553,s,0);else{if(r.depthTexture.format!==Vt)throw new Error("Unknown depthTexture format");r.useRenderToTexture?d.framebufferTexture2DMultisampleEXT(36160,33306,3553,s,0,a):t.framebufferTexture2D(36160,33306,3553,s,0)}}(r.__webglFramebuffer,e)}else if(s){r.__webglDepthbuffer=[];for(let i=0;i<6;i++)n.bindFramebuffer(36160,r.__webglFramebuffer[i]),r.__webglDepthbuffer[i]=t.createRenderbuffer(),N(r.__webglDepthbuffer[i],e,!1)}else n.bindFramebuffer(36160,r.__webglFramebuffer),r.__webglDepthbuffer=t.createRenderbuffer(),N(r.__webglDepthbuffer,e,!1);n.bindFramebuffer(36160,null)}function O(t){return o&&(t.useRenderbuffer||t.useRenderToTexture)?Math.min(u,t.samples):0}let B=!1,F=!1;this.allocateTextureUnit=function(){const t=T;return t>=l&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+l),T+=1,t},this.resetTextureUnits=function(){T=0},this.setTexture2D=E,this.setTexture2DArray=function(t,e){const r=i.get(t);t.version>0&&r.__version!==t.version?D(r,t,e):(n.activeTexture(33984+e),n.bindTexture(35866,r.__webglTexture))},this.setTexture3D=function(t,e){const r=i.get(t);t.version>0&&r.__version!==t.version?D(r,t,e):(n.activeTexture(33984+e),n.bindTexture(32879,r.__webglTexture))},this.setTextureCube=A,this.rebindTextures=function(t,e,n){const r=i.get(t);void 0!==e&&I(r.__webglFramebuffer,t,t.texture,36064,3553),void 0!==n&&z(t)},this.setupRenderTarget=function(e){const l=e.texture,c=i.get(e),h=i.get(l);e.addEventListener("dispose",S),!0!==e.isWebGLMultipleRenderTargets&&(void 0===h.__webglTexture&&(h.__webglTexture=t.createTexture()),h.__version=l.version,a.memory.textures++);const u=!0===e.isWebGLCubeRenderTarget,d=!0===e.isWebGLMultipleRenderTargets,p=l.isDataTexture3D||l.isDataTexture2DArray,m=y(e)||o;if(!o||l.format!==Bt||l.type!==Ct&&l.type!==Pt||(l.format=Ft,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),u){c.__webglFramebuffer=[];for(let e=0;e<6;e++)c.__webglFramebuffer[e]=t.createFramebuffer()}else if(c.__webglFramebuffer=t.createFramebuffer(),d)if(r.drawBuffers){const n=e.texture;for(let e=0,r=n.length;e<r;e++){const r=i.get(n[e]);void 0===r.__webglTexture&&(r.__webglTexture=t.createTexture(),a.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(e.useRenderbuffer)if(o){c.__webglMultisampledFramebuffer=t.createFramebuffer(),c.__webglColorRenderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,c.__webglColorRenderbuffer);const i=s.convert(l.format),r=s.convert(l.type),a=M(l.internalFormat,i,r,l.encoding),o=O(e);t.renderbufferStorageMultisample(36161,o,a,e.width,e.height),n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(36160,36064,36161,c.__webglColorRenderbuffer),t.bindRenderbuffer(36161,null),e.depthBuffer&&(c.__webglDepthRenderbuffer=t.createRenderbuffer(),N(c.__webglDepthRenderbuffer,e,!0)),n.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(u){n.bindTexture(34067,h.__webglTexture),C(34067,l,m);for(let t=0;t<6;t++)I(c.__webglFramebuffer[t],e,l,36064,34069+t);x(l,m)&&_(34067),n.unbindTexture()}else if(d){const t=e.texture;for(let r=0,s=t.length;r<s;r++){const s=t[r],a=i.get(s);n.bindTexture(3553,a.__webglTexture),C(3553,s,m),I(c.__webglFramebuffer,e,s,36064+r,3553),x(s,m)&&_(3553)}n.unbindTexture()}else{let t=3553;p&&(o?t=l.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),n.bindTexture(t,h.__webglTexture),C(t,l,m),I(c.__webglFramebuffer,e,l,36064,t),x(l,m)&&_(t),n.unbindTexture()}e.depthBuffer&&z(e)},this.updateRenderTargetMipmap=function(t){const e=y(t)||o,r=!0===t.isWebGLMultipleRenderTargets?t.texture:[t.texture];for(let s=0,a=r.length;s<a;s++){const a=r[s];if(x(a,e)){const e=t.isWebGLCubeRenderTarget?34067:3553,r=i.get(a).__webglTexture;n.bindTexture(e,r),_(e),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(e){if(e.useRenderbuffer)if(o){const r=e.width,s=e.height;let a=16384;const o=[36064],l=e.stencilBuffer?33306:36096;e.depthBuffer&&o.push(l),e.ignoreDepthForMultisampleCopy||(e.depthBuffer&&(a|=256),e.stencilBuffer&&(a|=1024));const c=i.get(e);n.bindFramebuffer(36008,c.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,c.__webglFramebuffer),e.ignoreDepthForMultisampleCopy&&(t.invalidateFramebuffer(36008,[l]),t.invalidateFramebuffer(36009,[l])),t.blitFramebuffer(0,0,r,s,0,0,r,s,a,9728),t.invalidateFramebuffer(36008,o),n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,c.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.setupDepthRenderbuffer=z,this.setupFrameBufferTexture=I,this.safeSetTexture2D=function(t,e){t&&t.isWebGLRenderTarget&&(!1===B&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),B=!0),t=t.texture),E(t,e)},this.safeSetTextureCube=function(t,e){t&&t.isWebGLCubeRenderTarget&&(!1===F&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),F=!0),t=t.texture),A(t,e)}}function xl(t,e,n){const i=n.isWebGL2;return{convert:function(t){let n;if(t===St)return 5121;if(t===Dt)return 32819;if(t===It)return 32820;if(t===Nt)return 33635;if(t===Tt)return 5120;if(t===Et)return 5122;if(t===At)return 5123;if(t===Lt)return 5124;if(t===Rt)return 5125;if(t===Ct)return 5126;if(t===Pt)return i?5131:(n=e.get("OES_texture_half_float"),null!==n?n.HALF_FLOAT_OES:null);if(t===Ot)return 6406;if(t===Bt)return 6407;if(t===Ft)return 6408;if(t===Ut)return 6409;if(t===Ht)return 6410;if(t===kt)return 6402;if(t===Vt)return 34041;if(t===Wt)return 6403;if(t===jt)return 36244;if(t===qt)return 33319;if(t===Xt)return 33320;if(t===Yt)return 36248;if(t===Zt)return 36249;if(t===Jt||t===Qt||t===Kt||t===$t){if(n=e.get("WEBGL_compressed_texture_s3tc"),null===n)return null;if(t===Jt)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===Qt)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===Kt)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===$t)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(t===te||t===ee||t===ne||t===ie){if(n=e.get("WEBGL_compressed_texture_pvrtc"),null===n)return null;if(t===te)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===ee)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===ne)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===ie)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(t===re)return n=e.get("WEBGL_compressed_texture_etc1"),null!==n?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((t===se||t===ae)&&(n=e.get("WEBGL_compressed_texture_etc"),null!==n)){if(t===se)return n.COMPRESSED_RGB8_ETC2;if(t===ae)return n.COMPRESSED_RGBA8_ETC2_EAC}return t===oe||t===le||t===ce||t===he||t===ue||t===de||t===pe||t===me||t===fe||t===ge||t===ve||t===ye||t===xe||t===_e||t===be||t===we||t===Se||t===Te||t===Ee||t===Ae||t===Le||t===Re||t===Ce||t===Pe||t===De||t===Ie||t===Ne||t===ze?(n=e.get("WEBGL_compressed_texture_astc"),null!==n?t:null):t===Me?(n=e.get("EXT_texture_compression_bptc"),null!==n?t:null):t===zt?i?34042:(n=e.get("WEBGL_depth_texture"),null!==n?n.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}fl.prototype.isMeshDistanceMaterial=!0;class _l extends As{constructor(t=[]){super(),this.cameras=t}}_l.prototype.isArrayCamera=!0;class Ml extends pr{constructor(){super(),this.type="Group"}}Ml.prototype.isGroup=!0;const bl={type:"move"};class wl{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Ml,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Ml,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new ui,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new ui),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Ml,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new ui,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new ui),this._grip}dispatchEvent(t){return null!==this._targetRay&&this._targetRay.dispatchEvent(t),null!==this._grip&&this._grip.dispatchEvent(t),null!==this._hand&&this._hand.dispatchEvent(t),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(t,e,n){let i=null,r=null,s=null;const a=this._targetRay,o=this._grip,l=this._hand;if(t&&"visible-blurred"!==e.session.visibilityState)if(null!==a&&(i=e.getPose(t.targetRaySpace,n),null!==i&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(bl))),l&&t.hand){s=!0;for(const i of t.hand.values()){const t=e.getJointPose(i,n);if(void 0===l.joints[i.jointName]){const t=new Ml;t.matrixAutoUpdate=!1,t.visible=!1,l.joints[i.jointName]=t,l.add(t)}const r=l.joints[i.jointName];null!==t&&(r.matrix.fromArray(t.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.jointRadius=t.radius),r.visible=null!==t}const i=l.joints["index-finger-tip"],r=l.joints["thumb-tip"],a=i.position.distanceTo(r.position),o=.02,c=.005;l.inputState.pinching&&a>o+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&a<=o-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==o&&t.gripSpace&&(r=e.getPose(t.gripSpace,n),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1));return null!==a&&(a.visible=null!==i),null!==o&&(o.visible=null!==r),null!==l&&(l.visible=null!==s),this}}class Sl extends ri{constructor(t,e,n,i,r,s,a,o,l,c){if((c=void 0!==c?c:kt)!==kt&&c!==Vt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===kt&&(n=At),void 0===n&&c===Vt&&(n=zt),super(null,i,r,s,a,o,c,n,l),this.image={width:t,height:e},this.magFilter=void 0!==a?a:mt,this.minFilter=void 0!==o?o:mt,this.flipY=!1,this.generateMipmaps=!1}}Sl.prototype.isDepthTexture=!0;class Tl extends zn{constructor(t,e){super();const n=this;let i=null,r=1,s=null,a="local-floor";const o=t.extensions.has("WEBGL_multisampled_render_to_texture");let l=null,c=null,h=null,u=null,d=!1,p=null;const m=e.getContextAttributes();let f=null,g=null;const v=[],y=new Map,x=new As;x.layers.enable(1),x.viewport=new ai;const _=new As;_.layers.enable(2),_.viewport=new ai;const M=[x,_],b=new _l;b.layers.enable(1),b.layers.enable(2);let w=null,S=null;function T(t){const e=y.get(t.inputSource);e&&e.dispatchEvent({type:t.type,data:t.inputSource})}function E(){y.forEach((function(t,e){t.disconnect(e)})),y.clear(),w=null,S=null,t.setRenderTarget(f),u=null,h=null,c=null,i=null,g=null,D.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function A(t){const e=i.inputSources;for(let t=0;t<v.length;t++)y.set(e[t],v[t]);for(let e=0;e<t.removed.length;e++){const n=t.removed[e],i=y.get(n);i&&(i.dispatchEvent({type:"disconnected",data:n}),y.delete(n))}for(let e=0;e<t.added.length;e++){const n=t.added[e],i=y.get(n);i&&i.dispatchEvent({type:"connected",data:n})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=v[t];return void 0===e&&(e=new wl,v[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=v[t];return void 0===e&&(e=new wl,v[t]=e),e.getGripSpace()},this.getHand=function(t){let e=v[t];return void 0===e&&(e=new wl,v[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){r=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){a=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return s},this.getBaseLayer=function(){return null!==h?h:u},this.getBinding=function(){return c},this.getFrame=function(){return p},this.getSession=function(){return i},this.setSession=async function(l){if(i=l,null!==i){if(f=t.getRenderTarget(),i.addEventListener("select",T),i.addEventListener("selectstart",T),i.addEventListener("selectend",T),i.addEventListener("squeeze",T),i.addEventListener("squeezestart",T),i.addEventListener("squeezeend",T),i.addEventListener("end",E),i.addEventListener("inputsourceschange",A),!0!==m.xrCompatible&&await e.makeXRCompatible(),void 0===i.renderState.layers||!1===t.capabilities.isWebGL2){const t={antialias:void 0!==i.renderState.layers||m.antialias,alpha:m.alpha,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:r};u=new XRWebGLLayer(i,e,t),i.updateRenderState({baseLayer:u}),g=new oi(u.framebufferWidth,u.framebufferHeight)}else{d=m.antialias;let t=null,n=null,s=null;m.depth&&(s=m.stencil?35056:33189,t=m.stencil?Vt:kt,n=m.stencil?zt:At);const a={colorFormat:m.alpha||d?32856:32849,depthFormat:s,scaleFactor:r};c=new XRWebGLBinding(i,e),h=c.createProjectionLayer(a),i.updateRenderState({layers:[h]}),g=d?new ci(h.textureWidth,h.textureHeight,{format:Ft,type:St,depthTexture:new Sl(h.textureWidth,h.textureHeight,n,void 0,void 0,void 0,void 0,void 0,void 0,t),stencilBuffer:m.stencil,ignoreDepth:h.ignoreDepthValues,useRenderToTexture:o}):new oi(h.textureWidth,h.textureHeight,{format:m.alpha?Ft:Bt,type:St,depthTexture:new Sl(h.textureWidth,h.textureHeight,n,void 0,void 0,void 0,void 0,void 0,void 0,t),stencilBuffer:m.stencil,ignoreDepth:h.ignoreDepthValues})}this.setFoveation(0),s=await i.requestReferenceSpace(a),D.setContext(i),D.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const L=new ui,R=new ui;function C(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.copy(t.matrixWorld).invert()}this.updateCamera=function(t){if(null===i)return;b.near=_.near=x.near=t.near,b.far=_.far=x.far=t.far,w===b.near&&S===b.far||(i.updateRenderState({depthNear:b.near,depthFar:b.far}),w=b.near,S=b.far);const e=t.parent,n=b.cameras;C(b,e);for(let t=0;t<n.length;t++)C(n[t],e);b.matrixWorld.decompose(b.position,b.quaternion,b.scale),t.position.copy(b.position),t.quaternion.copy(b.quaternion),t.scale.copy(b.scale),t.matrix.copy(b.matrix),t.matrixWorld.copy(b.matrixWorld);const r=t.children;for(let t=0,e=r.length;t<e;t++)r[t].updateMatrixWorld(!0);2===n.length?function(t,e,n){L.setFromMatrixPosition(e.matrixWorld),R.setFromMatrixPosition(n.matrixWorld);const i=L.distanceTo(R),r=e.projectionMatrix.elements,s=n.projectionMatrix.elements,a=r[14]/(r[10]-1),o=r[14]/(r[10]+1),l=(r[9]+1)/r[5],c=(r[9]-1)/r[5],h=(r[8]-1)/r[0],u=(s[8]+1)/s[0],d=a*h,p=a*u,m=i/(-h+u),f=m*-h;e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(f),t.translateZ(m),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.copy(t.matrixWorld).invert();const g=a+m,v=o+m,y=d-f,x=p+(i-f),_=l*o/v*g,M=c*o/v*g;t.projectionMatrix.makePerspective(y,x,_,M,g,v)}(b,x,_):b.projectionMatrix.copy(x.projectionMatrix)},this.getCamera=function(){return b},this.getFoveation=function(){return null!==h?h.fixedFoveation:null!==u?u.fixedFoveation:void 0},this.setFoveation=function(t){null!==h&&(h.fixedFoveation=t),null!==u&&void 0!==u.fixedFoveation&&(u.fixedFoveation=t)};let P=null;const D=new Us;D.setAnimationLoop((function(e,n){if(l=n.getViewerPose(s),p=n,null!==l){const e=l.views;null!==u&&(t.setRenderTargetFramebuffer(g,u.framebuffer),t.setRenderTarget(g));let n=!1;e.length!==b.cameras.length&&(b.cameras.length=0,n=!0);for(let i=0;i<e.length;i++){const r=e[i];let s=null;if(null!==u)s=u.getViewport(r);else{const e=c.getViewSubImage(h,r);s=e.viewport,0===i&&(t.setRenderTargetTextures(g,e.colorTexture,h.ignoreDepthValues?void 0:e.depthStencilTexture),t.setRenderTarget(g))}const a=M[i];a.matrix.fromArray(r.transform.matrix),a.projectionMatrix.fromArray(r.projectionMatrix),a.viewport.set(s.x,s.y,s.width,s.height),0===i&&b.matrix.copy(a.matrix),!0===n&&b.cameras.push(a)}}const r=i.inputSources;for(let t=0;t<v.length;t++){const e=v[t],i=r[t];e.update(i,n,s)}P&&P(e,n),p=null})),this.setAnimationLoop=function(t){P=t},this.dispose=function(){}}}function El(t){function e(e,n){e.opacity.value=n.opacity,n.color&&e.diffuse.value.copy(n.color),n.emissive&&e.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(e.map.value=n.map),n.alphaMap&&(e.alphaMap.value=n.alphaMap),n.specularMap&&(e.specularMap.value=n.specularMap),n.alphaTest>0&&(e.alphaTest.value=n.alphaTest);const i=t.get(n).envMap;let r,s;i&&(e.envMap.value=i,e.flipEnvMap.value=i.isCubeTexture&&!1===i.isRenderTargetTexture?-1:1,e.reflectivity.value=n.reflectivity,e.ior.value=n.ior,e.refractionRatio.value=n.refractionRatio),n.lightMap&&(e.lightMap.value=n.lightMap,e.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(e.aoMap.value=n.aoMap,e.aoMapIntensity.value=n.aoMapIntensity),n.map?r=n.map:n.specularMap?r=n.specularMap:n.displacementMap?r=n.displacementMap:n.normalMap?r=n.normalMap:n.bumpMap?r=n.bumpMap:n.roughnessMap?r=n.roughnessMap:n.metalnessMap?r=n.metalnessMap:n.alphaMap?r=n.alphaMap:n.emissiveMap?r=n.emissiveMap:n.clearcoatMap?r=n.clearcoatMap:n.clearcoatNormalMap?r=n.clearcoatNormalMap:n.clearcoatRoughnessMap?r=n.clearcoatRoughnessMap:n.specularIntensityMap?r=n.specularIntensityMap:n.specularColorMap?r=n.specularColorMap:n.transmissionMap?r=n.transmissionMap:n.thicknessMap?r=n.thicknessMap:n.sheenColorMap?r=n.sheenColorMap:n.sheenRoughnessMap&&(r=n.sheenRoughnessMap),void 0!==r&&(r.isWebGLRenderTarget&&(r=r.texture),!0===r.matrixAutoUpdate&&r.updateMatrix(),e.uvTransform.value.copy(r.matrix)),n.aoMap?s=n.aoMap:n.lightMap&&(s=n.lightMap),void 0!==s&&(s.isWebGLRenderTarget&&(s=s.texture),!0===s.matrixAutoUpdate&&s.updateMatrix(),e.uv2Transform.value.copy(s.matrix))}function n(e,n){e.roughness.value=n.roughness,e.metalness.value=n.metalness,n.roughnessMap&&(e.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(e.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(e.emissiveMap.value=n.emissiveMap),n.bumpMap&&(e.bumpMap.value=n.bumpMap,e.bumpScale.value=n.bumpScale,n.side===f&&(e.bumpScale.value*=-1)),n.normalMap&&(e.normalMap.value=n.normalMap,e.normalScale.value.copy(n.normalScale),n.side===f&&e.normalScale.value.negate()),n.displacementMap&&(e.displacementMap.value=n.displacementMap,e.displacementScale.value=n.displacementScale,e.displacementBias.value=n.displacementBias),t.get(n).envMap&&(e.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(t,e){t.fogColor.value.copy(e.color),e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)},refreshMaterialUniforms:function(t,i,r,s,a){i.isMeshBasicMaterial?e(t,i):i.isMeshLambertMaterial?(e(t,i),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(t,i)):i.isMeshToonMaterial?(e(t,i),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===f&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===f&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isMeshPhongMaterial?(e(t,i),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===f&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===f&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isMeshStandardMaterial?(e(t,i),i.isMeshPhysicalMaterial?function(t,e,i){n(t,e),t.ior.value=e.ior,e.sheen>0&&(t.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),t.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(t.sheenColorMap.value=e.sheenColorMap),e.sheenRoughnessMap&&(t.sheenRoughnessMap.value=e.sheenRoughnessMap)),e.clearcoat>0&&(t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap),e.clearcoatNormalMap&&(t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),t.clearcoatNormalMap.value=e.clearcoatNormalMap,e.side===f&&t.clearcoatNormalScale.value.negate())),e.transmission>0&&(t.transmission.value=e.transmission,t.transmissionSamplerMap.value=i.texture,t.transmissionSamplerSize.value.set(i.width,i.height),e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap),t.thickness.value=e.thickness,e.thicknessMap&&(t.thicknessMap.value=e.thicknessMap),t.attenuationDistance.value=e.attenuationDistance,t.attenuationColor.value.copy(e.attenuationColor)),t.specularIntensity.value=e.specularIntensity,t.specularColor.value.copy(e.specularColor),e.specularIntensityMap&&(t.specularIntensityMap.value=e.specularIntensityMap),e.specularColorMap&&(t.specularColorMap.value=e.specularColorMap)}(t,i,a):n(t,i)):i.isMeshMatcapMaterial?(e(t,i),function(t,e){e.matcap&&(t.matcap.value=e.matcap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===f&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===f&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isMeshDepthMaterial?(e(t,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isMeshDistanceMaterial?(e(t,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(t,i)):i.isMeshNormalMaterial?(e(t,i),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===f&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===f&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity}(t,i),i.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,i)):i.isPointsMaterial?function(t,e,n,i){let r;t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*n,t.scale.value=.5*i,e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.alphaTest>0&&(t.alphaTest.value=e.alphaTest),e.map?r=e.map:e.alphaMap&&(r=e.alphaMap),void 0!==r&&(!0===r.matrixAutoUpdate&&r.updateMatrix(),t.uvTransform.value.copy(r.matrix))}(t,i,r,s):i.isSpriteMaterial?function(t,e){let n;t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.alphaTest>0&&(t.alphaTest.value=e.alphaTest),e.map?n=e.map:e.alphaMap&&(n=e.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}(t,i):i.isShadowMaterial?(t.color.value.copy(i.color),t.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function Al(t={}){const e=void 0!==t.canvas?t.canvas:function(){const t=$n("canvas");return t.style.display="block",t}(),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,s=void 0===t.depth||t.depth,a=void 0===t.stencil||t.stencil,o=void 0!==t.antialias&&t.antialias,l=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,h=void 0!==t.powerPreference?t.powerPreference:"default",u=void 0!==t.failIfMajorPerformanceCaveat&&t.failIfMajorPerformanceCaveat;let d=null,p=null;const v=[],y=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=Je,this.physicallyCorrectLights=!1,this.toneMapping=K,this.toneMappingExposure=1;const x=this;let _=!1,M=0,b=0,w=null,S=-1,T=null;const E=new ai,A=new ai;let L=null,R=e.width,C=e.height,P=1,D=null,I=null;const N=new ai(0,0,R,C),z=new ai(0,0,R,C);let O=!1;const B=[],F=new Fs;let U=!1,H=!1,G=null;const k=new ki,V=new ui,W={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function j(){return null===w?P:1}let q,X,Y,Z,J,Q,$,tt,et,nt,it,rt,st,at,ot,lt,ct,ht,ut,pt,ft,gt,vt,yt=n;function xt(t,n){for(let i=0;i<t.length;i++){const r=t[i],s=e.getContext(r,n);if(null!==s)return s}return null}try{const t={alpha:r,depth:s,stencil:a,antialias:o,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:h,failIfMajorPerformanceCaveat:u};if("setAttribute"in e&&e.setAttribute("data-engine",`three.js r${i}`),e.addEventListener("webglcontextlost",wt,!1),e.addEventListener("webglcontextrestored",Tt,!1),null===yt){const e=["webgl2","webgl","experimental-webgl"];if(!0===x.isWebGL1Renderer&&e.shift(),yt=xt(e,t),null===yt)throw xt(e)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===yt.getShaderPrecisionFormat&&(yt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){throw console.error("THREE.WebGLRenderer: "+t.message),t}function _t(){q=new _a(yt),X=new Ys(yt,q,t),q.init(X),gt=new xl(yt,q,X),Y=new vl(yt,q,X),B[0]=1029,Z=new wa(yt),J=new il,Q=new yl(yt,q,Y,J,X,gt,Z),$=new Js(x),tt=new xa(x),et=new Hs(yt,X),vt=new qs(yt,q,et,X),nt=new Ma(yt,et,Z,vt),it=new Ra(yt,nt,et,Z),ut=new La(yt,X,Q),lt=new Zs(J),rt=new nl(x,$,tt,q,X,vt,lt),st=new El(J),at=new ol(J),ot=new pl(q,X),ht=new js(x,$,Y,it,l),ct=new gl(x,it,X),pt=new Xs(yt,q,Z,X),ft=new ba(yt,q,Z,X),Z.programs=rt.programs,x.capabilities=X,x.extensions=q,x.properties=J,x.renderLists=at,x.shadowMap=ct,x.state=Y,x.info=Z}_t();const Mt=new Tl(x,yt);function wt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),_=!0}function Tt(){console.log("THREE.WebGLRenderer: Context Restored."),_=!1;const t=Z.autoReset,e=ct.enabled,n=ct.autoUpdate,i=ct.needsUpdate,r=ct.type;_t(),Z.autoReset=t,ct.enabled=e,ct.autoUpdate=n,ct.needsUpdate=i,ct.type=r}function Et(t){const e=t.target;e.removeEventListener("dispose",Et),function(t){(function(t){const e=J.get(t).programs;void 0!==e&&e.forEach((function(t){rt.releaseProgram(t)}))})(t),J.remove(t)}(e)}this.xr=Mt,this.getContext=function(){return yt},this.getContextAttributes=function(){return yt.getContextAttributes()},this.forceContextLoss=function(){const t=q.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){const t=q.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return P},this.setPixelRatio=function(t){void 0!==t&&(P=t,this.setSize(R,C,!1))},this.getSize=function(t){return t.set(R,C)},this.setSize=function(t,n,i){Mt.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(R=t,C=n,e.width=Math.floor(t*P),e.height=Math.floor(n*P),!1!==i&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(t){return t.set(R*P,C*P).floor()},this.setDrawingBufferSize=function(t,n,i){R=t,C=n,P=i,e.width=Math.floor(t*i),e.height=Math.floor(n*i),this.setViewport(0,0,t,n)},this.getCurrentViewport=function(t){return t.copy(E)},this.getViewport=function(t){return t.copy(N)},this.setViewport=function(t,e,n,i){t.isVector4?N.set(t.x,t.y,t.z,t.w):N.set(t,e,n,i),Y.viewport(E.copy(N).multiplyScalar(P).floor())},this.getScissor=function(t){return t.copy(z)},this.setScissor=function(t,e,n,i){t.isVector4?z.set(t.x,t.y,t.z,t.w):z.set(t,e,n,i),Y.scissor(A.copy(z).multiplyScalar(P).floor())},this.getScissorTest=function(){return O},this.setScissorTest=function(t){Y.setScissorTest(O=t)},this.setOpaqueSort=function(t){D=t},this.setTransparentSort=function(t){I=t},this.getClearColor=function(t){return t.copy(ht.getClearColor())},this.setClearColor=function(){ht.setClearColor.apply(ht,arguments)},this.getClearAlpha=function(){return ht.getClearAlpha()},this.setClearAlpha=function(){ht.setClearAlpha.apply(ht,arguments)},this.clear=function(t,e,n){let i=0;(void 0===t||t)&&(i|=16384),(void 0===e||e)&&(i|=256),(void 0===n||n)&&(i|=1024),yt.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){e.removeEventListener("webglcontextlost",wt,!1),e.removeEventListener("webglcontextrestored",Tt,!1),at.dispose(),ot.dispose(),J.dispose(),$.dispose(),tt.dispose(),it.dispose(),vt.dispose(),Mt.dispose(),Mt.removeEventListener("sessionstart",Lt),Mt.removeEventListener("sessionend",Rt),G&&(G.dispose(),G=null),Dt.stop()},this.renderBufferDirect=function(t,e,n,i,r,s){null===e&&(e=W);const a=r.isMesh&&r.matrixWorld.determinant()<0,o=function(t,e,n,i,r){!0!==e.isScene&&(e=W),Q.resetTextureUnits();const s=e.fog,a=i.isMeshStandardMaterial?e.environment:null,o=null===w?x.outputEncoding:w.texture.encoding,l=(i.isMeshStandardMaterial?tt:$).get(i.envMap||a),c=!0===i.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,h=!!i.normalMap&&!!n.attributes.tangent,u=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,m=n.morphAttributes.position?n.morphAttributes.position.length:0,f=J.get(i),g=p.state.lights;if(!0===U&&(!0===H||t!==T)){const e=t===T&&i.id===S;lt.setState(i,t,e)}let v=!1;i.version===f.__version?f.needsLights&&f.lightsStateVersion!==g.state.version||f.outputEncoding!==o||r.isInstancedMesh&&!1===f.instancing?v=!0:r.isInstancedMesh||!0!==f.instancing?r.isSkinnedMesh&&!1===f.skinning?v=!0:r.isSkinnedMesh||!0!==f.skinning?f.envMap!==l||i.fog&&f.fog!==s?v=!0:void 0===f.numClippingPlanes||f.numClippingPlanes===lt.numPlanes&&f.numIntersection===lt.numIntersection?(f.vertexAlphas!==c||f.vertexTangents!==h||f.morphTargets!==u||f.morphNormals!==d||!0===X.isWebGL2&&f.morphTargetsCount!==m)&&(v=!0):v=!0:v=!0:v=!0:(v=!0,f.__version=i.version);let y=f.currentProgram;!0===v&&(y=Bt(i,e,r));let _=!1,M=!1,b=!1;const E=y.getUniforms(),A=f.uniforms;if(Y.useProgram(y.program)&&(_=!0,M=!0,b=!0),i.id!==S&&(S=i.id,M=!0),_||T!==t){if(E.setValue(yt,"projectionMatrix",t.projectionMatrix),X.logarithmicDepthBuffer&&E.setValue(yt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),T!==t&&(T=t,M=!0,b=!0),i.isShaderMaterial||i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshStandardMaterial||i.envMap){const e=E.map.cameraPosition;void 0!==e&&e.setValue(yt,V.setFromMatrixPosition(t.matrixWorld))}(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial)&&E.setValue(yt,"isOrthographic",!0===t.isOrthographicCamera),(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial||i.isShadowMaterial||r.isSkinnedMesh)&&E.setValue(yt,"viewMatrix",t.matrixWorldInverse)}if(r.isSkinnedMesh){E.setOptional(yt,r,"bindMatrix"),E.setOptional(yt,r,"bindMatrixInverse");const t=r.skeleton;t&&(X.floatVertexTextures?(null===t.boneTexture&&t.computeBoneTexture(),E.setValue(yt,"boneTexture",t.boneTexture,Q),E.setValue(yt,"boneTextureSize",t.boneTextureSize)):E.setOptional(yt,t,"boneMatrices"))}var L,R;return!n||void 0===n.morphAttributes.position&&void 0===n.morphAttributes.normal||ut.update(r,n,i,y),(M||f.receiveShadow!==r.receiveShadow)&&(f.receiveShadow=r.receiveShadow,E.setValue(yt,"receiveShadow",r.receiveShadow)),M&&(E.setValue(yt,"toneMappingExposure",x.toneMappingExposure),f.needsLights&&(R=b,(L=A).ambientLightColor.needsUpdate=R,L.lightProbe.needsUpdate=R,L.directionalLights.needsUpdate=R,L.directionalLightShadows.needsUpdate=R,L.pointLights.needsUpdate=R,L.pointLightShadows.needsUpdate=R,L.spotLights.needsUpdate=R,L.spotLightShadows.needsUpdate=R,L.rectAreaLights.needsUpdate=R,L.hemisphereLights.needsUpdate=R),s&&i.fog&&st.refreshFogUniforms(A,s),st.refreshMaterialUniforms(A,i,P,C,G),zo.upload(yt,f.uniformsList,A,Q)),i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(zo.upload(yt,f.uniformsList,A,Q),i.uniformsNeedUpdate=!1),i.isSpriteMaterial&&E.setValue(yt,"center",r.center),E.setValue(yt,"modelViewMatrix",r.modelViewMatrix),E.setValue(yt,"normalMatrix",r.normalMatrix),E.setValue(yt,"modelMatrix",r.matrixWorld),y}(t,e,n,i,r);Y.setMaterial(i,a);let l=n.index;const c=n.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;let h,u=1;!0===i.wireframe&&(l=nt.getWireframeAttribute(n),u=2),vt.setup(r,i,o,n,l);let d=pt;null!==l&&(h=et.get(l),d=ft,d.setIndex(h));const m=null!==l?l.count:c.count,f=n.drawRange.start*u,g=n.drawRange.count*u,v=null!==s?s.start*u:0,y=null!==s?s.count*u:1/0,_=Math.max(f,v),M=Math.min(m,f+g,v+y)-1,b=Math.max(0,M-_+1);if(0!==b){if(r.isMesh)!0===i.wireframe?(Y.setLineWidth(i.wireframeLinewidth*j()),d.setMode(1)):d.setMode(4);else if(r.isLine){let t=i.linewidth;void 0===t&&(t=1),Y.setLineWidth(t*j()),r.isLineSegments?d.setMode(1):r.isLineLoop?d.setMode(2):d.setMode(3)}else r.isPoints?d.setMode(0):r.isSprite&&d.setMode(4);if(r.isInstancedMesh)d.renderInstances(_,b,r.count);else if(n.isInstancedBufferGeometry){const t=Math.min(n.instanceCount,n._maxInstanceCount);d.renderInstances(_,b,t)}else d.render(_,b)}},this.compile=function(t,e){p=ot.get(t),p.init(),y.push(p),t.traverseVisible((function(t){t.isLight&&t.layers.test(e.layers)&&(p.pushLight(t),t.castShadow&&p.pushShadow(t))})),p.setupLights(x.physicallyCorrectLights),t.traverse((function(e){const n=e.material;if(n)if(Array.isArray(n))for(let i=0;i<n.length;i++)Bt(n[i],t,e);else Bt(n,t,e)})),y.pop(),p=null};let At=null;function Lt(){Dt.stop()}function Rt(){Dt.start()}const Dt=new Us;function It(t,e,n,i){if(!1===t.visible)return;if(t.layers.test(e.layers))if(t.isGroup)n=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(e);else if(t.isLight)p.pushLight(t),t.castShadow&&p.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||F.intersectsSprite(t)){i&&V.setFromMatrixPosition(t.matrixWorld).applyMatrix4(k);const e=it.update(t),r=t.material;r.visible&&d.push(t,e,r,n,V.z,null)}}else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.frame!==Z.render.frame&&(t.skeleton.update(),t.skeleton.frame=Z.render.frame),!t.frustumCulled||F.intersectsObject(t))){i&&V.setFromMatrixPosition(t.matrixWorld).applyMatrix4(k);const e=it.update(t),r=t.material;if(Array.isArray(r)){const i=e.groups;for(let s=0,a=i.length;s<a;s++){const a=i[s],o=r[a.materialIndex];o&&o.visible&&d.push(t,e,o,n,V.z,a)}}else r.visible&&d.push(t,e,r,n,V.z,null)}const r=t.children;for(let t=0,s=r.length;t<s;t++)It(r[t],e,n,i)}function Nt(t,e,n,i){const r=t.opaque,s=t.transmissive,a=t.transparent;p.setupLightsView(n),s.length>0&&function(t,e,n){if(null===G){const t=!0===o&&!0===X.isWebGL2;G=new(t?ci:oi)(1024,1024,{generateMipmaps:!0,type:null!==gt.convert(Pt)?Pt:St,minFilter:bt,magFilter:mt,wrapS:dt,wrapT:dt,useRenderToTexture:q.has("WEBGL_multisampled_render_to_texture")})}const i=x.getRenderTarget();x.setRenderTarget(G),x.clear();const r=x.toneMapping;x.toneMapping=K,zt(t,e,n),x.toneMapping=r,Q.updateMultisampleRenderTarget(G),Q.updateRenderTargetMipmap(G),x.setRenderTarget(i)}(r,e,n),i&&Y.viewport(E.copy(i)),r.length>0&&zt(r,e,n),s.length>0&&zt(s,e,n),a.length>0&&zt(a,e,n)}function zt(t,e,n){const i=!0===e.isScene?e.overrideMaterial:null;for(let r=0,s=t.length;r<s;r++){const s=t[r],a=s.object,o=s.geometry,l=null===i?s.material:i,c=s.group;a.layers.test(n.layers)&&Ot(a,e,n,o,l,c)}}function Ot(t,e,n,i,r,s){t.onBeforeRender(x,e,n,i,r,s),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),r.onBeforeRender(x,e,n,i,t,s),!0===r.transparent&&r.side===g?(r.side=f,r.needsUpdate=!0,x.renderBufferDirect(n,e,i,r,t,s),r.side=m,r.needsUpdate=!0,x.renderBufferDirect(n,e,i,r,t,s),r.side=g):x.renderBufferDirect(n,e,i,r,t,s),t.onAfterRender(x,e,n,i,r,s)}function Bt(t,e,n){!0!==e.isScene&&(e=W);const i=J.get(t),r=p.state.lights,s=p.state.shadowsArray,a=r.state.version,o=rt.getParameters(t,r.state,s,e,n),l=rt.getProgramCacheKey(o);let c=i.programs;i.environment=t.isMeshStandardMaterial?e.environment:null,i.fog=e.fog,i.envMap=(t.isMeshStandardMaterial?tt:$).get(t.envMap||i.environment),void 0===c&&(t.addEventListener("dispose",Et),c=new Map,i.programs=c);let h=c.get(l);if(void 0!==h){if(i.currentProgram===h&&i.lightsStateVersion===a)return Ut(t,o),h}else o.uniforms=rt.getUniforms(t),t.onBuild(n,o,x),t.onBeforeCompile(o,x),h=rt.acquireProgram(o,l),c.set(l,h),i.uniforms=o.uniforms;const u=i.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(u.clippingPlanes=lt.uniform),Ut(t,o),i.needsLights=function(t){return t.isMeshLambertMaterial||t.isMeshToonMaterial||t.isMeshPhongMaterial||t.isMeshStandardMaterial||t.isShadowMaterial||t.isShaderMaterial&&!0===t.lights}(t),i.lightsStateVersion=a,i.needsLights&&(u.ambientLightColor.value=r.state.ambient,u.lightProbe.value=r.state.probe,u.directionalLights.value=r.state.directional,u.directionalLightShadows.value=r.state.directionalShadow,u.spotLights.value=r.state.spot,u.spotLightShadows.value=r.state.spotShadow,u.rectAreaLights.value=r.state.rectArea,u.ltc_1.value=r.state.rectAreaLTC1,u.ltc_2.value=r.state.rectAreaLTC2,u.pointLights.value=r.state.point,u.pointLightShadows.value=r.state.pointShadow,u.hemisphereLights.value=r.state.hemi,u.directionalShadowMap.value=r.state.directionalShadowMap,u.directionalShadowMatrix.value=r.state.directionalShadowMatrix,u.spotShadowMap.value=r.state.spotShadowMap,u.spotShadowMatrix.value=r.state.spotShadowMatrix,u.pointShadowMap.value=r.state.pointShadowMap,u.pointShadowMatrix.value=r.state.pointShadowMatrix);const d=h.getUniforms(),m=zo.seqWithValue(d.seq,u);return i.currentProgram=h,i.uniformsList=m,h}function Ut(t,e){const n=J.get(t);n.outputEncoding=e.outputEncoding,n.instancing=e.instancing,n.skinning=e.skinning,n.morphTargets=e.morphTargets,n.morphNormals=e.morphNormals,n.morphTargetsCount=e.morphTargetsCount,n.numClippingPlanes=e.numClippingPlanes,n.numIntersection=e.numClipIntersection,n.vertexAlphas=e.vertexAlphas,n.vertexTangents=e.vertexTangents}Dt.setAnimationLoop((function(t){At&&At(t)})),"undefined"!=typeof window&&Dt.setContext(window),this.setAnimationLoop=function(t){At=t,Mt.setAnimationLoop(t),null===t?Dt.stop():Dt.start()},Mt.addEventListener("sessionstart",Lt),Mt.addEventListener("sessionend",Rt),this.render=function(t,e){if(void 0!==e&&!0!==e.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===_)return;!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),!0===Mt.enabled&&!0===Mt.isPresenting&&(!0===Mt.cameraAutoUpdate&&Mt.updateCamera(e),e=Mt.getCamera()),!0===t.isScene&&t.onBeforeRender(x,t,e,w),p=ot.get(t,y.length),p.init(),y.push(p),k.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),F.setFromProjectionMatrix(k),H=this.localClippingEnabled,U=lt.init(this.clippingPlanes,H,e),d=at.get(t,v.length),d.init(),v.push(d),It(t,e,0,x.sortObjects),d.finish(),!0===x.sortObjects&&d.sort(D,I),!0===U&&lt.beginShadows();const n=p.state.shadowsArray;if(ct.render(n,t,e),!0===U&&lt.endShadows(),!0===this.info.autoReset&&this.info.reset(),ht.render(d,t),p.setupLights(x.physicallyCorrectLights),e.isArrayCamera){const n=e.cameras;for(let e=0,i=n.length;e<i;e++){const i=n[e];Nt(d,t,i,i.viewport)}}else Nt(d,t,e);null!==w&&(Q.updateMultisampleRenderTarget(w),Q.updateRenderTargetMipmap(w)),!0===t.isScene&&t.onAfterRender(x,t,e),Y.buffers.depth.setTest(!0),Y.buffers.depth.setMask(!0),Y.buffers.color.setMask(!0),Y.setPolygonOffset(!1),vt.resetDefaultState(),S=-1,T=null,y.pop(),p=y.length>0?y[y.length-1]:null,v.pop(),d=v.length>0?v[v.length-1]:null},this.getActiveCubeFace=function(){return M},this.getActiveMipmapLevel=function(){return b},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(t,e,n){J.get(t.texture).__webglTexture=e,J.get(t.depthTexture).__webglTexture=n;const i=J.get(t);i.__hasExternalTextures=!0,i.__hasExternalTextures&&(i.__autoAllocateDepthBuffer=void 0===n,i.__autoAllocateDepthBuffer||t.useRenderToTexture&&(console.warn("render-to-texture extension was disabled because an external texture was provided"),t.useRenderToTexture=!1,t.useRenderbuffer=!0))},this.setRenderTargetFramebuffer=function(t,e){const n=J.get(t);n.__webglFramebuffer=e,n.__useDefaultFramebuffer=void 0===e},this.setRenderTarget=function(t,e=0,n=0){w=t,M=e,b=n;let i=!0;if(t){const e=J.get(t);void 0!==e.__useDefaultFramebuffer?(Y.bindFramebuffer(36160,null),i=!1):void 0===e.__webglFramebuffer?Q.setupRenderTarget(t):e.__hasExternalTextures&&Q.rebindTextures(t,J.get(t.texture).__webglTexture,J.get(t.depthTexture).__webglTexture)}let r=null,s=!1,a=!1;if(t){const n=t.texture;(n.isDataTexture3D||n.isDataTexture2DArray)&&(a=!0);const i=J.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(r=i[e],s=!0):r=t.useRenderbuffer?J.get(t).__webglMultisampledFramebuffer:i,E.copy(t.viewport),A.copy(t.scissor),L=t.scissorTest}else E.copy(N).multiplyScalar(P).floor(),A.copy(z).multiplyScalar(P).floor(),L=O;if(Y.bindFramebuffer(36160,r)&&X.drawBuffers&&i){let e=!1;if(t)if(t.isWebGLMultipleRenderTargets){const n=t.texture;if(B.length!==n.length||36064!==B[0]){for(let t=0,e=n.length;t<e;t++)B[t]=36064+t;B.length=n.length,e=!0}}else 1===B.length&&36064===B[0]||(B[0]=36064,B.length=1,e=!0);else 1===B.length&&1029===B[0]||(B[0]=1029,B.length=1,e=!0);e&&(X.isWebGL2?yt.drawBuffers(B):q.get("WEBGL_draw_buffers").drawBuffersWEBGL(B))}if(Y.viewport(E),Y.scissor(A),Y.setScissorTest(L),s){const i=J.get(t.texture);yt.framebufferTexture2D(36160,36064,34069+e,i.__webglTexture,n)}else if(a){const i=J.get(t.texture),r=e||0;yt.framebufferTextureLayer(36160,36064,i.__webglTexture,n||0,r)}S=-1},this.readRenderTargetPixels=function(t,e,n,i,r,s,a){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let o=J.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==a&&(o=o[a]),o){Y.bindFramebuffer(36160,o);try{const a=t.texture,o=a.format,l=a.type;if(o!==Ft&&gt.convert(o)!==yt.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===Pt&&(q.has("EXT_color_buffer_half_float")||X.isWebGL2&&q.has("EXT_color_buffer_float"));if(!(l===St||gt.convert(l)===yt.getParameter(35738)||l===Ct&&(X.isWebGL2||q.has("OES_texture_float")||q.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===yt.checkFramebufferStatus(36160)?e>=0&&e<=t.width-i&&n>=0&&n<=t.height-r&&yt.readPixels(e,n,i,r,gt.convert(o),gt.convert(l),s):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const t=null!==w?J.get(w).__webglFramebuffer:null;Y.bindFramebuffer(36160,t)}}},this.copyFramebufferToTexture=function(t,e,n=0){const i=Math.pow(2,-n),r=Math.floor(e.image.width*i),s=Math.floor(e.image.height*i);let a=gt.convert(e.format);X.isWebGL2&&(6407===a&&(a=32849),6408===a&&(a=32856)),Q.setTexture2D(e,0),yt.copyTexImage2D(3553,n,a,t.x,t.y,r,s,0),Y.unbindTexture()},this.copyTextureToTexture=function(t,e,n,i=0){const r=e.image.width,s=e.image.height,a=gt.convert(n.format),o=gt.convert(n.type);Q.setTexture2D(n,0),yt.pixelStorei(37440,n.flipY),yt.pixelStorei(37441,n.premultiplyAlpha),yt.pixelStorei(3317,n.unpackAlignment),e.isDataTexture?yt.texSubImage2D(3553,i,t.x,t.y,r,s,a,o,e.image.data):e.isCompressedTexture?yt.compressedTexSubImage2D(3553,i,t.x,t.y,e.mipmaps[0].width,e.mipmaps[0].height,a,e.mipmaps[0].data):yt.texSubImage2D(3553,i,t.x,t.y,a,o,e.image),0===i&&n.generateMipmaps&&yt.generateMipmap(3553),Y.unbindTexture()},this.copyTextureToTexture3D=function(t,e,n,i,r=0){if(x.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const s=t.max.x-t.min.x+1,a=t.max.y-t.min.y+1,o=t.max.z-t.min.z+1,l=gt.convert(i.format),c=gt.convert(i.type);let h;if(i.isDataTexture3D)Q.setTexture3D(i,0),h=32879;else{if(!i.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Q.setTexture2DArray(i,0),h=35866}yt.pixelStorei(37440,i.flipY),yt.pixelStorei(37441,i.premultiplyAlpha),yt.pixelStorei(3317,i.unpackAlignment);const u=yt.getParameter(3314),d=yt.getParameter(32878),p=yt.getParameter(3316),m=yt.getParameter(3315),f=yt.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;yt.pixelStorei(3314,g.width),yt.pixelStorei(32878,g.height),yt.pixelStorei(3316,t.min.x),yt.pixelStorei(3315,t.min.y),yt.pixelStorei(32877,t.min.z),n.isDataTexture||n.isDataTexture3D?yt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g.data):n.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),yt.compressedTexSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,g.data)):yt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g),yt.pixelStorei(3314,u),yt.pixelStorei(32878,d),yt.pixelStorei(3316,p),yt.pixelStorei(3315,m),yt.pixelStorei(32877,f),0===r&&i.generateMipmaps&&yt.generateMipmap(h),Y.unbindTexture()},this.initTexture=function(t){Q.setTexture2D(t,0),Y.unbindTexture()},this.resetState=function(){M=0,b=0,w=null,Y.reset(),vt.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Al.prototype.isWebGLRenderer=!0;class Ll extends Al{}Ll.prototype.isWebGL1Renderer=!0;class Rl{constructor(t,e=25e-5){this.name="",this.color=new Ir(t),this.density=e}clone(){return new Rl(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}Rl.prototype.isFogExp2=!0;class Cl{constructor(t,e=1,n=1e3){this.name="",this.color=new Ir(t),this.near=e,this.far=n}clone(){return new Cl(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}Cl.prototype.isFog=!0;class Pl extends pr{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}Pl.prototype.isScene=!0;class Dl{constructor(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=Sn,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Hn()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,n){t*=this.stride,n*=e.stride;for(let i=0,r=this.stride;i<r;i++)this.array[t+i]=e.array[n+i];return this}set(t,e=0){return this.array.set(t,e),this}clone(t){void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Hn()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(e,this.stride);return n.setUsage(this.usage),n}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Hn()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}Dl.prototype.isInterleavedBuffer=!0;const Il=new ui;class Nl{constructor(t,e,n,i=!1){this.name="",this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let e=0,n=this.data.count;e<n;e++)Il.x=this.getX(e),Il.y=this.getY(e),Il.z=this.getZ(e),Il.applyMatrix4(t),this.setXYZ(e,Il.x,Il.y,Il.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Il.x=this.getX(e),Il.y=this.getY(e),Il.z=this.getZ(e),Il.applyNormalMatrix(t),this.setXYZ(e,Il.x,Il.y,Il.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)Il.x=this.getX(e),Il.y=this.getY(e),Il.z=this.getZ(e),Il.transformDirection(t),this.setXYZ(e,Il.x,Il.y,Il.z);return this}setX(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this}getX(t){return this.data.array[t*this.data.stride+this.offset]}getY(t){return this.data.array[t*this.data.stride+this.offset+1]}getZ(t){return this.data.array[t*this.data.stride+this.offset+2]}getW(t){return this.data.array[t*this.data.stride+this.offset+3]}setXY(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this}setXYZ(t,e,n,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=i,this.data.array[t+3]=r,this}clone(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const t=[];for(let e=0;e<this.count;e++){const n=e*this.data.stride+this.offset;for(let e=0;e<this.itemSize;e++)t.push(this.data.array[n+e])}return new Br(new this.array.constructor(t),this.itemSize,this.normalized)}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new Nl(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const t=[];for(let e=0;e<this.count;e++){const n=e*this.data.stride+this.offset;for(let e=0;e<this.itemSize;e++)t.push(this.data.array[n+e])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}Nl.prototype.isInterleavedBufferAttribute=!0;class zl extends Er{constructor(t){super(),this.type="SpriteMaterial",this.color=new Ir(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this}}let Ol;zl.prototype.isSpriteMaterial=!0;const Bl=new ui,Fl=new ui,Ul=new ui,Hl=new Yn,Gl=new Yn,kl=new ki,Vl=new ui,Wl=new ui,jl=new ui,ql=new Yn,Xl=new Yn,Yl=new Yn;class Zl extends pr{constructor(t){if(super(),this.type="Sprite",void 0===Ol){Ol=new es;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),e=new Dl(t,5);Ol.setIndex([0,1,2,0,2,3]),Ol.setAttribute("position",new Nl(e,3,0,!1)),Ol.setAttribute("uv",new Nl(e,2,3,!1))}this.geometry=Ol,this.material=void 0!==t?t:new zl,this.center=new Yn(.5,.5)}raycast(t,e){null===t.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Fl.setFromMatrixScale(this.matrixWorld),kl.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),Ul.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Fl.multiplyScalar(-Ul.z);const n=this.material.rotation;let i,r;0!==n&&(r=Math.cos(n),i=Math.sin(n));const s=this.center;Jl(Vl.set(-.5,-.5,0),Ul,s,Fl,i,r),Jl(Wl.set(.5,-.5,0),Ul,s,Fl,i,r),Jl(jl.set(.5,.5,0),Ul,s,Fl,i,r),ql.set(0,0),Xl.set(1,0),Yl.set(1,1);let a=t.ray.intersectTriangle(Vl,Wl,jl,!1,Bl);if(null===a&&(Jl(Wl.set(-.5,.5,0),Ul,s,Fl,i,r),Xl.set(0,1),a=t.ray.intersectTriangle(Vl,jl,Wl,!1,Bl),null===a))return;const o=t.ray.origin.distanceTo(Bl);o<t.near||o>t.far||e.push({distance:o,point:Bl.clone(),uv:Sr.getUV(Bl,Vl,Wl,jl,ql,Xl,Yl,new Yn),face:null,object:this})}copy(t){return super.copy(t),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}}function Jl(t,e,n,i,r,s){Hl.subVectors(t,n).addScalar(.5).multiply(i),void 0!==r?(Gl.x=s*Hl.x-r*Hl.y,Gl.y=r*Hl.x+s*Hl.y):Gl.copy(Hl),t.copy(e),t.x+=Gl.x,t.y+=Gl.y,t.applyMatrix4(kl)}Zl.prototype.isSprite=!0;const Ql=new ui,Kl=new ui;class $l extends pr{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const e=t.levels;for(let t=0,n=e.length;t<n;t++){const n=e[t];this.addLevel(n.object.clone(),n.distance)}return this.autoUpdate=t.autoUpdate,this}addLevel(t,e=0){e=Math.abs(e);const n=this.levels;let i;for(i=0;i<n.length&&!(e<n[i].distance);i++);return n.splice(i,0,{distance:e,object:t}),this.add(t),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(t){const e=this.levels;if(e.length>0){let n,i;for(n=1,i=e.length;n<i&&!(t<e[n].distance);n++);return e[n-1].object}return null}raycast(t,e){if(this.levels.length>0){Ql.setFromMatrixPosition(this.matrixWorld);const n=t.ray.origin.distanceTo(Ql);this.getObjectForDistance(n).raycast(t,e)}}update(t){const e=this.levels;if(e.length>1){Ql.setFromMatrixPosition(t.matrixWorld),Kl.setFromMatrixPosition(this.matrixWorld);const n=Ql.distanceTo(Kl)/t.zoom;let i,r;for(e[0].object.visible=!0,i=1,r=e.length;i<r&&n>=e[i].distance;i++)e[i-1].object.visible=!1,e[i].object.visible=!0;for(this._currentLevel=i-1;i<r;i++)e[i].object.visible=!1}}toJSON(t){const e=super.toJSON(t);!1===this.autoUpdate&&(e.object.autoUpdate=!1),e.object.levels=[];const n=this.levels;for(let t=0,i=n.length;t<i;t++){const i=n[t];e.object.levels.push({object:i.object.uuid,distance:i.distance})}return e}}const tc=new ui,ec=new ai,nc=new ai,ic=new ui,rc=new ki;class sc extends xs{constructor(t,e){super(t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new ki,this.bindMatrixInverse=new ki}copy(t){return super.copy(t),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,this}bind(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.copy(e).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const t=new ai,e=this.geometry.attributes.skinWeight;for(let n=0,i=e.count;n<i;n++){t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.w=e.getW(n);const i=1/t.manhattanLength();i!==1/0?t.multiplyScalar(i):t.set(1,0,0,0),e.setXYZW(n,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(t,e){const n=this.skeleton,i=this.geometry;ec.fromBufferAttribute(i.attributes.skinIndex,t),nc.fromBufferAttribute(i.attributes.skinWeight,t),tc.copy(e).applyMatrix4(this.bindMatrix),e.set(0,0,0);for(let t=0;t<4;t++){const i=nc.getComponent(t);if(0!==i){const r=ec.getComponent(t);rc.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),e.addScaledVector(ic.copy(tc).applyMatrix4(rc),i)}}return e.applyMatrix4(this.bindMatrixInverse)}}sc.prototype.isSkinnedMesh=!0;class ac extends pr{constructor(){super(),this.type="Bone"}}ac.prototype.isBone=!0;class oc extends ri{constructor(t=null,e=1,n=1,i,r,s,a,o,l=mt,c=mt,h,u){super(null,s,a,o,l,c,i,r,h,u),this.image={data:t,width:e,height:n},this.magFilter=l,this.minFilter=c,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}oc.prototype.isDataTexture=!0;const lc=new ki,cc=new ki;class hc{constructor(t=[],e=[]){this.uuid=Hn(),this.bones=t.slice(0),this.boneInverses=e,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const t=this.bones,e=this.boneInverses;if(this.boneMatrices=new Float32Array(16*t.length),0===e.length)this.calculateInverses();else if(t.length!==e.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new ki)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,e=this.bones.length;t<e;t++){const e=new ki;this.bones[t]&&e.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(e)}}pose(){for(let t=0,e=this.bones.length;t<e;t++){const e=this.bones[t];e&&e.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,e=this.bones.length;t<e;t++){const e=this.bones[t];e&&(e.parent&&e.parent.isBone?(e.matrix.copy(e.parent.matrixWorld).invert(),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))}}update(){const t=this.bones,e=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let i=0,r=t.length;i<r;i++){const r=t[i]?t[i].matrixWorld:cc;lc.multiplyMatrices(r,e[i]),lc.toArray(n,16*i)}null!==i&&(i.needsUpdate=!0)}clone(){return new hc(this.bones,this.boneInverses)}computeBoneTexture(){let t=Math.sqrt(4*this.bones.length);t=jn(t),t=Math.max(t,4);const e=new Float32Array(t*t*4);e.set(this.boneMatrices);const n=new oc(e,t,t,Ft,Ct);return this.boneMatrices=e,this.boneTexture=n,this.boneTextureSize=t,this}getBoneByName(t){for(let e=0,n=this.bones.length;e<n;e++){const n=this.bones[e];if(n.name===t)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,e){this.uuid=t.uuid;for(let n=0,i=t.bones.length;n<i;n++){const i=t.bones[n];let r=e[i];void 0===r&&(console.warn("THREE.Skeleton: No bone found with UUID:",i),r=new ac),this.bones.push(r),this.boneInverses.push((new ki).fromArray(t.boneInverses[n]))}return this.init(),this}toJSON(){const t={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;const e=this.bones,n=this.boneInverses;for(let i=0,r=e.length;i<r;i++){const r=e[i];t.bones.push(r.uuid);const s=n[i];t.boneInverses.push(s.toArray())}return t}}class uc extends Br{constructor(t,e,n,i=1){"number"==typeof n&&(i=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(t,e,n),this.meshPerAttribute=i}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){const t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}}uc.prototype.isInstancedBufferAttribute=!0;const dc=new ki,pc=new ki,mc=[],fc=new xs;class gc extends xs{constructor(t,e,n){super(t,e),this.instanceMatrix=new uc(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(t){return super.copy(t),this.instanceMatrix.copy(t.instanceMatrix),null!==t.instanceColor&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,this}getColorAt(t,e){e.fromArray(this.instanceColor.array,3*t)}getMatrixAt(t,e){e.fromArray(this.instanceMatrix.array,16*t)}raycast(t,e){const n=this.matrixWorld,i=this.count;if(fc.geometry=this.geometry,fc.material=this.material,void 0!==fc.material)for(let r=0;r<i;r++){this.getMatrixAt(r,dc),pc.multiplyMatrices(n,dc),fc.matrixWorld=pc,fc.raycast(t,mc);for(let t=0,n=mc.length;t<n;t++){const n=mc[t];n.instanceId=r,n.object=this,e.push(n)}mc.length=0}}setColorAt(t,e){null===this.instanceColor&&(this.instanceColor=new uc(new Float32Array(3*this.instanceMatrix.count),3)),e.toArray(this.instanceColor.array,3*t)}setMatrixAt(t,e){e.toArray(this.instanceMatrix.array,16*t)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}gc.prototype.isInstancedMesh=!0;class vc extends Er{constructor(t){super(),this.type="LineBasicMaterial",this.color=new Ir(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this}}vc.prototype.isLineBasicMaterial=!0;const yc=new ui,xc=new ui,_c=new ki,Mc=new Gi,bc=new Ii;class wc extends pr{constructor(t=new es,e=new vc){super(),this.type="Line",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t){return super.copy(t),this.material=t.material,this.geometry=t.geometry,this}computeLineDistances(){const t=this.geometry;if(t.isBufferGeometry)if(null===t.index){const e=t.attributes.position,n=[0];for(let t=1,i=e.count;t<i;t++)yc.fromBufferAttribute(e,t-1),xc.fromBufferAttribute(e,t),n[t]=n[t-1],n[t]+=yc.distanceTo(xc);t.setAttribute("lineDistance",new qr(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(t,e){const n=this.geometry,i=this.matrixWorld,r=t.params.Line.threshold,s=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),bc.copy(n.boundingSphere),bc.applyMatrix4(i),bc.radius+=r,!1===t.ray.intersectsSphere(bc))return;_c.copy(i).invert(),Mc.copy(t.ray).applyMatrix4(_c);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),o=a*a,l=new ui,c=new ui,h=new ui,u=new ui,d=this.isLineSegments?2:1;if(n.isBufferGeometry){const i=n.index,r=n.attributes.position;if(null!==i)for(let n=Math.max(0,s.start),a=Math.min(i.count,s.start+s.count)-1;n<a;n+=d){const s=i.getX(n),a=i.getX(n+1);if(l.fromBufferAttribute(r,s),c.fromBufferAttribute(r,a),Mc.distanceSqToSegment(l,c,u,h)>o)continue;u.applyMatrix4(this.matrixWorld);const d=t.ray.origin.distanceTo(u);d<t.near||d>t.far||e.push({distance:d,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}else for(let n=Math.max(0,s.start),i=Math.min(r.count,s.start+s.count)-1;n<i;n+=d){if(l.fromBufferAttribute(r,n),c.fromBufferAttribute(r,n+1),Mc.distanceSqToSegment(l,c,u,h)>o)continue;u.applyMatrix4(this.matrixWorld);const i=t.ray.origin.distanceTo(u);i<t.near||i>t.far||e.push({distance:i,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const t=this.geometry;if(t.isBufferGeometry){const e=t.morphAttributes,n=Object.keys(e);if(n.length>0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e<n;e++){const n=t[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}}}else{const e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}wc.prototype.isLine=!0;const Sc=new ui,Tc=new ui;class Ec extends wc{constructor(t,e){super(t,e),this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(t.isBufferGeometry)if(null===t.index){const e=t.attributes.position,n=[];for(let t=0,i=e.count;t<i;t+=2)Sc.fromBufferAttribute(e,t),Tc.fromBufferAttribute(e,t+1),n[t]=0===t?0:n[t-1],n[t+1]=n[t]+Sc.distanceTo(Tc);t.setAttribute("lineDistance",new qr(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}Ec.prototype.isLineSegments=!0;class Ac extends wc{constructor(t,e){super(t,e),this.type="LineLoop"}}Ac.prototype.isLineLoop=!0;class Lc extends Er{constructor(t){super(),this.type="PointsMaterial",this.color=new Ir(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this}}Lc.prototype.isPointsMaterial=!0;const Rc=new ki,Cc=new Gi,Pc=new Ii,Dc=new ui;class Ic extends pr{constructor(t=new es,e=new Lc){super(),this.type="Points",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t){return super.copy(t),this.material=t.material,this.geometry=t.geometry,this}raycast(t,e){const n=this.geometry,i=this.matrixWorld,r=t.params.Points.threshold,s=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Pc.copy(n.boundingSphere),Pc.applyMatrix4(i),Pc.radius+=r,!1===t.ray.intersectsSphere(Pc))return;Rc.copy(i).invert(),Cc.copy(t.ray).applyMatrix4(Rc);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),o=a*a;if(n.isBufferGeometry){const r=n.index,a=n.attributes.position;if(null!==r)for(let n=Math.max(0,s.start),l=Math.min(r.count,s.start+s.count);n<l;n++){const s=r.getX(n);Dc.fromBufferAttribute(a,s),Nc(Dc,s,o,i,t,e,this)}else for(let n=Math.max(0,s.start),r=Math.min(a.count,s.start+s.count);n<r;n++)Dc.fromBufferAttribute(a,n),Nc(Dc,n,o,i,t,e,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const t=this.geometry;if(t.isBufferGeometry){const e=t.morphAttributes,n=Object.keys(e);if(n.length>0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e<n;e++){const n=t[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}}}else{const e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function Nc(t,e,n,i,r,s,a){const o=Cc.distanceSqToPoint(t);if(o<n){const n=new ui;Cc.closestPointToPoint(t,n),n.applyMatrix4(i);const l=r.ray.origin.distanceTo(n);if(l<r.near||l>r.far)return;s.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:e,face:null,object:a})}}Ic.prototype.isPoints=!0;class zc extends ri{constructor(t,e,n,i,r,s,a,o,l){super(t,e,n,i,r,s,a,o,l),this.format=void 0!==a?a:Bt,this.minFilter=void 0!==s?s:xt,this.magFilter=void 0!==r?r:xt,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback((function e(){c.needsUpdate=!0,t.requestVideoFrameCallback(e)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;!1=="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}zc.prototype.isVideoTexture=!0;class Oc extends ri{constructor(t,e,n,i,r,s,a,o,l,c,h,u){super(null,s,a,o,l,c,i,r,h,u),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}Oc.prototype.isCompressedTexture=!0;class Bc extends ri{constructor(t,e,n,i,r,s,a,o,l){super(t,e,n,i,r,s,a,o,l),this.needsUpdate=!0}}Bc.prototype.isCanvasTexture=!0;class Fc extends es{constructor(t=1,e=8,n=0,i=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:i},e=Math.max(3,e);const r=[],s=[],a=[],o=[],l=new ui,c=new Yn;s.push(0,0,0),a.push(0,0,1),o.push(.5,.5);for(let r=0,h=3;r<=e;r++,h+=3){const u=n+r/e*i;l.x=t*Math.cos(u),l.y=t*Math.sin(u),s.push(l.x,l.y,l.z),a.push(0,0,1),c.x=(s[h]/t+1)/2,c.y=(s[h+1]/t+1)/2,o.push(c.x,c.y)}for(let t=1;t<=e;t++)r.push(t,t+1,0);this.setIndex(r),this.setAttribute("position",new qr(s,3)),this.setAttribute("normal",new qr(a,3)),this.setAttribute("uv",new qr(o,2))}static fromJSON(t){return new Fc(t.radius,t.segments,t.thetaStart,t.thetaLength)}}class Uc extends es{constructor(t=1,e=1,n=1,i=8,r=1,s=!1,a=0,o=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:a,thetaLength:o};const l=this;i=Math.floor(i),r=Math.floor(r);const c=[],h=[],u=[],d=[];let p=0;const m=[],f=n/2;let g=0;function v(n){const r=p,s=new Yn,m=new ui;let v=0;const y=!0===n?t:e,x=!0===n?1:-1;for(let t=1;t<=i;t++)h.push(0,f*x,0),u.push(0,x,0),d.push(.5,.5),p++;const _=p;for(let t=0;t<=i;t++){const e=t/i*o+a,n=Math.cos(e),r=Math.sin(e);m.x=y*r,m.y=f*x,m.z=y*n,h.push(m.x,m.y,m.z),u.push(0,x,0),s.x=.5*n+.5,s.y=.5*r*x+.5,d.push(s.x,s.y),p++}for(let t=0;t<i;t++){const e=r+t,i=_+t;!0===n?c.push(i,i+1,e):c.push(i+1,i,e),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}!function(){const s=new ui,v=new ui;let y=0;const x=(e-t)/n;for(let l=0;l<=r;l++){const c=[],g=l/r,y=g*(e-t)+t;for(let t=0;t<=i;t++){const e=t/i,r=e*o+a,l=Math.sin(r),m=Math.cos(r);v.x=y*l,v.y=-g*n+f,v.z=y*m,h.push(v.x,v.y,v.z),s.set(l,x,m).normalize(),u.push(s.x,s.y,s.z),d.push(e,1-g),c.push(p++)}m.push(c)}for(let t=0;t<i;t++)for(let e=0;e<r;e++){const n=m[e][t],i=m[e+1][t],r=m[e+1][t+1],s=m[e][t+1];c.push(n,i,s),c.push(i,r,s),y+=6}l.addGroup(g,y,0),g+=y}(),!1===s&&(t>0&&v(!0),e>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new qr(h,3)),this.setAttribute("normal",new qr(u,3)),this.setAttribute("uv",new qr(d,2))}static fromJSON(t){return new Uc(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Hc extends Uc{constructor(t=1,e=1,n=8,i=1,r=!1,s=0,a=2*Math.PI){super(0,t,e,n,i,r,s,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:s,thetaLength:a}}static fromJSON(t){return new Hc(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Gc extends es{constructor(t=[],e=[],n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:i};const r=[],s=[];function a(t,e,n,i){const r=i+1,s=[];for(let i=0;i<=r;i++){s[i]=[];const a=t.clone().lerp(n,i/r),o=e.clone().lerp(n,i/r),l=r-i;for(let t=0;t<=l;t++)s[i][t]=0===t&&i===r?a:a.clone().lerp(o,t/l)}for(let t=0;t<r;t++)for(let e=0;e<2*(r-t)-1;e++){const n=Math.floor(e/2);e%2==0?(o(s[t][n+1]),o(s[t+1][n]),o(s[t][n])):(o(s[t][n+1]),o(s[t+1][n+1]),o(s[t+1][n]))}}function o(t){r.push(t.x,t.y,t.z)}function l(e,n){const i=3*e;n.x=t[i+0],n.y=t[i+1],n.z=t[i+2]}function c(t,e,n,i){i<0&&1===t.x&&(s[e]=t.x-1),0===n.x&&0===n.z&&(s[e]=i/2/Math.PI+.5)}function h(t){return Math.atan2(t.z,-t.x)}!function(t){const n=new ui,i=new ui,r=new ui;for(let s=0;s<e.length;s+=3)l(e[s+0],n),l(e[s+1],i),l(e[s+2],r),a(n,i,r,t)}(i),function(t){const e=new ui;for(let n=0;n<r.length;n+=3)e.x=r[n+0],e.y=r[n+1],e.z=r[n+2],e.normalize().multiplyScalar(t),r[n+0]=e.x,r[n+1]=e.y,r[n+2]=e.z}(n),function(){const t=new ui;for(let n=0;n<r.length;n+=3){t.x=r[n+0],t.y=r[n+1],t.z=r[n+2];const i=h(t)/2/Math.PI+.5,a=(e=t,Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))/Math.PI+.5);s.push(i,1-a)}var e;(function(){const t=new ui,e=new ui,n=new ui,i=new ui,a=new Yn,o=new Yn,l=new Yn;for(let u=0,d=0;u<r.length;u+=9,d+=6){t.set(r[u+0],r[u+1],r[u+2]),e.set(r[u+3],r[u+4],r[u+5]),n.set(r[u+6],r[u+7],r[u+8]),a.set(s[d+0],s[d+1]),o.set(s[d+2],s[d+3]),l.set(s[d+4],s[d+5]),i.copy(t).add(e).add(n).divideScalar(3);const p=h(i);c(a,d+0,t,p),c(o,d+2,e,p),c(l,d+4,n,p)}})(),function(){for(let t=0;t<s.length;t+=6){const e=s[t+0],n=s[t+2],i=s[t+4],r=Math.max(e,n,i),a=Math.min(e,n,i);r>.9&&a<.1&&(e<.2&&(s[t+0]+=1),n<.2&&(s[t+2]+=1),i<.2&&(s[t+4]+=1))}}()}(),this.setAttribute("position",new qr(r,3)),this.setAttribute("normal",new qr(r.slice(),3)),this.setAttribute("uv",new qr(s,2)),0===i?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(t){return new Gc(t.vertices,t.indices,t.radius,t.details)}}class kc extends Gc{constructor(t=1,e=0){const n=(1+Math.sqrt(5))/2,i=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new kc(t.radius,t.detail)}}const Vc=new ui,Wc=new ui,jc=new ui,qc=new Sr;class Xc extends es{constructor(t=null,e=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:t,thresholdAngle:e},null!==t){const n=4,i=Math.pow(10,n),r=Math.cos(Fn*e),s=t.getIndex(),a=t.getAttribute("position"),o=s?s.count:a.count,l=[0,0,0],c=["a","b","c"],h=new Array(3),u={},d=[];for(let t=0;t<o;t+=3){s?(l[0]=s.getX(t),l[1]=s.getX(t+1),l[2]=s.getX(t+2)):(l[0]=t,l[1]=t+1,l[2]=t+2);const{a:e,b:n,c:o}=qc;if(e.fromBufferAttribute(a,l[0]),n.fromBufferAttribute(a,l[1]),o.fromBufferAttribute(a,l[2]),qc.getNormal(jc),h[0]=`${Math.round(e.x*i)},${Math.round(e.y*i)},${Math.round(e.z*i)}`,h[1]=`${Math.round(n.x*i)},${Math.round(n.y*i)},${Math.round(n.z*i)}`,h[2]=`${Math.round(o.x*i)},${Math.round(o.y*i)},${Math.round(o.z*i)}`,h[0]!==h[1]&&h[1]!==h[2]&&h[2]!==h[0])for(let t=0;t<3;t++){const e=(t+1)%3,n=h[t],i=h[e],s=qc[c[t]],a=qc[c[e]],o=`${n}_${i}`,p=`${i}_${n}`;p in u&&u[p]?(jc.dot(u[p].normal)<=r&&(d.push(s.x,s.y,s.z),d.push(a.x,a.y,a.z)),u[p]=null):o in u||(u[o]={index0:l[t],index1:l[e],normal:jc.clone()})}}for(const t in u)if(u[t]){const{index0:e,index1:n}=u[t];Vc.fromBufferAttribute(a,e),Wc.fromBufferAttribute(a,n),d.push(Vc.x,Vc.y,Vc.z),d.push(Wc.x,Wc.y,Wc.z)}this.setAttribute("position",new qr(d,3))}}}class Yc{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,e){const n=this.getUtoTmapping(t);return this.getPoint(n,e)}getPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return e}getSpacedPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let n,i=this.getPoint(0),r=0;e.push(0);for(let s=1;s<=t;s++)n=this.getPoint(s/t),r+=n.distanceTo(i),e.push(r),i=n;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e){const n=this.getLengths();let i=0;const r=n.length;let s;s=e||t*n[r-1];let a,o=0,l=r-1;for(;o<=l;)if(i=Math.floor(o+(l-o)/2),a=n[i]-s,a<0)o=i+1;else{if(!(a>0)){l=i;break}l=i-1}if(i=l,n[i]===s)return i/(r-1);const c=n[i];return(i+(s-c)/(n[i+1]-c))/(r-1)}getTangent(t,e){const n=1e-4;let i=t-n,r=t+n;i<0&&(i=0),r>1&&(r=1);const s=this.getPoint(i),a=this.getPoint(r),o=e||(s.isVector2?new Yn:new ui);return o.copy(a).sub(s).normalize(),o}getTangentAt(t,e){const n=this.getUtoTmapping(t);return this.getTangent(n,e)}computeFrenetFrames(t,e){const n=new ui,i=[],r=[],s=[],a=new ui,o=new ki;for(let e=0;e<=t;e++){const n=e/t;i[e]=this.getTangentAt(n,new ui)}r[0]=new ui,s[0]=new ui;let l=Number.MAX_VALUE;const c=Math.abs(i[0].x),h=Math.abs(i[0].y),u=Math.abs(i[0].z);c<=l&&(l=c,n.set(1,0,0)),h<=l&&(l=h,n.set(0,1,0)),u<=l&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],a),s[0].crossVectors(i[0],r[0]);for(let e=1;e<=t;e++){if(r[e]=r[e-1].clone(),s[e]=s[e-1].clone(),a.crossVectors(i[e-1],i[e]),a.length()>Number.EPSILON){a.normalize();const t=Math.acos(Gn(i[e-1].dot(i[e]),-1,1));r[e].applyMatrix4(o.makeRotationAxis(a,t))}s[e].crossVectors(i[e],r[e])}if(!0===e){let e=Math.acos(Gn(r[0].dot(r[t]),-1,1));e/=t,i[0].dot(a.crossVectors(r[0],r[t]))>0&&(e=-e);for(let n=1;n<=t;n++)r[n].applyMatrix4(o.makeRotationAxis(i[n],e*n)),s[n].crossVectors(i[n],r[n])}return{tangents:i,normals:r,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class Zc extends Yc{constructor(t=0,e=0,n=1,i=1,r=0,s=2*Math.PI,a=!1,o=0){super(),this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=s,this.aClockwise=a,this.aRotation=o}getPoint(t,e){const n=e||new Yn,i=2*Math.PI;let r=this.aEndAngle-this.aStartAngle;const s=Math.abs(r)<Number.EPSILON;for(;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(r=s?0:i),!0!==this.aClockwise||s||(r===i?r=-i:r-=i);const a=this.aStartAngle+t*r;let o=this.aX+this.xRadius*Math.cos(a),l=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){const t=Math.cos(this.aRotation),e=Math.sin(this.aRotation),n=o-this.aX,i=l-this.aY;o=n*t-i*e+this.aX,l=n*e+i*t+this.aY}return n.set(o,l)}copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}toJSON(){const t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}fromJSON(t){return super.fromJSON(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}}Zc.prototype.isEllipseCurve=!0;class Jc extends Zc{constructor(t,e,n,i,r,s){super(t,e,n,n,i,r,s),this.type="ArcCurve"}}function Qc(){let t=0,e=0,n=0,i=0;function r(r,s,a,o){t=r,e=a,n=-3*r+3*s-2*a-o,i=2*r-2*s+a+o}return{initCatmullRom:function(t,e,n,i,s){r(e,n,s*(n-t),s*(i-e))},initNonuniformCatmullRom:function(t,e,n,i,s,a,o){let l=(e-t)/s-(n-t)/(s+a)+(n-e)/a,c=(n-e)/a-(i-e)/(a+o)+(i-n)/o;l*=a,c*=a,r(e,n,l,c)},calc:function(r){const s=r*r;return t+e*r+n*s+i*(s*r)}}}Jc.prototype.isArcCurve=!0;const Kc=new ui,$c=new Qc,th=new Qc,eh=new Qc;class nh extends Yc{constructor(t=[],e=!1,n="centripetal",i=.5){super(),this.type="CatmullRomCurve3",this.points=t,this.closed=e,this.curveType=n,this.tension=i}getPoint(t,e=new ui){const n=e,i=this.points,r=i.length,s=(r-(this.closed?0:1))*t;let a,o,l=Math.floor(s),c=s-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/r)+1)*r:0===c&&l===r-1&&(l=r-2,c=1),this.closed||l>0?a=i[(l-1)%r]:(Kc.subVectors(i[0],i[1]).add(i[0]),a=Kc);const h=i[l%r],u=i[(l+1)%r];if(this.closed||l+2<r?o=i[(l+2)%r]:(Kc.subVectors(i[r-1],i[r-2]).add(i[r-1]),o=Kc),"centripetal"===this.curveType||"chordal"===this.curveType){const t="chordal"===this.curveType?.5:.25;let e=Math.pow(a.distanceToSquared(h),t),n=Math.pow(h.distanceToSquared(u),t),i=Math.pow(u.distanceToSquared(o),t);n<1e-4&&(n=1),e<1e-4&&(e=n),i<1e-4&&(i=n),$c.initNonuniformCatmullRom(a.x,h.x,u.x,o.x,e,n,i),th.initNonuniformCatmullRom(a.y,h.y,u.y,o.y,e,n,i),eh.initNonuniformCatmullRom(a.z,h.z,u.z,o.z,e,n,i)}else"catmullrom"===this.curveType&&($c.initCatmullRom(a.x,h.x,u.x,o.x,this.tension),th.initCatmullRom(a.y,h.y,u.y,o.y,this.tension),eh.initCatmullRom(a.z,h.z,u.z,o.z,this.tension));return n.set($c.calc(c),th.calc(c),eh.calc(c)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push(n.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,n=this.points.length;e<n;e++){const n=this.points[e];t.points.push(n.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push((new ui).fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}}function ih(t,e,n,i,r){const s=.5*(i-e),a=.5*(r-n),o=t*t;return(2*n-2*i+s+a)*(t*o)+(-3*n+3*i-2*s-a)*o+s*t+n}function rh(t,e,n,i){return function(t,e){const n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,i)}function sh(t,e,n,i,r){return function(t,e){const n=1-t;return n*n*n*e}(t,e)+function(t,e){const n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,i)+function(t,e){return t*t*t*e}(t,r)}nh.prototype.isCatmullRomCurve3=!0;class ah extends Yc{constructor(t=new Yn,e=new Yn,n=new Yn,i=new Yn){super(),this.type="CubicBezierCurve",this.v0=t,this.v1=e,this.v2=n,this.v3=i}getPoint(t,e=new Yn){const n=e,i=this.v0,r=this.v1,s=this.v2,a=this.v3;return n.set(sh(t,i.x,r.x,s.x,a.x),sh(t,i.y,r.y,s.y,a.y)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}ah.prototype.isCubicBezierCurve=!0;class oh extends Yc{constructor(t=new ui,e=new ui,n=new ui,i=new ui){super(),this.type="CubicBezierCurve3",this.v0=t,this.v1=e,this.v2=n,this.v3=i}getPoint(t,e=new ui){const n=e,i=this.v0,r=this.v1,s=this.v2,a=this.v3;return n.set(sh(t,i.x,r.x,s.x,a.x),sh(t,i.y,r.y,s.y,a.y),sh(t,i.z,r.z,s.z,a.z)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}oh.prototype.isCubicBezierCurve3=!0;class lh extends Yc{constructor(t=new Yn,e=new Yn){super(),this.type="LineCurve",this.v1=t,this.v2=e}getPoint(t,e=new Yn){const n=e;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n}getPointAt(t,e){return this.getPoint(t,e)}getTangent(t,e){const n=e||new Yn;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}lh.prototype.isLineCurve=!0;class ch extends Yc{constructor(t=new ui,e=new ui){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=t,this.v2=e}getPoint(t,e=new ui){const n=e;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n}getPointAt(t,e){return this.getPoint(t,e)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class hh extends Yc{constructor(t=new Yn,e=new Yn,n=new Yn){super(),this.type="QuadraticBezierCurve",this.v0=t,this.v1=e,this.v2=n}getPoint(t,e=new Yn){const n=e,i=this.v0,r=this.v1,s=this.v2;return n.set(rh(t,i.x,r.x,s.x),rh(t,i.y,r.y,s.y)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}hh.prototype.isQuadraticBezierCurve=!0;class uh extends Yc{constructor(t=new ui,e=new ui,n=new ui){super(),this.type="QuadraticBezierCurve3",this.v0=t,this.v1=e,this.v2=n}getPoint(t,e=new ui){const n=e,i=this.v0,r=this.v1,s=this.v2;return n.set(rh(t,i.x,r.x,s.x),rh(t,i.y,r.y,s.y),rh(t,i.z,r.z,s.z)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}uh.prototype.isQuadraticBezierCurve3=!0;class dh extends Yc{constructor(t=[]){super(),this.type="SplineCurve",this.points=t}getPoint(t,e=new Yn){const n=e,i=this.points,r=(i.length-1)*t,s=Math.floor(r),a=r-s,o=i[0===s?s:s-1],l=i[s],c=i[s>i.length-2?i.length-1:s+1],h=i[s>i.length-3?i.length-1:s+2];return n.set(ih(a,o.x,l.x,c.x,h.x),ih(a,o.y,l.y,c.y,h.y)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push(n.clone())}return this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,n=this.points.length;e<n;e++){const n=this.points[e];t.points.push(n.toArray())}return t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push((new Yn).fromArray(n))}return this}}dh.prototype.isSplineCurve=!0;var ph=Object.freeze({__proto__:null,ArcCurve:Jc,CatmullRomCurve3:nh,CubicBezierCurve:ah,CubicBezierCurve3:oh,EllipseCurve:Zc,LineCurve:lh,LineCurve3:ch,QuadraticBezierCurve:hh,QuadraticBezierCurve3:uh,SplineCurve:dh});class mh extends Yc{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(t){this.curves.push(t)}closePath(){const t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new lh(e,t))}getPoint(t,e){const n=t*this.getLength(),i=this.getCurveLengths();let r=0;for(;r<i.length;){if(i[r]>=n){const t=i[r]-n,s=this.curves[r],a=s.getLength(),o=0===a?0:1-t/a;return s.getPointAt(o,e)}r++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let n=0,i=this.curves.length;n<i;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t}getSpacedPoints(t=40){const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e}getPoints(t=12){const e=[];let n;for(let i=0,r=this.curves;i<r.length;i++){const s=r[i],a=s&&s.isEllipseCurve?2*t:s&&(s.isLineCurve||s.isLineCurve3)?1:s&&s.isSplineCurve?t*s.points.length:t,o=s.getPoints(a);for(let t=0;t<o.length;t++){const i=o[t];n&&n.equals(i)||(e.push(i),n=i)}}return this.autoClose&&e.length>1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,n=t.curves.length;e<n;e++){const n=t.curves[e];this.curves.push(n.clone())}return this.autoClose=t.autoClose,this}toJSON(){const t=super.toJSON();t.autoClose=this.autoClose,t.curves=[];for(let e=0,n=this.curves.length;e<n;e++){const n=this.curves[e];t.curves.push(n.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.autoClose=t.autoClose,this.curves=[];for(let e=0,n=t.curves.length;e<n;e++){const n=t.curves[e];this.curves.push((new ph[n.type]).fromJSON(n))}return this}}class fh extends mh{constructor(t){super(),this.type="Path",this.currentPoint=new Yn,t&&this.setFromPoints(t)}setFromPoints(t){this.moveTo(t[0].x,t[0].y);for(let e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y);return this}moveTo(t,e){return this.currentPoint.set(t,e),this}lineTo(t,e){const n=new lh(this.currentPoint.clone(),new Yn(t,e));return this.curves.push(n),this.currentPoint.set(t,e),this}quadraticCurveTo(t,e,n,i){const r=new hh(this.currentPoint.clone(),new Yn(t,e),new Yn(n,i));return this.curves.push(r),this.currentPoint.set(n,i),this}bezierCurveTo(t,e,n,i,r,s){const a=new ah(this.currentPoint.clone(),new Yn(t,e),new Yn(n,i),new Yn(r,s));return this.curves.push(a),this.currentPoint.set(r,s),this}splineThru(t){const e=[this.currentPoint.clone()].concat(t),n=new dh(e);return this.curves.push(n),this.currentPoint.copy(t[t.length-1]),this}arc(t,e,n,i,r,s){const a=this.currentPoint.x,o=this.currentPoint.y;return this.absarc(t+a,e+o,n,i,r,s),this}absarc(t,e,n,i,r,s){return this.absellipse(t,e,n,n,i,r,s),this}ellipse(t,e,n,i,r,s,a,o){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(t+l,e+c,n,i,r,s,a,o),this}absellipse(t,e,n,i,r,s,a,o){const l=new Zc(t,e,n,i,r,s,a,o);if(this.curves.length>0){const t=l.getPoint(0);t.equals(this.currentPoint)||this.lineTo(t.x,t.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class gh extends fh{constructor(t){super(t),this.uuid=Hn(),this.type="Shape",this.holes=[]}getPointsHoles(t){const e=[];for(let n=0,i=this.holes.length;n<i;n++)e[n]=this.holes[n].getPoints(t);return e}extractPoints(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}}copy(t){super.copy(t),this.holes=[];for(let e=0,n=t.holes.length;e<n;e++){const n=t.holes[e];this.holes.push(n.clone())}return this}toJSON(){const t=super.toJSON();t.uuid=this.uuid,t.holes=[];for(let e=0,n=this.holes.length;e<n;e++){const n=this.holes[e];t.holes.push(n.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.uuid=t.uuid,this.holes=[];for(let e=0,n=t.holes.length;e<n;e++){const n=t.holes[e];this.holes.push((new fh).fromJSON(n))}return this}}function vh(t,e,n,i,r){let s,a;if(r===function(t,e,n,i){let r=0;for(let s=e,a=n-i;s<n;s+=i)r+=(t[a]-t[s])*(t[s+1]+t[a+1]),a=s;return r}(t,e,n,i)>0)for(s=e;s<n;s+=i)a=Fh(s,t[s],t[s+1],a);else for(s=n-i;s>=e;s-=i)a=Fh(s,t[s],t[s+1],a);return a&&Dh(a,a.next)&&(Uh(a),a=a.next),a}function yh(t,e){if(!t)return t;e||(e=t);let n,i=t;do{if(n=!1,i.steiner||!Dh(i,i.next)&&0!==Ph(i.prev,i,i.next))i=i.next;else{if(Uh(i),i=e=i.prev,i===i.next)break;n=!0}}while(n||i!==e);return e}function xh(t,e,n,i,r,s,a){if(!t)return;!a&&s&&function(t,e,n,i){let r=t;do{null===r.z&&(r.z=Ah(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){let e,n,i,r,s,a,o,l,c=1;do{for(n=t,t=null,s=null,a=0;n;){for(a++,i=n,o=0,e=0;e<c&&(o++,i=i.nextZ,i);e++);for(l=c;o>0||l>0&&i;)0!==o&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,o--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;n=i}s.nextZ=null,c*=2}while(a>1)}(r)}(t,i,r,s);let o,l,c=t;for(;t.prev!==t.next;)if(o=t.prev,l=t.next,s?Mh(t,i,r,s):_h(t))e.push(o.i/n),e.push(t.i/n),e.push(l.i/n),Uh(t),t=l.next,c=l.next;else if((t=l)===c){a?1===a?xh(t=bh(yh(t),e,n),e,n,i,r,s,2):2===a&&wh(t,e,n,i,r,s):xh(yh(t),e,n,i,r,s,1);break}}function _h(t){const e=t.prev,n=t,i=t.next;if(Ph(e,n,i)>=0)return!1;let r=t.next.next;for(;r!==t.prev;){if(Rh(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&Ph(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Mh(t,e,n,i){const r=t.prev,s=t,a=t.next;if(Ph(r,s,a)>=0)return!1;const o=r.x<s.x?r.x<a.x?r.x:a.x:s.x<a.x?s.x:a.x,l=r.y<s.y?r.y<a.y?r.y:a.y:s.y<a.y?s.y:a.y,c=r.x>s.x?r.x>a.x?r.x:a.x:s.x>a.x?s.x:a.x,h=r.y>s.y?r.y>a.y?r.y:a.y:s.y>a.y?s.y:a.y,u=Ah(o,l,e,n,i),d=Ah(c,h,e,n,i);let p=t.prevZ,m=t.nextZ;for(;p&&p.z>=u&&m&&m.z<=d;){if(p!==t.prev&&p!==t.next&&Rh(r.x,r.y,s.x,s.y,a.x,a.y,p.x,p.y)&&Ph(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,m!==t.prev&&m!==t.next&&Rh(r.x,r.y,s.x,s.y,a.x,a.y,m.x,m.y)&&Ph(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&Rh(r.x,r.y,s.x,s.y,a.x,a.y,p.x,p.y)&&Ph(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;m&&m.z<=d;){if(m!==t.prev&&m!==t.next&&Rh(r.x,r.y,s.x,s.y,a.x,a.y,m.x,m.y)&&Ph(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function bh(t,e,n){let i=t;do{const r=i.prev,s=i.next.next;!Dh(r,s)&&Ih(r,i,i.next,s)&&Oh(r,s)&&Oh(s,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(s.i/n),Uh(i),Uh(i.next),i=t=s),i=i.next}while(i!==t);return yh(i)}function wh(t,e,n,i,r,s){let a=t;do{let t=a.next.next;for(;t!==a.prev;){if(a.i!==t.i&&Ch(a,t)){let o=Bh(a,t);return a=yh(a,a.next),o=yh(o,o.next),xh(a,e,n,i,r,s),void xh(o,e,n,i,r,s)}t=t.next}a=a.next}while(a!==t)}function Sh(t,e){return t.x-e.x}function Th(t,e){if(e=function(t,e){let n=e;const i=t.x,r=t.y;let s,a=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){const t=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=i&&t>a){if(a=t,t===i){if(r===n.y)return n;if(r===n.next.y)return n.next}s=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!s)return null;if(i===a)return s;const o=s,l=s.x,c=s.y;let h,u=1/0;n=s;do{i>=n.x&&n.x>=l&&i!==n.x&&Rh(r<c?i:a,r,l,c,r<c?a:i,r,n.x,n.y)&&(h=Math.abs(r-n.y)/(i-n.x),Oh(n,t)&&(h<u||h===u&&(n.x>s.x||n.x===s.x&&Eh(s,n)))&&(s=n,u=h)),n=n.next}while(n!==o);return s}(t,e),e){const n=Bh(e,t);yh(e,e.next),yh(n,n.next)}}function Eh(t,e){return Ph(t.prev,t,e.prev)<0&&Ph(e.next,t,t.next)<0}function Ah(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Lh(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function Rh(t,e,n,i,r,s,a,o){return(r-a)*(e-o)-(t-a)*(s-o)>=0&&(t-a)*(i-o)-(n-a)*(e-o)>=0&&(n-a)*(s-o)-(r-a)*(i-o)>=0}function Ch(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Ih(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(Oh(t,e)&&Oh(e,t)&&function(t,e){let n=t,i=!1;const r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(Ph(t.prev,t,e.prev)||Ph(t,e.prev,e))||Dh(t,e)&&Ph(t.prev,t,t.next)>0&&Ph(e.prev,e,e.next)>0)}function Ph(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Dh(t,e){return t.x===e.x&&t.y===e.y}function Ih(t,e,n,i){const r=zh(Ph(t,e,n)),s=zh(Ph(t,e,i)),a=zh(Ph(n,i,t)),o=zh(Ph(n,i,e));return r!==s&&a!==o||!(0!==r||!Nh(t,n,e))||!(0!==s||!Nh(t,i,e))||!(0!==a||!Nh(n,t,i))||!(0!==o||!Nh(n,e,i))}function Nh(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function zh(t){return t>0?1:t<0?-1:0}function Oh(t,e){return Ph(t.prev,t,t.next)<0?Ph(t,e,t.next)>=0&&Ph(t,t.prev,e)>=0:Ph(t,e,t.prev)<0||Ph(t,t.next,e)<0}function Bh(t,e){const n=new Hh(t.i,t.x,t.y),i=new Hh(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,s.next=i,i.prev=s,i}function Fh(t,e,n,i){const r=new Hh(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Uh(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Hh(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Gh{static area(t){const e=t.length;let n=0;for(let i=e-1,r=0;r<e;i=r++)n+=t[i].x*t[r].y-t[r].x*t[i].y;return.5*n}static isClockWise(t){return Gh.area(t)<0}static triangulateShape(t,e){const n=[],i=[],r=[];kh(t),Vh(n,t);let s=t.length;e.forEach(kh);for(let t=0;t<e.length;t++)i.push(s),s+=e[t].length,Vh(n,e[t]);const a=function(t,e,n=2){const i=e&&e.length,r=i?e[0]*n:t.length;let s=vh(t,0,r,n,!0);const a=[];if(!s||s.next===s.prev)return a;let o,l,c,h,u,d,p;if(i&&(s=function(t,e,n,i){const r=[];let s,a,o,l,c;for(s=0,a=e.length;s<a;s++)o=e[s]*i,l=s<a-1?e[s+1]*i:t.length,c=vh(t,o,l,i,!1),c===c.next&&(c.steiner=!0),r.push(Lh(c));for(r.sort(Sh),s=0;s<r.length;s++)Th(r[s],n),n=yh(n,n.next);return n}(t,e,s,n)),t.length>80*n){o=c=t[0],l=h=t[1];for(let e=n;e<r;e+=n)u=t[e],d=t[e+1],u<o&&(o=u),d<l&&(l=d),u>c&&(c=u),d>h&&(h=d);p=Math.max(c-o,h-l),p=0!==p?1/p:0}return xh(s,a,n,o,l,p),a}(n,i);for(let t=0;t<a.length;t+=3)r.push(a.slice(t,t+3));return r}}function kh(t){const e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Vh(t,e){for(let n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}class Wh extends es{constructor(t=new gh([new Yn(.5,.5),new Yn(-.5,.5),new Yn(-.5,-.5),new Yn(.5,-.5)]),e={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];const n=this,i=[],r=[];for(let e=0,n=t.length;e<n;e++)s(t[e]);function s(t){const s=[],a=void 0!==e.curveSegments?e.curveSegments:12,o=void 0!==e.steps?e.steps:1;let l=void 0!==e.depth?e.depth:1,c=void 0===e.bevelEnabled||e.bevelEnabled,h=void 0!==e.bevelThickness?e.bevelThickness:.2,u=void 0!==e.bevelSize?e.bevelSize:h-.1,d=void 0!==e.bevelOffset?e.bevelOffset:0,p=void 0!==e.bevelSegments?e.bevelSegments:3;const m=e.extrudePath,f=void 0!==e.UVGenerator?e.UVGenerator:jh;void 0!==e.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=e.amount);let g,v,y,x,_,M=!1;m&&(g=m.getSpacedPoints(o),M=!0,c=!1,v=m.computeFrenetFrames(o,!1),y=new ui,x=new ui,_=new ui),c||(p=0,h=0,u=0,d=0);const b=t.extractPoints(a);let w=b.shape;const S=b.holes;if(!Gh.isClockWise(w)){w=w.reverse();for(let t=0,e=S.length;t<e;t++){const e=S[t];Gh.isClockWise(e)&&(S[t]=e.reverse())}}const T=Gh.triangulateShape(w,S),E=w;for(let t=0,e=S.length;t<e;t++){const e=S[t];w=w.concat(e)}function A(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}const L=w.length,R=T.length;function C(t,e,n){let i,r,s;const a=t.x-e.x,o=t.y-e.y,l=n.x-t.x,c=n.y-t.y,h=a*a+o*o,u=a*c-o*l;if(Math.abs(u)>Number.EPSILON){const u=Math.sqrt(h),d=Math.sqrt(l*l+c*c),p=e.x-o/u,m=e.y+a/u,f=((n.x-c/d-p)*c-(n.y+l/d-m)*l)/(a*c-o*l);i=p+a*f-t.x,r=m+o*f-t.y;const g=i*i+r*r;if(g<=2)return new Yn(i,r);s=Math.sqrt(g/2)}else{let t=!1;a>Number.EPSILON?l>Number.EPSILON&&(t=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(t=!0):Math.sign(o)===Math.sign(c)&&(t=!0),t?(i=-o,r=a,s=Math.sqrt(h)):(i=a,r=o,s=Math.sqrt(h/2))}return new Yn(i/s,r/s)}const P=[];for(let t=0,e=E.length,n=e-1,i=t+1;t<e;t++,n++,i++)n===e&&(n=0),i===e&&(i=0),P[t]=C(E[t],E[n],E[i]);const D=[];let I,N=P.concat();for(let t=0,e=S.length;t<e;t++){const e=S[t];I=[];for(let t=0,n=e.length,i=n-1,r=t+1;t<n;t++,i++,r++)i===n&&(i=0),r===n&&(r=0),I[t]=C(e[t],e[i],e[r]);D.push(I),N=N.concat(I)}for(let t=0;t<p;t++){const e=t/p,n=h*Math.cos(e*Math.PI/2),i=u*Math.sin(e*Math.PI/2)+d;for(let t=0,e=E.length;t<e;t++){const e=A(E[t],P[t],i);B(e.x,e.y,-n)}for(let t=0,e=S.length;t<e;t++){const e=S[t];I=D[t];for(let t=0,r=e.length;t<r;t++){const r=A(e[t],I[t],i);B(r.x,r.y,-n)}}}const z=u+d;for(let t=0;t<L;t++){const e=c?A(w[t],N[t],z):w[t];M?(x.copy(v.normals[0]).multiplyScalar(e.x),y.copy(v.binormals[0]).multiplyScalar(e.y),_.copy(g[0]).add(x).add(y),B(_.x,_.y,_.z)):B(e.x,e.y,0)}for(let t=1;t<=o;t++)for(let e=0;e<L;e++){const n=c?A(w[e],N[e],z):w[e];M?(x.copy(v.normals[t]).multiplyScalar(n.x),y.copy(v.binormals[t]).multiplyScalar(n.y),_.copy(g[t]).add(x).add(y),B(_.x,_.y,_.z)):B(n.x,n.y,l/o*t)}for(let t=p-1;t>=0;t--){const e=t/p,n=h*Math.cos(e*Math.PI/2),i=u*Math.sin(e*Math.PI/2)+d;for(let t=0,e=E.length;t<e;t++){const e=A(E[t],P[t],i);B(e.x,e.y,l+n)}for(let t=0,e=S.length;t<e;t++){const e=S[t];I=D[t];for(let t=0,r=e.length;t<r;t++){const r=A(e[t],I[t],i);M?B(r.x,r.y+g[o-1].y,g[o-1].x+n):B(r.x,r.y,l+n)}}}function O(t,e){let n=t.length;for(;--n>=0;){const i=n;let r=n-1;r<0&&(r=t.length-1);for(let t=0,n=o+2*p;t<n;t++){const n=L*t,s=L*(t+1);U(e+i+n,e+r+n,e+r+s,e+i+s)}}}function B(t,e,n){s.push(t),s.push(e),s.push(n)}function F(t,e,r){H(t),H(e),H(r);const s=i.length/3,a=f.generateTopUV(n,i,s-3,s-2,s-1);G(a[0]),G(a[1]),G(a[2])}function U(t,e,r,s){H(t),H(e),H(s),H(e),H(r),H(s);const a=i.length/3,o=f.generateSideWallUV(n,i,a-6,a-3,a-2,a-1);G(o[0]),G(o[1]),G(o[3]),G(o[1]),G(o[2]),G(o[3])}function H(t){i.push(s[3*t+0]),i.push(s[3*t+1]),i.push(s[3*t+2])}function G(t){r.push(t.x),r.push(t.y)}!function(){const t=i.length/3;if(c){let t=0,e=L*t;for(let t=0;t<R;t++){const n=T[t];F(n[2]+e,n[1]+e,n[0]+e)}t=o+2*p,e=L*t;for(let t=0;t<R;t++){const n=T[t];F(n[0]+e,n[1]+e,n[2]+e)}}else{for(let t=0;t<R;t++){const e=T[t];F(e[2],e[1],e[0])}for(let t=0;t<R;t++){const e=T[t];F(e[0]+L*o,e[1]+L*o,e[2]+L*o)}}n.addGroup(t,i.length/3-t,0)}(),function(){const t=i.length/3;let e=0;O(E,e),e+=E.length;for(let t=0,n=S.length;t<n;t++){const n=S[t];O(n,e),e+=n.length}n.addGroup(t,i.length/3-t,1)}()}this.setAttribute("position",new qr(i,3)),this.setAttribute("uv",new qr(r,2)),this.computeVertexNormals()}toJSON(){const t=super.toJSON();return function(t,e,n){if(n.shapes=[],Array.isArray(t))for(let e=0,i=t.length;e<i;e++){const i=t[e];n.shapes.push(i.uuid)}else n.shapes.push(t.uuid);return void 0!==e.extrudePath&&(n.options.extrudePath=e.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,t)}static fromJSON(t,e){const n=[];for(let i=0,r=t.shapes.length;i<r;i++){const r=e[t.shapes[i]];n.push(r)}const i=t.options.extrudePath;return void 0!==i&&(t.options.extrudePath=(new ph[i.type]).fromJSON(i)),new Wh(n,t.options)}}const jh={generateTopUV:function(t,e,n,i,r){const s=e[3*n],a=e[3*n+1],o=e[3*i],l=e[3*i+1],c=e[3*r],h=e[3*r+1];return[new Yn(s,a),new Yn(o,l),new Yn(c,h)]},generateSideWallUV:function(t,e,n,i,r,s){const a=e[3*n],o=e[3*n+1],l=e[3*n+2],c=e[3*i],h=e[3*i+1],u=e[3*i+2],d=e[3*r],p=e[3*r+1],m=e[3*r+2],f=e[3*s],g=e[3*s+1],v=e[3*s+2];return Math.abs(o-h)<Math.abs(a-c)?[new Yn(a,1-l),new Yn(c,1-u),new Yn(d,1-m),new Yn(f,1-v)]:[new Yn(o,1-l),new Yn(h,1-u),new Yn(p,1-m),new Yn(g,1-v)]}};class qh extends Gc{constructor(t=1,e=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,e),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new qh(t.radius,t.detail)}}class Xh extends es{constructor(t=[new Yn(0,.5),new Yn(.5,0),new Yn(0,-.5)],e=12,n=0,i=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:i},e=Math.floor(e),i=Gn(i,0,2*Math.PI);const r=[],s=[],a=[],o=1/e,l=new ui,c=new Yn;for(let r=0;r<=e;r++){const h=n+r*o*i,u=Math.sin(h),d=Math.cos(h);for(let n=0;n<=t.length-1;n++)l.x=t[n].x*u,l.y=t[n].y,l.z=t[n].x*d,s.push(l.x,l.y,l.z),c.x=r/e,c.y=n/(t.length-1),a.push(c.x,c.y)}for(let n=0;n<e;n++)for(let e=0;e<t.length-1;e++){const i=e+n*t.length,s=i,a=i+t.length,o=i+t.length+1,l=i+1;r.push(s,a,l),r.push(a,o,l)}if(this.setIndex(r),this.setAttribute("position",new qr(s,3)),this.setAttribute("uv",new qr(a,2)),this.computeVertexNormals(),i===2*Math.PI){const n=this.attributes.normal.array,i=new ui,r=new ui,s=new ui,a=e*t.length*3;for(let e=0,o=0;e<t.length;e++,o+=3)i.x=n[o+0],i.y=n[o+1],i.z=n[o+2],r.x=n[a+o+0],r.y=n[a+o+1],r.z=n[a+o+2],s.addVectors(i,r).normalize(),n[o+0]=n[a+o+0]=s.x,n[o+1]=n[a+o+1]=s.y,n[o+2]=n[a+o+2]=s.z}}static fromJSON(t){return new Xh(t.points,t.segments,t.phiStart,t.phiLength)}}class Yh extends Gc{constructor(t=1,e=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,e),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new Yh(t.radius,t.detail)}}class Zh extends es{constructor(t=.5,e=1,n=8,i=1,r=0,s=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:i,thetaStart:r,thetaLength:s},n=Math.max(3,n);const a=[],o=[],l=[],c=[];let h=t;const u=(e-t)/(i=Math.max(1,i)),d=new ui,p=new Yn;for(let t=0;t<=i;t++){for(let t=0;t<=n;t++){const i=r+t/n*s;d.x=h*Math.cos(i),d.y=h*Math.sin(i),o.push(d.x,d.y,d.z),l.push(0,0,1),p.x=(d.x/e+1)/2,p.y=(d.y/e+1)/2,c.push(p.x,p.y)}h+=u}for(let t=0;t<i;t++){const e=t*(n+1);for(let t=0;t<n;t++){const i=t+e,r=i,s=i+n+1,o=i+n+2,l=i+1;a.push(r,s,l),a.push(s,o,l)}}this.setIndex(a),this.setAttribute("position",new qr(o,3)),this.setAttribute("normal",new qr(l,3)),this.setAttribute("uv",new qr(c,2))}static fromJSON(t){return new Zh(t.innerRadius,t.outerRadius,t.thetaSegments,t.phiSegments,t.thetaStart,t.thetaLength)}}class Jh extends es{constructor(t=new gh([new Yn(0,.5),new Yn(-.5,-.5),new Yn(.5,-.5)]),e=12){super(),this.type="ShapeGeometry",this.parameters={shapes:t,curveSegments:e};const n=[],i=[],r=[],s=[];let a=0,o=0;if(!1===Array.isArray(t))l(t);else for(let e=0;e<t.length;e++)l(t[e]),this.addGroup(a,o,e),a+=o,o=0;function l(t){const a=i.length/3,l=t.extractPoints(e);let c=l.shape;const h=l.holes;!1===Gh.isClockWise(c)&&(c=c.reverse());for(let t=0,e=h.length;t<e;t++){const e=h[t];!0===Gh.isClockWise(e)&&(h[t]=e.reverse())}const u=Gh.triangulateShape(c,h);for(let t=0,e=h.length;t<e;t++){const e=h[t];c=c.concat(e)}for(let t=0,e=c.length;t<e;t++){const e=c[t];i.push(e.x,e.y,0),r.push(0,0,1),s.push(e.x,e.y)}for(let t=0,e=u.length;t<e;t++){const e=u[t],i=e[0]+a,r=e[1]+a,s=e[2]+a;n.push(i,r,s),o+=3}}this.setIndex(n),this.setAttribute("position",new qr(i,3)),this.setAttribute("normal",new qr(r,3)),this.setAttribute("uv",new qr(s,2))}toJSON(){const t=super.toJSON();return function(t,e){if(e.shapes=[],Array.isArray(t))for(let n=0,i=t.length;n<i;n++){const i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}(this.parameters.shapes,t)}static fromJSON(t,e){const n=[];for(let i=0,r=t.shapes.length;i<r;i++){const r=e[t.shapes[i]];n.push(r)}return new Jh(n,t.curveSegments)}}class Qh extends es{constructor(t=1,e=32,n=16,i=0,r=2*Math.PI,s=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:i,phiLength:r,thetaStart:s,thetaLength:a},e=Math.max(3,Math.floor(e)),n=Math.max(2,Math.floor(n));const o=Math.min(s+a,Math.PI);let l=0;const c=[],h=new ui,u=new ui,d=[],p=[],m=[],f=[];for(let d=0;d<=n;d++){const g=[],v=d/n;let y=0;0==d&&0==s?y=.5/e:d==n&&o==Math.PI&&(y=-.5/e);for(let n=0;n<=e;n++){const o=n/e;h.x=-t*Math.cos(i+o*r)*Math.sin(s+v*a),h.y=t*Math.cos(s+v*a),h.z=t*Math.sin(i+o*r)*Math.sin(s+v*a),p.push(h.x,h.y,h.z),u.copy(h).normalize(),m.push(u.x,u.y,u.z),f.push(o+y,1-v),g.push(l++)}c.push(g)}for(let t=0;t<n;t++)for(let i=0;i<e;i++){const e=c[t][i+1],r=c[t][i],a=c[t+1][i],l=c[t+1][i+1];(0!==t||s>0)&&d.push(e,r,l),(t!==n-1||o<Math.PI)&&d.push(r,a,l)}this.setIndex(d),this.setAttribute("position",new qr(p,3)),this.setAttribute("normal",new qr(m,3)),this.setAttribute("uv",new qr(f,2))}static fromJSON(t){return new Qh(t.radius,t.widthSegments,t.heightSegments,t.phiStart,t.phiLength,t.thetaStart,t.thetaLength)}}class Kh extends Gc{constructor(t=1,e=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new Kh(t.radius,t.detail)}}class $h extends es{constructor(t=1,e=.4,n=8,i=6,r=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:i,arc:r},n=Math.floor(n),i=Math.floor(i);const s=[],a=[],o=[],l=[],c=new ui,h=new ui,u=new ui;for(let s=0;s<=n;s++)for(let d=0;d<=i;d++){const p=d/i*r,m=s/n*Math.PI*2;h.x=(t+e*Math.cos(m))*Math.cos(p),h.y=(t+e*Math.cos(m))*Math.sin(p),h.z=e*Math.sin(m),a.push(h.x,h.y,h.z),c.x=t*Math.cos(p),c.y=t*Math.sin(p),u.subVectors(h,c).normalize(),o.push(u.x,u.y,u.z),l.push(d/i),l.push(s/n)}for(let t=1;t<=n;t++)for(let e=1;e<=i;e++){const n=(i+1)*t+e-1,r=(i+1)*(t-1)+e-1,a=(i+1)*(t-1)+e,o=(i+1)*t+e;s.push(n,r,o),s.push(r,a,o)}this.setIndex(s),this.setAttribute("position",new qr(a,3)),this.setAttribute("normal",new qr(o,3)),this.setAttribute("uv",new qr(l,2))}static fromJSON(t){return new $h(t.radius,t.tube,t.radialSegments,t.tubularSegments,t.arc)}}class tu extends es{constructor(t=1,e=.4,n=64,i=8,r=2,s=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:i,p:r,q:s},n=Math.floor(n),i=Math.floor(i);const a=[],o=[],l=[],c=[],h=new ui,u=new ui,d=new ui,p=new ui,m=new ui,f=new ui,g=new ui;for(let a=0;a<=n;++a){const y=a/n*r*Math.PI*2;v(y,r,s,t,d),v(y+.01,r,s,t,p),f.subVectors(p,d),g.addVectors(p,d),m.crossVectors(f,g),g.crossVectors(m,f),m.normalize(),g.normalize();for(let t=0;t<=i;++t){const r=t/i*Math.PI*2,s=-e*Math.cos(r),p=e*Math.sin(r);h.x=d.x+(s*g.x+p*m.x),h.y=d.y+(s*g.y+p*m.y),h.z=d.z+(s*g.z+p*m.z),o.push(h.x,h.y,h.z),u.subVectors(h,d).normalize(),l.push(u.x,u.y,u.z),c.push(a/n),c.push(t/i)}}for(let t=1;t<=n;t++)for(let e=1;e<=i;e++){const n=(i+1)*(t-1)+(e-1),r=(i+1)*t+(e-1),s=(i+1)*t+e,o=(i+1)*(t-1)+e;a.push(n,r,o),a.push(r,s,o)}function v(t,e,n,i,r){const s=Math.cos(t),a=Math.sin(t),o=n/e*t,l=Math.cos(o);r.x=i*(2+l)*.5*s,r.y=i*(2+l)*a*.5,r.z=i*Math.sin(o)*.5}this.setIndex(a),this.setAttribute("position",new qr(o,3)),this.setAttribute("normal",new qr(l,3)),this.setAttribute("uv",new qr(c,2))}static fromJSON(t){return new tu(t.radius,t.tube,t.tubularSegments,t.radialSegments,t.p,t.q)}}class eu extends es{constructor(t=new uh(new ui(-1,-1,0),new ui(-1,1,0),new ui(1,1,0)),e=64,n=1,i=8,r=!1){super(),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:i,closed:r};const s=t.computeFrenetFrames(e,r);this.tangents=s.tangents,this.normals=s.normals,this.binormals=s.binormals;const a=new ui,o=new ui,l=new Yn;let c=new ui;const h=[],u=[],d=[],p=[];function m(r){c=t.getPointAt(r/e,c);const l=s.normals[r],d=s.binormals[r];for(let t=0;t<=i;t++){const e=t/i*Math.PI*2,r=Math.sin(e),s=-Math.cos(e);o.x=s*l.x+r*d.x,o.y=s*l.y+r*d.y,o.z=s*l.z+r*d.z,o.normalize(),u.push(o.x,o.y,o.z),a.x=c.x+n*o.x,a.y=c.y+n*o.y,a.z=c.z+n*o.z,h.push(a.x,a.y,a.z)}}!function(){for(let t=0;t<e;t++)m(t);m(!1===r?e:0),function(){for(let t=0;t<=e;t++)for(let n=0;n<=i;n++)l.x=t/e,l.y=n/i,d.push(l.x,l.y)}(),function(){for(let t=1;t<=e;t++)for(let e=1;e<=i;e++){const n=(i+1)*(t-1)+(e-1),r=(i+1)*t+(e-1),s=(i+1)*t+e,a=(i+1)*(t-1)+e;p.push(n,r,a),p.push(r,s,a)}}()}(),this.setIndex(p),this.setAttribute("position",new qr(h,3)),this.setAttribute("normal",new qr(u,3)),this.setAttribute("uv",new qr(d,2))}toJSON(){const t=super.toJSON();return t.path=this.parameters.path.toJSON(),t}static fromJSON(t){return new eu((new ph[t.path.type]).fromJSON(t.path),t.tubularSegments,t.radius,t.radialSegments,t.closed)}}class nu extends es{constructor(t=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:t},null!==t){const e=[],n=new Set,i=new ui,r=new ui;if(null!==t.index){const s=t.attributes.position,a=t.index;let o=t.groups;0===o.length&&(o=[{start:0,count:a.count,materialIndex:0}]);for(let t=0,l=o.length;t<l;++t){const l=o[t],c=l.start;for(let t=c,o=c+l.count;t<o;t+=3)for(let o=0;o<3;o++){const l=a.getX(t+o),c=a.getX(t+(o+1)%3);i.fromBufferAttribute(s,l),r.fromBufferAttribute(s,c),!0===iu(i,r,n)&&(e.push(i.x,i.y,i.z),e.push(r.x,r.y,r.z))}}}else{const s=t.attributes.position;for(let t=0,a=s.count/3;t<a;t++)for(let a=0;a<3;a++){const o=3*t+a,l=3*t+(a+1)%3;i.fromBufferAttribute(s,o),r.fromBufferAttribute(s,l),!0===iu(i,r,n)&&(e.push(i.x,i.y,i.z),e.push(r.x,r.y,r.z))}}this.setAttribute("position",new qr(e,3))}}}function iu(t,e,n){const i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`,r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`;return!0!==n.has(i)&&!0!==n.has(r)&&(n.add(i,r),!0)}var ru=Object.freeze({__proto__:null,BoxGeometry:Ms,BoxBufferGeometry:Ms,CircleGeometry:Fc,CircleBufferGeometry:Fc,ConeGeometry:Hc,ConeBufferGeometry:Hc,CylinderGeometry:Uc,CylinderBufferGeometry:Uc,DodecahedronGeometry:kc,DodecahedronBufferGeometry:kc,EdgesGeometry:Xc,ExtrudeGeometry:Wh,ExtrudeBufferGeometry:Wh,IcosahedronGeometry:qh,IcosahedronBufferGeometry:qh,LatheGeometry:Xh,LatheBufferGeometry:Xh,OctahedronGeometry:Yh,OctahedronBufferGeometry:Yh,PlaneGeometry:Gs,PlaneBufferGeometry:Gs,PolyhedronGeometry:Gc,PolyhedronBufferGeometry:Gc,RingGeometry:Zh,RingBufferGeometry:Zh,ShapeGeometry:Jh,ShapeBufferGeometry:Jh,SphereGeometry:Qh,SphereBufferGeometry:Qh,TetrahedronGeometry:Kh,TetrahedronBufferGeometry:Kh,TorusGeometry:$h,TorusBufferGeometry:$h,TorusKnotGeometry:tu,TorusKnotBufferGeometry:tu,TubeGeometry:eu,TubeBufferGeometry:eu,WireframeGeometry:nu});class su extends Er{constructor(t){super(),this.type="ShadowMaterial",this.color=new Ir(0),this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this}}su.prototype.isShadowMaterial=!0;class au extends Er{constructor(t){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Ir(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ir(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=an,this.normalScale=new Yn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this}}au.prototype.isMeshStandardMaterial=!0;class ou extends au{constructor(t){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Yn(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Gn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.sheenColor=new Ir(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new Ir(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Ir(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._transmission=0,this.setValues(t)}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}ou.prototype.isMeshPhysicalMaterial=!0;class lu extends Er{constructor(t){super(),this.type="MeshPhongMaterial",this.color=new Ir(16777215),this.specular=new Ir(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ir(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=an,this.normalScale=new Yn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Z,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this}}lu.prototype.isMeshPhongMaterial=!0;class cu extends Er{constructor(t){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ir(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ir(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=an,this.normalScale=new Yn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}}cu.prototype.isMeshToonMaterial=!0;class hu extends Er{constructor(t){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=an,this.normalScale=new Yn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}hu.prototype.isMeshNormalMaterial=!0;class uu extends Er{constructor(t){super(),this.type="MeshLambertMaterial",this.color=new Ir(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ir(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Z,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}}uu.prototype.isMeshLambertMaterial=!0;class du extends Er{constructor(t){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ir(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=an,this.normalScale=new Yn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this}}du.prototype.isMeshMatcapMaterial=!0;class pu extends vc{constructor(t){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}pu.prototype.isLineDashedMaterial=!0;var mu=Object.freeze({__proto__:null,ShadowMaterial:su,SpriteMaterial:zl,RawShaderMaterial:Ks,ShaderMaterial:Ts,PointsMaterial:Lc,MeshPhysicalMaterial:ou,MeshStandardMaterial:au,MeshPhongMaterial:lu,MeshToonMaterial:cu,MeshNormalMaterial:hu,MeshLambertMaterial:uu,MeshDepthMaterial:ml,MeshDistanceMaterial:fl,MeshBasicMaterial:Nr,MeshMatcapMaterial:du,LineDashedMaterial:pu,LineBasicMaterial:vc,Material:Er});const fu={arraySlice:function(t,e,n){return fu.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){const e=t.length,n=new Array(e);for(let t=0;t!==e;++t)n[t]=t;return n.sort((function(e,n){return t[e]-t[n]})),n},sortedArray:function(t,e,n){const i=t.length,r=new t.constructor(i);for(let s=0,a=0;a!==i;++s){const i=n[s]*e;for(let n=0;n!==e;++n)r[a++]=t[i+n]}return r},flattenJSON:function(t,e,n,i){let r=1,s=t[0];for(;void 0!==s&&void 0===s[i];)s=t[r++];if(void 0===s)return;let a=s[i];if(void 0!==a)if(Array.isArray(a))do{a=s[i],void 0!==a&&(e.push(s.time),n.push.apply(n,a)),s=t[r++]}while(void 0!==s);else if(void 0!==a.toArray)do{a=s[i],void 0!==a&&(e.push(s.time),a.toArray(n,n.length)),s=t[r++]}while(void 0!==s);else do{a=s[i],void 0!==a&&(e.push(s.time),n.push(a)),s=t[r++]}while(void 0!==s)},subclip:function(t,e,n,i,r=30){const s=t.clone();s.name=e;const a=[];for(let t=0;t<s.tracks.length;++t){const e=s.tracks[t],o=e.getValueSize(),l=[],c=[];for(let t=0;t<e.times.length;++t){const s=e.times[t]*r;if(!(s<n||s>=i)){l.push(e.times[t]);for(let n=0;n<o;++n)c.push(e.values[t*o+n])}}0!==l.length&&(e.times=fu.convertArray(l,e.times.constructor),e.values=fu.convertArray(c,e.values.constructor),a.push(e))}s.tracks=a;let o=1/0;for(let t=0;t<s.tracks.length;++t)o>s.tracks[t].times[0]&&(o=s.tracks[t].times[0]);for(let t=0;t<s.tracks.length;++t)s.tracks[t].shift(-1*o);return s.resetDuration(),s},makeClipAdditive:function(t,e=0,n=t,i=30){i<=0&&(i=30);const r=n.tracks.length,s=e/i;for(let e=0;e<r;++e){const i=n.tracks[e],r=i.ValueTypeName;if("bool"===r||"string"===r)continue;const a=t.tracks.find((function(t){return t.name===i.name&&t.ValueTypeName===r}));if(void 0===a)continue;let o=0;const l=i.getValueSize();i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(o=l/3);let c=0;const h=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=h/3);const u=i.times.length-1;let d;if(s<=i.times[0]){const t=o,e=l-o;d=fu.arraySlice(i.values,t,e)}else if(s>=i.times[u]){const t=u*l+o,e=t+l-o;d=fu.arraySlice(i.values,t,e)}else{const t=i.createInterpolant(),e=o,n=l-o;t.evaluate(s),d=fu.arraySlice(t.resultBuffer,e,n)}"quaternion"===r&&(new hi).fromArray(d).normalize().conjugate().toArray(d);const p=a.times.length;for(let t=0;t<p;++t){const e=t*h+c;if("quaternion"===r)hi.multiplyQuaternionsFlat(a.values,e,d,0,a.values,e);else{const t=h-2*c;for(let n=0;n<t;++n)a.values[e+n]-=d[n]}}}return t.blendMode=qe,t}};class gu{constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let n=this._cachedIndex,i=e[n],r=e[n-1];t:{e:{let s;n:{i:if(!(t<i)){for(let s=n+2;;){if(void 0===i){if(t<r)break i;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,r)}if(n===s)break;if(r=i,i=e[++n],t<i)break e}s=e.length;break n}if(t>=r)break t;{const a=e[1];t<a&&(n=2,r=a);for(let s=n-2;;){if(void 0===r)return this._cachedIndex=0,this.beforeStart_(0,t,i);if(n===s)break;if(i=r,r=e[--n-1],t>=r)break e}s=n,n=0}}for(;n<s;){const i=n+s>>>1;t<e[i]?s=i:n=i+1}if(i=e[n],r=e[n-1],void 0===r)return this._cachedIndex=0,this.beforeStart_(0,t,i);if(void 0===i)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,r,t)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,t,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){const e=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=t*i;for(let t=0;t!==i;++t)e[t]=n[r+t];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}gu.prototype.beforeStart_=gu.prototype.copySampleValue_,gu.prototype.afterEnd_=gu.prototype.copySampleValue_;class vu extends gu{constructor(t,e,n,i){super(t,e,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:ke,endingEnd:ke}}intervalChanged_(t,e,n){const i=this.parameterPositions;let r=t-2,s=t+1,a=i[r],o=i[s];if(void 0===a)switch(this.getSettings_().endingStart){case Ve:r=t,a=2*e-n;break;case We:r=i.length-2,a=e+i[r]-i[r+1];break;default:r=t,a=n}if(void 0===o)switch(this.getSettings_().endingEnd){case Ve:s=t,o=2*n-e;break;case We:s=1,o=n+i[1]-i[0];break;default:s=t-1,o=e}const l=.5*(n-e),c=this.valueSize;this._weightPrev=l/(e-a),this._weightNext=l/(o-n),this._offsetPrev=r*c,this._offsetNext=s*c}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=t*a,l=o-a,c=this._offsetPrev,h=this._offsetNext,u=this._weightPrev,d=this._weightNext,p=(n-e)/(i-e),m=p*p,f=m*p,g=-u*f+2*u*m-u*p,v=(1+u)*f+(-1.5-2*u)*m+(-.5+u)*p+1,y=(-1-d)*f+(1.5+d)*m+.5*p,x=d*f-d*m;for(let t=0;t!==a;++t)r[t]=g*s[c+t]+v*s[l+t]+y*s[o+t]+x*s[h+t];return r}}class yu extends gu{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=t*a,l=o-a,c=(n-e)/(i-e),h=1-c;for(let t=0;t!==a;++t)r[t]=s[l+t]*h+s[o+t]*c;return r}}class xu extends gu{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}}class _u{constructor(t,e,n,i){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=fu.convertArray(e,this.TimeBufferType),this.values=fu.convertArray(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let n;if(e.toJSON!==this.toJSON)n=e.toJSON(t);else{n={name:t.name,times:fu.convertArray(t.times,Array),values:fu.convertArray(t.values,Array)};const e=t.getInterpolation();e!==t.DefaultInterpolation&&(n.interpolation=e)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new xu(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new yu(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new vu(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case Ue:e=this.InterpolantFactoryMethodDiscrete;break;case He:e=this.InterpolantFactoryMethodLinear;break;case Ge:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){const e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(e);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Ue;case this.InterpolantFactoryMethodLinear:return He;case this.InterpolantFactoryMethodSmooth:return Ge}}getValueSize(){return this.values.length/this.times.length}shift(t){if(0!==t){const e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]+=t}return this}scale(t){if(1!==t){const e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]*=t}return this}trim(t,e){const n=this.times,i=n.length;let r=0,s=i-1;for(;r!==i&&n[r]<t;)++r;for(;-1!==s&&n[s]>e;)--s;if(++s,0!==r||s!==i){r>=s&&(s=Math.max(s,1),r=s-1);const t=this.getValueSize();this.times=fu.arraySlice(n,r,s),this.values=fu.arraySlice(this.values,r*t,s*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const n=this.times,i=this.values,r=n.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let e=0;e!==r;e++){const i=n[e];if("number"==typeof i&&isNaN(i)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,i),t=!1;break}if(null!==s&&s>i){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,i,s),t=!1;break}s=i}if(void 0!==i&&fu.isTypedArray(i))for(let e=0,n=i.length;e!==n;++e){const n=i[e];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,n),t=!1;break}}return t}optimize(){const t=fu.arraySlice(this.times),e=fu.arraySlice(this.values),n=this.getValueSize(),i=this.getInterpolation()===Ge,r=t.length-1;let s=1;for(let a=1;a<r;++a){let r=!1;const o=t[a];if(o!==t[a+1]&&(1!==a||o!==t[0]))if(i)r=!0;else{const t=a*n,i=t-n,s=t+n;for(let a=0;a!==n;++a){const n=e[t+a];if(n!==e[i+a]||n!==e[s+a]){r=!0;break}}}if(r){if(a!==s){t[s]=t[a];const i=a*n,r=s*n;for(let t=0;t!==n;++t)e[r+t]=e[i+t]}++s}}if(r>0){t[s]=t[r];for(let t=r*n,i=s*n,a=0;a!==n;++a)e[i+a]=e[t+a];++s}return s!==t.length?(this.times=fu.arraySlice(t,0,s),this.values=fu.arraySlice(e,0,s*n)):(this.times=t,this.values=e),this}clone(){const t=fu.arraySlice(this.times,0),e=fu.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,t,e);return n.createInterpolant=this.createInterpolant,n}}_u.prototype.TimeBufferType=Float32Array,_u.prototype.ValueBufferType=Float32Array,_u.prototype.DefaultInterpolation=He;class Mu extends _u{}Mu.prototype.ValueTypeName="bool",Mu.prototype.ValueBufferType=Array,Mu.prototype.DefaultInterpolation=Ue,Mu.prototype.InterpolantFactoryMethodLinear=void 0,Mu.prototype.InterpolantFactoryMethodSmooth=void 0;class bu extends _u{}bu.prototype.ValueTypeName="color";class wu extends _u{}wu.prototype.ValueTypeName="number";class Su extends gu{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=(n-e)/(i-e);let l=t*a;for(let t=l+a;l!==t;l+=4)hi.slerpFlat(r,0,s,l-a,s,l,o);return r}}class Tu extends _u{InterpolantFactoryMethodLinear(t){return new Su(this.times,this.values,this.getValueSize(),t)}}Tu.prototype.ValueTypeName="quaternion",Tu.prototype.DefaultInterpolation=He,Tu.prototype.InterpolantFactoryMethodSmooth=void 0;class Eu extends _u{}Eu.prototype.ValueTypeName="string",Eu.prototype.ValueBufferType=Array,Eu.prototype.DefaultInterpolation=Ue,Eu.prototype.InterpolantFactoryMethodLinear=void 0,Eu.prototype.InterpolantFactoryMethodSmooth=void 0;class Au extends _u{}Au.prototype.ValueTypeName="vector";class Lu{constructor(t,e=-1,n,i=je){this.name=t,this.tracks=n,this.duration=e,this.blendMode=i,this.uuid=Hn(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],n=t.tracks,i=1/(t.fps||1);for(let t=0,r=n.length;t!==r;++t)e.push(Ru(n[t]).scale(i));const r=new this(t.name,t.duration,e,t.blendMode);return r.uuid=t.uuid,r}static toJSON(t){const e=[],n=t.tracks,i={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,i=n.length;t!==i;++t)e.push(_u.toJSON(n[t]));return i}static CreateFromMorphTargetSequence(t,e,n,i){const r=e.length,s=[];for(let t=0;t<r;t++){let a=[],o=[];a.push((t+r-1)%r,t,(t+1)%r),o.push(0,1,0);const l=fu.getKeyframeOrder(a);a=fu.sortedArray(a,1,l),o=fu.sortedArray(o,1,l),i||0!==a[0]||(a.push(r),o.push(o[0])),s.push(new wu(".morphTargetInfluences["+e[t].name+"]",a,o).scale(1/n))}return new this(t,-1,s)}static findByName(t,e){let n=t;if(!Array.isArray(t)){const e=t;n=e.geometry&&e.geometry.animations||e.animations}for(let t=0;t<n.length;t++)if(n[t].name===e)return n[t];return null}static CreateClipsFromMorphTargetSequences(t,e,n){const i={},r=/^([\w-]*?)([\d]+)$/;for(let e=0,n=t.length;e<n;e++){const n=t[e],s=n.name.match(r);if(s&&s.length>1){const t=s[1];let e=i[t];e||(i[t]=e=[]),e.push(n)}}const s=[];for(const t in i)s.push(this.CreateFromMorphTargetSequence(t,i[t],e,n));return s}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(t,e,n,i,r){if(0!==n.length){const s=[],a=[];fu.flattenJSON(n,s,a,i),0!==s.length&&r.push(new t(e,s,a))}},i=[],r=t.name||"default",s=t.fps||30,a=t.blendMode;let o=t.length||-1;const l=t.hierarchy||[];for(let t=0;t<l.length;t++){const r=l[t].keys;if(r&&0!==r.length)if(r[0].morphTargets){const t={};let e;for(e=0;e<r.length;e++)if(r[e].morphTargets)for(let n=0;n<r[e].morphTargets.length;n++)t[r[e].morphTargets[n]]=-1;for(const n in t){const t=[],s=[];for(let i=0;i!==r[e].morphTargets.length;++i){const i=r[e];t.push(i.time),s.push(i.morphTarget===n?1:0)}i.push(new wu(".morphTargetInfluence["+n+"]",t,s))}o=t.length*(s||1)}else{const s=".bones["+e[t].name+"]";n(Au,s+".position",r,"pos",i),n(Tu,s+".quaternion",r,"rot",i),n(Au,s+".scale",r,"scl",i)}}return 0===i.length?null:new this(r,o,i,a)}resetDuration(){let t=0;for(let e=0,n=this.tracks.length;e!==n;++e){const n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}return this.duration=t,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){const t=[];for(let e=0;e<this.tracks.length;e++)t.push(this.tracks[e].clone());return new this.constructor(this.name,this.duration,t,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function Ru(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return wu;case"vector":case"vector2":case"vector3":case"vector4":return Au;case"color":return bu;case"quaternion":return Tu;case"bool":case"boolean":return Mu;case"string":return Eu}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}(t.type);if(void 0===t.times){const e=[],n=[];fu.flattenJSON(t.keys,e,n,"value"),t.times=e,t.values=n}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}const Cu={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class Pu{constructor(t,e,n){const i=this;let r,s=!1,a=0,o=0;const l=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){o++,!1===s&&void 0!==i.onStart&&i.onStart(t,a,o),s=!0},this.itemEnd=function(t){a++,void 0!==i.onProgress&&i.onProgress(t,a,o),a===o&&(s=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(t){void 0!==i.onError&&i.onError(t)},this.resolveURL=function(t){return r?r(t):t},this.setURLModifier=function(t){return r=t,this},this.addHandler=function(t,e){return l.push(t,e),this},this.removeHandler=function(t){const e=l.indexOf(t);return-1!==e&&l.splice(e,2),this},this.getHandler=function(t){for(let e=0,n=l.length;e<n;e+=2){const n=l[e],i=l[e+1];if(n.global&&(n.lastIndex=0),n.test(t))return i}return null}}}const Du=new Pu;class Iu{constructor(t){this.manager=void 0!==t?t:Du,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){const n=this;return new Promise((function(i,r){n.load(t,i,e,r)}))}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}const Nu={};class zu extends Iu{constructor(t){super(t)}load(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=Cu.get(t);if(void 0!==r)return this.manager.itemStart(t),setTimeout((()=>{e&&e(r),this.manager.itemEnd(t)}),0),r;if(void 0!==Nu[t])return void Nu[t].push({onLoad:e,onProgress:n,onError:i});Nu[t]=[],Nu[t].push({onLoad:e,onProgress:n,onError:i});const s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"});fetch(s).then((e=>{if(200===e.status||0===e.status){0===e.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");const n=Nu[t],i=e.body.getReader(),r=e.headers.get("Content-Length"),s=r?parseInt(r):0,a=0!==s;let o=0;return new ReadableStream({start(t){!function e(){i.read().then((({done:i,value:r})=>{if(i)t.close();else{o+=r.byteLength;const i=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:s});for(let t=0,e=n.length;t<e;t++){const e=n[t];e.onProgress&&e.onProgress(i)}t.enqueue(r),e()}}))}()}})}throw Error(`fetch for "${e.url}" responded with ${e.status}: ${e.statusText}`)})).then((t=>{const e=new Response(t);switch(this.responseType){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((t=>(new DOMParser).parseFromString(t,this.mimeType)));case"json":return e.json();default:return e.text()}})).then((e=>{Cu.add(t,e);const n=Nu[t];delete Nu[t];for(let t=0,i=n.length;t<i;t++){const i=n[t];i.onLoad&&i.onLoad(e)}this.manager.itemEnd(t)})).catch((e=>{const n=Nu[t];delete Nu[t];for(let t=0,i=n.length;t<i;t++){const i=n[t];i.onError&&i.onError(e)}this.manager.itemError(t),this.manager.itemEnd(t)})),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class Ou extends Iu{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new zu(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,(function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}}),n,i)}parse(t){const e=[];for(let n=0;n<t.length;n++){const i=Lu.parse(t[n]);e.push(i)}return e}}class Bu extends Iu{constructor(t){super(t)}load(t,e,n,i){const r=this,s=[],a=new Oc,o=new zu(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(r.withCredentials);let l=0;function c(c){o.load(t[c],(function(t){const n=r.parse(t,!0);s[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(a.minFilter=xt),a.image=s,a.format=n.format,a.needsUpdate=!0,e&&e(a))}),n,i)}if(Array.isArray(t))for(let e=0,n=t.length;e<n;++e)c(e);else o.load(t,(function(t){const n=r.parse(t,!0);if(n.isCubemap){const t=n.mipmaps.length/n.mipmapCount;for(let e=0;e<t;e++){s[e]={mipmaps:[]};for(let t=0;t<n.mipmapCount;t++)s[e].mipmaps.push(n.mipmaps[e*n.mipmapCount+t]),s[e].format=n.format,s[e].width=n.width,s[e].height=n.height}a.image=s}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=xt),a.format=n.format,a.needsUpdate=!0,e&&e(a)}),n,i);return a}}class Fu extends Iu{constructor(t){super(t)}load(t,e,n,i){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,s=Cu.get(t);if(void 0!==s)return r.manager.itemStart(t),setTimeout((function(){e&&e(s),r.manager.itemEnd(t)}),0),s;const a=$n("img");function o(){c(),Cu.add(t,this),e&&e(this),r.manager.itemEnd(t)}function l(e){c(),i&&i(e),r.manager.itemError(t),r.manager.itemEnd(t)}function c(){a.removeEventListener("load",o,!1),a.removeEventListener("error",l,!1)}return a.addEventListener("load",o,!1),a.addEventListener("error",l,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(t),a.src=t,a}}class Uu extends Iu{constructor(t){super(t)}load(t,e,n,i){const r=new Cs,s=new Fu(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);let a=0;function o(n){s.load(t[n],(function(t){r.images[n]=t,a++,6===a&&(r.needsUpdate=!0,e&&e(r))}),void 0,i)}for(let e=0;e<t.length;++e)o(e);return r}}class Hu extends Iu{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new oc,a=new zu(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(r.withCredentials),a.load(t,(function(t){const n=r.parse(t);n&&(void 0!==n.image?s.image=n.image:void 0!==n.data&&(s.image.width=n.width,s.image.height=n.height,s.image.data=n.data),s.wrapS=void 0!==n.wrapS?n.wrapS:dt,s.wrapT=void 0!==n.wrapT?n.wrapT:dt,s.magFilter=void 0!==n.magFilter?n.magFilter:xt,s.minFilter=void 0!==n.minFilter?n.minFilter:xt,s.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(s.encoding=n.encoding),void 0!==n.flipY&&(s.flipY=n.flipY),void 0!==n.format&&(s.format=n.format),void 0!==n.type&&(s.type=n.type),void 0!==n.mipmaps&&(s.mipmaps=n.mipmaps,s.minFilter=bt),1===n.mipmapCount&&(s.minFilter=xt),void 0!==n.generateMipmaps&&(s.generateMipmaps=n.generateMipmaps),s.needsUpdate=!0,e&&e(s,n))}),n,i),s}}class Gu extends Iu{constructor(t){super(t)}load(t,e,n,i){const r=new ri,s=new Fu(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(t,(function(t){r.image=t,r.needsUpdate=!0,void 0!==e&&e(r)}),n,i),r}}class ku extends pr{constructor(t,e=1){super(),this.type="Light",this.color=new Ir(t),this.intensity=e}dispose(){}copy(t){return super.copy(t),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}ku.prototype.isLight=!0;class Vu extends ku{constructor(t,e,n){super(t,n),this.type="HemisphereLight",this.position.copy(pr.DefaultUp),this.updateMatrix(),this.groundColor=new Ir(e)}copy(t){return ku.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}Vu.prototype.isHemisphereLight=!0;const Wu=new ki,ju=new ui,qu=new ui;class Xu{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Yn(512,512),this.map=null,this.mapPass=null,this.matrix=new ki,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Fs,this._frameExtents=new Yn(1,1),this._viewportCount=1,this._viewports=[new ai(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;ju.setFromMatrixPosition(t.matrixWorld),e.position.copy(ju),qu.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(qu),e.updateMatrixWorld(),Wu.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Wu),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(e.projectionMatrix),n.multiply(e.matrixWorldInverse)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const t={};return 0!==this.bias&&(t.bias=this.bias),0!==this.normalBias&&(t.normalBias=this.normalBias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class Yu extends Xu{constructor(){super(new As(50,1,.5,500)),this.focus=1}updateMatrices(t){const e=this.camera,n=2*Un*t.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=t.distance||e.far;n===e.fov&&i===e.aspect&&r===e.far||(e.fov=n,e.aspect=i,e.far=r,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}Yu.prototype.isSpotLightShadow=!0;class Zu extends ku{constructor(t,e,n=0,i=Math.PI/3,r=0,s=1){super(t,e),this.type="SpotLight",this.position.copy(pr.DefaultUp),this.updateMatrix(),this.target=new pr,this.distance=n,this.angle=i,this.penumbra=r,this.decay=s,this.shadow=new Yu}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}Zu.prototype.isSpotLight=!0;const Ju=new ki,Qu=new ui,Ku=new ui;class $u extends Xu{constructor(){super(new As(90,1,.5,500)),this._frameExtents=new Yn(4,2),this._viewportCount=6,this._viewports=[new ai(2,1,1,1),new ai(0,1,1,1),new ai(3,1,1,1),new ai(1,1,1,1),new ai(3,0,1,1),new ai(1,0,1,1)],this._cubeDirections=[new ui(1,0,0),new ui(-1,0,0),new ui(0,0,1),new ui(0,0,-1),new ui(0,1,0),new ui(0,-1,0)],this._cubeUps=[new ui(0,1,0),new ui(0,1,0),new ui(0,1,0),new ui(0,1,0),new ui(0,0,1),new ui(0,0,-1)]}updateMatrices(t,e=0){const n=this.camera,i=this.matrix,r=t.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),Qu.setFromMatrixPosition(t.matrixWorld),n.position.copy(Qu),Ku.copy(n.position),Ku.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(Ku),n.updateMatrixWorld(),i.makeTranslation(-Qu.x,-Qu.y,-Qu.z),Ju.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ju)}}$u.prototype.isPointLightShadow=!0;class td extends ku{constructor(t,e,n=0,i=1){super(t,e),this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new $u}get power(){return 4*this.intensity*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}td.prototype.isPointLight=!0;class ed extends Xu{constructor(){super(new Qs(-5,5,5,-5,.5,500))}}ed.prototype.isDirectionalLightShadow=!0;class nd extends ku{constructor(t,e){super(t,e),this.type="DirectionalLight",this.position.copy(pr.DefaultUp),this.updateMatrix(),this.target=new pr,this.shadow=new ed}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}nd.prototype.isDirectionalLight=!0;class id extends ku{constructor(t,e){super(t,e),this.type="AmbientLight"}}id.prototype.isAmbientLight=!0;class rd extends ku{constructor(t,e,n=10,i=10){super(t,e),this.type="RectAreaLight",this.width=n,this.height=i}get power(){return this.intensity*this.width*this.height*Math.PI}set power(t){this.intensity=t/(this.width*this.height*Math.PI)}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){const e=super.toJSON(t);return e.object.width=this.width,e.object.height=this.height,e}}rd.prototype.isRectAreaLight=!0;class sd{constructor(){this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new ui)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){const n=t.x,i=t.y,r=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.282095),e.addScaledVector(s[1],.488603*i),e.addScaledVector(s[2],.488603*r),e.addScaledVector(s[3],.488603*n),e.addScaledVector(s[4],n*i*1.092548),e.addScaledVector(s[5],i*r*1.092548),e.addScaledVector(s[6],.315392*(3*r*r-1)),e.addScaledVector(s[7],n*r*1.092548),e.addScaledVector(s[8],.546274*(n*n-i*i)),e}getIrradianceAt(t,e){const n=t.x,i=t.y,r=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.886227),e.addScaledVector(s[1],1.023328*i),e.addScaledVector(s[2],1.023328*r),e.addScaledVector(s[3],1.023328*n),e.addScaledVector(s[4],.858086*n*i),e.addScaledVector(s[5],.858086*i*r),e.addScaledVector(s[6],.743125*r*r-.247708),e.addScaledVector(s[7],.858086*n*r),e.addScaledVector(s[8],.429043*(n*n-i*i)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(t.coefficients[n],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let n=0;n<9;n++)this.coefficients[n].lerp(t.coefficients[n],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(t,e+3*i);return this}toArray(t=[],e=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(t,e+3*i);return t}static getBasisAt(t,e){const n=t.x,i=t.y,r=t.z;e[0]=.282095,e[1]=.488603*i,e[2]=.488603*r,e[3]=.488603*n,e[4]=1.092548*n*i,e[5]=1.092548*i*r,e[6]=.315392*(3*r*r-1),e[7]=1.092548*n*r,e[8]=.546274*(n*n-i*i)}}sd.prototype.isSphericalHarmonics3=!0;class ad extends ku{constructor(t=new sd,e=1){super(void 0,e),this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){const e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}}ad.prototype.isLightProbe=!0;class od extends Iu{constructor(t){super(t),this.textures={}}load(t,e,n,i){const r=this,s=new zu(r.manager);s.setPath(r.path),s.setRequestHeader(r.requestHeader),s.setWithCredentials(r.withCredentials),s.load(t,(function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}}),n,i)}parse(t){const e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}const i=new mu[t.type];if(void 0!==t.uuid&&(i.uuid=t.uuid),void 0!==t.name&&(i.name=t.name),void 0!==t.color&&void 0!==i.color&&i.color.setHex(t.color),void 0!==t.roughness&&(i.roughness=t.roughness),void 0!==t.metalness&&(i.metalness=t.metalness),void 0!==t.sheen&&(i.sheen=t.sheen),void 0!==t.sheenColor&&(i.sheenColor=(new Ir).setHex(t.sheenColor)),void 0!==t.sheenRoughness&&(i.sheenRoughness=t.sheenRoughness),void 0!==t.emissive&&void 0!==i.emissive&&i.emissive.setHex(t.emissive),void 0!==t.specular&&void 0!==i.specular&&i.specular.setHex(t.specular),void 0!==t.specularIntensity&&(i.specularIntensity=t.specularIntensity),void 0!==t.specularColor&&void 0!==i.specularColor&&i.specularColor.setHex(t.specularColor),void 0!==t.shininess&&(i.shininess=t.shininess),void 0!==t.clearcoat&&(i.clearcoat=t.clearcoat),void 0!==t.clearcoatRoughness&&(i.clearcoatRoughness=t.clearcoatRoughness),void 0!==t.transmission&&(i.transmission=t.transmission),void 0!==t.thickness&&(i.thickness=t.thickness),void 0!==t.attenuationDistance&&(i.attenuationDistance=t.attenuationDistance),void 0!==t.attenuationColor&&void 0!==i.attenuationColor&&i.attenuationColor.setHex(t.attenuationColor),void 0!==t.fog&&(i.fog=t.fog),void 0!==t.flatShading&&(i.flatShading=t.flatShading),void 0!==t.blending&&(i.blending=t.blending),void 0!==t.combine&&(i.combine=t.combine),void 0!==t.side&&(i.side=t.side),void 0!==t.shadowSide&&(i.shadowSide=t.shadowSide),void 0!==t.opacity&&(i.opacity=t.opacity),void 0!==t.format&&(i.format=t.format),void 0!==t.transparent&&(i.transparent=t.transparent),void 0!==t.alphaTest&&(i.alphaTest=t.alphaTest),void 0!==t.depthTest&&(i.depthTest=t.depthTest),void 0!==t.depthWrite&&(i.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(i.colorWrite=t.colorWrite),void 0!==t.stencilWrite&&(i.stencilWrite=t.stencilWrite),void 0!==t.stencilWriteMask&&(i.stencilWriteMask=t.stencilWriteMask),void 0!==t.stencilFunc&&(i.stencilFunc=t.stencilFunc),void 0!==t.stencilRef&&(i.stencilRef=t.stencilRef),void 0!==t.stencilFuncMask&&(i.stencilFuncMask=t.stencilFuncMask),void 0!==t.stencilFail&&(i.stencilFail=t.stencilFail),void 0!==t.stencilZFail&&(i.stencilZFail=t.stencilZFail),void 0!==t.stencilZPass&&(i.stencilZPass=t.stencilZPass),void 0!==t.wireframe&&(i.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(i.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(i.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(i.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(i.rotation=t.rotation),1!==t.linewidth&&(i.linewidth=t.linewidth),void 0!==t.dashSize&&(i.dashSize=t.dashSize),void 0!==t.gapSize&&(i.gapSize=t.gapSize),void 0!==t.scale&&(i.scale=t.scale),void 0!==t.polygonOffset&&(i.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(i.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(i.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.dithering&&(i.dithering=t.dithering),void 0!==t.alphaToCoverage&&(i.alphaToCoverage=t.alphaToCoverage),void 0!==t.premultipliedAlpha&&(i.premultipliedAlpha=t.premultipliedAlpha),void 0!==t.visible&&(i.visible=t.visible),void 0!==t.toneMapped&&(i.toneMapped=t.toneMapped),void 0!==t.userData&&(i.userData=t.userData),void 0!==t.vertexColors&&("number"==typeof t.vertexColors?i.vertexColors=t.vertexColors>0:i.vertexColors=t.vertexColors),void 0!==t.uniforms)for(const e in t.uniforms){const r=t.uniforms[e];switch(i.uniforms[e]={},r.type){case"t":i.uniforms[e].value=n(r.value);break;case"c":i.uniforms[e].value=(new Ir).setHex(r.value);break;case"v2":i.uniforms[e].value=(new Yn).fromArray(r.value);break;case"v3":i.uniforms[e].value=(new ui).fromArray(r.value);break;case"v4":i.uniforms[e].value=(new ai).fromArray(r.value);break;case"m3":i.uniforms[e].value=(new Zn).fromArray(r.value);break;case"m4":i.uniforms[e].value=(new ki).fromArray(r.value);break;default:i.uniforms[e].value=r.value}}if(void 0!==t.defines&&(i.defines=t.defines),void 0!==t.vertexShader&&(i.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(i.fragmentShader=t.fragmentShader),void 0!==t.extensions)for(const e in t.extensions)i.extensions[e]=t.extensions[e];if(void 0!==t.shading&&(i.flatShading=1===t.shading),void 0!==t.size&&(i.size=t.size),void 0!==t.sizeAttenuation&&(i.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(i.map=n(t.map)),void 0!==t.matcap&&(i.matcap=n(t.matcap)),void 0!==t.alphaMap&&(i.alphaMap=n(t.alphaMap)),void 0!==t.bumpMap&&(i.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(i.bumpScale=t.bumpScale),void 0!==t.normalMap&&(i.normalMap=n(t.normalMap)),void 0!==t.normalMapType&&(i.normalMapType=t.normalMapType),void 0!==t.normalScale){let e=t.normalScale;!1===Array.isArray(e)&&(e=[e,e]),i.normalScale=(new Yn).fromArray(e)}return void 0!==t.displacementMap&&(i.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(i.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(i.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(i.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(i.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(i.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(i.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(i.specularMap=n(t.specularMap)),void 0!==t.specularIntensityMap&&(i.specularIntensityMap=n(t.specularIntensityMap)),void 0!==t.specularColorMap&&(i.specularColorMap=n(t.specularColorMap)),void 0!==t.envMap&&(i.envMap=n(t.envMap)),void 0!==t.envMapIntensity&&(i.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(i.reflectivity=t.reflectivity),void 0!==t.refractionRatio&&(i.refractionRatio=t.refractionRatio),void 0!==t.lightMap&&(i.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(i.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(i.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(i.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(i.gradientMap=n(t.gradientMap)),void 0!==t.clearcoatMap&&(i.clearcoatMap=n(t.clearcoatMap)),void 0!==t.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),void 0!==t.clearcoatNormalMap&&(i.clearcoatNormalMap=n(t.clearcoatNormalMap)),void 0!==t.clearcoatNormalScale&&(i.clearcoatNormalScale=(new Yn).fromArray(t.clearcoatNormalScale)),void 0!==t.transmissionMap&&(i.transmissionMap=n(t.transmissionMap)),void 0!==t.thicknessMap&&(i.thicknessMap=n(t.thicknessMap)),void 0!==t.sheenColorMap&&(i.sheenColorMap=n(t.sheenColorMap)),void 0!==t.sheenRoughnessMap&&(i.sheenRoughnessMap=n(t.sheenRoughnessMap)),i}setTextures(t){return this.textures=t,this}}class ld{static decodeText(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);let e="";for(let n=0,i=t.length;n<i;n++)e+=String.fromCharCode(t[n]);try{return decodeURIComponent(escape(e))}catch(t){return e}}static extractUrlBase(t){const e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}static resolveURL(t,e){return"string"!=typeof t||""===t?"":(/^https?:\/\//i.test(e)&&/^\//.test(t)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:e+t)}}class cd extends es{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(t){return super.copy(t),this.instanceCount=t.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){const t=super.toJSON(this);return t.instanceCount=this.instanceCount,t.isInstancedBufferGeometry=!0,t}}cd.prototype.isInstancedBufferGeometry=!0;class hd extends Iu{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new zu(r.manager);s.setPath(r.path),s.setRequestHeader(r.requestHeader),s.setWithCredentials(r.withCredentials),s.load(t,(function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}}),n,i)}parse(t){const e={},n={};function i(t,i){if(void 0!==e[i])return e[i];const r=t.interleavedBuffers[i],s=function(t,e){if(void 0!==n[e])return n[e];const i=t.arrayBuffers[e],r=new Uint32Array(i).buffer;return n[e]=r,r}(t,r.buffer),a=Kn(r.type,s),o=new Dl(a,r.stride);return o.uuid=r.uuid,e[i]=o,o}const r=t.isInstancedBufferGeometry?new cd:new es,s=t.data.index;if(void 0!==s){const t=Kn(s.type,s.array);r.setIndex(new Br(t,1))}const a=t.data.attributes;for(const e in a){const n=a[e];let s;if(n.isInterleavedBufferAttribute){const e=i(t.data,n.data);s=new Nl(e,n.itemSize,n.offset,n.normalized)}else{const t=Kn(n.type,n.array);s=new(n.isInstancedBufferAttribute?uc:Br)(t,n.itemSize,n.normalized)}void 0!==n.name&&(s.name=n.name),void 0!==n.usage&&s.setUsage(n.usage),void 0!==n.updateRange&&(s.updateRange.offset=n.updateRange.offset,s.updateRange.count=n.updateRange.count),r.setAttribute(e,s)}const o=t.data.morphAttributes;if(o)for(const e in o){const n=o[e],s=[];for(let e=0,r=n.length;e<r;e++){const r=n[e];let a;if(r.isInterleavedBufferAttribute){const e=i(t.data,r.data);a=new Nl(e,r.itemSize,r.offset,r.normalized)}else{const t=Kn(r.type,r.array);a=new Br(t,r.itemSize,r.normalized)}void 0!==r.name&&(a.name=r.name),s.push(a)}r.morphAttributes[e]=s}t.data.morphTargetsRelative&&(r.morphTargetsRelative=!0);const l=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==l)for(let t=0,e=l.length;t!==e;++t){const e=l[t];r.addGroup(e.start,e.count,e.materialIndex)}const c=t.data.boundingSphere;if(void 0!==c){const t=new ui;void 0!==c.center&&t.fromArray(c.center),r.boundingSphere=new Ii(t,c.radius)}return t.name&&(r.name=t.name),t.userData&&(r.userData=t.userData),r}}class ud extends Iu{constructor(t){super(t)}load(t,e,n,i){const r=this,s=""===this.path?ld.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||s;const a=new zu(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,(function(n){let s=null;try{s=JSON.parse(n)}catch(e){return void 0!==i&&i(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}const a=s.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?r.parse(s,e):console.error("THREE.ObjectLoader: Can't load "+t)}),n,i)}async loadAsync(t,e){const n=""===this.path?ld.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||n;const i=new zu(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials);const r=await i.loadAsync(t,e),s=JSON.parse(r),a=s.metadata;if(void 0===a||void 0===a.type||"geometry"===a.type.toLowerCase())throw new Error("THREE.ObjectLoader: Can't load "+t);return await this.parseAsync(s)}parse(t,e){const n=this.parseAnimations(t.animations),i=this.parseShapes(t.shapes),r=this.parseGeometries(t.geometries,i),s=this.parseImages(t.images,(function(){void 0!==e&&e(l)})),a=this.parseTextures(t.textures,s),o=this.parseMaterials(t.materials,a),l=this.parseObject(t.object,r,o,a,n),c=this.parseSkeletons(t.skeletons,l);if(this.bindSkeletons(l,c),void 0!==e){let t=!1;for(const e in s)if(s[e]instanceof HTMLImageElement){t=!0;break}!1===t&&e(l)}return l}async parseAsync(t){const e=this.parseAnimations(t.animations),n=this.parseShapes(t.shapes),i=this.parseGeometries(t.geometries,n),r=await this.parseImagesAsync(t.images),s=this.parseTextures(t.textures,r),a=this.parseMaterials(t.materials,s),o=this.parseObject(t.object,i,a,s,e),l=this.parseSkeletons(t.skeletons,o);return this.bindSkeletons(o,l),o}parseShapes(t){const e={};if(void 0!==t)for(let n=0,i=t.length;n<i;n++){const i=(new gh).fromJSON(t[n]);e[i.uuid]=i}return e}parseSkeletons(t,e){const n={},i={};if(e.traverse((function(t){t.isBone&&(i[t.uuid]=t)})),void 0!==t)for(let e=0,r=t.length;e<r;e++){const r=(new hc).fromJSON(t[e],i);n[r.uuid]=r}return n}parseGeometries(t,e){const n={};if(void 0!==t){const i=new hd;for(let r=0,s=t.length;r<s;r++){let s;const a=t[r];switch(a.type){case"BufferGeometry":case"InstancedBufferGeometry":s=i.parse(a);break;case"Geometry":console.error("THREE.ObjectLoader: The legacy Geometry type is no longer supported.");break;default:a.type in ru?s=ru[a.type].fromJSON(a,e):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${a.type}"`)}s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),!0===s.isBufferGeometry&&void 0!==a.userData&&(s.userData=a.userData),n[a.uuid]=s}}return n}parseMaterials(t,e){const n={},i={};if(void 0!==t){const r=new od;r.setTextures(e);for(let e=0,s=t.length;e<s;e++){const s=t[e];if("MultiMaterial"===s.type){const t=[];for(let e=0;e<s.materials.length;e++){const i=s.materials[e];void 0===n[i.uuid]&&(n[i.uuid]=r.parse(i)),t.push(n[i.uuid])}i[s.uuid]=t}else void 0===n[s.uuid]&&(n[s.uuid]=r.parse(s)),i[s.uuid]=n[s.uuid]}}return i}parseAnimations(t){const e={};if(void 0!==t)for(let n=0;n<t.length;n++){const i=t[n],r=Lu.parse(i);e[r.uuid]=r}return e}parseImages(t,e){const n=this,i={};let r;function s(t){if("string"==typeof t){const e=t;return function(t){return n.manager.itemStart(t),r.load(t,(function(){n.manager.itemEnd(t)}),void 0,(function(){n.manager.itemError(t),n.manager.itemEnd(t)}))}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(e)?e:n.resourcePath+e)}return t.data?{data:Kn(t.type,t.data),width:t.width,height:t.height}:null}if(void 0!==t&&t.length>0){const n=new Pu(e);r=new Fu(n),r.setCrossOrigin(this.crossOrigin);for(let e=0,n=t.length;e<n;e++){const n=t[e],r=n.url;if(Array.isArray(r)){i[n.uuid]=[];for(let t=0,e=r.length;t<e;t++){const e=s(r[t]);null!==e&&(e instanceof HTMLImageElement?i[n.uuid].push(e):i[n.uuid].push(new oc(e.data,e.width,e.height)))}}else{const t=s(n.url);null!==t&&(i[n.uuid]=t)}}}return i}async parseImagesAsync(t){const e=this,n={};let i;async function r(t){if("string"==typeof t){const n=t,r=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(n)?n:e.resourcePath+n;return await i.loadAsync(r)}return t.data?{data:Kn(t.type,t.data),width:t.width,height:t.height}:null}if(void 0!==t&&t.length>0){i=new Fu(this.manager),i.setCrossOrigin(this.crossOrigin);for(let e=0,i=t.length;e<i;e++){const i=t[e],s=i.url;if(Array.isArray(s)){n[i.uuid]=[];for(let t=0,e=s.length;t<e;t++){const e=s[t],a=await r(e);null!==a&&(a instanceof HTMLImageElement?n[i.uuid].push(a):n[i.uuid].push(new oc(a.data,a.width,a.height)))}}else{const t=await r(i.url);null!==t&&(n[i.uuid]=t)}}}return n}parseTextures(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}const i={};if(void 0!==t)for(let r=0,s=t.length;r<s;r++){const s=t[r];let a;void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===e[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image);const o=e[s.image];Array.isArray(o)?(a=new Cs(o),6===o.length&&(a.needsUpdate=!0)):(a=o&&o.data?new oc(o.data,o.width,o.height):new ri(o),o&&(a.needsUpdate=!0)),a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),void 0!==s.mapping&&(a.mapping=n(s.mapping,dd)),void 0!==s.offset&&a.offset.fromArray(s.offset),void 0!==s.repeat&&a.repeat.fromArray(s.repeat),void 0!==s.center&&a.center.fromArray(s.center),void 0!==s.rotation&&(a.rotation=s.rotation),void 0!==s.wrap&&(a.wrapS=n(s.wrap[0],pd),a.wrapT=n(s.wrap[1],pd)),void 0!==s.format&&(a.format=s.format),void 0!==s.type&&(a.type=s.type),void 0!==s.encoding&&(a.encoding=s.encoding),void 0!==s.minFilter&&(a.minFilter=n(s.minFilter,md)),void 0!==s.magFilter&&(a.magFilter=n(s.magFilter,md)),void 0!==s.anisotropy&&(a.anisotropy=s.anisotropy),void 0!==s.flipY&&(a.flipY=s.flipY),void 0!==s.premultiplyAlpha&&(a.premultiplyAlpha=s.premultiplyAlpha),void 0!==s.unpackAlignment&&(a.unpackAlignment=s.unpackAlignment),void 0!==s.userData&&(a.userData=s.userData),i[s.uuid]=a}return i}parseObject(t,e,n,i,r){let s,a,o;function l(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function c(t){if(void 0!==t){if(Array.isArray(t)){const e=[];for(let i=0,r=t.length;i<r;i++){const r=t[i];void 0===n[r]&&console.warn("THREE.ObjectLoader: Undefined material",r),e.push(n[r])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}function h(t){return void 0===i[t]&&console.warn("THREE.ObjectLoader: Undefined texture",t),i[t]}switch(t.type){case"Scene":s=new Pl,void 0!==t.background&&(Number.isInteger(t.background)?s.background=new Ir(t.background):s.background=h(t.background)),void 0!==t.environment&&(s.environment=h(t.environment)),void 0!==t.fog&&("Fog"===t.fog.type?s.fog=new Cl(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(s.fog=new Rl(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":s=new As(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(s.focus=t.focus),void 0!==t.zoom&&(s.zoom=t.zoom),void 0!==t.filmGauge&&(s.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(s.filmOffset=t.filmOffset),void 0!==t.view&&(s.view=Object.assign({},t.view));break;case"OrthographicCamera":s=new Qs(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(s.zoom=t.zoom),void 0!==t.view&&(s.view=Object.assign({},t.view));break;case"AmbientLight":s=new id(t.color,t.intensity);break;case"DirectionalLight":s=new nd(t.color,t.intensity);break;case"PointLight":s=new td(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":s=new rd(t.color,t.intensity,t.width,t.height);break;case"SpotLight":s=new Zu(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":s=new Vu(t.color,t.groundColor,t.intensity);break;case"LightProbe":s=(new ad).fromJSON(t);break;case"SkinnedMesh":a=l(t.geometry),o=c(t.material),s=new sc(a,o),void 0!==t.bindMode&&(s.bindMode=t.bindMode),void 0!==t.bindMatrix&&s.bindMatrix.fromArray(t.bindMatrix),void 0!==t.skeleton&&(s.skeleton=t.skeleton);break;case"Mesh":a=l(t.geometry),o=c(t.material),s=new xs(a,o);break;case"InstancedMesh":a=l(t.geometry),o=c(t.material);const e=t.count,n=t.instanceMatrix,i=t.instanceColor;s=new gc(a,o,e),s.instanceMatrix=new uc(new Float32Array(n.array),16),void 0!==i&&(s.instanceColor=new uc(new Float32Array(i.array),i.itemSize));break;case"LOD":s=new $l;break;case"Line":s=new wc(l(t.geometry),c(t.material));break;case"LineLoop":s=new Ac(l(t.geometry),c(t.material));break;case"LineSegments":s=new Ec(l(t.geometry),c(t.material));break;case"PointCloud":case"Points":s=new Ic(l(t.geometry),c(t.material));break;case"Sprite":s=new Zl(c(t.material));break;case"Group":s=new Ml;break;case"Bone":s=new ac;break;default:s=new pr}if(s.uuid=t.uuid,void 0!==t.name&&(s.name=t.name),void 0!==t.matrix?(s.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(void 0!==t.position&&s.position.fromArray(t.position),void 0!==t.rotation&&s.rotation.fromArray(t.rotation),void 0!==t.quaternion&&s.quaternion.fromArray(t.quaternion),void 0!==t.scale&&s.scale.fromArray(t.scale)),void 0!==t.castShadow&&(s.castShadow=t.castShadow),void 0!==t.receiveShadow&&(s.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(s.shadow.bias=t.shadow.bias),void 0!==t.shadow.normalBias&&(s.shadow.normalBias=t.shadow.normalBias),void 0!==t.shadow.radius&&(s.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&s.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(s.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(s.visible=t.visible),void 0!==t.frustumCulled&&(s.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(s.renderOrder=t.renderOrder),void 0!==t.userData&&(s.userData=t.userData),void 0!==t.layers&&(s.layers.mask=t.layers),void 0!==t.children){const a=t.children;for(let t=0;t<a.length;t++)s.add(this.parseObject(a[t],e,n,i,r))}if(void 0!==t.animations){const e=t.animations;for(let t=0;t<e.length;t++){const n=e[t];s.animations.push(r[n])}}if("LOD"===t.type){void 0!==t.autoUpdate&&(s.autoUpdate=t.autoUpdate);const e=t.levels;for(let t=0;t<e.length;t++){const n=e[t],i=s.getObjectByProperty("uuid",n.object);void 0!==i&&s.addLevel(i,n.distance)}}return s}bindSkeletons(t,e){0!==Object.keys(e).length&&t.traverse((function(t){if(!0===t.isSkinnedMesh&&void 0!==t.skeleton){const n=e[t.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",t.skeleton):t.bind(n,t.bindMatrix)}}))}setTexturePath(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}const dd={UVMapping:rt,CubeReflectionMapping:st,CubeRefractionMapping:at,EquirectangularReflectionMapping:ot,EquirectangularRefractionMapping:lt,CubeUVReflectionMapping:ct,CubeUVRefractionMapping:ht},pd={RepeatWrapping:ut,ClampToEdgeWrapping:dt,MirroredRepeatWrapping:pt},md={NearestFilter:mt,NearestMipmapNearestFilter:ft,NearestMipmapLinearFilter:vt,LinearFilter:xt,LinearMipmapNearestFilter:_t,LinearMipmapLinearFilter:bt};class fd extends Iu{constructor(t){super(t),"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,s=Cu.get(t);if(void 0!==s)return r.manager.itemStart(t),setTimeout((function(){e&&e(s),r.manager.itemEnd(t)}),0),s;const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader,fetch(t,a).then((function(t){return t.blob()})).then((function(t){return createImageBitmap(t,Object.assign(r.options,{colorSpaceConversion:"none"}))})).then((function(n){Cu.add(t,n),e&&e(n),r.manager.itemEnd(t)})).catch((function(e){i&&i(e),r.manager.itemError(t),r.manager.itemEnd(t)})),r.manager.itemStart(t)}}let gd;fd.prototype.isImageBitmapLoader=!0;const vd={getContext:function(){return void 0===gd&&(gd=new(window.AudioContext||window.webkitAudioContext)),gd},setContext:function(t){gd=t}};class yd extends Iu{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new zu(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,(function(n){try{const t=n.slice(0);vd.getContext().decodeAudioData(t,(function(t){e(t)}))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}}),n,i)}}class xd extends ad{constructor(t,e,n=1){super(void 0,n);const i=(new Ir).set(t),r=(new Ir).set(e),s=new ui(i.r,i.g,i.b),a=new ui(r.r,r.g,r.b),o=Math.sqrt(Math.PI),l=o*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(a).multiplyScalar(o),this.sh.coefficients[1].copy(s).sub(a).multiplyScalar(l)}}xd.prototype.isHemisphereLightProbe=!0;class _d extends ad{constructor(t,e=1){super(void 0,e);const n=(new Ir).set(t);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}_d.prototype.isAmbientLightProbe=!0;const Md=new ki,bd=new ki,wd=new ki;class Sd{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new As,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new As,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){const e=this._cache;if(e.focus!==t.focus||e.fov!==t.fov||e.aspect!==t.aspect*this.aspect||e.near!==t.near||e.far!==t.far||e.zoom!==t.zoom||e.eyeSep!==this.eyeSep){e.focus=t.focus,e.fov=t.fov,e.aspect=t.aspect*this.aspect,e.near=t.near,e.far=t.far,e.zoom=t.zoom,e.eyeSep=this.eyeSep,wd.copy(t.projectionMatrix);const n=e.eyeSep/2,i=n*e.near/e.focus,r=e.near*Math.tan(Fn*e.fov*.5)/e.zoom;let s,a;bd.elements[12]=-n,Md.elements[12]=n,s=-r*e.aspect+i,a=r*e.aspect+i,wd.elements[0]=2*e.near/(a-s),wd.elements[8]=(a+s)/(a-s),this.cameraL.projectionMatrix.copy(wd),s=-r*e.aspect-i,a=r*e.aspect-i,wd.elements[0]=2*e.near/(a-s),wd.elements[8]=(a+s)/(a-s),this.cameraR.projectionMatrix.copy(wd)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(bd),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(Md)}}class Td{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Ed(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=Ed();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function Ed(){return("undefined"==typeof performance?Date:performance).now()}const Ad=new ui,Ld=new hi,Rd=new ui,Cd=new ui;class Pd extends pr{constructor(){super(),this.type="AudioListener",this.context=vd.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Td}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);const e=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Ad,Ld,Rd),Cd.set(0,0,-1).applyQuaternion(Ld),e.positionX){const t=this.context.currentTime+this.timeDelta;e.positionX.linearRampToValueAtTime(Ad.x,t),e.positionY.linearRampToValueAtTime(Ad.y,t),e.positionZ.linearRampToValueAtTime(Ad.z,t),e.forwardX.linearRampToValueAtTime(Cd.x,t),e.forwardY.linearRampToValueAtTime(Cd.y,t),e.forwardZ.linearRampToValueAtTime(Cd.z,t),e.upX.linearRampToValueAtTime(n.x,t),e.upY.linearRampToValueAtTime(n.y,t),e.upZ.linearRampToValueAtTime(n.z,t)}else e.setPosition(Ad.x,Ad.y,Ad.z),e.setOrientation(Cd.x,Cd.y,Cd.z,n.x,n.y,n.z)}}class Dd extends pr{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+t;const e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(t){return t||(t=[]),!0===this._connected?(this.disconnect(),this.filters=t.slice(),this.connect()):this.filters=t.slice(),this}setDetune(t){if(this.detune=t,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(t){return this.setFilters(t?[t]:[])}setPlaybackRate(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(t){return this.loopStart=t,this}setLoopEnd(t){return this.loopEnd=t,this}getVolume(){return this.gain.gain.value}setVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}const Id=new ui,Nd=new hi,zd=new ui,Od=new ui;class Bd extends Dd{constructor(t){super(t),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(t){return this.panner.refDistance=t,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(t){return this.panner.rolloffFactor=t,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(t){return this.panner.distanceModel=t,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(t){return this.panner.maxDistance=t,this}setDirectionalCone(t,e,n){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=n,this}updateMatrixWorld(t){if(super.updateMatrixWorld(t),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(Id,Nd,zd),Od.set(0,0,1).applyQuaternion(Nd);const e=this.panner;if(e.positionX){const t=this.context.currentTime+this.listener.timeDelta;e.positionX.linearRampToValueAtTime(Id.x,t),e.positionY.linearRampToValueAtTime(Id.y,t),e.positionZ.linearRampToValueAtTime(Id.z,t),e.orientationX.linearRampToValueAtTime(Od.x,t),e.orientationY.linearRampToValueAtTime(Od.y,t),e.orientationZ.linearRampToValueAtTime(Od.z,t)}else e.setPosition(Id.x,Id.y,Id.z),e.setOrientation(Od.x,Od.y,Od.z)}}class Fd{constructor(t,e=2048){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let t=0;const e=this.getFrequencyData();for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}}class Ud{constructor(t,e,n){let i,r,s;switch(this.binding=t,this.valueSize=n,e){case"quaternion":i=this._slerp,r=this._slerpAdditive,s=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":i=this._select,r=this._select,s=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:i=this._lerp,r=this._lerpAdditive,s=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=r,this._setIdentity=s,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(t,e){const n=this.buffer,i=this.valueSize,r=t*i+i;let s=this.cumulativeWeight;if(0===s){for(let t=0;t!==i;++t)n[r+t]=n[t];s=e}else{s+=e;const t=e/s;this._mixBufferRegion(n,r,0,t,i)}this.cumulativeWeight=s}accumulateAdditive(t){const e=this.buffer,n=this.valueSize,i=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(e,i,0,t,n),this.cumulativeWeightAdditive+=t}apply(t){const e=this.valueSize,n=this.buffer,i=t*e+e,r=this.cumulativeWeight,s=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r<1){const t=e*this._origIndex;this._mixBufferRegion(n,i,t,1-r,e)}s>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*e,1,e);for(let t=e,r=e+e;t!==r;++t)if(n[t]!==n[t+e]){a.setValue(n,i);break}}saveOriginalState(){const t=this.binding,e=this.buffer,n=this.valueSize,i=n*this._origIndex;t.getValue(e,i);for(let t=n,r=i;t!==r;++t)e[t]=e[i+t%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=3*this.valueSize;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let n=t;n<e;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const t=this._origIndex*this.valueSize,e=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[e+n]=this.buffer[t+n]}_select(t,e,n,i,r){if(i>=.5)for(let i=0;i!==r;++i)t[e+i]=t[n+i]}_slerp(t,e,n,i){hi.slerpFlat(t,e,t,e,t,n,i)}_slerpAdditive(t,e,n,i,r){const s=this._workIndex*r;hi.multiplyQuaternionsFlat(t,s,t,e,t,n),hi.slerpFlat(t,e,t,e,t,s,i)}_lerp(t,e,n,i,r){const s=1-i;for(let a=0;a!==r;++a){const r=e+a;t[r]=t[r]*s+t[n+a]*i}}_lerpAdditive(t,e,n,i,r){for(let s=0;s!==r;++s){const r=e+s;t[r]=t[r]+t[n+s]*i}}}const Hd=new RegExp("[\\[\\]\\.:\\/]","g"),Gd="[^\\[\\]\\.:\\/]",kd="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Vd=/((?:WC+[\/:])*)/.source.replace("WC",Gd),Wd=/(WCOD+)?/.source.replace("WCOD",kd),jd=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Gd),qd=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Gd),Xd=new RegExp("^"+Vd+Wd+jd+qd+"$"),Yd=["material","materials","bones"];class Zd{constructor(t,e,n){this.path=e,this.parsedPath=n||Zd.parseTrackName(e),this.node=Zd.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new Zd.Composite(t,e,n):new Zd(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Hd,"")}static parseTrackName(t){const e=Xd.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){const t=n.nodeName.substring(i+1);-1!==Yd.indexOf(t)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=t)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(!e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){const n=function(t){for(let i=0;i<t.length;i++){const r=t[i];if(r.name===e||r.uuid===e)return r;const s=n(r.children);if(s)return s}return null},i=n(t.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)t[e++]=n[i]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++]}_setValue_array_setNeedsUpdate(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node;const e=this.parsedPath,n=e.objectName,i=e.propertyName;let r=e.propertyIndex;if(t||(t=Zd.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let i=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(let e=0;e<t.length;e++)if(t[e].name===i){i=e;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==i){if(void 0===t[i])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[i]}}const s=t[i];if(void 0===s){const n=e.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+i+" but it wasn't found.",t)}let a=this.Versioning.None;this.targetObject=t,void 0!==t.needsUpdate?a=this.Versioning.NeedsUpdate:void 0!==t.matrixWorldNeedsUpdate&&(a=this.Versioning.MatrixWorldNeedsUpdate);let o=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===i){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!t.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==t.morphTargetDictionary[r]&&(r=t.morphTargetDictionary[r])}o=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=r}else void 0!==s.fromArray&&void 0!==s.toArray?(o=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(o=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=i;this.getValue=this.GetterByBindingType[o],this.setValue=this.SetterByBindingTypeAndVersioning[o][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Zd.Composite=class{constructor(t,e,n){const i=n||Zd.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];void 0!==i&&i.getValue(t,e)}setValue(t,e){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},Zd.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Zd.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Zd.prototype.GetterByBindingType=[Zd.prototype._getValue_direct,Zd.prototype._getValue_array,Zd.prototype._getValue_arrayElement,Zd.prototype._getValue_toArray],Zd.prototype.SetterByBindingTypeAndVersioning=[[Zd.prototype._setValue_direct,Zd.prototype._setValue_direct_setNeedsUpdate,Zd.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Zd.prototype._setValue_array,Zd.prototype._setValue_array_setNeedsUpdate,Zd.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Zd.prototype._setValue_arrayElement,Zd.prototype._setValue_arrayElement_setNeedsUpdate,Zd.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Zd.prototype._setValue_fromArray,Zd.prototype._setValue_fromArray_setNeedsUpdate,Zd.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class Jd{constructor(){this.uuid=Hn(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const t={};this._indicesByUUID=t;for(let e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const e=this;this.stats={objects:{get total(){return e._objects.length},get inUse(){return this.total-e.nCachedObjects_}},get bindingsPerObject(){return e._bindings.length}}}add(){const t=this._objects,e=this._indicesByUUID,n=this._paths,i=this._parsedPaths,r=this._bindings,s=r.length;let a,o=t.length,l=this.nCachedObjects_;for(let c=0,h=arguments.length;c!==h;++c){const h=arguments[c],u=h.uuid;let d=e[u];if(void 0===d){d=o++,e[u]=d,t.push(h);for(let t=0,e=s;t!==e;++t)r[t].push(new Zd(h,n[t],i[t]))}else if(d<l){a=t[d];const o=--l,c=t[o];e[c.uuid]=d,t[d]=c,e[u]=o,t[o]=h;for(let t=0,e=s;t!==e;++t){const e=r[t],s=e[o];let a=e[d];e[d]=s,void 0===a&&(a=new Zd(h,n[t],i[t])),e[o]=a}}else t[d]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_;for(let s=0,a=arguments.length;s!==a;++s){const a=arguments[s],o=a.uuid,l=e[o];if(void 0!==l&&l>=r){const s=r++,c=t[s];e[c.uuid]=l,t[l]=c,e[o]=s,t[s]=a;for(let t=0,e=i;t!==e;++t){const e=n[t],i=e[s],r=e[l];e[l]=i,e[s]=r}}}this.nCachedObjects_=r}uncache(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_,s=t.length;for(let a=0,o=arguments.length;a!==o;++a){const o=arguments[a].uuid,l=e[o];if(void 0!==l)if(delete e[o],l<r){const a=--r,o=t[a],c=--s,h=t[c];e[o.uuid]=l,t[l]=o,e[h.uuid]=a,t[a]=h,t.pop();for(let t=0,e=i;t!==e;++t){const e=n[t],i=e[a],r=e[c];e[l]=i,e[a]=r,e.pop()}}else{const r=--s,a=t[r];r>0&&(e[a.uuid]=l),t[l]=a,t.pop();for(let t=0,e=i;t!==e;++t){const e=n[t];e[l]=e[r],e.pop()}}}this.nCachedObjects_=r}subscribe_(t,e){const n=this._bindingsIndicesByPath;let i=n[t];const r=this._bindings;if(void 0!==i)return r[i];const s=this._paths,a=this._parsedPaths,o=this._objects,l=o.length,c=this.nCachedObjects_,h=new Array(l);i=r.length,n[t]=i,s.push(t),a.push(e),r.push(h);for(let n=c,i=o.length;n!==i;++n){const i=o[n];h[n]=new Zd(i,t,e)}return h}unsubscribe_(t){const e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){const i=this._paths,r=this._parsedPaths,s=this._bindings,a=s.length-1,o=s[a];e[t[a]]=n,s[n]=o,s.pop(),r[n]=r[a],r.pop(),i[n]=i[a],i.pop()}}}Jd.prototype.isAnimationObjectGroup=!0;class Qd{constructor(t,e,n=null,i=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=n,this.blendMode=i;const r=e.tracks,s=r.length,a=new Array(s),o={endingStart:ke,endingEnd:ke};for(let t=0;t!==s;++t){const e=r[t].createInterpolant(null);a[t]=e,e.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Be,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){const n=this._clip.duration,i=t._clip.duration,r=i/n,s=n/i;t.warp(1,r,e),this.warp(s,1,e)}return this}crossFadeTo(t,e,n){return t.crossFadeFrom(this,e,n)}stopFading(){const t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,n){const i=this._mixer,r=i.time,s=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const o=a.parameterPositions,l=a.sampleValues;return o[0]=r,o[1]=r+n,l[0]=t/s,l[1]=e/s,this}stopWarping(){const t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,n,i){if(!this.enabled)return void this._updateWeight(t);const r=this._startTime;if(null!==r){const i=(t-r)*n;if(i<0||0===n)return;this._startTime=null,e=n*i}e*=this._updateTimeScale(t);const s=this._updateTime(e),a=this._updateWeight(t);if(a>0){const t=this._interpolants,e=this._propertyBindings;if(this.blendMode===qe)for(let n=0,i=t.length;n!==i;++n)t[n].evaluate(s),e[n].accumulateAdditive(a);else for(let n=0,r=t.length;n!==r;++n)t[n].evaluate(s),e[n].accumulate(i,a)}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const n=this._weightInterpolant;if(null!==n){const i=n.evaluate(t)[0];e*=i,t>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const n=this._timeScaleInterpolant;null!==n&&(e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e))}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,n=this.loop;let i=this.time+t,r=this._loopCount;const s=n===Fe;if(0===t)return-1===r?i:s&&1==(1&r)?e-i:i;if(n===Oe){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(i>=e)i=e;else{if(!(i<0)){this.time=i;break t}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),i>=e||i<0){const n=Math.floor(i/e);i-=e*n,r+=Math.abs(n);const a=this.repetitions-r;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=t>0?e:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===a){const e=t<0;this._setEndings(e,!e,s)}else this._setEndings(!1,!1,s);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=i;if(s&&1==(1&r))return e-i}return i}_setEndings(t,e,n){const i=this._interpolantSettings;n?(i.endingStart=Ve,i.endingEnd=Ve):(i.endingStart=t?this.zeroSlopeAtStart?Ve:ke:We,i.endingEnd=e?this.zeroSlopeAtEnd?Ve:ke:We)}_scheduleFading(t,e,n){const i=this._mixer,r=i.time;let s=this._weightInterpolant;null===s&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,o=s.sampleValues;return a[0]=r,o[0]=e,a[1]=r+t,o[1]=n,this}}class Kd extends zn{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){const n=t._localRoot||this._root,i=t._clip.tracks,r=i.length,s=t._propertyBindings,a=t._interpolants,o=n.uuid,l=this._bindingsByRootAndName;let c=l[o];void 0===c&&(c={},l[o]=c);for(let t=0;t!==r;++t){const r=i[t],l=r.name;let h=c[l];if(void 0!==h)s[t]=h;else{if(h=s[t],void 0!==h){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,o,l));continue}const i=e&&e._propertyBindings[t].binding.parsedPath;h=new Ud(Zd.create(n,l,i),r.ValueTypeName,r.getValueSize()),++h.referenceCount,this._addInactiveBinding(h,o,l),s[t]=h}a[t].resultBuffer=h.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){const e=(t._localRoot||this._root).uuid,n=t._clip.uuid,i=this._actionsByClip[n];this._bindAction(t,i&&i.knownActions[0]),this._addInactiveAction(t,n,e)}const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return null!==e&&e<this._nActiveActions}_addInactiveAction(t,e,n){const i=this._actions,r=this._actionsByClip;let s=r[e];if(void 0===s)s={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,r[e]=s;else{const e=s.knownActions;t._byClipCacheIndex=e.length,e.push(t)}t._cacheIndex=i.length,i.push(t),s.actionByRoot[n]=t}_removeInactiveAction(t){const e=this._actions,n=e[e.length-1],i=t._cacheIndex;n._cacheIndex=i,e[i]=n,e.pop(),t._cacheIndex=null;const r=t._clip.uuid,s=this._actionsByClip,a=s[r],o=a.knownActions,l=o[o.length-1],c=t._byClipCacheIndex;l._byClipCacheIndex=c,o[c]=l,o.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===o.length&&delete s[r],this._removeInactiveBindingsForAction(t)}_removeInactiveBindingsForAction(t){const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(t){const e=this._actions,n=t._cacheIndex,i=this._nActiveActions++,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r}_takeBackAction(t){const e=this._actions,n=t._cacheIndex,i=--this._nActiveActions,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r}_addInactiveBinding(t,e,n){const i=this._bindingsByRootAndName,r=this._bindings;let s=i[e];void 0===s&&(s={},i[e]=s),s[n]=t,t._cacheIndex=r.length,r.push(t)}_removeInactiveBinding(t){const e=this._bindings,n=t.binding,i=n.rootNode.uuid,r=n.path,s=this._bindingsByRootAndName,a=s[i],o=e[e.length-1],l=t._cacheIndex;o._cacheIndex=l,e[l]=o,e.pop(),delete a[r],0===Object.keys(a).length&&delete s[i]}_lendBinding(t){const e=this._bindings,n=t._cacheIndex,i=this._nActiveBindings++,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r}_takeBackBinding(t){const e=this._bindings,n=t._cacheIndex,i=--this._nActiveBindings,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r}_lendControlInterpolant(){const t=this._controlInterpolants,e=this._nActiveControlInterpolants++;let n=t[e];return void 0===n&&(n=new yu(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=e,t[e]=n),n}_takeBackControlInterpolant(t){const e=this._controlInterpolants,n=t.__cacheIndex,i=--this._nActiveControlInterpolants,r=e[i];t.__cacheIndex=i,e[i]=t,r.__cacheIndex=n,e[n]=r}clipAction(t,e,n){const i=e||this._root,r=i.uuid;let s="string"==typeof t?Lu.findByName(i,t):t;const a=null!==s?s.uuid:t,o=this._actionsByClip[a];let l=null;if(void 0===n&&(n=null!==s?s.blendMode:je),void 0!==o){const t=o.actionByRoot[r];if(void 0!==t&&t.blendMode===n)return t;l=o.knownActions[0],null===s&&(s=l._clip)}if(null===s)return null;const c=new Qd(this,s,e,n);return this._bindAction(c,l),this._addInactiveAction(c,a,r),c}existingAction(t,e){const n=e||this._root,i=n.uuid,r="string"==typeof t?Lu.findByName(n,t):t,s=r?r.uuid:t,a=this._actionsByClip[s];return void 0!==a&&a.actionByRoot[i]||null}stopAllAction(){const t=this._actions;for(let e=this._nActiveActions-1;e>=0;--e)t[e].stop();return this}update(t){t*=this.timeScale;const e=this._actions,n=this._nActiveActions,i=this.time+=t,r=Math.sign(t),s=this._accuIndex^=1;for(let a=0;a!==n;++a)e[a]._update(i,t,r,s);const a=this._bindings,o=this._nActiveBindings;for(let t=0;t!==o;++t)a[t].apply(s);return this}setTime(t){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(t)}getRoot(){return this._root}uncacheClip(t){const e=this._actions,n=t.uuid,i=this._actionsByClip,r=i[n];if(void 0!==r){const t=r.knownActions;for(let n=0,i=t.length;n!==i;++n){const i=t[n];this._deactivateAction(i);const r=i._cacheIndex,s=e[e.length-1];i._cacheIndex=null,i._byClipCacheIndex=null,s._cacheIndex=r,e[r]=s,e.pop(),this._removeInactiveBindingsForAction(i)}delete i[n]}}uncacheRoot(t){const e=t.uuid,n=this._actionsByClip;for(const t in n){const i=n[t].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}const i=this._bindingsByRootAndName[e];if(void 0!==i)for(const t in i){const e=i[t];e.restoreOriginalState(),this._removeInactiveBinding(e)}}uncacheAction(t,e){const n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}Kd.prototype._controlInterpolantsResultBuffer=new Float32Array(1);class $d{constructor(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}clone(){return new $d(void 0===this.value.clone?this.value:this.value.clone())}}class tp extends Dl{constructor(t,e,n=1){super(t,e),this.meshPerAttribute=n}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}clone(t){const e=super.clone(t);return e.meshPerAttribute=this.meshPerAttribute,e}toJSON(t){const e=super.toJSON(t);return e.isInstancedInterleavedBuffer=!0,e.meshPerAttribute=this.meshPerAttribute,e}}tp.prototype.isInstancedInterleavedBuffer=!0;class ep{constructor(t,e,n,i,r){this.buffer=t,this.type=e,this.itemSize=n,this.elementSize=i,this.count=r,this.version=0}set needsUpdate(t){!0===t&&this.version++}setBuffer(t){return this.buffer=t,this}setType(t,e){return this.type=t,this.elementSize=e,this}setItemSize(t){return this.itemSize=t,this}setCount(t){return this.count=t,this}}ep.prototype.isGLBufferAttribute=!0;class np{constructor(t,e,n=0,i=1/0){this.ray=new Gi(t,e),this.near=n,this.far=i,this.camera=null,this.layers=new $i,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):console.error("THREE.Raycaster: Unsupported camera type: "+e.type)}intersectObject(t,e=!0,n=[]){return rp(t,this,n,e),n.sort(ip),n}intersectObjects(t,e=!0,n=[]){for(let i=0,r=t.length;i<r;i++)rp(t[i],this,n,e);return n.sort(ip),n}}function ip(t,e){return t.distance-e.distance}function rp(t,e,n,i){if(t.layers.test(e.layers)&&t.raycast(e,n),!0===i){const i=t.children;for(let t=0,r=i.length;t<r;t++)rp(i[t],e,n,!0)}}class sp{constructor(t=1,e=0,n=0){return this.radius=t,this.phi=e,this.theta=n,this}set(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this}makeSafe(){const t=1e-6;return this.phi=Math.max(t,Math.min(Math.PI-t,this.phi)),this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,n){return this.radius=Math.sqrt(t*t+e*e+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t,n),this.phi=Math.acos(Gn(e/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}class ap{constructor(t=1,e=0,n=0){return this.radius=t,this.theta=e,this.y=n,this}set(t,e,n){return this.radius=t,this.theta=e,this.y=n,this}copy(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,n){return this.radius=Math.sqrt(t*t+n*n),this.theta=Math.atan2(t,n),this.y=e,this}clone(){return(new this.constructor).copy(this)}}const op=new Yn;class lp{constructor(t=new Yn(1/0,1/0),e=new Yn(-1/0,-1/0)){this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=op.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(t){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return op.copy(t).clamp(this.min,this.max).sub(t).length()}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}lp.prototype.isBox2=!0;const cp=new ui,hp=new ui;class up{constructor(t=new ui,e=new ui){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){cp.subVectors(t,this.start),hp.subVectors(this.end,this.start);const n=hp.dot(hp);let i=hp.dot(cp)/n;return e&&(i=Gn(i,0,1)),i}closestPointToPoint(t,e,n){const i=this.closestPointToPointParameter(t,e);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const dp=new ui;class pp extends pr{constructor(t,e){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;const n=new es,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let t=0,e=1,n=32;t<n;t++,e++){const r=t/n*Math.PI*2,s=e/n*Math.PI*2;i.push(Math.cos(r),Math.sin(r),1,Math.cos(s),Math.sin(s),1)}n.setAttribute("position",new qr(i,3));const r=new vc({fog:!1,toneMapped:!1});this.cone=new Ec(n,r),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateMatrixWorld();const t=this.light.distance?this.light.distance:1e3,e=t*Math.tan(this.light.angle);this.cone.scale.set(e,e,t),dp.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(dp),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const mp=new ui,fp=new ki,gp=new ki;class vp extends Ec{constructor(t){const e=yp(t),n=new es,i=[],r=[],s=new Ir(0,0,1),a=new Ir(0,1,0);for(let t=0;t<e.length;t++){const n=e[t];n.parent&&n.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),r.push(s.r,s.g,s.b),r.push(a.r,a.g,a.b))}n.setAttribute("position",new qr(i,3)),n.setAttribute("color",new qr(r,3)),super(n,new vc({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(t){const e=this.bones,n=this.geometry,i=n.getAttribute("position");gp.copy(this.root.matrixWorld).invert();for(let t=0,n=0;t<e.length;t++){const r=e[t];r.parent&&r.parent.isBone&&(fp.multiplyMatrices(gp,r.matrixWorld),mp.setFromMatrixPosition(fp),i.setXYZ(n,mp.x,mp.y,mp.z),fp.multiplyMatrices(gp,r.parent.matrixWorld),mp.setFromMatrixPosition(fp),i.setXYZ(n+1,mp.x,mp.y,mp.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}}function yp(t){const e=[];t&&t.isBone&&e.push(t);for(let n=0;n<t.children.length;n++)e.push.apply(e,yp(t.children[n]));return e}class xp extends xs{constructor(t,e,n){super(new Qh(e,4,2),new Nr({wireframe:!0,fog:!1,toneMapped:!1})),this.light=t,this.light.updateMatrixWorld(),this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const _p=new ui,Mp=new Ir,bp=new Ir;class wp extends pr{constructor(t,e,n){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;const i=new Yh(e);i.rotateY(.5*Math.PI),this.material=new Nr({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const r=i.getAttribute("position"),s=new Float32Array(3*r.count);i.setAttribute("color",new Br(s,3)),this.add(new xs(i,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const t=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const e=t.geometry.getAttribute("color");Mp.copy(this.light.color),bp.copy(this.light.groundColor);for(let t=0,n=e.count;t<n;t++){const i=t<n/2?Mp:bp;e.setXYZ(t,i.r,i.g,i.b)}e.needsUpdate=!0}t.lookAt(_p.setFromMatrixPosition(this.light.matrixWorld).negate())}}class Sp extends Ec{constructor(t=10,e=10,n=4473924,i=8947848){n=new Ir(n),i=new Ir(i);const r=e/2,s=t/e,a=t/2,o=[],l=[];for(let t=0,c=0,h=-a;t<=e;t++,h+=s){o.push(-a,0,h,a,0,h),o.push(h,0,-a,h,0,a);const e=t===r?n:i;e.toArray(l,c),c+=3,e.toArray(l,c),c+=3,e.toArray(l,c),c+=3,e.toArray(l,c),c+=3}const c=new es;c.setAttribute("position",new qr(o,3)),c.setAttribute("color",new qr(l,3)),super(c,new vc({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}class Tp extends Ec{constructor(t=10,e=16,n=8,i=64,r=4473924,s=8947848){r=new Ir(r),s=new Ir(s);const a=[],o=[];for(let n=0;n<=e;n++){const i=n/e*(2*Math.PI),l=Math.sin(i)*t,c=Math.cos(i)*t;a.push(0,0,0),a.push(l,0,c);const h=1&n?r:s;o.push(h.r,h.g,h.b),o.push(h.r,h.g,h.b)}for(let e=0;e<=n;e++){const l=1&e?r:s,c=t-t/n*e;for(let t=0;t<i;t++){let e=t/i*(2*Math.PI),n=Math.sin(e)*c,r=Math.cos(e)*c;a.push(n,0,r),o.push(l.r,l.g,l.b),e=(t+1)/i*(2*Math.PI),n=Math.sin(e)*c,r=Math.cos(e)*c,a.push(n,0,r),o.push(l.r,l.g,l.b)}}const l=new es;l.setAttribute("position",new qr(a,3)),l.setAttribute("color",new qr(o,3)),super(l,new vc({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}}const Ep=new ui,Ap=new ui,Lp=new ui;class Rp extends pr{constructor(t,e,n){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);let i=new es;i.setAttribute("position",new qr([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));const r=new vc({fog:!1,toneMapped:!1});this.lightPlane=new wc(i,r),this.add(this.lightPlane),i=new es,i.setAttribute("position",new qr([0,0,0,0,0,1],3)),this.targetLine=new wc(i,r),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){Ep.setFromMatrixPosition(this.light.matrixWorld),Ap.setFromMatrixPosition(this.light.target.matrixWorld),Lp.subVectors(Ap,Ep),this.lightPlane.lookAt(Ap),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Ap),this.targetLine.scale.z=Lp.length()}}const Cp=new ui,Pp=new Es;class Dp extends Ec{constructor(t){const e=new es,n=new vc({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],r=[],s={},a=new Ir(16755200),o=new Ir(16711680),l=new Ir(43775),c=new Ir(16777215),h=new Ir(3355443);function u(t,e,n){d(t,n),d(e,n)}function d(t,e){i.push(0,0,0),r.push(e.r,e.g,e.b),void 0===s[t]&&(s[t]=[]),s[t].push(i.length/3-1)}u("n1","n2",a),u("n2","n4",a),u("n4","n3",a),u("n3","n1",a),u("f1","f2",a),u("f2","f4",a),u("f4","f3",a),u("f3","f1",a),u("n1","f1",a),u("n2","f2",a),u("n3","f3",a),u("n4","f4",a),u("p","n1",o),u("p","n2",o),u("p","n3",o),u("p","n4",o),u("u1","u2",l),u("u2","u3",l),u("u3","u1",l),u("c","t",c),u("p","c",h),u("cn1","cn2",h),u("cn3","cn4",h),u("cf1","cf2",h),u("cf3","cf4",h),e.setAttribute("position",new qr(i,3)),e.setAttribute("color",new qr(r,3)),super(e,n),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update()}update(){const t=this.geometry,e=this.pointMap;Pp.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Ip("c",e,t,Pp,0,0,-1),Ip("t",e,t,Pp,0,0,1),Ip("n1",e,t,Pp,-1,-1,-1),Ip("n2",e,t,Pp,1,-1,-1),Ip("n3",e,t,Pp,-1,1,-1),Ip("n4",e,t,Pp,1,1,-1),Ip("f1",e,t,Pp,-1,-1,1),Ip("f2",e,t,Pp,1,-1,1),Ip("f3",e,t,Pp,-1,1,1),Ip("f4",e,t,Pp,1,1,1),Ip("u1",e,t,Pp,.7,1.1,-1),Ip("u2",e,t,Pp,-.7,1.1,-1),Ip("u3",e,t,Pp,0,2,-1),Ip("cf1",e,t,Pp,-1,0,1),Ip("cf2",e,t,Pp,1,0,1),Ip("cf3",e,t,Pp,0,-1,1),Ip("cf4",e,t,Pp,0,1,1),Ip("cn1",e,t,Pp,-1,0,-1),Ip("cn2",e,t,Pp,1,0,-1),Ip("cn3",e,t,Pp,0,-1,-1),Ip("cn4",e,t,Pp,0,1,-1),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function Ip(t,e,n,i,r,s,a){Cp.set(r,s,a).unproject(i);const o=e[t];if(void 0!==o){const t=n.getAttribute("position");for(let e=0,n=o.length;e<n;e++)t.setXYZ(o[e],Cp.x,Cp.y,Cp.z)}}const Np=new mi;class zp extends Ec{constructor(t,e=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(24),r=new es;r.setIndex(new Br(n,1)),r.setAttribute("position",new Br(i,3)),super(r,new vc({color:e,toneMapped:!1})),this.object=t,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(t){if(void 0!==t&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&Np.setFromObject(this.object),Np.isEmpty())return;const e=Np.min,n=Np.max,i=this.geometry.attributes.position,r=i.array;r[0]=n.x,r[1]=n.y,r[2]=n.z,r[3]=e.x,r[4]=n.y,r[5]=n.z,r[6]=e.x,r[7]=e.y,r[8]=n.z,r[9]=n.x,r[10]=e.y,r[11]=n.z,r[12]=n.x,r[13]=n.y,r[14]=e.z,r[15]=e.x,r[16]=n.y,r[17]=e.z,r[18]=e.x,r[19]=e.y,r[20]=e.z,r[21]=n.x,r[22]=e.y,r[23]=e.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(t){return this.object=t,this.update(),this}copy(t){return Ec.prototype.copy.call(this,t),this.object=t.object,this}}class Op extends Ec{constructor(t,e=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new es;i.setIndex(new Br(n,1)),i.setAttribute("position",new qr([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(i,new vc({color:e,toneMapped:!1})),this.box=t,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(t){const e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(t))}}class Bp extends wc{constructor(t,e=1,n=16776960){const i=n,r=new es;r.setAttribute("position",new qr([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),r.computeBoundingSphere(),super(r,new vc({color:i,toneMapped:!1})),this.type="PlaneHelper",this.plane=t,this.size=e;const s=new es;s.setAttribute("position",new qr([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),s.computeBoundingSphere(),this.add(new xs(s,new Nr({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(t){let e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=e<0?f:m,this.lookAt(this.plane.normal),super.updateMatrixWorld(t)}}const Fp=new ui;let Up,Hp;class Gp extends pr{constructor(t=new ui(0,0,1),e=new ui(0,0,0),n=1,i=16776960,r=.2*n,s=.2*r){super(),this.type="ArrowHelper",void 0===Up&&(Up=new es,Up.setAttribute("position",new qr([0,0,0,0,1,0],3)),Hp=new Uc(0,.5,1,5,1),Hp.translate(0,-.5,0)),this.position.copy(e),this.line=new wc(Up,new vc({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new xs(Hp,new Nr({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,r,s)}setDirection(t){if(t.y>.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{Fp.set(t.z,0,-t.x).normalize();const e=Math.acos(t.y);this.quaternion.setFromAxisAngle(Fp,e)}}setLength(t,e=.2*t,n=.2*e){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}}class kp extends Ec{constructor(t=1){const e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new es;n.setAttribute("position",new qr(e,3)),n.setAttribute("color",new qr([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(n,new vc({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(t,e,n){const i=new Ir,r=this.geometry.attributes.color.array;return i.set(t),i.toArray(r,0),i.toArray(r,3),i.set(e),i.toArray(r,6),i.toArray(r,9),i.set(n),i.toArray(r,12),i.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Vp{constructor(){this.type="ShapePath",this.color=new Ir,this.subPaths=[],this.currentPath=null}moveTo(t,e){return this.currentPath=new fh,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath.lineTo(t,e),this}quadraticCurveTo(t,e,n,i){return this.currentPath.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,s){return this.currentPath.bezierCurveTo(t,e,n,i,r,s),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t,e){function n(t){const e=[];for(let n=0,i=t.length;n<i;n++){const i=t[n],r=new gh;r.curves=i.curves,e.push(r)}return e}function i(t,e){const n=e.length;let i=!1;for(let r=n-1,s=0;s<n;r=s++){let n=e[r],a=e[s],o=a.x-n.x,l=a.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=e[s],o=-o,a=e[r],l=-l),t.y<n.y||t.y>a.y)continue;if(t.y===n.y){if(t.x===n.x)return!0}else{const e=l*(t.x-n.x)-o*(t.y-n.y);if(0===e)return!0;if(e<0)continue;i=!i}}else{if(t.y!==n.y)continue;if(a.x<=t.x&&t.x<=n.x||n.x<=t.x&&t.x<=a.x)return!0}}return i}const r=Gh.isClockWise,s=this.subPaths;if(0===s.length)return[];if(!0===e)return n(s);let a,o,l;const c=[];if(1===s.length)return o=s[0],l=new gh,l.curves=o.curves,c.push(l),c;let h=!r(s[0].getPoints());h=t?!h:h;const u=[],d=[];let p,m,f=[],g=0;d[g]=void 0,f[g]=[];for(let e=0,n=s.length;e<n;e++)o=s[e],p=o.getPoints(),a=r(p),a=t?!a:a,a?(!h&&d[g]&&g++,d[g]={s:new gh,p},d[g].s.curves=o.curves,h&&g++,f[g]=[]):f[g].push({h:o,p:p[0]});if(!d[0])return n(s);if(d.length>1){let t=!1;const e=[];for(let t=0,e=d.length;t<e;t++)u[t]=[];for(let n=0,r=d.length;n<r;n++){const r=f[n];for(let s=0;s<r.length;s++){const a=r[s];let o=!0;for(let r=0;r<d.length;r++)i(a.p,d[r].p)&&(n!==r&&e.push({froms:n,tos:r,hole:s}),o?(o=!1,u[r].push(a)):t=!0);o&&u[n].push(a)}}e.length>0&&(t||(f=u))}for(let t=0,e=d.length;t<e;t++){l=d[t].s,c.push(l),m=f[t];for(let t=0,e=m.length;t<e;t++)l.holes.push(m[t].h)}return c}}const Wp=new Float32Array(1),jp=new Int32Array(Wp.buffer);class qp{static toHalfFloat(t){t>65504&&(console.warn("THREE.DataUtils.toHalfFloat(): value exceeds 65504."),t=65504),Wp[0]=t;const e=jp[0];let n=e>>16&32768,i=e>>12&2047;const r=e>>23&255;return r<103?n:r>142?(n|=31744,n|=(255==r?0:1)&&8388607&e,n):r<113?(i|=2048,n|=(i>>114-r)+(i>>113-r&1),n):(n|=r-112<<10|i>>1,n+=1&i,n)}}const Xp=0,Yp=1,Zp=0,Jp=1,Qp=2;function Kp(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function $p(t=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function tm(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new Ic(t,e)}function em(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Zl(t)}function nm(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new Ic(t,e)}function im(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Lc(t)}function rm(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Lc(t)}function sm(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Lc(t)}function am(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new ui(t,e,n)}function om(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new Br(t,e).setUsage(Tn)}function lm(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Fr(t,e)}function cm(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Ur(t,e)}function hm(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Hr(t,e)}function um(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Gr(t,e)}function dm(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new kr(t,e)}function pm(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new Vr(t,e)}function mm(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Wr(t,e)}function fm(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new qr(t,e)}function gm(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xr(t,e)}function vm(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new kp(t)}function ym(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new zp(t,e)}function xm(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ec(new Xc(t.geometry),new vc({color:void 0!==e?e:16777215}))}function _m(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ec(new nu(t.geometry),new vc({color:void 0!==e?e:16777215}))}function Mm(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new zu(t)}function bm(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Hu(t)}function wm(t,e,n){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Ps(t,n)}function Sm(){console.error("THREE.CanvasRenderer has been removed")}function Tm(){console.error("THREE.JSONLoader has been removed.")}Yc.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Yc.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},fh.prototype.fromPoints=function(t){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)},Sp.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},vp.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Iu.prototype.extractUrlBase=function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),ld.extractUrlBase(t)},Iu.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},lp.prototype.center=function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},lp.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},lp.prototype.isIntersectionBox=function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},lp.prototype.size=function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)},mi.prototype.center=function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},mi.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},mi.prototype.isIntersectionBox=function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},mi.prototype.isIntersectionSphere=function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},mi.prototype.size=function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)},Ii.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Fs.prototype.setFromMatrix=function(t){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(t)},up.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Zn.prototype.flattenToArrayOffset=function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},Zn.prototype.multiplyVector3=function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},Zn.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},Zn.prototype.applyToBufferAttribute=function(t){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},Zn.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},Zn.prototype.getInverse=function(t){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(t).invert()},ki.prototype.extractPosition=function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},ki.prototype.flattenToArrayOffset=function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},ki.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new ui).setFromMatrixColumn(this,3)},ki.prototype.setRotationFromQuaternion=function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},ki.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},ki.prototype.multiplyVector3=function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},ki.prototype.multiplyVector4=function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},ki.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},ki.prototype.rotateAxis=function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},ki.prototype.crossVector=function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},ki.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},ki.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},ki.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},ki.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},ki.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},ki.prototype.applyToBufferAttribute=function(t){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},ki.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},ki.prototype.makeFrustum=function(t,e,n,i,r,s){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,i,n,r,s)},ki.prototype.getInverse=function(t){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(t).invert()},zs.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},hi.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},hi.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},Gi.prototype.isIntersectionBox=function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},Gi.prototype.isIntersectionPlane=function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},Gi.prototype.isIntersectionSphere=function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},Sr.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},Sr.prototype.barycoordFromPoint=function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},Sr.prototype.midpoint=function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},Sr.prototypenormal=function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},Sr.prototype.plane=function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)},Sr.barycoordFromPoint=function(t,e,n,i,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Sr.getBarycoord(t,e,n,i,r)},Sr.normal=function(t,e,n,i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Sr.getNormal(t,e,n,i)},gh.prototype.extractAllPoints=function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},gh.prototype.extrude=function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Wh(this,t)},gh.prototype.makeGeometry=function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Jh(this,t)},Yn.prototype.fromAttribute=function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},Yn.prototype.distanceToManhattan=function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},Yn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},ui.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},ui.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},ui.prototype.getPositionFromMatrix=function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},ui.prototype.getScaleFromMatrix=function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},ui.prototype.getColumnFromMatrix=function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},ui.prototype.applyProjection=function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},ui.prototype.fromAttribute=function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},ui.prototype.distanceToManhattan=function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},ui.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},ai.prototype.fromAttribute=function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},ai.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},pr.prototype.getChildByName=function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},pr.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},pr.prototype.translate=function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},pr.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},pr.prototype.applyMatrix=function(t){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(t)},Object.defineProperties(pr.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),xs.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(xs.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),Xe},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),sc.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},As.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(ku.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Br.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Tn},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Tn)}}}),Br.prototype.setDynamic=function(t){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===t?Tn:Sn),this},Br.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Br.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},es.prototype.addIndex=function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},es.prototype.addAttribute=function(t,e){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):this.setAttribute(t,e):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(t,new Br(arguments[1],arguments[2])))},es.prototype.addDrawCall=function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},es.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},es.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},es.prototype.removeAttribute=function(t){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(t)},es.prototype.applyMatrix=function(t){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(t)},Object.defineProperties(es.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Dl.prototype.setDynamic=function(t){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===t?Tn:Sn),this},Dl.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Wh.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Wh.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Wh.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},Pl.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},$d.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(Er.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Ir}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===v}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(t){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=t}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}}),Object.defineProperties(Ts.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Al.prototype.clearTarget=function(t,e,n,i){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,n,i)},Al.prototype.animate=function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},Al.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},Al.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},Al.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},Al.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},Al.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},Al.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},Al.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},Al.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},Al.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},Al.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},Al.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},Al.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},Al.prototype.enableScissorTest=function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},Al.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},Al.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},Al.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},Al.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},Al.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},Al.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},Al.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},Al.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},Al.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},Al.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(Al.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(t){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===t?Qe:Je}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(gl.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(oi.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Dd.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const e=this;return(new yd).load(t,(function(t){e.setBuffer(t)})),this},Fd.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Rs.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},Rs.prototype.clear=function(t,e,n,i){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(t,e,n,i)},ni.crossOrigin=void 0,ni.loadTexture=function(t,e,n,i){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const r=new Gu;r.setCrossOrigin(this.crossOrigin);const s=r.load(t,n,void 0,i);return e&&(s.mapping=e),s},ni.loadTextureCube=function(t,e,n,i){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const r=new Uu;r.setCrossOrigin(this.crossOrigin);const s=r.load(t,n,void 0,i);return e&&(s.mapping=e),s},ni.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},ni.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};const Em={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function Am(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}function Lm(){return console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),new es}function Rm(){return console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),new es}function Cm(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function Pm(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function Dm(){console.error("THREE.ImmediateRenderObject has been removed.")}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:i}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=i)}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,n),s.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t=n(212);const e={type:"change"},i={type:"start"},r={type:"end"};class s extends t.EventDispatcher{constructor(n,s){super(),void 0===s&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),s===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=n,this.domElement=s,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new t.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:t.MOUSE.ROTATE,MIDDLE:t.MOUSE.DOLLY,RIGHT:t.MOUSE.PAN},this.touches={ONE:t.TOUCH.ROTATE,TWO:t.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return h.phi},this.getAzimuthalAngle=function(){return h.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(t){t.addEventListener("keydown",X),this._domElementKeyEvents=t},this.saveState=function(){a.target0.copy(a.target),a.position0.copy(a.object.position),a.zoom0=a.object.zoom},this.reset=function(){a.target.copy(a.target0),a.object.position.copy(a.position0),a.object.zoom=a.zoom0,a.object.updateProjectionMatrix(),a.dispatchEvent(e),a.update(),l=o.NONE},this.update=function(){const i=new t.Vector3,r=(new t.Quaternion).setFromUnitVectors(n.up,new t.Vector3(0,1,0)),s=r.clone().invert(),f=new t.Vector3,g=new t.Quaternion,v=2*Math.PI;return function(){const t=a.object.position;i.copy(t).sub(a.target),i.applyQuaternion(r),h.setFromVector3(i),a.autoRotate&&l===o.NONE&&A(2*Math.PI/60/60*a.autoRotateSpeed),a.enableDamping?(h.theta+=u.theta*a.dampingFactor,h.phi+=u.phi*a.dampingFactor):(h.theta+=u.theta,h.phi+=u.phi);let n=a.minAzimuthAngle,y=a.maxAzimuthAngle;return isFinite(n)&&isFinite(y)&&(n<-Math.PI?n+=v:n>Math.PI&&(n-=v),y<-Math.PI?y+=v:y>Math.PI&&(y-=v),h.theta=n<=y?Math.max(n,Math.min(y,h.theta)):h.theta>(n+y)/2?Math.max(n,h.theta):Math.min(y,h.theta)),h.phi=Math.max(a.minPolarAngle,Math.min(a.maxPolarAngle,h.phi)),h.makeSafe(),h.radius*=d,h.radius=Math.max(a.minDistance,Math.min(a.maxDistance,h.radius)),!0===a.enableDamping?a.target.addScaledVector(p,a.dampingFactor):a.target.add(p),i.setFromSpherical(h),i.applyQuaternion(s),t.copy(a.target).add(i),a.object.lookAt(a.target),!0===a.enableDamping?(u.theta*=1-a.dampingFactor,u.phi*=1-a.dampingFactor,p.multiplyScalar(1-a.dampingFactor)):(u.set(0,0,0),p.set(0,0,0)),d=1,!!(m||f.distanceToSquared(a.object.position)>c||8*(1-g.dot(a.object.quaternion))>c)&&(a.dispatchEvent(e),f.copy(a.object.position),g.copy(a.object.quaternion),m=!1,!0)}}(),this.dispose=function(){a.domElement.removeEventListener("contextmenu",Y),a.domElement.removeEventListener("pointerdown",k),a.domElement.removeEventListener("pointercancel",j),a.domElement.removeEventListener("wheel",q),a.domElement.removeEventListener("pointermove",V),a.domElement.removeEventListener("pointerup",W),null!==a._domElementKeyEvents&&a._domElementKeyEvents.removeEventListener("keydown",X)};const a=this,o={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=o.NONE;const c=1e-6,h=new t.Spherical,u=new t.Spherical;let d=1;const p=new t.Vector3;let m=!1;const f=new t.Vector2,g=new t.Vector2,v=new t.Vector2,y=new t.Vector2,x=new t.Vector2,_=new t.Vector2,M=new t.Vector2,b=new t.Vector2,w=new t.Vector2,S=[],T={};function E(){return Math.pow(.95,a.zoomSpeed)}function A(t){u.theta-=t}function L(t){u.phi-=t}const R=function(){const e=new t.Vector3;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),p.add(e)}}(),C=function(){const e=new t.Vector3;return function(t,n){!0===a.screenSpacePanning?e.setFromMatrixColumn(n,1):(e.setFromMatrixColumn(n,0),e.crossVectors(a.object.up,e)),e.multiplyScalar(t),p.add(e)}}(),P=function(){const e=new t.Vector3;return function(t,n){const i=a.domElement;if(a.object.isPerspectiveCamera){const r=a.object.position;e.copy(r).sub(a.target);let s=e.length();s*=Math.tan(a.object.fov/2*Math.PI/180),R(2*t*s/i.clientHeight,a.object.matrix),C(2*n*s/i.clientHeight,a.object.matrix)}else a.object.isOrthographicCamera?(R(t*(a.object.right-a.object.left)/a.object.zoom/i.clientWidth,a.object.matrix),C(n*(a.object.top-a.object.bottom)/a.object.zoom/i.clientHeight,a.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),a.enablePan=!1)}}();function D(t){a.object.isPerspectiveCamera?d/=t:a.object.isOrthographicCamera?(a.object.zoom=Math.max(a.minZoom,Math.min(a.maxZoom,a.object.zoom*t)),a.object.updateProjectionMatrix(),m=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),a.enableZoom=!1)}function I(t){a.object.isPerspectiveCamera?d*=t:a.object.isOrthographicCamera?(a.object.zoom=Math.max(a.minZoom,Math.min(a.maxZoom,a.object.zoom/t)),a.object.updateProjectionMatrix(),m=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),a.enableZoom=!1)}function N(t){f.set(t.clientX,t.clientY)}function z(t){y.set(t.clientX,t.clientY)}function O(){if(1===S.length)f.set(S[0].pageX,S[0].pageY);else{const t=.5*(S[0].pageX+S[1].pageX),e=.5*(S[0].pageY+S[1].pageY);f.set(t,e)}}function B(){if(1===S.length)y.set(S[0].pageX,S[0].pageY);else{const t=.5*(S[0].pageX+S[1].pageX),e=.5*(S[0].pageY+S[1].pageY);y.set(t,e)}}function F(){const t=S[0].pageX-S[1].pageX,e=S[0].pageY-S[1].pageY,n=Math.sqrt(t*t+e*e);M.set(0,n)}function U(t){if(1==S.length)g.set(t.pageX,t.pageY);else{const e=Q(t),n=.5*(t.pageX+e.x),i=.5*(t.pageY+e.y);g.set(n,i)}v.subVectors(g,f).multiplyScalar(a.rotateSpeed);const e=a.domElement;A(2*Math.PI*v.x/e.clientHeight),L(2*Math.PI*v.y/e.clientHeight),f.copy(g)}function H(t){if(1===S.length)x.set(t.pageX,t.pageY);else{const e=Q(t),n=.5*(t.pageX+e.x),i=.5*(t.pageY+e.y);x.set(n,i)}_.subVectors(x,y).multiplyScalar(a.panSpeed),P(_.x,_.y),y.copy(x)}function G(t){const e=Q(t),n=t.pageX-e.x,i=t.pageY-e.y,r=Math.sqrt(n*n+i*i);b.set(0,r),w.set(0,Math.pow(b.y/M.y,a.zoomSpeed)),D(w.y),M.copy(b)}function k(e){!1!==a.enabled&&(0===S.length&&(a.domElement.setPointerCapture(e.pointerId),a.domElement.addEventListener("pointermove",V),a.domElement.addEventListener("pointerup",W)),function(t){S.push(t)}(e),"touch"===e.pointerType?function(e){switch(J(e),S.length){case 1:switch(a.touches.ONE){case t.TOUCH.ROTATE:if(!1===a.enableRotate)return;O(),l=o.TOUCH_ROTATE;break;case t.TOUCH.PAN:if(!1===a.enablePan)return;B(),l=o.TOUCH_PAN;break;default:l=o.NONE}break;case 2:switch(a.touches.TWO){case t.TOUCH.DOLLY_PAN:if(!1===a.enableZoom&&!1===a.enablePan)return;a.enableZoom&&F(),a.enablePan&&B(),l=o.TOUCH_DOLLY_PAN;break;case t.TOUCH.DOLLY_ROTATE:if(!1===a.enableZoom&&!1===a.enableRotate)return;a.enableZoom&&F(),a.enableRotate&&O(),l=o.TOUCH_DOLLY_ROTATE;break;default:l=o.NONE}break;default:l=o.NONE}l!==o.NONE&&a.dispatchEvent(i)}(e):function(e){let n;switch(e.button){case 0:n=a.mouseButtons.LEFT;break;case 1:n=a.mouseButtons.MIDDLE;break;case 2:n=a.mouseButtons.RIGHT;break;default:n=-1}switch(n){case t.MOUSE.DOLLY:if(!1===a.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(e),l=o.DOLLY;break;case t.MOUSE.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===a.enablePan)return;z(e),l=o.PAN}else{if(!1===a.enableRotate)return;N(e),l=o.ROTATE}break;case t.MOUSE.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===a.enableRotate)return;N(e),l=o.ROTATE}else{if(!1===a.enablePan)return;z(e),l=o.PAN}break;default:l=o.NONE}l!==o.NONE&&a.dispatchEvent(i)}(e))}function V(t){!1!==a.enabled&&("touch"===t.pointerType?function(t){switch(J(t),l){case o.TOUCH_ROTATE:if(!1===a.enableRotate)return;U(t),a.update();break;case o.TOUCH_PAN:if(!1===a.enablePan)return;H(t),a.update();break;case o.TOUCH_DOLLY_PAN:if(!1===a.enableZoom&&!1===a.enablePan)return;!function(t){a.enableZoom&&G(t),a.enablePan&&H(t)}(t),a.update();break;case o.TOUCH_DOLLY_ROTATE:if(!1===a.enableZoom&&!1===a.enableRotate)return;!function(t){a.enableZoom&&G(t),a.enableRotate&&U(t)}(t),a.update();break;default:l=o.NONE}}(t):function(t){if(!1!==a.enabled)switch(l){case o.ROTATE:if(!1===a.enableRotate)return;!function(t){g.set(t.clientX,t.clientY),v.subVectors(g,f).multiplyScalar(a.rotateSpeed);const e=a.domElement;A(2*Math.PI*v.x/e.clientHeight),L(2*Math.PI*v.y/e.clientHeight),f.copy(g),a.update()}(t);break;case o.DOLLY:if(!1===a.enableZoom)return;!function(t){b.set(t.clientX,t.clientY),w.subVectors(b,M),w.y>0?D(E()):w.y<0&&I(E()),M.copy(b),a.update()}(t);break;case o.PAN:if(!1===a.enablePan)return;!function(t){x.set(t.clientX,t.clientY),_.subVectors(x,y).multiplyScalar(a.panSpeed),P(_.x,_.y),y.copy(x),a.update()}(t)}}(t))}function W(t){Z(t),0===S.length&&(a.domElement.releasePointerCapture(t.pointerId),a.domElement.removeEventListener("pointermove",V),a.domElement.removeEventListener("pointerup",W)),a.dispatchEvent(r),l=o.NONE}function j(t){Z(t)}function q(t){!1!==a.enabled&&!1!==a.enableZoom&&l===o.NONE&&(t.preventDefault(),a.dispatchEvent(i),function(t){t.deltaY<0?I(E()):t.deltaY>0&&D(E()),a.update()}(t),a.dispatchEvent(r))}function X(t){!1!==a.enabled&&!1!==a.enablePan&&function(t){let e=!1;switch(t.code){case a.keys.UP:P(0,a.keyPanSpeed),e=!0;break;case a.keys.BOTTOM:P(0,-a.keyPanSpeed),e=!0;break;case a.keys.LEFT:P(a.keyPanSpeed,0),e=!0;break;case a.keys.RIGHT:P(-a.keyPanSpeed,0),e=!0}e&&(t.preventDefault(),a.update())}(t)}function Y(t){!1!==a.enabled&&t.preventDefault()}function Z(t){delete T[t.pointerId];for(let e=0;e<S.length;e++)if(S[e].pointerId==t.pointerId)return void S.splice(e,1)}function J(e){let n=T[e.pointerId];void 0===n&&(n=new t.Vector2,T[e.pointerId]=n),n.set(e.pageX,e.pageY)}function Q(t){const e=t.pointerId===S[0].pointerId?S[1]:S[0];return T[e.pointerId]}a.domElement.addEventListener("contextmenu",Y),a.domElement.addEventListener("pointerdown",k),a.domElement.addEventListener("pointercancel",j),a.domElement.addEventListener("wheel",q,{passive:!1}),this.update()}}const a=n(212);var o=[],l=[],c=[],h=[],u=[],d=[],p=new a.Scene,m=new a.PerspectiveCamera(55,window.innerWidth/window.innerHeight,.1,500);m.position.x=40,m.position.y=40,m.position.z=40,m.lookAt(p.position);var f=new a.WebGLRenderer;new s(m,f.domElement).addEventListener("change",(function(){f.render(p,m)})),f.setClearColor(0),f.setSize(window.innerWidth,window.innerHeight),f.shadowMap.enabled=!0,f.shadowMapSoft=!0,f.render(p,m);var g=new a.AxesHelper(30),v=new a.GridHelper(50,50),y=(new a.Color("rgb(255,0,0)"),new a.BoxGeometry(6,6,6)),x=new a.MeshLambertMaterial({color:16724736}),_=new a.Mesh(y,x);_.position.x=0,_.position.y=3,_.position.z=0,_.castShadow=!0;var M=new a.Mesh(y,x);M.position.x=13,M.position.y=3,M.position.z=13,M.castShadow=!0;var b=new a.PlaneGeometry(50,50,50),w=new a.MeshLambertMaterial({color:16777215}),S=new a.Mesh(b,w);S.rotation.x=-.5*Math.PI,S.receiveShadow=!0;var T=new a.SpotLight(16777215);T.castShadow=!0,T.position.set(15,30,50),p.add(T,v,g,_,M,S),f.render(p,m);let E=document.createElement("div");E.id="coords",document.body.appendChild(E);let A=document.createElement("div");document.body.appendChild(A).appendChild(f.domElement);var L,R=document.getElementById("webGL-container");function C(t,e,n,i){return Math.sqrt(Math.pow(e-t,2)+Math.pow(i-n,2))}function P(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n];return e}console.log(R),L=[],window.addEventListener("mousemove",(function(t){var e=new a.Vector3,n=new a.Vector3;e.set(t.clientX/window.innerWidth*2-1,-t.clientY/window.innerHeight*2+1,.5),e.unproject(m),e.sub(m.position);var i=m.position.y/e.y;n.copy(m.position).add(e.multiplyScalar(i));var r=m.position.x-e.x,s=m.position.z-e.z;document.getElementById("coords").innerHTML=`Press the 'Alt'/'Option' Key + Mouse Left-click to draw a sphere on a plane\n or the 'Shift' Key + Mouse Left-click to delete the last sphere drawn.\n The coordinates of the plane are: x: ${r.toFixed(1)}, y: ${s.toFixed(1)}. \n The length of the drawn line(s) is: ${P(h)}\n The square of the drawn triangle(s) is: ${P(d)}`,L.push({x:r.toFixed(1),z:s.toFixed(1)})})),window.addEventListener("click",(function(t){if(t.altKey){var e=new a.Vector3,n=new a.Vector3;e.set(event.clientX/window.innerWidth*2-1,-event.clientY/window.innerHeight*2+1,0),e.unproject(m),e.sub(m.position);var i=m.position.y/e.y;n.copy(m.position).add(e.multiplyScalar(i));var r=m.position.x-e.x,s=m.position.z-e.z,g=new a.SphereBufferGeometry(.2,12,8),v=new a.Mesh(g,x);if(v.position.x=r,v.position.y=.01,v.position.z=s,p.add(v),o.push(v.id),l.push({X:r,Z:s}),o.length>1){const t=[];t.push(new a.Vector3(r,.01,s)),t.push(new a.Vector3(l[l.length-2].X,.01,l[l.length-2].Z));const e=(new a.BufferGeometry).setFromPoints(t),n=new a.Line(e);let i=C(r,l[l.length-2].X,l[l.length-2].Z,s);h.push(parseFloat(i.toFixed(1))),p.add(n),c.push(n.id)}if(o.length>2){let t=new a.BufferGeometry;var y=new Float32Array([r,.01,s,l[l.length-2].X,.01,l[l.length-2].Z,l[0].X,.01,l[0].Z]),_=new a.MeshLambertMaterial({color:16724736});t.setAttribute("position",new a.BufferAttribute(y,3));var M=new a.Mesh(t,_);p.add(M);let e=function(t,e,n){let i=(t+e+n)/2;return Math.sqrt(i*(i-t)*(i-e)*(i-n))}(h[h.length-1],h[h.length-2],C(r,l[0].X,l[0].Z,s));d.push(parseFloat(e.toFixed(1))),u.push(M.id)}f.render(p,m)}else t.shiftKey&&(p.remove(p.getObjectById(o[o.length-1])),o.length>1&&(p.remove(p.getObjectById(c[c.length-1])),c.pop(),h.pop()),o.length>2&&(p.remove(p.getObjectById(u[u.length-1])),u.pop(),d.pop()),o.pop(),f.render(p,m))}))})()})();
import SimplePagination from 'ember-simple-pagination/components/simple-pagination'; export default SimplePagination;
var app = new Vue({ el: '#app', data: { pageInfo:'', pageNum:1, }, mounted(){ console.log('View mounted'); //进行赋值 this.searchAdministrator(); }, methods:{ handlePageChange(val){ console.log('page change') this.pageNum = val; this.searchAdministrator(); }, searchAdministrator(){ axios.get('http://localhost:8080/administrator/search', { params: { pageNum:this.pageNum, pageInfo:this.pageInfo } }) .then(function (response) { console.log(response); app.pageInfo = response.data; }) .catch(function (error) { console.log(error); }); }, handleDelete(index, row) { console.log('delete click'); if (confirm("确认删除?")) { administratorId = row.administratorId this.deleteAdministrator(administratorId); console.log(row.administratorId) } }, deleteAdministrator(administratorId){ axios.post('/administrator/delete',administratorId,{ headers: { 'Content-Type': 'application/json' } }).then(function (response) { console.log(response) alert('删除成功') location.reload(); }).catch(function (error) { console.log(error) }) } } })