@robot-admin/naive-ui-components 0.11.7 → 0.12.1
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/CHANGELOG.md +18 -0
- package/README.md +146 -29
- package/README_EN.md +146 -29
- package/SECURITY.md +1 -0
- package/dist/C_ActionBar.cjs +1 -1
- package/dist/C_ActionBar.css +53 -53
- package/dist/C_ActionBar.d.cts +2 -2
- package/dist/C_ActionBar.d.ts +2 -2
- package/dist/C_ActionBar.js +1 -1
- package/dist/C_ActionBar2.cjs +1 -1
- package/dist/C_ActionBar2.js +1 -1
- package/dist/C_AntV.css +67 -67
- package/dist/C_AntV2.cjs +3 -3
- package/dist/C_AntV2.js +3 -3
- package/dist/C_AudioPlayer.d.cts +1 -1
- package/dist/C_AudioPlayer.d.ts +1 -1
- package/dist/C_AvatarGroup.d.cts +1 -1
- package/dist/C_AvatarGroup.d.ts +1 -1
- package/dist/C_Barcode.d.cts +1 -1
- package/dist/C_Barcode.d.ts +1 -1
- package/dist/C_Breadcrumb.d.cts +1 -1
- package/dist/C_Breadcrumb.d.ts +1 -1
- package/dist/C_Captcha.cjs +1 -1
- package/dist/C_Captcha.css +193 -51
- package/dist/C_Captcha.d.cts +2 -3
- package/dist/C_Captcha.d.ts +2 -3
- package/dist/C_Captcha.js +1 -1
- package/dist/C_Captcha2.cjs +1 -1
- package/dist/C_Captcha2.js +1 -1
- package/dist/C_Cascade.d.cts +1 -1
- package/dist/C_Cascade.d.ts +1 -1
- package/dist/C_Chat.d.cts +1 -1
- package/dist/C_Chat.d.ts +1 -1
- package/dist/C_City.d.cts +1 -1
- package/dist/C_City.d.ts +1 -1
- package/dist/C_Code.d.cts +1 -1
- package/dist/C_Code.d.ts +1 -1
- package/dist/C_ContextMenu.d.cts +1 -1
- package/dist/C_ContextMenu.d.ts +1 -1
- package/dist/C_Date.d.cts +1 -1
- package/dist/C_Date.d.ts +1 -1
- package/dist/C_Editor.d.cts +1 -1
- package/dist/C_Editor.d.ts +1 -1
- package/dist/C_FormModal.cjs +1 -0
- package/dist/C_FormModal.css +41 -0
- package/dist/C_FormModal.d.cts +2 -0
- package/dist/C_FormModal.d.ts +3 -0
- package/dist/C_FormModal.js +1 -0
- package/dist/C_FormModal2.cjs +1 -0
- package/dist/C_FormModal2.js +1 -0
- package/dist/C_Login.css +210 -127
- package/dist/C_Login2.cjs +1 -1
- package/dist/C_Login2.js +1 -1
- package/dist/C_Map.css +3 -3
- package/dist/C_Map2.cjs +1 -1
- package/dist/C_Map2.js +1 -1
- package/dist/C_Menu.d.cts +1 -1
- package/dist/C_Table.base.css +86 -86
- package/dist/C_Table.cjs +1 -1
- package/dist/C_Table.css +86 -86
- package/dist/C_Table.d.ts +4 -3
- package/dist/C_Table.js +1 -1
- package/dist/C_Tabs.cjs +1 -0
- package/dist/C_Tabs.css +1 -0
- package/dist/C_Tabs.d.cts +2 -0
- package/dist/C_Tabs.d.ts +2 -0
- package/dist/C_Tabs.js +1 -0
- package/dist/C_TagsView.css +38 -38
- package/dist/C_TagsView2.cjs +1 -1
- package/dist/C_TagsView2.js +1 -1
- package/dist/C_VtableGantt.css +19 -19
- package/dist/C_VtableGantt2.cjs +1 -1
- package/dist/C_VtableGantt2.js +1 -1
- package/dist/constants.d.cts +2 -2
- package/dist/constants.d.ts +2 -2
- package/dist/constants2.d.cts +2 -2
- package/dist/constants2.d.ts +2 -2
- package/dist/constants3.d.cts +2 -2
- package/dist/constants3.d.ts +2 -2
- package/dist/constants4.d.cts +4 -4
- package/dist/constants4.d.ts +4 -4
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/data.d.cts +108 -0
- package/dist/data.d.ts +108 -0
- package/dist/data2.cjs +1 -0
- package/dist/data2.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +49 -48
- package/dist/index.d.ts +51 -49
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +72 -69
- package/dist/index.vue.d.ts +72 -69
- package/dist/index10.vue.d.cts +80 -39
- package/dist/index10.vue.d.ts +68 -77
- package/dist/index11.vue.d.cts +68 -77
- package/dist/index11.vue.d.ts +53 -68
- package/dist/index12.vue.d.cts +53 -68
- package/dist/index12.vue.d.ts +52 -58
- package/dist/index13.vue.d.cts +52 -58
- package/dist/index13.vue.d.ts +3 -3
- package/dist/index14.vue.d.cts +3 -3
- package/dist/index14.vue.d.ts +5 -5
- package/dist/index15.vue.d.cts +5 -5
- package/dist/index15.vue.d.ts +2 -2
- package/dist/index16.vue.d.cts +2 -2
- package/dist/index16.vue.d.ts +14 -11
- package/dist/index17.vue.d.cts +14 -11
- package/dist/index17.vue.d.ts +4 -4
- package/dist/index18.vue.d.cts +4 -4
- package/dist/index18.vue.d.ts +3 -3
- package/dist/index19.vue.d.cts +2 -2
- package/dist/index19.vue.d.ts +2 -2
- package/dist/index2.vue.d.cts +70 -65
- package/dist/index2.vue.d.ts +70 -65
- package/dist/index20.vue.d.cts +1 -1
- package/dist/index20.vue.d.ts +1 -1
- package/dist/index21.vue.d.cts +2 -2
- package/dist/index21.vue.d.ts +2 -2
- package/dist/index22.vue.d.cts +1 -1
- package/dist/index22.vue.d.ts +1 -1
- package/dist/index24.vue.d.cts +2 -2
- package/dist/index24.vue.d.ts +2 -2
- package/dist/index25.vue.d.cts +1 -1
- package/dist/index25.vue.d.ts +1 -1
- package/dist/index27.vue.d.cts +2 -2
- package/dist/index27.vue.d.ts +2 -2
- package/dist/index3.vue.d.cts +30 -80
- package/dist/index3.vue.d.ts +30 -80
- package/dist/index4.vue.d.cts +130 -30
- package/dist/index4.vue.d.ts +22 -30
- package/dist/index5.vue.d.cts +18 -126
- package/dist/index5.vue.d.ts +22 -19
- package/dist/index6.vue.d.cts +22 -19
- package/dist/index6.vue.d.ts +117 -22
- package/dist/index7.vue.d.cts +117 -22
- package/dist/index7.vue.d.ts +17 -110
- package/dist/index8.vue.d.cts +17 -110
- package/dist/index8.vue.d.ts +37 -24
- package/dist/index9.vue.d.cts +37 -24
- package/dist/index9.vue.d.ts +80 -39
- package/dist/mapUtils.d.cts +4 -4
- package/dist/mapUtils.d.ts +4 -4
- package/dist/presets.d.cts +96 -0
- package/dist/presets.d.ts +96 -0
- package/dist/resolver.cjs +1 -1
- package/dist/resolver.d.cts +1 -1
- package/dist/resolver.d.ts +1 -1
- package/dist/resolver.js +1 -1
- package/dist/style.css +520 -393
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +8 -8
- package/dist/useCollapsePanel.d.ts +8 -8
- package/dist/useCropperCore.d.cts +9 -9
- package/dist/useCropperCore.d.ts +9 -9
- package/dist/useDraggableLayout.d.cts +2 -2
- package/dist/useDraggableLayout.d.ts +2 -2
- package/dist/useEdgeInteraction.d.cts +3 -2
- package/dist/useEdgeInteraction.d.ts +3 -2
- package/dist/useInfiniteScroll.d.cts +1 -1
- package/dist/useInfiniteScroll.d.ts +1 -1
- package/dist/useQRCode.d.cts +4 -4
- package/dist/useQRCode.d.ts +4 -4
- package/dist/useSearchState.d.cts +6 -6
- package/dist/useSearchState.d.ts +6 -6
- package/dist/useSignatureHistory.d.cts +4 -4
- package/dist/useSignatureHistory.d.ts +4 -4
- package/dist/useSplitResize.d.cts +6 -6
- package/dist/useSplitResize.d.ts +6 -6
- package/dist/useTableQuery.cjs +3 -3
- package/dist/useTableQuery.d.cts +10 -0
- package/dist/useTableQuery.d.ts +10 -0
- package/dist/useTableQuery.js +3 -3
- package/dist/useTimeSelection.d.cts +5 -5
- package/dist/useTimeSelection.d.ts +5 -5
- package/dist/useTreeOperations.d.cts +8 -8
- package/dist/useTreeOperations.d.ts +8 -8
- package/dist/useWorkflowValidation.d.cts +4 -4
- package/dist/useWorkflowValidation.d.ts +4 -4
- package/dist/verification.d.cts +70 -5
- package/dist/verification.d.ts +70 -5
- package/package.json +2 -1
- package/dist/types.d.ts +0 -58
- package/dist/types2.d.cts +0 -58
package/dist/C_AntV2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./config.js";import{t}from"./C_Icon2.js";import{t as n}from"./export-helper.js";import{Fragment as r,computed as i,createBlock as a,createCommentVNode as o,createElementBlock as s,createElementVNode as c,createTextVNode as l,createVNode as u,defineComponent as d,mergeModels as f,mergeProps as p,nextTick as m,normalizeClass as h,normalizeStyle as g,onMounted as _,onUnmounted as v,openBlock as y,ref as b,renderList as x,resolveDynamicComponent as S,toDisplayString as C,unref as w,useModel as T,watch as E,withCtx as D}from"vue";import{NAlert as O,NButton as k,NCard as A,NCheckbox as j,NDivider as M,NDrawer as N,NDrawerContent as P,NDropdown as F,NForm as I,NFormItem as L,NGi as R,NGrid as z,NInput as B,NRadio as V,NRadioGroup as H,NSelect as U,NSpace as W}from"naive-ui";import{Graph as G,ObjectExt as K}from"@antv/x6";import ee from"html2canvas";function q(e){return{background:e?`#18181c`:`#f5f5f5`,gridPrimary:e?`rgba(255, 255, 255, 0.08)`:`#eee`,gridSecondary:e?`rgba(255, 255, 255, 0.04)`:`#ddd`}}function te(e=!1){let t=q(e);return{background:{color:t.background},grid:{visible:!0,type:`doubleMesh`,args:[{color:t.gridPrimary,thickness:1},{color:t.gridSecondary,thickness:1,factor:4}]},mousewheel:{enabled:!0,zoomAtMousePosition:!0,modifiers:`ctrl`,minScale:.5,maxScale:2},selecting:{enabled:!0,rubberband:!0,movable:!0,showNodeSelectionBox:!0},resizing:!0,rotating:!0,snapline:!0,keyboard:!0,clipboard:!0}}function J(e){return e?{width:e.clientWidth||e.offsetWidth||800,height:e.clientHeight||e.offsetHeight||600}:{width:0,height:0}}function Y(e,t){let n=0,r=b(null),i=b(!1),a=async(o={})=>{await m(),i.value=!0;try{if(!e.value)return;r.value&&=(r.value.dispose(),null);let{width:i,height:s}=J(e.value);if(i===0||s===0){n++,n<10&&setTimeout(()=>a(o),100);return}n=0;let c=te(t?.value??!1);r.value=new G({container:e.value,width:i,height:s,...c,...o})}catch{}finally{i.value=!1}};function o(e){if(!r.value)return;let t=q(e);r.value.drawBackground({color:t.background}),r.value.drawGrid({type:`doubleMesh`,args:[{color:t.gridPrimary,thickness:1},{color:t.gridSecondary,thickness:1,factor:4}]})}t&&E(t,e=>{o(e)});function s(){r.value&&=(r.value.dispose(),null)}function c(){r.value?.centerContent()}function l(){r.value?.zoomToFit({padding:20,maxScale:1})}function u(e){r.value?.zoom(e)}function d(){if(r.value&&e.value){let{width:t,height:n}=J(e.value);r.value.resize(t,n)}}return v(s),{graph:r,loading:i,initGraph:a,destroyGraph:s,centerContent:c,zoomToFit:l,zoom:u,resizeGraph:d,updateTheme:o}}function X(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,r.style.display=`none`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}function ne(e,t=`diagram.json`){let n=JSON.stringify(e,null,2);X(new Blob([n],{type:`application/json`}),t)}async function re(e,t=`diagram.png`,n={}){let{backgroundColor:r=`#ffffff`,scale:i=2}=n,{container:a}=e;X(await ae(await ee(a,{backgroundColor:r,scale:i,useCORS:!0,logging:!1}),`image/png`),t)}function ie(e,t=`diagram.svg`){let n=e.container.querySelector(`svg`);if(!n)throw Error(`SVG导出失败: 未找到图表 SVG 元素`);let r=n.cloneNode(!0);r.getAttribute(`xmlns`)||r.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`),r.getAttribute(`xmlns:xlink`)||r.setAttribute(`xmlns:xlink`,`http://www.w3.org/1999/xlink`);let i=new XMLSerializer().serializeToString(r);X(new Blob([i],{type:`image/svg+xml;charset=utf-8`}),t)}function ae(e,t,n=1){return new Promise((r,i)=>{e.toBlob(e=>{e?r(e):i(Error(`Canvas 转 Blob 失败`))},t,n)})}const oe=[{label:`导出PNG`,key:`png`},{label:`导出SVG`,key:`svg`},{label:`导出JSON`,key:`json`}];function Z(t,n=`diagram`){let r=e();return{exportOptions:oe,handleExport:async(e,i)=>{if(t.value)try{switch(e){case`png`:await re(t.value,`${n}.png`);break;case`svg`:ie(t.value,`${n}.svg`);break;case`json`:i&&ne(i(),`${n}.json`);break}}catch(t){r.error(`导出${e.toUpperCase()}失败,请重试`,t)}}}}const se=[{label:`BIGINT`,value:`BIGINT`},{label:`INT`,value:`INT`},{label:`SMALLINT`,value:`SMALLINT`},{label:`TINYINT`,value:`TINYINT`},{label:`VARCHAR(50)`,value:`VARCHAR(50)`},{label:`VARCHAR(100)`,value:`VARCHAR(100)`},{label:`VARCHAR(255)`,value:`VARCHAR(255)`},{label:`CHAR(10)`,value:`CHAR(10)`},{label:`TEXT`,value:`TEXT`},{label:`LONGTEXT`,value:`LONGTEXT`},{label:`DATETIME`,value:`DATETIME`},{label:`TIMESTAMP`,value:`TIMESTAMP`},{label:`DATE`,value:`DATE`},{label:`TIME`,value:`TIME`},{label:`DECIMAL(10,2)`,value:`DECIMAL(10,2)`},{label:`FLOAT`,value:`FLOAT`},{label:`DOUBLE`,value:`DOUBLE`},{label:`BOOLEAN`,value:`BOOLEAN`},{label:`JSON`,value:`JSON`}],ce={key:0,class:`table-editor`},le={class:`fields-container`},ue={class:`field-header`},de=d({__name:`ERTableEditor`,props:f({show:{type:Boolean}},{editingTable:{},editingTableModifiers:{}}),emits:f([`update:show`,`save`,`add-field`,`remove-field`,`handle-primary-key`],[`update:editingTable`]),setup(e,{emit:n}){let i=T(e,`editingTable`),d=n,f=(e,t)=>d(`handle-primary-key`,e,t),p=()=>d(`add-field`),m=e=>d(`remove-field`,e);return(n,d)=>(y(),a(w(N),{show:e.show,width:`600`,placement:`right`,"onUpdate:show":d[4]||=e=>n.$emit(`update:show`,e)},{default:D(()=>[u(w(P),{title:`编辑表: ${i.value?.name||`新表`}`,closable:``},{footer:D(()=>[u(w(W),{justify:`end`},{default:D(()=>[u(w(k),{onClick:d[2]||=e=>n.$emit(`update:show`,!1)},{default:D(()=>[...d[11]||=[l(`取消`,-1)]]),_:1}),u(w(k),{onClick:d[3]||=e=>n.$emit(`save`),type:`primary`},{default:D(()=>[...d[12]||=[l(`保存`,-1)]]),_:1})]),_:1})]),default:D(()=>[i.value?(y(),s(`div`,ce,[u(w(I),{model:i.value,"label-placement":`top`},{default:D(()=>[u(w(L),{label:`表名`},{default:D(()=>[u(w(B),{value:i.value.name,"onUpdate:value":d[0]||=e=>i.value.name=e,placeholder:`请输入表名`},null,8,[`value`])]),_:1}),u(w(L),{label:`表注释`},{default:D(()=>[u(w(B),{value:i.value.comment,"onUpdate:value":d[1]||=e=>i.value.comment=e,placeholder:`表注释`},null,8,[`value`])]),_:1}),u(w(M),null,{default:D(()=>[...d[5]||=[l(`字段列表`,-1)]]),_:1}),c(`div`,le,[(y(!0),s(r,null,x(i.value.fields,(e,t)=>(y(),a(w(A),{key:t,size:`small`,class:`field-card`},{header:D(()=>[c(`div`,ue,[c(`span`,null,`#`+C(t+1)+` `+C(e.name||`新字段`),1),u(w(k),{onClick:e=>m(t),size:`tiny`,type:`error`,quaternary:``,disabled:i.value.fields.length<=1},{default:D(()=>[...d[6]||=[l(` 删除 `,-1)]]),_:1},8,[`onClick`,`disabled`])])]),default:D(()=>[u(w(z),{cols:2,"x-gap":12},{default:D(()=>[u(w(R),null,{default:D(()=>[u(w(L),{label:`字段名`,size:`small`},{default:D(()=>[u(w(B),{value:e.name,"onUpdate:value":t=>e.name=t,placeholder:`字段名`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024),u(w(R),null,{default:D(()=>[u(w(L),{label:`类型`,size:`small`},{default:D(()=>[u(w(U),{value:e.type,"onUpdate:value":t=>e.type=t,options:w(se),size:`small`,filterable:``,placeholder:`选择类型`},null,8,[`value`,`onUpdate:value`,`options`])]),_:2},1024)]),_:2},1024)]),_:2},1024),u(w(W),{style:{"margin-top":`12px`}},{default:D(()=>[u(w(j),{checked:e.isPrimaryKey,"onUpdate:checked":[t=>e.isPrimaryKey=t,t=>f(e,t)]},{default:D(()=>[...d[7]||=[l(` 主键 `,-1)]]),_:1},8,[`checked`,`onUpdate:checked`]),u(w(j),{checked:e.isRequired,"onUpdate:checked":t=>e.isRequired=t},{default:D(()=>[...d[8]||=[l(`必填`,-1)]]),_:1},8,[`checked`,`onUpdate:checked`]),u(w(j),{checked:e.isForeignKey,"onUpdate:checked":t=>e.isForeignKey=t},{default:D(()=>[...d[9]||=[l(`外键`,-1)]]),_:1},8,[`checked`,`onUpdate:checked`])]),_:2},1024),u(w(L),{label:`注释`,size:`small`,style:{"margin-top":`12px`}},{default:D(()=>[u(w(B),{value:e.comment,"onUpdate:value":t=>e.comment=t,placeholder:`字段注释`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024))),128)),u(w(k),{onClick:p,dashed:``,block:``,type:`primary`,ghost:``,style:{"margin-top":`16px`}},{icon:D(()=>[u(t,{name:`mdi:plus`,size:16})]),default:D(()=>[d[10]||=l(` 添加字段 `,-1)]),_:1})])]),_:1},8,[`model`])])):o(`v-if`,!0)]),_:1},8,[`title`])]),_:1},8,[`show`]))}}),fe={class:`er-layout`},pe={key:0,class:`toolbar`},me={key:0,style:{"margin-top":`8px`}};var he=n(d({__name:`index`,props:{data:{},showToolbar:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},theme:{}},emits:[`ready`,`data-change`],setup(e,{expose:n,emit:r}){let a=e,d=r,f=b(),{graph:p,initGraph:h,centerContent:g,zoomToFit:x}=Y(f,i(()=>a.theme===`dark`)),{exportOptions:S,handleExport:T}=Z(p,`er-diagram`),A=b(!1),j=b(),M=b(!1),N=(e,t)=>e.length>t?e.substring(0,t-1)+`..`:e,P=e=>e.fields?.map(t=>{let n=t.isPrimaryKey?`🔑 ${t.name}`:t.isRequired?`* ${t.name}`:t.name;return{id:`${e.id}_${t.name}`,group:`list`,attrs:{portNameLabel:{text:N(n,12),title:n},portTypeLabel:{text:N(t.type,10),title:t.type},portBody:{fill:t.isPrimaryKey?`#FFF7E6`:`#EFF4FF`}}}})||[],I=e=>({id:e.id,shape:`er-rect`,x:e.position.x,y:e.position.y,width:200,height:24+(e.fields?.length||0)*24,data:e,attrs:{label:{text:N(e.name,20),refX:.5,refY:10,textAnchor:`middle`,title:e.name}},ports:P(e)}),L=()=>{p.value&&(G.registerPortLayout(`erPortPosition`,e=>e.map((e,t)=>({position:{x:0,y:(t+1)*24},angle:0})),!0),G.registerNode(`er-rect`,{inherit:`rect`,markup:[{tagName:`rect`,selector:`body`},{tagName:`text`,selector:`label`}],attrs:{rect:{strokeWidth:1,stroke:`#5F95FF`,fill:`#5F95FF`},label:{fontWeight:`bold`,fill:`#ffffff`,fontSize:12}},ports:{groups:{list:{markup:[{tagName:`rect`,selector:`portBody`},{tagName:`text`,selector:`portNameLabel`},{tagName:`text`,selector:`portTypeLabel`}],attrs:{portBody:{width:200,height:24,strokeWidth:1,stroke:`#5F95FF`,fill:`#EFF4FF`,magnet:!0},portNameLabel:{ref:`portBody`,refX:6,refY:6,fontSize:9,textAnchor:`start`,textOverflow:`ellipsis`},portTypeLabel:{ref:`portBody`,refX:120,refY:6,fontSize:9,textAnchor:`start`,fill:`#666`}},position:`erPortPosition`}}}},!0))},R=()=>{M.value=!M.value,M.value||z()},z=()=>{p.value?.getEdges().forEach(e=>{e.attr(`line/stroke`,`#A2B1C3`),e.attr(`line/strokeWidth`,2)})},B=e=>{if(!p.value)return;let t=p.value.createNode(I(e));return p.value.resetCells([t,...p.value.getCells()]),t},V=()=>{let e=p.value?.getNodes()||[];for(let t=0;t<10;t++)for(let n=0;n<3;n++){let r={x:n*250+50,y:t*250+50};if(!e.some(e=>{let t=e.getPosition();return Math.abs(t.x-r.x)<250*.8&&Math.abs(t.y-r.y)<250*.8}))return r}return{x:50,y:50}},H=()=>{let e={id:`table_${Date.now()}`,name:`新表`,comment:``,fields:[{name:`id`,type:`BIGINT`,isPrimaryKey:!0,isRequired:!0,isForeignKey:!1,comment:`主键`},{name:`name`,type:`VARCHAR(100)`,isPrimaryKey:!1,isRequired:!0,isForeignKey:!1,comment:`名称`}],position:V()};B(e),U(e),X()},U=e=>{j.value={...e,fields:e.fields?.map(e=>({...e}))||[]},A.value=!0},K=()=>{if(!p.value||!j.value)return;let e=p.value.getCellById(j.value.id);e&&(e.setData(j.value),e.prop({size:{width:200,height:24+j.value.fields.length*24},attrs:{label:{text:N(j.value.name,20),title:j.value.name}},ports:P(j.value)})),A.value=!1,X()},ee=(e,t)=>{t&&(e.isRequired=!0,j.value?.fields.forEach(t=>{t!==e&&(t.isPrimaryKey=!1)}))},q=()=>{j.value?.fields.push({name:`field_${(j.value?.fields.length||0)+1}`,type:`VARCHAR(100)`,isPrimaryKey:!1,isRequired:!1,isForeignKey:!1,comment:``})},te=e=>{j.value&&j.value.fields.length>1&&j.value.fields.splice(e,1)},J=()=>{if(!p.value)return{tables:[],relations:[]};let e=p.value.getNodes().map(e=>({...e.getData(),position:e.getPosition()})),t=[];return p.value.getEdges().forEach(e=>{let n=e.getSourceNode(),r=e.getTargetNode(),i=e.getSourcePortId(),a=e.getTargetPortId();n&&r&&i&&a&&t.push({id:e.id,type:`foreign-key`,sourceTable:n.id,sourceField:i.split(`_`).slice(1).join(`_`),targetTable:r.id,targetField:a.split(`_`).slice(1).join(`_`),name:`${n.getData()?.name||n.id} -> ${r.getData()?.name||r.id}`})}),{tables:e,relations:t}},X=()=>d(`data-change`,J());return E(p,e=>{if(!(e instanceof G))return;L(),e.on(`node:dblclick`,({node:e})=>{a.readonly||U(e.getData())}),e.on(`edge:connected`,X),e.on(`edge:removed`,X);let t=null;e.on(`edge:click`,({edge:e})=>{M.value?(e.remove(),X()):(z(),e.attr(`line/stroke`,`#ff4d4f`),e.attr(`line/strokeWidth`,3),t=e)}),e.on(`edge:dblclick`,({edge:e})=>{e.remove(),X()}),e.on(`blank:click`,()=>{t=null,M.value||z()});let n=e=>{let n=e.target?.tagName;n===`INPUT`||n===`TEXTAREA`||e.target?.isContentEditable||(e.key===`Delete`||e.key===`Backspace`)&&t&&(t.remove(),X(),t=null)};document.addEventListener(`keydown`,n),v(()=>document.removeEventListener(`keydown`,n)),d(`ready`,e),m(()=>{if(a.data?.tables){let t=a.data.tables.map(t=>e.createNode(I(t)));a.data.relations?.length&&a.data.relations.forEach(n=>{t.push(e.createEdge({source:{cell:n.sourceTable,port:`${n.sourceTable}_${n.sourceField}`},target:{cell:n.targetTable,port:`${n.targetTable}_${n.targetField}`},attrs:{line:{stroke:`#A2B1C3`,strokeWidth:2}}}))}),e.resetCells(t),setTimeout(()=>e.zoomToFit({padding:20,maxScale:1}),300)}})},{immediate:!0}),E(()=>a.data,e=>{if(p.value&&e?.tables){let t=e.tables.map(e=>p.value.createNode(I(e)));e.relations?.length&&e.relations.forEach(e=>{t.push(p.value.createEdge({source:{cell:e.sourceTable,port:`${e.sourceTable}_${e.sourceField}`},target:{cell:e.targetTable,port:`${e.targetTable}_${e.targetField}`},attrs:{line:{stroke:`#A2B1C3`,strokeWidth:2}}}))}),p.value.resetCells(t)}},{deep:!0}),_(()=>h()),n({getGraph:()=>p.value??void 0,getData:J}),(n,r)=>(y(),s(`div`,fe,[o(` 工具栏 `),e.showToolbar?(y(),s(`div`,pe,[u(w(W),null,{default:D(()=>[u(w(k),{onClick:H,type:`primary`,size:`small`},{icon:D(()=>[u(t,{name:`mdi:table-plus`,size:16})]),default:D(()=>[r[3]||=l(` 添加表 `,-1)]),_:1}),u(w(k),{onClick:w(g),size:`small`},{icon:D(()=>[u(t,{name:`mdi:image-filter-center-focus`,size:16})]),default:D(()=>[r[4]||=l(` 居中 `,-1)]),_:1},8,[`onClick`]),u(w(k),{onClick:w(x),size:`small`},{icon:D(()=>[u(t,{name:`mdi:fit-to-screen`,size:16})]),default:D(()=>[r[5]||=l(` 适应 `,-1)]),_:1},8,[`onClick`]),u(w(k),{onClick:R,type:M.value?`error`:`default`,size:`small`},{icon:D(()=>[u(t,{name:`mdi:delete`,size:16})]),default:D(()=>[l(` `+C(M.value?`退出删除`:`删除连线`),1)]),_:1},8,[`type`]),u(w(F),{options:w(S),onSelect:r[0]||=e=>w(T)(e,J)},{default:D(()=>[u(w(k),{size:`small`},{icon:D(()=>[u(t,{name:`mdi:export`,size:16})]),default:D(()=>[r[6]||=l(` 导出 `,-1)]),_:1})]),_:1},8,[`options`])]),_:1}),M.value?(y(),s(`div`,me,[u(w(O),{type:`info`,size:`small`,"show-icon":!1},{default:D(()=>[...r[7]||=[l(` 删除模式:点击连接线即可删除 `,-1)]]),_:1})])):o(`v-if`,!0)])):o(`v-if`,!0),o(` 图表容器 `),c(`div`,{ref_key:`containerRef`,ref:f,class:`graph-container`},null,512),o(` 表编辑器 `),u(de,{show:A.value,"editing-table":j.value,"onUpdate:editingTable":r[1]||=e=>j.value=e,"onUpdate:show":r[2]||=e=>A.value=e,onSave:K,onAddField:q,onRemoveField:te,onHandlePrimaryKey:ee},null,8,[`show`,`editing-table`])]))}}),[[`__scopeId`,`data-v-19cb7526`]]);const ge={defaultColor:`#A2B1C3`,highlightColor:`#ff4d4f`,strokeWidth:2,highlightStrokeWidth:3,portPositions:[],onDataChange:()=>{}};function Q(e,t={}){let n={...ge,...t},r=()=>{e.value?.getEdges().forEach(e=>{e.attr(`line/stroke`,n.defaultColor),e.attr(`line/strokeWidth`,n.strokeWidth)})},i=e=>{r(),e.attr(`line/stroke`,n.highlightColor),e.attr(`line/strokeWidth`,n.highlightStrokeWidth)},a=(e,t)=>{n.portPositions.forEach(n=>e.attr(`port-${n}/style/opacity`,t))};return{resetEdgeStyles:r,highlightEdge:i,togglePorts:a,bindInteractions:()=>{let t=e.value;t&&(t.on(`edge:click`,({edge:e})=>i(e)),t.on(`edge:dblclick`,({edge:e})=>{e.remove(),n.onDataChange()}),t.on(`blank:click`,r),t.on(`node:click`,r),t.on(`edge:connected`,n.onDataChange),n.portPositions.length>0&&(t.on(`node:mouseenter`,({node:e})=>a(e,1)),t.on(`node:mouseleave`,({node:e})=>a(e,0))))}}}const _e={"start-event":{name:`开始`,title:`开始事件`,iconClass:`circle start-event`},activity:{name:`任务`,title:`任务活动`,iconClass:`rect activity`},gateway:{name:`网关`,title:`排他网关`,iconClass:`diamond gateway`},"end-event":{name:`结束`,title:`结束事件`,iconClass:`circle end-event`}},ve={event:`事件`,activity:`活动`,gateway:`网关`,"bpmn-edge":`连接线`},$=[`top`,`right`,`bottom`,`left`],ye=(e,t=`rect`)=>e.reduce((e,n)=>{let r=t===`circle`,i=n===`top`?r?{refCx:.5,refCy:0}:{refX:.5,refY:0}:n===`right`?r?{refCx:1,refCy:.5}:{refX:1,refY:.5}:n===`bottom`?r?{refCx:.5,refCy:1}:{refX:.5,refY:1}:r?{refCx:0,refCy:.5}:{refX:0,refY:.5};return e[`port-${n}`]={ref:`body`,...i,r:4,fill:`#31d0c6`,stroke:`#ffffff`,strokeWidth:2,magnet:!0,style:{cursor:`crosshair`,opacity:0,transition:`opacity 0.2s`}},e},{}),be={event:{inherit:`circle`,attrs:{body:{strokeWidth:2,stroke:`#5F95FF`,fill:`#FFF`,magnet:!1,style:{cursor:`move`}},text:{fontSize:12,fill:`#262626`,textAnchor:`middle`,textVerticalAnchor:`middle`,pointerEvents:`none`}}},activity:{inherit:`rect`,attrs:{body:{rx:6,ry:6,stroke:`#5F95FF`,fill:`#EFF4FF`,strokeWidth:1,magnet:!1,style:{cursor:`move`}},text:{fontSize:12,fill:`#262626`,textAnchor:`middle`,textVerticalAnchor:`middle`,pointerEvents:`none`}}},gateway:{inherit:`polygon`,attrs:{body:{refPoints:`0,10 10,0 20,10 10,20`,strokeWidth:2,stroke:`#5F95FF`,fill:`#EFF4FF`,magnet:!1,style:{cursor:`move`}},text:{fontSize:20,fill:`#5F95FF`,textAnchor:`middle`,textVerticalAnchor:`middle`,pointerEvents:`none`}}}},xe={inherit:`edge`,attrs:{line:{stroke:`#A2B1C3`,strokeWidth:2,targetMarker:{name:`block`,width:8,height:6,fill:`#A2B1C3`},cursor:`pointer`}}};function Se(e=!1){let t={background:e?`#18181c`:`#ffffff`,gridPrimary:e?`rgba(255, 255, 255, 0.08)`:`#eee`,gridSecondary:e?`rgba(255, 255, 255, 0.04)`:`#ddd`};return{background:{color:t.background},grid:{visible:!0,type:`doubleMesh`,args:[{color:t.gridPrimary,thickness:1},{color:t.gridSecondary,thickness:1,factor:4}]},mousewheel:{enabled:!0,zoomAtMousePosition:!0,modifiers:`ctrl`,minScale:.5,maxScale:3},connecting:{router:`manhattan`,connector:{name:`rounded`,args:{radius:8}},allowBlank:!1,allowLoop:!1,allowNode:!1,snap:!0,allowEdge:!1},highlighting:{magnetAvailable:{name:`stroke`,args:{attrs:{fill:`#31d0c6`,stroke:`#31d0c6`,opacity:1}}},magnetAdsorbed:{name:`stroke`,args:{attrs:{fill:`#5F95FF`,stroke:`#5F95FF`,opacity:1}}}},selecting:{enabled:!0,rubberband:!0,showNodeSelectionBox:!0},resizing:!0,rotating:!1,snapline:!0,keyboard:!0,clipboard:!0}}Se();const Ce={"start-event":{shape:`event`,width:50,height:50,label:`开始事件`,data:{type:`start`}},"end-event":{shape:`event`,width:50,height:50,label:`结束事件`,data:{type:`end`}},activity:{shape:`activity`,width:120,height:60,label:`新活动`,data:{description:``,assignee:``}},gateway:{shape:`gateway`,width:40,height:40,label:`+`,data:{type:`exclusive`}}},we=[{id:`start-1`,shape:`event`,x:100,y:200,width:50,height:50,label:`流程开始`,data:{type:`start`}},{id:`activity-1`,shape:`activity`,x:200,y:180,width:120,height:60,label:`用户申请`,data:{description:`用户提交申请表单`,assignee:`申请人`}},{id:`activity-2`,shape:`activity`,x:380,y:180,width:120,height:60,label:`初审`,data:{description:`部门进行初步审核`,assignee:`部门主管`}},{id:`gateway-1`,shape:`gateway`,x:550,y:200,width:40,height:40,label:`+`,data:{type:`exclusive`}},{id:`activity-3`,shape:`activity`,x:650,y:120,width:120,height:60,label:`终审`,data:{description:`高级主管最终审核`,assignee:`总监`}},{id:`activity-4`,shape:`activity`,x:650,y:260,width:120,height:60,label:`驳回处理`,data:{description:`处理驳回流程`,assignee:`专员`}},{id:`end-1`,shape:`event`,x:820,y:140,width:50,height:50,label:`审批通过`,data:{type:`end`}},{id:`end-2`,shape:`event`,x:820,y:280,width:50,height:50,label:`审批驳回`,data:{type:`end`}},{id:`edge-1`,shape:`bpmn-edge`,source:`start-1`,target:`activity-1`,x:0,y:0},{id:`edge-2`,shape:`bpmn-edge`,source:`activity-1`,target:`activity-2`,x:0,y:0},{id:`edge-3`,shape:`bpmn-edge`,source:`activity-2`,target:`gateway-1`,x:0,y:0},{id:`edge-4`,shape:`bpmn-edge`,source:`gateway-1`,target:`activity-3`,label:`通过`,x:0,y:0},{id:`edge-5`,shape:`bpmn-edge`,source:`gateway-1`,target:`activity-4`,label:`驳回`,x:0,y:0},{id:`edge-6`,shape:`bpmn-edge`,source:`activity-3`,target:`end-1`,x:0,y:0},{id:`edge-7`,shape:`bpmn-edge`,source:`activity-4`,target:`end-2`,x:0,y:0}],Te={key:0,class:`property-panel`},Ee={class:`property-item`},De={class:`property-item`},Oe={key:0,class:`property-item`},ke={key:1,class:`property-item`},Ae={class:`form-actions`},je=d({__name:`BPMNPropertyEditor`,props:f({show:{type:Boolean}},{editingElement:{},editingElementModifiers:{}}),emits:f([`update:show`,`save`,`delete`],[`update:editingElement`]),setup(e,{emit:t}){let n=T(e,`editingElement`),r=t,d=i(()=>ve[n.value?.shape]||n.value?.shape||``);return(t,i)=>(y(),a(w(N),{show:e.show,width:`300`,title:`属性设置`,"onUpdate:show":i[6]||=e=>r(`update:show`,e)},{default:D(()=>[n.value?(y(),s(`div`,Te,[c(`div`,Ee,[i[7]||=c(`div`,{class:`property-label`},`名称`,-1),u(w(B),{value:n.value.label,"onUpdate:value":i[0]||=e=>n.value.label=e,placeholder:`请输入名称`,size:`small`},null,8,[`value`])]),c(`div`,De,[i[8]||=c(`div`,{class:`property-label`},`类型`,-1),u(w(B),{value:d.value,readonly:``,size:`small`},null,8,[`value`])]),n.value.shape===`activity`?(y(),s(`div`,Oe,[i[9]||=c(`div`,{class:`property-label`},`描述`,-1),u(w(B),{value:n.value.description,"onUpdate:value":i[1]||=e=>n.value.description=e,type:`textarea`,rows:3,placeholder:`请输入活动描述`,size:`small`},null,8,[`value`])])):o(`v-if`,!0),n.value.shape===`activity`?(y(),s(`div`,ke,[i[10]||=c(`div`,{class:`property-label`},`执行人`,-1),u(w(B),{value:n.value.assignee,"onUpdate:value":i[2]||=e=>n.value.assignee=e,placeholder:`请输入执行人`,size:`small`},null,8,[`value`])])):o(`v-if`,!0),c(`div`,Ae,[u(w(W),null,{default:D(()=>[u(w(k),{onClick:i[3]||=e=>r(`save`),type:`primary`,size:`small`},{default:D(()=>[...i[11]||=[l(` 保存 `,-1)]]),_:1}),u(w(k),{onClick:i[4]||=e=>r(`update:show`,!1),size:`small`},{default:D(()=>[...i[12]||=[l(` 取消 `,-1)]]),_:1}),u(w(k),{onClick:i[5]||=e=>r(`delete`),type:`error`,size:`small`},{default:D(()=>[...i[13]||=[l(` 删除 `,-1)]]),_:1})]),_:1})])])):o(`v-if`,!0)]),_:1},8,[`show`]))}}),Me={class:`bpmn-layout`},Ne={key:0,class:`top-toolbar`},Pe={class:`toolbar-section`},Fe={class:`toolbar-group`},Ie={class:`toolbar-group`},Le={class:`toolbar-group`},Re={class:`main-content`},ze={key:0,class:`left-panel`},Be={class:`element-grid`},Ve=[`onClick`,`title`],He={class:`graph-wrapper`};var Ue=n(d({__name:`index`,props:{data:{},showToolbar:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},width:{default:`100%`},height:{default:`600px`},theme:{}},emits:[`ready`,`data-change`],setup(e,{expose:n,emit:a}){let d=e,f=a,p=b(),{graph:m,initGraph:g,centerContent:v,zoomToFit:S}=Y(p,i(()=>d.theme===`dark`)),{exportOptions:T,handleExport:O}=Z(m,`bpmn-diagram`),{bindInteractions:A}=Q(m,{portPositions:$,onDataChange:()=>W()}),j=b(!1),M=b(),N=e=>String(e.attr(`text/text`)||e.attr(`label/text`)||``),P=e=>{if(!e)return[];if(Array.isArray(e))return e;let t=[];return Object.values(e).forEach(e=>{Array.isArray(e)&&t.push(...e)}),t},I=()=>{let e=$.map(e=>({tagName:`circle`,selector:`port-${e}`})),t=[`event`,`activity`,`gateway`],n={event:`circle`,activity:`rect`,gateway:`polygon`};t.forEach(t=>{G.registerNode(t,{...be[t],markup:[{tagName:n[t],selector:`body`},{tagName:`text`,selector:`text`},...e],attrs:{...be[t].attrs,...ye($,n[t])}},!0)}),G.registerEdge(`bpmn-edge`,xe,!0)},L=e=>{if(!m.value||!e.length)return;let t=e.map(e=>{let{data:t,...n}=e,r=e.shape===`bpmn-edge`?m.value.createEdge(n):m.value.createNode(n);return t&&r.setData(t),r});m.value.resetCells(t),setTimeout(()=>m.value.zoomToFit({padding:50,maxScale:1}),200)},R=e=>{if(!m.value)return;let t=Ce[e];if(!t)return;let n=m.value.options.width/2,r=m.value.options.height/2,{data:i,...a}={id:`${e}-${Date.now()}`,x:n+Math.random()*100-50,y:r+Math.random()*100-50,...t},o=m.value.createNode(a);i&&o.setData(i),m.value.addCell(o),W()},z=()=>{m.value?.clearCells(),W()},B=e=>{let t=e.getData()||{};M.value={id:e.id,shape:e.shape,label:N(e),description:t.description||``,assignee:t.assignee||``,x:0,y:0},j.value=!0},V=()=>{if(!m.value||!M.value)return;let e=m.value.getCellById(M.value.id);e&&(e.setData({description:M.value.description,assignee:M.value.assignee}),e.attr(`text/text`,M.value.label||``),e.attr(`label/text`,M.value.label||``)),j.value=!1,W()},H=()=>{!m.value||!M.value||(m.value.getCellById(M.value.id)?.remove(),j.value=!1,W())},U=()=>m.value?[...m.value.getNodes().map(e=>({id:e.id,shape:e.shape,x:e.getPosition().x,y:e.getPosition().y,width:e.getSize().width,height:e.getSize().height,label:N(e),data:e.getData()||{}})),...m.value.getEdges().map(e=>({id:e.id,shape:`bpmn-edge`,source:e.getSourceCellId()||``,target:e.getTargetCellId()||``,label:N(e),x:0,y:0}))]:[],W=()=>f(`data-change`,U());return E(m,e=>{e instanceof G&&(d.readonly||(A(),e.on(`node:dblclick`,({node:e})=>B(e)),e.on(`node:moved`,W)),f(`ready`,e),L(we))},{immediate:!0}),E(()=>d.data,e=>{if(!e||!m.value)return;let t=P(e);t.length>0&&L(t)},{deep:!0}),_(async()=>{I();let e=Se();await g({...e,connecting:{...e.connecting,createEdge:()=>m.value.createEdge({shape:`bpmn-edge`}),validateConnection:({sourceView:e,targetView:t,sourceMagnet:n,targetMagnet:r})=>e!==t&&!!n&&!!r&&n.getAttribute(`magnet`)===`true`&&r.getAttribute(`magnet`)===`true`}})}),n({getGraph:()=>m.value,getData:U,loadData:L}),(n,i)=>(y(),s(`div`,Me,[e.showToolbar?(y(),s(`div`,Ne,[c(`div`,Pe,[c(`div`,Fe,[u(w(k),{onClick:z,size:`small`},{icon:D(()=>[u(t,{name:`mdi:delete-outline`,size:16})]),default:D(()=>[i[3]||=l(` 清空 `,-1)]),_:1})]),c(`div`,Ie,[u(w(k),{onClick:w(v),size:`small`},{icon:D(()=>[u(t,{name:`mdi:image-filter-center-focus`,size:16})]),default:D(()=>[i[4]||=l(` 居中 `,-1)]),_:1},8,[`onClick`]),u(w(k),{onClick:w(S),size:`small`},{icon:D(()=>[u(t,{name:`mdi:fit-to-screen`,size:16})]),default:D(()=>[i[5]||=l(` 适应 `,-1)]),_:1},8,[`onClick`])]),c(`div`,Le,[u(w(F),{options:w(T),onSelect:i[0]||=e=>w(O)(e,U)},{default:D(()=>[u(w(k),{size:`small`},{icon:D(()=>[u(t,{name:`mdi:export`,size:16})]),default:D(()=>[i[6]||=l(` 导出 `,-1)]),_:1})]),_:1},8,[`options`])])])])):o(`v-if`,!0),c(`div`,Re,[e.showToolbar?(y(),s(`div`,ze,[i[7]||=c(`div`,{class:`panel-title`},`组件`,-1),c(`div`,Be,[(y(!0),s(r,null,x(w(_e),(e,t)=>(y(),s(`div`,{key:t,class:`element-item`,onClick:e=>R(t),title:e.title},[c(`div`,{class:h([`element-icon`,e.iconClass])},null,2),c(`span`,null,C(e.name),1)],8,Ve))),128))])])):o(`v-if`,!0),c(`div`,He,[c(`div`,{ref_key:`containerRef`,ref:p,class:`graph-container`},null,512)])]),u(je,{show:j.value,"editing-element":M.value,"onUpdate:editingElement":i[1]||=e=>M.value=e,"onUpdate:show":i[2]||=e=>j.value=e,onSave:V,onDelete:H},null,8,[`show`,`editing-element`])]))}}),[[`__scopeId`,`data-v-d588444e`]]);const We={key:0,class:`class-editor`},Ge={class:`section`},Ke={class:`section-header`},qe={style:{"font-size":`13px`}},Je={class:`section`},Ye={class:`section-header`},Xe={style:{"font-size":`13px`}};var Ze=n(d({__name:`UMLClassEditor`,props:f({show:{type:Boolean}},{editingClass:{},editingClassModifiers:{}}),emits:f([`update:show`,`save`,`delete`],[`update:editingClass`]),setup(e,{emit:n}){let i=T(e,`editingClass`),d=n;return(n,f)=>(y(),a(w(N),{show:e.show,width:`450`,title:`编辑类`,"onUpdate:show":f[6]||=e=>d(`update:show`,e)},{default:D(()=>[i.value?(y(),s(`div`,We,[u(w(I),{"label-placement":`top`},{default:D(()=>[u(w(L),{label:`类名`},{default:D(()=>[u(w(B),{value:i.value.name,"onUpdate:value":f[0]||=e=>i.value.name=e,placeholder:`请输入类名`},null,8,[`value`])]),_:1}),u(w(M),{style:{margin:`20px 0`}},{default:D(()=>[...f[7]||=[l(`属性`,-1)]]),_:1}),c(`div`,Ge,[(y(!0),s(r,null,x(i.value.attributes,(e,t)=>(y(),s(`div`,{key:t,class:`item`},[u(w(A),{size:`small`,style:{"margin-bottom":`12px`}},{header:D(()=>[c(`div`,Ke,[c(`span`,qe,`#`+C(t+1)+` `+C(e.name||`新属性`),1),u(w(k),{onClick:e=>i.value.attributes.splice(t,1),size:`tiny`,type:`error`,quaternary:``,style:{"margin-left":`auto`}},{default:D(()=>[...f[8]||=[l(` 删除 `,-1)]]),_:1},8,[`onClick`])])]),default:D(()=>[u(w(W),{vertical:``,size:`small`},{default:D(()=>[u(w(W),null,{default:D(()=>[u(w(L),{label:`属性名`,style:{margin:`0`,flex:`1`}},{default:D(()=>[u(w(B),{value:e.name,"onUpdate:value":t=>e.name=t,placeholder:`属性名`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024),u(w(L),{label:`类型`,style:{margin:`0`,flex:`1`}},{default:D(()=>[u(w(B),{value:e.type,"onUpdate:value":t=>e.type=t,placeholder:`类型`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024),u(w(L),{label:`可见性`,style:{margin:`0`}},{default:D(()=>[u(w(H),{value:e.visibility,"onUpdate:value":t=>e.visibility=t,size:`small`},{default:D(()=>[u(w(V),{value:`public`},{default:D(()=>[...f[9]||=[l(`+ public`,-1)]]),_:1}),u(w(V),{value:`private`},{default:D(()=>[...f[10]||=[l(`- private`,-1)]]),_:1}),u(w(V),{value:`protected`},{default:D(()=>[...f[11]||=[l(`# protected`,-1)]]),_:1})]),_:1},8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024)]),_:2},1024)]))),128)),u(w(k),{onClick:f[1]||=e=>i.value.attributes.push({name:`newAttribute`,type:`string`,visibility:`private`}),dashed:``,block:``,type:`primary`,ghost:``,size:`small`},{icon:D(()=>[u(t,{name:`mdi:plus`,size:16})]),default:D(()=>[f[12]||=l(` 添加属性 `,-1)]),_:1})]),u(w(M),{style:{margin:`20px 0`}},{default:D(()=>[...f[13]||=[l(`方法`,-1)]]),_:1}),c(`div`,Je,[(y(!0),s(r,null,x(i.value.methods,(e,t)=>(y(),s(`div`,{key:t,class:`item`},[u(w(A),{size:`small`,style:{"margin-bottom":`12px`}},{header:D(()=>[c(`div`,Ye,[c(`span`,Xe,`#`+C(t+1)+` `+C(e.name||`新方法`),1),u(w(k),{onClick:e=>i.value.methods.splice(t,1),size:`tiny`,type:`error`,quaternary:``,style:{"margin-left":`auto`}},{default:D(()=>[...f[14]||=[l(` 删除 `,-1)]]),_:1},8,[`onClick`])])]),default:D(()=>[u(w(W),{vertical:``,size:`small`},{default:D(()=>[u(w(W),null,{default:D(()=>[u(w(L),{label:`方法名`,style:{margin:`0`,flex:`1`}},{default:D(()=>[u(w(B),{value:e.name,"onUpdate:value":t=>e.name=t,placeholder:`方法名`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024),u(w(L),{label:`返回类型`,style:{margin:`0`,flex:`1`}},{default:D(()=>[u(w(B),{value:e.returnType,"onUpdate:value":t=>e.returnType=t,placeholder:`返回类型`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024),u(w(L),{label:`可见性`,style:{margin:`0`}},{default:D(()=>[u(w(H),{value:e.visibility,"onUpdate:value":t=>e.visibility=t,size:`small`},{default:D(()=>[u(w(V),{value:`public`},{default:D(()=>[...f[15]||=[l(`+ public`,-1)]]),_:1}),u(w(V),{value:`private`},{default:D(()=>[...f[16]||=[l(`- private`,-1)]]),_:1}),u(w(V),{value:`protected`},{default:D(()=>[...f[17]||=[l(`# protected`,-1)]]),_:1})]),_:1},8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024)]),_:2},1024)]))),128)),u(w(k),{onClick:f[2]||=e=>i.value.methods.push({name:`newMethod`,returnType:`void`,visibility:`public`}),dashed:``,block:``,type:`primary`,ghost:``,size:`small`},{icon:D(()=>[u(t,{name:`mdi:plus`,size:16})]),default:D(()=>[f[18]||=l(` 添加方法 `,-1)]),_:1})]),u(w(M),{style:{margin:`20px 0`}}),u(w(W),{justify:`space-between`},{default:D(()=>[u(w(k),{onClick:f[3]||=e=>d(`delete`),type:`error`,ghost:``},{icon:D(()=>[u(t,{name:`mdi:delete`,size:16})]),default:D(()=>[f[19]||=l(` 删除类 `,-1)]),_:1}),u(w(W),null,{default:D(()=>[u(w(k),{onClick:f[4]||=e=>d(`update:show`,!1)},{default:D(()=>[...f[20]||=[l(`取消`,-1)]]),_:1}),u(w(k),{onClick:f[5]||=e=>d(`save`),type:`primary`},{default:D(()=>[...f[21]||=[l(` 保存 `,-1)]]),_:1})]),_:1})]),_:1})]),_:1})])):o(`v-if`,!0)]),_:1},8,[`show`]))}}),[[`__scopeId`,`data-v-102d6be6`]]);const Qe={public:`+`,private:`-`,protected:`#`},$e={extends:{strokeDasharray:0,targetMarker:{name:`block`,width:10,height:8,fill:`white`,stroke:`#722ed1`,strokeWidth:2}},implement:{strokeDasharray:`8,4`,targetMarker:{name:`block`,width:10,height:8,fill:`white`,stroke:`#722ed1`,strokeWidth:2}},composition:{strokeDasharray:0,sourceMarker:{name:`diamond`,width:12,height:8,fill:`#722ed1`,stroke:`#722ed1`}},aggregation:{strokeDasharray:0,sourceMarker:{name:`diamond`,width:12,height:8,fill:`white`,stroke:`#722ed1`,strokeWidth:2}},association:{strokeDasharray:0,targetMarker:{name:`classic`,size:8,fill:`#722ed1`}}},et=[`top`,`right`,`bottom`,`left`].reduce((e,t)=>{let n=t===`top`?{refX:.5,refY:0}:t===`right`?{refX:1,refY:.5}:t===`bottom`?{refX:.5,refY:1}:{refX:0,refY:.5};return e[`port-${t}`]={ref:`body`,...n,r:4,fill:`#31d0c6`,stroke:`#ffffff`,strokeWidth:2,magnet:!0,style:{cursor:`crosshair`,opacity:0,transition:`opacity 0.2s`}},e},{}),tt={inherit:`rect`,markup:[{tagName:`rect`,selector:`body`},{tagName:`rect`,selector:`name-rect`},{tagName:`rect`,selector:`attrs-rect`},{tagName:`rect`,selector:`methods-rect`},{tagName:`text`,selector:`name-text`},{tagName:`text`,selector:`attrs-text`},{tagName:`text`,selector:`methods-text`},{tagName:`circle`,selector:`port-top`},{tagName:`circle`,selector:`port-right`},{tagName:`circle`,selector:`port-bottom`},{tagName:`circle`,selector:`port-left`}],attrs:{rect:{width:160},body:{stroke:`#5f95ff`,strokeWidth:1,fill:`#fff`,magnet:!1,style:{cursor:`move`}},"name-rect":{fill:`#5f95ff`,stroke:`#fff`,strokeWidth:.5,magnet:!1,style:{cursor:`move`}},"attrs-rect":{fill:`#eff4ff`,stroke:`#fff`,strokeWidth:.5,magnet:!1,style:{cursor:`move`}},"methods-rect":{fill:`#eff4ff`,stroke:`#fff`,strokeWidth:.5,magnet:!1,style:{cursor:`move`}},"name-text":{ref:`name-rect`,refY:.5,refX:.5,textAnchor:`middle`,fontWeight:`bold`,fill:`#fff`,fontSize:12,pointerEvents:`none`},"attrs-text":{ref:`attrs-rect`,refY:.5,refX:5,textAnchor:`left`,fill:`black`,fontSize:10,pointerEvents:`none`},"methods-text":{ref:`methods-rect`,refY:.5,refX:5,textAnchor:`left`,fill:`black`,fontSize:10,pointerEvents:`none`},...et}},nt={router:`manhattan`,connector:{name:`rounded`,args:{radius:8}},allowBlank:!1,allowLoop:!1,allowNode:!1,snap:!0,allowEdge:!1},rt={magnetAvailable:{name:`stroke`,args:{attrs:{fill:`#31d0c6`,stroke:`#31d0c6`,opacity:1}}},magnetAdsorbed:{name:`stroke`,args:{attrs:{fill:`#5F95FF`,stroke:`#5F95FF`,opacity:1}}}},it={shape:`extends`,attrs:{line:{stroke:`#722ed1`,strokeWidth:2,targetMarker:{name:`block`,width:8,height:6,fill:`#722ed1`}}}},at=[{id:`animal`,name:`<<Abstract>>
|
|
1
|
+
import{r as e}from"./config.js";import{t}from"./C_Icon2.js";import{t as n}from"./export-helper.js";import{Fragment as r,computed as i,createBlock as a,createCommentVNode as o,createElementBlock as s,createElementVNode as c,createTextVNode as l,createVNode as u,defineComponent as d,mergeModels as f,mergeProps as p,nextTick as m,normalizeClass as h,normalizeStyle as g,onMounted as _,onUnmounted as v,openBlock as y,ref as b,renderList as x,resolveDynamicComponent as S,toDisplayString as C,unref as w,useModel as T,watch as E,withCtx as D}from"vue";import{NAlert as O,NButton as k,NCard as A,NCheckbox as j,NDivider as M,NDrawer as N,NDrawerContent as P,NDropdown as F,NForm as I,NFormItem as L,NGi as R,NGrid as z,NInput as B,NRadio as V,NRadioGroup as H,NSelect as U,NSpace as W}from"naive-ui";import{Graph as G,ObjectExt as K}from"@antv/x6";import ee from"html2canvas";function q(e){return{background:e?`#18181c`:`#f5f5f5`,gridPrimary:e?`rgba(255, 255, 255, 0.08)`:`#eee`,gridSecondary:e?`rgba(255, 255, 255, 0.04)`:`#ddd`}}function te(e=!1){let t=q(e);return{background:{color:t.background},grid:{visible:!0,type:`doubleMesh`,args:[{color:t.gridPrimary,thickness:1},{color:t.gridSecondary,thickness:1,factor:4}]},mousewheel:{enabled:!0,zoomAtMousePosition:!0,modifiers:`ctrl`,minScale:.5,maxScale:2},selecting:{enabled:!0,rubberband:!0,movable:!0,showNodeSelectionBox:!0},resizing:!0,rotating:!0,snapline:!0,keyboard:!0,clipboard:!0}}function J(e){return e?{width:e.clientWidth||e.offsetWidth||800,height:e.clientHeight||e.offsetHeight||600}:{width:0,height:0}}function Y(e,t){let n=0,r,i,a=!1,o=b(null),s=b(!1),c=i=>{if(!a){s.value=!0;try{if(!e.value)return;o.value&&=(o.value.dispose(),null);let{width:s,height:c}=J(e.value);if(s===0||c===0){n++,n<10&&(clearTimeout(r),r=setTimeout(()=>{a||l(i)},100));return}n=0;let u=te(t?.value??!1);o.value=new G({container:e.value,width:s,height:c,...u,...i})}catch{}finally{s.value=!1}}},l=async(e={})=>{clearTimeout(r),r=void 0,await m(),c(e)};function u(e){if(!o.value)return;let t=q(e);o.value.drawBackground({color:t.background}),o.value.drawGrid({type:`doubleMesh`,args:[{color:t.gridPrimary,thickness:1},{color:t.gridSecondary,thickness:1,factor:4}]})}t&&E(t,e=>{u(e)});function d(){if(clearTimeout(r),clearTimeout(i),r=void 0,i=void 0,o.value){let e=o.value;o.value=null,e.dispose()}}function f(){o.value?.centerContent()}function p(){o.value?.zoomToFit({padding:20,maxScale:1})}function h(e=200,t=20){clearTimeout(i);let n=o.value;n&&(i=setTimeout(()=>{!a&&o.value===n&&n.zoomToFit({padding:t,maxScale:1})},e))}function g(e){o.value?.zoom(e)}function _(){if(o.value&&e.value){let{width:t,height:n}=J(e.value);o.value.resize(t,n)}}return v(()=>{a=!0,d()}),{graph:o,loading:s,initGraph:l,destroyGraph:d,centerContent:f,zoomToFit:p,scheduleZoomToFit:h,zoom:g,resizeGraph:_,updateTheme:u}}function X(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,r.style.display=`none`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}function Z(e,t=`diagram.json`){let n=JSON.stringify(e,null,2);X(new Blob([n],{type:`application/json`}),t)}async function Q(e,t=`diagram.png`,n={}){let{backgroundColor:r=`#ffffff`,scale:i=2}=n,{container:a}=e;X(await re(await ee(a,{backgroundColor:r,scale:i,useCORS:!0,logging:!1}),`image/png`),t)}function ne(e,t=`diagram.svg`){let n=e.container.querySelector(`svg`);if(!n)throw Error(`SVG导出失败: 未找到图表 SVG 元素`);let r=n.cloneNode(!0);r.getAttribute(`xmlns`)||r.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`),r.getAttribute(`xmlns:xlink`)||r.setAttribute(`xmlns:xlink`,`http://www.w3.org/1999/xlink`);let i=new XMLSerializer().serializeToString(r);X(new Blob([i],{type:`image/svg+xml;charset=utf-8`}),t)}function re(e,t,n=1){return new Promise((r,i)=>{e.toBlob(e=>{e?r(e):i(Error(`Canvas 转 Blob 失败`))},t,n)})}const ie=[{label:`导出PNG`,key:`png`},{label:`导出SVG`,key:`svg`},{label:`导出JSON`,key:`json`}];function $(t,n=`diagram`){let r=e();return{exportOptions:ie,handleExport:async(e,i)=>{if(t.value)try{switch(e){case`png`:await Q(t.value,`${n}.png`);break;case`svg`:ne(t.value,`${n}.svg`);break;case`json`:i&&Z(i(),`${n}.json`);break}}catch(t){r.error(`导出${e.toUpperCase()}失败,请重试`,t)}}}}const ae=[{label:`BIGINT`,value:`BIGINT`},{label:`INT`,value:`INT`},{label:`SMALLINT`,value:`SMALLINT`},{label:`TINYINT`,value:`TINYINT`},{label:`VARCHAR(50)`,value:`VARCHAR(50)`},{label:`VARCHAR(100)`,value:`VARCHAR(100)`},{label:`VARCHAR(255)`,value:`VARCHAR(255)`},{label:`CHAR(10)`,value:`CHAR(10)`},{label:`TEXT`,value:`TEXT`},{label:`LONGTEXT`,value:`LONGTEXT`},{label:`DATETIME`,value:`DATETIME`},{label:`TIMESTAMP`,value:`TIMESTAMP`},{label:`DATE`,value:`DATE`},{label:`TIME`,value:`TIME`},{label:`DECIMAL(10,2)`,value:`DECIMAL(10,2)`},{label:`FLOAT`,value:`FLOAT`},{label:`DOUBLE`,value:`DOUBLE`},{label:`BOOLEAN`,value:`BOOLEAN`},{label:`JSON`,value:`JSON`}],oe={key:0,class:`table-editor`},se={class:`fields-container`},ce={class:`field-header`},le=d({__name:`ERTableEditor`,props:f({show:{type:Boolean}},{editingTable:{},editingTableModifiers:{}}),emits:f([`update:show`,`save`,`add-field`,`remove-field`,`handle-primary-key`],[`update:editingTable`]),setup(e,{emit:n}){let i=T(e,`editingTable`),d=n,f=(e,t)=>d(`handle-primary-key`,e,t),p=()=>d(`add-field`),m=e=>d(`remove-field`,e);return(n,d)=>(y(),a(w(N),{show:e.show,width:`600`,placement:`right`,"onUpdate:show":d[4]||=e=>n.$emit(`update:show`,e)},{default:D(()=>[u(w(P),{title:`编辑表: ${i.value?.name||`新表`}`,closable:``},{footer:D(()=>[u(w(W),{justify:`end`},{default:D(()=>[u(w(k),{onClick:d[2]||=e=>n.$emit(`update:show`,!1)},{default:D(()=>[...d[11]||=[l(`取消`,-1)]]),_:1}),u(w(k),{onClick:d[3]||=e=>n.$emit(`save`),type:`primary`},{default:D(()=>[...d[12]||=[l(`保存`,-1)]]),_:1})]),_:1})]),default:D(()=>[i.value?(y(),s(`div`,oe,[u(w(I),{model:i.value,"label-placement":`top`},{default:D(()=>[u(w(L),{label:`表名`},{default:D(()=>[u(w(B),{value:i.value.name,"onUpdate:value":d[0]||=e=>i.value.name=e,placeholder:`请输入表名`},null,8,[`value`])]),_:1}),u(w(L),{label:`表注释`},{default:D(()=>[u(w(B),{value:i.value.comment,"onUpdate:value":d[1]||=e=>i.value.comment=e,placeholder:`表注释`},null,8,[`value`])]),_:1}),u(w(M),null,{default:D(()=>[...d[5]||=[l(`字段列表`,-1)]]),_:1}),c(`div`,se,[(y(!0),s(r,null,x(i.value.fields,(e,t)=>(y(),a(w(A),{key:t,size:`small`,class:`field-card`},{header:D(()=>[c(`div`,ce,[c(`span`,null,`#`+C(t+1)+` `+C(e.name||`新字段`),1),u(w(k),{onClick:e=>m(t),size:`tiny`,type:`error`,quaternary:``,disabled:i.value.fields.length<=1},{default:D(()=>[...d[6]||=[l(` 删除 `,-1)]]),_:1},8,[`onClick`,`disabled`])])]),default:D(()=>[u(w(z),{cols:2,"x-gap":12},{default:D(()=>[u(w(R),null,{default:D(()=>[u(w(L),{label:`字段名`,size:`small`},{default:D(()=>[u(w(B),{value:e.name,"onUpdate:value":t=>e.name=t,placeholder:`字段名`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024),u(w(R),null,{default:D(()=>[u(w(L),{label:`类型`,size:`small`},{default:D(()=>[u(w(U),{value:e.type,"onUpdate:value":t=>e.type=t,options:w(ae),size:`small`,filterable:``,placeholder:`选择类型`},null,8,[`value`,`onUpdate:value`,`options`])]),_:2},1024)]),_:2},1024)]),_:2},1024),u(w(W),{style:{"margin-top":`12px`}},{default:D(()=>[u(w(j),{checked:e.isPrimaryKey,"onUpdate:checked":[t=>e.isPrimaryKey=t,t=>f(e,t)]},{default:D(()=>[...d[7]||=[l(` 主键 `,-1)]]),_:1},8,[`checked`,`onUpdate:checked`]),u(w(j),{checked:e.isRequired,"onUpdate:checked":t=>e.isRequired=t},{default:D(()=>[...d[8]||=[l(`必填`,-1)]]),_:1},8,[`checked`,`onUpdate:checked`]),u(w(j),{checked:e.isForeignKey,"onUpdate:checked":t=>e.isForeignKey=t},{default:D(()=>[...d[9]||=[l(`外键`,-1)]]),_:1},8,[`checked`,`onUpdate:checked`])]),_:2},1024),u(w(L),{label:`注释`,size:`small`,style:{"margin-top":`12px`}},{default:D(()=>[u(w(B),{value:e.comment,"onUpdate:value":t=>e.comment=t,placeholder:`字段注释`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024))),128)),u(w(k),{onClick:p,dashed:``,block:``,type:`primary`,ghost:``,style:{"margin-top":`16px`}},{icon:D(()=>[u(t,{name:`mdi:plus`,size:16})]),default:D(()=>[d[10]||=l(` 添加字段 `,-1)]),_:1})])]),_:1},8,[`model`])])):o(`v-if`,!0)]),_:1},8,[`title`])]),_:1},8,[`show`]))}}),ue={class:`er-layout`},de={key:0,class:`toolbar`},fe={key:0,style:{"margin-top":`8px`}};var pe=n(d({__name:`index`,props:{data:{},showToolbar:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},theme:{}},emits:[`ready`,`data-change`],setup(e,{expose:n,emit:r}){let a=e,d=r,f=b(),{graph:p,initGraph:h,centerContent:g,zoomToFit:x,scheduleZoomToFit:S}=Y(f,i(()=>a.theme===`dark`)),{exportOptions:T,handleExport:A}=$(p,`er-diagram`),j=b(!1),M=b(),N=b(!1),P=(e,t)=>e.length>t?e.substring(0,t-1)+`..`:e,I=e=>e.fields?.map(t=>{let n=t.isPrimaryKey?`🔑 ${t.name}`:t.isRequired?`* ${t.name}`:t.name;return{id:`${e.id}_${t.name}`,group:`list`,attrs:{portNameLabel:{text:P(n,12),title:n},portTypeLabel:{text:P(t.type,10),title:t.type},portBody:{fill:t.isPrimaryKey?`#FFF7E6`:`#EFF4FF`}}}})||[],L=e=>({id:e.id,shape:`er-rect`,x:e.position.x,y:e.position.y,width:200,height:24+(e.fields?.length||0)*24,data:e,attrs:{label:{text:P(e.name,20),refX:.5,refY:10,textAnchor:`middle`,title:e.name}},ports:I(e)}),R=()=>{p.value&&(G.registerPortLayout(`erPortPosition`,e=>e.map((e,t)=>({position:{x:0,y:(t+1)*24},angle:0})),!0),G.registerNode(`er-rect`,{inherit:`rect`,markup:[{tagName:`rect`,selector:`body`},{tagName:`text`,selector:`label`}],attrs:{rect:{strokeWidth:1,stroke:`#5F95FF`,fill:`#5F95FF`},label:{fontWeight:`bold`,fill:`#ffffff`,fontSize:12}},ports:{groups:{list:{markup:[{tagName:`rect`,selector:`portBody`},{tagName:`text`,selector:`portNameLabel`},{tagName:`text`,selector:`portTypeLabel`}],attrs:{portBody:{width:200,height:24,strokeWidth:1,stroke:`#5F95FF`,fill:`#EFF4FF`,magnet:!0},portNameLabel:{ref:`portBody`,refX:6,refY:6,fontSize:9,textAnchor:`start`,textOverflow:`ellipsis`},portTypeLabel:{ref:`portBody`,refX:120,refY:6,fontSize:9,textAnchor:`start`,fill:`#666`}},position:`erPortPosition`}}}},!0))},z=()=>{N.value=!N.value,N.value||B()},B=()=>{p.value?.getEdges().forEach(e=>{e.attr(`line/stroke`,`#A2B1C3`),e.attr(`line/strokeWidth`,2)})},V=e=>{if(!p.value)return;let t=p.value.createNode(L(e));return p.value.resetCells([t,...p.value.getCells()]),t},H=()=>{let e=p.value?.getNodes()||[];for(let t=0;t<10;t++)for(let n=0;n<3;n++){let r={x:n*250+50,y:t*250+50};if(!e.some(e=>{let t=e.getPosition();return Math.abs(t.x-r.x)<250*.8&&Math.abs(t.y-r.y)<250*.8}))return r}return{x:50,y:50}},U=()=>{let e={id:`table_${Date.now()}`,name:`新表`,comment:``,fields:[{name:`id`,type:`BIGINT`,isPrimaryKey:!0,isRequired:!0,isForeignKey:!1,comment:`主键`},{name:`name`,type:`VARCHAR(100)`,isPrimaryKey:!1,isRequired:!0,isForeignKey:!1,comment:`名称`}],position:H()};V(e),K(e),Z()},K=e=>{M.value={...e,fields:e.fields?.map(e=>({...e}))||[]},j.value=!0},ee=()=>{if(!p.value||!M.value)return;let e=p.value.getCellById(M.value.id);e&&(e.setData(M.value),e.prop({size:{width:200,height:24+M.value.fields.length*24},attrs:{label:{text:P(M.value.name,20),title:M.value.name}},ports:I(M.value)})),j.value=!1,Z()},q=(e,t)=>{t&&(e.isRequired=!0,M.value?.fields.forEach(t=>{t!==e&&(t.isPrimaryKey=!1)}))},te=()=>{M.value?.fields.push({name:`field_${(M.value?.fields.length||0)+1}`,type:`VARCHAR(100)`,isPrimaryKey:!1,isRequired:!1,isForeignKey:!1,comment:``})},J=e=>{M.value&&M.value.fields.length>1&&M.value.fields.splice(e,1)},X=()=>{if(!p.value)return{tables:[],relations:[]};let e=p.value.getNodes().map(e=>({...e.getData(),position:e.getPosition()})),t=[];return p.value.getEdges().forEach(e=>{let n=e.getSourceNode(),r=e.getTargetNode(),i=e.getSourcePortId(),a=e.getTargetPortId();n&&r&&i&&a&&t.push({id:e.id,type:`foreign-key`,sourceTable:n.id,sourceField:i.split(`_`).slice(1).join(`_`),targetTable:r.id,targetField:a.split(`_`).slice(1).join(`_`),name:`${n.getData()?.name||n.id} -> ${r.getData()?.name||r.id}`})}),{tables:e,relations:t}},Z=()=>d(`data-change`,X()),Q=null;E(p,e=>{e instanceof G&&(R(),e.on(`node:dblclick`,({node:e})=>{a.readonly||K(e.getData())}),e.on(`edge:connected`,Z),e.on(`edge:removed`,Z),e.on(`edge:click`,({edge:e})=>{N.value?(e.remove(),Z()):(B(),e.attr(`line/stroke`,`#ff4d4f`),e.attr(`line/strokeWidth`,3),Q=e)}),e.on(`edge:dblclick`,({edge:e})=>{e.remove(),Z()}),e.on(`blank:click`,()=>{Q=null,N.value||B()}),d(`ready`,e),m(()=>{if(a.data?.tables){let t=a.data.tables.map(t=>e.createNode(L(t)));a.data.relations?.length&&a.data.relations.forEach(n=>{t.push(e.createEdge({source:{cell:n.sourceTable,port:`${n.sourceTable}_${n.sourceField}`},target:{cell:n.targetTable,port:`${n.targetTable}_${n.targetField}`},attrs:{line:{stroke:`#A2B1C3`,strokeWidth:2}}}))}),e.resetCells(t),S(300,20)}}))},{immediate:!0}),E(()=>a.data,e=>{if(p.value&&e?.tables){let t=e.tables.map(e=>p.value.createNode(L(e)));e.relations?.length&&e.relations.forEach(e=>{t.push(p.value.createEdge({source:{cell:e.sourceTable,port:`${e.sourceTable}_${e.sourceField}`},target:{cell:e.targetTable,port:`${e.targetTable}_${e.targetField}`},attrs:{line:{stroke:`#A2B1C3`,strokeWidth:2}}}))}),p.value.resetCells(t)}},{deep:!0});let ne=e=>{let t=e.target;t?.tagName===`INPUT`||t?.tagName===`TEXTAREA`||t?.isContentEditable||(e.key===`Delete`||e.key===`Backspace`)&&Q&&(Q.remove(),Z(),Q=null)};return _(()=>{document.addEventListener(`keydown`,ne),h()}),v(()=>document.removeEventListener(`keydown`,ne)),n({getGraph:()=>p.value??void 0,getData:X}),(n,r)=>(y(),s(`div`,ue,[o(` 工具栏 `),e.showToolbar?(y(),s(`div`,de,[u(w(W),null,{default:D(()=>[u(w(k),{onClick:U,type:`primary`,size:`small`},{icon:D(()=>[u(t,{name:`mdi:table-plus`,size:16})]),default:D(()=>[r[3]||=l(` 添加表 `,-1)]),_:1}),u(w(k),{onClick:w(g),size:`small`},{icon:D(()=>[u(t,{name:`mdi:image-filter-center-focus`,size:16})]),default:D(()=>[r[4]||=l(` 居中 `,-1)]),_:1},8,[`onClick`]),u(w(k),{onClick:w(x),size:`small`},{icon:D(()=>[u(t,{name:`mdi:fit-to-screen`,size:16})]),default:D(()=>[r[5]||=l(` 适应 `,-1)]),_:1},8,[`onClick`]),u(w(k),{onClick:z,type:N.value?`error`:`default`,size:`small`},{icon:D(()=>[u(t,{name:`mdi:delete`,size:16})]),default:D(()=>[l(` `+C(N.value?`退出删除`:`删除连线`),1)]),_:1},8,[`type`]),u(w(F),{options:w(T),onSelect:r[0]||=e=>w(A)(e,X)},{default:D(()=>[u(w(k),{size:`small`},{icon:D(()=>[u(t,{name:`mdi:export`,size:16})]),default:D(()=>[r[6]||=l(` 导出 `,-1)]),_:1})]),_:1},8,[`options`])]),_:1}),N.value?(y(),s(`div`,fe,[u(w(O),{type:`info`,size:`small`,"show-icon":!1},{default:D(()=>[...r[7]||=[l(` 删除模式:点击连接线即可删除 `,-1)]]),_:1})])):o(`v-if`,!0)])):o(`v-if`,!0),o(` 图表容器 `),c(`div`,{ref_key:`containerRef`,ref:f,class:`graph-container`},null,512),o(` 表编辑器 `),u(le,{show:j.value,"editing-table":M.value,"onUpdate:editingTable":r[1]||=e=>M.value=e,"onUpdate:show":r[2]||=e=>j.value=e,onSave:ee,onAddField:te,onRemoveField:J,onHandlePrimaryKey:q},null,8,[`show`,`editing-table`])]))}}),[[`__scopeId`,`data-v-edf47b23`]]);const me={defaultColor:`#A2B1C3`,highlightColor:`#ff4d4f`,strokeWidth:2,highlightStrokeWidth:3,portPositions:[],onDataChange:()=>{}};function he(e,t={}){let n={...me,...t},r=()=>{e.value?.getEdges().forEach(e=>{e.attr(`line/stroke`,n.defaultColor),e.attr(`line/strokeWidth`,n.strokeWidth)})},i=e=>{r(),e.attr(`line/stroke`,n.highlightColor),e.attr(`line/strokeWidth`,n.highlightStrokeWidth)},a=(e,t)=>{n.portPositions.forEach(n=>e.attr(`port-${n}/style/opacity`,t))};return{resetEdgeStyles:r,highlightEdge:i,togglePorts:a,bindInteractions:()=>{let t=e.value;t&&(t.on(`edge:click`,({edge:e})=>i(e)),t.on(`edge:dblclick`,({edge:e})=>{e.remove(),n.onDataChange()}),t.on(`blank:click`,r),t.on(`node:click`,r),t.on(`edge:connected`,n.onDataChange),n.portPositions.length>0&&(t.on(`node:mouseenter`,({node:e})=>a(e,1)),t.on(`node:mouseleave`,({node:e})=>a(e,0))))}}}const ge={"start-event":{name:`开始`,title:`开始事件`,iconClass:`circle start-event`},activity:{name:`任务`,title:`任务活动`,iconClass:`rect activity`},gateway:{name:`网关`,title:`排他网关`,iconClass:`diamond gateway`},"end-event":{name:`结束`,title:`结束事件`,iconClass:`circle end-event`}},_e={event:`事件`,activity:`活动`,gateway:`网关`,"bpmn-edge":`连接线`},ve=[`top`,`right`,`bottom`,`left`],ye=(e,t=`rect`)=>e.reduce((e,n)=>{let r=t===`circle`,i=n===`top`?r?{refCx:.5,refCy:0}:{refX:.5,refY:0}:n===`right`?r?{refCx:1,refCy:.5}:{refX:1,refY:.5}:n===`bottom`?r?{refCx:.5,refCy:1}:{refX:.5,refY:1}:r?{refCx:0,refCy:.5}:{refX:0,refY:.5};return e[`port-${n}`]={ref:`body`,...i,r:4,fill:`#31d0c6`,stroke:`#ffffff`,strokeWidth:2,magnet:!0,style:{cursor:`crosshair`,opacity:0,transition:`opacity 0.2s`}},e},{}),be={event:{inherit:`circle`,attrs:{body:{strokeWidth:2,stroke:`#5F95FF`,fill:`#FFF`,magnet:!1,style:{cursor:`move`}},text:{fontSize:12,fill:`#262626`,textAnchor:`middle`,textVerticalAnchor:`middle`,pointerEvents:`none`}}},activity:{inherit:`rect`,attrs:{body:{rx:6,ry:6,stroke:`#5F95FF`,fill:`#EFF4FF`,strokeWidth:1,magnet:!1,style:{cursor:`move`}},text:{fontSize:12,fill:`#262626`,textAnchor:`middle`,textVerticalAnchor:`middle`,pointerEvents:`none`}}},gateway:{inherit:`polygon`,attrs:{body:{refPoints:`0,10 10,0 20,10 10,20`,strokeWidth:2,stroke:`#5F95FF`,fill:`#EFF4FF`,magnet:!1,style:{cursor:`move`}},text:{fontSize:20,fill:`#5F95FF`,textAnchor:`middle`,textVerticalAnchor:`middle`,pointerEvents:`none`}}}},xe={inherit:`edge`,attrs:{line:{stroke:`#A2B1C3`,strokeWidth:2,targetMarker:{name:`block`,width:8,height:6,fill:`#A2B1C3`},cursor:`pointer`}}};function Se(e=!1){let t={background:e?`#18181c`:`#ffffff`,gridPrimary:e?`rgba(255, 255, 255, 0.08)`:`#eee`,gridSecondary:e?`rgba(255, 255, 255, 0.04)`:`#ddd`};return{background:{color:t.background},grid:{visible:!0,type:`doubleMesh`,args:[{color:t.gridPrimary,thickness:1},{color:t.gridSecondary,thickness:1,factor:4}]},mousewheel:{enabled:!0,zoomAtMousePosition:!0,modifiers:`ctrl`,minScale:.5,maxScale:3},connecting:{router:`manhattan`,connector:{name:`rounded`,args:{radius:8}},allowBlank:!1,allowLoop:!1,allowNode:!1,snap:!0,allowEdge:!1},highlighting:{magnetAvailable:{name:`stroke`,args:{attrs:{fill:`#31d0c6`,stroke:`#31d0c6`,opacity:1}}},magnetAdsorbed:{name:`stroke`,args:{attrs:{fill:`#5F95FF`,stroke:`#5F95FF`,opacity:1}}}},selecting:{enabled:!0,rubberband:!0,showNodeSelectionBox:!0},resizing:!0,rotating:!1,snapline:!0,keyboard:!0,clipboard:!0}}Se();const Ce={"start-event":{shape:`event`,width:50,height:50,label:`开始事件`,data:{type:`start`}},"end-event":{shape:`event`,width:50,height:50,label:`结束事件`,data:{type:`end`}},activity:{shape:`activity`,width:120,height:60,label:`新活动`,data:{description:``,assignee:``}},gateway:{shape:`gateway`,width:40,height:40,label:`+`,data:{type:`exclusive`}}},we=[{id:`start-1`,shape:`event`,x:100,y:200,width:50,height:50,label:`流程开始`,data:{type:`start`}},{id:`activity-1`,shape:`activity`,x:200,y:180,width:120,height:60,label:`用户申请`,data:{description:`用户提交申请表单`,assignee:`申请人`}},{id:`activity-2`,shape:`activity`,x:380,y:180,width:120,height:60,label:`初审`,data:{description:`部门进行初步审核`,assignee:`部门主管`}},{id:`gateway-1`,shape:`gateway`,x:550,y:200,width:40,height:40,label:`+`,data:{type:`exclusive`}},{id:`activity-3`,shape:`activity`,x:650,y:120,width:120,height:60,label:`终审`,data:{description:`高级主管最终审核`,assignee:`总监`}},{id:`activity-4`,shape:`activity`,x:650,y:260,width:120,height:60,label:`驳回处理`,data:{description:`处理驳回流程`,assignee:`专员`}},{id:`end-1`,shape:`event`,x:820,y:140,width:50,height:50,label:`审批通过`,data:{type:`end`}},{id:`end-2`,shape:`event`,x:820,y:280,width:50,height:50,label:`审批驳回`,data:{type:`end`}},{id:`edge-1`,shape:`bpmn-edge`,source:`start-1`,target:`activity-1`,x:0,y:0},{id:`edge-2`,shape:`bpmn-edge`,source:`activity-1`,target:`activity-2`,x:0,y:0},{id:`edge-3`,shape:`bpmn-edge`,source:`activity-2`,target:`gateway-1`,x:0,y:0},{id:`edge-4`,shape:`bpmn-edge`,source:`gateway-1`,target:`activity-3`,label:`通过`,x:0,y:0},{id:`edge-5`,shape:`bpmn-edge`,source:`gateway-1`,target:`activity-4`,label:`驳回`,x:0,y:0},{id:`edge-6`,shape:`bpmn-edge`,source:`activity-3`,target:`end-1`,x:0,y:0},{id:`edge-7`,shape:`bpmn-edge`,source:`activity-4`,target:`end-2`,x:0,y:0}],Te={key:0,class:`property-panel`},Ee={class:`property-item`},De={class:`property-item`},Oe={key:0,class:`property-item`},ke={key:1,class:`property-item`},Ae={class:`form-actions`},je=d({__name:`BPMNPropertyEditor`,props:f({show:{type:Boolean}},{editingElement:{},editingElementModifiers:{}}),emits:f([`update:show`,`save`,`delete`],[`update:editingElement`]),setup(e,{emit:t}){let n=T(e,`editingElement`),r=t,d=i(()=>_e[n.value?.shape]||n.value?.shape||``);return(t,i)=>(y(),a(w(N),{show:e.show,width:`300`,title:`属性设置`,"onUpdate:show":i[6]||=e=>r(`update:show`,e)},{default:D(()=>[n.value?(y(),s(`div`,Te,[c(`div`,Ee,[i[7]||=c(`div`,{class:`property-label`},`名称`,-1),u(w(B),{value:n.value.label,"onUpdate:value":i[0]||=e=>n.value.label=e,placeholder:`请输入名称`,size:`small`},null,8,[`value`])]),c(`div`,De,[i[8]||=c(`div`,{class:`property-label`},`类型`,-1),u(w(B),{value:d.value,readonly:``,size:`small`},null,8,[`value`])]),n.value.shape===`activity`?(y(),s(`div`,Oe,[i[9]||=c(`div`,{class:`property-label`},`描述`,-1),u(w(B),{value:n.value.description,"onUpdate:value":i[1]||=e=>n.value.description=e,type:`textarea`,rows:3,placeholder:`请输入活动描述`,size:`small`},null,8,[`value`])])):o(`v-if`,!0),n.value.shape===`activity`?(y(),s(`div`,ke,[i[10]||=c(`div`,{class:`property-label`},`执行人`,-1),u(w(B),{value:n.value.assignee,"onUpdate:value":i[2]||=e=>n.value.assignee=e,placeholder:`请输入执行人`,size:`small`},null,8,[`value`])])):o(`v-if`,!0),c(`div`,Ae,[u(w(W),null,{default:D(()=>[u(w(k),{onClick:i[3]||=e=>r(`save`),type:`primary`,size:`small`},{default:D(()=>[...i[11]||=[l(` 保存 `,-1)]]),_:1}),u(w(k),{onClick:i[4]||=e=>r(`update:show`,!1),size:`small`},{default:D(()=>[...i[12]||=[l(` 取消 `,-1)]]),_:1}),u(w(k),{onClick:i[5]||=e=>r(`delete`),type:`error`,size:`small`},{default:D(()=>[...i[13]||=[l(` 删除 `,-1)]]),_:1})]),_:1})])])):o(`v-if`,!0)]),_:1},8,[`show`]))}}),Me={class:`bpmn-layout`},Ne={key:0,class:`top-toolbar`},Pe={class:`toolbar-section`},Fe={class:`toolbar-group`},Ie={class:`toolbar-group`},Le={class:`toolbar-group`},Re={class:`main-content`},ze={key:0,class:`left-panel`},Be={class:`element-grid`},Ve=[`onClick`,`title`],He={class:`graph-wrapper`};var Ue=n(d({__name:`index`,props:{data:{},showToolbar:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},width:{default:`100%`},height:{default:`600px`},theme:{}},emits:[`ready`,`data-change`],setup(e,{expose:n,emit:a}){let d=e,f=a,p=b(),{graph:m,initGraph:g,centerContent:v,zoomToFit:S,scheduleZoomToFit:T}=Y(p,i(()=>d.theme===`dark`)),{exportOptions:O,handleExport:A}=$(m,`bpmn-diagram`),{bindInteractions:j}=he(m,{portPositions:ve,onDataChange:()=>K()}),M=b(!1),N=b(),P=e=>String(e.attr(`text/text`)||e.attr(`label/text`)||``),I=e=>{if(!e)return[];if(Array.isArray(e))return e;let t=[];return Object.values(e).forEach(e=>{Array.isArray(e)&&t.push(...e)}),t},L=()=>{let e=ve.map(e=>({tagName:`circle`,selector:`port-${e}`})),t=[`event`,`activity`,`gateway`],n={event:`circle`,activity:`rect`,gateway:`polygon`};t.forEach(t=>{G.registerNode(t,{...be[t],markup:[{tagName:n[t],selector:`body`},{tagName:`text`,selector:`text`},...e],attrs:{...be[t].attrs,...ye(ve,n[t])}},!0)}),G.registerEdge(`bpmn-edge`,xe,!0)},R=e=>{if(!m.value||!e.length)return;let t=e.map(e=>{let{data:t,...n}=e,r=e.shape===`bpmn-edge`?m.value.createEdge(n):m.value.createNode(n);return t&&r.setData(t),r});m.value.resetCells(t),T(200,50)},z=e=>{if(!m.value)return;let t=Ce[e];if(!t)return;let n=m.value.options.width/2,r=m.value.options.height/2,{data:i,...a}={id:`${e}-${Date.now()}`,x:n+Math.random()*100-50,y:r+Math.random()*100-50,...t},o=m.value.createNode(a);i&&o.setData(i),m.value.addCell(o),K()},B=()=>{m.value?.clearCells(),K()},V=e=>{let t=e.getData()||{};N.value={id:e.id,shape:e.shape,label:P(e),description:t.description||``,assignee:t.assignee||``,x:0,y:0},M.value=!0},H=()=>{if(!m.value||!N.value)return;let e=m.value.getCellById(N.value.id);e&&(e.setData({description:N.value.description,assignee:N.value.assignee}),e.attr(`text/text`,N.value.label||``),e.attr(`label/text`,N.value.label||``)),M.value=!1,K()},U=()=>{!m.value||!N.value||(m.value.getCellById(N.value.id)?.remove(),M.value=!1,K())},W=()=>m.value?[...m.value.getNodes().map(e=>({id:e.id,shape:e.shape,x:e.getPosition().x,y:e.getPosition().y,width:e.getSize().width,height:e.getSize().height,label:P(e),data:e.getData()||{}})),...m.value.getEdges().map(e=>({id:e.id,shape:`bpmn-edge`,source:e.getSourceCellId()||``,target:e.getTargetCellId()||``,label:P(e),x:0,y:0}))]:[],K=()=>f(`data-change`,W());return E(m,e=>{e instanceof G&&(d.readonly||(j(),e.on(`node:dblclick`,({node:e})=>V(e)),e.on(`node:moved`,K)),f(`ready`,e),R(we))},{immediate:!0}),E(()=>d.data,e=>{if(!e||!m.value)return;let t=I(e);t.length>0&&R(t)},{deep:!0}),_(async()=>{L();let e=Se();await g({...e,connecting:{...e.connecting,createEdge:()=>m.value.createEdge({shape:`bpmn-edge`}),validateConnection:({sourceView:e,targetView:t,sourceMagnet:n,targetMagnet:r})=>e!==t&&!!n&&!!r&&n.getAttribute(`magnet`)===`true`&&r.getAttribute(`magnet`)===`true`}})}),n({getGraph:()=>m.value,getData:W,loadData:R}),(n,i)=>(y(),s(`div`,Me,[e.showToolbar?(y(),s(`div`,Ne,[c(`div`,Pe,[c(`div`,Fe,[u(w(k),{onClick:B,size:`small`},{icon:D(()=>[u(t,{name:`mdi:delete-outline`,size:16})]),default:D(()=>[i[3]||=l(` 清空 `,-1)]),_:1})]),c(`div`,Ie,[u(w(k),{onClick:w(v),size:`small`},{icon:D(()=>[u(t,{name:`mdi:image-filter-center-focus`,size:16})]),default:D(()=>[i[4]||=l(` 居中 `,-1)]),_:1},8,[`onClick`]),u(w(k),{onClick:w(S),size:`small`},{icon:D(()=>[u(t,{name:`mdi:fit-to-screen`,size:16})]),default:D(()=>[i[5]||=l(` 适应 `,-1)]),_:1},8,[`onClick`])]),c(`div`,Le,[u(w(F),{options:w(O),onSelect:i[0]||=e=>w(A)(e,W)},{default:D(()=>[u(w(k),{size:`small`},{icon:D(()=>[u(t,{name:`mdi:export`,size:16})]),default:D(()=>[i[6]||=l(` 导出 `,-1)]),_:1})]),_:1},8,[`options`])])])])):o(`v-if`,!0),c(`div`,Re,[e.showToolbar?(y(),s(`div`,ze,[i[7]||=c(`div`,{class:`panel-title`},`组件`,-1),c(`div`,Be,[(y(!0),s(r,null,x(w(ge),(e,t)=>(y(),s(`div`,{key:t,class:`element-item`,onClick:e=>z(t),title:e.title},[c(`div`,{class:h([`element-icon`,e.iconClass])},null,2),c(`span`,null,C(e.name),1)],8,Ve))),128))])])):o(`v-if`,!0),c(`div`,He,[c(`div`,{ref_key:`containerRef`,ref:p,class:`graph-container`},null,512)])]),u(je,{show:M.value,"editing-element":N.value,"onUpdate:editingElement":i[1]||=e=>N.value=e,"onUpdate:show":i[2]||=e=>M.value=e,onSave:H,onDelete:U},null,8,[`show`,`editing-element`])]))}}),[[`__scopeId`,`data-v-700d0476`]]);const We={key:0,class:`class-editor`},Ge={class:`section`},Ke={class:`section-header`},qe={style:{"font-size":`13px`}},Je={class:`section`},Ye={class:`section-header`},Xe={style:{"font-size":`13px`}};var Ze=n(d({__name:`UMLClassEditor`,props:f({show:{type:Boolean}},{editingClass:{},editingClassModifiers:{}}),emits:f([`update:show`,`save`,`delete`],[`update:editingClass`]),setup(e,{emit:n}){let i=T(e,`editingClass`),d=n;return(n,f)=>(y(),a(w(N),{show:e.show,width:`450`,title:`编辑类`,"onUpdate:show":f[6]||=e=>d(`update:show`,e)},{default:D(()=>[i.value?(y(),s(`div`,We,[u(w(I),{"label-placement":`top`},{default:D(()=>[u(w(L),{label:`类名`},{default:D(()=>[u(w(B),{value:i.value.name,"onUpdate:value":f[0]||=e=>i.value.name=e,placeholder:`请输入类名`},null,8,[`value`])]),_:1}),u(w(M),{style:{margin:`20px 0`}},{default:D(()=>[...f[7]||=[l(`属性`,-1)]]),_:1}),c(`div`,Ge,[(y(!0),s(r,null,x(i.value.attributes,(e,t)=>(y(),s(`div`,{key:t,class:`item`},[u(w(A),{size:`small`,style:{"margin-bottom":`12px`}},{header:D(()=>[c(`div`,Ke,[c(`span`,qe,`#`+C(t+1)+` `+C(e.name||`新属性`),1),u(w(k),{onClick:e=>i.value.attributes.splice(t,1),size:`tiny`,type:`error`,quaternary:``,style:{"margin-left":`auto`}},{default:D(()=>[...f[8]||=[l(` 删除 `,-1)]]),_:1},8,[`onClick`])])]),default:D(()=>[u(w(W),{vertical:``,size:`small`},{default:D(()=>[u(w(W),null,{default:D(()=>[u(w(L),{label:`属性名`,style:{margin:`0`,flex:`1`}},{default:D(()=>[u(w(B),{value:e.name,"onUpdate:value":t=>e.name=t,placeholder:`属性名`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024),u(w(L),{label:`类型`,style:{margin:`0`,flex:`1`}},{default:D(()=>[u(w(B),{value:e.type,"onUpdate:value":t=>e.type=t,placeholder:`类型`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024),u(w(L),{label:`可见性`,style:{margin:`0`}},{default:D(()=>[u(w(H),{value:e.visibility,"onUpdate:value":t=>e.visibility=t,size:`small`},{default:D(()=>[u(w(V),{value:`public`},{default:D(()=>[...f[9]||=[l(`+ public`,-1)]]),_:1}),u(w(V),{value:`private`},{default:D(()=>[...f[10]||=[l(`- private`,-1)]]),_:1}),u(w(V),{value:`protected`},{default:D(()=>[...f[11]||=[l(`# protected`,-1)]]),_:1})]),_:1},8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024)]),_:2},1024)]))),128)),u(w(k),{onClick:f[1]||=e=>i.value.attributes.push({name:`newAttribute`,type:`string`,visibility:`private`}),dashed:``,block:``,type:`primary`,ghost:``,size:`small`},{icon:D(()=>[u(t,{name:`mdi:plus`,size:16})]),default:D(()=>[f[12]||=l(` 添加属性 `,-1)]),_:1})]),u(w(M),{style:{margin:`20px 0`}},{default:D(()=>[...f[13]||=[l(`方法`,-1)]]),_:1}),c(`div`,Je,[(y(!0),s(r,null,x(i.value.methods,(e,t)=>(y(),s(`div`,{key:t,class:`item`},[u(w(A),{size:`small`,style:{"margin-bottom":`12px`}},{header:D(()=>[c(`div`,Ye,[c(`span`,Xe,`#`+C(t+1)+` `+C(e.name||`新方法`),1),u(w(k),{onClick:e=>i.value.methods.splice(t,1),size:`tiny`,type:`error`,quaternary:``,style:{"margin-left":`auto`}},{default:D(()=>[...f[14]||=[l(` 删除 `,-1)]]),_:1},8,[`onClick`])])]),default:D(()=>[u(w(W),{vertical:``,size:`small`},{default:D(()=>[u(w(W),null,{default:D(()=>[u(w(L),{label:`方法名`,style:{margin:`0`,flex:`1`}},{default:D(()=>[u(w(B),{value:e.name,"onUpdate:value":t=>e.name=t,placeholder:`方法名`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024),u(w(L),{label:`返回类型`,style:{margin:`0`,flex:`1`}},{default:D(()=>[u(w(B),{value:e.returnType,"onUpdate:value":t=>e.returnType=t,placeholder:`返回类型`,size:`small`},null,8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024),u(w(L),{label:`可见性`,style:{margin:`0`}},{default:D(()=>[u(w(H),{value:e.visibility,"onUpdate:value":t=>e.visibility=t,size:`small`},{default:D(()=>[u(w(V),{value:`public`},{default:D(()=>[...f[15]||=[l(`+ public`,-1)]]),_:1}),u(w(V),{value:`private`},{default:D(()=>[...f[16]||=[l(`- private`,-1)]]),_:1}),u(w(V),{value:`protected`},{default:D(()=>[...f[17]||=[l(`# protected`,-1)]]),_:1})]),_:1},8,[`value`,`onUpdate:value`])]),_:2},1024)]),_:2},1024)]),_:2},1024)]))),128)),u(w(k),{onClick:f[2]||=e=>i.value.methods.push({name:`newMethod`,returnType:`void`,visibility:`public`}),dashed:``,block:``,type:`primary`,ghost:``,size:`small`},{icon:D(()=>[u(t,{name:`mdi:plus`,size:16})]),default:D(()=>[f[18]||=l(` 添加方法 `,-1)]),_:1})]),u(w(M),{style:{margin:`20px 0`}}),u(w(W),{justify:`space-between`},{default:D(()=>[u(w(k),{onClick:f[3]||=e=>d(`delete`),type:`error`,ghost:``},{icon:D(()=>[u(t,{name:`mdi:delete`,size:16})]),default:D(()=>[f[19]||=l(` 删除类 `,-1)]),_:1}),u(w(W),null,{default:D(()=>[u(w(k),{onClick:f[4]||=e=>d(`update:show`,!1)},{default:D(()=>[...f[20]||=[l(`取消`,-1)]]),_:1}),u(w(k),{onClick:f[5]||=e=>d(`save`),type:`primary`},{default:D(()=>[...f[21]||=[l(` 保存 `,-1)]]),_:1})]),_:1})]),_:1})]),_:1})])):o(`v-if`,!0)]),_:1},8,[`show`]))}}),[[`__scopeId`,`data-v-102d6be6`]]);const Qe={public:`+`,private:`-`,protected:`#`},$e={extends:{strokeDasharray:0,targetMarker:{name:`block`,width:10,height:8,fill:`white`,stroke:`#722ed1`,strokeWidth:2}},implement:{strokeDasharray:`8,4`,targetMarker:{name:`block`,width:10,height:8,fill:`white`,stroke:`#722ed1`,strokeWidth:2}},composition:{strokeDasharray:0,sourceMarker:{name:`diamond`,width:12,height:8,fill:`#722ed1`,stroke:`#722ed1`}},aggregation:{strokeDasharray:0,sourceMarker:{name:`diamond`,width:12,height:8,fill:`white`,stroke:`#722ed1`,strokeWidth:2}},association:{strokeDasharray:0,targetMarker:{name:`classic`,size:8,fill:`#722ed1`}}},et=[`top`,`right`,`bottom`,`left`].reduce((e,t)=>{let n=t===`top`?{refX:.5,refY:0}:t===`right`?{refX:1,refY:.5}:t===`bottom`?{refX:.5,refY:1}:{refX:0,refY:.5};return e[`port-${t}`]={ref:`body`,...n,r:4,fill:`#31d0c6`,stroke:`#ffffff`,strokeWidth:2,magnet:!0,style:{cursor:`crosshair`,opacity:0,transition:`opacity 0.2s`}},e},{}),tt={inherit:`rect`,markup:[{tagName:`rect`,selector:`body`},{tagName:`rect`,selector:`name-rect`},{tagName:`rect`,selector:`attrs-rect`},{tagName:`rect`,selector:`methods-rect`},{tagName:`text`,selector:`name-text`},{tagName:`text`,selector:`attrs-text`},{tagName:`text`,selector:`methods-text`},{tagName:`circle`,selector:`port-top`},{tagName:`circle`,selector:`port-right`},{tagName:`circle`,selector:`port-bottom`},{tagName:`circle`,selector:`port-left`}],attrs:{rect:{width:160},body:{stroke:`#5f95ff`,strokeWidth:1,fill:`#fff`,magnet:!1,style:{cursor:`move`}},"name-rect":{fill:`#5f95ff`,stroke:`#fff`,strokeWidth:.5,magnet:!1,style:{cursor:`move`}},"attrs-rect":{fill:`#eff4ff`,stroke:`#fff`,strokeWidth:.5,magnet:!1,style:{cursor:`move`}},"methods-rect":{fill:`#eff4ff`,stroke:`#fff`,strokeWidth:.5,magnet:!1,style:{cursor:`move`}},"name-text":{ref:`name-rect`,refY:.5,refX:.5,textAnchor:`middle`,fontWeight:`bold`,fill:`#fff`,fontSize:12,pointerEvents:`none`},"attrs-text":{ref:`attrs-rect`,refY:.5,refX:5,textAnchor:`left`,fill:`black`,fontSize:10,pointerEvents:`none`},"methods-text":{ref:`methods-rect`,refY:.5,refX:5,textAnchor:`left`,fill:`black`,fontSize:10,pointerEvents:`none`},...et}},nt={router:`manhattan`,connector:{name:`rounded`,args:{radius:8}},allowBlank:!1,allowLoop:!1,allowNode:!1,snap:!0,allowEdge:!1},rt={magnetAvailable:{name:`stroke`,args:{attrs:{fill:`#31d0c6`,stroke:`#31d0c6`,opacity:1}}},magnetAdsorbed:{name:`stroke`,args:{attrs:{fill:`#5F95FF`,stroke:`#5F95FF`,opacity:1}}}},it={shape:`extends`,attrs:{line:{stroke:`#722ed1`,strokeWidth:2,targetMarker:{name:`block`,width:8,height:6,fill:`#722ed1`}}}},at=[{id:`animal`,name:`<<Abstract>>
|
|
2
2
|
动物`,x:342,y:98,attributes:[{name:`名字`,type:`string`,visibility:`public`}],methods:[{name:`新陈代谢`,returnType:`void`,visibility:`public`},{name:`繁殖`,returnType:`void`,visibility:`public`}]},{id:`bird`,name:`鸟`,x:575,y:280,attributes:[{name:`羽毛`,type:`string`,visibility:`public`},{name:`下蛋`,type:`boolean`,visibility:`public`}],methods:[]},{id:`mammal`,name:`哺乳动物`,x:844,y:319,attributes:[{name:`翅膀`,type:`boolean`,visibility:`public`}],methods:[]},{id:`dog`,name:`狗`,x:656,y:456,attributes:[{name:`下蛋`,type:`boolean`,visibility:`public`}],methods:[]},{id:`enterprise`,name:`企鹅`,x:984,y:456,attributes:[{name:`下蛋`,type:`boolean`,visibility:`public`}],methods:[]},{id:`sparrow`,name:`麻雀`,x:531,y:608,attributes:[{name:`学飞`,type:`boolean`,visibility:`public`}],methods:[]},{id:`interface-flying`,name:`<<interface>>
|
|
3
|
-
飞翔`,x:762,y:608,attributes:[{name:`下蛋`,type:`boolean`,visibility:`public`}],methods:[]},{id:`qemu`,name:`气球`,x:981,y:608,attributes:[],methods:[]}],ot=[{id:`edge-1`,shape:`extends`,source:`bird`,target:`animal`},{id:`edge-2`,shape:`extends`,source:`mammal`,target:`animal`},{id:`edge-3`,shape:`extends`,source:`dog`,target:`mammal`},{id:`edge-4`,shape:`extends`,source:`enterprise`,target:`mammal`},{id:`edge-5`,shape:`extends`,source:`sparrow`,target:`bird`},{id:`edge-6`,shape:`implement`,source:`sparrow`,target:`interface-flying`},{id:`edge-7`,shape:`implement`,source:`enterprise`,target:`interface-flying`},{id:`edge-8`,shape:`association`,source:`bird`,target:`mammal`,label:`1:2`}],st=e=>Qe[e]||`+`,ct={name:`新类`,attributes:[{name:`attribute`,type:`string`,visibility:`private`}],methods:[{name:`method`,returnType:`void`,visibility:`public`}],position:{x:100,y:100}},lt={class:`uml-layout`},ut={key:0,class:`toolbar`};var dt=n(d({__name:`index`,props:{data:{},showToolbar:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},width:{default:`100%`},height:{default:`600px`},theme:{}},emits:[`ready`,`data-change`],setup(e,{expose:n,emit:r}){let a=e,d=r,f=b(),{graph:p,initGraph:m,centerContent:h,zoomToFit:v}=Y(f,i(()=>a.theme===`dark`)),{exportOptions:
|
|
4
|
-
`):e.text),K.setByPath(i,`attrs/${e.type}-rect/height`,t),K.setByPath(i,`attrs/${e.type}-rect/transform`,`translate(0,${a})`),a+=t}),i.size={width:160,height:a},i}},!0),Object.entries($e).forEach(([e,t])=>{G.registerEdge(e,{inherit:`edge`,attrs:{line:{strokeWidth:2,stroke:`#722ed1`,...t}}},!0)})},
|
|
3
|
+
飞翔`,x:762,y:608,attributes:[{name:`下蛋`,type:`boolean`,visibility:`public`}],methods:[]},{id:`qemu`,name:`气球`,x:981,y:608,attributes:[],methods:[]}],ot=[{id:`edge-1`,shape:`extends`,source:`bird`,target:`animal`},{id:`edge-2`,shape:`extends`,source:`mammal`,target:`animal`},{id:`edge-3`,shape:`extends`,source:`dog`,target:`mammal`},{id:`edge-4`,shape:`extends`,source:`enterprise`,target:`mammal`},{id:`edge-5`,shape:`extends`,source:`sparrow`,target:`bird`},{id:`edge-6`,shape:`implement`,source:`sparrow`,target:`interface-flying`},{id:`edge-7`,shape:`implement`,source:`enterprise`,target:`interface-flying`},{id:`edge-8`,shape:`association`,source:`bird`,target:`mammal`,label:`1:2`}],st=e=>Qe[e]||`+`,ct={name:`新类`,attributes:[{name:`attribute`,type:`string`,visibility:`private`}],methods:[{name:`method`,returnType:`void`,visibility:`public`}],position:{x:100,y:100}},lt={class:`uml-layout`},ut={key:0,class:`toolbar`};var dt=n(d({__name:`index`,props:{data:{},showToolbar:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},width:{default:`100%`},height:{default:`600px`},theme:{}},emits:[`ready`,`data-change`],setup(e,{expose:n,emit:r}){let a=e,d=r,f=b(),{graph:p,initGraph:m,centerContent:h,zoomToFit:v,scheduleZoomToFit:x}=Y(f,i(()=>a.theme===`dark`)),{exportOptions:S,handleExport:C}=$(p,`uml-diagram`),{bindInteractions:T}=he(p,{defaultColor:`#722ed1`,portPositions:[`top`,`right`,`bottom`,`left`],onDataChange:()=>B()}),O=b(!1),A=b(),j=()=>{G.registerNode(`class`,{...tt,propHooks(e){let{name:t,attributes:n,methods:r,...i}=e;if(!(t&&n&&r))return e;let a=0;return[{type:`name`,text:t},{type:`attrs`,text:n},{type:`methods`,text:r}].forEach(e=>{let t=Array.isArray(e.text)?e.text.length*12+16:32;K.setByPath(i,`attrs/${e.type}-text/text`,Array.isArray(e.text)?e.text.join(`
|
|
4
|
+
`):e.text),K.setByPath(i,`attrs/${e.type}-rect/height`,t),K.setByPath(i,`attrs/${e.type}-rect/transform`,`translate(0,${a})`),a+=t}),i.size={width:160,height:a},i}},!0),Object.entries($e).forEach(([e,t])=>{G.registerEdge(e,{inherit:`edge`,attrs:{line:{strokeWidth:2,stroke:`#722ed1`,...t}}},!0)})},M=e=>{if(!p.value||!e.length)return;let t=[`extends`,`composition`,`implement`,`aggregation`,`association`],n=[];e.forEach(e=>{if(t.includes(e.shape))n.push(p.value.createEdge(e));else{let{data:t,...r}=e,i=p.value.createNode(r);t&&i.setData(t),n.push(i)}}),p.value.resetCells(n),x(200,10)},N=e=>({name:e.name,attributes:e.attributes.map(e=>`${st(e.visibility)} ${e.name}: ${e.type}`),methods:e.methods.map(e=>`${st(e.visibility)} ${e.name}(): ${e.returnType}`)}),P=()=>{if(!p.value)return;let e={id:`class_${Date.now()}`,...ct},t={id:e.id,shape:`class`,x:e.position.x,y:e.position.y,...N(e),data:e};p.value.addCell(p.value.createNode(t)),B()},I=e=>{A.value={...e,attributes:[...e.attributes||[]],methods:[...e.methods||[]]},O.value=!0},L=()=>{if(!p.value||!A.value)return;let e=p.value.getCellById(A.value.id);e&&(e.setData(A.value),e.prop(N(A.value))),O.value=!1,B()},R=()=>{!p.value||!A.value||(p.value.getCellById(A.value.id)?.remove(),O.value=!1,B())},z=()=>({classes:p.value?.getNodes().map(e=>({...e.getData(),position:e.getPosition()}))||[],relations:p.value?.getEdges().map(e=>({id:e.id,type:e.shape,source:e.getSourceCellId()||``,target:e.getTargetCellId()||``}))||[]}),B=()=>d(`data-change`,z());return E(p,e=>{e instanceof G&&(j(),T(),e.on(`node:dblclick`,({node:e})=>{!a.readonly&&e.getData()&&I(e.getData())}),d(`ready`,e),M([...at.map(e=>({id:e.id,shape:`class`,x:e.x,y:e.y,...N(e),data:{id:e.id,name:e.name,attributes:e.attributes,methods:e.methods,position:{x:e.x,y:e.y}}})),...ot]))},{immediate:!0}),E(()=>a.data,e=>{if(p.value&&e?.classes){let t=[`extends`,`composition`,`implement`,`aggregation`,`association`];M([...e.classes.map(e=>({id:e.id,shape:`class`,x:e.position?.x??50,y:e.position?.y??50,...N(e),data:e})),...(e.relations||[]).filter(e=>t.includes(e.type)).map(e=>({shape:e.type,source:e.source,target:e.target}))])}},{deep:!0}),_(()=>{m({interacting:!0,connecting:{...nt,createEdge:()=>p.value.createEdge(it),validateConnection:({sourceView:e,targetView:t,sourceMagnet:n,targetMagnet:r})=>e!==t&&!!n&&!!r&&n.getAttribute(`magnet`)===`true`&&r.getAttribute(`magnet`)===`true`},highlighting:rt})}),n({getGraph:()=>p.value,getData:z,addClass:P,centerContent:h,zoomToFit:v}),(n,r)=>(y(),s(`div`,lt,[e.showToolbar?(y(),s(`div`,ut,[u(w(W),null,{default:D(()=>[u(w(k),{onClick:P,type:`primary`,size:`small`},{icon:D(()=>[u(t,{name:`mdi:plus-box`,size:16})]),default:D(()=>[r[3]||=l(` 添加类 `,-1)]),_:1}),u(w(k),{onClick:w(h),size:`small`},{icon:D(()=>[u(t,{name:`mdi:image-filter-center-focus`,size:16})]),default:D(()=>[r[4]||=l(` 居中 `,-1)]),_:1},8,[`onClick`]),u(w(k),{onClick:w(v),size:`small`},{icon:D(()=>[u(t,{name:`mdi:fit-to-screen`,size:16})]),default:D(()=>[r[5]||=l(` 适应 `,-1)]),_:1},8,[`onClick`]),u(w(F),{options:w(S),onSelect:r[0]||=e=>w(C)(e,z)},{default:D(()=>[u(w(k),{size:`small`},{icon:D(()=>[u(t,{name:`mdi:export`,size:16})]),default:D(()=>[r[6]||=l(` 导出 `,-1)]),_:1})]),_:1},8,[`options`])]),_:1})])):o(`v-if`,!0),c(`div`,{ref_key:`containerRef`,ref:f,class:`graph-container`,style:g({width:a.width,height:a.height})},null,4),u(Ze,{show:O.value,"editing-class":A.value,"onUpdate:editingClass":r[1]||=e=>A.value=e,"onUpdate:show":r[2]||=e=>O.value=e,onSave:L,onDelete:R},null,8,[`show`,`editing-class`])]))}}),[[`__scopeId`,`data-v-dcbc422b`]]);const ft={class:`c-antv-container`};var pt=n(d({name:`C_AntV`,__name:`index`,props:{type:{},data:{},width:{default:`100%`},height:{default:`600px`},readonly:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},theme:{default:`light`}},emits:[`ready`,`data-change`],setup(e,{expose:t,emit:n}){let r=e,o=n,c=b(),l={er:pe,bpmn:Ue,uml:dt},u=i(()=>l[r.type]),d=i(()=>{let e={width:r.width,height:r.height,readonly:r.readonly,showToolbar:r.showToolbar,theme:r.theme},t=r.data;if(r.type===`bpmn`&&r.data){let e=r.data;e&&typeof e==`object`&&`nodes`in e&&`edges`in e&&(t=[...(e.nodes||[]).map(e=>({...e,shape:e.type||e.shape||`rect`,x:e.x??0,y:e.y??0})),...(e.edges||[]).map(e=>({...e,shape:`edge`,x:0,y:0}))])}return{...e,data:t}}),f=e=>{o(`ready`,e)},m=e=>{let t;t=r.type===`bpmn`&&Array.isArray(e)?{nodes:e.filter(e=>e.shape!==`edge`).map(e=>{let{shape:t,x:n,y:r,...i}=e;return{...i,type:t===`rect`?`task`:t,x:n||0,y:r||0}}),edges:e.filter(e=>e.shape===`edge`).map(e=>{let{shape:t,x:n,y:r,...i}=e;return i}),flows:[]}:e,o(`data-change`,t)};return t({getGraph:()=>c.value?.getGraph?.(),getData:()=>{let e=c.value?.getData?.();return r.type===`bpmn`&&Array.isArray(e)?{nodes:e.filter(e=>e.shape!==`edge`),edges:e.filter(e=>e.shape===`edge`),flows:[]}:e}}),(e,t)=>(y(),s(`div`,ft,[(y(),a(S(u.value),p(d.value,{onReady:f,onDataChange:m,ref_key:`layoutRef`,ref:c}),null,16))]))}}),[[`__scopeId`,`data-v-b03826d0`]]);export{Y as i,he as n,$ as r,pt as t};
|
package/dist/C_AudioPlayer.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MODE_ICON_MAP, i as DEFAULT_AUDIO_PLAYER_PROPS, n as AudioPlayerProps, o as formatTime, r as AudioTrack, t as _default } from "./
|
|
1
|
+
import { a as MODE_ICON_MAP, i as DEFAULT_AUDIO_PLAYER_PROPS, n as AudioPlayerProps, o as formatTime, r as AudioTrack, t as _default } from "./index.vue.cjs";
|
|
2
2
|
export { type AudioPlayerProps, type AudioTrack, _default as C_AudioPlayer, DEFAULT_AUDIO_PLAYER_PROPS, MODE_ICON_MAP, formatTime };
|
package/dist/C_AudioPlayer.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MODE_ICON_MAP, i as DEFAULT_AUDIO_PLAYER_PROPS, n as AudioPlayerProps, o as formatTime, r as AudioTrack, t as _default } from "./
|
|
1
|
+
import { a as MODE_ICON_MAP, i as DEFAULT_AUDIO_PLAYER_PROPS, n as AudioPlayerProps, o as formatTime, r as AudioTrack, t as _default } from "./index.vue.js";
|
|
2
2
|
export { type AudioPlayerProps, type AudioTrack, _default as C_AudioPlayer, DEFAULT_AUDIO_PLAYER_PROPS, MODE_ICON_MAP, formatTime };
|
package/dist/C_AvatarGroup.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as STATUS_COLOR_MAP, i as DEFAULT_AVATAR_GROUP_PROPS, n as AvatarGroupProps, o as getInitials, r as AvatarItem, s as nameToColor, t as _default } from "./
|
|
1
|
+
import { a as STATUS_COLOR_MAP, i as DEFAULT_AVATAR_GROUP_PROPS, n as AvatarGroupProps, o as getInitials, r as AvatarItem, s as nameToColor, t as _default } from "./index2.vue.cjs";
|
|
2
2
|
export { STATUS_COLOR_MAP as AVATAR_STATUS_COLOR_MAP, type AvatarGroupProps, type AvatarItem, _default as C_AvatarGroup, DEFAULT_AVATAR_GROUP_PROPS, getInitials, nameToColor };
|
package/dist/C_AvatarGroup.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as STATUS_COLOR_MAP, i as DEFAULT_AVATAR_GROUP_PROPS, n as AvatarGroupProps, o as getInitials, r as AvatarItem, s as nameToColor, t as _default } from "./
|
|
1
|
+
import { a as STATUS_COLOR_MAP, i as DEFAULT_AVATAR_GROUP_PROPS, n as AvatarGroupProps, o as getInitials, r as AvatarItem, s as nameToColor, t as _default } from "./index2.vue.js";
|
|
2
2
|
export { STATUS_COLOR_MAP as AVATAR_STATUS_COLOR_MAP, type AvatarGroupProps, type AvatarItem, _default as C_AvatarGroup, DEFAULT_AVATAR_GROUP_PROPS, getInitials, nameToColor };
|
package/dist/C_Barcode.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./
|
|
1
|
+
import { t as _default } from "./index3.vue.cjs";
|
|
2
2
|
export { _default as C_Barcode };
|
package/dist/C_Barcode.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./
|
|
1
|
+
import { t as _default } from "./index3.vue.js";
|
|
2
2
|
export { _default as C_Barcode };
|
package/dist/C_Breadcrumb.d.cts
CHANGED
package/dist/C_Breadcrumb.d.ts
CHANGED
package/dist/C_Captcha.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./C_Captcha2.cjs`);exports.C_Captcha=e.t,exports.CaptchaVerificationError=e.n,exports.createCaptchaProof=e.r,exports.verifyCaptchaProof=e.i;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./C_Icon2.cjs`);const e=require(`./C_Captcha2.cjs`);exports.C_Captcha=e.t,exports.CaptchaVerificationError=e.n,exports.createCaptchaProof=e.r,exports.verifyCaptchaProof=e.i;
|
package/dist/C_Captcha.css
CHANGED
|
@@ -1,68 +1,192 @@
|
|
|
1
|
+
/* unplugin-vue-components disabled */.c-icon[data-v-d0d8dba0] {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
user-select: none;
|
|
6
|
+
transition: all 0.2s ease-in-out;
|
|
7
|
+
}
|
|
8
|
+
.c-icon--clickable[data-v-d0d8dba0] {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
}
|
|
11
|
+
.c-icon--clickable[data-v-d0d8dba0]:hover {
|
|
12
|
+
opacity: 0.8;
|
|
13
|
+
transform: scale(1.05);
|
|
14
|
+
}
|
|
15
|
+
.c-icon--clickable[data-v-d0d8dba0]:active {
|
|
16
|
+
transform: scale(0.95);
|
|
17
|
+
}
|
|
18
|
+
.c-icon--clickable[data-v-d0d8dba0]:focus-visible {
|
|
19
|
+
outline: 2px solid currentColor;
|
|
20
|
+
outline-offset: 2px;
|
|
21
|
+
border-radius: 4px;
|
|
22
|
+
}
|
|
23
|
+
.c-icon--loading[data-v-d0d8dba0] {
|
|
24
|
+
opacity: 0.6;
|
|
25
|
+
cursor: wait;
|
|
26
|
+
}
|
|
27
|
+
.c-icon--error[data-v-d0d8dba0] {
|
|
28
|
+
opacity: 0.5;
|
|
29
|
+
}
|
|
30
|
+
.c-icon__loading[data-v-d0d8dba0] {
|
|
31
|
+
position: relative;
|
|
32
|
+
}
|
|
33
|
+
.c-icon__spinner[data-v-d0d8dba0] {
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
border: 2px solid currentColor;
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
border-top-color: transparent;
|
|
39
|
+
animation: spin-d0d8dba0 1s linear infinite;
|
|
40
|
+
}
|
|
41
|
+
.c-icon__error[data-v-d0d8dba0] {
|
|
42
|
+
font-size: 0.8em;
|
|
43
|
+
opacity: 0.5;
|
|
44
|
+
}
|
|
45
|
+
.c-icon__rotatable[data-v-d0d8dba0] {
|
|
46
|
+
transition: transform 0.3s ease-in-out;
|
|
47
|
+
}
|
|
48
|
+
.c-icon__flippable[data-v-d0d8dba0] {
|
|
49
|
+
transition: transform 0.3s ease-in-out;
|
|
50
|
+
}
|
|
51
|
+
@keyframes spin-d0d8dba0 {
|
|
52
|
+
0% {
|
|
53
|
+
transform: rotate(0deg);
|
|
54
|
+
}
|
|
55
|
+
100% {
|
|
56
|
+
transform: rotate(360deg);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
1
60
|
.vue-puzzle-vcode{position:fixed;top:0;left:0;bottom:0;right:0;background-color:#0000004d;z-index:999;opacity:0;pointer-events:none;transition:opacity .2s}.vue-puzzle-vcode.inside_{position:relative;background-color:transparent;width:100%;height:100%}.vue-puzzle-vcode.inside_ .vue-auth-box_{position:relative;top:0;left:0;transform:translate(0);padding:0;background:transparent;box-shadow:none}.vue-puzzle-vcode.show_{opacity:1;pointer-events:auto}.vue-auth-box_{position:absolute;top:40%;left:50%;transform:translate(-50%,-50%);padding:20px;background:#fff;user-select:none;border-radius:3px;box-shadow:0 1px 3px #0000004d}.vue-auth-box_ .auth-body_{position:relative;overflow:hidden;border-radius:3px}.vue-auth-box_ .auth-body_ .loading-box_{position:absolute;top:0;left:0;bottom:0;right:0;background-color:#000c;z-index:20;opacity:1;transition:opacity .1s;display:flex;align-items:center;justify-content:center}.vue-auth-box_ .auth-body_ .loading-box_.hide_{opacity:0;pointer-events:none}.vue-auth-box_ .auth-body_ .loading-box_.hide_ .loading-gif_ span{animation-play-state:paused}.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_{flex:none;height:5px;line-height:0}@keyframes load{0%{opacity:1;transform:scale(1.3)}to{opacity:.2;transform:scale(.3)}}.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span{display:inline-block;width:5px;height:100%;margin-left:2px;border-radius:50%;background-color:#888;animation:load 1.04s ease infinite}.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(1){margin-left:0}.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(2){animation-delay:.13s}.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(3){animation-delay:.26s}.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(4){animation-delay:.39s}.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(5){animation-delay:.52s}.vue-auth-box_ .auth-body_ .info-box_{position:absolute;bottom:0;left:0;width:100%;height:24px;line-height:24px;text-align:center;overflow:hidden;font-size:13px;background-color:#83ce3f;opacity:0;transform:translateY(24px);transition:all .2s;color:#fff;z-index:10}.vue-auth-box_ .auth-body_ .info-box_.show{opacity:.95;transform:translateY(0)}.vue-auth-box_ .auth-body_ .info-box_.fail{background-color:#ce594b}.vue-auth-box_ .auth-body_ .auth-canvas1_{width:100%;height:100%}.vue-auth-box_ .auth-body_ .auth-canvas2_{position:absolute;top:0;left:0;width:60px;height:100%;z-index:2}.vue-auth-box_ .auth-body_ .auth-canvas3_{position:absolute;width:100%;height:100%;top:0;left:0;opacity:0;transition:opacity .6s;z-index:3}.vue-auth-box_ .auth-body_ .auth-canvas3_.show{opacity:1}.vue-auth-box_ .auth-body_ .flash_{position:absolute;top:0;left:0;width:30px;height:100%;background-color:#ffffff1a;z-index:3}.vue-auth-box_ .auth-body_ .flash_.show{transition:transform .6s}.vue-auth-box_ .auth-body_ .reset_{position:absolute;top:2px;right:2px;width:35px;height:auto;z-index:12;cursor:pointer;transition:transform .2s;transform:rotate(0)}.vue-auth-box_ .auth-body_ .reset_:hover{transform:rotate(-90deg)}.vue-auth-box_ .auth-control_ .range-box{position:relative;width:100%;background-color:#eef1f8;margin-top:20px;border-radius:3px;box-shadow:0 0 8px #f0f0f099 inset}.vue-auth-box_ .auth-control_ .range-box .range-text{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:14px;color:#b7bcd1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;width:100%}.vue-auth-box_ .auth-control_ .range-box .range-slider{position:absolute;height:100%;width:50px;background-color:#6aa0ffcc;border-radius:3px}.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn{position:absolute;display:flex;align-items:center;justify-content:center;right:0;width:50px;height:100%;background-color:#fff;border-radius:3px;box-shadow:0 0 4px #ccc;cursor:pointer}.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn>div{width:0;height:40%;transition:all .2s;border:solid 1px #6aa0ff}.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn>div:nth-child(2){margin:0 4px}.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover>div:first-child,.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown>div:first-child{border:solid 4px transparent;height:0;border-right-color:#6aa0ff}.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover>div:nth-child(2),.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown>div:nth-child(2){border-width:3px;height:0;border-radius:3px;margin:0 6px;border-right-color:#6aa0ff}.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover>div:nth-child(3),.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown>div:nth-child(3){border:solid 4px transparent;height:0;border-left-color:#6aa0ff}.vue-puzzle-overflow{overflow:hidden!important}
|
|
2
61
|
|
|
3
|
-
/* unplugin-vue-components disabled */.c-captcha-modern[data-v-
|
|
62
|
+
/* unplugin-vue-components disabled */.c-captcha-modern[data-v-fe4cd59a] {
|
|
63
|
+
--cc-height: 44px;
|
|
64
|
+
--cc-radius: 12px;
|
|
65
|
+
--cc-color: rgba(255, 255, 255, 0.76);
|
|
66
|
+
--cc-icon-color: #8fb5ff;
|
|
67
|
+
--cc-bg: rgba(255, 255, 255, 0.055);
|
|
68
|
+
--cc-bg-hover: rgba(255, 255, 255, 0.09);
|
|
69
|
+
--cc-border: rgba(255, 255, 255, 0.14);
|
|
70
|
+
--cc-border-hover: rgba(126, 166, 255, 0.55);
|
|
71
|
+
--cc-focus: #77a4ff;
|
|
4
72
|
width: 100%;
|
|
5
73
|
font-family: inherit;
|
|
6
74
|
}
|
|
7
|
-
.captcha-shell[data-v-
|
|
75
|
+
.captcha-shell[data-v-fe4cd59a] {
|
|
8
76
|
position: relative;
|
|
9
77
|
width: 100%;
|
|
10
|
-
max-width:
|
|
78
|
+
max-width: none;
|
|
11
79
|
margin: 0 auto;
|
|
12
80
|
}
|
|
13
|
-
.captcha-trigger[data-v-
|
|
81
|
+
.captcha-trigger[data-v-fe4cd59a] {
|
|
14
82
|
appearance: none;
|
|
15
|
-
border: 0;
|
|
16
|
-
background: transparent;
|
|
17
|
-
color: inherit;
|
|
18
|
-
font: inherit;
|
|
19
83
|
width: 100%;
|
|
20
|
-
|
|
84
|
+
min-height: var(--cc-height);
|
|
85
|
+
padding: 0 14px;
|
|
86
|
+
border: 1px solid var(--cc-border);
|
|
87
|
+
border-radius: var(--cc-radius);
|
|
88
|
+
background: var(--cc-bg);
|
|
89
|
+
color: var(--cc-color);
|
|
90
|
+
font: inherit;
|
|
21
91
|
cursor: pointer;
|
|
22
92
|
user-select: none;
|
|
23
93
|
display: flex;
|
|
24
94
|
align-items: center;
|
|
25
95
|
justify-content: center;
|
|
26
96
|
position: relative;
|
|
27
|
-
|
|
97
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
|
|
98
|
+
transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
|
|
99
|
+
}
|
|
100
|
+
.captcha-trigger[data-v-fe4cd59a]::after {
|
|
101
|
+
content: "";
|
|
102
|
+
width: 7px;
|
|
103
|
+
height: 7px;
|
|
104
|
+
margin-left: 12px;
|
|
105
|
+
border-top: 1.5px solid currentColor;
|
|
106
|
+
border-right: 1.5px solid currentColor;
|
|
107
|
+
opacity: 0.48;
|
|
108
|
+
transform: rotate(45deg);
|
|
109
|
+
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
28
110
|
}
|
|
29
|
-
.
|
|
111
|
+
.altcha-provider[data-v-fe4cd59a] {
|
|
112
|
+
width: 100%;
|
|
113
|
+
min-height: var(--cc-height);
|
|
114
|
+
}
|
|
115
|
+
.altcha-provider.is-disabled[data-v-fe4cd59a] {
|
|
116
|
+
opacity: 0.68;
|
|
117
|
+
pointer-events: none;
|
|
118
|
+
}
|
|
119
|
+
.altcha-widget[data-v-fe4cd59a] {
|
|
120
|
+
display: block;
|
|
121
|
+
width: 100%;
|
|
122
|
+
min-height: var(--cc-height);
|
|
123
|
+
--altcha-max-width: 100%;
|
|
124
|
+
--altcha-border-radius: var(--cc-radius);
|
|
125
|
+
--altcha-border-width: 1px;
|
|
126
|
+
--altcha-border-color: var(--cc-border);
|
|
127
|
+
--altcha-color-base: var(--cc-bg);
|
|
128
|
+
--altcha-color-base-content: var(--cc-color);
|
|
129
|
+
--altcha-color-primary: var(--cc-focus);
|
|
130
|
+
--altcha-color-success: #65d39a;
|
|
131
|
+
--altcha-checkbox-size: 20px;
|
|
132
|
+
--altcha-padding: 9px 12px;
|
|
133
|
+
}
|
|
134
|
+
.captcha-trigger[data-v-fe4cd59a]:hover:not(.disabled) {
|
|
30
135
|
transform: translateY(-1px);
|
|
136
|
+
border-color: var(--cc-border-hover);
|
|
137
|
+
background: var(--cc-bg-hover);
|
|
138
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 22px rgba(5, 12, 30, 0.18);
|
|
31
139
|
}
|
|
32
|
-
.captcha-trigger
|
|
33
|
-
opacity: 0.
|
|
140
|
+
.captcha-trigger[data-v-fe4cd59a]:hover:not(.disabled)::after {
|
|
141
|
+
opacity: 0.86;
|
|
142
|
+
transform: translateX(2px) rotate(45deg);
|
|
143
|
+
}
|
|
144
|
+
.captcha-trigger.disabled[data-v-fe4cd59a] {
|
|
145
|
+
opacity: 0.68;
|
|
34
146
|
cursor: not-allowed;
|
|
35
147
|
}
|
|
36
|
-
.captcha-trigger[data-v-
|
|
37
|
-
.refresh-button[data-v-
|
|
38
|
-
outline: 2px solid var(--
|
|
148
|
+
.captcha-trigger[data-v-fe4cd59a]:focus-visible,
|
|
149
|
+
.refresh-button[data-v-fe4cd59a]:focus-visible {
|
|
150
|
+
outline: 2px solid var(--cc-focus);
|
|
39
151
|
outline-offset: 2px;
|
|
40
152
|
}
|
|
41
|
-
.captcha-content[data-v-
|
|
153
|
+
.captcha-content[data-v-fe4cd59a] {
|
|
42
154
|
display: flex;
|
|
43
155
|
align-items: center;
|
|
44
|
-
justify-content:
|
|
156
|
+
justify-content: flex-start;
|
|
45
157
|
gap: 8px;
|
|
46
158
|
flex: 1;
|
|
47
159
|
}
|
|
48
|
-
.captcha-icon[data-v-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
height: 20px;
|
|
160
|
+
.captcha-icon[data-v-fe4cd59a] {
|
|
161
|
+
width: 22px;
|
|
162
|
+
height: 22px;
|
|
52
163
|
display: flex;
|
|
53
164
|
align-items: center;
|
|
54
165
|
justify-content: center;
|
|
55
166
|
flex-shrink: 0;
|
|
167
|
+
color: var(--cc-icon-color);
|
|
168
|
+
}
|
|
169
|
+
.captcha-state-icon[data-v-fe4cd59a] {
|
|
170
|
+
transition: color 0.2s ease, transform 0.2s ease;
|
|
171
|
+
}
|
|
172
|
+
.captcha-state-icon.is-spinning[data-v-fe4cd59a] {
|
|
173
|
+
animation: captcha-spin-fe4cd59a 0.8s linear infinite;
|
|
56
174
|
}
|
|
57
|
-
.captcha-
|
|
58
|
-
color:
|
|
59
|
-
|
|
175
|
+
.captcha-state-icon.is-success[data-v-fe4cd59a] {
|
|
176
|
+
color: #65d39a;
|
|
177
|
+
}
|
|
178
|
+
.captcha-state-icon.is-error[data-v-fe4cd59a] {
|
|
179
|
+
color: #ff7f8d;
|
|
180
|
+
}
|
|
181
|
+
.captcha-text[data-v-fe4cd59a] {
|
|
182
|
+
color: inherit;
|
|
183
|
+
font-size: 13px;
|
|
60
184
|
font-weight: 500;
|
|
61
|
-
letter-spacing: 0.
|
|
185
|
+
letter-spacing: 0.4px;
|
|
62
186
|
text-align: center;
|
|
63
187
|
white-space: nowrap;
|
|
64
188
|
}
|
|
65
|
-
.refresh-button[data-v-
|
|
189
|
+
.refresh-button[data-v-fe4cd59a] {
|
|
66
190
|
appearance: none;
|
|
67
191
|
border: 0;
|
|
68
192
|
background: transparent;
|
|
@@ -76,30 +200,51 @@
|
|
|
76
200
|
align-items: center;
|
|
77
201
|
justify-content: center;
|
|
78
202
|
cursor: pointer;
|
|
79
|
-
|
|
203
|
+
border-radius: 8px;
|
|
204
|
+
transition: color 0.2s ease, background-color 0.2s ease, transform 0.3s ease;
|
|
80
205
|
color: rgba(255, 255, 255, 0.6);
|
|
81
|
-
font-size: 14px;
|
|
82
206
|
flex-shrink: 0;
|
|
83
207
|
}
|
|
84
|
-
.c-captcha-modern[data-theme=light]
|
|
85
|
-
color: rgba(
|
|
208
|
+
.c-captcha-modern[data-theme=light][data-v-fe4cd59a] {
|
|
209
|
+
--cc-color: rgba(15, 23, 42, 0.72);
|
|
210
|
+
--cc-icon-color: #4778dc;
|
|
211
|
+
--cc-bg: rgba(15, 23, 42, 0.035);
|
|
212
|
+
--cc-bg-hover: rgba(71, 120, 220, 0.07);
|
|
213
|
+
--cc-border: rgba(15, 23, 42, 0.12);
|
|
214
|
+
--cc-border-hover: rgba(71, 120, 220, 0.42);
|
|
86
215
|
}
|
|
87
|
-
.c-captcha-modern[data-theme=light] .
|
|
216
|
+
.c-captcha-modern[data-theme=light] .captcha-text[data-v-fe4cd59a] {
|
|
217
|
+
color: inherit;
|
|
218
|
+
}
|
|
219
|
+
.c-captcha-modern[data-theme=light] .refresh-button[data-v-fe4cd59a] {
|
|
88
220
|
color: rgba(0, 0, 0, 0.52);
|
|
89
221
|
}
|
|
90
|
-
.refresh-button[data-v-
|
|
222
|
+
.refresh-button[data-v-fe4cd59a]:hover {
|
|
91
223
|
color: rgba(255, 255, 255, 0.9);
|
|
224
|
+
background: rgba(255, 255, 255, 0.08);
|
|
92
225
|
transform: translateY(-50%) rotate(180deg);
|
|
93
226
|
}
|
|
94
|
-
.
|
|
95
|
-
.
|
|
96
|
-
color:
|
|
227
|
+
.captcha-trigger.verified[data-v-fe4cd59a] {
|
|
228
|
+
color: rgba(183, 246, 211, 0.92);
|
|
229
|
+
border-color: rgba(101, 211, 154, 0.4);
|
|
230
|
+
background: rgba(66, 188, 124, 0.1);
|
|
231
|
+
}
|
|
232
|
+
.captcha-trigger.verified[data-v-fe4cd59a]::after,
|
|
233
|
+
.captcha-trigger.error[data-v-fe4cd59a]::after {
|
|
234
|
+
opacity: 0;
|
|
97
235
|
}
|
|
98
|
-
.error
|
|
99
|
-
.
|
|
100
|
-
color:
|
|
236
|
+
.captcha-trigger.error[data-v-fe4cd59a] {
|
|
237
|
+
color: rgba(255, 205, 211, 0.92);
|
|
238
|
+
border-color: rgba(255, 127, 141, 0.42);
|
|
239
|
+
background: rgba(245, 108, 108, 0.1);
|
|
240
|
+
animation: captcha-shake-fe4cd59a 0.3s ease;
|
|
101
241
|
}
|
|
102
|
-
@keyframes
|
|
242
|
+
@keyframes captcha-spin-fe4cd59a {
|
|
243
|
+
to {
|
|
244
|
+
transform: rotate(360deg);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
@keyframes captcha-shake-fe4cd59a {
|
|
103
248
|
0%, 100% {
|
|
104
249
|
transform: translateX(0);
|
|
105
250
|
}
|
|
@@ -111,21 +256,18 @@
|
|
|
111
256
|
}
|
|
112
257
|
}
|
|
113
258
|
@media (max-width: 768px) {
|
|
114
|
-
.captcha-trigger[data-v-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
.captcha-shell[data-v-29edd4c3] {
|
|
118
|
-
max-width: 240px;
|
|
259
|
+
.captcha-trigger[data-v-fe4cd59a] {
|
|
260
|
+
min-height: 42px;
|
|
261
|
+
padding: 0 13px;
|
|
119
262
|
}
|
|
120
|
-
.captcha-icon[data-v-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
height: 18px;
|
|
263
|
+
.captcha-icon[data-v-fe4cd59a] {
|
|
264
|
+
width: 20px;
|
|
265
|
+
height: 20px;
|
|
124
266
|
}
|
|
125
|
-
.captcha-text[data-v-
|
|
267
|
+
.captcha-text[data-v-fe4cd59a] {
|
|
126
268
|
font-size: 13px;
|
|
127
269
|
}
|
|
128
|
-
.refresh-button[data-v-
|
|
270
|
+
.refresh-button[data-v-fe4cd59a] {
|
|
129
271
|
width: 24px;
|
|
130
272
|
height: 24px;
|
|
131
273
|
font-size: 12px;
|
package/dist/C_Captcha.d.cts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
|
|
3
|
-
export { _default as C_Captcha, type CaptchaEmits, type CaptchaInstance, type CaptchaProof, type CaptchaProps, type CaptchaSuccessPayload, CaptchaVerificationError, type CaptchaVerificationRequest, type CaptchaVerificationResult, type CaptchaVerifier, createCaptchaProof, verifyCaptchaProof };
|
|
1
|
+
import { a as CaptchaEmits, c as CaptchaProps, d as CaptchaVerificationRequest, f as CaptchaVerificationResult, i as _default, l as CaptchaProvider, n as createCaptchaProof, o as CaptchaInstance, p as CaptchaVerifier, r as verifyCaptchaProof, s as CaptchaProof, t as CaptchaVerificationError, u as CaptchaSuccessPayload } from "./verification.cjs";
|
|
2
|
+
export { _default as C_Captcha, type CaptchaEmits, type CaptchaInstance, type CaptchaProof, type CaptchaProps, type CaptchaProvider, type CaptchaSuccessPayload, CaptchaVerificationError, type CaptchaVerificationRequest, type CaptchaVerificationResult, type CaptchaVerifier, createCaptchaProof, verifyCaptchaProof };
|
package/dist/C_Captcha.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
|
|
3
|
-
export { _default as C_Captcha, type CaptchaEmits, type CaptchaInstance, type CaptchaProof, type CaptchaProps, type CaptchaSuccessPayload, CaptchaVerificationError, type CaptchaVerificationRequest, type CaptchaVerificationResult, type CaptchaVerifier, createCaptchaProof, verifyCaptchaProof };
|
|
1
|
+
import { a as CaptchaEmits, c as CaptchaProps, d as CaptchaVerificationRequest, f as CaptchaVerificationResult, i as _default, l as CaptchaProvider, n as createCaptchaProof, o as CaptchaInstance, p as CaptchaVerifier, r as verifyCaptchaProof, s as CaptchaProof, t as CaptchaVerificationError, u as CaptchaSuccessPayload } from "./verification.js";
|
|
2
|
+
export { _default as C_Captcha, type CaptchaEmits, type CaptchaInstance, type CaptchaProof, type CaptchaProps, type CaptchaProvider, type CaptchaSuccessPayload, CaptchaVerificationError, type CaptchaVerificationRequest, type CaptchaVerificationResult, type CaptchaVerifier, createCaptchaProof, verifyCaptchaProof };
|
package/dist/C_Captcha.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,t as r}from"./C_Captcha2.js";export{r as C_Captcha,t as CaptchaVerificationError,n as createCaptchaProof,e as verifyCaptchaProof};
|
|
1
|
+
import"./C_Icon2.js";import{i as e,n as t,r as n,t as r}from"./C_Captcha2.js";export{r as C_Captcha,t as CaptchaVerificationError,n as createCaptchaProof,e as verifyCaptchaProof};
|