mixdashboards 1.0.46 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EChartComponentBase-TG0PZTZo.js → EChartComponentBase-CafVdj74.js} +1 -1
- package/dist/{EChartComponentBase-DeKOQiqR.cjs → EChartComponentBase-Dz5E-lyI.cjs} +1 -1
- package/dist/{UniverSheet-Bsz5NLGD.cjs → UniverSheet-BqLvs6V6.cjs} +1 -1
- package/dist/{UniverSheet-C76r5Cx_.js → UniverSheet-CH1YywcZ.js} +2 -2
- package/dist/{accelerationChart-DZy0h91Y.cjs → accelerationChart-BWRlw5-L.cjs} +1 -1
- package/dist/{accelerationChart-DPtrq3IC.js → accelerationChart-V4UmpPse.js} +3 -3
- package/dist/{actionItem-CZYUuFSs.js → actionItem-CBwfWvTO.js} +3 -3
- package/dist/{actionItem-RZQss2hZ.cjs → actionItem-Dsg6qYSp.cjs} +1 -1
- package/dist/{alarmLevelChart-CZ-EDSds.js → alarmLevelChart-CnKEZZZv.js} +2 -2
- package/dist/{alarmLevelChart-CX98nXiH.cjs → alarmLevelChart-DN8hyTdg.cjs} +1 -1
- package/dist/{alertTable-CcpZ4bqL.js → alertTable-BluC1smp.js} +2 -2
- package/dist/{alertTable-DZCw97ZE.cjs → alertTable-CdkiAZIu.cjs} +1 -1
- package/dist/{annualRainfallChart-DBTNbgQw.cjs → annualRainfallChart-BeenDSmW.cjs} +1 -1
- package/dist/{annualRainfallChart-DCBkHNka.js → annualRainfallChart-COeieHTg.js} +2 -2
- package/dist/{api-D-aFsy-8.js → api-Cyx2Fha0.js} +6 -6
- package/dist/{api-B2SQ6Grb.cjs → api-nw_9niqv.cjs} +1 -1
- package/dist/{aqi-DQ2WBeIk.cjs → aqi-BXtF-SsB.cjs} +1 -1
- package/dist/{aqi-BXOJaqb0.js → aqi-naf_yg1B.js} +3 -3
- package/dist/{aqiIndass-djb9lzcz.js → aqiIndass-CiHVV6y-.js} +2 -2
- package/dist/{aqiIndass-CnvN_7Jo.cjs → aqiIndass-YO0txxEM.cjs} +1 -1
- package/dist/{arrayCard-CMFsIZa2.js → arrayCard-CPtHFB--.js} +2 -2
- package/dist/{arrayCard-CosM4EnW.cjs → arrayCard-USJyzspe.cjs} +1 -1
- package/dist/{audio-DsKp0CFs.js → audio-7HMku35Z.js} +4 -4
- package/dist/{audio-OHsfqvJi.cjs → audio-Uz_XIJyA.cjs} +1 -1
- package/dist/{bar-CLlUcZIv.js → bar-Bq_RDVaa.js} +4 -4
- package/dist/{bar-CWMXYmbx.cjs → bar-CSideFNS.cjs} +1 -1
- package/dist/{bmp-Db1IZGQ6.js → bmp-BF-OdMoW.js} +3 -3
- package/dist/{bmp-C6MzP_fu.cjs → bmp-DZ9_aKMT.cjs} +1 -1
- package/dist/{box-iiimGZC1.cjs → box-C1n5r8hT.cjs} +1 -1
- package/dist/{box-CkUuh1FU.js → box-DfqNW1B6.js} +2 -2
- package/dist/{chartConfigPanel-CuNbjfch.js → chartConfigPanel-8wROQoL0.js} +1 -1
- package/dist/{chartConfigPanel-BJyh0Ave.cjs → chartConfigPanel-C62JqDqE.cjs} +1 -1
- package/dist/{circleBar-C6ywvfm2.js → circleBar-C54UQvaf.js} +3 -3
- package/dist/{circleBar-DsMw9g82.cjs → circleBar-UrV2_yVK.cjs} +1 -1
- package/dist/{clock-BhSzNknP.js → clock-CbebZdlU.js} +2 -2
- package/dist/{clock-CWGuAN9x.cjs → clock-DgkEPumE.cjs} +1 -1
- package/dist/{clt-BOttsVNK.js → clt-B32D8bK9.js} +3 -3
- package/dist/{clt-DYyapWeR.cjs → clt-DWBynZO1.cjs} +1 -1
- package/dist/{cmc-D9UyANKc.cjs → cmc-BVrFcoih.cjs} +1 -1
- package/dist/{cmc-B9gxw6sh.js → cmc-CC-6njzU.js} +3 -3
- package/dist/{cmp-BFrV5jSb.js → cmp-BCvtkNwO.js} +3 -3
- package/dist/{cmp-DAc39qLc.cjs → cmp-D6aHhSC6.cjs} +1 -1
- package/dist/{composite-BfKavIJr.js → composite-CWYjAAsg.js} +3 -3
- package/dist/{composite-BHzmM-OO.cjs → composite-kODICk08.cjs} +1 -1
- package/dist/{controlList-XUZ_Fx9y.cjs → controlList-BXvCyR2L.cjs} +1 -1
- package/dist/{controlList-r2nXktPm.js → controlList-zYX8DbNE.js} +3 -3
- package/dist/{controlRecordList-CmVccf66.js → controlRecordList-Bc2M0iyo.js} +3 -3
- package/dist/{controlRecordList-BILWtzDj.cjs → controlRecordList-Dly5aorA.cjs} +1 -1
- package/dist/{crd-CLqvR_LG.cjs → crd--3Oj3Y1t.cjs} +1 -1
- package/dist/{crd-DiLWNxMi.js → crd-CoB00gS6.js} +2 -2
- package/dist/{ctrBtn-rLKuJD66.cjs → ctrBtn-BusKAhHv.cjs} +1 -1
- package/dist/{ctrBtn-72EmD_wM.js → ctrBtn-CUADz_pu.js} +4 -4
- package/dist/{ctrSet-D4hV0S7s.js → ctrSet-BKVsejze.js} +4 -4
- package/dist/{ctrSet-CnwD1SWD.cjs → ctrSet-C0R2aIby.cjs} +1 -1
- package/dist/{ctrSwitch-DRigj-w8.js → ctrSwitch-BqRBh40z.js} +4 -4
- package/dist/{ctrSwitch-C-QgHHx7.cjs → ctrSwitch-uIqQRKaq.cjs} +1 -1
- package/dist/{dataManagement-DFVmsjB2.cjs → dataManagement-BdP1iSeC.cjs} +1 -1
- package/dist/{dataManagement-DTF6mGxC.js → dataManagement-C6jHI7-1.js} +2 -2
- package/dist/{dataReport-Cs9TA1DY.js → dataReport-C2XWn_Xv.js} +2 -2
- package/dist/{dataReport-jzBxSjPI.cjs → dataReport-DNPD3MZl.cjs} +1 -1
- package/dist/{dataTable-DCaVtvoR.js → dataTable-5bUrqBWz.js} +1 -1
- package/dist/{dataTable-CdslrSSS.cjs → dataTable-BvlEs83r.cjs} +1 -1
- package/dist/{datetime-B3qmWLRU.cjs → datetime-CE5wsyi7.cjs} +1 -1
- package/dist/{datetime-CNXXIp4R.js → datetime-Dp8mPzSO.js} +2 -2
- package/dist/{deepClusterSlipSurface-XVe2bCYi.cjs → deepClusterSlipSurface-BinAmtCz.cjs} +1 -1
- package/dist/{deepClusterSlipSurface-g_jkWPqQ.js → deepClusterSlipSurface-D_7LRpHz.js} +3 -3
- package/dist/{deepDataMatrix-DaB52kt2.js → deepDataMatrix-BXTJm6UD.js} +2 -2
- package/dist/{deepDataMatrix-Dgjcg3T1.cjs → deepDataMatrix-t6axw0An.cjs} +1 -1
- package/dist/{deepDisplacement3D-b-spVbsO.cjs → deepDisplacement3D-BRutQ6Ut.cjs} +1 -1
- package/dist/{deepDisplacement3D-vt_Guztk.js → deepDisplacement3D-Cy-FIGAq.js} +3 -3
- package/dist/{deepDisplacementChart-CAv4Sdto.js → deepDisplacementChart---DgDx8L.js} +2 -2
- package/dist/{deepDisplacementChart-n0ohcudf.js → deepDisplacementChart-BWVcNgaX.js} +4 -4
- package/dist/{deepDisplacementChart-CRaOG8qO.cjs → deepDisplacementChart-DboPezyJ.cjs} +1 -1
- package/dist/{deepDisplacementChart-CDxZotFV.cjs → deepDisplacementChart-eD2GOxML.cjs} +1 -1
- package/dist/{deepDisplacementView-U14jbyjh.cjs → deepDisplacementView-BNVTS7Ar.cjs} +1 -1
- package/dist/{deepDisplacementView-CDglUkBG.js → deepDisplacementView-CHFgG2wy.js} +1 -1
- package/dist/{deepNodeTemperatureChart-C05hEqn2.cjs → deepNodeTemperatureChart-CpJI7axl.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-BJ-l3Hh4.js → deepNodeTemperatureChart-N1z-KMmu.js} +3 -3
- package/dist/{deepTangentAngleChart-AVtK89yY.js → deepTangentAngleChart-ClnxPvUM.js} +3 -3
- package/dist/{deepTangentAngleChart-CugBnvGA.cjs → deepTangentAngleChart-DxB4EaWm.cjs} +1 -1
- package/dist/{deepTemperatureField-Be5krEbX.js → deepTemperatureField-DT7iyND9.js} +3 -3
- package/dist/{deepTemperatureField-8PEC3aMO.cjs → deepTemperatureField-DWO8Dcjh.cjs} +1 -1
- package/dist/{deepTrendChart-B0d1XV-N.js → deepTrendChart-C7_BfEiR.js} +3 -3
- package/dist/{deepTrendChart-Ddyg0UTz.cjs → deepTrendChart-D9uQKgck.cjs} +1 -1
- package/dist/{deviceOnlineStatus-Xl_eRoNv.cjs → deviceOnlineStatus-BA7D5fbt.cjs} +1 -1
- package/dist/{deviceOnlineStatus-BJcJ1e90.js → deviceOnlineStatus-DlrB6EXN.js} +2 -2
- package/dist/{deviceStatus-C5iyz9I5.js → deviceStatus-aPf8MflS.js} +2 -2
- package/dist/{deviceStatus-ChZG-veh.cjs → deviceStatus-mDl8zF_Z.cjs} +1 -1
- package/dist/{displacementDataTable-CgyDuMND.cjs → displacementDataTable-Co4In07D.cjs} +1 -1
- package/dist/{displacementDataTable-6W7oiNA2.js → displacementDataTable-Da1xkiXG.js} +2 -2
- package/dist/{displacementTrajectoryChart-BrI5aqgb.js → displacementTrajectoryChart-B85ad8vc.js} +3 -3
- package/dist/{displacementTrajectoryChart-CYFN_qlA.cjs → displacementTrajectoryChart-FPrvrbUa.cjs} +1 -1
- package/dist/{displacementTrendChart-D684-4fl.js → displacementTrendChart-BRxIsjeK.js} +2 -2
- package/dist/{displacementTrendChart-SmIkZHAd.cjs → displacementTrendChart-DcBu8-_Z.cjs} +1 -1
- package/dist/{dxf-BhMMlOFA.cjs → dxf-EDkdonhJ.cjs} +1 -1
- package/dist/{dxf-DasdKf-L.js → dxf-FrPSVW4C.js} +4 -4
- package/dist/{dzc-DcsgkZr8.cjs → dzc-BBijV6-m.cjs} +1 -1
- package/dist/{dzc-BIROZZJB.js → dzc-BOaL7miE.js} +3 -3
- package/dist/{element-resize-detector-TyLBpj37.js → element-resize-detector-BCRzpPES.js} +4 -4
- package/dist/{element-resize-detector-DgDXXuXN.cjs → element-resize-detector-DYs3pJPp.cjs} +1 -1
- package/dist/{evn-FSQEbiRq.cjs → evn-CAWNNpK2.cjs} +1 -1
- package/dist/{evn-CenVx17K.js → evn-T-0VLXht.js} +2 -2
- package/dist/{evolutionChart-CW_R8CIf.cjs → evolutionChart-B8vzbfrk.cjs} +1 -1
- package/dist/{evolutionChart-Bd-eesT_.js → evolutionChart-DYf3V-rl.js} +3 -3
- package/dist/{fileViewer-qT2NPp-v.js → fileViewer-BRVwWDA3.js} +4 -4
- package/dist/{fileViewer-DdoytC3d.cjs → fileViewer-D6rC0YFY.cjs} +1 -1
- package/dist/{filterBar-Dm_JtTcQ.cjs → filterBar-B3Ka4jw8.cjs} +1 -1
- package/dist/{filterBar-BMnR6Xfx.js → filterBar-hfIbyNh_.js} +2 -2
- package/dist/{fireCombustionCurve-G0epy0wK.js → fireCombustionCurve-D1wKpm4i.js} +2 -2
- package/dist/{fireCombustionCurve-NBX7Acgh.cjs → fireCombustionCurve-DKQJzKh2.cjs} +1 -1
- package/dist/{fireFilterBar-DYL2nWLE.js → fireFilterBar-Bl0iCn48.js} +2 -2
- package/dist/{fireFilterBar-BYlmE5ci.cjs → fireFilterBar-D8TTM4KM.cjs} +1 -1
- package/dist/{gag-C05Z9f_L.js → gag-Vt7-rYYR.js} +2 -2
- package/dist/{gag-D3X96Dzo.cjs → gag-dKpxHBTV.cjs} +1 -1
- package/dist/gasStationList-BDRHTLvR.js +1139 -0
- package/dist/gasStationList-g4AUNuxi.cjs +1 -0
- package/dist/{glbModel-CDxmAYW2.cjs → glbModel-BCgQzSz1.cjs} +1 -1
- package/dist/{glbModel-DgI_-LDx.js → glbModel-BpnMbHQe.js} +2 -2
- package/dist/{gnssFilterBar-G_sQM7dF.cjs → gnssFilterBar-BgS-JH3k.cjs} +1 -1
- package/dist/{gnssFilterBar-COfJi8BR.js → gnssFilterBar-CaGGhgEk.js} +2 -2
- package/dist/{gnssHistoryTable-5R4nW-km.cjs → gnssHistoryTable-Bkt4Zvxa.cjs} +1 -1
- package/dist/{gnssHistoryTable-2Ut7WneP.js → gnssHistoryTable-CGY1ROb6.js} +3 -3
- package/dist/{gnssMapView-Cd98VXJW.js → gnssMapView-C4-pk-1_.js} +2 -2
- package/dist/{gnssMapView-DzQDOAw_.cjs → gnssMapView-DuNotJym.cjs} +1 -1
- package/dist/{gnssTimeSeriesChart-D33JIgkn.js → gnssTimeSeriesChart-MZbERhu9.js} +4 -4
- package/dist/{gnssTimeSeriesChart-CO1nBVys.cjs → gnssTimeSeriesChart-y7L6j_y5.cjs} +1 -1
- package/dist/{gnssXYTrajectory-BOaOmJRw.js → gnssXYTrajectory-DL8WWe1C.js} +3 -3
- package/dist/{gnssXYTrajectory-Dmp3XDMu.cjs → gnssXYTrajectory-DZFjqFPv.cjs} +1 -1
- package/dist/{grd-Vuu9wxuk.js → grd-BgaxrUfI.js} +3 -3
- package/dist/{grd-B0Lm3mx8.cjs → grd-DNJ1rlwR.cjs} +1 -1
- package/dist/{grdIndass-CNHq3HNl.js → grdIndass-Bxf2L3J5.js} +3 -3
- package/dist/{grdIndass-HRTwKlrE.cjs → grdIndass-DlwlkKKH.cjs} +1 -1
- package/dist/{grg-DvZc1CJA.js → grg-78Sh9Nr7.js} +2 -2
- package/dist/{grg-BnEbbjAE.cjs → grg-CmxBlYJ6.cjs} +1 -1
- package/dist/{gridview-D07swS4S.js → gridview-BWe_qLy-.js} +2 -2
- package/dist/{gridview-CeqfXCAW.cjs → gridview-FFx-3wNz.cjs} +1 -1
- package/dist/{groupCard-DZiMSqFu.js → groupCard-B2ORsgUN.js} +2 -2
- package/dist/{groupCard-Dd0oSF9Y.cjs → groupCard-BOqERSM4.cjs} +1 -1
- package/dist/{headerBar-B5bPjkQm.js → headerBar-DPlPX8uD.js} +3 -3
- package/dist/{headerBar-i9XS8orQ.cjs → headerBar-o2J2Dqkd.cjs} +1 -1
- package/dist/{history-Bujk3UXC.cjs → history-5W6pGCPq.cjs} +1 -1
- package/dist/{history-BoYz0EKE.js → history-DH68UK_U.js} +3 -3
- package/dist/{index-6FluFNdL.js → index-LgTfdmT4.js} +1713 -1654
- package/dist/{index-Bl0Sti1q.cjs → index-ZwyqrmaH.cjs} +7 -7
- package/dist/{insarDeformChart-AhDCJz4X.js → insarDeformChart-9Qss0VGu.js} +2 -2
- package/dist/{insarDeformChart-BkddwI9H.cjs → insarDeformChart-BTwU5ktS.cjs} +1 -1
- package/dist/{insarImageViewer-COlURKDe.cjs → insarImageViewer-B-ExpEa8.cjs} +1 -1
- package/dist/{insarImageViewer-QIiWJ4YY.js → insarImageViewer-C7aTZp-m.js} +2 -2
- package/dist/{kds-CGOLaPzp.cjs → kds-8n-a2GhL.cjs} +1 -1
- package/dist/{kds-mcElYFvi.js → kds-CS7G3BaQ.js} +2 -2
- package/dist/{layerTabs-zbohWxOQ.cjs → layerTabs-1lOAiEhu.cjs} +1 -1
- package/dist/{layerTabs-CMXHY5dJ.js → layerTabs-pJJzTbu9.js} +2 -2
- package/dist/{lin-4mRXWZQ7.js → lin-Bk49Db_G.js} +3 -3
- package/dist/{lin-D7gY5yNq.cjs → lin-IHxWU55I.cjs} +1 -1
- package/dist/{linIndass-CsO_bJMF.cjs → linIndass-Cpf8pnLn.cjs} +1 -1
- package/dist/{linIndass-c-eIWnQj.js → linIndass-Drxnj7KQ.js} +2 -2
- package/dist/{lst-CTNSs5YF.js → lst-CL6bmgJ2.js} +2 -2
- package/dist/{lst-mpnwUH_T.cjs → lst-CPd37vza.cjs} +1 -1
- package/dist/{manualEntry-DvPBV5mH.cjs → manualEntry-CcCE4O6Q.cjs} +1 -1
- package/dist/{manualEntry-CYnBHnGm.js → manualEntry-D_doLqqH.js} +2 -2
- package/dist/{mapBackground-CRXo1BJb.js → mapBackground-CvLXKuJx.js} +2 -2
- package/dist/{mapBackground-CIjA2Wug.cjs → mapBackground-DEBggmVp.cjs} +1 -1
- package/dist/{mappingList-DeMPPwP-.js → mappingList-BZODl4t5.js} +3 -3
- package/dist/{mappingList-BFkGypRf.cjs → mappingList-qKR-0uhY.cjs} +1 -1
- package/dist/{markdownViewer-DLQOO6m3.js → markdownViewer-CtN6ailN.js} +4 -4
- package/dist/{markdownViewer-By7BT09t.cjs → markdownViewer-DZ8gvoHk.cjs} +1 -1
- package/dist/{mix-control-modal-F98hs7pY.js → mix-control-modal-BlWtiePl.js} +6 -6
- package/dist/{mix-control-modal-BUunV3Do.cjs → mix-control-modal-zbr85DkZ.cjs} +1 -1
- package/dist/{mixDataPermission-C_c6JH5n.js → mixDataPermission-C-Cu3_y0.js} +62 -38
- package/dist/mixDataPermission-Gcl_4czp.cjs +1 -0
- package/dist/{mixGrid-DM59mHBg.js → mixGrid-DJQ2jXcg.js} +3 -3
- package/dist/{mixGrid-BKS3ZD07.cjs → mixGrid-Dh9y_kW0.cjs} +1 -1
- package/dist/{mixMap-CuR0n8gM.js → mixMap-2REwmqmi.js} +3 -3
- package/dist/{mixMap-Bcy278fS.cjs → mixMap-BRnDOkNF.cjs} +1 -1
- package/dist/{mixModel-gLIYW3eq.cjs → mixModel-C1CKMCLi.cjs} +1 -1
- package/dist/{mixModel-DwMxRrdS.js → mixModel-CHtF97xc.js} +3 -3
- package/dist/{mixPie-Dh8icXmM.js → mixPie-DwDffWz5.js} +3 -3
- package/dist/{mixPie-CofNsTkf.cjs → mixPie-sD-AjwaC.cjs} +1 -1
- package/dist/mixdashboards.cjs +1 -1
- package/dist/mixdashboards.css +1 -1
- package/dist/mixdashboards.js +2 -2
- package/dist/{mjpegCamera-Dy7J6ggq.js → mjpegCamera-Dbfd7eUC.js} +2 -2
- package/dist/{mjpegCamera-CLIYwXQn.cjs → mjpegCamera-RMS_dnv0.cjs} +1 -1
- package/dist/{monitorAlert-CVZ6lbb9.cjs → monitorAlert-CjIQQ6fQ.cjs} +1 -1
- package/dist/{monitorAlert-CPPyTf9W.js → monitorAlert-DagV3vuc.js} +2 -2
- package/dist/{monitorData-B5g_dKEM.js → monitorData-CTkeA21g.js} +3 -3
- package/dist/{monitorData-S1k1GyfC.cjs → monitorData-DUansNO5.cjs} +1 -1
- package/dist/{monitorSpeedChart-CNPAWp5P.js → monitorSpeedChart-BFnREZYZ.js} +1 -1
- package/dist/{monitorSpeedChart-D94G8rpt.cjs → monitorSpeedChart-CjfFqWon.cjs} +1 -1
- package/dist/{mxa-DlUmY7vc.js → mxa-B6ezKf-C.js} +3 -3
- package/dist/{mxa-B7OUHl3H.cjs → mxa-CN6zXgZA.cjs} +1 -1
- package/dist/{myValue-D7Ufft97.cjs → myValue-BG_jI_HT.cjs} +1 -1
- package/dist/{myValue-O-if52RW.js → myValue-C08vYRJC.js} +2 -2
- package/dist/{myValueList-BLdGgMNf.js → myValueList-BKVL_kPb.js} +2 -2
- package/dist/{myValueList-C0iXTN51.cjs → myValueList-Bwg3XCPF.cjs} +1 -1
- package/dist/{objectList-C-Z_KNYu.cjs → objectList-FArM7oEM.cjs} +1 -1
- package/dist/{objectList-DMEp2Ec2.js → objectList-emtQyLbD.js} +4 -4
- package/dist/{photo-DXKeQKg-.cjs → photo-B9Veb_Am.cjs} +1 -1
- package/dist/{photo-1Q-LV4S6.js → photo-DXbQg_FJ.js} +4 -4
- package/dist/{pie-l-XgaxNm.js → pie-DZzf2lL7.js} +3 -3
- package/dist/{pie-DpBeMxOY.cjs → pie-U9hOnFzz.cjs} +1 -1
- package/dist/{pressBtn-BYsOLnTQ.cjs → pressBtn-BNr1R0gW.cjs} +1 -1
- package/dist/{pressBtn-BMjo291P.js → pressBtn-R5Wsj-Jw.js} +4 -4
- package/dist/{progressBar-TUgp2Sqo.cjs → progressBar-CUSoF6f0.cjs} +1 -1
- package/dist/{progressBar-C-lI1grv.js → progressBar-sLfJICdr.js} +2 -2
- package/dist/{progressCircle-Cj608C04.cjs → progressCircle-B6P8B-t_.cjs} +1 -1
- package/dist/{progressCircle-BnqzofPx.js → progressCircle-BZgPxs_q.js} +2 -2
- package/dist/{qrcode-D9dNH9vU.js → qrcode-C96PznAO.js} +2 -2
- package/dist/{qrcode-C9adRPR_.cjs → qrcode-DMrNxgq5.cjs} +1 -1
- package/dist/{raceBar-CDihtH4v.cjs → raceBar-BTExTEsZ.cjs} +1 -1
- package/dist/{raceBar-DIXDtvsv.js → raceBar-Dryx8Onl.js} +3 -3
- package/dist/{rad-OvE-8smk.cjs → rad-DpkIOKs_.cjs} +1 -1
- package/dist/{rad-DQe3jFyE.js → rad-vw4O2ByZ.js} +2 -2
- package/dist/{rainfallFilterBar-CeSh7hox.js → rainfallFilterBar-BjAWqKtM.js} +2 -2
- package/dist/{rainfallFilterBar-B_-w8OLn.cjs → rainfallFilterBar-CH3abw6C.cjs} +1 -1
- package/dist/{rainfallTimeCurve-Bw-EvxqW.js → rainfallTimeCurve-BPDZGrlQ.js} +3 -3
- package/dist/{rainfallTimeCurve-R7dXpzfD.cjs → rainfallTimeCurve-oJUJ2mt7.cjs} +1 -1
- package/dist/{rangeLin-CNq5TzGl.js → rangeLin-BFFy57TT.js} +2 -2
- package/dist/{rangeLin-D_vfu7Vl.cjs → rangeLin-CBqKAU0P.cjs} +1 -1
- package/dist/{request-Dsf-00lN.cjs → request-BcQP_dWt.cjs} +1 -1
- package/dist/{request-DK0rMmUu.js → request-jIo7FwQD.js} +1 -1
- package/dist/{retainer1-DboHt57L.cjs → retainer1-CfcwA39J.cjs} +1 -1
- package/dist/{retainer1-CCRpQQSy.js → retainer1-goSPppQ-.js} +3 -3
- package/dist/{retainer2-Dr2UghmE.js → retainer2-BHdnsKrO.js} +3 -3
- package/dist/{retainer2-B3-gMMte.cjs → retainer2-DwQmFU10.cjs} +1 -1
- package/dist/{riskRegionTable-BxdpPFB6.js → riskRegionTable-B8-f5xx-.js} +2 -2
- package/dist/{riskRegionTable-CNnPQ095.cjs → riskRegionTable-CSJpPxPB.cjs} +1 -1
- package/dist/{sankey-DcC1efNM.js → sankey-C0gaE3HM.js} +3 -3
- package/dist/{sankey-FYco7g_2.cjs → sankey-DXCBHb16.cjs} +1 -1
- package/dist/{scd-BheeDpvi.cjs → scd-CkEHu7nZ.cjs} +1 -1
- package/dist/{scd-CR0CAnRi.js → scd-Cwyft2g6.js} +2 -2
- package/dist/{sideMenu-Bl0XOcvy.js → sideMenu-BtVCCKw9.js} +2 -2
- package/dist/{sideMenu-B9lmUGxB.cjs → sideMenu-DUdDDJ9K.cjs} +1 -1
- package/dist/{slopeStability-_tr0tCib.cjs → slopeStability-Byb6AKti.cjs} +1 -1
- package/dist/{slopeStability-D06Uk1mk.js → slopeStability-DwxDXTQG.js} +3 -3
- package/dist/{speedCurve-B94L4i7L.js → speedCurve-BuNsy-ev.js} +3 -3
- package/dist/{speedCurve-BMPLz2jy.cjs → speedCurve-DArreweP.cjs} +1 -1
- package/dist/{staticLine-DP0PebQH.cjs → staticLine-C50p0CZs.cjs} +1 -1
- package/dist/{staticLine-Cxifytvx.js → staticLine-DfkpF6ZW.js} +3 -3
- package/dist/{store-CruxVoZn.cjs → store-ByTYoqyI.cjs} +1 -1
- package/dist/{store-BNMaBpkH.js → store-D_TrU3nw.js} +2 -2
- package/dist/{swiper-BcjC_n8G.js → swiper-CQiRByJd.js} +2 -2
- package/dist/{swiper-CEdQi4ty.cjs → swiper-L0Oo2dYD.cjs} +1 -1
- package/dist/{terminalConfigList-CVxRf5LT.js → terminalConfigList-BhmfFm4f.js} +3 -3
- package/dist/{terminalConfigList-B1kML8wV.cjs → terminalConfigList-ChC43Bwq.cjs} +1 -1
- package/dist/{terminalList-1gtqry00.cjs → terminalList-BQModRyk.cjs} +1 -1
- package/dist/{terminalList-DUUmgww1.js → terminalList-C6tswBt1.js} +3 -3
- package/dist/{textbox-CJ1flXNU.cjs → textbox-CSuiDl8k.cjs} +1 -1
- package/dist/{textbox-CVmK4iJd.js → textbox-CgOhFsYo.js} +3 -3
- package/dist/{timeQueryBar-CN9ZGqZq.cjs → timeQueryBar-BtCXHgrg.cjs} +1 -1
- package/dist/{timeQueryBar-Bjyih9xd.js → timeQueryBar-QEg1Flg9.js} +1 -1
- package/dist/{timeSeries-CNLxndUy.js → timeSeries-B7NgbHfJ.js} +4 -4
- package/dist/{timeSeries-BBbMEI-q.cjs → timeSeries-DMINp9Fr.cjs} +1 -1
- package/dist/{timeSeriesCurve-CJmlFnU8.js → timeSeriesCurve-DEY5KQvu.js} +3 -3
- package/dist/{timeSeriesCurve-BHnBdeuj.cjs → timeSeriesCurve-wC9wHGI4.cjs} +1 -1
- package/dist/{toggleBtn-U7VXzxfO.js → toggleBtn-Brtfu0-e.js} +3 -3
- package/dist/{toggleBtn-EYDDVVYC.cjs → toggleBtn-DO953U-q.cjs} +1 -1
- package/dist/{trajectoryConfigPanel-Bwum3Ph2.js → trajectoryConfigPanel-BDdP3SdV.js} +1 -1
- package/dist/{trajectoryConfigPanel-C77oQQwR.cjs → trajectoryConfigPanel-Bl_o9h2e.cjs} +1 -1
- package/dist/{trajectoryScatter-B976mD6u.js → trajectoryScatter-7-lJ5SMe.js} +3 -3
- package/dist/{trajectoryScatter-CGi6DYqO.cjs → trajectoryScatter-DVm5ljvY.cjs} +1 -1
- package/dist/{universalConfigPanel-BJRWyOgc.cjs → universalConfigPanel-Cm4TfqAK.cjs} +1 -1
- package/dist/{universalConfigPanel-DvuVl6gK.js → universalConfigPanel-DTLFrGXs.js} +1 -1
- package/dist/{universalTable-B3lAKXqg.cjs → universalTable-Bl9x3wEx.cjs} +1 -1
- package/dist/{universalTable-4JaNkC2D.js → universalTable-CCFr-GKz.js} +2 -2
- package/dist/{video-BILoWN-c.cjs → video-DObKrYkw.cjs} +1 -1
- package/dist/{video-D1uDxAKr.js → video-gqqvz5Ge.js} +4 -4
- package/dist/{videoMonitor-B3pdRJDb.cjs → videoMonitor-B_Ur25fz.cjs} +1 -1
- package/dist/{videoMonitor-DRV_4ckZ.js → videoMonitor-CGMHzNdh.js} +2 -2
- package/dist/{vlu-Bhy4cwbq.js → vlu-6DSf0haZ.js} +2 -2
- package/dist/{vlu-CLzdnzdR.cjs → vlu-Dbj9euY_.cjs} +1 -1
- package/dist/{weather-CMxX1ynV.cjs → weather-BsIBTn7G.cjs} +1 -1
- package/dist/{weather-CO-BqAO2.js → weather-CQBxQBld.js} +2 -2
- package/dist/{windLin-BzCuvNwJ.js → windLin-KIVk9hOD.js} +2 -2
- package/dist/{windLin-D7BSeKLl.cjs → windLin-jVF-rhIx.cjs} +1 -1
- package/package.json +1 -1
- package/dist/gasStationList-BGTIcN9t.js +0 -984
- package/dist/gasStationList-DE4iLKqq.cjs +0 -1
- package/dist/mixDataPermission-D4uBuCpx.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Qe=Object.defineProperty,He=Object.defineProperties;var Ge=Object.getOwnPropertyDescriptors;var be=Object.getOwnPropertySymbols;var $e=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable;var ye=(y,f,v)=>f in y?Qe(y,f,{enumerable:!0,configurable:!0,writable:!0,value:v}):y[f]=v,te=(y,f)=>{for(var v in f||(f={}))$e.call(f,v)&&ye(y,v,f[v]);if(be)for(var v of be(f))Je.call(f,v)&&ye(y,v,f[v]);return y},oe=(y,f)=>He(y,Ge(f));var E=(y,f,v)=>new Promise((I,w)=>{var z=N=>{try{j(v.next(N))}catch(U){w(U)}},R=N=>{try{j(v.throw(N))}catch(U){w(U)}},j=N=>N.done?I(N.value):Promise.resolve(N.value).then(z,R);j((v=v.apply(y,f)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/loading/style/css");require("element-plus/es/components/dialog/style/css");require("element-plus/es/components/form/style/css");require("element-plus/es/components/form-item/style/css");require("element-plus/es/components/empty/style/css");require("element-plus/es/components/tree/style/css");require("element-plus/es/components/dropdown/style/css");require("element-plus/es/components/dropdown-menu/style/css");require("element-plus/es/components/dropdown-item/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),he=require("@element-plus/icons-vue"),Xe=require("./element-resize-detector-DYs3pJPp.cjs"),Ve=require("./index-ZwyqrmaH.cjs"),g=require("element-plus"),P=require("./api-nw_9niqv.cjs"),_e=require("./ele-lst-icon-CrxnHZ-A.cjs"),Ye=[{uid:"CO_HUANENG",id:1001,name:"华能燃气集团",ctype:"customer",nodeIcon:"company",child:[{uid:"PRJ_HB",id:1101,name:"华北区项目",ctype:"project",father_id:1001,nodeIcon:"folder",child:[{uid:"ST_NS",id:1201,name:"南山站气站",ctype:"project",father_id:1101,stationIndicator:"green",child:[{uid:"EQ_NS_AC1",id:1301,name:"1#空压机",ctype:"object",statusDot:"green"},{uid:"EQ_NS_AC2",id:1302,name:"2#空压机",ctype:"object",statusDot:"green"},{uid:"EQ_NS_AC3",id:1303,name:"3#空压机",ctype:"object",statusDot:"orange"},{uid:"EQ_NS_EM",id:1304,name:"总电表",ctype:"object",statusDot:"green"},{uid:"EQ_NS_FM",id:1305,name:"总流量计",ctype:"object",statusDot:"green"}]},{uid:"ST_HAIDIAN",id:1202,name:"北京海淀加气站",ctype:"project",father_id:1101,stationIndicator:"orange",child:[{uid:"EQ_HD_AC1",id:1311,name:"1#空压机",ctype:"object",statusDot:"green"},{uid:"EQ_HD_AC2",id:1312,name:"2#空压机",ctype:"object",statusDot:"orange"},{uid:"EQ_HD_EM",id:1313,name:"总电表",ctype:"object",statusDot:"orange"},{uid:"EQ_HD_FM",id:1314,name:"总流量计",ctype:"object",statusDot:"green"}]},{uid:"ST_BINHAI",id:1203,name:"天津滨海加气站",ctype:"project",father_id:1101,stationIndicator:"green",child:[{uid:"EQ_BH_AC1",id:1321,name:"1#空压机",ctype:"object",statusDot:"green"},{uid:"EQ_BH_AC2",id:1322,name:"2#空压机",ctype:"object",statusDot:"green"},{uid:"EQ_BH_AC3",id:1323,name:"3#空压机",ctype:"object",statusDot:"orange"},{uid:"EQ_BH_EM",id:1324,name:"总电表",ctype:"object",statusDot:"green"},{uid:"EQ_BH_FM",id:1325,name:"总流量计",ctype:"object",statusDot:"green"}]}]},{uid:"PRJ_HD",id:1102,name:"华东区项目",ctype:"project",father_id:1001,nodeIcon:"folder",child:[]}]},{uid:"CO_ZHONGRAN",id:2001,name:"中燃能源科技",ctype:"customer",nodeIcon:"company",child:[{uid:"PRJ_XN",id:2101,name:"西南区项目",ctype:"project",father_id:2001,nodeIcon:"folder",child:[{uid:"ST_CD_GX",id:2201,name:"成都高新加气站",ctype:"project",father_id:2101,stationIndicator:"green",child:[{uid:"EQ_CD_AC1",id:2301,name:"1#空压机",ctype:"object",statusDot:"green"},{uid:"EQ_CD_EM",id:2302,name:"总电表",ctype:"object",statusDot:"green"}]},{uid:"ST_CQ_YB",id:2202,name:"重庆渝北加气站",ctype:"project",father_id:2101,stationIndicator:"green",child:[{uid:"EQ_CQ_AC1",id:2311,name:"1#空压机",ctype:"object",statusDot:"green"},{uid:"EQ_CQ_FM",id:2312,name:"总流量计",ctype:"object",statusDot:"orange"}]}]}]}],Ze={class:"gsl-top-bar"},We={key:0,class:"gsl-top-caption"},et={key:1,class:"gsl-top-caption-placeholder"},tt={class:"gsl-top-actions"},ot={class:"gsl-tree-col"},at={class:"gsl-tree-wrap"},lt={class:"gsl-tree-node"},it={class:"gsl-tree-label"},nt={key:0,class:"gsl-monitor-col"},rt={key:0,class:"gsl-monitor-inner"},st={DEFAULT_ICON:_e.DEFAULT_ICON,ACTIVE_ICON:_e.ACTIVE_ICON,NAME_CN:"气站列表",NAME_EN:"GasStationList",ORDER:0},ut={bgColor:"#fff",nameColor:"#999",valueColor:"#333",titleColor:"#111",titleSize:14,nameSize:12,valueSize:12,radiusSize:8,isHideTitle:!1,linkChannel:""},Ce=[{name:"气站列表",fv:"",object_id:"",unit:"",default:"",isText:!1,useMockTree:!1,showAddBtn:!0,sheetPageKeys:"gas_layout,monitor",sheetPageLabels:"气站布局,监控",defaultSheetGasList:"gas_layout",defaultSheetRuntimeCheck:"monitor",runtimeScene:"gasList",stationNavRules:[],stationNavPageKey:"",embedObjectMonitorRight:!0,objectLinkedDashboardDevice:"pc"}],dt=[{key:"useMockTree",label:"使用模拟树(离线演示;关闭则 get_customer_project_tree)",type:"checkbox",group:"数据"},{key:"embedObjectMonitorRight",label:"点击对象右侧内嵌设备监控(与对象详情监控同源)",type:"checkbox",group:"数据"},{key:"objectLinkedDashboardDevice",label:"监控显示板终端(pc/mobile/screen)",group:"数据"},{key:"showAddBtn",label:"显示新增",type:"checkbox",group:"命令组"},{key:"sheetPageKeys",label:"页面标识列表"},{key:"sheetPageLabels",label:"页面标题列表"},{key:"defaultSheetGasList",label:"默认页面(气站列表)"},{key:"defaultSheetRuntimeCheck",label:"默认页面(运行检查)"},{key:"runtimeScene",label:"当前场景(gasList/runtimeCheck)"}],ct=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],mt={},pt={DEFAULT:st,OPTIONS:ut,DATA:Ce,PARAMS:dt,SOURCE:ct,COMMON:mt},ft=e.defineComponent(oe(te({},pt),{__name:"gasStationList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""}},setup(y){const f=y;class v extends Xe.BaseComponent{getDataBool(t,a){var i,s;const l=(s=(i=this.props.conf)==null?void 0:i.data)==null?void 0:s[0];return l&&Object.prototype.hasOwnProperty.call(l,t)&&l[t]!==void 0?!!l[t]:this.getOptionValue(t,a)}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),nameColor:this.getOptionValue("nameColor","#999"),valueColor:this.getOptionValue("valueColor","#333"),titleColor:this.getOptionValue("titleColor","#111"),titleSize:this.getOptionValue("titleSize",14),nameSize:this.getOptionValue("nameSize",12),valueSize:this.getOptionValue("valueSize",12),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!1),linkChannel:this.getOptionValue("linkChannel",""),showAddBtn:this.getDataBool("showAddBtn",!0)}}init(){var t;if(this.Style.value=this.extractStyles(),this.applyTheme(),!((t=this.props.conf.data)!=null&&t.length))this.props.conf.data=JSON.parse(JSON.stringify(Ce));else{const a=this.props.conf.data[0];a.useMockTree===void 0&&(a.useMockTree=!1),a.showAddBtn===void 0&&(a.showAddBtn=!0);const l={sheetPageKeys:"gas_layout,monitor",sheetPageLabels:"气站布局,监控",defaultSheetGasList:"gas_layout",defaultSheetRuntimeCheck:"monitor",runtimeScene:"gasList"};for(const[i,s]of Object.entries(l))(a[i]===void 0||a[i]==="")&&(a[i]=s);a.stationNavPageKey===void 0&&(a.stationNavPageKey=""),Array.isArray(a.stationNavRules)||(a.stationNavRules=[]),a.embedObjectMonitorRight===void 0&&(a.embedObjectMonitorRight=a.openObjectLinkedDashboard!==!1),(a.objectLinkedDashboardDevice===void 0||a.objectLinkedDashboardDevice==="")&&(a.objectLinkedDashboardDevice="pc")}}}const I=new v(f,"gasStationList");I.setupLifecycle();const w=I.getStyle(),z=e.inject("switchSheetByPageKey",()=>-1),R=e.inject("getSheets",()=>[]),j=e.inject("getProAppActiveMenuTitle",()=>""),N=e.inject("boardSwitchEpoch",e.ref(0)),U=e.computed(()=>{var o;try{const t=j;return typeof t=="function"?String((o=t())!=null?o:"").trim():""}catch(t){return""}}),V=e.computed(()=>{var o,t;return((t=(o=f.conf)==null?void 0:o.data)==null?void 0:t[0])||{}}),q=e.computed(()=>!!V.value.useMockTree);function ae(o){return String(o!=null?o:"").split(/[,,]/).map(t=>t.trim()).filter(Boolean)}const J=e.computed(()=>{const o=ae(V.value.sheetPageKeys),t=ae(V.value.sheetPageLabels);return o.map((a,l)=>({pageKey:a,label:t[l]||a}))}),Ne=e.computed(()=>String(V.value.runtimeScene||"gasList").trim()),Se=e.computed(()=>Ne.value==="runtimeCheck"?String(V.value.defaultSheetRuntimeCheck||"").trim():String(V.value.defaultSheetGasList||"").trim()),F=e.ref("");function x(o){return String(o!=null?o:"").trim().replace(/\s+/g," ")}function we(o){var s,m,c;const t=x(o);if(!t)return"";const a=R()||[],l=a.filter(u=>!(u!=null&&u.hideInPreviewTabs));if(l.length<=1)return"";const i=J.value;if(i.length>1){for(const u of i)if(x(u.label)===t)return u.pageKey;for(const u of i){const b=a.find(d=>String(d==null?void 0:d.id)===u.pageKey||String(d==null?void 0:d.name)===u.pageKey||String(d==null?void 0:d.caption)===u.pageKey);if(b&&(x(b.caption)===t||x(b.name)===t))return u.pageKey}}else for(const u of l)if(x(u.caption)===t||x(u.name)===t){const b=String((c=(m=(s=u.id)!=null?s:u.name)!=null?m:u.caption)!=null?c:"").trim();if(b)return b}return""}function le(){var s,m;const o=x((s=j==null?void 0:j())!=null?s:""),t=o?we(o):"";if(t)return t;const a=Se.value,l=J.value,i=((m=l[0])==null?void 0:m.pageKey)||"";return a&&l.some(c=>c.pageKey===a)?a:i}function je(){F.value=le()}function ie(){if(f.mode==="edit"||(R()||[]).filter(l=>!(l!=null&&l.hideInPreviewTabs)).length<=1)return;const a=le();a&&(F.value=a,z(String(a)))}e.watch(N,()=>{e.nextTick(()=>ie())},{flush:"post",immediate:!0}),e.watch(J,()=>{f.mode!=="edit"&&e.nextTick(()=>ie())},{deep:!0}),e.watch(F,o=>{if(f.mode==="edit"||!o)return;z(String(o))<0&&console.warn("[气站列表] 未匹配到 Sheet 页面标识:",o,"sheets:",R())});function ne(o){return Array.isArray(o.children)?o.children:Array.isArray(o.child)?o.child:[]}function X(o){return Array.isArray(o)?o.filter(Boolean).map(t=>{var s,m,c,u;const a=t,l=String((u=(c=(m=(s=a.name)!=null?s:a.alias)!=null?m:a.uid)!=null?c:a.id)!=null?u:""),i=X(ne(a));return oe(te({},a),{label:l,treeKey:xe(a),children:i.length?i:void 0})}):[]}function D(o,t){const a=String(o||"").trim().toLowerCase();return a==="child_object"?"object":a==="customer"||a==="project"||a==="object"?a:t<=1?"customer":t===2?"project":"object"}function ke(o,t){const a=o.stationIndicator;if(a==="green"||a==="orange")return!0;if(D(o.ctype,t.level)!=="project")return!1;const l=ne(o);return l.length?l.every(i=>D(i.ctype,t.level+1)==="object"):!1}function xe(o){var l,i,s,m,c;const t=String((l=o.ctype)!=null?l:"n"),a=(c=(m=(s=(i=o.uid)!=null?i:o.id)!=null?s:o.name)!=null?m:o.label)!=null?c:"n";return`${t}_${a}`}const A=e.ref([]),Q=e.ref(!1),Y=e.ref(null),H=e.ref("");function Ee(o,t){var m,c,u,b;if(!o)return!0;const a=o.toLowerCase(),l=String((c=(m=t.label)!=null?m:t.name)!=null?c:"").toLowerCase(),i=String((u=t.uid)!=null?u:"").toLowerCase(),s=String((b=t.alias)!=null?b:"").toLowerCase();return l.includes(a)||i.includes(a)||s.includes(a)}function re(){e.nextTick(()=>{var o;(o=Y.value)==null||o.filter(H.value.trim())})}function T(){return E(this,null,function*(){var o,t;Q.value=!0;try{if(q.value)A.value=X(JSON.parse(JSON.stringify(Ye)));else{const a=yield P.api.post("get_customer_project_tree",{},!0),l=(o=a==null?void 0:a.result)!=null?o:a,i=Array.isArray(l)?l:l!=null?[l]:[];A.value=X(i)}yield e.nextTick(),(t=Y.value)==null||t.filter(H.value.trim())}catch(a){console.error(a),A.value=[],g.ElMessage.error("加载树失败")}finally{Q.value=!1}})}e.watch(q,()=>{T()});const C=e.ref(null),Z=e.ref(1);function se(o){var a,l,i,s;(a=w.value)!=null&&a.linkChannel&&I.publish({objectUid:String((l=o.uid)!=null?l:""),objectName:String((s=(i=o.name)!=null?i:o.label)!=null?s:""),objectId:o.id!=null?String(o.id):""})}function De(o){var i,s,m,c;const t=String((i=o.uid)!=null?i:"").trim(),a=V.value.stationNavRules,l=Array.isArray(a)?a:[];for(const u of l){const b=String((s=u==null?void 0:u.stationUid)!=null?s:"").trim(),d=String((m=u==null?void 0:u.pageKey)!=null?m:"").trim();if(!(!b||!d)&&b===t)return d}return String((c=V.value.stationNavPageKey)!=null?c:"").trim()}function Ae(o,t){const a=V.value;return a&&Object.prototype.hasOwnProperty.call(a,o)&&a[o]!==void 0?!!a[o]:t}const K=e.computed(()=>Ae("embedObjectMonitorRight",!0)),Te=e.computed(()=>{const o=String(V.value.objectLinkedDashboardDevice||"pc").trim().toLowerCase();return o==="mobile"||o==="screen"?o:"pc"}),M=e.ref(null),G=e.ref(""),W=e.ref(!1);function ue(){M.value=null,G.value=""}function de(o){if(!o||typeof o!="object")return{};const t=o,a=t.result;if(a&&typeof a=="object"&&!Array.isArray(a))return a;const l=t.data;return l&&typeof l=="object"&&!Array.isArray(l)?l:t}function Me(o,t){const a=t.toLowerCase();return o.find(l=>{var m,c;const i=String((m=l==null?void 0:l.device_type)!=null?m:"").toLowerCase(),s=String((c=l==null?void 0:l.type)!=null?c:"").toLowerCase();return i===a||s===a})}function Oe(o){return E(this,null,function*(){var a;const t=o.trim();if(!t){g.ElMessage.warning("对象缺少 uid");return}W.value=!0,M.value=null,G.value=t;try{const l=yield P.api.post("get_object_item",{uid:t},!0),i=de(l),s=Array.isArray(i.dashboard_list)?i.dashboard_list:[],m=Te.value,c=Me(s,m),u=String((a=c==null?void 0:c.uid)!=null?a:"").trim();if(!u){g.ElMessage.warning("该对象未绑定对应类型的显示板");return}const b=yield P.api.post("get_dashboard_item",{uid:u},!0),d=de(b),k=d==null?void 0:d.script;k&&typeof k=="object"&&Object.keys(k).length?M.value=k:g.ElMessage.warning("显示板脚本为空")}catch(l){console.error(l),g.ElMessage.error("加载设备监控失败"),M.value=null}finally{W.value=!1}})}function Be(o,t){C.value=o,Z.value=t.level;const a=De(o);if(a&&ke(o,t)){K.value&&ue(),F.value=a,se(o);return}K.value&&D(o.ctype,t.level)!=="object"&&ue(),D(o.ctype,t.level)==="object"&&E(null,null,function*(){var l;if(K.value&&f.mode!=="edit"){const i=String((l=o.uid)!=null?l:"").trim();i&&(yield Oe(i))}else je();se(o)})}const ce=e.computed(()=>C.value?D(C.value.ctype,Z.value)==="customer":!1),me=e.computed(()=>C.value?D(C.value.ctype,Z.value)==="project":!1),$=e.ref(""),Le=e.computed(()=>$.value||"—");function Pe(o){o==="customer"?Ie():o==="project"?Re():o==="object"&&Ue()}function Ie(){pe(),O.value=!0}function Re(){var o,t;if(!ce.value||!C.value){g.ElMessage.warning("请先在树中选中客户(片区)节点");return}$.value=String((t=(o=C.value.uid)!=null?o:C.value.id)!=null?t:""),fe(),B.value=!0}function Ue(){var t,a,l;if(!me.value||!C.value){g.ElMessage.warning("请先在树中选中气站(项目)节点");return}ge();const o=C.value;r.customer_name=String((t=o.customer_name)!=null?t:""),r.customer_id=String((a=o.customer_id)!=null?a:""),r.customer_alias=String((l=o.customer_alias)!=null?l:""),L.value=!0}const O=e.ref(!1),B=e.ref(!1),L=e.ref(!1),S=e.ref(!1),p=e.reactive({name:"",alias:"",contact:"",mobile:"",description:""}),h=e.reactive({name:"",alias:"",description:""}),r=e.reactive({uid:"",name:"",alias:"",model:"",customer_id:"",customer_name:"",customer_alias:"",description:""});function pe(){p.name="",p.alias="",p.contact="",p.mobile="",p.description=""}function fe(){h.name="",h.alias="",h.description=""}function ge(){r.uid="",r.name="",r.alias="",r.model="",r.customer_id="",r.customer_name="",r.customer_alias="",r.description=""}function qe(){return E(this,null,function*(){if(!p.name.trim()){g.ElMessage.warning("请填写客户名称");return}if(q.value){g.ElMessage.success("演示数据:已记录(未写入模拟树,关闭「使用模拟树」后可调真实接口)"),O.value=!1;return}S.value=!0;try{yield P.api.post("create_customer",{name:p.name.trim(),alias:p.alias.trim(),contact:p.contact,mobile:p.mobile,description:p.description},!0),g.ElMessage.success("添加成功"),O.value=!1,yield T()}catch(o){g.ElMessage.error("添加失败")}finally{S.value=!1}})}function Ke(){return E(this,null,function*(){if(!h.name.trim()){g.ElMessage.warning("请填写项目名称");return}if(!$.value){g.ElMessage.warning("缺少所属客户");return}if(q.value){g.ElMessage.success("演示数据:已记录(未写入模拟树)"),B.value=!1;return}S.value=!0;try{yield P.api.post("create_project",{parent_uid:$.value,name:h.name.trim(),alias:h.alias.trim(),description:h.description},!0),g.ElMessage.success("添加成功"),B.value=!1,yield T()}catch(o){g.ElMessage.error("添加失败")}finally{S.value=!1}})}function ze(){var o,t,a,l,i,s,m,c;return{id:0,uid:String((o=r.uid)!=null?o:"").trim(),name:String((t=r.name)!=null?t:"").trim(),alias:String((a=r.alias)!=null?a:""),model:String((l=r.model)!=null?l:""),description:String((i=r.description)!=null?i:""),customer_id:String((s=r.customer_id)!=null?s:""),customer_name:String((m=r.customer_name)!=null?m:""),customer_alias:String((c=r.customer_alias)!=null?c:""),terminal_list:"",mapping_id:"",mapping_name:"",tag:"",province:"",city:"",create_by_tpl:0,tpl_uid:"",tpl_name:"",tpl_alias:"",addition:"[]"}}function Fe(){return E(this,null,function*(){if(!r.uid.trim()||!r.name.trim()){g.ElMessage.warning("请填写对象编号与名称");return}if(q.value){g.ElMessage.success("演示数据:已记录(未写入模拟树)"),L.value=!1;return}S.value=!0;try{yield P.api.post("create_object",ze(),!0),g.ElMessage.success("添加成功"),L.value=!1,yield T()}catch(o){g.ElMessage.error("添加失败")}finally{S.value=!1}})}return e.onMounted(()=>{T()}),(o,t)=>{const a=_.ElIcon,l=_.ElInput,i=_.ElButton,s=_.ElDropdownItem,m=_.ElDropdownMenu,c=_.ElDropdown,u=_.ElTree,b=_.ElEmpty,d=_.ElFormItem,k=_.ElForm,ee=_.ElDialog,ve=_.ElLoadingDirective;return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"gas-station-list mix-component",style:e.normalizeStyle({backgroundColor:e.unref(w).bgColor,borderRadius:`${e.unref(w).radiusSize}px`})},[e.createElementVNode("div",Ze,[e.unref(w).isHideTitle?(e.openBlock(),e.createElementBlock("div",et)):(e.openBlock(),e.createElementBlock("span",We,e.toDisplayString(y.conf.caption||y.conf.name),1)),e.createElementVNode("div",tt,[e.createVNode(l,{modelValue:H.value,"onUpdate:modelValue":t[0]||(t[0]=n=>H.value=n),class:"gsl-search-input",clearable:"",placeholder:"搜索气站...",size:"small",onInput:re,onClear:re},{prefix:e.withCtx(()=>[e.createVNode(a,{class:"gsl-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(he.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(i,{size:"small",loading:Q.value,onClick:T},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode("刷新",-1)])]),_:1},8,["loading"]),e.unref(w).showAddBtn?(e.openBlock(),e.createBlock(c,{key:0,trigger:"click",onCommand:Pe},{dropdown:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.createVNode(s,{command:"customer"},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("添加客户",-1)])]),_:1}),e.createVNode(s,{command:"project",disabled:!ce.value},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("添加项目",-1)])]),_:1},8,["disabled"]),e.createVNode(s,{command:"object",disabled:!me.value},{default:e.withCtx(()=>[...t[27]||(t[27]=[e.createTextVNode("添加对象",-1)])]),_:1},8,["disabled"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(i,{type:"primary",size:"small"},{default:e.withCtx(()=>[t[24]||(t[24]=e.createTextVNode(" 新增 ",-1)),e.createVNode(a,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(he.ArrowDown))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",{class:e.normalizeClass(["mix-body gsl-body",{"gsl-body--split":K.value}])},[e.createElementVNode("div",ot,[e.createElementVNode("div",at,[A.value.length?(e.openBlock(),e.createBlock(u,{key:0,ref_key:"treeRef",ref:Y,class:"gsl-tree",data:A.value,props:{label:"label",children:"children"},"node-key":"treeKey","highlight-current":"","default-expand-all":"","filter-node-method":Ee,onNodeClick:Be},{default:e.withCtx(({data:n})=>[e.createElementVNode("span",lt,[n.stationIndicator==="green"||n.stationIndicator==="orange"?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["gsl-dot gsl-dot--station",`is-${n.stationIndicator}`])},null,2)):n.statusDot==="green"||n.statusDot==="orange"?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["gsl-dot gsl-dot--equip",`is-${n.statusDot}`])},null,2)):e.createCommentVNode("",!0),e.createElementVNode("span",it,e.toDisplayString(n.label),1)])]),_:1},8,["data"])):(e.openBlock(),e.createBlock(b,{key:1,description:"暂无树数据"}))])]),K.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",nt,[M.value?(e.openBlock(),e.createElementBlock("div",rt,[(e.openBlock(),e.createBlock(Ve._sfc_main,{key:G.value,script:M.value,uid:G.value,"enable-web-socket":!0,"follow-host-theme":!0,"host-pro-menu-title":U.value},null,8,["script","uid","host-pro-menu-title"]))])):(e.openBlock(),e.createBlock(b,{key:1,class:"gsl-monitor-empty",description:"点击对象查看设备监控"}))])),[[ve,W.value]]):e.createCommentVNode("",!0)],2),e.createVNode(ee,{modelValue:O.value,"onUpdate:modelValue":t[7]||(t[7]=n=>O.value=n),title:"添加客户",width:"520px","destroy-on-close":"",onClosed:pe},{footer:e.withCtx(()=>[e.createVNode(i,{onClick:t[6]||(t[6]=n=>O.value=!1)},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(i,{type:"primary",loading:S.value,onClick:qe},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(k,{model:p,"label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(d,{label:"客户名称",required:""},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:p.name,"onUpdate:modelValue":t[1]||(t[1]=n=>p.name=n),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"客户别名"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:p.alias,"onUpdate:modelValue":t[2]||(t[2]=n=>p.alias=n)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"联系人"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:p.contact,"onUpdate:modelValue":t[3]||(t[3]=n=>p.contact=n)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"手机"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:p.mobile,"onUpdate:modelValue":t[4]||(t[4]=n=>p.mobile=n)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:p.description,"onUpdate:modelValue":t[5]||(t[5]=n=>p.description=n),type:"textarea",rows:2},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(ee,{modelValue:B.value,"onUpdate:modelValue":t[12]||(t[12]=n=>B.value=n),title:"添加项目",width:"520px","destroy-on-close":"",onClosed:fe},{footer:e.withCtx(()=>[e.createVNode(i,{onClick:t[11]||(t[11]=n=>B.value=!1)},{default:e.withCtx(()=>[...t[30]||(t[30]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(i,{type:"primary",loading:S.value,onClick:Ke},{default:e.withCtx(()=>[...t[31]||(t[31]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(k,{model:h,"label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(d,{label:"所属客户"},{default:e.withCtx(()=>[e.createVNode(l,{"model-value":Le.value,disabled:""},null,8,["model-value"])]),_:1}),e.createVNode(d,{label:"项目名称",required:""},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:h.name,"onUpdate:modelValue":t[8]||(t[8]=n=>h.name=n),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"项目别名"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:h.alias,"onUpdate:modelValue":t[9]||(t[9]=n=>h.alias=n)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:h.description,"onUpdate:modelValue":t[10]||(t[10]=n=>h.description=n),type:"textarea",rows:2},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(ee,{modelValue:L.value,"onUpdate:modelValue":t[22]||(t[22]=n=>L.value=n),title:"添加对象",width:"560px","destroy-on-close":"",onClosed:ge},{footer:e.withCtx(()=>[e.createVNode(i,{onClick:t[21]||(t[21]=n=>L.value=!1)},{default:e.withCtx(()=>[...t[32]||(t[32]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(i,{type:"primary",loading:S.value,onClick:Fe},{default:e.withCtx(()=>[...t[33]||(t[33]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(k,{model:r,"label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(d,{label:"对象编号",required:""},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:r.uid,"onUpdate:modelValue":t[13]||(t[13]=n=>r.uid=n),placeholder:"业务 uid,必填"},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"对象名称",required:""},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:r.name,"onUpdate:modelValue":t[14]||(t[14]=n=>r.name=n),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"对象别名"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:r.alias,"onUpdate:modelValue":t[15]||(t[15]=n=>r.alias=n)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"型号"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:r.model,"onUpdate:modelValue":t[16]||(t[16]=n=>r.model=n)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"客户编号"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:r.customer_id,"onUpdate:modelValue":t[17]||(t[17]=n=>r.customer_id=n),placeholder:"可选"},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"客户名称"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:r.customer_name,"onUpdate:modelValue":t[18]||(t[18]=n=>r.customer_name=n)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"客户别名"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:r.customer_alias,"onUpdate:modelValue":t[19]||(t[19]=n=>r.customer_alias=n)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:r.description,"onUpdate:modelValue":t[20]||(t[20]=n=>r.description=n),type:"textarea",rows:2},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.renderSlot(o.$slots,"default",{},void 0,!0)],4)),[[ve,Q.value&&!A.value.length]])}}})),gt=Ve._export_sfc(ft,[["__scopeId","data-v-7b7b7d73"]]);exports.default=gt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var We=Object.defineProperty,qe=Object.defineProperties;var Ze=Object.getOwnPropertyDescriptors;var Te=Object.getOwnPropertySymbols;var Qe=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Ae=(u,e,t)=>e in u?We(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ye=(u,e)=>{for(var t in e||(e={}))Qe.call(e,t)&&Ae(u,t,e[t]);if(Te)for(var t of Te(e))$e.call(e,t)&&Ae(u,t,e[t]);return u},be=(u,e)=>qe(u,Ze(e));var Ee=(u,e,t)=>new Promise((o,s)=>{var i=r=>{try{a(t.next(r))}catch(l){s(l)}},n=r=>{try{a(t.throw(r))}catch(l){s(l)}},a=r=>r.done?o(r.value):Promise.resolve(r.value).then(i,n);a((t=t.apply(u,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("vue");require("html2canvas");const Je=require("./element-resize-detector-DgDXXuXN.cjs"),et=require("./index-Bl0Sti1q.cjs"),c=require("./three.module-DNVo041Q.cjs"),Se=require("./ele-glbModel-icon-ByACDCrv.cjs");function xe(u,e){if(e===c.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),u;if(e===c.TriangleFanDrawMode||e===c.TriangleStripDrawMode){let t=u.getIndex();if(t===null){const n=[],a=u.getAttribute("position");if(a!==void 0){for(let r=0;r<a.count;r++)n.push(r);u.setIndex(n),t=u.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),u}const o=t.count-2,s=[];if(e===c.TriangleFanDrawMode)for(let n=1;n<=o;n++)s.push(t.getX(0)),s.push(t.getX(n)),s.push(t.getX(n+1));else for(let n=0;n<o;n++)n%2===0?(s.push(t.getX(n)),s.push(t.getX(n+1)),s.push(t.getX(n+2))):(s.push(t.getX(n+2)),s.push(t.getX(n+1)),s.push(t.getX(n)));s.length/3!==o&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=u.clone();return i.setIndex(s),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),u}class tt extends c.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new rt(t)}),this.register(function(t){return new at(t)}),this.register(function(t){return new gt(t)}),this.register(function(t){return new _t(t)}),this.register(function(t){return new Tt(t)}),this.register(function(t){return new lt(t)}),this.register(function(t){return new ht(t)}),this.register(function(t){return new ut(t)}),this.register(function(t){return new dt(t)}),this.register(function(t){return new ot(t)}),this.register(function(t){return new ft(t)}),this.register(function(t){return new ct(t)}),this.register(function(t){return new mt(t)}),this.register(function(t){return new pt(t)}),this.register(function(t){return new nt(t)}),this.register(function(t){return new At(t)}),this.register(function(t){return new yt(t)})}load(e,t,o,s){const i=this;let n;if(this.resourcePath!=="")n=this.resourcePath;else if(this.path!==""){const l=c.LoaderUtils.extractUrlBase(e);n=c.LoaderUtils.resolveURL(l,this.path)}else n=c.LoaderUtils.extractUrlBase(e);this.manager.itemStart(e);const a=function(l){s?s(l):console.error(l),i.manager.itemError(e),i.manager.itemEnd(e)},r=new c.FileLoader(this.manager);r.setPath(this.path),r.setResponseType("arraybuffer"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(e,function(l){try{i.parse(l,n,function(d){t(d),i.manager.itemEnd(e)},a)}catch(d){a(d)}},o,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,o,s){let i;const n={},a={},r=new TextDecoder;if(typeof e=="string")i=JSON.parse(e);else if(e instanceof ArrayBuffer)if(r.decode(new Uint8Array(e,0,4))===Ne){try{n[M.KHR_BINARY_GLTF]=new bt(e)}catch(h){s&&s(h);return}i=JSON.parse(n[M.KHR_BINARY_GLTF].content)}else i=JSON.parse(r.decode(e));else i=e;if(i.asset===void 0||i.asset.version[0]<2){s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const l=new It(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d<this.pluginCallbacks.length;d++){const h=this.pluginCallbacks[d](l);h.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[h.name]=h,n[h.name]=!0}if(i.extensionsUsed)for(let d=0;d<i.extensionsUsed.length;++d){const h=i.extensionsUsed[d],f=i.extensionsRequired||[];switch(h){case M.KHR_MATERIALS_UNLIT:n[h]=new it;break;case M.KHR_DRACO_MESH_COMPRESSION:n[h]=new Et(i,this.dracoLoader);break;case M.KHR_TEXTURE_TRANSFORM:n[h]=new St;break;case M.KHR_MESH_QUANTIZATION:n[h]=new xt;break;default:f.indexOf(h)>=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}l.setExtensions(n),l.setPlugins(a),l.parse(o,s)}parseAsync(e,t){const o=this;return new Promise(function(s,i){o.parse(e,t,s,i)})}}function st(){let u={};return{get:function(e){return u[e]},add:function(e,t){u[e]=t},remove:function(e){delete u[e]},removeAll:function(){u={}}}}const M={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class nt{constructor(e){this.parser=e,this.name=M.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let o=0,s=t.length;o<s;o++){const i=t[o];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(e){const t=this.parser,o="light:"+e;let s=t.cache.get(o);if(s)return s;const i=t.json,r=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e];let l;const d=new c.Color(16777215);r.color!==void 0&&d.setRGB(r.color[0],r.color[1],r.color[2],c.LinearSRGBColorSpace);const h=r.range!==void 0?r.range:0;switch(r.type){case"directional":l=new c.DirectionalLight(d),l.target.position.set(0,0,-1),l.add(l.target);break;case"point":l=new c.PointLight(d),l.distance=h;break;case"spot":l=new c.SpotLight(d),l.distance=h,r.spot=r.spot||{},r.spot.innerConeAngle=r.spot.innerConeAngle!==void 0?r.spot.innerConeAngle:0,r.spot.outerConeAngle=r.spot.outerConeAngle!==void 0?r.spot.outerConeAngle:Math.PI/4,l.angle=r.spot.outerConeAngle,l.penumbra=1-r.spot.innerConeAngle/r.spot.outerConeAngle,l.target.position.set(0,0,-1),l.add(l.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+r.type)}return l.position.set(0,0,0),l.decay=2,z(l,r),r.intensity!==void 0&&(l.intensity=r.intensity),l.name=t.createUniqueName(r.name||"light_"+e),s=Promise.resolve(l),t.cache.add(o,s),s}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,o=this.parser,i=o.json.nodes[e],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(r){return o._getNodeRef(t.cache,a,r)})}}class it{constructor(){this.name=M.KHR_MATERIALS_UNLIT}getMaterialType(){return c.MeshBasicMaterial}extendParams(e,t,o){const s=[];e.color=new c.Color(1,1,1),e.opacity=1;const i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const n=i.baseColorFactor;e.color.setRGB(n[0],n[1],n[2],c.LinearSRGBColorSpace),e.opacity=n[3]}i.baseColorTexture!==void 0&&s.push(o.assignTexture(e,"map",i.baseColorTexture,c.SRGBColorSpace))}return Promise.all(s)}}class ot{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name].emissiveStrength;return i!==void 0&&(t.emissiveIntensity=i),Promise.resolve()}}class rt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];if(n.clearcoatFactor!==void 0&&(t.clearcoat=n.clearcoatFactor),n.clearcoatTexture!==void 0&&i.push(o.assignTexture(t,"clearcoatMap",n.clearcoatTexture)),n.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=n.clearcoatRoughnessFactor),n.clearcoatRoughnessTexture!==void 0&&i.push(o.assignTexture(t,"clearcoatRoughnessMap",n.clearcoatRoughnessTexture)),n.clearcoatNormalTexture!==void 0&&(i.push(o.assignTexture(t,"clearcoatNormalMap",n.clearcoatNormalTexture)),n.clearcoatNormalTexture.scale!==void 0)){const a=n.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new c.Vector2(a,a)}return Promise.all(i)}}class at{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_DISPERSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name];return t.dispersion=i.dispersion!==void 0?i.dispersion:0,Promise.resolve()}}class ct{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.iridescenceFactor!==void 0&&(t.iridescence=n.iridescenceFactor),n.iridescenceTexture!==void 0&&i.push(o.assignTexture(t,"iridescenceMap",n.iridescenceTexture)),n.iridescenceIor!==void 0&&(t.iridescenceIOR=n.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),n.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=n.iridescenceThicknessMinimum),n.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=n.iridescenceThicknessMaximum),n.iridescenceThicknessTexture!==void 0&&i.push(o.assignTexture(t,"iridescenceThicknessMap",n.iridescenceThicknessTexture)),Promise.all(i)}}class lt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_SHEEN}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[];t.sheenColor=new c.Color(0,0,0),t.sheenRoughness=0,t.sheen=1;const n=s.extensions[this.name];if(n.sheenColorFactor!==void 0){const a=n.sheenColorFactor;t.sheenColor.setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace)}return n.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=n.sheenRoughnessFactor),n.sheenColorTexture!==void 0&&i.push(o.assignTexture(t,"sheenColorMap",n.sheenColorTexture,c.SRGBColorSpace)),n.sheenRoughnessTexture!==void 0&&i.push(o.assignTexture(t,"sheenRoughnessMap",n.sheenRoughnessTexture)),Promise.all(i)}}class ht{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.transmissionFactor!==void 0&&(t.transmission=n.transmissionFactor),n.transmissionTexture!==void 0&&i.push(o.assignTexture(t,"transmissionMap",n.transmissionTexture)),Promise.all(i)}}class ut{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_VOLUME}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];t.thickness=n.thicknessFactor!==void 0?n.thicknessFactor:0,n.thicknessTexture!==void 0&&i.push(o.assignTexture(t,"thicknessMap",n.thicknessTexture)),t.attenuationDistance=n.attenuationDistance||1/0;const a=n.attenuationColor||[1,1,1];return t.attenuationColor=new c.Color().setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace),Promise.all(i)}}class dt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_IOR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name];return t.ior=i.ior!==void 0?i.ior:1.5,Promise.resolve()}}class ft{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_SPECULAR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];t.specularIntensity=n.specularFactor!==void 0?n.specularFactor:1,n.specularTexture!==void 0&&i.push(o.assignTexture(t,"specularIntensityMap",n.specularTexture));const a=n.specularColorFactor||[1,1,1];return t.specularColor=new c.Color().setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace),n.specularColorTexture!==void 0&&i.push(o.assignTexture(t,"specularColorMap",n.specularColorTexture,c.SRGBColorSpace)),Promise.all(i)}}class pt{constructor(e){this.parser=e,this.name=M.EXT_MATERIALS_BUMP}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return t.bumpScale=n.bumpFactor!==void 0?n.bumpFactor:1,n.bumpTexture!==void 0&&i.push(o.assignTexture(t,"bumpMap",n.bumpTexture)),Promise.all(i)}}class mt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.anisotropyStrength!==void 0&&(t.anisotropy=n.anisotropyStrength),n.anisotropyRotation!==void 0&&(t.anisotropyRotation=n.anisotropyRotation),n.anisotropyTexture!==void 0&&i.push(o.assignTexture(t,"anisotropyMap",n.anisotropyTexture)),Promise.all(i)}}class gt{constructor(e){this.parser=e,this.name=M.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,o=t.json,s=o.textures[e];if(!s.extensions||!s.extensions[this.name])return null;const i=s.extensions[this.name],n=t.options.ktx2Loader;if(!n){if(o.extensionsRequired&&o.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,n)}}class _t{constructor(e){this.parser=e,this.name=M.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,o=this.parser,s=o.json,i=s.textures[e];if(!i.extensions||!i.extensions[t])return null;const n=i.extensions[t],a=s.images[n.source];let r=o.textureLoader;if(a.uri){const l=o.options.manager.getHandler(a.uri);l!==null&&(r=l)}return this.detectSupport().then(function(l){if(l)return o.loadTextureImage(e,n.source,r);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Tt{constructor(e){this.parser=e,this.name=M.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,o=this.parser,s=o.json,i=s.textures[e];if(!i.extensions||!i.extensions[t])return null;const n=i.extensions[t],a=s.images[n.source];let r=o.textureLoader;if(a.uri){const l=o.options.manager.getHandler(a.uri);l!==null&&(r=l)}return this.detectSupport().then(function(l){if(l)return o.loadTextureImage(e,n.source,r);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class At{constructor(e){this.name=M.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,o=t.bufferViews[e];if(o.extensions&&o.extensions[this.name]){const s=o.extensions[this.name],i=this.parser.getDependency("buffer",s.buffer),n=this.parser.options.meshoptDecoder;if(!n||!n.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then(function(a){const r=s.byteOffset||0,l=s.byteLength||0,d=s.count,h=s.byteStride,f=new Uint8Array(a,r,l);return n.decodeGltfBufferAsync?n.decodeGltfBufferAsync(d,h,f,s.mode,s.filter).then(function(m){return m.buffer}):n.ready.then(function(){const m=new ArrayBuffer(d*h);return n.decodeGltfBuffer(new Uint8Array(m),d,h,f,s.mode,s.filter),m})})}else return null}}class yt{constructor(e){this.name=M.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,o=t.nodes[e];if(!o.extensions||!o.extensions[this.name]||o.mesh===void 0)return null;const s=t.meshes[o.mesh];for(const l of s.primitives)if(l.mode!==G.TRIANGLES&&l.mode!==G.TRIANGLE_STRIP&&l.mode!==G.TRIANGLE_FAN&&l.mode!==void 0)return null;const n=o.extensions[this.name].attributes,a=[],r={};for(const l in n)a.push(this.parser.getDependency("accessor",n[l]).then(d=>(r[l]=d,r[l])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(l=>{const d=l.pop(),h=d.isGroup?d.children:[d],f=l[0].count,m=[];for(const p of h){const g=new c.Matrix4,_=new c.Vector3,y=new c.Quaternion,b=new c.Vector3(1,1,1),C=new c.InstancedMesh(p.geometry,p.material,f);for(let x=0;x<f;x++)r.TRANSLATION&&_.fromBufferAttribute(r.TRANSLATION,x),r.ROTATION&&y.fromBufferAttribute(r.ROTATION,x),r.SCALE&&b.fromBufferAttribute(r.SCALE,x),C.setMatrixAt(x,g.compose(_,y,b));for(const x in r)if(x==="_COLOR_0"){const v=r[x];C.instanceColor=new c.InstancedBufferAttribute(v.array,v.itemSize,v.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&p.geometry.setAttribute(x,r[x]);c.Object3D.prototype.copy.call(C,p),this.parser.assignFinalMaterial(C),m.push(C)}return d.isGroup?(d.clear(),d.add(...m),d):m[0]}))}}const Ne="glTF",ee=12,Re={JSON:1313821514,BIN:5130562};class bt{constructor(e){this.name=M.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,ee),o=new TextDecoder;if(this.header={magic:o.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Ne)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const s=this.header.length-ee,i=new DataView(e,ee);let n=0;for(;n<s;){const a=i.getUint32(n,!0);n+=4;const r=i.getUint32(n,!0);if(n+=4,r===Re.JSON){const l=new Uint8Array(e,ee+n,a);this.content=o.decode(l)}else if(r===Re.BIN){const l=ee+n;this.body=e.slice(l,l+a)}n+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Et{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=M.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const o=this.json,s=this.dracoLoader,i=e.extensions[this.name].bufferView,n=e.extensions[this.name].attributes,a={},r={},l={};for(const d in n){const h=ue[d]||d.toLowerCase();a[h]=n[d]}for(const d in e.attributes){const h=ue[d]||d.toLowerCase();if(n[d]!==void 0){const f=o.accessors[e.attributes[d]],m=Q[f.componentType];l[h]=m.name,r[h]=f.normalized===!0}}return t.getDependency("bufferView",i).then(function(d){return new Promise(function(h,f){s.decodeDracoFile(d,function(m){for(const p in m.attributes){const g=m.attributes[p],_=r[p];_!==void 0&&(g.normalized=_)}h(m)},a,l,c.LinearSRGBColorSpace,f)})})}}class St{constructor(){this.name=M.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class xt{constructor(){this.name=M.KHR_MESH_QUANTIZATION}}class ke extends c.Interpolant{constructor(e,t,o,s){super(e,t,o,s)}copySampleValue_(e){const t=this.resultBuffer,o=this.sampleValues,s=this.valueSize,i=e*s*3+s;for(let n=0;n!==s;n++)t[n]=o[i+n];return t}interpolate_(e,t,o,s){const i=this.resultBuffer,n=this.sampleValues,a=this.valueSize,r=a*2,l=a*3,d=s-t,h=(o-t)/d,f=h*h,m=f*h,p=e*l,g=p-l,_=-2*m+3*f,y=m-f,b=1-_,C=y-f+h;for(let x=0;x!==a;x++){const v=n[g+x+a],B=n[g+x+r]*d,k=n[p+x+a],w=n[p+x]*d;i[x]=b*v+C*B+_*k+y*w}return i}}const Rt=new c.Quaternion;class Mt extends ke{interpolate_(e,t,o,s){const i=super.interpolate_(e,t,o,s);return Rt.fromArray(i).normalize().toArray(i),i}}const G={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Q={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Me={9728:c.NearestFilter,9729:c.LinearFilter,9984:c.NearestMipmapNearestFilter,9985:c.LinearMipmapNearestFilter,9986:c.NearestMipmapLinearFilter,9987:c.LinearMipmapLinearFilter},we={33071:c.ClampToEdgeWrapping,33648:c.MirroredRepeatWrapping,10497:c.RepeatWrapping},re={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ue={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Y={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},wt={CUBICSPLINE:void 0,LINEAR:c.InterpolateLinear,STEP:c.InterpolateDiscrete},ae={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Lt(u){return u.DefaultMaterial===void 0&&(u.DefaultMaterial=new c.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:c.FrontSide})),u.DefaultMaterial}function W(u,e,t){for(const o in t.extensions)u[o]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[o]=t.extensions[o])}function z(u,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(u.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function Ct(u,e,t){let o=!1,s=!1,i=!1;for(let l=0,d=e.length;l<d;l++){const h=e[l];if(h.POSITION!==void 0&&(o=!0),h.NORMAL!==void 0&&(s=!0),h.COLOR_0!==void 0&&(i=!0),o&&s&&i)break}if(!o&&!s&&!i)return Promise.resolve(u);const n=[],a=[],r=[];for(let l=0,d=e.length;l<d;l++){const h=e[l];if(o){const f=h.POSITION!==void 0?t.getDependency("accessor",h.POSITION):u.attributes.position;n.push(f)}if(s){const f=h.NORMAL!==void 0?t.getDependency("accessor",h.NORMAL):u.attributes.normal;a.push(f)}if(i){const f=h.COLOR_0!==void 0?t.getDependency("accessor",h.COLOR_0):u.attributes.color;r.push(f)}}return Promise.all([Promise.all(n),Promise.all(a),Promise.all(r)]).then(function(l){const d=l[0],h=l[1],f=l[2];return o&&(u.morphAttributes.position=d),s&&(u.morphAttributes.normal=h),i&&(u.morphAttributes.color=f),u.morphTargetsRelative=!0,u})}function Dt(u,e){if(u.updateMorphTargets(),e.weights!==void 0)for(let t=0,o=e.weights.length;t<o;t++)u.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(u.morphTargetInfluences.length===t.length){u.morphTargetDictionary={};for(let o=0,s=t.length;o<s;o++)u.morphTargetDictionary[t[o]]=o}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Pt(u){let e;const t=u.extensions&&u.extensions[M.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+ce(t.attributes):e=u.indices+":"+ce(u.attributes)+":"+u.mode,u.targets!==void 0)for(let o=0,s=u.targets.length;o<s;o++)e+=":"+ce(u.targets[o]);return e}function ce(u){let e="";const t=Object.keys(u).sort();for(let o=0,s=t.length;o<s;o++)e+=t[o]+":"+u[t[o]]+";";return e}function de(u){switch(u){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Ot(u){return u.search(/\.jpe?g($|\?)/i)>0||u.search(/^data\:image\/jpeg/)===0?"image/jpeg":u.search(/\.webp($|\?)/i)>0||u.search(/^data\:image\/webp/)===0?"image/webp":u.search(/\.ktx2($|\?)/i)>0||u.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vt=new c.Matrix4;class It{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new st,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let o=!1,s=-1,i=!1,n=-1;if(typeof navigator!="undefined"){const a=navigator.userAgent;o=/^((?!chrome|android).)*safari/i.test(a)===!0;const r=a.match(/Version\/(\d+)/);s=o&&r?parseInt(r[1],10):-1,i=a.indexOf("Firefox")>-1,n=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap=="undefined"||o&&s<17||i&&n<98?this.textureLoader=new c.TextureLoader(this.options.manager):this.textureLoader=new c.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new c.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const o=this,s=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(n){return n._markDefs&&n._markDefs()}),Promise.all(this._invokeAll(function(n){return n.beforeRoot&&n.beforeRoot()})).then(function(){return Promise.all([o.getDependencies("scene"),o.getDependencies("animation"),o.getDependencies("camera")])}).then(function(n){const a={scene:n[0][s.scene||0],scenes:n[0],animations:n[1],cameras:n[2],asset:s.asset,parser:o,userData:{}};return W(i,a,s),z(a,s),Promise.all(o._invokeAll(function(r){return r.afterRoot&&r.afterRoot(a)})).then(function(){for(const r of a.scenes)r.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],o=this.json.meshes||[];for(let s=0,i=t.length;s<i;s++){const n=t[s].joints;for(let a=0,r=n.length;a<r;a++)e[n[a]].isBone=!0}for(let s=0,i=e.length;s<i;s++){const n=e[s];n.mesh!==void 0&&(this._addNodeRef(this.meshCache,n.mesh),n.skin!==void 0&&(o[n.mesh].isSkinnedMesh=!0)),n.camera!==void 0&&this._addNodeRef(this.cameraCache,n.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,o){if(e.refs[t]<=1)return o;const s=o.clone(),i=(n,a)=>{const r=this.associations.get(n);r!=null&&this.associations.set(a,r);for(const[l,d]of n.children.entries())i(d,a.children[l])};return i(o,s),s.name+="_instance_"+e.uses[t]++,s}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let o=0;o<t.length;o++){const s=e(t[o]);if(s)return s}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const o=[];for(let s=0;s<t.length;s++){const i=e(t[s]);i&&o.push(i)}return o}getDependency(e,t){const o=e+":"+t;let s=this.cache.get(o);if(!s){switch(e){case"scene":s=this.loadScene(t);break;case"node":s=this._invokeOne(function(i){return i.loadNode&&i.loadNode(t)});break;case"mesh":s=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(t)});break;case"accessor":s=this.loadAccessor(t);break;case"bufferView":s=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(t)});break;case"buffer":s=this.loadBuffer(t);break;case"material":s=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(t)});break;case"texture":s=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(t)});break;case"skin":s=this.loadSkin(t);break;case"animation":s=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(t)});break;case"camera":s=this.loadCamera(t);break;default:if(s=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(e,t)}),!s)throw new Error("Unknown type: "+e);break}this.cache.add(o,s)}return s}getDependencies(e){let t=this.cache.get(e);if(!t){const o=this,s=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(s.map(function(i,n){return o.getDependency(e,n)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],o=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[M.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(i,n){o.load(c.LoaderUtils.resolveURL(t.uri,s.path),i,void 0,function(){n(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(o){const s=t.byteLength||0,i=t.byteOffset||0;return o.slice(i,i+s)})}loadAccessor(e){const t=this,o=this.json,s=this.json.accessors[e];if(s.bufferView===void 0&&s.sparse===void 0){const n=re[s.type],a=Q[s.componentType],r=s.normalized===!0,l=new a(s.count*n);return Promise.resolve(new c.BufferAttribute(l,n,r))}const i=[];return s.bufferView!==void 0?i.push(this.getDependency("bufferView",s.bufferView)):i.push(null),s.sparse!==void 0&&(i.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(i).then(function(n){const a=n[0],r=re[s.type],l=Q[s.componentType],d=l.BYTES_PER_ELEMENT,h=d*r,f=s.byteOffset||0,m=s.bufferView!==void 0?o.bufferViews[s.bufferView].byteStride:void 0,p=s.normalized===!0;let g,_;if(m&&m!==h){const y=Math.floor(f/m),b="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+y+":"+s.count;let C=t.cache.get(b);C||(g=new l(a,y*m,s.count*m/d),C=new c.InterleavedBuffer(g,m/d),t.cache.add(b,C)),_=new c.InterleavedBufferAttribute(C,r,f%m/d,p)}else a===null?g=new l(s.count*r):g=new l(a,f,s.count*r),_=new c.BufferAttribute(g,r,p);if(s.sparse!==void 0){const y=re.SCALAR,b=Q[s.sparse.indices.componentType],C=s.sparse.indices.byteOffset||0,x=s.sparse.values.byteOffset||0,v=new b(n[1],C,s.sparse.count*y),B=new l(n[2],x,s.sparse.count*r);a!==null&&(_=new c.BufferAttribute(_.array.slice(),_.itemSize,_.normalized)),_.normalized=!1;for(let k=0,w=v.length;k<w;k++){const V=v[k];if(_.setX(V,B[k*r]),r>=2&&_.setY(V,B[k*r+1]),r>=3&&_.setZ(V,B[k*r+2]),r>=4&&_.setW(V,B[k*r+3]),r>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}_.normalized=p}return _})}loadTexture(e){const t=this.json,o=this.options,i=t.textures[e].source,n=t.images[i];let a=this.textureLoader;if(n.uri){const r=o.manager.getHandler(n.uri);r!==null&&(a=r)}return this.loadTextureImage(e,i,a)}loadTextureImage(e,t,o){const s=this,i=this.json,n=i.textures[e],a=i.images[t],r=(a.uri||a.bufferView)+":"+n.sampler;if(this.textureCache[r])return this.textureCache[r];const l=this.loadImageSource(t,o).then(function(d){d.flipY=!1,d.name=n.name||a.name||"",d.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(d.name=a.uri);const f=(i.samplers||{})[n.sampler]||{};return d.magFilter=Me[f.magFilter]||c.LinearFilter,d.minFilter=Me[f.minFilter]||c.LinearMipmapLinearFilter,d.wrapS=we[f.wrapS]||c.RepeatWrapping,d.wrapT=we[f.wrapT]||c.RepeatWrapping,d.generateMipmaps=!d.isCompressedTexture&&d.minFilter!==c.NearestFilter&&d.minFilter!==c.LinearFilter,s.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[r]=l,l}loadImageSource(e,t){const o=this,s=this.json,i=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(h=>h.clone());const n=s.images[e],a=self.URL||self.webkitURL;let r=n.uri||"",l=!1;if(n.bufferView!==void 0)r=o.getDependency("bufferView",n.bufferView).then(function(h){l=!0;const f=new Blob([h],{type:n.mimeType});return r=a.createObjectURL(f),r});else if(n.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(r).then(function(h){return new Promise(function(f,m){let p=f;t.isImageBitmapLoader===!0&&(p=function(g){const _=new c.Texture(g);_.needsUpdate=!0,f(_)}),t.load(c.LoaderUtils.resolveURL(h,i.path),p,void 0,m)})}).then(function(h){return l===!0&&a.revokeObjectURL(r),z(h,n),h.userData.mimeType=n.mimeType||Ot(n.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",r),h});return this.sourceCache[e]=d,d}assignTexture(e,t,o,s){const i=this;return this.getDependency("texture",o.index).then(function(n){if(!n)return null;if(o.texCoord!==void 0&&o.texCoord>0&&(n=n.clone(),n.channel=o.texCoord),i.extensions[M.KHR_TEXTURE_TRANSFORM]){const a=o.extensions!==void 0?o.extensions[M.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const r=i.associations.get(n);n=i.extensions[M.KHR_TEXTURE_TRANSFORM].extendTexture(n,a),i.associations.set(n,r)}}return s!==void 0&&(n.colorSpace=s),e[t]=n,n})}assignFinalMaterial(e){const t=e.geometry;let o=e.material;const s=t.attributes.tangent===void 0,i=t.attributes.color!==void 0,n=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+o.uuid;let r=this.cache.get(a);r||(r=new c.PointsMaterial,c.Material.prototype.copy.call(r,o),r.color.copy(o.color),r.map=o.map,r.sizeAttenuation=!1,this.cache.add(a,r)),o=r}else if(e.isLine){const a="LineBasicMaterial:"+o.uuid;let r=this.cache.get(a);r||(r=new c.LineBasicMaterial,c.Material.prototype.copy.call(r,o),r.color.copy(o.color),r.map=o.map,this.cache.add(a,r)),o=r}if(s||i||n){let a="ClonedMaterial:"+o.uuid+":";s&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),n&&(a+="flat-shading:");let r=this.cache.get(a);r||(r=o.clone(),i&&(r.vertexColors=!0),n&&(r.flatShading=!0),s&&(r.normalScale&&(r.normalScale.y*=-1),r.clearcoatNormalScale&&(r.clearcoatNormalScale.y*=-1)),this.cache.add(a,r),this.associations.set(r,this.associations.get(o))),o=r}e.material=o}getMaterialType(){return c.MeshStandardMaterial}loadMaterial(e){const t=this,o=this.json,s=this.extensions,i=o.materials[e];let n;const a={},r=i.extensions||{},l=[];if(r[M.KHR_MATERIALS_UNLIT]){const h=s[M.KHR_MATERIALS_UNLIT];n=h.getMaterialType(),l.push(h.extendParams(a,i,t))}else{const h=i.pbrMetallicRoughness||{};if(a.color=new c.Color(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const f=h.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],c.LinearSRGBColorSpace),a.opacity=f[3]}h.baseColorTexture!==void 0&&l.push(t.assignTexture(a,"map",h.baseColorTexture,c.SRGBColorSpace)),a.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,a.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(l.push(t.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),l.push(t.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),n=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(e)}),l.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(e,a)})))}i.doubleSided===!0&&(a.side=c.DoubleSide);const d=i.alphaMode||ae.OPAQUE;if(d===ae.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,d===ae.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&n!==c.MeshBasicMaterial&&(l.push(t.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new c.Vector2(1,1),i.normalTexture.scale!==void 0)){const h=i.normalTexture.scale;a.normalScale.set(h,h)}if(i.occlusionTexture!==void 0&&n!==c.MeshBasicMaterial&&(l.push(t.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&n!==c.MeshBasicMaterial){const h=i.emissiveFactor;a.emissive=new c.Color().setRGB(h[0],h[1],h[2],c.LinearSRGBColorSpace)}return i.emissiveTexture!==void 0&&n!==c.MeshBasicMaterial&&l.push(t.assignTexture(a,"emissiveMap",i.emissiveTexture,c.SRGBColorSpace)),Promise.all(l).then(function(){const h=new n(a);return i.name&&(h.name=i.name),z(h,i),t.associations.set(h,{materials:e}),i.extensions&&W(s,h,i),h})}createUniqueName(e){const t=c.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,o=this.extensions,s=this.primitiveCache;function i(a){return o[M.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(r){return Le(r,a,t)})}const n=[];for(let a=0,r=e.length;a<r;a++){const l=e[a],d=Pt(l),h=s[d];if(h)n.push(h.promise);else{let f;l.extensions&&l.extensions[M.KHR_DRACO_MESH_COMPRESSION]?f=i(l):f=Le(new c.BufferGeometry,l,t),s[d]={primitive:l,promise:f},n.push(f)}}return Promise.all(n)}loadMesh(e){const t=this,o=this.json,s=this.extensions,i=o.meshes[e],n=i.primitives,a=[];for(let r=0,l=n.length;r<l;r++){const d=n[r].material===void 0?Lt(this.cache):this.getDependency("material",n[r].material);a.push(d)}return a.push(t.loadGeometries(n)),Promise.all(a).then(function(r){const l=r.slice(0,r.length-1),d=r[r.length-1],h=[];for(let m=0,p=d.length;m<p;m++){const g=d[m],_=n[m];let y;const b=l[m];if(_.mode===G.TRIANGLES||_.mode===G.TRIANGLE_STRIP||_.mode===G.TRIANGLE_FAN||_.mode===void 0)y=i.isSkinnedMesh===!0?new c.SkinnedMesh(g,b):new c.Mesh(g,b),y.isSkinnedMesh===!0&&y.normalizeSkinWeights(),_.mode===G.TRIANGLE_STRIP?y.geometry=xe(y.geometry,c.TriangleStripDrawMode):_.mode===G.TRIANGLE_FAN&&(y.geometry=xe(y.geometry,c.TriangleFanDrawMode));else if(_.mode===G.LINES)y=new c.LineSegments(g,b);else if(_.mode===G.LINE_STRIP)y=new c.Line(g,b);else if(_.mode===G.LINE_LOOP)y=new c.LineLoop(g,b);else if(_.mode===G.POINTS)y=new c.Points(g,b);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+_.mode);Object.keys(y.geometry.morphAttributes).length>0&&Dt(y,i),y.name=t.createUniqueName(i.name||"mesh_"+e),z(y,i),_.extensions&&W(s,y,_),t.assignFinalMaterial(y),h.push(y)}for(let m=0,p=h.length;m<p;m++)t.associations.set(h[m],{meshes:e,primitives:m});if(h.length===1)return i.extensions&&W(s,h[0],i),h[0];const f=new c.Group;i.extensions&&W(s,f,i),t.associations.set(f,{meshes:e});for(let m=0,p=h.length;m<p;m++)f.add(h[m]);return f})}loadCamera(e){let t;const o=this.json.cameras[e],s=o[o.type];if(!s){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return o.type==="perspective"?t=new c.PerspectiveCamera(c.MathUtils.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):o.type==="orthographic"&&(t=new c.OrthographicCamera(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),o.name&&(t.name=this.createUniqueName(o.name)),z(t,o),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],o=[];for(let s=0,i=t.joints.length;s<i;s++)o.push(this._loadNodeShallow(t.joints[s]));return t.inverseBindMatrices!==void 0?o.push(this.getDependency("accessor",t.inverseBindMatrices)):o.push(null),Promise.all(o).then(function(s){const i=s.pop(),n=s,a=[],r=[];for(let l=0,d=n.length;l<d;l++){const h=n[l];if(h){a.push(h);const f=new c.Matrix4;i!==null&&f.fromArray(i.array,l*16),r.push(f)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[l])}return new c.Skeleton(a,r)})}loadAnimation(e){const t=this.json,o=this,s=t.animations[e],i=s.name?s.name:"animation_"+e,n=[],a=[],r=[],l=[],d=[];for(let h=0,f=s.channels.length;h<f;h++){const m=s.channels[h],p=s.samplers[m.sampler],g=m.target,_=g.node,y=s.parameters!==void 0?s.parameters[p.input]:p.input,b=s.parameters!==void 0?s.parameters[p.output]:p.output;g.node!==void 0&&(n.push(this.getDependency("node",_)),a.push(this.getDependency("accessor",y)),r.push(this.getDependency("accessor",b)),l.push(p),d.push(g))}return Promise.all([Promise.all(n),Promise.all(a),Promise.all(r),Promise.all(l),Promise.all(d)]).then(function(h){const f=h[0],m=h[1],p=h[2],g=h[3],_=h[4],y=[];for(let b=0,C=f.length;b<C;b++){const x=f[b],v=m[b],B=p[b],k=g[b],w=_[b];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const V=o._createAnimationTracks(x,v,B,k,w);if(V)for(let $=0;$<V.length;$++)y.push(V[$])}return new c.AnimationClip(i,void 0,y)})}createNodeMesh(e){const t=this.json,o=this,s=t.nodes[e];return s.mesh===void 0?null:o.getDependency("mesh",s.mesh).then(function(i){const n=o._getNodeRef(o.meshCache,s.mesh,i);return s.weights!==void 0&&n.traverse(function(a){if(a.isMesh)for(let r=0,l=s.weights.length;r<l;r++)a.morphTargetInfluences[r]=s.weights[r]}),n})}loadNode(e){const t=this.json,o=this,s=t.nodes[e],i=o._loadNodeShallow(e),n=[],a=s.children||[];for(let l=0,d=a.length;l<d;l++)n.push(o.getDependency("node",a[l]));const r=s.skin===void 0?Promise.resolve(null):o.getDependency("skin",s.skin);return Promise.all([i,Promise.all(n),r]).then(function(l){const d=l[0],h=l[1],f=l[2];f!==null&&d.traverse(function(m){m.isSkinnedMesh&&m.bind(f,vt)});for(let m=0,p=h.length;m<p;m++)d.add(h[m]);return d})}_loadNodeShallow(e){const t=this.json,o=this.extensions,s=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const i=t.nodes[e],n=i.name?s.createUniqueName(i.name):"",a=[],r=s._invokeOne(function(l){return l.createNodeMesh&&l.createNodeMesh(e)});return r&&a.push(r),i.camera!==void 0&&a.push(s.getDependency("camera",i.camera).then(function(l){return s._getNodeRef(s.cameraCache,i.camera,l)})),s._invokeAll(function(l){return l.createNodeAttachment&&l.createNodeAttachment(e)}).forEach(function(l){a.push(l)}),this.nodeCache[e]=Promise.all(a).then(function(l){let d;if(i.isBone===!0?d=new c.Bone:l.length>1?d=new c.Group:l.length===1?d=l[0]:d=new c.Object3D,d!==l[0])for(let h=0,f=l.length;h<f;h++)d.add(l[h]);if(i.name&&(d.userData.name=i.name,d.name=n),z(d,i),i.extensions&&W(o,d,i),i.matrix!==void 0){const h=new c.Matrix4;h.fromArray(i.matrix),d.applyMatrix4(h)}else i.translation!==void 0&&d.position.fromArray(i.translation),i.rotation!==void 0&&d.quaternion.fromArray(i.rotation),i.scale!==void 0&&d.scale.fromArray(i.scale);return s.associations.has(d)||s.associations.set(d,{}),s.associations.get(d).nodes=e,d}),this.nodeCache[e]}loadScene(e){const t=this.extensions,o=this.json.scenes[e],s=this,i=new c.Group;o.name&&(i.name=s.createUniqueName(o.name)),z(i,o),o.extensions&&W(t,i,o);const n=o.nodes||[],a=[];for(let r=0,l=n.length;r<l;r++)a.push(s.getDependency("node",n[r]));return Promise.all(a).then(function(r){for(let d=0,h=r.length;d<h;d++)i.add(r[d]);const l=d=>{const h=new Map;for(const[f,m]of s.associations)(f instanceof c.Material||f instanceof c.Texture)&&h.set(f,m);return d.traverse(f=>{const m=s.associations.get(f);m!=null&&h.set(f,m)}),h};return s.associations=l(i),i})}_createAnimationTracks(e,t,o,s,i){const n=[],a=e.name?e.name:e.uuid,r=[];Y[i.path]===Y.weights?e.traverse(function(f){f.morphTargetInfluences&&r.push(f.name?f.name:f.uuid)}):r.push(a);let l;switch(Y[i.path]){case Y.weights:l=c.NumberKeyframeTrack;break;case Y.rotation:l=c.QuaternionKeyframeTrack;break;case Y.position:case Y.scale:l=c.VectorKeyframeTrack;break;default:o.itemSize===1?l=c.NumberKeyframeTrack:l=c.VectorKeyframeTrack;break}const d=s.interpolation!==void 0?wt[s.interpolation]:c.InterpolateLinear,h=this._getArrayFromAccessor(o);for(let f=0,m=r.length;f<m;f++){const p=new l(r[f]+"."+Y[i.path],t.array,h,d);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(p),n.push(p)}return n}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const o=de(t.constructor),s=new Float32Array(t.length);for(let i=0,n=t.length;i<n;i++)s[i]=t[i]*o;t=s}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(o){const s=this instanceof c.QuaternionKeyframeTrack?Mt:ke;return new s(this.times,this.values,this.getValueSize()/3,o)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Nt(u,e,t){const o=e.attributes,s=new c.Box3;if(o.POSITION!==void 0){const a=t.json.accessors[o.POSITION],r=a.min,l=a.max;if(r!==void 0&&l!==void 0){if(s.set(new c.Vector3(r[0],r[1],r[2]),new c.Vector3(l[0],l[1],l[2])),a.normalized){const d=de(Q[a.componentType]);s.min.multiplyScalar(d),s.max.multiplyScalar(d)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=e.targets;if(i!==void 0){const a=new c.Vector3,r=new c.Vector3;for(let l=0,d=i.length;l<d;l++){const h=i[l];if(h.POSITION!==void 0){const f=t.json.accessors[h.POSITION],m=f.min,p=f.max;if(m!==void 0&&p!==void 0){if(r.setX(Math.max(Math.abs(m[0]),Math.abs(p[0]))),r.setY(Math.max(Math.abs(m[1]),Math.abs(p[1]))),r.setZ(Math.max(Math.abs(m[2]),Math.abs(p[2]))),f.normalized){const g=de(Q[f.componentType]);r.multiplyScalar(g)}a.max(r)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(a)}u.boundingBox=s;const n=new c.Sphere;s.getCenter(n.center),n.radius=s.min.distanceTo(s.max)/2,u.boundingSphere=n}function Le(u,e,t){const o=e.attributes,s=[];function i(n,a){return t.getDependency("accessor",n).then(function(r){u.setAttribute(a,r)})}for(const n in o){const a=ue[n]||n.toLowerCase();a in u.attributes||s.push(i(o[n],a))}if(e.indices!==void 0&&!u.index){const n=t.getDependency("accessor",e.indices).then(function(a){u.setIndex(a)});s.push(n)}return c.ColorManagement.workingColorSpace!==c.LinearSRGBColorSpace&&"COLOR_0"in o&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${c.ColorManagement.workingColorSpace}" not supported.`),z(u,e),Nt(u,e,t),Promise.all(s).then(function(){return e.targets!==void 0?Ct(u,e.targets,t):u})}const le=new WeakMap;class kt extends c.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,o,s){const i=new c.FileLoader(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,n=>{this.parse(n,t,s)},o,s)}parse(e,t,o=()=>{}){this.decodeDracoFile(e,t,null,null,c.SRGBColorSpace,o).catch(o)}decodeDracoFile(e,t,o,s,i=c.LinearSRGBColorSpace,n=()=>{}){const a={attributeIDs:o||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!o,vertexColorSpace:i};return this.decodeGeometry(e,a).then(t).catch(n)}decodeGeometry(e,t){const o=JSON.stringify(t);if(le.has(e)){const r=le.get(e);if(r.key===o)return r.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const i=this.workerNextTaskID++,n=e.byteLength,a=this._getWorker(i,n).then(r=>(s=r,new Promise((l,d)=>{s._callbacks[i]={resolve:l,reject:d},s.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))).then(r=>this._createGeometry(r.geometry));return a.catch(()=>!0).then(()=>{s&&i&&this._releaseTask(s,i)}),le.set(e,{key:o,promise:a}),a}_createGeometry(e){const t=new c.BufferGeometry;e.index&&t.setIndex(new c.BufferAttribute(e.index.array,1));for(let o=0;o<e.attributes.length;o++){const s=e.attributes[o],i=s.name,n=s.array,a=s.itemSize,r=new c.BufferAttribute(n,a);i==="color"&&(this._assignVertexColorSpace(r,s.vertexColorSpace),r.normalized=!(n instanceof Float32Array)),t.setAttribute(i,r)}return t}_assignVertexColorSpace(e,t){if(t!==c.SRGBColorSpace)return;const o=new c.Color;for(let s=0,i=e.count;s<i;s++)o.fromBufferAttribute(e,s),c.ColorManagement.toWorkingColorSpace(o,c.SRGBColorSpace),e.setXYZ(s,o.r,o.g,o.b)}_loadLibrary(e,t){const o=new c.FileLoader(this.manager);return o.setPath(this.decoderPath),o.setResponseType(t),o.setWithCredentials(this.withCredentials),new Promise((s,i)=>{o.load(e,s,void 0,i)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(o=>{const s=o[0];e||(this.decoderConfig.wasmBinary=o[1]);const i=Ft.toString(),n=["/* draco decoder */",s,"","/* worker */",i.substring(i.indexOf("{")+1,i.lastIndexOf("}"))].join(`
|
|
1
|
+
"use strict";var We=Object.defineProperty,qe=Object.defineProperties;var Ze=Object.getOwnPropertyDescriptors;var Te=Object.getOwnPropertySymbols;var Qe=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Ae=(u,e,t)=>e in u?We(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ye=(u,e)=>{for(var t in e||(e={}))Qe.call(e,t)&&Ae(u,t,e[t]);if(Te)for(var t of Te(e))$e.call(e,t)&&Ae(u,t,e[t]);return u},be=(u,e)=>qe(u,Ze(e));var Ee=(u,e,t)=>new Promise((o,s)=>{var i=r=>{try{a(t.next(r))}catch(l){s(l)}},n=r=>{try{a(t.throw(r))}catch(l){s(l)}},a=r=>r.done?o(r.value):Promise.resolve(r.value).then(i,n);a((t=t.apply(u,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("vue");require("html2canvas");const Je=require("./element-resize-detector-DYs3pJPp.cjs"),et=require("./index-ZwyqrmaH.cjs"),c=require("./three.module-DNVo041Q.cjs"),Se=require("./ele-glbModel-icon-ByACDCrv.cjs");function xe(u,e){if(e===c.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),u;if(e===c.TriangleFanDrawMode||e===c.TriangleStripDrawMode){let t=u.getIndex();if(t===null){const n=[],a=u.getAttribute("position");if(a!==void 0){for(let r=0;r<a.count;r++)n.push(r);u.setIndex(n),t=u.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),u}const o=t.count-2,s=[];if(e===c.TriangleFanDrawMode)for(let n=1;n<=o;n++)s.push(t.getX(0)),s.push(t.getX(n)),s.push(t.getX(n+1));else for(let n=0;n<o;n++)n%2===0?(s.push(t.getX(n)),s.push(t.getX(n+1)),s.push(t.getX(n+2))):(s.push(t.getX(n+2)),s.push(t.getX(n+1)),s.push(t.getX(n)));s.length/3!==o&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=u.clone();return i.setIndex(s),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),u}class tt extends c.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new rt(t)}),this.register(function(t){return new at(t)}),this.register(function(t){return new gt(t)}),this.register(function(t){return new _t(t)}),this.register(function(t){return new Tt(t)}),this.register(function(t){return new lt(t)}),this.register(function(t){return new ht(t)}),this.register(function(t){return new ut(t)}),this.register(function(t){return new dt(t)}),this.register(function(t){return new ot(t)}),this.register(function(t){return new ft(t)}),this.register(function(t){return new ct(t)}),this.register(function(t){return new mt(t)}),this.register(function(t){return new pt(t)}),this.register(function(t){return new nt(t)}),this.register(function(t){return new At(t)}),this.register(function(t){return new yt(t)})}load(e,t,o,s){const i=this;let n;if(this.resourcePath!=="")n=this.resourcePath;else if(this.path!==""){const l=c.LoaderUtils.extractUrlBase(e);n=c.LoaderUtils.resolveURL(l,this.path)}else n=c.LoaderUtils.extractUrlBase(e);this.manager.itemStart(e);const a=function(l){s?s(l):console.error(l),i.manager.itemError(e),i.manager.itemEnd(e)},r=new c.FileLoader(this.manager);r.setPath(this.path),r.setResponseType("arraybuffer"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(e,function(l){try{i.parse(l,n,function(d){t(d),i.manager.itemEnd(e)},a)}catch(d){a(d)}},o,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,o,s){let i;const n={},a={},r=new TextDecoder;if(typeof e=="string")i=JSON.parse(e);else if(e instanceof ArrayBuffer)if(r.decode(new Uint8Array(e,0,4))===Ne){try{n[M.KHR_BINARY_GLTF]=new bt(e)}catch(h){s&&s(h);return}i=JSON.parse(n[M.KHR_BINARY_GLTF].content)}else i=JSON.parse(r.decode(e));else i=e;if(i.asset===void 0||i.asset.version[0]<2){s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const l=new It(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d<this.pluginCallbacks.length;d++){const h=this.pluginCallbacks[d](l);h.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[h.name]=h,n[h.name]=!0}if(i.extensionsUsed)for(let d=0;d<i.extensionsUsed.length;++d){const h=i.extensionsUsed[d],f=i.extensionsRequired||[];switch(h){case M.KHR_MATERIALS_UNLIT:n[h]=new it;break;case M.KHR_DRACO_MESH_COMPRESSION:n[h]=new Et(i,this.dracoLoader);break;case M.KHR_TEXTURE_TRANSFORM:n[h]=new St;break;case M.KHR_MESH_QUANTIZATION:n[h]=new xt;break;default:f.indexOf(h)>=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}l.setExtensions(n),l.setPlugins(a),l.parse(o,s)}parseAsync(e,t){const o=this;return new Promise(function(s,i){o.parse(e,t,s,i)})}}function st(){let u={};return{get:function(e){return u[e]},add:function(e,t){u[e]=t},remove:function(e){delete u[e]},removeAll:function(){u={}}}}const M={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class nt{constructor(e){this.parser=e,this.name=M.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let o=0,s=t.length;o<s;o++){const i=t[o];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(e){const t=this.parser,o="light:"+e;let s=t.cache.get(o);if(s)return s;const i=t.json,r=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e];let l;const d=new c.Color(16777215);r.color!==void 0&&d.setRGB(r.color[0],r.color[1],r.color[2],c.LinearSRGBColorSpace);const h=r.range!==void 0?r.range:0;switch(r.type){case"directional":l=new c.DirectionalLight(d),l.target.position.set(0,0,-1),l.add(l.target);break;case"point":l=new c.PointLight(d),l.distance=h;break;case"spot":l=new c.SpotLight(d),l.distance=h,r.spot=r.spot||{},r.spot.innerConeAngle=r.spot.innerConeAngle!==void 0?r.spot.innerConeAngle:0,r.spot.outerConeAngle=r.spot.outerConeAngle!==void 0?r.spot.outerConeAngle:Math.PI/4,l.angle=r.spot.outerConeAngle,l.penumbra=1-r.spot.innerConeAngle/r.spot.outerConeAngle,l.target.position.set(0,0,-1),l.add(l.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+r.type)}return l.position.set(0,0,0),l.decay=2,z(l,r),r.intensity!==void 0&&(l.intensity=r.intensity),l.name=t.createUniqueName(r.name||"light_"+e),s=Promise.resolve(l),t.cache.add(o,s),s}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,o=this.parser,i=o.json.nodes[e],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(r){return o._getNodeRef(t.cache,a,r)})}}class it{constructor(){this.name=M.KHR_MATERIALS_UNLIT}getMaterialType(){return c.MeshBasicMaterial}extendParams(e,t,o){const s=[];e.color=new c.Color(1,1,1),e.opacity=1;const i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const n=i.baseColorFactor;e.color.setRGB(n[0],n[1],n[2],c.LinearSRGBColorSpace),e.opacity=n[3]}i.baseColorTexture!==void 0&&s.push(o.assignTexture(e,"map",i.baseColorTexture,c.SRGBColorSpace))}return Promise.all(s)}}class ot{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name].emissiveStrength;return i!==void 0&&(t.emissiveIntensity=i),Promise.resolve()}}class rt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];if(n.clearcoatFactor!==void 0&&(t.clearcoat=n.clearcoatFactor),n.clearcoatTexture!==void 0&&i.push(o.assignTexture(t,"clearcoatMap",n.clearcoatTexture)),n.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=n.clearcoatRoughnessFactor),n.clearcoatRoughnessTexture!==void 0&&i.push(o.assignTexture(t,"clearcoatRoughnessMap",n.clearcoatRoughnessTexture)),n.clearcoatNormalTexture!==void 0&&(i.push(o.assignTexture(t,"clearcoatNormalMap",n.clearcoatNormalTexture)),n.clearcoatNormalTexture.scale!==void 0)){const a=n.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new c.Vector2(a,a)}return Promise.all(i)}}class at{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_DISPERSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name];return t.dispersion=i.dispersion!==void 0?i.dispersion:0,Promise.resolve()}}class ct{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.iridescenceFactor!==void 0&&(t.iridescence=n.iridescenceFactor),n.iridescenceTexture!==void 0&&i.push(o.assignTexture(t,"iridescenceMap",n.iridescenceTexture)),n.iridescenceIor!==void 0&&(t.iridescenceIOR=n.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),n.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=n.iridescenceThicknessMinimum),n.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=n.iridescenceThicknessMaximum),n.iridescenceThicknessTexture!==void 0&&i.push(o.assignTexture(t,"iridescenceThicknessMap",n.iridescenceThicknessTexture)),Promise.all(i)}}class lt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_SHEEN}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[];t.sheenColor=new c.Color(0,0,0),t.sheenRoughness=0,t.sheen=1;const n=s.extensions[this.name];if(n.sheenColorFactor!==void 0){const a=n.sheenColorFactor;t.sheenColor.setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace)}return n.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=n.sheenRoughnessFactor),n.sheenColorTexture!==void 0&&i.push(o.assignTexture(t,"sheenColorMap",n.sheenColorTexture,c.SRGBColorSpace)),n.sheenRoughnessTexture!==void 0&&i.push(o.assignTexture(t,"sheenRoughnessMap",n.sheenRoughnessTexture)),Promise.all(i)}}class ht{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.transmissionFactor!==void 0&&(t.transmission=n.transmissionFactor),n.transmissionTexture!==void 0&&i.push(o.assignTexture(t,"transmissionMap",n.transmissionTexture)),Promise.all(i)}}class ut{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_VOLUME}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];t.thickness=n.thicknessFactor!==void 0?n.thicknessFactor:0,n.thicknessTexture!==void 0&&i.push(o.assignTexture(t,"thicknessMap",n.thicknessTexture)),t.attenuationDistance=n.attenuationDistance||1/0;const a=n.attenuationColor||[1,1,1];return t.attenuationColor=new c.Color().setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace),Promise.all(i)}}class dt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_IOR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const s=this.parser.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=s.extensions[this.name];return t.ior=i.ior!==void 0?i.ior:1.5,Promise.resolve()}}class ft{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_SPECULAR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];t.specularIntensity=n.specularFactor!==void 0?n.specularFactor:1,n.specularTexture!==void 0&&i.push(o.assignTexture(t,"specularIntensityMap",n.specularTexture));const a=n.specularColorFactor||[1,1,1];return t.specularColor=new c.Color().setRGB(a[0],a[1],a[2],c.LinearSRGBColorSpace),n.specularColorTexture!==void 0&&i.push(o.assignTexture(t,"specularColorMap",n.specularColorTexture,c.SRGBColorSpace)),Promise.all(i)}}class pt{constructor(e){this.parser=e,this.name=M.EXT_MATERIALS_BUMP}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return t.bumpScale=n.bumpFactor!==void 0?n.bumpFactor:1,n.bumpTexture!==void 0&&i.push(o.assignTexture(t,"bumpMap",n.bumpTexture)),Promise.all(i)}}class mt{constructor(e){this.parser=e,this.name=M.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:c.MeshPhysicalMaterial}extendMaterialParams(e,t){const o=this.parser,s=o.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const i=[],n=s.extensions[this.name];return n.anisotropyStrength!==void 0&&(t.anisotropy=n.anisotropyStrength),n.anisotropyRotation!==void 0&&(t.anisotropyRotation=n.anisotropyRotation),n.anisotropyTexture!==void 0&&i.push(o.assignTexture(t,"anisotropyMap",n.anisotropyTexture)),Promise.all(i)}}class gt{constructor(e){this.parser=e,this.name=M.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,o=t.json,s=o.textures[e];if(!s.extensions||!s.extensions[this.name])return null;const i=s.extensions[this.name],n=t.options.ktx2Loader;if(!n){if(o.extensionsRequired&&o.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,n)}}class _t{constructor(e){this.parser=e,this.name=M.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,o=this.parser,s=o.json,i=s.textures[e];if(!i.extensions||!i.extensions[t])return null;const n=i.extensions[t],a=s.images[n.source];let r=o.textureLoader;if(a.uri){const l=o.options.manager.getHandler(a.uri);l!==null&&(r=l)}return this.detectSupport().then(function(l){if(l)return o.loadTextureImage(e,n.source,r);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Tt{constructor(e){this.parser=e,this.name=M.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,o=this.parser,s=o.json,i=s.textures[e];if(!i.extensions||!i.extensions[t])return null;const n=i.extensions[t],a=s.images[n.source];let r=o.textureLoader;if(a.uri){const l=o.options.manager.getHandler(a.uri);l!==null&&(r=l)}return this.detectSupport().then(function(l){if(l)return o.loadTextureImage(e,n.source,r);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class At{constructor(e){this.name=M.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,o=t.bufferViews[e];if(o.extensions&&o.extensions[this.name]){const s=o.extensions[this.name],i=this.parser.getDependency("buffer",s.buffer),n=this.parser.options.meshoptDecoder;if(!n||!n.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then(function(a){const r=s.byteOffset||0,l=s.byteLength||0,d=s.count,h=s.byteStride,f=new Uint8Array(a,r,l);return n.decodeGltfBufferAsync?n.decodeGltfBufferAsync(d,h,f,s.mode,s.filter).then(function(m){return m.buffer}):n.ready.then(function(){const m=new ArrayBuffer(d*h);return n.decodeGltfBuffer(new Uint8Array(m),d,h,f,s.mode,s.filter),m})})}else return null}}class yt{constructor(e){this.name=M.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,o=t.nodes[e];if(!o.extensions||!o.extensions[this.name]||o.mesh===void 0)return null;const s=t.meshes[o.mesh];for(const l of s.primitives)if(l.mode!==G.TRIANGLES&&l.mode!==G.TRIANGLE_STRIP&&l.mode!==G.TRIANGLE_FAN&&l.mode!==void 0)return null;const n=o.extensions[this.name].attributes,a=[],r={};for(const l in n)a.push(this.parser.getDependency("accessor",n[l]).then(d=>(r[l]=d,r[l])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(l=>{const d=l.pop(),h=d.isGroup?d.children:[d],f=l[0].count,m=[];for(const p of h){const g=new c.Matrix4,_=new c.Vector3,y=new c.Quaternion,b=new c.Vector3(1,1,1),C=new c.InstancedMesh(p.geometry,p.material,f);for(let x=0;x<f;x++)r.TRANSLATION&&_.fromBufferAttribute(r.TRANSLATION,x),r.ROTATION&&y.fromBufferAttribute(r.ROTATION,x),r.SCALE&&b.fromBufferAttribute(r.SCALE,x),C.setMatrixAt(x,g.compose(_,y,b));for(const x in r)if(x==="_COLOR_0"){const v=r[x];C.instanceColor=new c.InstancedBufferAttribute(v.array,v.itemSize,v.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&p.geometry.setAttribute(x,r[x]);c.Object3D.prototype.copy.call(C,p),this.parser.assignFinalMaterial(C),m.push(C)}return d.isGroup?(d.clear(),d.add(...m),d):m[0]}))}}const Ne="glTF",ee=12,Re={JSON:1313821514,BIN:5130562};class bt{constructor(e){this.name=M.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,ee),o=new TextDecoder;if(this.header={magic:o.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Ne)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const s=this.header.length-ee,i=new DataView(e,ee);let n=0;for(;n<s;){const a=i.getUint32(n,!0);n+=4;const r=i.getUint32(n,!0);if(n+=4,r===Re.JSON){const l=new Uint8Array(e,ee+n,a);this.content=o.decode(l)}else if(r===Re.BIN){const l=ee+n;this.body=e.slice(l,l+a)}n+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Et{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=M.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const o=this.json,s=this.dracoLoader,i=e.extensions[this.name].bufferView,n=e.extensions[this.name].attributes,a={},r={},l={};for(const d in n){const h=ue[d]||d.toLowerCase();a[h]=n[d]}for(const d in e.attributes){const h=ue[d]||d.toLowerCase();if(n[d]!==void 0){const f=o.accessors[e.attributes[d]],m=Q[f.componentType];l[h]=m.name,r[h]=f.normalized===!0}}return t.getDependency("bufferView",i).then(function(d){return new Promise(function(h,f){s.decodeDracoFile(d,function(m){for(const p in m.attributes){const g=m.attributes[p],_=r[p];_!==void 0&&(g.normalized=_)}h(m)},a,l,c.LinearSRGBColorSpace,f)})})}}class St{constructor(){this.name=M.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class xt{constructor(){this.name=M.KHR_MESH_QUANTIZATION}}class ke extends c.Interpolant{constructor(e,t,o,s){super(e,t,o,s)}copySampleValue_(e){const t=this.resultBuffer,o=this.sampleValues,s=this.valueSize,i=e*s*3+s;for(let n=0;n!==s;n++)t[n]=o[i+n];return t}interpolate_(e,t,o,s){const i=this.resultBuffer,n=this.sampleValues,a=this.valueSize,r=a*2,l=a*3,d=s-t,h=(o-t)/d,f=h*h,m=f*h,p=e*l,g=p-l,_=-2*m+3*f,y=m-f,b=1-_,C=y-f+h;for(let x=0;x!==a;x++){const v=n[g+x+a],B=n[g+x+r]*d,k=n[p+x+a],w=n[p+x]*d;i[x]=b*v+C*B+_*k+y*w}return i}}const Rt=new c.Quaternion;class Mt extends ke{interpolate_(e,t,o,s){const i=super.interpolate_(e,t,o,s);return Rt.fromArray(i).normalize().toArray(i),i}}const G={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Q={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Me={9728:c.NearestFilter,9729:c.LinearFilter,9984:c.NearestMipmapNearestFilter,9985:c.LinearMipmapNearestFilter,9986:c.NearestMipmapLinearFilter,9987:c.LinearMipmapLinearFilter},we={33071:c.ClampToEdgeWrapping,33648:c.MirroredRepeatWrapping,10497:c.RepeatWrapping},re={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ue={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Y={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},wt={CUBICSPLINE:void 0,LINEAR:c.InterpolateLinear,STEP:c.InterpolateDiscrete},ae={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Lt(u){return u.DefaultMaterial===void 0&&(u.DefaultMaterial=new c.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:c.FrontSide})),u.DefaultMaterial}function W(u,e,t){for(const o in t.extensions)u[o]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[o]=t.extensions[o])}function z(u,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(u.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function Ct(u,e,t){let o=!1,s=!1,i=!1;for(let l=0,d=e.length;l<d;l++){const h=e[l];if(h.POSITION!==void 0&&(o=!0),h.NORMAL!==void 0&&(s=!0),h.COLOR_0!==void 0&&(i=!0),o&&s&&i)break}if(!o&&!s&&!i)return Promise.resolve(u);const n=[],a=[],r=[];for(let l=0,d=e.length;l<d;l++){const h=e[l];if(o){const f=h.POSITION!==void 0?t.getDependency("accessor",h.POSITION):u.attributes.position;n.push(f)}if(s){const f=h.NORMAL!==void 0?t.getDependency("accessor",h.NORMAL):u.attributes.normal;a.push(f)}if(i){const f=h.COLOR_0!==void 0?t.getDependency("accessor",h.COLOR_0):u.attributes.color;r.push(f)}}return Promise.all([Promise.all(n),Promise.all(a),Promise.all(r)]).then(function(l){const d=l[0],h=l[1],f=l[2];return o&&(u.morphAttributes.position=d),s&&(u.morphAttributes.normal=h),i&&(u.morphAttributes.color=f),u.morphTargetsRelative=!0,u})}function Dt(u,e){if(u.updateMorphTargets(),e.weights!==void 0)for(let t=0,o=e.weights.length;t<o;t++)u.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(u.morphTargetInfluences.length===t.length){u.morphTargetDictionary={};for(let o=0,s=t.length;o<s;o++)u.morphTargetDictionary[t[o]]=o}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Pt(u){let e;const t=u.extensions&&u.extensions[M.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+ce(t.attributes):e=u.indices+":"+ce(u.attributes)+":"+u.mode,u.targets!==void 0)for(let o=0,s=u.targets.length;o<s;o++)e+=":"+ce(u.targets[o]);return e}function ce(u){let e="";const t=Object.keys(u).sort();for(let o=0,s=t.length;o<s;o++)e+=t[o]+":"+u[t[o]]+";";return e}function de(u){switch(u){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Ot(u){return u.search(/\.jpe?g($|\?)/i)>0||u.search(/^data\:image\/jpeg/)===0?"image/jpeg":u.search(/\.webp($|\?)/i)>0||u.search(/^data\:image\/webp/)===0?"image/webp":u.search(/\.ktx2($|\?)/i)>0||u.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vt=new c.Matrix4;class It{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new st,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let o=!1,s=-1,i=!1,n=-1;if(typeof navigator!="undefined"){const a=navigator.userAgent;o=/^((?!chrome|android).)*safari/i.test(a)===!0;const r=a.match(/Version\/(\d+)/);s=o&&r?parseInt(r[1],10):-1,i=a.indexOf("Firefox")>-1,n=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap=="undefined"||o&&s<17||i&&n<98?this.textureLoader=new c.TextureLoader(this.options.manager):this.textureLoader=new c.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new c.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const o=this,s=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(n){return n._markDefs&&n._markDefs()}),Promise.all(this._invokeAll(function(n){return n.beforeRoot&&n.beforeRoot()})).then(function(){return Promise.all([o.getDependencies("scene"),o.getDependencies("animation"),o.getDependencies("camera")])}).then(function(n){const a={scene:n[0][s.scene||0],scenes:n[0],animations:n[1],cameras:n[2],asset:s.asset,parser:o,userData:{}};return W(i,a,s),z(a,s),Promise.all(o._invokeAll(function(r){return r.afterRoot&&r.afterRoot(a)})).then(function(){for(const r of a.scenes)r.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],o=this.json.meshes||[];for(let s=0,i=t.length;s<i;s++){const n=t[s].joints;for(let a=0,r=n.length;a<r;a++)e[n[a]].isBone=!0}for(let s=0,i=e.length;s<i;s++){const n=e[s];n.mesh!==void 0&&(this._addNodeRef(this.meshCache,n.mesh),n.skin!==void 0&&(o[n.mesh].isSkinnedMesh=!0)),n.camera!==void 0&&this._addNodeRef(this.cameraCache,n.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,o){if(e.refs[t]<=1)return o;const s=o.clone(),i=(n,a)=>{const r=this.associations.get(n);r!=null&&this.associations.set(a,r);for(const[l,d]of n.children.entries())i(d,a.children[l])};return i(o,s),s.name+="_instance_"+e.uses[t]++,s}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let o=0;o<t.length;o++){const s=e(t[o]);if(s)return s}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const o=[];for(let s=0;s<t.length;s++){const i=e(t[s]);i&&o.push(i)}return o}getDependency(e,t){const o=e+":"+t;let s=this.cache.get(o);if(!s){switch(e){case"scene":s=this.loadScene(t);break;case"node":s=this._invokeOne(function(i){return i.loadNode&&i.loadNode(t)});break;case"mesh":s=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(t)});break;case"accessor":s=this.loadAccessor(t);break;case"bufferView":s=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(t)});break;case"buffer":s=this.loadBuffer(t);break;case"material":s=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(t)});break;case"texture":s=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(t)});break;case"skin":s=this.loadSkin(t);break;case"animation":s=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(t)});break;case"camera":s=this.loadCamera(t);break;default:if(s=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(e,t)}),!s)throw new Error("Unknown type: "+e);break}this.cache.add(o,s)}return s}getDependencies(e){let t=this.cache.get(e);if(!t){const o=this,s=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(s.map(function(i,n){return o.getDependency(e,n)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],o=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[M.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(i,n){o.load(c.LoaderUtils.resolveURL(t.uri,s.path),i,void 0,function(){n(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(o){const s=t.byteLength||0,i=t.byteOffset||0;return o.slice(i,i+s)})}loadAccessor(e){const t=this,o=this.json,s=this.json.accessors[e];if(s.bufferView===void 0&&s.sparse===void 0){const n=re[s.type],a=Q[s.componentType],r=s.normalized===!0,l=new a(s.count*n);return Promise.resolve(new c.BufferAttribute(l,n,r))}const i=[];return s.bufferView!==void 0?i.push(this.getDependency("bufferView",s.bufferView)):i.push(null),s.sparse!==void 0&&(i.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(i).then(function(n){const a=n[0],r=re[s.type],l=Q[s.componentType],d=l.BYTES_PER_ELEMENT,h=d*r,f=s.byteOffset||0,m=s.bufferView!==void 0?o.bufferViews[s.bufferView].byteStride:void 0,p=s.normalized===!0;let g,_;if(m&&m!==h){const y=Math.floor(f/m),b="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+y+":"+s.count;let C=t.cache.get(b);C||(g=new l(a,y*m,s.count*m/d),C=new c.InterleavedBuffer(g,m/d),t.cache.add(b,C)),_=new c.InterleavedBufferAttribute(C,r,f%m/d,p)}else a===null?g=new l(s.count*r):g=new l(a,f,s.count*r),_=new c.BufferAttribute(g,r,p);if(s.sparse!==void 0){const y=re.SCALAR,b=Q[s.sparse.indices.componentType],C=s.sparse.indices.byteOffset||0,x=s.sparse.values.byteOffset||0,v=new b(n[1],C,s.sparse.count*y),B=new l(n[2],x,s.sparse.count*r);a!==null&&(_=new c.BufferAttribute(_.array.slice(),_.itemSize,_.normalized)),_.normalized=!1;for(let k=0,w=v.length;k<w;k++){const V=v[k];if(_.setX(V,B[k*r]),r>=2&&_.setY(V,B[k*r+1]),r>=3&&_.setZ(V,B[k*r+2]),r>=4&&_.setW(V,B[k*r+3]),r>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}_.normalized=p}return _})}loadTexture(e){const t=this.json,o=this.options,i=t.textures[e].source,n=t.images[i];let a=this.textureLoader;if(n.uri){const r=o.manager.getHandler(n.uri);r!==null&&(a=r)}return this.loadTextureImage(e,i,a)}loadTextureImage(e,t,o){const s=this,i=this.json,n=i.textures[e],a=i.images[t],r=(a.uri||a.bufferView)+":"+n.sampler;if(this.textureCache[r])return this.textureCache[r];const l=this.loadImageSource(t,o).then(function(d){d.flipY=!1,d.name=n.name||a.name||"",d.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(d.name=a.uri);const f=(i.samplers||{})[n.sampler]||{};return d.magFilter=Me[f.magFilter]||c.LinearFilter,d.minFilter=Me[f.minFilter]||c.LinearMipmapLinearFilter,d.wrapS=we[f.wrapS]||c.RepeatWrapping,d.wrapT=we[f.wrapT]||c.RepeatWrapping,d.generateMipmaps=!d.isCompressedTexture&&d.minFilter!==c.NearestFilter&&d.minFilter!==c.LinearFilter,s.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[r]=l,l}loadImageSource(e,t){const o=this,s=this.json,i=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(h=>h.clone());const n=s.images[e],a=self.URL||self.webkitURL;let r=n.uri||"",l=!1;if(n.bufferView!==void 0)r=o.getDependency("bufferView",n.bufferView).then(function(h){l=!0;const f=new Blob([h],{type:n.mimeType});return r=a.createObjectURL(f),r});else if(n.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(r).then(function(h){return new Promise(function(f,m){let p=f;t.isImageBitmapLoader===!0&&(p=function(g){const _=new c.Texture(g);_.needsUpdate=!0,f(_)}),t.load(c.LoaderUtils.resolveURL(h,i.path),p,void 0,m)})}).then(function(h){return l===!0&&a.revokeObjectURL(r),z(h,n),h.userData.mimeType=n.mimeType||Ot(n.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",r),h});return this.sourceCache[e]=d,d}assignTexture(e,t,o,s){const i=this;return this.getDependency("texture",o.index).then(function(n){if(!n)return null;if(o.texCoord!==void 0&&o.texCoord>0&&(n=n.clone(),n.channel=o.texCoord),i.extensions[M.KHR_TEXTURE_TRANSFORM]){const a=o.extensions!==void 0?o.extensions[M.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const r=i.associations.get(n);n=i.extensions[M.KHR_TEXTURE_TRANSFORM].extendTexture(n,a),i.associations.set(n,r)}}return s!==void 0&&(n.colorSpace=s),e[t]=n,n})}assignFinalMaterial(e){const t=e.geometry;let o=e.material;const s=t.attributes.tangent===void 0,i=t.attributes.color!==void 0,n=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+o.uuid;let r=this.cache.get(a);r||(r=new c.PointsMaterial,c.Material.prototype.copy.call(r,o),r.color.copy(o.color),r.map=o.map,r.sizeAttenuation=!1,this.cache.add(a,r)),o=r}else if(e.isLine){const a="LineBasicMaterial:"+o.uuid;let r=this.cache.get(a);r||(r=new c.LineBasicMaterial,c.Material.prototype.copy.call(r,o),r.color.copy(o.color),r.map=o.map,this.cache.add(a,r)),o=r}if(s||i||n){let a="ClonedMaterial:"+o.uuid+":";s&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),n&&(a+="flat-shading:");let r=this.cache.get(a);r||(r=o.clone(),i&&(r.vertexColors=!0),n&&(r.flatShading=!0),s&&(r.normalScale&&(r.normalScale.y*=-1),r.clearcoatNormalScale&&(r.clearcoatNormalScale.y*=-1)),this.cache.add(a,r),this.associations.set(r,this.associations.get(o))),o=r}e.material=o}getMaterialType(){return c.MeshStandardMaterial}loadMaterial(e){const t=this,o=this.json,s=this.extensions,i=o.materials[e];let n;const a={},r=i.extensions||{},l=[];if(r[M.KHR_MATERIALS_UNLIT]){const h=s[M.KHR_MATERIALS_UNLIT];n=h.getMaterialType(),l.push(h.extendParams(a,i,t))}else{const h=i.pbrMetallicRoughness||{};if(a.color=new c.Color(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const f=h.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],c.LinearSRGBColorSpace),a.opacity=f[3]}h.baseColorTexture!==void 0&&l.push(t.assignTexture(a,"map",h.baseColorTexture,c.SRGBColorSpace)),a.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,a.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(l.push(t.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),l.push(t.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),n=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(e)}),l.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(e,a)})))}i.doubleSided===!0&&(a.side=c.DoubleSide);const d=i.alphaMode||ae.OPAQUE;if(d===ae.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,d===ae.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&n!==c.MeshBasicMaterial&&(l.push(t.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new c.Vector2(1,1),i.normalTexture.scale!==void 0)){const h=i.normalTexture.scale;a.normalScale.set(h,h)}if(i.occlusionTexture!==void 0&&n!==c.MeshBasicMaterial&&(l.push(t.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&n!==c.MeshBasicMaterial){const h=i.emissiveFactor;a.emissive=new c.Color().setRGB(h[0],h[1],h[2],c.LinearSRGBColorSpace)}return i.emissiveTexture!==void 0&&n!==c.MeshBasicMaterial&&l.push(t.assignTexture(a,"emissiveMap",i.emissiveTexture,c.SRGBColorSpace)),Promise.all(l).then(function(){const h=new n(a);return i.name&&(h.name=i.name),z(h,i),t.associations.set(h,{materials:e}),i.extensions&&W(s,h,i),h})}createUniqueName(e){const t=c.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,o=this.extensions,s=this.primitiveCache;function i(a){return o[M.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(r){return Le(r,a,t)})}const n=[];for(let a=0,r=e.length;a<r;a++){const l=e[a],d=Pt(l),h=s[d];if(h)n.push(h.promise);else{let f;l.extensions&&l.extensions[M.KHR_DRACO_MESH_COMPRESSION]?f=i(l):f=Le(new c.BufferGeometry,l,t),s[d]={primitive:l,promise:f},n.push(f)}}return Promise.all(n)}loadMesh(e){const t=this,o=this.json,s=this.extensions,i=o.meshes[e],n=i.primitives,a=[];for(let r=0,l=n.length;r<l;r++){const d=n[r].material===void 0?Lt(this.cache):this.getDependency("material",n[r].material);a.push(d)}return a.push(t.loadGeometries(n)),Promise.all(a).then(function(r){const l=r.slice(0,r.length-1),d=r[r.length-1],h=[];for(let m=0,p=d.length;m<p;m++){const g=d[m],_=n[m];let y;const b=l[m];if(_.mode===G.TRIANGLES||_.mode===G.TRIANGLE_STRIP||_.mode===G.TRIANGLE_FAN||_.mode===void 0)y=i.isSkinnedMesh===!0?new c.SkinnedMesh(g,b):new c.Mesh(g,b),y.isSkinnedMesh===!0&&y.normalizeSkinWeights(),_.mode===G.TRIANGLE_STRIP?y.geometry=xe(y.geometry,c.TriangleStripDrawMode):_.mode===G.TRIANGLE_FAN&&(y.geometry=xe(y.geometry,c.TriangleFanDrawMode));else if(_.mode===G.LINES)y=new c.LineSegments(g,b);else if(_.mode===G.LINE_STRIP)y=new c.Line(g,b);else if(_.mode===G.LINE_LOOP)y=new c.LineLoop(g,b);else if(_.mode===G.POINTS)y=new c.Points(g,b);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+_.mode);Object.keys(y.geometry.morphAttributes).length>0&&Dt(y,i),y.name=t.createUniqueName(i.name||"mesh_"+e),z(y,i),_.extensions&&W(s,y,_),t.assignFinalMaterial(y),h.push(y)}for(let m=0,p=h.length;m<p;m++)t.associations.set(h[m],{meshes:e,primitives:m});if(h.length===1)return i.extensions&&W(s,h[0],i),h[0];const f=new c.Group;i.extensions&&W(s,f,i),t.associations.set(f,{meshes:e});for(let m=0,p=h.length;m<p;m++)f.add(h[m]);return f})}loadCamera(e){let t;const o=this.json.cameras[e],s=o[o.type];if(!s){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return o.type==="perspective"?t=new c.PerspectiveCamera(c.MathUtils.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):o.type==="orthographic"&&(t=new c.OrthographicCamera(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),o.name&&(t.name=this.createUniqueName(o.name)),z(t,o),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],o=[];for(let s=0,i=t.joints.length;s<i;s++)o.push(this._loadNodeShallow(t.joints[s]));return t.inverseBindMatrices!==void 0?o.push(this.getDependency("accessor",t.inverseBindMatrices)):o.push(null),Promise.all(o).then(function(s){const i=s.pop(),n=s,a=[],r=[];for(let l=0,d=n.length;l<d;l++){const h=n[l];if(h){a.push(h);const f=new c.Matrix4;i!==null&&f.fromArray(i.array,l*16),r.push(f)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[l])}return new c.Skeleton(a,r)})}loadAnimation(e){const t=this.json,o=this,s=t.animations[e],i=s.name?s.name:"animation_"+e,n=[],a=[],r=[],l=[],d=[];for(let h=0,f=s.channels.length;h<f;h++){const m=s.channels[h],p=s.samplers[m.sampler],g=m.target,_=g.node,y=s.parameters!==void 0?s.parameters[p.input]:p.input,b=s.parameters!==void 0?s.parameters[p.output]:p.output;g.node!==void 0&&(n.push(this.getDependency("node",_)),a.push(this.getDependency("accessor",y)),r.push(this.getDependency("accessor",b)),l.push(p),d.push(g))}return Promise.all([Promise.all(n),Promise.all(a),Promise.all(r),Promise.all(l),Promise.all(d)]).then(function(h){const f=h[0],m=h[1],p=h[2],g=h[3],_=h[4],y=[];for(let b=0,C=f.length;b<C;b++){const x=f[b],v=m[b],B=p[b],k=g[b],w=_[b];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const V=o._createAnimationTracks(x,v,B,k,w);if(V)for(let $=0;$<V.length;$++)y.push(V[$])}return new c.AnimationClip(i,void 0,y)})}createNodeMesh(e){const t=this.json,o=this,s=t.nodes[e];return s.mesh===void 0?null:o.getDependency("mesh",s.mesh).then(function(i){const n=o._getNodeRef(o.meshCache,s.mesh,i);return s.weights!==void 0&&n.traverse(function(a){if(a.isMesh)for(let r=0,l=s.weights.length;r<l;r++)a.morphTargetInfluences[r]=s.weights[r]}),n})}loadNode(e){const t=this.json,o=this,s=t.nodes[e],i=o._loadNodeShallow(e),n=[],a=s.children||[];for(let l=0,d=a.length;l<d;l++)n.push(o.getDependency("node",a[l]));const r=s.skin===void 0?Promise.resolve(null):o.getDependency("skin",s.skin);return Promise.all([i,Promise.all(n),r]).then(function(l){const d=l[0],h=l[1],f=l[2];f!==null&&d.traverse(function(m){m.isSkinnedMesh&&m.bind(f,vt)});for(let m=0,p=h.length;m<p;m++)d.add(h[m]);return d})}_loadNodeShallow(e){const t=this.json,o=this.extensions,s=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const i=t.nodes[e],n=i.name?s.createUniqueName(i.name):"",a=[],r=s._invokeOne(function(l){return l.createNodeMesh&&l.createNodeMesh(e)});return r&&a.push(r),i.camera!==void 0&&a.push(s.getDependency("camera",i.camera).then(function(l){return s._getNodeRef(s.cameraCache,i.camera,l)})),s._invokeAll(function(l){return l.createNodeAttachment&&l.createNodeAttachment(e)}).forEach(function(l){a.push(l)}),this.nodeCache[e]=Promise.all(a).then(function(l){let d;if(i.isBone===!0?d=new c.Bone:l.length>1?d=new c.Group:l.length===1?d=l[0]:d=new c.Object3D,d!==l[0])for(let h=0,f=l.length;h<f;h++)d.add(l[h]);if(i.name&&(d.userData.name=i.name,d.name=n),z(d,i),i.extensions&&W(o,d,i),i.matrix!==void 0){const h=new c.Matrix4;h.fromArray(i.matrix),d.applyMatrix4(h)}else i.translation!==void 0&&d.position.fromArray(i.translation),i.rotation!==void 0&&d.quaternion.fromArray(i.rotation),i.scale!==void 0&&d.scale.fromArray(i.scale);return s.associations.has(d)||s.associations.set(d,{}),s.associations.get(d).nodes=e,d}),this.nodeCache[e]}loadScene(e){const t=this.extensions,o=this.json.scenes[e],s=this,i=new c.Group;o.name&&(i.name=s.createUniqueName(o.name)),z(i,o),o.extensions&&W(t,i,o);const n=o.nodes||[],a=[];for(let r=0,l=n.length;r<l;r++)a.push(s.getDependency("node",n[r]));return Promise.all(a).then(function(r){for(let d=0,h=r.length;d<h;d++)i.add(r[d]);const l=d=>{const h=new Map;for(const[f,m]of s.associations)(f instanceof c.Material||f instanceof c.Texture)&&h.set(f,m);return d.traverse(f=>{const m=s.associations.get(f);m!=null&&h.set(f,m)}),h};return s.associations=l(i),i})}_createAnimationTracks(e,t,o,s,i){const n=[],a=e.name?e.name:e.uuid,r=[];Y[i.path]===Y.weights?e.traverse(function(f){f.morphTargetInfluences&&r.push(f.name?f.name:f.uuid)}):r.push(a);let l;switch(Y[i.path]){case Y.weights:l=c.NumberKeyframeTrack;break;case Y.rotation:l=c.QuaternionKeyframeTrack;break;case Y.position:case Y.scale:l=c.VectorKeyframeTrack;break;default:o.itemSize===1?l=c.NumberKeyframeTrack:l=c.VectorKeyframeTrack;break}const d=s.interpolation!==void 0?wt[s.interpolation]:c.InterpolateLinear,h=this._getArrayFromAccessor(o);for(let f=0,m=r.length;f<m;f++){const p=new l(r[f]+"."+Y[i.path],t.array,h,d);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(p),n.push(p)}return n}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const o=de(t.constructor),s=new Float32Array(t.length);for(let i=0,n=t.length;i<n;i++)s[i]=t[i]*o;t=s}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(o){const s=this instanceof c.QuaternionKeyframeTrack?Mt:ke;return new s(this.times,this.values,this.getValueSize()/3,o)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Nt(u,e,t){const o=e.attributes,s=new c.Box3;if(o.POSITION!==void 0){const a=t.json.accessors[o.POSITION],r=a.min,l=a.max;if(r!==void 0&&l!==void 0){if(s.set(new c.Vector3(r[0],r[1],r[2]),new c.Vector3(l[0],l[1],l[2])),a.normalized){const d=de(Q[a.componentType]);s.min.multiplyScalar(d),s.max.multiplyScalar(d)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=e.targets;if(i!==void 0){const a=new c.Vector3,r=new c.Vector3;for(let l=0,d=i.length;l<d;l++){const h=i[l];if(h.POSITION!==void 0){const f=t.json.accessors[h.POSITION],m=f.min,p=f.max;if(m!==void 0&&p!==void 0){if(r.setX(Math.max(Math.abs(m[0]),Math.abs(p[0]))),r.setY(Math.max(Math.abs(m[1]),Math.abs(p[1]))),r.setZ(Math.max(Math.abs(m[2]),Math.abs(p[2]))),f.normalized){const g=de(Q[f.componentType]);r.multiplyScalar(g)}a.max(r)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(a)}u.boundingBox=s;const n=new c.Sphere;s.getCenter(n.center),n.radius=s.min.distanceTo(s.max)/2,u.boundingSphere=n}function Le(u,e,t){const o=e.attributes,s=[];function i(n,a){return t.getDependency("accessor",n).then(function(r){u.setAttribute(a,r)})}for(const n in o){const a=ue[n]||n.toLowerCase();a in u.attributes||s.push(i(o[n],a))}if(e.indices!==void 0&&!u.index){const n=t.getDependency("accessor",e.indices).then(function(a){u.setIndex(a)});s.push(n)}return c.ColorManagement.workingColorSpace!==c.LinearSRGBColorSpace&&"COLOR_0"in o&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${c.ColorManagement.workingColorSpace}" not supported.`),z(u,e),Nt(u,e,t),Promise.all(s).then(function(){return e.targets!==void 0?Ct(u,e.targets,t):u})}const le=new WeakMap;class kt extends c.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,o,s){const i=new c.FileLoader(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,n=>{this.parse(n,t,s)},o,s)}parse(e,t,o=()=>{}){this.decodeDracoFile(e,t,null,null,c.SRGBColorSpace,o).catch(o)}decodeDracoFile(e,t,o,s,i=c.LinearSRGBColorSpace,n=()=>{}){const a={attributeIDs:o||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!o,vertexColorSpace:i};return this.decodeGeometry(e,a).then(t).catch(n)}decodeGeometry(e,t){const o=JSON.stringify(t);if(le.has(e)){const r=le.get(e);if(r.key===o)return r.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const i=this.workerNextTaskID++,n=e.byteLength,a=this._getWorker(i,n).then(r=>(s=r,new Promise((l,d)=>{s._callbacks[i]={resolve:l,reject:d},s.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))).then(r=>this._createGeometry(r.geometry));return a.catch(()=>!0).then(()=>{s&&i&&this._releaseTask(s,i)}),le.set(e,{key:o,promise:a}),a}_createGeometry(e){const t=new c.BufferGeometry;e.index&&t.setIndex(new c.BufferAttribute(e.index.array,1));for(let o=0;o<e.attributes.length;o++){const s=e.attributes[o],i=s.name,n=s.array,a=s.itemSize,r=new c.BufferAttribute(n,a);i==="color"&&(this._assignVertexColorSpace(r,s.vertexColorSpace),r.normalized=!(n instanceof Float32Array)),t.setAttribute(i,r)}return t}_assignVertexColorSpace(e,t){if(t!==c.SRGBColorSpace)return;const o=new c.Color;for(let s=0,i=e.count;s<i;s++)o.fromBufferAttribute(e,s),c.ColorManagement.toWorkingColorSpace(o,c.SRGBColorSpace),e.setXYZ(s,o.r,o.g,o.b)}_loadLibrary(e,t){const o=new c.FileLoader(this.manager);return o.setPath(this.decoderPath),o.setResponseType(t),o.setWithCredentials(this.withCredentials),new Promise((s,i)=>{o.load(e,s,void 0,i)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(o=>{const s=o[0];e||(this.decoderConfig.wasmBinary=o[1]);const i=Ft.toString(),n=["/* draco decoder */",s,"","/* worker */",i.substring(i.indexOf("{")+1,i.lastIndexOf("}"))].join(`
|
|
2
2
|
`);this.workerSourceURL=URL.createObjectURL(new Blob([n]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const s=new Worker(this.workerSourceURL);s._callbacks={},s._taskCosts={},s._taskLoad=0,s.postMessage({type:"init",decoderConfig:this.decoderConfig}),s.onmessage=function(i){const n=i.data;switch(n.type){case"decode":s._callbacks[n.id].resolve(n);break;case"error":s._callbacks[n.id].reject(n);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+n.type+'"')}},this.workerPool.push(s)}else this.workerPool.sort(function(s,i){return s._taskLoad>i._taskLoad?-1:1});const o=this.workerPool[this.workerPool.length-1];return o._taskCosts[e]=t,o._taskLoad+=t,o})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this.workerSourceURL!==""&&URL.revokeObjectURL(this.workerSourceURL),this}}function Ft(){let u,e;onmessage=function(n){const a=n.data;switch(a.type){case"init":u=a.decoderConfig,e=new Promise(function(d){u.onModuleLoaded=function(h){d({draco:h})},DracoDecoderModule(u)});break;case"decode":const r=a.buffer,l=a.taskConfig;e.then(d=>{const h=d.draco,f=new h.Decoder;try{const m=t(h,f,new Int8Array(r),l),p=m.attributes.map(g=>g.array.buffer);m.index&&p.push(m.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:m},p)}catch(m){console.error(m),self.postMessage({type:"error",id:a.id,error:m.message})}finally{h.destroy(f)}});break}};function t(n,a,r,l){const d=l.attributeIDs,h=l.attributeTypes;let f,m;const p=a.GetEncodedGeometryType(r);if(p===n.TRIANGULAR_MESH)f=new n.Mesh,m=a.DecodeArrayToMesh(r,r.byteLength,f);else if(p===n.POINT_CLOUD)f=new n.PointCloud,m=a.DecodeArrayToPointCloud(r,r.byteLength,f);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!m.ok()||f.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+m.error_msg());const g={index:null,attributes:[]};for(const _ in d){const y=self[h[_]];let b,C;if(l.useUniqueIDs)C=d[_],b=a.GetAttributeByUniqueId(f,C);else{if(C=a.GetAttributeId(f,n[d[_]]),C===-1)continue;b=a.GetAttribute(f,C)}const x=s(n,a,f,_,y,b);_==="color"&&(x.vertexColorSpace=l.vertexColorSpace),g.attributes.push(x)}return p===n.TRIANGULAR_MESH&&(g.index=o(n,a,f)),n.destroy(f),g}function o(n,a,r){const d=r.num_faces()*3,h=d*4,f=n._malloc(h);a.GetTrianglesUInt32Array(r,h,f);const m=new Uint32Array(n.HEAPF32.buffer,f,d).slice();return n._free(f),{array:m,itemSize:1}}function s(n,a,r,l,d,h){const f=h.num_components(),p=r.num_points()*f,g=p*d.BYTES_PER_ELEMENT,_=i(n,d),y=n._malloc(g);a.GetAttributeDataArrayForAllPoints(r,h,_,g,y);const b=new d(n.HEAPF32.buffer,y,p).slice();return n._free(y),{name:l,array:b,itemSize:f}}function i(n,a){switch(a){case Float32Array:return n.DT_FLOAT32;case Int8Array:return n.DT_INT8;case Int16Array:return n.DT_INT16;case Int32Array:return n.DT_INT32;case Uint8Array:return n.DT_UINT8;case Uint16Array:return n.DT_UINT16;case Uint32Array:return n.DT_UINT32}}}const Ce={type:"change"},fe={type:"start"},Fe={type:"end"},se=new c.Ray,De=new c.Plane,Ut=Math.cos(70*c.MathUtils.DEG2RAD),I=new c.Vector3,H=2*Math.PI,D={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},he=1e-6;class jt extends c.Controls{constructor(e,t=null){super(e,t),this.state=D.NONE,this.enabled=!0,this.target=new c.Vector3,this.cursor=new c.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=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.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:c.MOUSE.ROTATE,MIDDLE:c.MOUSE.DOLLY,RIGHT:c.MOUSE.PAN},this.touches={ONE:c.TOUCH.ROTATE,TWO:c.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new c.Vector3,this._lastQuaternion=new c.Quaternion,this._lastTargetPosition=new c.Vector3,this._quat=new c.Quaternion().setFromUnitVectors(e.up,new c.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new c.Spherical,this._sphericalDelta=new c.Spherical,this._scale=1,this._panOffset=new c.Vector3,this._rotateStart=new c.Vector2,this._rotateEnd=new c.Vector2,this._rotateDelta=new c.Vector2,this._panStart=new c.Vector2,this._panEnd=new c.Vector2,this._panDelta=new c.Vector2,this._dollyStart=new c.Vector2,this._dollyEnd=new c.Vector2,this._dollyDelta=new c.Vector2,this._dollyDirection=new c.Vector3,this._mouse=new c.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=Bt.bind(this),this._onPointerDown=Ht.bind(this),this._onPointerUp=Gt.bind(this),this._onContextMenu=qt.bind(this),this._onMouseWheel=zt.bind(this),this._onKeyDown=Xt.bind(this),this._onTouchStart=Yt.bind(this),this._onTouchMove=Wt.bind(this),this._onMouseDown=Vt.bind(this),this._onMouseMove=Kt.bind(this),this._interceptControlDown=Zt.bind(this),this._interceptControlUp=Qt.bind(this),this.domElement!==null&&this.connect(),this.update()}connect(){this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Ce),this.update(),this.state=D.NONE}update(e=null){const t=this.object.position;I.copy(t).sub(this.target),I.applyQuaternion(this._quat),this._spherical.setFromVector3(I),this.autoRotate&&this.state===D.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let o=this.minAzimuthAngle,s=this.maxAzimuthAngle;isFinite(o)&&isFinite(s)&&(o<-Math.PI?o+=H:o>Math.PI&&(o-=H),s<-Math.PI?s+=H:s>Math.PI&&(s-=H),o<=s?this._spherical.theta=Math.max(o,Math.min(s,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(o+s)/2?Math.max(o,this._spherical.theta):Math.min(s,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let i=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const n=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),i=n!=this._spherical.radius}if(I.setFromSpherical(this._spherical),I.applyQuaternion(this._quatInverse),t.copy(this.target).add(I),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let n=null;if(this.object.isPerspectiveCamera){const a=I.length();n=this._clampDistance(a*this._scale);const r=a-n;this.object.position.addScaledVector(this._dollyDirection,r),this.object.updateMatrixWorld(),i=!!r}else if(this.object.isOrthographicCamera){const a=new c.Vector3(this._mouse.x,this._mouse.y,0);a.unproject(this.object);const r=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),i=r!==this.object.zoom;const l=new c.Vector3(this._mouse.x,this._mouse.y,0);l.unproject(this.object),this.object.position.sub(l).add(a),this.object.updateMatrixWorld(),n=I.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;n!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(n).add(this.object.position):(se.origin.copy(this.object.position),se.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(se.direction))<Ut?this.object.lookAt(this.target):(De.setFromNormalAndCoplanarPoint(this.object.up,this.target),se.intersectPlane(De,this.target))))}else if(this.object.isOrthographicCamera){const n=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),n!==this.object.zoom&&(this.object.updateProjectionMatrix(),i=!0)}return this._scale=1,this._performCursorZoom=!1,i||this._lastPosition.distanceToSquared(this.object.position)>he||8*(1-this._lastQuaternion.dot(this.object.quaternion))>he||this._lastTargetPosition.distanceToSquared(this.target)>he?(this.dispatchEvent(Ce),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?H/60*this.autoRotateSpeed*e:H/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){I.setFromMatrixColumn(t,0),I.multiplyScalar(-e),this._panOffset.add(I)}_panUp(e,t){this.screenSpacePanning===!0?I.setFromMatrixColumn(t,1):(I.setFromMatrixColumn(t,0),I.crossVectors(this.object.up,I)),I.multiplyScalar(e),this._panOffset.add(I)}_pan(e,t){const o=this.domElement;if(this.object.isPerspectiveCamera){const s=this.object.position;I.copy(s).sub(this.target);let i=I.length();i*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*i/o.clientHeight,this.object.matrix),this._panUp(2*t*i/o.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/o.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/o.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const o=this.domElement.getBoundingClientRect(),s=e-o.left,i=t-o.top,n=o.width,a=o.height;this._mouse.x=s/n*2-1,this._mouse.y=-(i/a)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(H*this._rotateDelta.x/t.clientHeight),this._rotateUp(H*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this._rotateUp(H*this.rotateSpeed/this.domElement.clientHeight):this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this._rotateUp(-H*this.rotateSpeed/this.domElement.clientHeight):this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this._rotateLeft(H*this.rotateSpeed/this.domElement.clientHeight):this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this._rotateLeft(-H*this.rotateSpeed/this.domElement.clientHeight):this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),o=.5*(e.pageX+t.x),s=.5*(e.pageY+t.y);this._rotateStart.set(o,s)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),o=.5*(e.pageX+t.x),s=.5*(e.pageY+t.y);this._panStart.set(o,s)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),o=e.pageX-t.x,s=e.pageY-t.y,i=Math.sqrt(o*o+s*s);this._dollyStart.set(0,i)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const o=this._getSecondPointerPosition(e),s=.5*(e.pageX+o.x),i=.5*(e.pageY+o.y);this._rotateEnd.set(s,i)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(H*this._rotateDelta.x/t.clientHeight),this._rotateUp(H*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),o=.5*(e.pageX+t.x),s=.5*(e.pageY+t.y);this._panEnd.set(o,s)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),o=e.pageX-t.x,s=e.pageY-t.y,i=Math.sqrt(o*o+s*s);this._dollyEnd.set(0,i),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const n=(e.pageX+t.x)*.5,a=(e.pageY+t.y)*.5;this._updateZoomParameters(n,a)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new c.Vector2,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){const t=e.deltaMode,o={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:o.deltaY*=16;break;case 2:o.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(o.deltaY*=10),o}}function Ht(u){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(u.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(u)&&(this._addPointer(u),u.pointerType==="touch"?this._onTouchStart(u):this._onMouseDown(u)))}function Bt(u){this.enabled!==!1&&(u.pointerType==="touch"?this._onTouchMove(u):this._onMouseMove(u))}function Gt(u){switch(this._removePointer(u),this._pointers.length){case 0:this.domElement.releasePointerCapture(u.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(Fe),this.state=D.NONE;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function Vt(u){let e;switch(u.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case c.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(u),this.state=D.DOLLY;break;case c.MOUSE.ROTATE:if(u.ctrlKey||u.metaKey||u.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(u),this.state=D.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(u),this.state=D.ROTATE}break;case c.MOUSE.PAN:if(u.ctrlKey||u.metaKey||u.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(u),this.state=D.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(u),this.state=D.PAN}break;default:this.state=D.NONE}this.state!==D.NONE&&this.dispatchEvent(fe)}function Kt(u){switch(this.state){case D.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(u);break;case D.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(u);break;case D.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(u);break}}function zt(u){this.enabled===!1||this.enableZoom===!1||this.state!==D.NONE||(u.preventDefault(),this.dispatchEvent(fe),this._handleMouseWheel(this._customWheelEvent(u)),this.dispatchEvent(Fe))}function Xt(u){this.enabled===!1||this.enablePan===!1||this._handleKeyDown(u)}function Yt(u){switch(this._trackPointer(u),this._pointers.length){case 1:switch(this.touches.ONE){case c.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(u),this.state=D.TOUCH_ROTATE;break;case c.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(u),this.state=D.TOUCH_PAN;break;default:this.state=D.NONE}break;case 2:switch(this.touches.TWO){case c.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(u),this.state=D.TOUCH_DOLLY_PAN;break;case c.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(u),this.state=D.TOUCH_DOLLY_ROTATE;break;default:this.state=D.NONE}break;default:this.state=D.NONE}this.state!==D.NONE&&this.dispatchEvent(fe)}function Wt(u){switch(this._trackPointer(u),this.state){case D.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(u),this.update();break;case D.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(u),this.update();break;case D.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(u),this.update();break;case D.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(u),this.update();break;default:this.state=D.NONE}}function qt(u){this.enabled!==!1&&u.preventDefault()}function Zt(u){u.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Qt(u){u.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}class $t extends c.Object3D{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new c.Vector2(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof t.element.ownerDocument.defaultView.Element&&t.element.parentNode!==null&&t.element.remove()})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const Z=new c.Vector3,Pe=new c.Matrix4,Oe=new c.Matrix4,ve=new c.Vector3,Ie=new c.Vector3;class Jt{constructor(e={}){const t=this;let o,s,i,n;const a={objects:new WeakMap},r=e.element!==void 0?e.element:document.createElement("div");r.style.overflow="hidden",this.domElement=r,this.getSize=function(){return{width:o,height:s}},this.render=function(p,g){p.matrixWorldAutoUpdate===!0&&p.updateMatrixWorld(),g.parent===null&&g.matrixWorldAutoUpdate===!0&&g.updateMatrixWorld(),Pe.copy(g.matrixWorldInverse),Oe.multiplyMatrices(g.projectionMatrix,Pe),d(p,p,g),m(p)},this.setSize=function(p,g){o=p,s=g,i=o/2,n=s/2,r.style.width=p+"px",r.style.height=g+"px"};function l(p){p.isCSS2DObject&&(p.element.style.display="none");for(let g=0,_=p.children.length;g<_;g++)l(p.children[g])}function d(p,g,_){if(p.visible===!1){l(p);return}if(p.isCSS2DObject){Z.setFromMatrixPosition(p.matrixWorld),Z.applyMatrix4(Oe);const y=Z.z>=-1&&Z.z<=1&&p.layers.test(_.layers)===!0,b=p.element;b.style.display=y===!0?"":"none",y===!0&&(p.onBeforeRender(t,g,_),b.style.transform="translate("+-100*p.center.x+"%,"+-100*p.center.y+"%)translate("+(Z.x*i+i)+"px,"+(-Z.y*n+n)+"px)",b.parentNode!==r&&r.appendChild(b),p.onAfterRender(t,g,_));const C={distanceToCameraSquared:h(_,p)};a.objects.set(p,C)}for(let y=0,b=p.children.length;y<b;y++)d(p.children[y],g,_)}function h(p,g){return ve.setFromMatrixPosition(p.matrixWorld),Ie.setFromMatrixPosition(g.matrixWorld),ve.distanceToSquared(Ie)}function f(p){const g=[];return p.traverseVisible(function(_){_.isCSS2DObject&&g.push(_)}),g}function m(p){const g=f(p).sort(function(y,b){if(y.renderOrder!==b.renderOrder)return b.renderOrder-y.renderOrder;const C=a.objects.get(y).distanceToCameraSquared,x=a.objects.get(b).distanceToCameraSquared;return C-x}),_=g.length;for(let y=0,b=g.length;y<b;y++)g[y].element.style.zIndex=_-y}}}const es={key:0,class:"loading-overlay"},ts={key:1,class:"error-overlay"},ss={class:"error-text"},ns={class:"component-modal-wrapper"},is={DEFAULT_ICON:Se.DEFAULT_ICON,ACTIVE_ICON:Se.ACTIVE_ICON,NAME_CN:"三维模型",NAME_EN:"3D Model",ORDER:6},os={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor",hideAlpha:!0},modelUrl:{value:"",type:"string",label:"component.glbModel.modelUrl"},modelScale:{value:1,type:"number",label:"component.glbModel.modelScale",min:.1,max:10,step:.1},autoRotate:{value:!0,type:"checkbox",label:"component.glbModel.autoRotate"},rotateSpeed:{value:1,type:"number",label:"component.glbModel.rotateSpeed",min:.1,max:5,step:.1},lightIntensity:{value:1,type:"number",label:"component.glbModel.lightIntensity",min:0,max:5,step:.1},cameraDistance:{value:5,type:"number",label:"component.glbModel.cameraDistance",min:1,max:20,step:.5}},rs=[],as=["name","fv","object_id","icon","chartType","targetComponentId","posX","posY","posZ"],cs=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],ls={useAlias:!1,multiObject:!1,source:"mosaic"},hs={DEFAULT:is,OPTIONS:os,DATA:rs,PARAMS:as,SOURCE:cs,COMMON:ls},us=E.defineComponent(be(ye({},hs),{__name:"glbModel",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(u,{expose:e}){E.useCssVars(T=>({v02fb219c:E.unref(i).bgColor}));const t=u;class o extends Je.BaseComponent{extractStyles(){var R,S,L,P,O,N,F,U,X,K,q,ie;const{options:A}=this.props.conf;return{bgColor:((R=A==null?void 0:A.bgColor)==null?void 0:R.value)||"#ffffff",modelUrl:((S=A==null?void 0:A.modelUrl)==null?void 0:S.value)||"",modelScale:(P=(L=A==null?void 0:A.modelScale)==null?void 0:L.value)!=null?P:1,autoRotate:(N=(O=A==null?void 0:A.autoRotate)==null?void 0:O.value)!=null?N:!0,rotateSpeed:(U=(F=A==null?void 0:A.rotateSpeed)==null?void 0:F.value)!=null?U:1,lightIntensity:(K=(X=A==null?void 0:A.lightIntensity)==null?void 0:X.value)!=null?K:1,cameraDistance:(ie=(q=A==null?void 0:A.cameraDistance)==null?void 0:q.value)!=null?ie:5}}}const s=new o(t,"glbModel");s.setupLifecycle();const i=s.getStyle(),n=E.ref(),a=E.ref(),r=E.ref(!1),l=E.ref(""),d=E.ref(i.value.autoRotate);let h,f,m,p,g,_,y=0,b,C;const x=E.ref([]),v=new Map,B=E.ref(!1),k=E.ref();let w=null;const V=()=>{if(w){const T=w._originalParent;T&&(T.appendChild(w),delete w._originalParent),w.style.visibility="hidden",w.style.position="absolute",w.style.zIndex="-1",w=null}B.value=!1,k.value&&(k.value.innerHTML="")},$=()=>{var P;if(!a.value||!n.value)return;y&&(cancelAnimationFrame(y),y=0);const T=n.value.clientWidth,A=n.value.clientHeight;h=new c.Scene,h.background=new c.Color(i.value.bgColor),f=new c.PerspectiveCamera(45,T/A,.1,1e3),f.position.set(0,0,i.value.cameraDistance),m=new c.WebGLRenderer({canvas:a.value,antialias:!0,alpha:!0,powerPreference:"high-performance"}),m.setSize(T,A),m.setPixelRatio(Math.min(window.devicePixelRatio,2)),m.shadowMap.enabled=!1;const R=new c.AmbientLight(16777215,i.value.lightIntensity*.5);h.add(R);const S=new c.DirectionalLight(16777215,i.value.lightIntensity);S.position.set(5,5,5),h.add(S);const L=new c.DirectionalLight(16777215,i.value.lightIntensity*.3);L.position.set(-5,-5,-5),h.add(L),g=new jt(f,m.domElement),g.enableDamping=!0,g.dampingFactor=.05,g.autoRotate=d.value,g.autoRotateSpeed=i.value.rotateSpeed,g.enableZoom=!0,g.enablePan=!1,g.enableRotate=!0,g.minDistance=.5,g.maxDistance=50,g.zoomSpeed=1,g.target.set(0,0,0),p=new Jt,p.setSize(T,A),p.domElement.style.position="absolute",p.domElement.style.top="0",p.domElement.style.left="0",p.domElement.style.pointerEvents="none",n.value.appendChild(p.domElement),b=new c.Raycaster,C=new c.Vector2,t.mode==="edit"&&((P=a.value)==null||P.addEventListener("dblclick",me)),pe()},Ue=T=>Ee(null,null,function*(){if(!T){l.value="请设置模型URL";return}r.value=!0,l.value="";const A=new tt,R=new kt;R.setDecoderPath("https://www.gstatic.com/draco/versioned/decoders/1.5.6/"),R.setDecoderConfig({type:"js"}),A.setDRACOLoader(R);try{const S=yield A.loadAsync(T);_&&(h.remove(_),_.traverse(j=>{j.geometry&&j.geometry.dispose(),j.material&&(Array.isArray(j.material)?j.material.forEach(te=>te.dispose()):j.material.dispose())})),_=S.scene;let L=0,P=0;_.traverse(j=>{if(j.isMesh&&j.material){L++;const te=_e=>{const Xe=_e.color||new c.Color(13421772),Ye=_e.map,oe=new c.MeshStandardMaterial({color:Xe,map:Ye,metalness:.2,roughness:.8});return delete oe.onBuild,delete oe.onBeforeCompile,P++,oe};Array.isArray(j.material)?j.material=j.material.map(te):j.material=te(j.material)}});const O=new c.Box3().setFromObject(_),N=O.getSize(new c.Vector3),F=O.getCenter(new c.Vector3),U=Math.max(N.x,N.y,N.z),K=U>0?1/U:1;_.scale.setScalar(K*i.value.modelScale),_.position.x=-F.x*K*i.value.modelScale,_.position.y=-F.y*K*i.value.modelScale,_.position.z=-F.z*K*i.value.modelScale,h.add(_);const q=O.getSize(new c.Vector3),ze=Math.max(q.x,q.y,q.z)*K*2.5;f.position.set(0,0,Math.max(ze,i.value.cameraDistance)),g.update(),r.value=!1,Ke()}catch(S){l.value=`加载模型失败: ${S.message||"未知错误"}`,r.value=!1}}),pe=()=>{if(!(!h||!f||!m||!g)){y=requestAnimationFrame(pe);try{g.update(),m.render(h,f),p&&p.render(h,f)}catch(T){l.value=`渲染错误: ${T.message||"未知错误"}`,y&&(cancelAnimationFrame(y),y=0)}}},me=T=>{var S,L;if(!_||!n.value)return;const A=n.value.getBoundingClientRect();C.x=(T.clientX-A.left)/A.width*2-1,C.y=-((T.clientY-A.top)/A.height)*2+1,b.setFromCamera(C,f);const R=b.intersectObject(_,!0);if(R.length>0){const P=R[0].point,O=_.worldToLocal(P.clone()),N=((L=(S=t.conf)==null?void 0:S.data)==null?void 0:L.length)||0,F={name:`标记 ${N+1}`,fv:"",object_id:"",icon:"🛜",posX:O.x,posY:O.y,posZ:O.z};t.conf&&Array.isArray(t.conf.data)&&t.conf.data.push(F);const U={id:`marker_${N}`,position:{x:O.x,y:O.y,z:O.z},label:F.name,objectId:"",fv:"",value:""};x.value.push(U),ge(U)}},ge=(T,A="📍")=>{const R=document.createElement("div");R.className="model-marker",R.dataset.markerId=T.id,R.innerHTML=`
|
|
3
3
|
<div class="marker-icon">${A}</div>
|
|
4
4
|
${T.value?`<div class="marker-value">${T.value}</div>`:""}
|
|
@@ -28,8 +28,8 @@ var qe = (h, e, t) => new Promise((o, s) => {
|
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as Bt, useCssVars as Gt, unref as Kt, ref as Q, watch as ee, onMounted as zt, onBeforeUnmount as Xt, openBlock as he, createElementBlock as ge, createElementVNode as W, createCommentVNode as Re, toDisplayString as Vt, createBlock as Yt, Teleport as Wt, withModifiers as Ze, renderSlot as qt, nextTick as Zt } from "vue";
|
|
30
30
|
import "html2canvas";
|
|
31
|
-
import { B as Qt } from "./element-resize-detector-
|
|
32
|
-
import { _ as $t } from "./index-
|
|
31
|
+
import { B as Qt } from "./element-resize-detector-BCRzpPES.js";
|
|
32
|
+
import { _ as $t } from "./index-LgTfdmT4.js";
|
|
33
33
|
import { T as Jt, k as ve, l as pt, m as mt, n as fe, F as Te, o as Y, p as F, C as K, q as V, r as J, s as es, t as ts, u as Ae, v as ae, V as C, I as ss, Q as ye, w as ns, x as Ue, y as is, z as os, a as pe, A as rs, H as gt, N as as, J as cs, K as ls, R as Ie, U as _t, X as Oe, Y as hs, Z as us, P as ds, _ as we, L as fs, $ as je, D as ps, M as de, a0 as ms, B as At, a1 as gs, g as _s, a2 as As, b as Ts, c as ys, e as bs, G as Se, a3 as Tt, a4 as yt, O as Es, a5 as xs, a6 as Rs, a7 as ws, a8 as Ss, a9 as bt, aa as Ms, ab as Qe, ac as $e, ad as Je, ae as et, af as Ne, ag as Ls, ah as Ds, h as Et, ai as Ps, aj as Cs, ak as oe, al as ie, am as tt, an as vs, ao as Is, S as Os, W as Ns, ap as st, aq as ks } from "./three.module-DcOQNgKS.js";
|
|
34
34
|
import { A as Fs, D as Us } from "./ele-glbModel-icon-l_SMi3ik.js";
|
|
35
35
|
function nt(h, e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Z=Object.defineProperty,ee=Object.defineProperties;var te=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable;var j=(c,n,i)=>n in c?Z(c,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[n]=i,P=(c,n)=>{for(var i in n||(n={}))le.call(n,i)&&j(c,i,n[i]);if(L)for(var i of L(n))ae.call(n,i)&&j(c,i,n[i]);return c},H=(c,n)=>ee(c,te(n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/date-picker/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const t=require("vue");require("html2canvas");const oe=require("./element-resize-detector-DgDXXuXN.cjs"),d=require("./index-Bl0Sti1q.cjs"),q=require("./ele-lin-icon-Dke_1AmT.cjs"),ne={class:"filter-bar"},re={key:0,class:"filter-item"},ie={key:1,class:"filter-item"},se={key:2,class:"filter-item"},ce={key:3,class:"filter-item"},ue={class:"time-range-btns"},de=["onClick"],me={key:4,class:"filter-item date-picker-item"},pe={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"GNSS筛选栏",NAME_EN:"GNSS Filter Bar",ORDER:1},ve={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},labelColor:{value:"#1c3d90",type:"color",label:"标签文字颜色"},borderColor:{value:"#e8ecef",type:"color",label:"边框颜色"},btnActiveColor:{value:"#409eff",type:"color",label:"按钮激活颜色"},padding:{value:8,type:"number",label:"component.options.padding",min:0,max:40},fontSize:{value:13,type:"number",label:"字体大小",min:10,max:20},showAreaFilter:{value:!0,type:"checkbox",label:"显示区域筛选"},showLineFilter:{value:!0,type:"checkbox",label:"显示监测线筛选"},showPointFilter:{value:!0,type:"checkbox",label:"显示监测点筛选"},showTimeRange:{value:!0,type:"checkbox",label:"显示时间范围"},showDatePicker:{value:!0,type:"checkbox",label:"显示日期选择器"},showQueryBtn:{value:!0,type:"checkbox",label:"显示查询按钮"},defaultTimeRange:{value:"1d",type:"select",label:"默认时间范围",options:[{label:"一天内",value:"1d"},{label:"一周内",value:"1w"},{label:"一个月内",value:"1m"}]},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},fe=[{object_id:"",area:"北帮",line:"1号线",point:"35"},{object_id:"",area:"北帮",line:"1号线",point:"55"},{object_id:"",area:"北帮",line:"2号线",point:"110"},{object_id:"",area:"东帮",line:"3号线",point:"33"}],be=["object_id","area","line","point"],ye=["mosaic"],ke={useAlias:!1,multiObject:!0,source:"mosaic"},ge={DEFAULT:pe,OPTIONS:ve,DATA:fe,PARAMS:be,SOURCE:ye,COMMON:ke},he=t.defineComponent(H(P({},ge),{__name:"gnssFilterBar",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(c){const n=c;class i extends oe.BaseComponent{extractStyles(){var v,f,a,C,B,S,E,V,N,x,R,D,F,A,Y,z,T,M,O;const e=(v=this.props.conf)==null?void 0:v.options,s=((f=e==null?void 0:e.linkChannel)==null?void 0:f.value)||"gnss",u=((a=e==null?void 0:e.customChannel)==null?void 0:a.value)||"";return{bgColor:((C=e==null?void 0:e.bgColor)==null?void 0:C.value)||"#ffffff",textColor:((B=e==null?void 0:e.textColor)==null?void 0:B.value)||"#333333",labelColor:((S=e==null?void 0:e.labelColor)==null?void 0:S.value)||"#1c3d90",borderColor:((E=e==null?void 0:e.borderColor)==null?void 0:E.value)||"#e8ecef",btnActiveColor:((V=e==null?void 0:e.btnActiveColor)==null?void 0:V.value)||"#409eff",padding:(x=(N=e==null?void 0:e.padding)==null?void 0:N.value)!=null?x:8,fontSize:(D=(R=e==null?void 0:e.fontSize)==null?void 0:R.value)!=null?D:13,showAreaFilter:((F=e==null?void 0:e.showAreaFilter)==null?void 0:F.value)!==!1,showLineFilter:((A=e==null?void 0:e.showLineFilter)==null?void 0:A.value)!==!1,showPointFilter:((Y=e==null?void 0:e.showPointFilter)==null?void 0:Y.value)!==!1,showTimeRange:((z=e==null?void 0:e.showTimeRange)==null?void 0:z.value)!==!1,showDatePicker:((T=e==null?void 0:e.showDatePicker)==null?void 0:T.value)!==!1,showQueryBtn:((M=e==null?void 0:e.showQueryBtn)==null?void 0:M.value)!==!1,defaultTimeRange:((O=e==null?void 0:e.defaultTimeRange)==null?void 0:O.value)||"1d",linkChannel:s==="custom"&&u?u:s}}}const m=new i(n,"gnssFilterBar");m.setupLifecycle();const r=m.getStyle(),w=t.computed(()=>{var l;return((l=n.conf)==null?void 0:l.data)||[]}),y=t.computed(()=>{const l=new Set;return w.value.filter(e=>e.point&&!l.has(e.point)?(l.add(e.point),!0):!1)}),I=t.computed(()=>{const l=new Set;return y.value.forEach(e=>e.area&&l.add(e.area)),Array.from(l).map(e=>({label:e,value:e}))}),_=t.computed(()=>{const l=new Set;return y.value.filter(e=>e.area===o.area).forEach(e=>e.line&&l.add(e.line)),Array.from(l).map(e=>({label:e,value:e}))}),k=t.computed(()=>{const l=new Set;return y.value.filter(e=>e.area===o.area&&e.line===o.line).forEach(e=>e.point&&l.add(e.point)),Array.from(l).map(e=>({label:e,value:e}))}),U=[{label:"一天内",value:"1d"},{label:"一周内",value:"1w"},{label:"一个月内",value:"1m"}],g=(()=>{var e;const l=(((e=n.conf)==null?void 0:e.data)||[]).find(s=>!!s.point);return{area:(l==null?void 0:l.area)||"",line:(l==null?void 0:l.line)||"",point:(l==null?void 0:l.point)||""}})(),h=r.value.defaultTimeRange||"1d",Q=h==="1w"?d.dayjs().subtract(1,"week"):h==="1m"?d.dayjs().subtract(1,"month"):d.dayjs().subtract(1,"day"),o=t.reactive({area:g.area,line:g.line,point:g.point,timeRange:h,dateRange:[Q.format("YYYY/MM/DD HH:mm"),d.dayjs().format("YYYY/MM/DD HH:mm")]}),$=()=>{var e;const l=_.value;o.line=((e=l[0])==null?void 0:e.value)||"",t.nextTick(()=>{var u;const s=k.value;o.point=((u=s[0])==null?void 0:u.value)||""})},G=()=>{var e;const l=k.value;o.point=((e=l[0])==null?void 0:e.value)||""},W=l=>{o.timeRange=l;const e=d.dayjs(),s=l==="1d"?e.subtract(1,"day"):l==="1w"?e.subtract(1,"week"):e.subtract(1,"month");o.dateRange=[s.format("YYYY/MM/DD HH:mm"),e.format("YYYY/MM/DD HH:mm")]},J=()=>{if(n.mode==="edit")return;const l=w.value.find(e=>e.area===o.area&&e.line===o.line&&e.point===o.point);m.publish({type:"filter",area:o.area,line:o.line,point:o.point,objectId:(l==null?void 0:l.object_id)||"",timeRange:o.timeRange,dateRange:[...o.dateRange]})},K=t.computed(()=>({backgroundColor:r.value.bgColor,color:r.value.textColor,fontSize:`${r.value.fontSize}px`,borderBottom:`1px solid ${r.value.borderColor}`})),p=t.computed(()=>({color:r.value.labelColor,fontSize:`${r.value.fontSize}px`})),X=t.computed(()=>({color:"#fff",background:r.value.btnActiveColor,borderColor:r.value.btnActiveColor}));return t.onMounted(()=>{m.init()}),t.onUnmounted(()=>{m.cleanup()}),(l,e)=>{const s=b.ElOption,u=b.ElSelect,v=b.ElDatePicker,f=b.ElButton;return t.openBlock(),t.createElementBlock("div",{class:"gnss-filter-bar-wrap",style:t.normalizeStyle(K.value)},[t.createElementVNode("div",ne,[t.unref(r).showAreaFilter?(t.openBlock(),t.createElementBlock("div",re,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"区域位置:",4),t.createVNode(u,{modelValue:o.area,"onUpdate:modelValue":e[0]||(e[0]=a=>o.area=a),size:"small",style:{width:"90px"},onChange:$},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showLineFilter?(t.openBlock(),t.createElementBlock("div",ie,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"监测线:",4),t.createVNode(u,{modelValue:o.line,"onUpdate:modelValue":e[1]||(e[1]=a=>o.line=a),size:"small",style:{width:"90px"},onChange:G},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showPointFilter?(t.openBlock(),t.createElementBlock("div",se,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"监测点:",4),t.createVNode(u,{modelValue:o.point,"onUpdate:modelValue":e[2]||(e[2]=a=>o.point=a),size:"small",style:{width:"80px"}},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showTimeRange?(t.openBlock(),t.createElementBlock("div",ce,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"时间范围:",4),t.createElementVNode("div",ue,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(U,a=>t.createElementVNode("button",{key:a.value,class:t.normalizeClass(["range-btn",{active:o.timeRange===a.value}]),style:t.normalizeStyle(o.timeRange===a.value?X.value:{}),onClick:C=>W(a.value)},t.toDisplayString(a.label),15,de)),64))])])):t.createCommentVNode("",!0),t.unref(r).showDatePicker?(t.openBlock(),t.createElementBlock("div",me,[t.createVNode(v,{modelValue:o.dateRange,"onUpdate:modelValue":e[3]||(e[3]=a=>o.dateRange=a),type:"datetimerange",size:"small",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",style:{"max-width":"340px","min-width":"200px",width:"100%"}},null,8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showQueryBtn?(t.openBlock(),t.createBlock(f,{key:5,type:"primary",size:"small",onClick:J},{default:t.withCtx(()=>[...e[4]||(e[4]=[t.createTextVNode("查询",-1)])]),_:1})):t.createCommentVNode("",!0)]),t.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ce=d._export_sfc(he,[["__scopeId","data-v-ecbbd401"]]);exports.default=Ce;
|
|
1
|
+
"use strict";var Z=Object.defineProperty,ee=Object.defineProperties;var te=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable;var j=(c,n,i)=>n in c?Z(c,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[n]=i,P=(c,n)=>{for(var i in n||(n={}))le.call(n,i)&&j(c,i,n[i]);if(L)for(var i of L(n))ae.call(n,i)&&j(c,i,n[i]);return c},H=(c,n)=>ee(c,te(n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/date-picker/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const t=require("vue");require("html2canvas");const oe=require("./element-resize-detector-DYs3pJPp.cjs"),d=require("./index-ZwyqrmaH.cjs"),q=require("./ele-lin-icon-Dke_1AmT.cjs"),ne={class:"filter-bar"},re={key:0,class:"filter-item"},ie={key:1,class:"filter-item"},se={key:2,class:"filter-item"},ce={key:3,class:"filter-item"},ue={class:"time-range-btns"},de=["onClick"],me={key:4,class:"filter-item date-picker-item"},pe={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"GNSS筛选栏",NAME_EN:"GNSS Filter Bar",ORDER:1},ve={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},labelColor:{value:"#1c3d90",type:"color",label:"标签文字颜色"},borderColor:{value:"#e8ecef",type:"color",label:"边框颜色"},btnActiveColor:{value:"#409eff",type:"color",label:"按钮激活颜色"},padding:{value:8,type:"number",label:"component.options.padding",min:0,max:40},fontSize:{value:13,type:"number",label:"字体大小",min:10,max:20},showAreaFilter:{value:!0,type:"checkbox",label:"显示区域筛选"},showLineFilter:{value:!0,type:"checkbox",label:"显示监测线筛选"},showPointFilter:{value:!0,type:"checkbox",label:"显示监测点筛选"},showTimeRange:{value:!0,type:"checkbox",label:"显示时间范围"},showDatePicker:{value:!0,type:"checkbox",label:"显示日期选择器"},showQueryBtn:{value:!0,type:"checkbox",label:"显示查询按钮"},defaultTimeRange:{value:"1d",type:"select",label:"默认时间范围",options:[{label:"一天内",value:"1d"},{label:"一周内",value:"1w"},{label:"一个月内",value:"1m"}]},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},fe=[{object_id:"",area:"北帮",line:"1号线",point:"35"},{object_id:"",area:"北帮",line:"1号线",point:"55"},{object_id:"",area:"北帮",line:"2号线",point:"110"},{object_id:"",area:"东帮",line:"3号线",point:"33"}],be=["object_id","area","line","point"],ye=["mosaic"],ke={useAlias:!1,multiObject:!0,source:"mosaic"},ge={DEFAULT:pe,OPTIONS:ve,DATA:fe,PARAMS:be,SOURCE:ye,COMMON:ke},he=t.defineComponent(H(P({},ge),{__name:"gnssFilterBar",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(c){const n=c;class i extends oe.BaseComponent{extractStyles(){var v,f,a,C,B,S,E,V,N,x,R,D,F,A,Y,z,T,M,O;const e=(v=this.props.conf)==null?void 0:v.options,s=((f=e==null?void 0:e.linkChannel)==null?void 0:f.value)||"gnss",u=((a=e==null?void 0:e.customChannel)==null?void 0:a.value)||"";return{bgColor:((C=e==null?void 0:e.bgColor)==null?void 0:C.value)||"#ffffff",textColor:((B=e==null?void 0:e.textColor)==null?void 0:B.value)||"#333333",labelColor:((S=e==null?void 0:e.labelColor)==null?void 0:S.value)||"#1c3d90",borderColor:((E=e==null?void 0:e.borderColor)==null?void 0:E.value)||"#e8ecef",btnActiveColor:((V=e==null?void 0:e.btnActiveColor)==null?void 0:V.value)||"#409eff",padding:(x=(N=e==null?void 0:e.padding)==null?void 0:N.value)!=null?x:8,fontSize:(D=(R=e==null?void 0:e.fontSize)==null?void 0:R.value)!=null?D:13,showAreaFilter:((F=e==null?void 0:e.showAreaFilter)==null?void 0:F.value)!==!1,showLineFilter:((A=e==null?void 0:e.showLineFilter)==null?void 0:A.value)!==!1,showPointFilter:((Y=e==null?void 0:e.showPointFilter)==null?void 0:Y.value)!==!1,showTimeRange:((z=e==null?void 0:e.showTimeRange)==null?void 0:z.value)!==!1,showDatePicker:((T=e==null?void 0:e.showDatePicker)==null?void 0:T.value)!==!1,showQueryBtn:((M=e==null?void 0:e.showQueryBtn)==null?void 0:M.value)!==!1,defaultTimeRange:((O=e==null?void 0:e.defaultTimeRange)==null?void 0:O.value)||"1d",linkChannel:s==="custom"&&u?u:s}}}const m=new i(n,"gnssFilterBar");m.setupLifecycle();const r=m.getStyle(),w=t.computed(()=>{var l;return((l=n.conf)==null?void 0:l.data)||[]}),y=t.computed(()=>{const l=new Set;return w.value.filter(e=>e.point&&!l.has(e.point)?(l.add(e.point),!0):!1)}),I=t.computed(()=>{const l=new Set;return y.value.forEach(e=>e.area&&l.add(e.area)),Array.from(l).map(e=>({label:e,value:e}))}),_=t.computed(()=>{const l=new Set;return y.value.filter(e=>e.area===o.area).forEach(e=>e.line&&l.add(e.line)),Array.from(l).map(e=>({label:e,value:e}))}),k=t.computed(()=>{const l=new Set;return y.value.filter(e=>e.area===o.area&&e.line===o.line).forEach(e=>e.point&&l.add(e.point)),Array.from(l).map(e=>({label:e,value:e}))}),U=[{label:"一天内",value:"1d"},{label:"一周内",value:"1w"},{label:"一个月内",value:"1m"}],g=(()=>{var e;const l=(((e=n.conf)==null?void 0:e.data)||[]).find(s=>!!s.point);return{area:(l==null?void 0:l.area)||"",line:(l==null?void 0:l.line)||"",point:(l==null?void 0:l.point)||""}})(),h=r.value.defaultTimeRange||"1d",Q=h==="1w"?d.dayjs().subtract(1,"week"):h==="1m"?d.dayjs().subtract(1,"month"):d.dayjs().subtract(1,"day"),o=t.reactive({area:g.area,line:g.line,point:g.point,timeRange:h,dateRange:[Q.format("YYYY/MM/DD HH:mm"),d.dayjs().format("YYYY/MM/DD HH:mm")]}),$=()=>{var e;const l=_.value;o.line=((e=l[0])==null?void 0:e.value)||"",t.nextTick(()=>{var u;const s=k.value;o.point=((u=s[0])==null?void 0:u.value)||""})},G=()=>{var e;const l=k.value;o.point=((e=l[0])==null?void 0:e.value)||""},W=l=>{o.timeRange=l;const e=d.dayjs(),s=l==="1d"?e.subtract(1,"day"):l==="1w"?e.subtract(1,"week"):e.subtract(1,"month");o.dateRange=[s.format("YYYY/MM/DD HH:mm"),e.format("YYYY/MM/DD HH:mm")]},J=()=>{if(n.mode==="edit")return;const l=w.value.find(e=>e.area===o.area&&e.line===o.line&&e.point===o.point);m.publish({type:"filter",area:o.area,line:o.line,point:o.point,objectId:(l==null?void 0:l.object_id)||"",timeRange:o.timeRange,dateRange:[...o.dateRange]})},K=t.computed(()=>({backgroundColor:r.value.bgColor,color:r.value.textColor,fontSize:`${r.value.fontSize}px`,borderBottom:`1px solid ${r.value.borderColor}`})),p=t.computed(()=>({color:r.value.labelColor,fontSize:`${r.value.fontSize}px`})),X=t.computed(()=>({color:"#fff",background:r.value.btnActiveColor,borderColor:r.value.btnActiveColor}));return t.onMounted(()=>{m.init()}),t.onUnmounted(()=>{m.cleanup()}),(l,e)=>{const s=b.ElOption,u=b.ElSelect,v=b.ElDatePicker,f=b.ElButton;return t.openBlock(),t.createElementBlock("div",{class:"gnss-filter-bar-wrap",style:t.normalizeStyle(K.value)},[t.createElementVNode("div",ne,[t.unref(r).showAreaFilter?(t.openBlock(),t.createElementBlock("div",re,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"区域位置:",4),t.createVNode(u,{modelValue:o.area,"onUpdate:modelValue":e[0]||(e[0]=a=>o.area=a),size:"small",style:{width:"90px"},onChange:$},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showLineFilter?(t.openBlock(),t.createElementBlock("div",ie,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"监测线:",4),t.createVNode(u,{modelValue:o.line,"onUpdate:modelValue":e[1]||(e[1]=a=>o.line=a),size:"small",style:{width:"90px"},onChange:G},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showPointFilter?(t.openBlock(),t.createElementBlock("div",se,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"监测点:",4),t.createVNode(u,{modelValue:o.point,"onUpdate:modelValue":e[2]||(e[2]=a=>o.point=a),size:"small",style:{width:"80px"}},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,a=>(t.openBlock(),t.createBlock(s,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showTimeRange?(t.openBlock(),t.createElementBlock("div",ce,[t.createElementVNode("span",{class:"filter-label",style:t.normalizeStyle(p.value)},"时间范围:",4),t.createElementVNode("div",ue,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(U,a=>t.createElementVNode("button",{key:a.value,class:t.normalizeClass(["range-btn",{active:o.timeRange===a.value}]),style:t.normalizeStyle(o.timeRange===a.value?X.value:{}),onClick:C=>W(a.value)},t.toDisplayString(a.label),15,de)),64))])])):t.createCommentVNode("",!0),t.unref(r).showDatePicker?(t.openBlock(),t.createElementBlock("div",me,[t.createVNode(v,{modelValue:o.dateRange,"onUpdate:modelValue":e[3]||(e[3]=a=>o.dateRange=a),type:"datetimerange",size:"small",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",style:{"max-width":"340px","min-width":"200px",width:"100%"}},null,8,["modelValue"])])):t.createCommentVNode("",!0),t.unref(r).showQueryBtn?(t.openBlock(),t.createBlock(f,{key:5,type:"primary",size:"small",onClick:J},{default:t.withCtx(()=>[...e[4]||(e[4]=[t.createTextVNode("查询",-1)])]),_:1})):t.createCommentVNode("",!0)]),t.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ce=d._export_sfc(he,[["__scopeId","data-v-ecbbd401"]]);exports.default=Ce;
|
|
@@ -18,8 +18,8 @@ import "element-plus/es/components/select/style/css";
|
|
|
18
18
|
import "element-plus/es/components/option/style/css";
|
|
19
19
|
import { defineComponent as ye, computed as m, reactive as he, onMounted as ge, onUnmounted as Ce, openBlock as r, createElementBlock as c, normalizeStyle as v, createElementVNode as p, unref as f, createVNode as w, withCtx as k, Fragment as S, renderList as R, createBlock as x, createCommentVNode as b, normalizeClass as _e, toDisplayString as we, createTextVNode as ke, renderSlot as Se, nextTick as Re } from "vue";
|
|
20
20
|
import "html2canvas";
|
|
21
|
-
import { B as xe } from "./element-resize-detector-
|
|
22
|
-
import {
|
|
21
|
+
import { B as xe } from "./element-resize-detector-BCRzpPES.js";
|
|
22
|
+
import { e as h, _ as De } from "./index-LgTfdmT4.js";
|
|
23
23
|
import { A as Ae, D as Ye } from "./ele-lin-icon-Dax-ZiWV.js";
|
|
24
24
|
const Fe = { class: "filter-bar" }, Be = {
|
|
25
25
|
key: 0,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var de=Object.defineProperty,ue=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var U=Object.getOwnPropertySymbols;var pe=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable;var m=Math.pow,z=(y,l,d)=>l in y?de(y,l,{enumerable:!0,configurable:!0,writable:!0,value:d}):y[l]=d,K=(y,l)=>{for(var d in l||(l={}))pe.call(l,d)&&z(y,d,l[d]);if(U)for(var d of U(l))ye.call(l,d)&&z(y,d,l[d]);return y},W=(y,l)=>ue(y,me(l));var J=(y,l,d)=>new Promise((g,A)=>{var _=p=>{try{h(d.next(p))}catch(F){A(F)}},w=p=>{try{h(d.throw(p))}catch(F){A(F)}},h=p=>p.done?g(p.value):Promise.resolve(p.value).then(_,w);h((d=d.apply(y,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue");require("html2canvas");const f=require("./index-
|
|
1
|
+
"use strict";var de=Object.defineProperty,ue=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var U=Object.getOwnPropertySymbols;var pe=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable;var m=Math.pow,z=(y,l,d)=>l in y?de(y,l,{enumerable:!0,configurable:!0,writable:!0,value:d}):y[l]=d,K=(y,l)=>{for(var d in l||(l={}))pe.call(l,d)&&z(y,d,l[d]);if(U)for(var d of U(l))ye.call(l,d)&&z(y,d,l[d]);return y},W=(y,l)=>ue(y,me(l));var J=(y,l,d)=>new Promise((g,A)=>{var _=p=>{try{h(d.next(p))}catch(F){A(F)}},w=p=>{try{h(d.throw(p))}catch(F){A(F)}},h=p=>p.done?g(p.value):Promise.resolve(p.value).then(_,w);h((d=d.apply(y,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue");require("html2canvas");const f=require("./index-ZwyqrmaH.cjs"),_e=require("./EChartComponentBase-Dz5E-lyI.cjs"),fe=require("./api-nw_9niqv.cjs"),Q=require("./ele-lin-icon-Dke_1AmT.cjs"),ve={class:"table-section"},be={class:"table-section-header"},ge={class:"table-toolbar"},he={class:"table-scroll-wrapper"},Se={class:"report-table"},xe={key:0},Ye=["colspan"],je={class:"table-pagination"},De={class:"page-info"},Ne={class:"page-controls"},Ee=["disabled"],Me={class:"page-num"},ke=["disabled"],Ce={DEFAULT_ICON:Q.DEFAULT_ICON,ACTIVE_ICON:Q.ACTIVE_ICON,NAME_CN:"GNSS历史明细报表",NAME_EN:"GNSS History Table",ORDER:5},He={bgColor:{value:"#f5f7fa",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},we=[{name:"序号",fv:"_index",object_id:"",type:"index"},{name:"编号",fv:"_device",object_id:"",type:"device"},{name:"区域",fv:"_area",object_id:"",type:"area"},{name:"时间",fv:"_time",object_id:"",type:"time"},{name:"基准X",fv:"base_x",object_id:"",type:"data"},{name:"基准Y",fv:"base_y",object_id:"",type:"data"},{name:"基准H",fv:"base_h",object_id:"",type:"data"},{name:"X位移",fv:"x_disp",object_id:"",type:"data"},{name:"Y位移",fv:"y_disp",object_id:"",type:"data"},{name:"H位移",fv:"h_disp",object_id:"",type:"data"},{name:"XY位移",fv:"xy_disp",object_id:"",type:"data"},{name:"XYH位移",fv:"xyh_disp",object_id:"",type:"data"},{name:"X累积位移",fv:"x_cum_disp",object_id:"",type:"data"},{name:"Y累积位移",fv:"y_cum_disp",object_id:"",type:"data"},{name:"H累积位移",fv:"h_cum_disp",object_id:"",type:"data"},{name:"XY累积位移",fv:"xy_cum_disp",object_id:"",type:"data"},{name:"XYH累积位移",fv:"xyh_cum_disp",object_id:"",type:"data"},{name:"X速度",fv:"x_speed",object_id:"",type:"data"},{name:"Y速度",fv:"y_speed",object_id:"",type:"data"},{name:"H速度",fv:"h_speed",object_id:"",type:"data"},{name:"XY速度",fv:"xy_speed",object_id:"",type:"data"},{name:"XYH速度",fv:"xyh_speed",object_id:"",type:"data"},{name:"X加速度",fv:"x_accel",object_id:"",type:"data"},{name:"Y加速度",fv:"y_accel",object_id:"",type:"data"},{name:"H加速度",fv:"h_accel",object_id:"",type:"data"},{name:"切线角",fv:"tangent_angle",object_id:"",type:"data"}],Fe=["name","fv","object_id","type"],Ve=["mosaic","statistics","statisticsRealtime"],Ae={useAlias:!1,multiObject:!0,hideMultiObject:!1,source:"mosaic"},Re={DEFAULT:Ce,OPTIONS:He,DATA:we,PARAMS:Fe,SOURCE:Ve,COMMON:Ae},Oe=e.defineComponent(W(K({},Re),{__name:"gnssHistoryTable",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(y){const l=y;class d extends _e.EChartComponentBase{constructor(){super(...arguments),this._lastDedupeKey=""}extractStyles(){var r,n,u,s,c;const t=(r=this.props.conf)==null?void 0:r.options,o=((n=t==null?void 0:t.linkChannel)==null?void 0:n.value)||"gnss",i=((u=t==null?void 0:t.customChannel)==null?void 0:u.value)||"";return{bgColor:((s=t==null?void 0:t.bgColor)==null?void 0:s.value)||"#f5f7fa",textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#333333",linkChannel:o==="custom"&&i?i:o}}getChartOption(){return{}}onLinkEvent(t){ne(t)}onPreview(){}setSocketData(t){if(!t||!t.data)return;const{data:o}=this.props.conf;if(!o||!Array.isArray(o))return;const i=t.datetime||f.dayjs().format("YYYY/MM/DD HH:mm:ss"),r=`${i}_${JSON.stringify(t.data)}`;if(r===this._lastDedupeKey)return;this._lastDedupeKey=r;const n={};if(o.forEach(s=>{if(s.type==="data"&&s.fv){const c=this.extractDataValue(t,s.fv);c!=null&&(n[s.fv]=String(c))}}),Object.keys(n).length===0)return;const u={time:i,area:w.value||"-",device:_.value?`GNSS${_.value}`:"GNSS",metrics:n};S.rows.unshift(u),S.rows.length>1e3&&(S.rows=S.rows.slice(0,1e3))}}const g=new d(l,"gnssHistoryTable");g.setupLifecycle();const A=g.getStyle(),_=e.ref(""),w=e.ref(""),h=e.ref(""),p=e.reactive({timeRange:"1d",dateRange:[f.dayjs().subtract(1,"day").format("YYYY/MM/DD HH:mm"),f.dayjs().format("YYYY/MM/DD HH:mm")]}),F=()=>J(null,null,function*(){var n,u,s;if(j.value=1,l.mode==="edit"){I();return}if(!h.value)return;S.rows=[];const a=(n=g.session)==null?void 0:n.value,t=(u=l.conf)==null?void 0:u.id;a!=null&&a.componentRequests&&t&&a.componentRequests.delete(t);const{data:o,common:i}=l.conf;Array.isArray(o)&&o.forEach(c=>{c.object_id=h.value}),i.multiObject||(i.object_id=h.value);try{const c=f.dayjs(p.dateRange[0],"YYYY/MM/DD HH:mm").format("YYYY-MM-DD HH:mm:ss"),D=f.dayjs(p.dateRange[1],"YYYY/MM/DD HH:mm").format("YYYY-MM-DD HH:mm:ss"),k=f.dayjs(p.dateRange[1],"YYYY/MM/DD HH:mm").diff(f.dayjs(p.dateRange[0],"YYYY/MM/DD HH:mm"),"second"),x=Math.max(60,Math.floor(k/500)),V=(l.conf.data||[]).filter(b=>b.type==="data"&&b.fv),G=V.map(b=>b.fv),v=[{block_mapping:"influxdbproxy",action:"get_mosaic_list_with_time_span",start_time:c,end_time:D,time_span:x,time_swing:x,keys:G,object_id:h.value}],N=yield new Promise(b=>{fe.api.platform(Y=>{b(Y.result)},{block_mapping:"mixtools",action:"get_tools_mosaic_list",condition:v})}),E=Array.isArray(N)?((s=N[0])==null?void 0:s.data)||N[0]||[]:[];Array.isArray(E)&&E.length>0&&[...E].sort((Y,H)=>{const M=Y.time||Y.datetime||"",C=H.time||H.datetime||"";return new Date(C).getTime()-new Date(M).getTime()}).forEach(Y=>{const H=Y.time||Y.datetime;if(!H)return;const M={};V.forEach(C=>{const O=Y[C.fv];O!=null&&(M[C.fv]=String(O))}),Object.keys(M).length>0&&S.rows.push({time:f.dayjs(H).format("YYYY/MM/DD HH:mm:ss"),area:w.value||"-",device:_.value?`GNSS${_.value}`:"GNSS",metrics:M})}),console.log(`[GNSS历史明细] 历史数据加载完成,共 ${S.rows.length} 条,时间范围: ${c} ~ ${D}`)}catch(c){console.warn("[GNSS历史明细] 历史数据获取失败:",c)}const r=g.getSource();g.subscribeBySource(r,h.value)}),Z=e.computed(()=>({backgroundColor:A.value.bgColor,color:A.value.textColor})),R=e.computed(()=>{const{data:a}=l.conf;return!a||!Array.isArray(a)?[]:a.map(t=>({key:t.fv||"",label:t.name||t.fv||"-",type:t.type||"data"})).filter(t=>t.key)});e.computed(()=>R.value.filter(a=>a.type==="data"));const T=e.ref("hour"),j=e.ref(1),q=15,S=e.reactive({rows:[]}),B=e.computed(()=>{const a=T.value;if(a==="hour")return S.rows;const t=new Set,o=[];for(const i of S.rows){const r=f.dayjs(i.time,"YYYY/MM/DD HH:mm:ss");let n;if(a==="day")n=r.format("YYYY/MM/DD");else if(a==="week"){const u=r.startOf("year");n=r.year()+"-W"+Math.floor(r.diff(u,"day")/7)}else n=r.format("YYYY/MM");t.has(n)||(t.add(n),o.push(i))}return o}),$=e.computed(()=>Math.max(1,Math.ceil(B.value.length/q))),X=e.computed(()=>{const a=(j.value-1)*q;return B.value.slice(a,a+q)}),ee=()=>{j.value=1},I=()=>{const a=w.value||"-",t=_.value?`GNSS${_.value}`:"GNSS",o=parseInt(_.value)||50,i=f.dayjs(),r=100,n=+(2450+o*.1).toFixed(2),u=+(1300+o*.02).toFixed(2),s=+(1150+o*.01).toFixed(2);let c=0,D=0,k=0;const x=[];for(let V=0;V<r;V++){const G=i.subtract((r-V)*60,"minute"),v=()=>Math.random()-.5,N=+(.8+v()*.2).toFixed(2),E=+(.65+v()*.15).toFixed(2),b=+(.01+v()*.02).toFixed(2),Y=+Math.sqrt(m(N,2)+m(E,2)).toFixed(2),H=+Math.sqrt(m(N,2)+m(E,2)+m(b,2)).toFixed(2);c+=N,D+=E,k+=b;const M=+(8+v()*1.5).toFixed(2),C=+(8+v()*1.5).toFixed(2),O=+(8.5+v()*1).toFixed(2),oe=+Math.sqrt(m(M,2)+m(C,2)).toFixed(2),se=+Math.sqrt(m(M,2)+m(C,2)+m(O,2)).toFixed(2),le=+(v()*.1).toFixed(3),ce=+(v()*.08).toFixed(3),ie=+(v()*.06).toFixed(3),re=+(Math.atan2(E,N)*180/Math.PI).toFixed(1);x.push({time:G.format("YYYY/MM/DD HH:mm:ss"),area:a,device:t,metrics:{base_x:String(n),base_y:String(u),base_h:String(s),x_disp:String(N),y_disp:String(E),h_disp:String(b),xy_disp:String(Y),xyh_disp:String(H),x_cum_disp:c.toFixed(2),y_cum_disp:D.toFixed(2),h_cum_disp:k.toFixed(2),xy_cum_disp:Math.sqrt(m(c,2)+m(D,2)).toFixed(2),xyh_cum_disp:Math.sqrt(m(c,2)+m(D,2)+m(k,2)).toFixed(2),x_speed:String(M),y_speed:String(C),h_speed:String(O),xy_speed:String(oe),xyh_speed:String(se),x_accel:String(le),y_accel:String(ce),h_accel:String(ie),tangent_angle:re+"°"}})}S.rows=x},te=a=>{if(!a)return"#333";const t=parseFloat(a);return isNaN(t)?"#333":t>=20?"#ee4444":t>=10?"#e6a23c":"#333"},P=(a,t,o)=>{var i;switch(t.type){case"index":return String((j.value-1)*q+o+1);case"device":return a.device;case"area":return a.area;case"time":return a.time;default:return(i=a.metrics[t.key])!=null?i:"-"}},ae=()=>{const a=R.value,t=B.value;if(!t.length)return;const o=a.map(c=>c.label).join(","),i=t.map((c,D)=>a.map(k=>{const x=P(c,k,D);return k.type==="time"||x.includes(",")||x.includes('"')?`"${x.replace(/"/g,'""')}"`:x}).join(",")).join(`
|
|
2
2
|
`),r="\uFEFF"+o+`
|
|
3
3
|
`+i,n=new Blob([r],{type:"text/csv;charset=utf-8;"}),u=URL.createObjectURL(n),s=document.createElement("a");s.href=u,s.download=`GNSS监测历史明细_${_.value||"all"}_${f.dayjs().format("YYYYMMDDHHmmss")}.csv`,s.click(),URL.revokeObjectURL(u)},ne=a=>{const{payload:t}=a;if(!t)return;if(t.type==="filter"){t.point!=null&&(_.value=String(t.point)),t.area!=null&&(w.value=String(t.area)),t.objectId!=null&&(h.value=String(t.objectId)),t.timeRange&&(p.timeRange=t.timeRange),t.dateRange&&(p.dateRange=t.dateRange),F();return}const o=t.point||t.deviceId;o&&(_.value=String(o),F())};return e.onMounted(()=>{g.init(),l.mode==="edit"&&I()}),e.onUnmounted(()=>{g.cleanup()}),e.watch(()=>l.conf,()=>{g.init(),l.mode==="edit"&&I()},{deep:!0}),(a,t)=>{const o=L.ElOption,i=L.ElSelect,r=L.ElButton;return e.openBlock(),e.createElementBlock("div",{class:"gnss-history-table",style:e.normalizeStyle(Z.value)},[e.createElementVNode("div",ve,[e.createElementVNode("div",be,[t[5]||(t[5]=e.createElementVNode("div",{class:"table-title"},[e.createElementVNode("span",{class:"table-title-bar"}),e.createElementVNode("span",null,"GNSS监测 历史明细报表")],-1)),e.createElementVNode("div",ge,[t[4]||(t[4]=e.createElementVNode("span",{class:"toolbar-label"},"显示频率:",-1)),e.createVNode(i,{modelValue:T.value,"onUpdate:modelValue":t[0]||(t[0]=n=>T.value=n),size:"small",style:{width:"95px"},onChange:ee},{default:e.withCtx(()=>[e.createVNode(o,{label:"按小时",value:"hour"}),e.createVNode(o,{label:"按天显示",value:"day"}),e.createVNode(o,{label:"按周显示",value:"week"}),e.createVNode(o,{label:"按月显示",value:"month"})]),_:1},8,["modelValue"]),e.createVNode(r,{size:"small",type:"success",onClick:ae},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createElementVNode("span",null,"📥 导出分析报表 (Excel)",-1)])]),_:1})])]),e.createElementVNode("div",he,[e.createElementVNode("table",Se,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,n=>(e.openBlock(),e.createElementBlock("th",{key:n.key,class:e.normalizeClass({"col-fixed":n.type!=="data","col-idx":n.type==="index","col-time":n.type==="time"})},e.toDisplayString(n.label),3))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(n,u)=>(e.openBlock(),e.createElementBlock("tr",{key:u},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,s=>(e.openBlock(),e.createElementBlock("td",{key:s.key,class:e.normalizeClass({"col-fixed":s.type!=="data","col-idx":s.type==="index","col-time":s.type==="time","cell-angle":s.key==="tangent_angle"}),style:e.normalizeStyle(s.key==="tangent_angle"?{color:te(n.metrics[s.key])}:{})},e.toDisplayString(P(n,s,u)),7))),128))]))),128)),X.value.length===0?(e.openBlock(),e.createElementBlock("tr",xe,[e.createElementVNode("td",{colspan:R.value.length,style:{"text-align":"center",color:"#999",padding:"20px"}},"暂无数据",8,Ye)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",je,[e.createElementVNode("span",De,"共 "+e.toDisplayString(B.value.length)+" 条记录",1),e.createElementVNode("div",Ne,[e.createElementVNode("button",{class:"page-arrow",disabled:j.value<=1,onClick:t[1]||(t[1]=n=>j.value--)},"◀",8,Ee),e.createElementVNode("span",Me,e.toDisplayString(j.value)+" / "+e.toDisplayString($.value),1),e.createElementVNode("button",{class:"page-arrow",disabled:j.value>=$.value,onClick:t[2]||(t[2]=n=>j.value++)},"▶",8,ke)])])]),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)}}})),qe=f._export_sfc(Oe,[["__scopeId","data-v-ca0bbfec"]]);exports.default=qe;
|