form-imagining 0.0.86-9 → 0.0.87
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/{App-CT7fpws8.js → App-BR2rlgiu.js} +1 -1
- package/dist/{Ceshi-4u4mYbre.js → Ceshi-RVrloJFS.js} +1 -1
- package/dist/{Ceshi2-DYhsHFrG.js → Ceshi2-DZg9PSV0.js} +1 -1
- package/dist/Col-DiuAMADn.js +4 -0
- package/dist/Collapse-CZYBVbhj.js +4 -0
- package/dist/{Demo-D6aLIH0o.js → Demo-DtDKOt3h.js} +1 -1
- package/dist/FX-JCxE3oiu.js +4 -0
- package/dist/{FormGridCopy-B7reEmKJ.js → FormGridCopy-MizFVDDr.js} +1 -1
- package/dist/GenerateForm-tTA1l7in.js +4 -0
- package/dist/GenerateReport-Dey09j9b.js +4 -0
- package/dist/{HelloWorld-CBWKb-_c.js → HelloWorld-NIgAnvJu.js} +1 -1
- package/dist/Input-/345/210/240/351/231/{244-Bz1xrgNd.js → 244-BmZUTFQy.js} +1 -1
- package/dist/Label-/345/210/240/351/231/{244-cbCG_eLE.js → 244-gP5vqXVY.js} +1 -1
- package/dist/{Login-IdhwUFas.js → Login-083qXq9q.js} +1 -1
- package/dist/ReportModule-BnwLyINJ.js +4 -0
- package/dist/SqlModule-DxpjaX91.js +4 -0
- package/dist/TableBtnModal-CK-s_ep4.js +4 -0
- package/dist/childForm-B_P9dYON.js +4 -0
- package/dist/{cssMode-D6_DWTba.js → cssMode-D5vhSFn3.js} +1 -1
- package/dist/form-imagining.js +1 -1
- package/dist/form-imagining.umd.cjs +26 -26
- package/dist/{formTest-K3QLrRiK.js → formTest-D5I6hDSZ.js} +1 -1
- package/dist/{freemarker2-DnufjK5J.js → freemarker2-DNWvY0m4.js} +1 -1
- package/dist/{handlebars-0KwIZrAF.js → handlebars-CtL3t0vh.js} +1 -1
- package/dist/{html-4r1CrlCH.js → html-BzmTjqOQ.js} +1 -1
- package/dist/{htmlMode-DFS1gQsN.js → htmlMode-DULZQMNq.js} +1 -1
- package/dist/{index-D_Nm1nm-.js → index-BIZkcZHZ.js} +1 -1
- package/dist/{index-B5iCqyVZ.js → index-BYAbH3YW.js} +1 -1
- package/dist/{index-DH2kIMnd.js → index-CWdYS31n.js} +251 -216
- package/dist/{javascript-C7pmeAUV.js → javascript-CRwBTK7h.js} +1 -1
- package/dist/{jsonMode-BEQBK4TZ.js → jsonMode-C8sxK4_b.js} +1 -1
- package/dist/{liquid-CsRgXeIJ.js → liquid-DnDemQiN.js} +1 -1
- package/dist/{mdx-ZQH9Ra3_.js → mdx-rb1hL28J.js} +1 -1
- package/dist/{python-D6jRKpwr.js → python-Lq7iPrGO.js} +1 -1
- package/dist/{razor-CjyeM7z1.js → razor-B2NDqRkX.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{tableSelectDemo-DPrfPxAI.js → tableSelectDemo-u725gafW.js} +1 -1
- package/dist/{tableSelectDemo2-BOF2R8G9.js → tableSelectDemo2-IL3Z7uTo.js} +1 -1
- package/dist/{tsMode-BjWpB5pW.js → tsMode-DLyQYgfI.js} +1 -1
- package/dist/{typescript-DpaY9STX.js → typescript-Bd_asnYm.js} +1 -1
- package/dist/{xml-BKHwGF4X.js → xml-Dxp3juqf.js} +1 -1
- package/dist/{yaml-D3ruvmMR.js → yaml-C_Ls9Mar.js} +1 -1
- package/package.json +1 -1
- package/dist/Col-BD7pUcIn.js +0 -4
- package/dist/Collapse-DLcdpdfw.js +0 -4
- package/dist/FX-IzQeItLZ.js +0 -4
- package/dist/GenerateForm-DWoXnCaq.js +0 -4
- package/dist/GenerateReport-BtQdB7dR.js +0 -4
- package/dist/ReportModule-ByAigLSD.js +0 -4
- package/dist/SqlModule-DZVxlv_R.js +0 -4
- package/dist/TableBtnModal-DV09jtd9.js +0 -4
- package/dist/childForm-C1G5Q7cz.js +0 -4
|
@@ -464,7 +464,7 @@ summary tabindex target title type usemap value width wmode wrap`,eventsName=`on
|
|
|
464
464
|
`]:{color:W.colorTextDisabled}}}}}},genListStyle=W=>{const{componentCls:C,antCls:Q,iconCls:Z,fontSize:H,lineHeight:K}=W,G=`${C}-list-item`,U=`${G}-actions`,X=`${G}-action`,ee=Math.round(H*K);return{[`${C}-wrapper`]:{[`${C}-list`]:_extends$1(_extends$1({},clearFix()),{lineHeight:W.lineHeight,[G]:{position:"relative",height:W.lineHeight*H,marginTop:W.marginXS,fontSize:H,display:"flex",alignItems:"center",transition:`background-color ${W.motionDurationSlow}`,"&:hover":{backgroundColor:W.controlItemBgHover},[`${G}-name`]:_extends$1(_extends$1({},textEllipsis),{padding:`0 ${W.paddingXS}px`,lineHeight:K,flex:"auto",transition:`all ${W.motionDurationSlow}`}),[U]:{[X]:{opacity:0},[`${X}${Q}-btn-sm`]:{height:ee,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
|
465
465
|
${X}:focus,
|
|
466
466
|
&.picture ${X}
|
|
467
|
-
`]:{opacity:1},[Z]:{color:W.colorTextDescription,transition:`all ${W.motionDurationSlow}`},[`&:hover ${Z}`]:{color:W.colorText}},[`${C}-icon ${Z}`]:{color:W.colorTextDescription,fontSize:H},[`${G}-progress`]:{position:"absolute",bottom:-W.uploadProgressOffset,width:"100%",paddingInlineStart:H+W.paddingXS,fontSize:H,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${G}:hover ${X}`]:{opacity:1,color:W.colorText},[`${G}-error`]:{color:W.colorError,[`${G}-name, ${C}-icon ${Z}`]:{color:W.colorError},[U]:{[`${Z}, ${Z}:hover`]:{color:W.colorError},[X]:{opacity:1}}},[`${C}-list-item-container`]:{transition:`opacity ${W.motionDurationSlow}, height ${W.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},uploadAnimateInlineIn=new Keyframe("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),uploadAnimateInlineOut=new Keyframe("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),genMotionStyle=W=>{const{componentCls:C}=W,Q=`${C}-animate-inline`;return[{[`${C}-wrapper`]:{[`${Q}-appear, ${Q}-enter, ${Q}-leave`]:{animationDuration:W.motionDurationSlow,animationTimingFunction:W.motionEaseInOutCirc,animationFillMode:"forwards"},[`${Q}-appear, ${Q}-enter`]:{animationName:uploadAnimateInlineIn},[`${Q}-leave`]:{animationName:uploadAnimateInlineOut}}},uploadAnimateInlineIn,uploadAnimateInlineOut]},genPictureStyle=W=>{const{componentCls:C,iconCls:Q,uploadThumbnailSize:Z,uploadProgressOffset:H}=W,K=`${C}-list`,G=`${K}-item`;return{[`${C}-wrapper`]:{[`${K}${K}-picture, ${K}${K}-picture-card`]:{[G]:{position:"relative",height:Z+W.lineWidth*2+W.paddingXS*2,padding:W.paddingXS,border:`${W.lineWidth}px ${W.lineType} ${W.colorBorder}`,borderRadius:W.borderRadiusLG,"&:hover":{background:"transparent"},[`${G}-thumbnail`]:_extends$1(_extends$1({},textEllipsis),{width:Z,height:Z,lineHeight:`${Z+W.paddingSM}px`,textAlign:"center",flex:"none",[Q]:{fontSize:W.fontSizeHeading2,color:W.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${G}-progress`]:{bottom:H,width:`calc(100% - ${W.paddingSM*2}px)`,marginTop:0,paddingInlineStart:Z+W.paddingXS}},[`${G}-error`]:{borderColor:W.colorError,[`${G}-thumbnail ${Q}`]:{"svg path[fill='#e6f7ff']":{fill:W.colorErrorBg},"svg path[fill='#1890ff']":{fill:W.colorError}}},[`${G}-uploading`]:{borderStyle:"dashed",[`${G}-name`]:{marginBottom:H}}}}}},genPictureCardStyle=W=>{const{componentCls:C,iconCls:Q,fontSizeLG:Z,colorTextLightSolid:H}=W,K=`${C}-list`,G=`${K}-item`,U=W.uploadPicCardSize;return{[`${C}-wrapper${C}-picture-card-wrapper`]:_extends$1(_extends$1({},clearFix()),{display:"inline-block",width:"100%",[`${C}${C}-select`]:{width:U,height:U,marginInlineEnd:W.marginXS,marginBottom:W.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:W.colorFillAlter,border:`${W.lineWidth}px dashed ${W.colorBorder}`,borderRadius:W.borderRadiusLG,cursor:"pointer",transition:`border-color ${W.motionDurationSlow}`,[`> ${C}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${C}-disabled):hover`]:{borderColor:W.colorPrimary}},[`${K}${K}-picture-card`]:{[`${K}-item-container`]:{display:"inline-block",width:U,height:U,marginBlock:`0 ${W.marginXS}px`,marginInline:`0 ${W.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[G]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${W.paddingXS*2}px)`,height:`calc(100% - ${W.paddingXS*2}px)`,backgroundColor:W.colorBgMask,opacity:0,transition:`all ${W.motionDurationSlow}`,content:'" "'}},[`${G}:hover`]:{[`&::before, ${G}-actions`]:{opacity:1}},[`${G}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${W.motionDurationSlow}`,[`${Q}-eye, ${Q}-download, ${Q}-delete`]:{zIndex:10,width:Z,margin:`0 ${W.marginXXS}px`,fontSize:Z,cursor:"pointer",transition:`all ${W.motionDurationSlow}`}},[`${G}-actions, ${G}-actions:hover`]:{[`${Q}-eye, ${Q}-download, ${Q}-delete`]:{color:new TinyColor(H).setAlpha(.65).toRgbString(),"&:hover":{color:H}}},[`${G}-thumbnail, ${G}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${G}-name`]:{display:"none",textAlign:"center"},[`${G}-file + ${G}-name`]:{position:"absolute",bottom:W.margin,display:"block",width:`calc(100% - ${W.paddingXS*2}px)`},[`${G}-uploading`]:{[`&${G}`]:{backgroundColor:W.colorFillAlter},[`&::before, ${Q}-eye, ${Q}-download, ${Q}-delete`]:{display:"none"}},[`${G}-progress`]:{bottom:W.marginXL,width:`calc(100% - ${W.paddingXS*2}px)`,paddingInlineStart:0}}})}},genRtlStyle=W=>{const{componentCls:C}=W;return{[`${C}-rtl`]:{direction:"rtl"}}},genBaseStyle=W=>{const{componentCls:C,colorTextDisabled:Q}=W;return{[`${C}-wrapper`]:_extends$1(_extends$1({},resetComponent(W)),{[C]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${C}-select`]:{display:"inline-block"},[`${C}-disabled`]:{color:Q,cursor:"not-allowed"}})}},useStyle$1=genComponentStyleHook("Upload",W=>{const{fontSizeHeading3:C,fontSize:Q,lineHeight:Z,lineWidth:H,controlHeightLG:K}=W,G=Math.round(Q*Z),U=merge$1(W,{uploadThumbnailSize:C*2,uploadProgressOffset:G/2+H,uploadPicCardSize:K*2.55});return[genBaseStyle(U),genDraggerStyle(U),genPictureStyle(U),genPictureCardStyle(U),genListStyle(U),genMotionStyle(U),genRtlStyle(U),genCollapseMotion(U)]});var __awaiter=function(W,C,Q,Z){function H(K){return K instanceof Q?K:new Q(function(G){G(K)})}return new(Q||(Q=Promise))(function(K,G){function U(te){try{ee(Z.next(te))}catch(ie){G(ie)}}function X(te){try{ee(Z.throw(te))}catch(ie){G(ie)}}function ee(te){te.done?K(te.value):H(te.value).then(U,X)}ee((Z=Z.apply(W,C||[])).next())})},__rest$2=function(W,C){var Q={};for(var Z in W)Object.prototype.hasOwnProperty.call(W,Z)&&C.indexOf(Z)<0&&(Q[Z]=W[Z]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var H=0,Z=Object.getOwnPropertySymbols(W);H<Z.length;H++)C.indexOf(Z[H])<0&&Object.prototype.propertyIsEnumerable.call(W,Z[H])&&(Q[Z[H]]=W[Z[H]]);return Q};const LIST_IGNORE=`__LIST_IGNORE_${Date.now()}__`,Upload$1=vue.defineComponent({compatConfig:{MODE:3},name:"AUpload",inheritAttrs:!1,props:initDefaultProps(uploadProps(),{type:"select",multiple:!1,action:"",data:{},accept:"",showUploadList:!0,listType:"text",supportServerRender:!0}),setup(W,C){let{slots:Q,attrs:Z,expose:H}=C;const K=useInjectFormItemContext(),{prefixCls:G,direction:U,disabled:X}=useConfigInject("upload",W),[ee,te]=useStyle$1(G),ie=useInjectDisabled(),ne=vue.computed(()=>{var Ce;return(Ce=X.value)!==null&&Ce!==void 0?Ce:ie.value}),[oe,re]=useMergedState(W.defaultFileList||[],{value:vue.toRef(W,"fileList"),postState:Ce=>{const ve=Date.now();return(Ce??[]).map((Ie,we)=>(!Ie.uid&&!Object.isFrozen(Ie)&&(Ie.uid=`__AUTO__${ve}_${we}__`),Ie))}}),se=vue.ref("drop"),ae=vue.ref(null);vue.onMounted(()=>{devWarning(W.fileList!==void 0||Z.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),devWarning(W.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),devWarning(W.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const le=(Ce,ve,Ie)=>{var we,ye;let xe=[...ve];W.maxCount===1?xe=xe.slice(-1):W.maxCount&&(xe=xe.slice(0,W.maxCount)),re(xe);const Ne={file:Ce,fileList:xe};Ie&&(Ne.event=Ie),(we=W["onUpdate:fileList"])===null||we===void 0||we.call(W,Ne.fileList),(ye=W.onChange)===null||ye===void 0||ye.call(W,Ne),K.onFieldChange()},ce=(Ce,ve)=>__awaiter(this,void 0,void 0,function*(){const{beforeUpload:Ie,transformFile:we}=W;let ye=Ce;if(Ie){const xe=yield Ie(Ce,ve);if(xe===!1)return!1;if(delete Ce[LIST_IGNORE],xe===LIST_IGNORE)return Object.defineProperty(Ce,LIST_IGNORE,{value:!0,configurable:!0}),!1;typeof xe=="object"&&xe&&(ye=xe)}return we&&(ye=yield we(ye)),ye}),de=Ce=>{const ve=Ce.filter(ye=>!ye.file[LIST_IGNORE]);if(!ve.length)return;const Ie=ve.map(ye=>file2Obj(ye.file));let we=[...oe.value];Ie.forEach(ye=>{we=updateFileList(ye,we)}),Ie.forEach((ye,xe)=>{let Ne=ye;if(ve[xe].parsedFile)ye.status="uploading";else{const{originFileObj:Te}=ye;let Le;try{Le=new File([Te],Te.name,{type:Te.type})}catch{Le=new Blob([Te],{type:Te.type}),Le.name=Te.name,Le.lastModifiedDate=new Date,Le.lastModified=new Date().getTime()}Le.uid=ye.uid,Ne=Le}le(Ne,we)})},ue=(Ce,ve,Ie)=>{try{typeof Ce=="string"&&(Ce=JSON.parse(Ce))}catch{}if(!getFileItem(ve,oe.value))return;const we=file2Obj(ve);we.status="done",we.percent=100,we.response=Ce,we.xhr=Ie;const ye=updateFileList(we,oe.value);le(we,ye)},he=(Ce,ve)=>{if(!getFileItem(ve,oe.value))return;const Ie=file2Obj(ve);Ie.status="uploading",Ie.percent=Ce.percent;const we=updateFileList(Ie,oe.value);le(Ie,we,Ce)},fe=(Ce,ve,Ie)=>{if(!getFileItem(Ie,oe.value))return;const we=file2Obj(Ie);we.error=Ce,we.response=ve,we.status="error";const ye=updateFileList(we,oe.value);le(we,ye)},ge=Ce=>{let ve;const Ie=W.onRemove||W.remove;Promise.resolve(typeof Ie=="function"?Ie(Ce):Ie).then(we=>{var ye,xe;if(we===!1)return;const Ne=removeFileItem(Ce,oe.value);Ne&&(ve=_extends$1(_extends$1({},Ce),{status:"removed"}),(ye=oe.value)===null||ye===void 0||ye.forEach(Te=>{const Le=ve.uid!==void 0?"uid":"name";Te[Le]===ve[Le]&&!Object.isFrozen(Te)&&(Te.status="removed")}),(xe=ae.value)===null||xe===void 0||xe.abort(ve),le(ve,Ne))})},pe=Ce=>{var ve;se.value=Ce.type,Ce.type==="drop"&&((ve=W.onDrop)===null||ve===void 0||ve.call(W,Ce))};H({onBatchStart:de,onSuccess:ue,onProgress:he,onError:fe,fileList:oe,upload:ae});const[me]=useLocaleReceiver("Upload",localeValues$1.Upload,vue.computed(()=>W.locale)),ke=(Ce,ve)=>{const{removeIcon:Ie,previewIcon:we,downloadIcon:ye,previewFile:xe,onPreview:Ne,onDownload:Te,isImageUrl:Le,progress:Ae,itemRender:Qe,iconRender:De,showUploadList:Ee}=W,{showDownloadIcon:Re,showPreviewIcon:$e,showRemoveIcon:Be}=typeof Ee=="boolean"?{}:Ee;return Ee?vue.createVNode(UploadList,{prefixCls:G.value,listType:W.listType,items:oe.value,previewFile:xe,onPreview:Ne,onDownload:Te,onRemove:ge,showRemoveIcon:!ne.value&&Be,showPreviewIcon:$e,showDownloadIcon:Re,removeIcon:Ie,previewIcon:we,downloadIcon:ye,iconRender:De,locale:me.value,isImageUrl:Le,progress:Ae,itemRender:Qe,appendActionVisible:ve,appendAction:Ce},_extends$1({},Q)):Ce==null?void 0:Ce()};return()=>{var Ce,ve,Ie;const{listType:we,type:ye}=W,{class:xe,style:Ne}=Z,Te=__rest$2(Z,["class","style"]),Le=_extends$1(_extends$1(_extends$1({onBatchStart:de,onError:fe,onProgress:he,onSuccess:ue},Te),W),{id:(Ce=W.id)!==null&&Ce!==void 0?Ce:K.id.value,prefixCls:G.value,beforeUpload:ce,onChange:void 0,disabled:ne.value});delete Le.remove,(!Q.default||ne.value)&&delete Le.id;const Ae={[`${G.value}-rtl`]:U.value==="rtl"};if(ye==="drag"){const Re=classNames(G.value,{[`${G.value}-drag`]:!0,[`${G.value}-drag-uploading`]:oe.value.some($e=>$e.status==="uploading"),[`${G.value}-drag-hover`]:se.value==="dragover",[`${G.value}-disabled`]:ne.value,[`${G.value}-rtl`]:U.value==="rtl"},Z.class,te.value);return ee(vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},Z),{},{class:classNames(`${G.value}-wrapper`,Ae,xe,te.value)}),[vue.createVNode("div",{class:Re,onDrop:pe,onDragover:pe,onDragleave:pe,style:Z.style},[vue.createVNode(Upload$2,_objectSpread2$1(_objectSpread2$1({},Le),{},{ref:ae,class:`${G.value}-btn`}),_objectSpread2$1({default:()=>[vue.createVNode("div",{class:`${G.value}-drag-container`},[(ve=Q.default)===null||ve===void 0?void 0:ve.call(Q)])]},Q))]),ke()]))}const Qe=classNames(G.value,{[`${G.value}-select`]:!0,[`${G.value}-select-${we}`]:!0,[`${G.value}-disabled`]:ne.value,[`${G.value}-rtl`]:U.value==="rtl"}),De=flattenChildren((Ie=Q.default)===null||Ie===void 0?void 0:Ie.call(Q)),Ee=Re=>vue.createVNode("div",{class:Qe,style:Re},[vue.createVNode(Upload$2,_objectSpread2$1(_objectSpread2$1({},Le),{},{ref:ae}),Q)]);return ee(we==="picture-card"?vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},Z),{},{class:classNames(`${G.value}-wrapper`,`${G.value}-picture-card-wrapper`,Ae,Z.class,te.value)}),[ke(Ee,!!(De&&De.length))]):vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},Z),{},{class:classNames(`${G.value}-wrapper`,Ae,Z.class,te.value)}),[Ee(De&&De.length?void 0:{display:"none"}),ke()]))}}});var __rest$1=function(W,C){var Q={};for(var Z in W)Object.prototype.hasOwnProperty.call(W,Z)&&C.indexOf(Z)<0&&(Q[Z]=W[Z]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var H=0,Z=Object.getOwnPropertySymbols(W);H<Z.length;H++)C.indexOf(Z[H])<0&&Object.prototype.propertyIsEnumerable.call(W,Z[H])&&(Q[Z[H]]=W[Z[H]]);return Q};const Dragger=vue.defineComponent({compatConfig:{MODE:3},name:"AUploadDragger",inheritAttrs:!1,props:uploadProps(),setup(W,C){let{slots:Q,attrs:Z}=C;return()=>{const{height:H}=W,K=__rest$1(W,["height"]),{style:G}=Z,U=__rest$1(Z,["style"]),X=_extends$1(_extends$1(_extends$1({},K),U),{type:"drag",style:_extends$1(_extends$1({},G),{height:typeof H=="number"?`${H}px`:H})});return vue.createVNode(Upload$1,X,Q)}}}),Upload=_extends$1(Upload$1,{Dragger,LIST_IGNORE,install(W){return W.component(Upload$1.name,Upload$1),W.component(Dragger.name,Dragger),W}}),flexWrapValues=["wrap","nowrap","wrap-reverse"],justifyContentValues=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],alignItemsValues=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],genClsWrap=(W,C)=>{const Q={};return flexWrapValues.forEach(Z=>{Q[`${W}-wrap-${Z}`]=C.wrap===Z}),Q},genClsAlign=(W,C)=>{const Q={};return alignItemsValues.forEach(Z=>{Q[`${W}-align-${Z}`]=C.align===Z}),Q[`${W}-align-stretch`]=!C.align&&!!C.vertical,Q},genClsJustify=(W,C)=>{const Q={};return justifyContentValues.forEach(Z=>{Q[`${W}-justify-${Z}`]=C.justify===Z}),Q};function createFlexClassNames(W,C){return classNames(_extends$1(_extends$1(_extends$1({},genClsWrap(W,C)),genClsAlign(W,C)),genClsJustify(W,C)))}const genFlexStyle=W=>{const{componentCls:C}=W;return{[C]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},genFlexGapStyle=W=>{const{componentCls:C}=W;return{[C]:{"&-gap-small":{gap:W.flexGapSM},"&-gap-middle":{gap:W.flexGap},"&-gap-large":{gap:W.flexGapLG}}}},genFlexWrapStyle=W=>{const{componentCls:C}=W,Q={};return flexWrapValues.forEach(Z=>{Q[`${C}-wrap-${Z}`]={flexWrap:Z}}),Q},genAlignItemsStyle=W=>{const{componentCls:C}=W,Q={};return alignItemsValues.forEach(Z=>{Q[`${C}-align-${Z}`]={alignItems:Z}}),Q},genJustifyContentStyle=W=>{const{componentCls:C}=W,Q={};return justifyContentValues.forEach(Z=>{Q[`${C}-justify-${Z}`]={justifyContent:Z}}),Q},useStyle=genComponentStyleHook("Flex",W=>{const C=merge$1(W,{flexGapSM:W.paddingXS,flexGap:W.padding,flexGapLG:W.paddingLG});return[genFlexStyle(C),genFlexGapStyle(C),genFlexWrapStyle(C),genAlignItemsStyle(C),genJustifyContentStyle(C)]});function isPresetSize(W){return["small","middle","large"].includes(W)}const flexProps=()=>({prefixCls:stringType(),vertical:booleanType(),wrap:stringType(),justify:stringType(),align:stringType(),flex:someType([Number,String]),gap:someType([Number,String]),component:anyType()});var __rest=function(W,C){var Q={};for(var Z in W)Object.prototype.hasOwnProperty.call(W,Z)&&C.indexOf(Z)<0&&(Q[Z]=W[Z]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var H=0,Z=Object.getOwnPropertySymbols(W);H<Z.length;H++)C.indexOf(Z[H])<0&&Object.prototype.propertyIsEnumerable.call(W,Z[H])&&(Q[Z[H]]=W[Z[H]]);return Q};const AFlex=vue.defineComponent({name:"AFlex",inheritAttrs:!1,props:flexProps(),setup(W,C){let{slots:Q,attrs:Z}=C;const{flex:H,direction:K}=useConfigContextInject(),{prefixCls:G}=useConfigInject("flex",W),[U,X]=useStyle(G),ee=vue.computed(()=>{var te;return[G.value,X.value,createFlexClassNames(G.value,W),{[`${G.value}-rtl`]:K.value==="rtl",[`${G.value}-gap-${W.gap}`]:isPresetSize(W.gap),[`${G.value}-vertical`]:(te=W.vertical)!==null&&te!==void 0?te:H==null?void 0:H.value.vertical}]});return()=>{var te;const{flex:ie,gap:ne,component:oe="div"}=W,re=__rest(W,["flex","gap","component"]),se={};return ie&&(se.flex=ie),ne&&!isPresetSize(ne)&&(se.gap=`${ne}px`),U(vue.createVNode(oe,_objectSpread2$1({class:[Z.class,ee.value],style:[Z.style,se]},omit$2(re,["justify","wrap","align","vertical"])),{default:()=>[(te=Q.default)===null||te===void 0?void 0:te.call(Q)]}))}}}),Flex=withInstall(AFlex),_hoisted_1$w={class:"col-view"},_hoisted_2$o=["onMousedown"],_sfc_main$V=vue.defineComponent({__name:"FormCol",props:{list:{type:Array,default:[]},data:{type:Object,default:null},index:{type:String},activeIndex:{type:String}},emits:["index","controlConfig"],setup(W,{emit:C}){useFormStore();const Q=W,Z=vue.ref("-1"),H=C;vue.watch(()=>Q.activeIndex,(ee,te)=>{Z.value=ee});function K(){console.log("// 开始拖拽")}function G(ee){if(ee.to.className.includes("col-drag-list")&&ee.to.className.includes(`col-drag-list-${Q.index}`))Z.value=Q.index+"-"+ee.newIndex;else if(ee.to.className.includes("col-drag-list")&&!ee.to.className.includes(`col-drag-list-${Q.index}`)){let te=Array.from(ee.to.classList).find(ie=>ie.includes("col-drag-list-"));if(te){let ie=te.split("-"),ne=ie[ie.length-2]+"-"+ie[ie.length-1];Z.value=ne+"-"+ee.newIndex}else Z.value="-1"}else Z.value=ee.newIndex;H("index",Z.value)}function U(ee,te,ie){Z.value=te,H("controlConfig",ee),H("index",te),ie.stopPropagation(),ie.preventDefault()}function X(ee){return!ee.to.className.includes("row-drag-list")}return(ee,te)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$w,[vue.createVNode(vue.unref(VueDraggableNext),{class:vue.normalizeClass(["col-drag-list",`col-drag-list-${W.index}`]),list:W.data.list,animation:"300",handle:".move",group:"itxst","ghost-class":"ghost","force-fallback":!0,onStart:K,onEnd:te[0]||(te[0]=ie=>G(ie)),move:X,"drag-class":"dragClass1"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(W.data.list,(ie,ne)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-view",{active:Z.value==W.index+"-"+ne}]),onMousedown:oe=>U(ie,W.index+"-"+ne,oe)},[vue.createVNode(FormInput,{data:ie,list:W.data.list,activeIndex:Z.value,index:W.index+"-"+ne},null,8,["data","list","activeIndex","index"])],42,_hoisted_2$o))),256))]),_:1},8,["class","list"])]))}}),FormCol=_export_sfc(_sfc_main$V,[["__scopeId","data-v-01fe4db7"]]),FormCol$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormCol},Symbol.toStringTag,{value:"Module"})),_hoisted_1$v={class:"move"},_hoisted_2$n={key:0,class:"widget-view-drag"},_hoisted_3$j={key:1,class:"item-action"},_hoisted_4$e={class:"move1"},_hoisted_5$c={key:0,class:"widget-view-drag"},_hoisted_6$b={key:0,class:"item-action"},_sfc_main$U=vue.defineComponent({__name:"FormGrid",props:{list:{type:Array,default:[]},data:{type:Object,default:null},activeIndex:{type:String,default:""},index:{type:String,default:""}},emits:["childConfig","index"],setup(W,{emit:C}){const Q=useFormStore(),Z=W,H=vue.ref("-1");vue.watch(()=>Z.activeIndex,(se,ae)=>{H.value=se});const K=C;function G(se){K("childConfig",se)}function U(se){H.value=se,K("index",H.value)}function X(se,ae,le){H.value=ae,K("childConfig",se),K("index",H.value),le.stopPropagation(),le.preventDefault()}function ee(se){return!!(se.draggedContext.element.type=="col"&&se.to.className.includes("row-drag-list"))}function te(){H.value="-1"}function ie(se){if(se.to.className.includes("row-drag-list")&&se.to.className.includes(`row-drag-list-${Z.index}`))H.value=Z.index+"-"+se.newIndex;else if(se.to.className.includes("row-drag-list")&&!se.to.className.includes(`row-drag-list-${Z.index}`)){let ae=Array.from(se.to.classList).find(le=>le.includes("row-drag-list-"));if(ae){let le=ae.split("-"),ce=le[le.length-1];H.value=ce+"-"+se.newIndex}else H.value="-1"}else H.value=se.newIndex;K("index",H.value)}function ne(se){const ae=JSON.parse(JSON.stringify(se));if(Z.data.columns&&Z.data.columns.length>0){let le=Z.data.columns.findIndex(ce=>ce.key==se.key);le>-1&&(ae.key=guid(),ae.id=guid(),Z.data.columns.splice(le+1,0,ae))}}function oe(se){let ae=Z.data.columns.findIndex(le=>le.key==se.key);ae>-1&&Z.data.columns.splice(ae,1)}function re(){if(Z.data.columns.length>0)Modal.confirm({title:"确定要删除该栅格布局吗?",content:"如果该布局存在表单,将会一并删除",onOk(){const se=Z.list.findIndex(ae=>ae.id==Z.data.id);se!=-1&&Z.list.splice(se,1)},onCancel(){}});else{const se=Z.list.findIndex(ae=>ae.id==Z.data.id);se!=-1&&Z.list.splice(se,1)}}return(se,ae)=>{const le=vue.resolveComponent("a-col"),ce=vue.resolveComponent("a-row"),de=vue.resolveComponent("a-form");return vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$v,[W.activeIndex==W.index?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$n,[vue.createVNode(vue.unref(DragOutlined),{style:{padding:"6px"}})])):vue.createCommentVNode("",!0)]),vue.createVNode(de,{style:vue.normalizeStyle({padding:`${W.data.top||0}px ${W.data.right||0}px ${W.data.bottom||0}px ${W.data.left||0}px`}),"label-col":{style:{width:vue.unref(Q).formData.config.labelWidth+"px"}},labelWrap:!0,layout:W.data.layout,labelAlign:W.data.labelPosition},{default:vue.withCtx(()=>[vue.createVNode(ce,{gutter:[W.data.options.gutter||0,0],tyle:"flex",class:vue.normalizeClass(`${W.data.class||""}`),style:vue.normalizeStyle({marginLeft:-(W.data.options.gutter||0)/2+"px",marginRight:-(W.data.options.gutter||0)/2+"px"})},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(VueDraggableNext),{class:vue.normalizeClass(["row-drag-list",`row-drag-list-${W.index}`]),list:W.data.columns,animation:"1000",handle:".move1",group:"itxst",move:ee,"ghost-class":"ghost","force-fallback":!0,onStart:te,onEnd:ae[0]||(ae[0]=ue=>ie(ue))},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(W.data.columns,(ue,he)=>(vue.openBlock(),vue.createBlock(le,{class:vue.normalizeClass(["widget-col-item",{active:H.value==W.index+"-"+he}]),span:ue.options.span,offset:ue.options.offset,onMousedown:fe=>X(ue,W.index+"-"+he,fe)},{default:vue.withCtx(()=>[ue.type=="col"?(vue.openBlock(),vue.createBlock(FormCol,{key:0,data:ue,list:W.data.columns,onIndex:U,activeIndex:H.value,index:W.index+"-"+he,onControlConfig:G},null,8,["data","list","activeIndex","index"])):vue.createCommentVNode("",!0),W.activeIndex===W.index+"-"+he?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$j,[vue.createVNode(vue.unref(CopyOutlined),{style:{padding:"3px 5px"},onClick:fe=>ne(ue)},null,8,["onClick"]),W.data.columns.length!==1?(vue.openBlock(),vue.createBlock(vue.unref(DeleteOutlined),{key:0,onClick:fe=>oe(ue)},null,8,["onClick"])):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_4$e,[W.activeIndex==W.index+"-"+he?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$c,[vue.createVNode(vue.unref(DragOutlined),{style:{padding:"6px"}})])):vue.createCommentVNode("",!0)])]),_:2},1032,["class","span","offset","onMousedown"]))),256))]),_:1},8,["class","list"])]),_:1},8,["gutter","class","style"]),W.activeIndex===W.index?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$b,[vue.createVNode(vue.unref(DeleteOutlined),{style:{padding:"3px 5px",color:"#fff"},onClick:ae[1]||(ae[1]=ue=>re())})])):vue.createCommentVNode("",!0)]),_:1},8,["style","label-col","layout","labelAlign"])])}}}),FormGrid=_export_sfc(_sfc_main$U,[["__scopeId","data-v-a55ce6ce"]]),FormGrid$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormGrid},Symbol.toStringTag,{value:"Module"})),_hoisted_1$u={id:"table-css"},_hoisted_2$m={style:{"text-align":"left","padding-left":"50px"}},_hoisted_3$i={class:"table-header-css",style:{"text-align":"left","padding-bottom":"5px"}},_hoisted_4$d={class:"move"},_hoisted_5$b={key:0,class:"widget-view-drag"},_hoisted_6$a=["onClick"],_hoisted_7$9={key:0,class:"item-action"},_sfc_main$T=vue.defineComponent({__name:"FormTable",props:{list:{type:Array,default:[]},data:{type:Object,default:null},activeIndex:{type:String,default:""},index:{type:String,default:""}},setup(W){const C=useFormStore();storeToRefs(C);const Q=W;let Z=vue.ref(null),H=vue.ref(!1);function K(ie){Z.value!=null&&(Z.value.className=""),Z.value=ie,H.value=!0,ie.className="tableClass"}let G=0;function U(){Q.data.tableColumns.push({title:"自定义列"+G,dataIndex:"code"}),G++}function X(){Z.value.children==null&&Reflect.set(Z.value,"children",[]),Z.value.children.push({title:"自定义列"+G,dataIndex:"code",key:"code"}),G++}function ee(ie){const ne=JSON.parse(JSON.stringify(ie));if(Q.list&&Q.list.length>0){let oe=Q.list.findIndex(re=>re.id==ie.id);oe>-1&&(ne.id=guid(),ne.key=guid(),Q.list.splice(oe+1,0,ne))}}function te(ie){if(Q.list&&Q.list.length>0){let ne=Q.list.findIndex(oe=>oe.id==ie.id);ne>-1&&Q.list.splice(ne,1)}}return(ie,ne)=>{const oe=vue.resolveComponent("a-button"),re=vue.resolveComponent("a-space"),se=vue.resolveComponent("a-table");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$u,[vue.createElementVNode("div",_hoisted_2$m,[vue.createElementVNode("a",{onClick:U},"添加列"),vue.createTextVNode(" "),vue.unref(H)?(vue.openBlock(),vue.createElementBlock("a",{key:0,onClick:X},"分组『"+vue.toDisplayString(vue.unref(Z).title)+"』添加列",1)):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_3$i,[vue.createVNode(re,null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(W.data.options.headerBtns,ae=>(vue.openBlock(),vue.createBlock(oe,{type:ae.type,size:"small"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(ae.title),1)]),_:2},1032,["type"]))),256))]),_:1})]),vue.createElementVNode("div",_hoisted_4$d,[W.activeIndex==W.index.toString()?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$b,[vue.createVNode(vue.unref(DragOutlined),{style:{padding:"6px"}})])):vue.createCommentVNode("",!0)]),vue.createVNode(se,{columns:W.data.tableColumns,bordered:"",size:"middle",scroll:{y:240}},{headerCell:vue.withCtx(({column:ae})=>[vue.createElementVNode("div",{onClick:le=>K(ae)},vue.toDisplayString(ae.title),9,_hoisted_6$a)]),_:1},8,["columns"]),W.activeIndex==W.index.toString()?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$9,[vue.createVNode(vue.unref(CopyOutlined),{style:{padding:"3px 5px"},onClick:ne[0]||(ne[0]=ae=>ee(W.data))}),vue.createVNode(vue.unref(DeleteOutlined),{onClick:ne[1]||(ne[1]=ae=>te(W.data))})])):vue.createCommentVNode("",!0)])}}}),FormTable=_export_sfc(_sfc_main$T,[["__scopeId","data-v-a510b67f"]]),FormTable$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormTable},Symbol.toStringTag,{value:"Module"})),_hoisted_1$t={id:"report-css"},_hoisted_2$l={class:"report-table-css"},_hoisted_3$h=["onClick"],_sfc_main$S=vue.defineComponent({__name:"FormReport",props:{data:{type:Object,default:null},activeIndex:{type:String,default:""},index:{type:Number,default:""}},setup(W){const C=useFormStore(),{formData:Q}=storeToRefs(C);let Z=vue.ref(null),H=vue.ref(!1);function K(X,ee){Z.value!=null&&(Z.value.className=""),Z.value=X,H.value=!0}function G(){}function U(){Z.value.columns.push({type:"td",options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},list:[],key:"fuzps6zb",rules:[]})}return(X,ee)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$t,[vue.createElementVNode("div",{style:{"text-align":"left","padding-left":"50px"}},[vue.createElementVNode("a",{onClick:G},"添加行"),vue.createTextVNode(" "),vue.createElementVNode("a",{onClick:U},"添加列")]),vue.createElementVNode("table",_hoisted_2$l,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(Q).list[W.index].rows,(te,ie)=>(vue.openBlock(),vue.createElementBlock("tr",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(te.columns,(ne,oe)=>(vue.openBlock(),vue.createElementBlock("td",{class:"report-table-item",onClick:re=>K(te)}," fdfd ",8,_hoisted_3$h))),256))]))),256))])]))}}),FormReport=_export_sfc(_sfc_main$S,[["__scopeId","data-v-c1f306bf"]]),FormReport$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormReport},Symbol.toStringTag,{value:"Module"})),useDataStore=defineStore({id:"dataStore",state:()=>({selectList:[],updateList:[],delList:[],selectTables:[]}),getters:{getSelectData(W){return W.selectList},getSelectTables(W){return W.selectTables},getUpdateData(W){return W.updateList}},actions:{addSelectData(W){this.selectList.push(...W)},setSelectData(W){this.selectList=W},setUpdateData(W){this.updateList=W},addUpdateData(W){this.updateList.push(...W)},addSelectTable(W){this.selectTables.push(W)},setSelectTables(W){this.selectTables=W}}});let commonProps$1=vue.reactive({hTable:0,editTable:0,paginations:{}});vue.ref({html:"",columns:{},pagScript:{},variableScript:{},searchData:[]});function generateTs(W,C){let Q={};const Z=generateDataSource(W),H=generateEventScript(W,C);return Q={dataSource:Z,global:H.global,computed:H.computed,mounted:H.mounted,baseInfo:H.baseInfo,fun:H.fun},Q}function generateExposed(W){let Q=W.eventScript.find(K=>K.type=="Exposed"),Z="";return Q&&(Z=Q.name.replace(/,/g,`,
|
|
467
|
+
`]:{opacity:1},[Z]:{color:W.colorTextDescription,transition:`all ${W.motionDurationSlow}`},[`&:hover ${Z}`]:{color:W.colorText}},[`${C}-icon ${Z}`]:{color:W.colorTextDescription,fontSize:H},[`${G}-progress`]:{position:"absolute",bottom:-W.uploadProgressOffset,width:"100%",paddingInlineStart:H+W.paddingXS,fontSize:H,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${G}:hover ${X}`]:{opacity:1,color:W.colorText},[`${G}-error`]:{color:W.colorError,[`${G}-name, ${C}-icon ${Z}`]:{color:W.colorError},[U]:{[`${Z}, ${Z}:hover`]:{color:W.colorError},[X]:{opacity:1}}},[`${C}-list-item-container`]:{transition:`opacity ${W.motionDurationSlow}, height ${W.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},uploadAnimateInlineIn=new Keyframe("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),uploadAnimateInlineOut=new Keyframe("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),genMotionStyle=W=>{const{componentCls:C}=W,Q=`${C}-animate-inline`;return[{[`${C}-wrapper`]:{[`${Q}-appear, ${Q}-enter, ${Q}-leave`]:{animationDuration:W.motionDurationSlow,animationTimingFunction:W.motionEaseInOutCirc,animationFillMode:"forwards"},[`${Q}-appear, ${Q}-enter`]:{animationName:uploadAnimateInlineIn},[`${Q}-leave`]:{animationName:uploadAnimateInlineOut}}},uploadAnimateInlineIn,uploadAnimateInlineOut]},genPictureStyle=W=>{const{componentCls:C,iconCls:Q,uploadThumbnailSize:Z,uploadProgressOffset:H}=W,K=`${C}-list`,G=`${K}-item`;return{[`${C}-wrapper`]:{[`${K}${K}-picture, ${K}${K}-picture-card`]:{[G]:{position:"relative",height:Z+W.lineWidth*2+W.paddingXS*2,padding:W.paddingXS,border:`${W.lineWidth}px ${W.lineType} ${W.colorBorder}`,borderRadius:W.borderRadiusLG,"&:hover":{background:"transparent"},[`${G}-thumbnail`]:_extends$1(_extends$1({},textEllipsis),{width:Z,height:Z,lineHeight:`${Z+W.paddingSM}px`,textAlign:"center",flex:"none",[Q]:{fontSize:W.fontSizeHeading2,color:W.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${G}-progress`]:{bottom:H,width:`calc(100% - ${W.paddingSM*2}px)`,marginTop:0,paddingInlineStart:Z+W.paddingXS}},[`${G}-error`]:{borderColor:W.colorError,[`${G}-thumbnail ${Q}`]:{"svg path[fill='#e6f7ff']":{fill:W.colorErrorBg},"svg path[fill='#1890ff']":{fill:W.colorError}}},[`${G}-uploading`]:{borderStyle:"dashed",[`${G}-name`]:{marginBottom:H}}}}}},genPictureCardStyle=W=>{const{componentCls:C,iconCls:Q,fontSizeLG:Z,colorTextLightSolid:H}=W,K=`${C}-list`,G=`${K}-item`,U=W.uploadPicCardSize;return{[`${C}-wrapper${C}-picture-card-wrapper`]:_extends$1(_extends$1({},clearFix()),{display:"inline-block",width:"100%",[`${C}${C}-select`]:{width:U,height:U,marginInlineEnd:W.marginXS,marginBottom:W.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:W.colorFillAlter,border:`${W.lineWidth}px dashed ${W.colorBorder}`,borderRadius:W.borderRadiusLG,cursor:"pointer",transition:`border-color ${W.motionDurationSlow}`,[`> ${C}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${C}-disabled):hover`]:{borderColor:W.colorPrimary}},[`${K}${K}-picture-card`]:{[`${K}-item-container`]:{display:"inline-block",width:U,height:U,marginBlock:`0 ${W.marginXS}px`,marginInline:`0 ${W.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[G]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${W.paddingXS*2}px)`,height:`calc(100% - ${W.paddingXS*2}px)`,backgroundColor:W.colorBgMask,opacity:0,transition:`all ${W.motionDurationSlow}`,content:'" "'}},[`${G}:hover`]:{[`&::before, ${G}-actions`]:{opacity:1}},[`${G}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${W.motionDurationSlow}`,[`${Q}-eye, ${Q}-download, ${Q}-delete`]:{zIndex:10,width:Z,margin:`0 ${W.marginXXS}px`,fontSize:Z,cursor:"pointer",transition:`all ${W.motionDurationSlow}`}},[`${G}-actions, ${G}-actions:hover`]:{[`${Q}-eye, ${Q}-download, ${Q}-delete`]:{color:new TinyColor(H).setAlpha(.65).toRgbString(),"&:hover":{color:H}}},[`${G}-thumbnail, ${G}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${G}-name`]:{display:"none",textAlign:"center"},[`${G}-file + ${G}-name`]:{position:"absolute",bottom:W.margin,display:"block",width:`calc(100% - ${W.paddingXS*2}px)`},[`${G}-uploading`]:{[`&${G}`]:{backgroundColor:W.colorFillAlter},[`&::before, ${Q}-eye, ${Q}-download, ${Q}-delete`]:{display:"none"}},[`${G}-progress`]:{bottom:W.marginXL,width:`calc(100% - ${W.paddingXS*2}px)`,paddingInlineStart:0}}})}},genRtlStyle=W=>{const{componentCls:C}=W;return{[`${C}-rtl`]:{direction:"rtl"}}},genBaseStyle=W=>{const{componentCls:C,colorTextDisabled:Q}=W;return{[`${C}-wrapper`]:_extends$1(_extends$1({},resetComponent(W)),{[C]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${C}-select`]:{display:"inline-block"},[`${C}-disabled`]:{color:Q,cursor:"not-allowed"}})}},useStyle$1=genComponentStyleHook("Upload",W=>{const{fontSizeHeading3:C,fontSize:Q,lineHeight:Z,lineWidth:H,controlHeightLG:K}=W,G=Math.round(Q*Z),U=merge$1(W,{uploadThumbnailSize:C*2,uploadProgressOffset:G/2+H,uploadPicCardSize:K*2.55});return[genBaseStyle(U),genDraggerStyle(U),genPictureStyle(U),genPictureCardStyle(U),genListStyle(U),genMotionStyle(U),genRtlStyle(U),genCollapseMotion(U)]});var __awaiter=function(W,C,Q,Z){function H(K){return K instanceof Q?K:new Q(function(G){G(K)})}return new(Q||(Q=Promise))(function(K,G){function U(te){try{ee(Z.next(te))}catch(ie){G(ie)}}function X(te){try{ee(Z.throw(te))}catch(ie){G(ie)}}function ee(te){te.done?K(te.value):H(te.value).then(U,X)}ee((Z=Z.apply(W,C||[])).next())})},__rest$2=function(W,C){var Q={};for(var Z in W)Object.prototype.hasOwnProperty.call(W,Z)&&C.indexOf(Z)<0&&(Q[Z]=W[Z]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var H=0,Z=Object.getOwnPropertySymbols(W);H<Z.length;H++)C.indexOf(Z[H])<0&&Object.prototype.propertyIsEnumerable.call(W,Z[H])&&(Q[Z[H]]=W[Z[H]]);return Q};const LIST_IGNORE=`__LIST_IGNORE_${Date.now()}__`,Upload$1=vue.defineComponent({compatConfig:{MODE:3},name:"AUpload",inheritAttrs:!1,props:initDefaultProps(uploadProps(),{type:"select",multiple:!1,action:"",data:{},accept:"",showUploadList:!0,listType:"text",supportServerRender:!0}),setup(W,C){let{slots:Q,attrs:Z,expose:H}=C;const K=useInjectFormItemContext(),{prefixCls:G,direction:U,disabled:X}=useConfigInject("upload",W),[ee,te]=useStyle$1(G),ie=useInjectDisabled(),ne=vue.computed(()=>{var Ce;return(Ce=X.value)!==null&&Ce!==void 0?Ce:ie.value}),[oe,re]=useMergedState(W.defaultFileList||[],{value:vue.toRef(W,"fileList"),postState:Ce=>{const ve=Date.now();return(Ce??[]).map((Ie,we)=>(!Ie.uid&&!Object.isFrozen(Ie)&&(Ie.uid=`__AUTO__${ve}_${we}__`),Ie))}}),se=vue.ref("drop"),ae=vue.ref(null);vue.onMounted(()=>{devWarning(W.fileList!==void 0||Z.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),devWarning(W.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),devWarning(W.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const le=(Ce,ve,Ie)=>{var we,ye;let xe=[...ve];W.maxCount===1?xe=xe.slice(-1):W.maxCount&&(xe=xe.slice(0,W.maxCount)),re(xe);const Ne={file:Ce,fileList:xe};Ie&&(Ne.event=Ie),(we=W["onUpdate:fileList"])===null||we===void 0||we.call(W,Ne.fileList),(ye=W.onChange)===null||ye===void 0||ye.call(W,Ne),K.onFieldChange()},ce=(Ce,ve)=>__awaiter(this,void 0,void 0,function*(){const{beforeUpload:Ie,transformFile:we}=W;let ye=Ce;if(Ie){const xe=yield Ie(Ce,ve);if(xe===!1)return!1;if(delete Ce[LIST_IGNORE],xe===LIST_IGNORE)return Object.defineProperty(Ce,LIST_IGNORE,{value:!0,configurable:!0}),!1;typeof xe=="object"&&xe&&(ye=xe)}return we&&(ye=yield we(ye)),ye}),de=Ce=>{const ve=Ce.filter(ye=>!ye.file[LIST_IGNORE]);if(!ve.length)return;const Ie=ve.map(ye=>file2Obj(ye.file));let we=[...oe.value];Ie.forEach(ye=>{we=updateFileList(ye,we)}),Ie.forEach((ye,xe)=>{let Ne=ye;if(ve[xe].parsedFile)ye.status="uploading";else{const{originFileObj:Te}=ye;let Le;try{Le=new File([Te],Te.name,{type:Te.type})}catch{Le=new Blob([Te],{type:Te.type}),Le.name=Te.name,Le.lastModifiedDate=new Date,Le.lastModified=new Date().getTime()}Le.uid=ye.uid,Ne=Le}le(Ne,we)})},ue=(Ce,ve,Ie)=>{try{typeof Ce=="string"&&(Ce=JSON.parse(Ce))}catch{}if(!getFileItem(ve,oe.value))return;const we=file2Obj(ve);we.status="done",we.percent=100,we.response=Ce,we.xhr=Ie;const ye=updateFileList(we,oe.value);le(we,ye)},he=(Ce,ve)=>{if(!getFileItem(ve,oe.value))return;const Ie=file2Obj(ve);Ie.status="uploading",Ie.percent=Ce.percent;const we=updateFileList(Ie,oe.value);le(Ie,we,Ce)},fe=(Ce,ve,Ie)=>{if(!getFileItem(Ie,oe.value))return;const we=file2Obj(Ie);we.error=Ce,we.response=ve,we.status="error";const ye=updateFileList(we,oe.value);le(we,ye)},ge=Ce=>{let ve;const Ie=W.onRemove||W.remove;Promise.resolve(typeof Ie=="function"?Ie(Ce):Ie).then(we=>{var ye,xe;if(we===!1)return;const Ne=removeFileItem(Ce,oe.value);Ne&&(ve=_extends$1(_extends$1({},Ce),{status:"removed"}),(ye=oe.value)===null||ye===void 0||ye.forEach(Te=>{const Le=ve.uid!==void 0?"uid":"name";Te[Le]===ve[Le]&&!Object.isFrozen(Te)&&(Te.status="removed")}),(xe=ae.value)===null||xe===void 0||xe.abort(ve),le(ve,Ne))})},pe=Ce=>{var ve;se.value=Ce.type,Ce.type==="drop"&&((ve=W.onDrop)===null||ve===void 0||ve.call(W,Ce))};H({onBatchStart:de,onSuccess:ue,onProgress:he,onError:fe,fileList:oe,upload:ae});const[me]=useLocaleReceiver("Upload",localeValues$1.Upload,vue.computed(()=>W.locale)),ke=(Ce,ve)=>{const{removeIcon:Ie,previewIcon:we,downloadIcon:ye,previewFile:xe,onPreview:Ne,onDownload:Te,isImageUrl:Le,progress:Ae,itemRender:Qe,iconRender:De,showUploadList:Ee}=W,{showDownloadIcon:Re,showPreviewIcon:$e,showRemoveIcon:Be}=typeof Ee=="boolean"?{}:Ee;return Ee?vue.createVNode(UploadList,{prefixCls:G.value,listType:W.listType,items:oe.value,previewFile:xe,onPreview:Ne,onDownload:Te,onRemove:ge,showRemoveIcon:!ne.value&&Be,showPreviewIcon:$e,showDownloadIcon:Re,removeIcon:Ie,previewIcon:we,downloadIcon:ye,iconRender:De,locale:me.value,isImageUrl:Le,progress:Ae,itemRender:Qe,appendActionVisible:ve,appendAction:Ce},_extends$1({},Q)):Ce==null?void 0:Ce()};return()=>{var Ce,ve,Ie;const{listType:we,type:ye}=W,{class:xe,style:Ne}=Z,Te=__rest$2(Z,["class","style"]),Le=_extends$1(_extends$1(_extends$1({onBatchStart:de,onError:fe,onProgress:he,onSuccess:ue},Te),W),{id:(Ce=W.id)!==null&&Ce!==void 0?Ce:K.id.value,prefixCls:G.value,beforeUpload:ce,onChange:void 0,disabled:ne.value});delete Le.remove,(!Q.default||ne.value)&&delete Le.id;const Ae={[`${G.value}-rtl`]:U.value==="rtl"};if(ye==="drag"){const Re=classNames(G.value,{[`${G.value}-drag`]:!0,[`${G.value}-drag-uploading`]:oe.value.some($e=>$e.status==="uploading"),[`${G.value}-drag-hover`]:se.value==="dragover",[`${G.value}-disabled`]:ne.value,[`${G.value}-rtl`]:U.value==="rtl"},Z.class,te.value);return ee(vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},Z),{},{class:classNames(`${G.value}-wrapper`,Ae,xe,te.value)}),[vue.createVNode("div",{class:Re,onDrop:pe,onDragover:pe,onDragleave:pe,style:Z.style},[vue.createVNode(Upload$2,_objectSpread2$1(_objectSpread2$1({},Le),{},{ref:ae,class:`${G.value}-btn`}),_objectSpread2$1({default:()=>[vue.createVNode("div",{class:`${G.value}-drag-container`},[(ve=Q.default)===null||ve===void 0?void 0:ve.call(Q)])]},Q))]),ke()]))}const Qe=classNames(G.value,{[`${G.value}-select`]:!0,[`${G.value}-select-${we}`]:!0,[`${G.value}-disabled`]:ne.value,[`${G.value}-rtl`]:U.value==="rtl"}),De=flattenChildren((Ie=Q.default)===null||Ie===void 0?void 0:Ie.call(Q)),Ee=Re=>vue.createVNode("div",{class:Qe,style:Re},[vue.createVNode(Upload$2,_objectSpread2$1(_objectSpread2$1({},Le),{},{ref:ae}),Q)]);return ee(we==="picture-card"?vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},Z),{},{class:classNames(`${G.value}-wrapper`,`${G.value}-picture-card-wrapper`,Ae,Z.class,te.value)}),[ke(Ee,!!(De&&De.length))]):vue.createVNode("span",_objectSpread2$1(_objectSpread2$1({},Z),{},{class:classNames(`${G.value}-wrapper`,Ae,Z.class,te.value)}),[Ee(De&&De.length?void 0:{display:"none"}),ke()]))}}});var __rest$1=function(W,C){var Q={};for(var Z in W)Object.prototype.hasOwnProperty.call(W,Z)&&C.indexOf(Z)<0&&(Q[Z]=W[Z]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var H=0,Z=Object.getOwnPropertySymbols(W);H<Z.length;H++)C.indexOf(Z[H])<0&&Object.prototype.propertyIsEnumerable.call(W,Z[H])&&(Q[Z[H]]=W[Z[H]]);return Q};const Dragger=vue.defineComponent({compatConfig:{MODE:3},name:"AUploadDragger",inheritAttrs:!1,props:uploadProps(),setup(W,C){let{slots:Q,attrs:Z}=C;return()=>{const{height:H}=W,K=__rest$1(W,["height"]),{style:G}=Z,U=__rest$1(Z,["style"]),X=_extends$1(_extends$1(_extends$1({},K),U),{type:"drag",style:_extends$1(_extends$1({},G),{height:typeof H=="number"?`${H}px`:H})});return vue.createVNode(Upload$1,X,Q)}}}),Upload=_extends$1(Upload$1,{Dragger,LIST_IGNORE,install(W){return W.component(Upload$1.name,Upload$1),W.component(Dragger.name,Dragger),W}}),flexWrapValues=["wrap","nowrap","wrap-reverse"],justifyContentValues=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],alignItemsValues=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],genClsWrap=(W,C)=>{const Q={};return flexWrapValues.forEach(Z=>{Q[`${W}-wrap-${Z}`]=C.wrap===Z}),Q},genClsAlign=(W,C)=>{const Q={};return alignItemsValues.forEach(Z=>{Q[`${W}-align-${Z}`]=C.align===Z}),Q[`${W}-align-stretch`]=!C.align&&!!C.vertical,Q},genClsJustify=(W,C)=>{const Q={};return justifyContentValues.forEach(Z=>{Q[`${W}-justify-${Z}`]=C.justify===Z}),Q};function createFlexClassNames(W,C){return classNames(_extends$1(_extends$1(_extends$1({},genClsWrap(W,C)),genClsAlign(W,C)),genClsJustify(W,C)))}const genFlexStyle=W=>{const{componentCls:C}=W;return{[C]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},genFlexGapStyle=W=>{const{componentCls:C}=W;return{[C]:{"&-gap-small":{gap:W.flexGapSM},"&-gap-middle":{gap:W.flexGap},"&-gap-large":{gap:W.flexGapLG}}}},genFlexWrapStyle=W=>{const{componentCls:C}=W,Q={};return flexWrapValues.forEach(Z=>{Q[`${C}-wrap-${Z}`]={flexWrap:Z}}),Q},genAlignItemsStyle=W=>{const{componentCls:C}=W,Q={};return alignItemsValues.forEach(Z=>{Q[`${C}-align-${Z}`]={alignItems:Z}}),Q},genJustifyContentStyle=W=>{const{componentCls:C}=W,Q={};return justifyContentValues.forEach(Z=>{Q[`${C}-justify-${Z}`]={justifyContent:Z}}),Q},useStyle=genComponentStyleHook("Flex",W=>{const C=merge$1(W,{flexGapSM:W.paddingXS,flexGap:W.padding,flexGapLG:W.paddingLG});return[genFlexStyle(C),genFlexGapStyle(C),genFlexWrapStyle(C),genAlignItemsStyle(C),genJustifyContentStyle(C)]});function isPresetSize(W){return["small","middle","large"].includes(W)}const flexProps=()=>({prefixCls:stringType(),vertical:booleanType(),wrap:stringType(),justify:stringType(),align:stringType(),flex:someType([Number,String]),gap:someType([Number,String]),component:anyType()});var __rest=function(W,C){var Q={};for(var Z in W)Object.prototype.hasOwnProperty.call(W,Z)&&C.indexOf(Z)<0&&(Q[Z]=W[Z]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var H=0,Z=Object.getOwnPropertySymbols(W);H<Z.length;H++)C.indexOf(Z[H])<0&&Object.prototype.propertyIsEnumerable.call(W,Z[H])&&(Q[Z[H]]=W[Z[H]]);return Q};const AFlex=vue.defineComponent({name:"AFlex",inheritAttrs:!1,props:flexProps(),setup(W,C){let{slots:Q,attrs:Z}=C;const{flex:H,direction:K}=useConfigContextInject(),{prefixCls:G}=useConfigInject("flex",W),[U,X]=useStyle(G),ee=vue.computed(()=>{var te;return[G.value,X.value,createFlexClassNames(G.value,W),{[`${G.value}-rtl`]:K.value==="rtl",[`${G.value}-gap-${W.gap}`]:isPresetSize(W.gap),[`${G.value}-vertical`]:(te=W.vertical)!==null&&te!==void 0?te:H==null?void 0:H.value.vertical}]});return()=>{var te;const{flex:ie,gap:ne,component:oe="div"}=W,re=__rest(W,["flex","gap","component"]),se={};return ie&&(se.flex=ie),ne&&!isPresetSize(ne)&&(se.gap=`${ne}px`),U(vue.createVNode(oe,_objectSpread2$1({class:[Z.class,ee.value],style:[Z.style,se]},omit$2(re,["justify","wrap","align","vertical"])),{default:()=>[(te=Q.default)===null||te===void 0?void 0:te.call(Q)]}))}}}),Flex=withInstall(AFlex),_hoisted_1$w={id:"table-css"},_hoisted_2$o={style:{"text-align":"left","padding-left":"50px"}},_hoisted_3$j={class:"table-header-css",style:{"text-align":"left","padding-bottom":"5px"}},_hoisted_4$e={class:"move"},_hoisted_5$c={key:0,class:"widget-view-drag"},_hoisted_6$b=["onClick"],_hoisted_7$9={key:0,class:"item-action"},_sfc_main$V=vue.defineComponent({__name:"FormTable",props:{list:{type:Array,default:[]},data:{type:Object,default:null},activeIndex:{type:String,default:""},index:{type:String,default:""}},setup(W){const C=useFormStore();storeToRefs(C);const Q=W;let Z=vue.ref(null),H=vue.ref(!1);function K(ie){Z.value!=null&&(Z.value.className=""),Z.value=ie,H.value=!0,ie.className="tableClass"}let G=0;function U(){Q.data.tableColumns.push({title:"自定义列"+G,dataIndex:"code"}),G++}function X(){Z.value.children==null&&Reflect.set(Z.value,"children",[]),Z.value.children.push({title:"自定义列"+G,dataIndex:"code",key:"code"}),G++}function ee(ie){const ne=JSON.parse(JSON.stringify(ie));if(Q.list&&Q.list.length>0){let oe=Q.list.findIndex(re=>re.id==ie.id);oe>-1&&(ne.id=guid(),ne.key=guid(),Q.list.splice(oe+1,0,ne))}}function te(ie){if(Q.list&&Q.list.length>0){let ne=Q.list.findIndex(oe=>oe.id==ie.id);ne>-1&&Q.list.splice(ne,1)}}return(ie,ne)=>{const oe=vue.resolveComponent("a-button"),re=vue.resolveComponent("a-space"),se=vue.resolveComponent("a-table");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$w,[vue.createElementVNode("div",_hoisted_2$o,[vue.createElementVNode("a",{onClick:U},"添加列"),vue.createTextVNode(" "),vue.unref(H)?(vue.openBlock(),vue.createElementBlock("a",{key:0,onClick:X},"分组『"+vue.toDisplayString(vue.unref(Z).title)+"』添加列",1)):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_3$j,[vue.createVNode(re,null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(W.data.options.headerBtns,ae=>(vue.openBlock(),vue.createBlock(oe,{type:ae.type,size:"small"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(ae.title),1)]),_:2},1032,["type"]))),256))]),_:1})]),vue.createElementVNode("div",_hoisted_4$e,[W.activeIndex==W.index.toString()?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$c,[vue.createVNode(vue.unref(DragOutlined),{style:{padding:"6px"}})])):vue.createCommentVNode("",!0)]),vue.createVNode(se,{columns:W.data.tableColumns,bordered:"",size:"middle",scroll:{y:240}},{headerCell:vue.withCtx(({column:ae})=>[vue.createElementVNode("div",{onClick:le=>K(ae)},vue.toDisplayString(ae.title),9,_hoisted_6$b)]),_:1},8,["columns"]),W.activeIndex==W.index.toString()?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$9,[vue.createVNode(vue.unref(CopyOutlined),{style:{padding:"3px 5px"},onClick:ne[0]||(ne[0]=ae=>ee(W.data))}),vue.createVNode(vue.unref(DeleteOutlined),{onClick:ne[1]||(ne[1]=ae=>te(W.data))})])):vue.createCommentVNode("",!0)])}}}),FormTable=_export_sfc(_sfc_main$V,[["__scopeId","data-v-a510b67f"]]),FormTable$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormTable},Symbol.toStringTag,{value:"Module"})),_hoisted_1$v={class:"col-view"},_hoisted_2$n=["onMousedown"],_sfc_main$U=vue.defineComponent({__name:"FormCol",props:{list:{type:Array,default:[]},data:{type:Object,default:null},index:{type:String},activeIndex:{type:String}},emits:["index","controlConfig"],setup(W,{emit:C}){useFormStore();const Q=W,Z=vue.ref("-1"),H=C;vue.watch(()=>Q.activeIndex,(ee,te)=>{Z.value=ee});function K(){console.log("// 开始拖拽")}function G(ee){if(console.log("end",ee),ee.to.className.includes("col-drag-list")&&ee.to.className.includes(`col-drag-list-${Q.index}`))Z.value=Q.index+"-"+ee.newIndex;else if(ee.to.className.includes("col-drag-list")&&!ee.to.className.includes(`col-drag-list-${Q.index}`)){let te=Array.from(ee.to.classList).find(ie=>ie.includes("col-drag-list-"));if(te){let ie=te.split("-"),ne=ie[ie.length-2]+"-"+ie[ie.length-1];Z.value=ne+"-"+ee.newIndex}else Z.value="-1"}else Z.value=ee.newIndex;H("index",Z.value)}function U(ee,te,ie){Z.value=te,H("controlConfig",ee),H("index",te),ie.stopPropagation(),ie.preventDefault()}function X(ee){return console.log("move",ee),!ee.to.className.includes("row-drag-list")}return(ee,te)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$v,[vue.createVNode(vue.unref(VueDraggableNext),{class:vue.normalizeClass(["col-drag-list",`col-drag-list-${W.index}`]),list:W.data.list,animation:"300",handle:".move",group:"itxst","ghost-class":"ghost","force-fallback":!0,onStart:K,onEnd:te[0]||(te[0]=ie=>G(ie)),move:X,"drag-class":"dragClass1"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(W.data.list,(ie,ne)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-view",{active:Z.value==W.index+"-"+ne}]),onMousedown:oe=>U(ie,W.index+"-"+ne,oe)},[ie.type=="table"?(vue.openBlock(),vue.createBlock(FormTable,{key:0,data:ie,list:W.data.list,activeIndex:Z.value.toString(),index:W.index+"-"+ne},null,8,["data","list","activeIndex","index"])):(vue.openBlock(),vue.createBlock(FormInput,{key:1,data:ie,list:W.data.list,activeIndex:Z.value,index:W.index+"-"+ne},null,8,["data","list","activeIndex","index"]))],42,_hoisted_2$n))),256))]),_:1},8,["class","list"])]))}}),FormCol=_export_sfc(_sfc_main$U,[["__scopeId","data-v-5b3ad704"]]),FormCol$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormCol},Symbol.toStringTag,{value:"Module"})),_hoisted_1$u={class:"move"},_hoisted_2$m={key:0,class:"widget-view-drag"},_hoisted_3$i={key:1,class:"item-action"},_hoisted_4$d={class:"move1"},_hoisted_5$b={key:0,class:"widget-view-drag"},_hoisted_6$a={key:0,class:"item-action"},_sfc_main$T=vue.defineComponent({__name:"FormGrid",props:{list:{type:Array,default:[]},data:{type:Object,default:null},activeIndex:{type:String,default:""},index:{type:String,default:""}},emits:["childConfig","index"],setup(W,{emit:C}){const Q=useFormStore(),Z=W,H=vue.ref("-1");vue.watch(()=>Z.activeIndex,(se,ae)=>{H.value=se});const K=C;function G(se){K("childConfig",se)}function U(se){H.value=se,K("index",H.value)}function X(se,ae,le){H.value=ae,K("childConfig",se),K("index",H.value),le.stopPropagation(),le.preventDefault()}function ee(se){return!!(se.draggedContext.element.type=="col"&&se.to.className.includes("row-drag-list"))}function te(){H.value="-1"}function ie(se){if(se.to.className.includes("row-drag-list")&&se.to.className.includes(`row-drag-list-${Z.index}`))H.value=Z.index+"-"+se.newIndex;else if(se.to.className.includes("row-drag-list")&&!se.to.className.includes(`row-drag-list-${Z.index}`)){let ae=Array.from(se.to.classList).find(le=>le.includes("row-drag-list-"));if(ae){let le=ae.split("-"),ce=le[le.length-1];H.value=ce+"-"+se.newIndex}else H.value="-1"}else H.value=se.newIndex;K("index",H.value)}function ne(se){const ae=JSON.parse(JSON.stringify(se));if(Z.data.columns&&Z.data.columns.length>0){let le=Z.data.columns.findIndex(ce=>ce.key==se.key);le>-1&&(ae.key=guid(),ae.id=guid(),Z.data.columns.splice(le+1,0,ae))}}function oe(se){let ae=Z.data.columns.findIndex(le=>le.key==se.key);ae>-1&&Z.data.columns.splice(ae,1)}function re(){if(Z.data.columns.length>0)Modal.confirm({title:"确定要删除该栅格布局吗?",content:"如果该布局存在表单,将会一并删除",onOk(){const se=Z.list.findIndex(ae=>ae.id==Z.data.id);se!=-1&&Z.list.splice(se,1)},onCancel(){}});else{const se=Z.list.findIndex(ae=>ae.id==Z.data.id);se!=-1&&Z.list.splice(se,1)}}return(se,ae)=>{const le=vue.resolveComponent("a-col"),ce=vue.resolveComponent("a-row"),de=vue.resolveComponent("a-form");return vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$u,[W.activeIndex==W.index?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$m,[vue.createVNode(vue.unref(DragOutlined),{style:{padding:"6px"}})])):vue.createCommentVNode("",!0)]),vue.createVNode(de,{style:vue.normalizeStyle({padding:`${W.data.top||0}px ${W.data.right||0}px ${W.data.bottom||0}px ${W.data.left||0}px`}),"label-col":{style:{width:vue.unref(Q).formData.config.labelWidth+"px"}},labelWrap:!0,layout:W.data.layout,labelAlign:W.data.labelPosition},{default:vue.withCtx(()=>[vue.createVNode(ce,{gutter:[W.data.options.gutter||0,0],tyle:"flex",class:vue.normalizeClass(`${W.data.class||""}`),style:vue.normalizeStyle({marginLeft:-(W.data.options.gutter||0)/2+"px",marginRight:-(W.data.options.gutter||0)/2+"px"})},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(VueDraggableNext),{class:vue.normalizeClass(["row-drag-list",`row-drag-list-${W.index}`]),list:W.data.columns,animation:"1000",handle:".move1",group:"itxst",move:ee,"ghost-class":"ghost","force-fallback":!0,onStart:te,onEnd:ae[0]||(ae[0]=ue=>ie(ue))},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(W.data.columns,(ue,he)=>(vue.openBlock(),vue.createBlock(le,{class:vue.normalizeClass(["widget-col-item",{active:H.value==W.index+"-"+he}]),span:ue.options.span,offset:ue.options.offset,onMousedown:fe=>X(ue,W.index+"-"+he,fe)},{default:vue.withCtx(()=>[ue.type=="col"?(vue.openBlock(),vue.createBlock(FormCol,{key:0,data:ue,list:W.data.columns,onIndex:U,activeIndex:H.value,index:W.index+"-"+he,onControlConfig:G},null,8,["data","list","activeIndex","index"])):vue.createCommentVNode("",!0),W.activeIndex===W.index+"-"+he?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$i,[vue.createVNode(vue.unref(CopyOutlined),{style:{padding:"3px 5px"},onClick:fe=>ne(ue)},null,8,["onClick"]),W.data.columns.length!==1?(vue.openBlock(),vue.createBlock(vue.unref(DeleteOutlined),{key:0,onClick:fe=>oe(ue)},null,8,["onClick"])):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_4$d,[W.activeIndex==W.index+"-"+he?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$b,[vue.createVNode(vue.unref(DragOutlined),{style:{padding:"6px"}})])):vue.createCommentVNode("",!0)])]),_:2},1032,["class","span","offset","onMousedown"]))),256))]),_:1},8,["class","list"])]),_:1},8,["gutter","class","style"]),W.activeIndex===W.index?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$a,[vue.createVNode(vue.unref(DeleteOutlined),{style:{padding:"3px 5px",color:"#fff"},onClick:ae[1]||(ae[1]=ue=>re())})])):vue.createCommentVNode("",!0)]),_:1},8,["style","label-col","layout","labelAlign"])])}}}),FormGrid=_export_sfc(_sfc_main$T,[["__scopeId","data-v-a55ce6ce"]]),FormGrid$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormGrid},Symbol.toStringTag,{value:"Module"})),_hoisted_1$t={id:"report-css"},_hoisted_2$l={class:"report-table-css"},_hoisted_3$h=["onClick"],_sfc_main$S=vue.defineComponent({__name:"FormReport",props:{data:{type:Object,default:null},activeIndex:{type:String,default:""},index:{type:Number,default:""}},setup(W){const C=useFormStore(),{formData:Q}=storeToRefs(C);let Z=vue.ref(null),H=vue.ref(!1);function K(X,ee){Z.value!=null&&(Z.value.className=""),Z.value=X,H.value=!0}function G(){}function U(){Z.value.columns.push({type:"td",options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},list:[],key:"fuzps6zb",rules:[]})}return(X,ee)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$t,[vue.createElementVNode("div",{style:{"text-align":"left","padding-left":"50px"}},[vue.createElementVNode("a",{onClick:G},"添加行"),vue.createTextVNode(" "),vue.createElementVNode("a",{onClick:U},"添加列")]),vue.createElementVNode("table",_hoisted_2$l,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(Q).list[W.index].rows,(te,ie)=>(vue.openBlock(),vue.createElementBlock("tr",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(te.columns,(ne,oe)=>(vue.openBlock(),vue.createElementBlock("td",{class:"report-table-item",onClick:re=>K(te)}," fdfd ",8,_hoisted_3$h))),256))]))),256))])]))}}),FormReport=_export_sfc(_sfc_main$S,[["__scopeId","data-v-c1f306bf"]]),FormReport$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormReport},Symbol.toStringTag,{value:"Module"})),useDataStore=defineStore({id:"dataStore",state:()=>({selectList:[],updateList:[],delList:[],selectTables:[]}),getters:{getSelectData(W){return W.selectList},getSelectTables(W){return W.selectTables},getUpdateData(W){return W.updateList}},actions:{addSelectData(W){this.selectList.push(...W)},setSelectData(W){this.selectList=W},setUpdateData(W){this.updateList=W},addUpdateData(W){this.updateList.push(...W)},addSelectTable(W){this.selectTables.push(W)},setSelectTables(W){this.selectTables=W}}});let commonProps$1=vue.reactive({hTable:0,editTable:0,paginations:{}});vue.ref({html:"",columns:{},pagScript:{},variableScript:{},searchData:[]});function generateTs(W,C){let Q={};const Z=generateDataSource(W),H=generateEventScript(W,C);return Q={dataSource:Z,global:H.global,computed:H.computed,mounted:H.mounted,baseInfo:H.baseInfo,fun:H.fun},Q}function generateExposed(W){let Q=W.eventScript.find(K=>K.type=="Exposed"),Z="";return Q&&(Z=Q.name.replace(/,/g,`,
|
|
468
468
|
`)),`
|
|
469
469
|
defineExpose({
|
|
470
470
|
multipleRef,
|
|
@@ -534,7 +534,7 @@ summary tabindex target title type usemap value width wmode wrap`,eventsName=`on
|
|
|
534
534
|
onMounted(${X}() => {
|
|
535
535
|
${U.func}
|
|
536
536
|
${K}
|
|
537
|
-
})`+newline()}else if(U.type!="Emit"){if(U.type!="Exposed")if(U.type=="basicInfo"){let ee=vue.ref({}),te=W.cBasicInfo;for(let ie=0;ie<te.length;ie++){const ne=te[ie].name,oe=te[ie].default;ee.value[ne]=oe}te.length>0&&(Q.baseInfo+=` let basicInfo = ref<any>(${JSON.stringify(ee.value)})`)}else U.param==null&&(U.param=""),Q.fun+=`
|
|
537
|
+
})`+newline()}else if(U.type!="Emit"){if(U.type!="Exposed")if(U.type=="basicInfo"){let ee=vue.ref({}),te=JSON.parse(JSON.stringify(W.cBasicInfo));for(let ie=0;ie<te.length;ie++){const ne=te[ie].name,oe=te[ie].type,re=te[ie].default;ee.value[ne]=transformValueByType(re,oe)}te.length>0&&(Q.baseInfo+=` let basicInfo = ref<any>(${JSON.stringify(ee.value)})`)}else U.param==null&&(U.param=""),Q.fun+=`
|
|
538
538
|
${X} function ${U.name}(${U.param}){
|
|
539
539
|
${U.func}
|
|
540
540
|
}
|
|
@@ -547,7 +547,7 @@ summary tabindex target title type usemap value width wmode wrap`,eventsName=`on
|
|
|
547
547
|
console.info(err)
|
|
548
548
|
})
|
|
549
549
|
}
|
|
550
|
-
`}return C}const pushToSearchData=(W,C)=>{const Q=W.model||"",Z=W.defaultValue||"";if(Q!=""){const H=W.searchType==null?"":W.searchType;H!=""&&C.value.searchData.push({name:`${Q}`,searchType:H,defaultValue:Z})}};function generateBase(W,C,Q,Z,H){let K="";const G=W.type;let U="";const{writeField:X,model:ee,defaultValue:te}=W,ie=X&&X.length?`write-field="${X}" `:"",ne=ee?`v-model:value="viewData.${ee}" `:"",oe=ee?`:data-value="JSON.stringify(viewData.${ee})"`:"",re=te?`defaultValue="${W.defaultValue}"`:"";Z=="report"&&pushToSearchData(W,H),U+=ne,U+=ie;const se=ee?"viewData."+ee:"";let ae=`width:${W.width}`,{_ruleProperty:le,_rule:ce,_ruleEvent:de}=getRuleHtml(W),ue="",he="";C!=null&&C.length>0&&(ue=generateHtmlRule(C,W.name),he=generateHtmlRule_formItem(C,W.name));const fe=W.formItemMargin==null?"":`c-form-item-margin-${W.formItemMargin}`,ge=fe?`class="${fe}"`:"";switch(G){case"label":K+=`<pre ${W.extended} style="fontSize:${W.font}px;textAlign:${W.align};color:${W.color};whiteSpace:pre-wrap;${W.cssextended};"> ${W.name}</pre>`;break;case"button":let pe=W.beforeIcon?`<template #icon><svg-icon name="${W.beforeIcon}" width="16" height="16"></svg-icon></template>`:"",me=W.buttonSize==null||W.buttonSize==""?"":`size="${W.buttonSize}"`,ke=W.dangerButton?"danger":"";const Ce=W.width==null||W.width==""?"":`style="width: ${W.width}"`,ve=W.beforeIcon&&W.name?`<span class="btn-title">${W.name}</span>`:W.name;K+=`
|
|
550
|
+
`}return C}function transformValueByType(W,C){switch(C){case"string":return W;case"number":return Number(W);case"boolean":return!!W;case"object":case"array":try{return JSON.parse(W)}catch(Q){return console.error(`转换失败: ${W}`,Q),null}default:return W}}const pushToSearchData=(W,C)=>{const Q=W.model||"",Z=W.defaultValue||"";if(Q!=""){const H=W.searchType==null?"":W.searchType;H!=""&&C.value.searchData.push({name:`${Q}`,searchType:H,defaultValue:Z})}};function generateBase(W,C,Q,Z,H){let K="";const G=W.type;let U="";const{writeField:X,model:ee,defaultValue:te}=W,ie=X&&X.length?`write-field="${X}" `:"",ne=ee?`v-model:value="viewData.${ee}" `:"",oe=ee?`:data-value="JSON.stringify(viewData.${ee})"`:"",re=te?`defaultValue="${W.defaultValue}"`:"";Z=="report"&&pushToSearchData(W,H),U+=ne,U+=ie;const se=ee?"viewData."+ee:"";let ae=`width:${W.width}`,{_ruleProperty:le,_rule:ce,_ruleEvent:de}=getRuleHtml(W),ue="",he="";C!=null&&C.length>0&&(ue=generateHtmlRule(C,W.name),he=generateHtmlRule_formItem(C,W.name));const fe=W.formItemMargin==null?"":`c-form-item-margin-${W.formItemMargin}`,ge=fe?`class="${fe}"`:"";switch(G){case"label":K+=`<pre ${W.extended} style="fontSize:${W.font}px;textAlign:${W.align};color:${W.color};whiteSpace:pre-wrap;${W.cssextended};"> ${W.name}</pre>`;break;case"button":let pe=W.beforeIcon?`<template #icon><svg-icon name="${W.beforeIcon}" width="16" height="16"></svg-icon></template>`:"",me=W.buttonSize==null||W.buttonSize==""?"":`size="${W.buttonSize}"`,ke=W.dangerButton?"danger":"";const Ce=W.width==null||W.width==""?"":`style="width: ${W.width}"`,ve=W.beforeIcon&&W.name?`<span class="btn-title">${W.name}</span>`:W.name;K+=`
|
|
551
551
|
<a-form-item ${ge} style="text-align: left;padding-left:5px">
|
|
552
552
|
<a-button type="${W.buttonType}" ${W.extended} ${me} ${ke} ${Ce} class="btn-icon-content">
|
|
553
553
|
${pe}${ve}
|
|
@@ -583,18 +583,7 @@ summary tabindex target title type usemap value width wmode wrap`,eventsName=`on
|
|
|
583
583
|
<c-collapse-panel style='${ie}' ${U} ${X} ${ne} ${oe} ${re} ${W.extended||""}>
|
|
584
584
|
`;let se=Q.labelWidth==null?"":`:label-col="{ style: { width:'${Q.labelWidth}px'} }"`,ae=W.content.length>0?`<a-form class="form-container" ${se}>`:"";G+=ae;let le=W.content;for(let de=0;de<le.length;de++){let ue=le[de];switch(ue.type){case"childform":G+=generateChildForm(ue);break;case"grid":G+=generateGrid(ue,C,Q,Z,K,H);break;case"table":G+=generateTable(ue,de,Z,H);break;case"tabs":G+=generateTabs(ue,C,Q,Z,H,K);break;default:G+=generateBase(ue,C,Z,K,H);break}}let ce=le.length>0?"</a-form>":"";return G+=ce,G+="</c-collapse-panel>",G}function generateGrid(W,C,Q,Z,H,K){let G="";const U=getPaddingStyle(W),X=U?`padding: ${U}`:"",ee=W.layout==null?"":` layout="${W.layout}"`,te=W.labelPosition==null?"":` labelAlign="${W.labelPosition}"`,ie=W.class==null||W.class==""?"":W.class;G+=`
|
|
585
585
|
<a-row class="wonderform-row-css ${ie}" style="${X}" ${W.extended||""} :gutter="[${W.options.gutter}, 0]" tyle="flex">`;for(let re=0;re<W.columns.length;re++){const se=W.columns[re];G+=`
|
|
586
|
-
<a-col :span="${se.options.span}" :offset="${se.options.offset}" ${se.options.extended||""}>`;for(let ae=0;ae<se.list.length;ae++){const le=se.list[ae];G+=generateBase(le,C,Z,H,K)}G+=" </a-col>"}return G+="</a-row>",` <a-form id="wonder-form-css" ${Q.labelWidth==null?"":`:label-col="{ style: { width:'${Q.labelWidth}px'} }"`} :labelWrap="true" ${ee+te}>${G}</a-form>`}function generatePage(W,C,Q){let Z;C.options.pagination
|
|
587
|
-
initCTableV2({ ${X}, bindName: '${W.model}', formId: formId, pagination: paginations['${G}'] });`,generatePage(G,W,C);let ee=[...W.tableColumns],te="",ie="";W.options.pagination?(ie=`:pagination="paginations['${G}']" @change="onChange${C}($event,'${G}')"`,Q.value.contentScript+=`
|
|
588
|
-
/**
|
|
589
|
-
* 分页
|
|
590
|
-
* @param pag
|
|
591
|
-
* @param paginationName 分页对象
|
|
592
|
-
*/
|
|
593
|
-
function onChange${C}(pag: any, paginationName: string) {
|
|
594
|
-
paginations[paginationName] = pag
|
|
595
|
-
initCTableV2({ ${X}, bindName: '${W.model}', formId: formId, pagination: paginations[paginationName]});
|
|
596
|
-
}
|
|
597
|
-
`):ie=`:pagination="paginations['${G}']"`,U&&commonProps$1.editTable==0&&(Q.value.importScript+="import { cloneDeep } from 'lodash-es';",Q.value.contentScript+=getTableEditScript(),commonProps$1.editTable++);let ne="";const oe=W.action.length;console.log("element.action",W.action);let re="";if(console.log("element.options",W.options),W.options.showAction){ee.push({title:"操作",key:"action"});for(let ce=0;ce<oe;ce++){const de=W.action[ce];ne+=`<a-button type="link" @click="${de.oper}(record)">${de.title}</a-button>`,ce!=oe-1&&(ne+='<a-divider type="vertical" />')}let le="";U&&(le=`
|
|
586
|
+
<a-col :span="${se.options.span}" :offset="${se.options.offset}" ${se.options.extended||""}>`;for(let ae=0;ae<se.list.length;ae++){const le=se.list[ae];G+=generateBase(le,C,Z,H,K)}G+=" </a-col>"}return G+="</a-row>",` <a-form id="wonder-form-css" ${Q.labelWidth==null?"":`:label-col="{ style: { width:'${Q.labelWidth}px'} }"`} :labelWrap="true" ${ee+te}>${G}</a-form>`}function generatePage(W,C,Q){let Z;if(C.options.pagination){const H=C.options.pageSize;Z={bindName:C.model,total:0,current:1,pageSize:H,change:`onChange1($event,'${W}')`,showSizeChanger:!1,showTotal:K=>`共 ${K} 条数据`}}else Z={bindName:C.model};Reflect.set(commonProps$1.paginations,W,Z)}function generateTable(W,C,Q,Z,H){const K="columns"+C,G="pagination"+C,U=W.isedit;generatePage(G,W);let X=[...W.tableColumns],ee="",te="";W.options.pagination&&W.options.pageSize?te=`:pagination="paginations['${G}']" @change="onChange1($event,'${G}')"`:te=`:pagination="paginations['${G}']"`,U&&commonProps$1.editTable==0&&(Q.value.importScript+="import { cloneDeep } from 'lodash-es';",Q.value.contentScript+=getTableEditScript(),commonProps$1.editTable++);let ie="";const ne=W.action.length;console.log("element.action",W.action);let oe="";if(console.log("element.options",W.options),W.options.showAction){X.push({title:"操作",key:"action"});for(let le=0;le<ne;le++){const ce=W.action[le];ie+=`<a-button type="link" @click="${ce.oper}(record)">${ce.title}</a-button>`,le!=ne-1&&(ie+='<a-divider type="vertical" />')}let ae="";U&&(ae=`
|
|
598
587
|
<span v-if="editableData[record.id]">
|
|
599
588
|
<a-button type="link" @click="save(record.id, ${W.model})">保存</a-button>
|
|
600
589
|
<a-divider type="vertical" />
|
|
@@ -605,16 +594,16 @@ summary tabindex target title type usemap value width wmode wrap`,eventsName=`on
|
|
|
605
594
|
<span v-else>
|
|
606
595
|
<a-button type="link" @click="edit(record.id, ${W.model})">编辑</a-button>
|
|
607
596
|
</span>
|
|
608
|
-
`),
|
|
597
|
+
`),oe=`
|
|
609
598
|
<template v-if="column.key === 'action'">
|
|
610
|
-
${
|
|
599
|
+
${ae}
|
|
611
600
|
<span>
|
|
612
|
-
${
|
|
601
|
+
${ie}
|
|
613
602
|
</span>
|
|
614
603
|
</template>
|
|
615
|
-
`}let
|
|
604
|
+
`}let re="";U&&W.options.showAction?re=`
|
|
616
605
|
<template #bodyCell="{ column, text, record }">
|
|
617
|
-
${
|
|
606
|
+
${oe}
|
|
618
607
|
<template v-else>
|
|
619
608
|
<div>
|
|
620
609
|
<template v-if="editableData[record.id]">
|
|
@@ -632,11 +621,11 @@ summary tabindex target title type usemap value width wmode wrap`,eventsName=`on
|
|
|
632
621
|
</div>
|
|
633
622
|
</template>
|
|
634
623
|
</template>
|
|
635
|
-
`:
|
|
624
|
+
`:re=`
|
|
636
625
|
<template #bodyCell="{ column, text, record }">
|
|
637
|
-
${
|
|
626
|
+
${oe}
|
|
638
627
|
</template>
|
|
639
|
-
`,Reflect.set(Z.value.columns,K,
|
|
628
|
+
`,Reflect.set(Z.value.columns,K,X),Z.value.paginations=commonProps$1.paginations;const se=W.options.scrollY==null?"":`:scroll="{ y: ${W.options.scrollY} }"`;return ee+=`<a-table :columns="columns.${K}" :data-source="viewData.${W.model}" ${se} ${W.extended} ${te} bordered>${re}</a-table>`,commonProps$1.hTable++,ee}function getTableEditScript(){return`
|
|
640
629
|
/** 行编辑所需要代码 begin **/
|
|
641
630
|
const editableData: any = reactive({});
|
|
642
631
|
const edit = (key: string, object) => {
|
|
@@ -676,7 +665,7 @@ const cancel = (key: string) => {
|
|
|
676
665
|
import { defHttp } from "/@/utils/http/axios";
|
|
677
666
|
import { ref, reactive, onMounted, computed, onBeforeUpdate,useAttrs, watch } from "vue";
|
|
678
667
|
import { getDictItemsByCode,getTreeDictItemsByCode,formatMultipleSelectValue,formatMultipleTreeSelectValue, getCasDictItemsByCode, useVNodes } from '/@/utils/form/commonUtils';
|
|
679
|
-
import { getData,getDataByApi,getInheritData,initTable, initCTableV2,validateInfos, validateFun, onSubmitForm, syncChange, onTableSelectClear, onTableSelectChange, onTableSelectRowChange, getSelectAllCheck, setSelectAllCheck, getAccount, hideField, getSelectJsonSetting } from "/@/utils/form/wonder1.0.1";
|
|
668
|
+
import { getData,getDataByApi,getInheritData,initTable, initCTableV2, initAllCTableV2, validateInfos, validateFun, onSubmitForm, syncChange, onTableSelectClear, onTableSelectChange, onTableSelectRowChange, getSelectAllCheck, setSelectAllCheck, getAccount, hideField, getSelectJsonSetting } from "/@/utils/form/wonder1.0.1";
|
|
680
669
|
import tableSelectProps from "/@/components/form-widget/widget/tableSelectOptions"
|
|
681
670
|
import { cModal } from "/@/components/cModal/index"
|
|
682
671
|
import { Modal, message } from 'ant-design-vue';
|
|
@@ -700,7 +689,6 @@ ${getSelectJsonSettingScript(se)}
|
|
|
700
689
|
if (disabled != undefined && typeof disabled == 'boolean') {
|
|
701
690
|
formDisabled.value = disabled
|
|
702
691
|
}
|
|
703
|
-
|
|
704
692
|
${C.value.variableScript}
|
|
705
693
|
${ce.dataSource}
|
|
706
694
|
${ce.global}
|
|
@@ -748,7 +736,19 @@ if (isSaved) {
|
|
|
748
736
|
@import url('/@/assets/less/form.less');
|
|
749
737
|
</style>
|
|
750
738
|
`;return Q.value.html=ue,Q.value}function getViewData(){const C=useDataStore().getSelectTables;let Q={};for(let Z=0;Z<C.length;Z++)C[Z].isList?Reflect.set(Q,C[Z].value,[]):Reflect.set(Q,C[Z].value,{});return Q}function loadSourceData(W){return new Promise((C,Q)=>{defHttp.post({url:"/magicapi/zrzy-form/magic/form/source/list",params:{formId:W,dType:"select"}},{withToken:!0}).then(H=>{H.code==200?C(H):C([])}).catch(H=>{C([])})})}function generateFormHtml_view(W,C,Q){let Z=vue.ref({});Z.value=getHtml(W,C,Q);let H=vue.ref(JSON.stringify(getViewData()));return Z.value.viewData=H.value,Z.value}function generateFormHtml(W,C){const Q=JSON.parse(W.content),Z=Q.list,{eventScript:H,baseScript:K,...G}=Q.config;return getHtml(Z,G,C)}function getHtml(W,C,Q){const Z="form";let H=vue.ref({viewData:[],html:"",columns:{},pagScript:{},variableScript:{},searchData:[],paginations:{},formSetting:[],selectJsonSetting:{}}),K=C.labelWidth==null?"":`:label-col="{ style: { width:'${C.labelWidth}px'} }"`,G='<div ref="formRef" class="cici-form-css">',U=`<a-form ${K} :labelWrap="true" :disabled="formDisabled">`;G+=U;let X="",ee=getSettings(C.formSetting);H.value.formSetting=C.formSetting;for(let ne=0;ne<W.length;ne++){const oe=W[ne];switch(X=oe.type,X){case"grid":G+=generateGrid(oe,ee,C,Q,Z);break;case"table":G+=generateTable(oe,ne,Q,H);break;case"childform":G+=generateChildForm(oe);break;case"tabs":G+=generateTabs(oe,ee,C,Q,H,Z);break;case"collapse":G+=generateCollapsePanel(oe,ee,C,Q,H,Z);break;default:G+=generateBase(oe,ee,Q,Z,H)}}const te=JSON.stringify(H.value.paginations);if(te!="{}"){const ne=`
|
|
751
|
-
let paginations = reactive(${te});`;Q.value.variableScript+=ne
|
|
739
|
+
let paginations = reactive(${te});`;Q.value.variableScript+=ne;let oe=`
|
|
740
|
+
initAllCTableV2({ viewData: viewData, formId: formId, paginations: paginations });
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* 分页
|
|
744
|
+
* @param pag
|
|
745
|
+
* @param paginationName 分页对象
|
|
746
|
+
*/
|
|
747
|
+
function onChange1(pag: any, paginationName: string) {
|
|
748
|
+
paginations[paginationName] = pag
|
|
749
|
+
initCTableV2({ viewData: viewData, formId: formId, pagination: paginations[paginationName]});
|
|
750
|
+
}
|
|
751
|
+
`;Q.value.contentScript=oe}const ie=JSON.stringify(H.value.columns);return ie!="{}"&&(Q.value.variableScript+=`
|
|
752
752
|
const columns=${ie};`),G+=`
|
|
753
753
|
</a-form></div>`,H.value.html=G,H.value.pagScript=H.value.paginations,H.value}function getSettings(W){let C=[];if(W)for(let Q=0;Q<W.length;Q++)W[Q].actionList.forEach(H=>{const K=H.actionField,G=H.actionType;let U=`hideFields(${Q})`;switch(G){case"隐藏":U=`!hideFields(${Q})`;break}for(const X of K)C.push({name:X,actionType:G,method:U})});return C}function getSelectJsonSettingScript(W){return W&&Object.keys(W).length!=0?`let selectJsonSetting = ref<any>(${JSON.stringify(W)})
|
|
754
754
|
getSelectJsonSetting(selectJsonSetting)`:""}const _hoisted_1$s={style:{"text-align":"left"}},_hoisted_2$k={class:"move"},_hoisted_3$g={key:0,class:"widget-view-drag"},_hoisted_4$c={key:0,class:"item-action"},_sfc_main$R=vue.defineComponent({__name:"FormVue",props:{list:{type:Array,default:[]},data:{type:Object,default:null},index:{type:String},activeIndex:{type:String}},setup(W){useFormStore();const C=W;let Q=vue.computed(()=>K(C.data)),Z=getViewData(),H=vue.ref(Z);function K(X){return vue.defineComponent({template:G(X),setup(){return{viewData:H}}})}function G(X){if(X){let ee="",te=getPaddingStyle(X),ie=`width:${X.width}; padding: ${te}`;return ee+=`<c-child-form style='${ie}' filePath="${X.filePath}" disabled></c-child-form>`,ee}else return""}function U(X){if(C.list&&C.list.length>0){let ee=C.list.findIndex(te=>te.id==X.id);ee>-1&&C.list.splice(ee,1)}}return(X,ee)=>{const te=vue.resolveComponent("a-form-item");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$s,[vue.createElementVNode("div",_hoisted_2$k,[W.activeIndex==W.index?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$g,[vue.createVNode(vue.unref(DragOutlined),{style:{padding:"6px"}})])):vue.createCommentVNode("",!0),W.data.type=="childform"?(vue.openBlock(),vue.createBlock(te,{key:1,disabled:""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(Q))]),_:1})):vue.createCommentVNode("",!0)]),W.activeIndex==W.index?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$c,[vue.createVNode(vue.unref(DeleteOutlined),{onClick:ee[0]||(ee[0]=ie=>U(W.data))})])):vue.createCommentVNode("",!0)])}}}),FormVue=_export_sfc(_sfc_main$R,[["__scopeId","data-v-8791acad"]]),FormVue$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormVue},Symbol.toStringTag,{value:"Module"})),_withScopeId$8=W=>(vue.pushScopeId("data-v-84c86bb0"),W=W(),vue.popScopeId(),W),_hoisted_1$r={class:"move"},_hoisted_2$j={key:0,class:"widget-view-drag"},_hoisted_3$f={key:0,class:"collapse-btn"},_hoisted_4$b={class:"collapse-form-list"},_hoisted_5$a=["onMousedown"],_hoisted_6$9=_withScopeId$8(()=>vue.createElementVNode("div",{class:"collapse-default-height"},null,-1)),_hoisted_7$8={key:1,class:"item-action"},_sfc_main$Q=vue.defineComponent({__name:"FormCollapse",props:{list:{type:Array,default:[]},data:{type:Object,default:null},index:{type:String},activeIndex:{type:String}},emits:["childConfig","index","controlConfig"],setup(W,{emit:C}){const Q=useFormStore(),Z=W,H=vue.ref("-1"),K=C;vue.watch(()=>Z.activeIndex,(re,se)=>{H.value=re});function G(){console.log("// 开始拖拽")}function U(re){re.to.className=="collapse-drag-list"?H.value=Z.index+"-"+re.newIndex:H.value=re.newIndex,K("index",H.value)}function X(re,se,ae){H.value=se,K("childConfig",re),K("index",H.value),ae.stopPropagation(),ae.preventDefault()}function ee(re){const se=JSON.parse(JSON.stringify(re));if(Z.list&&Z.list.length>0){let ae=Z.list.findIndex(le=>le.id==re.id);ae>-1&&(se.id=guid(),se.key=guid(),Z.list.splice(ae+1,0,se))}}function te(re){if(Z.list&&Z.list.length>0){let se=Z.list.findIndex(ae=>ae.id==re.id);se>-1&&Z.list.splice(se,1)}}function ie(re){K("childConfig",re)}function ne(re){H.value=re}function oe(re){return(re.draggedContext.element.type=="grid"||re.draggedContext.element.type=="tabs"||re.draggedContext.element.type=="collapse"||re.draggedContext.element.type=="childform")&&(re.to.className.includes("col-drag-list")||re.to.className.includes("row-drag-list"))?!1:!(re.draggedContext.element.type!="col"&&re.to.className.includes("row-drag-list"))}return(re,se)=>{const ae=vue.resolveComponent("svg-icon"),le=vue.resolveComponent("a-form"),ce=vue.resolveComponent("a-form-item");return vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$r,[W.activeIndex==W.index?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$j,[vue.createVNode(vue.unref(DragOutlined),{style:{padding:"6px"}})])):vue.createCommentVNode("",!0)]),W.data.type=="collapse"?(vue.openBlock(),vue.createBlock(ce,{key:0},{default:vue.withCtx(()=>[vue.createElementVNode("div",{class:"collapsePanel",style:vue.normalizeStyle({width:W.data.width,padding:`${W.data.top||0}px ${W.data.right||0}px ${W.data.bottom||0}px ${W.data.left||0}px`})},[vue.createElementVNode("div",{class:vue.normalizeClass([W.data.classname,"title-between"])},[vue.createElementVNode("span",null,vue.toDisplayString(W.data.header),1),W.data.showArrow?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$f,[vue.createVNode(ae,{name:"arrow",width:"20",height:"20"})])):vue.createCommentVNode("",!0)],2),vue.createElementVNode("div",_hoisted_4$b,[vue.createVNode(vue.unref(VueDraggableNext),{class:"collapse-drag-list",list:W.data.content,animation:"1000",handle:".move",group:"itxst","ghost-class":"ghost","force-fallback":!0,onStart:G,onEnd:se[0]||(se[0]=de=>U(de)),move:oe},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(W.data.content,(de,ue)=>(vue.openBlock(),vue.createBlock(le,{class:"form-container","label-col":{style:{width:vue.unref(Q).formData.config.labelWidth+"px"}}},{default:vue.withCtx(()=>[vue.createElementVNode("div",{class:vue.normalizeClass(["widget-view",{active:H.value==W.index+"-"+ue}]),onMousedown:he=>X(de,W.index+"-"+ue,he)},[de.type=="childform"?(vue.openBlock(),vue.createBlock(FormVue,{key:0,data:de,list:W.data.content,activeIndex:H.value.toString(),index:W.index+"-"+ue},null,8,["data","list","activeIndex","index"])):de.type=="table"?(vue.openBlock(),vue.createBlock(FormTable,{key:1,data:de,list:W.data.content,activeIndex:H.value.toString(),index:W.index+"-"+ue},null,8,["data","list","activeIndex","index"])):de.type=="grid"?(vue.openBlock(),vue.createBlock(FormGrid,{key:2,data:de,activeIndex:H.value.toString(),list:W.data.content,index:W.index+"-"+ue,onChildConfig:ie,onIndex:ne},null,8,["data","activeIndex","list","index"])):de.type=="tabs"?(vue.openBlock(),vue.createBlock(FormTabs,{key:3,data:de,activeIndex:H.value.toString(),list:W.data.content,index:W.index+"-"+ue,onChildConfig:ie,onIndex:ne},null,8,["data","activeIndex","list","index"])):(vue.openBlock(),vue.createBlock(FormInput,{key:4,data:de,list:W.data.content,activeIndex:H.value.toString(),index:W.index+"-"+ue},null,8,["data","list","activeIndex","index"]))],42,_hoisted_5$a)]),_:2},1032,["label-col"]))),256))]),_:1},8,["list"]),_hoisted_6$9])],4)]),_:1})):vue.createCommentVNode("",!0),W.activeIndex==W.index?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$8,[vue.createVNode(vue.unref(CopyOutlined),{style:{padding:"3px 5px"},onClick:se[1]||(se[1]=de=>ee(W.data))}),vue.createVNode(vue.unref(DeleteOutlined),{onClick:se[2]||(se[2]=de=>te(W.data))})])):vue.createCommentVNode("",!0)])}}}),FormCollapse=_export_sfc(_sfc_main$Q,[["__scopeId","data-v-84c86bb0"]]),FormCollapse$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormCollapse},Symbol.toStringTag,{value:"Module"})),_withScopeId$7=W=>(vue.pushScopeId("data-v-c5aa8468"),W=W(),vue.popScopeId(),W),_hoisted_1$q={class:"move"},_hoisted_2$i={key:0,class:"widget-view-drag"},_hoisted_3$e={class:"tab-slot"},_hoisted_4$a={class:"tab-info"},_hoisted_5$9={class:"tab-close"},_hoisted_6$8={class:"tab-form-list"},_hoisted_7$7=["onMousedown"],_hoisted_8$6=_withScopeId$7(()=>vue.createElementVNode("div",{class:"tab-default-height"},null,-1)),_hoisted_9$6={key:0,class:"item-action"},_sfc_main$P=vue.defineComponent({__name:"FormTabs",props:{list:{type:Array,default:[]},data:{type:Object,default:null},index:{type:String},activeIndex:{type:String}},emits:["childConfig","index","controlConfig"],setup(W,{emit:C}){const Q=useFormStore(),Z=W,H=vue.ref("-1"),K=C;vue.watch(()=>Z.activeIndex,(ae,le)=>{H.value=ae});const G=()=>{let ae=guid();Z.data.activeTabKey=ae,Z.data.panes.push({title:"New Tab",content:[],key:ae})},U=ae=>{let le=0;Z.data.panes.forEach((de,ue)=>{de.key===ae&&(le=ue-1)}),Z.data.panes=Z.data.panes.filter(de=>de.key!==ae);let ce;Z.data.panes.length&&Z.data.activeTabKey===ae&&(le>=0?ce=Z.data.panes[le].key:ce=Z.data.panes[0].key),Z.data.activeTabKey=ce};function X(){console.log("// 开始拖拽")}function ee(ae,le){ae.to.className=="tab-drag-list"?H.value=Z.index+"-"+le+"-"+ae.newIndex:H.value=ae.newIndex,K("index",H.value)}function te(ae){return(ae.draggedContext.element.type=="grid"||ae.draggedContext.element.type=="tabs"||ae.draggedContext.element.type=="collapse"||ae.draggedContext.element.type=="childform")&&(ae.to.className.includes("col-drag-list")||ae.to.className.includes("row-drag-list"))?!1:!(ae.draggedContext.element.type!="col"&&ae.to.className.includes("row-drag-list"))}function ie(ae,le,ce){H.value=le,K("childConfig",ae),K("index",H.value),ce.stopPropagation(),ce.preventDefault()}function ne(ae){const le=JSON.parse(JSON.stringify(ae));if(Z.list&&Z.list.length>0){let ce=Z.list.findIndex(de=>de.id==ae.id);ce>-1&&(le.id=guid(),le.key=guid(),Z.list.splice(ce+1,0,le))}}function oe(ae){if(Z.list&&Z.list.length>0){let le=Z.list.findIndex(ce=>ce.id==ae.id);le>-1&&Z.list.splice(le,1)}}function re(ae){K("childConfig",ae)}function se(ae){H.value=ae}return(ae,le)=>{const ce=vue.resolveComponent("a-button"),de=vue.resolveComponent("a-popconfirm"),ue=vue.resolveComponent("a-form"),he=vue.resolveComponent("a-tab-pane"),fe=vue.resolveComponent("a-tabs"),ge=vue.resolveComponent("a-form-item");return vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$q,[W.activeIndex==W.index?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$i,[vue.createVNode(vue.unref(DragOutlined),{style:{padding:"6px"}})])):vue.createCommentVNode("",!0),W.data.type=="tabs"?(vue.openBlock(),vue.createBlock(ge,{key:1},{default:vue.withCtx(()=>[vue.createVNode(fe,{activeKey:W.data.activeTabKey,"onUpdate:activeKey":le[0]||(le[0]=pe=>W.data.activeTabKey=pe),hideAdd:"",type:W.data.tabType,style:vue.normalizeStyle({width:W.data.width,padding:`${W.data.top||0}px ${W.data.right||0}px ${W.data.bottom||0}px ${W.data.left||0}px`})},{rightExtra:vue.withCtx(()=>[vue.createVNode(ce,{class:"tabs-add-btn",onClick:G},{icon:vue.withCtx(()=>[vue.createVNode(vue.unref(PlusOutlined))]),_:1})]),default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(W.data.panes,(pe,me)=>(vue.openBlock(),vue.createBlock(he,{key:pe.key,closable:!1,"force-render":"",class:vue.normalizeClass({active:H.value=="pane"+me})},{tab:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_3$e,[vue.createElementVNode("span",_hoisted_4$a,vue.toDisplayString(pe.title),1),vue.createVNode(de,{title:"内部组件也会一并删除,且不能撤销,确定要删除吗",onConfirm:vue.withModifiers(ke=>U(pe.key),["stop"])},{default:vue.withCtx(()=>[vue.createElementVNode("span",_hoisted_5$9,[vue.createVNode(vue.unref(CloseOutlined))])]),_:2},1032,["onConfirm"])])]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_6$8,[vue.createVNode(vue.unref(VueDraggableNext),{class:"tab-drag-list",list:pe.content,animation:"300",handle:".move",group:"itxst","ghost-class":"ghost","force-fallback":!0,move:te,onStart:X,onEnd:ke=>ee(ke,me)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(pe.content,(ke,Ce)=>(vue.openBlock(),vue.createBlock(ue,{class:"form-container","label-col":{style:{width:vue.unref(Q).formData.config.labelWidth+"px"}}},{default:vue.withCtx(()=>[vue.createElementVNode("div",{class:vue.normalizeClass(["widget-view",{active:H.value==W.index+"-"+me+"-"+Ce}]),onMousedown:ve=>ie(ke,W.index+"-"+me+"-"+Ce,ve)},[ke.type=="childform"?(vue.openBlock(),vue.createBlock(FormVue,{key:0,data:ke,list:pe.content,activeIndex:H.value,index:W.index+"-"+me+"-"+Ce},null,8,["data","list","activeIndex","index"])):ke.type=="table"?(vue.openBlock(),vue.createBlock(FormTable,{key:1,data:ke,activeIndex:H.value,list:pe.content,index:W.index+"-"+me+"-"+Ce},null,8,["data","activeIndex","list","index"])):ke.type=="grid"?(vue.openBlock(),vue.createBlock(FormGrid,{key:2,data:ke,activeIndex:H.value,list:pe.content,index:W.index+"-"+me+"-"+Ce,onChildConfig:re,onIndex:se},null,8,["data","activeIndex","list","index"])):ke.type=="collapse"?(vue.openBlock(),vue.createBlock(FormCollapse,{key:3,data:ke,activeIndex:H.value,list:pe.content,index:W.index+"-"+me+"-"+Ce,onChildConfig:re,onIndex:se},null,8,["data","activeIndex","list","index"])):(vue.openBlock(),vue.createBlock(FormInput,{key:4,data:ke,list:pe.content,activeIndex:H.value,index:W.index+"-"+me+"-"+Ce},null,8,["data","list","activeIndex","index"]))],42,_hoisted_7$7)]),_:2},1032,["label-col"]))),256))]),_:2},1032,["list","onEnd"]),_hoisted_8$6])]),_:2},1032,["class"]))),128))]),_:1},8,["activeKey","type","style"])]),_:1})):vue.createCommentVNode("",!0)]),W.activeIndex==W.index?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$6,[vue.createVNode(vue.unref(CopyOutlined),{style:{padding:"3px 5px"},onClick:le[1]||(le[1]=pe=>ne(W.data))}),vue.createVNode(vue.unref(DeleteOutlined),{onClick:le[2]||(le[2]=pe=>oe(W.data))})])):vue.createCommentVNode("",!0)])}}}),FormTabs=_export_sfc(_sfc_main$P,[["__scopeId","data-v-c5aa8468"]]),FormTabs$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormTabs},Symbol.toStringTag,{value:"Module"})),_hoisted_1$p={class:""},_hoisted_2$h=["onMousedown"],_sfc_main$O=vue.defineComponent({__name:"index",emits:["controlConfig"],setup(W,{emit:C}){const Q=useFormStore();let{formData:Z}=storeToRefs(Q);const H=vue.ref("-1"),K=C;function G(ne,oe,re){K("controlConfig",ne),H.value=oe,re.stopPropagation(),re.preventDefault()}function U(ne){K("controlConfig",ne)}function X(ne){H.value=ne}function ee(){H.value="-1"}function te(ne){ne.to.className=="widget-col-list"?H.value="base"+ne.newIndex:ne.to.className=="tab-drag-list"||(ne.to.className.includes("col-drag-list")||ne.to.className=="collapse-drag-list"?H.value="-1":H.value=ne.newIndex)}function ie(ne){return(ne.draggedContext.element.type=="grid"||ne.draggedContext.element.type=="tabs"||ne.draggedContext.element.type=="collapse"||ne.draggedContext.element.type=="childform")&&(ne.to.className.includes("col-drag-list")||ne.to.className.includes("row-drag-list"))?!1:!(ne.draggedContext.element.type!="col"&&ne.to.className.includes("row-drag-list"))}return(ne,oe)=>{const re=vue.resolveComponent("a-form");return vue.openBlock(),vue.createBlock(re,{class:"form-container","label-col":{style:{width:vue.unref(Q).formData.config.labelWidth+"px"}},labelWrap:!0},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(VueDraggableNext),{class:vue.normalizeClass(vue.unref(Z).list.length>0?"widget-form-list":"widgt-empty"),list:vue.unref(Z).list,"ghost-class":"ghost",handle:".move","force-fallback":!0,"chosen-class":"chosenClass1","drag-class":"dragClass1",animation:"1000",onStart:ee,onEnd:te,group:"itxst","fallback-class":!0,"fallback-on-body":!0,"touch-start-threshold":10,"fallback-tolerance":10,move:ie,itemKey:""},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(Z).list,(se,ae)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$p,[vue.createElementVNode("div",{class:vue.normalizeClass(["widget-col widget-view",{active:H.value==ae.toString()}]),onMousedown:le=>G(se,ae.toString(),le)},[se.type=="grid"?(vue.openBlock(),vue.createBlock(FormGrid,{key:0,data:se,list:vue.unref(Z).list,activeIndex:H.value.toString(),onChildConfig:U,onIndex:X,index:ae.toString()},null,8,["data","list","activeIndex","index"])):se.type=="table"?(vue.openBlock(),vue.createBlock(FormTable,{key:1,data:se,activeIndex:H.value.toString(),list:vue.unref(Z).list,index:ae.toString()},null,8,["data","activeIndex","list","index"])):se.type=="report"?(vue.openBlock(),vue.createBlock(FormReport,{key:2,data:se,activeIndex:H.value.toString(),index:ae},null,8,["data","activeIndex","index"])):se.type=="childform"?(vue.openBlock(),vue.createBlock(FormVue,{key:3,data:se,list:vue.unref(Z).list,activeIndex:H.value.toString(),index:ae.toString()},null,8,["data","list","activeIndex","index"])):se.type=="tabs"?(vue.openBlock(),vue.createBlock(FormTabs,{key:4,data:se,list:vue.unref(Z).list,activeIndex:H.value.toString(),onChildConfig:U,onIndex:X,index:ae.toString()},null,8,["data","list","activeIndex","index"])):se.type=="collapse"?(vue.openBlock(),vue.createBlock(FormCollapse,{key:5,data:se,list:vue.unref(Z).list,activeIndex:H.value.toString(),onChildConfig:U,onIndex:X,index:ae.toString()},null,8,["data","list","activeIndex","index"])):(vue.openBlock(),vue.createBlock(FormInput,{key:6,data:se,list:vue.unref(Z).list,activeIndex:H.value.toString(),index:ae.toString()},null,8,["data","list","activeIndex","index"]))],42,_hoisted_2$h)]))),256))]),_:1},8,["class","list"])]),_:1},8,["label-col"])}}}),FormDesign=_export_sfc(_sfc_main$O,[["__scopeId","data-v-8b866820"]]),index$b=Object.freeze(Object.defineProperty({__proto__:null,default:FormDesign},Symbol.toStringTag,{value:"Module"})),_hoisted_1$o={style:{padding:"2px"}},_hoisted_2$g={style:{display:"flex","align-items":"center","margin-bottom":"5px"}},_sfc_main$N=vue.defineComponent({__name:"Grid",props:{configData:{type:Object,default:{}}},setup(W){const C=W,Q=[{label:"上",value:"top"},{label:"右",value:"right"},{label:"下",value:"bottom"},{label:"左",value:"left"}],Z=[{label:"左对齐",value:"left"},{label:"右对齐",value:"right"},{label:"顶部对齐",value:"top"}];function H(te){C.configData[te]==null?C.configData[te]=0:C.configData[te]--,C.configData[te]<0&&(C.configData[te]=0)}function K(te){C.configData[te]==null?C.configData[te]=0:C.configData[te]++}function G(){C.configData.columns.push({type:"col",key:guid(),id:guid(),options:{span:0,offset:0,push:0,pull:0,xs:24,sm:12,md:12,lg:12,xl:12},list:[]})}function U(te){const{value:ie}=te.target;C.configData.labelPosition=ie,ie=="top"?C.configData.layout="vertical":C.configData.layout="horizontal"}function X(){}function ee(){}return(te,ie)=>{const ne=vue.resolveComponent("a-input"),oe=vue.resolveComponent("a-form-item"),re=vue.resolveComponent("a-input-number"),se=vue.resolveComponent("a-button"),ae=vue.resolveComponent("a-divider"),le=vue.resolveComponent("a-radio-group"),ce=vue.resolveComponent("a-textarea"),de=vue.resolveComponent("a-form");return vue.openBlock(),vue.createBlock(de,{layout:"vertical",model:W.configData,autocomplete:"off"},{default:vue.withCtx(()=>[vue.createVNode(oe,{label:"字段标识",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(ne,{value:W.configData.model,"onUpdate:value":ie[0]||(ie[0]=ue=>W.configData.model=ue)},null,8,["value"])]),_:1}),vue.createVNode(oe,{label:"栅格间距"},{default:vue.withCtx(()=>[vue.createVNode(re,{value:W.configData.options.gutter,"onUpdate:value":ie[1]||(ie[1]=ue=>W.configData.options.gutter=ue),min:0,max:30,style:{width:"50%"}},null,8,["value"]),vue.createTextVNode(" px ")]),_:1}),vue.createVNode(oe,{label:"列配置项"},{default:vue.withCtx(()=>[vue.createElementVNode("ul",null,[vue.createVNode(vue.unref(VueDraggableNext),{list:W.configData.columns,animation:"300",handle:".drag-icon",onStart:X,onEnd:ee},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(W.configData.columns,(ue,he)=>(vue.openBlock(),vue.createElementBlock("li",{key:he},[vue.createVNode(vue.unref(MenuOutlined),{class:"drag-icon",style:{"font-size":"14px",margin:"0px 5px",cursor:"move"}}),vue.createElementVNode("div",_hoisted_1$o,[vue.createVNode(re,{value:ue.options.span,"onUpdate:value":fe=>ue.options.span=fe,min:0,max:24,style:{width:"150px"}},null,8,["value","onUpdate:value"])]),vue.createVNode(se,{danger:"",shape:"circle",size:"small",style:{margin:"auto 5px"}},{icon:vue.withCtx(()=>[vue.createVNode(vue.unref(MinusOutlined))]),_:1})]))),128))]),_:1},8,["list"])]),vue.createVNode(se,{type:"link",onClick:G},{default:vue.withCtx(()=>[vue.createTextVNode("添加列")]),_:1}),vue.createVNode(ae,{type:"vertical"}),vue.createElementVNode("span",null,"合计:"+vue.toDisplayString(W.configData.columns.reduce((ue,he)=>ue+he.options.span,0)),1)]),_:1}),vue.createVNode(oe,{label:"栅格内边距"},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(Q,(ue,he)=>vue.createElementVNode("div",_hoisted_2$g,[vue.createTextVNode(vue.toDisplayString(ue.label)+": ",1),vue.createVNode(re,{value:W.configData[ue.value],"onUpdate:value":fe=>W.configData[ue.value]=fe,min:0},{addonBefore:vue.withCtx(()=>[vue.createVNode(vue.unref(MinusOutlined),{onClick:fe=>H(ue.value)},null,8,["onClick"])]),addonAfter:vue.withCtx(()=>[vue.createVNode(vue.unref(PlusOutlined),{onClick:fe=>K(ue.value)},null,8,["onClick"])]),_:2},1032,["value","onUpdate:value"])])),64))]),_:1}),vue.createVNode(oe,{label:"标签对齐方式"},{default:vue.withCtx(()=>[vue.createVNode(le,{value:W.configData.labelPosition,"onUpdate:value":ie[2]||(ie[2]=ue=>W.configData.labelPosition=ue),"button-style":"solid","option-type":"button",options:Z,onChange:U},null,8,["value"])]),_:1}),vue.createVNode(oe,{label:"类名"},{default:vue.withCtx(()=>[vue.createVNode(ne,{value:W.configData.class,"onUpdate:value":ie[3]||(ie[3]=ue=>W.configData.class=ue),placeholder:"多个用空格隔开"},null,8,["value"])]),_:1}),vue.createVNode(oe,{label:"其他扩展"},{default:vue.withCtx(()=>[vue.createVNode(ce,{value:W.configData.extended,"onUpdate:value":ie[4]||(ie[4]=ue=>W.configData.extended=ue),rows:3},null,8,["value"])]),_:1})]),_:1},8,["model"])}}}),CGrid=_export_sfc(_sfc_main$N,[["__scopeId","data-v-a7caf9e4"]]),Grid=Object.freeze(Object.defineProperty({__proto__:null,default:CGrid},Symbol.toStringTag,{value:"Module"})),_sfc_main$M=vue.defineComponent({__name:"Col",props:{configData:{type:Object,default:{}}},setup(W){return(C,Q)=>{const Z=vue.resolveComponent("a-input-number"),H=vue.resolveComponent("a-form-item"),K=vue.resolveComponent("a-textarea"),G=vue.resolveComponent("a-form");return vue.openBlock(),vue.createBlock(G,{layout:"vertical",model:W.configData,autocomplete:"off"},{default:vue.withCtx(()=>[vue.createVNode(H,{label:"栅格占据的列数"},{default:vue.withCtx(()=>[vue.createVNode(Z,{value:W.configData.options.span,"onUpdate:value":Q[0]||(Q[0]=U=>W.configData.options.span=U),min:1,max:24,style:{width:"100%"}},null,8,["value"])]),_:1}),vue.createVNode(H,{label:"栅格左侧的间隔格数"},{default:vue.withCtx(()=>[vue.createVNode(Z,{value:W.configData.options.offset,"onUpdate:value":Q[1]||(Q[1]=U=>W.configData.options.offset=U),min:0,max:10,style:{width:"100%"}},null,8,["value"])]),_:1}),vue.createVNode(H,{label:"其他扩展"},{default:vue.withCtx(()=>[vue.createVNode(K,{value:W.configData.options.extended,"onUpdate:value":Q[2]||(Q[2]=U=>W.configData.options.extended=U),rows:3},null,8,["value"])]),_:1})]),_:1},8,["model"])}}}),Col=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$M},Symbol.toStringTag,{value:"Module"})),_withScopeId$6=W=>(vue.pushScopeId("data-v-d3d49cc8"),W=W(),vue.popScopeId(),W),_hoisted_1$n={class:"table-column-setting"},_hoisted_2$f={class:"left"},_hoisted_3$d={class:"left-content"},_hoisted_4$9=_withScopeId$6(()=>vue.createElementVNode("br",null,null,-1)),_hoisted_5$8=_withScopeId$6(()=>vue.createElementVNode("br",null,null,-1)),_hoisted_6$7=_withScopeId$6(()=>vue.createElementVNode("br",null,null,-1)),_hoisted_7$6={class:"treeItem"},_hoisted_8$5={class:"title"},_hoisted_9$5={class:"right"},_hoisted_10$4={class:"right-content"},_hoisted_11$4={key:0},_sfc_main$L=vue.defineComponent({__name:"TableColumn",props:{configData:{type:Object,default:{}},tableColumns:{type:Object,default:[]}},emits:["update:tableColumns","ok"],setup(W,{expose:C,emit:Q}){const Z=useUserStore(),H=Empty$1.PRESENTED_IMAGE_SIMPLE,K=W,G=[{value:"input",label:"文本框"},{value:"select",label:"下拉框"}];let U=vue.ref(!1),X=vue.ref([]),ee=vue.ref([]);const te={children:"children",title:"title",key:"id",componentType:"",dic:""};let ie=vue.ref(),ne=vue.ref([]),oe=vue.ref([]),re=vue.ref([]),se={title:[{required:!0,message:"请填写标题",trigger:"change"}],width:[{pattern:/(^\d+((px)|%)?$)|(^auto$)/,message:"请填写正确的格式",trigger:"change"}]},ae=vue.ref();const le=Q;vue.watch(()=>K.tableColumns,Qe=>{X.value=ce(JSON.parse(JSON.stringify(Qe))),X.value.length>0&&(ae.value=X.value[0],ne.value=[ae.value.id],oe.value=ne.value)},{deep:!0,immediate:!0}),vue.watch(()=>X.value,(Qe,De)=>{ee.value=de(JSON.parse(JSON.stringify(Qe)))},{deep:!0,immediate:!0}),vue.watch(()=>U.value,Qe=>{Qe?ye():Ne()}),C({show:ue});function ce(Qe){return Qe.map(Ee=>(Ee.id||(Ee.id="column-"+guid()),Ee.align||(Ee.align="left"),Ee.options?(Ee.options.hidden==null&&(Ee.options.hidden=!1),Ee.options.orderRule==null&&(Ee.options.orderRule="")):Ee.options={hidden:!1,orderRule:""},Ee.children&&(Ee.children=ce(Ee.children)),Ee))}function de(Qe,De){return Qe.map(Re=>{De?Re.fPid=De:Re.fPid&&delete Re.fPid;let $e=De||Re.id;return Re.children&&(Re.children=de(Re.children,$e)),Re})}function ue(){U.value=!0}function he(Qe,De){debugger;ae.value?ie.value.validate().then(()=>{ae.value=De.selected?De.node.dataRef:void 0,oe.value=Qe}).catch(Ee=>{ne.value=oe.value}):(ae.value=De.selected?De.node.dataRef:void 0,oe.value=Qe)}function fe(Qe){if(Qe.node.dataRef){let De=JSON.parse(JSON.stringify(re.value));De.push(Qe.node.dataRef.id),re.value=Array.from(new Set(De))}}function ge(Qe){const De=Qe.node.id,Ee=Qe.dragNode.id,Re=Qe.node.pos.split("-"),$e=Qe.dropPosition-Number(Re[Re.length-1]),Be=(Me,Je,Oe)=>{Me.forEach((He,Fe)=>{if(He.id===Je)return Oe(He,Fe,Me);if(He.children)return Be(He.children,Je,Oe)})},Se=[...X.value];let be;if(Be(Se,Ee,(Me,Je,Oe)=>{Oe.splice(Je,1),be=Me}),!Qe.dropToGap)Be(Se,De,Me=>{Me.children=Me.children||[],Me.children.unshift(be)});else if((Qe.node.children||[]).length>0&&Qe.node.expanded&&$e===1)Be(Se,De,Me=>{Me.children=Me.children||[],Me.children.unshift(be)});else{let Me=[],Je=0;Be(Se,De,(Oe,He,Fe)=>{Me=Fe,Je=He}),$e===-1?Me.splice(Je,0,be):Me.splice(Je+1,0,be)}X.value=Se}function pe(Qe,De){for(let Ee=0;Ee<Qe.length;Ee++){let Re=Qe[Ee];if(Re.id===De)return Re;if(Re.children&&Re.children.length>0){let $e=pe(Re.children,De);if($e)return $e}}return null}function me(Qe,De){for(let Ee=0;Ee<Qe.length;Ee++){if(Qe[Ee].id==De){Qe[Ee+1]?ae.value=Qe[Ee+1]:Qe[Ee-1]?ae.value=Qe[Ee-1]:ae.value=void 0,ne.value=ae.value?[ae.value.id]:[],oe.value=ne.value,Qe.splice(Ee,1);return}Qe[Ee].children&&Qe[Ee].children.length>0&&me(Qe[Ee].children,De)}}function ke(){let Qe="newColumn";if(ae.value){Qe=ae.value.dataIndex;let Ee=pe(ee.value,ae.value.id);if(Ee.fPid){let Re=pe(ee.value,Ee.fPid);Re&&(Qe=Re.dataIndex)}}let De={id:"column-"+guid(),title:"新增列名",dataIndex:Qe,width:"auto",options:{hidden:!1}};if(ae.value){let Ee=pe(X.value,ae.value.id);Ee.children?Ee.children.push(De):Ee.children=[De];let Re=JSON.parse(JSON.stringify(re.value));Re.push(ae.value.id),re.value=Array.from(new Set(Re))}else X.value.push(De)}function Ce(Qe){me(X.value,Qe.id)}function ve(){ie.value==null?Ie():ie.value.validate().then(()=>{Ie()}).catch(Qe=>{console.log("error",Qe)})}function Ie(){le("update:tableColumns",we(X.value)),le("ok"),U.value=!1}function we(Qe,De){return Qe.map(Re=>(typeof Re.width=="string"&&(Re.width=Number(Re.width)?Number(Re.width):Re.width),Re.children&&(Re.children=we(Re.children)),Re))}function ye(){document.onkeydown=Qe=>{if(ae.value){let De=Qe||event||window.event||arguments.callee.caller.arguments[0],Ee=0;De&&De.keyCode==40?Ee=Ee+1:De&&De.keyCode==38&&(Ee=Ee-1),(Ee==1||Ee==-1)&&xe(X.value,Ee)}}}function xe(Qe,De){for(let Ee=0;Ee<Qe.length;Ee++){if(Qe[Ee].id==ae.value.id){Qe[Ee+De]&&(ae.value=Qe[Ee+De],ne.value=[ae.value.id],oe.value=ne.value);return}Qe[Ee].children&&Qe[Ee].children.length>0&&xe(Qe[Ee].children,De)}}function Ne(){document.onkeydown=null}function Te(Qe){Qe.target.value?(ae.value.width="0",ae.value.className="table-hidden"):(ae.value.width="auto",ae.value.className&&delete ae.value.className)}function Le(Qe){Qe.target.value&&(ae.value.sorter=!0)}function Ae(Qe){ae.value.align=Qe.target.value}return(Qe,De)=>{const Ee=vue.resolveComponent("a-switch"),Re=vue.resolveComponent("a-input"),$e=vue.resolveComponent("a-form-item"),Be=vue.resolveComponent("a-button"),Se=vue.resolveComponent("a-popconfirm"),be=vue.resolveComponent("a-tree"),Me=vue.resolveComponent("a-select"),Je=vue.resolveComponent("a-select-option"),Oe=vue.resolveComponent("a-radio"),He=vue.resolveComponent("a-radio-group"),Fe=vue.resolveComponent("a-form"),Ue=vue.resolveComponent("a-empty"),tt=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createBlock(tt,{open:vue.unref(U),"onUpdate:open":De[14]||(De[14]=Ge=>vue.isRef(U)?U.value=Ge:U=Ge),title:"列配置",width:"850px",onOk:ve},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$n,[vue.createElementVNode("div",_hoisted_2$f,[vue.createElementVNode("div",_hoisted_3$d,[vue.createTextVNode(" 行内编辑: "),vue.createVNode(Ee,{checked:W.configData.isedit,"onUpdate:checked":De[0]||(De[0]=Ge=>W.configData.isedit=Ge),"checked-children":"是","un-checked-children":"否"},null,8,["checked"]),_hoisted_4$9,vue.createTextVNode(),_hoisted_5$8,W.configData.isedit?(vue.openBlock(),vue.createBlock($e,{key:0,label:"更新标识",name:"title"},{default:vue.withCtx(()=>[vue.createVNode(Re,{value:W.configData.keyCol,"onUpdate:value":De[1]||(De[1]=Ge=>W.configData.keyCol=Ge),style:{width:"120px"}},null,8,["value"])]),_:1})):vue.createCommentVNode("",!0),vue.createVNode(Be,{style:{"margin-bottom":"10px"},type:"primary",size:"small",onClick:ke},{icon:vue.withCtx(()=>[vue.createVNode(vue.unref(PlusOutlined))]),default:vue.withCtx(()=>[vue.createTextVNode("添加")]),_:1}),_hoisted_6$7,vue.createVNode(be,{"expanded-keys":vue.unref(re),"onUpdate:expandedKeys":De[3]||(De[3]=Ge=>vue.isRef(re)?re.value=Ge:re=Ge),"selected-keys":vue.unref(ne),"onUpdate:selectedKeys":De[4]||(De[4]=Ge=>vue.isRef(ne)?ne.value=Ge:ne=Ge),fieldNames:te,"tree-data":vue.unref(X),blockNode:"",draggable:"",onDragenter:fe,onDrop:ge,onSelect:he},{title:vue.withCtx(Ge=>[vue.createElementVNode("div",_hoisted_7$6,[vue.createElementVNode("div",_hoisted_8$5,vue.toDisplayString(Ge.title),1),vue.createVNode(Se,{"cancel-text":"否","ok-text":"是",title:Ge.children&&Ge.children.length>0?"确定要删除吗?,这将会删除其下所有子节点":"确定要删除吗?",onConfirm:it=>Ce(Ge)},{default:vue.withCtx(()=>[vue.unref(ae)&&Ge.id==vue.unref(ae).id?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"operate",onClick:De[2]||(De[2]=vue.withModifiers(()=>{},["stop"]))},[vue.createVNode(vue.unref(CloseCircleOutlined),{style:{color:"#ff3030"}})])):vue.createCommentVNode("",!0)]),_:2},1032,["title","onConfirm"])])]),_:1},8,["expanded-keys","selected-keys","tree-data"])])]),vue.createElementVNode("div",_hoisted_9$5,[vue.createElementVNode("div",_hoisted_10$4,[vue.unref(ae)!==void 0?(vue.openBlock(),vue.createBlock(Fe,{key:0,ref_key:"formRef",ref:ie,"label-col":{span:4},model:vue.unref(ae),rules:vue.unref(se),"wrapper-col":{span:19}},{default:vue.withCtx(()=>[vue.createVNode($e,{label:"标题",name:"title"},{default:vue.withCtx(()=>[vue.createVNode(Re,{value:vue.unref(ae).title,"onUpdate:value":De[5]||(De[5]=Ge=>vue.unref(ae).title=Ge)},null,8,["value"])]),_:1}),!vue.unref(ae).children||!vue.unref(ae).children.length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_11$4,[vue.createVNode($e,{label:"绑定字段",name:"dataIndex"},{default:vue.withCtx(()=>[vue.createVNode(Re,{value:vue.unref(ae).dataIndex,"onUpdate:value":De[6]||(De[6]=Ge=>vue.unref(ae).dataIndex=Ge)},null,8,["value"])]),_:1}),W.configData.isedit?(vue.openBlock(),vue.createBlock($e,{key:0,label:"编辑控件",name:"width"},{default:vue.withCtx(()=>[vue.createVNode(Me,{value:vue.unref(ae).componentType,"onUpdate:value":De[7]||(De[7]=Ge=>vue.unref(ae).componentType=Ge),"show-search":"",style:{width:"40%"},options:G},null,8,["value"]),vue.unref(ae).componentType=="select"?(vue.openBlock(),vue.createBlock(Me,{key:0,value:vue.unref(ae).dic,"onUpdate:value":De[8]||(De[8]=Ge=>vue.unref(ae).dic=Ge),"allow-clear":"",style:{width:"40%","margin-left":"20px"}},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(Z).getAllDicts,(Ge,it)=>(vue.openBlock(),vue.createBlock(Je,{value:Ge.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ge.label+"("+Ge.value+")"),1)]),_:2},1032,["value"]))),256))]),_:1},8,["value"])):vue.createCommentVNode("",!0)]),_:1})):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),vue.createVNode($e,{label:"字段宽度",name:"width"},{default:vue.withCtx(()=>[vue.createVNode(Re,{value:vue.unref(ae).width,"onUpdate:value":De[9]||(De[9]=Ge=>vue.unref(ae).width=Ge)},null,8,["value"])]),_:1}),vue.createVNode($e,{label:"自动省略",name:"ellipsis"},{default:vue.withCtx(()=>[vue.createVNode(Ee,{checked:vue.unref(ae).ellipsis,"onUpdate:checked":De[10]||(De[10]=Ge=>vue.unref(ae).ellipsis=Ge)},null,8,["checked"])]),_:1}),vue.createVNode($e,{label:"对齐方式"},{default:vue.withCtx(()=>[vue.createVNode(He,{value:vue.unref(ae).align,"onUpdate:value":De[11]||(De[11]=Ge=>vue.unref(ae).align=Ge),onChange:Ae},{default:vue.withCtx(()=>[vue.createVNode(Oe,{value:"left"},{default:vue.withCtx(()=>[vue.createTextVNode("靠左")]),_:1}),vue.createVNode(Oe,{value:"center"},{default:vue.withCtx(()=>[vue.createTextVNode("居中")]),_:1}),vue.createVNode(Oe,{value:"right"},{default:vue.withCtx(()=>[vue.createTextVNode("靠右")]),_:1})]),_:1},8,["value"])]),_:1}),vue.createVNode($e,{label:"排序"},{default:vue.withCtx(()=>[vue.createVNode(He,{value:vue.unref(ae).sorter,"onUpdate:value":De[12]||(De[12]=Ge=>vue.unref(ae).sorter=Ge),onChange:Le},{default:vue.withCtx(()=>[vue.createVNode(Oe,{value:!0},{default:vue.withCtx(()=>[vue.createTextVNode("是")]),_:1}),vue.createVNode(Oe,{value:!1},{default:vue.withCtx(()=>[vue.createTextVNode("否")]),_:1})]),_:1},8,["value"])]),_:1}),vue.createVNode($e,{label:"隐藏"},{default:vue.withCtx(()=>[vue.createVNode(He,{value:vue.unref(ae).options.hidden,"onUpdate:value":De[13]||(De[13]=Ge=>vue.unref(ae).options.hidden=Ge),onChange:Te},{default:vue.withCtx(()=>[vue.createVNode(Oe,{value:!0},{default:vue.withCtx(()=>[vue.createTextVNode("是")]),_:1}),vue.createVNode(Oe,{value:!1},{default:vue.withCtx(()=>[vue.createTextVNode("否")]),_:1})]),_:1},8,["value"])]),_:1})]),_:1},8,["model","rules"])):(vue.openBlock(),vue.createBlock(Ue,{key:1,image:vue.unref(H)},null,8,["image"]))])])])]),_:1},8,["open"])}}}),TableColumn=_export_sfc(_sfc_main$L,[["__scopeId","data-v-d3d49cc8"]]),TableColumn$1=Object.freeze(Object.defineProperty({__proto__:null,default:TableColumn},Symbol.toStringTag,{value:"Module"})),_sfc_main$K=vue.defineComponent({__name:"TableBtnModal",props:{open:{type:Boolean,default:!1},data:{type:Array,default:[]}},emits:["onClose"],setup(W,{emit:C}){const Q=W;let Z=vue.ref(Q.data);debugger;const H=vue.defineComponent({props:{vnodes:{type:Object,required:!0}},render(){return this.vnodes}}),K=vue.ref();let G=vue.ref({operList:["行新增","导出"],typeList:[{label:"主按钮",value:"primary"},{label:"次按钮",value:"default"},{label:"虚按钮",value:"dashed"},{label:"文本按钮",value:"text"},{label:"链接按钮",value:"link"}],sizeList:[{label:"大",value:"large"},{label:"中",value:"default"},{label:"小",value:"small"}]}),U=vue.ref(Q.open),X=0;const ee=ae=>{ae.preventDefault(),G.value.operList.push(K.value||` ${X+=1}`),K.value=""};function te(ae,le){Z.value.splice(le,1)}function ie(){Z.value.push({title:"",oper:"",type:"primary",icon:"",size:""})}const ne=[{title:"行新增",oper:"onCAdd",type:"primary",icon:"",size:"small"},{title:"导出",oper:"onCExport",type:"primary",icon:"",size:"small"}];function oe(ae,le){const ce=ne.find(de=>de.title===ae);ce!=null&&(Z.value[le]={...ce})}const re=C;function se(){re("onClose",{update:!1})}return(ae,le)=>{const ce=vue.resolveComponent("a-divider"),de=vue.resolveComponent("a-input"),ue=vue.resolveComponent("a-button"),he=vue.resolveComponent("a-space"),fe=vue.resolveComponent("a-select"),ge=vue.resolveComponent("a-col"),pe=vue.resolveComponent("a-row"),me=vue.resolveComponent("a-form-item"),ke=vue.resolveComponent("a-drawer");return vue.openBlock(),vue.createBlock(ke,{title:"按钮配置",width:720,open:vue.unref(U),"body-style":{paddingBottom:"80px"},"footer-style":{textAlign:"right"},onClose:se},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(Z),(Ce,ve)=>(vue.openBlock(),vue.createBlock(pe,{style:{"padding-bottom":"5px"},gutter:[16,24]},{default:vue.withCtx(()=>[vue.createVNode(ge,{span:5},{default:vue.withCtx(()=>[vue.createVNode(fe,{value:Ce.title,"onUpdate:value":Ie=>Ce.title=Ie,"show-search":"",placeholder:"按钮名称",options:vue.unref(G).operList.map(Ie=>({value:Ie})),style:{width:"100%"},onChange:Ie=>oe(Ce.title,ve)},{dropdownRender:vue.withCtx(({menuNode:Ie})=>[vue.createVNode(vue.unref(H),{vnodes:Ie},null,8,["vnodes"]),vue.createVNode(ce,{style:{margin:"4px 0"}}),vue.createVNode(he,{style:{padding:"4px 8px"}},{default:vue.withCtx(()=>[vue.createVNode(de,{ref_for:!0,ref:"inputRef",value:K.value,"onUpdate:value":le[0]||(le[0]=we=>K.value=we),placeholder:"输入"},null,8,["value"]),vue.createVNode(ue,{type:"text",onClick:ee},{icon:vue.withCtx(()=>[vue.createVNode(vue.unref(PlusOutlined))]),_:1})]),_:1})]),_:2},1032,["value","onUpdate:value","options","onChange"])]),_:2},1024),vue.createVNode(ge,{span:5},{default:vue.withCtx(()=>[vue.createVNode(de,{value:Ce.oper,"onUpdate:value":Ie=>Ce.oper=Ie,placeholder:"按钮事件"},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(ge,{span:5},{default:vue.withCtx(()=>[vue.createVNode(fe,{value:Ce.type,"onUpdate:value":Ie=>Ce.type=Ie,placeholder:"按钮类型",options:vue.unref(G).typeList,style:{width:"100%"}},null,8,["value","onUpdate:value","options"])]),_:2},1024),vue.createVNode(ge,{span:4},{default:vue.withCtx(()=>[vue.createVNode(de,{value:Ce.icon,"onUpdate:value":Ie=>Ce.icon=Ie,placeholder:"按钮图标"},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(ge,{span:3},{default:vue.withCtx(()=>[vue.createVNode(fe,{value:Ce.size,"onUpdate:value":Ie=>Ce.size=Ie,placeholder:"大小",options:vue.unref(G).sizeList,style:{width:"100%"}},null,8,["value","onUpdate:value","options"])]),_:2},1024),vue.createVNode(ge,{span:2,style:{"line-height":"30px"}},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(MinusCircleFilled),{onClick:Ie=>te(Ce,ve),style:{cursor:"pointer !important","font-size":"16px",color:"#f56c6c","border-color":"#fbc4c4"}},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),256)),vue.createVNode(me,null,{default:vue.withCtx(()=>[vue.createVNode(ue,{type:"dashed",style:{width:"100%"},onClick:ie},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(PlusOutlined)),vue.createTextVNode(" 添加自定义操作按钮 ")]),_:1})]),_:1})]),_:1},8,["open"])}}}),TableBtnModal=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$K},Symbol.toStringTag,{value:"Module"})),_withScopeId$5=W=>(vue.pushScopeId("data-v-11de7daa"),W=W(),vue.popScopeId(),W),_hoisted_1$m=_withScopeId$5(()=>vue.createElementVNode("a",{style:{color:"red","font-size":"10px"}},"仅支持报表设计",-1)),_hoisted_2$e={key:0},_hoisted_3$c={key:1},_sfc_main$J=vue.defineComponent({__name:"Table",props:{configData:{type:Object,default:{}}},setup(W){const C=vue.ref(!1),Q=useFormStore(),Z=useDataStore();let H=vue.ref(),K=vue.computed(()=>Z.getSelectTables.filter(le=>le.isList==1));const G=W;let U=vue.ref([]),X=vue.ref(G.configData.action);vue.watch(()=>G.configData.action,le=>{X.value=le},{deep:!0});const ee=()=>{X.value.push({title:"",oper:""})};function te(le){let ce=X.value.indexOf(le);ce!==-1&&X.value.splice(ce,1)}function ie(le){let ce=Z.getSelectData.filter(he=>he.isList==1),de=ce.filter(he=>he.value.split(".")[0]==le).map(he=>he.value.split(".")[1]);de.length==0&&(de=ce.map(he=>he.value));debugger;let ue=de.map(he=>({key:"column-"+guid(),title:he,dataIndex:he,width:"auto",options:{hidden:!1}}));G.configData.tableColumns=ue}function ne(){U.value=JSON.parse(JSON.stringify(G.configData.tableColumns,null," ")),H.value.show()}function oe(){G.configData.tableColumns=U.value}function re(){G.configData.options.headerBtns=G.configData.options.headerBtns||[],C.value=!0}function se(le){C.value=!1}function ae(le){let ce=G.configData.extended,de=':isSelectList="true" @row-change="onRowChange" @update-value="onUpdateValue" :keyName="keyName" :mode="mode"',ue=Q.formData.config.eventScript[0].func;le?(G.configData.extended=ce+ce?" ":`${de}`,Q.formData.config.eventScript[0].func=ue):(G.configData.extended=ce.replace(`${de}`,""),Q.formData.config.eventScript[0].func=ue)}return(le,ce)=>{const de=vue.resolveComponent("a-input"),ue=vue.resolveComponent("a-form-item"),he=vue.resolveComponent("a-select"),fe=vue.resolveComponent("a-button"),ge=vue.resolveComponent("a-switch"),pe=vue.resolveComponent("a-col"),me=vue.resolveComponent("a-row"),ke=vue.resolveComponent("a-input-number"),Ce=vue.resolveComponent("a-textarea"),ve=vue.resolveComponent("a-form");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(ve,{layout:"vertical",model:W.configData,autocomplete:"off"},{default:vue.withCtx(()=>[vue.createVNode(ue,{label:"id",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(de,{value:W.configData.key,"onUpdate:value":ce[0]||(ce[0]=Ie=>W.configData.key=Ie)},null,8,["value"])]),_:1}),vue.createVNode(ue,{label:"数据源",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(he,{value:W.configData.model,"onUpdate:value":ce[1]||(ce[1]=Ie=>W.configData.model=Ie),options:vue.unref(K),onChange:ie},null,8,["value","options"])]),_:1}),vue.createVNode(fe,{onClick:re,block:""},{default:vue.withCtx(()=>[vue.createTextVNode("功能按钮("),_hoisted_1$m,vue.createTextVNode(")")]),_:1}),vue.createVNode(ue,{label:"列配置"},{default:vue.withCtx(()=>[vue.createVNode(fe,{onClick:ne,block:""},{default:vue.withCtx(()=>[vue.createTextVNode("属性配置")]),_:1})]),_:1}),vue.createVNode(ue,{class:"c-form-item-margin-5",label:"显示操作列"},{default:vue.withCtx(()=>[vue.createVNode(ge,{checked:W.configData.options.showAction,"onUpdate:checked":ce[2]||(ce[2]=Ie=>W.configData.options.showAction=Ie)},null,8,["checked"])]),_:1}),W.configData.options.showAction?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$e,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(W.configData.action,(Ie,we)=>(vue.openBlock(),vue.createBlock(me,{style:{"padding-bottom":"5px"}},{default:vue.withCtx(()=>[vue.createVNode(pe,{span:9},{default:vue.withCtx(()=>[vue.createVNode(de,{value:Ie.title,"onUpdate:value":ye=>Ie.title=ye,placeholder:"按钮名称"},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(pe,{span:9,offset:1},{default:vue.withCtx(()=>[vue.createVNode(de,{value:Ie.oper,"onUpdate:value":ye=>Ie.oper=ye,placeholder:"事件"},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(pe,{span:3,offset:1,style:{"line-height":"30px"}},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(MinusCircleFilled),{onClick:ye=>te(Ie),style:{"font-size":"16px",color:"#f56c6c","border-color":"#fbc4c4"}},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),256)),vue.createVNode(ue,null,{default:vue.withCtx(()=>[vue.createVNode(fe,{type:"dashed",style:{width:"100%"},onClick:ee},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(PlusOutlined)),vue.createTextVNode(" 添加自定义操作按钮 ")]),_:1})]),_:1})])):vue.createCommentVNode("",!0),vue.createVNode(ue,{label:"是否分页"},{default:vue.withCtx(()=>[vue.createVNode(ge,{checked:W.configData.options.pagination,"onUpdate:checked":ce[3]||(ce[3]=Ie=>W.configData.options.pagination=Ie)},null,8,["checked"])]),_:1}),W.configData.options.pagination?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$c,[vue.createVNode(ue,{label:"每页显示数目"},{default:vue.withCtx(()=>[vue.createVNode(ke,{value:W.configData.options.pageSize,"onUpdate:value":ce[4]||(ce[4]=Ie=>W.configData.options.pageSize=Ie),min:5,max:100,defaultValue:5,style:{width:"100%"}},null,8,["value"])]),_:1})])):vue.createCommentVNode("",!0),vue.createVNode(ue,{label:"纵向滚动高度"},{default:vue.withCtx(()=>[vue.createVNode(ke,{value:W.configData.options.scrollY,"onUpdate:value":ce[5]||(ce[5]=Ie=>W.configData.options.scrollY=Ie),min:0,style:{width:"100%"}},null,8,["value"])]),_:1}),vue.createVNode(ue,{label:"是否用于表下拉"},{default:vue.withCtx(()=>[vue.createVNode(ge,{checked:W.configData.options.isTableSelect,"onUpdate:checked":ce[6]||(ce[6]=Ie=>W.configData.options.isTableSelect=Ie),onChange:ae},null,8,["checked"])]),_:1}),vue.createVNode(ue,{label:"其他扩展"},{default:vue.withCtx(()=>[vue.createVNode(Ce,{value:W.configData.extended,"onUpdate:value":ce[7]||(ce[7]=Ie=>W.configData.extended=Ie),placeholder:"",rows:3},null,8,["value"])]),_:1})]),_:1},8,["model"]),vue.createVNode(TableColumn,{ref_key:"settingRef",ref:H,configData:W.configData,tableColumns:vue.unref(U),"onUpdate:tableColumns":ce[8]||(ce[8]=Ie=>vue.isRef(U)?U.value=Ie:U=Ie),onOk:oe},null,8,["configData","tableColumns"]),C.value?(vue.openBlock(),vue.createBlock(_sfc_main$K,{key:0,open:C.value,onOnClose:se,data:W.configData.options.headerBtns},null,8,["open","data"])):vue.createCommentVNode("",!0)],64)}}}),CTableProperties=_export_sfc(_sfc_main$J,[["__scopeId","data-v-11de7daa"]]),Table$1=Object.freeze(Object.defineProperty({__proto__:null,default:CTableProperties},Symbol.toStringTag,{value:"Module"})),_withScopeId$4=W=>(vue.pushScopeId("data-v-409effda"),W=W(),vue.popScopeId(),W),_hoisted_1$l={style:{height:"40px"}},_hoisted_2$d={style:{float:"right"}},_hoisted_3$b={style:{height:"500px"}},_hoisted_4$8={style:{width:"20%",height:"100%",border:"1px solid #e4e7ed",float:"left"}},_hoisted_5$7=["onClick"],_hoisted_6$6={style:{color:"#67c23a",width:"30px",display:"inline-block"}},_hoisted_7$5={style:{width:"80%",height:"100%",float:"left"}},_hoisted_8$4={class:"content"},_hoisted_9$4=_withScopeId$4(()=>vue.createElementVNode("span",{style:{color:"blue","font-size":"12px"}},"// 默认直接返回响应数据 res,可以在下方对数据进行处理 (res) => { ",-1)),_hoisted_10$3=_withScopeId$4(()=>vue.createElementVNode("br",null,null,-1)),_hoisted_11$3=_withScopeId$4(()=>vue.createElementVNode("span",{style:{color:"blue","font-size":"12px"}}," }",-1)),_sfc_main$I=vue.defineComponent({__name:"DataSource",setup(W){vue.ref({ywh:"22",hell0:"rere"});const C=useFormStore(),Q=ee=>{let te=U.value.params.indexOf(ee);te!==-1&&U.value.params.splice(te,1)},Z=()=>{U.value.params.push({key:"",value:""})};let H=vue.ref(C.formData.config.dataSource);function K(){const ee={key:"fun1",name:"getData",url:"http://",method:"post",auto:!1,params:[],headers:[],responseFunc:"return res;",requestFunc:"return config;",errorFunc:"",args:[]};H.value.push(ee)}let G=vue.ref(-1),U=vue.ref({});function X(ee){G.value=ee,U.value=H.value[ee]}return(ee,te)=>{const ie=vue.resolveComponent("a-button"),ne=vue.resolveComponent("a-input"),oe=vue.resolveComponent("a-form-item"),re=vue.resolveComponent("a-textarea"),se=vue.resolveComponent("a-radio-button"),ae=vue.resolveComponent("a-radio-group"),le=vue.resolveComponent("a-form");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$l,[vue.createVNode(ie,{type:"link",primary:"",onClick:K},{icon:vue.withCtx(()=>[vue.createVNode(vue.unref(PlusOutlined))]),default:vue.withCtx(()=>[vue.createTextVNode("新增数据源")]),_:1}),vue.createElementVNode("div",_hoisted_2$d,[vue.createVNode(ie,{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(ie,{style:{"margin-left":"8px"}},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})])]),vue.createElementVNode("div",_hoisted_3$b,[vue.createElementVNode("div",_hoisted_4$8,[vue.createElementVNode("ul",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(H),(ce,de)=>(vue.openBlock(),vue.createElementBlock("li",{class:vue.normalizeClass(["menu-item",{active:vue.unref(G)==de}]),onClick:ue=>X(de)},[vue.createElementVNode("span",_hoisted_6$6,vue.toDisplayString(ce.method),1),vue.createTextVNode(" "+vue.toDisplayString(ce.name),1)],10,_hoisted_5$7))),256))])]),vue.createElementVNode("div",_hoisted_7$5,[vue.createElementVNode("div",_hoisted_8$4,[vue.createVNode(le,{"label-col":{span:4},"wrapper-col":{span:20}},{default:vue.withCtx(()=>[vue.createVNode(oe,{label:"名称",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(ne,{value:vue.unref(U).name,"onUpdate:value":te[0]||(te[0]=ce=>vue.unref(U).name=ce)},null,8,["value"])]),_:1}),vue.createVNode(oe,{label:"请求地址",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(re,{value:vue.unref(U).url,"onUpdate:value":te[1]||(te[1]=ce=>vue.unref(U).url=ce),placeholder:"",rows:1},null,8,["value"])]),_:1}),vue.createVNode(oe,{label:"请求方法"},{default:vue.withCtx(()=>[vue.createVNode(ae,{value:vue.unref(U).method,"onUpdate:value":te[2]||(te[2]=ce=>vue.unref(U).method=ce)},{default:vue.withCtx(()=>[vue.createVNode(se,{value:"get"},{default:vue.withCtx(()=>[vue.createTextVNode("GET")]),_:1}),vue.createVNode(se,{value:"post"},{default:vue.withCtx(()=>[vue.createTextVNode("POST")]),_:1})]),_:1},8,["value"])]),_:1}),vue.createVNode(oe,{label:"请求参数"},{default:vue.withCtx(()=>[vue.createVNode(le,{"label-col":{span:1},"wrapper-col":{span:23}},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(U).params,(ce,de)=>(vue.openBlock(),vue.createBlock(oe,null,{default:vue.withCtx(()=>[vue.createVNode(ne,{style:{width:"170px","margin-right":"8px"},value:ce.key,"onUpdate:value":ue=>ce.key=ue},null,8,["value","onUpdate:value"]),vue.createVNode(ne,{style:{width:"170px","margin-right":"8px"},value:ce.value,"onUpdate:value":ue=>ce.value=ue},null,8,["value","onUpdate:value"]),vue.createVNode(vue.unref(MinusCircleOutlined),{onClick:ue=>Q(ce)},null,8,["onClick"])]),_:2},1024))),256)),vue.createVNode(oe,null,{default:vue.withCtx(()=>[vue.createVNode(ie,{type:"dashed",style:{width:"60%"},onClick:Z},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(PlusOutlined)),vue.createTextVNode(" 添加参数 ")]),_:1})]),_:1})]),_:1})]),_:1}),vue.createVNode(oe,{label:"数据处理"},{default:vue.withCtx(()=>[_hoisted_9$4,_hoisted_10$3,vue.createVNode(re,{value:vue.unref(U).requestFunc,"onUpdate:value":te[3]||(te[3]=ce=>vue.unref(U).requestFunc=ce),placeholder:"",rows:4,defaultValue:"return res;"},null,8,["value"]),_hoisted_11$3]),_:1})]),_:1})])])])],64)}}}),DataSource$1=_export_sfc(_sfc_main$I,[["__scopeId","data-v-409effda"]]),DataSource$2=Object.freeze(Object.defineProperty({__proto__:null,default:DataSource$1},Symbol.toStringTag,{value:"Module"})),editorProps={modelValue:{type:String,default:null},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"100%"},language:{type:String,default:"javascript"},theme:{type:String,validator(W){return["vs","hc-black","vs-dark"].includes(W)},default:"vs-dark"},options:{type:Object,default:function(){return{automaticLayout:!0,foldingStrategy:"indentation",renderLineHighlight:"all",selectOnLineNumbers:!0,minimap:{enabled:!1},readOnly:!1,scrollBeyondLastLine:!1,overviewRulerBorder:!1,tabSize:4,insertSpaces:!0}}}};function tail(W,C=0){return W[W.length-(1+C)]}function tail2(W){if(W.length===0)throw new Error("Invalid tail call");return[W.slice(0,W.length-1),W[W.length-1]]}function equals$1(W,C,Q=(Z,H)=>Z===H){if(W===C)return!0;if(!W||!C||W.length!==C.length)return!1;for(let Z=0,H=W.length;Z<H;Z++)if(!Q(W[Z],C[Z]))return!1;return!0}function removeFastWithoutKeepingOrder(W,C){const Q=W.length-1;C<Q&&(W[C]=W[Q]),W.pop()}function binarySearch(W,C,Q){return binarySearch2(W.length,Z=>Q(W[Z],C))}function binarySearch2(W,C){let Q=0,Z=W-1;for(;Q<=Z;){const H=(Q+Z)/2|0,K=C(H);if(K<0)Q=H+1;else if(K>0)Z=H-1;else return H}return-(Q+1)}function quickSelect(W,C,Q){if(W=W|0,W>=C.length)throw new TypeError("invalid index");const Z=C[Math.floor(C.length*Math.random())],H=[],K=[],G=[];for(const U of C){const X=Q(U,Z);X<0?H.push(U):X>0?K.push(U):G.push(U)}return W<H.length?quickSelect(W,H,Q):W<H.length+G.length?G[0]:quickSelect(W-(H.length+G.length),K,Q)}function groupBy(W,C){const Q=[];let Z;for(const H of W.slice(0).sort(C))!Z||C(Z[0],H)!==0?(Z=[H],Q.push(Z)):Z.push(H);return Q}function*groupAdjacentBy(W,C){let Q,Z;for(const H of W)Z!==void 0&&C(Z,H)?Q.push(H):(Q&&(yield Q),Q=[H]),Z=H;Q&&(yield Q)}function forEachAdjacent(W,C){for(let Q=0;Q<=W.length;Q++)C(Q===0?void 0:W[Q-1],Q===W.length?void 0:W[Q])}function forEachWithNeighbors(W,C){for(let Q=0;Q<W.length;Q++)C(Q===0?void 0:W[Q-1],W[Q],Q+1===W.length?void 0:W[Q+1])}function coalesce(W){return W.filter(C=>!!C)}function coalesceInPlace(W){let C=0;for(let Q=0;Q<W.length;Q++)W[Q]&&(W[C]=W[Q],C+=1);W.length=C}function isFalsyOrEmpty(W){return!Array.isArray(W)||W.length===0}function isNonEmptyArray(W){return Array.isArray(W)&&W.length>0}function distinct(W,C=Q=>Q){const Q=new Set;return W.filter(Z=>{const H=C(Z);return Q.has(H)?!1:(Q.add(H),!0)})}function firstOrDefault(W,C){return W.length>0?W[0]:C}function range(W,C){let Q=typeof C=="number"?W:0;typeof C=="number"?Q=W:(Q=0,C=W);const Z=[];if(Q<=C)for(let H=Q;H<C;H++)Z.push(H);else for(let H=Q;H>C;H--)Z.push(H);return Z}function arrayInsert(W,C,Q){const Z=W.slice(0,C),H=W.slice(C);return Z.concat(Q,H)}function pushToStart(W,C){const Q=W.indexOf(C);Q>-1&&(W.splice(Q,1),W.unshift(C))}function pushToEnd(W,C){const Q=W.indexOf(C);Q>-1&&(W.splice(Q,1),W.push(C))}function pushMany(W,C){for(const Q of C)W.push(Q)}function asArray(W){return Array.isArray(W)?W:[W]}function insertInto(W,C,Q){const Z=getActualStartIndex(W,C),H=W.length,K=Q.length;W.length=H+K;for(let G=H-1;G>=Z;G--)W[G+K]=W[G];for(let G=0;G<K;G++)W[G+Z]=Q[G]}function splice$1(W,C,Q,Z){const H=getActualStartIndex(W,C);let K=W.splice(H,Q);return K===void 0&&(K=[]),insertInto(W,H,Z),K}function getActualStartIndex(W,C){return C<0?Math.max(C+W.length,0):Math.min(C,W.length)}var CompareResult;(function(W){function C(K){return K<0}W.isLessThan=C;function Q(K){return K<=0}W.isLessThanOrEqual=Q;function Z(K){return K>0}W.isGreaterThan=Z;function H(K){return K===0}W.isNeitherLessOrGreaterThan=H,W.greaterThan=1,W.lessThan=-1,W.neitherLessOrGreaterThan=0})(CompareResult||(CompareResult={}));function compareBy(W,C){return(Q,Z)=>C(W(Q),W(Z))}function tieBreakComparators(...W){return(C,Q)=>{for(const Z of W){const H=Z(C,Q);if(!CompareResult.isNeitherLessOrGreaterThan(H))return H}return CompareResult.neitherLessOrGreaterThan}}const numberComparator=(W,C)=>W-C,booleanComparator=(W,C)=>numberComparator(W?1:0,C?1:0);function reverseOrder(W){return(C,Q)=>-W(C,Q)}class ArrayQueue{constructor(C){this.items=C,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(C){let Q=this.firstIdx;for(;Q<this.items.length&&C(this.items[Q]);)Q++;const Z=Q===this.firstIdx?null:this.items.slice(this.firstIdx,Q);return this.firstIdx=Q,Z}takeFromEndWhile(C){let Q=this.lastIdx;for(;Q>=0&&C(this.items[Q]);)Q--;const Z=Q===this.lastIdx?null:this.items.slice(Q+1,this.lastIdx+1);return this.lastIdx=Q,Z}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const C=this.items[this.firstIdx];return this.firstIdx++,C}takeCount(C){const Q=this.items.slice(this.firstIdx,this.firstIdx+C);return this.firstIdx+=C,Q}}class CallbackIterable{constructor(C){this.iterate=C}toArray(){const C=[];return this.iterate(Q=>(C.push(Q),!0)),C}filter(C){return new CallbackIterable(Q=>this.iterate(Z=>C(Z)?Q(Z):!0))}map(C){return new CallbackIterable(Q=>this.iterate(Z=>Q(C(Z))))}findLast(C){let Q;return this.iterate(Z=>(C(Z)&&(Q=Z),!0)),Q}findLastMaxBy(C){let Q,Z=!0;return this.iterate(H=>((Z||CompareResult.isGreaterThan(C(H,Q)))&&(Z=!1,Q=H),!0)),Q}}CallbackIterable.empty=new CallbackIterable(W=>{});class Permutation{constructor(C){this._indexMap=C}static createSortPermutation(C,Q){const Z=Array.from(C.keys()).sort((H,K)=>Q(C[H],C[K]));return new Permutation(Z)}apply(C){return C.map((Q,Z)=>C[this._indexMap[Z]])}inverse(){const C=this._indexMap.slice();for(let Q=0;Q<this._indexMap.length;Q++)C[this._indexMap[Q]]=Q;return new Permutation(C)}}function isString$2(W){return typeof W=="string"}function isObject$1(W){return typeof W=="object"&&W!==null&&!Array.isArray(W)&&!(W instanceof RegExp)&&!(W instanceof Date)}function isTypedArray(W){const C=Object.getPrototypeOf(Uint8Array);return typeof W=="object"&&W instanceof C}function isNumber$1(W){return typeof W=="number"&&!isNaN(W)}function isIterable(W){return!!W&&typeof W[Symbol.iterator]=="function"}function isBoolean(W){return W===!0||W===!1}function isUndefined(W){return typeof W>"u"}function isDefined(W){return!isUndefinedOrNull(W)}function isUndefinedOrNull(W){return isUndefined(W)||W===null}function assertType(W,C){if(!W)throw new Error(C?`Unexpected type, expected '${C}'`:"Unexpected type")}function assertIsDefined(W){if(isUndefinedOrNull(W))throw new Error("Assertion Failed: argument is undefined or null");return W}function isFunction(W){return typeof W=="function"}function validateConstraints(W,C){const Q=Math.min(W.length,C.length);for(let Z=0;Z<Q;Z++)validateConstraint(W[Z],C[Z])}function validateConstraint(W,C){if(isString$2(C)){if(typeof W!==C)throw new Error(`argument does not match constraint: typeof ${C}`)}else if(isFunction(C)){try{if(W instanceof C)return}catch{}if(!isUndefinedOrNull(W)&&W.constructor===C||C.length===1&&C.call(void 0,W)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function deepClone(W){if(!W||typeof W!="object"||W instanceof RegExp)return W;const C=Array.isArray(W)?[]:{};return Object.entries(W).forEach(([Q,Z])=>{C[Q]=Z&&typeof Z=="object"?deepClone(Z):Z}),C}function deepFreeze(W){if(!W||typeof W!="object")return W;const C=[W];for(;C.length>0;){const Q=C.shift();Object.freeze(Q);for(const Z in Q)if(_hasOwnProperty.call(Q,Z)){const H=Q[Z];typeof H=="object"&&!Object.isFrozen(H)&&!isTypedArray(H)&&C.push(H)}}return W}const _hasOwnProperty=Object.prototype.hasOwnProperty;function cloneAndChange(W,C){return _cloneAndChange(W,C,new Set)}function _cloneAndChange(W,C,Q){if(isUndefinedOrNull(W))return W;const Z=C(W);if(typeof Z<"u")return Z;if(Array.isArray(W)){const H=[];for(const K of W)H.push(_cloneAndChange(K,C,Q));return H}if(isObject$1(W)){if(Q.has(W))throw new Error("Cannot clone recursive data-structure");Q.add(W);const H={};for(const K in W)_hasOwnProperty.call(W,K)&&(H[K]=_cloneAndChange(W[K],C,Q));return Q.delete(W),H}return W}function mixin(W,C,Q=!0){return isObject$1(W)?(isObject$1(C)&&Object.keys(C).forEach(Z=>{Z in W?Q&&(isObject$1(W[Z])&&isObject$1(C[Z])?mixin(W[Z],C[Z],Q):W[Z]=C[Z]):W[Z]=C[Z]}),W):C}function equals(W,C){if(W===C)return!0;if(W==null||C===null||C===void 0||typeof W!=typeof C||typeof W!="object"||Array.isArray(W)!==Array.isArray(C))return!1;let Q,Z;if(Array.isArray(W)){if(W.length!==C.length)return!1;for(Q=0;Q<W.length;Q++)if(!equals(W[Q],C[Q]))return!1}else{const H=[];for(Z in W)H.push(Z);H.sort();const K=[];for(Z in C)K.push(Z);if(K.sort(),!equals(H,K))return!1;for(Q=0;Q<H.length;Q++)if(!equals(W[H[Q]],C[H[Q]]))return!1}return!0}function getAllPropertyNames(W){let C=[];for(;Object.prototype!==W;)C=C.concat(Object.getOwnPropertyNames(W)),W=Object.getPrototypeOf(W);return C}function getAllMethodNames(W){const C=[];for(const Q of getAllPropertyNames(W))typeof W[Q]=="function"&&C.push(Q);return C}function createProxyObject$1(W,C){const Q=H=>function(){const K=Array.prototype.slice.call(arguments,0);return C(H,K)},Z={};for(const H of W)Z[H]=Q(H);return Z}let isPseudo=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function _format$1(W,C){let Q;return C.length===0?Q=W:Q=W.replace(/\{(\d+)\}/g,(Z,H)=>{const K=H[0],G=C[K];let U=Z;return typeof G=="string"?U=G:(typeof G=="number"||typeof G=="boolean"||G===void 0||G===null)&&(U=String(G)),U}),isPseudo&&(Q="["+Q.replace(/[aouei]/g,"$&$&")+"]"),Q}function localize(W,C,...Q){return _format$1(C,Q)}function localize2(W,C,...Q){const Z=_format$1(C,Q);return{value:Z,original:Z}}function getConfiguredDefaultLocale(W){}var _a$5,_b$2;const LANGUAGE_DEFAULT="en";let _isWindows=!1,_isMacintosh=!1,_isLinux=!1,_isNative=!1,_isWeb=!1,_isIOS=!1,_isMobile=!1,_locale,_language=LANGUAGE_DEFAULT,_platformLocale=LANGUAGE_DEFAULT,_translationsConfigFile,_userAgent;const $globalThis=globalThis;let nodeProcess;typeof $globalThis.vscode<"u"&&typeof $globalThis.vscode.process<"u"?nodeProcess=$globalThis.vscode.process:typeof process<"u"&&typeof((_a$5=process==null?void 0:process.versions)===null||_a$5===void 0?void 0:_a$5.node)=="string"&&(nodeProcess=process);const isElectronProcess=typeof((_b$2=nodeProcess==null?void 0:nodeProcess.versions)===null||_b$2===void 0?void 0:_b$2.electron)=="string",isElectronRenderer=isElectronProcess&&(nodeProcess==null?void 0:nodeProcess.type)==="renderer";if(typeof nodeProcess=="object"){_isWindows=nodeProcess.platform==="win32",_isMacintosh=nodeProcess.platform==="darwin",_isLinux=nodeProcess.platform==="linux",_isLinux&&nodeProcess.env.SNAP&&nodeProcess.env.SNAP_REVISION,nodeProcess.env.CI||nodeProcess.env.BUILD_ARTIFACTSTAGINGDIRECTORY,_locale=LANGUAGE_DEFAULT,_language=LANGUAGE_DEFAULT;const W=nodeProcess.env.VSCODE_NLS_CONFIG;if(W)try{const C=JSON.parse(W),Q=C.availableLanguages["*"];_locale=C.locale,_platformLocale=C.osLocale,_language=Q||LANGUAGE_DEFAULT,_translationsConfigFile=C._translationsConfigFile}catch{}_isNative=!0}else typeof navigator=="object"&&!isElectronRenderer?(_userAgent=navigator.userAgent,_isWindows=_userAgent.indexOf("Windows")>=0,_isMacintosh=_userAgent.indexOf("Macintosh")>=0,_isIOS=(_userAgent.indexOf("Macintosh")>=0||_userAgent.indexOf("iPad")>=0||_userAgent.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,_isLinux=_userAgent.indexOf("Linux")>=0,_isMobile=(_userAgent==null?void 0:_userAgent.indexOf("Mobi"))>=0,_isWeb=!0,localize({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),_locale=LANGUAGE_DEFAULT,_language=_locale,_platformLocale=navigator.language):console.error("Unable to resolve platform.");const isWindows=_isWindows,isMacintosh=_isMacintosh,isLinux=_isLinux,isNative=_isNative,isWeb=_isWeb,isWebWorker=_isWeb&&typeof $globalThis.importScripts=="function",webWorkerOrigin=isWebWorker?$globalThis.origin:void 0,isIOS=_isIOS,isMobile=_isMobile,userAgent$1=_userAgent,language$1g=_language,setTimeout0IsFaster=typeof $globalThis.postMessage=="function"&&!$globalThis.importScripts,setTimeout0=(()=>{if(setTimeout0IsFaster){const W=[];$globalThis.addEventListener("message",Q=>{if(Q.data&&Q.data.vscodeScheduleAsyncWork)for(let Z=0,H=W.length;Z<H;Z++){const K=W[Z];if(K.id===Q.data.vscodeScheduleAsyncWork){W.splice(Z,1),K.callback();return}}});let C=0;return Q=>{const Z=++C;W.push({id:Z,callback:Q}),$globalThis.postMessage({vscodeScheduleAsyncWork:Z},"*")}}return W=>setTimeout(W)})(),OS=_isMacintosh||_isIOS?2:_isWindows?1:3;let _isLittleEndian=!0,_isLittleEndianComputed=!1;function isLittleEndian(){if(!_isLittleEndianComputed){_isLittleEndianComputed=!0;const W=new Uint8Array(2);W[0]=1,W[1]=2,_isLittleEndian=new Uint16Array(W.buffer)[0]===513}return _isLittleEndian}const isChrome$1=!!(userAgent$1&&userAgent$1.indexOf("Chrome")>=0),isFirefox$1=!!(userAgent$1&&userAgent$1.indexOf("Firefox")>=0),isSafari$1=!!(!isChrome$1&&userAgent$1&&userAgent$1.indexOf("Safari")>=0),isEdge=!!(userAgent$1&&userAgent$1.indexOf("Edg/")>=0),isAndroid$1=!!(userAgent$1&&userAgent$1.indexOf("Android")>=0),EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var Iterable;(function(W){function C(de){return de&&typeof de=="object"&&typeof de[Symbol.iterator]=="function"}W.is=C;const Q=Object.freeze([]);function Z(){return Q}W.empty=Z;function*H(de){yield de}W.single=H;function K(de){return C(de)?de:H(de)}W.wrap=K;function G(de){return de||Q}W.from=G;function*U(de){for(let ue=de.length-1;ue>=0;ue--)yield de[ue]}W.reverse=U;function X(de){return!de||de[Symbol.iterator]().next().done===!0}W.isEmpty=X;function ee(de){return de[Symbol.iterator]().next().value}W.first=ee;function te(de,ue){for(const he of de)if(ue(he))return!0;return!1}W.some=te;function ie(de,ue){for(const he of de)if(ue(he))return he}W.find=ie;function*ne(de,ue){for(const he of de)ue(he)&&(yield he)}W.filter=ne;function*oe(de,ue){let he=0;for(const fe of de)yield ue(fe,he++)}W.map=oe;function*re(...de){for(const ue of de)yield*ue}W.concat=re;function se(de,ue,he){let fe=he;for(const ge of de)fe=ue(fe,ge);return fe}W.reduce=se;function*ae(de,ue,he=de.length){for(ue<0&&(ue+=de.length),he<0?he+=de.length:he>de.length&&(he=de.length);ue<he;ue++)yield de[ue]}W.slice=ae;function le(de,ue=Number.POSITIVE_INFINITY){const he=[];if(ue===0)return[he,de];const fe=de[Symbol.iterator]();for(let ge=0;ge<ue;ge++){const pe=fe.next();if(pe.done)return[he,W.empty()];he.push(pe.value)}return[he,{[Symbol.iterator](){return fe}}]}W.consume=le;async function ce(de){const ue=[];for await(const he of de)ue.push(he);return Promise.resolve(ue)}W.asyncToArray=ce})(Iterable||(Iterable={}));let Node$2=class fi{constructor(C){this.element=C,this.next=fi.Undefined,this.prev=fi.Undefined}};Node$2.Undefined=new Node$2(void 0);class LinkedList{constructor(){this._first=Node$2.Undefined,this._last=Node$2.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Node$2.Undefined}clear(){let C=this._first;for(;C!==Node$2.Undefined;){const Q=C.next;C.prev=Node$2.Undefined,C.next=Node$2.Undefined,C=Q}this._first=Node$2.Undefined,this._last=Node$2.Undefined,this._size=0}unshift(C){return this._insert(C,!1)}push(C){return this._insert(C,!0)}_insert(C,Q){const Z=new Node$2(C);if(this._first===Node$2.Undefined)this._first=Z,this._last=Z;else if(Q){const K=this._last;this._last=Z,Z.prev=K,K.next=Z}else{const K=this._first;this._first=Z,Z.next=K,K.prev=Z}this._size+=1;let H=!1;return()=>{H||(H=!0,this._remove(Z))}}shift(){if(this._first!==Node$2.Undefined){const C=this._first.element;return this._remove(this._first),C}}pop(){if(this._last!==Node$2.Undefined){const C=this._last.element;return this._remove(this._last),C}}_remove(C){if(C.prev!==Node$2.Undefined&&C.next!==Node$2.Undefined){const Q=C.prev;Q.next=C.next,C.next.prev=Q}else C.prev===Node$2.Undefined&&C.next===Node$2.Undefined?(this._first=Node$2.Undefined,this._last=Node$2.Undefined):C.next===Node$2.Undefined?(this._last=this._last.prev,this._last.next=Node$2.Undefined):C.prev===Node$2.Undefined&&(this._first=this._first.next,this._first.prev=Node$2.Undefined);this._size-=1}*[Symbol.iterator](){let C=this._first;for(;C!==Node$2.Undefined;)yield C.element,C=C.next}}const USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function createWordRegExp(W=""){let C="(-?\\d*\\.\\d\\w*)|([^";for(const Q of USUAL_WORD_SEPARATORS)W.indexOf(Q)>=0||(C+="\\"+Q);return C+="\\s]+)",new RegExp(C,"g")}const DEFAULT_WORD_REGEXP=createWordRegExp();function ensureValidWordDefinition(W){let C=DEFAULT_WORD_REGEXP;if(W&&W instanceof RegExp)if(W.global)C=W;else{let Q="g";W.ignoreCase&&(Q+="i"),W.multiline&&(Q+="m"),W.unicode&&(Q+="u"),C=new RegExp(W.source,Q)}return C.lastIndex=0,C}const _defaultConfig=new LinkedList;_defaultConfig.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function getWordAtText(W,C,Q,Z,H){if(C=ensureValidWordDefinition(C),H||(H=Iterable.first(_defaultConfig)),Q.length>H.maxLen){let ee=W-H.maxLen/2;return ee<0?ee=0:Z+=ee,Q=Q.substring(ee,W+H.maxLen/2),getWordAtText(W,C,Q,Z,H)}const K=Date.now(),G=W-1-Z;let U=-1,X=null;for(let ee=1;!(Date.now()-K>=H.timeBudget);ee++){const te=G-H.windowSize*ee;C.lastIndex=Math.max(0,te);const ie=_findRegexMatchEnclosingPosition(C,Q,G,U);if(!ie&&X||(X=ie,te<=0))break;U=te}if(X){const ee={word:X[0],startColumn:Z+1+X.index,endColumn:Z+1+X.index+X[0].length};return C.lastIndex=0,ee}return null}function _findRegexMatchEnclosingPosition(W,C,Q,Z){let H;for(;H=W.exec(C);){const K=H.index||0;if(K<=Q&&W.lastIndex>=Q)return H;if(Z>0&&K>Z)return null}return null}const MINIMAP_GUTTER_WIDTH=8;class ConfigurationChangedEvent{constructor(C){this._values=C}hasChanged(C){return this._values[C]}}class ComputeOptionsMemory{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class BaseEditorOption{constructor(C,Q,Z,H){this.id=C,this.name=Q,this.defaultValue=Z,this.schema=H}applyUpdate(C,Q){return applyUpdate(C,Q)}compute(C,Q,Z){return Z}}class ApplyUpdateResult{constructor(C,Q){this.newValue=C,this.didChange=Q}}function applyUpdate(W,C){if(typeof W!="object"||typeof C!="object"||!W||!C)return new ApplyUpdateResult(C,W!==C);if(Array.isArray(W)||Array.isArray(C)){const Z=Array.isArray(W)&&Array.isArray(C)&&equals$1(W,C);return new ApplyUpdateResult(C,!Z)}let Q=!1;for(const Z in C)if(C.hasOwnProperty(Z)){const H=applyUpdate(W[Z],C[Z]);H.didChange&&(W[Z]=H.newValue,Q=!0)}return new ApplyUpdateResult(W,Q)}class ComputedEditorOption{constructor(C){this.schema=void 0,this.id=C,this.name="_never_",this.defaultValue=void 0}applyUpdate(C,Q){return applyUpdate(C,Q)}validate(C){return this.defaultValue}}class SimpleEditorOption{constructor(C,Q,Z,H){this.id=C,this.name=Q,this.defaultValue=Z,this.schema=H}applyUpdate(C,Q){return applyUpdate(C,Q)}validate(C){return typeof C>"u"?this.defaultValue:C}compute(C,Q,Z){return Z}}function boolean(W,C){return typeof W>"u"?C:W==="false"?!1:!!W}class EditorBooleanOption extends SimpleEditorOption{constructor(C,Q,Z,H=void 0){typeof H<"u"&&(H.type="boolean",H.default=Z),super(C,Q,Z,H)}validate(C){return boolean(C,this.defaultValue)}}function clampedInt(W,C,Q,Z){if(typeof W>"u")return C;let H=parseInt(W,10);return isNaN(H)?C:(H=Math.max(Q,H),H=Math.min(Z,H),H|0)}class EditorIntOption extends SimpleEditorOption{static clampedInt(C,Q,Z,H){return clampedInt(C,Q,Z,H)}constructor(C,Q,Z,H,K,G=void 0){typeof G<"u"&&(G.type="integer",G.default=Z,G.minimum=H,G.maximum=K),super(C,Q,Z,G),this.minimum=H,this.maximum=K}validate(C){return EditorIntOption.clampedInt(C,this.defaultValue,this.minimum,this.maximum)}}function clampedFloat(W,C,Q,Z){if(typeof W>"u")return C;const H=EditorFloatOption.float(W,C);return EditorFloatOption.clamp(H,Q,Z)}class EditorFloatOption extends SimpleEditorOption{static clamp(C,Q,Z){return C<Q?Q:C>Z?Z:C}static float(C,Q){if(typeof C=="number")return C;if(typeof C>"u")return Q;const Z=parseFloat(C);return isNaN(Z)?Q:Z}constructor(C,Q,Z,H,K){typeof K<"u"&&(K.type="number",K.default=Z),super(C,Q,Z,K),this.validationFn=H}validate(C){return this.validationFn(EditorFloatOption.float(C,this.defaultValue))}}class EditorStringOption extends SimpleEditorOption{static string(C,Q){return typeof C!="string"?Q:C}constructor(C,Q,Z,H=void 0){typeof H<"u"&&(H.type="string",H.default=Z),super(C,Q,Z,H)}validate(C){return EditorStringOption.string(C,this.defaultValue)}}function stringSet(W,C,Q,Z){return typeof W!="string"?C:Z&&W in Z?Z[W]:Q.indexOf(W)===-1?C:W}class EditorStringEnumOption extends SimpleEditorOption{constructor(C,Q,Z,H,K=void 0){typeof K<"u"&&(K.type="string",K.enum=H,K.default=Z),super(C,Q,Z,K),this._allowedValues=H}validate(C){return stringSet(C,this.defaultValue,this._allowedValues)}}class EditorEnumOption extends BaseEditorOption{constructor(C,Q,Z,H,K,G,U=void 0){typeof U<"u"&&(U.type="string",U.enum=K,U.default=H),super(C,Q,Z,U),this._allowedValues=K,this._convert=G}validate(C){return typeof C!="string"?this.defaultValue:this._allowedValues.indexOf(C)===-1?this.defaultValue:this._convert(C)}}function _autoIndentFromString(W){switch(W){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class EditorAccessibilitySupport extends BaseEditorOption{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[localize("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),localize("accessibilitySupport.on","Optimize for usage with a Screen Reader."),localize("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:localize("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(C){switch(C){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(C,Q,Z){return Z===0?C.accessibilitySupport:Z}}class EditorComments extends BaseEditorOption{constructor(){const C={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",C,{"editor.comments.insertSpace":{type:"boolean",default:C.insertSpace,description:localize("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:C.ignoreEmptyLines,description:localize("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(C){if(!C||typeof C!="object")return this.defaultValue;const Q=C;return{insertSpace:boolean(Q.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:boolean(Q.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function _cursorBlinkingStyleFromString(W){switch(W){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var TextEditorCursorStyle$1;(function(W){W[W.Line=1]="Line",W[W.Block=2]="Block",W[W.Underline=3]="Underline",W[W.LineThin=4]="LineThin",W[W.BlockOutline=5]="BlockOutline",W[W.UnderlineThin=6]="UnderlineThin"})(TextEditorCursorStyle$1||(TextEditorCursorStyle$1={}));function _cursorStyleFromString(W){switch(W){case"line":return TextEditorCursorStyle$1.Line;case"block":return TextEditorCursorStyle$1.Block;case"underline":return TextEditorCursorStyle$1.Underline;case"line-thin":return TextEditorCursorStyle$1.LineThin;case"block-outline":return TextEditorCursorStyle$1.BlockOutline;case"underline-thin":return TextEditorCursorStyle$1.UnderlineThin}}class EditorClassName extends ComputedEditorOption{constructor(){super(142)}compute(C,Q,Z){const H=["monaco-editor"];return Q.get(39)&&H.push(Q.get(39)),C.extraEditorClassName&&H.push(C.extraEditorClassName),Q.get(74)==="default"?H.push("mouse-default"):Q.get(74)==="copy"&&H.push("mouse-copy"),Q.get(111)&&H.push("showUnused"),Q.get(140)&&H.push("showDeprecated"),H.join(" ")}}class EditorEmptySelectionClipboard extends EditorBooleanOption{constructor(){super(37,"emptySelectionClipboard",!0,{description:localize("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(C,Q,Z){return Z&&C.emptySelectionClipboard}}class EditorFind extends BaseEditorOption{constructor(){const C={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",C,{"editor.find.cursorMoveOnType":{type:"boolean",default:C.cursorMoveOnType,description:localize("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:C.seedSearchStringFromSelection,enumDescriptions:[localize("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),localize("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),localize("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:localize("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:C.autoFindInSelection,enumDescriptions:[localize("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),localize("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),localize("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:localize("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:C.globalFindClipboard,description:localize("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:C.addExtraSpaceOnTop,description:localize("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:C.loop,description:localize("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(C){if(!C||typeof C!="object")return this.defaultValue;const Q=C;return{cursorMoveOnType:boolean(Q.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof C.seedSearchStringFromSelection=="boolean"?C.seedSearchStringFromSelection?"always":"never":stringSet(Q.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof C.autoFindInSelection=="boolean"?C.autoFindInSelection?"always":"never":stringSet(Q.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:boolean(Q.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:boolean(Q.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:boolean(Q.loop,this.defaultValue.loop)}}}class EditorFontLigatures extends BaseEditorOption{constructor(){super(51,"fontLigatures",EditorFontLigatures.OFF,{anyOf:[{type:"boolean",description:localize("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:localize("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:localize("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(C){return typeof C>"u"?this.defaultValue:typeof C=="string"?C==="false"||C.length===0?EditorFontLigatures.OFF:C==="true"?EditorFontLigatures.ON:C:C?EditorFontLigatures.ON:EditorFontLigatures.OFF}}EditorFontLigatures.OFF='"liga" off, "calt" off',EditorFontLigatures.ON='"liga" on, "calt" on';class EditorFontVariations extends BaseEditorOption{constructor(){super(54,"fontVariations",EditorFontVariations.OFF,{anyOf:[{type:"boolean",description:localize("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:localize("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:localize("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(C){return typeof C>"u"?this.defaultValue:typeof C=="string"?C==="false"?EditorFontVariations.OFF:C==="true"?EditorFontVariations.TRANSLATE:C:C?EditorFontVariations.TRANSLATE:EditorFontVariations.OFF}compute(C,Q,Z){return C.fontInfo.fontVariationSettings}}EditorFontVariations.OFF="normal",EditorFontVariations.TRANSLATE="translate";class EditorFontInfo extends ComputedEditorOption{constructor(){super(50)}compute(C,Q,Z){return C.fontInfo}}class EditorFontSize extends SimpleEditorOption{constructor(){super(52,"fontSize",EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:EDITOR_FONT_DEFAULTS.fontSize,description:localize("fontSize","Controls the font size in pixels.")})}validate(C){const Q=EditorFloatOption.float(C,this.defaultValue);return Q===0?EDITOR_FONT_DEFAULTS.fontSize:EditorFloatOption.clamp(Q,6,100)}compute(C,Q,Z){return C.fontInfo.fontSize}}class EditorFontWeight extends BaseEditorOption{constructor(){super(53,"fontWeight",EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:EditorFontWeight.MINIMUM_VALUE,maximum:EditorFontWeight.MAXIMUM_VALUE,errorMessage:localize("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:EditorFontWeight.SUGGESTION_VALUES}],default:EDITOR_FONT_DEFAULTS.fontWeight,description:localize("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(C){return C==="normal"||C==="bold"?C:String(EditorIntOption.clampedInt(C,EDITOR_FONT_DEFAULTS.fontWeight,EditorFontWeight.MINIMUM_VALUE,EditorFontWeight.MAXIMUM_VALUE))}}EditorFontWeight.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],EditorFontWeight.MINIMUM_VALUE=1,EditorFontWeight.MAXIMUM_VALUE=1e3;class EditorGoToLocation extends BaseEditorOption{constructor(){const C={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},Q={type:"string",enum:["peek","gotoAndPeek","goto"],default:C.multiple,enumDescriptions:[localize("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),localize("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),localize("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},Z=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",C,{"editor.gotoLocation.multiple":{deprecationMessage:localize("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:localize("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...Q},"editor.gotoLocation.multipleTypeDefinitions":{description:localize("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...Q},"editor.gotoLocation.multipleDeclarations":{description:localize("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...Q},"editor.gotoLocation.multipleImplementations":{description:localize("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...Q},"editor.gotoLocation.multipleReferences":{description:localize("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...Q},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:C.alternativeDefinitionCommand,enum:Z,description:localize("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:C.alternativeTypeDefinitionCommand,enum:Z,description:localize("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:C.alternativeDeclarationCommand,enum:Z,description:localize("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:C.alternativeImplementationCommand,enum:Z,description:localize("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:C.alternativeReferenceCommand,enum:Z,description:localize("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(C){var Q,Z,H,K,G;if(!C||typeof C!="object")return this.defaultValue;const U=C;return{multiple:stringSet(U.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(Q=U.multipleDefinitions)!==null&&Q!==void 0?Q:stringSet(U.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(Z=U.multipleTypeDefinitions)!==null&&Z!==void 0?Z:stringSet(U.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(H=U.multipleDeclarations)!==null&&H!==void 0?H:stringSet(U.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(K=U.multipleImplementations)!==null&&K!==void 0?K:stringSet(U.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(G=U.multipleReferences)!==null&&G!==void 0?G:stringSet(U.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:EditorStringOption.string(U.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:EditorStringOption.string(U.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:EditorStringOption.string(U.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:EditorStringOption.string(U.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:EditorStringOption.string(U.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class EditorHover extends BaseEditorOption{constructor(){const C={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",C,{"editor.hover.enabled":{type:"boolean",default:C.enabled,description:localize("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:C.delay,minimum:0,maximum:1e4,description:localize("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:C.sticky,description:localize("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:C.hidingDelay,description:localize("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:C.above,description:localize("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(C){if(!C||typeof C!="object")return this.defaultValue;const Q=C;return{enabled:boolean(Q.enabled,this.defaultValue.enabled),delay:EditorIntOption.clampedInt(Q.delay,this.defaultValue.delay,0,1e4),sticky:boolean(Q.sticky,this.defaultValue.sticky),hidingDelay:EditorIntOption.clampedInt(Q.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:boolean(Q.above,this.defaultValue.above)}}}class EditorLayoutInfoComputer extends ComputedEditorOption{constructor(){super(145)}compute(C,Q,Z){return EditorLayoutInfoComputer.computeLayout(Q,{memory:C.memory,outerWidth:C.outerWidth,outerHeight:C.outerHeight,isDominatedByLongLines:C.isDominatedByLongLines,lineHeight:C.fontInfo.lineHeight,viewLineCount:C.viewLineCount,lineNumbersDigitCount:C.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:C.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:C.fontInfo.maxDigitWidth,pixelRatio:C.pixelRatio,glyphMarginDecorationLaneCount:C.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(C){const Q=C.height/C.lineHeight,Z=Math.floor(C.paddingTop/C.lineHeight);let H=Math.floor(C.paddingBottom/C.lineHeight);C.scrollBeyondLastLine&&(H=Math.max(H,Q-1));const K=(Z+C.viewLineCount+H)/(C.pixelRatio*C.height),G=Math.floor(C.viewLineCount/K);return{typicalViewportLineCount:Q,extraLinesBeforeFirstLine:Z,extraLinesBeyondLastLine:H,desiredRatio:K,minimapLineCount:G}}static _computeMinimapLayout(C,Q){const Z=C.outerWidth,H=C.outerHeight,K=C.pixelRatio;if(!C.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(K*H),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:H};const G=Q.stableMinimapLayoutInput,U=G&&C.outerHeight===G.outerHeight&&C.lineHeight===G.lineHeight&&C.typicalHalfwidthCharacterWidth===G.typicalHalfwidthCharacterWidth&&C.pixelRatio===G.pixelRatio&&C.scrollBeyondLastLine===G.scrollBeyondLastLine&&C.paddingTop===G.paddingTop&&C.paddingBottom===G.paddingBottom&&C.minimap.enabled===G.minimap.enabled&&C.minimap.side===G.minimap.side&&C.minimap.size===G.minimap.size&&C.minimap.showSlider===G.minimap.showSlider&&C.minimap.renderCharacters===G.minimap.renderCharacters&&C.minimap.maxColumn===G.minimap.maxColumn&&C.minimap.scale===G.minimap.scale&&C.verticalScrollbarWidth===G.verticalScrollbarWidth&&C.isViewportWrapping===G.isViewportWrapping,X=C.lineHeight,ee=C.typicalHalfwidthCharacterWidth,te=C.scrollBeyondLastLine,ie=C.minimap.renderCharacters;let ne=K>=2?Math.round(C.minimap.scale*2):C.minimap.scale;const oe=C.minimap.maxColumn,re=C.minimap.size,se=C.minimap.side,ae=C.verticalScrollbarWidth,le=C.viewLineCount,ce=C.remainingWidth,de=C.isViewportWrapping,ue=ie?2:3;let he=Math.floor(K*H);const fe=he/K;let ge=!1,pe=!1,me=ue*ne,ke=ne/K,Ce=1;if(re==="fill"||re==="fit"){const{typicalViewportLineCount:Te,extraLinesBeforeFirstLine:Le,extraLinesBeyondLastLine:Ae,desiredRatio:Qe,minimapLineCount:De}=EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:le,scrollBeyondLastLine:te,paddingTop:C.paddingTop,paddingBottom:C.paddingBottom,height:H,lineHeight:X,pixelRatio:K});if(le/De>1)ge=!0,pe=!0,ne=1,me=1,ke=ne/K;else{let Re=!1,$e=ne+1;if(re==="fit"){const Be=Math.ceil((Le+le+Ae)*me);de&&U&&ce<=Q.stableFitRemainingWidth?(Re=!0,$e=Q.stableFitMaxMinimapScale):Re=Be>he}if(re==="fill"||Re){ge=!0;const Be=ne;me=Math.min(X*K,Math.max(1,Math.floor(1/Qe))),de&&U&&ce<=Q.stableFitRemainingWidth&&($e=Q.stableFitMaxMinimapScale),ne=Math.min($e,Math.max(1,Math.floor(me/ue))),ne>Be&&(Ce=Math.min(2,ne/Be)),ke=ne/K/Ce,he=Math.ceil(Math.max(Te,Le+le+Ae)*me),de?(Q.stableMinimapLayoutInput=C,Q.stableFitRemainingWidth=ce,Q.stableFitMaxMinimapScale=ne):(Q.stableMinimapLayoutInput=null,Q.stableFitRemainingWidth=0)}}}const ve=Math.floor(oe*ke),Ie=Math.min(ve,Math.max(0,Math.floor((ce-ae-2)*ke/(ee+ke)))+MINIMAP_GUTTER_WIDTH);let we=Math.floor(K*Ie);const ye=we/K;we=Math.floor(we*Ce);const xe=ie?1:2,Ne=se==="left"?0:Z-Ie-ae;return{renderMinimap:xe,minimapLeft:Ne,minimapWidth:Ie,minimapHeightIsEditorHeight:ge,minimapIsSampling:pe,minimapScale:ne,minimapLineHeight:me,minimapCanvasInnerWidth:we,minimapCanvasInnerHeight:he,minimapCanvasOuterWidth:ye,minimapCanvasOuterHeight:fe}}static computeLayout(C,Q){const Z=Q.outerWidth|0,H=Q.outerHeight|0,K=Q.lineHeight|0,G=Q.lineNumbersDigitCount|0,U=Q.typicalHalfwidthCharacterWidth,X=Q.maxDigitWidth,ee=Q.pixelRatio,te=Q.viewLineCount,ie=C.get(137),ne=ie==="inherit"?C.get(136):ie,oe=ne==="inherit"?C.get(132):ne,re=C.get(135),se=Q.isDominatedByLongLines,ae=C.get(57),le=C.get(68).renderType!==0,ce=C.get(69),de=C.get(105),ue=C.get(84),he=C.get(73),fe=C.get(103),ge=fe.verticalScrollbarSize,pe=fe.verticalHasArrows,me=fe.arrowSize,ke=fe.horizontalScrollbarSize,Ce=C.get(43),ve=C.get(110)!=="never";let Ie=C.get(66);Ce&&ve&&(Ie+=16);let we=0;if(le){const be=Math.max(G,ce);we=Math.round(be*X)}let ye=0;ae&&(ye=K*Q.glyphMarginDecorationLaneCount);let xe=0,Ne=xe+ye,Te=Ne+we,Le=Te+Ie;const Ae=Z-ye-we-Ie;let Qe=!1,De=!1,Ee=-1;ne==="inherit"&&se?(Qe=!0,De=!0):oe==="on"||oe==="bounded"?De=!0:oe==="wordWrapColumn"&&(Ee=re);const Re=EditorLayoutInfoComputer._computeMinimapLayout({outerWidth:Z,outerHeight:H,lineHeight:K,typicalHalfwidthCharacterWidth:U,pixelRatio:ee,scrollBeyondLastLine:de,paddingTop:ue.top,paddingBottom:ue.bottom,minimap:he,verticalScrollbarWidth:ge,viewLineCount:te,remainingWidth:Ae,isViewportWrapping:De},Q.memory||new ComputeOptionsMemory);Re.renderMinimap!==0&&Re.minimapLeft===0&&(xe+=Re.minimapWidth,Ne+=Re.minimapWidth,Te+=Re.minimapWidth,Le+=Re.minimapWidth);const $e=Ae-Re.minimapWidth,Be=Math.max(1,Math.floor(($e-ge-2)/U)),Se=pe?me:0;return De&&(Ee=Math.max(1,Be),oe==="bounded"&&(Ee=Math.min(Ee,re))),{width:Z,height:H,glyphMarginLeft:xe,glyphMarginWidth:ye,glyphMarginDecorationLaneCount:Q.glyphMarginDecorationLaneCount,lineNumbersLeft:Ne,lineNumbersWidth:we,decorationsLeft:Te,decorationsWidth:Ie,contentLeft:Le,contentWidth:$e,minimap:Re,viewportColumn:Be,isWordWrapMinified:Qe,isViewportWrapping:De,wrappingColumn:Ee,verticalScrollbarWidth:ge,horizontalScrollbarHeight:ke,overviewRuler:{top:Se,width:ge,height:H-2*Se,right:0}}}}class WrappingStrategy extends BaseEditorOption{constructor(){super(139,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[localize("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),localize("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:localize("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(C){return stringSet(C,"simple",["simple","advanced"])}compute(C,Q,Z){return Q.get(2)===2?"advanced":Z}}var ShowLightbulbIconMode$1;(function(W){W.Off="off",W.OnCode="onCode",W.On="on"})(ShowLightbulbIconMode$1||(ShowLightbulbIconMode$1={}));class EditorLightbulb extends BaseEditorOption{constructor(){const C={enabled:ShowLightbulbIconMode$1.On};super(65,"lightbulb",C,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[ShowLightbulbIconMode$1.Off,ShowLightbulbIconMode$1.OnCode,ShowLightbulbIconMode$1.On],default:C.enabled,enumDescriptions:[localize("editor.lightbulb.enabled.off","Disable the code action menu."),localize("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),localize("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:localize("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(C){return!C||typeof C!="object"?this.defaultValue:{enabled:stringSet(C.enabled,this.defaultValue.enabled,[ShowLightbulbIconMode$1.Off,ShowLightbulbIconMode$1.OnCode,ShowLightbulbIconMode$1.On])}}}class EditorStickyScroll extends BaseEditorOption{constructor(){const C={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(115,"stickyScroll",C,{"editor.stickyScroll.enabled":{type:"boolean",default:C.enabled,description:localize("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:C.maxLineCount,minimum:1,maximum:20,description:localize("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:C.defaultModel,description:localize("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:C.scrollWithEditor,description:localize("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(C){if(!C||typeof C!="object")return this.defaultValue;const Q=C;return{enabled:boolean(Q.enabled,this.defaultValue.enabled),maxLineCount:EditorIntOption.clampedInt(Q.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:stringSet(Q.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:boolean(Q.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class EditorInlayHints extends BaseEditorOption{constructor(){const C={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(141,"inlayHints",C,{"editor.inlayHints.enabled":{type:"string",default:C.enabled,description:localize("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[localize("editor.inlayHints.on","Inlay hints are enabled"),localize("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",isMacintosh?"Ctrl+Option":"Ctrl+Alt"),localize("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",isMacintosh?"Ctrl+Option":"Ctrl+Alt"),localize("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:C.fontSize,markdownDescription:localize("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:C.fontFamily,markdownDescription:localize("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:C.padding,description:localize("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(C){if(!C||typeof C!="object")return this.defaultValue;const Q=C;return typeof Q.enabled=="boolean"&&(Q.enabled=Q.enabled?"on":"off"),{enabled:stringSet(Q.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:EditorIntOption.clampedInt(Q.fontSize,this.defaultValue.fontSize,0,100),fontFamily:EditorStringOption.string(Q.fontFamily,this.defaultValue.fontFamily),padding:boolean(Q.padding,this.defaultValue.padding)}}}class EditorLineDecorationsWidth extends BaseEditorOption{constructor(){super(66,"lineDecorationsWidth",10)}validate(C){return typeof C=="string"&&/^\d+(\.\d+)?ch$/.test(C)?-parseFloat(C.substring(0,C.length-2)):EditorIntOption.clampedInt(C,this.defaultValue,0,1e3)}compute(C,Q,Z){return Z<0?EditorIntOption.clampedInt(-Z*C.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):Z}}class EditorLineHeight extends EditorFloatOption{constructor(){super(67,"lineHeight",EDITOR_FONT_DEFAULTS.lineHeight,C=>EditorFloatOption.clamp(C,0,150),{markdownDescription:localize("lineHeight",`Controls the line height.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as s, ref as t, onMounted as m, unref as r, openBlock as c, createBlock as l, createCommentVNode as p } from "vue";
|
|
2
|
-
import { u as d, F as f } from "./index-
|
|
2
|
+
import { u as d, F as f } from "./index-CWdYS31n.js";
|
|
3
3
|
const v = /* @__PURE__ */ s({
|
|
4
4
|
__name: "formTest",
|
|
5
5
|
setup(i) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as f } from "./index-
|
|
1
|
+
import { L as f } from "./index-CWdYS31n.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as l } from "./index-
|
|
1
|
+
import { L as l } from "./index-CWdYS31n.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87)
|