@vtj/pro 0.7.9 → 0.7.10
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/@vtj/materials/assets/antdv/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/element/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +2 -2
- package/dist/assets/{index-GdUlSayE.js → index-FVtgQ5ED.js} +6 -6
- package/dist/assets/{index-_rOV5lyy.js → index-_dxMCReS.js} +1 -1
- package/dist/assets/{index--8NTWX6H.js → index-uwyjhRXo.js} +2 -2
- package/dist/assets/{preview-xP_ZYJ9k.js → preview-dUsgMMnl.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +10 -10
|
@@ -50,7 +50,7 @@ version: 2.9.0
|
|
|
50
50
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
51
51
|
* @name @vtj/icons
|
|
52
52
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
53
|
-
* @version 0.7.
|
|
53
|
+
* @version 0.7.10
|
|
54
54
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
55
55
|
*/const _g=B({name:"ExitFullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M298.666667 298.666667V85.333333h85.333333v298.666667H85.333333V298.666667h213.333334z m426.666666-213.333334v213.333334h213.333334v85.333333h-298.666667V85.333333h85.333333zM298.666667 938.666667v-213.333334H85.333333v-85.333333h298.666667v298.666667H298.666667z m426.666666 0h-85.333333v-298.666667h298.666667v85.333333h-213.333334v213.333334z"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),xg=B({name:"Fixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M374.442667 486.229333l-81.237334 101.034667c-2.218667 4.352-2.218667 6.570667 0 8.789333 0 2.218667 2.218667 4.352 6.570667 4.352H719.36c4.352 0 6.570667-2.133333 6.570667-4.352 0-2.218667 2.218667-4.437333 0-8.789333l-81.237334-101.034667H374.442667z m362.922666 179.2H281.770667a66.56 66.56 0 0 1-57.173334-35.754666 67.242667 67.242667 0 0 1 7.082667-66.730667l104.96-128.853333h345.856l104.96 128.853333c14.250667 19.029333 19.029333 45.226667 7.168 66.730667a66.56 66.56 0 0 1-57.258667 35.84zM380.16 178.773333H639.146667L680.362667 76.544c2.218667-4.266667 0-6.485333 0-6.485333 0-2.218667-2.133333-4.352-6.485334-4.352H347.562667c-4.352 0-6.570667 2.133333-6.570667 4.266666 0 2.218667-2.133333 4.437333 0 6.570667l39.253333 102.229333z m307.114667 62.122667H331.861333l-57.173333-145.493333a61.269333 61.269333 0 0 1 7.082667-57.173334 63.317333 63.317333 0 0 1 52.48-26.282666h355.413333c21.418667 0 40.533333 9.557333 52.48 26.197333 11.946667 16.725333 14.250667 38.229333 7.082667 57.258667l-61.952 145.493333z",color:"#FFFFFF"},{path:"M386.901333 426.922667h245.248V245.76H386.901333v181.162667z m309.930667 59.733333H322.304V186.026667h372.053333v300.544h2.474667zM510.72 992.256c-19.029333-16.725333-28.586667-40.618667-30.976-66.816L458.24 636.842667h107.349333l-21.418666 288.597333a127.146667 127.146667 0 0 1-33.450667 66.816",color:"#FFFFFF"},{path:"M19.2 905.557333m52.48 0l878.08 0q52.48 0 52.48 52.48l0 0.085334q0 52.48-52.48 52.48l-878.08 0q-52.48 0-52.48-52.48l0-0.085334q0-52.48 52.48-52.48Z",color:"#FFFFFF"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Sg=B({name:"Fullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M170.666667 170.666667v213.333333H85.333333V85.333333h298.666667v85.333334H170.666667z m682.666666 213.333333V170.666667h-213.333333V85.333333h298.666667v298.666667h-85.333334zM170.666667 640v213.333333h213.333333v85.333334H85.333333v-298.666667h85.333334z m682.666666 0h85.333334v298.666667h-298.666667v-85.333334h213.333333v-213.333333z"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),jg=B({name:"Invisible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M891.0336 113.7664a32 32 0 0 1 0 45.2352l-104.6016 104.6016a380.1088 380.1088 0 0 1 81.408 65.024l4.5312 4.7104c2.6112 2.6368 5.4272 5.3504 8.704 8.3968l11.6224 10.4192 30.6176 26.624 12.9792 11.6224c53.76 48.8448 73.984 78.7456 73.984 120.064 0 47.488-26.7776 79.744-100.3776 142.848l-17.8432 15.4368a471.04 471.04 0 0 0-15.5392 14.1312l-4.7104 4.6592-10.5984 11.008c-80.8192 81.4336-209.4848 129.536-346.7008 129.536-86.784 0-169.5744-18.9696-239.1808-53.3504l-135.5264 135.5008a32 32 0 1 1-45.2352-45.2352l123.8784-123.904a364.9536 364.9536 0 0 1-63.4368-56.192l-1.8176-2.048a249.0112 249.0112 0 0 0-21.4016-20.1728l-12.6976-10.7776-17.6896-14.72-12.4672-10.496C36.6592 581.7856 12.8 549.9392 12.8 510.464c0-38.7072 19.3792-66.5088 70.8096-111.7952l12.4416-10.7776 27.4688-23.1168c13.568-11.4688 21.4016-18.56 27.8016-25.3184l3.712-4.0448a30.0544 30.0544 0 1 1 44.9792 39.936c-6.656 7.4752-13.2352 14.0032-22.9888 22.6816l-9.216 8.0384-42.8544 36.1728c-12.288 10.6752-21.4528 19.328-29.2608 27.8016-15.1808 16.4352-22.784 30.0032-22.784 40.448 0 10.1376 7.2448 23.2448 21.7344 39.0912 7.8592 8.6016 17.152 17.408 29.696 28.2624l11.5968 9.856 17.4336 14.5152c17.8176 14.8224 28.416 24.0128 36.9664 32.5376l4.9664 5.0944 11.3408 12.3648a315.8272 315.8272 0 0 0 55.168 45.568l89.7536-89.8304a30.0544 30.0544 0 0 1 10.1632-10.1632l217.4976-217.472a146.4064 146.4064 0 0 0-200.1152 70.7328 146.4832 146.4832 0 0 0-12.288 69.632 30.0544 30.0544 0 0 1-60.0064 4.224 206.7712 206.7712 0 0 1 17.408-98.304c46.2592-103.936 168.448-150.8608 272.4096-104.576 9.3696 4.1728 18.2528 8.96 26.6496 14.2592l56.5248-56.5504c-50.5088-17.7408-106.88-27.3664-165.2736-27.3664-95.1808 0-185.7024 25.472-254.7968 71.552A30.08 30.08 0 0 1 226.3808 273.92c79.0272-52.736 181.3248-81.664 288.1536-81.664 75.3152 0 148.0704 14.4896 211.712 41.0368l119.552-119.5008a32 32 0 0 1 45.2352 0z m-148.5568 193.792l-71.0656 71.0912a206.592 206.592 0 0 1 29.824 215.808c-46.2848 103.9616-168.4992 150.8608-272.4608 104.576a205.7216 205.7216 0 0 1-48-29.7472l-60.1088 60.0832 10.112 4.2496c51.968 20.9664 110.7968 32.7168 170.88 34.2016l12.8768 0.1536c124.928 0 240.7168-44.1088 309.504-117.4272l6.656-6.8864c3.1744-3.1744 6.5536-6.4 10.4704-9.984l8.6528-7.7824 44.6976-38.8352c17.5872-15.6928 29.568-27.776 38.8864-39.68 11.2384-14.336 16.8192-26.624 16.8192-36.864 0-10.6752-5.9904-23.552-18.0224-38.6048-9.1648-11.4688-20.7104-23.1424-37.376-38.144l-11.904-10.496-26.7776-23.1936c-11.1104-9.728-18.4832-16.4608-25.0112-22.9376l-13.312-13.7472a332.9792 332.9792 0 0 0-75.3408-55.808z m-113.8432 113.8688l-205.056 205.0816a146.4064 146.4064 0 0 0 222.72-56.5248 146.3552 146.3552 0 0 0-17.664-148.5568z",color:"#CCCCCC"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),kg=B({name:"LineHeight",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M648 160H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8z m272.8 546H856V318h64.8c6 0 9.4-7 5.7-11.7L825.7 178.7c-2.9-3.7-8.5-3.7-11.3 0L713.6 306.3c-3.7 4.7-0.4 11.7 5.7 11.7H784v388h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.8-4.7 0.4-11.7-5.6-11.7z"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),eu=B({name:"Maximize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M926.45937303 97.54062697v828.2973677H97.54062697V97.54062697h828.91874606m4.97102697-77.6722963h-838.8608c-39.7682157 0-72.07989097 32.31167525-72.07989097 72.07989096v839.48217837c0 39.7682157 32.31167525 72.07989097 72.07989097 72.07989097h839.48217837c39.7682157 0 72.07989097-32.31167525 72.07989096-72.07989097v-838.8608c0-40.38959408-32.31167525-72.70126933-72.70126933-72.70126933 0.62137837 0 0 0 0 0z"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),tu=B({name:"Minimize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M65.23884 456.152041 958.760137 456.152041l0 111.695918L65.23884 567.847959 65.23884 456.152041z"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),nu=B({name:"Popup",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M959.72 0H294.216a63.96 63.96 0 0 0-63.96 63.96v127.92H64.28A63.96 63.96 0 0 0 0.32 255.84V959.4a63.96 63.96 0 0 0 63.96 63.96h703.56a63.96 63.96 0 0 0 63.96-63.96V792.465h127.92a63.96 63.96 0 0 0 63.96-63.96V63.96A63.96 63.96 0 0 0 959.72 0zM767.84 728.505V959.4H64.28V255.84h703.56z m189.322 0H831.8V255.84a63.96 63.96 0 0 0-63.96-63.96H294.216V63.96H959.72z"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Eg=B({name:"QrCodeLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M1024 866.459826V1024h-78.781217v-157.540174H1024z m-157.540174 0V1024H801.391304l-13.712695-13.712696v-143.827478h78.781217z m-78.758956-315.080348v157.540174h157.517913V551.401739H1024v236.321391H708.919652v-78.781217h-78.758956l-0.022261 143.805217-78.758957-78.758956v-222.586435h236.321392z m-315.080348 0l-0.022261 143.805218-143.782957-143.805218h143.805218zM1024 0v472.598261H551.379478V0H1024zM472.598261 0v472.598261h-222.564174l-78.758957-78.758957h222.564174V78.758957H78.758957v222.541913L0 222.564174V0h472.598261z m472.620522 78.758957H630.160696v315.080347H945.196522V78.758957zM315.080348 157.540174v157.540174H157.540174V157.540174h157.540174z m551.379478 0v157.540174h-157.540174V157.540174h157.540174z",color:"#26B8CF"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),ru=B({name:"RawClose",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M512 432.46249999L865.92499999 78.49999973a56.13749998 56.13749998 0 0 1 79.53750003-5e-8 56.17500029 56.17500029 0 0 1 0 79.53750002L591.49999971 512l353.925 353.92499999c21.97500029 21.97500029 22.12499972 57.4125003 0 79.53750003a56.17500029 56.17500029 0 0 1-79.53750004 0L512 591.49999971 158.07500001 945.50000027a56.13749998 56.13749998 0 0 1-79.53750003 5e-8 56.17500029 56.17500029 0 0 1 0-79.53750002L432.50000029 512 78.49999973 158.07500001a56.13749998 56.13749998 0 0 1-5e-8-79.53750003 56.17500029 56.17500029 0 0 1 79.53750002 0L512 432.50000029z"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),$g=B({name:"RawLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M800.421 436.525h-63.661v-148.673c0-124.507-100.762-225.757-224.732-225.757-123.98 0-224.857 101.25-224.857 225.766v148.662h-63.593c-30.667 0-55.532 24.952-55.532 55.752v407.048c0 30.848 24.865 55.82 55.532 55.82h576.9c30.667 0 55.465-24.97 55.465-55.82v-407.048c0-30.802-24.855-55.752-55.532-55.752zM543.203 706.409v88.88c-0.016 4.026-3.264 7.287-7.282 7.325h-47.733c-4.039-0.022-7.307-3.287-7.334-7.322v-88.882c-22.423-11.518-37.953-34.602-37.953-61.659 0-38.288 30.945-69.425 69.070-69.425 38.183 0 69.138 31.136 69.138 69.415 0.057 27.067-15.473 50.152-37.905 61.659zM650.514 436.525h-276.989v-144.986c0-76.691 62.196-139.146 138.552-139.146 76.366 0 138.447 62.454 138.447 139.146v144.986z"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Vg=B({name:"RawUnLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M796.444 446.009H343.61V320.853c0-86.47 70.542-157.013 157.013-157.013s157.014 70.542 157.014 157.013c0 25.031 20.48 45.511 45.51 45.511s45.512-20.48 45.512-45.51c0-136.534-111.502-248.036-248.036-248.036S252.587 184.32 252.587 320.853V446.01H204.8c-25.031 0-45.511 20.48-45.511 45.511v420.978c0 25.03 20.48 45.51 45.511 45.51h591.644c25.032 0 45.512-20.48 45.512-45.51V491.52c0-25.031-20.48-45.511-45.512-45.511zM537.031 737.28c-2.275 0-4.551 2.276-4.551 4.551v43.236c0 43.235-13.653 50.062-31.858 50.062s-31.858-4.551-31.858-50.062V739.556c0-2.276-2.275-4.552-4.55-4.552-13.654-9.102-22.756-25.03-22.756-45.51 0-31.858 27.306-59.165 59.164-59.165s59.165 25.031 59.165 59.164c2.275 20.48-9.103 36.41-22.756 47.787z"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Cg=B({name:"Rows",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M915.692308 275.692308h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538462v-59.076923C78.769231 171.323077 92.553846 157.538462 108.307692 157.538462h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538461v59.076923c0 15.753846-13.784615 29.538462-29.538461 29.538462z m0 293.415384h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538461v-59.076923c0-13.784615 13.784615-27.569231 29.538461-27.569231h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538461v59.076924c0 13.784615-13.784615 27.569231-29.538461 27.56923z m0 297.353846h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538461v-59.076923c0-15.753846 13.784615-29.538462 29.538461-29.538462h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538462v59.076923c0 15.753846-13.784615 29.538462-29.538461 29.538461z"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Ag=B({name:"Skin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M910.74 338.74L756.8 195.33c-11.5-10.71-27.32-16.15-43.59-14.99-1.53-0.12-3.03-0.18-4.48-0.18h-82.01l-5.75 2.98c-30.39 15.75-69.15 24.42-109.16 24.42s-78.78-8.67-109.16-24.42l-5.75-2.98h-82.02c-20.91 0-39.71 10.63-49.43 27.51L113.29 349.43C102.78 359.21 97 372.22 97 386.06c0 13.84 5.78 26.84 16.29 36.63l111.17 103.58c9.31 8.66 21.33 13.87 34.27 14.95v250.3c0 28.84 25.19 52.31 56.14 52.31h393.85c30.96 0 56.14-23.47 56.14-52.31V530.57c13.1-1 25.28-6.23 34.68-14.98l111.18-103.58c21.7-20.19 21.7-53.07 0.02-73.27z m0 0"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Og=B({name:"UnFixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M301.824 455.509333l-168.021333 18.261334c-5.973333 2.048-8.021333 4.010667-8.021334 8.106666-2.048 1.962667-2.048 5.973333 1.962667 10.069334l386.730667 386.730666c4.010667 4.010667 8.021333 4.010667 10.069333 1.962667 2.048-1.962667 6.058667-1.962667 8.106667-8.021333l18.261333-168.106667-249.088-249.002667z m168.106667 467.626667L83.2 536.661333C62.976 516.266667 56.917333 485.802667 65.024 457.472a80.725333 80.725333 0 0 1 62.72-50.602667l198.4-20.224 293.546667 293.546667-20.224 198.4c-4.010667 28.330667-22.272 54.613333-50.602667 62.72-28.330667 8.106667-58.709333 2.048-78.933333-18.176z m93.098666-720.64l240.896 240.896 133.632-56.661333c6.058667-2.048 6.058667-6.058667 6.058667-6.058667 2.048-2.048 2.048-6.144-2.048-10.24L637.952 66.901333C633.856 62.805333 629.76 62.805333 627.797333 64.853333c-2.048 2.048-6.058667 2.048-6.058666 6.144l-58.709334 131.584z m224.682667 317.866667L486.058667 218.709333 560.981333 46.592a73.557333 73.557333 0 0 1 54.613334-42.496 76.032 76.032 0 0 1 66.901333 22.186667l301.653333 301.738666a75.946667 75.946667 0 0 1 22.186667 66.816 73.557333 73.557333 0 0 1-42.496 54.613334l-176.128 70.826666z",color:"#FFFFFF"},{path:"M360.618667 421.12l224.682666 224.682667 165.973334-165.973334L526.592 255.146667 360.618667 421.12z m226.730666 315.818667L269.482667 419.072l255.146666-255.061333 315.733334 315.818666-255.146667 255.146667 2.133333 1.962667z",color:"#FFFFFF"},{path:"M0.256 1008.213333c-2.048-30.378667 10.069333-58.709333 30.293333-83.029333L257.365333 662.016l91.050667 91.136L85.333333 979.882667a152.576 152.576 0 0 1-84.992 28.330666",color:"#FFFFFF"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Tg=B({name:"UserLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M943.081739 44.877913a79.09287 79.09287 0 0 1 79.805218 75.620174l0.111304 4.296348v511.510261a79.09287 79.09287 0 0 1-75.620174 79.805217l-4.296348 0.111304H685.612522v100.930783h178.799304v145.229913l-124.660869-0.022261-54.227479-54.227478h124.66087v-36.730435l-161.413565-0.022261-54.227479-54.227478h36.841739v-100.930783h-137.772521l-54.249739-54.249739h481.458087c26.000696 0 46.124522-18.988522 47.838608-44.432695l0.111305-3.494957V147.055304c0-27.158261-20.769391-47.949913-47.949913-47.949913H102.177391c-25.978435 0-46.124522 19.010783-47.838608 44.432696l-0.111305 3.517217v129.78087L0 222.608696V124.416l0.111304-3.917913A79.026087 79.026087 0 0 1 75.620174 44.966957l4.296348-0.111305h863.165217z m-38.244174 118.160696v435.021913l-529.408-0.022261L118.160696 340.769391V163.038609h786.676869z",color:"#26B8CF"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Dg=B({name:"Visible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M514.5344 192.2304c137.216 0 265.856 48.0768 346.7008 129.536l8.576 8.9344c5.888 6.144 12.288 12.16 22.8864 21.4528l30.592 26.624 13.0048 11.6224c53.76 48.8448 73.984 78.7456 73.984 120.064 0 45.952-25.088 77.6448-93.4144 136.832l-24.832 21.4528c-9.0112 7.936-14.976 13.4656-20.224 18.7904l-10.5984 11.008c-80.8192 81.4336-209.4848 129.536-346.7008 129.536-141.7216 0-272.896-50.6112-353.2544-136.3456l-8.064-8.8576-4.2496-4.4544c-6.7072-6.784-15.3088-14.336-29.8496-26.5216l-17.6896-14.72-12.4672-10.496C36.6592 581.7856 12.8 549.9392 12.8 510.464c0-41.6768 22.4768-70.7328 83.2512-122.5728l27.4688-23.1168c13.568-11.4688 21.4016-18.56 27.8016-25.3184l3.712-4.0448a30.0544 30.0544 0 1 1 44.9792 39.936l-5.76 6.2464c-6.8608 7.168-14.592 14.336-26.4448 24.4736L124.928 442.24c-12.288 10.6752-21.4528 19.328-29.2608 27.8016-15.1808 16.4352-22.784 30.0032-22.784 40.448 0 10.1376 7.2448 23.2448 21.7344 39.0912 7.8592 8.6016 17.152 17.408 29.696 28.2624l11.5968 9.856 27.2896 22.784c15.1296 12.7488 24.064 20.8896 32.0768 29.3632l11.3408 12.3648c31.7696 33.28 74.496 61.3888 124.16 81.408 55.6544 22.4512 119.2192 34.3552 183.7312 34.3552 121.2672 0 233.9072-41.5488 303.3088-111.0272l12.8512-13.2864 6.7328-6.5024c3.584-3.4048 7.6032-7.04 12.3904-11.264l44.6976-38.8352 10.9312-9.984c11.8528-11.0848 20.7104-20.4288 27.9552-29.696 11.2384-14.336 16.8192-26.624 16.8192-36.864 0-10.6752-5.9904-23.552-18.0224-38.6048-9.1648-11.4688-20.7104-23.1424-37.376-38.144l-11.904-10.496-26.7776-23.1936-12.4416-11.0592c-4.8384-4.3776-8.832-8.192-12.544-11.8784l-13.312-13.7472c-69.4272-69.4784-182.016-111.0272-303.3088-111.0272-95.1808 0-185.7024 25.472-254.7968 71.552A30.08 30.08 0 0 1 226.3808 273.92c79.0272-52.736 181.3248-81.664 288.1536-81.664z m-1.8176 111.9488c31.8976 0 62.5664 7.1168 91.008 21.12a30.08 30.08 0 0 1-26.5472 53.9392 146.4064 146.4064 0 0 0-210.688 131.3024 146.4064 146.4064 0 0 0 146.2272 146.2016 146.4064 146.4064 0 0 0 146.2272-146.2016c0-23.936-5.888-47.6672-17.0496-68.608a30.0544 30.0544 0 0 1 53.0688-28.2624 206.7712 206.7712 0 0 1 24.0896 96.8704c0 113.792-92.544 206.336-206.336 206.336s-206.336-92.544-206.336-206.336c0-113.8176 92.544-206.3616 206.336-206.3616z m97.2544 152.0128l3.2256 0.4864c16.2304 3.4048 26.6496 19.2512 23.296 35.4304-3.5072 17.4592-12.7488 42.9312-29.3888 67.4816-28.5184 42.0352-69.248 64.4352-117.504 64.4352-3.9936 0-7.9616-0.1536-12.0064-0.4608a30.0544 30.0544 0 1 1 4.4544-59.9552c29.5424 2.176 53.1456-8.448 71.424-32.384l3.3792-4.6336 2.6624-4.0704c5.888-9.3184 10.5984-19.3792 14.1568-29.4656l2.1504-6.4512a115.712 115.712 0 0 0 0.768-2.6368l1.8944-7.2192c4.352-13.3632 17.4848-21.9392 31.488-20.5568z",color:"#CCCCCC"}].map((e,t)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Ig=Object.freeze(Object.defineProperty({__proto__:null,ExitFullscreen:_g,Fixed:xg,Fullscreen:Sg,Invisible:jg,LineHeight:kg,Maximize:eu,Minimize:tu,Popup:nu,QrCodeLogin:Eg,RawClose:ru,RawLock:$g,RawUnLock:Vg,Rows:Cg,Skin:Ag,UnFixed:Og,UserLogin:Tg,Visible:Dg},Symbol.toStringTag,{value:"Module"}));function J(n,e){return Et(B({name:n,render(){return x("i",{class:e})}}))}const Bg=J("VtjIconWindowMax","vtj-icon-window-max"),Rg=J("VtjIconWindowMin","vtj-icon-window-min"),Mg=J("VtjIconWindowClose","vtj-icon-window-close"),Pg=J("VtjIconWindowNormal","vtj-icon-window-normal"),Ng=J("VtjIconWindowDown","vtj-icon-window-down"),zg=J("VtjIconWindowUp","vtj-icon-window-up"),Fg=J("VtjIconNpSave","vtj-icon-np-save"),Lg=J("VtjIconNpFile","vtj-icon-np-file"),Hg=J("VtjIconNpEdit","vtj-icon-np-edit"),Ug=J("VtjIconNpShare","vtj-icon-np-share"),qg=J("VtjIconNpSearch","vtj-icon-np-search"),Wg=J("VtjIconNpExport","vtj-icon-np-export"),Jg=J("VtjIconNpImport","vtj-icon-np-import"),Kg=J("VtjIconNpList","vtj-icon-np-list"),Gg=J("VtjIconNpPrint","vtj-icon-np-print"),Yg=J("VtjIconNpCancel","vtj-icon-np-cancel"),Zg=J("VtjIconNpConfirm","vtj-icon-np-confirm"),Xg=J("VtjIconNpReset","vtj-icon-np-reset"),Qg=J("VtjIconNpReturnAll","vtj-icon-np-return-all"),ey=J("VtjIconNpReturn","vtj-icon-np-return"),ty=J("VtjIconNpRemove","vtj-icon-np-remove"),ny=J("VtjIconNpRemoveRow","vtj-icon-np-remove-row"),ry=J("VtjIconNpDelete","vtj-icon-np-delete"),iy=J("VtjIconNpExit","vtj-icon-np-exit"),oy=J("VtjIconNpRefresh","vtj-icon-np-refresh"),sy=J("VtjIconNpAdd","vtj-icon-np-add"),ay=J("VtjIconNpSelect","vtj-icon-np-select"),ly=J("VtjIconNpAddRow","vtj-icon-np-add-row"),uy=J("VtjIconNpExtend","vtj-icon-np-extend"),cy=J("VtjIconNpClose","vtj-icon-np-close"),dy=J("VtjIconNpSubmit","vtj-icon-np-submit"),py=J("VtjIconDeps","vtj-icon-deps"),iu=J("VtjIconBack","vtj-icon-back"),ou=J("VtjIconHome","vtj-icon-home"),su=J("VtjIconApi","vtj-icon-api"),hy=J("VtjIconExport","vtj-icon-export"),fy=J("VtjIconImport","vtj-icon-import"),my=J("VtjIconGreater","vtj-icon-greater"),vy=J("VtjIconSmaller","vtj-icon-smaller"),mo=J("VtjIconCheck","vtj-icon-check"),au=J("VtjIconSwitch","vtj-icon-switch"),vo=J("VtjIconCopy","vtj-icon-copy"),go=J("VtjIconLock","vtj-icon-lock"),lu=J("VtjIconUnlock","vtj-icon-unlock"),yo=J("VtjIconLayers","vtj-icon-layers"),gy=J("VtjIconConsole","vtj-icon-console"),yy=J("VtjIconTeam","vtj-icon-team"),by=J("VtjIconPublish","vtj-icon-publish"),uu=J("VtjIconPreview","vtj-icon-preview"),cu=J("VtjIconSave","vtj-icon-save"),du=J("VtjIconPc","vtj-icon-pc"),pu=J("VtjIconPhone","vtj-icon-phone"),hu=J("VtjIconPad","vtj-icon-pad"),fu=J("VtjIconRedo","vtj-icon-redo"),mu=J("VtjIconRefresh","vtj-icon-refresh"),vu=J("VtjIconUndo","vtj-icon-undo"),gu=J("VtjIconCategory","vtj-icon-category"),wy=J("VtjIconProject","vtj-icon-project"),_y=J("VtjIconNotice","vtj-icon-notice"),xy=J("VtjIconFav","vtj-icon-fav"),yu=J("VtjIconBug","vtj-icon-bug"),Sy=J("VtjIconFile","vtj-icon-file"),jy=J("VtjIconFolder","vtj-icon-folder"),ky=J("VtjIconUpload","vtj-icon-upload"),Ey=J("VtjIconDownload","vtj-icon-download"),$y=J("VtjIconUser","vtj-icon-user"),bu=J("VtjIconSetting","vtj-icon-setting"),Vy=J("VtjIconArrowRight","vtj-icon-arrow-right"),Cy=J("VtjIconArrowLeft","vtj-icon-arrow-left"),wu=J("VtjIconArrowDown","vtj-icon-arrow-down"),_u=J("VtjIconArrowUp","vtj-icon-arrow-up"),Ay=J("VtjIconShare","vtj-icon-share"),Oy=J("VtjIconData","vtj-icon-data"),Ty=J("VtjIconTemplate","vtj-icon-template"),Dy=J("VtjIconExitFullscreen","vtj-icon-exit-fullscreen"),Iy=J("VtjIconFullscreen","vtj-icon-fullscreen"),bo=J("VtjIconEdit","vtj-icon-edit"),zn=J("VtjIconRemove","vtj-icon-remove"),By=J("VtjIconJs","vtj-icon-js"),Ry=J("VtjIconDatabase","vtj-icon-database"),xu=J("VtjIconInfo","vtj-icon-info"),wo=J("VtjIconPlus","vtj-icon-plus"),My=J("VtjIconMinus","vtj-icon-minus"),Su=J("VtjIconHelp","vtj-icon-help"),ju=J("VtjIconVars","vtj-icon-vars"),ku=J("VtjIconOutline","vtj-icon-outline"),Eu=J("VtjIconVisible","vtj-icon-visible"),_o=J("VtjIconInvisible","vtj-icon-invisible"),$u=J("VtjIconDocument","vtj-icon-document"),Vu=J("VtjIconHistory","vtj-icon-history"),Py=J("VtjIconFixed","vtj-icon-fixed"),Ny=J("VtjIconUnfixed","vtj-icon-unfixed"),Cu=J("VtjIconSearch","vtj-icon-search"),zy=J("VtjIconMore","vtj-icon-more"),Fy=J("VtjIconClose","vtj-icon-close"),Au=J("VtjIconComponents","vtj-icon-components"),Ou=J("VtjIconBlock","vtj-icon-block"),Ly=Object.freeze(Object.defineProperty({__proto__:null,VtjIconApi:su,VtjIconArrowDown:wu,VtjIconArrowLeft:Cy,VtjIconArrowRight:Vy,VtjIconArrowUp:_u,VtjIconBack:iu,VtjIconBlock:Ou,VtjIconBug:yu,VtjIconCategory:gu,VtjIconCheck:mo,VtjIconClose:Fy,VtjIconComponents:Au,VtjIconConsole:gy,VtjIconCopy:vo,VtjIconData:Oy,VtjIconDatabase:Ry,VtjIconDeps:py,VtjIconDocument:$u,VtjIconDownload:Ey,VtjIconEdit:bo,VtjIconExitFullscreen:Dy,VtjIconExport:hy,VtjIconFav:xy,VtjIconFile:Sy,VtjIconFixed:Py,VtjIconFolder:jy,VtjIconFullscreen:Iy,VtjIconGreater:my,VtjIconHelp:Su,VtjIconHistory:Vu,VtjIconHome:ou,VtjIconImport:fy,VtjIconInfo:xu,VtjIconInvisible:_o,VtjIconJs:By,VtjIconLayers:yo,VtjIconLock:go,VtjIconMinus:My,VtjIconMore:zy,VtjIconNotice:_y,VtjIconNpAdd:sy,VtjIconNpAddRow:ly,VtjIconNpCancel:Yg,VtjIconNpClose:cy,VtjIconNpConfirm:Zg,VtjIconNpDelete:ry,VtjIconNpEdit:Hg,VtjIconNpExit:iy,VtjIconNpExport:Wg,VtjIconNpExtend:uy,VtjIconNpFile:Lg,VtjIconNpImport:Jg,VtjIconNpList:Kg,VtjIconNpPrint:Gg,VtjIconNpRefresh:oy,VtjIconNpRemove:ty,VtjIconNpRemoveRow:ny,VtjIconNpReset:Xg,VtjIconNpReturn:ey,VtjIconNpReturnAll:Qg,VtjIconNpSave:Fg,VtjIconNpSearch:qg,VtjIconNpSelect:ay,VtjIconNpShare:Ug,VtjIconNpSubmit:dy,VtjIconOutline:ku,VtjIconPad:hu,VtjIconPc:du,VtjIconPhone:pu,VtjIconPlus:wo,VtjIconPreview:uu,VtjIconProject:wy,VtjIconPublish:by,VtjIconRedo:fu,VtjIconRefresh:mu,VtjIconRemove:zn,VtjIconSave:cu,VtjIconSearch:Cu,VtjIconSetting:bu,VtjIconShare:Ay,VtjIconSmaller:vy,VtjIconSwitch:au,VtjIconTeam:yy,VtjIconTemplate:Ty,VtjIconUndo:vu,VtjIconUnfixed:Ny,VtjIconUnlock:lu,VtjIconUpload:ky,VtjIconUser:$y,VtjIconVars:ju,VtjIconVisible:Eu,VtjIconWindowClose:Mg,VtjIconWindowDown:Ng,VtjIconWindowMax:Bg,VtjIconWindowMin:Rg,VtjIconWindowNormal:Pg,VtjIconWindowUp:zg},Symbol.toStringTag,{value:"Module"})),Ci={...cd,...Ig,...Ly};function Tu(n,e){return function(){return n.apply(e,arguments)}}const{toString:Hy}=Object.prototype,{getPrototypeOf:xo}=Object,Br=(n=>e=>{const t=Hy.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),st=n=>(n=n.toLowerCase(),e=>Br(e)===n),Rr=n=>e=>typeof e===n,{isArray:hn}=Array,Rn=Rr("undefined");function Uy(n){return n!==null&&!Rn(n)&&n.constructor!==null&&!Rn(n.constructor)&&Ke(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Du=st("ArrayBuffer");function qy(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&Du(n.buffer),e}const Wy=Rr("string"),Ke=Rr("function"),Iu=Rr("number"),Mr=n=>n!==null&&typeof n=="object",Jy=n=>n===!0||n===!1,hr=n=>{if(Br(n)!=="object")return!1;const e=xo(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},Ky=st("Date"),Gy=st("File"),Yy=st("Blob"),Zy=st("FileList"),Xy=n=>Mr(n)&&Ke(n.pipe),Qy=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Ke(n.append)&&((e=Br(n))==="formdata"||e==="object"&&Ke(n.toString)&&n.toString()==="[object FormData]"))},e2=st("URLSearchParams"),t2=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fn(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,i;if(typeof n!="object"&&(n=[n]),hn(n))for(r=0,i=n.length;r<i;r++)e.call(null,n[r],r,n);else{const o=t?Object.getOwnPropertyNames(n):Object.keys(n),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,n[a],a,n)}}function Bu(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,i;for(;r-- >0;)if(i=t[r],e===i.toLowerCase())return i;return null}const Ru=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mu=n=>!Rn(n)&&n!==Ru;function Ai(){const{caseless:n}=Mu(this)&&this||{},e={},t=(r,i)=>{const o=n&&Bu(e,i)||i;hr(e[o])&&hr(r)?e[o]=Ai(e[o],r):hr(r)?e[o]=Ai({},r):hn(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Fn(arguments[r],t);return e}const n2=(n,e,t,{allOwnKeys:r}={})=>(Fn(e,(i,o)=>{t&&Ke(i)?n[o]=Tu(i,t):n[o]=i},{allOwnKeys:r}),n),r2=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),i2=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},o2=(n,e,t,r)=>{let i,o,s;const a={};if(e=e||{},n==null)return e;do{for(i=Object.getOwnPropertyNames(n),o=i.length;o-- >0;)s=i[o],(!r||r(s,n,e))&&!a[s]&&(e[s]=n[s],a[s]=!0);n=t!==!1&&xo(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},s2=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},a2=n=>{if(!n)return null;if(hn(n))return n;let e=n.length;if(!Iu(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},l2=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&xo(Uint8Array)),u2=(n,e)=>{const t=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=t.next())&&!r.done;){const i=r.value;e.call(n,i[0],i[1])}},c2=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},d2=st("HTMLFormElement"),p2=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),Ls=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),h2=st("RegExp"),Pu=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Fn(t,(i,o)=>{let s;(s=e(i,o,n))!==!1&&(r[o]=s||i)}),Object.defineProperties(n,r)},f2=n=>{Pu(n,(e,t)=>{if(Ke(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(Ke(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},m2=(n,e)=>{const t={},r=i=>{i.forEach(o=>{t[o]=!0})};return hn(n)?r(n):r(String(n).split(e)),t},v2=()=>{},g2=(n,e)=>(n=+n,Number.isFinite(n)?n:e),ni="abcdefghijklmnopqrstuvwxyz",Hs="0123456789",Nu={DIGIT:Hs,ALPHA:ni,ALPHA_DIGIT:ni+ni.toUpperCase()+Hs},y2=(n=16,e=Nu.ALPHA_DIGIT)=>{let t="";const{length:r}=e;for(;n--;)t+=e[Math.random()*r|0];return t};function b2(n){return!!(n&&Ke(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const w2=n=>{const e=new Array(10),t=(r,i)=>{if(Mr(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=hn(r)?[]:{};return Fn(r,(s,a)=>{const u=t(s,i+1);!Rn(u)&&(o[a]=u)}),e[i]=void 0,o}}return r};return t(n,0)},_2=st("AsyncFunction"),x2=n=>n&&(Mr(n)||Ke(n))&&Ke(n.then)&&Ke(n.catch),R={isArray:hn,isArrayBuffer:Du,isBuffer:Uy,isFormData:Qy,isArrayBufferView:qy,isString:Wy,isNumber:Iu,isBoolean:Jy,isObject:Mr,isPlainObject:hr,isUndefined:Rn,isDate:Ky,isFile:Gy,isBlob:Yy,isRegExp:h2,isFunction:Ke,isStream:Xy,isURLSearchParams:e2,isTypedArray:l2,isFileList:Zy,forEach:Fn,merge:Ai,extend:n2,trim:t2,stripBOM:r2,inherits:i2,toFlatObject:o2,kindOf:Br,kindOfTest:st,endsWith:s2,toArray:a2,forEachEntry:u2,matchAll:c2,isHTMLForm:d2,hasOwnProperty:Ls,hasOwnProp:Ls,reduceDescriptors:Pu,freezeMethods:f2,toObjectSet:m2,toCamelCase:p2,noop:v2,toFiniteNumber:g2,findKey:Bu,global:Ru,isContextDefined:Mu,ALPHABET:Nu,generateString:y2,isSpecCompliantForm:b2,toJSONObject:w2,isAsyncFn:_2,isThenable:x2};function ce(n,e,t,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),i&&(this.response=i)}R.inherits(ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const zu=ce.prototype,Fu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Fu[n]={value:n}});Object.defineProperties(ce,Fu);Object.defineProperty(zu,"isAxiosError",{value:!0});ce.from=(n,e,t,r,i,o)=>{const s=Object.create(zu);return R.toFlatObject(n,s,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),ce.call(s,n.message,e,t,r,i),s.cause=n,s.name=n.name,o&&Object.assign(s,o),s};const S2=null;function Oi(n){return R.isPlainObject(n)||R.isArray(n)}function Lu(n){return R.endsWith(n,"[]")?n.slice(0,-2):n}function Us(n,e,t){return n?n.concat(e).map(function(r,i){return r=Lu(r),!t&&i?"["+r+"]":r}).join(t?".":""):e}function j2(n){return R.isArray(n)&&!n.some(Oi)}const k2=R.toFlatObject(R,{},null,function(n){return/^is[A-Z]/.test(n)});function Pr(n,e,t){if(!R.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=R.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,m){return!R.isUndefined(m[f])});const r=t.metaTokens,i=t.visitor||l,o=t.dots,s=t.indexes,a=(t.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(e);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function u(f){if(f===null)return"";if(R.isDate(f))return f.toISOString();if(!a&&R.isBlob(f))throw new ce("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(f)||R.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function l(f,m,v){let g=f;if(f&&!v&&typeof f=="object"){if(R.endsWith(m,"{}"))m=r?m:m.slice(0,-2),f=JSON.stringify(f);else if(R.isArray(f)&&j2(f)||(R.isFileList(f)||R.endsWith(m,"[]"))&&(g=R.toArray(f)))return m=Lu(m),g.forEach(function(S,y){!(R.isUndefined(S)||S===null)&&e.append(s===!0?Us([m],y,o):s===null?m:m+"[]",u(S))}),!1}return Oi(f)?!0:(e.append(Us(v,m,o),u(f)),!1)}const c=[],p=Object.assign(k2,{defaultVisitor:l,convertValue:u,isVisitable:Oi});function h(f,m){if(!R.isUndefined(f)){if(c.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(f),R.forEach(f,function(v,g){(!(R.isUndefined(v)||v===null)&&i.call(e,v,R.isString(g)?g.trim():g,m,p))===!0&&h(v,m?m.concat(g):[g])}),c.pop()}}if(!R.isObject(n))throw new TypeError("data must be an object");return h(n),e}function qs(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function So(n,e){this._pairs=[],n&&Pr(n,this,e)}const Hu=So.prototype;Hu.append=function(n,e){this._pairs.push([n,e])};Hu.toString=function(n){const e=n?function(t){return n.call(this,t,qs)}:qs;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function E2(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Uu(n,e,t){if(!e)return n;const r=t&&t.encode||E2,i=t&&t.serialize;let o;if(i?o=i(e,t):o=R.isURLSearchParams(e)?e.toString():new So(e,t).toString(r),o){const s=n.indexOf("#");s!==-1&&(n=n.slice(0,s)),n+=(n.indexOf("?")===-1?"?":"&")+o}return n}let Ws=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){R.forEach(this.handlers,function(t){t!==null&&e(t)})}};const qu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$2=typeof URLSearchParams<"u"?URLSearchParams:So,V2=typeof FormData<"u"?FormData:null,C2=typeof Blob<"u"?Blob:null,A2={isBrowser:!0,classes:{URLSearchParams:$2,FormData:V2,Blob:C2},protocols:["http","https","file","blob","url","data"]},Wu=typeof window<"u"&&typeof document<"u",O2=(n=>Wu&&["ReactNative","NativeScript","NS"].indexOf(n)<0)(typeof navigator<"u"&&navigator.product),T2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",D2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wu,hasStandardBrowserEnv:O2,hasStandardBrowserWebWorkerEnv:T2},Symbol.toStringTag,{value:"Module"})),rt={...D2,...A2};function I2(n,e){return Pr(n,new rt.classes.URLSearchParams,Object.assign({visitor:function(t,r,i,o){return rt.isNode&&R.isBuffer(t)?(this.append(r,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function B2(n){return R.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function R2(n){const e={},t=Object.keys(n);let r;const i=t.length;let o;for(r=0;r<i;r++)o=t[r],e[o]=n[o];return e}function Ju(n){function e(t,r,i,o){let s=t[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),u=o>=t.length;return s=!s&&R.isArray(i)?i.length:s,u?(R.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!R.isObject(i[s]))&&(i[s]=[]),e(t,r,i[s],o)&&R.isArray(i[s])&&(i[s]=R2(i[s])),!a)}if(R.isFormData(n)&&R.isFunction(n.entries)){const t={};return R.forEachEntry(n,(r,i)=>{e(B2(r),i,t,0)}),t}return null}function M2(n,e,t){if(R.isString(n))try{return(e||JSON.parse)(n),R.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const jo={transitional:qu,adapter:["xhr","http"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,i=R.isObject(n);if(i&&R.isHTMLForm(n)&&(n=new FormData(n)),R.isFormData(n))return r&&r?JSON.stringify(Ju(n)):n;if(R.isArrayBuffer(n)||R.isBuffer(n)||R.isStream(n)||R.isFile(n)||R.isBlob(n))return n;if(R.isArrayBufferView(n))return n.buffer;if(R.isURLSearchParams(n))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let o;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return I2(n,this.formSerializer).toString();if((o=R.isFileList(n))||t.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Pr(o?{"files[]":n}:n,s&&new s,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),M2(n)):n}],transformResponse:[function(n){const e=this.transitional||jo.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(n&&R.isString(n)&&(t&&!this.responseType||r)){const i=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(o){if(i)throw o.name==="SyntaxError"?ce.from(o,ce.ERR_BAD_RESPONSE,this,null,this.response):o}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rt.classes.FormData,Blob:rt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],n=>{jo.headers[n]={}});const ko=jo,P2=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),N2=n=>{const e={};let t,r,i;return n&&n.split(`
|
|
56
56
|
`).forEach(function(o){i=o.indexOf(":"),t=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!t||e[t]&&P2[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},Js=Symbol("internals");function bn(n){return n&&String(n).trim().toLowerCase()}function fr(n){return n===!1||n==null?n:R.isArray(n)?n.map(fr):String(n)}function z2(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const F2=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ri(n,e,t,r,i){if(R.isFunction(r))return r.call(this,e,t);if(i&&(e=t),!!R.isString(e)){if(R.isString(r))return e.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(e)}}function L2(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function H2(n,e){const t=R.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}let Nr=class{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function o(a,u,l){const c=bn(u);if(!c)throw new Error("header name must be a non-empty string");const p=R.findKey(i,c);(!p||i[p]===void 0||l===!0||l===void 0&&i[p]!==!1)&&(i[p||u]=fr(a))}const s=(a,u)=>R.forEach(a,(l,c)=>o(l,c,u));return R.isPlainObject(e)||e instanceof this.constructor?s(e,t):R.isString(e)&&(e=e.trim())&&!F2(e)?s(N2(e),t):e!=null&&o(t,e,r),this}get(e,t){if(e=bn(e),e){const r=R.findKey(this,e);if(r){const i=this[r];if(!t)return i;if(t===!0)return z2(i);if(R.isFunction(t))return t.call(this,i,r);if(R.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=bn(e),e){const r=R.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||ri(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let i=!1;function o(s){if(s=bn(s),s){const a=R.findKey(r,s);a&&(!t||ri(r,r[a],a,t))&&(delete r[a],i=!0)}}return R.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let r=t.length,i=!1;for(;r--;){const o=t[r];(!e||ri(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const t=this,r={};return R.forEach(this,(i,o)=>{const s=R.findKey(r,o);if(s){t[s]=fr(i),delete t[o];return}const a=e?L2(o):String(o).trim();a!==o&&delete t[o],t[a]=fr(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return R.forEach(this,(r,i)=>{r!=null&&r!==!1&&(t[i]=e&&R.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
@@ -61,24 +61,24 @@ version: 2.9.0
|
|
|
61
61
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
62
62
|
* @name @vtj/ui
|
|
63
63
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
64
|
-
* @version 0.7.
|
|
64
|
+
* @version 0.7.10
|
|
65
65
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
66
66
|
*/const _b={default:14,small:12,large:18},xb={icon:{type:[String,Object]},color:{type:String},size:{type:[Number,String],default:"inherit"},src:{type:String},background:{type:String},padding:{type:Number},radius:{type:Number}};function Mn(n){return typeof n=="string"?n:`${n}px`}function tr(n=0,e){if(typeof n=="number")return n;if(/(%|vh|vw)$/i.test(n)){const t=Number.parseInt(n);return Math.floor(e*t/100)}return Number.parseInt(n)}const Sb=["src"],Vt=B({name:"XIcon",__name:"Icon",props:xb,setup(n){const e=n,t=Hi(),r=Pn(),i=O(()=>{if(!e.icon)return null;const u=r?.appContext.app;return typeof e.icon=="object"?Et(e.icon):u?.component(e.icon)||e.icon}),o=O(()=>{const u={"is-pointer":!!t.onClick};return!i.value&&e.icon&&(u[e.icon]=!0),u}),s=O(()=>({"background-color":e.background,"border-radius":e.radius?Mn(e.radius):void 0,padding:e.padding?Mn(e.padding):void 0})),a=O(()=>typeof e.size=="number"?e.size:_b[e.size]??void 0);return(u,l)=>(b(),$(d(Fc),{class:be(["x-icon",o.value]),color:e.color,size:a.value,style:kt(s.value)},{default:k(()=>[se(u.$slots,"default",{},()=>[i.value?(b(),$(Ue(i.value),{key:0})):z("",!0),e.src?(b(),G("img",{key:1,src:e.src},null,8,Sb)):z("",!0)])]),_:3},8,["class","color","size","style"]))}}),sc={name:{type:String},label:{type:String},value:{type:[String,Number,Object,Array,Boolean]},icon:{type:[String,Object]},mode:{type:String,default:"button"},menus:{type:Array},tooltip:{type:[String,Object]},badge:{type:[String,Number,Object]},dropdown:{type:Object},button:{type:Object},disabled:{type:[Boolean,Function]},size:{type:String,default:"default"},type:{type:String,default:"primary"},background:{type:String,default:"always"},circle:{type:Boolean}};function jb(n){return O(()=>{const e=n.tooltip;if(e)return typeof e=="string"?{content:e}:e})}function kb(n){return O(()=>{const e=n.badge;if(e)return typeof e=="object"?e:{value:e}})}function Eb(n){return O(()=>{const{dropdown:e,menus:t}=n;if(t&&t.length>0)return Object.assign({popperClass:"x-action__menus",size:n.size},e||{})})}function $b(n){const e=Pn();return O(()=>{const t=d(n);if(t)if(typeof t=="string"||t.setup||t.render||Bc(t)){const r=e?.appContext.app;return{icon:typeof t=="string"&&r?.component(t)||t}}else return t;return null})}function $o(n){const e=$b(n);return e.value?Et(B({render:()=>Ae(Vt,e.value)})):void 0}function Vo(n,e){return O(()=>{const t=d(n);return typeof t=="function"?t(e):!!t})}const Vb={key:0},Cb=B({__name:"Trigger",props:sc,emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=$o(gr(t,"icon")),o=Vo(gr(t,"disabled")),s=O(()=>({[`is-${t.mode}`]:!!t.mode,[`is-${t.type}`]:!!t.type,[`is-${t.size}`]:!!t.size&&t.size!=="default",[`is-background-${t.background}`]:t.mode==="icon"&&!!t.background,"is-disabled":!!t.disabled,"is-circle":!!t.circle})),a=u=>{if(u.preventDefault(),!o.value)return r("click"),!1};return(u,l)=>t.mode==="button"?(b(),$(d($e),ye({key:0,icon:d(i),type:t.type,size:t.size,disabled:d(o)},t.button,{onClick:a}),{default:k(()=>[de(ne(u.label),1)]),_:1},16,["icon","type","size","disabled"])):(b(),G("div",{key:1,class:be(["x-action__inner",s.value]),onClick:a},[(b(),$(Ue(d(i)))),u.label?(b(),G("span",Vb,ne(u.label),1)):z("",!0)],2))}}),Le=B({name:"XAction",__name:"Action",props:sc,emits:["click","command"],setup(n,{emit:e}){const t=n,r=Dc(),i=e,o=jb(t),s=kb(t),a=Eb(t),u=Vo(gr(t,"disabled")),l=O(()=>({[`x-action--${t.mode}`]:!!t.mode})),c=()=>{u.value||i("click",Zt(t))},p=g=>{if(u.value)return;const S=t.menus?.find(y=>y.command===g);S&&i("command",Zt(S))},h=g=>Ae(ga,s.value,()=>[].concat(g)),f=g=>Ae(Ji,{...a.value,disabled:u.value,onCommand:p},{default:()=>[g],dropdown:()=>[Ae(Wi,()=>(t.menus||[]).map((S,y)=>Ae(br,S,()=>r.item?r.item({item:S,index:y}):S.label)))]}),m=g=>Ae($r,{...o.value,disabled:u.value},()=>[g]),v=O(()=>{let g=Ae(Et(Cb),{...t,onClick:c});const S=r.default?.();return S&&S.length&&(g=S[0]),s.value&&(g=h(g)),a.value&&(g=f(g)),o.value&&(g=m(g)),g});return(g,S)=>(b(),G("div",{class:be(["x-action",l.value])},[(b(),$(Ue(v.value)))],2))}}),Ab={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String,default:"primary"},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},Ob=B({name:"XActionBar",__name:"ActionBar",props:Ab,emits:["click","command"],setup(n,{emit:e}){const t=n,r=e,i=O(()=>(t.items||[]).map(a=>a==="|"?a:{...a,badge:a.badge?{...t.badge,...typeof a.badge=="object"?a.badge||{}:{value:a.badge}}:void 0,tooltip:a.tooltip?{...t.tooltip,...typeof a.tooltip=="object"?a.tooltip||{}:{content:a.tooltip}}:void 0})),o=a=>{r("click",a)},s=(a,u)=>{r("command",a,u)};return(a,u)=>(b(),$(d(ue),{class:"x-action-bar",align:"center"},{default:k(()=>[(b(!0),G(re,null,oe(i.value,l=>(b(),G(re,null,[l==="|"?(b(),$(d(Cn),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(b(),$(d(Le),ye({key:1,mode:t.mode,size:t.size,type:t.type,circle:t.circle,background:t.background,button:t.button,dropdown:t.dropdown,disabled:d(Vo)(t.disabled,l).value},l,{onClick:o,onCommand:c=>s(l,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),Tb={tag:{type:String,default:"div"},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},flex:{type:Boolean,default:!0},inline:{type:Boolean},direction:{type:String,default:"row"},wrap:{type:String,default:"nowrap"},justify:{type:String,default:"flex-start"},align:{type:String,default:"flex-start"},alignContent:{type:String,default:"stretch"},grow:{type:Boolean,default:!1},shrink:{type:Boolean,default:!1},alignSelf:{type:String,default:"auto"},overflow:{type:String},padding:{type:Boolean,default:!1},gap:{type:Boolean},autoPointer:{type:Boolean}},ue=B({name:"XContainer",__name:"Container",props:Tb,setup(n){const e=n,t=Hi(),r=Pn(),i=O(()=>{const a=r?.parent;if(!a)return!1;const u=a.proxy;return u.$options.name==="XContainer"||!!u.flex}),o=O(()=>({"is-fit":e.fit,"is-flex":e.flex&&!e.inline,"is-inline-flex":e.flex&&e.inline,[`is-direction-${e.direction}`]:e.flex&&e.direction!=="row",[`is-wrap-${e.wrap}`]:e.flex&&e.wrap!=="nowrap",[`is-justify-${e.justify}`]:e.flex&&e.justify!=="flex-start",[`is-align-${e.align}`]:e.flex&&e.align!=="flex-start",[`is-align-content-${e.alignContent}`]:e.flex&&e.alignContent!=="stretch","is-grow":e.grow??i.value,"is-shrink":i.value&&e.shrink,[`is-align-self-${e.alignSelf}`]:i.value&&e.alignSelf!=="auto",[`is-overflow-${e.overflow}`]:!!e.overflow,"is-padding":!!e.padding,"is-pointer":e.autoPointer&&!!t.onClick,"is-gap":!!e.gap})),s=O(()=>{const{width:a,height:u,fit:l}=e;return l?null:{width:a?Mn(a):void 0,height:u?Mn(u):void 0}});return(a,u)=>(b(),$(Ue(e.tag),{class:be(["x-container",o.value]),style:kt(s.value)},{default:k(()=>[se(a.$slots,"default")]),_:3},8,["class","style"]))}}),Db={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},Ib={key:0,class:"x-header__actions"},Bb=B({name:"XHeader",inheritAttrs:!1,__name:"Header",props:Db,setup(n){const e=n,t=$o(gr(e,"icon")),r=Hi(),i=O(()=>({[`is-size-${e.size}`]:!!e.size&&e.size!=="default","is-border":e.border,"is-pointer":!!r.onClick}));return(o,s)=>(b(),$(d(ue),{class:be(["x-header",i.value]),justify:"space-between",align:"center"},{default:k(()=>[x(d(ue),{align:"center",class:be(["x-header__wrapper",i.value]),grow:""},{default:k(()=>[d(t)?(b(),$(Ue(d(t)),{key:0,class:"x-header__icon",onClick:d(r).onClickIcon||d(r).onClick},null,8,["onClick"])):z("",!0),ae("span",{class:"x-header__content",onClick:s[0]||(s[0]=(...a)=>d(r).onClick&&d(r).onClick(...a))},[se(o.$slots,"default",{},()=>[de(ne(e.content),1)])]),e.more?(b(),$(d(Vt),{key:1,class:"x-header__more",icon:d(Sa)},null,8,["icon"])):z("",!0),e.subtitle||o.$slots.subtitle?(b(),G("span",{key:2,class:"x-header__subtitle",onClick:s[1]||(s[1]=(...a)=>d(r).onClick&&d(r).onClick(...a))},[se(o.$slots,"subtitle",{},()=>[de(ne(e.subtitle),1)])])):z("",!0)]),_:3},8,["class"]),o.$slots.actions?(b(),G("div",Ib,[se(o.$slots,"actions")])):z("",!0)]),_:3},8,["class"]))}}),Rb={fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},border:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},card:{type:Boolean},size:{type:String},shadow:{type:String},header:{type:[String,Object]},body:{type:Object},footer:{type:Object}},zr=B({name:"XPanel",__name:"Panel",props:Rb,setup(n,{expose:e}){const t=n,r=I(),i=O(()=>({"x-panel--card":!!t.card,"x-panel--default":!t.card,[`is-${t.size}`]:!!t.size&&t.size!=="default","is-border":!!t.border,"is-radius":!!t.radius,[`is-shadow-${t.shadow}`]:!!t.shadow&&t.shadow!=="none"})),o=O(()=>t.header===null?null:typeof t.header=="string"?{content:t.header,size:t.size}:{...t.header,size:t.size}),s=O(()=>t.fit||t.height?"auto":void 0);return e({bodyRef:r}),(a,u)=>(b(),$(d(ue),{class:be(["x-panel",i.value]),direction:"column",fit:t.fit,width:t.width,height:t.height},{default:k(()=>[o.value?(b(),$(d(ue),{key:0,flex:!1,class:"x-panel__header"},{default:k(()=>[se(a.$slots,"header",{},()=>[x(d(Bb),pt($t(o.value)),{default:k(()=>[se(a.$slots,"title")]),actions:k(()=>[se(a.$slots,"actions")]),_:3},16)])]),_:3})):z("",!0),x(d(ue),ye({ref_key:"bodyRef",ref:r,flex:!1,overflow:s.value,grow:"",padding:"",class:"x-panel__body"},t.body),{default:k(()=>[se(a.$slots,"default")]),_:3},16,["overflow"]),a.$slots.footer?(b(),$(d(ue),ye({key:1,flex:!1,padding:"",class:"x-panel__footer"},t.footer),{default:k(()=>[se(a.$slots,"footer")]),_:3},16)):z("",!0)]),_:3},8,["class","fit","width","height"]))}}),na="user-select-none";let ra=class{constructor(e,t={}){this.el=e,this.options=t,this.scope=pa(),this.scope.run(()=>{this.init()})}scope;dragging=!1;getHandle(){const{selector:e,handle:t}=this.options;return e?this.el.querySelector(e):t}getTarget(){const{target:e="body"}=this.options;return typeof e=="string"?document.querySelector(e):d(e)||document.body}init(){const{el:e,options:t}=this,{disabled:r,delay:i=150,onStart:o,onEnd:s}=t;if(r)return;let a=null;const u=this.getHandle(),l=this.getTarget();let c=e.getBoundingClientRect(),p=null;const{x:h,y:f}=gd(e,{initialValue:{x:c.x,y:c.y},...t,handle:u,onStart:(m,v)=>{document.body.classList.add(na),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=e.getBoundingClientRect(),p=l?.getBoundingClientRect(),o&&o(m,v)},i)},onEnd:(m,v)=>{if(clearTimeout(a),document.body.classList.remove(na),this.dragging&&p){this.dragging=!1;const{x:g,y:S}=m,y=this.getPosition(p,c,g,S);s&&s(y,v),p=null}}});fe([h,f],()=>{if(this.dragging&&p){const m=this.getPosition(p,c,h.value,f.value);e.style.left=`${m.x}px`,e.style.top=`${m.y}px`}})}getPosition(e,t,r,i){const{edge:o=50}=this.options,s=-t.width+o,a=e.width-o,u=0,l=e.height-o,c=Math.min(a,Math.max(r,s)),p=Math.min(l,Math.max(i,u));return{x:c,y:p}}destory(){this.scope.stop()}};const Mb={mounted(n,e){const t=e.value||{},r=new ra(n,t);n.__draggable__=r},updated(n,e){const t=e.value||{};let r=n.__draggable__;r&&!ho(r.options,t)&&(r.destory(),n.__draggable__=new ra(n,t))},unmounted(n){const e=n.__draggable__;e&&(e.destory(),n.__draggable__=null)}},si="user-select-none";let ia=class{constructor(e,t={}){this.el=e,this.options=t,this.scope=pa(),this.scope.run(()=>{this.init()})}scope;resizing=I(!1);direction=I("");MIE=null;cleanMousedown;cleanMouseup;init(){const{el:e,options:t}=this,{disabled:r,onStart:i,onEnd:o}=t;if(r)return;this.MIE=vd(e),this.cleanMousedown=Mo(document,"mousedown",()=>{this.direction?.value&&this.MIE&&(this.resizing.value=!0,e.classList.add("is-resizing",`is-${this.direction.value}-resizing`),i&&i(this.direction.value,this.MIE))}),this.cleanMouseup=Mo(document,"mouseup",()=>{this.resizing.value&&this.direction?.value&&this.MIE&&(e.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),o&&o(this.direction.value,this.MIE)),this.resizing.value=!1}),fe(this.direction,u=>{const l=document.body;l.style.cursor=u?`${u}-resize`:"",u?l.classList.add(si):l.classList.remove(si)});const{x:s,y:a}=this.MIE;fe([s,a],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:e,direction:t,resizing:r,options:i,el:o}=this,s=t?.value||"";if(!e||!r.value||!s)return;const{x:a,y:u,elementX:l,elementY:c,elementHeight:p,elementWidth:h}=e,{onResizing:f}=i,{minWidth:m=0,minHeight:v=0,maxWidth:g=99999,maxHeight:S=99999}=i;if(s.includes("e")){const y=Math.min(Math.max(l.value,m),g);o.style.width=`${y}px`}if(s.includes("s")){const y=Math.min(Math.max(c.value,v),S);o.style.height=`${y}px`}if(s.includes("w")){const y=Math.min(Math.max(h.value-l.value,m),g);o.style.width=`${y}px`,o.style.left=`${a.value}px`}if(s.includes("n")){const y=Math.min(Math.max(p.value-c.value,v),S);this.el.style.height=`${y}px`,this.el.style.top=`${u.value}px`}f&&f(s,e)}getDirection(){if(!this.MIE)return"";const{elementX:e,elementY:t,elementHeight:r,elementWidth:i,isOutside:o}=this.MIE;if(o.value)return"";const{dirs:s=["n","s","w","e"],edge:a=5}=this.options;let u="";return s.includes("n")&&t.value<=a?u+="n":s.includes("s")&&t.value>r.value-a&&(u+="s"),s.includes("w")&&e.value<=a?u+="w":s.includes("e")&&e.value>i.value-a&&(u+="e"),u}destory(){const e=document.body;e.style.cursor="",e.classList.remove(si),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),this.MIE?.stop(),this.scope.stop()}};const Ni={mounted(n,e){const t=e.value||{},r=new ia(n,t);n.__resizable__=r},updated(n,e){const t=e.value||{};let r=n.__resizable__;r&&!ho(r.options,t)&&(r.destory(),n.__resizable__=new ia(n,t))},unmounted(n){const e=n.__resizable__;e&&(e.destory(),n.__resizable__=null)}},Pb={modelValue:{type:Boolean,default:!0},title:{type:String},subtitle:{type:String},icon:{type:[String,Object]},size:{type:String,default:"default"},width:{type:[Number,String],default:"70%"},height:{type:[Number,String],default:"70%"},left:{type:[Number,String]},top:{type:[Number,String]},modal:{type:Boolean,default:!0},draggable:{type:[Boolean,Object],default:!0},resizable:{type:[Boolean,Object]},closable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!1},minimizable:{type:Boolean,default:!1},mode:{type:String,default:"normal"},content:{type:Object},src:{type:String},componentInstance:{type:Object},beforeClose:{type:Function},submit:{type:[Boolean,String]},cancel:{type:[Boolean,String]},bodyPadding:{type:Boolean,default:!0},primary:{type:Boolean}};let nn=1e3;function Nb(n,e){const{width:t,height:r}=Qi(e),i=Nt({mode:n.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++nn,dragging:!1,resizing:!1});return fe([t,r],([o,s])=>{i.wrapperWidth=o,i.wrapperHeight=s,i.width=tr(n.width,o),i.height=tr(n.height,s),i.left=n.left?tr(n.left,o)-i.width/2:Math.max(Math.floor((o-i.width)/2),0),i.top=n.top?tr(n.top,s):Math.max(Math.floor((s-i.height)/2),0)}),fe(i,o=>{nn=Math.max(o.zIndex,nn)}),{state:i,normal:O(()=>i.mode==="normal"),maximized:O(()=>i.mode==="maximized"),minimized:O(()=>i.mode==="minimized")}}function zb(n,e){const t=O(()=>{const{width:s,height:a,top:u,left:l,zIndex:c}=e;return{width:`${s}px`,height:`${a}px`,top:`${u}px`,left:`${l}px`,zIndex:c}}),r=O(()=>({[`is-${e.mode}`]:!!e.mode,"is-draggable":!!n.draggable,"is-resizable":!!n.resizable,"is-primary":!!n.primary})),i=O(()=>({[`is-${e.mode}`]:!!e.mode,"is-dragging":e.dragging,"is-resizing":e.resizing})),o=O(()=>({zIndex:e.zIndex}));return{styles:t,classes:r,wrapperClass:i,modalStyle:o}}function Fb(n,e,t){const r=o=>{e.mode=o,["maximized","minimized","normal"].includes(o)&&t(o),t("modeChange",o)},i=async()=>{(!n.beforeClose||await n.beforeClose())&&(t("update:modelValue",!1),t("close"),t("destroy"))};return{close:i,changeMode:r,show:()=>r("normal"),hide:()=>r("minimized"),active:o=>{const s=o.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(s.toUpperCase())||(e.zIndex=Math.max(e.zIndex,++nn))},submit:()=>t("submit"),cancel:()=>{t("cancel"),i()}}}function Lb(n,e,t,r){return O(()=>{const i=typeof n.draggable=="boolean"?!n.draggable:!!n.draggable?.disabled;return{...Ce(n.draggable)?n.draggable:{},disabled:i,target:r,selector:".x-panel__header",onStart(o){e.dragging=!0,e.zIndex=Math.max(e.zIndex,++nn),t("dragStart",o)},onMove(o){t("dragging",o)},onEnd(o){if(e.mode==="maximized")return;const{x:s,y:a}=o;e.left=s,e.top=a,e.dragging=!1,t("dragEnd",o)}}})}function Hb(n,e,t){return O(()=>{const r=typeof n.resizable=="boolean"?!n.resizable:!!n.resizable?.disabled;return{minWidth:200,minHeight:150,...Ce(n.resizable)?n.resizable:{},disabled:r,dirs:["e","s","w"],onStart(i,o){e.resizing=!0,e.zIndex=Math.max(e.zIndex,++nn),t("resizeStart",i,o)},onResizing(i,o){t("resizing",i,o)},onEnd(i,o){e.left=o.elementPositionX.value,e.top=o.elementPositionY.value,e.width=o.elementWidth.value,e.height=o.elementHeight.value,e.resizing=!1,t("resizeEnd",i,o)}}})}function Ub(n,e){const t=n.componentInstance;if(!t)return;let r=null;return Ui(()=>{const i=d(e),o=d(i?.bodyRef);r=t.$el,o&&o.$el&&o.$el.appendChild(r)}),qi(()=>{r&&r.parentNode&&r.parentNode.removeChild(r)}),{componentInstance:t}}const qb=["src"],Ut=B({name:"XDialog",__name:"Dialog",props:Pb,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=Pn(),s=I(),a=I(),{state:u,maximized:l,minimized:c,normal:p}=Nb(r,s),{styles:h,classes:f,wrapperClass:m,modalStyle:v}=zb(r,u),{changeMode:g,active:S,close:y,show:w,hide:E,submit:j,cancel:_}=Fb(r,u,i),V=Lb(r,u,i,s),D=Hb(r,u,i),Y=Ub(r,a);ha(async()=>{r.modelValue&&(await ct(),o&&i("open",o))});const C=O(()=>a.value?.$el);return e({$vtjEl:C,panelRef:a,state:u,maximized:l,minimized:c,changeMode:g,show:w,hide:E,submit:j,cancel:_,componentInstance:Y}),(A,P)=>r.modelValue?(b(),$(Ic,{key:0,to:"body"},[ae("div",{ref_key:"wrapper",ref:s,class:be(["x-dialog__wrapper",d(m)])},[r.modal?(b(),G("div",{key:0,class:"x-dialog__modal",style:kt(d(v))},null,4)):z("",!0),Xt((b(),$(d(zr),ye({ref_key:"panelRef",ref:a,class:["x-dialog",d(f)],card:"",shadow:"always",header:{icon:r.icon,subtitle:r.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:d(h),size:r.size,body:{padding:r.bodyPadding},onClick:d(S)},A.$attrs),rn({title:k(()=>[de(ne(r.title),1)]),actions:k(()=>[se(A.$slots,"actions"),r.minimizable?(b(),$(d(Le),{key:0,icon:d(tu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:P[0]||(P[0]=T=>d(g)("minimized"))},null,8,["icon","size"])):z("",!0),r.maximizable?(b(),G(re,{key:1},[d(p)?(b(),$(d(Le),{key:1,icon:d(eu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:P[2]||(P[2]=T=>d(g)("maximized"))},null,8,["icon","size"])):(b(),$(d(Le),{key:0,icon:d(nu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:P[1]||(P[1]=T=>d(g)("normal"))},null,8,["icon","size"]))],64)):z("",!0),r.closable?(b(),$(d(Le),{key:2,icon:d(ru),size:r.size,mode:"icon",type:"danger",background:"hover",onClick:d(y)},null,8,["icon","size","onClick"])):z("",!0)]),default:k(()=>[se(A.$slots,"default",{},()=>[r.content?(b(),$(Ue(r.content),{key:0})):z("",!0),r.src?(b(),G("iframe",{key:1,src:r.src,class:"x-dialog__frame"},null,8,qb)):z("",!0)])]),_:2},[r.cancel||r.submit||A.$slots.footer||A.$slots.extra||A.$slots.handle?{name:"footer",fn:k(()=>[se(A.$slots,"footer",{},()=>[x(d(ue),{align:"center"},{default:k(()=>[se(A.$slots,"extra")]),_:3}),x(d(ue),{align:"center"},{default:k(()=>[se(A.$slots,"handle"),r.cancel?(b(),$(d($e),{key:0,type:"default",size:r.size,onClick:d(_)},{default:k(()=>[de(ne(typeof r.cancel=="string"?r.cancel:"取消"),1)]),_:1},8,["size","onClick"])):z("",!0),r.submit?(b(),$(d($e),{key:1,type:"primary",size:r.size,onClick:d(j)},{default:k(()=>[de(ne(typeof r.submit=="string"?r.submit:"确定"),1)]),_:1},8,["size","onClick"])):z("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[d(Mb),d(V)],[d(Ni),d(D)]])],2)])):z("",!0)}});function ac(n,e){const t=document.createElement("div"),r=x(Ut,n);r.appContext=e??ac._context,Do(r,t);const i=()=>{Do(null,t),t.parentNode?.removeChild(t)};return r.props.onDestroy=()=>{i()},document.body.appendChild(t),{vnode:r,destroy:i}}const Wb=B({__name:"SelectEditor",props:{options:{default:()=>[]}},setup(n){const e=n;return(t,r)=>(b(),$(d(wa),pt($t(t.$attrs)),{default:k(()=>[(b(!0),G(re,null,oe(e.options,(i,o)=>(b(),$(d(ba),ye({key:`item_${o}_${i.value}`},i),rn({_:2},[t.$slots.option?{name:"default",fn:k(()=>[se(t.$slots,"option",{option:i})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Jb=B({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=O(()=>Et(e.button?Wc:Jc));return(r,i)=>(b(),$(d(Kc),pt($t(r.$attrs)),{default:k(()=>[(b(!0),G(re,null,oe(e.options,(o,s)=>(b(),$(Ue(t.value),{key:`item_${s}_${o.value}`,label:o.value},{default:k(()=>[de(ne(o.label),1)]),_:2},1032,["label"]))),128))]),_:1},16))}}),Kb=B({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=O(()=>Et(e.button?or:Gc));return(r,i)=>(b(),$(d(_a),pt($t(r.$attrs)),{default:k(()=>[(b(!0),G(re,null,oe(e.options,(o,s)=>(b(),$(Ue(t.value),{key:`item_${s}_${o.value}`,label:o.value},{default:k(()=>[de(ne(o.label),1)]),_:2},1032,["label"]))),128))]),_:1},16))}}),lc={none:{component:"div",props:{class:"x-field-none"}},text:{component:Xe,props:{clearable:!0},defaultValue:""},textarea:{component:Xe,props:{type:"textarea",rows:2},defaultValue:""},select:{component:Wb,props:{clearable:!0}},checkbox:{component:Jb,props:{},defaultValue:[]},radio:{component:Kb,props:{}},number:{component:ya,props:{}},date:{component:Io,props:{}},time:{component:Lc,props:{}},datetime:{component:Io,props:{type:"datetime"}},switch:{component:Ki,props:{}},rate:{component:Hc,props:{}},slider:{component:Uc,props:{}},cascader:{component:qc,props:{}}},Gb={name:{type:String},label:{type:String},editor:{type:[String,Object],default:"text"},props:{type:Object},modelValue:{type:[String,Number,Boolean,Object,Array],default(n){return lc[n.editor]?.defaultValue}},size:{type:String},width:{type:[String,Number]},tooltipMessage:{type:[Boolean,Object],default:!0},tooltipPosition:{type:[String,Number],default:"outer"},placeholder:{type:String},disabled:{type:Boolean},readonly:{type:Boolean},options:{type:[Array,Function]},visible:{type:[Boolean,Object,Function],default:!0},cascader:{type:[String,Array]},error:{type:String},tip:{type:String},inline:{type:Boolean}};async function Yb(n,e){const t=n.options;return t?typeof t=="function"?await t(e)||[]:t:[]}function Zb(n,e,t,r,i){const o=I([]),s=O(()=>!r||!i?{}:Wl(n.cascader).reduce((a,u)=>(a[u]=sr(i,u),a),{}));return fe(s,async a=>{if(t.value){o.value=await Yb(n,a);const u=r?.exposed?.reset;u&&n.name&&u(n.name)}},{immediate:!0}),{editor:O(()=>{const{editor:a="text",placeholder:u,label:l="...",disabled:c,readonly:p}=n,h={...n.props,placeholder:u||(u===null?void 0:`请输入${l}`),disabled:c,readonly:p,options:o.value,onFocus:()=>e("focus"),onBlur:()=>e("blur"),onChange:m=>e("change",m)},f=typeof a=="string"?lc[a]:{component:a,props:{}};return dt({},f,{props:h})})}}const Xb={key:1,class:"el-form-item__error"},Qb={key:0,class:"x-field__tip"},Q=B({name:"XField",__name:"Field",props:Gb,emits:["update:modelValue","change","focus","blur"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=Sn(uc,null),s=Sn(Pc,null),a=Sn(cc,null),u=O(()=>!o?.proxy||!a?r.visible:typeof r.visible=="function"?r.visible(a):Ce(r.visible)?Object.entries(r.visible).every(([j,_])=>sr(a,j)===_):r.visible),l=()=>o?.proxy&&a&&r.name?sr(a,r.name)??r.modelValue:r.modelValue,c=I(l()),{editor:p}=Zb(r,i,u,o,a),h=I(),f=I(),m=O(()=>r.size||s?.size||"default"),v=O(()=>Object.assign({},o?.props.tooltipMessage||{},typeof r.tooltipMessage=="boolean"?{}:r.tooltipMessage)),g=(j="")=>r.error?r.error:j.includes("is required")?`${r.label||r.name}是必填项!`:j,S=O(()=>{const j=o?.props.tooltipMessage??r.tooltipMessage;return{[`is-tooltip-${r.tooltipPosition}`]:!!j&&!!r.tooltipPosition}}),y=O(()=>{const j=o?.proxy;return{width:r.width?Mn(r.width):j&&j.inline&&j.inlineColumns?`${100/j.inlineColumns}%`:null}}),w=O(()=>({right:typeof r.tooltipPosition=="number"?`${r.tooltipPosition}px`:void 0})),E=O(()=>({...p.value.props,modelValue:c.value,"onUpdate:modelValue":j=>{c.value=j}}));return fe(c,(j,_)=>{u.value&&!ho(j,_)&&(i("update:modelValue",j),o?.proxy&&a&&r.name&&Jr(a,r.name,j))}),fe(()=>!o?.proxy||!r.name||!a?r.modelValue:sr(a,r.name)??r.modelValue,j=>{u.value&&(c.value=j)},{immediate:!0}),fe(u,j=>{o?.proxy&&a&&r.name&&(j?(c.value=l(),Jr(a,r.name,c.value)):(c.value=void 0,Jr(a,r.name,void 0)))},{immediate:!0}),e({fieldValue:c,itemRef:h,editorRef:f,focus:()=>{f.value?.focus&&f.value.focus()},blur:()=>{f.value?.foucs&&f.value.blur()}}),(j,_)=>u.value?(b(),$(d(va),ye({key:0,class:["x-field",S.value],ref_key:"itemRef",ref:h,prop:r.name,label:j.label,size:m.value,style:y.value},j.$attrs),rn({error:k(({error:V})=>[se(j.$slots,"error",{error:V},()=>[d(o)?.props.tooltipMessage??r.tooltipMessage?(b(),G("div",{key:0,class:"x-field__info",style:kt(w.value)},[x(d($r),ye({content:g(V)},v.value),{default:k(()=>[x(d(Vt),{class:"x-field__trigger",icon:d(dd),size:m.value},null,8,["icon","size"])]),_:2},1040,["content"])],4)):(b(),G("div",Xb,ne(g(V)),1))])]),default:k(()=>[ae("div",{class:be(["x-field__editor_wrap",{"is-inline":r.inline}])},[se(j.$slots,"editor",{editor:E.value},()=>[d(p).component?(b(),$(Ue(d(p).component),ye({key:0,class:"x-field__editor",ref_key:"editorRef",ref:f,modelValue:c.value,"onUpdate:modelValue":_[0]||(_[0]=V=>c.value=V)},d(p).props),rn({_:2},[j.$slots.option?{name:"option",fn:k(({option:V})=>[se(j.$slots,"option",{option:V})]),key:"0"}:void 0]),1040,["modelValue"])):z("",!0)]),r.tip||j.$slots.tip?(b(),G("div",Qb,[se(j.$slots,"tip",{},()=>[de(ne(r.tip),1)])])):z("",!0)],2),se(j.$slots,"default")]),_:2},[j.$slots.label?{name:"label",fn:k(()=>[se(j.$slots,"label")]),key:"0"}:void 0]),1040,["prop","label","size","class","style"])):z("",!0)}}),e6={model:{type:Object,default(){return Object.create(null)}},inline:{type:Boolean},inlineColumns:{type:Number},footer:{type:Boolean,default:!0},submitText:{type:String,default:"提交"},resetText:{type:String,default:"重置"},submitMethod:{type:Function},tooltipMessage:{type:[Object,Boolean],default:void 0}},uc=Symbol("formInstanceKey"),cc=Symbol("formModelKey"),dc=B({name:"XForm",__name:"Form",props:e6,emits:["change","submit","reset"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=Pn(),s=I(),a=Nt(r.model||{}),u=I(!1);To(uc,o),To(cc,a),fe(a,()=>{i("change",Zt(a))}),fe(()=>r.model,p=>{Object.assign(a,p)},{deep:!0});const l=async()=>{await s.value.validate().catch(()=>!1)&&(i("submit",Zt(a)),r.submitMethod&&(u.value=!0,await r.submitMethod(Zt(a)),u.value=!1))},c=p=>{s.value.resetFields(p),i("reset")};return e({formRef:s,model:a,submit:l,reset:c}),(p,h)=>(b(),$(d(kn),ye({ref_key:"formRef",ref:s,class:"x-form",inline:r.inline,model:a,onKeyup:jn(l,["enter"]),onSubmit:h[1]||(h[1]=Qt(()=>{},["stop","prevent"]))},p.$attrs),{default:k(()=>[se(p.$slots,"default"),r.footer?(b(),$(d(Q),{key:0,editor:"none",class:"x-form__footer",label:" "},{editor:k(()=>[se(p.$slots,"footer",{},()=>[r.submitText?(b(),$(d($e),{key:0,loading:u.value,type:"primary",onClick:l},{default:k(()=>[de(ne(r.submitText),1)]),_:1},8,["loading"])):z("",!0),r.resetText?(b(),$(d($e),{key:1,type:"default",onClick:h[0]||(h[0]=()=>c())},{default:k(()=>[de(ne(r.resetText),1)]),_:1})):z("",!0),se(p.$slots,"action")])]),_:3})):z("",!0)]),_:3},16,["inline","model"]))}}),t6={modelValue:{type:Boolean,default:!0},size:{type:String},formProps:{type:Object},submit:{type:[Boolean,String],default:"确定"},cancel:{type:[Boolean,String],default:"取消"},model:{type:Object,default(){return Object.create(null)}},rules:{type:Object},submitMethod:{type:Function}},at=B({name:"XDialogForm",__name:"DialogForm",props:t6,emits:["update:modelValue","submit","close"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=I(),s=I(),a=O(()=>s.value?.$vtjEl),u=()=>{o.value?.submit()},l=()=>{i("update:modelValue",!1),i("close")},c=async f=>{i("submit",f),r.submitMethod?await r.submitMethod(f)&&l():l()},p=O(()=>r.formProps?.disabled?!1:r.submit),h=O(()=>r.formProps?.disabled?!1:r.cancel);return e({$vtjEl:a,formRef:o,dialogRef:s}),(f,m)=>(b(),$(d(Ut),ye({ref_key:"dialogRef",ref:s,class:"x-dialog-form","model-value":r.modelValue,submit:p.value,cancel:h.value,size:r.size,onSubmit:u,onClose:l,minimizable:!1,maximizable:!1},f.$attrs),rn({default:k(()=>[x(d(dc),ye({ref_key:"formRef",ref:o,class:"x-dialog-form__form",footer:!1,"label-width":"80px",size:r.size,model:r.model,rules:r.rules,"submit-method":c},r.formProps),{default:k(()=>[se(f.$slots,"default")]),_:3},16,["size","model","rules"])]),_:2},[f.$slots.extra?{name:"extra",fn:k(()=>[se(f.$slots,"extra")]),key:"0"}:void 0,f.$slots.handle?{name:"handle",fn:k(()=>[se(f.$slots,"handle")]),key:"1"}:void 0,f.$slots.footer?{name:"footer",fn:k(()=>[se(f.$slots,"footer")]),key:"2"}:void 0]),1040,["model-value","submit","cancel","size"]))}}),n6={items:{type:Array,default(){return[]}},border:{type:Boolean}},pc=B({name:"XTabs",__name:"Tabs",props:n6,setup(n){const e=n,t=i=>{const{label:o,name:s,value:a,disabled:u,closable:l,lazy:c}=i;return{label:o,name:a??s,disabled:u,closable:l,lazy:c}},r=O(()=>({"is-no-border":!e.border}));return(i,o)=>(b(),$(d(zc),ye({class:["x-tabs",r.value]},i.$attrs),{default:k(()=>[(b(!0),G(re,null,oe(e.items,s=>(b(),$(d(Nc),ye({key:s.value??s.name},t(s)),{label:k(()=>[se(i.$slots,"label",pt($t(s)),()=>[s.icon?(b(),$(Ue(d($o)(s.icon)),{key:0,class:"x-tabs__icon"})):z("",!0),de(" "+ne(s.label),1)])]),default:k(()=>[se(i.$slots,"default",pt($t(s)),()=>[s.component?(b(),$(Ue(s.component),pt(ye({key:0},s.props)),null,16)):z("",!0)])]),_:2},1040))),128))]),_:3},16,["class"]))}});/**!
|
|
67
67
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
68
68
|
* @name @vtj/renderer
|
|
69
69
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
70
|
-
* @version 0.7.
|
|
70
|
+
* @version 0.7.10
|
|
71
71
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
72
|
-
*/const Vn="0.7.
|
|
72
|
+
*/const Vn="0.7.10";var He=(n=>(n.Runtime="Runtime",n.Design="Design",n.Raw="Raw",n.VNode="VNode",n))(He||{});const oa=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],r6=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],i6=["vIf","vShow","vModel","vFor","vBind"],hc={String,Number,Boolean,Array,Object,Function,Date};function nr(n,e){return n.map(t=>ug(t)?t:`${e}${t}`)}function fc(n){return/\.css$/.test(n)}function mc(n){return/\.js$/.test(n)}function sa(n){return n.map(e=>`<script src="${$n.append(e,{v:Vn})}"><\/script>`).join("")}function o6(n=[]){return n.map(e=>`<link rel="stylesheet" href="${$n.append(e,{v:Vn})}" />`).join("")}function vc(n,e){const t=n.filter(c=>!!c.enabled),r=[],i=[],o=[],s=[],a={},u=[],l={};return t.forEach(({urls:c,assetsUrl:p,library:h,assetsLibrary:f})=>{c?.forEach(m=>{mc(m)&&r.push(m),fc(m)&&i.push(m)}),h&&(s.push(h),a[h]=nr(c||[],e)),p&&o.push(p),f&&u.push(f),h&&f&&(l[f]=h)}),{scripts:nr(r,e),css:nr(i,e),materials:nr(o,e),libraryExports:s,materialExports:u,materialMapLibrary:l,libraryMap:a}}function gc(n,e){const{name:t,parent:r,alias:i}=n;return r?e[r]?.[i||t]:e[i||t]}function yc(n){return dn(n)?n:JSON.stringify(n)}function bc(n,e,t){const r=n.CSSStyleSheet;if(r.prototype.replaceSync){const i=new r;i.id=e,i.replaceSync(t);const o=n.document,s=o.adoptedStyleSheets,a=Array.from(s).filter(u=>u.id!==e);o.adoptedStyleSheets=[...a,i]}else{const i=n.document;let o=i.getElementById(e);o?o.innerHTML=t:(o=i.createElement("style"),o.id=e,o.innerHTML=t,i.head.appendChild(o))}}async function s6(n,e){const t=await window.fetch(e).then(r=>r.text()).catch(()=>"");t&&bc(window,n,t)}function a6(n){return An(n)||An(n?.install)}var kr=function(){return kr=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},kr.apply(this,arguments)},zi={debug:-1,log:0,info:0,warn:1,error:2},l6=function(n,e,t,r){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(e&&zi[e]<=zi[n]&&console[n].apply&&(r==="*"||t.startsWith(r)))return console[n].apply(console,u6(i,t))}};function u6(n,e){return e!=="*"&&(typeof n[0]=="string"?n[0]="["+e+"] "+n[0]:n=["["+e+"]"].concat(n)),n}function c6(n,e){if(!n)return{targetLevel:e.level,targetBizName:e.bizName};if(~n.indexOf(":")){var t=n.split(":");return{targetLevel:t[0],targetBizName:t[1]}}return{targetLevel:n,targetBizName:"*"}}var d6={level:"warn",bizName:"*"},p6=function(){function n(e){e=kr(kr({},d6),e);var t=location||{},r=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(t.href)||[])[1],i=c6(r,e),o=i.targetLevel,s=i.targetBizName;for(var a in zi)this[a]=l6(a,o,e.bizName,s)}return n}();function h6(n){return new p6(n)}const qe=h6({level:"log",bizName:"VTJ"});function Ct(n,e,t=!1,r=!1){try{const i=['"use strict";',"var __self = arguments[0];"];i.push("return ");let o=(n.value||"").trim();o=o.replace(/this(\W|$)/g,(a,u)=>`__self${u}`),o=i.join(`
|
|
73
73
|
`)+o;const s=`with(${t?"{}":"$scope || {}"}) { ${o} }`;return new Function("$scope",s)(e)}catch(i){if(qe.error("parseExpression.error",i,n,e?.__self??e),r)throw i}}function Fi(n,e,t=!1,r=!1){const i=Ct(n,e,t,r);if(typeof i!="function"&&(qe.error("parseFunction.error","not a function",n,e?.__self??e),r))throw new Error(`"${n.value}" not a function`);return i}function De(n){return n&&n.type==="JSExpression"}function Hn(n){return typeof n=="object"&&n&&n.type==="JSFunction"}function f6(n){return De(n)||Hn(n)}function an(n){return f6(n)?n.value:JSON.stringify(n)}let Kt=null;const m6=tc({settings:{type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:n=>n.data?.code===0||!!n.data?.success,failMessage:!0,showError:n=>{zt.error({message:n||"未知错误"})},showLoading:()=>{Kt&&Kt.close(),Kt=xa.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.05)"})},hideLoading:()=>{Kt&&(Kt.close(),Kt=null)}}});function v6(n,e){const{jsonp:t,request:r}=e;if(n.method==="jsonp")return(i={})=>t(n.url,{...n.jsonpOptions,query:i});{const i=n.headers?Ct(n.headers,{},!0):void 0,o={url:n.url,method:n.method,settings:{...n.settings,headers:i}};return(s,a)=>r.send(dt(o,a||{},{data:s}))}}function wc(n=[],e){return n.reduce((t,r)=>(t[r.id]=v6(r,e),t),{})}class g6{__id=null;__mode;__instance=null;__contextRefs={};__refs={};context={};state={};$props={};$refs={};$el=null;$emit=null;$nextTick=null;$parent=null;$root=null;$attrs=null;$slots=null;$watch=null;$options=null;$forceUpdate=null;$components={};$libs={};$apis={};__transform={};constructor(e){const{mode:t,dsl:r,attrs:i}=e;this.__mode=t,r&&(this.__id=r.id||null,this.__transform=r.transform||{}),i&&Object.assign(this,i)}setup(e,t=Vr){const r=t.getCurrentInstance();if(!r)return;this.__instance=r.proxy;const i=r.appContext.config.globalProperties;Object.assign(this,i),Object.assign(this,e||{}),this.__proxy(),t.onMounted(()=>{this.__proxy()}),t.onUnmounted(()=>{this.__cleanup()})}__proxy(){this.__instance&&oa.forEach(e=>{this[e]=this.__instance?.[e]})}__cleanup(){oa.forEach(e=>{this[e]=null})}__parseFunction(e){if(e)if(this.__mode===He.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return Fi({type:r,value:i},this)}else return Fi(e,this)}__parseExpression(e){if(e)if(this.__mode===He.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return Ct({type:r,value:i},this)}else return Ct(e,this)}__ref(e=null,t){if(this.__mode!==He.VNode)return e&&e!==this.__id&&(this.__contextRefs[e]=this),r=>{let i=r?.$vtjEl||r?.$el||r;if(!i){typeof t=="string"&&(delete this.$refs[t],e&&delete this.__refs[e]);return}if(i.__vtj__=e,i.nodeType===3&&i.nextSibling&&(i=i.nextSibling),He.Design===this.__mode&&(i.__context__=this),e&&(this.__refs[e]=r),typeof t=="function")t(r);else if(t){const o=this.$refs[t];if(o){const s=new Set([].concat(o,r));this.$refs[t]=Array.from(s)}else this.$refs[t]=r}return r}}__clone(e={}){const t={...this.context,...e},r={...t,context:t};return r.context.__proto__=this.context,r.__proto__=this,r}}function Co(n){const{Vue:e=Vr,mode:t=He.Runtime,components:r={},libs:i={},apis:o={},loader:s}=n,a=e.computed(()=>n.dsl),u={$components:r,$libs:i,$apis:o},l=new g6({mode:t,dsl:a.value,attrs:u}),c=e.defineComponent({name:a.value.name,props:{...y6(a.value.props??[],l)},setup(p){l.$props=p,a.value.id&&bc(n.window||window,a.value.id,a.value.css||""),l.state=b6(e,a.value.state??{},l);const h=w6(e,a.value.computed??{},l),f=_6(a.value.methods??{},l),m=x6(e,a.value.inject,l),v=S6(a.value.dataSources||{},l),g={...m,...h,...f,...v};return l.setup(g,e),j6(e,a.value.watch??[],l),{vtj:l}},emits:[...a.value.emits??[]],expose:["vtj"],render(){if(!a.value.nodes)return null;const p=a.value.nodes||[];return p.length===1?Er(p[0],l,e,s):p.map(h=>Er(h,l,e,s))},...k6(a.value.lifeCycles??{},l)});return{renderer:e.markRaw(c),context:l}}function y6(n=[],e){const t=r=>r?(Array.isArray(r)?r:[r]).map(i=>hc[i]):void 0;return n.map(r=>dn(r)?{name:r}:{name:r.name,type:r.type,required:r.required,default:De(r.default)?e.__parseExpression(r.default):r.default}).reduce((r,i)=>(r[i.name]={type:t(i.type),required:i.required,default:i.default},r),{})}function b6(n,e,t){return n.reactive(Object.keys(e||{}).reduce((r,i)=>{let o=e[i];return De(o)?o=t.__parseExpression(o):Hn(o)&&(o=t.__parseFunction(o)),r[i]=o,r},{}))}function w6(n,e,t){return Object.entries(e??{}).reduce((r,[i,o])=>(r[i]=n.computed(t.__parseFunction(o)),r),{})}function _6(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}function x6(n,e=[],t){return e.reduce((r,i)=>{const{name:o,from:s}=i||{};i.default;const a=De(s)?t.__parseExpression(s)||o:s??o,u=De(i.default)?t.__parseExpression(i.default):i.default??null;return r[o]=n.inject(a,u),r},{})}function S6(n,e){return Object.keys(n).reduce((t,r)=>{const i=n[r],o=e.$apis[i.ref],s=Hn(i.transform)?i.transform.value?e.__parseFunction(i.transform):void 0:i.transform;return t[r]=async(...a)=>{const u=await o.apply(e,a);return s?s(u):u},t},{})}function j6(n,e=[],t){e.forEach(r=>{n.watch(t.__parseExpression(r.source),t.__parseFunction(r.handler),{deep:r.deep,immediate:r.immediate})})}function k6(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}const E6=n=>n;function Ao(n){const{getDsl:e,options:t}=n;return(r,i,o=Vr)=>!i||typeof i=="string"?r:i.type==="Schema"?o.defineAsyncComponent(async()=>{const s=await e(i.id);return s?Co({...t,Vue:o,dsl:s,mode:He.Runtime,loader:Ao(n)}).renderer:null}):r}function Er(n,e,t=Vr,r=E6){if(!n||!n.name||n.invisible)return null;const{id:i=null,directives:o=[]}=n,{vIf:s,vFor:a,vShow:u,vModels:l,vBind:c}=$6(o);if(s&&!V6(s,e))return null;const p=h=>{const f=h.$components,m=(()=>{if(n.name==="component")return C6(h,n.props?.is);if(n.name==="slot")return n.name;const y=r(n.name,n.from,t);return dn(y)?f[y]??y:y})(),v=A6(i,n.props??{},h),g=O6(t,n.events??{},h);if(n.name==="slot")return T6(t,n,v,h);c&&Object.assign(v,h.__parseExpression(c.value)),u&&(v.style=Object.assign(v.style??{},I6(u,h))),l.forEach(y=>{Object.assign(v,B6(t,y,h))});const S=R6(t,n.children??[],h,n);return t.createVNode(m,{...v,...g},S)};return a?N6(a,p,e):p(e)}function $6(n=[]){const e=n.find(a=>Rt(a.name)==="vIf"),t=n.find(a=>Rt(a.name)==="vFor"),r=n.find(a=>Rt(a.name)==="vShow"),i=n.find(a=>Rt(a.name)==="vBind"),o=n.filter(a=>Rt(a.name)==="vModel"),s=n.filter(a=>!i6.includes(Rt(a.name)));return{vIf:e,vFor:t,vShow:r,vModels:o,vBind:i,others:s}}function V6(n,e){return!!e.__parseExpression(n.value)}function C6(n,e){return e?De(e)?n.__parseExpression(e):e:"div"}function A6(n,e,t){const r=Object.keys(e||{}).reduce((i,o)=>{let s=e[o];return De(s)?s=t.__parseExpression(s):Hn(s)&&(s=t.__parseFunction(s)),i[o]=s,i},{});return r.ref=t.__ref(n,r.ref),r}function O6(n,e,t){const r=["passive","capture","once"],i={capture:"Capture",once:"Once",passive:"OnceCapture"};return Object.keys(e||{}).reduce((o,s)=>{const a=e[s],u=_c(a.modifiers),l=u.find(h=>r.includes(h)),c="on"+uo(s)+(l&&i[l]||""),p=t.__parseFunction(a.handler);return p&&(o[c]=n.withModifiers(p,u)),o},{})}function _c(n={},e=!1){const t=Object.keys(n);return e?t.map(r=>"."+r):t}function T6(n,e,t,r){const{children:i}=e,o=D6(e,r),s=r.$slots?.[o.name];return s?s(t):i?dn(i)?n.createTextVNode(i):De(i)?n.createTextVNode(yc(r.__parseExpression(i))):Array.isArray(i)?i.map(a=>Er(a,r,n)):null:null}function D6(n,e){const{props:t}=n,r=t?.name||"default";return{name:De(r)?e.__parseExpression(r):r,params:[]}}function I6(n,e){return e.__parseExpression(n.value)?{}:{display:"none"}}function B6(n,e,t){const r={type:"JSFunction",value:e.value?.value?`(v) => {
|
|
74
74
|
${e.value.value} = v;
|
|
75
75
|
}`:"(v) => {}"},i=t.__parseFunction(r),o=_c(e.modifiers),s=De(e.arg)?t.__parseExpression(e.arg):e.arg||"modelValue";return{[s]:t.__parseExpression(e.value),[`onUpdate:${s}`]:o.length&&i?n.withModifiers(i,o):i}}function R6(n,e,t,r){if(!e)return null;if(dn(e))return{default:()=>e};if(De(e))return{default:()=>yc(t.__parseExpression(e))};if(Array.isArray(e)){const i=M6(e),o=s=>!s||!r?{}:r?.id&&Object.keys(s).length?{[`scope_${r.id}`]:s}:{};return Object.entries(i).reduce((s,[a,{nodes:u,params:l}])=>(s[a]=c=>{const p=l.length?gg(c??{},l):o(c);return u.map(h=>Er(h,t.__clone(p),n))},s),{})}}function M6(n){const e={default:{params:[],nodes:[]}};for(const t of n){const r=P6(t.slot),i=r.name;e[i]?(e[i].nodes.push(t),e[i].params=e[i].params.concat(r.params)):e[i]={nodes:[t],params:r.params}}return e}function P6(n="default"){return dn(n)?{name:n,params:[]}:{params:[],...n}}function N6(n,e,t){const{value:r,iterator:i}=n,{item:o="item",index:s="index"}=i||{};let a=t.__parseExpression(r)||[];return Number.isInteger(a)&&(a=new Array(a).fill(!0).map((u,l)=>l+1)),Array.isArray(a)?a.map((u,l)=>e(t.__clone({[o]:u,[s]:l}))):(console.warn("[vForRender]:",`${r?.value} is not a Arrary`),[])}const aa=B({name:"VtjPageContainer",async setup(){const n=G6(),e=wd(),t=e.params.id,r=t?n.getPage(t):n.getHomepage(),i=r?await n.getRenderComponent(r.id):null;return r&&yd(r.title||"VTJ"),{provider:n,component:i,file:r,query:e.query}},render(){return this.component?Ae(this.component,this.query):Ae("div","页面不存在")}}),z6={name:{type:String,default:"VTJ.PRO"},tagline:{type:String,default:"基于 Vue3 + TypeScript 快速打造高生产力的低代码研发平台"},actionText:{type:String,default:"开始设计"},actionLink:{type:String,default:"/@vtj/pro/"}},F6={class:"x-startup"},L6={class:"x-startup__wrapper"},H6={class:"x-startup__name"},U6={class:"clip"},q6={class:"x-startup__tagline"},W6={class:"x-startup__actions"},J6=B({__name:"Startup",props:z6,setup(n){const e=n,t=()=>{let r=(window.__VTJ_LINK__||{}).href||window.location.pathname+"@vtj/pro/#/";location.href=r};return(r,i)=>(b(),G("div",F6,[ae("div",L6,[ae("div",H6,[ae("span",U6,ne(e.name),1)]),ae("div",q6,ne(e.tagline),1),ae("div",W6,[x(d($e),{type:"primary",size:"large",round:"",icon:d(pd),onClick:t},{default:k(()=>[de(ne(e.actionText),1)]),_:1},8,["icon"])])])]))}}),K6=B({name:"VtjStartupContainer",render(){return Ae(J6)}}),xc=Symbol("Provider");class Sc extends fo{mode;globals={};modules={};adapter={request:m6,jsonp:mb};apis={};dependencies={};materials={};library={};service;project=null;components={};router=null;materialPath="./";constructor(e){super();const{service:t,mode:r=He.Raw,dependencies:i,materials:o,project:s={},adapter:a={},globals:u={},modules:l={},router:c=null,materialPath:p="./"}=e;this.mode=r,this.modules=l,this.service=t,this.router=c,this.materialPath=p,i&&(this.dependencies=i),o&&(this.materials=o),Object.assign(this.globals,u),Object.assign(this.adapter,a),r!==He.Design&&this.load(s)}async load(e){const t=this.modules[`.vtj/projects/${e.id}.json`];if(this.project=t?await t():await this.service.init(e),!this.project)throw new Error("project is null");const{dependencies:r=[],apis:i}=this.project,{dependencies:o,library:s,components:a,materialPath:u}=this,{libraryExports:l,libraryMap:c,materials:p,materialExports:h,materialMapLibrary:f}=vc(r,u);for(const v of l){const g=o[v],S=window[v];if(S)s[v]=S;else if(g)window[v]=s[v]=await g();else{const y=c[v]||[];for(const w of y)fc(w)&&await s6(v,$n.append(w,{v:Vn})),mc(w)&&await ta($n.append(w,{v:Vn})),s[v]=window[v]}}for(const v of p)await ta($n.append(v,{v:Vn}));const m=this.materials||{};for(const v of h){const g=m[v]?(await m[v]()).default:window[v],S=window[f[v]];g&&S&&g.components.forEach(y=>{a[y.name]=gc(y,S)})}i&&(this.apis=wc(i,this.adapter)),this.initRouter(),this.triggerReady()}initRouter(){const{router:e,project:t}=this;e&&(e.addRoute({path:"/page/:id",name:"VtjPage",component:aa}),e.addRoute({path:"/",name:"VtjHomepage",component:t?.homepage?aa:K6}))}install(e){const t=e.config.globalProperties.installed||{};for(const[r,i]of Object.entries(this.library))!t[r]&&a6(i)&&(e.use(i),t[r]=!0);e.provide(xc,this),e.config.globalProperties.installed=t}getFile(e){const{blocks:t=[]}=this.project||{};return this.getPage(e)||t.find(r=>r.id===e)||null}getPage(e){const{pages:t=[]}=this.project||{},r=(i,o=[])=>{for(const s of o){if(s.id===i)return s;if(s.children&&s.children.length){const a=r(i,s.children);if(a)return a}}};return r(e,t)||null}getHomepage(){const{homepage:e}=this.project||{};return e?this.getPage(e):null}async getDsl(e){const t=this.modules[`.vtj/files/${e}.json`];return t?await t():this.service.getFile(e).catch(()=>null)}async getRenderComponent(e){const t=this.getFile(e);if(!t)return qe.warn(`Can not find file: ${e}`),null;const r=`.vtj/vue/${e}.vue`,i=this.modules[r];if(i)return(await i())?.default;const o=await this.getDsl(t.id);if(!o)return qe.warn(`Can not find dsl: ${e}`),null;const{library:s,components:a,mode:u,apis:l}=this,c={mode:u,Vue:s.Vue,components:a,libs:s,apis:l,window},p=Ao({getDsl:async f=>await this.getDsl(f)||null,options:c}),{renderer:h}=Co({...c,dsl:o,loader:p});return h}}function e8(n){const e=new Sc(n);return{provider:e,onReady:t=>e.ready(t)}}function G6(n={}){const e=Sn(xc);if(!e)throw new Error("Can not find provider");if(e.mode===He.Raw){const{id:t,version:r}=n;t&&r&&(async()=>{const i=await e.getDsl(t);i?.__VERSION__!==r&&zt.warning({title:i?.name,message:"当前组件源码版本与运行时版本不一致,请重新发布组件"})})()}return e}const Y6=new ec({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:n=>n.data?.code===0,showError:n=>{zt.error({message:n||"未知错误"})}}}),Z6=(n="/vtj/local/repository/${type}.json")=>(e,t)=>Y6.send({url:n,method:"post",query:{type:e},data:{type:e,data:t}});class X6{api;constructor(){this.api=Z6()}async init(e){return console.log("BaseService.init",e),{}}async saveProject(e){return!!await this.api("saveProject",e).catch(()=>!1)}async saveMaterials(e,t){return console.log("BaseService.saveMaterials",e,t),!1}async saveFile(e){return console.log("BaseService.saveFile",e),!1}async getFile(e){return console.log("BaseService.getFile",e),{}}async removeFile(e){return console.log("BaseService.removeFile",e),!1}async saveHistory(e){return console.log("BaseService.saveHistory",e),!1}async removeHistory(e){return console.log("BaseService.removeHistory",e),!1}async getHistory(e){return console.log("BaseService.getHistory",e),{}}async getHistoryItem(e,t){return console.log("BaseService.getHistoryItem",e,t),{}}async saveHistoryItem(e,t){return console.log("BaseService.saveHistoryItem",e,t),!1}async removeHistoryItem(e,t){return console.log("BaseService.removeHistoryItem",e,t),!1}async publish(e){return!!await this.api("publish",e).catch(()=>!1)}async publishFile(e,t){return!!await this.api("publishFile",{project:e,file:t}).catch(()=>!1)}async genVueContent(e,t){return await this.api("genVueContent",{project:e,dsl:t}).catch(()=>"")}async createRawPage(e){return await this.api("createRawPage",e).catch(()=>"")}async removeRawPage(e){return await this.api("removeRawPage",e).catch(()=>"")}}new nc({type:"local",expired:0,prefix:"__VTJ_"});class t8 extends X6{async init(e){return await this.api("init",e).catch(()=>null)||{}}async saveProject(e){return!!await this.api("saveProject",e).catch(()=>!1)}async saveMaterials(e,t){return!!await this.api("saveMaterials",{project:e,materials:vg(t)}).catch(()=>!1)}async saveFile(e){return!!await this.api("saveFile",e).catch(()=>!1)}async getFile(e){return await this.api("getFile",e).catch(()=>null)||{}}async removeFile(e){return!!await this.api("removeFile",e).catch(()=>!1)}async saveHistory(e){return!!await this.api("saveHistory",e).catch(()=>!1)}async removeHistory(e){return!!await this.api("removeHistory",e).catch(()=>!1)}async getHistory(e){return await this.api("getHistory",e).catch(()=>null)||{}}async getHistoryItem(e,t){return await this.api("getHistoryItem",{fId:e,id:t}).catch(()=>null)||{}}async saveHistoryItem(e,t){return!!await this.api("saveHistoryItem",{fId:e,item:t}).catch(()=>!1)}async removeHistoryItem(e,t){return!!await this.api("removeHistoryItem",{fId:e,ids:t}).catch(()=>!1)}}/**!
|
|
76
76
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
77
77
|
* @name @vtj/designer
|
|
78
78
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
79
|
-
* @version 0.7.
|
|
79
|
+
* @version 0.7.10
|
|
80
80
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
81
|
-
*/const Q6="0.7.9",la={width:390,height:844},ua={width:1180,height:820},mt=/^[A-Za-z_$][\w_-]*$/,e3=["click","dblclick","mouseenter","mouseleave","mousedown","mouseup","mouseover","contextmenu"],t3=["keydown","keyup","keypress"],n3=["GET","POST","PUT","PATCH","DELETE","JSONP"],r3=["stop","prevent","capture","self","once","passive"];var Ye=(n=>(n.Block="block",n.Node="node",n))(Ye||{});const jc="data:image/png;base64,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",i3=["title","src"],o3={key:1},s3=B({name:"LogoWidget",inheritAttrs:!1,__name:"index",props:{icon:{default:jc},text:{default:"VTJ"},link:{}},setup(n){const e=n,t=()=>{e.link&&(location.href=e.link)};return(r,i)=>(b(),G("div",{class:"v-logo-widget",onClick:t},[e.icon?(b(),G("img",{key:0,title:e.text,class:"v-logo-widget__icon",src:e.icon},null,8,i3)):(b(),G("span",o3,ne(e.text),1))]))}}),a3={class:"v-empty-widget"},l3=B({name:"EmptyWidget",__name:"index",setup(n){return(e,t)=>(b(),G("div",a3,"EmptyWidget"))}});function kc(){const n=Me(),e=O(()=>n.project.value?.dependencies??[]);return{engine:n,dependencies:e}}function Ot(n,e){const t=O(()=>Ac.getWidgets(d(n),d(e)).filter(i=>!i.invisible)),r=I();return{widgets:t,widgetsRef:r}}function Ec(){const n=Me();return{span:O(()=>{const e=n.skeleton?.skeletonRef.leftWidth||400,t=Math.min(Math.floor((e-50)/120),24);return Math.floor(24/t)}),engine:n}}function u3(){const n=Me(),e=O(()=>n.project.value?.blocks??[]);return{engine:n,blocks:e}}const c3=(n=[])=>n.map(e=>e.name);function d3(){const n=Me(),{components:e,groups:t,componentMap:r}=n.assets,i=Nt({}),o=O(()=>{const p={};return t.value&&t.value.forEach(h=>{p[h.name]=h}),p}),s=O(()=>t.value?t.value.map(p=>({label:`${p.label} (${p.count})`,name:p.name,disabled:!p.children?.length})):[]),a=I(s.value[0]?.name),u=I(""),l=O(()=>o.value[a.value]);ha(()=>{const p=s.value.reduce((h,f)=>(h[f.name]=c3(o.value[f.name].children),h),{});Object.assign(i,p)});const c=O(()=>{const p=u.value.toLowerCase();return!p||!e?[]:e.filter(h=>h.name.toLowerCase().includes(p)||h.label?.toLowerCase().includes(p))});return{components:e,groups:t,componentMap:r,groupMap:o,tabs:s,model:i,currentTab:a,currentGroup:l,searchKey:u,searchResult:c}}function Ie(){const n=Me(),e=O(()=>n.current.value),t=O(()=>n.context.value),r=O(()=>n.isEmptyCurrent.value);return{engine:n,current:e,isEmpty:r,context:t}}function p3(n,e){const t=Me();t.simulator.init(n,e);const r=O(()=>t.simulator.designer.value),i=O(()=>ai("hover",r.value?.hover.value)),o=O(()=>ai("dropping",r.value?.dropping.value)),s=O(()=>ai("selected",r.value?.selected.value));return fe(t.changed,()=>{r.value?.updateRect()}),{designer:r,dropping:o,hover:i,selected:s}}function h3(n,e=!0){const{top:t,height:r,width:i,left:o}=n||{};if(r>100&&i>200)return"inner";let s,a;return a=t>30?"top":"bottom",s=e||o<300&&i<300?"left":"right",[s,a].join("-")}function f3(n){const{rect:e,type:t}=n,{left:r,width:i,top:o,height:s}=e,a={left:r,width:i,top:o,height:s};switch(t){case"left":a.left=0,a.width=0;break;case"right":a.left=a.left+a.width-4,a.width=0;break;case"bottom":a.top=a.top+a.height-4,a.height=0;break;case"top":a.height=0;break}return a}function ai(n,e){if(!e)return null;const{left:t,top:r,width:i,height:o}=n==="dropping"?f3(e):e.rect,s={left:`${t}px`,top:`${r}px`,width:`${i}px`,height:`${o}px`,visibility:i||o?"visible":"hidden"};return{...e,style:s,position:h3(e.rect,n!=="selected")}}function vt(){const n=Me(),e=O(()=>n.simulator.designer.value),t=O(()=>e.value?.selected.value),r=O(()=>Se(t.value?.model));return{engine:n,designer:e,selected:t,isSelectBlock:r}}function m3(n,e){const t=I(""),{selected:r,isSelectBlock:i}=vt(),o=O(()=>r.value?.model.id),s=O(()=>{const u=ci(n),l=ci(e),c=[];if(!u)return c;const p=l?.__contextRefs[o.value||""],h=l===p||i.value?[]:Object.keys(p?.context||{}).filter(E=>!["context","ref"].includes(E)).map(E=>`this.context.${E}`);h.length&&c.push({title:"上下文",items:h});const f=u.inject.map(E=>`this.${E.name}`);f.length&&c.push({title:"注入",items:f});const m=u.props.map(E=>typeof E=="string"?`this.$props.${E}`:`this.$props.${E.name}`);m.length&&c.push({title:"属性",items:m});const v=Object.keys(u.state).map(E=>`this.state.${E}`);v.length&&c.push({title:"状态",items:v});const g=Object.keys(u.computed).map(E=>`this.${E}.value`);g.length&&c.push({title:"计算属性",items:g});const S=Object.keys(u.methods).map(E=>`this.${E}`);S.length&&c.push({title:"方法",items:S});const y=Object.keys(u.dataSources).map(E=>`this.${E}`);y.length&&c.push({title:"数据源",items:y});const w=Object.keys(l?.$refs||{}).map(E=>`this.$refs.${E}`);return w.length&&c.push({title:"refs",items:w}),c}),a=O(()=>{if(!t.value)return s.value;const u=t.value.toLowerCase(),l=[];return s.value.forEach(c=>{const p=c.items.filter(h=>h.toLowerCase().includes(u));p.length&&l.push({title:c.title,items:p})}),l});return{keyword:t,options:s,searchResult:a}}const rr=[{name:"StringSetter",label:"文本"},{name:"ExpressionSetter",label:"表达式"}];function v3(n){const e=Me(),t=O(()=>{const u=n.value?.model||null;return Se(u)?null:u}),r=I();fe(t,async u=>{u?.from?r.value=await e.assets.getBlockMaterial(u.from)||void 0:r.value=void 0},{immediate:!0});const i=O(()=>t.value?[{name:"key",setters:rr,value:t.value.getPropValue("key")},{name:"ref",setters:rr,value:t.value.getPropValue("ref")},{name:"class",label:"class",setters:rr,value:t.value.getPropValue("class")},{name:"children",label:"文本",title:"如设置组件文本,将清空子组件",setters:rr,value:Array.isArray(t.value.children)?"":t.value.children}]:[]),o=O(()=>{if(!t.value)return[];const u=r.value||e.assets.componentMap.get(t.value.name);return u?(u.props||[]).map(l=>({...l,value:t.value?.getPropValue(l.name)??l.defaultValue})):[]}),s=u=>i.value.some(l=>l.name===u)||o.value.some(l=>l.name===u)||u==="style",a=O(()=>t.value?Object.keys(t.value.props).filter(u=>!s(u)).map(u=>({name:u,setters:"InputSetter",value:t.value?.getPropValue(u)})):[]);return{commonProps:i,componentProps:o,customProps:a,node:t,change:(u,l)=>{t.value&&(u==="children"?t.value.setChildren(l):t.value.setProp(u,l))},addCustom:u=>{u&&t.value?.setProp(u,"")},removeCustom:u=>{t.value?.removeProp(u)},isExist:s}}function Ve(n,e="提示"){return zt.warning({title:e,message:n})}async function fn(n){return await Zi.confirm(n,"提示",{type:"warning"}).catch(()=>!1)}function Fe(n,e="success"){return Yi({message:n,type:e})}function Te(n,e,t=!1){let r=!0;try{n.type==="JSExpression"?Ct(n,e,t,!0):Fi(n,e,t,!0)}catch(i){r=!1,zt.error({title:"代码错误",message:i.message})}return r}function $c(){const n=Me(),e=O(()=>n.simulator.designer.value),t=O(()=>n.current.value?n.history.value:null),r=O(()=>t.value?.items.length||0),i=()=>{e.value?.cleanHelper(),t.value?.forward()},o=()=>{t.value?.backward(),e.value?.cleanHelper()},s=l=>{e.value?.cleanHelper(),t.value?.load(l),Fe("已载入历史记录","success")},a=O(()=>r.value<=1?!0:(t.value?.index||-1)<=0),u=O(()=>r.value<=1?!0:(t.value?.index||-1)>=r.value-1);return{engine:n,history:t,total:r,forward:i,backward:o,load:s,forwardDisabled:a,backwardDisabled:u}}function Fr(){const n=Me(),e=O(()=>n.project.value);return{engine:n,project:e}}function g3(n){const e=Me(),t=O(()=>{const a=n.value?.model||null;return Se(a)?null:a}),r=I();fe(t,async a=>{a?.from?r.value=await e.assets.getBlockMaterial(a.from)||void 0:r.value=void 0});const i=O(()=>{if(Se(t.value))return[];const a=t.value?.events||{};return e3.map(u=>({name:u,event:a[u]}))}),o=O(()=>{if(Se(t.value))return[];const a=t.value?.events||{};return t3.map(u=>({name:u,event:a[u]}))}),s=O(()=>{if(!t.value||Se(t.value))return[];const a=t.value.events||{};return(r.value?.events||e.assets.componentMap.get(t.value.name)?.events||[]).map(u=>{const l=typeof u=="string"?u:u.name;return{name:l,event:a[l]}})});return{mouseEventList:i,keyboardEventList:o,componentEventList:s}}const y3=(n,e)=>new Yt({name:n,value:void 0,iterator:e}),b3=(n="modelValue")=>new Yt({name:"vModel",value:void 0,arg:n});function w3(n){if(!n)return[];const{props:e=[],events:t=[]}=n;if(e.length&&t.length){const r=t.filter(i=>(typeof i=="string"?i:i.name).startsWith("update:")).map(i=>i=typeof i=="string"?i:i.name);return r.length?e.filter(i=>r.some(o=>o.includes(i.name))):[]}return[]}function _3(n){const e=Me(),t=O(()=>{const p=n.value?.model||null;return Se(p)?null:p}),r=p=>O(()=>t.value&&(t.value.directives||[]).find(h=>h.name===p)||y3(p)),i=()=>O(()=>{if(!t.value)return[];const p=e.assets.componentMap.get(t.value.name||"");return(p?w3(p):[]).map(h=>(t.value?.directives||[]).find(f=>f.name==="vModel"&&f.arg==h.name)||b3(h.name))}),o=r("vIf"),s=r("vShow"),a=r("vBind"),u=r("vFor"),l=i(),c={vIf:o,vShow:s,vBind:a,vFor:u};return{engine:e,node:t,vIf:o,vShow:s,vBind:a,vFor:u,vModels:l,onValueChange:(p,h)=>{const f=c[p];t.value&&(h?(f.value.value=h,t.value.setDirective(f.value)):(f.value.value=void 0,t.value.removeDirective(f.value)))},onForChange:(p,h)=>{if(t.value){if(p==="value"){h?(u.value.value=h,t.value.setDirective(u.value)):t.value.removeDirective(u.value);return}(p==="item"||p==="index")&&(u.value.iterator={...u.value.iterator,[p]:h||void 0},t.value.setDirective(u.value))}},onModelChange:(p,h)=>{if(!t.value)return;const f=parseInt(p),m=l.value[f];m&&(h?(m.value=h,t.value.setDirective(m)):(m.value=void 0,t.value.removeDirective(m)))}}}function x3(){const{engine:n,project:e}=Fr(),t=O(()=>e.value?.apis||[]);return{engine:n,project:e,apis:t}}const S3={class:"v-switcher-widget"},j3={key:1},k3=B({name:"SwitcherWidget",inheritAttrs:!1,__name:"index",emits:["click"],setup(n,{emit:e}){const t=e,{engine:r}=Ie(),i=O(()=>r.project.value?.name),o=O(()=>r.project.value?.currentFile?.title),s=()=>{t("click",r.project.value)};return(a,u)=>(b(),G("div",S3,[x(d($e),{size:"small",round:"",onClick:s},{default:k(()=>[x(d(iu),{class:"v-switcher-widget__back"}),ae("span",null,ne(i.value),1),o.value?(b(),$(d(Cn),{key:0,direction:"vertical"})):z("",!0),o.value?(b(),G("span",j3,ne(o.value),1)):z("",!0)]),_:1})]))}}),E3={class:"v-toolbar-widget"},$3=B({name:"ToolbarWidget",inheritAttrs:!1,__name:"index",props:{preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{forward:r,backward:i,forwardDisabled:o,backwardDisabled:s}=$c(),a=I("pc");return e({mode:a}),(u,l)=>(b(),G("div",E3,[x(d(_a),{size:"small",modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},{default:k(()=>[x(d(or),{label:"pc"},{default:k(()=>[x(d(du))]),_:1}),x(d(or),{label:"mobile"},{default:k(()=>[x(d(pu))]),_:1}),x(d(or),{label:"pad"},{default:k(()=>[x(d(hu))]),_:1})]),_:1},8,["modelValue"]),z("",!0),x(d(Yc),null,{default:k(()=>[x(d($e),{type:"default",size:"small",onClick:d(i),disabled:d(s)||!!t.preview},{default:k(()=>[x(d(vu))]),_:1},8,["onClick","disabled"]),x(d($e),{type:"default",size:"small",onClick:d(r),disabled:d(o)||!!t.preview},{default:k(()=>[x(d(fu))]),_:1},8,["onClick","disabled"])]),_:1})]))}}),V3={class:"v-actions-widget"},C3=ae("span",null,"发布",-1),A3=B({name:"ActionsWidget",inheritAttrs:!1,__name:"index",props:{coder:{type:Boolean,default:!0}},setup(n){const{engine:e,designer:t}=vt(),r=I(!1),i=()=>{e.current.value?(r.value?e.skeleton?.getWidget("Previewer")?.widgetRef.refresh():(t.value?.setSelected(null),e.simulator.refresh()),Fe("刷新完成","success")):Fe("请先打开文件","warning")},o=async()=>{e.current.value?(r.value&&(e.skeleton?.closePreview(),r.value=!1,await ql(1e3)),t.value?.setSelected(e.current.value)):Fe("请先打开文件","warning")},s=()=>{if(e.project.value)if(e.current.value){if(r.value){e.skeleton?.closePreview(),r.value=!1;return}e.skeleton?.openPreview(""),r.value=!0}else Fe("请先打开文件","warning")},a=()=>{const l=e.project.value;l&&(l.currentFile?l.publish(l.currentFile):Fe("请先打开文件","warning"))},u=l=>{const c=e.project.value;c&&(l==="current"?a():c.publish())};return(l,c)=>(b(),G("div",V3,[x(d(ga),{value:0,max:99,hidden:!0},{default:k(()=>[x(d(Le),{mode:"icon",icon:d(yu),background:"hover"},null,8,["icon"])]),_:1}),x(d(Cn),{direction:"vertical"}),x(d($e),{onClick:s,type:r.value?"warning":"default",size:"small",title:"预览"},{default:k(()=>[x(d(uu))]),_:1},8,["type"]),x(d($e),{onClick:i,type:"default",size:"small",title:"刷新"},{default:k(()=>[x(d(mu))]),_:1}),x(d($e),{type:"default",size:"small",title:"页面设置",onClick:o},{default:k(()=>[x(d(bu))]),_:1}),x(d(Cn),{direction:"vertical"}),x(d(Ji),{"split-button":"",type:"primary",size:"small",onClick:a,onCommand:u},{dropdown:k(()=>[x(d(Wi),null,{default:k(()=>[x(d(br),{command:"current"},{default:k(()=>[de("发布页面")]),_:1}),x(d(br),{command:"project"},{default:k(()=>[de("整站发布")]),_:1})]),_:1})]),default:k(()=>[C3]),_:1})]))}}),O3={class:"v-icon-setter"},T3={class:"v-icon-setter__content"},D3={class:"v-icon-setter__list"},Vc=B({name:"IconSetter",__name:"icon",props:{modelValue:{default:""},size:{default:"small"}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=I(!1),o=I(t.modelValue),s=I(""),a=O(()=>Ci[t.modelValue]||t.modelValue),u=O(()=>{const f=Object.entries(Ci);return s.value?f.filter(m=>m[0].toLowerCase().includes(s.value)):f}),l=f=>{o.value=f},c=()=>{r("change",o.value),r("update:modelValue",o.value),i.value=!1},p=()=>{o.value="",r("change",""),r("update:modelValue",""),i.value=!1},h=()=>{i.value=!0};return(f,m)=>(b(),G("div",O3,[x(d(Xe),{size:t.size,readonly:"",placeholder:"请选择图标","model-value":t.modelValue,"suffix-icon":d(md),onFocus:h},{prepend:k(()=>[x(d(Vt),{icon:a.value},null,8,["icon"])]),_:1},8,["size","model-value","suffix-icon"]),i.value?(b(),$(d(Ut),{key:0,title:"图标选择器",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=v=>i.value=v),onSubmit:c},{extra:k(()=>[x(d($e),{size:"default",type:"warning",onClick:p},{default:k(()=>[de(" 清除绑定 ")]),_:1})]),default:k(()=>[ae("div",T3,[x(d(Xe),{size:t.size,"prefix-icon":d(ja),clearable:"",modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=v=>s.value=v),placeholder:"请输入查询关键字"},null,8,["size","prefix-icon","modelValue"]),ae("div",D3,[(b(!0),G(re,null,oe(u.value,v=>(b(),$(d(Vt),{icon:v[1],onClick:g=>l(v[0]),class:be({"is-active":o.value===v[0]})},null,8,["icon","onClick","class"]))),256)),u.value.length===0?(b(),$(d(Ee),{key:0})):z("",!0)])])]),_:1},8,["modelValue"])):z("",!0)]))}}),I3=B({name:"PageForm",__name:"form",props:{item:{},parentId:{}},setup(n){const e=n,{project:t}=Fr(),r=O(()=>e.item?"编辑页面":"新增页面"),i=()=>({dir:!1,name:"",title:"",icon:"",mask:!0,hidden:!1,raw:!1}),o=I(e.item||i()),s=[{label:"页面",value:!1},{label:"目录",value:!0}],a=l=>{o.value&&(o.value.name=xr(l))},u=async l=>t.value?.existPageName(l.name,[l.id])?(Ve("页面名称已存在,请更换"),!1):(e.item?t.value?.updatePage(l):t.value?.createPage(l,e.parentId),!0);return(l,c)=>(b(),$(d(at),{title:r.value,width:"800px",height:"500px","form-props":{tooltipMessage:!1},model:o.value,"submit-method":u},{default:k(()=>[x(d(Q),{name:"dir",label:"类型",editor:"radio",options:s,props:{button:!0,size:"small"},disabled:!!e.item,required:""},null,8,["disabled"]),x(d(Q),{name:"name",label:"名称",required:"",onChange:a,rules:{pattern:d(mt),message:"名称格式不正确"}},null,8,["rules"]),x(d(Q),{name:"title",label:"标题",required:""}),x(d(Q),{name:"icon",label:"菜单图标",editor:"none"},{editor:k(()=>[x(Vc,{modelValue:o.value.icon,"onUpdate:modelValue":c[0]||(c[0]=p=>o.value.icon=p),size:"default"},null,8,["modelValue"])]),_:1}),x(d(Q),{visible:{dir:!1},name:"mask",label:"包含母版",editor:"switch"}),x(d(Q),{name:"hidden",label:"隐藏菜单",editor:"switch"}),x(d(Q),{visible:{dir:!1},disabled:!!e.item,inline:"",name:"raw",label:"源码模式",editor:"switch",tip:"页面是非低代码开发,不能在线编辑"},null,8,["disabled"])]),_:1},8,["title","model"]))}}),ca=B({name:"VIcon",__name:"Icon",props:{icon:{},label:{},active:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=O(()=>({"is-active":t.active,"is-open":t.open})),o=()=>{r("click")};return(s,a)=>(b(),$(d($r),{effect:"dark",placement:"right",content:s.label,"show-after":600},{default:k(()=>[ae("div",{class:be(["v-apps-region__icon",i.value]),onClick:o},[(b(),$(Ue(s.icon)))],2)]),_:1},8,["content"]))}}),he=B({name:"VPanel",__name:"panel",props:{title:{},subtitle:{},plus:{type:Boolean},back:{type:Boolean},remove:{type:Boolean},save:{type:Boolean},header:{type:Boolean,default:!0}},emits:["plus","back","remove","save"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("plus")},o=()=>{r("back")},s=()=>{r("remove")},a=()=>{r("save")},u=O(()=>t.header?{content:t.title,subtitle:t.subtitle,icon:t.back?hd:void 0,onClickBack:t.back?o:void 0}:null);return(l,c)=>(b(),$(d(zr),{class:"v-panel",border:!1,header:u.value,fit:""},rn({actions:k(()=>[t.plus?(b(),$(d(Le),{key:0,size:l.$attrs.size,mode:"icon",icon:d(wo),background:"hover",title:"新增",onClick:i},null,8,["size","icon"])):z("",!0),t.remove?(b(),$(d(Le),{key:1,size:l.$attrs.size,mode:"icon",icon:d(fd),background:"hover",title:"清除",onClick:s},null,8,["size","icon"])):z("",!0),t.save?(b(),$(d(Le),{key:2,size:l.$attrs.size,mode:"icon",icon:d(cu),background:"hover",title:"保存",onClick:a},null,8,["size","icon"])):z("",!0),se(l.$slots,"actions")]),default:k(()=>[se(l.$slots,"default")]),_:2},[l.$slots.footer?{name:"footer",fn:k(()=>[se(l.$slots,"footer")]),key:"0"}:void 0]),1032,["header"]))}}),B3={class:"v-tabs__header"},R3={key:0,class:"v-tabs__actions"},Lr=B({__name:"tabs",props:{items:{default:()=>[]},menus:{},modelValue:{},stretch:{type:Boolean},checkable:{type:Boolean}},emits:["update:modelValue","command","remove"],setup(n,{emit:e}){const t=n,r=e,i=I((t.modelValue||t.items[0]?.name)??"");fe(i,()=>{r("update:modelValue",i.value)}),fe(()=>t.modelValue,a=>{i.value=a});const o=a=>{r("command",a)},s=a=>{r("remove",a)};return(a,u)=>(b(),$(d(zr),{class:"v-tabs",border:!1,fit:"",radius:!1},{header:k(()=>[ae("div",B3,[x(d(pc),{class:"v-tabs__tabs",items:t.items,type:"card",modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=l=>i.value=l),onTabRemove:s,stretch:t.stretch},null,8,["items","modelValue","stretch"]),t.menus&&t.menus.length?(b(),G("div",R3,[t.menus&&t.menus.length?(b(),$(d(Le),{key:0,mode:"icon",size:"small",icon:d(Xi),background:"hover",dropdown:{size:"small",placement:"bottom-end"},menus:t.menus,onCommand:o},{item:k(({item:l})=>[ae("span",null,[t.checkable?(b(),$(d(mo),{key:0,class:be({"v-tabs__checked":!0,"is-checked":l.checked})},null,8,["class"])):z("",!0),de(" "+ne(l.label),1)])]),_:1},8,["icon","menus"])):z("",!0)])):z("",!0)])]),default:k(()=>[se(a.$slots,"default")]),_:3}))}}),M3={key:2,class:"v-item__index"},P3={class:"v-item__content"},N3={key:3,class:"v-item__subtitle"},Oe=B({name:"VItem",__name:"item",props:{icon:{},index:{},tag:{},tagType:{},title:{},subtitle:{},actions:{default:()=>[]},background:{type:Boolean},border:{type:Boolean},switch:{type:Boolean},modelValue:{},active:{type:Boolean},hover:{type:Boolean},small:{type:Boolean}},emits:["click","action","update:modelValue","switch"],setup(n,{emit:e}){const t={add:{label:"创建",icon:wo},copy:{label:"复制",icon:vo},edit:{label:"编辑",icon:bo},remove:{label:"删除",icon:zn},lock:{label:"锁定",icon:go},unlock:{label:"解锁",icon:lu},invisible:{label:"隐藏",icon:_o},visible:{label:"显示",icon:Eu},home:{label:"主页",icon:ou}},r=n,i=e,o=I(!!r.modelValue),s=O(()=>r.actions.map(c=>{const p=t[c];return{name:c,...p}})),a=O(()=>({"is-background":r.background,"is-border":r.border,"is-active":r.active,"is-hover":r.hover,"is-small":r.small})),u=()=>{i("click",r.modelValue)},l=async c=>{c==="remove"?await Zi.confirm("确定删除吗?","提示",{type:"warning"}).catch(()=>!1)&&i("action",{name:c,modelValue:r.modelValue}):i("action",{name:c,modelValue:r.modelValue})};return fe(o,c=>{i("update:modelValue",c),i("switch",c)}),fe(()=>r.modelValue,c=>{o.value=!!c}),(c,p)=>(b(),$(d(ue),{class:be(["v-item",a.value]),justify:"space-between",align:"center",onClick:u},{default:k(()=>[x(d(ue),{class:"v-item__title",align:"center"},{default:k(()=>[se(c.$slots,"default",{},()=>[c.icon?(b(),$(d(Vt),{key:0,icon:c.icon},null,8,["icon"])):z("",!0),r.tag?(b(),$(d(sd),{key:1,class:"v-item__tag",size:"small",type:r.tagType},{default:k(()=>[de(ne(r.tag),1)]),_:1},8,["type"])):z("",!0),c.index!==void 0?(b(),G("span",M3," # "+ne(c.index),1)):z("",!0),ae("span",P3,ne(c.title),1),c.subtitle?(b(),G("span",N3,ne(c.subtitle),1)):z("",!0)])]),_:3}),x(d(ue),{class:"v-item__actions",onClick:p[1]||(p[1]=Qt(()=>{},["stop"]))},{default:k(()=>[(b(!0),G(re,null,oe(s.value,h=>(b(),$(d(Le),{name:h.name,title:h.label,mode:"icon",size:"small",background:"none",type:"info",icon:h.icon,onClick:f=>l(h.name)},null,8,["name","title","icon","onClick"]))),256)),r.switch?(b(),$(d(Ki),{key:0,modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=h=>o.value=h),class:"v-item__switch",size:"small"},null,8,["modelValue"])):z("",!0),se(c.$slots,"status")]),_:3})]),_:3},8,["class"]))}}),z3=["draggable"],F3={class:"v-box__name"},L3={class:"v-box__label"},Li=B({name:"VBox",__name:"box",props:{name:{},title:{},editable:{type:Boolean},active:{type:Boolean},draggable:{type:Boolean}},emits:["edit","remove","dragstart","dragend"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("edit")},o=async()=>{await Zi.confirm("确认删除?","提示",{type:"warning"}).catch(()=>!1)&&r("remove")},s=O(()=>({"is-active":t.active,"is-draggable":t.draggable})),a=()=>{r("dragstart",t)},u=()=>{r("dragend",t)};return(l,c)=>(b(),G("div",{class:be(["v-box",s.value]),draggable:l.draggable,onDragstart:a,onDragend:u},[x(d(ue),{direction:"column",justify:"center",align:"center"},{default:k(()=>[ae("span",F3,ne(t.name),1),ae("span",L3,ne(t.title),1)]),_:1}),t.editable?(b(),$(d(ue),{key:0,class:"v-box__footer",justify:"flex-end",align:"center"},{default:k(()=>[x(d(Vt),{icon:d(bo),onClick:i},null,8,["icon"]),x(d(Vt),{icon:d(zn),onClick:o},null,8,["icon"])]),_:1})):z("",!0)],42,z3))}}),H3={class:"v-context-viewer"},U3=B({__name:"viewer",props:{context:{}},emits:["pick","copy"],setup(n,{emit:e}){const t=n,r=e,i=["$provider","$apis","$components","context"],o=c=>{const p=c.value,h=Xr(p);return h==="Object"||h==="Module"?Object.keys(p||{}).length===0:h==="Array"?p.length===0:!0},s=(c,p="this")=>typeof c=="object"?Array.isArray(c)?c.map((h,f)=>{const m=`[${f}]`;return{label:m,value:h,type:Xr(h),path:`${p}${m}`}}):Object.entries(c).map(([h,f])=>({label:h,value:f,type:Xr(f),path:`${p}.${h}`})).filter(h=>!h.label.startsWith("__")&&!i.includes(h.label)):[],a=(c,p)=>{if(c.level===0)p(s(t.context));else{const h=Zt(c.data.value);p(s(h,c.data.path))}},u=c=>{r("copy",c.path)},l=c=>{r("pick",c.path)};return(c,p)=>(b(),G("div",H3,[c.context?(b(),$(d(Gi),{key:0,lazy:"",load:a,"expand-on-click-node":!1,props:{isLeaf:o}},{default:k(({data:h})=>[x(Oe,{title:h.label,clickable:"",onClick:f=>l(h),background:"",actions:["copy"],onAction:f=>u(h),grow:"",small:""},null,8,["title","onClick","onAction"])]),_:1},8,["props"])):z("",!0)]))}}),Oo=B({__name:"binder",props:{title:{},context:{},block:{},model:{},rules:{},modelValue:{type:Boolean},submitMethod:{type:Function},unbindEnabled:{type:Boolean}},emits:["unbind","submit","cancel","pick","update:modelValue","close"],setup(n,{emit:e}){const t=n,r=e,{searchResult:i,keyword:o}=m3(t.block,t.context),{copy:s}=bd({}),a=[{name:"normal",label:"常用"},{name:"viewer",label:"高级"}],u=I("normal"),l=I(),c=async S=>{r("submit",S),t.submitMethod?await t.submitMethod(S)&&p():p()},p=()=>{r("update:modelValue",!1),r("close")},h=()=>{r("unbind")},f=()=>{p()},m=async()=>{l.value?.submit()},v=S=>{r("pick",S)},g=S=>{s(S),Yi.success({message:"已经复制到粘贴板"})};return(S,y)=>(b(),$(d(Ut),{"model-value":t.modelValue,class:"v-binder",title:S.title,width:"1000px",height:"600px","body-padding":!1,maximizable:!1,minimizable:!1,onClose:p},{default:k(()=>[x(d(ue),{fit:"",direction:"row",overflow:"hidden"},{default:k(()=>[x(d(ue),{width:"30%",height:"100%"},{default:k(()=>[x(Lr,{class:"v-binder__tabs",items:a,modelValue:u.value,"onUpdate:modelValue":y[1]||(y[1]=w=>u.value=w)},{default:k(()=>[x(d(ue),{class:"v-binder__tab-content",fit:"",padding:"",flex:!1},{default:k(()=>[Xt(ae("div",null,[x(d(Xe),{modelValue:d(o),"onUpdate:modelValue":y[0]||(y[0]=w=>ui(o)?o.value=w:null),size:"small",clearable:"","prefix-icon":d(ja),placeholder:"筛选可用项"},null,8,["modelValue","prefix-icon"]),(b(!0),G(re,null,oe(d(i),w=>(b(),G("div",null,[x(d(Cn),{"border-style":"dotted"},{default:k(()=>[de(ne(w.title),1)]),_:2},1024),(b(!0),G(re,null,oe(w.items,E=>(b(),$(Oe,{title:E,background:"",actions:["copy"],small:"",onClick:j=>v(E),onAction:j=>g(E)},null,8,["title","onClick","onAction"]))),256))]))),256)),d(i).length?z("",!0):(b(),$(d(Ee),{key:0}))],512),[[yr,u.value==="normal"]]),Xt(x(U3,{context:t.context,onCopy:g,onPick:v},null,8,["context"]),[[yr,u.value==="viewer"]])]),_:1})]),_:1},8,["modelValue"])]),_:1}),x(d(zr),{grow:"",header:null,border:!1},{footer:k(()=>[x(d(ue),{justify:"space-between"},{default:k(()=>[x(d(ue),null,{default:k(()=>[S.unbindEnabled?(b(),$(d($e),{key:0,type:"warning",size:"default",onClick:h},{default:k(()=>[de(" 移除绑定 ")]),_:1})):z("",!0)]),_:1}),x(d(ue),null,{default:k(()=>[x(d($e),{type:"default",size:"default",onClick:f},{default:k(()=>[de(" 取消 ")]),_:1}),x(d($e),{type:"primary",size:"default",onClick:m},{default:k(()=>[de(" 确定 ")]),_:1})]),_:1})]),_:1})]),default:k(()=>[x(d(dc),{ref_key:"formRef",ref:l,class:"v-binder__form",footer:!1,"label-position":"top","tooltip-message":!1,model:t.model,rules:t.rules,"submit-method":c},{default:k(()=>[se(S.$slots,"default")]),_:3},8,["model","rules"])]),_:3})]),_:3})]),_:3},8,["model-value","title"]))}}),q3={class:"v-slots-picker__sn"},W3=B({__name:"slots",props:{slots:{default:()=>[]}},emits:["submit","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=I(),o=O(()=>`${50*Math.ceil(t.slots.length/4)+180}px`),s=u=>{i.value=u},a=()=>{i.value?(r("submit",i.value),r("update:modelValue",!1)):Ve("请选择插槽")};return(u,l)=>(b(),$(d(Ut),ye({class:"v-slots-picker",title:"选择插槽",width:"600px",height:o.value,submit:"",cancel:"",onSubmit:a},u.$attrs),{default:k(()=>[x(d(ud),{title:"该组件支持多个插槽,请选择放置到其中一个",type:"warning",closable:!1}),x(d(ue),{class:"v-slots-picker__content",justify:"space-around",alignContent:"flex-start",gap:"",wrap:"wrap"},{default:k(()=>[(b(!0),G(re,null,oe(t.slots,(c,p)=>(b(),$(d(ue),{class:be(["v-slots-picker__item",{"is-active":c.name===i.value?.name}]),grow:"",flex:!1,onClick:h=>s(c)},{default:k(()=>[ae("span",q3,"#"+ne(p+1),1),de(" "+ne(c.name),1)]),_:2},1032,["class","onClick"]))),256))]),_:1})]),_:1},16,["height"]))}}),Cc=B({name:"Viewport",__name:"viewport",props:{mode:{default:"pc"},width:{},height:{}},setup(n){const e=n,t=O(()=>[`is-${e.mode}`]),r=O(()=>{if(e.mode==="pc")return 1;const o=e.mode==="mobile"?la:ua,{width:s,height:a}=o,u=s>0?(e.width||0)/s:1,l=a>0?(e.height||0)/a:1;return Math.min(u,l)}),i=O(()=>{if(e.mode==="pc")return{};const o=e.mode==="mobile"?la:ua,{width:s,height:a}=o;return{width:`${s}px`,height:`${a}px`,left:"50%",top:"50%",transform:`translate(-50%, -50%) scale(${r.value})`}});return(o,s)=>(b(),G("div",{class:be(["v-viewport",t.value]),style:kt(i.value)},[se(o.$slots,"default")],6))}}),J3=B({name:"PagesWidget",__name:"index",setup(n){const{project:e,engine:t}=Fr(),r=O(()=>e.value?.pages||[]),{current:i}=Ie(),o=I(!1),s=I(),a=I(),u=()=>{a.value=void 0,s.value=void 0,o.value=!0},l=async f=>{const{name:m,modelValue:v}=f,{data:g,node:S}=v;if(m==="add"&&(s.value=void 0,a.value=g.id,o.value=!0),m==="edit"&&(s.value=Nn(g),a.value=void 0,o.value=!0),m==="remove"){if(g.dir){const y=e.value?.getPage(g.id);if(y&&y.children?.length){Ve("请先删除子页面");return}}e.value?.removePage(g.id)}if(m==="copy"){const y=S.parent?.data.id;e.value?.clonePage(g,y)}m==="home"&&(e.value?.setHomepage(g.id),Fe("设置主页成功","success"))},c=async f=>{f.raw&&Fe("这是源码模式页面,不能低代码设计","warning"),f.dir||f.raw?t.project.value?.deactivate():t.project.value?.active(f)},p=(f,m,v)=>v==="inner"?!!m.data.dir:!0,h=()=>{e.value?.update({pages:ci(r)})};return(f,m)=>(b(),$(d(he),{class:"v-pages-widget",title:"页面管理",plus:"",subtitle:"(共 0 条)",onPlus:u},{default:k(()=>[x(d(Gi),{data:r.value,"node-key":"id","default-expand-all":"",draggable:"","allow-drop":p,onNodeDrop:h},{default:k(({data:v,node:g})=>[x(d(Oe),{class:"v-pages-widget__item",icon:d(Ci)[v.icon],title:v.title,subtitle:v.name,"model-value":{data:v,node:g},actions:v.dir?["add","edit","remove"]:v.raw?["home","edit","remove"]:["home","copy","edit","remove"],onAction:l,onClick:S=>c(v),active:d(i)?.id===v.id,tag:d(e)?.homepage===v.id?"主页":void 0,"tag-type":"success",grow:"",small:"",background:"",hover:""},null,8,["icon","title","subtitle","model-value","actions","onClick","active","tag"])]),_:1},8,["data"]),o.value?(b(),$(I3,{key:0,modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=v=>o.value=v),item:s.value,"parent-id":a.value},null,8,["modelValue","item","parent-id"])):z("",!0)]),_:1}))}}),K3=B({name:"BlocksWidget",__name:"index",setup(n){const{span:e}=Ec(),{blocks:t,engine:r}=u3(),i=I(void 0),{current:o}=Ie(),s=I(!1),a=O(()=>i.value?.id?"编辑":"新增"),u=O(()=>`(共 ${t.value.length} 个)`),l=()=>({name:"",title:"",type:"block"}),c=async y=>{const w=y,E=r.project.value;if(!E)return!1;if(y.id)if(!E.existBlockName(w.name,[w.id]))E.updateBlock(w);else return Ve(`名称【${w.name}】已经存在,请更换名称`),!1;else if(!E.existBlockName(w.name))E.createBlock(w);else return Ve(`名称【${w.name}】已经存在,请更换名称`),!1;return!0},p=()=>{i.value=l(),s.value=!0},h=y=>{i.value=Nn(y),s.value=!0},f=y=>{r.project.value?.removeBlock(y.id)},m=y=>{i.value&&(i.value.name=xr(y))},v=async y=>{r.project.value?.active(y)},g=async y=>{const w={type:"Schema",id:y.id},E=await r.assets.getBlockMaterial(w),j=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;j&&E&&j.setDragging(E)},S=()=>{const y=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;y&&y.setDragging(null)};return(y,w)=>(b(),$(d(he),{class:"v-blocks-widget",title:"区块管理",subtitle:u.value,plus:"",onPlus:p},{default:k(()=>[x(d(pi),{wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(d(t),E=>(b(),$(d(di),{key:E.id,span:d(e)},{default:k(()=>[x(d(Li),{name:E.name,title:E.title,active:d(o)?.id===E.id,editable:"",onEdit:j=>h(E),onRemove:j=>f(E),onClick:j=>v(E),draggable:d(o)?.id!==E.id,onDragstart:j=>g(E),onDragend:S},null,8,["name","title","active","onEdit","onRemove","onClick","draggable","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(t).length?z("",!0):(b(),$(d(Ee),{key:0})),x(d(at),{modelValue:s.value,"onUpdate:modelValue":w[0]||(w[0]=E=>s.value=E),title:a.value,model:i.value,width:"600px",height:"250px","form-props":{tooltipMessage:!1},"submit-method":c},{default:k(()=>[x(d(Q),{name:"name",label:"名称",required:"",tip:"名称为英文驼峰格式",rules:{message:"名称格式错误",pattern:d(mt)},onChange:m},null,8,["rules"]),x(d(Q),{name:"title",label:"标题",required:""})]),_:1},8,["modelValue","title","model"])]),_:1},8,["subtitle"]))}}),G3={class:"v-components-widget__search"},Y3={key:0,class:"v-components-widget__result"},Z3={class:"v-components-widget__list"},X3=B({name:"ComponentsWidget",__name:"index",setup(n){const{span:e,engine:t}=Ec(),{tabs:r,currentTab:i,currentGroup:o,model:s,searchKey:a,searchResult:u}=d3(),l=p=>{const h=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;h&&h.setDragging(p)},c=()=>{const p=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;p&&p.setDragging(null)};return(p,h)=>(b(),$(d(he),{class:"v-components-widget",title:"组件库",body:{flex:!0,direction:"column"}},{default:k(()=>[ae("div",G3,[x(d(Xe),{modelValue:d(a),"onUpdate:modelValue":h[0]||(h[0]=f=>ui(a)?a.value=f:null),placeholder:"搜索组件",clearable:"",size:"small"},{prefix:k(()=>[x(d(Cu))]),_:1},8,["modelValue"])]),d(a)?(b(),G("div",Y3,[x(d(pi),{wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(d(u),f=>(b(),$(d(di),{span:d(e),key:f.name},{default:k(()=>[x(d(Li),{name:f.name,title:f.label||f.name,draggable:"",onDragstart:m=>l(f),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(u).length?z("",!0):(b(),$(d(Ee),{key:0}))])):(b(),$(d(pc),{key:1,items:d(r),modelValue:d(i),"onUpdate:modelValue":h[2]||(h[2]=f=>ui(i)?i.value=f:null)},{default:k(()=>[ae("div",Z3,[d(o)?(b(),$(d(Zc),{key:0,modelValue:d(s)[d(i)],"onUpdate:modelValue":h[1]||(h[1]=f=>d(s)[d(i)]=f)},{default:k(()=>[(b(!0),G(re,null,oe(d(o).children,f=>(b(),$(d(Xc),{key:f.name,name:f.name,title:`${f.label} (${f.count})`},{default:k(()=>[f.components?(b(),$(d(pi),{key:0,wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(f.components,m=>(b(),$(d(di),{span:d(e),key:m.name},{default:k(()=>[x(d(Li),{name:m.name,title:m.label||m.name,draggable:"",onDragstart:v=>l(m),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:2},1024)):z("",!0)]),_:2},1032,["name","title"]))),128))]),_:1},8,["modelValue"])):z("",!0)])]),_:1},8,["items","modelValue"]))]),_:1}))}}),Q3=B({name:"OutlineWidget",__name:"index",setup(n){const{engine:e,designer:t,selected:r}=vt(),{current:i}=Ie(),o=I([]),s=j=>{if(Se(j))return j.locked?["unlock"]:["lock"];const _=j.parent;return _&&(_.locked||_.invisible)?[]:i.value?.locked?[]:j.locked?["unlock"]:j.invisible?["visible"]:["lock","invisible","copy","remove"]},a=j=>{const _=[];return j.forEach(V=>{const D={id:V.id,label:V.name,type:V.id,model:V};Array.isArray(V.children)&&(D.children=a(V.children)),_.push(D)}),_},u=()=>{if(!i.value)return[];const{id:j,name:_,nodes:V}=i.value;return[{id:j,label:_,type:j,model:i.value,children:a(V)}]},l=async()=>{o.value=u(),r.value?.model&&(await ct(),t.value?.setSelected(r.value.model))},c=O(()=>r.value?.model.id),p=j=>{const _=j.data;if(Se(_.model)||_.model.locked||_.model.name==="template")return!1;const V=e.assets.componentMap.get(_.model.name);return V?(t.value?.setDragging(V),!0):!1},h=async(j,_,V)=>{const D=_.data,Y={prev:"top",next:"bottom",inner:"inner"}[V];let C=!1;if(Se(D.model))C=V==="inner",t.value?.setDropping(C?D.model:null,"inner");else{const A=D.model;C=!!await t.value?.allowDrop(A,Y),t.value?.setDropping(C?A:null,"inner")}return C},f=j=>{const _=j?.model;!_||_.invisible||(t.value?.setSelected(_),t.value?.setHover(null))},m=async(j,_,V)=>{const D=j.data,Y=_.data;if(Se(Y.model)){t.value?.setDropping(null),t.value?.setDragging(null);return}const C=Y.model,A={before:"left",after:"right"}[V]||"inner";if(!await t.value?.allowDrop(C,A)){t.value?.setDropping(null),l(),Yi.warning({message:`${D.model.name}不能放置到该位置`}),t.value?.setDragging(null);return}const P=await t.value?.getDropSlot(V==="inner"?C:C.parent);if(P!==null){const T=D.model;T.slot=P,i.value?.move(T,C,A)}else l();t.value?.setDropping(null),t.value?.setDragging(null),e.simulator.refresh()},v=j=>{Se(j.model)?t.value?.setHover(j.model):(t.value?.setHover(j.model),j.model.invisible&&t.value?.setHover(null),j.model.name==="slot"&&t.value?.setHover(null))},g=()=>{t.value?.setHover(null)},S=j=>{const _=j.data;_.dragging=!0;const V=e.assets.componentMap.get(_.model.name);V&&t.value?.setDragging(V)},y=async j=>{const _=j.data;_.dragging=!1},w=(j,_)=>{j&&((j.id===_.id||!Se(j)&&_.isChild(j))&&t.value?.setSelected(null),t.value?.setHover(null))},E=j=>{const{name:_,modelValue:V}=j,D=r.value?.model;switch(_){case"lock":w(D,V),V.lock();break;case"unlock":w(D,V),V.unlock();break;case"invisible":w(D,V),V.setVisible(!1);break;case"visible":V.setVisible(!0);break;case"copy":const Y=i.value?.cloneNode(V);Y&&t.value?.setSelected(Y);break;case"remove":w(D,V),i.value?.removeNode(V);break}};return fe(e.changed,l,{immediate:!0}),(j,_)=>(b(),$(d(he),{class:"v-outline-widget",title:"大纲树"},{default:k(()=>[(b(),$(d(Gi),{key:d(e).changed.value,data:o.value,"node-key":"id","default-expand-all":"",draggable:"","empty-text":"请新建或打开文件","current-node-key":c.value,"highlight-current":!0,"expand-on-click-node":!1,"allow-drop":h,"allow-drag":p,onCurrentChange:f,onNodeDrop:m,onNodeDragStart:S,onNodeDragEnd:y},{default:k(({data:V,node:D})=>[x(d(Oe),{class:be(["v-outline-widget__item",{"is-locked":V.model.locked,"is-invisible":V.model.invisible,"is-dragging":V.dragging}]),active:!V.model.invisible&&D.isCurrent,grow:"",small:"",background:"",hover:"","model-value":V.model,icon:V.model.locked?d(go):V.model.invisible?d(_o):void 0,title:V.label,subtitle:V.type,actions:s(V.model),onAction:E,onMouseenter:Y=>v(V),onMouseleave:g},null,8,["class","active","model-value","icon","title","subtitle","actions","onMouseenter"])]),_:1},8,["data","current-node-key"]))]),_:1}))}}),ew=B({name:"HistoryWidget",__name:"index",setup(n){const{history:e,load:t,total:r}=$c(),i=O(()=>`(共 ${r.value} 条)`),o=a=>{a.name==="remove"&&e.value?.remove(a.modelValue.id)},s=async()=>{await fn("确定要清空历史记录吗?")&&e.value?.clear()};return(a,u)=>(b(),$(d(he),{class:"v-history-widget",title:"历史记录",subtitle:i.value,remove:!!d(r),onRemove:s},{default:k(()=>[d(r)===0?(b(),$(d(Ee),{key:0,"image-size":50})):z("",!0),d(e)?(b(!0),G(re,{key:1},oe(d(e).items,(l,c)=>(b(),$(d(Oe),{index:c+1,title:l.label,"model-value":l,active:c==d(e).index,small:"",background:"",actions:["remove"],onAction:o,onClick:p=>d(t)(l.id)},null,8,["index","title","model-value","active","onClick"]))),256)):z("",!0)]),_:1},8,["subtitle","remove"]))}}),ke=Mc({loader:()=>Tc(()=>import("./Editor-ctkAn2cu-O6Vp28_y.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),loadingComponent:B({render(){return Ae("div","正在拼命加载...")}}),errorComponent:B({render(){return Ae("div","组件加载失败!")}})}),tw=B({name:"ApisWidget",__name:"index",setup(n){const e=I(!1),t=I(null),r=I(!1),i=O(()=>r.value?"编辑API":"新增API"),o=O(()=>s.value?.apis||[]),{project:s}=Fr(),a=()=>({method:"get",name:"",label:"",url:"",settings:{loading:!0,failMessage:!0,validSuccess:!0,originResponse:!1,injectHeaders:!1,type:"form",headers:{type:"JSExpression",value:"({})"}}}),u=()=>{e.value=!0,r.value=!1,t.value=a()},l=n3.map(g=>({label:g,value:g.toLowerCase()})),c={get:"success",post:"primary",put:"warning",delete:"danger",patch:"warning",jsonp:"info"},p=[{label:"表单",value:"form"},{label:"JSON",value:"json"},{label:"文件",value:"data"}],h=(g,S,y)=>{Te({type:"JSExpression",value:S},window)?y():y(new Error("代码错误"))},f=g=>{g.name==="edit"&&m(g.modelValue),g.name==="remove"&&s.value?.removeApi(g.modelValue.name)},m=g=>{r.value=!0,t.value=Nn(g),e.value=!0},v=async g=>s.value?.existApiName(g.name,r.value?[g.id]:[])?(Ve(`API名称 [ ${g.name} ] 已存在`),!1):(s.value?.setApi(g),!0);return(g,S)=>(b(),$(d(he),{class:"v-apis-widget",title:"API管理",plus:"",onPlus:u},{default:k(()=>[(b(!0),G(re,null,oe(o.value,y=>(b(),$(d(Oe),{key:y.id,small:"",title:y.name,subtitle:y.label,"model-value":y,tag:y.method?.toUpperCase(),"tag-type":c[y.method||"get"],background:"",actions:["edit","remove"],onClick:w=>m(y),onAction:f},null,8,["title","subtitle","model-value","tag","tag-type","onClick"]))),128)),o.value.length===0?(b(),$(d(Ee),{key:0,"image-size":50})):z("",!0),x(d(at),{modelValue:e.value,"onUpdate:modelValue":S[1]||(S[1]=y=>e.value=y),model:t.value,title:i.value,width:"1000px",height:"600px","form-props":{labelPosition:"top",tooltipMessage:!1,size:"default"},"submit-method":v},{default:k(()=>[x(d(ue),{gap:"",fit:""},{default:k(()=>[x(d(ue),{direction:"column",grow:"",width:"50%",shrink:""},{default:k(()=>[x(d(Q),{name:"method",label:"请求类型",required:"",editor:"radio",options:d(l),props:{button:!0}},null,8,["options"]),x(d(Q),{name:"name",label:"接口名称",required:"",rules:{pattern:d(mt),message:"名称格式不正确"}},null,8,["rules"]),x(d(Q),{name:"label",label:"备注说明",required:""}),x(d(Q),{name:"url",label:"接口URL",required:""})]),_:1}),x(d(ue),{direction:"column",grow:"",width:"50%",shrink:""},{default:k(()=>[t.value.method!=="jsonp"?(b(),$(d(he),{key:0,title:"请求配置",subtitle:t.value.method,border:""},{default:k(()=>[x(d(ue),{justify:"space-around"},{default:k(()=>[x(d(Q),{name:"settings.loading",size:"small",label:"加载提示",editor:"switch"}),x(d(Q),{size:"small",name:"settings.failMessage",label:"失败提示",editor:"switch"}),x(d(Q),{size:"small",name:"settings.validSuccess",label:"校验成功",editor:"switch"}),x(d(Q),{size:"small",name:"settings.originResponse",label:"原始响应",editor:"switch"}),x(d(Q),{size:"small",name:"settings.injectHeaders",label:"注入请求头",editor:"switch"})]),_:1}),x(d(Q),{size:"small",name:"settings.type",label:"发送数据类型",editor:"radio",options:p,props:{button:!0}}),x(d(Q),{size:"small",name:"settings.headers.value",label:"请求头配置",tip:"支持 JSExpression 或 JSFunction",rules:{validator:h}},{editor:k(()=>[x(d(ke),{modelValue:t.value.settings.headers.value,"onUpdate:modelValue":S[0]||(S[0]=y=>t.value.settings.headers.value=y),dark:"",height:"200px"},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["subtitle"])):z("",!0),t.value.method==="jsonp"?(b(),$(d(he),{key:1,title:"请求配置",subtitle:t.value.method,border:""},{default:k(()=>[x(d(Q),{name:"jsonpOptions.jsonpCallback",size:"small",label:"jsonpCallback"}),x(d(Q),{name:"jsonpOptions.jsonpCallbackFunction",size:"small",label:"jsonpCallbackFunction"}),x(d(Q),{name:"jsonpOptions.timeout",size:"small",label:"timeout",editor:"number"}),x(d(Q),{name:"jsonpOptions.crossorigin",size:"small",label:"crossorigin",editor:"switch"})]),_:1},8,["subtitle"])):z("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue","model","title"])]),_:1}))}}),nw=B({name:"DepsWidget",__name:"index",setup(n){const{dependencies:e,engine:t}=kc(),r=I(!1),i=I(!1),o=I({}),s=O(()=>i.value?"查看依赖":o.value?"编辑依赖":"新增依赖"),a=m=>m.required||m.official?[]:["edit","remove"],u=m=>m.official&&!m.required,l=async m=>(m.urls=m.urls.split(`
|
|
81
|
+
*/const Q6="0.7.10",la={width:390,height:844},ua={width:1180,height:820},mt=/^[A-Za-z_$][\w_-]*$/,e3=["click","dblclick","mouseenter","mouseleave","mousedown","mouseup","mouseover","contextmenu"],t3=["keydown","keyup","keypress"],n3=["GET","POST","PUT","PATCH","DELETE","JSONP"],r3=["stop","prevent","capture","self","once","passive"];var Ye=(n=>(n.Block="block",n.Node="node",n))(Ye||{});const jc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAQd0lEQVR4nO2dCXRVxRnHf/clIPsekBgIS1hFdqVoZbGLFNTWWgQ3bLVurRYJcTuntbW22qooKKWl2toWquygIFa01doqmBBWWcomIkhACLIKyXvcnu/eefiSNzd57y4vAfI/553wuPfNzJ3/nW9m/t83M4Yx6iTVGOlAC6AD0Bs4F2gGtFT/lmtNgLpABDgMFAN7gCJgH3AQ2ACsAz5V91RbpFfDguUAg4EewBCgLdAQqJXAb5sD7RyuHVGfpcBy4AOgADjkc/k9obq0kP7AN4CrgK7qrQ8aJrALeAt4Q/3dV7XVULWEtAauBq5ThNSpqoIo7AReBWYA/6mqQlQFId2AW4HRwHmpzjwBSMv5N/BHYAHwRSozTyUhQsS9iohGqcrUI1YDE4GXgROpyDAVhMiIKBe4I0V9QxCQgcCvgdeCzigUcPo/BN4HHjiNyRAMBBYBs4BOQWYUFCFdgIXA80DHgPKoCowE3gHuCirvIAj5AfAmcEUAaVcHZAJTgHlqjuQr/CREJm/PAH8G2pyWVZ0crlbzl8v8TNQvQrLVGP5en9I7XdBV9S0/9qu8fhDSC1isZI6zEaKjTQYe8aM+vSZwqeq8u5+lZMTiYeA5oLaXRLwQMhSYe5b0F4niR8BUL6S4VXsvAWYCGZ6Kf2bi+8oVcDuQ9KzbTQvpqQS4GjKcIVrdU25+mCwhbZWuk+WhsGcLxgEPJvusyRAi84xpNR14UhD9a1QyP0iGkEeBQcGV/YyE1O+zwPnJ/CARSEc1NrBin9kQtftFoHEiT5kIIeLj/s3ZXqsecSHwUCJJVEZIGjAJaFXVT3QG4D7ga5U9RmWEiHI7/GyvSZ8QUkPhhhUlVxEhLZUcUAP/ILFld7slJK9GFgkEuRXEjjkSIh6/O0+fZzyt0EK5tLVwIiSvMltXA0+4yWluoiOkqwrVqUFwqA/ckygholI2SCUZZhjM4/bflOYrn1IwT4AZSW3eSlLpUP4/yxPSKtWtwyyBnPPgioHQtpX93Zd0TVXZEbviddcJQ59OMHwAZDTxL+8EIWFRN5a/tTwh31UxtymBtIrhF8GiBwwWPmDw2oMGg3t5rxghIi0NLugAbcRJUKoIiEUYbhwCrz9k57sgz6BvZ7u1pBBjlPk6hdjIRSHnXeV8ChzmF3DlJfDyWIP653yZ28ZP4dKHTfYdBCPNHRndsuGpmwwGdYNjJ2DiYpMnFtheI8OwTWPnLCh43KBR3S9/u/0z+N4Ek8KNYKQu9PvbKkDEQmwL6QP0S0UJhIxhA2D6PWXJEHTNhN7t7Tc46XQj0KQRzBhrMLwPNKgDLRvDY9cZfFOeLtrywjC0B2XIELTLgNm5Br072603RRgZm00sIcNSsSRAyBjSF6b/xIirEMHRE7D7gEtfZhiG9YGe2fGXLuwY41A1oOhzfRLtW8LMcQbnd0wZKd9UC40shGL+Xhl0zkLGwJ4w816D5g7juKlvwbqPwEhkvVRs2thPcfWFhvb62h02ERZqw+vL4e//1afVuTXMGW/QpV1KSMmIDaGKEtI+GSeKGwgZ/brZZLR08AzMWgY/e8l03TqyW8PXesRf2roH3t3w5aI46UdKwnDnVJNXC/XJiemcPd4gp03gpMhr8tXol+ijDwly7iFk9Opiv3VtmuvvmZsPtzxnWp2wm85cCBnRB5pr9IXFK2F/sXImKBjpcOQY3DTJ5LWV+iQvaGOTkp0Z+Ojr8mjoUJSQnkHlJG9X9xyYO96wOk0dFq6AHzxncvS4XVFJ52FCWh24+qJ4cxU5Ca8WmpZNK39VzOKhIzDmWZO31+nT7t0OZuUaZGYESkrbaOB2SMVmBeIrlwfo0h7mjTfo6ODikrdzzCSTw8eS7zdOIQzd28JXNCs3pO94f6PzGl6jNhQfhOsnmrz3P/09F+XAy7kGGc0CmzzWV2tQLEJaqD7EVwgZHdvA/DyDLpn6lN9aCzc/a/L5YfdkWJ15BIb1soe55TEv3+SYpF9BvySkFO2D6yeZrNyuv2dQV3hpnEHTRvZcJwB0jRIieko9X8kogQ5ZMC/PoJvDss531sMNE032H7QrxDVOQq168F2NuZIh9PyCsn2HE4xzYMduuPZpk3U79Td9vQdMG2vQqF4gpAgPTUPKi+XWWMRByDivpW13ezosZ/lgC9w4yWRvsUcysGWRAZ3UPKMclm6CDTsSD5gVUrbssEnZskd/jwwc/ibqQl3fSZGl4e1DakWQLxAyWjW3Z7v9HIygmIRRT5vs2mtXgBdE9SmZe6RpTJKYq8gJe5ibKEQyWb8NrnnS5KPP9D/6dn948W6DunV8JUVc5i1Dfi3GFDKaNYaX7zUY2Fl/z4ZdMPoZk493eyfDwklo2Bgu7x1/af8ReH1VYuaqPISUNZvhe0+ZfLJff8/Ir8Cff2xwTm3f3AZS0mYhxYwnCBkNG9id3lCH6aWYgJETTDZ97BMZ2Obqki5o+6klq2H7LveDBaMurNhoi427HWSW0RfDCz8ySE/3hRSplcyQ2lXHNaQg9evB9LEGlzvMZiwV9SmTddv8U1Etc2XYc4+QxiTN+cB0sRigLISU/HU2KZ85bFFz46Uw9Q5FijcnV3qUkBZuUzBPQnoaTLnd4CoHnViavDzQ6s0+S9oRaJkBwzXm6qO98M46f/Y6ElLeXwM3PGty4Kj+nluGwiOjDatMcX6X5HCutz6kFAb1gDEO08pPDyj/woYA/Aul8PULIEsjxSxaAcX73c36dRBS3iyAMZNNDjvsfJI7Avp2scvlAVYfohHBE0QELu+lH8KImbr2GdNq8ob7HLSw3sJaemW3NAxzlml0Eq+oA4veh9ummhQfiU+rTi3VWr2ZrXohT0mY0NbB4P1qnsl7+f6TYSEM7VrDEM0AYvUOyN/i/9Zs1tC5Dsx8A/70tv6erOae34JwyNOWdwbscNjyK3eEQe+eAUnXYfttbKFRdhcWmhw/7FIxrgzH4VuD4Iav6u/bVeytA5Hd7UJqj0J3SIf5+SZhTRvrrqSTCzra8rtfkIGEKLvXDIh/G4+VJC6VJAt5hqF9Ydo9BplN4398vNTuuzzm/VlIbRjpDrVg2Qb45Vz9myHu0Hn3++wOVcruAI2y+98N8OF2/82VkHFJT5hRgafzyYWwcpMnEUoq8dOQ2r3TFSy7mgaPzoDHFuhTyGkF8+4z6OqXOzSCNcQuHxwhmP2BaanMFSm7yULI6NvV1uacPJ3P/xMemWladZGMTFMO4m3ZJUV3EAcSg/XwafDT6SYTF+t/Ij7q+fcbdMn2RoqYqzoN4Dua0dWeg7BkjZ8yqU1Gz072C6UzU4KX3oO7nzeJRDz3WzJg3ivV6SAMJA4piGlA3l9MJr+h/5n4qOfeZ9C5rQdSSuGiTtBHI1z+60PYUeRf/2F5OjvaZc52GEnOWQa3TTEt/7wPcx5pIQdCapNhzxBSIibkvmjygsOw8PwsmDXesHwlrtyhJlzV31nZlf7Fg8n4Mpvj0Dkb5uYZlsnVQYIjbplicsyl21mD9SJshNSOzw6iQHIQUkojcPcfTaY5bLTaKxvm5CUfOCA6UcMmcEXf+Gtbimzvox/mSsjIaav6PQfHxOJVth/+8FEPbud4iMHdGfJ7+20h5UQp3PUHk9nL9Pf0aWcHo2W1SoKUsK3sdtJEHr+yHD53G1wXAylL+yw70uR8h70qpJ+6aaLJwSO+kiEQV1pJdGK41M+UpQlLBMmtk00WOsQ9DciBmbkG52YkGDhgwKiB8cqutMgFBfaw24u5EjKyzrXNVG9N5KPg3xtst3PxId/JKFVbn596p1b4mrwKsREhTpq2NfrR4OLOtkOrRdOKSRGJP7OV6Gbx11Zth8Jt3syV5enMgFnjDKv16rB0M4yaYLLvcx/czvGQAwM+JIaQpZ5lMQ2EFIkokbfqPxv19wzpDjPGGTRpXIE7NGJHJLbWDD1fKTD54rB7cyVkNG1im1AnT6fldp5gsmd/IGQIlkUVk+hjFHiZIFYEeYB9B2w/+vJt+hulsl8aa9CgfjwplrKbbo+uyuPIcZi/3B7qurFWklcD8XT+xGBwN/0963fans5Pinz0dMbj1Lg0SsghdTpAIJAH2b3XJuXDT/Q5fKt3DCmxbTUCHVrDZRplV2z6+iSiSmIhZrBeXTsKf5jGyYUavUkEytZPAl0vIkrfv6JfYhv6PwLLUgUObFNv26bd+nuu7AeTbzVID8V43kTZ7QPNNBrSPHHTliTfmVuhp2nwu9sMK4JEB/HnjJQYra2BL96ReeDa6JdYQpaoIXBgkAfbuN1+67Y5SJo3D4b+nWKWoaVLKKeDVLLWpZBYCiP6w/cH6y+LS0HKuGpTQP6cspgZ23/HElKsdhgNFEKK+NdHTzLZ6aCi1a6ltE/DLuqWong1WUJ8dha5JOSkPUHVQRYLSUhpQRBu53gcjV3OhmZsMt2zVzgByIMWrFeklPPGyIx7xRZ7GGu1i3T4wxLKBELvPwwTF6m5h5sCpMGba+wJbCyk1V03yeS9tSlbYyh9R5nxZ5rR4+ex33eqLYQc3h//IJNHiaV9ax00bWBw0oRFhTDur2UXfIqafPQYvFIIoZBhEZg3zSR/o/shqKS9cw98XAz9OthL6wq22v7yd9ekdMHneGBzmbJpzg8ZpXYdTQmsCWEte3Hm3gO2qdKJddbIy1RtOux9PmD1T6XQvb3tSFu+FfbsC2yeoUOhWvFcRjzSEVJXTVQCW8RTHlblnLQru6IRU3Tk5YeieyrNUpV3ekB+eGfcDPyt/FXd/FbGxRNSWTKpYCMBb5t1n8/hPaImyDwpxWTIUUpzdBecBIeZUbGrBoHgcYnJSIYQsWu/CELfqoGliMx2qoaKJLl/qGPjauAfpMf6WUV7wlemkcrOZw7LVmrgAhPVgMkRlRGytWYjTN8gXqHHKkssES/C8zWmyzPCamfwSiN8EiEkorY23VT1z3Xa4qfquL1KkaifbZfapTR1mxadOZiTzLwuGcfn20p7qUHiWKlOcEt4BWKynugp6tiKGlSObUoX3JtMXbkJDXhYEVMDZxSpzUQ3J1tHbkPLZMTwlxpCtNinDu0vcPNjt4SE1XHcf3L5+zMV0jKuTXREpYOX4MsSNfJ6+myt/XKQSfR3YkN63MDr0pawGnkldHrMGYxCdc6KZ4Xcr7VGv1F2M9ColWoKOfR+hF8TZz+P756htprN9zHN6oxSdU7hdZ7WaZaD3wfcS6TUN1SLOZN9KavVxpW/dXO8akXwmxBUWOpDyqauCiD9qkSJImGo187bCUEQEsUSdbz3A3426SrEEhUiJWbqQFDFCJIQgewK8oTacfN36vvpBmnl10s8uCyFD7rsujCgINFDnTl+bex+59UUMtP+vQr40AYkBIFUExKFbFl5gzqLKacqCuCAQ6pveEGZqNQe8VKFhEQhiwwuA66RXVj93JAzCRxTSwJmqWBzX5aJu0VVExILWZ4vCwQuVvY6M9EDfZNERAmABao1vKP6iWpREdWJkFjUUgHfMhjopD79Vb9TW20YWdlChOPK5JSoRflr1NLjfDVfcr8LUoDwed8c3yCzYFmUIB9BM3U6prQi+UjrkY9s4CnXZGdu0dWkD5CwJZFwxO0sw20JLJCFdPIJfKmFJwD/B4g2wB0X86iqAAAAAElFTkSuQmCC",i3=["title","src"],o3={key:1},s3=B({name:"LogoWidget",inheritAttrs:!1,__name:"index",props:{icon:{default:jc},text:{default:"VTJ"},link:{}},setup(n){const e=n,t=()=>{e.link&&(location.href=e.link)};return(r,i)=>(b(),G("div",{class:"v-logo-widget",onClick:t},[e.icon?(b(),G("img",{key:0,title:e.text,class:"v-logo-widget__icon",src:e.icon},null,8,i3)):(b(),G("span",o3,ne(e.text),1))]))}}),a3={class:"v-empty-widget"},l3=B({name:"EmptyWidget",__name:"index",setup(n){return(e,t)=>(b(),G("div",a3,"EmptyWidget"))}});function kc(){const n=Me(),e=O(()=>n.project.value?.dependencies??[]);return{engine:n,dependencies:e}}function Ot(n,e){const t=O(()=>Ac.getWidgets(d(n),d(e)).filter(i=>!i.invisible)),r=I();return{widgets:t,widgetsRef:r}}function Ec(){const n=Me();return{span:O(()=>{const e=n.skeleton?.skeletonRef.leftWidth||400,t=Math.min(Math.floor((e-50)/120),24);return Math.floor(24/t)}),engine:n}}function u3(){const n=Me(),e=O(()=>n.project.value?.blocks??[]);return{engine:n,blocks:e}}const c3=(n=[])=>n.map(e=>e.name);function d3(){const n=Me(),{components:e,groups:t,componentMap:r}=n.assets,i=Nt({}),o=O(()=>{const p={};return t.value&&t.value.forEach(h=>{p[h.name]=h}),p}),s=O(()=>t.value?t.value.map(p=>({label:`${p.label} (${p.count})`,name:p.name,disabled:!p.children?.length})):[]),a=I(s.value[0]?.name),u=I(""),l=O(()=>o.value[a.value]);ha(()=>{const p=s.value.reduce((h,f)=>(h[f.name]=c3(o.value[f.name].children),h),{});Object.assign(i,p)});const c=O(()=>{const p=u.value.toLowerCase();return!p||!e?[]:e.filter(h=>h.name.toLowerCase().includes(p)||h.label?.toLowerCase().includes(p))});return{components:e,groups:t,componentMap:r,groupMap:o,tabs:s,model:i,currentTab:a,currentGroup:l,searchKey:u,searchResult:c}}function Ie(){const n=Me(),e=O(()=>n.current.value),t=O(()=>n.context.value),r=O(()=>n.isEmptyCurrent.value);return{engine:n,current:e,isEmpty:r,context:t}}function p3(n,e){const t=Me();t.simulator.init(n,e);const r=O(()=>t.simulator.designer.value),i=O(()=>ai("hover",r.value?.hover.value)),o=O(()=>ai("dropping",r.value?.dropping.value)),s=O(()=>ai("selected",r.value?.selected.value));return fe(t.changed,()=>{r.value?.updateRect()}),{designer:r,dropping:o,hover:i,selected:s}}function h3(n,e=!0){const{top:t,height:r,width:i,left:o}=n||{};if(r>100&&i>200)return"inner";let s,a;return a=t>30?"top":"bottom",s=e||o<300&&i<300?"left":"right",[s,a].join("-")}function f3(n){const{rect:e,type:t}=n,{left:r,width:i,top:o,height:s}=e,a={left:r,width:i,top:o,height:s};switch(t){case"left":a.left=0,a.width=0;break;case"right":a.left=a.left+a.width-4,a.width=0;break;case"bottom":a.top=a.top+a.height-4,a.height=0;break;case"top":a.height=0;break}return a}function ai(n,e){if(!e)return null;const{left:t,top:r,width:i,height:o}=n==="dropping"?f3(e):e.rect,s={left:`${t}px`,top:`${r}px`,width:`${i}px`,height:`${o}px`,visibility:i||o?"visible":"hidden"};return{...e,style:s,position:h3(e.rect,n!=="selected")}}function vt(){const n=Me(),e=O(()=>n.simulator.designer.value),t=O(()=>e.value?.selected.value),r=O(()=>Se(t.value?.model));return{engine:n,designer:e,selected:t,isSelectBlock:r}}function m3(n,e){const t=I(""),{selected:r,isSelectBlock:i}=vt(),o=O(()=>r.value?.model.id),s=O(()=>{const u=ci(n),l=ci(e),c=[];if(!u)return c;const p=l?.__contextRefs[o.value||""],h=l===p||i.value?[]:Object.keys(p?.context||{}).filter(E=>!["context","ref"].includes(E)).map(E=>`this.context.${E}`);h.length&&c.push({title:"上下文",items:h});const f=u.inject.map(E=>`this.${E.name}`);f.length&&c.push({title:"注入",items:f});const m=u.props.map(E=>typeof E=="string"?`this.$props.${E}`:`this.$props.${E.name}`);m.length&&c.push({title:"属性",items:m});const v=Object.keys(u.state).map(E=>`this.state.${E}`);v.length&&c.push({title:"状态",items:v});const g=Object.keys(u.computed).map(E=>`this.${E}.value`);g.length&&c.push({title:"计算属性",items:g});const S=Object.keys(u.methods).map(E=>`this.${E}`);S.length&&c.push({title:"方法",items:S});const y=Object.keys(u.dataSources).map(E=>`this.${E}`);y.length&&c.push({title:"数据源",items:y});const w=Object.keys(l?.$refs||{}).map(E=>`this.$refs.${E}`);return w.length&&c.push({title:"refs",items:w}),c}),a=O(()=>{if(!t.value)return s.value;const u=t.value.toLowerCase(),l=[];return s.value.forEach(c=>{const p=c.items.filter(h=>h.toLowerCase().includes(u));p.length&&l.push({title:c.title,items:p})}),l});return{keyword:t,options:s,searchResult:a}}const rr=[{name:"StringSetter",label:"文本"},{name:"ExpressionSetter",label:"表达式"}];function v3(n){const e=Me(),t=O(()=>{const u=n.value?.model||null;return Se(u)?null:u}),r=I();fe(t,async u=>{u?.from?r.value=await e.assets.getBlockMaterial(u.from)||void 0:r.value=void 0},{immediate:!0});const i=O(()=>t.value?[{name:"key",setters:rr,value:t.value.getPropValue("key")},{name:"ref",setters:rr,value:t.value.getPropValue("ref")},{name:"class",label:"class",setters:rr,value:t.value.getPropValue("class")},{name:"children",label:"文本",title:"如设置组件文本,将清空子组件",setters:rr,value:Array.isArray(t.value.children)?"":t.value.children}]:[]),o=O(()=>{if(!t.value)return[];const u=r.value||e.assets.componentMap.get(t.value.name);return u?(u.props||[]).map(l=>({...l,value:t.value?.getPropValue(l.name)??l.defaultValue})):[]}),s=u=>i.value.some(l=>l.name===u)||o.value.some(l=>l.name===u)||u==="style",a=O(()=>t.value?Object.keys(t.value.props).filter(u=>!s(u)).map(u=>({name:u,setters:"InputSetter",value:t.value?.getPropValue(u)})):[]);return{commonProps:i,componentProps:o,customProps:a,node:t,change:(u,l)=>{t.value&&(u==="children"?t.value.setChildren(l):t.value.setProp(u,l))},addCustom:u=>{u&&t.value?.setProp(u,"")},removeCustom:u=>{t.value?.removeProp(u)},isExist:s}}function Ve(n,e="提示"){return zt.warning({title:e,message:n})}async function fn(n){return await Zi.confirm(n,"提示",{type:"warning"}).catch(()=>!1)}function Fe(n,e="success"){return Yi({message:n,type:e})}function Te(n,e,t=!1){let r=!0;try{n.type==="JSExpression"?Ct(n,e,t,!0):Fi(n,e,t,!0)}catch(i){r=!1,zt.error({title:"代码错误",message:i.message})}return r}function $c(){const n=Me(),e=O(()=>n.simulator.designer.value),t=O(()=>n.current.value?n.history.value:null),r=O(()=>t.value?.items.length||0),i=()=>{e.value?.cleanHelper(),t.value?.forward()},o=()=>{t.value?.backward(),e.value?.cleanHelper()},s=l=>{e.value?.cleanHelper(),t.value?.load(l),Fe("已载入历史记录","success")},a=O(()=>r.value<=1?!0:(t.value?.index||-1)<=0),u=O(()=>r.value<=1?!0:(t.value?.index||-1)>=r.value-1);return{engine:n,history:t,total:r,forward:i,backward:o,load:s,forwardDisabled:a,backwardDisabled:u}}function Fr(){const n=Me(),e=O(()=>n.project.value);return{engine:n,project:e}}function g3(n){const e=Me(),t=O(()=>{const a=n.value?.model||null;return Se(a)?null:a}),r=I();fe(t,async a=>{a?.from?r.value=await e.assets.getBlockMaterial(a.from)||void 0:r.value=void 0});const i=O(()=>{if(Se(t.value))return[];const a=t.value?.events||{};return e3.map(u=>({name:u,event:a[u]}))}),o=O(()=>{if(Se(t.value))return[];const a=t.value?.events||{};return t3.map(u=>({name:u,event:a[u]}))}),s=O(()=>{if(!t.value||Se(t.value))return[];const a=t.value.events||{};return(r.value?.events||e.assets.componentMap.get(t.value.name)?.events||[]).map(u=>{const l=typeof u=="string"?u:u.name;return{name:l,event:a[l]}})});return{mouseEventList:i,keyboardEventList:o,componentEventList:s}}const y3=(n,e)=>new Yt({name:n,value:void 0,iterator:e}),b3=(n="modelValue")=>new Yt({name:"vModel",value:void 0,arg:n});function w3(n){if(!n)return[];const{props:e=[],events:t=[]}=n;if(e.length&&t.length){const r=t.filter(i=>(typeof i=="string"?i:i.name).startsWith("update:")).map(i=>i=typeof i=="string"?i:i.name);return r.length?e.filter(i=>r.some(o=>o.includes(i.name))):[]}return[]}function _3(n){const e=Me(),t=O(()=>{const p=n.value?.model||null;return Se(p)?null:p}),r=p=>O(()=>t.value&&(t.value.directives||[]).find(h=>h.name===p)||y3(p)),i=()=>O(()=>{if(!t.value)return[];const p=e.assets.componentMap.get(t.value.name||"");return(p?w3(p):[]).map(h=>(t.value?.directives||[]).find(f=>f.name==="vModel"&&f.arg==h.name)||b3(h.name))}),o=r("vIf"),s=r("vShow"),a=r("vBind"),u=r("vFor"),l=i(),c={vIf:o,vShow:s,vBind:a,vFor:u};return{engine:e,node:t,vIf:o,vShow:s,vBind:a,vFor:u,vModels:l,onValueChange:(p,h)=>{const f=c[p];t.value&&(h?(f.value.value=h,t.value.setDirective(f.value)):(f.value.value=void 0,t.value.removeDirective(f.value)))},onForChange:(p,h)=>{if(t.value){if(p==="value"){h?(u.value.value=h,t.value.setDirective(u.value)):t.value.removeDirective(u.value);return}(p==="item"||p==="index")&&(u.value.iterator={...u.value.iterator,[p]:h||void 0},t.value.setDirective(u.value))}},onModelChange:(p,h)=>{if(!t.value)return;const f=parseInt(p),m=l.value[f];m&&(h?(m.value=h,t.value.setDirective(m)):(m.value=void 0,t.value.removeDirective(m)))}}}function x3(){const{engine:n,project:e}=Fr(),t=O(()=>e.value?.apis||[]);return{engine:n,project:e,apis:t}}const S3={class:"v-switcher-widget"},j3={key:1},k3=B({name:"SwitcherWidget",inheritAttrs:!1,__name:"index",emits:["click"],setup(n,{emit:e}){const t=e,{engine:r}=Ie(),i=O(()=>r.project.value?.name),o=O(()=>r.project.value?.currentFile?.title),s=()=>{t("click",r.project.value)};return(a,u)=>(b(),G("div",S3,[x(d($e),{size:"small",round:"",onClick:s},{default:k(()=>[x(d(iu),{class:"v-switcher-widget__back"}),ae("span",null,ne(i.value),1),o.value?(b(),$(d(Cn),{key:0,direction:"vertical"})):z("",!0),o.value?(b(),G("span",j3,ne(o.value),1)):z("",!0)]),_:1})]))}}),E3={class:"v-toolbar-widget"},$3=B({name:"ToolbarWidget",inheritAttrs:!1,__name:"index",props:{preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{forward:r,backward:i,forwardDisabled:o,backwardDisabled:s}=$c(),a=I("pc");return e({mode:a}),(u,l)=>(b(),G("div",E3,[x(d(_a),{size:"small",modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},{default:k(()=>[x(d(or),{label:"pc"},{default:k(()=>[x(d(du))]),_:1}),x(d(or),{label:"mobile"},{default:k(()=>[x(d(pu))]),_:1}),x(d(or),{label:"pad"},{default:k(()=>[x(d(hu))]),_:1})]),_:1},8,["modelValue"]),z("",!0),x(d(Yc),null,{default:k(()=>[x(d($e),{type:"default",size:"small",onClick:d(i),disabled:d(s)||!!t.preview},{default:k(()=>[x(d(vu))]),_:1},8,["onClick","disabled"]),x(d($e),{type:"default",size:"small",onClick:d(r),disabled:d(o)||!!t.preview},{default:k(()=>[x(d(fu))]),_:1},8,["onClick","disabled"])]),_:1})]))}}),V3={class:"v-actions-widget"},C3=ae("span",null,"发布",-1),A3=B({name:"ActionsWidget",inheritAttrs:!1,__name:"index",props:{coder:{type:Boolean,default:!0}},setup(n){const{engine:e,designer:t}=vt(),r=I(!1),i=()=>{e.current.value?(r.value?e.skeleton?.getWidget("Previewer")?.widgetRef.refresh():(t.value?.setSelected(null),e.simulator.refresh()),Fe("刷新完成","success")):Fe("请先打开文件","warning")},o=async()=>{e.current.value?(r.value&&(e.skeleton?.closePreview(),r.value=!1,await ql(1e3)),t.value?.setSelected(e.current.value)):Fe("请先打开文件","warning")},s=()=>{if(e.project.value)if(e.current.value){if(r.value){e.skeleton?.closePreview(),r.value=!1;return}e.skeleton?.openPreview(""),r.value=!0}else Fe("请先打开文件","warning")},a=()=>{const l=e.project.value;l&&(l.currentFile?l.publish(l.currentFile):Fe("请先打开文件","warning"))},u=l=>{const c=e.project.value;c&&(l==="current"?a():c.publish())};return(l,c)=>(b(),G("div",V3,[x(d(ga),{value:0,max:99,hidden:!0},{default:k(()=>[x(d(Le),{mode:"icon",icon:d(yu),background:"hover"},null,8,["icon"])]),_:1}),x(d(Cn),{direction:"vertical"}),x(d($e),{onClick:s,type:r.value?"warning":"default",size:"small",title:"预览"},{default:k(()=>[x(d(uu))]),_:1},8,["type"]),x(d($e),{onClick:i,type:"default",size:"small",title:"刷新"},{default:k(()=>[x(d(mu))]),_:1}),x(d($e),{type:"default",size:"small",title:"页面设置",onClick:o},{default:k(()=>[x(d(bu))]),_:1}),x(d(Cn),{direction:"vertical"}),x(d(Ji),{"split-button":"",type:"primary",size:"small",onClick:a,onCommand:u},{dropdown:k(()=>[x(d(Wi),null,{default:k(()=>[x(d(br),{command:"current"},{default:k(()=>[de("发布页面")]),_:1}),x(d(br),{command:"project"},{default:k(()=>[de("整站发布")]),_:1})]),_:1})]),default:k(()=>[C3]),_:1})]))}}),O3={class:"v-icon-setter"},T3={class:"v-icon-setter__content"},D3={class:"v-icon-setter__list"},Vc=B({name:"IconSetter",__name:"icon",props:{modelValue:{default:""},size:{default:"small"}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=I(!1),o=I(t.modelValue),s=I(""),a=O(()=>Ci[t.modelValue]||t.modelValue),u=O(()=>{const f=Object.entries(Ci);return s.value?f.filter(m=>m[0].toLowerCase().includes(s.value)):f}),l=f=>{o.value=f},c=()=>{r("change",o.value),r("update:modelValue",o.value),i.value=!1},p=()=>{o.value="",r("change",""),r("update:modelValue",""),i.value=!1},h=()=>{i.value=!0};return(f,m)=>(b(),G("div",O3,[x(d(Xe),{size:t.size,readonly:"",placeholder:"请选择图标","model-value":t.modelValue,"suffix-icon":d(md),onFocus:h},{prepend:k(()=>[x(d(Vt),{icon:a.value},null,8,["icon"])]),_:1},8,["size","model-value","suffix-icon"]),i.value?(b(),$(d(Ut),{key:0,title:"图标选择器",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=v=>i.value=v),onSubmit:c},{extra:k(()=>[x(d($e),{size:"default",type:"warning",onClick:p},{default:k(()=>[de(" 清除绑定 ")]),_:1})]),default:k(()=>[ae("div",T3,[x(d(Xe),{size:t.size,"prefix-icon":d(ja),clearable:"",modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=v=>s.value=v),placeholder:"请输入查询关键字"},null,8,["size","prefix-icon","modelValue"]),ae("div",D3,[(b(!0),G(re,null,oe(u.value,v=>(b(),$(d(Vt),{icon:v[1],onClick:g=>l(v[0]),class:be({"is-active":o.value===v[0]})},null,8,["icon","onClick","class"]))),256)),u.value.length===0?(b(),$(d(Ee),{key:0})):z("",!0)])])]),_:1},8,["modelValue"])):z("",!0)]))}}),I3=B({name:"PageForm",__name:"form",props:{item:{},parentId:{}},setup(n){const e=n,{project:t}=Fr(),r=O(()=>e.item?"编辑页面":"新增页面"),i=()=>({dir:!1,name:"",title:"",icon:"",mask:!0,hidden:!1,raw:!1}),o=I(e.item||i()),s=[{label:"页面",value:!1},{label:"目录",value:!0}],a=l=>{o.value&&(o.value.name=xr(l))},u=async l=>t.value?.existPageName(l.name,[l.id])?(Ve("页面名称已存在,请更换"),!1):(e.item?t.value?.updatePage(l):t.value?.createPage(l,e.parentId),!0);return(l,c)=>(b(),$(d(at),{title:r.value,width:"800px",height:"500px","form-props":{tooltipMessage:!1},model:o.value,"submit-method":u},{default:k(()=>[x(d(Q),{name:"dir",label:"类型",editor:"radio",options:s,props:{button:!0,size:"small"},disabled:!!e.item,required:""},null,8,["disabled"]),x(d(Q),{name:"name",label:"名称",required:"",onChange:a,rules:{pattern:d(mt),message:"名称格式不正确"}},null,8,["rules"]),x(d(Q),{name:"title",label:"标题",required:""}),x(d(Q),{name:"icon",label:"菜单图标",editor:"none"},{editor:k(()=>[x(Vc,{modelValue:o.value.icon,"onUpdate:modelValue":c[0]||(c[0]=p=>o.value.icon=p),size:"default"},null,8,["modelValue"])]),_:1}),x(d(Q),{visible:{dir:!1},name:"mask",label:"包含母版",editor:"switch"}),x(d(Q),{name:"hidden",label:"隐藏菜单",editor:"switch"}),x(d(Q),{visible:{dir:!1},disabled:!!e.item,inline:"",name:"raw",label:"源码模式",editor:"switch",tip:"页面是非低代码开发,不能在线编辑"},null,8,["disabled"])]),_:1},8,["title","model"]))}}),ca=B({name:"VIcon",__name:"Icon",props:{icon:{},label:{},active:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=O(()=>({"is-active":t.active,"is-open":t.open})),o=()=>{r("click")};return(s,a)=>(b(),$(d($r),{effect:"dark",placement:"right",content:s.label,"show-after":600},{default:k(()=>[ae("div",{class:be(["v-apps-region__icon",i.value]),onClick:o},[(b(),$(Ue(s.icon)))],2)]),_:1},8,["content"]))}}),he=B({name:"VPanel",__name:"panel",props:{title:{},subtitle:{},plus:{type:Boolean},back:{type:Boolean},remove:{type:Boolean},save:{type:Boolean},header:{type:Boolean,default:!0}},emits:["plus","back","remove","save"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("plus")},o=()=>{r("back")},s=()=>{r("remove")},a=()=>{r("save")},u=O(()=>t.header?{content:t.title,subtitle:t.subtitle,icon:t.back?hd:void 0,onClickBack:t.back?o:void 0}:null);return(l,c)=>(b(),$(d(zr),{class:"v-panel",border:!1,header:u.value,fit:""},rn({actions:k(()=>[t.plus?(b(),$(d(Le),{key:0,size:l.$attrs.size,mode:"icon",icon:d(wo),background:"hover",title:"新增",onClick:i},null,8,["size","icon"])):z("",!0),t.remove?(b(),$(d(Le),{key:1,size:l.$attrs.size,mode:"icon",icon:d(fd),background:"hover",title:"清除",onClick:s},null,8,["size","icon"])):z("",!0),t.save?(b(),$(d(Le),{key:2,size:l.$attrs.size,mode:"icon",icon:d(cu),background:"hover",title:"保存",onClick:a},null,8,["size","icon"])):z("",!0),se(l.$slots,"actions")]),default:k(()=>[se(l.$slots,"default")]),_:2},[l.$slots.footer?{name:"footer",fn:k(()=>[se(l.$slots,"footer")]),key:"0"}:void 0]),1032,["header"]))}}),B3={class:"v-tabs__header"},R3={key:0,class:"v-tabs__actions"},Lr=B({__name:"tabs",props:{items:{default:()=>[]},menus:{},modelValue:{},stretch:{type:Boolean},checkable:{type:Boolean}},emits:["update:modelValue","command","remove"],setup(n,{emit:e}){const t=n,r=e,i=I((t.modelValue||t.items[0]?.name)??"");fe(i,()=>{r("update:modelValue",i.value)}),fe(()=>t.modelValue,a=>{i.value=a});const o=a=>{r("command",a)},s=a=>{r("remove",a)};return(a,u)=>(b(),$(d(zr),{class:"v-tabs",border:!1,fit:"",radius:!1},{header:k(()=>[ae("div",B3,[x(d(pc),{class:"v-tabs__tabs",items:t.items,type:"card",modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=l=>i.value=l),onTabRemove:s,stretch:t.stretch},null,8,["items","modelValue","stretch"]),t.menus&&t.menus.length?(b(),G("div",R3,[t.menus&&t.menus.length?(b(),$(d(Le),{key:0,mode:"icon",size:"small",icon:d(Xi),background:"hover",dropdown:{size:"small",placement:"bottom-end"},menus:t.menus,onCommand:o},{item:k(({item:l})=>[ae("span",null,[t.checkable?(b(),$(d(mo),{key:0,class:be({"v-tabs__checked":!0,"is-checked":l.checked})},null,8,["class"])):z("",!0),de(" "+ne(l.label),1)])]),_:1},8,["icon","menus"])):z("",!0)])):z("",!0)])]),default:k(()=>[se(a.$slots,"default")]),_:3}))}}),M3={key:2,class:"v-item__index"},P3={class:"v-item__content"},N3={key:3,class:"v-item__subtitle"},Oe=B({name:"VItem",__name:"item",props:{icon:{},index:{},tag:{},tagType:{},title:{},subtitle:{},actions:{default:()=>[]},background:{type:Boolean},border:{type:Boolean},switch:{type:Boolean},modelValue:{},active:{type:Boolean},hover:{type:Boolean},small:{type:Boolean}},emits:["click","action","update:modelValue","switch"],setup(n,{emit:e}){const t={add:{label:"创建",icon:wo},copy:{label:"复制",icon:vo},edit:{label:"编辑",icon:bo},remove:{label:"删除",icon:zn},lock:{label:"锁定",icon:go},unlock:{label:"解锁",icon:lu},invisible:{label:"隐藏",icon:_o},visible:{label:"显示",icon:Eu},home:{label:"主页",icon:ou}},r=n,i=e,o=I(!!r.modelValue),s=O(()=>r.actions.map(c=>{const p=t[c];return{name:c,...p}})),a=O(()=>({"is-background":r.background,"is-border":r.border,"is-active":r.active,"is-hover":r.hover,"is-small":r.small})),u=()=>{i("click",r.modelValue)},l=async c=>{c==="remove"?await Zi.confirm("确定删除吗?","提示",{type:"warning"}).catch(()=>!1)&&i("action",{name:c,modelValue:r.modelValue}):i("action",{name:c,modelValue:r.modelValue})};return fe(o,c=>{i("update:modelValue",c),i("switch",c)}),fe(()=>r.modelValue,c=>{o.value=!!c}),(c,p)=>(b(),$(d(ue),{class:be(["v-item",a.value]),justify:"space-between",align:"center",onClick:u},{default:k(()=>[x(d(ue),{class:"v-item__title",align:"center"},{default:k(()=>[se(c.$slots,"default",{},()=>[c.icon?(b(),$(d(Vt),{key:0,icon:c.icon},null,8,["icon"])):z("",!0),r.tag?(b(),$(d(sd),{key:1,class:"v-item__tag",size:"small",type:r.tagType},{default:k(()=>[de(ne(r.tag),1)]),_:1},8,["type"])):z("",!0),c.index!==void 0?(b(),G("span",M3," # "+ne(c.index),1)):z("",!0),ae("span",P3,ne(c.title),1),c.subtitle?(b(),G("span",N3,ne(c.subtitle),1)):z("",!0)])]),_:3}),x(d(ue),{class:"v-item__actions",onClick:p[1]||(p[1]=Qt(()=>{},["stop"]))},{default:k(()=>[(b(!0),G(re,null,oe(s.value,h=>(b(),$(d(Le),{name:h.name,title:h.label,mode:"icon",size:"small",background:"none",type:"info",icon:h.icon,onClick:f=>l(h.name)},null,8,["name","title","icon","onClick"]))),256)),r.switch?(b(),$(d(Ki),{key:0,modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=h=>o.value=h),class:"v-item__switch",size:"small"},null,8,["modelValue"])):z("",!0),se(c.$slots,"status")]),_:3})]),_:3},8,["class"]))}}),z3=["draggable"],F3={class:"v-box__name"},L3={class:"v-box__label"},Li=B({name:"VBox",__name:"box",props:{name:{},title:{},editable:{type:Boolean},active:{type:Boolean},draggable:{type:Boolean}},emits:["edit","remove","dragstart","dragend"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("edit")},o=async()=>{await Zi.confirm("确认删除?","提示",{type:"warning"}).catch(()=>!1)&&r("remove")},s=O(()=>({"is-active":t.active,"is-draggable":t.draggable})),a=()=>{r("dragstart",t)},u=()=>{r("dragend",t)};return(l,c)=>(b(),G("div",{class:be(["v-box",s.value]),draggable:l.draggable,onDragstart:a,onDragend:u},[x(d(ue),{direction:"column",justify:"center",align:"center"},{default:k(()=>[ae("span",F3,ne(t.name),1),ae("span",L3,ne(t.title),1)]),_:1}),t.editable?(b(),$(d(ue),{key:0,class:"v-box__footer",justify:"flex-end",align:"center"},{default:k(()=>[x(d(Vt),{icon:d(bo),onClick:i},null,8,["icon"]),x(d(Vt),{icon:d(zn),onClick:o},null,8,["icon"])]),_:1})):z("",!0)],42,z3))}}),H3={class:"v-context-viewer"},U3=B({__name:"viewer",props:{context:{}},emits:["pick","copy"],setup(n,{emit:e}){const t=n,r=e,i=["$provider","$apis","$components","context"],o=c=>{const p=c.value,h=Xr(p);return h==="Object"||h==="Module"?Object.keys(p||{}).length===0:h==="Array"?p.length===0:!0},s=(c,p="this")=>typeof c=="object"?Array.isArray(c)?c.map((h,f)=>{const m=`[${f}]`;return{label:m,value:h,type:Xr(h),path:`${p}${m}`}}):Object.entries(c).map(([h,f])=>({label:h,value:f,type:Xr(f),path:`${p}.${h}`})).filter(h=>!h.label.startsWith("__")&&!i.includes(h.label)):[],a=(c,p)=>{if(c.level===0)p(s(t.context));else{const h=Zt(c.data.value);p(s(h,c.data.path))}},u=c=>{r("copy",c.path)},l=c=>{r("pick",c.path)};return(c,p)=>(b(),G("div",H3,[c.context?(b(),$(d(Gi),{key:0,lazy:"",load:a,"expand-on-click-node":!1,props:{isLeaf:o}},{default:k(({data:h})=>[x(Oe,{title:h.label,clickable:"",onClick:f=>l(h),background:"",actions:["copy"],onAction:f=>u(h),grow:"",small:""},null,8,["title","onClick","onAction"])]),_:1},8,["props"])):z("",!0)]))}}),Oo=B({__name:"binder",props:{title:{},context:{},block:{},model:{},rules:{},modelValue:{type:Boolean},submitMethod:{type:Function},unbindEnabled:{type:Boolean}},emits:["unbind","submit","cancel","pick","update:modelValue","close"],setup(n,{emit:e}){const t=n,r=e,{searchResult:i,keyword:o}=m3(t.block,t.context),{copy:s}=bd({}),a=[{name:"normal",label:"常用"},{name:"viewer",label:"高级"}],u=I("normal"),l=I(),c=async S=>{r("submit",S),t.submitMethod?await t.submitMethod(S)&&p():p()},p=()=>{r("update:modelValue",!1),r("close")},h=()=>{r("unbind")},f=()=>{p()},m=async()=>{l.value?.submit()},v=S=>{r("pick",S)},g=S=>{s(S),Yi.success({message:"已经复制到粘贴板"})};return(S,y)=>(b(),$(d(Ut),{"model-value":t.modelValue,class:"v-binder",title:S.title,width:"1000px",height:"600px","body-padding":!1,maximizable:!1,minimizable:!1,onClose:p},{default:k(()=>[x(d(ue),{fit:"",direction:"row",overflow:"hidden"},{default:k(()=>[x(d(ue),{width:"30%",height:"100%"},{default:k(()=>[x(Lr,{class:"v-binder__tabs",items:a,modelValue:u.value,"onUpdate:modelValue":y[1]||(y[1]=w=>u.value=w)},{default:k(()=>[x(d(ue),{class:"v-binder__tab-content",fit:"",padding:"",flex:!1},{default:k(()=>[Xt(ae("div",null,[x(d(Xe),{modelValue:d(o),"onUpdate:modelValue":y[0]||(y[0]=w=>ui(o)?o.value=w:null),size:"small",clearable:"","prefix-icon":d(ja),placeholder:"筛选可用项"},null,8,["modelValue","prefix-icon"]),(b(!0),G(re,null,oe(d(i),w=>(b(),G("div",null,[x(d(Cn),{"border-style":"dotted"},{default:k(()=>[de(ne(w.title),1)]),_:2},1024),(b(!0),G(re,null,oe(w.items,E=>(b(),$(Oe,{title:E,background:"",actions:["copy"],small:"",onClick:j=>v(E),onAction:j=>g(E)},null,8,["title","onClick","onAction"]))),256))]))),256)),d(i).length?z("",!0):(b(),$(d(Ee),{key:0}))],512),[[yr,u.value==="normal"]]),Xt(x(U3,{context:t.context,onCopy:g,onPick:v},null,8,["context"]),[[yr,u.value==="viewer"]])]),_:1})]),_:1},8,["modelValue"])]),_:1}),x(d(zr),{grow:"",header:null,border:!1},{footer:k(()=>[x(d(ue),{justify:"space-between"},{default:k(()=>[x(d(ue),null,{default:k(()=>[S.unbindEnabled?(b(),$(d($e),{key:0,type:"warning",size:"default",onClick:h},{default:k(()=>[de(" 移除绑定 ")]),_:1})):z("",!0)]),_:1}),x(d(ue),null,{default:k(()=>[x(d($e),{type:"default",size:"default",onClick:f},{default:k(()=>[de(" 取消 ")]),_:1}),x(d($e),{type:"primary",size:"default",onClick:m},{default:k(()=>[de(" 确定 ")]),_:1})]),_:1})]),_:1})]),default:k(()=>[x(d(dc),{ref_key:"formRef",ref:l,class:"v-binder__form",footer:!1,"label-position":"top","tooltip-message":!1,model:t.model,rules:t.rules,"submit-method":c},{default:k(()=>[se(S.$slots,"default")]),_:3},8,["model","rules"])]),_:3})]),_:3})]),_:3},8,["model-value","title"]))}}),q3={class:"v-slots-picker__sn"},W3=B({__name:"slots",props:{slots:{default:()=>[]}},emits:["submit","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=I(),o=O(()=>`${50*Math.ceil(t.slots.length/4)+180}px`),s=u=>{i.value=u},a=()=>{i.value?(r("submit",i.value),r("update:modelValue",!1)):Ve("请选择插槽")};return(u,l)=>(b(),$(d(Ut),ye({class:"v-slots-picker",title:"选择插槽",width:"600px",height:o.value,submit:"",cancel:"",onSubmit:a},u.$attrs),{default:k(()=>[x(d(ud),{title:"该组件支持多个插槽,请选择放置到其中一个",type:"warning",closable:!1}),x(d(ue),{class:"v-slots-picker__content",justify:"space-around",alignContent:"flex-start",gap:"",wrap:"wrap"},{default:k(()=>[(b(!0),G(re,null,oe(t.slots,(c,p)=>(b(),$(d(ue),{class:be(["v-slots-picker__item",{"is-active":c.name===i.value?.name}]),grow:"",flex:!1,onClick:h=>s(c)},{default:k(()=>[ae("span",q3,"#"+ne(p+1),1),de(" "+ne(c.name),1)]),_:2},1032,["class","onClick"]))),256))]),_:1})]),_:1},16,["height"]))}}),Cc=B({name:"Viewport",__name:"viewport",props:{mode:{default:"pc"},width:{},height:{}},setup(n){const e=n,t=O(()=>[`is-${e.mode}`]),r=O(()=>{if(e.mode==="pc")return 1;const o=e.mode==="mobile"?la:ua,{width:s,height:a}=o,u=s>0?(e.width||0)/s:1,l=a>0?(e.height||0)/a:1;return Math.min(u,l)}),i=O(()=>{if(e.mode==="pc")return{};const o=e.mode==="mobile"?la:ua,{width:s,height:a}=o;return{width:`${s}px`,height:`${a}px`,left:"50%",top:"50%",transform:`translate(-50%, -50%) scale(${r.value})`}});return(o,s)=>(b(),G("div",{class:be(["v-viewport",t.value]),style:kt(i.value)},[se(o.$slots,"default")],6))}}),J3=B({name:"PagesWidget",__name:"index",setup(n){const{project:e,engine:t}=Fr(),r=O(()=>e.value?.pages||[]),{current:i}=Ie(),o=I(!1),s=I(),a=I(),u=()=>{a.value=void 0,s.value=void 0,o.value=!0},l=async f=>{const{name:m,modelValue:v}=f,{data:g,node:S}=v;if(m==="add"&&(s.value=void 0,a.value=g.id,o.value=!0),m==="edit"&&(s.value=Nn(g),a.value=void 0,o.value=!0),m==="remove"){if(g.dir){const y=e.value?.getPage(g.id);if(y&&y.children?.length){Ve("请先删除子页面");return}}e.value?.removePage(g.id)}if(m==="copy"){const y=S.parent?.data.id;e.value?.clonePage(g,y)}m==="home"&&(e.value?.setHomepage(g.id),Fe("设置主页成功","success"))},c=async f=>{f.raw&&Fe("这是源码模式页面,不能低代码设计","warning"),f.dir||f.raw?t.project.value?.deactivate():t.project.value?.active(f)},p=(f,m,v)=>v==="inner"?!!m.data.dir:!0,h=()=>{e.value?.update({pages:ci(r)})};return(f,m)=>(b(),$(d(he),{class:"v-pages-widget",title:"页面管理",plus:"",subtitle:"(共 0 条)",onPlus:u},{default:k(()=>[x(d(Gi),{data:r.value,"node-key":"id","default-expand-all":"",draggable:"","allow-drop":p,onNodeDrop:h},{default:k(({data:v,node:g})=>[x(d(Oe),{class:"v-pages-widget__item",icon:d(Ci)[v.icon],title:v.title,subtitle:v.name,"model-value":{data:v,node:g},actions:v.dir?["add","edit","remove"]:v.raw?["home","edit","remove"]:["home","copy","edit","remove"],onAction:l,onClick:S=>c(v),active:d(i)?.id===v.id,tag:d(e)?.homepage===v.id?"主页":void 0,"tag-type":"success",grow:"",small:"",background:"",hover:""},null,8,["icon","title","subtitle","model-value","actions","onClick","active","tag"])]),_:1},8,["data"]),o.value?(b(),$(I3,{key:0,modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=v=>o.value=v),item:s.value,"parent-id":a.value},null,8,["modelValue","item","parent-id"])):z("",!0)]),_:1}))}}),K3=B({name:"BlocksWidget",__name:"index",setup(n){const{span:e}=Ec(),{blocks:t,engine:r}=u3(),i=I(void 0),{current:o}=Ie(),s=I(!1),a=O(()=>i.value?.id?"编辑":"新增"),u=O(()=>`(共 ${t.value.length} 个)`),l=()=>({name:"",title:"",type:"block"}),c=async y=>{const w=y,E=r.project.value;if(!E)return!1;if(y.id)if(!E.existBlockName(w.name,[w.id]))E.updateBlock(w);else return Ve(`名称【${w.name}】已经存在,请更换名称`),!1;else if(!E.existBlockName(w.name))E.createBlock(w);else return Ve(`名称【${w.name}】已经存在,请更换名称`),!1;return!0},p=()=>{i.value=l(),s.value=!0},h=y=>{i.value=Nn(y),s.value=!0},f=y=>{r.project.value?.removeBlock(y.id)},m=y=>{i.value&&(i.value.name=xr(y))},v=async y=>{r.project.value?.active(y)},g=async y=>{const w={type:"Schema",id:y.id},E=await r.assets.getBlockMaterial(w),j=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;j&&E&&j.setDragging(E)},S=()=>{const y=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;y&&y.setDragging(null)};return(y,w)=>(b(),$(d(he),{class:"v-blocks-widget",title:"区块管理",subtitle:u.value,plus:"",onPlus:p},{default:k(()=>[x(d(pi),{wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(d(t),E=>(b(),$(d(di),{key:E.id,span:d(e)},{default:k(()=>[x(d(Li),{name:E.name,title:E.title,active:d(o)?.id===E.id,editable:"",onEdit:j=>h(E),onRemove:j=>f(E),onClick:j=>v(E),draggable:d(o)?.id!==E.id,onDragstart:j=>g(E),onDragend:S},null,8,["name","title","active","onEdit","onRemove","onClick","draggable","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(t).length?z("",!0):(b(),$(d(Ee),{key:0})),x(d(at),{modelValue:s.value,"onUpdate:modelValue":w[0]||(w[0]=E=>s.value=E),title:a.value,model:i.value,width:"600px",height:"250px","form-props":{tooltipMessage:!1},"submit-method":c},{default:k(()=>[x(d(Q),{name:"name",label:"名称",required:"",tip:"名称为英文驼峰格式",rules:{message:"名称格式错误",pattern:d(mt)},onChange:m},null,8,["rules"]),x(d(Q),{name:"title",label:"标题",required:""})]),_:1},8,["modelValue","title","model"])]),_:1},8,["subtitle"]))}}),G3={class:"v-components-widget__search"},Y3={key:0,class:"v-components-widget__result"},Z3={class:"v-components-widget__list"},X3=B({name:"ComponentsWidget",__name:"index",setup(n){const{span:e,engine:t}=Ec(),{tabs:r,currentTab:i,currentGroup:o,model:s,searchKey:a,searchResult:u}=d3(),l=p=>{const h=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;h&&h.setDragging(p)},c=()=>{const p=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;p&&p.setDragging(null)};return(p,h)=>(b(),$(d(he),{class:"v-components-widget",title:"组件库",body:{flex:!0,direction:"column"}},{default:k(()=>[ae("div",G3,[x(d(Xe),{modelValue:d(a),"onUpdate:modelValue":h[0]||(h[0]=f=>ui(a)?a.value=f:null),placeholder:"搜索组件",clearable:"",size:"small"},{prefix:k(()=>[x(d(Cu))]),_:1},8,["modelValue"])]),d(a)?(b(),G("div",Y3,[x(d(pi),{wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(d(u),f=>(b(),$(d(di),{span:d(e),key:f.name},{default:k(()=>[x(d(Li),{name:f.name,title:f.label||f.name,draggable:"",onDragstart:m=>l(f),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(u).length?z("",!0):(b(),$(d(Ee),{key:0}))])):(b(),$(d(pc),{key:1,items:d(r),modelValue:d(i),"onUpdate:modelValue":h[2]||(h[2]=f=>ui(i)?i.value=f:null)},{default:k(()=>[ae("div",Z3,[d(o)?(b(),$(d(Zc),{key:0,modelValue:d(s)[d(i)],"onUpdate:modelValue":h[1]||(h[1]=f=>d(s)[d(i)]=f)},{default:k(()=>[(b(!0),G(re,null,oe(d(o).children,f=>(b(),$(d(Xc),{key:f.name,name:f.name,title:`${f.label} (${f.count})`},{default:k(()=>[f.components?(b(),$(d(pi),{key:0,wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(f.components,m=>(b(),$(d(di),{span:d(e),key:m.name},{default:k(()=>[x(d(Li),{name:m.name,title:m.label||m.name,draggable:"",onDragstart:v=>l(m),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:2},1024)):z("",!0)]),_:2},1032,["name","title"]))),128))]),_:1},8,["modelValue"])):z("",!0)])]),_:1},8,["items","modelValue"]))]),_:1}))}}),Q3=B({name:"OutlineWidget",__name:"index",setup(n){const{engine:e,designer:t,selected:r}=vt(),{current:i}=Ie(),o=I([]),s=j=>{if(Se(j))return j.locked?["unlock"]:["lock"];const _=j.parent;return _&&(_.locked||_.invisible)?[]:i.value?.locked?[]:j.locked?["unlock"]:j.invisible?["visible"]:["lock","invisible","copy","remove"]},a=j=>{const _=[];return j.forEach(V=>{const D={id:V.id,label:V.name,type:V.id,model:V};Array.isArray(V.children)&&(D.children=a(V.children)),_.push(D)}),_},u=()=>{if(!i.value)return[];const{id:j,name:_,nodes:V}=i.value;return[{id:j,label:_,type:j,model:i.value,children:a(V)}]},l=async()=>{o.value=u(),r.value?.model&&(await ct(),t.value?.setSelected(r.value.model))},c=O(()=>r.value?.model.id),p=j=>{const _=j.data;if(Se(_.model)||_.model.locked||_.model.name==="template")return!1;const V=e.assets.componentMap.get(_.model.name);return V?(t.value?.setDragging(V),!0):!1},h=async(j,_,V)=>{const D=_.data,Y={prev:"top",next:"bottom",inner:"inner"}[V];let C=!1;if(Se(D.model))C=V==="inner",t.value?.setDropping(C?D.model:null,"inner");else{const A=D.model;C=!!await t.value?.allowDrop(A,Y),t.value?.setDropping(C?A:null,"inner")}return C},f=j=>{const _=j?.model;!_||_.invisible||(t.value?.setSelected(_),t.value?.setHover(null))},m=async(j,_,V)=>{const D=j.data,Y=_.data;if(Se(Y.model)){t.value?.setDropping(null),t.value?.setDragging(null);return}const C=Y.model,A={before:"left",after:"right"}[V]||"inner";if(!await t.value?.allowDrop(C,A)){t.value?.setDropping(null),l(),Yi.warning({message:`${D.model.name}不能放置到该位置`}),t.value?.setDragging(null);return}const P=await t.value?.getDropSlot(V==="inner"?C:C.parent);if(P!==null){const T=D.model;T.slot=P,i.value?.move(T,C,A)}else l();t.value?.setDropping(null),t.value?.setDragging(null),e.simulator.refresh()},v=j=>{Se(j.model)?t.value?.setHover(j.model):(t.value?.setHover(j.model),j.model.invisible&&t.value?.setHover(null),j.model.name==="slot"&&t.value?.setHover(null))},g=()=>{t.value?.setHover(null)},S=j=>{const _=j.data;_.dragging=!0;const V=e.assets.componentMap.get(_.model.name);V&&t.value?.setDragging(V)},y=async j=>{const _=j.data;_.dragging=!1},w=(j,_)=>{j&&((j.id===_.id||!Se(j)&&_.isChild(j))&&t.value?.setSelected(null),t.value?.setHover(null))},E=j=>{const{name:_,modelValue:V}=j,D=r.value?.model;switch(_){case"lock":w(D,V),V.lock();break;case"unlock":w(D,V),V.unlock();break;case"invisible":w(D,V),V.setVisible(!1);break;case"visible":V.setVisible(!0);break;case"copy":const Y=i.value?.cloneNode(V);Y&&t.value?.setSelected(Y);break;case"remove":w(D,V),i.value?.removeNode(V);break}};return fe(e.changed,l,{immediate:!0}),(j,_)=>(b(),$(d(he),{class:"v-outline-widget",title:"大纲树"},{default:k(()=>[(b(),$(d(Gi),{key:d(e).changed.value,data:o.value,"node-key":"id","default-expand-all":"",draggable:"","empty-text":"请新建或打开文件","current-node-key":c.value,"highlight-current":!0,"expand-on-click-node":!1,"allow-drop":h,"allow-drag":p,onCurrentChange:f,onNodeDrop:m,onNodeDragStart:S,onNodeDragEnd:y},{default:k(({data:V,node:D})=>[x(d(Oe),{class:be(["v-outline-widget__item",{"is-locked":V.model.locked,"is-invisible":V.model.invisible,"is-dragging":V.dragging}]),active:!V.model.invisible&&D.isCurrent,grow:"",small:"",background:"",hover:"","model-value":V.model,icon:V.model.locked?d(go):V.model.invisible?d(_o):void 0,title:V.label,subtitle:V.type,actions:s(V.model),onAction:E,onMouseenter:Y=>v(V),onMouseleave:g},null,8,["class","active","model-value","icon","title","subtitle","actions","onMouseenter"])]),_:1},8,["data","current-node-key"]))]),_:1}))}}),ew=B({name:"HistoryWidget",__name:"index",setup(n){const{history:e,load:t,total:r}=$c(),i=O(()=>`(共 ${r.value} 条)`),o=a=>{a.name==="remove"&&e.value?.remove(a.modelValue.id)},s=async()=>{await fn("确定要清空历史记录吗?")&&e.value?.clear()};return(a,u)=>(b(),$(d(he),{class:"v-history-widget",title:"历史记录",subtitle:i.value,remove:!!d(r),onRemove:s},{default:k(()=>[d(r)===0?(b(),$(d(Ee),{key:0,"image-size":50})):z("",!0),d(e)?(b(!0),G(re,{key:1},oe(d(e).items,(l,c)=>(b(),$(d(Oe),{index:c+1,title:l.label,"model-value":l,active:c==d(e).index,small:"",background:"",actions:["remove"],onAction:o,onClick:p=>d(t)(l.id)},null,8,["index","title","model-value","active","onClick"]))),256)):z("",!0)]),_:1},8,["subtitle","remove"]))}}),ke=Mc({loader:()=>Tc(()=>import("./Editor-ctkAn2cu-O6Vp28_y.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),loadingComponent:B({render(){return Ae("div","正在拼命加载...")}}),errorComponent:B({render(){return Ae("div","组件加载失败!")}})}),tw=B({name:"ApisWidget",__name:"index",setup(n){const e=I(!1),t=I(null),r=I(!1),i=O(()=>r.value?"编辑API":"新增API"),o=O(()=>s.value?.apis||[]),{project:s}=Fr(),a=()=>({method:"get",name:"",label:"",url:"",settings:{loading:!0,failMessage:!0,validSuccess:!0,originResponse:!1,injectHeaders:!1,type:"form",headers:{type:"JSExpression",value:"({})"}}}),u=()=>{e.value=!0,r.value=!1,t.value=a()},l=n3.map(g=>({label:g,value:g.toLowerCase()})),c={get:"success",post:"primary",put:"warning",delete:"danger",patch:"warning",jsonp:"info"},p=[{label:"表单",value:"form"},{label:"JSON",value:"json"},{label:"文件",value:"data"}],h=(g,S,y)=>{Te({type:"JSExpression",value:S},window)?y():y(new Error("代码错误"))},f=g=>{g.name==="edit"&&m(g.modelValue),g.name==="remove"&&s.value?.removeApi(g.modelValue.name)},m=g=>{r.value=!0,t.value=Nn(g),e.value=!0},v=async g=>s.value?.existApiName(g.name,r.value?[g.id]:[])?(Ve(`API名称 [ ${g.name} ] 已存在`),!1):(s.value?.setApi(g),!0);return(g,S)=>(b(),$(d(he),{class:"v-apis-widget",title:"API管理",plus:"",onPlus:u},{default:k(()=>[(b(!0),G(re,null,oe(o.value,y=>(b(),$(d(Oe),{key:y.id,small:"",title:y.name,subtitle:y.label,"model-value":y,tag:y.method?.toUpperCase(),"tag-type":c[y.method||"get"],background:"",actions:["edit","remove"],onClick:w=>m(y),onAction:f},null,8,["title","subtitle","model-value","tag","tag-type","onClick"]))),128)),o.value.length===0?(b(),$(d(Ee),{key:0,"image-size":50})):z("",!0),x(d(at),{modelValue:e.value,"onUpdate:modelValue":S[1]||(S[1]=y=>e.value=y),model:t.value,title:i.value,width:"1000px",height:"600px","form-props":{labelPosition:"top",tooltipMessage:!1,size:"default"},"submit-method":v},{default:k(()=>[x(d(ue),{gap:"",fit:""},{default:k(()=>[x(d(ue),{direction:"column",grow:"",width:"50%",shrink:""},{default:k(()=>[x(d(Q),{name:"method",label:"请求类型",required:"",editor:"radio",options:d(l),props:{button:!0}},null,8,["options"]),x(d(Q),{name:"name",label:"接口名称",required:"",rules:{pattern:d(mt),message:"名称格式不正确"}},null,8,["rules"]),x(d(Q),{name:"label",label:"备注说明",required:""}),x(d(Q),{name:"url",label:"接口URL",required:""})]),_:1}),x(d(ue),{direction:"column",grow:"",width:"50%",shrink:""},{default:k(()=>[t.value.method!=="jsonp"?(b(),$(d(he),{key:0,title:"请求配置",subtitle:t.value.method,border:""},{default:k(()=>[x(d(ue),{justify:"space-around"},{default:k(()=>[x(d(Q),{name:"settings.loading",size:"small",label:"加载提示",editor:"switch"}),x(d(Q),{size:"small",name:"settings.failMessage",label:"失败提示",editor:"switch"}),x(d(Q),{size:"small",name:"settings.validSuccess",label:"校验成功",editor:"switch"}),x(d(Q),{size:"small",name:"settings.originResponse",label:"原始响应",editor:"switch"}),x(d(Q),{size:"small",name:"settings.injectHeaders",label:"注入请求头",editor:"switch"})]),_:1}),x(d(Q),{size:"small",name:"settings.type",label:"发送数据类型",editor:"radio",options:p,props:{button:!0}}),x(d(Q),{size:"small",name:"settings.headers.value",label:"请求头配置",tip:"支持 JSExpression 或 JSFunction",rules:{validator:h}},{editor:k(()=>[x(d(ke),{modelValue:t.value.settings.headers.value,"onUpdate:modelValue":S[0]||(S[0]=y=>t.value.settings.headers.value=y),dark:"",height:"200px"},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["subtitle"])):z("",!0),t.value.method==="jsonp"?(b(),$(d(he),{key:1,title:"请求配置",subtitle:t.value.method,border:""},{default:k(()=>[x(d(Q),{name:"jsonpOptions.jsonpCallback",size:"small",label:"jsonpCallback"}),x(d(Q),{name:"jsonpOptions.jsonpCallbackFunction",size:"small",label:"jsonpCallbackFunction"}),x(d(Q),{name:"jsonpOptions.timeout",size:"small",label:"timeout",editor:"number"}),x(d(Q),{name:"jsonpOptions.crossorigin",size:"small",label:"crossorigin",editor:"switch"})]),_:1},8,["subtitle"])):z("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue","model","title"])]),_:1}))}}),nw=B({name:"DepsWidget",__name:"index",setup(n){const{dependencies:e,engine:t}=kc(),r=I(!1),i=I(!1),o=I({}),s=O(()=>i.value?"查看依赖":o.value?"编辑依赖":"新增依赖"),a=m=>m.required||m.official?[]:["edit","remove"],u=m=>m.official&&!m.required,l=async m=>(m.urls=m.urls.split(`
|
|
82
82
|
`),t.project.value?.setDeps(m),!0),c=m=>{t.project.value?.setDeps(m)},p=()=>{i.value=!1,r.value=!0,o.value=null},h=m=>{i.value=!0,o.value={...m,urls:m.urls.join(`
|
|
83
83
|
`)},r.value=!0},f=(m,v)=>{v.name==="edit"&&(o.value={...m,urls:m.urls.join(`
|
|
84
84
|
`)},i.value=!1,r.value=!0),v.name==="remove"&&t.project.value?.removeDeps(m)};return(m,v)=>(b(),$(d(he),{class:"v-deps-widget",title:"依赖管理",plus:"",onPlus:p},{default:k(()=>[(b(!0),G(re,null,oe(d(e),g=>(b(),$(d(Oe),{key:g.package,title:g.package,subtitle:g.version,actions:a(g),background:"",switch:u(g),modelValue:g.enabled,"onUpdate:modelValue":S=>g.enabled=S,onSwitch:S=>c(g),onClick:S=>h(g),onAction:S=>f(g,S)},null,8,["title","subtitle","actions","switch","modelValue","onUpdate:modelValue","onSwitch","onClick","onAction"]))),128)),x(d(at),{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=g=>r.value=g),width:"600px",height:"500px",title:s.value,model:o.value,submitMethod:l,formProps:{disabled:i.value,tooltipMessage:!1}},{default:k(()=>[x(d(Q),{name:"package",label:"包名",required:"",disabled:!!o.value},null,8,["disabled"]),x(d(Q),{name:"version",label:"版本",required:""}),x(d(Q),{name:"library",label:"导出名称",required:""}),x(d(Q),{name:"urls",label:"资源文件",editor:"textarea",props:{rows:3},tip:"多个资源可以换行输入",required:""}),x(d(Q),{name:"assetsUrl",label:"物料URL"}),x(d(Q),{name:"assetsLibrary",label:"物料名称"})]),_:1},8,["modelValue","title","model","formProps"])]),_:1}))}}),rw=B({__name:"actions",props:{position:{},model:{},path:{default:()=>[]}},emits:["action"],setup(n,{emit:e}){const t=n,r=e,i=O(()=>t.model.name),o=O(()=>!Se(t.model)&&!t.model.locked),s=O(()=>t.path.map(c=>({command:c,label:c.name,onMouseenter:()=>{r("action",{type:"hover",model:c})}}))),a=[{name:"prev",icon:_u,title:"向前移动"},{name:"next",icon:wu,title:"向后移动"},{name:"copy",icon:vo,title:"复制"},{name:"remove",icon:zn,title:"删除"}],u=c=>{r("action",{type:"selected",model:c.command})},l=async c=>{c.name==="remove"?await fn("确定删除?")&&r("action",{type:c.name,model:t.model}):r("action",{type:c.name,model:t.model})};return(c,p)=>(b(),G("div",{class:be(["v-actions",[`is-${t.position}`]])},[x(d(Le),{mode:"icon",size:"small",icon:d(yo),label:i.value,menus:s.value,background:"none",onCommand:u},null,8,["icon","label","menus"]),x(d(Ob),{disabled:!o.value,mode:"icon",size:"small",items:a,background:"none",onClick:l},null,8,["disabled"])],2))}}),iw={key:1,class:"v-designer__placeholder"},ow=B({name:"VDesigner",inheritAttrs:!1,__name:"index",setup(n,{expose:e}){const t=I(),r=I(),{width:i,height:o}=Qi(t),{dependencies:s,engine:a}=kc(),{current:u,isEmpty:l}=Ie(),c=O(()=>a.skeleton?.getWidget("Toolbar")?.widgetRef.mode??"pc"),{designer:p,hover:h,dropping:f,selected:m}=p3(r,s),v=g=>{const S=g.type,y=g.model;if(u.value)switch(S){case"remove":u.value.removeNode(y),p.value?.setSelected(null);break;case"copy":const w=u.value.cloneNode(y);p.value?.setSelected(w);break;case"prev":u.value.movePrev(y),p.value?.setSelected(y);break;case"next":u.value.moveNext(y),p.value?.setSelected(y);break;case"hover":p.value?.setHover(y);break;case"selected":p.value?.setSelected(y);break}};return e({designer:p,mode:c}),(g,S)=>(b(),G("div",{ref_key:"container",ref:t,class:"v-designer"},[x(d(Cc),{mode:c.value,width:d(i),height:d(o)},{default:k(()=>[ae("iframe",{ref_key:"iframe",ref:r,frameborder:"0"},null,512),d(f)?(b(),G("div",{key:0,class:be(["v-designer__dropping","is-inner"]),style:kt(d(f).style)},null,4)):z("",!0),d(h)?(b(),G("div",{key:1,class:"v-designer__hover",style:kt(d(h).style)},[ae("span",{class:be(`is-${d(h).position}`)},[de(ne(d(h).model.name)+": ",1),ae("i",null,ne(d(h).model.id),1)],2)],4)):z("",!0),d(m)?(b(),G("div",{key:2,class:"v-designer__selected",style:kt(d(m).style)},[x(rw,{position:d(m).position,model:d(m).model,path:d(m).path,onAction:v},null,8,["position","model","path"])],4)):z("",!0)]),_:1},8,["mode","width","height"]),d(u)?z("",!0):(b(),$(d(Ee),{key:0,description:"请新建或打开文件"})),d(u)&&d(l)?(b(),G("div",iw," 您可以拖拽组件放置到这里 ")):z("",!0)],512))}}),Un=B({__name:"group",props:{context:{},current:{},title:{},nameLabel:{},valueLabel:{},createEmpty:{},list:{},remove:{},submit:{},itemTitle:{type:Function,default:n=>n.name}},setup(n){const e=n,t=I(),r=I(),i=I(!1),o=I(e.createEmpty()),s=I(!1),a=O(()=>s.value?`编辑${e.title}`:`新增${e.title}`),u=()=>{s.value=!1,o.value=e.createEmpty(),i.value=!0},l=(m,v)=>{switch(v.name){case"edit":p(m);break;case"remove":e.remove(m);break}},c=m=>{o.value.value=m},p=m=>{s.value=!0,o.value={...m},i.value=!0},h=async m=>e.submit(m,s.value),f=()=>{r.value?.itemRef.validate()};return(m,v)=>(b(),$(d(he),{title:e.title,class:"v-sub-panel",size:"small",fit:!1,plus:"",onPlus:u},{default:k(()=>[(b(!0),G(re,null,oe(m.list,g=>(b(),$(d(Oe),{title:e.itemTitle(g),border:"",actions:["edit","remove"],onAction:S=>l(g,S),onClick:S=>p(g)},null,8,["title","onAction","onClick"]))),256)),m.list.length?z("",!0):(b(),$(d(Ee),{key:0,"image-size":40})),x(d(Oo),{modelValue:i.value,"onUpdate:modelValue":v[1]||(v[1]=g=>i.value=g),title:a.value,"submit-method":h,model:o.value,block:m.current,context:m.context,onPick:c},{default:k(()=>[se(m.$slots,"fields",pt($t({model:o.value,isEdit:s.value,nameLabel:m.nameLabel,valueLabel:m.valueLabel})),()=>[x(d(Q),{name:"name",label:m.nameLabel,required:"",disabled:s.value},null,8,["label","disabled"]),x(d(Q),{ref_key:"codeFieldRef",ref:r,name:"value",label:m.valueLabel,required:""},{editor:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,dark:"",height:"350px",modelValue:o.value.value,"onUpdate:modelValue":v[0]||(v[0]=g=>o.value.value=g),onBlur:f},null,8,["modelValue"])]),_:1},8,["label"])])]),_:3},8,["modelValue","title","model","block","context"])]),_:3},8,["title"]))}}),sw=B({__name:"state",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>Object.entries(e.current?.state||{}).map(([s,a])=>({name:s,value:an(a)}))),r=()=>({name:"",value:""}),i=s=>e.current?.removeState(s.name),o=async(s,a)=>{const{name:u,value:l}=s;if(!a&&e.current?.state[u])return Ve(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSExpression",value:l};return Te(c,e.context,!0)?(e.current?.setState(u,c),!0):!1};return(s,a)=>(b(),$(Un,{title:"状态数据",current:e.current,context:e.context,list:t.value,nameLabel:"状态数据名称",valueLabel:"状态初始值 [ JSExpression ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),aw=B({__name:"computed",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>Object.entries(e.current?.computed||{}).map(([s,a])=>({name:s,value:an(a)}))),r=()=>({name:"",value:"() => { }"}),i=s=>e.current?.removeFunction("computed",s.name),o=async(s,a)=>{const{name:u,value:l}=s;if(!a&&e.current?.computed[u])return Ve(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Te(c,e.context,!0)?(e.current?.setFunction("computed",u,c),!0):!1};return(s,a)=>(b(),$(Un,{title:"计算属性",current:e.current,context:e.context,list:t.value,nameLabel:"计算属性名称",valueLabel:"计算函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),lw=B({__name:"methods",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>Object.entries(e.current?.methods||{}).map(([s,a])=>({name:s,value:an(a)}))),r=()=>({name:"",value:"() => { }"}),i=s=>e.current?.removeFunction("methods",s.name),o=async(s,a)=>{const{name:u,value:l}=s;if(!a&&e.current?.methods[u])return Ve(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Te(c,e.context,!0)?(e.current?.setFunction("methods",u,c),!0):!1};return(s,a)=>(b(),$(Un,{title:"组件方法",current:e.current,context:e.context,list:t.value,nameLabel:"方法名称",valueLabel:"方法函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),uw=B({__name:"lifeCycles",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>r6.map(a=>({label:a,value:a}))),r=O(()=>Object.entries(e.current?.lifeCycles||{}).map(([a,u])=>({name:a,value:an(u)}))),i=()=>({name:"",value:"() => { }"}),o=a=>e.current?.removeFunction("lifeCycles",a.name),s=async(a,u)=>{const{name:l,value:c}=a;if(!u&&e.current?.lifeCycles[l])return Ve(`名称 ${l} 已存在,请更换!`),!1;const p={type:"JSFunction",value:c};return Te(p,e.context,!0)?(e.current?.setFunction("lifeCycles",l,p),!0):!1};return(a,u)=>(b(),$(Un,{title:"生命周期",current:e.current,context:e.context,list:r.value,nameLabel:"名称",valueLabel:"函数 [ JSFunction ]",createEmpty:i,remove:o,submit:s},{fields:k(({model:l,nameLabel:c,isEdit:p,valueLabel:h})=>[x(d(Q),{name:"name",label:c,editor:"select",options:t.value,required:"",disabled:p},null,8,["label","options","disabled"]),x(d(Q),{name:"value",label:h,required:""},{editor:k(()=>[x(d(ke),{ref:"editorRef",dark:"",height:"350px",modelValue:l.value,"onUpdate:modelValue":f=>l.value=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),cw=B({__name:"watch",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>(e.current?.watch||[]).map(a=>({...a,source:an(a.source),handler:an(a.handler)}))),r=()=>({source:"() => { }",deep:!1,immediate:!1,handler:"() => { }"}),i=a=>a.source,o=a=>e.current?.removeWatch(a),s=async(a,u)=>{const l={type:"JSFunction",value:a.source},c={type:"JSFunction",value:a.handler};if(!Te(l,e.context,!0)||!Te(c,e.context,!0))return!1;const p={...a,source:l,handler:c};return e.current?.setWatch(p),!0};return(a,u)=>(b(),$(Un,{title:"侦听器",current:e.current,context:e.context,list:t.value,nameLabel:"侦听源 [ JSFunction ]",valueLabel:"处理函数 [ JSFunction ]",createEmpty:r,remove:o,submit:s,itemTitle:i,grow:""},{fields:k(({model:l,nameLabel:c,valueLabel:p})=>[x(d(Q),{name:"source",label:c,required:""},{editor:k(()=>[x(d(ke),{dark:"",height:"100px",modelValue:l.source,"onUpdate:modelValue":h=>l.source=h},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),x(d(Q),{name:"deep",modelValue:l.deep,"onUpdate:modelValue":h=>l.deep=h,label:"深度监听",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),x(d(Q),{name:"immediate",modelValue:l.immediate,"onUpdate:modelValue":h=>l.immediate=h,label:"立即执行",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),x(d(Q),{name:"handler",label:p,required:""},{editor:k(()=>[x(d(ke),{dark:"",height:"130px",modelValue:l.handler,"onUpdate:modelValue":h=>l.handler=h},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),dw=B({__name:"index",setup(n){const{current:e,context:t}=Ie();return(r,i)=>(b(),$(d(ue),{class:"v-scripts-widget",direction:"column",fit:""},{default:k(()=>[x(sw,{current:d(e),context:d(t)},null,8,["current","context"]),x(aw,{current:d(e),context:d(t)},null,8,["current","context"]),x(lw,{current:d(e),context:d(t)},null,8,["current","context"]),x(uw,{current:d(e),context:d(t)},null,8,["current","context"]),x(cw,{current:d(e),context:d(t)},null,8,["current","context"])]),_:1}))}}),li=B({__name:"setters",props:{context:{},current:{},title:{},items:{},node:{},removable:{type:Boolean}},emits:["change","remove"],setup(n,{emit:e}){const t=n,r=e,i=(s,a)=>{r("change",s,a)},o=s=>{r("remove",s)};return(s,a)=>(b(),$(d(he),{title:t.title,class:"v-sub-panel",size:"small",fit:!1},{default:k(()=>[x(d(kn),{class:"v-properties-widget__form",size:"small","label-width":"90px",onKeydown:a[0]||(a[0]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[(b(!0),G(re,null,oe(t.items,u=>(b(),$(d(_t),ye(u,{key:`${u.name}_${t.node.id}`,current:t.current,context:t.context,removable:t.removable,onChange:i,onRemove:o}),null,16,["current","context","removable"]))),128))]),_:1})]),_:1},8,["title"]))}}),pw=B({name:"PropertiesWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),{selected:r}=vt(),{node:i,commonProps:o,change:s,componentProps:a,customProps:u,addCustom:l,removeCustom:c,isExist:p}=v3(r),h=I(!1),f=I(),m=()=>{h.value=!0,f.value={name:""}},v=async S=>{const y=Object.keys(i.value?.props||{});return!p(S.name)&&!y.includes(S.name)?(l(S.name),!0):(Ve("已存在该属性名称"),!1)},g=async S=>{await fn("确定删除?")&&c(S)};return(S,y)=>d(e)?(b(),$(d(ue),{key:0,class:"v-properties-widget",direction:"column",fit:""},{default:k(()=>[d(i)?(b(),$(li,{key:0,title:"通用属性",current:d(e),context:d(t),node:d(i),items:d(o),onChange:d(s)},null,8,["current","context","node","items","onChange"])):z("",!0),d(i)?(b(),$(li,{key:1,title:"组件属性",current:d(e),context:d(t),node:d(i),items:d(a),onChange:d(s)},null,8,["current","context","node","items","onChange"])):z("",!0),d(i)?(b(),$(li,{key:2,title:"自定义属性",current:d(e),context:d(t),node:d(i),items:d(u),onChange:d(s),removable:"",plus:"",grow:"",onPlus:m,onRemove:g},null,8,["current","context","node","items","onChange"])):z("",!0),x(d(at),{modelValue:h.value,"onUpdate:modelValue":y[0]||(y[0]=w=>h.value=w),title:"新增自定义属性",width:"400px",height:"150px","submit-method":v,formProps:{tooltipMessage:!1},model:f.value},{default:k(()=>[x(d(Q),{name:"name",label:"属性名称",required:"",rules:{message:"名称格式错误",pattern:d(mt)}},null,8,["rules"])]),_:1},8,["modelValue","model"])]),_:1})):z("",!0)}}),hw=B({name:"VariableBinder",__name:"variable",props:{context:{},current:{},value:{}},setup(n){const e=n,t=I(),r=Nt({type:"JSExpression",value:e.value}),i=o=>{t.value.getEditor().setValue(o),r.value=o};return(o,s)=>(b(),$(d(Oo),{title:"绑定变量","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:i},{default:k(()=>[x(d(Q),{name:"value",label:"绑定内容 [ JSExpression ]",required:""},{editor:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=a=>r.value=a),dark:"",height:"450px"},null,8,["modelValue"])]),_:1})]),_:1},8,["block","context","model"]))}}),fw=B({name:"EventBinder",__name:"event",props:{context:{},current:{},name:{},event:{}},setup(n){const e=n,t=I(),r=Nt({name:e.name,...e.event,modifiers:Object.keys(e.event?.modifiers||{}),handler:{type:"JSFunction",value:e.event?.handler?.value||"() => {}"}}),i=r3.map(s=>({label:s,value:s})),o=s=>{t.value.getEditor().setValue(s),r.handler.value=s};return(s,a)=>(b(),$(d(Oo),{title:"绑定事件","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:o},{default:k(()=>[x(d(Q),{name:"modifiers",label:"事件修饰符",editor:"checkbox",options:d(i)},null,8,["options"]),x(d(Q),{name:"handler.value",label:"事件处理函数 [ JSFunction ]",required:""},{editor:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,modelValue:r.handler.value,"onUpdate:modelValue":a[0]||(a[0]=u=>r.handler.value=u),dark:"",height:"350px"},null,8,["modelValue"])]),_:1})]),_:1},8,["block","context","model"]))}}),mw=B({name:"EventsWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),{selected:r}=vt(),{mouseEventList:i,keyboardEventList:o,componentEventList:s}=g3(r),a=I({name:"",event:void 0}),u=I(!1),l=m=>{a.value=Nn(m),u.value=!0},c=async m=>{const v={...m,modifiers:m.modifiers.reduce((g,S)=>(g[S]=!0,g),{})};return Te(v.handler,t.value,!0)?((r.value?.model).setEvent(v),!0):!1},p=async m=>{const v=r.value?.model;m.name&&(v.removeEvent(m.name),u.value=!1)},h=async()=>{a.value.name&&await fn("确定要删除该事件吗?")&&p(a.value)},f=m=>{const{name:v,modelValue:g}=m;v==="edit"&&l(g),v==="remove"&&p(g)};return(m,v)=>(b(),$(d(ue),{class:"v-events-widget",direction:"column",fit:""},{default:k(()=>[x(d(he),{title:"组件事件",class:"v-sub-panel",size:"small",fit:!1},{default:k(()=>[d(s).length?z("",!0):(b(),$(d(Ee),{key:0,"image-size":50,description:"该组件无自带事件"})),(b(!0),G(re,null,oe(d(s),g=>(b(),$(d(Oe),{title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:S=>l(g),onAction:f},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),x(d(he),{title:"鼠标事件",class:"v-sub-panel",size:"small",fit:!1},{default:k(()=>[(b(!0),G(re,null,oe(d(i),g=>(b(),$(d(Oe),{title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:S=>l(g),onAction:f},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),x(d(he),{title:"键盘事件",class:"v-sub-panel",size:"small",grow:"",fit:!1},{default:k(()=>[(b(!0),G(re,null,oe(d(o),g=>(b(),$(d(Oe),{title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:S=>l(g),onAction:f},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),u.value?(b(),$(d(fw),{key:0,modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=g=>u.value=g),context:d(t),current:d(e),name:a.value.name,event:a.value.event,submitMethod:c,onUnbind:h},null,8,["modelValue","context","current","name","event"])):z("",!0)]),_:1}))}}),vw=B({name:"CssWidget",__name:"index",setup(n){const{current:e}=Ie(),t=I(),r=O(()=>e.value?.css||""),i=s=>{e.value?.setCss(s)},o=()=>{const s=(t.value?.getEditor()).getValue();i(s),Fe("保存成功")};return(s,a)=>(b(),$(d(he),{class:"v-css-widget v-sub-panel",title:"lang:css scoped",size:"small",fit:"",save:"",onSave:o},{default:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,"model-value":r.value,height:"100%",lang:"css",dark:"",onBlur:i},null,8,["model-value"])]),_:1}))}}),gw=B({name:"DirectivesWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),{selected:r}=vt(),{vIf:i,vShow:o,vBind:s,vFor:a,vModels:u,onValueChange:l,onForChange:c,onModelChange:p}=_3(r),h=f=>f.arg?typeof f.arg=="string"?f.arg:Ct(f.arg,{}):"modelValue";return(f,m)=>(b(),$(d(ue),{class:"v-directives-widget",direction:"column",fit:""},{default:k(()=>[x(d(he),{class:"v-sub-panel",title:"内置指令",size:"small",fit:!1},{default:k(()=>[x(d(kn),{size:"small","label-width":"80px",onKeydown:m[0]||(m[0]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[x(d(_t),{name:"vIf",label:"v-if",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(i).value,onChange:d(l)},null,8,["current","context","value","onChange"]),x(d(_t),{name:"vShow",label:"v-show",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(o).value,onChange:d(l)},null,8,["current","context","value","onChange"]),x(d(_t),{name:"vBind",label:"v-bind",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(s).value,onChange:d(l)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),x(d(he),{class:"v-sub-panel",title:"循环",size:"small",fit:!1},{default:k(()=>[x(d(kn),{size:"small","label-width":"80px",onKeydown:m[1]||(m[1]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[x(d(_t),{name:"value",label:"循环数据",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(a).value,onChange:d(c)},null,8,["current","context","value","onChange"]),x(d(_t),{name:"item",label:"迭代变量名",setters:{name:"StringSetter",props:{placeholder:"item"}},current:d(e),context:d(t),value:d(a).iterator?.item,onChange:d(c)},null,8,["current","context","value","onChange"]),x(d(_t),{name:"index",label:"索引变量名",setters:{name:"StringSetter",props:{placeholder:"index"}},current:d(e),context:d(t),value:d(a).iterator?.index,onChange:d(c)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),x(d(he),{class:"v-sub-panel",title:"双向绑定",size:"small",fit:!1,grow:""},{default:k(()=>[(b(!0),G(re,null,oe(d(u),(v,g)=>(b(),$(d(he),{card:"",border:"",class:"v-sub-panel",size:"small",title:`v-model: ${h(v)}`,body:{grow:!1},fit:!1},{default:k(()=>[x(d(kn),{size:"small","label-width":"60px",onKeydown:m[2]||(m[2]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[x(d(_t),{name:g.toString(),label:"绑定变量",setters:"ExpressionSetter",current:d(e),context:d(t),value:v.value,onChange:d(p)},null,8,["name","current","context","value","onChange"])]),_:2},1024)]),_:2},1032,["title"]))),256)),d(u).length?z("",!0):(b(),$(d(Ee),{key:0,description:"当前组件没有双向绑定属性","image-size":50}))]),_:1})]),_:1}))}}),yw=B({name:"DefinedPropsDialog",__name:"props",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑定义属性":"新增定义属性"),r=I(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=Object.keys(hc).map(s=>({label:s,value:s})),o=async s=>{const a=s.default;return a&&!Te(a,e.context,!0)?!1:(e.current.setProp(s),!0)};return(s,a)=>(b(),$(d(at),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":o},{default:k(()=>[x(d(Q),{name:"name",label:"属性名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(mt)}},null,8,["disabled","rules"]),x(d(Q),{name:"type",label:"数据类型",editor:"checkbox",props:{button:!0,size:"small"},options:d(i),required:""},null,8,["options"]),x(d(Q),{name:"required",label:"必须",editor:"switch"}),x(d(Q),{name:"default.value",label:"默认值",editor:"none"},{default:k(()=>[x(d(ke),{modelValue:r.value.default.value,"onUpdate:modelValue":a[0]||(a[0]=u=>r.value.default.value=u),height:"200px",dark:""},null,8,["modelValue"])]),_:1})]),_:1},8,["title","model"]))}}),bw=B({name:"DefinedEventsDialog",__name:"events",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑定义事件":"新增定义事件"),r=I({name:e.item}),i=async o=>(e.item&&e.current.removeEmit(e.item,!0),e.current.setEmit(o.name),!0);return(o,s)=>(b(),$(d(at),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:k(()=>[x(d(Q),{name:"name",label:"事件名称",required:"",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(mt)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),ww=B({name:"DefinedSlotsDialog",__name:"slots",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑定义插槽":"新增定义插槽"),r=I({name:e.item}),i=async o=>(e.item&&e.current.removeSlot(e.item,!0),e.current.setSlot(o.name),!0);return(o,s)=>(b(),$(d(at),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:k(()=>[x(d(Q),{name:"name",label:"插槽名称",disabled:!!e.item,required:"",rules:{message:"名称格式错误",pattern:d(mt)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),_w=B({name:"DefinedInjectsDialog",__name:"injects",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑注入":"新增注入"),r=I(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=async o=>{const s=o.default;return s&&!Te(s,e.context,!0)?!1:(e.current.setInject(o),!0)};return(o,s)=>(b(),$(d(at),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:k(()=>[x(d(Q),{name:"name",label:"注入名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(mt)}},null,8,["disabled","rules"]),x(d(Q),{name:"from",label:"来源名称",tip:"默认和注入名称一致"}),x(d(Q),{name:"default.value",label:"默认值",editor:"none"},{default:k(()=>[x(d(ke),{modelValue:r.value.default.value,"onUpdate:modelValue":s[0]||(s[0]=a=>r.value.default.value=a),height:"200px",dark:""},null,8,["modelValue"])]),_:1})]),_:1},8,["title","model"]))}}),xw=B({name:"DefinedWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),r=O(()=>(e.value?.props||[]).map(A=>typeof A=="string"?{name:A}:A)),i=O(()=>e.value?.emits||[]),o=O(()=>e.value?.slots||[]),s=O(()=>e.value?.inject||[]),a=I(!1),u=I(),l=I(!1),c=I(),p=I(!1),h=I(),f=I(!1),m=I(),v=()=>{u.value=void 0,a.value=!0},g=A=>{const{name:P,modelValue:T}=A;P==="edit"&&S(T),P==="remove"&&e.value?.removeProp(T)},S=A=>{u.value=A,a.value=!0},y=()=>{c.value=void 0,l.value=!0},w=A=>{c.value=A,l.value=!0},E=A=>{const{name:P,modelValue:T}=A;P==="edit"&&w(T),P==="remove"&&e.value?.removeEmit(T)},j=()=>{h.value=void 0,p.value=!0},_=A=>{h.value=A,p.value=!0},V=A=>{const{name:P,modelValue:T}=A;P==="edit"&&_(T),P==="remove"&&e.value?.removeSlot(T)},D=()=>{m.value=void 0,f.value=!0},Y=A=>{m.value=A,f.value=!0},C=A=>{const{name:P,modelValue:T}=A;P==="edit"&&Y(T),P==="remove"&&e.value?.removeInject(T)};return(A,P)=>d(e)&&d(t)?(b(),$(d(ue),{key:0,class:"v-defined-widget",direction:"column",fit:""},{default:k(()=>[x(d(he),{class:"v-sub-panel",title:"定义属性",size:"small",plus:"",fit:!1,onPlus:v},{default:k(()=>[(b(!0),G(re,null,oe(r.value,T=>(b(),$(d(Oe),{"model-value":T,title:T.name,border:"",actions:["edit","remove"],onClick:K=>S(T),onAction:g},null,8,["model-value","title","onClick"]))),256)),r.value.length?z("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),a.value?(b(),$(yw,{key:1,current:d(e),context:d(t),modelValue:a.value,"onUpdate:modelValue":P[0]||(P[0]=T=>a.value=T),item:u.value},null,8,["current","context","modelValue","item"])):z("",!0)]),_:1}),x(d(he),{class:"v-sub-panel",title:"定义事件",size:"small",plus:"",fit:!1,onPlus:y},{default:k(()=>[(b(!0),G(re,null,oe(i.value,T=>(b(),$(d(Oe),{"model-value":T,title:T,border:"",actions:["remove"],onClick:K=>w(T),onAction:E},null,8,["model-value","title","onClick"]))),256)),i.value.length?z("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),l.value?(b(),$(bw,{key:1,modelValue:l.value,"onUpdate:modelValue":P[1]||(P[1]=T=>l.value=T),current:d(e),context:d(t),item:c.value},null,8,["modelValue","current","context","item"])):z("",!0)]),_:1}),x(d(he),{class:"v-sub-panel",title:"定义插槽",size:"small",plus:"",fit:!1,onPlus:j},{default:k(()=>[(b(!0),G(re,null,oe(o.value,T=>(b(),$(d(Oe),{"model-value":T,title:T,border:"",actions:["remove"],onClick:K=>_(T),onAction:V},null,8,["model-value","title","onClick"]))),256)),o.value.length?z("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),p.value?(b(),$(ww,{key:1,modelValue:p.value,"onUpdate:modelValue":P[2]||(P[2]=T=>p.value=T),current:d(e),context:d(t),item:h.value},null,8,["modelValue","current","context","item"])):z("",!0)]),_:1}),x(d(he),{class:"v-sub-panel",title:"注入",size:"small",plus:"",fit:!1,grow:"",onPlus:D},{default:k(()=>[(b(!0),G(re,null,oe(s.value,T=>(b(),$(d(Oe),{"model-value":T,title:T.name,border:"",actions:["remove"],onClick:K=>Y(T),onAction:C},null,8,["model-value","title","onClick"]))),256)),s.value.length?z("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),f.value?(b(),$(_w,{key:1,modelValue:f.value,"onUpdate:modelValue":P[3]||(P[3]=T=>f.value=T),current:d(e),context:d(t),item:m.value},null,8,["modelValue","current","context","item"])):z("",!0)]),_:1})]),_:1})):z("",!0)}}),Sw=B({name:"DataSourceDialogForm",__name:"form",props:{context:{},current:{},item:{}},setup(n){const e=n,{apis:t}=x3(),r=I(Object.assign({type:"api",ref:"",name:"",label:"",transform:{type:"JSFunction",value:`(res) => {
|