@gct-paas/core-web 0.1.5-dev.7 → 0.1.5-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.css +1 -1
- package/dist/loader.esm.min.js +1 -1
- package/es/components/I18nSelect/src/i18n-select-btn.vue.mjs +2 -2
- package/es/components/I18nSelect/src/i18n-select-btn.vue_vue_type_script_setup_true_name_i18n-select-btn_lang.mjs +2 -2
- package/es/components/I18nSelect/src/{i18n-select-btn.vue_vue_type_style_index_0_scoped_8e75ca4b_lang.css → i18n-select-btn.vue_vue_type_style_index_0_scoped_b86f4068_lang.css} +16 -15
- package/es/components/I18nSelect/src/i18n-select-container.vue.d.ts +5 -1
- package/es/components/I18nSelect/src/i18n-select-container.vue.mjs +2 -2
- package/es/components/I18nSelect/src/i18n-select-container.vue_vue_type_script_setup_true_name_i18n-select-container_lang.mjs +1 -0
- package/es/components/I18nSelect/src/i18n-select-container.vue_vue_type_style_index_0_scoped_53df3982_lang.css +6 -0
- package/es/components/I18nSelect/src/i18n-select-input.vue.mjs +2 -2
- package/es/components/I18nSelect/src/i18n-select-input.vue_vue_type_script_setup_true_name_i18n-select-input_lang.mjs +2 -2
- package/es/components/I18nSelect/src/i18n-select-input.vue_vue_type_style_index_0_scoped_406c02b4_lang.css +3 -0
- package/es/components/copy-module-key/copy-module-key.vue.mjs +2 -2
- package/es/components/copy-module-key/copy-module-key.vue_vue_type_script_setup_true_name_copy-module-key_lang.mjs +1 -0
- package/es/components/copy-module-key/{copy-module-key.vue_vue_type_style_index_0_scoped_531b3cd2_lang.css → copy-module-key.vue_vue_type_style_index_0_scoped_66e22862_lang.css} +4 -4
- package/es/components/index.mjs +2 -1
- package/es/modules/gct-form/editor/gct-form-text/gct-form-text.d.ts +1 -5
- package/es/modules/gct-form/editor/gct-form-text/gct-form-text.mjs +18 -23
- package/es/modules/gct-form/widgets/gct-form/gct-form-group/gct-form-group.d.ts +1 -6
- package/es/modules/gct-form/widgets/gct-form/gct-form-group/gct-form-group.mjs +31 -38
- package/es/modules/gct-form/widgets/gct-form/gct-form.mjs +1 -1
- package/es/modules/gct-table/editor/gct-table-date/gct-table-date.mjs +1 -1
- package/es/modules/gct-table/editor/gct-table-text/gct-table-text.mjs +1 -1
- package/package.json +9 -9
- package/es/components/I18nSelect/src/i18n-select-container.vue_vue_type_style_index_0_scoped_5f75bfb2_lang.css +0 -6
- package/es/components/I18nSelect/src/i18n-select-input.vue_vue_type_style_index_0_scoped_b4baf3ec_lang.css +0 -3
- /package/es/modules/gct-table/editor/{gct-table-text/gct-table-text.css → gct-table-date/gct-table-date.css} +0 -0
package/dist/loader.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./chunk-lEgNpoW5.js";import{C as t,D as l,E as a,O as n,S as o,T as i,_ as s,a as r,b as u,c,d,f as p,g as m,h as v,i as h,l as f,m as g,n as y,o as b,p as x,r as w,s as k,t as C,u as _,v as S,w as E,x as O,y as I}from"./_plugin-vue_export-helper-BBfAJeJ1.js";import{t as T}from"./overlayscrollbars-vue-B2LfyB-V.js";import{BpmnNodeTypeEnum as F,ButtonSize as L,ButtonStyle as D,ButtonTypeEnum as B,EditorRegisterConst as M,ExpressionModeEnum as j,FIELD_TYPE as A,FieldIconMap as R,FormContainerType as N,MaterialEnum as P,OverlayContainer as U,PatternEnum as z,ProcessStatusEnum as $,ResetConditionEnum as V,SizeEnum as H,TypeEnum as K,Uploader as G,VITE_MINIO_PATH as q,buildShortUUID as Y,ch_ProcessStatusMap as W,cssLoader as J,dataURLtoBlob as X,deepMerge as Q,deleteAndInsertArr as Z,downloadByUrl as ee,fileUrlParser as te,modelLoader as le,presetColor as ae,t as ne,transformUrl as oe,useCopyToClipboard as ie,useModal as se,useNamespace as re,uuid2 as ue}from"@gct-paas/core";import{Fragment as ce,computed as de,createApp as pe,createBlock as me,createCommentVNode as ve,createElementBlock as he,createElementVNode as fe,createSlots as ge,createTextVNode as ye,createVNode as be,defineAsyncComponent as xe,defineComponent as we,getCurrentInstance as ke,h as Ce,inject as _e,isRef as Se,isVNode as Ee,mergeProps as Oe,nextTick as Ie,normalizeClass as Te,normalizeStyle as Fe,onBeforeUnmount as Le,onMounted as De,onUnmounted as Be,openBlock as Me,provide as je,reactive as Ae,ref as Re,render as Ne,renderList as Pe,renderSlot as Ue,resolveComponent as ze,resolveDirective as $e,resolveDynamicComponent as Ve,shallowRef as He,toDisplayString as Ke,toRaw as Ge,toRef as qe,toRefs as Ye,unref as We,useAttrs as Je,useCssVars as Xe,vShow as Qe,watch as Ze,watchEffect as et,withCtx as tt,withDirectives as lt,withModifiers as at}from"vue";import{clone as nt,cloneDeep as ot,debounce as it,defaults as st,groupBy as rt,has as ut,isArray as ct,isBoolean as dt,isEmpty as pt,isEqual as mt,isFunction as vt,isNil as ht,isString as ft,omit as gt}from"lodash-es";import yt,{Button as bt,Checkbox as xt,CheckboxGroup as wt,Collapse as kt,Empty as Ct,Form as _t,Image as St,Input as Et,Modal as Ot,Radio as It,RadioButton as Tt,RadioGroup as Ft,Space as Lt,Spin as Dt,Tooltip as Bt,Tree as Mt,Upload as jt,message as At}from"ant-design-vue";import Rt from"dayjs";import{bus as Nt,destroyApp as Pt,preloadApp as Ut,setupApp as zt,startApp as $t}from"wujie";import{SvgIcon as Vt,WuJieContainer as Ht,coreComponentsCreateAppVue as Kt}from"@gct-paas/core-components";import Gt from"vuedraggable";import*as qt from"@ant-design/icons-vue";import{CloseOutlined as Yt,DeleteOutlined as Wt,EditOutlined as Jt,EyeOutlined as Xt,FullscreenExitOutlined as Qt,FullscreenOutlined as Zt,LeftOutlined as el,ReloadOutlined as tl,RightOutlined as ll,SearchOutlined as al}from"@ant-design/icons-vue";import{BigNumber as nl}from"bignumber.js";import{FlowNodeInstStatus as ol,FlowNodeInstStatusColor as il,PaasBpmnDiagram as sl,useGctFlow as rl,useGctPaasBpmn as ul}from"@gct-paas/flow";import cl from"sortablejs";var dl=/* @__PURE__ */function(e){return e.PREFIX="EDITOR___",e}({}),pl=/* @__PURE__ */function(e){return e.LENGTH_UNIT="length-unit",e.COLOR="color",e.SPAN="span",e.TEXT="text",e.NUMBER="number",e.INFO="info",e.MSG="msg",e.SELECT="select",e.SELECT_GROUP="select-group",e.RADIO="radio",e.PICKER="picker",e.MULTIPLE_CHOICE="multiple-choice",e.I18N="i18n",e.TEXTAREA="textarea",e.DATE_RANGE="date-range",e.SWITCH="switch",e.CHECK_SWITCH="check-switch",e.ICON_SELECT="icon-select",e.CHECKBOX="checkbox",e.DATE="date",e.MODEL_SELECT="model-select",e.ACTION="action",e.TABLE="table",e.SELECT_TABLE="select-table",e.EMPTY="empty",e.FORM_MODEL_FIELD_SELECT="form-model-field-select",e.PIXEL_CONFIG="pixel-config",e.FIELD_INFO="field-info",e.DATE_FORMAT_SELECT="date-format-select",e.FORMULA="formula",e}({}),ml="formController",vl=class{constructor(){n(this,"loaded",!1),n(this,"count",0),n(this,"isNew",!0),n(this,"loading",!1),n(this,"destroyed",!1),n(this,"data",{})}},hl=class{constructor(){n(this,"disabled",!1),n(this,"readonly",!1),n(this,"visible",!0),n(this,"keepalive",!1),n(this,"destroyed",!1)}},fl=class extends hl{},gl=class extends hl{},yl=class extends hl{constructor(...e){super(...e),n(this,"activePane","")}},bl=class extends hl{},xl=class extends hl{constructor(...e){super(...e),n(this,"label",""),n(this,"value",null),n(this,"options",[])}},wl=class extends hl{constructor(...e){super(...e),n(this,"expand",!0)}},kl=class extends xl{},Cl=class extends hl{},_l=class{constructor(){this.map=/* @__PURE__ */new Map,this.maxListeners=100}setMaxListeners(e){this.maxListeners=e}getSize(e){return this.map.has(e)?this.map.get(e).length:0}addListener(e,t){if(t instanceof Function){this.map.has(e)||this.map.set(e,[]);const l=this.map.get(e);if(!(l.length<this.maxListeners))throw new Error(`事件监听已达最大上限[${this.maxListeners}],无法新增监听!`);l.push(t)}}removeListener(e,t){if(this.map.has(e)){const l=this.map.get(e);if(l.length>0)for(let e=0;e<l.length;e++)if(l[e]===t){l.splice(e,1);break}}}emit(e,...t){this.map.has(e)&&this.map.get(e).forEach(e=>{e(...t)})}async asyncEmit(e,...t){if(this.map.has(e)){const l=this.map.get(e).map(e=>e(...t));return Promise.all(l)}return[]}reset(){this.map.forEach(e=>{!function(e){if(e instanceof Array)e&&e.length>0&&e.splice(0,e.length);else if(e instanceof Object&&e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&delete e[t]}(e)}),this.map.clear()}},Sl=class{constructor(e){this.e=new _l,this.e.setMaxListeners(e||300)}getSize(e){return this.e.getSize(e)}on(e,t){this.e.addListener(e,t)}off(e,t){this.e.removeListener(e,t)}emit(e,...t){this.e.emit(e,...t)}asyncEmit(e,...t){return this.e.asyncEmit(e,...t)}reset(){this.e.reset()}},{toString:El}=Object.prototype;function Ol(e){return"[object AsyncFunction]"===El.call(e)}function Il(e){return"[object Promise]"===El.call(e)}function Tl(e,t,l,a){return{install(n){e&&t&&_gct.register.editor.register(dl.PREFIX+e,t),l&&n.component(a??l.name,l)}}}function Fl(e,t){const l=e.split(".");try{return l.reduce((e,t)=>e[t],t)}catch(a){console.warn(a)}}function Ll(e,t,l){const a=t.split("."),n=a.length-1;a.reduce((t,l,a)=>(a===n?t[l]=e:t[l]||(t[l]={}),t[l]),l)}var Dl=class{constructor(e){n(this,"evt",new Sl),n(this,"state",Ae(new vl)),n(this,"item",{}),n(this,"provider",{}),n(this,"context",{}),n(this,"params",{}),n(this,"fields",[]),n(this,"modelMap",{}),this.model=e,this.init()}init(){this.model.children&&this.initFormItems(this.model.children),this.initEvent(),this.calcState()}initEvent(){}calcState(){}initFormItems(e){e.forEach(e=>{let t=null;if("item"!==e.type&&"hidden"!==e.type||(this.fields.push(e.name),this.modelMap[e.name]=e),"item"===e.type&&(t=_gct.register.formItem.create(`${e.type}___${e.editor.type}___${e.name}`),t||(t=_gct.register.formItem.create(`${e.type}___${e.editor.type}`))),t||(t=_gct.register.formItem.create(e.type)),t){if(this.provider[e.name]=t,"item"===e.type){const l=e;this.item[l.name]=t.createController(this,l)}else if("hidden"===e.type){const l=e;this.item[l.name]=t.createController(this,l)}else if("container"===e.type||e.isContainer||e.container){const l=e;this.item[e.name]=t.createController(this,l),l.children&&this.initFormItems(l.children)}}else console.error(`未找到表单项提供者:${e.type}`,e)})}calcHidden(){Object.keys(this.item).forEach(e=>{const t=this.item[e];if(t.model.hidden){const e=t.model.hidden(this,t,this.state.data);null!=e&&(t.state.visible=!e)}})}getData(){const e={};return this.fields.forEach(t=>{const l=this.item[t];!l||!0!==l.state.visible&&"hidden"!==l.model.type&&-1===t.indexOf(".")||Ll(l.value,l.key,e)}),e}resetData(){this.fields.forEach(e=>{const t=this.item[e];t&&t.reset()})}async load(){try{if(!this.model.loadRequest)return{};this.state.loading=!0;const e=await this.model.loadRequest({id:this.context.id});return this.fields.forEach(t=>{const l=this.item[t];l&&(l.value=e[l.key]),l.defaultValue()}),this.state.loaded=!0,e}finally{this.state.loading=!1}}destroy(){this.state.destroyed=!0,this.evt.reset(),this.fields.forEach(e=>{const t=this.item[e];t&&t.destroy()})}validate(){return Promise.resolve(!0)}validateItem(e){return Promise.resolve(!0)}loaded(){this.calcHidden(),this.fields.forEach(e=>{const t=this.item[e];t?t.defaultValue():console.warn(`表单项控制器未找到:${e}`)}),this.calcState()}mounted(){}},Bl=class extends Dl{initEvent(){super.initEvent(),this.evt.on("change",(e,t,l)=>{if(this.model.watch){const a=this.model.watch[e];a&&a(this,t,l)}const a=this.item[e];a&&a.model.watch&&a.model.watch(this,a,t,l),a&&a.model.change&&a.model.change(this,a,this.state.data),t!=l&&this.calcHidden()})}save(){const e=this.getData();return!0===this.state.isNew&&this.model.newRequest?this.model.newRequest(e):this.model.updateRequest?this.model.updateRequest({id:this.context.id},e):Promise.resolve(e)}};function Ml(e){const t=e();return t.state=Ae(t.state),Be(()=>t.destroy()),t}var jl=class{constructor(e){n(this,"model",void 0),n(this,"options",[]),this.model=e}},Al=class{get key(){return this.model.name}get data(){return this.form.state.data}constructor(e,t){n(this,"state",this.crateItemState()),this.form=e,this.model=t,this.init()}init(){}destroy(){this.state.destroyed=!0}defaultValue(){const e=this.form.state.data;null==Fl(this.key,e)&&null!=this.model.defaultValue&&Ll(this.model.defaultValue,this.key,e)}crateItemState(){return new hl}};function Rl(e){const t=e();return t.state=Ae(t.state),t}var Nl=class extends Al{constructor(...e){super(...e),n(this,"type","collapse-pane")}crateItemState(){return new fl}},Pl=class extends Al{constructor(...e){super(...e),n(this,"type","collapse")}crateItemState(){return new gl}},Ul=class extends Al{constructor(...e){super(...e),n(this,"type","tab")}crateItemState(){return new yl}},zl=class extends Al{constructor(...e){super(...e),n(this,"type","tab-pane")}crateItemState(){return new bl}},$l=class extends Al{constructor(...e){super(...e),n(this,"type","group")}crateItemState(){return new wl}},Vl=class extends Al{get key(){return this.model.field??this.model.name}get value(){return Fl(this.key,this.form.state.data)}set value(e){const t=this.form.state.data,l=ot(Fl(this.key,t));Ll(e,this.key,t),this.form.evt.emit("change",this.key,e,l),this.state.value=e}get editorValue(){return this.model.fields?this.model.fields.map(e=>this.form.item[e].value):this.value}set editorValue(e){this.model.fields?this.model.fields.forEach((t,l)=>{this.form.item[t].value=null==e?void 0:e[l]}):this.value=e}init(){if(super.init(),"hidden"!==this.model.type){const{editor:e}=this.model;this.state.readonly=e.readonly,null!=e.disabled&&(this.state.disabled=e.disabled)}if(this.model.dictionary){const{mode:e}=this.model.dictionary;"static"===e&&(this.state.options=this.model.dictionary.items||[])}}blur(){null!=this.state.value&&""!==this.state.value||null==this.model.defaultValue||(this.value=this.model.defaultValue,this.form.evt.emit("blur",this.key,this.value))}reset(){void 0!==this.model.defaultValue?this.value=this.model.defaultValue:this.value=void 0}crateItemState(){return new xl}},Hl=class extends Vl{constructor(...e){super(...e),n(this,"type","item")}async loadDictionary(e,t){if(this.state.options.length>0&&!0!==t)return this.state.options;this.state.options=[],this.state.loading=!0;try{return this.model.dictionary?this.state.options=await _gct.dictionary.asyncGetByConfig(this.model.dictionary,e):this.model.dictionaryTag&&(this.state.options=await _gct.dictionary.asyncGet(this.model.dictionaryTag,e)),this.state.options}finally{this.state.loading=!1}}clearDictionary(){this.state.options=[]}crateItemState(){return new kl}},Kl=class extends Al{constructor(...e){super(...e),n(this,"type","hidden")}},Gl=class extends Al{constructor(...e){super(...e),n(this,"type","line")}crateItemState(){return new Cl}};function ql(){return _e("formController")}function Yl(e){let t=null;if(e){const l=ql().item[e];l&&(t=de({get:()=>l.value,set(e){"string"==typeof e&&(e=e.trim()),"object"!=typeof e&&l.value==e||(l.value=e)}}))}else{let e=ke().proxy;const l=e.$props,a=e.$emit;t=de({get:()=>l.value,set:e=>{"string"==typeof e&&(e=e.trim()),"object"!=typeof e&&l.value==e||a("update:value",e)}}),e=null}return t}function Wl(e,t){let l=ke().proxy;const a=l.$props,n=l.$emit,o=e?e.length:0,i=t?t.length:0;return l=null,de({get:()=>{if(!a.value)return"";let l=a.value;return o>0&&l.startsWith(e)&&(l=l.substring(o)),i>0&&l.endsWith(t)&&(l=l.substring(0,l.length-i)),l},set:l=>{if(a.value===l)return;if(""==l)return void n("update:value","");let s=l;o>0&&(s=e+s),i>0&&(s+=t),n("update:value",s)}})}function Jl(){return{context:{type:Object,default:()=>({})},value:{type:Object},model:{type:Object,required:!0},c:{type:Object,required:!0},itemModel:{type:Object},data:{type:Object},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},keepalive:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},size:{type:String},count:{type:Number,default:0},isEmptyText:{type:Boolean,default:!1}}}var Xl=class{constructor(){n(this,"editors",/* @__PURE__ */new Map),n(this,"providers",/* @__PURE__ */new Map)}register(e,t){this.editors.set(e,t)}unregister(e){this.editors.delete(e)}get(e){if(this.providers.has(e))return this.providers.get(e);const t=this.editors.get(e);if(t){const l=t();return this.providers.set(e,l),l}return null}},Ql=class{constructor(){n(this,"items",/* @__PURE__ */new Map)}register(e,t){this.items.set(e,t)}unregister(e){this.items.delete(e)}create(e){const t=this.items.get(e);return t?t():null}},Zl=/* @__PURE__ */we({name:"GctFormItem",props:{c:{type:Object,required:!0},formModel:{type:Object,required:!0},model:{type:Object,required:!0},count:{type:Number,default:0},context:{type:Object,default:()=>({})}},setup(e){const t=re("form-item"),l={};e.formModel.labelWidth&&(l[t.cssVarName("form-item-label-width")]=e.formModel.labelWidth),e.model.labelWidth&&(l[t.cssVarName("form-item-label-width")]=e.model.labelWidth),e.model.labelAlign&&(l[t.cssVarName("form-item-label-align")]=e.model.labelAlign),e.model.editorAlign&&(l[t.cssVarName("form-item-editor-align")]=e.model.editorAlign),e.model.width&&(l[t.cssVarName("form-item-width")]=e.model.width),e.model.margin&&(l.margin=e.model.margin),e.model.padding&&(l.padding=e.model.padding);const a=de(()=>{var t;return!!(null===(t=e.model.rules)||void 0===t?void 0:t.find(e=>e.required))});return{ns:t,style:l,required:a,renderLabelTooltip:()=>e.model.labelTooltip?be(ze("a-tooltip"),{class:t.e("label-tooltip"),overlayClassName:t.e("label-tooltip-overlay"),overlayStyle:{width:e.model.labelTipWidth},placement:"top",title:e.model.labelTooltip},{default:()=>[be("span",{class:"iconfont icon-assist ml5px text-[#bfbfbf]"},null)]}):null}},render(){const e=_gct.register.editor.get(M.PREFIX+this.model.editor.type);if(!e)return console.error(`未找到表单项${this.model.name}的编辑器${this.model.editor.type}的适配器实例:`,this.model),null;const t=this.model.labelPosition||"left";let l=null;e?e.render?l=e.render(this.c.editorValue,this.c.data,this.model):e.component?l=Ce("string"==typeof e.component?ze(e.component):e.component,{key:this.model.name,c:this.c,value:this.c.editorValue,itemModel:this.model,model:this.model.editor,data:this.c.data,disabled:this.c.state.disabled,readonly:this.c.state.readonly,keepalive:this.c.state.keepalive,visible:this.c.state.visible,size:this.formModel.size,count:this.count,isEmptyText:this.formModel.isEmptyText,context:this.context,class:[this.ns.e("editor"),this.ns.e(t),this.formModel.size?this.ns.m(this.formModel.size):null,this.model.editor.class],style:this.model.editor.style,"onUpdate:value":e=>{this.c.editorValue=e},onBlur:()=>{this.c.blur()}}):console.error(`未找到编辑器绘制组件:${this.model.name} - ${this.model.editor.type},请实现 component 或 render 方法`):console.error(`未找到编辑器适配器:${this.model.name} - ${this.model.editor.type}`),this.model.label&&"top"===t&&(l=[be("div",{class:[this.ns.e("label"),this.ns.em("label",t)]},[this.model.label,this.renderLabelTooltip()]),l]);const a={default:()=>l};var n;return"left"===t&&this.model.label&&(a.label=()=>[be("span",null,[this.model.label]),this.renderLabelTooltip()]),!1!==this.c.state.visible?be(ze("a-form-item"),{key:this.c.model.name,count:this.count,colon:!0!==this.formModel.noColon&&!0!==this.model.noColon,name:this.model.name.split("."),label:void 0,class:[this.ns.b(),this.ns.is("readonly",!0===this.model.editor.readonly),this.ns.is("required",this.required),this.ns.is("hidden-label",!this.model.label),this.ns.m("label-"+t),this.ns.is("hidden-error",!0===this.model.hiddenError||!0===this.formModel.hiddenError)],style:this.style,rules:!0===this.c.state.visible?this.model.rules:[],layout:"horizontal"},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!Ee(n)?a:{default:()=>[a]}):void 0}}),ea=/* @__PURE__ */we({name:"GctForm",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e){const t=re("form");je(ml,e.c);const l=Re(),a=e.c;Object.keys(a.item).forEach(e=>{const t=a.item[e];t.state=Ae(t.state)});const n=t=>be(ze("gct-form-item"),{class:t.class,style:t.style,count:a.state.count,c:a.item[t.name],formModel:e.model,model:t,context:e.context},null),o=t=>{const l=a.provider[t.name];return l?l?Ce("string"==typeof l.component?ze(l.component):l.component,{key:t.name,model:t,count:a.state.count,c:a.item[t.name],data:a.state.data,class:t.class,style:t.style,context:e.context},i(t.children||[])):void console.error(`未找到表单容器适配器:${t.name} - ${t.type}`):(console.error(`未找到表单项适配器实例:${t.name}`,t),null)},i=e=>{if(!e)return[];const t=[];return e.forEach(e=>{if("hidden"===e.type)return null;let l=null;const a=e;l="container"===a.type||a.isContainer||a.container?o(a):n(e),l&&t.push(l)}),t},s={};return e.model.labelWidth&&(s[t.cssVarName("form-item-label-width")]=e.model.labelWidth),{ns:t,formRef:l,staticStyle:s,renderItem:n,renderContainer:o,renderChildren:i}},render(){let e;return be(ze("a-form"),{ref:"formRef",layout:this.model.layout,model:this.c.state.data,count:this.c.state.count,class:[this.ns.b(),this.ns.is("info",!0===this.model.info),this.model.size?this.ns.m(this.model.size):null],autocomplete:"off",style:this.staticStyle},"function"==typeof(t=e=this.model.children.map(e=>this.renderContainer(e)))||"[object Object]"===Object.prototype.toString.call(t)&&!Ee(t)?e:{default:()=>[e]});var t}}),ta=class{constructor(){n(this,"component","gct-form-item")}createController(e,t){return Rl(()=>new Hl(e,t))}},la=class{constructor(){n(this,"component","gct-form-hidden-item")}createController(e,t){return Rl(()=>new Kl(e,t))}},aa=class{constructor(){n(this,"component","gct-form-collapse-pane")}createController(e,t){return Rl(()=>new Nl(e,t))}};function na(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var oa=/* @__PURE__ */we({name:"GctFormCollapsePane",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e){const t=re("form-collapse-pane"),l={};return e.model.width&&(l[t.cssVarName("form-collapse-pane-width")]=e.model.width),e.model.height&&(l[t.cssVarName("form-collapse-pane-height")]=e.model.height),{ns:t,style:l,renderContainer:function(t){return"flex"===e.model.layout?be(ze("flex-container"),{layout:e.model.flex},na(t)?t:{default:()=>[t]}):"grid"===e.model.layout?be(ze("grid-container"),{layout:e.model.grid},na(t)?t:{default:()=>[t]}):void console.error("不支持的layout类型"+e.model.layout)}}},render(){var e,t;if(!0!==this.c.state.keepalive&&!1===this.c.state.visible)return null;const l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[],a=l[l.length-1];return a&&(a.props=Oe(a.props||{},{class:this.ns.e("last-child")})),be("div",{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible)],style:this.style},[this.renderContainer(l)])}}),ia=class{constructor(e,t,l,a){n(this,"type","collapse-pane"),n(this,"isContainer",!0),n(this,"title",void 0),n(this,"layout","grid"),n(this,"children",[]),n(this,"name",void 0),n(this,"collapsible",void 0),this.name=e,this.title=t,l&&Object.assign(this,l),a&&(this.children=a)}},sa={install(e){_gct.register.formItem.register("collapse-pane",()=>new aa),e.component(oa.name,oa)}},ra=class{constructor(){n(this,"component","gct-form-collapse")}createController(e,t){return Rl(()=>new Pl(e,t))}},ua=/* @__PURE__ */we({name:"GctFormCollapse",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e){var t;const l=re("form-collapse"),a=Re([0]),n={};e.model.width&&(n[l.cssVarName("form-collapse-width")]=e.model.width),e.model.height&&(n[l.cssVarName("form-collapse-height")]=e.model.height);const o=Re([]);return o.value=(null===(t=e.model.children)||void 0===t?void 0:t.map(e=>e.name))||[],{ns:l,keys:a,style:n,activeKeys:o,expandIconPosition:de(()=>"left"===e.model.expandIconPosition?"left":"right")}},render(){var e,t;if(!0!==this.c.state.keepalive&&!1===this.c.state.visible)return null;const l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[];return be(kt,{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible),this.ns.m("icon-"+(this.model.expandIconStyle||"up-down"))],style:this.style,accordion:this.model.accordion,expandIconPosition:this.expandIconPosition,activeKey:this.activeKeys,"onUpdate:activeKey":e=>this.activeKeys=e},{default:()=>{var e;return[null===(e=this.model.children)||void 0===e?void 0:e.map((e,t)=>{if(!1===l[t].props.c.state.visible)return;const a=!1!==e.collapsible?void 0:"disabled";return be(kt.Panel,{key:e.name,header:e.title,collapsible:a},{default:()=>[l[t]]})})]}})}}),ca=class{constructor(e,t,l){n(this,"type","collapse"),n(this,"isContainer",!0),n(this,"layout","grid"),n(this,"children",[]),n(this,"name",void 0),n(this,"accordion",void 0),n(this,"expandIconPosition",void 0),n(this,"expandIconStyle",void 0),this.name=e,t&&Object.assign(this,t),l&&(this.children=l)}},da={install(e){_gct.register.formItem.register("collapse",()=>new ra),e.component(ua.name,ua)}},pa=class{constructor(){n(this,"component","gct-form-group")}createController(e,t){return Rl(()=>new $l(e,t))}};function ma(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var va=/* @__PURE__ */we({name:"GctFormGroup",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e){const t=re("form-group"),l=Re([0]),a={};return e.model.width&&(a[t.cssVarName("form-group-width")]=e.model.width),e.model.height&&(a[t.cssVarName("form-group-height")]=e.model.height),{ns:t,keys:l,style:a,renderContainer:function(t){return"flex"===e.model.layout?be(ze("flex-container"),{layout:e.model.flex},ma(t)?t:{default:()=>[t]}):"grid"===e.model.layout?be(ze("grid-container"),{layout:e.model.grid},ma(t)?t:{default:()=>[t]}):void console.error("不支持的layout类型"+e.model.layout)}}},render(){var e,t;if(!0!==this.c.state.keepalive&&!1===this.c.state.visible)return null;const l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[];if(this.model.isCollapse){let e;return be(ze("a-collapse"),{activeKey:this.keys,"onUpdate:activeKey":e=>this.keys=e,class:[this.ns.b(),this.ns.is("hidden-header",!1===this.model.showHeader),this.ns.is("hidden",!1===this.c.state.visible)],style:this.style,ghost:!0},{default:()=>[be(ze("a-collapse-panel"),{key:"0",header:this.model.title},ma(e=this.renderContainer(l))?e:{default:()=>[e]})]})}return be("div",{class:[this.ns.b(),this.ns.is("hidden-header",!1===this.model.showHeader),this.ns.is("hidden",!1===this.c.state.visible),this.model.class],style:this.style},[!1===this.model.showHeader?be("div",{class:this.ns.e("title")},[this.model.title]):null,be("div",{class:this.ns.e("content")},[this.renderContainer(l)])])}}),ha=class{constructor(e,t,l){n(this,"type","group"),n(this,"isContainer",!0),n(this,"layout","grid"),n(this,"children",[]),n(this,"name",void 0),n(this,"title",void 0),n(this,"showHeader",void 0),n(this,"isCollapse",void 0),this.name=e,t&&Object.assign(this,t),l&&(this.children=l)}},fa={install(e){_gct.register.formItem.register("container",()=>new pa),e.component(va.name,va)}},ga=class{constructor(){n(this,"component","gct-form-line")}createController(e,t){return Rl(()=>new Gl(e,t))}},ya=/* @__PURE__ */we({name:"GctFormLine",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup:e=>({ns:re("form-line"),style:de(()=>{const{paddingTop:t,paddingBottom:l}=e.model;return{paddingTop:t,paddingBottom:l}})}),render(){return be("div",{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible)],style:this.style},[be("div",{class:this.ns.e("line")},null)])}}),ba=class{constructor(e,t={}){n(this,"type","line"),n(this,"layout","grid"),n(this,"name",""),n(this,"isContainer",!0),this.name=e,Object.assign(this,t)}},xa={install(e){_gct.register.formItem.register("line",()=>new ga),e.component(ya.name,ya)}},wa=class{constructor(){n(this,"component","gct-form-tab")}createController(e,t){return Rl(()=>new Ul(e,t))}},ka=/* @__PURE__ */we({name:"GctFormTab",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e){const t=re("form-tab"),l=ql(),a={};return e.model.width&&(a[t.cssVarName("form-tab-width")]=e.model.width),e.model.height&&(a[t.cssVarName("form-tab-height")]=e.model.height),Ze(e.c.state,()=>{l.evt.emit("changeState",e.c.model.name,e.c)}),De(()=>{var t;const l=(null===(t=e.model.children)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name)||"";e.c.state.activePane=l}),{ns:t,style:a}},render(){var e,t;if(!0!==this.c.state.keepalive&&!1===this.c.state.visible)return null;const l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[];return be(ze("a-tabs"),{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible),this.ns.m(this.model.navPosition||"left")],style:this.style,activeKey:this.c.state.activePane,"onUpdate:activeKey":e=>this.c.state.activePane=e},{default:()=>{var e;return[null===(e=this.model.children)||void 0===e?void 0:e.map((e,t)=>be(ze("a-tab-pane"),{key:e.name,tab:e.title},{default:()=>[l[t]]}))]}})}}),Ca=class{constructor(e,t,l){n(this,"type","tab"),n(this,"isContainer",!0),n(this,"children",[]),n(this,"layout","grid"),n(this,"navPosition","center"),n(this,"name",void 0),this.name=e,t&&Object.assign(this,t),l&&(this.children=l)}},_a={install(e){_gct.register.formItem.register("tab",()=>new wa),e.component(ka.name,ka)}},Sa=class{constructor(){n(this,"component","gct-form-tab-pane")}createController(e,t){return Rl(()=>new zl(e,t))}};function Ea(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var Oa=/* @__PURE__ */we({name:"GctFormTabPane",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e){const t=re("form-tab-pane"),l={};return e.model.width&&(l[t.cssVarName("form-tab-pane-width")]=e.model.width),e.model.height&&(l[t.cssVarName("form-tab-pane-height")]=e.model.height),{ns:t,style:l,renderContainer:function(t){return"flex"===e.model.layout?be(ze("flex-container"),{layout:e.model.flex},Ea(t)?t:{default:()=>[t]}):"grid"===e.model.layout?be(ze("grid-container"),{layout:e.model.grid},Ea(t)?t:{default:()=>[t]}):void console.error("不支持的layout类型"+e.model.layout)}}},render(){var e,t;if(!0!==this.c.state.keepalive&&!1===this.c.state.visible)return null;const l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[];return be("div",{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible)],style:this.style},[this.renderContainer(l)])}}),Ia=class{constructor(e,t,l,a){n(this,"type","tab-pane"),n(this,"isContainer",!0),n(this,"title",void 0),n(this,"layout","grid"),n(this,"children",[]),n(this,"name",void 0),this.name=e,this.title=t,l&&Object.assign(this,l),a&&(this.children=a)}},Ta={install(e){_gct.register.formItem.register("tab-pane",()=>new Sa),e.component(Oa.name,Oa)}},Fa=class{constructor(){n(this,"component","gct-form-title-group")}createController(e,t){return Rl(()=>new $l(e,t))}};function La(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var Da=/* @__PURE__ */we({name:"GctFormTitleGroup",props:{c:{type:Object,required:!0},model:{type:Object,required:!0}},setup(e){const t=re("form-title-group"),l=Re([0]),a={};return e.model.width&&(a[t.cssVarName("form-title-group-width")]=e.model.width),e.model.height&&(a[t.cssVarName("form-title-group-height")]=e.model.height),{ns:t,keys:l,style:a,renderContainer:function(t){return"flex"===e.model.layout?be(ze("flex-container"),{layout:e.model.flex},La(t)?t:{default:()=>[t]}):"grid"===e.model.layout?be(ze("grid-container"),{layout:e.model.grid},La(t)?t:{default:()=>[t]}):void console.error("不支持的layout类型"+e.model.layout)}}},render(){var e,t;if(!0!==this.c.state.keepalive&&!1===this.c.state.visible)return null;const l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[];return be("div",{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible),this.model.class],style:this.style},[be("div",{class:this.ns.e("title")},[this.model.title]),be("div",{class:this.ns.e("content")},[this.renderContainer(l)])])}}),Ba=class{constructor(e,t,l){n(this,"type","group"),n(this,"isContainer",!0),n(this,"layout","grid"),n(this,"children",[]),n(this,"name",void 0),n(this,"title",void 0),n(this,"showHeader",void 0),n(this,"isCollapse",void 0),this.name=e,t&&Object.assign(this,t),l&&(this.children=l)}},Ma={install(e){_gct.register.formItem.register(N.FORM_TITLE_GROUP,()=>new Fa),e.component(Da.name,Da)}},ja=class{constructor(e,t){n(this,"type","hidden"),n(this,"name",void 0),n(this,"field",void 0),n(this,"defaultValue",void 0),n(this,"editor",void 0),this.name=e,t&&Object.assign(this,t)}},Aa=class{constructor(e,t,l,a){n(this,"type","item"),n(this,"name",void 0),n(this,"editor",void 0),n(this,"label",void 0),n(this,"rules",void 0),this.name=e,t&&(this.label=t),l&&Object.assign(this,l),this.editor=a}},Ra={install(e){_gct.register.formItem.register("item",()=>new ta),_gct.register.formItem.register("hidden",()=>new la),e.use(sa),e.use(da),e.use(fa),e.use(xa),e.use(_a),e.use(Ta),e.use(Ma),e.component(ea.name,ea),e.component(Zl.name,Zl)}},Na=/* @__PURE__ */we({name:"FlexItem",props:{layout:Object},setup:e=>({ns:re("flex-item"),getStyle:()=>{const t={};if(e.layout){const{order:l,alignSelf:a,flexBasis:n,flexGrow:o,flexShrink:i}=e.layout;null!=l&&(t.order=l),null!=a&&(t["align-self"]=a),null!=n&&(t["flex-basis"]=n),null!=o&&(t["flex-grow"]=o),null!=i&&(t["flex-shrink"]=i)}return t}}),render(){var e,t;return be("div",{class:this.ns.b(),style:this.getStyle()},[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t)])}}),Pa=/* @__PURE__ */we({name:"FlexContainer",props:{layout:Object},setup:e=>({ns:re("flex-container"),getStyle:()=>{const t={};if(e.layout){const{alignContent:l,alignItems:a,flexDirection:n,flexWrap:o,justifyContent:i}=e.layout;null!=l&&(t.alignContent=l),null!=a&&(t.alignItems=a),null!=n&&(t.flexDirection=n),null!=o&&(t.flexWrap=o),null!=i&&(t.justifyContent=i)}return t},getItemStyle:e=>{const t={};if(e){const{width:l,height:a}=e;null!=l&&(t.width=l),null!=a&&(t.height=a)}return t}}),render(){var e,t;let l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[];return l.length>0&&(l=l[0].children||[]),be("div",{class:this.ns.b(),style:this.getStyle()},[l.map(e=>{if(!e)return null;const t=e.props.model.flexItem;return be(Na,{layout:t,style:this.getItemStyle(e.props.model)},"function"==typeof(l=e)||"[object Object]"===Object.prototype.toString.call(l)&&!Ee(l)?e:{default:()=>[e]});var l})])}});function Ua(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var za=/* @__PURE__ */we({name:"GridContainer",props:{layout:Object},setup(e,{slots:t}){const l=re("grid-container");return()=>{var a;let n;const o=e.layout||{};let i=(null===(a=t.default)||void 0===a?void 0:a.call(t))||[];return i.length>0&&(i=i[0].children||[]),be(ze("a-row"),{class:l.b(),wrap:!0,gutter:o.gutter},Ua(n=i.map(e=>{if(!e)return null;const t=e.props.model.gridItem;return be(ze("a-col"),{span:t?t.span??24:24,offset:t?t.offset??0:0},Ua(e)?e:{default:()=>[e]})}))?n:{default:()=>[n]})}}}),$a=/* @__PURE__ */we({name:"GctFormAction",props:{c:{type:Object,required:!0},data:{type:Object,required:!0},model:{type:Object,required:!0},size:{type:String}},setup(e){const t=re("gct-form-action"),l=ql();return{ns:t,onClick:function(t){t.stopPropagation(),e.model.click&&e.model.click(t,l,e.c,e.data)}}},render(){return be(ze("a-button"),Oe({class:this.ns.b(),onClick:this.onClick,size:this.size,type:"link"},this.model.props||{}),{default:()=>[this.model.label]})}}),Va=class{constructor(){n(this,"component","gct-form-action")}},Ha=Tl(pl.ACTION,()=>new Va,$a);function Ka(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var Ga=/* @__PURE__ */we({name:"GctFormDateFormatSelect",props:Jl(),setup(e){var t;const l=re("form-date-format-select"),a=de(()=>{var t;return e.data[(null===(t=e.model)||void 0===t?void 0:t.fieldTypeKey)||"type"]}),n=de(()=>{var t;return e.data[(null===(t=e.model)||void 0===t?void 0:t.mappingTypeKey)||"mapping_type"]}),o=Yl((null===(t=e.model)||void 0===t?void 0:t.separatorKey)||"separator"),i=[{label:"-",value:"-"},{label:"/",value:"/"},{label:"·",value:"."}],s=Yl(),r=de(()=>a.value===A.DATE_TIME||n.value===A.DATE_TIME?[{label:`yyyy${o.value}MM${o.value}dd HH`,value:`YYYY${o.value}MM${o.value}DD HH`},{label:`yyyy${o.value}MM${o.value}dd HH:mm`,value:`YYYY${o.value}MM${o.value}DD HH:mm`},{label:`yyyy${o.value}MM${o.value}dd HH:mm:ss`,value:`YYYY${o.value}MM${o.value}DD HH:mm:ss`}]:a.value===A.DATE||n.value===A.DATE?[{label:"yyyy",value:"YYYY"},{label:`yyyy${o.value}MM`,value:`YYYY${o.value}MM`},{label:`yyyy${o.value}MM${o.value}dd`,value:`YYYY${o.value}MM${o.value}DD`}]:[]);return Ze(o,()=>{a.value!==A.DATE_TIME&&n.value!==A.DATE_TIME?a.value!==A.DATE&&n.value!==A.DATE?s.value="":s.value=`YYYY${o.value}MM${o.value}DD`:s.value=`YYYY${o.value}MM${o.value}DD HH:mm:ss`}),()=>{var t,a;let n,u;return be("div",{class:l.b()},[be("span",{class:l.e("first")},[be(ze("a-select"),Oe({value:o.value,"onUpdate:value":e=>o.value=e,disabled:e.c.state.disabled,size:e.size,placeholder:e.model.placeholder||ne("sys.chooseText")},(null===(t=e.model)||void 0===t?void 0:t.props)||{}),Ka(n=i.map(e=>be(ze("a-select-option"),{key:e.value,value:e.value},{default:()=>[e.label]})))?n:{default:()=>[n]})]),be("span",{class:l.e("second")},[be(ze("a-select"),Oe({value:s.value,"onUpdate:value":e=>s.value=e,disabled:e.c.state.disabled,size:e.size,placeholder:e.model.placeholder||ne("sys.chooseText")},(null===(a=e.model)||void 0===a?void 0:a.props)||{}),Ka(u=r.value.map(e=>be(ze("a-select-option"),{key:e.value,value:e.value},{default:()=>[e.label]})))?u:{default:()=>[u]})])])}}}),qa=class{constructor(){n(this,"component","gct-form-date-format-select")}},Ya=Tl(pl.DATE_FORMAT_SELECT,()=>new qa,Ga),Wa=/* @__PURE__ */we({name:"GctFormLengthUnit",inheritAttrs:!1,props:{itemModel:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String}},emits:["update:value"],setup:()=>({ns:re("form-length-unit"),val:Yl()}),render(){return be(ze("length-unit-editor"),Oe({value:this.val,"onUpdate:value":e=>this.val=e},this.model.props||{},{class:[this.ns.b(),this.ns.is("readonly",this.model.readonly)]}),null)}}),Ja=class{constructor(){n(this,"component","gct-form-length-unit")}},Xa=Tl(pl.LENGTH_UNIT,()=>new Ja,Wa),Qa=/* @__PURE__ */we({name:"GctFormColor",inheritAttrs:!1,props:{itemModel:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String}},emits:["update:value"],setup(e){const t=re("form-color"),l=Yl();return console.debug("GctFormColor props",e),()=>be(ze("color-editor"),Oe({value:l.value,"onUpdate:value":e=>l.value=e},e.model.props||{},{class:[t.b(),t.is("readonly",e.model.readonly)]}),null)}}),Za=class{constructor(){n(this,"component","gct-form-color")}},en=Tl(pl.COLOR,()=>new Za,Qa),tn=class{constructor(){n(this,"component","gct-form-date")}},ln=/* @__PURE__ */we({name:"GctFormDate",props:{model:{type:Object,required:!0},value:{type:String,default:""},isDate:{type:Boolean,default:!0},isTime:{type:Boolean,default:!1}},emits:["update:value"],setup(e){const t=re("gct-form-date"),l=new jl(e.model),a=Yl(),n=Re(a.value?Rt(a.value):null),o=Re(a.value?Rt(a.value):null);return{ns:t,c:l,dateVal:n,timeVal:o,onChange:()=>{let e="";n.value&&(e=n.value.format("YYYY-MM-DD")),o.value?e+=` ${o.value.format("HH:mm:ss")}`:e+=" 00:00:00",a.value=e}}},render(){return be("div",{class:[this.ns.b()]},[this.isDate?be(ze("a-date-picker"),Oe({picker:"date",value:this.dateVal,"onUpdate:value":e=>this.dateVal=e,format:"YYYY-MM-DD"},this.model.props||{},{placeholder:"请选择日期",onChange:this.onChange}),null):null,this.isTime?be(ze("a-time-picker"),{value:this.timeVal,"onUpdate:value":e=>this.timeVal=e,placeholder:"请选择时间",onChange:this.onChange},null):null])}}),an=Tl(pl.DATE,()=>new tn,ln),nn={CONFIRM:"wujie-formula___confirm",CANCEL:"wujie-formula___cancel"};function on(e){return on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},on(e)}function sn(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),l.push.apply(l,a)}return l}function rn(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?sn(Object(l),!0).forEach(function(t){dn(e,t,l[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):sn(Object(l)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))})}return e}function un(){un=function(){return t};var e,t={},l=Object.prototype,a=l.hasOwnProperty,n=Object.defineProperty||function(e,t,l){e[t]=l.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",r=o.toStringTag||"@@toStringTag";function u(e,t,l){return Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,l){return e[t]=l}}function c(e,t,l,a){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype);return n(i,"_invoke",{value:E(e,l,new F(a||[]))}),i}function d(e,t,l){try{return{type:"normal",arg:e.call(t,l)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var p="suspendedStart",m="suspendedYield",v="executing",h="completed",f={};function g(){}function y(){}function b(){}var x={};u(x,i,function(){return this});var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==l&&a.call(k,i)&&(x=k);var C=b.prototype=g.prototype=Object.create(x);function _(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function S(e,t){function l(n,o,i,s){var r=d(e[n],e,o);if("throw"!==r.type){var u=r.arg,c=u.value;return c&&"object"==on(c)&&a.call(c,"__await")?t.resolve(c.__await).then(function(e){l("next",e,i,s)},function(e){l("throw",e,i,s)}):t.resolve(c).then(function(e){u.value=e,i(u)},function(e){return l("throw",e,i,s)})}s(r.arg)}var o;n(this,"_invoke",{value:function(e,a){function n(){return new t(function(t,n){l(e,a,t,n)})}return o=o?o.then(n,n):n()}})}function E(t,l,a){var n=p;return function(o,i){if(n===v)throw Error("Generator is already running");if(n===h){if("throw"===o)throw i;return{value:e,done:!0}}for(a.method=o,a.arg=i;;){var s=a.delegate;if(s){var r=O(s,a);if(r){if(r===f)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===p)throw n=h,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=v;var u=d(t,l,a);if("normal"===u.type){if(n=a.done?h:m,u.arg===f)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(n=h,a.method="throw",a.arg=u.arg)}}}function O(t,l){var a=l.method,n=t.iterator[a];if(n===e)return l.delegate=null,"throw"===a&&t.iterator.return&&(l.method="return",l.arg=e,O(t,l),"throw"===l.method)||"return"!==a&&(l.method="throw",l.arg=/* @__PURE__ */new TypeError("The iterator does not provide a '"+a+"' method")),f;var o=d(n,t.iterator,l.arg);if("throw"===o.type)return l.method="throw",l.arg=o.arg,l.delegate=null,f;var i=o.arg;return i?i.done?(l[t.resultName]=i.value,l.next=t.nextLoc,"return"!==l.method&&(l.method="next",l.arg=e),l.delegate=null,f):i:(l.method="throw",l.arg=/* @__PURE__ */new TypeError("iterator result is not an object"),l.delegate=null,f)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function L(t){if(t||""===t){var l=t[i];if(l)return l.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function l(){for(;++n<t.length;)if(a.call(t,n))return l.value=t[n],l.done=!1,l;return l.value=e,l.done=!0,l};return o.next=o}}throw new TypeError(on(t)+" is not iterable")}return y.prototype=b,n(C,"constructor",{value:b,configurable:!0}),n(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,r,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,r,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},_(S.prototype),u(S.prototype,s,function(){return this}),t.AsyncIterator=S,t.async=function(e,l,a,n,o){void 0===o&&(o=Promise);var i=new S(c(e,l,a,n),o);return t.isGeneratorFunction(l)?i:i.next().then(function(e){return e.done?e.value:i.next()})},_(C),u(C,r,"Generator"),u(C,i,function(){return this}),u(C,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),l=[];for(var a in t)l.push(a);return l.reverse(),function e(){for(;l.length;){var a=l.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},t.values=L,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var l in this)"t"===l.charAt(0)&&a.call(this,l)&&!isNaN(+l.slice(1))&&(this[l]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var l=this;function n(a,n){return s.type="throw",s.arg=t,l.next=a,n&&(l.method="next",l.arg=e),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var r=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(r&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(r){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var l=this.tryEntries.length-1;l>=0;--l){var n=this.tryEntries[l];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var l=this.tryEntries[t];if(l.finallyLoc===e)return this.complete(l.completion,l.afterLoc),T(l),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var l=this.tryEntries[t];if(l.tryLoc===e){var a=l.completion;if("throw"===a.type){var n=a.arg;T(l)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,l,a){return this.delegate={iterator:L(t),resultName:l,nextLoc:a},"next"===this.method&&(this.arg=e),f}},t}function cn(e,t,l,a,n,o,i){try{var s=e[o](i),r=s.value}catch(e){return void l(e)}s.done?t(r):Promise.resolve(r).then(a,n)}function dn(e,t,l){return(t=function(e){var t=function(e){if("object"!=on(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,"string");if("object"!=on(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==on(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}var pn=we({name:"WujieVue",props:{width:{type:String,default:""},height:{type:String,default:""},name:{type:String,default:""},loading:{type:HTMLElement,default:void 0},url:{type:String,default:""},sync:{type:Boolean,default:void 0},prefix:{type:Object,default:void 0},alive:{type:Boolean,default:void 0},props:{type:Object,default:void 0},attrs:{type:Object,default:void 0},replace:{type:Function,default:void 0},fetch:{type:Function,default:void 0},fiber:{type:Boolean,default:void 0},degrade:{type:Boolean,default:void 0},plugins:{type:Array,default:null},beforeLoad:{type:Function,default:null},beforeMount:{type:Function,default:null},afterMount:{type:Function,default:null},beforeUnmount:{type:Function,default:null},afterUnmount:{type:Function,default:null},activated:{type:Function,default:null},deactivated:{type:Function,default:null},loadError:{type:Function,default:null},style:{type:Object,default:void 0},iframeAddEventListeners:{type:Array,default:null},iframeOnEvents:{type:Array,default:null}},data:function(){return{startAppQueue:Promise.resolve()}},mounted:function(){var e=this;this.name&&(window.__WUJIE_QUEUE?window.__WUJIE_QUEUE[this.name]?this.startAppQueue=window.__WUJIE_QUEUE[this.name]:window.__WUJIE_QUEUE[this.name]=this.startAppQueue:window.__WUJIE_QUEUE=dn({},this.name,this.startAppQueue)),Nt.$onAll(this.handleEmit),this.execStartApp(),this.$watch(function(){return e.name+e.url},function(){return e.execStartApp()})},methods:{handleEmit:function(e){for(var t=arguments.length,l=new Array(t>1?t-1:0),a=1;a<t;a++)l[a-1]=arguments[a];this.$emit.apply(this,[e].concat(l))},startApp:function(){var e,t=this;return(e=/* @__PURE__ */un().mark(function e(){return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,$t({name:t.name,url:t.url,el:t.$refs.wujie,loading:t.loading,alive:t.alive,fetch:t.fetch,props:t.props,attrs:t.attrs,replace:t.replace,sync:t.sync,prefix:t.prefix,fiber:t.fiber,degrade:t.degrade,plugins:t.plugins,beforeLoad:t.beforeLoad,beforeMount:t.beforeMount,afterMount:t.afterMount,beforeUnmount:t.beforeUnmount,afterUnmount:t.afterUnmount,activated:t.activated,deactivated:t.deactivated,loadError:t.loadError,iframeAddEventListeners:t.iframeAddEventListeners,iframeOnEvents:t.iframeOnEvents});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log(e.t0);case 8:case"end":return e.stop()}},e,null,[[0,5]])}),function(){var t=this,l=arguments;return new Promise(function(a,n){var o=e.apply(t,l);function i(e){cn(o,a,n,i,s,"next",e)}function s(e){cn(o,a,n,i,s,"throw",e)}i(void 0)})})()},execStartApp:function(){this.startAppQueue=this.startAppQueue.then(this.startApp),window.__WUJIE_QUEUE[this.name]=this.startAppQueue},destroy:function(){Pt(this.name)}},beforeDestroy:function(){Nt.$offAll(this.handleEmit)},render:function(){return Ce("div",{style:rn({width:this.width,height:this.height},this.style),ref:"wujie"})}});function mn(e){return new Promise(t=>{const l=document.createElement("div");document.body.appendChild(l);const a=pe({setup(){function n(){a.unmount(),document.body.removeChild(l)}return()=>Ce("div",{},Ce(Ht,{wuJieName:"gct-formula-editor",url:"/extras/@gct-paas/formula-editor/index.html",props:e,onWujieFormula___confirm:e=>{t(e),n()},onWujieFormula___cancel:()=>{t(void 0),n()}}))}});a.use(pn),a.mount(l)})}pn.setupApp=zt,pn.preloadApp=Ut,pn.bus=Nt,pn.destroyApp=Pt,pn.install=function(e){e.component("WujieVue",pn)};var vn=/* @__PURE__ */we({name:"GctFormFormula",props:{c:{type:Object,required:!0},itemModel:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""}},setup(e){const t=re("form-formula"),l=ql(),a=Re(),n=Yl(),o=Yl("expressionEcho"),i=async()=>{const t=await mn({expr:n.value.expr,exprEcho:null==o?void 0:o.value,returnType:n.value.mappingType||"string",mode:j.DATA_SET_FORMULA,identifiers:{},...e.model.config||{}});t&&(n.value={expr:t.expr,mappingType:t.returnType},o&&(o.value=t.exprEcho),l.validateItem(e.itemModel.name))};return()=>be("div",{class:t.b(),onClick:i},[be(ze("a-input"),{ref:a,class:t.e("input"),readonly:!0,value:(null==o?void 0:o.value)||n.value,placeholder:ne("sys.inputText")},null)])}}),hn=class{constructor(){n(this,"component","gct-form-formula")}},fn=Tl(pl.FORMULA,()=>new hn,vn),gn=class{constructor(){n(this,"component","gct-form-check-switch")}},yn=/* @__PURE__ */we({name:"GctFormCheckSwitch",props:{itemModel:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:Boolean,default:!1},size:{type:String}},emits:["update:value"],setup:()=>({ns:re("gct-form-check-switch"),val:Yl()}),render(){return this.model.isSwitch?be("div",{class:[this.ns.b(),this.ns.m("switch"),this.ns.is("readonly",this.model.readonly),this.size?this.ns.m(this.size):null]},[be(ze("a-switch"),Oe({checked:this.val,"onUpdate:checked":e=>this.val=e,size:this.size},this.model.props||{}),null)]):be(ze("a-checkbox"),Oe({checked:this.val,"onUpdate:checked":e=>this.val=e,size:this.size},this.model.props||{},{class:[this.ns.b(),this.ns.m("checkbox"),this.ns.is("readonly",this.model.readonly),this.size?this.ns.m(this.size):null]}),{default:()=>[this.model.label]})}}),bn=Tl(pl.CHECK_SWITCH,()=>new gn,yn);function xn(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var wn=/* @__PURE__ */we({name:"GctFormSelectGroup",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},emits:["update:value"],setup(e,{emit:t}){const l=re("form-select-group"),a=_e("formController"),n=Re(""),o=Re(null),i=Re(!1),s=Re(/* @__PURE__ */new Set),r=de({get:()=>e.model.nameField?a.item[e.model.nameField].value:"",set(t){if(e.model.nameField)return a.item[e.model.nameField].editorValue=t}});function u(e,t){return e.className.indexOf(t)>-1?e:e.parentElement?u(e.parentElement,t):null}function c(e){var t;u(e.target,"ant-select-dropdown")||null===(t=o.value)||void 0===t||t.blur()}window.addEventListener("wheel",c);const d=Re(),p=de({get:()=>!e.c.state.options.find(t=>t.value===e.value)&&r.value?r.value:e.value||void 0,set:e=>{if(!e)return t("update:value",void 0),void(r.value="");"string"==typeof e&&(e=e.trim()),t("update:value",e);let l=null;m.value.find(t=>(t.options&&(l=t.options.find(t=>t.value==e)),!!l)),l&&(r.value=l.label)}}),m=de(()=>e.c.state.options&&e.c.state.options.length>0?e.c.state.options:[]),v=async()=>e.c.loadDictionary();return null!=p.value&&v(),Be(()=>{window.removeEventListener("wheel",c)}),{ns:l,selectRef:o,searchValue:n,open:i,rootRef:d,val:p,options:m,loadOptions:v,toggleGroupCollapse:t=>{e.model.groupCollapsible&&(s.value.has(t)?s.value.delete(t):s.value.add(t))},isGroupCollapsed:t=>!0!==e.model.groupCollapsible||!s.value.has(t)}},render(){let e;return be("div",{ref:"rootRef",class:this.ns.b()},[be(ze("a-select"),{ref:"selectRef",open:this.open,value:this.val,"onUpdate:value":e=>this.val=e,allowClear:!0,disabled:this.c.state.disabled,size:this.size,placeholder:this.model.placeholder,onDropdownVisibleChange:this.loadOptions,"show-search":!0,"filter-option":()=>!0,searchValue:this.searchValue,onSearch:e=>this.searchValue=null==e?void 0:e.trim(),onFocus:()=>this.open=!0,onBlur:()=>this.open=!1,onChange:()=>this.open=!1},xn(e=this.options.map(e=>{let t;const l=null!=e.label?e.label:" ",a=String(e.value),n=this.isGroupCollapsed(a),o=(n&&e.options||[]).filter(e=>!this.searchValue||e.label.toLowerCase().indexOf(this.searchValue.toLowerCase())>=0);return 0===o.length?null:be(ze("a-select-opt-group"),{key:e.value,label:be("div",{class:[this.ns.b("group-header"),this.model.groupCollapsible?this.ns.b("group-header--clickable"):""],onClick:()=>this.toggleGroupCollapse(a)},[this.model.groupCollapsible&&be("span",{class:[this.ns.be("group-header","arrow"),n?this.ns.bem("group-header","arrow","collapsed"):""]},[be("i",{class:["iconfont",1!=n?"icon-right":"icon-Down"]},null)]),be("span",{class:this.ns.be("group-header","title")},[l])])},xn(t=o.map(e=>be(ze("a-select-option"),{class:this.ns.b("item-option"),key:e.value,value:e.value},{default:()=>[e.icon?be("span",{class:this.ns.be("item-option","item-icon")},[be("i",{class:`iconfont ${e.icon}`},null)]):"",be("span",{class:this.ns.be("item-option","item-label")},[e.label])]})))?t:{default:()=>[t]})}))?e:{default:()=>[e]})])}}),kn=class{constructor(){n(this,"component","gct-form-select-group")}},Cn=Tl(pl.SELECT_GROUP,()=>new kn,wn),_n=class{constructor(){n(this,"component","gct-form-i18n")}},Sn=/* @__PURE__ */we({name:"GctFormI18n",props:Jl(),emits:["update:value","blur"],setup(e,{emit:t}){var l;const a=re("form-i18n"),n=ql(),o=Re({}),i=Re(!1),s=n.item[(null===(l=e.model)||void 0===l?void 0:l.cfgKey)||"i18nConfig"];s||console.warn("i18nConfig not found in form item, please ensure that the model has a valid cfgKey or i18nConfig is defined in the form.");const r=de(()=>{var t,l;return(null===(t=e.data)||void 0===t?void 0:t[(null===(l=e.model)||void 0===l?void 0:l.fieldKey)||"fieldKey"])||null});r.value&&async function(){var t;const l=await le.loadField((null===(t=e.data)||void 0===t?void 0:t.modelKey)||e.context.modelKey,r.value);l&&(o.value=l)}();const u=de({get:()=>e.value?e.value:!0===i.value?"":o.value.name,set:l=>{"string"==typeof l&&(l=l.trim()),i.value=!0,"object"!=typeof l&&e.value==l||(l||(c.value=""),t("update:value",l))}}),c=de({get:()=>s?{i18nKey:s.value}:"",set:e=>{if(s)try{s.value=JSON.parse(e).i18nKey}catch(t){console.error(t)}}});return{ns:a,val:u,i18nConfigValue:c,onBlur:function(){i.value=!1}}},render(){var e;return be(ze("i18n-select-input"),Oe({class:[this.ns.b(),this.ns.m(this.size)],i18nText:this.val,"onUpdate:i18nText":e=>this.val=e,i18nConfig:this.i18nConfigValue,"onUpdate:i18nConfig":e=>this.i18nConfigValue=e,placeholderText:this.model.placeholder||this.$t("sys.inputText"),attr:"i18nKey",btnHeight:"small"===this.size?"26px":void 0,inputExtraProps:{showCount:!0,maxlength:this.model.max||32,disabled:this.c.state.disabled},onBlur:e=>{this.onBlur(),this.$emit("blur",e)},size:this.size},(null===(e=this.model)||void 0===e?void 0:e.props)||{}),null)}}),En=Tl(pl.I18N,()=>new _n,Sn),On=/* @__PURE__ */we({name:"GctFormIconSelect",props:{value:{type:Object},model:{type:Object,required:!0}},emits:["update:value"],setup(e,{emit:t}){var l,a,n;const o=re("gct-form-icon-select"),i=Re(e.value),s=Re((null===(l=i.value)||void 0===l?void 0:l.icon)||e.model.defaultIcon),r=Re((null===(a=i.value)||void 0===a?void 0:a.color)||e.model.defaultColor),u=Re((null===(n=i.value)||void 0===n?void 0:n.background)||e.model.defaultBackground);return Ze(()=>e.value,e=>{i.value=e,e&&(s.value=e.icon,r.value=e.color)}),Ze([s,r,u],()=>{i.value={icon:s.value,color:r.value},t("update:value",i.value)}),{ns:o,icon:s,color:r,background:u,nextPickerStyle:de(()=>{if(e.model.size)return{"--box-size":e.model.size+"px"}})}},render(){return be("div",{class:this.ns.b()},[be(ze("icon-next-picker"),{value:this.icon,"onUpdate:value":e=>this.icon=e,color:this.color,"onUpdate:color":e=>this.color=e,background:"#f5f5f5",disabled:this.model.disabled,showColor:!1!==this.model.showColor,style:this.nextPickerStyle},null),this.model.label?be("span",{class:this.ns.e("title")},[this.model.label]):null])}}),In=class{constructor(){n(this,"component","gct-form-icon-select")}},Tn=Tl(pl.ICON_SELECT,()=>new In,On),Fn=class{constructor(){n(this,"component","gct-form-number")}},Ln=/* @__PURE__ */we({name:"GctFormNumber",props:{model:{type:Object,required:!0},value:{type:String,default:""}},emits:["update:value"],setup:()=>({ns:re("gct-form-number"),val:Yl()}),render(){return be(ze("a-input-number"),Oe({value:this.val,"onUpdate:value":e=>this.val=e},this.model.props||{},{class:[this.ns.b(),this.model.class],prefix:this.model.prefix,suffix:this.model.suffix,addonBefore:this.model.addonBefore,addonAfter:this.model.addonAfter,placeholder:this.model.placeholder,max:this.model.max,min:this.model.min,precision:this.model.precision}),null)}}),Dn=Tl(pl.NUMBER,()=>new Fn,Ln),Bn=class{constructor(){n(this,"component","gct-form-picker")}},Mn=/* @__PURE__ */we({name:"GctFormPicker",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:null}},emits:["update:value"],setup(e,{emit:t}){const l=re("gct-form-picker"),a=ql(),n=de({get:()=>e.model.nameField?a.item[e.model.nameField].value:"",set(t){if(e.model.nameField)return a.item[e.model.nameField].editorValue=t}}),o=de({get:()=>!e.c.state.options.find(t=>t.value===e.value)&&n.value?n.value:e.value,set:l=>{if("string"==typeof l&&(l=l.trim()),"object"!=typeof l&&e.value==l)return;const n=e.c.state.options.find(e=>e.value===l);n&&n.data&&e.model.fieldMap&&e.model.fieldMap.map(e=>{const[t,l]=e.split(":");l&&(a.item[l].editorValue=n.data[t])}),t("update:value",l)}});return null!=o.value&&e.c.loadDictionary(),{ns:l,val:o,nameVal:n,loadOptions:()=>e.c.loadDictionary(),onChange:(e,t)=>{n.value=t.label}}},render(){return be(ze("a-select"),Oe({value:this.val,"onUpdate:value":e=>this.val=e},this.model.props||{},{class:this.ns.b(),disabled:this.c.state.disabled,loading:this.c.state.loading,options:this.c.state.options,placeholder:this.model.placeholder,onDropdownVisibleChange:this.loadOptions,onChange:this.onChange,"show-search":!0,"filter-option":(e,t)=>!!t.label&&t.label.toLowerCase().indexOf(e.toLowerCase())>=0}),null)}}),jn=Tl(pl.PICKER,()=>new Bn,Mn),An=/* @__PURE__ */we({name:"GctFormPixelConfig",props:{model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},setup(){const e=re("form-pixel-config"),t=Yl("label_mode"),l=Yl(),a=[{label:"百分比",value:"percent"},{label:"固定",value:"fixed"}],n=de(()=>"fixed"===t.value?"px":"%");function o(e){t.value=e,l.value="fixed"===e?100:30}return()=>be(ze("a-input-group"),{compact:!0,class:e.b()},{default:()=>[be(ze("a-select"),{class:e.e("select"),value:t.value,"onUpdate:value":e=>t.value=e,options:a,onChange:o},null),be(ze("a-input-number"),{class:e.e("input"),value:l.value,"onUpdate:value":e=>l.value=e,min:0,placeholder:"请输入",size:"small",max:"fixed"===t.value?500:100,addonAfter:n.value},null)]})}}),Rn=class{constructor(){n(this,"component","gct-form-pixel-config")}},Nn=Tl(pl.PIXEL_CONFIG,()=>new Rn,An),Pn=class{constructor(){n(this,"component","gct-form-select")}},Un=/* @__PURE__ */we({name:"GctFormSelect",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},emits:["update:value"],setup(e){const t=re("gct-form-select"),l=Re();I(l,()=>{var e;a.value=!1,null===(e=l.value)||void 0===e||e.blur()});const a=Re(!1);function n(e,t){var l;return(null===(l=e.className)||void 0===l?void 0:l.indexOf(t))>-1?e:e.parentElement?n(e.parentElement,t):null}function o(e){var t;n(e.target,"ant-select-dropdown")||null===(t=l.value)||void 0===t||t.blur()}window.addEventListener("wheel",o);const i=Re(),s=new jl(e.model),r=Yl(),u=de({get:()=>null!=r.value?r.value:void 0,set(e){r.value=e}}),c=de(()=>e.c.state.options&&e.c.state.options.length>0?e.c.state.options:s.options);return Be(()=>{window.removeEventListener("wheel",o)}),{ns:t,selectRef:l,open:a,rootRef:i,editorC:s,val2:u,options:c,onCloseDropdown:function(){a.value=!1,l.value&&l.value.blur()},onOpenDropdown:function(){a.value=!0},onChangeDropdown:function(){a.value=!a.value}}},render(){return be("div",{ref:"rootRef",class:this.ns.b()},[this.model.beforeText?be("div",{class:this.ns.e("before-text")},[this.model.beforeText]):null,be("div",{class:this.ns.e("content")},[be(ze("a-select"),Oe({ref:"selectRef",open:this.open,value:this.val2,"onUpdate:value":e=>this.val2=e,options:this.options,allowClear:!0,disabled:this.c.state.disabled,size:this.size,placeholder:this.model.placeholder,onChange:this.onCloseDropdown,onClick:this.onChangeDropdown},this.model.props||{}),null)]),this.model.afterText?be("div",{class:this.ns.e("after-text")},[this.model.afterText]):null])}}),zn=Tl(pl.SELECT,()=>new Pn,Un),$n=class{constructor(){n(this,"component","gct-form-span")}},Vn=/* @__PURE__ */we({name:"GctFormSpan",props:{c:{type:Object,required:!0},itemModel:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},isEmptyText:{type:Boolean,default:!1}},setup(e){const t=re("form-span"),{model:l,itemModel:a,c:n}=Ye(e);return n.value.loadDictionary(),{ns:t,val:de(()=>{if(l.value.format&&"function"==typeof l.value.format)return l.value.format(n.value.data,a.value,n.value);if(null==e.value||""===e.value)return e.value;if(a.value.dictionary){const t=(a.value.dictionary.items||[]).find(t=>t.value==e.value);if(t)return t.label}if(n.value.state.options.length>0){const t=n.value.state.options.find(t=>t.value==e.value);if(t)return t.label}return e.value}),handleClipboardKey:function(){const{isSuccessRef:t}=ie(e.value);t.value&&At.success(ne("sys.copySuccess"))}}},render(){let e=this.val;return this.val||!0!==this.isEmptyText||(e=_gct.store.getEmptyDisplay),be("div",{class:this.ns.b()},[be("span",{class:this.ns.e("info")},[e]),this.model.copy&&be("span",{class:this.ns.e("copy")},[be("i",{class:"iconfont icon-fuzhi primary-gct",onClick:this.handleClipboardKey},null)])])}}),Hn=Tl(pl.SPAN,()=>new $n,Vn),Kn=class{constructor(){n(this,"component","gct-form-switch")}},Gn=/* @__PURE__ */we({name:"GctFormSwitch",props:{model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},setup:()=>({ns:re("gct-form-switch"),val:Yl()}),render(){return be("div",{class:this.ns.b()},[be(ze("a-switch"),Oe({checked:this.val,"onUpdate:checked":e=>this.val=e,size:this.size},this.model.props||{}),null)])}}),qn=Tl(pl.SWITCH,()=>new Kn,Gn),Yn=class{constructor(){n(this,"component","gct-form-text")}},Wn=/* @__PURE__ */we({name:"GctFormText",props:{model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},emits:["update:value"],setup(e){const t=re("gct-form-text"),l=Wl(e.model.prefix||e.model.addonBefore,e.model.suffix||e.model.addonAfter);return{ns:t,val:l,handleBlur:()=>{"string"==typeof l.value&&(l.value=l.value.trim())}}},render(){return be(ze("a-input"),Oe({value:this.val,"onUpdate:value":e=>this.val=e,size:this.size},this.model.props||{},{class:this.ns.b(),prefix:this.model.prefix,suffix:this.model.suffix,addonBefore:this.model.addonBefore,addonAfter:this.model.addonAfter,placeholder:this.model.placeholder,"show-count":null!=this.model.max,maxlength:this.model.max,onBlur:this.handleBlur}),null)}}),Jn=Tl(pl.TEXT,()=>new Yn,Wn),Xn=/* @__PURE__ */we({name:"GctFormEmpty",setup(){const e=re("gct-form-empty");return()=>be("span",{class:e.b()},null)}}),Qn=class{constructor(){n(this,"component","gct-form-empty")}},Zn=Tl(pl.EMPTY,()=>new Qn,Xn),eo=class{constructor(){n(this,"component","gct-form-textarea")}},to=/* @__PURE__ */we({name:"GctFormTextarea",props:{model:{type:Object,required:!0},value:{type:String,default:null}},emits:["update:value"],setup(){const e=re("gct-form-textarea"),t=Yl();return{ns:e,val:t,handleBlur:()=>{"string"==typeof t.value&&(t.value=t.value.trim())}}},render(){return be(ze("a-textarea"),Oe({value:this.val,"onUpdate:value":e=>this.val=e,class:this.ns.b(),"auto-size":this.model.autoSize,"show-count":null!=this.model.max,maxlength:this.model.max,placeholder:this.model.placeholder,onBlur:this.handleBlur},this.model.props||{}),null)}}),lo=Tl(pl.TEXTAREA,()=>new eo,to);function ao(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var no=/* @__PURE__ */we({name:"GctFormRadio",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},emits:["update:value"],setup:()=>({ns:re("gct-form-radio"),val:Yl()}),render(){let e;const t={...this.model.props||{},allowClear:!0,disabled:this.c.state.disabled};if(this.model.buttonMode){let e;return be(Ft,Oe({class:[this.ns.b(),this.ns.m("button")],value:this.val,"onUpdate:value":e=>this.val=e,size:"small","button-style":"solid"},t),ao(e=this.c.state.options.map(e=>be(Tt,{key:e.value,value:e.value},{default:()=>[e.label]})))?e:{default:()=>[e]})}return be(Ft,Oe({class:[this.ns.b(),this.ns.m("radio")],value:this.val,"onUpdate:value":e=>this.val=e,size:this.size},t),ao(e=this.c.state.options.map(e=>{var t;return be(It,{class:[this.ns.e("item"),this.ns.em("item","pos-"+((null===(t=this.model.icon)||void 0===t?void 0:t.pos)||"left"))],key:e.value,value:e.value,disabled:e.disabled},{default:()=>{var t,l,a;return[e.icon?be("span",{class:this.ns.e("item-icon"),style:{width:null===(t=this.model.icon)||void 0===t?void 0:t.width,height:null===(l=this.model.icon)||void 0===l?void 0:l.height,fontSize:null===(a=this.model.icon)||void 0===a?void 0:a.fontSize}},["string"==typeof e.icon&&e.icon.endsWith(".svg")?be(ze("assets-svg-icon"),{src:e.icon},null):e.icon]):null,be("span",{class:this.ns.e("item-label")},[e.label])]}})}))?e:{default:()=>[e]})}}),oo=class{constructor(){n(this,"component","gct-form-radio")}},io=Tl(pl.RADIO,()=>new oo,no),so=/* @__PURE__ */we({name:"GctFormInfo",props:{value:{type:String,default:""},model:{type:Object,required:!0},size:{type:String},isEmptyText:{type:Boolean,default:!1}},emits:["update:value"],setup:()=>({ns:re("gct-form-info"),val:Yl()}),render(){let e=this.val||this.model.content;return this.val||!0!==this.isEmptyText||(e=_gct.store.getEmptyDisplay),be("div",{class:[this.ns.b(),this.size?this.ns.m(this.size):null]},[this.model.icon?be("span",{class:this.ns.e("icon")},[be("i",{class:`iconfont ${this.model.icon}`},null)]):null,be("span",{class:this.ns.e("content"),title:e},[e])])}}),ro=class{constructor(){n(this,"component","gct-form-info")}},uo=Tl(pl.INFO,()=>new ro,so),co=Gt,po=/* @__PURE__ */we({name:"GctFormCheckbox",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},emits:["update:value"],setup(e,{emit:t}){const l=re("gct-form-checkbox"),a=Yl(),n=de(()=>e.model.isDrag?(a.value||[]).filter(e=>e.checked).map(e=>e.value):a.value),o=de(()=>{var t;return e.model.isDrag&&a.value&&(null===(t=a.value)||void 0===t?void 0:t.length)?a.value.map(t=>{var l;return{...t,label:(null===(l=e.c.state.options.find(e=>e.value===t.value))||void 0===l?void 0:l.label)||""}}):e.c.state.options});return{ns:l,checked:n,onChange:l=>{o.value.forEach(t=>{e.model.minLength&&l.length<=e.model.minLength&&l.includes(t.value)?t.disabled=!0:t.disabled=!1,t.checked=l.includes(t.value)}),e.model.isDrag?t("update:value",o.value):t("update:value",l)},onDragEnd:e=>{const{newIndex:l,oldIndex:a}=e;o.value.splice(l,0,o.value.splice(a,1)[0]),t("update:value",o.value)},slots:{item:({element:e})=>be("div",{class:"drag-checkbox-item ks-row-middle"},[be("i",{class:"icon-drag iconfont mr4px cursor-move text-[#C3C3C3] primary-gct-hover"},null),be(xt,{value:e.value,disabled:e.disabled},{default:()=>[e.label]})])},options:o}},render(){const e={...this.model.props||{},class:[this.ns.b(),this.ns.m("checkbox"),"column"===this.model.layout&&"isColumn",this.size?this.ns.m(this.size):null],disabled:this.c.state.disabled};return[lt(be(wt,Oe({value:this.checked,"onUpdate:value":e=>this.checked=e},e,{onChange:this.onChange}),{default:()=>[be(co,{modelValue:this.options,"onUpdate:modelValue":e=>this.options=e,handle:".cursor-move",animation:"200","chosen-class":"drawing-chosen","drag-class":"drawing-drag","item-key":"value",class:"drag-wrap",onEnd:this.onDragEnd},this.slots)]}),[[Qe,this.model.isDrag]]),lt(be(wt,Oe({value:this.checked,"onUpdate:value":e=>this.checked=e,options:this.options},e,{onChange:this.onChange}),null),[[Qe,!this.model.isDrag]])]}}),mo=class{constructor(){n(this,"component","gct-form-checkbox")}},vo=Tl(pl.CHECKBOX,()=>new mo,po);function ho(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var fo=[{value:"entity",label:"sys.pageDesigner.entity"},{value:"data",label:"sys.pageDesigner.data"},{value:"view",label:"sys.pageDesigner.view"},{value:"form",label:"sys.pageDesigner.form",project:["eDHR","MEDPRO"]},{value:"system",label:"sys.pageDesigner.system"}],go=/* @__PURE__ */we({name:"GctFormModelSelect",props:{model:{type:Object,required:!0},value:{type:String}},setup(e){const t=re("form-model-select"),l=Yl(),a=Yl("category"),n=Yl("categorySelect"),o=Yl("modelName"),i=Yl("formId"),s=Re([]),r=Re({}),u=async()=>{return"system"===n.value?(s.value=await _api.apaas.report.getListSystemModels()||[],{[ne("sys.pageDesigner.system")]:s.value}):(s.value=await _api.apaas.modelComprehensive.getModelSummary({type:(null===(t=e.model.props)||void 0===t?void 0:t.modelTypes)||"NDO,BASE,TREE,TRANSACTION,SIGN",category:a.value,report:!0})||[],rt(s.value,"group"));var t},{onFieldChange:c}=_t.useInjectFormItemContext();De(async()=>{l.value=l.value?l.value:void 0,a.value=a.value||"entity",n.value=n.value||a.value,r.value=await u()});const d=async e=>{a.value=e,l.value=null,i.value=void 0,r.value=await u()},p=e=>{const t=s.value.find(t=>t.key===e);t&&(o.value=t.name),"system"===n.value&&(a.value=t.modelCategory),c(),"system"!==n.value&&(r.value=rt(s.value,"group"))};return()=>{let a,o;return be("div",{class:t.b()},[be(ze("a-input-group"),{compact:!0},{default:()=>[be(ze("a-select"),{value:n.value,"onUpdate:value":e=>n.value=e,class:t.e("class"),placeholder:"请选择",onSelect:d,disabled:e.model.disabled},ho(a=fo.filter(t=>{var l;return(null===(l=e.model.props)||void 0===l?void 0:l.exclude)?!e.model.props.exclude.includes(t.value)&&(!t.project||t.project&&_gct.store.appInfo.suiteKey&&t.project.includes(_gct.store.appInfo.suiteKey)):!t.project||_gct.store.appInfo.suiteKey&&t.project.includes(_gct.store.appInfo.suiteKey)}).map(e=>{let t;return be(ze("a-select-option"),{key:e.value,value:e.value},ho(t=ne(e.label))?t:{default:()=>[t]})}))?a:{default:()=>[a]}),be(ze("a-select"),{value:l.value,"onUpdate:value":e=>l.value=e,class:t.e("model"),onSelect:p,"show-search":!0,placeholder:"请选择",disabled:e.model.disabled,filterOption:(e,t)=>(t.label||t.name).toLowerCase().indexOf(e.toLowerCase())>=0},ho(o=Object.keys(r.value).map(e=>{const t=r.value[e].map(e=>be(ze("a-select-option"),{key:e.key,value:e.key,label:e.name},{default:()=>[e.name]}));return be(ze("a-select-opt-group"),{key:e,label:e},ho(t)?t:{default:()=>[t]})}))?o:{default:()=>[o]})]})])}}}),yo=class{constructor(){n(this,"component","gct-form-model-select")}},bo=Tl(pl.MODEL_SELECT,()=>new yo,go),xo=/* @__PURE__ */we({name:"GctFormMultipleChoice",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:Array,default:null}},emits:["update:value"],setup(e,{emit:t}){const l=re("form-multiple-choice"),a=Re(),n=de({get:()=>e.value??[],set:e=>{t("update:value",e)}});return null!=n.value&&e.c.loadDictionary(),{ns:l,rootRef:a,val:n,loadOptions:()=>e.c.loadDictionary({},e.model.force)}},render(){return be("div",{ref:"rootRef",class:this.ns.b()},[be(ze("a-select"),Oe({value:this.val,"onUpdate:value":e=>this.val=e,mode:"multiple","max-tag-count":5,disabled:this.c.state.disabled,loading:this.c.state.loading,options:this.c.state.options,placeholder:this.model.placeholder,onDropdownVisibleChange:this.loadOptions,getPopupContainer:()=>this.rootRef},this.model.props||{}),null)])}}),wo=class{constructor(){n(this,"component","GctFormMultipleChoice")}},ko=Tl(pl.MULTIPLE_CHOICE,()=>new wo,xo),Co=/* @__PURE__ */we({name:"GctFormTable",props:{model:{type:Object,required:!0},value:{type:Array,default:()=>[]}},setup(e){const t=re("form-table"),l=Yl();return()=>be("div",{class:t.b()},[be(ze("gct-table"),Oe({data:l.value,model:e.model.tableModel,count:l.value.length.toString()},e.model.props||{}),null)])}}),_o=class{constructor(){n(this,"component","gct-form-table")}},So=Tl(pl.TABLE,()=>new _o,Co),Eo=/* @__PURE__ */we({name:"GctSelectFormTable",props:{model:{type:Object,required:!0},value:{type:Array,default:()=>[]}},setup(e){const t=re("select-form-table"),l=Re(),a=Re(""),n=Yl(),o=de(()=>({type:e.model.multiple?"checkbox":"radio",fixed:!0,selectedRowKeys:e.model.isKeys?n.value:n.value.map(t=>t[e.model.tableModel.key||"id"]),onChange:(t,l)=>{e.model.isKeys?n.value=t:n.value=l},getCheckboxProps:e=>({disabled:"Disabled User"===e.name,name:e.name})}));function i(){a.value?(a.value=a.value.trim(),a.value&&l.value&&l.value.reload({query:a.value})):l.value&&l.value.reload()}return()=>be("div",{class:t.b()},[be("div",{class:t.e("search")},[be(ze("a-input-search"),{placeholder:"搜索数据集名称",value:a.value,"onUpdate:value":e=>a.value=e,onSearch:i},null)]),be("div",{class:t.e("table")},[be(ze("gct-table"),Oe({ref:l,"row-selection":o.value,data:n.value,model:e.model.tableModel,count:n.value.length.toString()},e.model.props||{}),null)])])}}),Oo=class{constructor(){n(this,"component","gct-select-form-table")}},Io=Tl(pl.SELECT_TABLE,()=>new Oo,Eo),To={install(e){e.use(Xa).use(en).use(Ya).use(an).use(fn).use(bn).use(En).use(Cn).use(Tn).use(Dn).use(jn).use(Nn).use(zn).use(Hn).use(qn).use(Jn).use(lo).use(io).use(uo).use(vo).use(an).use(bo).use(ko).use(So).use(Io).use(Ha).use(Zn)}},Fo=/* @__PURE__ */we({name:"GctEditForm",props:{embed:{type:Boolean,default:!1},context:{type:Object,default:()=>({})},params:{type:Object,default:()=>({})},controller:{type:Object},model:{type:Object,required:!0},data:{type:Object},count:{type:Number,default:0},adaptModal:{type:Boolean,default:!0}},emits:["update:data","change"],setup(e,{emit:t,expose:l}){const a=re("gct-edit-form");console.debug("GctEditForm props:",e);const n=e.controller||Ml(()=>new Bl(e.model)),o=Re(),i=async e=>{try{await o.value.formRef.validateFields([e])}catch(t){return console.error(t),!1}return!0};n.validate=async()=>{try{await o.value.formRef.validate()}catch(e){return console.error(e),!1}return!0},n.validateItem=i;const{context:s,params:r}=Ye(e);return Ze(s,()=>{Object.assign(n.context,e.context),n.state.isNew=!n.context.id},{immediate:!0,deep:!0}),Ze(r,()=>{Object.assign(n.params,e.params)},{deep:!0}),Ze(()=>e.count,()=>{n.state.count+=1}),Ze(()=>e.data,()=>{Object.assign(n.state.data,e.data)},{deep:!0}),!1!==e.adaptModal&&se(async()=>{try{await o.value.formRef.validate();const e=await n.save();if(e)return{ok:!0,data:[ot(e)]}}catch(e){console.error(e)}return{ok:!1}}),e.data?(Object.assign(n.state.data,e.data),n.loaded()):!0!==n.state.isNew?n.load().then(()=>{n.loaded()}):n.loaded(),e.embed&&n.evt.on("change",()=>{const e=n.getData();t("update:data",e),t("change",e)}),n.evt.on("blur",e=>{i(e)}),l({c:n}),()=>{let t=null;return(n.state.isNew||0==n.state.isNew&&n.state.loaded)&&(t=be(ze("gct-form"),{class:"h-full",ref:o,c:n,model:e.model,context:e.context},null)),be("div",{class:a.b()},[t])}}}),Lo={install(e){e.use(To),e.component(Pa.name,Pa),e.component(Na.name,Na),e.component(za.name,za),e.component(Fo.name,Fo),e.use(Ra)}},Do=class{constructor(){n(this,"formData",{}),n(this,"items",[]),n(this,"page",1),n(this,"total",0),n(this,"size",20)}},Bo=class{constructor(){n(this,"keepalive",!0),n(this,"visible",!0)}},Mo=class extends Bo{constructor(...e){super(...e),n(this,"error",!1),n(this,"errMessage",""),n(this,"readonly",!1),n(this,"disabled",!1)}},jo=class{constructor(){n(this,"hover",!1),n(this,"active",!1),n(this,"deleted",!1)}},Ao=class{get value(){return this.row.data[this.model.dataIndex]}set value(e){const t=this.row.data[this.model.dataIndex];this.row.data[this.model.dataIndex]=e,this.row.change(this.model.name,e,t)}constructor(e,t){n(this,"state",this.createState()),this.row=e,this.model=t}createState(){return new Bo}async init(){}async destroy(){}},Ro=class extends Ao{},No=class extends Ao{createState(){return new Mo}active(){return this.row.active()}unActive(){return this.row.unActive()}},Po=class{constructor(){n(this,"promise",null),n(this,"resolve",null),n(this,"count",0)}get isLock(){return this.count>0}startPromise(){this.promise=new Promise(e=>{this.resolve=e})}endPromise(){this.resolve&&(this.resolve(),this.resolve=null,this.promise=null)}lock(){this.count+=1,this.promise||this.startPromise()}unlock(){if(this.count<1)return this.count=0,void console.warn("lock和unlock次数不匹配!");this.count-=1,0===this.count&&this.endPromise()}async await(){if(this.promise)return this.promise}};function Uo(e,t,l){return{install(a){e&&t&&_gct.register.tableEditor.register(M.PREFIX+e,t),l&&a.component(l.name||l.__name,l)}}}var zo=class{get key(){return this.data[this.model.key]}constructor(e,t,l){n(this,"item",{}),n(this,"fields",[]),n(this,"state",this.createState()),n(this,"activeCount",new Po),this.table=e,this.model=t,this.data=l}async init(){const e=this.model.columns.map(e=>{let t=null;switch(e.type){case"edit":t=new No(this,e);break;case"actions":t=new Ro(this,e);break;default:t=new Ao(this,e)}return this.fields.push(e.name),t.state=Ae(t.state),this.item[e.name]=t,t});await Promise.all(e)}change(e,t,l){this.table.change(this,e,t,l)}async destroy(){const e=Object.keys(this.item).map(e=>this.item[e].destroy());this.item={},await Promise.all(e)}active(){this.activeCount.isLock?this.activeCount.lock():(this.activeCount.lock(),this.state.active=!0,this.activeCount.await().then(()=>{this.state.active=!1}))}unActive(){this.activeCount.unlock()}createState(){return new jo}},$o=class{constructor(e){n(this,"evt",new Sl),n(this,"state",this.createState()),n(this,"row",{}),n(this,"editorProviders",{}),this.model=e,this.init()}init(){this.initTableItems(this.model.columns)}initTableItems(e){e&&e.forEach(e=>{if("edit"===e.type){const t=_gct.register.tableEditor.get(M.PREFIX+e.editor.type);t&&(this.editorProviders[e.name]=t)}})}async setData(e){await this.destroyControllers(),await this.initControllers(e),this.state.items=e||[]}getData(){return this.state.items}createState(){return new Do}async initControllers(e){const t=e.map(e=>{const t=e[this.model.key];if(this.row[t])return;const l=new zo(this,this.model,e);return l.state=Ae(l.state),l.data=Ae(l.data),this.row[t]=l,Object.keys(e).forEach(l=>{this.state.formData[`${l}___${t}`]=e[l]}),l.init()});await Promise.all(t)}async destroyControllers(){const e=this.state.items.map(e=>e[this.model.key]),t=Object.keys(this.row).filter(t=>!e.includes(t)).map(e=>{const t=this.row[e];delete this.row[e];{const e=Object.keys(t.data),l=t.data[this.model.key];e.forEach(e=>{const t=`${e}___${l}`;delete this.state.formData[t]})}return t.destroy()});await Promise.all(t)}async load(e={}){if(st(e,{page:this.state.page,size:this.state.size}),this.model.fetch){const t=await this.model.fetch(e,this);this.state.items=t,this.destroyControllers(),this.initControllers(this.state.items)}}async reload(e){await this.load(e)}async search(e){await this.reload(e)}async refresh(e){await this.load(e)}destroy(){this.evt.reset()}change(e,t,l,a){const n=this.state.items.find(t=>t[this.model.key]===e.key);n&&(Object.assign(n,e.data),this.state.formData[`${t}___${n[this.model.key]}`]=l,this.evt.emit("change",n,t,l,a))}updatePagination(e){ht(e.total)||(this.state.total=e.total),ht(e.size)||(this.state.size=e.size),ht(e.page)||(this.state.page=e.page)}};function Vo(e){const t=e();return t.state=Ae(t.state),Be(()=>t.destroy()),t}function Ho(e,{pagination:t=!0,triggerByWindowSize:l=!0}={}){const a=Re(0);let n=[],o=null,i=null;const s=()=>{var l,i;if(!e)return;o&&(clearTimeout(o),o=null);const r=We(e).$el??We(e),u=r.getBoundingClientRect().height??0,c=Math.max((null===(l=r.querySelector(".ant-table-thead"))||void 0===l?void 0:l.getBoundingClientRect().height)??0,48),d=t?Math.max((null===(i=r.querySelector(".ant-table-pagination"))||void 0===i?void 0:i.getBoundingClientRect().height)??0,24)+16:0;a.value=u-c-d,n.push(a.value),n.length>=3&&n[n.length-3]===n[n.length-1]&&n[n.length-2]===n[n.length-1]?n=[]:o=setTimeout(()=>{s()},100)};return l&&window.addEventListener("resize",s),Ze(e,async t=>{await Ie(),t&&(s(),(()=>{i&&(i.disconnect(),i=null);const t=We(e).$el??We(e);t&&"undefined"!=typeof ResizeObserver&&(i=new ResizeObserver(()=>{o&&clearTimeout(o),o=setTimeout(()=>{s()},100)}),i.observe(t))})())},{immediate:!0}),Be(()=>{window.removeEventListener("resize",s),i&&(i.disconnect(),i=null),o&&(clearTimeout(o),o=null)}),{scrollHeight:a,calcScrollHeight:s}}var Ko=class{constructor(){n(this,"editors",/* @__PURE__ */new Map),n(this,"providers",/* @__PURE__ */new Map)}register(e,t){this.editors.set(e,t)}unregister(e){this.editors.delete(e)}get(e){if(this.providers.has(e))return this.providers.get(e);const t=this.editors.get(e);if(t){const l=t();return this.providers.set(e,l),l}return null}},Go=class{constructor(){n(this,"component","gct-table-span")}},qo=/* @__PURE__ */we({name:"GctTableSpan",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""}},setup:()=>({ns:re("table-span")}),render(){return be("div",{class:this.ns.b()},[this.model.icon?be("span",{class:this.ns.e("icon")},[be("i",{class:`iconfont ${"string"==typeof this.model.icon?this.model.icon:this.model.icon(this.c.row.data)}`},null)]):null,be("span",{class:this.ns.e("text")},[this.value])])}}),Yo=Uo(pl.SPAN,()=>new Go,qo),Wo=class{constructor(){n(this,"component","gct-table-text")}},Jo=/* @__PURE__ */we({name:"GctTableText",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},isEdit:{type:Boolean,default:!1}},emits:["update:value"],setup(e){const t=re("table-text"),l=Wl(e.model.prefix||e.model.addonBefore,e.model.suffix||e.model.addonAfter);return{ns:t,val:l,handleBlur:()=>{"string"==typeof l.value&&(l.value=l.value.trim())}}},render(){return!1===this.isEdit?be("div",{class:[this.ns.b(),this.ns.e("info")]},[this.c.value]):be(ze("a-input"),Oe({value:this.val,"onUpdate:value":e=>this.val=e},this.model.props||{},{class:[this.ns.b(),this.ns.is("error",this.c.state.error)],prefix:this.model.prefix,suffix:this.model.suffix,addonBefore:this.model.addonBefore,addonAfter:this.model.addonAfter,placeholder:this.model.placeholder,"show-count":null!=this.model.max,maxlength:this.model.max,autocomplete:"off",onBlur:this.handleBlur}),null)}}),Xo=Uo(pl.TEXT,()=>new Wo,Jo),Qo=class{constructor(){n(this,"component","gct-table-date")}},Zo=/* @__PURE__ */we({name:"GctTableDate",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},isEdit:{type:Boolean,default:!1}},emits:["update:value"],setup:()=>({ns:re("table-date"),val:Yl()}),render(){return!1===this.isEdit?be("div",{class:[this.ns.b(),this.ns.e("info")]},[this.c.value]):be(ze("a-date-picker"),Oe({picker:"date",value:this.val,"onUpdate:value":e=>this.val=e},this.model.props||{},{class:[this.ns.b(),this.ns.is("error",this.c.state.error)],placeholder:this.model.placeholder}),null)}}),ei=Uo(pl.DATE,()=>new Qo,Zo),ti={install(e){e.use(Yo).use(Xo).use(ei)}};function li(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var ai=/* @__PURE__ */we({name:"GctTable",props:{count:{type:Number,default:0},model:{type:Object,required:!0},data:{type:Array,default:()=>[]}},emits:["rowChange"],setup(e,{emit:t}){const l=re("gct-table"),a=Re({}),n=Re(),o=Re(),i=Re();let s=null,r=null;const u=Vo(()=>new $o(e.model));u.evt.on("change",async(e,l,a,n)=>{t("rowChange",ot(e),l,a,n)}),!0===u.model.local&&Ze(()=>e.count,()=>{u.setData(ot(e.data))}),!0!==u.model.local&&!1!==u.model.autoLoad&&u.load();const c=e=>{if(!e||e===n.value)return null;return e.getAttribute("data-row-key")||c(e.parentElement)},d=e=>{const t=c(e.target);if(t){const e=u.row[t];s&&(s.state.hover=!1),e.state.hover=!0,s=e}},p=e=>{!c(e.target)&&s&&(s.state.hover=!1,s=null)},m=e=>{const t=c(e.target);if(t){const e=u.row[t];r&&r.unActive(),e.active(),r=e}else r&&(r.unActive(),r=null)},v=()=>{r&&(r.unActive(),r=null)};De(()=>{n.value&&(n.value.addEventListener("mouseover",d,{capture:!0}),n.value.addEventListener("mouseout",d,{capture:!0}),n.value.addEventListener("mouseleave",p,{capture:!0}),n.value.addEventListener("click",m,{capture:!0})),window.addEventListener("click",v,{capture:!0})}),Be(()=>{n.value&&(n.value.removeEventListener("mouseover",d,{capture:!0}),n.value.removeEventListener("mouseout",d,{capture:!0}),n.value.removeEventListener("mouseleave",p,{capture:!0}),n.value.removeEventListener("click",m,{capture:!0})),window.removeEventListener("click",v,{capture:!0})});const h=de(()=>{var t;if(ht(e.model.pagination))return!1;const l=nt(e.model.pagination);st(l,{pageSizeOptions:[10,20,30,40,50],showSizeChanger:!0,showTotal:!0});const a=!0===l.showTotal?e=>ne("sys.component.table.total",{total:e}):l.showTotal||void 0,n=null===(t=l.pageSizeOptions)||void 0===t?void 0:t.map(e=>`${e}`);return{class:"pagination-total-left",total:u.state.total,current:u.state.page,pageSize:u.state.size,pageSizeOptions:n,showSizeChanger:l.showSizeChanger,showTotal:a}}),{scrollHeight:f}=Ho(n,{pagination:!!h.value});return{ns:l,c:u,loadingState:a,elRef:n,formRef:o,tableRef:i,scrollHeight:f,pagination:h,isEdit:de(()=>u.model.columns.some(e=>"edit"===e.type)),handleTableChange:(e,t,l)=>{u.updatePagination({page:e.current,size:e.pageSize}),u.reload()},mouseOver:d,mouseOut:e=>{!c(e.target)&&s&&(s.state.hover=!1,s=null)},onValidate:(e,t,l)=>{const a=e.split("___");if(2===a.length){const[e,n]=a,o=u.row[n];if(o){const a=o.item[e];a&&(a.state.error=!t,l&&l.length>0?a.state.errMessage=l[0]:a.state.errMessage="")}}},validate:()=>o.value.validate(),reload:e=>u.load(e)}},render(){return be("div",{ref:"elRef",class:this.ns.b(),onMouseover:this.mouseOver,onMouseout:this.mouseOut},[be(ze("a-form"),{ref:"formRef",model:this.c.state.formData,onValidate:this.onValidate},{default:()=>[be(ze("a-table"),Oe({ref:"tableRef",class:["flex-1",this.ns.is("pagination",!!this.pagination),this.ns.is("not-edit",!this.isEdit)],scroll:{y:this.scrollHeight},columns:this.model.columns,"data-source":this.c.state.items,"row-key":e=>e[this.c.model.key],pagination:this.pagination,onChange:this.handleTableChange},this.$attrs),{headerCell:({title:e,column:t})=>{const l=t;if("edit"===l.type&&l.rules&&l.rules.length>0){const t=l.rules.some(e=>!0===e.required);return be("span",{title:e,class:[this.ns.e("table-header"),this.ns.is("required",t)]},[be("span",{class:this.ns.e("table-item")},[e])])}return e},bodyCell:({column:e,text:t,record:l})=>{t=null==t&&1==this.model.isEmptyText?_gct.store.getEmptyDisplay:dt(t)?t.toString():t;const a=e;if(a.customRender)return a.customRender({record:l});if("edit"===e.type){const t=l[this.c.model.key],a=this.c.row[t];if(a){let l;const n=this.c.editorProviders[e.name],o=ze(n.component),i=a.item[e.name],s=!0===a.state.hover||!0===i.state.error||!0===a.state.active||"all"===this.c.model.rowEditMode;return be(ze("a-form-item"),{name:`${e.name}___${t}`,class:[this.ns.b("table-item"),this.ns.bm("table-item","edit")],rules:i.model.rules||[]},li(l=Ce(o,{key:i.model.name,c:i,model:i.model.editor,readonly:i.state.readonly,disabled:i.state.disabled,value:i.value,itemModel:i.model,data:a.data,keepalive:i.state.keepalive,visible:i.state.visible,isEdit:s,"onUpdate:value":e=>{i.value=e}}))?l:{default:()=>[l]})}}if("actions"===e.type){const t=e;return be("div",{class:this.ns.b("table-actions")},[t.actions.filter(e=>!e.hidden||!e.hidden(l)).map(e=>{if("divider"===e.mode)return be(ze("a-divider"),{type:"vertical"},null);const a=`${e.type}___${e.tag}___${l[this.c.model.key]}`,n=be(ze("a-button"),Oe({class:this.ns.b("table-action-item"),type:e.type,size:"small",loading:!0===this.loadingState[a],onClick:async n=>{if(!e.confirm)if(n.stopPropagation(),e.action)if(Il(e.action)||Ol(e.action)){this.loadingState[a]=!0;try{await e.action(l)}catch(o){console.log(o)}finally{this.loadingState[a]=!1}}else e.action(l);else t.action(e.tag,l)}},e.props),{default:()=>[e.text]});return e.confirm?be(ze("a-popconfirm"),Oe({onConfirm:async()=>{if(e.action)if(Il(e.action)||Ol(e.action)){this.loadingState[a]=!0;try{await e.action(l)}catch(n){console.log(n)}finally{this.loadingState[a]=!1}}else e.action(l);else t.action(e.tag,l)}},e.confirm),li(n)?n:{default:()=>[n]}):n})])}return"link"===e.type?be("a",{class:this.ns.e("table-link"),onClick:e=>{e.stopPropagation(),a.click&&a.click(l)}},[t]):t}})]})])}}),ni={install(e){e.component(ai.name,ai)}},oi={install(e){e.use(ni)}},ii={install(e){e.use(ti),e.use(oi)}},si=He(null),ri=Re({visible:!1,defaultInput:"",tabActiveKey:""}),ui=Re({output:"",error:"",logs:[]});function ci(e){return Ze(()=>e,()=>{e&&Object.keys(e).forEach(t=>{ri.value[t]=We(e[t])})},{immediate:!0}),Ze(()=>We(ri).visible,async t=>{await Ie(),t&&!We(si)&&(si.value=(await x.loadMonaco()).editor.create(document.querySelector(".editor-console__input"),{value:null==e?void 0:e.defaultInput,language:"json",automaticLayout:!0,minimap:{enabled:!1}}))}),{editorConsoleState:ri,consoleValueState:ui,toggleVisible:function(){ri.value.visible=!We(ri).visible},changeTabActiveKey:function(e){ri.value.tabActiveKey=e}}}function di(){const e=()=>{const e=We(si);return e||console.warn("useEditorConsoleInner instance is undefined!"),e};function t(e,t){if(pt(e))return e;let l=ot(e);if("string"!=typeof e)try{l=decodeURIComponent(JSON.stringify(l))}catch(u){console.error(u),l=JSON.stringify(l)}else{try{l=decodeURIComponent(l)}catch(u){console.warn(u)}try{l=JSON.parse(l)}catch(c){console.warn(c)}l=JSON.stringify(l)}const{newline:a=!1,spaceAfterColon:n=!0}=t||{};let o=l,i=/([{}])/g;o=o.replace(i,"\r\n$1\r\n"),i=/([[\]])/g,o=o.replace(i,"\r\n$1\r\n"),i=/(,)/g,o=o.replace(i,"$1\r\n"),i=/(\r\n\r\n)/g,o=o.replace(i,"\r\n"),i=/\r\n,/g,o=o.replace(i,","),a||(i=/:\r\n\{/g,o=o.replace(i,":{"),i=/:\r\n\[/g,o=o.replace(i,":[")),n&&(i=/:/g,o=o.replace(i,": "));let s="",r=0;return o.split("\r\n").forEach(function(e){let t=0,l=0,a="";for(e.match(/\{$/)||e.match(/\[$/)?l=1:e.match(/\}/)||e.match(/\]/)?0!==r&&(r-=1):l=0,t=0;t<r;t++)a+=" ";s+=a+e+"\r\n",r+=l}),s}return{getInstance:e,showConsolePanel:function(){ri.value.visible=!0},hideConsolePanel:function(){ri.value.visible=!1},getInputValue:async function({showError:t=!0,ignoreError:l=!1}={}){var a;return(await x.loadMonaco()).editor.getModelMarkers({owner:"json"}).length>0&&(t&&_gct.message.error("参数语法错误"),!l)?Promise.reject():(null===(a=e())||void 0===a?void 0:a.getValue())??We(ri).defaultInput},setConsoleResult:function(e){const{code:l,message:a,data:n}=e;if(200===l){const{logs:e,data:l}=n;ui.value.output=t(l),ui.value.logs=e,ui.value.error="",ri.value.tabActiveKey="2"}else ui.value.output="",ui.value.logs=[],ui.value.error=a,ri.value.tabActiveKey="3"},formatJson2Notes:t}}var pi=xe(()=>import("./monaco-editor-5qU4ukgX.js")),mi=/* @__PURE__ */C(/* @__PURE__ */we({name:"ColorEditor",__name:"color-editor",props:{value:{}},emits:["update:value"],setup(e,{emit:t}){const l=t,a=(e,t)=>{l("update:value",t)};return(t,l)=>{const n=ze("color-picker");return Me(),me(n,{preset:We(ae),color:e.value,"onUpdate:color":a},{icon:tt(()=>[fe("div",{class:"color-picker-icon",style:Fe({backgroundColor:e.value})},null,4)]),_:1},8,["preset","color"])}}}),[["__scopeId","data-v-7b102f87"]]),vi={key:1,class:"component"},hi={class:"box"},fi={style:{borderRadius:"4px"}},gi={class:"color-picker-middle"},yi={style:{flex:"auto"}},bi={class:"color-picker-diamond"},xi={class:"color-picker-value"},wi={class:"hex"},ki=["value"],Ci={class:"rgba-r"},_i=["value"],Si={class:"rgba-g"},Ei=["value"],Oi={class:"rgba-b"},Ii=["value"],Ti={class:"rgba-a"},Fi=["value"],Li={class:"presetColor"},Di={class:"preset"},Bi=["onClick"],Mi=/* @__PURE__ */we({name:"ColorPicker",__name:"ColorPicker",props:{color:{default:()=>"#FFFFFF00"},preset:{default:()=>["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},width:{default:240},useTrigger:{type:Boolean,default:!1},placement:{default:"bottomLeft"}},emits:["update:color"],setup(e,{emit:t}){const l=e,a=t,n=Re(),o=Re(),i=Re(),s=Re(""),r=Re("left: 0;"),u=Re("left: calc(100% - 6px);"),c=Re(0),d=Re(1),p=Re(1),m=Re(255),v=Re(0),h=Re(0),f=Re(1);Ze(()=>l.color,()=>{const{r:e,g:t,b:a,a:n}=A(l.color||"#FFFFFF00");m.value=e,v.value=t,h.value=a,f.value=n});const{r:g,g:y,b:b,a:x}=A(l.color||"#FFFFFF00");m.value=g,v.value=y,h.value=b,f.value=x,De(()=>{const{h:e,s:t,v:l}=N(m.value,v.value,h.value);c.value=e,d.value=t,p.value=l,s.value=`top: ${100-100*l}%;left: ${100*t}%;`,r.value=`left: ${c.value/360*100}%;`,u.value=`left: ${f.value>=1?"calc(100% - 6px)":100*f.value+"%"};`});const w=de(()=>{const e=m.value,t=v.value,l=h.value,a=f.value,n=c.value,o=d.value,i=p.value;return{rgb:`rgba(${e},${t},${l})`,rgba:`rgba(${e},${t},${l},${a})`,hex6:P(e,t,l),hex8:P(e,t,l,a),hsv:`hsv(${n},${o},${i})`,hsl:""}});function k(e){const t=e.target.value;if(/^#?([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t)){let{r:e,g:l,b:a,a:n}=U(t);m.value=e,v.value=l,h.value=a,f.value=n}}function C(e){const t=e.target.value;if(""!==t){const e=parseInt(t);e>255&&(m.value=255),e<0&&(m.value=0),e>=0&&e<=255&&(m.value=e)}}function _(e){const t=e.target.value;if(""!==t){const e=parseInt(t);e>255&&(v.value=255),e<0&&(v.value=0),e>=0&&e<=255&&(v.value=e)}}function S(e){const t=e.target.value;if(""!==t){const e=parseInt(t);e>255&&(h.value=255),e<0&&(h.value=0),e>=0&&e<=255&&(h.value=e)}}function E(e){const t=e.target.value;if(""!==t){const e=parseFloat(t);f.value=e,e>1&&(f.value=1),e<0&&(f.value=0),e>=0&&e<=1&&(f.value=e)}}function O(e){if(!n.value)return;const t=n.value.clientWidth,l=n.value.clientHeight;let a=e.pageX-n.value.getBoundingClientRect().left,o=e.pageY-n.value.getBoundingClientRect().top;a=a<t&&a>0?a:a>t?t:0,o=o<l&&o>0?o:o>l?l:0,d.value=Math.floor(a/t*100+.5)/100,p.value=Math.floor(100*(1-o/l)+.5)/100;const{r:i,g:r,b:u}=R(c.value,d.value,p.value);m.value=i,v.value=r,h.value=u,s.value=`top: ${o}px;left: ${a}px;`}function I(e){O(e),window.addEventListener("mousemove",O),window.addEventListener("mouseup",T),u.value="left: calc(100% - 6px);",f.value=1}function T(){window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",T)}function F(e){let t=o.value.clientWidth,l=e.pageX-n.value.getBoundingClientRect().left;l=l<t&&l>0?l:l>t?t:0,c.value=Math.floor(l/t*360+.5);let{r:a,g:i,b:s}=R(c.value,d.value,p.value);m.value=a,v.value=i,h.value=s,r.value=`left: ${l>=t-6?t-6:l}px;`}function L(e){F(e),window.addEventListener("mousemove",F),window.addEventListener("mouseup",D)}function D(){window.removeEventListener("mousemove",F),window.removeEventListener("mouseup",D)}function B(e){let t=i.value.clientWidth,l=e.pageX-n.value.getBoundingClientRect().left;l=l<t&&l>0?l:l>t?t:0,f.value=Math.floor(l/t*100+.5)/100,u.value=`left: ${l>=t-6?t-6:l}px;`}function M(e){B(e),window.addEventListener("mousemove",B),window.addEventListener("mouseup",j)}function j(){window.removeEventListener("mousemove",B),window.removeEventListener("mouseup",j)}function A(e){if(e){let t,l,a,n;return"string"==typeof e?/^#?([0-9a-fA-F]{6}|[0-9a-fA-F]{8}|[0-9a-fA-F]{3}|[0-9a-fA-F]{4})$/.test(e)?U(e):function(e){const t=e.match(/^rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(?:,\s*([\d.]+))?\)$/);if(t){const e=t[4]?parseFloat(t[4]):1;return{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10),a:e}}throw new Error("Invalid RGBA string")}(e):(t=e.r>255?255:e.r<0?0:e.r,l=e.g>255?255:e.g<0?0:e.g,a=e.b>255?255:e.b<0?0:e.b,n=e.a>1?1:e.a<0?0:e.a,{r:t,g:l,b:a,a:n})}return{r:0,g:0,b:0,a:1}}function R(e,t,l){360===e&&(e=0);let a=Math.floor(e/60)%6,n=e/60-a,o=l*(1-t),i=l*(1-t*n),s=l*(1-t*(1-n)),r=0,u=0,c=0;return 0===a?(r=l,u=s,c=o):1===a?(r=i,u=l,c=o):2===a?(r=o,u=l,c=s):3===a?(r=o,u=i,c=l):4===a?(r=s,u=o,c=l):5===a&&(r=l,u=o,c=i),r=Math.floor(255*r+.5),u=Math.floor(255*u+.5),c=Math.floor(255*c+.5),{r:r,g:u,b:c}}function N(e,t,l){let a,n,o=e/255,i=t/255,s=l/255,r=Math.max(o,i,s),u=r-Math.min(o,i,s),c=0;return 0===u?c=0:r===o?c=(60*(i-s)/u+360)%360:r===i?c=60*((s-o)/u+2):r===s&&(c=60*((o-i)/u+4)),a=0===r?0:u/r,n=r,c=Math.floor(c+.5),a=Math.floor(100*a+.5)/100,n=Math.floor(100*n+.5)/100,{h:c,s:a,v:n}}function P(e,t,l,a=1){let n=2!==(e=parseInt(e)).toString(16).length?"0"+e.toString(16):e.toString(16),o=2!==(t=parseInt(t)).toString(16).length?"0"+t.toString(16):t.toString(16),i=2!==(l=parseInt(l)).toString(16).length?"0"+l.toString(16):l.toString(16),s="";if(1!==(a=parseFloat(a))){let e=Math.floor(256*a);s=2!==e.toString(16).length?"0"+e.toString(16):e.toString(16)}return`#${n}${o}${i}${s}`.toUpperCase()}function U(e){if(/^#?[0-9a-fA-F]{3}$/.test(e)){let t=e.substring(e.length-1,e.length),l=e.substring(e.length-2,e.length-1),a=e.substring(e.length-3,e.length-2);return U(`${a+a}${l+l}${t+t}`)}if(/^#?[0-9a-fA-F]{4}$/.test(e)){let t=e.substring(e.length-1,e.length),l=e.substring(e.length-2,e.length-1),a=e.substring(e.length-3,e.length-2),n=e.substring(e.length-4,e.length-3);return U(`${n+n}${a+a}${l+l}${t+t}`)}if(/^#?[0-9a-fA-F]{6}$/.test(e)){let t=parseInt("0x"+e.substring(e.length-2,e.length)),l=parseInt("0x"+e.substring(e.length-4,e.length-2));return{r:parseInt("0x"+e.substring(e.length-6,e.length-4)),g:l,b:t,a:1}}if(/^#?[0-9a-fA-F]{8}$/.test(e)){let t=parseInt("0x"+e.substring(e.length-2,e.length));t/=255;let l=parseInt("0x"+e.substring(e.length-4,e.length-2)),a=parseInt("0x"+e.substring(e.length-6,e.length-4));return{r:parseInt("0x"+e.substring(e.length-8,e.length-6)),g:a,b:l,a:t}}}return Ze(()=>w.value.hex8,()=>{a("update:color",{r:m.value,g:v.value,b:h.value,a:f.value},w.value.hex8);const{h:e,s:t,v:l}=N(m.value,v.value,h.value);c.value=e,d.value=t,p.value=l,s.value=`top: ${100-100*l}%;left: ${100*t}%;`,r.value=`left: ${c.value/360*100}%;`}),(t,l)=>{const a=ze("a-popover");return Me(),me(a,{placement:e.placement,trigger:"click","overlay-class-name":"color-picker__popover"},{content:tt(()=>[fe("div",{class:"color-picker",style:Fe({"--w":e.width+"px"})},[fe("div",{ref_key:"saturationRef",ref:n,class:"color-picker-saturation",onMousedown:I},[fe("div",{style:Fe(`background-color: hsl(${c.value}, 100%, 50%);`)},[fe("div",{class:"point",style:Fe(s.value)},null,4)],4),l[0]||(l[0]=fe("div",{class:"color-picker-saturation-t"},null,-1)),l[1]||(l[1]=fe("div",{class:"color-picker-saturation-h"},null,-1))],544),fe("div",gi,[fe("div",yi,[fe("div",{ref_key:"hueSliderRef",ref:o,class:"hue-slider",onMousedown:L},[fe("div",{class:"slider",style:Fe(r.value)},null,4)],544),fe("div",{ref_key:"alphaSliderRef",ref:i,class:"alpha-slider",onMousedown:M},[fe("div",{class:"slider",style:Fe(u.value)},null,4),fe("div",{style:Fe(`background: linear-gradient(to right, rgba(0,0,0,0), ${w.value.rgb});width: 100%;height: 100%`)},null,4)],544)]),fe("div",bi,[fe("div",{style:Fe(`background-color: ${w.value.rgba};width: 100%;height: 100%;box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), inset 0 0 4px rgba(0, 0, 0, .25);`)},null,4)])]),fe("div",xi,[fe("div",wi,[fe("label",null,[fe("input",{value:w.value.hex8,spellcheck:"false",onInput:k},null,40,ki)]),l[2]||(l[2]=fe("p",null,"Hex",-1))]),fe("div",Ci,[fe("label",null,[fe("input",{value:m.value,onInput:C},null,40,_i)]),l[3]||(l[3]=fe("p",null,"R",-1))]),fe("div",Si,[fe("label",null,[fe("input",{value:v.value,onInput:_},null,40,Ei)]),l[4]||(l[4]=fe("p",null,"G",-1))]),fe("div",Oi,[fe("label",null,[fe("input",{value:h.value,onInput:S},null,40,Ii)]),l[5]||(l[5]=fe("p",null,"B",-1))]),fe("div",Ti,[fe("label",null,[fe("input",{value:f.value,onInput:E},null,40,Fi)]),l[6]||(l[6]=fe("p",null,"A",-1))])]),fe("div",Li,[l[7]||(l[7]=fe("div",{class:"title"},"推荐颜色",-1)),fe("ul",Di,[(Me(!0),he(ce,null,Pe(e.preset,e=>(Me(),he("li",{key:e,style:Fe(`background-color: ${e}`),onClick:t=>function(e){if(/^#?([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e)){let{r:t,g:l,b:a,a:n}=U(e);m.value=t,v.value=l,h.value=a,f.value=n,u.value="left: calc(100% - 6px);",f.value=1}}(e)},null,12,Bi))),128))])])],4)]),default:tt(()=>[e.useTrigger?Ue(t.$slots,"trigger",{key:0},void 0,!0):(Me(),he("div",vi,[fe("div",hi,[fe("div",fi,[Ue(t.$slots,"icon",{},void 0,!0)])])]))]),_:3},8,["placement"])}}}),ji=/* @__PURE__ */C(Mi,[["__scopeId","data-v-7bfd9ca3"]]),Ai={FIRST:"first",BEFORE:"before",AFTER:"after",LAST:"last"},Ri=/* @__PURE__ */we({name:"GctDndItem",props:{config:{type:Object,required:!0},index:{type:Number,required:!0},data:{type:Object,required:!0},last:{type:Boolean,default:!1}},emits:["drop"],setup(e,{emit:t}){const{config:l}=e,a=re("dnd-item"),n=Re(null),o=Re(!1),i=_e("vue3-dnd-drop-line-state"),s=Re(-1),[r,u,c]=p({type:l.group,item:()=>({index:e.index,id:e.data.id,data:e.data,group:l.group,mode:l.mode??"move",tagMap:l.tagMap??{},types:[]}),collect:e=>({canDrag:e.canDrag(),isDragging:e.isDragging()}),canDrag:()=>!1!==l.isDrag&&(!l.canDrag||l.canDrag(e.data)),end:async(e,t)=>{const a=t.getDropResult();if(a&&a.asyncDrop){const t=await a.asyncDrop();!0===t.success&&t.data&&(l.end&&l.end(e,t),l.add&&l.add(t.data),console.debug("drop success"))}}});if(!0!==e.config.isDrop){const[e,t]=d({accept:l.group,canDrop:()=>!1});t(n)}else{const[t,a]=d({accept:l.group,collect:e=>({handlerId:e.getHandlerId(),isOver:e.isOver(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0})}),canDrop:(t,l)=>!0!==r.value.isDragging&&t.id!==e.data.id&&l.isOver({shallow:!0}),hover(t,a){if(!1!==a.canDrop())if(a.isOver({shallow:!0})){const t=n.value.getBoundingClientRect(),s=a.getClientOffset(),r=l.offset??0;let u=0;if("vertical"===l.direction){const{top:e,height:l}=t,{y:a}=s;if(u=a-e-l/2,Math.abs(u)<r)return;o.value=u<0}else if("horizontal"===l.direction){const{left:e,width:l}=t,{x:a}=s;if(u=a-e-l/2,Math.abs(u)<r)return;o.value=u<0}i.activeKey=e.data.id,i.isBeforeHover=o.value}else i.activeKey=""},drop:(a,n)=>{if(i.activeKey="",!0===t.value.isShallowOver&&!1!==n.canDrop())return{asyncDrop:async()=>{let t=a.data;return l.drop&&(t=await l.drop(a),!t)?{group:l.group,cfg:ot(e.config),success:!1}:(m(o.value?Ai.BEFORE:Ai.AFTER,t),{group:l.group,success:!0,cfg:ot(e.config),data:t})}}}});a(n)}function m(e,l){t("drop",e,l)}return l.handle||!1===l.isDrag||u(n),c(n),{ns:a,rootRef:n,posState:s,collect:r,onDrop:m,drag:u}},render(){var e,t;const l={index:this.index,data:this.data,drag:this.drag};return be("div",{ref:"rootRef",class:[this.ns.b(),this.ns.is("dragging",this.collect.isDragging),this.ns.is("not-drag",!1===this.collect.canDrag)]},[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t,l)])}}),Ni=/* @__PURE__ */we({name:"GctDndDropLine",props:{config:{type:Object,required:!0},active:{type:Boolean,default:!1}},emits:["drop"],setup(e,{emit:t}){const{config:l}=e,a=re("dnd-drop-line"),n=Re(null),[o,i]=d({accept:e.config.group,collect:e=>({handlerId:e.getHandlerId(),isOver:e.isOver(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0})}),canDrop:e=>!1!==l.isDrop&&(!l.canDrop||l.canDrop(e)),drop:(a,n)=>{if(!0===o.value.isShallowOver&&!1!==n.canDrop())return{asyncDrop:async()=>{let n=a.data;return l.drop&&(n=await l.drop(a),!n)?{group:l.group,cfg:ot(e.config),success:!1}:(t("drop",n),{group:l.group,success:!0,cfg:ot(e.config),data:n})}}}});return!1!==l.isDrop&&i(n),{ns:a,rootRef:n,collect:o}},render(){return be("div",{ref:"rootRef",class:[this.collect.handlerId,this.ns.b(),this.ns.is("over",this.collect.isOver&&this.collect.canDrop),this.ns.is("shallow-over",this.collect.isShallowOver&&this.collect.canDrop),this.ns.is("not-drop",!1===this.collect.canDrop&&this.collect.isShallowOver),this.ns.is("active",this.active)]},[be("div",{class:this.ns.e("line")},null)])}}),Pi=/* @__PURE__ */we({name:"GctDndContainer",props:{config:{type:Object,default:()=>({group:"GctDnd",insertPos:Ai.LAST})},items:{type:Array,default:()=>[]}},emits:["update:items"],setup(e,{emit:t}){const{config:l}=e,a=re("dnd-container"),n=Re(null),o=Ae({activeKey:"",isBeforeHover:!1});je("vue3-dnd-drop-line-state",o);const i=qe(e.items),[s,r]=d({accept:l.group,collect:e=>({handlerId:e.getHandlerId(),isOver:e.isOver(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0})}),canDrop:e=>!1!==l.isDrop&&(!l.canDrop||l.canDrop(e)),drop:(a,n)=>{if(!0===s.value.isShallowOver&&!1!==n.canDrop())return{asyncDrop:async()=>{let n=a.data;return l.drop&&(n=await l.drop(a),!n)?{group:l.group,success:!1,cfg:ot(e.config)}:(-1===i.value.findIndex(e=>e.id===a.data.id)&&u(e.config.insertPos,n),t("update:items",i.value),{group:l.group,success:!0,cfg:ot(e.config),data:n})}}}});function u(e,l,a=-1){if(l){if(e===Ai.FIRST)i.value.unshift(l);else if(e===Ai.LAST)i.value.push(l);else{if(-1===a)return void console.error("insertIndex is required");const t=i.value.findIndex(e=>e.id===l.id);if(t===a)return;-1!==t&&a<t&&i.value.splice(t,1),e===Ai.AFTER?i.value.splice(a+1,0,l):i.value.splice(a,0,l),-1!==t&&a>t&&i.value.splice(t,1)}t("update:items",i.value)}else console.error("data is required")}return!1!==l.isDrop&&r(n),Ze(s,()=>{!0!==s.value.isOver&&(o.activeKey="")}),{ns:a,rootRef:n,dropLineState:o,collect:s,onDrop:u}},render(){var e,t,l,a;const n=this.items[this.items.length-1];return be("div",{ref:"rootRef",class:[this.collect.handlerId,this.ns.b(),this.ns.is("over",this.collect.isOver&&this.collect.canDrop),this.ns.is("not-drop",!1===this.collect.canDrop&&this.collect.isOver),this.ns.is("shallow-over",this.collect.isShallowOver&&this.collect.canDrop)]},[null===(e=(t=this.$slots).before)||void 0===e?void 0:e.call(t),this.items.map((e,t)=>{const l=this.items[t-1],a=[];return!1!==this.config.isDrop&&a.push(be(Ni,{key:e.id+"___line",config:this.config,active:!0===this.dropLineState.isBeforeHover&&this.dropLineState.activeKey===e.id||l&&this.dropLineState.activeKey===l.id&&!1===this.dropLineState.isBeforeHover,onDrop:e=>this.onDrop(Ai.BEFORE,e,t)},null)),a.push(be(Ri,{key:e.id,config:this.config,index:t,data:e,last:t===this.items.length-1,onDrop:(e,l)=>this.onDrop(e,l,t)},{default:this.$slots.default})),a}),n?be(Ni,{key:n.id+"___last-line",config:this.config,active:this.dropLineState.activeKey===n.id&&!1===this.dropLineState.isBeforeHover,onDrop:e=>this.onDrop(Ai.AFTER,e,this.items.length-1)},null):null,null===(l=(a=this.$slots).after)||void 0===l?void 0:l.call(a)])}}),Ui={visible:{type:Boolean},scrollTop:{type:Boolean,default:!0},height:{type:Number},outHeight:{type:Number},minHeight:{type:Number},draggable:{type:Boolean,default:!0},centered:{type:Boolean},cancelText:{type:String,default:"sys.cancelText"},okText:{type:String,default:"sys.okText"},closeFunc:Function},zi=Object.assign({},Ui,{defaultFullscreen:{type:Boolean},canFullscreen:{type:Boolean,default:!0},wrapperFooterOffset:{type:Number,default:0},helpMessage:[String,Array],useWrapper:{type:Boolean,default:!0},loading:{type:Boolean},loadingTip:{type:String},showCancelBtn:{type:Boolean,default:!0},showOkBtn:{type:Boolean,default:!0},wrapperProps:Object,afterClose:Function,bodyStyle:Object,closable:{type:Boolean,default:!0},closeIcon:Object,confirmLoading:{type:Boolean},destroyOnClose:{type:Boolean},footer:Object,getContainer:Function,mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!1},keyboard:{type:Boolean,default:!0},maskStyle:Object,okType:{type:String,default:"primary"},okButtonProps:Object,cancelButtonProps:Object,title:{type:String},visible:{type:Boolean},width:[String,Number],wrapClassName:{type:String},zIndex:{type:Number}});function $i(e){const t=(e,t)=>getComputedStyle(e)[t],l=l=>{if(!l)return;l.setAttribute("data-drag",We(e.draggable));const a=l.querySelector(".ant-modal-header"),n=l.querySelector(".ant-modal");a&&n&&We(e.draggable)&&(a.style.cursor="move",a.onmousedown=e=>{if(!e)return;const l=e.clientX,a=e.clientY,o=document.body.clientWidth,i=document.documentElement.clientHeight,s=n.offsetWidth,r=n.offsetHeight,u=n.offsetLeft,c=o-n.offsetLeft-s,d=n.offsetTop,p=i-n.offsetTop-r,m=t(n,"left"),v=t(n,"top");let h=+m,f=+v;m.includes("%")?(h=+document.body.clientWidth*(+m.replace(/%/g,"")/100),f=+document.body.clientHeight*(+v.replace(/%/g,"")/100)):(h=+m.replace(/px/g,""),f=+v.replace(/px/g,"")),document.onmousemove=function(e){let t=e.clientX-l,o=e.clientY-a;-t>u?t=-u:t>c&&(t=c),-o>d?o=-d:o>p&&(o=p),n.style.cssText+=`;left:${t+h}px;top:${o+f}px;`},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}})};et(()=>{We(e.visible)&&We(e.draggable)&&a(()=>{(()=>{const a=document.querySelectorAll(".ant-modal-wrap");for(const n of Array.from(a)){if(!n)continue;const a=t(n,"display"),o=n.getAttribute("data-drag");"none"!==a&&(null===o||We(e.destroyOnClose))&&l(n)}})()},30)})}var Vi=/* @__PURE__ */we({name:"GlobalModal",inheritAttrs:!1,props:zi,emits:["cancel"],setup(e,{slots:t,emit:l,attrs:a}){const{visible:n,draggable:o,destroyOnClose:i}=Ye(e);$i({visible:n,destroyOnClose:i,draggable:o});const s=e=>{l("cancel",e)};return()=>Ce(Ot,{...a,...e,onCancel:s},t)}}),Hi=Symbol();function Ki(){return _e(Hi)}var Gi={loading:{type:Boolean},useWrapper:{type:Boolean,default:!0},modalHeaderHeight:{type:Number,default:57},modalFooterHeight:{type:Number,default:74},minHeight:{type:Number,default:320},height:{type:Number},footerOffset:{type:Number,default:0},visible:{type:Boolean},fullScreen:{type:Boolean},loadingTip:{type:String}},qi=we({name:"ModalWrapper",inheritAttrs:!1,props:Gi,emits:["height-change","ext-height"],setup(e,{emit:l}){const a=Re(),n=Re(null),o=Re(0),i=Re(0),s=re("basic-modal-wrapper");let r=0;const u=Re(),{width:c,height:d}=t();Ze([d,c],()=>{m()}),O(n,()=>{m()},{attributes:!0,subtree:!0}),je(Hi,{redoModalHeight:m});const p=de(()=>{const t=.88*window.innerHeight-120;return{height:`${e.height?t>e.height-120?e.height-120:t:e.height}px`}});async function m(){var t;if(!e.visible)return;if(!a.value)return;const i=null===(t=a.value)||void 0===t||null===(t=t.getElement())||void 0===t?void 0:t.parentElement;if(i){i.style.padding="0",await Ie();try{const t=i.parentElement&&i.parentElement.parentElement;if(!t)return;const a=getComputedStyle(t).top,s=Number.parseInt(a);let u=window.innerHeight-2*s+(e.footerOffset||0)-e.modalFooterHeight-e.modalHeaderHeight;s<40&&(u-=26),await Ie();const c=We(n);if(!c)return;await Ie(),r=c.scrollHeight,e.fullScreen?o.value=window.innerHeight-e.modalFooterHeight-e.modalHeaderHeight-28:o.value=e.height?e.height:r>u?u:r,l("height-change",We(o))}catch(s){console.error(s)}}}return et(()=>{e.useWrapper&&m()}),Ze(()=>e.fullScreen,e=>{m(),e?i.value=o.value:o.value=i.value}),new ResizeObserver(t=>{for(let l of t){const t=.88*l.contentRect.height-152;u.value={height:`${e.height?t>e.height-152?e.height-152:t:e.height}px`,minHeight:e.minHeight-152+"px",[e.fullScreen?"height":"maxHeight"]:`${We(o)}px`,maxHeight:"calc(88vh - 152px)"}}}).observe(document.documentElement),De(()=>{const{modalHeaderHeight:t,modalFooterHeight:a}=e;l("ext-height",t+a)}),Be(()=>{}),{ns:s,wrapperRef:a,spinRef:n,spinStyle:u,scrollTop:async function(){Ie(()=>{var e;a.value&&(null===(e=a.value.getElement())||void 0===e||e.scrollTo(0,0))})},setModalHeight:m,scrollHeight:p}}}),Yi=["loading-tip"],Wi=/* @__PURE__ */C(qi,[["render",function(e,t,l,a,n,o){const i=ze("overlayScrollbarsComponent"),s=$e("target-loading");return Me(),me(i,{ref:"wrapperRef",class:Te(e.ns.b("scrollbar"))},{default:tt(()=>[lt((Me(),he("div",{ref:"spinRef",style:Fe(e.spinStyle),"loading-tip":e.loadingTip,class:Te(e.ns.b())},[Ue(e.$slots,"default")],14,Yi)),[[s,e.loading]])]),_:3},8,["class"])}]]),Ji=/* @__PURE__ */we({__name:"ModalClose",props:{canFullscreen:{type:Boolean,default:!0},fullScreen:{type:Boolean}},emits:["cancel","fullscreen"],setup(e,{emit:t}){const l=e,a=t,n=re("basic-modal-close"),o=de(()=>[n.b(),`${n.b()}--custom`,{[`${n.b()}--can-full`]:l.canFullscreen}]);function i(e){a("cancel",e)}function s(e){null==e||e.stopPropagation(),null==e||e.preventDefault(),a("fullscreen")}return(t,l)=>(Me(),he("div",{class:Te(o.value)},[e.canFullscreen?(Me(),he(ce,{key:0},[e.fullScreen?(Me(),me(We(Bt),{key:0,title:We(ne)("sys.component.modal.restore"),placement:"bottom"},{default:tt(()=>[be(We(Qt),{role:"full",onClick:s})]),_:1},8,["title"])):(Me(),me(We(Bt),{key:1,title:We(ne)("sys.component.modal.maximize"),placement:"bottom"},{default:tt(()=>[be(We(Zt),{role:"close",onClick:s})]),_:1},8,["title"]))],64)):ve("",!0),be(We(Bt),{title:We(ne)("sys.component.modal.close"),placement:"bottom"},{default:tt(()=>[be(We(Yt),{onClick:i})]),_:1},8,["title"])],2))}}),Xi=Ji,Qi=/* @__PURE__ */we({__name:"ModalFooter",props:zi,emits:["ok","cancel"],setup(e,{emit:t}){const l=t;function a(e){l("ok",e)}function n(e){l("cancel",e)}return(e,t)=>(Me(),he("div",null,[Ue(e.$slots,"insertFooter"),e.showCancelBtn?(Me(),me(We(bt),Oe({key:0},e.cancelButtonProps,{onClick:n}),{default:tt(()=>[ye(Ke(We(ne)(e.cancelText)),1)]),_:1},16)):ve("",!0),Ue(e.$slots,"centerFooter"),e.showOkBtn?(Me(),me(We(bt),Oe({key:1,type:e.okType,loading:e.confirmLoading},e.okButtonProps,{onClick:a}),{default:tt(()=>[ye(Ke(We(ne)(e.okText)),1)]),_:1},16,["type","loading"])):ve("",!0),Ue(e.$slots,"appendFooter")]))}}),Zi=we({name:"BasicModalHeader",props:{helpMessage:{type:[String,Array]},title:{type:String}}}),es=["help-message"],ts=/* @__PURE__ */C(Zi,[["render",function(e,t,l,a,n,o){return Me(),he("div",{"help-message":e.helpMessage},Ke(e.title),9,es)}]]),ls=/* @__PURE__ */we({name:"BasicModal",__name:"BasicModal",props:zi,emits:["visible-change","height-change","cancel","ok","register","update:visible"],setup(e,{emit:t}){const l=Je(),a=e,n=t,o=Re(!1),i=Re(null),s=Re(null),r=re("basic-modal"),u=Re(0),c={setModalProps:function(e){i.value=Q(We(i)||{},e),Reflect.has(e,"visible")&&(o.value=!!e.visible),Reflect.has(e,"defaultFullscreen")&&(h.value=!!e.defaultFullscreen)},emitVisible:void 0,redoModalHeight:()=>{Ie(()=>{We(s)&&We(s).setModalHeight()})}},d=ke();d&&n("register",c,d.uid);const p=de(()=>({...a,height:a.outHeight?a.outHeight:a.height&&a.height+120,...We(i)})),{handleFullScreen:m,getWrapClassName:v,fullScreenRef:h}=function(e){const t=Re(!1);return{getWrapClassName:de(()=>{const l=We(e.wrapClassName)||"";return We(t)?`fullscreen-modal ${l} `:We(l)}),handleFullScreen:function(e){null==e||e.stopPropagation(),t.value=!We(t)},fullScreenRef:t}}({modalWrapperRef:s,extHeightRef:u,wrapClassName:Re(`vben ${qe(p.value,"wrapClassName")}`)}),f=de(()=>({...We(p),visible:We(o),okButtonProps:void 0,cancelButtonProps:void 0,title:void 0,wrapClassName:We(v)})),g=de(()=>{const e={...l,...We(p),visible:We(o)};return e.wrapClassName=`${(null==e?void 0:e.wrapClassName)||""} ${We(v)}`,We(h)?gt(e,["height","title"]):gt(e,"title")}),y=de(()=>{if(!We(h))return We(f).height});async function b(e){var t;null==e||e.stopPropagation(),(null===(t=e.target)||void 0===t||null===(t=t.classList)||void 0===t?void 0:t.contains(r.b()+"-close--custom"))||(a.closeFunc&&vt(a.closeFunc)?o.value=!(await a.closeFunc()):(o.value=!1,n("cancel",e)))}function x(e){n("ok",e)}function w(e){n("height-change",e)}function k(e){u.value=e}function C(e){a.canFullscreen&&(e.stopPropagation(),m(e))}return et(()=>{o.value=!!a.visible,h.value=!!a.defaultFullscreen}),Ze(()=>We(o),e=>{var t;n("visible-change",e),n("update:visible",e),d&&(null===(t=c.emitVisible)||void 0===t||t.call(c,e,d.uid)),Ie(()=>{a.scrollTop&&e&&We(s)&&We(s).scrollTop()}),a.destroyOnClose&&!1===e&&(h.value=a.defaultFullscreen)},{immediate:!1}),(e,t)=>(Me(),me(We(Vi),Oe(g.value,{onCancel:b}),ge({default:tt(()=>[e.$slots.closeIcon?Ue(e.$slots,"closeIcon",{key:0}):ve("",!0),e.$slots.title?Ue(e.$slots,"title",{key:1}):ve("",!0),e.$slots.footer?Ue(e.$slots,"footer",{key:2}):ve("",!0),be(Wi,Oe({ref_key:"modalWrapperRef",ref:s,"use-wrapper":f.value.useWrapper,"footer-offset":e.wrapperFooterOffset,"full-screen":We(h),loading:f.value.loading,"loading-tip":f.value.loadingTip,"min-height":f.value.minHeight,height:y.value,visible:o.value,"modal-footer-height":void 0===e.footer||e.footer?void 0:0},We(gt)(f.value.wrapperProps,"visible","height","modalFooterHeight"),{onExtHeight:k,onHeightChange:w}),{default:tt(()=>[Ue(e.$slots,"default")]),_:3},16,["use-wrapper","footer-offset","full-screen","loading","loading-tip","min-height","height","visible","modal-footer-height"])]),_:2},[e.$slots.closeIcon?void 0:{name:"closeIcon",fn:tt(()=>[be(Xi,{"can-fullscreen":f.value.canFullscreen,"full-screen":We(h),onCancel:b,onFullscreen:We(m)},null,8,["can-fullscreen","full-screen","onFullscreen"])]),key:"0"},e.$slots.title?void 0:{name:"title",fn:tt(()=>[be(ts,{"help-message":f.value.helpMessage,title:p.value.title,onDblclick:C},null,8,["help-message","title"])]),key:"1"},e.$slots.footer?void 0:{name:"footer",fn:tt(()=>[be(Qi,Oe(g.value,{onOk:x,onCancel:b}),null,16)]),key:"2"}]),1040))}}),as=ls,ns=Ae({}),os=Ae({});function is(){const e=Re(null),t=Re(!1),l=Re(""),a=()=>{const t=We(e);if(!t)throw new Error("useModal instance is undefined!");return t};return[function(a,n){if(!ke())throw new Error("useModal() can only be used inside setup() or functional components!");l.value=n||"",Be(()=>{e.value=null,t.value=!1,ns[We(l)]=null}),We(t)&&a===We(e)||(e.value=a,t.value=!0,a.emitVisible=(e,t)=>{os[t]=e})},{setModalProps:e=>{var t;null===(t=a())||void 0===t||t.setModalProps(e)},getVisible:de(()=>os[~~We(l)]),redoModalHeight:()=>{var e,t;null===(e=a())||void 0===e||null===(t=e.redoModalHeight)||void 0===t||t.call(e)},openModal:(e=!0,t,n=!0)=>{var o;null===(o=a())||void 0===o||o.setModalProps({visible:e});const i=We(l);if(n)return ns[i]=null,void(ns[i]=Ge(t));mt(Ge(ns[i]),Ge(t))||(ns[i]=Ge(t))},closeModal:()=>{var e;null===(e=a())||void 0===e||e.setModalProps({visible:!1})}}]}var ss=e=>{const t=Re(null),l=ke(),a=Re(""),n=()=>{const e=We(t);if(!e)throw new Error("useModalInner instance is undefined!");return e};return et(()=>{const t=ns[We(a)];e&&vt(e)&&Ie(()=>{e(t)})}),[(e,n)=>{E(()=>{t.value=null}),a.value=n||"",t.value=e,null==l||l.emit("register",e,n)},{changeLoading:(e=!0)=>{var t;null===(t=n())||void 0===t||t.setModalProps({loading:e})},getVisible:de(()=>os[~~We(a)]),changeOkLoading:(e=!0)=>{var t;null===(t=n())||void 0===t||t.setModalProps({confirmLoading:e})},closeModal:()=>{var e;null===(e=n())||void 0===e||e.setModalProps({visible:!1})},setModalProps:e=>{var t;null===(t=n())||void 0===t||t.setModalProps(e)},redoModalHeight:()=>{var e;const t=null===(e=n())||void 0===e?void 0:e.redoModalHeight;null==t||t()}}]},rs=r(as),us={aspectRatio:1,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,autoCrop:!0,background:!0,highlight:!0,center:!0,responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,scalable:!0,modal:!0,guides:!0,movable:!0,rotatable:!0},cs={src:{type:String,required:!0},alt:{type:String},circled:{type:Boolean,default:!1},realTimePreview:{type:Boolean,default:!0},height:{type:[String,Number],default:"360px"},width:{type:[String,Number],default:"360px"},crossorigin:{type:String,default:void 0},imageStyle:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})}},ds=we({name:"CropperImage",props:cs,emits:["cropend","ready","cropendError"],setup(t,{attrs:l,emit:a}){const n=Re(),o=Re(),s=Re(!1),r=re("cropper-image"),u=i(m,80),c=de(()=>({height:t.height,width:t.width,maxWidth:"100%",...t.imageStyle})),d=de(()=>[r.b(),l.class,{[r.m("circled")]:t.circled}]),p=de(()=>({height:`${t.height}`.replace(/px/,"")+"px",width:`${t.width}`.replace(/px/,"")+"px"}));function m(){t.realTimePreview&&v()}function v(){if(!o.value)return;let e=o.value.getData();(t.circled?function(){const e=o.value.getCroppedCanvas(),t=document.createElement("canvas"),l=t.getContext("2d"),a=e.width,n=e.height;return t.width=a,t.height=n,l.imageSmoothingEnabled=!0,l.drawImage(e,0,0,a,n),l.globalCompositeOperation="destination-in",l.beginPath(),l.arc(a/2,n/2,Math.min(a,n)/2,0,2*Math.PI,!0),l.fill(),t}():o.value.getCroppedCanvas()).toBlob(t=>{if(!t)return;let l=new FileReader;l.readAsDataURL(t),l.onloadend=t=>{var l;a("cropend",{imgBase64:(null===(l=t.target)||void 0===l?void 0:l.result)??"",imgInfo:e})},l.onerror=()=>{a("cropendError")}},"image/png")}return De(async function(){const l=We(n);if(!l)return;const[{default:i}]=await Promise.all([import("./cropper-DPh9NaIi.js").then(t=>/* @__PURE__ */e(t.default,1)),Promise.resolve({ })]);o.value=new i(l,{...us,ready:()=>{s.value=!0,m(),a("ready",o.value)},crop(){u()},zoom(){u()},cropmove(){u()},...t.options})}),Be(()=>{var e;null===(e=o.value)||void 0===e||e.destroy()}),{getClass:d,imgElRef:n,getWrapperStyle:p,getImageStyle:c,isReady:s,croppered:v}}}),ps=["src","alt","crossorigin"],ms=/* @__PURE__ */C(ds,[["render",function(e,t,l,a,n,o){return Me(),he("div",{class:Te(e.getClass),style:Fe(e.getWrapperStyle)},[lt(fe("img",{ref:"imgElRef",src:e.src,alt:e.alt,crossorigin:e.crossorigin,style:Fe(e.getImageStyle)},null,12,ps),[[Qe,e.isReady]])],6)}]]),vs={key:1,class:"empty"},hs={class:"flex flex-col justify-center items-center"},fs=["title"],gs=/* @__PURE__ */we({__name:"CopperFreeModal",props:{title:{type:String,default:"图片上传"},circled:{type:Boolean,default:!0},uploadApi:{type:Function},src:{type:String},aspectRatio:{type:Number},accept:{type:Array,default:["jpg","jpeg","png","bmp"]},beforeUpload:{type:Function},uploadText:{type:String}},emits:["uploadSuccess","register"],setup(e,{emit:t}){const l=e,a=t,n=Re(l.src||""),o=Re(l.src||""),i=Re(""),s=Re();let r=1,u=1,c="";const d=de(()=>l.accept.map(e=>`image/${e}`).join(",")),p=re("cropper-free"),[m,{closeModal:v,setModalProps:h}]=ss(e=>{(null==e?void 0:e.file)&&f(e.file)});async function f(e){if(l.beforeUpload&&await l.beforeUpload(e),e.size/1024/1024>4)return At.warn(`【${e.name}】文件大小不能超过 4MB`),!1;if(!d.value.includes(e.type))return At.warning(`【${e.name}】${ne("sys.component.cropper.acceptAvatarTypeTip")}`),!1;const t=new FileReader;return t.readAsDataURL(e),n.value="",i.value="",t.onload=function(t){var l;n.value=(null===(l=t.target)||void 0===l?void 0:l.result)??"",c=e.name},!1}function g({imgBase64:e}){i.value=e}function y(e){s.value=e}function b(e,t){var l,a;"scaleX"===e&&(r=t=-1===r?1:-1),"scaleY"===e&&(u=t=-1===u?1:-1),null===(l=s.value)||void 0===l||null===(a=l[e])||void 0===a||a.call(l,t)}async function x(){const e=l.uploadApi;if(e&&vt(e)){const t=X(i.value);try{h({confirmLoading:!0});const l=await e({name:"file",file:t,filename:c});a("uploadSuccess",{source:i.value,data:l.data.data}),v()}finally{h({confirmLoading:!1})}}}function w(){n.value="",setTimeout(()=>{n.value=o.value||""})}return Ze(()=>l.src,e=>{n.value=e||"",o.value=e||""}),(t,l)=>{const a=ze("PlusOutlined"),o=ze("a-button");return Me(),me(We(rs),Oe(t.$attrs,{title:e.title,width:"640px","min-height":"510","can-fullscreen":!1,"ok-text":We(ne)("sys.okText"),onRegister:We(m),onOk:x,onCancel:w}),{default:tt(()=>[fe("div",{class:Te(We(p).b())},[fe("div",{class:Te(We(p).b("left"))},[fe("div",{class:Te(We(p).b("cropper"))},[n.value?(Me(),me(ms,{key:0,src:n.value,height:"304px",width:"538px",options:{aspectRatio:e.aspectRatio??200/120},onCropend:g,onReady:y},null,8,["src","options"])):(Me(),he("div",vs,[be(We(jt),{"list-type":"picture-card","file-list":[],accept:"image/*","before-upload":f},{default:tt(()=>[fe("div",hs,[be(a),l[14]||(l[14]=fe("div",{class:"mt12px"},"点击或将图片拖拽到这里上传",-1)),l[15]||(l[15]=fe("div",{class:"color-[#8B8B8B] mt8px"}," 仅支持JPG、PNG、JPEG、BMP格式,文件小于4M ",-1))])]),_:1})]))],2),n.value?(Me(),he("div",{key:0,class:Te(We(p).b("toolbar"))},[be(We(jt),{"file-list":[],accept:d.value,"before-upload":f},{default:tt(()=>[e.uploadText?(Me(),me(o,{key:0,type:"link",size:"small",style:{padding:"0"}},{default:tt(()=>[ye(Ke(e.uploadText),1)]),_:1})):(Me(),he("a",{key:1,title:We(ne)("sys.reUpload"),placement:"bottom"},Ke(We(ne)("sys.reUpload")),9,fs))]),_:1},8,["accept"]),be(We(Lt),null,{default:tt(()=>[be(We(Bt),{title:We(ne)("sys.component.cropper.btn_zoom_in"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[0]||(l[0]=at(()=>{},["prevent"])),onClick:l[1]||(l[1]=e=>b("zoom",.1))},{icon:tt(()=>[...l[16]||(l[16]=[fe("i",{class:"iconfont icon-fangda_zoom-in"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_zoom_out"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[2]||(l[2]=at(()=>{},["prevent"])),onClick:l[3]||(l[3]=e=>b("zoom",-.1))},{icon:tt(()=>[...l[17]||(l[17]=[fe("i",{class:"iconfont icon-a-suoxiao_zoom-out1"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_rotate_left"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[4]||(l[4]=at(()=>{},["prevent"])),onClick:l[5]||(l[5]=e=>b("rotate",-45))},{icon:tt(()=>[...l[18]||(l[18]=[fe("i",{class:"iconfont icon-xuanzhuan_rotate"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_rotate_right"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[6]||(l[6]=at(()=>{},["prevent"])),onClick:l[7]||(l[7]=e=>b("rotate",45))},{icon:tt(()=>[...l[19]||(l[19]=[fe("i",{class:"iconfont icon-xuanzhuan_2"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_scale_x"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[8]||(l[8]=at(()=>{},["prevent"])),onClick:l[9]||(l[9]=e=>b("scaleX"))},{icon:tt(()=>[...l[20]||(l[20]=[fe("i",{class:"iconfont icon-shuipingfanzhuan_flip-horizontally"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_scale_y"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[10]||(l[10]=at(()=>{},["prevent"])),onClick:l[11]||(l[11]=e=>b("scaleY"))},{icon:tt(()=>[...l[21]||(l[21]=[fe("i",{class:"iconfont icon-chuizhifanzhuan_flip-vertically"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_reset"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[12]||(l[12]=at(()=>{},["prevent"])),onClick:l[13]||(l[13]=e=>b("reset"))},{icon:tt(()=>[be(We(tl))]),_:1},8,["disabled"])]),_:1},8,["title"])]),_:1})],2)):ve("",!0)],2)],2)]),_:1},16,["title","ok-text","onRegister"])}}}),ys=/* @__PURE__ */C(gs,[["__scopeId","data-v-9069f48a"]]),bs={key:1,class:"empty"},xs={class:"flex flex-col justify-center items-center"},ws=["title"],ks={class:"flex-col"},Cs={class:"flex-col"},_s={class:"flex-col text-center"},Ss=/* @__PURE__ */we({__name:"CopperModal",props:{circled:{type:Boolean,default:!0},uploadApi:{type:Function},src:{type:String},sourceUrlValue:{type:String}},emits:["uploadSuccess","register"],setup(e,{emit:t}){const l=e,a=t,n=Re(l.src||""),o=Re(""),i=Re();let s=1,r=1,u="";const c=re("cropper-am"),[d,{closeModal:p,setModalProps:m}]=ss();function v(e){if(e.size/1024/1024>4)return At.warn(`【${e.name}】文件大小不能超过 4MB`),!1;if(!["image/jpg","image/jpeg","image/png","image/bmp"].includes(e.type))return At.warning(`【${e.name}】${ne("sys.component.cropper.acceptAvatarTypeTip")}`),!1;const t=new FileReader;return t.readAsDataURL(e),n.value="",o.value="",t.onload=function(t){var l;n.value=(null===(l=t.target)||void 0===l?void 0:l.result)??"",u=e.name},!1}function h({imgBase64:e}){o.value=e}function f(e){i.value=e}function g(e,t){var l,a;"scaleX"===e&&(s=t=-1===s?1:-1),"scaleY"===e&&(r=t=-1===r?1:-1),null===(l=i.value)||void 0===l||null===(a=l[e])||void 0===a||a.call(l,t)}async function y(){const e=l.uploadApi;if(e&&vt(e)){const t=X(o.value);try{m({confirmLoading:!0});const l=await e({name:"file",file:t,filename:u});a("uploadSuccess",{source:o.value,data:l.data.data}),p()}finally{m({confirmLoading:!1})}}}return(t,l)=>{const a=ze("PlusOutlined"),i=ze("a-button"),s=ze("Avatar");return Me(),me(We(rs),Oe(t.$attrs,{title:We(ne)("sys.component.cropper.modalTitle"),width:"600px","min-height":"570","can-fullscreen":!1,"ok-text":We(ne)("sys.okText"),onRegister:We(d),onOk:y}),{default:tt(()=>[fe("div",{class:Te(We(c).b())},[fe("div",{class:Te(We(c).b("left"))},[fe("div",{class:Te(We(c).b("cropper"))},[n.value?(Me(),me(ms,{key:0,src:n.value,height:"360px",width:"360px",circled:e.circled,onCropend:h,onReady:f},null,8,["src","circled"])):ve("",!0),e.sourceUrlValue||"/404.png"!==n.value?ve("",!0):(Me(),he("div",bs,[be(We(jt),{"list-type":"picture-card","file-list":[],accept:"image/*","before-upload":v},{default:tt(()=>[fe("div",xs,[be(a),l[14]||(l[14]=fe("div",{class:"mt12px"},"点击或将图片拖拽到这里上传",-1)),l[15]||(l[15]=fe("div",{class:"color-[#8B8B8B] mt8px"}," 仅支持JPG、PNG、JPEG、BMP格式,文件小于4M ",-1))])]),_:1})]))],2),e.sourceUrlValue||"/404.png"!==n.value?(Me(),he("div",{key:0,class:Te(We(c).b("toolbar"))},[be(We(jt),{"file-list":[],accept:"image/*","before-upload":v},{default:tt(()=>[fe("a",{title:We(ne)("sys.reUpload"),placement:"bottom"},Ke(We(ne)("sys.reUpload")),9,ws)]),_:1}),be(We(Lt),null,{default:tt(()=>[be(We(Bt),{title:We(ne)("sys.component.cropper.btn_zoom_in"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[0]||(l[0]=at(()=>{},["prevent"])),onClick:l[1]||(l[1]=e=>g("zoom",.1))},{icon:tt(()=>[...l[16]||(l[16]=[fe("i",{class:"iconfont icon-fangda_zoom-in"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_zoom_out"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[2]||(l[2]=at(()=>{},["prevent"])),onClick:l[3]||(l[3]=e=>g("zoom",-.1))},{icon:tt(()=>[...l[17]||(l[17]=[fe("i",{class:"iconfont icon-a-suoxiao_zoom-out1"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_rotate_left"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[4]||(l[4]=at(()=>{},["prevent"])),onClick:l[5]||(l[5]=e=>g("rotate",-45))},{icon:tt(()=>[...l[18]||(l[18]=[fe("i",{class:"iconfont icon-xuanzhuan_rotate"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_rotate_right"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[6]||(l[6]=at(()=>{},["prevent"])),onClick:l[7]||(l[7]=e=>g("rotate",45))},{icon:tt(()=>[...l[19]||(l[19]=[fe("i",{class:"iconfont icon-xuanzhuan_2"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_scale_x"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[8]||(l[8]=at(()=>{},["prevent"])),onClick:l[9]||(l[9]=e=>g("scaleX"))},{icon:tt(()=>[...l[20]||(l[20]=[fe("i",{class:"iconfont icon-shuipingfanzhuan_flip-horizontally"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_scale_y"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[10]||(l[10]=at(()=>{},["prevent"])),onClick:l[11]||(l[11]=e=>g("scaleY"))},{icon:tt(()=>[...l[21]||(l[21]=[fe("i",{class:"iconfont icon-chuizhifanzhuan_flip-vertically"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Bt),{title:We(ne)("sys.component.cropper.btn_reset"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[12]||(l[12]=at(()=>{},["prevent"])),onClick:l[13]||(l[13]=e=>g("reset"))},{icon:tt(()=>[be(We(tl))]),_:1},8,["disabled"])]),_:1},8,["title"])]),_:1})],2)):ve("",!0)],2),fe("div",{class:Te([We(c).b("right"),"text-center"])},[l[22]||(l[22]=ye(" 预览 ",-1)),fe("div",{class:Te(We(c).b("group"))},[fe("div",ks,[be(s,{src:o.value,size:102},null,8,["src"])]),fe("div",Cs,[be(s,{src:o.value,size:78},null,8,["src"])]),fe("div",_s,[be(s,{src:o.value,size:28},null,8,["src"])])],2)],2)],2),l[23]||(l[23]=fe("div",{class:"absolute z-10 top-0 left-2/3 w-0 h-full",style:{"border-left":"1px solid #e0e3ea"}},null,-1))]),_:1},16,["title","ok-text","onRegister"])}}}),Es=/* @__PURE__ */C(Ss,[["__scopeId","data-v-f1134678"]]),Os=["src"],Is=/* @__PURE__ */we({__name:"CropperAvatar",props:{width:{type:[String,Number],default:"200px"},value:{type:String},showBtn:{type:Boolean,default:!0},btnProps:{type:Object},btnText:{type:String,default:""},uploadApi:{type:Function}},emits:["update:value","change"],setup(e,{expose:t,emit:l}){const a=e,n=l,o=Re("/extras-assets/images/default_avatar.png"),i=Re(oe(a.value)||""),s=Re(a.value||""),r=re("cropper-avatar"),[u,{openModal:c,closeModal:d}]=is(),p=de(()=>[r.b()]),m=de(()=>`${a.width}`.replace(/px/,"")+"px"),v=de(()=>parseInt(`${a.width}`.replace(/px/,""))/2+"px"),h=de(()=>({width:We(m)})),f=de(()=>({width:We(m),height:We(m)}));function g({source:e,data:t}){i.value=oe(t),s.value=t,n("change",{source:e,data:t})}et(()=>{i.value=oe(a.value)||"",s.value=a.value||""}),Ze(()=>s.value,e=>{n("update:value",e)});const y=()=>{c()};return t({openModal:c.bind(null,!0),closeModal:d}),(t,l)=>{const a=ze("a-button");return Me(),he("div",{class:Te(p.value),style:Fe(h.value)},[fe("div",{class:Te(We(r).b("image-wrapper")),style:Fe(f.value),onClick:y},[fe("div",{class:Te(We(r).b("image-mask")),style:Fe(f.value)},[be(We(Jt),{style:Fe({width:v.value,height:v.value}),"two-tone-color":"#d6d6d6"},null,8,["style"])],6),fe("img",{src:e.value?i.value:o.value,alt:"avatar"},null,8,Os)],6),e.showBtn?(Me(),me(a,Oe({key:0,class:We(r).b("upload-btn")},e.btnProps,{onClick:We(c)}),{default:tt(()=>[ye(Ke(e.btnText?e.btnText:We(ne)("sys.component.cropper.selectImage")),1)]),_:1},16,["class","onClick"])):ve("",!0),be(Es,{"upload-api":e.uploadApi,src:i.value,"source-url-value":s.value,onRegister:We(u),onUploadSuccess:g},null,8,["upload-api","src","source-url-value","onRegister"])],6)}}}),Ts=/* @__PURE__ */C(Is,[["__scopeId","data-v-ef939ff0"]]),Fs=/* @__PURE__ */we({__name:"picture-preview",props:{functional:{type:Boolean},imageList:{type:Array,default:()=>[]}},setup(e){const t=e,l=re("image-preview"),a=de(()=>t.imageList.map(e=>ft(e)?{src:e,placeholder:!1}:e));return(t,n)=>{const o=ze("PreviewGroup");return Me(),he("div",{class:Te(We(l).b())},[be(o,null,{default:tt(()=>[!e.imageList||t.$slots.default?Ue(t.$slots,"default",{key:0}):(Me(!0),he(ce,{key:1},Pe(a.value,e=>(Me(),me(We(St),Oe({key:e.src,ref_for:!0},e),ge({_:2},[e.placeholder?{name:"placeholder",fn:tt(()=>[be(We(St),Oe({ref_for:!0},e,{src:e.placeholder,preview:!1}),null,16,["src"])]),key:"0"}:void 0]),1040))),128))]),_:3})],2)}}}),Ls=Fs,Ds=/* @__PURE__ */function(e){return e[e.LOADING=0]="LOADING",e[e.DONE=1]="DONE",e[e.FAIL=2]="FAIL",e}(Ds||{}),Bs={show:{type:Boolean,default:!1},imageList:{type:Array,default:null},index:{type:Number,default:0},scaleStep:{type:Number},defaultWidth:{type:Number},maskClosable:{type:Boolean},rememberState:{type:Boolean}},Ms="img-preview",js=/* @__PURE__ */we({name:"ImagePreview",props:Bs,emits:["img-load","img-error"],setup(e,{expose:t,emit:l}){const a=/* @__PURE__ */new Map,n=Ae({currentUrl:"",imgScale:1,imgRotate:0,imgTop:0,imgLeft:0,status:Ds.LOADING,currentIndex:0,moveX:0,moveY:0,show:e.show}),o=Re(null),i=Re(null);function s(){n.imgScale=1,n.imgRotate=0,n.imgTop=0,n.imgLeft=0}const r=de(()=>{const t=(null==e?void 0:e.scaleStep)??0;return t>0&&t<100?t/100:n.imgScale/10});function u(e){(e=e||window.event).delta=e.wheelDelta||-e.detail,e.preventDefault(),e.delta>0&&c(r.value),e.delta<0&&c(-r.value)}function c(e){n.imgScale<=.2&&e<0||(n.imgScale+=.1*e,n.imgScale<0&&(n.imgScale=.02))}function d(e){n.imgRotate+=e}function p(){const e=We(i);e&&(e.onmousemove=null)}function m(t){n.status=Ds.LOADING;const o=new Image;o.src=t,o.onload=o=>{if(n.currentUrl!==t){const i=o.composedPath();if(e.rememberState){a.set(n.currentUrl,{scale:n.imgScale,top:n.imgTop,left:n.imgLeft,rotate:n.imgRotate});const l=a.get(t);l?(n.imgScale=l.scale,n.imgTop=l.top,n.imgRotate=l.rotate,n.imgLeft=l.left):(s(),e.defaultWidth&&(n.imgScale=e.defaultWidth/i[0].naturalWidth))}else e.defaultWidth&&(n.imgScale=e.defaultWidth/i[0].naturalWidth);i&&l("img-load",{index:n.currentIndex,dom:i[0],url:t})}n.currentUrl=t,n.status=Ds.DONE},o.onerror=e=>{const a=e.composedPath();a&&l("img-error",{index:n.currentIndex,dom:a[0],url:t}),n.status=Ds.FAIL}}function v(e){e&&e.stopPropagation(),h()}function h(){n.show=!1,document.body.removeEventListener("DOMMouseScroll",u),document.ondragstart=null}function f(){s()}function g(t){const{currentIndex:l}=n,{imageList:a}=e;"left"===t&&(n.currentIndex-=1,l<=0&&(n.currentIndex=a.length-1)),"right"===t&&(n.currentIndex+=1,l>=a.length-1&&(n.currentIndex=0)),m(a[n.currentIndex])}function y(e){e=e||window.event,n.moveX=e.clientX,n.moveY=e.clientY;const t=We(i);t&&(t.onmousemove=b)}function b(e){(e=e||window.event).preventDefault();const t=e.clientX-n.moveX,l=e.clientY-n.moveY;n.imgLeft+=t,n.imgTop+=l,n.moveX=e.clientX,n.moveY=e.clientY}t({resume:f,close:h,prev:g.bind(null,"left"),next:g.bind(null,"right"),setScale:e=>{e>0&&e<=10&&(n.imgScale=e)},setRotate:e=>{n.imgRotate=e}});const x=de(()=>{const{imgScale:t,imgRotate:l,imgTop:a,imgLeft:o}=n;return{transform:`scale(${t}) rotate(${l}deg)`,marginTop:`${a}px`,marginLeft:`${o}px`,maxWidth:e.defaultWidth?"unset":"100%"}}),w=de(()=>{const{imageList:t}=e;return t.length>1});et(()=>{e.show&&function(){!function(){const e=We(o);e&&(e.onmousewheel=u,document.body.addEventListener("DOMMouseScroll",u),document.ondragstart=function(){return!1})}();const{index:t,imageList:l}=e;if(!l||!l.length)throw new Error("imageList is undefined");n.currentIndex=t,m(l[t])}(),e.imageList&&s()});const k=t=>{e.maskClosable&&t.target&&t.target.classList.contains(`${Ms}-content`)&&v(t)},C=()=>{if(!We(w))return null;const{currentIndex:t}=n,{imageList:l}=e;return be("div",{class:`${Ms}__index`},[t+1,ye(" / "),l.length])},_=e=>We(w)?be("div",{class:[`${Ms}__arrow`,e],onClick:()=>g(e)},[be("left"===e?el:ll,null,null)]):null;return()=>n.show&&be("div",{class:Ms,ref:o,onMouseup:p,onClick:k},[be("div",{class:`${Ms}-content`},[be("img",{style:We(x),class:[`${Ms}-image`,n.status===Ds.DONE?"":"hidden"],ref:i,src:n.currentUrl,onMousedown:y},null),be("div",{class:`${Ms}__close`,onClick:v},[be(Yt,{class:`${Ms}__close-icon`},null)]),C(),be("div",{class:`${Ms}__controller`},[be("div",{class:`${Ms}__controller-item`,onClick:()=>c(-r.value)},[be("img",{src:"/extras-assets/svg/preview/unscale.svg"},null)]),be("div",{class:`${Ms}__controller-item`,onClick:()=>c(r.value)},[be("img",{src:"/extras-assets/svg/preview/scale.svg"},null)]),be("div",{class:`${Ms}__controller-item`,onClick:f},[be("img",{src:"/extras-assets/svg/preview/resume.svg"},null)]),be("div",{class:`${Ms}__controller-item`,onClick:()=>d(-90)},[be("img",{src:"/extras-assets/svg/preview/unrotate.svg"},null)]),be("div",{class:`${Ms}__controller-item`,onClick:()=>d(90)},[be("img",{src:"/extras-assets/svg/preview/p-rotate.svg"},null)])]),_("left"),_("right")])])}}),As=js,Rs=null;function Ns(e){var t;const l={},a=document.createElement("div");return Object.assign(l,{show:!0,index:0,scaleStep:100},e),Rs=be(As,l),Ne(Rs,a),document.body.appendChild(a),null===(t=Rs.component)||void 0===t?void 0:t.exposed}var Ps=["src"],Us={key:0,class:"iconfont icon-tupian-shili"},zs={class:"prompt"},$s={key:0,class:"auxiliary"},Vs="cropper-photo",Hs=/* @__PURE__ */we({__name:"CropperFree",props:{value:{type:String},uploadApi:{type:Function},aspectRatio:{type:Number},auxiliary:{type:String},icon:{type:String},isDrag:{type:Boolean,default:!1},accept:{type:Array},beforeUpload:{type:Function},modalTitle:{type:String},uploadText:{type:String},disabled:{type:Boolean,default:!1}},emits:["update:value","change"],setup(e,{expose:t,emit:l}){const a=e,n=l,o=Re(a.value||""),i=de(()=>o.value?te(o.value):"");let s={};const[r,{openModal:u,closeModal:c}]=is(),d=de(()=>a.disabled),p=de(()=>{var e,t,l;return(null===(e=a.accept)||void 0===e?void 0:e.length)?[...new Set((null===(t=a.accept)||void 0===t?void 0:t.some(e=>"jpg"===e||"jpeg"===e))?null===(l=a.accept)||void 0===l?void 0:l.concat(["jpg","jpeg"]):a.accept)].map(e=>"image/"+e):["image/jpg","image/jpeg","image/png"]});function m({source:e,data:t}){o.value=t,n("change",{source:e,data:t})}function v(){s=Ns({imageList:[i.value]})}function h(){o.value=""}et(()=>{o.value=a.value||""}),Ze(()=>o.value,e=>{n("update:value",e)}),Le(()=>{s&&s.close()}),De(()=>{const e=document.getElementById("dropzone");null==e||e.addEventListener("dragover",e=>{e.stopPropagation(),e.preventDefault()}),null==e||e.addEventListener("drop",e=>{var t;e.stopPropagation(),e.preventDefault();const l=null===(t=e.dataTransfer)||void 0===t?void 0:t.files[0];if(l){if(!p.value.includes(l.type))return void At.warning(ne("sys.component.cropper.acceptTip"));u(!0,{file:l})}})});const f=()=>{u()};return t({openModal:u.bind(null,!0),closeModal:c}),(t,l)=>{var a;const n=ze("Icon");return Me(),he("div",{id:"dropzone",class:Te([Vs,d.value&&"not-allow"])},[i.value?(Me(),he(ce,{key:0},[fe("div",{class:Te(`${Vs}__wrapper`)},[fe("img",{src:i.value},null,8,Ps)],2),fe("div",{class:Te(`${Vs}__mask`)},[be(We(Xt),{style:{fontSize:24},"two-tone-color":"#ffffff",onClick:v}),be(We(Jt),{style:{fontSize:24},"two-tone-color":"#ffffff",onClick:l[0]||(l[0]=()=>We(u)())}),be(We(Wt),{style:{fontSize:24},"two-tone-color":"#ffffff",onClick:h})],2)],64)):(Me(),he("div",{key:1,class:Te(`${Vs}__trigger`),onClick:f},[e.icon?(Me(),he("i",Us)):(Me(),me(n,{key:1,icon:"ant-design:plus-outlined",size:36})),e.isDrag?(Me(),he(ce,{key:2},[fe("p",zs,Ke(t.$t("sys.pageDesigner.clickOrDragToUpload")),1),e.accept?(Me(),he("p",$s,Ke(`支持${null===(a=e.accept)||void 0===a?void 0:a.join("、")}图片格式,大小100KB以内`),1)):ve("",!0)],64)):ve("",!0),e.auxiliary?ve("",!0):(Me(),he(ce,{key:3},[ye(Ke(We(ne)("sys.clickToDoSth",{sth:We(ne)("sys.add")})),1)],64))],2)),be(ys,{"upload-api":e.uploadApi,"aspect-ratio":e.aspectRatio,src:i.value,accept:e.accept,"before-upload":e.beforeUpload,title:e.modalTitle,"upload-text":e.uploadText,onRegister:We(r),onUploadSuccess:m},null,8,["upload-api","aspect-ratio","src","accept","before-upload","title","upload-text","onRegister"])],2)}}}),Ks=/* @__PURE__ */C(Hs,[["__scopeId","data-v-7a51c6b9"]]),Gs={class:"inline-block align-middle"},qs={key:0,class:"btn-title gct-text-overflow whitespace-nowrap"},Ys=/* @__PURE__ */we({__name:"base-button",props:{block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},title:{type:String,default:""},size:{type:String,default:"default"},icon:{type:String,default:""},type:{type:String,default:""},hasIcon:{type:Boolean,default:!1},hasText:{type:Boolean,default:!0},danger:{type:Boolean,default:!1},buttonStyle:{type:String,default:""},i18nConfig:{type:String,default:""},hidden:{type:Boolean,default:!1},confirm:{type:Boolean,default:!1},confirmText:{type:String,default:""},enableCustomColor:{type:Boolean,default:!1},backgroundColor:{type:String,default:""},fontColor:{type:String,default:""}},emits:["click"],setup(e,{emit:t}){Xe(e=>({v75739162:l.fontColor,dfaf8ce0:l.backgroundColor,v6d7bff14:"primary"===l.type?l.backgroundColor:"transparent"}));const l=e,a=t,n=de(()=>(l.hasText,"text-top")),o=it(function(){a("click")},300),i=async e=>{const t=/\/web-render|\/web\/|web-single\/|dev-single\/|test-single\//.test(location.pathname);let n=e.target;if("SPAN"==n.nodeName&&(n=n.parentNode),n.blur(),l.confirm&&t)return await new Promise((e,t)=>{Ot.confirm({content:l.confirmText||ne("sys.pageDesigner.confirmTodo"),onOk(){e("onOk")},onCancel(){t("onCancel")}})}),void a("click");o()};return(t,l)=>{const a=ze("icon-next"),o=ze("a-button");return Me(),he("div",Gs,[be(o,{size:e.size,type:e.type,danger:e.danger,loading:e.loading,block:e.block,disabled:e.disabled,class:Te([e.enableCustomColor&&e.fontColor?"btn-font-color":"",e.enableCustomColor&&e.backgroundColor?"btn-bg-style":"",{square:e.buttonStyle===We(D).SQUARE}]),title:e.title,onClick:i},{icon:tt(()=>[e.hasIcon?(Me(),me(a,{key:0,size:e.buttonStyle===We(D).SQUARE?20:16,value:e.icon,style:Fe({"--color":"inherit",lineHeight:"1",verticalAlign:n.value})},null,8,["size","value","style"])):ve("",!0),e.icon&&e.hasText?(Me(),he("div",{key:1,class:Te({"h-6px":e.hasIcon&&e.hasText&&e.buttonStyle===We(D).SQUARE&&e.size!==We(L).SMALL,"h-4px":e.hasIcon&&e.hasText&&e.buttonStyle===We(D).SQUARE&&e.size===We(L).SMALL,"w-6px":e.hasIcon&&e.hasText&&e.buttonStyle===We(D).ORDINARY&&e.size!==We(L).SMALL,"w-4px":e.hasIcon&&e.hasText&&e.buttonStyle===We(D).ORDINARY&&e.size===We(L).SMALL})},null,2)):ve("",!0)]),default:tt(()=>[e.hasText?(Me(),he("span",qs,Ke(e.hasText?e.title:""),1)):ve("",!0)]),_:1},8,["size","type","danger","loading","block","disabled","class","title"])])}}}),Ws=/* @__PURE__ */C(Ys,[["__scopeId","data-v-5b7fe5af"]]),Js={class:"inline-block align-middle"},Xs={class:"align-middle leading-none"},Qs={class:"align-middle leading-none"},Zs=/* @__PURE__ */we({__name:"basic-button",props:{buttonType:{type:String,default:""},buttonTheme:{type:String,default:""},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:String,default:""},iconColor:{type:String,default:""},buttonStyle:{type:String,default:""},dropdown:{type:Boolean,default:!1}},emits:["dropdown"],setup(e,{emit:t}){const l=t,a=e,n=de(()=>{const{buttonTheme:e,buttonStyle:t}=a,l=[`ant-btn-${e}`];return t===D.SQUARE?l.push("square"):l.push("line"),l}),o=de(()=>{const{buttonTheme:e}=a;return`ant-btn-${e}`});function i(){l("dropdown")}return(t,l)=>{const a=ze("icon-next"),s=ze("a-button");return Me(),he("div",Js,[e.dropdown?(Me(),he("div",{key:0,class:Te(["inline-block ant-btn-group",e.buttonStyle===We(D).SQUARE?"squaref group":""])},[be(s,{class:Te(n.value),disabled:e.disabled,type:e.buttonType,"ant-click-animating-without-extra-node":"false"},{default:tt(()=>[e.icon?(Me(),me(a,{key:0,class:"align-middle",value:e.icon,size:e.buttonStyle===We(D).SQUARE?20:14,color:e.iconColor},null,8,["value","size","color"])):ve("",!0),e.icon?(Me(),he("div",{key:1,class:Te({"inline-block w2px":e.buttonStyle===We(D).ORDINARY,"h-4px":e.buttonStyle===We(D).SQUARE})},null,2)):ve("",!0),fe("span",Xs,[Ue(t.$slots,"default",{},void 0,!0)])]),_:3},8,["class","disabled","type"]),be(s,{disabled:e.disabled,type:e.buttonType,class:Te(o.value),onClick:at(i,["stop"])},{icon:tt(()=>[Ue(t.$slots,"icon",{},void 0,!0)]),_:3},8,["disabled","type","class"])],2)):(Me(),me(s,{key:1,disabled:e.disabled,type:e.buttonType,class:Te(n.value)},{default:tt(()=>[e.icon?(Me(),me(a,{key:0,class:"align-middle",value:e.icon,size:e.buttonStyle===We(D).SQUARE?20:14,color:e.iconColor},null,8,["value","size","color"])):ve("",!0),e.icon?(Me(),he("div",{key:1,class:Te({"inline-block w3px":e.buttonStyle===We(D).ORDINARY,"h-4px":e.buttonStyle===We(D).SQUARE})},null,2)):ve("",!0),fe("span",Qs,[Ue(t.$slots,"default",{},void 0,!0)])]),_:3},8,["disabled","type","class"]))])}}}),er=/* @__PURE__ */C(Zs,[["__scopeId","data-v-22131025"]]),tr=/* @__PURE__ */we({__name:"double-input",props:{doubleValue:{},isSeparator:{type:Boolean},onEnter:{},renderScript:{},digits:{},enableStepCounter:{type:Boolean}},emits:["update:doubleValue"],setup(e,{expose:t,emit:l}){const a=e,n=l,o=Re({}),i=Re(),s=de({get(){const{val:e,precision:t}=u(a.doubleValue);return c(t),e},set(e){n("update:doubleValue",e)}}),r=e=>{const t=String(e).match(/\.(\d+)/);return t?t[1].length:0},u=e=>{const t=(e=>{let t=null==e?void 0:e.toString();a.isSeparator&&t&&(t=t.replace(/\$\s?|(,*)/g,""));const l=parseFloat(t);if(isNaN(l))return{val:null};if(0===t.toString().indexOf(".")&&(t=`0${t}`),Number.isInteger(l)){const e=new RegExp(`^${l}(\\.)`,"g");if(e.test(t)&&t.replace(new RegExp(`^(${l}(\\.))(.*)`),"$1")===`${l}.`){const a=t.replace(e,"");if(0===a.toString().indexOf("."))return{val:l};if(0===parseFloat(a)){const e=a.toString().replace(new RegExp("^(\\d*)(.*)"),"$1");return{val:`${l}.${e}`,precision:e.length}}}return{val:l}}{const e=t.replace(new RegExp("^(\\d*\\.\\d*)(.*)"),"$1");return e===l.toString()?{val:e}:{val:e,precision:r(e)}}})(e);if(ht(a.digits))return t;const{val:l,precision:n}=t;return{val:l?Number(new nl(l).toFixed(a.digits,1)):l,precision:n}},c=e=>{o.value={},void 0!==e&&ht(a.digits)&&(o.value={precision:e})},d=e=>{const{target:{value:t}}=e||{},{val:l,precision:a}=u(t);c(a),n("update:doubleValue",l)},p=e=>{var t;d(e),a.onEnter&&"function"==typeof a.onEnter&&(null===(t=a.onEnter)||void 0===t||t.call(a,e))};return t({input:i,onChangeValue:d}),(t,l)=>{const a=ze("a-input-number");return Me(),me(a,Oe({ref_key:"inputNumberRef",ref:i},o.value,{value:s.value,"onUpdate:value":l[0]||(l[0]=e=>s.value=e),onBlur:d,onPressEnter:p}),ge({_:2},[e.enableStepCounter?{name:"addonBefore",fn:tt(()=>[Ue(t.$slots,"step-down")]),key:"0"}:void 0,e.enableStepCounter||e.renderScript?{name:"addonAfter",fn:tt(()=>[e.renderScript?(Me(),me(Ve(e.renderScript),{key:0})):ve("",!0),e.enableStepCounter?Ue(t.$slots,"step-up",{key:1}):ve("",!0)]),key:"1"}:void 0]),1040,["value"])}}}),lr=tr,ar={key:0,class:"copy-wrap copy-wrap-tooltip"},nr={key:0,class:"copy-key"},or={key:1,class:"copy-wrap"},ir=/* @__PURE__ */we({__name:"copy-module-key",props:{moduleKey:{type:String,require:!0},isTooltip:Boolean,supportCopy:{type:Boolean,default:!0},iconPos:{type:String,default:"right"},showText:{type:Boolean,default:!0},fontSize:{type:Number,default:14}},setup(e){const t=e,l=de(()=>t.moduleKey&&t.supportCopy);function a(){const{isSuccessRef:e}=ie(t.moduleKey);We(e)&&_gct.message.success(ne("sys.copySuccess"))}return(t,n)=>{const o=ze("a-tooltip");return e.isTooltip?(Me(),he("div",ar,[l.value&&"left"===e.iconPos?(Me(),he("i",{key:0,class:"iconfont icon-fuzhi primary-gct",style:{"margin-right":"4px"},onClick:at(a,["stop"])})):ve("",!0),be(o,null,{title:tt(()=>[ye(Ke(e.moduleKey),1)]),default:tt(()=>[Ue(t.$slots,"default",{},()=>[e.showText?(Me(),he("span",nr,Ke(e.moduleKey),1)):ve("",!0)],!0)]),_:3}),l.value&&"right"===e.iconPos?(Me(),he("i",{key:1,class:"iconfont icon-fuzhi primary-gct",style:{"margin-left":"4px"},onClick:at(a,["stop"])})):ve("",!0)])):(Me(),he("div",or,[l.value&&"left"===e.iconPos?(Me(),he("i",{key:0,class:"iconfont icon-fuzhi primary-gct",style:{"margin-right":"4px"},onClick:at(a,["stop"])})):ve("",!0),Ue(t.$slots,"default",{},()=>[e.showText?(Me(),he("span",{key:0,style:Fe(`font-size: ${e.fontSize}px; overflow-wrap: anywhere`)},Ke(e.moduleKey),5)):ve("",!0)],!0),l.value&&"right"===e.iconPos?(Me(),he("i",{key:1,class:"iconfont icon-fuzhi primary-gct",style:{"margin-left":"4px"},onClick:at(a,["stop"])})):ve("",!0)]))}}}),sr=/* @__PURE__ */C(ir,[["__scopeId","data-v-531b3cd2"]]),rr={class:"ant-upload-text",style:{"font-size":"14px"}},ur={key:1,class:"upload-readonly"},cr=/* @__PURE__ */C(/* @__PURE__ */we({__name:"upload-design",props:{disabled:{type:Boolean},readonly:{type:Boolean}},setup:e=>(t,l)=>{const a=ze("a-upload-dragger");return e.readonly?(Me(),he("div",ur,[...l[1]||(l[1]=[fe("i",{class:"iconfont icon-tupian-shili"},null,-1)])])):(Me(),me(a,{key:0,class:Te(e.disabled?"upload-disabled":""),"file-list":[],disabled:e.disabled},{default:tt(()=>[l[0]||(l[0]=fe("div",null,[fe("i",{class:"iconfont icon-tupian-shili"})],-1)),fe("p",rr,Ke(t.$t("sys.pageDesigner.clickOrDragToUpload")),1)]),_:1},8,["class","disabled"]))}}),[["__scopeId","data-v-575d3a1a"]]),dr=/* @__PURE__ */function(e){return e.EXCEPTION="exception",e.ACTIVE="active",e}({}),pr={class:"ant-upload-text",style:{"font-size":"14px"}},mr={key:0,class:"img-box"},vr=["onClick"],hr=/* @__PURE__ */we({__name:"base-upload",props:{modelKey:{},modelValue:{},readonly:{type:Boolean},disabled:{type:Boolean},maxCount:{},maxSize:{},accept:{},isTable:{type:Boolean},beforeUpload:{type:Function},materialType:{},getContainer:{type:Function}},emits:["update:modelValue","onBeforeUpload","saveTableRow"],setup(e,{emit:t}){const l=Re(0),a=Re([]),n=t,o=e,i=o.getContainer||document.body,s=de({get(){try{return o.modelValue?o.modelValue.split(","):[]}catch(e){return[]}},set(e){(null==e?void 0:e.length)>0?n("update:modelValue",e):n("update:modelValue",[])}});Ze(()=>o.modelValue,async()=>{const e=(o.modelValue?o.modelValue.split(","):[]).map(async e=>{const t=q+e;return{uid:ue(16,16),path:t,name:e.split("/").at(-1),status:void 0,fileSize:0,percentNum:0}});a.value=await Promise.all(e)},{immediate:!0});const r=de(()=>{const e=ot(o.accept||[]),t=[...new Set(e)],l=[];return t.forEach(e=>{l.push(e),e===e.toLowerCase()&&l.push(e.toUpperCase()),e===e.toUpperCase()&&l.push(e.toLowerCase())}),[...new Set(l)].map(e=>"."+e)}),u=de(()=>r.value+""||"image/*"),c=de(()=>null===o.maxCount||void 0===o.maxCount||a.value.length<o.maxCount),d=de(()=>null===o.maxCount||void 0===o.maxCount||o.maxCount>1);async function p({file:e}){if(l.value+=1,l.value>o.maxCount)return void(l.value-=1);const t=URL.createObjectURL(e);a.value=[...a.value,{uid:e.uid,name:e.name,fileSize:e.size,path:t,percentNum:0,status:dr.ACTIVE}],await async function(e){let t=a.value.find(t=>t.uid===e.uid)||{};try{await G.beforeUploadFun(e,{maxSize:o.maxSize||5,acceptList:(o.accept||[]).map(e=>"."+e),beforeUpload:async e=>{if(o.beforeUpload&&"[object Function]"===Object.prototype.toString.call(o.beforeUpload))return o.beforeUpload(e)}});const a=setInterval(()=>{t.percentNum&&t.percentNum<95&&(t.percentNum+=7)},100);try{const l=await G.uploadByFile(e,!0,o.modelKey);s.value=[...s.value,l],t=Object.assign(t,{path:q+l,percentNum:100,status:void 0}),clearInterval(a),await Ie(),o.isTable&&n("saveTableRow")}catch(i){l.value-=1,console.warn(i),t.status=dr.EXCEPTION,clearInterval(a)}}catch(r){l.value-=1,At.warn(r),a.value.splice(a.value.length-1,1)}}(e)}return(t,n)=>{const o=ze("a-upload-dragger"),r=ze("a-progress"),m=ze("a-image"),v=ze("close-circle-filled"),h=ze("a-image-preview-group");return Me(),he(ce,null,[lt(be(o,{class:Te(["gct-upload-image-dragger",e.disabled?"upload-disabled":""]),style:{margin:"4px 0"},disabled:e.disabled,"custom-request":p,multiple:d.value,"file-list":[],accept:u.value},{default:tt(()=>[n[0]||(n[0]=fe("div",null,[fe("i",{class:"iconfont icon-tupian-shili"})],-1)),fe("p",pr,Ke(We(ne)("sys.pageDesigner.clickOrDragToUpload")),1)]),_:1},8,["class","disabled","multiple","accept"]),[[Qe,c.value&&!e.readonly]]),a.value.length?(Me(),he("div",mr,[be(h,{preview:{getContainer:We(i)}},{default:tt(()=>[(Me(!0),he(ce,null,Pe(a.value,(t,o)=>(Me(),he("div",{key:o,class:Te(["img-item float-left mr-8px my-4px",{"material-table-field":e.materialType===We(P).MaterialTableField}])},[t.status?(Me(),me(r,{key:0,"stroke-width":4,"show-info":!1,percent:t.percentNum},null,8,["percent"])):ve("",!0),be(m,{width:"100px",height:"100px",src:t.path,preview:{maskClassName:"custom-image-preview"}},{previewMask:tt(()=>[...n[1]||(n[1]=[])]),_:1},8,["src"]),t.status||e.disabled||e.readonly?ve("",!0):(Me(),he("div",{key:1,class:"delete-icon-box",onClick:at(e=>async function(e){l.value-=1,a.value.splice(e,1),s.value.splice(e,1),s.value=[...s.value],await Ie()}(o),["stop"])},[be(v,{class:"delete-icon"})],8,vr))],2))),128))]),_:1},8,["preview"])])):ve("",!0)],64)}}}),fr=/* @__PURE__ */C(hr,[["__scopeId","data-v-2a928323"]]),gr={class:"image-upload-wrapper w-full"},yr=r(/* @__PURE__ */we({__name:"ImageUpload",props:{modelKey:{},modelValue:{},readonly:{type:Boolean},disabled:{type:Boolean},isDesign:{type:Boolean},maxSize:{},maxCount:{},accept:{},materialType:{},isTable:{type:Boolean},beforeUpload:{type:Function},getContainer:{type:Function}},emits:["update:modelValue","onBeforeUpload","saveTableRow"],setup(e,{emit:t}){const l=t,a=e=>l("update:modelValue",e),n=()=>{l("saveTableRow")};return(t,l)=>(Me(),he("div",gr,[e.isDesign?(Me(),me(cr,{key:0,disabled:e.disabled,readonly:e.readonly},null,8,["disabled","readonly"])):(Me(),me(fr,{key:1,readonly:e.readonly,disabled:e.disabled,"max-size":e.maxSize,"max-count":e.maxCount,accept:e.accept,"model-key":e.modelKey,"model-value":e.modelValue,"is-table":e.isTable,"before-upload":e.beforeUpload,"material-type":e.materialType,"get-container":e.getContainer,"onUpdate:modelValue":a,onSaveTableRow:n},null,8,["readonly","disabled","max-size","max-count","accept","model-key","model-value","is-table","before-upload","material-type","get-container"]))]))}})),br={class:"upload-design"},xr={style:{"pointer-events":"none"}},wr={class:"progress-wrap"},kr={class:"progress-box text-sm"},Cr=/* @__PURE__ */C(/* @__PURE__ */we({__name:"upload-design",props:{disabled:{type:Boolean}},setup:e=>(t,l)=>{const a=ze("SvgIcon"),n=ze("a-upload-dragger"),o=ze("svg-icon"),i=ze("a-progress"),s=ze("close-outlined");return Me(),he("div",br,[fe("div",xr,[be(n,{"file-list":[],disabled:e.disabled},{default:tt(()=>[fe("div",null,[be(a,{size:"56",name:"folder"})]),l[0]||(l[0]=fe("p",{class:"ant-upload-text",style:{"font-size":"14px"}}," 点击或将文件拖拽到这里上传 ",-1))]),_:1},8,["disabled"])]),fe("div",wr,[be(o,{size:"32",name:"doc"}),fe("div",kr,[l[1]||(l[1]=fe("div",{class:"left w-full"},[fe("span",{class:"label"},"示例内容.docx"),fe("span",{class:"size ml-16px text-[#C3C3C3]"},"88M")],-1)),be(i,{"stroke-width":4,percent:88})]),be(s,{class:"mt-3px icon"})])])}}),[["__scopeId","data-v-5fd18cf8"]]),_r=/* @__PURE__ */function(e){return e.JPG="jpg",e.JPEG="jpeg",e.PNG="png",e.BMP="bmp",e.DOCX="docx",e.PDF="pdf",e.XLSX="xlsx",e.DOC="doc",e.MP4="mp4",e.AVI="avi",e.PPT="ppt",e.GIF="gif",e.CER="cer",e}({}),Sr=/* @__PURE__ */function(e){return e.EXCEPTION="exception",e.ACTIVE="active",e}({}),Er=e=>new Promise((t,l)=>{const a=new XMLHttpRequest;a.open("GET",e),a.responseType="blob",a.onload=()=>{if(200===a.status){const e=a.response,l=new FileReader;l.onloadend=()=>{t(e.size)},l.readAsText(e)}else l(`Error ${a.status}: ${a.statusText}`)},a.send()}),Or=e=>e/1024<1?(e/1024).toFixed(2)+"K":e/1024/10<1?(e/1024).toFixed(1)+"K":e/1024/1024<1?(e/1024).toFixed(0)+"K":(e/1024/1024).toFixed(2)+"M",Ir=e=>{const t=(null==e?void 0:e.split("."))??[];let l=t[t.length-1]||"png";return l=l.toLowerCase(),[_r.PNG,_r.JPG,_r.JPEG,_r.BMP,_r.GIF].includes(l)?"img":[_r.DOCX,_r.DOC].includes(l)?_r.DOC:[_r.MP4,_r.AVI].includes(l)?"MP4":l===_r.PDF?"PDF":l===_r.CER?"ssl":Object.values(_r).includes(l)?l:"attachment"},Tr={class:"progress-box"},Fr={class:"progress-item__box pl-10px"},Lr={class:"progress-item__name"},Dr=["onClick"],Br={key:0,class:"error",style:{color:"red"}},Mr={key:1,style:{color:"var(--ant-primary-color)"}},jr=/* @__PURE__ */we({__name:"base-upload",props:{modelKey:{},modelValue:{},readonly:{type:Boolean},disabled:{type:Boolean},maxCount:{},maxSize:{},accept:{},isTable:{type:Boolean},beforeUpload:{type:Function}},emits:["update:modelValue","onBeforeUpload","saveTableRow"],setup(e,{emit:t}){const l=Re(0),a=Re([]),n=t,o=e,i=de(()=>e=>Ir(e)),s=de({get(){try{return o.modelValue?o.modelValue.split(","):[]}catch(e){return[]}},set(e){(null==e?void 0:e.length)>0?n("update:modelValue",e):n("update:modelValue",[])}});Ze(()=>o.modelValue,async()=>{const e=(o.modelValue?o.modelValue.split(","):[]).map(async e=>{const t=void 0+e;return{uid:ue(16,16),path:t,name:e.split("/").at(-1),status:void 0,fileSize:await Er(t),percentNum:0}});a.value=await Promise.all(e)},{immediate:!0});const r=de(()=>e=>Or(e)),u=de(()=>{const e=ot(o.accept||[]),t=[...new Set(e)],l=[];return t.forEach(e=>{l.push(e),e===e.toLowerCase()&&l.push(e.toUpperCase()),e===e.toUpperCase()&&l.push(e.toLowerCase())}),[...new Set(l)].map(e=>"."+e)}),c=de(()=>null===o.maxCount||void 0===o.maxCount||a.value.length<o.maxCount),d=de(()=>null===o.maxCount||void 0===o.maxCount||o.maxCount>1);async function p({file:e}){l.value+=1,l.value>o.maxCount?l.value-=1:(a.value=[...a.value,{uid:e.uid,name:e.name,fileSize:e.size,path:"",percentNum:0,status:Sr.ACTIVE}],await async function(e){let t=a.value.find(t=>t.uid===e.uid)||{};try{await G.beforeUploadFun(e,{maxSize:o.maxSize||5,acceptList:(o.accept||[]).map(e=>"."+e),beforeUpload:async e=>{if(o.beforeUpload&&"[object Function]"===Object.prototype.toString.call(o.beforeUpload))return o.beforeUpload(e)}});const a=setInterval(()=>{t.percentNum&&t.percentNum<95&&(t.percentNum+=1)},100);try{const l=await G.uploadByFile(e,!0,o.modelKey);s.value=[...s.value,l],t=Object.assign(t,{path:void 0+l,percentNum:100,status:void 0}),clearInterval(a),await Ie(),o.isTable&&n("saveTableRow")}catch(i){l.value-=1,console.warn(i),t.status=Sr.EXCEPTION,clearInterval(a)}}catch(r){l.value-=1,At.warn(r),a.value.splice(a.value.length-1,1)}}(e))}return(t,n)=>{const o=ze("SvgIcon"),m=ze("a-upload-dragger"),v=ze("svg-icon"),h=ze("a-tooltip"),f=ze("a-progress"),g=ze("close-outlined");return lt((Me(),he("div",null,[lt(be(m,{style:{"margin-bottom":"16px"},disabled:e.disabled,"custom-request":p,multiple:d.value,"file-list":[],accept:u.value+""},{default:tt(()=>[fe("div",null,[be(o,{size:"56",name:"folder"})]),n[0]||(n[0]=fe("p",{class:"ant-upload-text",style:{"font-size":"14px"}}," 点击或将文件拖拽到这里上传 ",-1))]),_:1},8,["disabled","multiple","accept"]),[[Qe,c.value]]),fe("div",Tr,[(Me(!0),he(ce,null,Pe(a.value,(t,n)=>(Me(),he("div",{key:n,class:"progress-item mb-8px w-full"},[be(v,{class:"svg-icon",size:t.status?32:24,name:i.value(t.name)},null,8,["size","name"]),fe("div",Fr,[fe("div",Lr,[be(h,null,{title:tt(()=>[ye(Ke(t.name),1)]),default:tt(()=>[fe("span",{class:"label",onClick:at(e=>async function(e){ee({url:e.path})}(t),["stop"])},Ke(t.name),9,Dr)]),_:2},1024),t.fileSize?(Me(),he("span",{key:0,class:Te(["size",{"mr-40px":t.status}])},Ke(r.value(t.fileSize)),3)):ve("",!0)]),lt(be(f,{"stroke-width":4,percent:t.percentNum},{format:tt(e=>[t.status===We(Sr).EXCEPTION?(Me(),he("span",Br,Ke(We(ne)("sys.component.upload.uploadError"))+"!",1)):(Me(),he("span",Mr,Ke(e+"%"),1))]),_:2},1032,["percent"]),[[Qe,t.status]])]),e.disabled?ve("",!0):(Me(),me(g,{key:0,class:"mt-3px icon",onClick:at(e=>async function(e){l.value-=1,a.value.splice(e,1),s.value.splice(e,1),s.value=[...s.value],await Ie()}(n),["stop"])},null,8,["onClick"]))]))),128))])],512)),[[Qe,!e.readonly]])}}}),Ar=/* @__PURE__ */C(jr,[["__scopeId","data-v-65872e0a"]]),Rr={class:"file-list"},Nr={key:0,class:"file-list__header"},Pr=["onClick"],Ur={class:"file-list__item-name"},zr=["onClick"],$r=["onClick"],Vr=/* @__PURE__ */we({__name:"file-list",props:{showType:{},fileList:{},isDesign:{type:Boolean},materialType:{},hasSize:{type:Boolean},nameClick:{type:Function},hideSwitch:{type:Boolean}},emits:["update:showType"],setup(e,{emit:t}){const l=e,a=t,n=Re([]),o=[{icon:"icon-liebiaozhanshi",name:"List",key:"switch_icon_list"},{icon:"icon-kapianzhanshi",name:"Card",key:"switch_icon_card"}];Ze(()=>l.fileList,async e=>{if(!l.isDesign&&l.hasSize){const e=l.fileList.map(e=>e.path.split("/")[2]);n.value=(await _api.apaas.fileResource.postList({ids:e})||[]).map(e=>{const t=void 0;return{path:/^\/w/.test(e.url)?`${t}${e.url}`:`${t}/${e.url}`,name:e.name,size:e.size}})}else n.value=e.map(e=>"string"==typeof e?{name:i(e),path:e}:e)},{immediate:!0});const i=e=>{const t=e.split("/");return t[t.length-1]},s=de(()=>e=>"external"===(null==e?void 0:e.type)?"link":Ir((null==e?void 0:e.name)??e)),r=de(()=>e=>Or(e));async function u(e){l.isDesign||(l.nameClick&&vt(l.nameClick)?l.nameClick(e):ee({url:e.path}))}return(t,l)=>{const i=ze("svg-icon"),c=ze("a-tooltip");return Me(),he("div",Rr,[e.hideSwitch?ve("",!0):(Me(),he("div",Nr,[(Me(),he(ce,null,Pe(o,t=>fe("div",{key:t.key,class:Te(["switch-item",[e.showType===t.name&&"selected"]]),onClick:at(()=>{a("update:showType",t.name)},["stop"])},[fe("i",{class:Te(["iconfont",t.icon])},null,2)],10,Pr)),64))])),fe("div",{class:Te(["file-list__list","Card"===e.showType?"flex-card":"flex-list",e.hideSwitch?"hide-switch":""])},[(Me(!0),he(ce,null,Pe(n.value,(t,l)=>(Me(),he("div",{key:l,class:Te(["file-list__item",e.isDesign?"is-design":"",{"material-table-field":e.materialType===We(P).MaterialTableField}])},[be(i,{class:Te(["file-list__item-svg",e.hasSize?"":"no-size"]),size:"Card"===e.showType?32:24,name:s.value(t)},null,8,["class","size","name"]),fe("div",Ur,[e.isDesign?(Me(),he("span",{key:0,onClick:at(e=>u(t),["stop"])},Ke(t.name),9,zr)):(Me(),me(c,{key:1},{title:tt(()=>[ye(Ke(t.name),1)]),default:tt(()=>[fe("span",{onClick:at(e=>u(t),["stop"])},Ke(t.name),9,$r)]),_:2},1024))]),fe("span",{class:Te(["file-list__item-size",[e.isDesign?"is-design":""]])},Ke(e.hasSize?r.value(t.size):""),3)],2))),128))],2)])}}}),Hr=/* @__PURE__ */C(Vr,[["__scopeId","data-v-543b5221"]]),Kr={class:"field-upload-wrapper w-full"},Gr=/* @__PURE__ */we({__name:"FieldUpload",props:{modelKey:{},modelValue:{},readonly:{type:Boolean},disabled:{type:Boolean},isDesign:{type:Boolean},maxSize:{},maxCount:{},accept:{},materialType:{},isTable:{type:Boolean},beforeUpload:{type:Function},nameClick:{type:Function},hideSwitch:{type:Boolean}},emits:["update:modelValue","onBeforeUpload","saveTableRow"],setup(e,{expose:t,emit:l}){const a=e,n=Re("List"),o=l,i=de(()=>!ct(a.modelValue)),s=qe(()=>ct(a.modelValue)?a.modelValue:ft(a.modelValue)?(a.modelValue?a.modelValue.split(","):[]).map(e=>({path:e,name:e.split("/").at(-1),size:a.isDesign?88e6:0})):a.modelValue||[]),r=e=>o("update:modelValue",e),u=e=>{n.value=e},c=()=>{o("saveTableRow")};return t({getShowType:()=>n.value}),(t,l)=>(Me(),he("div",Kr,[e.readonly&&s.value.length?(Me(),me(Hr,{key:0,"is-design":e.isDesign,"hide-switch":!!e.hideSwitch,"file-list":s.value,"material-type":e.materialType,"show-type":n.value,"name-click":e.nameClick,"has-size":i.value,"onUpdate:showType":u},null,8,["is-design","hide-switch","file-list","material-type","show-type","name-click","has-size"])):ve("",!0),e.readonly?ve("",!0):(Me(),he(ce,{key:1},[e.isDesign?(Me(),me(Cr,{key:0,disabled:e.disabled},null,8,["disabled"])):(Me(),me(Ar,{key:1,readonly:e.readonly,disabled:e.disabled,"max-size":e.maxSize,"max-count":e.maxCount,accept:e.accept,"model-key":e.modelKey,"model-value":e.modelValue,"is-table":e.isTable,"before-upload":e.beforeUpload,"onUpdate:modelValue":r,onSaveTableRow:c},null,8,["readonly","disabled","max-size","max-count","accept","model-key","model-value","is-table","before-upload"]))],64))]))}}),qr=r(Gr),Yr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAABRCAYAAACqj0o2AAAAAXNSR0IArs4c6QAADeJJREFUeF7lXAl0lNUV/t4/k8m+T8IWspCETSkCWkFtIbVVKSCIFClgjQgFLVawrdBTrfboOQWXAkpZSohpCQpVEMoieMBEBYsixQUDmgkz2dhmsg9kkvnnfz3vTybOTCYz/2TeP7H1nZNzksx997/3m/vevf99912CEI/TRmNCHImZApC7KHAbgExOItSA4AiA0hapZe+YrKxGTnz9siF+KTgQlJSUaNOzRt8nwTGHgUcALQe2PlhQGwOTAMVV1LorLyuL/a3aUBXEz8pr0qLDIhYDWAogQTUtfMEJahEIKbBJ0rrrslIvqSGDKiBWV1sGtUl4jlLMV9/qlMJCbZRgU7tEV/MGkyuIJUZjRLoQt4JSaSVAIpSqF1o6GcxVNZJ1Na9lzg3EClP9FAppLYCc0ILS66eZNBpNftbgxPd6zaFzYtAgMusbTGJeAcjCYIXpk/kEm6qlluXBWGVQIFZVNWbbJXE/BYb3CQCcHkqBcxC0U3PTEyp6w7LXILLlK0HaQYCY3jz42zaHAlYIZFZuevLhQGXrFYiGSvNiSsn6b4/nDVRt7/QUEAVCfpudkbwuEI4Bg1hRWfc0pfSZQB7yv0ZLCHkmOyP5T0rlDgjE7wKATuACAVIxiBWVdY9RSlkI890ZhC7JyUjZ7E9hRSCWV9XdCYnu/3/bA/2BI++REGZkZyYd8EXrF0QWxrRJ4qf/L17YH3Cen3d4be0NvsIfnyDKr3Ek9nQo40BJktDU2Ix2ux1ajQaxcTHQ6XSB6s6VnsWRNbRlTE8BuU8QDZWWjaBYwlUiL8zqLPUwGIw4f96EmuoLcDgcblR6fTJycrMwYuQw9OuXorY4XvlTkILczORF3j7sEURjdcNEh8NRqpbEzOK+PHMOpz75FJcuXVH8mPT0NIyfcCOGZPPK5Sp+NAiEqd72R68gdrwPx57lmHXukpSB98XnZTj2wQm0tFiVa+BBmTs0G5PybkVyclKveQQ+kRqqqXWU57L2CmJ5pflpQgn3gLq29iLePngEFnNd4PJ7maHRaDBhwk0Yf8uN0GpVTpZ3Pt9b/NgNxC+NV/qHE2LknQ/86MQpvFd6DJJEuQDoyiQ1NQVTpt0Rov2S2qi9LTc3N62mKzD31Ki80ryGULKMl6Zs+TLrY0tYzcGsMj0jDSNHDsOIkUPVtUyCopwM/YNeQVTDCt/avR9fnTOoiV833tHRURg/4SaMGTtKFTBZEH7Nbssa3WmNbsu5otLyZ0qxkpfG77/3IT48/jEvdgHzYcv8nplTkJikyhnZczmZ+qeYUF0gMo+cRmKqCYg+YGm9TKiqrMFr29/kwSooHmFhYTKQKoREjdXGL1Ly8vLELhArTPXzKKTioCR2mVxYsB1Xrph5sQuKD9svfzZ7OjKz0oPi4zmZgM7PzkzZ3gWiwWR+mx2s83jK119VYPeufTxYceMRHh6OBQ/NQ3xCHDeeFNifm6mfJoPISjtiScxFXmHN3j0Hcbbsa27C8mLEvPb0GT/lxQ7MwVhpS4oMoqHS8gAoinhx3/DXQjQ3NfNi55fPuDHDUXG+Fo1NLT5pBYHg18uWICIi3C9PpQQEAitQkEF8FRT5Sif6ohNFES8+v54HK0U8MjMGYPmv5sB6tRWF/9iHCmOtz3mz75vB1cmwep8OEE2WagBpiqT2Q8TSWBs3FPJg5ZdHdHQkVj5+P5KT4mVau13E5sI9KDtn7HHuxEm3YsItN/nlHQCBiZSX16SRsAgGIpdhNluwdQs3J9+jTFqtBo8smonhQ92zOQ6HhIKivfjsjPcA/4Yxo3DX5Nu56OpkQsqrLNOJhD28uF6+bMarW7fzYueVT7guDIsfmtENQCcxs8iNBbtx7uvKbvNZ9ufeWdO4ykcqKi0rKMUqXlwb6huxeRM3H9VNLLYH5s+bgtSURJ8iX2u1YfVftsFsca/1zMgcjJ/PvZeXujIfwtOpMIbXrrXi5bV+D8gCViJtYCryJo7D98eNhEYjKJpvNF3AS6+85pY5YkndufNnKZqvlIgYTJYSAJOUTlBC98LqV7ql+D3nsXAjK2MgBgzQIz42Wv7YIUloa7PLvwuCgJjoSPTvl4S0QaldzkPJ811pdu0txdHSk13/UglEczlAuJbDbdr4Khobmrzqyzzq3ZNvw7ixwxEVqX4JI1vWTz37N7S2tsnyqLKcy01mM6+kgxO1nTvegvF89009fXA/LF5wDxITYgM1qKDoDxw6jgOHP5R58H5rkffEcpPFzvtQvrTkGE78+xM3xVP0CVjx+P0hsT5PxK1XbVj5x/Xy3qhKiGMwWbjn68vKvsK/9rzdpQuL6Z584kG/HjUoc/MzecOWXThTdh4qBNtgjoU7iFbrVax/eUuXWrNn3o5JPxirJkZ+eR8/8Tm27zyMGfdMwfARuX7pAyEgBpO5lVf2xvXBRYWvyefJLDRhy1hpWBKI8IHQ1tU3yQ7m4UcWcE2Hde6J/B0LY8wO5Uve/QC/WzYfgwelBqKvarSr1mzH3PmzufNnjuUsUaHmOi6KoPaCWT7GTIjWQKvxWzvFXTknw9Z2CS3XJEj2q9DootHazncHUyXYZsInxgggIKi3OpAYLSA2SqMaSP4YX24U0WanSEvWwtLsgM3OGcRyk2UbAeb7EyTQz8PDCJJiNbhYLyJSR5ASH5oKBU85JUpRaxGh0xLo4zW4UCeyjDTXwSzxDwCe48q1k5k+TgOrTUJspIBInbL3Xd5yUAo0X3OAEKBdBK61SbwfAe6pME8J+3opO+W5UG+H6F6xxw1M7klZT8nYMuqf2DdL2SkL2w/ZvqjWcB4PsHy6agV/AxK1CNP2nXdusDrQ0sp/GbMvhQI1smYVJss2qoJzcX7zcVGCHOb0xWDvy7UqOJMuXQiKOkHkW/3gCZZAgIFJWrAcYqhH01UHmq6pY4WyLgT5XYf3MSTWzDub4wpYfJSA+BBbo0OiuFAvgnlodQa1tVDrgC7TKDdZ9hFgqjoPA/rCGutbHHKIpd6gh3IyUya7FDSZ51EQVc86o8MFJMeFZm9kbyVXVPTIHStZmJ+dmfRNQRPrGDI4axQr41KlmM9pDSwAjwpXN/AWHR0hjUNFI6SglhpqHcyK4N12eoPJ8iyAJ9Uz/45l3Y+FPColJNj+Z24WYeOcZPDEhPWRyM3Q/77DIl0Gq4ZAWIRRTQfDHsdOPPslaLlndkIFIEBtbZRmObuadIs5eJ9D92TVDEh9nBYsUcFjsCXMMjTtomquuEtMSuja3IyU5c5/dNOgozYnnB2jqn6eyR7OAvG4KI2cIOjtYB6YvZWoF8q4SuZuhd2Ws5M01JfDtRogNlKDmAhBMZgMMJaRaW6VYA+B9TmxoYQ+k5uR4nYr38e1tJgveB/q+7M0Zo0RYQQROkHO/3kudZYbvGqjaLNLcnY6NJbnJrWpmraMUHQtjU3rbBa035/ian0epgUGJIa5sWf7HnsD6atBNZpJuV6aEfm+qmuq2wLQkDUNYpYYptWAgEKnZUcM7oE5e40zN4lgN9tYDBhSSyTYlJOhf9jbF+j30ngaiT2txkGWUxh2ba3s7DmcOVOGEcOyMHP6HaCUQrK3QRLbu8tMCAStTv5hxU/FO/dj4MCBGDaU71mymysJ5tI4Y2QwXMmhWoEByb2JUHVNDQ4efAd19fWyzKwS7LFHHsD11w2V/6aUndC1y2ASIkAI04FowkA6Xfnrb+zHkXePy7Ts9lTepB8ie0gW19XO2hcQURqTk5Pa4906RYFFZzemPbyCcGZ9JaXv46OP3et1mPaJCXF4auVSxMd/U/S07+BRTLh5LPTJ3xR2vn/8JP5evLsbYKNHj8KdP7mdy50+dsUCApnqr2uTIhBli6w0LwYlm4L9mtntgjd37cF5o6lHVtePHIrlj3Zc4nRaW3JyIp5YvkgGstxgwkvrtsIuencyaWmDMHPG3YiJ6ah77O0ghCxT0q1JMYiyxw6yO5MSAJ0K3zvjTlRVX8TJU593YcCAXJQ/G5u3vo6GRt/3ZFL0ejzwi7m9bsKhSnMhpybBAHn4naM49Z/TvTWMgOcNGZKJ2bNmynttICMQABnfgCzRBcjHJEpfDGSPrDhvxM5/7gpEFy60P8qbiPE3K7u3wvZAQuhSJV2ZXIXrFYiMQWfXpjeVeG22jDdvKURTCK+qOZVkN0x/uTAfiYm+bxswLyxAmOOvG5O3b7bXIMrOpiP8YccKPptQfnzyFI4cZfX1fTO+N+o6TJ0yuceHs+ZBRJSm+QpjfEkeFIiMsdz+RYhd46sJ0cbNBWhoCFnv8G76slPGhxcvRHx8x/U110FBC2qo9dE+a4fqKkx5dcNE4nCwW0BuRQAsoN5WvKNvTNDlqV72RgOBsKw3y9dTmaAt0ZWh3AJBiFlB5D4SHfnIo++Weg2qQ41q//79sCD/fvYeZCNEWFUlNX/7WkS7gsK6mugEwsBcUlhUHHHp0uVQY+ZtSYvLly0t1hH6lGtPGx6CcbVET4EYmGtfWPcbh0NcCEJUPUXs2WvQRgoU2MX2zcVb16jSW0ZVEJ2K5efnR5DIAfcRic6Rr8ARqH30wHLdhwiwo6Wuee8bb2zofVMyBaYaEhBd5cjPX5agi4ueLrY7Jmm12h+LosjlsjoAE6X0GCHkkGSzHSgqWhuycCDkIHp+sU+vfjntUq1lnOQQh4OS4ZRKmSAkDRQJIDRBkmhHcSOFDaBWjUZjESXHJZ1OV9Pebj8HSs+0O+ip7QXPd/XuUmA8XEn+CzYbSUiSvfM/AAAAAElFTkSuQmCC",Wr=["src"],Jr=["title"],Xr={class:"rounded-50% border w28px h28px ks-row-center-middle text-[var(--ant-primary-color)]"},Qr={key:1,class:"text-[#3168EC] text-[12px] px4px rounded-4px",style:{backgroundColor:"hsl(from #3168EC h s 92%)"}},Zr={key:0,class:"mt8px primary-gct ks-row"},eu=/* @__PURE__ */C(/* @__PURE__ */we({__name:"user-list",props:{data:{},tagName:{}},setup(e){const t=Re(!1);return(l,a)=>{var n,o;const i=ze("up-outlined");return Me(),he("div",null,[fe("div",{class:"user-list ks-row-middle cursor-pointer flex-wrap",onClick:a[0]||(a[0]=l=>e.data.length>3&&(t.value=!0))},[(Me(!0),he(ce,null,Pe(null===(n=e.data)||void 0===n?void 0:n.filter((e,l)=>t.value||l<3),(e,t)=>(Me(),he("div",{key:t,class:"user-list-item border w76px p4px ks-row-middle"},[fe("img",{src:e.avatar?"/minio/"+e.avatar:We(Yr),width:"20",height:"20",style:{"border-radius":"50%"}},null,8,Wr),fe("div",{class:"ml8px ell",title:e.username,style:{"line-height":"20px"}},Ke(e.username),9,Jr)]))),128)),(null===(o=e.data)||void 0===o?void 0:o.length)>3&&!t.value?(Me(),he(ce,{key:0},[fe("div",Xr," +"+Ke(e.data.length-3),1),a[2]||(a[2]=fe("div",{class:"text-[#8F8F8F] ml4px mr12px"},"...",-1))],64)):ve("",!0),e.tagName?(Me(),he("div",Qr,Ke(e.tagName),1)):ve("",!0)]),t.value?(Me(),he("div",Zr,[fe("span",{class:"cursor-pointer",onClick:a[1]||(a[1]=e=>t.value=!t.value)},[ye(Ke(l.$t("sys.collapse"))+" ",1),be(i)])])):ve("",!0)])}}}),[["__scopeId","data-v-27aa2bf0"]]),tu=Re(),lu=Re({});function au(e){const t=null==e?void 0:e.parentElement,l=null==t?void 0:t.scrollHeight,a=null==t?void 0:t.clientHeight;return l&&a&&l>a?t.clientHeight:t?au(t):0}function nu(e,t){lu.value[e.value.toString()]=o(e.value,l=>{const a=l[0].target.clientHeight;a&&(tu.value=au(e.value),t&&"function"==typeof t&&t(a&&tu.value&&a>tu.value,tu.value,a))})}Le(()=>{for(const l in lu.value){var e,t;null===(e=lu.value[l])||void 0===e||e.unobserve(l),null===(t=lu.value[l])||void 0===t||t.disconnect()}});var ou="data:image/svg+xml,%3csvg%20width='120'%20height='69'%20viewBox='0%200%20120%2069'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.542236'%20width='119'%20height='67'%20rx='1.5'%20fill='%23F7F8FA'/%3e%3crect%20x='0.5'%20y='0.542236'%20width='119'%20height='67'%20rx='1.5'%20stroke='%23E8EBF0'%20stroke-dasharray='2%202'/%3e%3cg%20clip-path='url(%23clip0_124_7598)'%3e%3cpath%20d='M58.1246%2022.8954H61.7906L58.8902%2027.4266L64.7498%2031.449L59.5724%2041.475L60.0404%2045.189L58.8332%2040.206L60.521%2032.604L55.9316%2027.426L58.1246%2022.896V22.8954Z'%20fill='%23CCCCCC'/%3e%3cpath%20d='M56.1047%2022.938H48.8951C48.4205%2022.938%2048.0371%2023.3202%2048.0371%2023.7942V44.2704C48.0371%2044.7444%2048.4205%2045.1278%2048.8945%2045.1278H59.6711L56.4311%2040.2054L56.7791%2038.7474L53.8385%2035.2626C53.8185%2035.2386%2053.7935%2035.2194%2053.7653%2035.2062C53.737%2035.193%2053.7062%2035.1861%2053.675%2035.1861C53.6438%2035.1861%2053.613%2035.193%2053.5848%2035.2062C53.5565%2035.2194%2053.5315%2035.2386%2053.5115%2035.2626L49.9655%2039.468V24.8664H55.1711L56.1041%2022.938H56.1047ZM65.6549%2034.4406L70.1087%2039.723V24.8664H63.2951L64.5299%2022.938H71.1803C71.6543%2022.938%2072.0371%2023.3208%2072.0371%2023.7948V44.271C72.0371%2044.745%2071.6543%2045.1284%2071.1803%2045.1284H60.8633L61.4285%2041.8044L65.6549%2034.4412V34.4406ZM55.3679%2033.3534C55.0812%2033.4766%2054.7728%2033.5417%2054.4607%2033.5448C54.1486%2033.5479%2053.839%2033.489%2053.5499%2033.3715C53.2608%2033.254%2052.9978%2033.0802%2052.7764%2032.8603C52.555%2032.6404%2052.3794%2032.3786%2052.2599%2032.0903C52.1405%2031.802%2052.0795%2031.4928%2052.0804%2031.1807C52.0814%2030.8686%2052.1444%2030.5598%2052.2657%2030.2722C52.387%2029.9846%2052.5642%2029.724%2052.787%2029.5055C53.0098%2029.287%2053.2738%2029.1149%2053.5637%2028.9992C54.1393%2028.7695%2054.7821%2028.7758%2055.3531%2029.0166C55.9241%2029.2574%2056.3773%2029.7135%2056.6145%2030.286C56.8517%2030.8585%2056.8539%2031.5014%2056.6206%2032.0755C56.3873%2032.6496%2055.9372%2033.1087%2055.3679%2033.3534ZM55.2161%2031.1754C55.2161%2030.7608%2054.8807%2030.4254%2054.4661%2030.4254C54.0509%2030.4254%2053.7161%2030.7608%2053.7161%2031.1754C53.7161%2031.5912%2054.0509%2031.9254%2054.4661%2031.9254C54.8807%2031.9254%2055.2161%2031.5912%2055.2161%2031.1754Z'%20fill='%23CCCCCC'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_124_7598'%3e%3crect%20width='24.5859'%20height='24'%20fill='white'%20transform='translate(47.707%2022.0422)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",iu=["title"],su={key:0,class:"text-[#666666] text-[12px] font-400"},ru={class:"ml4px"},uu={class:"process-node-content rounded-4px"},cu={class:"process-node-content-left mr12px"},du={class:"avatar-wrap w42px"},pu={class:"ks-row-center"},mu=["src"],vu=["title"],hu={class:"process-node-content-main ks-col"},fu={class:"p8px bg-[#FFFFFF] rounded-4px min-h100% pr8px"},gu={class:"ks-row text-[14px]"},yu=["title"],bu={key:0,class:"ks-row text-[#666666] mt8px"},xu={class:"mr2px"},wu={class:"bg-[#FFFFFF] pr8px process-node-content-right w148px text-right text-[#8F8F8F] ks-column p8px"},ku={key:0,class:"ks-col ks-row-end justify-end"},Cu=/* @__PURE__ */we({__name:"approval-node",props:{data:{},titleHeight:{},isDesign:{type:Boolean},hiddenSignature:{type:Boolean},hiddenOpinion:{type:Boolean},isCompeleted:{type:Boolean}},setup(e){const t=e,l=Re(),a=Re(!1),n=Re(Boolean(t.data.expand));function i(){n.value=!n.value}Ze(()=>t.data.expand,e=>{n.value=Boolean(e)});const s={[B.Approve]:"#309C41",[B.Countersign]:"#6931EC",[B.Reassign]:"#31B4EC",[B.Refuse]:"#DB0000",[B.Reject]:"#DB0000"},r=de(()=>t.data.approvalList.filter(e=>e.approval).map(e=>{if(e.approval===B.Countersign)e.userList=e.countersignUsers.map(e=>({...e,username:e.fullname}));else if(e.approval===B.Reassign){var t;e.userList=e.reassigner?[{...e.reassigner,username:null===(t=e.reassigner)||void 0===t?void 0:t.fullname}]:[]}try{const t=e.signature?JSON.parse(e.signature).url:"";return{...e,signature:t}}catch(l){return e}})),u=de(()=>t.data.approvalList.filter(e=>!e.approval));return De(()=>{var e,n;t.isDesign||(e=l,n=e=>{a.value=e},lu.value[e.value.toString()]=o(e.value,e=>{const t=e[0].target.clientHeight;t&&n&&n(t&&tu.value&&t>tu.value,tu.value)}))}),(t,o)=>{var c;const d=ze("up-outlined"),p=ze("down-outlined"),m=ze("a-image");return Me(),he("div",{ref_key:"approvalNodeRef",ref:l},[fe("div",{class:Te(["process-node-title text-[14px] font-500 mb8px ks-row-middle",[a.value&&"sticky-node"]]),style:Fe({"--type-color":"#309C41","--sticky-top":`${e.titleHeight||0}px`,"--status-color":e.isCompeleted?"#3168EC":"#309C41"})},[fe("div",{class:"ell ks-col break-all",title:e.data.name},Ke(e.data.name),9,iu),e.data.startTime?(Me(),he("div",su,[ye(Ke(e.data.startTime)+" ",1),r.value.length>5?(Me(),he("span",{key:0,class:"ml12px text-[var(--ant-primary-color)] cursor-pointer",style:{display:"inline-flex","align-items":"center"},onClick:i},[ye(Ke(n.value?t.$t("sys.collapse"):t.$t("sys.unfold"))+" ",1),fe("span",ru,[n.value?(Me(),me(d,{key:0})):(Me(),me(p,{key:1}))])])):ve("",!0)])):ve("",!0)],6),fe("div",uu,[(Me(!0),he(ce,null,Pe(r.value.filter((e,t)=>n.value||t<5),(l,a)=>{var n;return Me(),he("div",{key:a,class:"ks-row mb8px bg-[#FBFBFC] p8px"},[fe("div",cu,[fe("div",du,[fe("div",pu,[fe("img",{src:l.avatar?"/minio/"+l.avatar:We(Yr),alt:"",width:"32",height:"32",style:{"border-radius":"50%"}},null,8,mu)]),fe("div",{class:"ell text-[12px] text-[#666666] mt4px text-center break-all",title:l.username},Ke(l.username),9,vu)])]),fe("div",hu,[fe("div",fu,[fe("div",gu,[fe("div",{class:"mr8px",style:Fe({wordBreak:"keep-all",color:s[l.approval]})},Ke(t.$t(`sys.process.paasBpmnButtonEvent.${l.approval}`)),5),lt(fe("div",{class:"ell-3 ks-col text-[#666666] break-all",title:l.approvalMsg},Ke(l.approvalMsg),9,yu),[[Qe,!e.hiddenOpinion]])]),!e.hiddenSignature&&l.signature?(Me(),he("div",bu,[fe("div",xu,Ke(t.$t("sys.model.sign")),1),l.signature?(Me(),me(m,{key:0,width:64,height:36,src:e.isDesign?l.signature:`/minio/${l.signature}`,fallback:We(ou)},null,8,["src","fallback"])):ve("",!0)])):ve("",!0),l.userList&&(null===(n=l.userList)||void 0===n?void 0:n.length)?(Me(),me(eu,{key:a,class:"mt8px",data:l.userList},null,8,["data"])):ve("",!0)])]),fe("div",wu,[fe("div",null,Ke(l.endTime),1),l.duration?(Me(),he("div",ku,Ke(t.$t("sys.integration.timeConsuming"))+": "+Ke(l.duration),1)):ve("",!0)])])}),128)),(null===(c=u.value)||void 0===c?void 0:c.length)?(Me(),me(eu,{key:e.data.key,class:"process-node-content bg-[#FBFBFC] rounded-4px p8px",data:u.value,"tag-name":t.$t("sys.process.status.approving")},null,8,["data","tag-name"])):ve("",!0)])],512)}}}),_u=/* @__PURE__ */C(Cu,[["__scopeId","data-v-a88d7ef9"]]);var Su=["title"],Eu={key:1,class:"py8px ks-row-middle"},Ou=["title"],Iu={class:"text-[12px] text-[#474747]"},Tu={key:0,class:"bg-[#FFFFFF] rounded-4px p16px text-[12px]"},Fu={key:0,class:"py8px"},Lu={key:1,class:"process-node-wrap pl16px"},Du=["title"],Bu={key:0,class:"text-[#666666] text-[12px] font-400"},Mu={key:2,class:"process-node-content bg-[#FBFBFC] rounded-4px ks-row p8px"},ju={class:"process-node-content-left mr12px"},Au={class:"avatar-wrap w42px"},Ru={class:"ks-row-center"},Nu=["src"],Pu=["title"],Uu={class:"process-node-content-main ks-col"},zu={key:1,class:"node-type-msg"},$u={class:"process-node-content-right w148px text-right text-[#8F8F8F] ks-column"},Vu={key:0,class:"ks-col ks-row-end justify-end"},Hu={key:1},Ku={key:0},Gu={key:1},qu={key:2},Yu=/* @__PURE__ */we({__name:"paas-bpmn-log",props:{instanceId:{},showTitle:{type:Boolean},title:{},isTable:{type:Boolean},hiddenOpinion:{type:Boolean},hiddenSignature:{type:Boolean},isDesign:{type:Boolean},info:{}},setup(e){const t=e,l=Re(),a=Re(!1),n=Ct.PRESENTED_IMAGE_SIMPLE,{logDetail:o,init:i}=function(){const e=Re();return{logDetail:e,init:function(t){!async function(t){e.value=await _api.apaas.processApprovalLog.getApproveHistory({id:t})||{}}(t)}}}(),s=de(()=>{let e=0;return t.showTitle&&t.title&&(e+=40),t.isTable||(e+=40),e}),r=de(()=>{var e;return((null===(e=o.value)||void 0===e?void 0:e.processHistoryList)??[]).reduce((e,t)=>(t.type===F.BpmnEnd||(t.type===F.BpmnApproval?e.push(...(t.approvalList.filter(e=>e.approval)||[]).map(e=>{try{const l=e.signature?JSON.parse(e.signature).url:"";return{...e,signature:l,name:t.name}}catch(l){return{...e,name:t.name}}})):e.push(t)),e),[])});return Ze(()=>t.instanceId,e=>{e&&i(e)},{immediate:!0}),De(async()=>{t.isDesign?o.value=t.info:nu(l,e=>{a.value=e})}),(t,i)=>{var u,c,d,p,m,v,h;const f=ze("a-empty"),g=ze("vxe-column"),y=ze("a-image"),b=ze("vxe-table");return Me(),he("div",{ref_key:"histortyRef",ref:l,class:"approval-history relative"},[fe("div",{class:Te(["approval-history-title w100% text-[16px] text-[#242424]",[a.value&&"sticky-node"]])},[e.showTitle?(Me(),he("div",{key:0,class:"pt6px pb8px font-500 ell break-all",title:e.title},Ke(e.title),9,Su)):ve("",!0),!e.isTable&&(null===(u=We(o))||void 0===u?void 0:u.duration)?(Me(),he("div",Eu,[(null===(c=We(o))||void 0===c?void 0:c.status)?(Me(),he("div",{key:0,class:"ell ks-col break-all",title:t.$t("sys.process.processStatus",{status:t.$t(We(W)[null===(d=We(o))||void 0===d?void 0:d.status]||"")})},Ke(t.$t("sys.process.processStatus",{status:t.$t(We(W)[null===(p=We(o))||void 0===p?void 0:p.status]||"")})),9,Ou)):ve("",!0),fe("div",Iu,Ke(t.$t("sys.pageDesigner.totalTimeSpent"))+":"+Ke(null===(m=We(o))||void 0===m?void 0:m.duration),1)])):ve("",!0)],2),e.isTable?(Me(),he("div",Hu,[be(b,{data:r.value,height:264,"show-overflow":"title","column-config":{resizable:!0},class:Te({default:!0})},{empty:tt(()=>[be(f,{image:We(n)},null,8,["image"])]),default:tt(()=>[be(g,{type:"seq",title:t.$t("sys.pageDesigner.index"),width:"60"},null,8,["title"]),be(g,{field:"name",title:t.$t("sys.appDesigner.approval.nodeName"),"min-width":"100px"},null,8,["title"]),be(g,{field:"username",title:t.$t("sys.pageDesigner.handler"),"min-width":"100px"},null,8,["title"]),be(g,{field:"message",title:t.$t("sys.pageDesigner.handleOperation"),"min-width":"160px"},{default:tt(({row:e})=>[e.type===We(F).BpmnApproval?(Me(),he("div",Ku,Ke(t.$t(`sys.process.paasBpmnButtonEvent.${e.approval}`)),1)):e.type===We(F).BpmnMessage?(Me(),he("div",Gu,[lt(fe("span",null,[ye(Ke(t.$t("sys.pageDesigner.numOfSuccesses",{num:e.success}))+" ",1),lt(fe("span",null,",",512),[[Qe,e.error]])],512),[[Qe,e.success]]),lt(fe("span",null,Ke(t.$t("sys.pageDesigner.numOfError",{num:e.error})),513),[[Qe,e.error]])])):(Me(),he("div",qu,Ke(e.message),1))]),_:1},8,["title"]),be(g,{field:"endTime",title:t.$t("sys.pageDesigner.handleTime"),"min-width":"180px"},null,8,["title"]),e.hiddenOpinion?ve("",!0):(Me(),me(g,{key:0,field:"approvalMsg",title:t.$t("sys.appDesigner.approval.opinion"),"min-width":"90px"},null,8,["title"])),e.hiddenSignature?ve("",!0):(Me(),me(g,{key:1,field:"signature",title:t.$t("sys.model.sign"),"min-width":"80px"},{default:tt(({row:t})=>[t.signature?(Me(),me(y,{key:0,width:38,height:22,src:e.isDesign?t.signature:`/minio/${t.signature}`,fallback:We(ou)},{previewMask:tt(()=>[...i[0]||(i[0]=[fe("i",{class:"iconfont icon-chakan1"},null,-1)])]),_:1},8,["src","fallback"])):ve("",!0)]),_:1},8,["title"]))]),_:1},8,["data"])])):(Me(),he("div",Tu,[(null===(v=We(o))||void 0===v||null===(v=v.processHistoryList)||void 0===v?void 0:v.length)?(Me(),he("div",Lu,[(Me(!0),he(ce,null,Pe((null===(h=We(o))||void 0===h?void 0:h.processHistoryList)??[],(l,a)=>{var n,i,r,u,c;return Me(),he("div",{key:a,class:"process-node"},[l.type===We(F).BpmnApproval?(Me(),me(_u,{key:a,data:l,"title-height":s.value,"is-design":e.isDesign,"hidden-opinion":e.hiddenOpinion,"hidden-signature":e.hiddenSignature,"is-last-node":a===((null===(n=We(o))||void 0===n||null===(n=n.processHistoryList)||void 0===n?void 0:n.length)??0)-1,"is-compeleted":(null===(i=We(o))||void 0===i?void 0:i.status)!==We($).COMPLETED&&a===((null===(r=We(o))||void 0===r||null===(r=r.processHistoryList)||void 0===r?void 0:r.length)??0)-1},null,8,["data","title-height","is-design","hidden-opinion","hidden-signature","is-last-node","is-compeleted"])):(Me(),he("div",{key:1,class:"process-node-title text-[14px] font-500 mb8px ks-row-middle",style:Fe({"--type-color":"#309C41","--status-color":(null===(u=We(o))||void 0===u?void 0:u.status)!==We($).COMPLETED&&a===((null===(c=We(o))||void 0===c||null===(c=c.processHistoryList)||void 0===c?void 0:c.length)??0)-1?"#3168EC":"#309C41"})},[fe("div",{class:"ell ks-col break-all",title:l.name},Ke(l.name),9,Du),l.startTime?(Me(),he("div",Bu,Ke(l.startTime),1)):ve("",!0)],4)),l.type!==We(F).BpmnEnd&&l.type!==We(F).BpmnApproval?(Me(),he("div",Mu,[fe("div",ju,[fe("div",Au,[fe("div",Ru,[fe("img",{src:l.avatar?"/minio/"+l.avatar:We(Yr),width:"32",height:"32",style:{"border-radius":"50%"}},null,8,Nu)]),fe("div",{class:"ell text-[12px] text-[#666666] mt4px text-center break-all",title:l.username},Ke(l.username),9,Pu)])]),fe("div",Uu,[l.type===We(F).BpmnSubmit||l.type===We(F).BpmnJs?(Me(),he("div",{key:0,class:"node-type-msg circle",style:Fe({"--type-color":l.type===We(F).BpmnSubmit?"#3168EC":"#309C41"})},Ke(l.message),5)):l.type===We(F).BpmnMessage?(Me(),he("div",zu,[lt(fe("span",{class:"text-[#309C41] mr14px"},Ke(t.$t("sys.pageDesigner.numOfSuccesses",{num:` ${l.success} `})),513),[[Qe,l.success]]),lt(fe("span",{class:"text-[#F54547]"},Ke(t.$t("sys.pageDesigner.numOfError",{num:` ${l.error} `})),513),[[Qe,l.error]])])):ve("",!0)]),fe("div",$u,[fe("div",null,Ke(l.endTime),1),l.duration?(Me(),he("div",Vu,Ke(t.$t("sys.integration.timeConsuming"))+": "+Ke(l.duration),1)):ve("",!0)])])):ve("",!0)])}),128))])):(Me(),he("div",Fu,[be(f,{image:We(n)},null,8,["image"])]))]))],512)}}}),Wu=/* @__PURE__ */C(Yu,[["__scopeId","data-v-c85122b0"]]),Ju=/* @__PURE__ */we({__name:"full-screen",props:{el:{type:Object,default:null}},setup(e){const{toggle:t,isFullscreen:l}=u(e.el),a=Re(!0),n=()=>{a.value=!1,t(),setTimeout(()=>{a.value=!0},100)};l.value=!!document.fullscreenElement;const o=de(()=>We(l)?ne("sys.tooltipExitFull"):ne("sys.tooltipEntryFull"));return(e,t)=>a.value?(Me(),me(We(Bt),{key:0,title:o.value,placement:"bottom","overlay-class-name":"gct-full-screen-wrap"},{default:tt(()=>[fe("span",{class:"text-16px gct-full-screen-box",onClick:n},[We(l)?(Me(),me(We(Qt),{key:1})):(Me(),me(We(Zt),{key:0})),Ue(e.$slots,"default")])]),_:3},8,["title"])):ve("",!0)}}),Xu=/* @__PURE__ */we({name:"CodeEditor",props:{value:{type:String,default:""},config:{type:Object,default:()=>({})},language:{type:String,default:"typescript"}},emits:["update:value"],setup(e,{emit:t}){const l=re("code-editor"),a=de({get:()=>e.value||"",set(e){t("update:value",e)}}),n=Re(null);let o=null;return De(()=>{g.init().then(t=>{n.value&&(o=t.editor.create(n.value,Q({value:a.value,language:e.language,automaticLayout:!0,minimap:{enabled:!1}},e.config)),o.onDidBlurEditorText(()=>{a.value=o.getValue()}))})}),Be(()=>{null==o||o.dispose()}),()=>be("div",{ref:n,class:l.b()},null)}}),Qu=/* @__PURE__ */we({name:"ViewContainer",props:{context:{type:Object},params:{type:Object},modal:{type:Object,required:!0}},setup:()=>({ns:re("view-container")}),render(){var e,t;return be("div",{class:this.ns.b()},[this.$slots.header?be("div",{class:this.ns.b("header")},[this.$slots.header()]):null,be("div",{class:this.ns.b("content")},[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t)]),this.$slots.footer?be("div",{class:this.ns.b("footer")},[this.$slots.footer()]):null])}}),Zu=/* @__PURE__ */we({name:"Vue3GridDndItem",props:{index:{type:Number,required:!0},data:{type:Object,required:!0},move:{type:Function},end:{type:Function}},setup(e){const t=re("vue3-grid-dnd-item");function l(e,t){return e&&e.classList.contains(t)?e:l(e.parentElement,t)}const a=Re(null),n=de(()=>{if(a.value){const e=l(a.value,"vxe-body--row");if(e)return e}return null}),o=Re(!1),[i,s,r]=p({type:"vue3-grid-dnd-item",item:()=>e.data,collect:e=>({canDrag:e.canDrag(),isDragging:e.isDragging()}),end(t){e.end&&e.end(t)}}),[u,c]=d({accept:"vue3-grid-dnd-item",collect:e=>({handlerId:e.getHandlerId(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0})}),hover(t,l){if(!1!==l.canDrop()&&!0!==i.value.isDragging&&e.data!==t&&l.isOver({shallow:!0})){const e=a.value.getBoundingClientRect(),t=l.getClientOffset(),{top:n,height:i}=e,{y:s}=t,r=i/2;o.value=s-n-r<0}},canDrop:()=>!0!==i.value.isDragging,drop(t,l){!1!==l.canDrop()&&!0!==i.value.isDragging&&e.data!==t&&e.move&&e.move(o.value,e.data,t)}});return s(a),c(n),r(n),Ze([u,o],()=>{if(n.value&&(n.value.classList.remove(t.is("over",!0),t.is("before",!0),t.is("after",!0)),u.value.canDrop&&u.value.isShallowOver)){const e=t.is("over",!0),l=o.value?t.is("before",!0):t.is("after",!0);n.value.classList.add(e,l)}}),Ze(i,()=>{n.value&&(n.value.classList.remove(t.is("dragging",!0)),i.value.isDragging&&n.value.classList.add(t.is("dragging",!0)))}),{ns:t,rootRef:a,dropCollect:u}},render(){var e,t;return be("div",{ref:"rootRef",class:this.ns.b()},[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t)])}}),ec=/* @__PURE__ */we({__name:"SearchInput",props:{visibleValue:{}},emits:["change"],setup(e,{emit:t}){const l=t,a=e,n=Re();function o(){l("change",n.value)}return Ze(()=>a.visibleValue.value,e=>{e||(n.value=void 0,l("change",n.value))}),(e,t)=>{const l=ze("a-input");return Me(),he("div",{class:"gct-field-cascader-search",onMousedown:t[1]||(t[1]=at(()=>{},["stop"]))},[be(l,{value:n.value,"onUpdate:value":t[0]||(t[0]=e=>n.value=e),placeholder:"搜索字段",onChange:o},{prefix:tt(()=>[...t[2]||(t[2]=[fe("span",{class:"iconfont icon-pad_search text-[#8B8B8B]"},null,-1)])]),_:1},8,["value"])],32)}}}),tc=/* @__PURE__ */C(ec,[["__scopeId","data-v-512c4b38"]]);function lc(e,{onFieldClick:t}){const{fieldMetaList:l,modelName:a,maxLevel:n,filterFieldByFunction:o=()=>!0}=e,i=Re({}),s=Ae({}),r=Re(),u=Re([]),c=de(()=>e.value?e.value.split(e.valueSeparator||"$"):[]),d=Re(!1),p=de(()=>u.value.filter(e=>!e.title||!r.value||e.title.includes(r.value||"")).map(e=>{const t=e.isExpandField?f(e,2,i.value):[];return{...e,children:t}}));async function m({bindInfo:e,relationModelName:l,id:a,__bindFields:n,key:o,name:r},u){s[o]={name:r};const c=a+u;if(i.value[c])return void(i.value[c].keyword="");const d=await _api.apaas.modelMeta.getDetail({modelKey:e});return i.value[c]={keyword:"",option:[]},i.value[c].option=h({fields:d.fieldMetaList,title:l,search:e=>{i.value[c].keyword=e},onFieldClick:t,level:u,__bindFields:n}),i.value[c].option}function v(e,t){return{value:t,label:Ce(tc,{visibleValue:d,onChange:e}),isLeaf:!1,__props:{},isExpandField:!1}}function h({fields:t,title:l,search:a,level:i,onFieldClick:s,__bindFields:r}){const u=[e.searchable?v(a,i):null,ac(l)].filter(Boolean);return t.filter(o).forEach(e=>{u.push(function(e,{level:t,onClick:l,__bindFields:a}){const o=t<n&&oc.includes(e.type);e.__bindFields=[...a,e.key];const i=o?`${e.name}(${e.relationModelName})`:e.name,s=e.name;return{value:e.key,label:nc(s,o,l),title:s,titleWithRelation:i,isLeaf:!1,isExpandField:o,children:[],__props:e,__level:t,__id:e.id}}(e,{level:i,onClick(){s(e,i)},__bindFields:r}))}),u}function f(e,t,l){const{option:a=[],keyword:n=""}=l[e.__id+t]||{};return a.filter(e=>!e.title||!n||e.title.includes(n)).map(e=>({...e,children:e.isExpandField?f(e,t+1,l):[]}))}return De(()=>{u.value=h({fields:l,title:a,search:e=>{r.value=e},onFieldClick:t,level:1,__bindFields:[]}),async function(){const e=[...c.value];let t=[...u.value],l=1;for(;e.length>1;){const a=e.shift(),n=t.find(e=>e.value===a);if(!n)return;l+=1,t=await m(n.__props,l)||[]}}()}),{visibleValue:d,filterOptions:p,getChildrenOptionsByKey:m,fieldValues:c,fieldMapByKey:s}}function ac(e){return{value:e,label:Ce("div",{class:"gct-option-title ell"},e),isLeaf:!1,__props:{},isExpandField:!1}}var nc=(e,t,l)=>be("div",{class:"ell gct-option-label ks-row",onClick:l},[be("div",{class:"ks-col ell"},[ye(" "),e]),t?be("span",{class:"iconfont icon-pad_arrow_right"},null):null]),oc=[A.RDO_REF,A.REF,A.REF_MULTI],ic=/* @__PURE__ */we({__name:"FieldCascader",props:{fieldMetaList:{type:Object,default:()=>[]},filterFieldByFunction:{type:Function,default:()=>!0},maxLevel:{type:Number,default:3},value:{type:String,default:""},allowClear:{type:Boolean,default:!1},valueSeparator:{type:String,default:"$"},searchable:{type:Boolean,default:!0},expandToLeft:{type:Boolean,default:!1}},emits:["FieldClick","labelChange"],setup(e,{emit:t}){const l=t,a=e,{visibleValue:n,getChildrenOptionsByKey:o,filterOptions:i,fieldValues:s,fieldMapByKey:r}=lc(a,{onFieldClick:function(e){var t;l("FieldClick",null==e||null===(t=e.__bindFields)||void 0===t?void 0:t.join(a.valueSeparator),e),n.value=!1}}),u=Re(),c=async e=>{if(e.map(e=>e.value).join(",")===u.value)return;u.value=e.slice(0,-1).map(e=>e.value).join(",");const t=e.at(-1);t.isExpandField&&await o(t.__props,e.length+1)};function d(e){n.value=e}function p({labels:e,selectedOptions:t}){const a=t.length;let n=t.filter(e=>e).map((e,t)=>t===a-1?e.title:e.titleWithRelation).join(".");return!n&&e.length>0&&(n=e.map(e=>{var t;return(null===(t=r[e])||void 0===t?void 0:t.name)||""}).join(".")),l("labelChange",n),Ce("div",{class:"ell",title:n,onClick:e=>{e.stopPropagation(),e.preventDefault()}},n)}function m(e){void 0===e&&l("FieldClick",e,{})}return(t,l)=>{const o=ze("a-cascader");return Me(),me(o,{placeholder:"请选择",options:We(i),"load-data":c,"expand-trigger":"hover",class:"gct-field-cascader-selector","dropdown-class-name":"gct-field-cascader "+(a.expandToLeft?"cascader-expand-to-left":""),open:We(n),"allow-clear":e.allowClear,"display-render":p,value:We(s),placement:a.expandToLeft?"topRight":void 0,onMousedown:l[0]||(l[0]=e=>e.preventDefault()),onDropdownVisibleChange:d,onChange:m},null,8,["options","dropdown-class-name","open","allow-clear","value","placement"])}}}),sc=ic;function rc({getUserOptions:e,getUserByIds:t,getDeptOptions:l}){const a=Re([]),n=Re([]),o=Re([]),i=Re([]),s=Re([]),r=Ae({}),u=Re({checked:[]}),c=Re("");async function d(t){const{data:l=[]}=await e({orgId:c.value,pageNo:1,pageSize:9999,keyword:t})||{};o.value=l}async function p(e){c.value=e,i.value=[e],await d()}return{treeData:n,selectedKeys:i,userData:o,selectTreeNode:p,getUserTree:d,checkedBox:function(e,t,l){if(e.target.checked)l?s.value.push(t.id):s.value=[t.id],r[t.id]=Ge(t);else{const e=s.value.findIndex(e=>e===t.id);s.value.splice(e,1),r[t.id]=void 0}},checkedDepts:u,checkedUsers:s,UsersMap:r,orgsOptions:a,ready:async function({userIds:e=[],deptIds:i=[]}={},c=!0){await async function(){const e=await l();null==e||e.forEach(t=>{e.find(e=>e.id===t.parentId)||(t.parentId="ROOT")}),a.value=e,n.value=uc(e)}(),u.value.checked=ot(i||[]),c&&async function(e){var l;s.value=e;const a=null===(l=n.value[0])||void 0===l?void 0:l.key;a&&await p(a),e.forEach(async e=>{const l=o.value.find(t=>t.id===e);r[e]=l||(await t({ids:e})||[])[0]})}(ot(e||[]))}}}function uc(e,t="ROOT"){const l=[];for(const a of e)if(a.parentId===t){const t=uc(e,a.id);t.length>0?a.children=t:a.children=[],a.key=a.id,a.title=a.name,l.push(a)}return l}var cc={class:"ks-row-middle"},dc={class:"ell ks-col"},pc=/* @__PURE__ */C(/* @__PURE__ */we({__name:"user-item",props:{userId:{},usersMap:{}},emits:["deleteUser"],setup(e,{emit:t}){const{userId:l,usersMap:a}=Ae(e),n=t,o=de(()=>{const e=a[l];return(null==e?void 0:e.__LABEL__)||(null==e?void 0:e.fullname)});return(e,t)=>{const l=ze("DeleteOutlined");return Me(),he("div",cc,[t[1]||(t[1]=fe("span",{class:"iconfont icon-a-Accountnumber mr4px icon"},null,-1)),fe("div",dc,Ke(o.value),1),be(l,{class:"cursor-pointer",onClick:t[0]||(t[0]=e=>n("deleteUser"))})])}}}),[["__scopeId","data-v-1456f8b9"]]),mc={class:"ks-row-middle"},vc={class:"ell ks-col"},hc=/* @__PURE__ */C(/* @__PURE__ */we({__name:"dept-item",props:{deptId:{},deptOptions:{}},emits:["deleteDept"],setup(e,{emit:t}){const{deptId:l,deptOptions:a}=Ae(e),n=t,o=de(()=>{var e;return null===(e=a.find(e=>e.id===l))||void 0===e?void 0:e.name});return(e,t)=>{const l=ze("DeleteOutlined");return Me(),he("div",mc,[t[1]||(t[1]=fe("span",{class:"iconfont icon-wenjianjia mr4px depticon"},null,-1)),fe("div",vc,Ke(o.value),1),be(l,{class:"cursor-pointer",onClick:t[0]||(t[0]=e=>n("deleteDept"))})])}}}),[["__scopeId","data-v-075b8ce7"]]),fc=/* @__PURE__ */function(e){return e.ALL="ALL",e.APP="APP",e.ViSIBLE="ViSIBLE",e}({}),gc={class:"ks-row main"},yc={class:"h50% ks-col ks-row flex-col"},bc={class:"h40px text-center leading-10 font-bold baseborder border-0 border-b border-r"},xc={class:"ks-col overflow-x-auto pt10px"},wc={key:0,class:"h50% ks-col ks-row flex-col"},kc={class:"baseborder border-t border-0 border-b border-l h40px text-center leading-10"},Cc={class:"overflow-x-auto ks-col p10px"},_c={key:0,class:"shrink-0 ks-row w-11/36 flex-col"},Sc={class:"baseborder border-0 border-b h40px text-center leading-10"},Ec={class:"p5px"},Oc={class:"overflow-x-auto ks-col ml5px mr5px"},Ic={key:0,class:"h50% ks-col ks-row flex-col"},Tc={class:"baseborder border-0 border-b border-l h40px text-center leading-10"},Fc={class:"overflow-x-auto ks-col pt5px"},Lc={key:1,class:"h50% ks-col ks-row flex-col"},Dc={class:"baseborder border-t border-0 border-b border-l h40px text-center leading-10"},Bc={class:"overflow-x-auto ks-col pt5px"},Mc=/* @__PURE__ */function(e){return e.USER="picker_user",e.DEPT="picker_dept",e.ALL="pickker_all",e}(Mc||{}),jc=/* @__PURE__ */we({__name:"user-pick",props:{getUserOptions:{},getUserByIds:{},destroyVm:{},getDeptOptions:{},type:{}},setup(e,{expose:t}){const l=e,a=Re(!0),n=Re([]),{getUserOptions:o,getUserByIds:i,destroyVm:s,getDeptOptions:r}=Ae(l);let u;l.type===fc.ViSIBLE&&_api.apaas.designerCommon.getGetVisibleUser().then(e=>{n.value=e});const{treeData:c,selectedKeys:d,selectTreeNode:p,userData:m,getUserTree:v,checkedBox:h,checkedUsers:f,checkedDepts:g,UsersMap:y,orgsOptions:b,ready:x}=rc({getUserOptions:o,getUserByIds:i,getDeptOptions:r}),[w,{openModal:k,closeModal:C}]=is(),_=Re(""),S=Re(""),E=Re(Mc.ALL);function O(){if(C(),E.value===Mc.ALL){let e=f.value.map(e=>Ge(y[e])),t=g.value.checked.map(e=>Ge(b.value.find(t=>t.id===e)));u({userIds:Ge(f.value),deptIds:Ge(g.value.checked)},{userMaps:e,DeptMaps:t})}if(E.value===Mc.USER){let e=f.value.map(e=>Ge(y[e]));u(Ge(f.value),Ge(e))}if(E.value===Mc.DEPT){let e=g.value.checked.map(e=>Ge(b.value.find(t=>t.id===e)));u(Ge(g.value.checked),e)}s()}function I(e){let t=e[0];t&&p(t)}function T(){v(_.value)}function F(){s()}function L({checked:e}){!a.value&&e.length>1&&e.shift()}return t({openPickerByUser:function({userIds:e,multiple:t,callback:l}){x({userIds:e}),u=l,E.value=Mc.USER,S.value=ne("sys.org."+E.value),a.value=t,k()},openPicker:function({userIds:e,deptIds:t,callback:l}){x({userIds:e,deptIds:t}),u=l,E.value=Mc.ALL,S.value=ne("sys.org."+E.value),a.value=!0,k()},openPickerByDept:function({deptIds:e,multiple:t,callback:l}){x({deptIds:e},!1),u=l,E.value=Mc.DEPT,S.value=ne("sys.org."+E.value),a.value=t,k()}}),(e,t)=>{const l=ze("ScrollContainer"),o=ze("SearchOutlined"),i=ze("overlayScrollbarsComponent"),s=ze("basic-modal");return Me(),me(s,{height:500,title:S.value,centered:"",width:"740px","mask-closable":!1,"ok-button-props":{disabled:!We(f).length&&!We(g).checked.length},onRegister:We(w),onOk:O,onCancel:F},{default:tt(()=>{var e;return[fe("div",gc,[fe("div",{class:Te(["shrink-0 dept baseborder border-0 border-r ks-row flex-col",E.value!==Mc.DEPT?"w-14/36":"w-1/2"])},[fe("div",yc,[fe("div",bc,Ke(We(ne)("sys.org.orgTree")),1),fe("div",xc,[be(l,null,{default:tt(()=>{var e;return[(null===(e=We(c))||void 0===e?void 0:e.length)?(Me(),me(We(Mt),{key:0,"checked-keys":We(g),"onUpdate:checkedKeys":t[0]||(t[0]=e=>Se(g)?g.value=e:null),"check-strictly":"","selected-keys":We(d),checkable:E.value!==Mc.USER,"block-node":"","tree-data":We(c),"default-expand-all":"",virtual:!1,onSelect:I,onCheck:L},{title:tt(({title_:e})=>[t[2]||(t[2]=fe("span",{class:"iconfont icon-wenjianjia depticon"},null,-1)),ye(" "+Ke(e),1)]),_:1},8,["checked-keys","selected-keys","checkable","tree-data"])):ve("",!0)]}),_:1})])]),(null===(e=n.value)||void 0===e?void 0:e.length)?(Me(),he("div",wc,[fe("div",kc,Ke(We(ne)("sys.org.visiblePersonnel")),1),be(l,null,{default:tt(()=>[fe("div",Cc,[(Me(!0),he(ce,null,Pe(n.value,e=>(Me(),he("div",{key:e.id},[be(We(xt),{checked:We(f).indexOf(e.id)>-1,onChange:t=>We(h)(t,e,a.value)},{default:tt(()=>[ye(Ke(e.fullname),1)]),_:2},1032,["checked","onChange"])]))),128))])]),_:1})])):ve("",!0)],2),E.value!==Mc.DEPT?(Me(),he("div",_c,[fe("div",Sc,Ke(We(ne)("sys.org.candidates")),1),fe("div",Ec,[be(We(Et),{value:_.value,"onUpdate:value":t[1]||(t[1]=e=>_.value=e),placeholder:We(ne)("sys.org.pleaseEnterSearchContent"),onChange:T},{prefix:tt(()=>[be(o)]),_:1},8,["value","placeholder"])]),fe("div",Oc,[be(l,null,{default:tt(()=>[lt(be(We(Ct),{image:We(Ct).PRESENTED_IMAGE_SIMPLE,description:We(ne)("sys.org.noPersonnelInformationCurrentlyAvailable")},null,8,["image","description"]),[[Qe,!We(m).length]]),(Me(!0),he(ce,null,Pe(We(m),e=>(Me(),he("div",{key:e.id},[be(We(xt),{checked:We(f).indexOf(e.id)>-1,onChange:t=>We(h)(t,e,a.value)},{default:tt(()=>[ye(Ke(e.__LABEL__||e.fullname),1)]),_:2},1032,["checked","onChange"])]))),128))]),_:1})])])):ve("",!0),fe("div",{class:Te(["shrink-0 baseborder border-0 border-l ks-row flex-col",E.value!==Mc.DEPT?"w-11/36":"w-1/2"])},[E.value!==Mc.USER?(Me(),he("div",Ic,[fe("div",Tc,Ke(We(ne)("sys.org.selectedDepartment")),1),fe("div",Fc,[be(l,null,{default:tt(()=>[lt(be(We(Ct),{image:We(Ct).PRESENTED_IMAGE_SIMPLE,description:We(ne)("sys.ipaas.noData")},null,8,["image","description"]),[[Qe,!We(g).checked.length]]),(Me(!0),he(ce,null,Pe(We(g).checked,(e,t)=>(Me(),me(hc,{key:e,"dept-options":We(b),"dept-id":e,class:"rows",onDeleteDept:e=>We(g).checked.splice(t,1)},null,8,["dept-options","dept-id","onDeleteDept"]))),128))]),_:1})])])):ve("",!0),E.value!==Mc.DEPT?(Me(),he("div",Lc,[fe("div",Dc,Ke(We(ne)("sys.org.selectedPersonnel")),1),fe("div",Bc,[be(i,null,{default:tt(()=>[lt(be(We(Ct),{image:We(Ct).PRESENTED_IMAGE_SIMPLE,description:We(ne)("sys.ipaas.noData")},null,8,["image","description"]),[[Qe,!We(f).length]]),(Me(!0),he(ce,null,Pe(We(f),(e,t)=>(Me(),me(pc,{key:e,class:"rows","user-id":e,"users-map":We(y),onDeleteUser:e=>We(f).splice(t,1)},null,8,["user-id","users-map","onDeleteUser"]))),128))]),_:1})])])):ve("",!0)],2)])]}),_:1},8,["title","ok-button-props","onRegister"])}}}),Ac=/* @__PURE__ */C(jc,[["__scopeId","data-v-a49a84da"]]);function Rc({type:e=fc.ALL,fieldKey:t,modelKey:l}={}){const{getUserOptions:a,getUserByIds:n,getDeptOptions:o}=function({type:e,fieldKey:t,modelKey:l}){return{[fc.ALL]:{getUserOptions:_api.platform.orgUserPicker.getTenantManagementOrgUserPageList,getUserByIds:_api.platform.orgUserPicker.getTenantManagementUserListByIds,getDeptOptions:_api.platform.tenant.getManagementOrgList},[fc.APP]:{getUserOptions:e=>_api.apaas.designerCommon.getGetCanBeUsedOrgUser({fieldKey:t,modelKey:l,...e}),getUserByIds:e=>_api.apaas.designerCommon.getListUserByIds({fieldKey:t,modelKey:l,...e}),getDeptOptions:_api.apaas.designerCommon.getGetCanBeUsedOrg},[fc.ViSIBLE]:{getUserOptions:_api.apaas.designerCommon.getGetVisibleOrgUser,getUserByIds:_api.platform.orgUserPicker.getTenantManagementUserListByIds,getDeptOptions:_api.apaas.designerCommon.getGetVisibleOrg}}[e]}({type:e,fieldKey:t,modelKey:l});let i;const s=document.createDocumentFragment();function r(){var t;const l=be(Ac,{getUserOptions:a,getUserByIds:n,destroyVm:c,getDeptOptions:o,type:e});Ne(l,s),i=null===(t=l.component)||void 0===t?void 0:t.exposed}function u(e,t){return t||e instanceof Array||(e=[e]),e}function c(){setTimeout(()=>{Ne(null,s),i=null},300)}return{openPickerByUser:function({userIds:e=[],multiple:t=!0,callback:l}){r(),e=u(e,t),null==i||i.openPickerByUser({userIds:e,multiple:t,callback:l})},openPicker:function({userIds:e=[],deptIds:t=[],callback:l}){r(),null==i||i.openPicker({userIds:e,deptIds:t,callback:l})},openPickerByDept:function({deptIds:e=[],multiple:t=!0,callback:l}){r(),e=u(e,t),null==i||i.openPickerByDept({deptIds:e,multiple:t,callback:l})},getDeptOptions:o,getUserByIds:n}}var Nc={class:"h100% relative"},Pc={class:"absolute top-16px right-136px text-[#242424] text-[12px]",style:{"line-height":"26px"}},Uc=/* @__PURE__ */we({__name:"paas-bpmn-runtime",props:{instanceId:{}},setup(e){const{setNodeInstStatusMap:t,reset:l}=rl(),{init:a}=ul(),n=e,o={FINISHED:ol.COMPLETED,APPROVING:ol.RUNNING,UNSTART:ol.PENDING},i=de(()=>[ol.COMPLETED,ol.RUNNING,ol.PENDING].map(e=>({value:e,color:il[e],label:ne(`sys.process.flowNodeInstStatus.${e}`)})));return Le(()=>{l()}),Ze(()=>n.instanceId,async e=>{var l;if(!e)return;const n=await _api.apaas.processGraph.getGraphInfo({procInstanceId:e})||[],i=null===(l=n[0])||void 0===l?void 0:l.versionId;i&&async function(e,l){const n=await _api.apaas.pmProcessDefinitionVersion.getId({id:e});(null==n?void 0:n.json)&&a(null==n?void 0:n.json),t((l??[]).reduce((e,t)=>{let l=[t.id];if((t.type===F.BpmnExclusive||t.type===F.BpmnParallel)&&t.operationName){const e=t.operationName.split("#")[1];l.push(...e.split(","))}return l.forEach(l=>{e[l]={status:o[t.status],data:{...t,modelKey:n.modelKey,statusMsg:o[t.status]}}}),e},{}))}(i,n)},{immediate:!0}),(e,t)=>(Me(),he("div",Nc,[be(We(sl),{readonly:!0,"inst-mode":!0}),fe("div",Pc,[(Me(!0),he(ce,null,Pe(i.value,e=>(Me(),he("span",{key:e.value,class:"ml12px status-item"},[fe("span",{class:"inline-block w6px h6px rounded-50% mr8px",style:Fe({backgroundColor:e.color})},null,4),ye(" "+Ke(e.label),1)]))),128))])]))}}),zc=Uc,$c=/* @__PURE__ */we({__name:"i18n-modal",props:{lang:{},getContainer:{type:Function}},emits:["ok","register"],setup(e,{emit:t}){const l=e,a=t,n=Re(),o=Ae({id:""}),i=Re(!1),s=e=>{e&&(i.value=!1)},[r,{closeModal:u}]=ss(e=>{e&&c(e)}),c=e=>{i.value=!0,o.id=e.key;const{lang:t}=l;console.log(t,"lang========");for(const l of t){const t=l.dataIndex;o[t]=e[t]}},d=(e,t,l)=>{/^[a-zA-Z_.]*$/.test(t)||l(ne("sys.i18n.validated18nKeyErrorMsg")),l()},p=async(e,t)=>/^\s*$/g.test(t)?Promise.reject(ne("sys.notEmptySth",{sth:ne("sys.i18n")})):Promise.resolve(),m=()=>{var e;null===(e=n.value)||void 0===e||e.validate().then(()=>{a("ok",{...Ge(o)},i.value),u()})},v=()=>{var e;null===(e=n.value)||void 0===e||e.resetFields()};return(t,a)=>{const u=ze("a-input"),c=ze("a-form-item"),h=ze("a-form");return Me(),me(We(rs),Oe(t.$attrs,{title:i.value?We(ne)("sys.edit"):We(ne)("sys.new"),centered:"",width:"640px","min-height":100,"mask-closable":!1,"after-close":v,"get-container":e.getContainer,onRegister:We(r),onOk:m,onVisibleChange:s}),{default:tt(()=>[be(h,{ref_key:"formRef",ref:n,model:o,"label-col":{span:6},"wrapper-col":{span:16},autocomplete:"off",layout:"horizontal"},{default:tt(()=>[be(c,{label:We(ne)("sys.i18n.resourceIdentification"),name:"id",rules:[{required:!0,message:We(ne)("sys.pleaseInputSth",{sth:We(ne)("sys.i18n.resourceIdentification")})},{validator:d}]},{default:tt(()=>[be(u,{value:o.id,"onUpdate:value":a[0]||(a[0]=e=>o.id=e),"show-count":"",maxlength:128,disabled:i.value},null,8,["value","disabled"])]),_:1},8,["label","rules"]),(Me(!0),he(ce,null,Pe(l.lang,e=>(Me(),me(c,{key:e.dataIndex,label:e.title,name:e.dataIndex,rules:[{required:!0,message:We(ne)("sys.pleaseInputSth",{sth:e.title})},{validator:p}]},{default:tt(()=>[be(u,{value:o[e.dataIndex],"onUpdate:value":t=>o[e.dataIndex]=t,"show-count":"",maxlength:300},null,8,["value","onUpdate:value"])]),_:2},1032,["label","name","rules"]))),128))]),_:1},8,["model"])]),_:1},16,["title","get-container","onRegister"])}}}),Vc=$c,Hc={class:"i18n-select-container"},Kc={class:"table-wrap"},Gc=/* @__PURE__ */we({__name:"i18n-select-container",props:{i18nModalKey:{},destroyCallback:{type:Function},saveCallback:{type:Function}},setup(e){const[t,{closeModal:l}]=ss(),[a,{openModal:n}]=is(),o=e,i=()=>document.querySelector(`#${o.i18nModalKey}`),s=Re(),r=Ae({keywords:""}),u=Ae({current:1,pageSize:5,total:0,size:"small",showTotal:e=>ne("sys.component.table.total",{total:e})}),c=Re([]),d=Re(),p=Re({type:"radio",hideSelectAll:!0,selectedRowKeys:[],onChange:x}),m=Re(!1),v=de(()=>_gct.i18nUtil.enableLocaleList.map(e=>({title:e.language,dataIndex:e.languageTag}))),h=async(e,t)=>{m.value=!0;const l=await _api.apaas.i18NInfo.getPageList({pageNo:t??u.current,pageSize:u.pageSize,searchKey:e});if(m.value=!1,l&&l.data){const e=l.data.map(e=>{const t=JSON.parse(null==e?void 0:e.info);return{key:e.key,type:e.type,...Object.fromEntries(t.map(e=>[e.locale,e.info]))}});u.total=l.totalCount,c.value=e}};De(h);const f=()=>{var e;null===(e=s.value)||void 0===e||e.validate().then(async()=>{await h(r.keywords,1)})},g=e=>{const{current:t,total:l,pageSize:a}=e;u.current=t,u.total=l,u.pageSize=a,h()},y=()=>{n()},b=async(e,t)=>{const l=v.value.map(t=>({locale:t.dataIndex,info:e[t.dataIndex]}));m.value=!0;try{t?await _api.apaas.i18NInfo.putKey({key:e.id},{info:JSON.stringify(l)}):await _api.apaas.i18NInfo.post({info:JSON.stringify(l),key:e.id}),h(),x([e.id],[Ae(e)])}catch(a){m.value=!1}};function x(e,t){p.value.selectedRowKeys=e,d.value=t}const w=()=>{o.destroyCallback&&"function"==typeof o.destroyCallback&&o.destroyCallback()},k=async()=>{if(o.saveCallback&&"function"==typeof o.saveCallback){const t=p.value.selectedRowKeys,l={};if(t&&t[0]){var e;const a=null===(e=d.value)||void 0===e?void 0:e[0];console.log("selectRow",a),Object.assign(l,{i18nKey:t[0],i18nTitle:a[_gct.i18nUtil.locale]})}o.saveCallback(l)}l()};return(e,l)=>{const n=ze("a-input"),o=ze("a-form-item"),d=ze("a-col"),h=ze("a-button"),x=ze("plus-outlined"),C=ze("a-row"),_=ze("a-form"),S=ze("a-table"),E=ze("basic-modal");return Me(),me(E,Oe(e.$attrs,{"min-height":40,title:We(ne)("sys.i18n.i18nConfig"),centered:"",width:"640px","can-fullscreen":!1,"mask-closable":!1,"after-close":w,"get-container":i,onRegister:We(t),onOk:k}),{default:tt(()=>[fe("div",Hc,[be(_,{ref_key:"formRef",ref:s,model:r,autocomplete:"off",layout:"horizontal"},{default:tt(()=>[be(C,null,{default:tt(()=>[be(d,{span:12},{default:tt(()=>[be(o,{name:"keywords",label:We(ne)("sys.keywords")},{default:tt(()=>[be(n,{value:r.keywords,"onUpdate:value":l[0]||(l[0]=e=>r.keywords=e),placeholder:We(ne)("sys.keywordsPlaceholder"),style:{display:"inline-flex"}},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1}),be(d,{span:12,style:{"text-align":"right"}},{default:tt(()=>[be(h,{type:"primary",onClick:f},{icon:tt(()=>[be(We(al))]),default:tt(()=>[ye(" "+Ke(We(ne)("sys.queryText")),1)]),_:1}),be(h,{style:{margin:"0 8px"},type:"primary",onClick:y},{icon:tt(()=>[be(x)]),default:tt(()=>[ye(" "+Ke(We(ne)("sys.new")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),fe("div",Kc,[be(S,{ref:"tableRef","data-source":c.value,columns:v.value,"show-index-column":!1,pagination:u,striped:!1,bordered:!0,"row-selection":p.value,loading:m.value,onChange:g},null,8,["data-source","columns","pagination","row-selection","loading"]),be(Vc,{lang:v.value,"get-container":i,onRegister:We(a),onOk:b},null,8,["lang","onRegister"])])])]),_:1},16,["title","onRegister"])}}}),qc=/* @__PURE__ */C(Gc,[["__scopeId","data-v-5f75bfb2"]]),Yc=/* @__PURE__ */we({__name:"i18n-select-modal",setup(e,{expose:t}){const[l,{openModal:a}]=is();return t({open:()=>{a()}}),(e,t)=>(Me(),me(qc,{onRegister:We(l)},null,8,["onRegister"]))}});function Wc(){let e=null,t=null;const l=Re("");function a(t){"function"==typeof t&&t(),document.querySelector(`#${We(l)}`).remove(),e&&(e.unmount(),e=null)}return{open:async function(n){let o,i=document.body;if(ut(n,"target")||ut(n,"props")){const e=n;o=e.props||{},i=e.target||document.body}else o=n;l.value=o.i18nModalKey||`i18n-select-modal-${Math.random().toString(16).substring(8)}`;const s={...o,destroyCallback:()=>a(null==o?void 0:o.destroyCallback),i18nModalKey:We(l)};if(!e){const a=document.createElement("div");a.id=We(l);const n=We(i);null==n||n.appendChild(a),e=await U.createVueApp(Yc,s),t=e.mount(a)}null==t||t.open()},close:a}}var Jc={class:"i18n-tooltip-title"},Xc={style:{"margin-left":"4px"}},Qc=/* @__PURE__ */we({__name:"i18n-select-btn",props:{i18nValue:{},buttonExtraProps:{},size:{},i18nModalKey:{},simpleBtn:{type:Boolean},btnHeight:{},btnWidth:{}},emits:["on-select-i18n","closed"],setup(e,{emit:t}){const l=de(()=>_gct.i18nUtil.enableLocaleList),a=Wc(),n=e,o=t,i=Ae({}),s=de(()=>!pt(n.i18nValue));Ze(()=>n.i18nValue,()=>{pt(n.i18nValue)||(async e=>{const t=await _api.apaas.i18NInfo.getPageList({pageNo:1,pageSize:20,searchKey:e});if(t&&t.data){const e=t.data.find(e=>e.key===n.i18nValue);e&&Object.assign(i,Object.fromEntries(Object.entries(JSON.parse(e.info)).map(([e,t])=>[t.locale,t.info])))}})(n.i18nValue)},{immediate:!0});const r=()=>{a.open({i18nModalKey:n.i18nModalKey,saveCallback:e=>{o("on-select-i18n",{...e})},destroyCallback:()=>{o("closed")}})};return(t,a)=>{const n=ze("Icon"),o=ze("assets-svg-icon"),u=ze("a-button"),c=ze("a-tooltip");return e.simpleBtn?(Me(),me(n,{key:0,class:Te(["i18n-icon simple-btn",{"is-highlight":s.value}]),icon:"ion:language",onClick:r},null,8,["class"])):s.value?(Me(),me(c,{key:1,color:"#fff",placement:"topRight"},{title:tt(()=>[fe("div",Jc,"语言标识:"+Ke(e.i18nValue),1),(Me(!0),he(ce,null,Pe(l.value,e=>(Me(),he("div",{key:e.id,class:"i18n-tooltip-item"},[fe("strong",null,Ke(e.language)+": ",1),fe("span",Xc,Ke(i[e.languageTag]),1)]))),128))]),default:tt(()=>[be(u,Oe(e.buttonExtraProps,{class:{"is-highlight":s.value},style:{"--btn-width":e.btnWidth,"--btn-height":e.btnHeight},size:e.size,onClick:r}),{icon:tt(()=>[be(o,{class:"i18n-icon",src:"/extras-assets/svg/language.svg"})]),_:1},16,["class","style","size"])]),_:1})):(Me(),me(u,Oe({key:2},e.buttonExtraProps,{class:{"is-highlight":s.value},style:{"--btn-width":e.btnWidth,"--btn-height":e.btnHeight},size:e.size,onClick:r}),{icon:tt(()=>[be(o,{class:"i18n-icon",src:"/extras-assets/svg/language.svg"})]),_:1},16,["class","style","size"]))}}}),Zc=/* @__PURE__ */C(Qc,[["__scopeId","data-v-8e75ca4b"]]),ed=/* @__PURE__ */we({__name:"i18n-select-input",props:{attr:{},inputExtraProps:{},i18nConfig:{},i18nText:{},placeholderText:{},size:{},i18nModalKey:{},forceUpdate:{type:Boolean},btnHeight:{},btnWidth:{}},emits:["update:i18nText","update:i18nConfig","on-i18n-select","clickOutside","focus","blur"],setup(e,{emit:t}){const l=de(()=>!!_gct.store.appInfo.id),a=e,n=t,o=de({get:()=>a.i18nText??"",set(e){e!==a.i18nText&&n("update:i18nText",e)}}),i=de(()=>pt(a.i18nConfig)?{}:"string"==typeof a.i18nConfig?JSON.parse(a.i18nConfig)??{}:a.i18nConfig??{}),s=de(()=>{var e;return(null===(e=i.value)||void 0===e?void 0:e[a.attr])??""}),r=e=>{e&&((pt(o.value)||!0===a.forceUpdate)&&n("update:i18nText",e.i18nTitle),n("update:i18nConfig",JSON.stringify(pt(e)?gt(i.value,a.attr):{...i.value,[a.attr]:e.i18nKey})),n("on-i18n-select",e))},u=Re(),c=()=>{n("focus",u.value)},d=()=>{n("blur",u.value)},p=Re();return I(p,()=>{n("clickOutside")}),(t,a)=>{const i=ze("a-input"),m=ze("a-input-group");return Me(),me(m,{id:"i18nInputGroup",ref_key:"i18nInputGroup",ref:p,compact:""},{default:tt(()=>[Ue(t.$slots,"i18n-input",{},()=>[be(i,Oe({ref_key:"inputRef",ref:u},e.inputExtraProps,{value:o.value,"onUpdate:value":a[0]||(a[0]=e=>o.value=e),valueModifiers:{trim:!0},style:{height:e.btnHeight?e.btnHeight:e.size===We(L).SMALL?"26px":"32px",width:l.value?`calc(100% - ${e.btnWidth?e.btnWidth:e.size===We(L).SMALL?"26px":"32px"}`:"100%"},placeholder:e.placeholderText,size:e.size,"allow-clear":"",onFocus:c,onBlur:d}),null,16,["value","style","placeholder","size"])],!0),l.value?(Me(),me(Zc,{key:0,"btn-height":e.btnHeight,"btn-width":e.btnWidth,"i18n-value":s.value,size:e.size,"i18n-modal-key":e.i18nModalKey,onOnSelectI18n:r,onClosed:a[1]||(a[1]=e=>n("clickOutside"))},null,8,["btn-height","btn-width","i18n-value","size","i18n-modal-key"])):ve("",!0)]),_:3},512)}}}),td=/* @__PURE__ */C(ed,[["__scopeId","data-v-b4baf3ec"]]),ld=/* @__PURE__ */we({__name:"i18n-select-input-form",props:{formItemName:{},fromItemExtraProps:{},inputExtraProps:{},i18nConfig:{},text:{},formRef:{}},emits:["update:text"],setup(e,{emit:t}){const l=e,a=t,n=de({get:()=>l.text??"",set(e){var t;a("update:text",e),null===(t=l.formRef)||void 0===t||t.validateFields([l.formItemName])}});return(t,l)=>{const a=ze("a-form-item");return Me(),he(ce,null,[be(a,Oe({name:e.formItemName},e.fromItemExtraProps),{default:tt(()=>[be(td,Oe(t.$attrs,{"i18n-text":n.value,"onUpdate:i18nText":l[0]||(l[0]=e=>n.value=e),"input-extra-props":e.inputExtraProps,"i18n-config":e.i18nConfig,attr:Array.isArray(e.formItemName)?e.formItemName.join("."):e.formItemName,"placeholder-text":t.$t("sys.inputText")}),null,16,["i18n-text","input-extra-props","i18n-config","attr","placeholder-text"])]),_:1},16,["name"]),be(a,{name:"i18nConfig",hidden:""},{default:tt(()=>[fe("span",null,Ke(e.i18nConfig),1)]),_:1})],64)}}}),ad=ld,nd={class:"inline-block w100% relative"},od=/* @__PURE__ */we({__name:"i18n-select-textarea",props:{attr:{},inputExtraProps:{},i18nConfig:{},i18nText:{},placeholderText:{},rows:{},style:{}},emits:["update:i18nText","update:i18nConfig","on-i18n-select","clickOutside","focus"],setup(e,{emit:t}){const l=e,a=t,n=de({get:()=>l.i18nText??"",set(e){a("update:i18nText",e)}}),o=de(()=>pt(l.i18nConfig)?{}:"string"==typeof l.i18nConfig?JSON.parse(l.i18nConfig)??{}:l.i18nConfig??{}),i=de(()=>{var e;return null===(e=o.value)||void 0===e?void 0:e[l.attr]}),s=e=>{e&&(pt(n.value)&&a("update:i18nText",e.i18nTitle),a("update:i18nConfig",JSON.stringify(pt(e)?gt(o.value,l.attr):{...o.value,[l.attr]:e.i18nKey})),a("on-i18n-select",e))},r=Re(),u=()=>{a("focus",r.value)};return(t,l)=>{const o=ze("a-textarea");return Me(),he("div",nd,[be(o,Oe({ref_key:"inputRef",ref:r,value:n.value,"onUpdate:value":l[0]||(l[0]=e=>n.value=e),placeholder:e.placeholderText},e.inputExtraProps,{style:{resize:"none",...e.style},onFocus:u}),null,16,["value","placeholder","style"]),be(Zc,{"i18n-value":i.value,"simple-btn":!0,type:"text",onOnSelectI18n:s,onClosed:l[1]||(l[1]=e=>a("clickOutside"))},null,8,["i18n-value"])])}}}),id=/* @__PURE__ */C(od,[["__scopeId","data-v-cd95c416"]]),sd=/* @__PURE__ */we({__name:"i18n-select-textarea-form",props:{formItemName:{},fromItemExtraProps:{},inputExtraProps:{},i18nConfig:{},text:{},formRef:{}},emits:["update:text"],setup(e,{emit:t}){const l=e,a=t,n=de({get:()=>l.text??"",set(e){var t;a("update:text",e),null===(t=l.formRef)||void 0===t||t.validateFields([l.formItemName])}});return(t,l)=>{const a=ze("a-form-item");return Me(),he(ce,null,[be(a,Oe({name:e.formItemName},e.fromItemExtraProps),{default:tt(()=>[be(id,Oe(t.$attrs,{"i18n-text":n.value,"onUpdate:i18nText":l[0]||(l[0]=e=>n.value=e),"placeholder-text":t.$t("sys.inputText"),"input-extra-props":e.inputExtraProps,"i18n-config":e.i18nConfig,attr:Array.isArray(e.formItemName)?e.formItemName.join("."):e.formItemName}),null,16,["i18n-text","placeholder-text","input-extra-props","i18n-config","attr"])]),_:1},16,["name"]),be(a,{name:"i18nConfig",hidden:""},{default:tt(()=>[fe("span",null,Ke(e.i18nConfig),1)]),_:1})],64)}}}),rd=sd,ud={class:"serial-item-container flex"},cd={class:"tit"},dd={class:"tit"},pd={class:"tit"},md={class:"tit"},vd={class:"flex flex-col mr-10px serial-num-no-error"},hd={class:"tit"},fd={class:"serial-num-no-error flex items-end"},gd={class:"tit"},yd={class:"tit"},bd={class:"tit"},xd={class:"tit"},wd={class:"flex flex-col mr-10px serial-num-no-error"},kd={class:"tit"},Cd=/* @__PURE__ */we({__name:"serial-number-item",props:{fieldName:{},isShow:{type:Boolean},itemConfig:{},modelKey:{},isFeild:{type:Boolean},required:{type:Boolean},serialValiIds:{},haveIncrease:{type:Boolean}},emits:["del","update:itemConfig"],setup(e,{emit:t}){const l=Re([{value:0,label:"sys.model.lowercase"},{value:1,label:"sys.model.uppercase"}]),a=Re(["最小长度:序列号的最小长度。","起始序号:序列号会从起始序号开始编码。","填充符:序列号值的长度不够时自动补位。","步长:下一个序列号在上一个序列号上递增或递减。","终止序号:序列号会在终止序号处结束。"]),n=t,o=e,i=Re(),s=de(()=>o.haveIncrease&&h.value.type!==K.INCREASE?gt(K,"INCREASE"):K),r=de({get:()=>o.itemConfig.config.minLength,set(e){h.value.config.minLength=e||0,n("update:itemConfig",h.value)}}),u=de({get:()=>o.itemConfig.config.from,set(e){h.value.config.from=e||0,n("update:itemConfig",h.value)}}),c=de({get:()=>o.itemConfig.config.to,set(e){h.value.config.to=null===e?void 0:e,n("update:itemConfig",h.value)}}),d=de({get:()=>o.itemConfig.config.padding,set(e){h.value.config.padding=e,n("update:itemConfig",h.value)}}),p=de({get:()=>o.itemConfig.config.step,set(e){0!==e?(h.value.config.step=e||1,n("update:itemConfig",h.value)):At.error("步长不可为0!")}}),m=de({get:()=>o.itemConfig.config.value,set(e){h.value.config.value=e,n("update:itemConfig",h.value)}}),v=de({get:()=>o.itemConfig.config.pattern,set(e){h.value.config.pattern=e,n("update:itemConfig",h.value)}}),h=de({get:()=>o.itemConfig,set(e){n("update:itemConfig",e)}}),f=async e=>{var t;h.value.config.modelKey=e,h.value.config.descName=null===(t=i.value)||void 0===t?void 0:t.feildCascaderName,n("update:itemConfig",h.value)},g=de(()=>{const e=h.value.config.patternType,t=h.value.config.reset;let l=310;return l="CUSTOM"===e&&t?98:"CUSTOM"===e||t?150:310,{width:`${l}px`,marginRight:"8px",background:"#fff"}}),y=()=>{n("del")},b=e=>{e===K.LETTER&&(h.value.config.upper=1),e===K.INCREASE&&(h.value.config={minLength:4,from:1,padding:"0",step:1}),h.value.type=e,n("update:itemConfig",h.value)},x=(e,t)=>{h.value.config.pattern="CUSTOM"===e?"":t.key,n("update:itemConfig",h.value)},w=()=>{n("update:itemConfig",h.value)};return(t,n)=>{var o,k,C,_,S,E;const O=ze("a-input-number"),I=ze("a-form-item-rest"),T=ze("a-input"),F=ze("question-circle-outlined"),L=ze("a-tooltip"),D=ze("a-select-option"),B=ze("a-select"),M=ze("data-field-cascader"),j=ze("a-checkbox"),A=ze("a-button");return Me(),he("div",{class:Te(["series-item-wrapper",{"series-disable":!e.isShow}])},[n[20]||(n[20]=fe("i",{class:"iconfont icon-drag mover"},null,-1)),fe("div",ud,[e.isFeild||e.fieldName!==We(K).INCREASE?(Me(),he(ce,{key:1},[fe("div",fd,[be(I,null,{default:tt(()=>[be(B,{value:h.value.type,"onUpdate:value":n[5]||(n[5]=e=>h.value.type=e),style:{width:"100px","margin-right":"8px"},onChange:b},{default:tt(()=>[(Me(!0),he(ce,null,Pe(Object.keys(s.value),e=>(Me(),me(D,{key:e,value:We(K)[e]},{default:tt(()=>[ye(Ke(We(ne)(`sys.model.${e}`)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),h.value.type===We(K).INCREASE?(Me(),he(ce,{key:0},[fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":null!=r.value&&null!=r.value}])},[fe("div",gd,Ke(We(ne)("sys.model.minimumLengthLimit")),1),be(I,null,{default:tt(()=>[be(O,{value:r.value,"onUpdate:value":n[6]||(n[6]=e=>r.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":null!=u.value&&null!=u.value}])},[fe("div",yd,Ke(We(ne)("sys.model.startingSequenceNumber")),1),be(I,null,{default:tt(()=>[be(O,{value:u.value,"onUpdate:value":n[7]||(n[7]=e=>u.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":d.value}])},[fe("div",bd,Ke(We(ne)("sys.model.placeholder")),1),be(I,null,{default:tt(()=>[be(T,{value:d.value,"onUpdate:value":n[8]||(n[8]=e=>d.value=e)},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":p.value}])},[fe("div",xd,Ke(We(ne)("sys.model.step")),1),be(I,null,{default:tt(()=>[be(O,{value:p.value,"onUpdate:value":n[9]||(n[9]=e=>p.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",wd,[fe("div",kd,Ke(We(ne)("sys.model.endSerialNumber")),1),be(I,null,{default:tt(()=>[be(O,{value:c.value,"onUpdate:value":n[10]||(n[10]=e=>c.value=e),precision:0},null,8,["value"])]),_:1})]),be(L,{"overlay-class-name":"serial-increase-tooltip"},{title:tt(()=>[(Me(!0),he(ce,null,Pe(a.value,(e,t)=>(Me(),he("div",{key:t,class:"tip-item"},Ke(e),1))),128))]),default:tt(()=>[be(F,{style:{"margin-top":"20px",color:"#c3c3c3","line-height":"30px"}})]),_:1})],64)):ve("",!0),h.value.type===We(K).FIXED?(Me(),he("div",{key:1,class:Te({"serial-num-no-error":m.value||!(null===(o=e.serialValiIds)||void 0===o?void 0:o.includes(e.itemConfig.id))})},[be(I,null,{default:tt(()=>[be(T,{value:m.value,"onUpdate:value":n[11]||(n[11]=e=>m.value=e),style:{width:"310px"},placeholder:We(ne)("sys.pageDesigner.inputplaceholder")},null,8,["value","placeholder"])]),_:1})],2)):ve("",!0),h.value.type===We(K).PLACEHOLDER?(Me(),me(M,{key:2,ref_key:"fieldCascaderRef",ref:i,value:h.value.config.modelKey,"onUpdate:value":[n[12]||(n[12]=e=>h.value.config.modelKey=e),f],class:Te({"serial-num-no-error":h.value.config.modelKey||!(null===(k=e.serialValiIds)||void 0===k?void 0:k.includes(e.itemConfig.id))}),style:{width:"310px","margin-right":"8px"},"model-key":e.modelKey,"is-feild":e.isFeild},null,8,["value","class","model-key","is-feild"])):ve("",!0),h.value.type===We(K).DATE?(Me(),he(ce,{key:3},[fe("div",{class:Te({"serial-num-no-error":h.value.config.patternType||!(null===(C=e.serialValiIds)||void 0===C?void 0:C.includes(e.itemConfig.id))})},[be(I,null,{default:tt(()=>[be(B,{value:h.value.config.patternType,"onUpdate:value":n[13]||(n[13]=e=>h.value.config.patternType=e),style:Fe(g.value),onChange:x},{default:tt(()=>[(Me(!0),he(ce,null,Pe(We(z),(e,t)=>(Me(),me(D,{key:t,value:t},{default:tt(()=>[ye(Ke(We(ne)(We(z)[t])),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","style"])]),_:1})],2),fe("div",{class:Te({"serial-num-no-error":v.value||!(null===(_=e.serialValiIds)||void 0===_?void 0:_.includes(e.itemConfig.id))})},[be(I,null,{default:tt(()=>[lt(be(T,{value:v.value,"onUpdate:value":n[14]||(n[14]=e=>v.value=e),style:Fe(g.value),placeholder:"请输入"},null,8,["value","style"]),[[Qe,"CUSTOM"===h.value.config.patternType]])]),_:1})],2)],64)):ve("",!0),h.value.type===We(K).LETTER?(Me(),he("div",{key:4,class:Te({"serial-num-no-error":h.value.config.upper||!(null===(S=e.serialValiIds)||void 0===S?void 0:S.includes(e.itemConfig.id))})},[be(I,null,{default:tt(()=>[be(B,{value:h.value.config.upper,"onUpdate:value":n[15]||(n[15]=e=>h.value.config.upper=e),style:{width:"310px"},onChange:w},{default:tt(()=>[(Me(!0),he(ce,null,Pe(l.value,(e,t)=>(Me(),me(D,{key:`${e.value}_${t}`,value:e.value},{default:tt(()=>[ye(Ke(We(ne)(e.label)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})],2)):ve("",!0)],64)):(Me(),he(ce,{key:0},[fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":null!=r.value&&null!=r.value}])},[fe("div",cd,Ke(We(ne)("sys.model.minimumLengthLimit")),1),be(I,null,{default:tt(()=>[be(O,{value:r.value,"onUpdate:value":n[0]||(n[0]=e=>r.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":null!=u.value&&null!=u.value}])},[fe("div",dd,Ke(We(ne)("sys.model.startingSequenceNumber")),1),be(I,null,{default:tt(()=>[be(O,{value:u.value,"onUpdate:value":n[1]||(n[1]=e=>u.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":d.value}])},[fe("div",pd,Ke(We(ne)("sys.model.placeholder")),1),be(I,null,{default:tt(()=>[be(T,{value:d.value,"onUpdate:value":n[2]||(n[2]=e=>d.value=e)},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":p.value}])},[fe("div",md,Ke(We(ne)("sys.model.step")),1),be(I,null,{default:tt(()=>[be(O,{value:p.value,"onUpdate:value":n[3]||(n[3]=e=>p.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",vd,[fe("div",hd,Ke(We(ne)("sys.model.endSerialNumber")),1),be(I,null,{default:tt(()=>[be(O,{value:c.value,"onUpdate:value":n[4]||(n[4]=e=>c.value=e),precision:0},null,8,["value"])]),_:1})]),be(L,{"overlay-class-name":"serial-increase-tooltip"},{title:tt(()=>[(Me(!0),he(ce,null,Pe(a.value,(e,t)=>(Me(),he("div",{key:t,class:"tip-item"},Ke(e),1))),128))]),default:tt(()=>[be(F,{style:{"margin-top":"20px",color:"#c3c3c3","line-height":"30px"}})]),_:1})],64)),h.value.type===We(K).DATE&&h.value.config.reset?(Me(),he("div",{key:2,class:Te({"serial-num-no-error":h.value.config.condition||!(null===(E=e.serialValiIds)||void 0===E?void 0:E.includes(e.itemConfig.id))})},[be(I,null,{default:tt(()=>[be(B,{value:h.value.config.condition,"onUpdate:value":n[16]||(n[16]=e=>h.value.config.condition=e),style:Fe(g.value),onChange:w},{default:tt(()=>[(Me(!0),he(ce,null,Pe(Object.keys(We(V)),e=>(Me(),me(D,{key:e,value:We(V)[e]},{default:tt(()=>[ye(Ke(We(ne)(`sys.${e}`)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","style"])]),_:1})],2)):ve("",!0),[We(K).PLACEHOLDER,We(K).DATE].includes(h.value.type)?(Me(),me(I,{key:3},{default:tt(()=>[be(j,{checked:h.value.config.reset,"onUpdate:checked":n[17]||(n[17]=e=>h.value.config.reset=e),style:{width:"70px","line-height":"30px"},onChange:w},{default:tt(()=>[...n[18]||(n[18]=[ye("重置",-1)])]),_:1},8,["checked"])]),_:1})):ve("",!0)]),e.isShow&&(e.isFeild||h.value.type!==We(K).INCREASE)?(Me(),he("div",{key:0,class:Te(["action",{"pt18px pl5px":h.value.type===We(K).INCREASE}]),onClick:y},[be(A,null,{icon:tt(()=>[...n[19]||(n[19]=[fe("span",{class:"gct-iconfont icon-icon_shanchu"},null,-1)])]),_:1})],2)):ve("",!0)],2)}}}),_d=/* @__PURE__ */C(Cd,[["__scopeId","data-v-7baf8e25"]]),Sd={class:"serial-number-container-wrapper"},Ed={class:"serial-number-container-preview"},Od={class:"preview-title"},Id={class:"preview-box"},Td=["innerHTML"],Fd=/* @__PURE__ */we({__name:"serial-number-container",props:{serialConfigValue:{},disabled:{type:Boolean},readonly:{type:Boolean},field:{},isFeild:{type:Boolean},required:{type:Boolean},serialValiIds:{},increaseHidden:{type:Boolean},isDesign:{type:Boolean}},emits:["update:value"],setup(e,{emit:t}){const a=e,n=t,o=Re(),i=Re(),s=Re([]),r=de({get(){const e=[{id:Y(),type:K.INCREASE,config:{minLength:4,from:1,padding:"0",step:1}}];return a.serialConfigValue?a.serialConfigValue:{modelKey:"",ruleConfig:a.increaseHidden&&!a.isDesign?[]:e}},set(e){n("update:value",e)}}),u=de(()=>{const{ruleConfig:e}=We(r);return e}),c=de(()=>!!u.value.find(e=>e.type===K.INCREASE));l(r,async()=>{m()},{debounce:500}),De(()=>{Ie(()=>{if(!a.disabled){if(a.serialConfigValue){const{modelKey:e}=a.serialConfigValue;i.value=e}cl.create(o.value,{animation:150,onEnd(e){const{modelKey:t}=We(r),l=ot(u.value);Z(l,e.oldIndex,e.newIndex),r.value={modelKey:t,ruleConfig:l}}}),!a.serialConfigValue&&r.value&&(n("update:value",r.value),m())}})});const d=e=>{let t="";const{modelKey:l}=We(r),a=ot(u.value);a.map(e=>e.id).includes(e.id)&&(a.forEach(l=>{var a;l.id===e.id&&(l.type=e.type,l.config=e.config,l.type===K.PLACEHOLDER&&(t=null===(a=e.config.modelKey)||void 0===a?void 0:a.split(".")[0]))}),r.value={modelKey:t||l,ruleConfig:a})},p=()=>{const{modelKey:e}=We(r),t=ot(u.value),l={id:Y(),type:K.FIXED,config:{value:"",modelKey:"",pattern:"yyyyMMdd",patternType:"yyyyMMdd",condition:V.YEAR,minLength:0,from:0,padding:"",reset:!1,step:1,to:0,descName:""}};r.value={modelKey:e,ruleConfig:[...t,l]}},m=async()=>{var e;if(!a.field)return;const t=ot(u.value),l={},n=null===(e=t.filter(e=>e.type===K.PLACEHOLDER&&e.config.modelKey))||void 0===e?void 0:e.map(e=>({key:e.config.modelKey,value:"${"+e.config.descName+"}"}));n.length&&n.forEach(e=>{l[e.key]=e.value}),s.value=(await _api.apaas.fieldMeta.postPreview({ruleJson:JSON.stringify(t),placeHolders:l})||[]).map(e=>e.replace(/\$\{/g,"<span>${").replace(/\}/g,"}</span>"))};return(t,l)=>{const n=ze("plus-outlined"),i=ze("a-button");return Me(),he("div",Sd,[fe("div",{ref_key:"serialRef",ref:o,class:Te(["serial-num-item-box",{"serial-disabled":e.disabled}])},[(Me(!0),he(ce,null,Pe(u.value,(t,l)=>(Me(),me(_d,{key:t.id,class:Te(t.type===We(K).INCREASE&&0===l?"increase-mt":""),"field-name":t.type,"item-config":t,"is-show":!(e.readonly||e.disabled),"model-key":t.type===We(K).PLACEHOLDER?r.value.modelKey:"","is-feild":e.isFeild,required:e.required,"serial-vali-ids":e.serialValiIds,"have-increase":c.value,onDel:e=>(e=>{if(a.disabled)return;const{modelKey:t}=We(r),l=ot(u.value);l.splice(e,1),r.value={modelKey:t,ruleConfig:l}})(l),"onUpdate:itemConfig":d},null,8,["class","field-name","item-config","is-show","model-key","is-feild","required","serial-vali-ids","have-increase","onDel"]))),128))],2),e.readonly||e.disabled?ve("",!0):(Me(),me(i,{key:0,type:"dashed",onClick:p},{default:tt(()=>[be(n),ye(" "+Ke(We(ne)("sys.model.addMoreRule")),1)]),_:1})),fe("div",Ed,[fe("span",Od,Ke(We(ne)("sys.preview")+":"),1),fe("div",Id,[(Me(!0),he(ce,null,Pe(s.value,(e,t)=>(Me(),he("p",{key:t,innerHTML:e},null,8,Td))),128))])])])}}}),Ld=/* @__PURE__ */C(Fd,[["__scopeId","data-v-35a73b4c"]]),Dd={class:"w230px m--14px"},Bd={class:"ks-row"},Md={key:1,class:"ks-col ell"},jd={key:2,class:"action"},Ad=["onClick"],Rd=["onClick"],Nd={class:"popover-bottom"},Pd=/* @__PURE__ */we({__name:"field-tree-select",props:{fieldMap:{type:Object,default:()=>({})},groupOptions:{type:Array,default:()=>[]},fieldNames:{type:Object,default:()=>({children:"children",title:"title",key:"key"})},maxLevel:{type:Number,default:3},getLabelByFun:{type:Function,default:()=>{console.log("getLabelByFun")}},getFieldTypeByFun:{type:Function,default:()=>{console.log("getFieldTypeByFun")}},setLabelByFun:{type:Function,default:()=>{console.log("setLabelByFun")}}},emits:["change"],setup(e,{emit:t}){const l=e,a=t,{fieldNames:n,getLabelByFun:o,setLabelByFun:i,getFieldTypeByFun:s}=l,r=Re(!0),u=Re([]),c=Re(),d=Re({}),p=Re();function m(e){return e.isGroup?e[n.title]:o(l.fieldMap[e[n.key]])}function v(e){return s(l.fieldMap[e])}async function h(e){d.value=e,await Ie(),c.value&&c.value.select()}function f(){d.value={}}function g(e){let t=1;return function l(a,o){for(const i of a){if(i[n.key]===e)return t=o,!0;if(i.children&&i.children.length>0&&l(i.children,o+1))return!0}return!1}(l.groupOptions,1),t}function y(e){const{dropNode:t,dragNode:a}=e,{dropToGap:n}=e;let o=1;o=t.isGroup&&!n?g(t.key)+1:g(t.key);const i=function(e){return function e(t){if(!t.isGroup)return 0;let l=0;for(const a of t.children)l=Math.max(l,e(a));return l+1}(e)}(a);return r.value=o+i-1<=l.maxLevel,!0}const b=async e=>{if(!r.value)return;const{dropToGap:t,dragNode:n,node:o}=e,i=e.dropPosition,s=await new Promise(e=>{x(l.groupOptions,n.key,(t,l,a)=>{e(ot(a.splice(l,1)[0]))})});x(l.groupOptions,o.key,(e,l,a)=>{o.isGroup&&!t?e.children.unshift(s):a.splice(-1===i?l:l+1,0,s)}),a("change")},x=(e,t,l)=>{const a=e.length;for(let o=0;o<a;o++){const a=e[o];if(a[n.key]===t){l(a,o,e);break}a.children&&x(a.children,t,l)}};async function w(e,t){if(t)x(l.groupOptions,t,async(l,a,n)=>{const o=k(e);l.children.push(o),await Ie(),!u.value.includes(t)&&u.value.push(t),h(o),p.value.scrollTo({key:o.key})});else{const t=k(e);l.groupOptions.push(t),h(t),await Ie(),p.value.scrollTo({key:t.key})}a("change")}function k(e){const t=[];!function(e,t){if(!e)return;const l="children",a=[...e];for(;a.length>0;){const e=a.shift();if(Array.isArray(e[l]))for(let t=e[l].length-1;t>=0;t--)a.unshift(e[l][t]);t(e)}}(l.groupOptions,e=>{e.isGroup&&t.push(e.index)});const a=t.length?Math.max(...t)+1:1;return{title:`分组${a}`,groupLevel:e,key:/* @__PURE__ */(new Date).getTime(),isGroup:!0,children:[],index:a}}return(t,o)=>{const s=ze("a-select"),k=ze("a-input"),C=ze("a-tooltip"),_=ze("a-popconfirm"),S=ze("a-tree"),E=ze("plus-outlined"),O=ze("a-button"),I=ze("a-popover");return Me(),me(I,{trigger:"click",placement:"bottom","get-popup-container":e=>e.parentNode,"overlay-style":{paddingTop:0,paddingBottom:0}},{content:tt(()=>[fe("div",Dd,[e.groupOptions.length?(Me(),me(S,{key:0,ref_key:"treeRef",ref:p,"expanded-keys":u.value,"onUpdate:expandedKeys":o[0]||(o[0]=e=>u.value=e),"field-names":We(n),height:300,draggable:"","tree-data":e.groupOptions,"show-icon":"",class:Te(["tree-field",{"gct-no-drop":!r.value}]),selectable:!1,"allow-drop":y,virtual:!1,onDrop:b},{icon:tt(({isGroup:e,key:t})=>[e?(Me(),me(We(Vt),{key:0,class:"folder",size:"20",name:"folder"})):v(t)?(Me(),he("span",{key:1,class:Te(["iconfont primary-gct",We(R)[v(t)]])},null,2)):ve("",!0)]),title:tt(({key:e,isGroup:s,groupLevel:r,data:u})=>{return[fe("div",Bd,[d.value[We(n).key]===e?(Me(),me(k,{key:0,ref_key:"editorInput",ref:c,value:m(u),class:"ks-col h24px","allow-clear":!1,"onUpdate:value":e=>function(e,t){t.isGroup?d.value[n.title]=e:i(t[n.key],e),a("change")}(e,u),onBlur:f},null,8,["value","onUpdate:value"])):(Me(),he("div",Md,Ke(m(u)),1)),d.value[We(n).key]!==e?(Me(),he("div",jd,[s?(Me(),me(_,{key:0,placement:"topLeft",title:t.$t("sys.pageDesigner.confirmTodo"),onConfirm:()=>function(e){x(l.groupOptions,e,(e,t,l)=>{e.isGroup&&e.children.length&&l.push(...e.children),l.splice(t,1)}),a("change")}(e)},{default:tt(()=>[be(C,{title:"删除"},{default:tt(()=>[...o[2]||(o[2]=[fe("span",{class:"icon-shanchu iconfont mr6px cursor-pointer primary-gct-hover"},null,-1)])]),_:1})]),_:1},8,["title","onConfirm"])):ve("",!0),s&&(p=e,g(p)<l.maxLevel)?(Me(),me(C,{key:1,title:"添加子分组"},{default:tt(()=>[fe("span",{class:"icon-chuangjian iconfont mr6px cursor-pointer primary-gct-hover",onClick:t=>w(r+1,e)},null,8,Ad)]),_:2},1024)):ve("",!0),s?(Me(),me(C,{key:2,title:"重命名"},{default:tt(()=>[fe("span",{class:"icon-a-Single-linetext iconfont mr6px cursor-pointer primary-gct-hover",onClick:e=>h(u)},null,8,Rd)]),_:2},1024)):ve("",!0),be(C,{title:"拖动排序"},{default:tt(()=>[...o[3]||(o[3]=[fe("span",{class:"icon-drag iconfont"},null,-1)])]),_:1})])):ve("",!0)])];var p}),_:1},8,["expanded-keys","field-names","tree-data","class"])):ve("",!0),fe("div",Nd,[be(O,{type:"link",onClick:o[1]||(o[1]=e=>w(1))},{icon:tt(()=>[be(E)]),default:tt(()=>[o[4]||(o[4]=ye(" 添加表头分组 ",-1))]),_:1})])])]),default:tt(()=>[be(s,{value:"配置多级表头","dropdown-class-name":"hidden"})]),_:1},8,["get-popup-container"])}}}),Ud=/* @__PURE__ */C(Pd,[["__scopeId","data-v-898030d3"]]),zd={class:"w230px m--14px pb16px"},$d={class:"ks-col ell"},Vd=["onClick"],Hd=/* @__PURE__ */we({__name:"field-sort-popover",props:{fieldMap:{type:Object,default:()=>({})},groupOptions:{type:Array,default:()=>[]},fieldNames:{type:Object,default:()=>({children:"children",title:"title",key:"key"})},getLabelByFun:{type:Function,default:()=>{console.log("getLabelByFun")}},getFieldTypeByFun:{type:Function,default:()=>{console.log("getFieldTypeByFun")}},getFieldHiddenByFun:{type:Function,default:e=>e.visible},changeFieldHiddenByFun:{type:Function,default:(e,t)=>{e.visible=t}}},emits:["change"],setup(e,{emit:t}){const l=e,a=Re(!0),n=Re(),o=t,{fieldNames:i,getLabelByFun:s,fieldMap:r,getFieldTypeByFun:u,getFieldHiddenByFun:c,changeFieldHiddenByFun:d}=l,p=Ae(l.groupOptions);function m(e){return e.isGroup?e[i.title]:s(r[e[i.key]])}function v(e){return c(r[e])}function h(e){return u(r[e])}function f({node:e}){if(!e.isGroup)return;const t=e.expanded?"gct-"+e.key:void 0;n.value=t,e.dataRef.class=t}const g=async e=>{if(!a.value)return;const{dropToGap:t,dragNode:l,node:i}=e,s=e.dropPosition,r=await new Promise(e=>{y(p,l.key,(t,l,a)=>{e(ot(a.splice(l,1)[0]))})});y(p,i.key,(e,l,a)=>{i.isGroup&&!t?e.children.unshift(r):a.splice(-1===s?l:l+1,0,r)}),o("change",ot(p)),async function(){if(!n.value)return;await Ie();const e=document.querySelector(`.${n.value}`);e&&e.childNodes[2]&&e.childNodes[2].click()}()},y=(e,t,l,a)=>{const n=e.length;for(let o=0;o<n;o++){const n=e[o];if(n[i.key]===t){l(n,o,e,a);break}n.children&&y(n.children,t,l,n)}};function b({dragNode:e,dropNode:t,dropPosition:l}){return!(e.dataRef.noDrag||e.parent&&-1===l||(0===l?(null===(n=e.parent)||void 0===n?void 0:n.key)!==t.key:(a.value=function({dragNode:e,dropNode:t}){let l=!1;return y(p,t.key,(t,a,n,o)=>{var i;l=(null===(i=e.parent)||void 0===i?void 0:i.key)===(null==o?void 0:o.key)}),l}({dragNode:e,dropNode:t,dropPosition:l}),0)));var n}return(e,t)=>{const l=ze("a-tooltip"),n=ze("a-tree"),s=ze("a-popover");return Me(),me(s,{trigger:"click",placement:"bottom","get-popup-container":e=>e.parentNode,"overlay-style":{paddingTop:0}},{content:tt(()=>[fe("div",zd,[t[1]||(t[1]=fe("div",{class:"popover-title"},"显示字段",-1)),p.length?(Me(),me(n,{key:0,"default-expand-all":"","field-names":We(i),height:300,draggable:"","tree-data":p,"show-icon":"",class:Te(["tree-field",{"gct-no-drop":!a.value}]),selectable:!1,"allow-drop":b,virtual:!1,onDrop:g,onDragstart:f},{icon:tt(({isGroup:e,key:t})=>[e?(Me(),me(We(Vt),{key:0,class:"folder",size:"20",name:"folder"})):h(t)?(Me(),he("span",{key:1,class:Te(["iconfont primary-gct",We(R)[h(t)]])},null,2)):ve("",!0)]),title:tt(({noDrag:e,data:a,key:n,isGroup:i})=>[(Me(),he("div",{key:n,class:"ks-row"},[fe("div",$d,Ke(m(a)),1),i?ve("",!0):(Me(),he("span",{key:0,class:Te(["iconfont mr-4px",v(n)?"icon-yulan":"icon-baomi"]),onClick:e=>function(e){const t=v(e);d(r[e],!t),o("change",ot(p))}(n)},null,10,Vd)),e?ve("",!0):(Me(),me(l,{key:1,title:"拖动排序"},{default:tt(()=>[...t[0]||(t[0]=[fe("span",{class:"icon-drag iconfont"},null,-1)])]),_:1}))]))]),_:1},8,["field-names","tree-data","class"])):ve("",!0)])]),default:tt(()=>[Ue(e.$slots,"default",{},void 0,!0)]),_:3},8,["get-popup-container"])}}}),Kd=Ud,Gd=/* @__PURE__ */C(Hd,[["__scopeId","data-v-c1811778"]]),qd={class:"range-box"},Yd={class:"text"},Wd=/* @__PURE__ */we({__name:"number-range",props:{rangeMin:{type:[Number,void 0],default:void 0},rangeMax:{type:[Number,void 0],default:void 0},disabled:{type:Boolean,default:!1},precision:{type:Number,default:0},maxObj:{type:[Object,void 0],default:void 0},placeholderType:{type:String,default:ne("sys.model.value")}},emits:["update:rangeMin","update:rangeMax","change"],setup(e,{emit:t}){const l=e,a=de(()=>l.maxObj?l.maxObj.start:void 0),n=de(()=>l.maxObj?l.maxObj.end:void 0),o=e=>{s("update:rangeMin",e),s("change",e)},i=e=>{s("update:rangeMax",e),s("change",e)},s=t;return(t,l)=>{const s=ze("a-input-number");return Me(),he("div",qd,[be(s,{value:e.rangeMin,min:0,max:a.value,precision:e.precision,placeholder:`${We(ne)("sys.model.pleaseInputMin")}${e.placeholderType}`,onChange:o},null,8,["value","max","precision","placeholder"]),fe("div",Yd,[Ue(t.$slots,"middle-text",{},()=>[ye(Ke(t.$t("sys.webRender.to")),1)],!0)]),be(s,{value:e.rangeMax,min:0,max:n.value,precision:e.precision,placeholder:`${We(ne)("sys.model.pleaseInputMax")}${e.placeholderType}`,onChange:i},null,8,["value","max","precision","placeholder"])])}}}),Jd=/* @__PURE__ */C(Wd,[["__scopeId","data-v-283a5280"]]),Xd={install(e){e.component("IconNextPicker",xe(()=>import("./icon-next-picker-y8hJhkCi.js")))}},Qd={scrollbars:{autoHide:"leave",autoHideDelay:100,theme:"os-theme-dark"}},Zd=/* @__PURE__ */we({name:"GctOverlayScrollbars",inheritAttrs:!1,props:{options:{type:[Object,Boolean],default:null},handleColor:{type:String,default:"rgba(144, 147, 153, 0.3)"}},setup(e,{expose:t}){const l=Re(),a=de(()=>{if(!1===e.options)return!1;const t=e.options??{},l=t.scrollbars??{};return{...Qd,...t,scrollbars:{...Qd.scrollbars,...l}}}),n=de(()=>e.handleColor?{"--gct-h-bg":e.handleColor}:void 0);return t({osInstance:()=>{var e;return(null===(e=l.value)||void 0===e?void 0:e.osInstance())??null},getElement:()=>{var e;return(null===(e=l.value)||void 0===e?void 0:e.getElement())??null}}),{mergedOptions:a,colorStyle:n,setOsRef:e=>{l.value=e}}},render(){return be(T,Oe({ref:this.setOsRef,options:this.mergedOptions},this.$attrs,{"data-gct-os":"","data-gct-color":this.handleColor?"":void 0,style:this.colorStyle}),{default:()=>{var e,t;return[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t)]}})}}),ep={mounted(e,t){var l;if(!t.value)return!1;null===(l=t.instance)||void 0===l||l.$nextTick(()=>{const l=t.value,a=e,n=document.createElement("div");a.appendChild(n),n.style.cursor="col-resize",n.style.position="absolute",n.style.height="100%",n.style.width="5px",n.style.right="0px",n.style.top="0px",n.style.background="rgba(255, 0, 0, 0);",n.onmousedown=t=>{const n=a.clientWidth,o=t.clientX;document.onmousemove=function(t){t.preventDefault();let i=n+(t.clientX-o);i=i<l?l:i,a.setAttribute("style",`width:${i}px !important;`);const s=new CustomEvent("drag-resize-width",{detail:{width:i,resizing:!0}});e.dispatchEvent(s)},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})}},tp={mounted(e,t){e.__ellipsisHandler__=()=>{const l=e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight,a=t.value;l?e.setAttribute("title",a):e.removeAttribute("title")},e.addEventListener("mouseenter",e.__ellipsisHandler__)},beforeUnmount(e){e.__ellipsisHandler__&&e.removeEventListener("mouseenter",e.__ellipsisHandler__)}},lp=/* @__PURE__ */C(/* @__PURE__ */we({__name:"target-loading",props:{tip:{type:String,default:""},size:{type:String,default:H.LARGE,validator:e=>[H.DEFAULT,H.SMALL,H.LARGE].includes(e)},absolute:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},background:{type:String},theme:{type:String}},setup:e=>(t,l)=>lt((Me(),he("section",{class:Te(["full-loading",{absolute:e.absolute,[e.theme]:!!e.theme}]),style:Fe([e.background?`background-color: ${e.background}`:""])},[be(We(Dt),Oe(t.$attrs,{tip:e.tip,size:e.size,spinning:e.loading}),null,16,["tip","size","spinning"])],6)),[[Qe,e.loading]])}),[["__scopeId","data-v-d448466c"]]),ap={mounted(e,t){const l=e.getAttribute("loading-tip"),a=e.getAttribute("loading-background"),n=e.getAttribute("loading-size"),o=!!t.modifiers.fullscreen;e.instance=function(e,t,l=!1){let a=null;const n=Ae({tip:"",loading:!0,...e});function o(e=document.body){a&&a.el&&e.appendChild(a.el)}return a=be(we({render:()=>Ce(lp,{...n})})),l?setTimeout(()=>{Ne(a,document.createElement("div"))},0):Ne(a,document.createElement("div")),t&&o(t),{vm:a,close:function(){(null==a?void 0:a.el)&&a.el.parentNode&&a.el.parentNode.removeChild(a.el)},open:o,setTip:e=>{n.tip=e},setLoading:e=>{n.loading=e},get loading(){return n.loading},get $el(){return null==a?void 0:a.el}}}({tip:l,background:a,size:n||"large",loading:!!t.value,absolute:!o},o?document.body:e)},updated(e,t){const l=e.instance;var a;l&&(l.setTip(e.getAttribute("loading-tip")),t.oldValue!==t.value&&(null===(a=l.setLoading)||void 0===a||a.call(l,t.value&&!l.loading)))},unmounted(e){var t;null==e||null===(t=e.instance)||void 0===t||t.close()}};async function np(e){e.use(yt),function(e){!function(e){e.directive("dragResize",ep)}(e),function(e){e.directive("ellipsis-title",tp)}(e),function(e){e.directive("target-loading",ap)}(e)}(e),e.use(Xd),Object.entries(qt).forEach(([t,l])=>{e.component(t,l)}),e.component(ji.name,ji),e.component(mi.name,mi),e.component("OverlayScrollbarsComponent",Zd),await Kt(e),e.use(Lo),e.use(ii),e.use(rs)}async function op(e){console.log("coreWebSetupApp")}_gct.message=new S,_gct.openUtil=k,_gct.register.editor=new Xl,_gct.register.formItem=new Ql,_gct.register.tableEditor=new Ko;var ip=new URL("./index.min.css",import.meta.url);J.load(ip.href);export{Ws as BaseButton,er as BasicButton,rs as BasicModal,Xu as CodeEditor,mi as ColorEditor,ji as ColorPicker,ys as CopperFreeModal,Es as CopperModal,sr as CopyModuleKey,Ts as CropperAvatar,Ks as CropperFree,ms as CropperImage,lr as DoubleInput,Bl as EditFormController,jl as EditorController,Xl as EditorRegister,dl as EditorRegisterConst,pl as EditorType,ml as FORM_CONTROLLER_INJECT_TAG,sc as FieldCascader,qr as FieldUpload,Pl as FormCollapseController,Nl as FormCollapsePaneController,fl as FormCollapsePaneState,gl as FormCollapseState,Vl as FormEditItemController,xl as FormEditItemState,$l as FormGroupController,wl as FormGroupState,Kl as FormHiddenItemController,Al as FormItemBasicController,hl as FormItemBasicState,Hl as FormItemController,Ql as FormItemRegister,kl as FormItemState,Gl as FormLineController,Cl as FormLineState,vl as FormState,Ul as FormTabController,zl as FormTabPaneController,bl as FormTabPaneState,yl as FormTabState,Ju as FullScreen,Ai as GCT_DND_INSERT_POS,Pi as GctDndContainer,Ni as GctDndDropLine,Ri as GctDndItem,ca as GctFormCollapseModel,ia as GctFormCollapsePaneModel,Dl as GctFormController,ha as GctFormGroupModel,ja as GctFormHiddenItemModel,Aa as GctFormItemModel,ba as GctFormLineModel,Ca as GctFormTabModel,Ia as GctFormTabPaneModel,Ba as GctFormTitleGroupModel,$o as GctTableController,Vc as I18Modal,Zc as I18nSelectBtn,td as I18nSelectInput,ad as I18nSelectInputForm,id as I18nSelectTextarea,rd as I18nSelectTextareaForm,Ls as ImagePreview,yr as ImageUpload,y as Lang,S as MessageUtil,pi as MonacoEditor,Jd as NumberRange,b as OverlayController,Wu as PaasBpmnLog,zc as PaasBpmnRuntime,w as Prop,Ld as SerialNumberContainer,Ro as TableActionItemController,No as TableEditItemController,Mo as TableEditItemState,Ko as TableEditorRegister,Bo as TableITemState,Ao as TableItemController,zo as TableRowController,jo as TableRowState,Do as TableState,h as Theme,c as UseDragByLine,fc as UserPickType,Qu as ViewContainer,Zu as Vue3GridDndItem,nn as WUJIE_FORMULA_EVENTS,np as coreWebCreateAppVue,op as coreWebSetupApp,Ns as createImgPreview,Gd as gctFieldSortPopover,Kd as gctFieldTreeSelect,Jl as gctFormItemEditorProps,Fl as getValue,x as monacoLoader,mn as openFormulaEditor,k as overlay,Ll as setValue,Ho as useAntTableScrollHeight,Ml as useEditFormController,ci as useEditorConsole,di as useEditorConsoleInner,ql as useForm,Rl as useFormItemController,Yl as useGctFormValue,Wl as useGctFormValueByText,Wc as useI18nSelect,_ as useLocale,is as useModal,Ki as useModalContext,$i as useModalDragMove,ss as useModalInner,Rc as useModalPicker,Vo as useTableController,f as useTheme,v as validateFieldDefaultForLength,m as validateFieldDefaultForValue,s as validateLengthRange,Tl as widthEditorInstall,r as withInstall};
|
|
1
|
+
import{i as e}from"./chunk-lEgNpoW5.js";import{C as t,D as l,E as a,O as n,S as o,T as i,_ as s,a as r,b as u,c,d,f as p,g as m,h as v,i as h,l as f,m as g,n as y,o as b,p as x,r as w,s as k,t as C,u as _,v as S,w as E,x as O,y as I}from"./_plugin-vue_export-helper-BBfAJeJ1.js";import{t as T}from"./overlayscrollbars-vue-B2LfyB-V.js";import{BpmnNodeTypeEnum as F,ButtonSize as L,ButtonStyle as D,ButtonTypeEnum as M,EditorRegisterConst as B,ExpressionModeEnum as j,FIELD_TYPE as A,FieldIconMap as R,FormContainerType as N,MaterialEnum as P,OverlayContainer as U,PatternEnum as z,ProcessStatusEnum as $,ResetConditionEnum as V,SizeEnum as H,TypeEnum as K,Uploader as G,VITE_MINIO_PATH as q,buildShortUUID as Y,ch_ProcessStatusMap as W,cssLoader as J,dataURLtoBlob as X,deepMerge as Q,deleteAndInsertArr as Z,downloadByUrl as ee,fileUrlParser as te,modelLoader as le,presetColor as ae,t as ne,transformUrl as oe,useCopyToClipboard as ie,useModal as se,useNamespace as re,uuid2 as ue}from"@gct-paas/core";import{Fragment as ce,computed as de,createApp as pe,createBlock as me,createCommentVNode as ve,createElementBlock as he,createElementVNode as fe,createSlots as ge,createTextVNode as ye,createVNode as be,defineAsyncComponent as xe,defineComponent as we,getCurrentInstance as ke,h as Ce,inject as _e,isRef as Se,isVNode as Ee,mergeProps as Oe,nextTick as Ie,normalizeClass as Te,normalizeStyle as Fe,onBeforeUnmount as Le,onMounted as De,onUnmounted as Me,openBlock as Be,provide as je,reactive as Ae,ref as Re,render as Ne,renderList as Pe,renderSlot as Ue,resolveComponent as ze,resolveDirective as $e,resolveDynamicComponent as Ve,shallowRef as He,toDisplayString as Ke,toRaw as Ge,toRef as qe,toRefs as Ye,unref as We,useAttrs as Je,useCssVars as Xe,vShow as Qe,watch as Ze,watchEffect as et,withCtx as tt,withDirectives as lt,withModifiers as at}from"vue";import{clone as nt,cloneDeep as ot,debounce as it,defaults as st,groupBy as rt,has as ut,isArray as ct,isBoolean as dt,isEmpty as pt,isEqual as mt,isFunction as vt,isNil as ht,isString as ft,omit as gt}from"lodash-es";import yt,{Button as bt,Checkbox as xt,CheckboxGroup as wt,Collapse as kt,Empty as Ct,Form as _t,Image as St,Input as Et,Modal as Ot,Radio as It,RadioButton as Tt,RadioGroup as Ft,Space as Lt,Spin as Dt,Tooltip as Mt,Tree as Bt,Upload as jt,message as At}from"ant-design-vue";import Rt from"dayjs";import{bus as Nt,destroyApp as Pt,preloadApp as Ut,setupApp as zt,startApp as $t}from"wujie";import{SvgIcon as Vt,WuJieContainer as Ht,coreComponentsCreateAppVue as Kt}from"@gct-paas/core-components";import Gt from"vuedraggable";import*as qt from"@ant-design/icons-vue";import{CloseOutlined as Yt,DeleteOutlined as Wt,EditOutlined as Jt,EyeOutlined as Xt,FullscreenExitOutlined as Qt,FullscreenOutlined as Zt,LeftOutlined as el,ReloadOutlined as tl,RightOutlined as ll,SearchOutlined as al}from"@ant-design/icons-vue";import{BigNumber as nl}from"bignumber.js";import{FlowNodeInstStatus as ol,FlowNodeInstStatusColor as il,PaasBpmnDiagram as sl,useGctFlow as rl,useGctPaasBpmn as ul}from"@gct-paas/flow";import cl from"sortablejs";var dl=/* @__PURE__ */function(e){return e.PREFIX="EDITOR___",e}({}),pl=/* @__PURE__ */function(e){return e.LENGTH_UNIT="length-unit",e.COLOR="color",e.SPAN="span",e.TEXT="text",e.NUMBER="number",e.INFO="info",e.MSG="msg",e.SELECT="select",e.SELECT_GROUP="select-group",e.RADIO="radio",e.PICKER="picker",e.MULTIPLE_CHOICE="multiple-choice",e.I18N="i18n",e.TEXTAREA="textarea",e.DATE_RANGE="date-range",e.SWITCH="switch",e.CHECK_SWITCH="check-switch",e.ICON_SELECT="icon-select",e.CHECKBOX="checkbox",e.DATE="date",e.MODEL_SELECT="model-select",e.ACTION="action",e.TABLE="table",e.SELECT_TABLE="select-table",e.EMPTY="empty",e.FORM_MODEL_FIELD_SELECT="form-model-field-select",e.PIXEL_CONFIG="pixel-config",e.FIELD_INFO="field-info",e.DATE_FORMAT_SELECT="date-format-select",e.FORMULA="formula",e}({}),ml="formController",vl=class{constructor(){n(this,"loaded",!1),n(this,"count",0),n(this,"isNew",!0),n(this,"loading",!1),n(this,"destroyed",!1),n(this,"data",{})}},hl=class{constructor(){n(this,"disabled",!1),n(this,"readonly",!1),n(this,"visible",!0),n(this,"keepalive",!1),n(this,"destroyed",!1)}},fl=class extends hl{},gl=class extends hl{},yl=class extends hl{constructor(...e){super(...e),n(this,"activePane","")}},bl=class extends hl{},xl=class extends hl{constructor(...e){super(...e),n(this,"label",""),n(this,"value",null),n(this,"options",[])}},wl=class extends hl{constructor(...e){super(...e),n(this,"expand",!0)}},kl=class extends xl{},Cl=class extends hl{},_l=class{constructor(){this.map=/* @__PURE__ */new Map,this.maxListeners=100}setMaxListeners(e){this.maxListeners=e}getSize(e){return this.map.has(e)?this.map.get(e).length:0}addListener(e,t){if(t instanceof Function){this.map.has(e)||this.map.set(e,[]);const l=this.map.get(e);if(!(l.length<this.maxListeners))throw new Error(`事件监听已达最大上限[${this.maxListeners}],无法新增监听!`);l.push(t)}}removeListener(e,t){if(this.map.has(e)){const l=this.map.get(e);if(l.length>0)for(let e=0;e<l.length;e++)if(l[e]===t){l.splice(e,1);break}}}emit(e,...t){this.map.has(e)&&this.map.get(e).forEach(e=>{e(...t)})}async asyncEmit(e,...t){if(this.map.has(e)){const l=this.map.get(e).map(e=>e(...t));return Promise.all(l)}return[]}reset(){this.map.forEach(e=>{!function(e){if(e instanceof Array)e&&e.length>0&&e.splice(0,e.length);else if(e instanceof Object&&e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&delete e[t]}(e)}),this.map.clear()}},Sl=class{constructor(e){this.e=new _l,this.e.setMaxListeners(e||300)}getSize(e){return this.e.getSize(e)}on(e,t){this.e.addListener(e,t)}off(e,t){this.e.removeListener(e,t)}emit(e,...t){this.e.emit(e,...t)}asyncEmit(e,...t){return this.e.asyncEmit(e,...t)}reset(){this.e.reset()}},{toString:El}=Object.prototype;function Ol(e){return"[object AsyncFunction]"===El.call(e)}function Il(e){return"[object Promise]"===El.call(e)}function Tl(e,t,l,a){return{install(n){e&&t&&_gct.register.editor.register(dl.PREFIX+e,t),l&&n.component(a??l.name,l)}}}function Fl(e,t){const l=e.split(".");try{return l.reduce((e,t)=>e[t],t)}catch(a){console.warn(a)}}function Ll(e,t,l){const a=t.split("."),n=a.length-1;a.reduce((t,l,a)=>(a===n?t[l]=e:t[l]||(t[l]={}),t[l]),l)}var Dl=class{constructor(e){n(this,"evt",new Sl),n(this,"state",Ae(new vl)),n(this,"item",{}),n(this,"provider",{}),n(this,"context",{}),n(this,"params",{}),n(this,"fields",[]),n(this,"modelMap",{}),this.model=e,this.init()}init(){this.model.children&&this.initFormItems(this.model.children),this.initEvent(),this.calcState()}initEvent(){}calcState(){}initFormItems(e){e.forEach(e=>{let t=null;if("item"!==e.type&&"hidden"!==e.type||(this.fields.push(e.name),this.modelMap[e.name]=e),"item"===e.type&&(t=_gct.register.formItem.create(`${e.type}___${e.editor.type}___${e.name}`),t||(t=_gct.register.formItem.create(`${e.type}___${e.editor.type}`))),t||(t=_gct.register.formItem.create(e.type)),t){if(this.provider[e.name]=t,"item"===e.type){const l=e;this.item[l.name]=t.createController(this,l)}else if("hidden"===e.type){const l=e;this.item[l.name]=t.createController(this,l)}else if("container"===e.type||e.isContainer||e.container){const l=e;this.item[e.name]=t.createController(this,l),l.children&&this.initFormItems(l.children)}}else console.error(`未找到表单项提供者:${e.type}`,e)})}calcHidden(){Object.keys(this.item).forEach(e=>{const t=this.item[e];if(t.model.hidden){const e=t.model.hidden(this,t,this.state.data);null!=e&&(t.state.visible=!e)}})}getData(){const e={};return this.fields.forEach(t=>{const l=this.item[t];!l||!0!==l.state.visible&&"hidden"!==l.model.type&&-1===t.indexOf(".")||Ll(l.value,l.key,e)}),e}resetData(){this.fields.forEach(e=>{const t=this.item[e];t&&t.reset()})}async load(){try{if(!this.model.loadRequest)return{};this.state.loading=!0;const e=await this.model.loadRequest({id:this.context.id});return this.fields.forEach(t=>{const l=this.item[t];l&&(l.value=e[l.key]),l.defaultValue()}),this.state.loaded=!0,e}finally{this.state.loading=!1}}destroy(){this.state.destroyed=!0,this.evt.reset(),this.fields.forEach(e=>{const t=this.item[e];t&&t.destroy()})}validate(){return Promise.resolve(!0)}validateItem(e){return Promise.resolve(!0)}loaded(){this.calcHidden(),this.fields.forEach(e=>{const t=this.item[e];t?t.defaultValue():console.warn(`表单项控制器未找到:${e}`)}),this.calcState()}mounted(){}},Ml=class extends Dl{initEvent(){super.initEvent(),this.evt.on("change",(e,t,l)=>{if(this.model.watch){const a=this.model.watch[e];a&&a(this,t,l)}const a=this.item[e];a&&a.model.watch&&a.model.watch(this,a,t,l),a&&a.model.change&&a.model.change(this,a,this.state.data),t!=l&&this.calcHidden()})}save(){const e=this.getData();return!0===this.state.isNew&&this.model.newRequest?this.model.newRequest(e):this.model.updateRequest?this.model.updateRequest({id:this.context.id},e):Promise.resolve(e)}};function Bl(e){const t=e();return t.state=Ae(t.state),Me(()=>t.destroy()),t}var jl=class{constructor(e){n(this,"model",void 0),n(this,"options",[]),this.model=e}},Al=class{get key(){return this.model.name}get data(){return this.form.state.data}constructor(e,t){n(this,"state",this.crateItemState()),this.form=e,this.model=t,this.init()}init(){}destroy(){this.state.destroyed=!0}defaultValue(){const e=this.form.state.data;null==Fl(this.key,e)&&null!=this.model.defaultValue&&Ll(this.model.defaultValue,this.key,e)}crateItemState(){return new hl}};function Rl(e){const t=e();return t.state=Ae(t.state),t}var Nl=class extends Al{constructor(...e){super(...e),n(this,"type","collapse-pane")}crateItemState(){return new fl}},Pl=class extends Al{constructor(...e){super(...e),n(this,"type","collapse")}crateItemState(){return new gl}},Ul=class extends Al{constructor(...e){super(...e),n(this,"type","tab")}crateItemState(){return new yl}},zl=class extends Al{constructor(...e){super(...e),n(this,"type","tab-pane")}crateItemState(){return new bl}},$l=class extends Al{constructor(...e){super(...e),n(this,"type","group")}crateItemState(){return new wl}},Vl=class extends Al{get key(){return this.model.field??this.model.name}get value(){return Fl(this.key,this.form.state.data)}set value(e){const t=this.form.state.data,l=ot(Fl(this.key,t));Ll(e,this.key,t),this.form.evt.emit("change",this.key,e,l),this.state.value=e}get editorValue(){return this.model.fields?this.model.fields.map(e=>this.form.item[e].value):this.value}set editorValue(e){this.model.fields?this.model.fields.forEach((t,l)=>{this.form.item[t].value=null==e?void 0:e[l]}):this.value=e}init(){if(super.init(),"hidden"!==this.model.type){const{editor:e}=this.model;this.state.readonly=e.readonly,null!=e.disabled&&(this.state.disabled=e.disabled)}if(this.model.dictionary){const{mode:e}=this.model.dictionary;"static"===e&&(this.state.options=this.model.dictionary.items||[])}}blur(){null!=this.state.value&&""!==this.state.value||null==this.model.defaultValue||(this.value=this.model.defaultValue,this.form.evt.emit("blur",this.key,this.value))}reset(){void 0!==this.model.defaultValue?this.value=this.model.defaultValue:this.value=void 0}crateItemState(){return new xl}},Hl=class extends Vl{constructor(...e){super(...e),n(this,"type","item")}async loadDictionary(e,t){if(this.state.options.length>0&&!0!==t)return this.state.options;this.state.options=[],this.state.loading=!0;try{return this.model.dictionary?this.state.options=await _gct.dictionary.asyncGetByConfig(this.model.dictionary,e):this.model.dictionaryTag&&(this.state.options=await _gct.dictionary.asyncGet(this.model.dictionaryTag,e)),this.state.options}finally{this.state.loading=!1}}clearDictionary(){this.state.options=[]}crateItemState(){return new kl}},Kl=class extends Al{constructor(...e){super(...e),n(this,"type","hidden")}},Gl=class extends Al{constructor(...e){super(...e),n(this,"type","line")}crateItemState(){return new Cl}};function ql(){return _e("formController")}function Yl(e){let t=null;if(e){const l=ql().item[e];l&&(t=de({get:()=>l.value,set(e){"string"==typeof e&&(e=e.trim()),"object"!=typeof e&&l.value==e||(l.value=e)}}))}else{let e=ke().proxy;const l=e.$props,a=e.$emit;t=de({get:()=>l.value,set:e=>{"string"==typeof e&&(e=e.trim()),"object"!=typeof e&&l.value==e||a("update:value",e)}}),e=null}return t}function Wl(e,t){let l=ke().proxy;const a=l.$props,n=l.$emit,o=e?e.length:0,i=t?t.length:0;return l=null,de({get:()=>{if(!a.value)return"";let l=a.value;return o>0&&l.startsWith(e)&&(l=l.substring(o)),i>0&&l.endsWith(t)&&(l=l.substring(0,l.length-i)),l},set:l=>{if(a.value===l)return;if(""==l)return void n("update:value","");let s=l;o>0&&(s=e+s),i>0&&(s+=t),n("update:value",s)}})}function Jl(){return{context:{type:Object,default:()=>({})},value:{type:Object},model:{type:Object,required:!0},c:{type:Object,required:!0},itemModel:{type:Object},data:{type:Object},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},keepalive:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},size:{type:String},count:{type:Number,default:0},isEmptyText:{type:Boolean,default:!1}}}var Xl=class{constructor(){n(this,"editors",/* @__PURE__ */new Map),n(this,"providers",/* @__PURE__ */new Map)}register(e,t){this.editors.set(e,t)}unregister(e){this.editors.delete(e)}get(e){if(this.providers.has(e))return this.providers.get(e);const t=this.editors.get(e);if(t){const l=t();return this.providers.set(e,l),l}return null}},Ql=class{constructor(){n(this,"items",/* @__PURE__ */new Map)}register(e,t){this.items.set(e,t)}unregister(e){this.items.delete(e)}create(e){const t=this.items.get(e);return t?t():null}},Zl=/* @__PURE__ */we({name:"GctFormItem",props:{c:{type:Object,required:!0},formModel:{type:Object,required:!0},model:{type:Object,required:!0},count:{type:Number,default:0},context:{type:Object,default:()=>({})}},setup(e){const t=re("form-item"),l={};e.formModel.labelWidth&&(l[t.cssVarName("form-item-label-width")]=e.formModel.labelWidth),e.model.labelWidth&&(l[t.cssVarName("form-item-label-width")]=e.model.labelWidth),e.model.labelAlign&&(l[t.cssVarName("form-item-label-align")]=e.model.labelAlign),e.model.editorAlign&&(l[t.cssVarName("form-item-editor-align")]=e.model.editorAlign),e.model.width&&(l[t.cssVarName("form-item-width")]=e.model.width),e.model.margin&&(l.margin=e.model.margin),e.model.padding&&(l.padding=e.model.padding);const a=de(()=>{var t;return!!(null===(t=e.model.rules)||void 0===t?void 0:t.find(e=>e.required))});return{ns:t,style:l,required:a,renderLabelTooltip:()=>e.model.labelTooltip?be(ze("a-tooltip"),{class:t.e("label-tooltip"),overlayClassName:t.e("label-tooltip-overlay"),overlayStyle:{width:e.model.labelTipWidth},placement:"top",title:e.model.labelTooltip},{default:()=>[be("span",{class:"iconfont icon-assist ml5px text-[#bfbfbf]"},null)]}):null}},render(){const e=_gct.register.editor.get(B.PREFIX+this.model.editor.type);if(!e)return console.error(`未找到表单项${this.model.name}的编辑器${this.model.editor.type}的适配器实例:`,this.model),null;const t=this.model.labelPosition||"left";let l=null;e?e.render?l=e.render(this.c.editorValue,this.c.data,this.model):e.component?l=Ce("string"==typeof e.component?ze(e.component):e.component,{key:this.model.name,c:this.c,value:this.c.editorValue,itemModel:this.model,model:this.model.editor,data:this.c.data,disabled:this.c.state.disabled,readonly:this.c.state.readonly,keepalive:this.c.state.keepalive,visible:this.c.state.visible,size:this.formModel.size,count:this.count,isEmptyText:this.formModel.isEmptyText,context:this.context,class:[this.ns.e("editor"),this.ns.e(t),this.formModel.size?this.ns.m(this.formModel.size):null,this.model.editor.class],style:this.model.editor.style,"onUpdate:value":e=>{this.c.editorValue=e},onBlur:()=>{this.c.blur()}}):console.error(`未找到编辑器绘制组件:${this.model.name} - ${this.model.editor.type},请实现 component 或 render 方法`):console.error(`未找到编辑器适配器:${this.model.name} - ${this.model.editor.type}`),this.model.label&&"top"===t&&(l=[be("div",{class:[this.ns.e("label"),this.ns.em("label",t)]},[this.model.label,this.renderLabelTooltip()]),l]);const a={default:()=>l};var n;return"left"===t&&this.model.label&&(a.label=()=>[be("span",null,[this.model.label]),this.renderLabelTooltip()]),!1!==this.c.state.visible?be(ze("a-form-item"),{key:this.c.model.name,count:this.count,colon:!0!==this.formModel.noColon&&!0!==this.model.noColon,name:this.model.name.split("."),label:void 0,class:[this.ns.b(),this.ns.is("readonly",!0===this.model.editor.readonly),this.ns.is("required",this.required),this.ns.is("hidden-label",!this.model.label),this.ns.m("label-"+t),this.ns.is("hidden-error",!0===this.model.hiddenError||!0===this.formModel.hiddenError)],style:this.style,rules:!0===this.c.state.visible?this.model.rules:[],layout:"horizontal"},"function"==typeof(n=a)||"[object Object]"===Object.prototype.toString.call(n)&&!Ee(n)?a:{default:()=>[a]}):void 0}}),ea=/* @__PURE__ */we({name:"GctForm",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e){const t=re("form");je(ml,e.c);const l=Re(),a=e.c;Object.keys(a.item).forEach(e=>{const t=a.item[e];t.state=Ae(t.state)});const n=t=>be(ze("gct-form-item"),{class:t.class,style:t.style,count:a.state.count,c:a.item[t.name],formModel:e.model,model:t,context:e.context},null),o=t=>{const l=a.provider[t.name];return l?l?Ce("string"==typeof l.component?ze(l.component):l.component,{key:t.name,model:t,count:a.state.count,c:a.item[t.name],data:a.state.data,class:t.class,style:t.style,context:e.context},{default:()=>i(t.children||[])}):void console.error(`未找到表单容器适配器:${t.name} - ${t.type}`):(console.error(`未找到表单项适配器实例:${t.name}`,t),null)},i=e=>{if(!e)return[];const t=[];return e.forEach(e=>{if("hidden"===e.type)return null;let l=null;const a=e;l="container"===a.type||a.isContainer||a.container?o(a):n(e),l&&t.push(l)}),t},s={};return e.model.labelWidth&&(s[t.cssVarName("form-item-label-width")]=e.model.labelWidth),{ns:t,formRef:l,staticStyle:s,renderItem:n,renderContainer:o,renderChildren:i}},render(){let e;return be(ze("a-form"),{ref:"formRef",layout:this.model.layout,model:this.c.state.data,count:this.c.state.count,class:[this.ns.b(),this.ns.is("info",!0===this.model.info),this.model.size?this.ns.m(this.model.size):null],autocomplete:"off",style:this.staticStyle},"function"==typeof(t=e=this.model.children.map(e=>this.renderContainer(e)))||"[object Object]"===Object.prototype.toString.call(t)&&!Ee(t)?e:{default:()=>[e]});var t}}),ta=class{constructor(){n(this,"component","gct-form-item")}createController(e,t){return Rl(()=>new Hl(e,t))}},la=class{constructor(){n(this,"component","gct-form-hidden-item")}createController(e,t){return Rl(()=>new Kl(e,t))}},aa=class{constructor(){n(this,"component","gct-form-collapse-pane")}createController(e,t){return Rl(()=>new Nl(e,t))}};function na(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var oa=/* @__PURE__ */we({name:"GctFormCollapsePane",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e){const t=re("form-collapse-pane"),l={};return e.model.width&&(l[t.cssVarName("form-collapse-pane-width")]=e.model.width),e.model.height&&(l[t.cssVarName("form-collapse-pane-height")]=e.model.height),{ns:t,style:l,renderContainer:function(t){return"flex"===e.model.layout?be(ze("flex-container"),{layout:e.model.flex},na(t)?t:{default:()=>[t]}):"grid"===e.model.layout?be(ze("grid-container"),{layout:e.model.grid},na(t)?t:{default:()=>[t]}):void console.error("不支持的layout类型"+e.model.layout)}}},render(){var e,t;if(!0!==this.c.state.keepalive&&!1===this.c.state.visible)return null;const l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[],a=l[l.length-1];return a&&(a.props=Oe(a.props||{},{class:this.ns.e("last-child")})),be("div",{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible)],style:this.style},[this.renderContainer(l)])}}),ia=class{constructor(e,t,l,a){n(this,"type","collapse-pane"),n(this,"isContainer",!0),n(this,"title",void 0),n(this,"layout","grid"),n(this,"children",[]),n(this,"name",void 0),n(this,"collapsible",void 0),this.name=e,this.title=t,l&&Object.assign(this,l),a&&(this.children=a)}},sa={install(e){_gct.register.formItem.register("collapse-pane",()=>new aa),e.component(oa.name,oa)}},ra=class{constructor(){n(this,"component","gct-form-collapse")}createController(e,t){return Rl(()=>new Pl(e,t))}},ua=/* @__PURE__ */we({name:"GctFormCollapse",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e){var t;const l=re("form-collapse"),a=Re([0]),n={};e.model.width&&(n[l.cssVarName("form-collapse-width")]=e.model.width),e.model.height&&(n[l.cssVarName("form-collapse-height")]=e.model.height);const o=Re([]);return o.value=(null===(t=e.model.children)||void 0===t?void 0:t.map(e=>e.name))||[],{ns:l,keys:a,style:n,activeKeys:o,expandIconPosition:de(()=>"left"===e.model.expandIconPosition?"left":"right")}},render(){var e,t;if(!0!==this.c.state.keepalive&&!1===this.c.state.visible)return null;const l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[];return be(kt,{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible),this.ns.m("icon-"+(this.model.expandIconStyle||"up-down"))],style:this.style,accordion:this.model.accordion,expandIconPosition:this.expandIconPosition,activeKey:this.activeKeys,"onUpdate:activeKey":e=>this.activeKeys=e},{default:()=>{var e;return[null===(e=this.model.children)||void 0===e?void 0:e.map((e,t)=>{if(!1===l[t].props.c.state.visible)return;const a=!1!==e.collapsible?void 0:"disabled";return be(kt.Panel,{key:e.name,header:e.title,collapsible:a},{default:()=>[l[t]]})})]}})}}),ca=class{constructor(e,t,l){n(this,"type","collapse"),n(this,"isContainer",!0),n(this,"layout","grid"),n(this,"children",[]),n(this,"name",void 0),n(this,"accordion",void 0),n(this,"expandIconPosition",void 0),n(this,"expandIconStyle",void 0),this.name=e,t&&Object.assign(this,t),l&&(this.children=l)}},da={install(e){_gct.register.formItem.register("collapse",()=>new ra),e.component(ua.name,ua)}},pa=class{constructor(){n(this,"component","gct-form-group")}createController(e,t){return Rl(()=>new $l(e,t))}},ma=/* @__PURE__ */we({name:"GctFormGroup",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e,{slots:t}){const l=re("form-group"),a=Re([0]);function n(){return"flex"===e.model.layout?be(ze("flex-container"),{layout:e.model.flex},{default:()=>{var e;return null===(e=t.default)||void 0===e?void 0:e.call(t)}}):"grid"===e.model.layout?be(ze("grid-container"),{layout:e.model.grid},{default:()=>{var e;return null===(e=t.default)||void 0===e?void 0:e.call(t)}}):void console.error("不支持的layout类型"+e.model.layout)}const o={};return e.model.width&&(o[l.cssVarName("form-group-width")]=e.model.width),e.model.height&&(o[l.cssVarName("form-group-height")]=e.model.height),()=>{if(!0!==e.c.state.keepalive&&!1===e.c.state.visible)return null;if(e.model.isCollapse){let t;return be(ze("a-collapse"),{activeKey:a.value,"onUpdate:activeKey":e=>a.value=e,class:[l.b(),l.is("hidden-header",!1===e.model.showHeader),l.is("hidden",!1===e.c.state.visible)],style:o,ghost:!0},{default:()=>{return[be(ze("a-collapse-panel"),{key:"0",header:e.model.title},(l=t=n(),"function"==typeof l||"[object Object]"===Object.prototype.toString.call(l)&&!Ee(l)?t:{default:()=>[t]}))];var l}})}return be("div",{class:[l.b(),l.is("hidden-header",!1===e.model.showHeader),l.is("hidden",!1===e.c.state.visible),e.model.class],style:o},[!1===e.model.showHeader?be("div",{class:l.e("title")},[e.model.title]):null,be("div",{class:l.e("content")},[n()])])}}}),va=class{constructor(e,t,l){n(this,"type","group"),n(this,"isContainer",!0),n(this,"layout","grid"),n(this,"children",[]),n(this,"name",void 0),n(this,"title",void 0),n(this,"showHeader",void 0),n(this,"isCollapse",void 0),this.name=e,t&&Object.assign(this,t),l&&(this.children=l)}},ha={install(e){_gct.register.formItem.register("container",()=>new pa),e.component(ma.name,ma)}},fa=class{constructor(){n(this,"component","gct-form-line")}createController(e,t){return Rl(()=>new Gl(e,t))}},ga=/* @__PURE__ */we({name:"GctFormLine",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup:e=>({ns:re("form-line"),style:de(()=>{const{paddingTop:t,paddingBottom:l}=e.model;return{paddingTop:t,paddingBottom:l}})}),render(){return be("div",{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible)],style:this.style},[be("div",{class:this.ns.e("line")},null)])}}),ya=class{constructor(e,t={}){n(this,"type","line"),n(this,"layout","grid"),n(this,"name",""),n(this,"isContainer",!0),this.name=e,Object.assign(this,t)}},ba={install(e){_gct.register.formItem.register("line",()=>new fa),e.component(ga.name,ga)}},xa=class{constructor(){n(this,"component","gct-form-tab")}createController(e,t){return Rl(()=>new Ul(e,t))}},wa=/* @__PURE__ */we({name:"GctFormTab",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e){const t=re("form-tab"),l=ql(),a={};return e.model.width&&(a[t.cssVarName("form-tab-width")]=e.model.width),e.model.height&&(a[t.cssVarName("form-tab-height")]=e.model.height),Ze(e.c.state,()=>{l.evt.emit("changeState",e.c.model.name,e.c)}),De(()=>{var t;const l=(null===(t=e.model.children)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name)||"";e.c.state.activePane=l}),{ns:t,style:a}},render(){var e,t;if(!0!==this.c.state.keepalive&&!1===this.c.state.visible)return null;const l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[];return be(ze("a-tabs"),{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible),this.ns.m(this.model.navPosition||"left")],style:this.style,activeKey:this.c.state.activePane,"onUpdate:activeKey":e=>this.c.state.activePane=e},{default:()=>{var e;return[null===(e=this.model.children)||void 0===e?void 0:e.map((e,t)=>be(ze("a-tab-pane"),{key:e.name,tab:e.title},{default:()=>[l[t]]}))]}})}}),ka=class{constructor(e,t,l){n(this,"type","tab"),n(this,"isContainer",!0),n(this,"children",[]),n(this,"layout","grid"),n(this,"navPosition","center"),n(this,"name",void 0),this.name=e,t&&Object.assign(this,t),l&&(this.children=l)}},Ca={install(e){_gct.register.formItem.register("tab",()=>new xa),e.component(wa.name,wa)}},_a=class{constructor(){n(this,"component","gct-form-tab-pane")}createController(e,t){return Rl(()=>new zl(e,t))}};function Sa(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var Ea=/* @__PURE__ */we({name:"GctFormTabPane",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},context:{type:Object,default:()=>({})}},setup(e){const t=re("form-tab-pane"),l={};return e.model.width&&(l[t.cssVarName("form-tab-pane-width")]=e.model.width),e.model.height&&(l[t.cssVarName("form-tab-pane-height")]=e.model.height),{ns:t,style:l,renderContainer:function(t){return"flex"===e.model.layout?be(ze("flex-container"),{layout:e.model.flex},Sa(t)?t:{default:()=>[t]}):"grid"===e.model.layout?be(ze("grid-container"),{layout:e.model.grid},Sa(t)?t:{default:()=>[t]}):void console.error("不支持的layout类型"+e.model.layout)}}},render(){var e,t;if(!0!==this.c.state.keepalive&&!1===this.c.state.visible)return null;const l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[];return be("div",{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible)],style:this.style},[this.renderContainer(l)])}}),Oa=class{constructor(e,t,l,a){n(this,"type","tab-pane"),n(this,"isContainer",!0),n(this,"title",void 0),n(this,"layout","grid"),n(this,"children",[]),n(this,"name",void 0),this.name=e,this.title=t,l&&Object.assign(this,l),a&&(this.children=a)}},Ia={install(e){_gct.register.formItem.register("tab-pane",()=>new _a),e.component(Ea.name,Ea)}},Ta=class{constructor(){n(this,"component","gct-form-title-group")}createController(e,t){return Rl(()=>new $l(e,t))}};function Fa(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var La=/* @__PURE__ */we({name:"GctFormTitleGroup",props:{c:{type:Object,required:!0},model:{type:Object,required:!0}},setup(e){const t=re("form-title-group"),l=Re([0]),a={};return e.model.width&&(a[t.cssVarName("form-title-group-width")]=e.model.width),e.model.height&&(a[t.cssVarName("form-title-group-height")]=e.model.height),{ns:t,keys:l,style:a,renderContainer:function(t){return"flex"===e.model.layout?be(ze("flex-container"),{layout:e.model.flex},Fa(t)?t:{default:()=>[t]}):"grid"===e.model.layout?be(ze("grid-container"),{layout:e.model.grid},Fa(t)?t:{default:()=>[t]}):void console.error("不支持的layout类型"+e.model.layout)}}},render(){var e,t;if(!0!==this.c.state.keepalive&&!1===this.c.state.visible)return null;const l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[];return be("div",{class:[this.ns.b(),this.ns.is("hidden",!1===this.c.state.visible),this.model.class],style:this.style},[be("div",{class:this.ns.e("title")},[this.model.title]),be("div",{class:this.ns.e("content")},[this.renderContainer(l)])])}}),Da=class{constructor(e,t,l){n(this,"type","group"),n(this,"isContainer",!0),n(this,"layout","grid"),n(this,"children",[]),n(this,"name",void 0),n(this,"title",void 0),n(this,"showHeader",void 0),n(this,"isCollapse",void 0),this.name=e,t&&Object.assign(this,t),l&&(this.children=l)}},Ma={install(e){_gct.register.formItem.register(N.FORM_TITLE_GROUP,()=>new Ta),e.component(La.name,La)}},Ba=class{constructor(e,t){n(this,"type","hidden"),n(this,"name",void 0),n(this,"field",void 0),n(this,"defaultValue",void 0),n(this,"editor",void 0),this.name=e,t&&Object.assign(this,t)}},ja=class{constructor(e,t,l,a){n(this,"type","item"),n(this,"name",void 0),n(this,"editor",void 0),n(this,"label",void 0),n(this,"rules",void 0),this.name=e,t&&(this.label=t),l&&Object.assign(this,l),this.editor=a}},Aa={install(e){_gct.register.formItem.register("item",()=>new ta),_gct.register.formItem.register("hidden",()=>new la),e.use(sa),e.use(da),e.use(ha),e.use(ba),e.use(Ca),e.use(Ia),e.use(Ma),e.component(ea.name,ea),e.component(Zl.name,Zl)}},Ra=/* @__PURE__ */we({name:"FlexItem",props:{layout:Object},setup:e=>({ns:re("flex-item"),getStyle:()=>{const t={};if(e.layout){const{order:l,alignSelf:a,flexBasis:n,flexGrow:o,flexShrink:i}=e.layout;null!=l&&(t.order=l),null!=a&&(t["align-self"]=a),null!=n&&(t["flex-basis"]=n),null!=o&&(t["flex-grow"]=o),null!=i&&(t["flex-shrink"]=i)}return t}}),render(){var e,t;return be("div",{class:this.ns.b(),style:this.getStyle()},[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t)])}}),Na=/* @__PURE__ */we({name:"FlexContainer",props:{layout:Object},setup:e=>({ns:re("flex-container"),getStyle:()=>{const t={};if(e.layout){const{alignContent:l,alignItems:a,flexDirection:n,flexWrap:o,justifyContent:i}=e.layout;null!=l&&(t.alignContent=l),null!=a&&(t.alignItems=a),null!=n&&(t.flexDirection=n),null!=o&&(t.flexWrap=o),null!=i&&(t.justifyContent=i)}return t},getItemStyle:e=>{const t={};if(e){const{width:l,height:a}=e;null!=l&&(t.width=l),null!=a&&(t.height=a)}return t}}),render(){var e,t;let l=(null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t))||[];return l.length>0&&(l=l[0].children||[]),be("div",{class:this.ns.b(),style:this.getStyle()},[l.map(e=>{if(!e)return null;const t=e.props.model.flexItem;return be(Ra,{layout:t,style:this.getItemStyle(e.props.model)},"function"==typeof(l=e)||"[object Object]"===Object.prototype.toString.call(l)&&!Ee(l)?e:{default:()=>[e]});var l})])}});function Pa(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var Ua=/* @__PURE__ */we({name:"GridContainer",props:{layout:Object},setup(e,{slots:t}){const l=re("grid-container");return()=>{var a;let n;const o=e.layout||{};let i=(null===(a=t.default)||void 0===a?void 0:a.call(t))||[];return i.length>0&&(i=i[0].children||[]),be(ze("a-row"),{class:l.b(),wrap:!0,gutter:o.gutter},Pa(n=i.map(e=>{if(!e)return null;const t=e.props.model.gridItem;return be(ze("a-col"),{span:t?t.span??24:24,offset:t?t.offset??0:0},Pa(e)?e:{default:()=>[e]})}))?n:{default:()=>[n]})}}}),za=/* @__PURE__ */we({name:"GctFormAction",props:{c:{type:Object,required:!0},data:{type:Object,required:!0},model:{type:Object,required:!0},size:{type:String}},setup(e){const t=re("gct-form-action"),l=ql();return{ns:t,onClick:function(t){t.stopPropagation(),e.model.click&&e.model.click(t,l,e.c,e.data)}}},render(){return be(ze("a-button"),Oe({class:this.ns.b(),onClick:this.onClick,size:this.size,type:"link"},this.model.props||{}),{default:()=>[this.model.label]})}}),$a=class{constructor(){n(this,"component","gct-form-action")}},Va=Tl(pl.ACTION,()=>new $a,za);function Ha(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var Ka=/* @__PURE__ */we({name:"GctFormDateFormatSelect",props:Jl(),setup(e){var t;const l=re("form-date-format-select"),a=de(()=>{var t;return e.data[(null===(t=e.model)||void 0===t?void 0:t.fieldTypeKey)||"type"]}),n=de(()=>{var t;return e.data[(null===(t=e.model)||void 0===t?void 0:t.mappingTypeKey)||"mapping_type"]}),o=Yl((null===(t=e.model)||void 0===t?void 0:t.separatorKey)||"separator"),i=[{label:"-",value:"-"},{label:"/",value:"/"},{label:"·",value:"."}],s=Yl(),r=de(()=>a.value===A.DATE_TIME||n.value===A.DATE_TIME?[{label:`yyyy${o.value}MM${o.value}dd HH`,value:`YYYY${o.value}MM${o.value}DD HH`},{label:`yyyy${o.value}MM${o.value}dd HH:mm`,value:`YYYY${o.value}MM${o.value}DD HH:mm`},{label:`yyyy${o.value}MM${o.value}dd HH:mm:ss`,value:`YYYY${o.value}MM${o.value}DD HH:mm:ss`}]:a.value===A.DATE||n.value===A.DATE?[{label:"yyyy",value:"YYYY"},{label:`yyyy${o.value}MM`,value:`YYYY${o.value}MM`},{label:`yyyy${o.value}MM${o.value}dd`,value:`YYYY${o.value}MM${o.value}DD`}]:[]);return Ze(o,()=>{a.value!==A.DATE_TIME&&n.value!==A.DATE_TIME?a.value!==A.DATE&&n.value!==A.DATE?s.value="":s.value=`YYYY${o.value}MM${o.value}DD`:s.value=`YYYY${o.value}MM${o.value}DD HH:mm:ss`}),()=>{var t,a;let n,u;return be("div",{class:l.b()},[be("span",{class:l.e("first")},[be(ze("a-select"),Oe({value:o.value,"onUpdate:value":e=>o.value=e,disabled:e.c.state.disabled,size:e.size,placeholder:e.model.placeholder||ne("sys.chooseText")},(null===(t=e.model)||void 0===t?void 0:t.props)||{}),Ha(n=i.map(e=>be(ze("a-select-option"),{key:e.value,value:e.value},{default:()=>[e.label]})))?n:{default:()=>[n]})]),be("span",{class:l.e("second")},[be(ze("a-select"),Oe({value:s.value,"onUpdate:value":e=>s.value=e,disabled:e.c.state.disabled,size:e.size,placeholder:e.model.placeholder||ne("sys.chooseText")},(null===(a=e.model)||void 0===a?void 0:a.props)||{}),Ha(u=r.value.map(e=>be(ze("a-select-option"),{key:e.value,value:e.value},{default:()=>[e.label]})))?u:{default:()=>[u]})])])}}}),Ga=class{constructor(){n(this,"component","gct-form-date-format-select")}},qa=Tl(pl.DATE_FORMAT_SELECT,()=>new Ga,Ka),Ya=/* @__PURE__ */we({name:"GctFormLengthUnit",inheritAttrs:!1,props:{itemModel:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String}},emits:["update:value"],setup:()=>({ns:re("form-length-unit"),val:Yl()}),render(){return be(ze("length-unit-editor"),Oe({value:this.val,"onUpdate:value":e=>this.val=e},this.model.props||{},{class:[this.ns.b(),this.ns.is("readonly",this.model.readonly)]}),null)}}),Wa=class{constructor(){n(this,"component","gct-form-length-unit")}},Ja=Tl(pl.LENGTH_UNIT,()=>new Wa,Ya),Xa=/* @__PURE__ */we({name:"GctFormColor",inheritAttrs:!1,props:{itemModel:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String}},emits:["update:value"],setup(e){const t=re("form-color"),l=Yl();return console.debug("GctFormColor props",e),()=>be(ze("color-editor"),Oe({value:l.value,"onUpdate:value":e=>l.value=e},e.model.props||{},{class:[t.b(),t.is("readonly",e.model.readonly)]}),null)}}),Qa=class{constructor(){n(this,"component","gct-form-color")}},Za=Tl(pl.COLOR,()=>new Qa,Xa),en=class{constructor(){n(this,"component","gct-form-date")}},tn=/* @__PURE__ */we({name:"GctFormDate",props:{model:{type:Object,required:!0},value:{type:String,default:""},isDate:{type:Boolean,default:!0},isTime:{type:Boolean,default:!1}},emits:["update:value"],setup(e){const t=re("gct-form-date"),l=new jl(e.model),a=Yl(),n=Re(a.value?Rt(a.value):null),o=Re(a.value?Rt(a.value):null);return{ns:t,c:l,dateVal:n,timeVal:o,onChange:()=>{let e="";n.value&&(e=n.value.format("YYYY-MM-DD")),o.value?e+=` ${o.value.format("HH:mm:ss")}`:e+=" 00:00:00",a.value=e}}},render(){return be("div",{class:[this.ns.b()]},[this.isDate?be(ze("a-date-picker"),Oe({picker:"date",value:this.dateVal,"onUpdate:value":e=>this.dateVal=e,format:"YYYY-MM-DD"},this.model.props||{},{placeholder:"请选择日期",onChange:this.onChange}),null):null,this.isTime?be(ze("a-time-picker"),{value:this.timeVal,"onUpdate:value":e=>this.timeVal=e,placeholder:"请选择时间",onChange:this.onChange},null):null])}}),ln=Tl(pl.DATE,()=>new en,tn),an={CONFIRM:"wujie-formula___confirm",CANCEL:"wujie-formula___cancel"};function nn(e){return nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nn(e)}function on(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),l.push.apply(l,a)}return l}function sn(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?on(Object(l),!0).forEach(function(t){cn(e,t,l[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):on(Object(l)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))})}return e}function rn(){rn=function(){return t};var e,t={},l=Object.prototype,a=l.hasOwnProperty,n=Object.defineProperty||function(e,t,l){e[t]=l.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",r=o.toStringTag||"@@toStringTag";function u(e,t,l){return Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,l){return e[t]=l}}function c(e,t,l,a){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype);return n(i,"_invoke",{value:E(e,l,new F(a||[]))}),i}function d(e,t,l){try{return{type:"normal",arg:e.call(t,l)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var p="suspendedStart",m="suspendedYield",v="executing",h="completed",f={};function g(){}function y(){}function b(){}var x={};u(x,i,function(){return this});var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==l&&a.call(k,i)&&(x=k);var C=b.prototype=g.prototype=Object.create(x);function _(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function S(e,t){function l(n,o,i,s){var r=d(e[n],e,o);if("throw"!==r.type){var u=r.arg,c=u.value;return c&&"object"==nn(c)&&a.call(c,"__await")?t.resolve(c.__await).then(function(e){l("next",e,i,s)},function(e){l("throw",e,i,s)}):t.resolve(c).then(function(e){u.value=e,i(u)},function(e){return l("throw",e,i,s)})}s(r.arg)}var o;n(this,"_invoke",{value:function(e,a){function n(){return new t(function(t,n){l(e,a,t,n)})}return o=o?o.then(n,n):n()}})}function E(t,l,a){var n=p;return function(o,i){if(n===v)throw Error("Generator is already running");if(n===h){if("throw"===o)throw i;return{value:e,done:!0}}for(a.method=o,a.arg=i;;){var s=a.delegate;if(s){var r=O(s,a);if(r){if(r===f)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===p)throw n=h,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=v;var u=d(t,l,a);if("normal"===u.type){if(n=a.done?h:m,u.arg===f)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(n=h,a.method="throw",a.arg=u.arg)}}}function O(t,l){var a=l.method,n=t.iterator[a];if(n===e)return l.delegate=null,"throw"===a&&t.iterator.return&&(l.method="return",l.arg=e,O(t,l),"throw"===l.method)||"return"!==a&&(l.method="throw",l.arg=/* @__PURE__ */new TypeError("The iterator does not provide a '"+a+"' method")),f;var o=d(n,t.iterator,l.arg);if("throw"===o.type)return l.method="throw",l.arg=o.arg,l.delegate=null,f;var i=o.arg;return i?i.done?(l[t.resultName]=i.value,l.next=t.nextLoc,"return"!==l.method&&(l.method="next",l.arg=e),l.delegate=null,f):i:(l.method="throw",l.arg=/* @__PURE__ */new TypeError("iterator result is not an object"),l.delegate=null,f)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function L(t){if(t||""===t){var l=t[i];if(l)return l.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function l(){for(;++n<t.length;)if(a.call(t,n))return l.value=t[n],l.done=!1,l;return l.value=e,l.done=!0,l};return o.next=o}}throw new TypeError(nn(t)+" is not iterable")}return y.prototype=b,n(C,"constructor",{value:b,configurable:!0}),n(b,"constructor",{value:y,configurable:!0}),y.displayName=u(b,r,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,r,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},_(S.prototype),u(S.prototype,s,function(){return this}),t.AsyncIterator=S,t.async=function(e,l,a,n,o){void 0===o&&(o=Promise);var i=new S(c(e,l,a,n),o);return t.isGeneratorFunction(l)?i:i.next().then(function(e){return e.done?e.value:i.next()})},_(C),u(C,r,"Generator"),u(C,i,function(){return this}),u(C,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),l=[];for(var a in t)l.push(a);return l.reverse(),function e(){for(;l.length;){var a=l.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},t.values=L,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var l in this)"t"===l.charAt(0)&&a.call(this,l)&&!isNaN(+l.slice(1))&&(this[l]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var l=this;function n(a,n){return s.type="throw",s.arg=t,l.next=a,n&&(l.method="next",l.arg=e),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var r=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(r&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(r){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var l=this.tryEntries.length-1;l>=0;--l){var n=this.tryEntries[l];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var l=this.tryEntries[t];if(l.finallyLoc===e)return this.complete(l.completion,l.afterLoc),T(l),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var l=this.tryEntries[t];if(l.tryLoc===e){var a=l.completion;if("throw"===a.type){var n=a.arg;T(l)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,l,a){return this.delegate={iterator:L(t),resultName:l,nextLoc:a},"next"===this.method&&(this.arg=e),f}},t}function un(e,t,l,a,n,o,i){try{var s=e[o](i),r=s.value}catch(e){return void l(e)}s.done?t(r):Promise.resolve(r).then(a,n)}function cn(e,t,l){return(t=function(e){var t=function(e){if("object"!=nn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,"string");if("object"!=nn(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}var dn=we({name:"WujieVue",props:{width:{type:String,default:""},height:{type:String,default:""},name:{type:String,default:""},loading:{type:HTMLElement,default:void 0},url:{type:String,default:""},sync:{type:Boolean,default:void 0},prefix:{type:Object,default:void 0},alive:{type:Boolean,default:void 0},props:{type:Object,default:void 0},attrs:{type:Object,default:void 0},replace:{type:Function,default:void 0},fetch:{type:Function,default:void 0},fiber:{type:Boolean,default:void 0},degrade:{type:Boolean,default:void 0},plugins:{type:Array,default:null},beforeLoad:{type:Function,default:null},beforeMount:{type:Function,default:null},afterMount:{type:Function,default:null},beforeUnmount:{type:Function,default:null},afterUnmount:{type:Function,default:null},activated:{type:Function,default:null},deactivated:{type:Function,default:null},loadError:{type:Function,default:null},style:{type:Object,default:void 0},iframeAddEventListeners:{type:Array,default:null},iframeOnEvents:{type:Array,default:null}},data:function(){return{startAppQueue:Promise.resolve()}},mounted:function(){var e=this;this.name&&(window.__WUJIE_QUEUE?window.__WUJIE_QUEUE[this.name]?this.startAppQueue=window.__WUJIE_QUEUE[this.name]:window.__WUJIE_QUEUE[this.name]=this.startAppQueue:window.__WUJIE_QUEUE=cn({},this.name,this.startAppQueue)),Nt.$onAll(this.handleEmit),this.execStartApp(),this.$watch(function(){return e.name+e.url},function(){return e.execStartApp()})},methods:{handleEmit:function(e){for(var t=arguments.length,l=new Array(t>1?t-1:0),a=1;a<t;a++)l[a-1]=arguments[a];this.$emit.apply(this,[e].concat(l))},startApp:function(){var e,t=this;return(e=/* @__PURE__ */rn().mark(function e(){return rn().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,$t({name:t.name,url:t.url,el:t.$refs.wujie,loading:t.loading,alive:t.alive,fetch:t.fetch,props:t.props,attrs:t.attrs,replace:t.replace,sync:t.sync,prefix:t.prefix,fiber:t.fiber,degrade:t.degrade,plugins:t.plugins,beforeLoad:t.beforeLoad,beforeMount:t.beforeMount,afterMount:t.afterMount,beforeUnmount:t.beforeUnmount,afterUnmount:t.afterUnmount,activated:t.activated,deactivated:t.deactivated,loadError:t.loadError,iframeAddEventListeners:t.iframeAddEventListeners,iframeOnEvents:t.iframeOnEvents});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log(e.t0);case 8:case"end":return e.stop()}},e,null,[[0,5]])}),function(){var t=this,l=arguments;return new Promise(function(a,n){var o=e.apply(t,l);function i(e){un(o,a,n,i,s,"next",e)}function s(e){un(o,a,n,i,s,"throw",e)}i(void 0)})})()},execStartApp:function(){this.startAppQueue=this.startAppQueue.then(this.startApp),window.__WUJIE_QUEUE[this.name]=this.startAppQueue},destroy:function(){Pt(this.name)}},beforeDestroy:function(){Nt.$offAll(this.handleEmit)},render:function(){return Ce("div",{style:sn({width:this.width,height:this.height},this.style),ref:"wujie"})}});function pn(e){return new Promise(t=>{const l=document.createElement("div");document.body.appendChild(l);const a=pe({setup(){function n(){a.unmount(),document.body.removeChild(l)}return()=>Ce("div",{},Ce(Ht,{wuJieName:"gct-formula-editor",url:"/extras/@gct-paas/formula-editor/index.html",props:e,onWujieFormula___confirm:e=>{t(e),n()},onWujieFormula___cancel:()=>{t(void 0),n()}}))}});a.use(dn),a.mount(l)})}dn.setupApp=zt,dn.preloadApp=Ut,dn.bus=Nt,dn.destroyApp=Pt,dn.install=function(e){e.component("WujieVue",dn)};var mn=/* @__PURE__ */we({name:"GctFormFormula",props:{c:{type:Object,required:!0},itemModel:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""}},setup(e){const t=re("form-formula"),l=ql(),a=Re(),n=Yl(),o=Yl("expressionEcho"),i=async()=>{const t=await pn({expr:n.value.expr,exprEcho:null==o?void 0:o.value,returnType:n.value.mappingType||"string",mode:j.DATA_SET_FORMULA,identifiers:{},...e.model.config||{}});t&&(n.value={expr:t.expr,mappingType:t.returnType},o&&(o.value=t.exprEcho),l.validateItem(e.itemModel.name))};return()=>be("div",{class:t.b(),onClick:i},[be(ze("a-input"),{ref:a,class:t.e("input"),readonly:!0,value:(null==o?void 0:o.value)||n.value,placeholder:ne("sys.inputText")},null)])}}),vn=class{constructor(){n(this,"component","gct-form-formula")}},hn=Tl(pl.FORMULA,()=>new vn,mn),fn=class{constructor(){n(this,"component","gct-form-check-switch")}},gn=/* @__PURE__ */we({name:"GctFormCheckSwitch",props:{itemModel:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:Boolean,default:!1},size:{type:String}},emits:["update:value"],setup:()=>({ns:re("gct-form-check-switch"),val:Yl()}),render(){return this.model.isSwitch?be("div",{class:[this.ns.b(),this.ns.m("switch"),this.ns.is("readonly",this.model.readonly),this.size?this.ns.m(this.size):null]},[be(ze("a-switch"),Oe({checked:this.val,"onUpdate:checked":e=>this.val=e,size:this.size},this.model.props||{}),null)]):be(ze("a-checkbox"),Oe({checked:this.val,"onUpdate:checked":e=>this.val=e,size:this.size},this.model.props||{},{class:[this.ns.b(),this.ns.m("checkbox"),this.ns.is("readonly",this.model.readonly),this.size?this.ns.m(this.size):null]}),{default:()=>[this.model.label]})}}),yn=Tl(pl.CHECK_SWITCH,()=>new fn,gn);function bn(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var xn=/* @__PURE__ */we({name:"GctFormSelectGroup",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},emits:["update:value"],setup(e,{emit:t}){const l=re("form-select-group"),a=_e("formController"),n=Re(""),o=Re(null),i=Re(!1),s=Re(/* @__PURE__ */new Set),r=de({get:()=>e.model.nameField?a.item[e.model.nameField].value:"",set(t){if(e.model.nameField)return a.item[e.model.nameField].editorValue=t}});function u(e,t){return e.className.indexOf(t)>-1?e:e.parentElement?u(e.parentElement,t):null}function c(e){var t;u(e.target,"ant-select-dropdown")||null===(t=o.value)||void 0===t||t.blur()}window.addEventListener("wheel",c);const d=Re(),p=de({get:()=>!e.c.state.options.find(t=>t.value===e.value)&&r.value?r.value:e.value||void 0,set:e=>{if(!e)return t("update:value",void 0),void(r.value="");"string"==typeof e&&(e=e.trim()),t("update:value",e);let l=null;m.value.find(t=>(t.options&&(l=t.options.find(t=>t.value==e)),!!l)),l&&(r.value=l.label)}}),m=de(()=>e.c.state.options&&e.c.state.options.length>0?e.c.state.options:[]),v=async()=>e.c.loadDictionary();return null!=p.value&&v(),Me(()=>{window.removeEventListener("wheel",c)}),{ns:l,selectRef:o,searchValue:n,open:i,rootRef:d,val:p,options:m,loadOptions:v,toggleGroupCollapse:t=>{e.model.groupCollapsible&&(s.value.has(t)?s.value.delete(t):s.value.add(t))},isGroupCollapsed:t=>!0!==e.model.groupCollapsible||!s.value.has(t)}},render(){let e;return be("div",{ref:"rootRef",class:this.ns.b()},[be(ze("a-select"),{ref:"selectRef",open:this.open,value:this.val,"onUpdate:value":e=>this.val=e,allowClear:!0,disabled:this.c.state.disabled,size:this.size,placeholder:this.model.placeholder,onDropdownVisibleChange:this.loadOptions,"show-search":!0,"filter-option":()=>!0,searchValue:this.searchValue,onSearch:e=>this.searchValue=null==e?void 0:e.trim(),onFocus:()=>this.open=!0,onBlur:()=>this.open=!1,onChange:()=>this.open=!1},bn(e=this.options.map(e=>{let t;const l=null!=e.label?e.label:" ",a=String(e.value),n=this.isGroupCollapsed(a),o=(n&&e.options||[]).filter(e=>!this.searchValue||e.label.toLowerCase().indexOf(this.searchValue.toLowerCase())>=0);return 0===o.length?null:be(ze("a-select-opt-group"),{key:e.value,label:be("div",{class:[this.ns.b("group-header"),this.model.groupCollapsible?this.ns.b("group-header--clickable"):""],onClick:()=>this.toggleGroupCollapse(a)},[this.model.groupCollapsible&&be("span",{class:[this.ns.be("group-header","arrow"),n?this.ns.bem("group-header","arrow","collapsed"):""]},[be("i",{class:["iconfont",1!=n?"icon-right":"icon-Down"]},null)]),be("span",{class:this.ns.be("group-header","title")},[l])])},bn(t=o.map(e=>be(ze("a-select-option"),{class:this.ns.b("item-option"),key:e.value,value:e.value},{default:()=>[e.icon?be("span",{class:this.ns.be("item-option","item-icon")},[be("i",{class:`iconfont ${e.icon}`},null)]):"",be("span",{class:this.ns.be("item-option","item-label")},[e.label])]})))?t:{default:()=>[t]})}))?e:{default:()=>[e]})])}}),wn=class{constructor(){n(this,"component","gct-form-select-group")}},kn=Tl(pl.SELECT_GROUP,()=>new wn,xn),Cn=class{constructor(){n(this,"component","gct-form-i18n")}},_n=/* @__PURE__ */we({name:"GctFormI18n",props:Jl(),emits:["update:value","blur"],setup(e,{emit:t}){var l;const a=re("form-i18n"),n=ql(),o=Re({}),i=Re(!1),s=n.item[(null===(l=e.model)||void 0===l?void 0:l.cfgKey)||"i18nConfig"];s||console.warn("i18nConfig not found in form item, please ensure that the model has a valid cfgKey or i18nConfig is defined in the form.");const r=de(()=>{var t,l;return(null===(t=e.data)||void 0===t?void 0:t[(null===(l=e.model)||void 0===l?void 0:l.fieldKey)||"fieldKey"])||null});r.value&&async function(){var t;const l=await le.loadField((null===(t=e.data)||void 0===t?void 0:t.modelKey)||e.context.modelKey,r.value);l&&(o.value=l)}();const u=de({get:()=>e.value?e.value:!0===i.value?"":o.value.name,set:l=>{"string"==typeof l&&(l=l.trim()),i.value=!0,"object"!=typeof l&&e.value==l||(l||(c.value=""),t("update:value",l))}}),c=de({get:()=>s?{i18nKey:s.value}:"",set:e=>{if(s)try{s.value=JSON.parse(e).i18nKey}catch(t){console.error(t)}}});return{ns:a,val:u,i18nConfigValue:c,onBlur:function(){i.value=!1}}},render(){var e;return be(ze("i18n-select-input"),Oe({class:[this.ns.b(),this.ns.m(this.size)],i18nText:this.val,"onUpdate:i18nText":e=>this.val=e,i18nConfig:this.i18nConfigValue,"onUpdate:i18nConfig":e=>this.i18nConfigValue=e,placeholderText:this.model.placeholder||this.$t("sys.inputText"),attr:"i18nKey",btnHeight:"small"===this.size?"26px":void 0,inputExtraProps:{showCount:!0,maxlength:this.model.max||32,disabled:this.c.state.disabled},onBlur:e=>{this.onBlur(),this.$emit("blur",e)},size:this.size},(null===(e=this.model)||void 0===e?void 0:e.props)||{}),null)}}),Sn=Tl(pl.I18N,()=>new Cn,_n),En=/* @__PURE__ */we({name:"GctFormIconSelect",props:{value:{type:Object},model:{type:Object,required:!0}},emits:["update:value"],setup(e,{emit:t}){var l,a,n;const o=re("gct-form-icon-select"),i=Re(e.value),s=Re((null===(l=i.value)||void 0===l?void 0:l.icon)||e.model.defaultIcon),r=Re((null===(a=i.value)||void 0===a?void 0:a.color)||e.model.defaultColor),u=Re((null===(n=i.value)||void 0===n?void 0:n.background)||e.model.defaultBackground);return Ze(()=>e.value,e=>{i.value=e,e&&(s.value=e.icon,r.value=e.color)}),Ze([s,r,u],()=>{i.value={icon:s.value,color:r.value},t("update:value",i.value)}),{ns:o,icon:s,color:r,background:u,nextPickerStyle:de(()=>{if(e.model.size)return{"--box-size":e.model.size+"px"}})}},render(){return be("div",{class:this.ns.b()},[be(ze("icon-next-picker"),{value:this.icon,"onUpdate:value":e=>this.icon=e,color:this.color,"onUpdate:color":e=>this.color=e,background:"#f5f5f5",disabled:this.model.disabled,showColor:!1!==this.model.showColor,style:this.nextPickerStyle},null),this.model.label?be("span",{class:this.ns.e("title")},[this.model.label]):null])}}),On=class{constructor(){n(this,"component","gct-form-icon-select")}},In=Tl(pl.ICON_SELECT,()=>new On,En),Tn=class{constructor(){n(this,"component","gct-form-number")}},Fn=/* @__PURE__ */we({name:"GctFormNumber",props:{model:{type:Object,required:!0},value:{type:String,default:""}},emits:["update:value"],setup:()=>({ns:re("gct-form-number"),val:Yl()}),render(){return be(ze("a-input-number"),Oe({value:this.val,"onUpdate:value":e=>this.val=e},this.model.props||{},{class:[this.ns.b(),this.model.class],prefix:this.model.prefix,suffix:this.model.suffix,addonBefore:this.model.addonBefore,addonAfter:this.model.addonAfter,placeholder:this.model.placeholder,max:this.model.max,min:this.model.min,precision:this.model.precision}),null)}}),Ln=Tl(pl.NUMBER,()=>new Tn,Fn),Dn=class{constructor(){n(this,"component","gct-form-picker")}},Mn=/* @__PURE__ */we({name:"GctFormPicker",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:null}},emits:["update:value"],setup(e,{emit:t}){const l=re("gct-form-picker"),a=ql(),n=de({get:()=>e.model.nameField?a.item[e.model.nameField].value:"",set(t){if(e.model.nameField)return a.item[e.model.nameField].editorValue=t}}),o=de({get:()=>!e.c.state.options.find(t=>t.value===e.value)&&n.value?n.value:e.value,set:l=>{if("string"==typeof l&&(l=l.trim()),"object"!=typeof l&&e.value==l)return;const n=e.c.state.options.find(e=>e.value===l);n&&n.data&&e.model.fieldMap&&e.model.fieldMap.map(e=>{const[t,l]=e.split(":");l&&(a.item[l].editorValue=n.data[t])}),t("update:value",l)}});return null!=o.value&&e.c.loadDictionary(),{ns:l,val:o,nameVal:n,loadOptions:()=>e.c.loadDictionary(),onChange:(e,t)=>{n.value=t.label}}},render(){return be(ze("a-select"),Oe({value:this.val,"onUpdate:value":e=>this.val=e},this.model.props||{},{class:this.ns.b(),disabled:this.c.state.disabled,loading:this.c.state.loading,options:this.c.state.options,placeholder:this.model.placeholder,onDropdownVisibleChange:this.loadOptions,onChange:this.onChange,"show-search":!0,"filter-option":(e,t)=>!!t.label&&t.label.toLowerCase().indexOf(e.toLowerCase())>=0}),null)}}),Bn=Tl(pl.PICKER,()=>new Dn,Mn),jn=/* @__PURE__ */we({name:"GctFormPixelConfig",props:{model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},setup(){const e=re("form-pixel-config"),t=Yl("label_mode"),l=Yl(),a=[{label:"百分比",value:"percent"},{label:"固定",value:"fixed"}],n=de(()=>"fixed"===t.value?"px":"%");function o(e){t.value=e,l.value="fixed"===e?100:30}return()=>be(ze("a-input-group"),{compact:!0,class:e.b()},{default:()=>[be(ze("a-select"),{class:e.e("select"),value:t.value,"onUpdate:value":e=>t.value=e,options:a,onChange:o},null),be(ze("a-input-number"),{class:e.e("input"),value:l.value,"onUpdate:value":e=>l.value=e,min:0,placeholder:"请输入",size:"small",max:"fixed"===t.value?500:100,addonAfter:n.value},null)]})}}),An=class{constructor(){n(this,"component","gct-form-pixel-config")}},Rn=Tl(pl.PIXEL_CONFIG,()=>new An,jn),Nn=class{constructor(){n(this,"component","gct-form-select")}},Pn=/* @__PURE__ */we({name:"GctFormSelect",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},emits:["update:value"],setup(e){const t=re("gct-form-select"),l=Re();I(l,()=>{var e;a.value=!1,null===(e=l.value)||void 0===e||e.blur()});const a=Re(!1);function n(e,t){var l;return(null===(l=e.className)||void 0===l?void 0:l.indexOf(t))>-1?e:e.parentElement?n(e.parentElement,t):null}function o(e){var t;n(e.target,"ant-select-dropdown")||null===(t=l.value)||void 0===t||t.blur()}window.addEventListener("wheel",o);const i=Re(),s=new jl(e.model),r=Yl(),u=de({get:()=>null!=r.value?r.value:void 0,set(e){r.value=e}}),c=de(()=>e.c.state.options&&e.c.state.options.length>0?e.c.state.options:s.options);return Me(()=>{window.removeEventListener("wheel",o)}),{ns:t,selectRef:l,open:a,rootRef:i,editorC:s,val2:u,options:c,onCloseDropdown:function(){a.value=!1,l.value&&l.value.blur()},onOpenDropdown:function(){a.value=!0},onChangeDropdown:function(){a.value=!a.value}}},render(){return be("div",{ref:"rootRef",class:this.ns.b()},[this.model.beforeText?be("div",{class:this.ns.e("before-text")},[this.model.beforeText]):null,be("div",{class:this.ns.e("content")},[be(ze("a-select"),Oe({ref:"selectRef",open:this.open,value:this.val2,"onUpdate:value":e=>this.val2=e,options:this.options,allowClear:!0,disabled:this.c.state.disabled,size:this.size,placeholder:this.model.placeholder,onChange:this.onCloseDropdown,onClick:this.onChangeDropdown},this.model.props||{}),null)]),this.model.afterText?be("div",{class:this.ns.e("after-text")},[this.model.afterText]):null])}}),Un=Tl(pl.SELECT,()=>new Nn,Pn),zn=class{constructor(){n(this,"component","gct-form-span")}},$n=/* @__PURE__ */we({name:"GctFormSpan",props:{c:{type:Object,required:!0},itemModel:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},isEmptyText:{type:Boolean,default:!1}},setup(e){const t=re("form-span"),{model:l,itemModel:a,c:n}=Ye(e);return n.value.loadDictionary(),{ns:t,val:de(()=>{if(l.value.format&&"function"==typeof l.value.format)return l.value.format(n.value.data,a.value,n.value);if(null==e.value||""===e.value)return e.value;if(a.value.dictionary){const t=(a.value.dictionary.items||[]).find(t=>t.value==e.value);if(t)return t.label}if(n.value.state.options.length>0){const t=n.value.state.options.find(t=>t.value==e.value);if(t)return t.label}return e.value}),handleClipboardKey:function(){const{isSuccessRef:t}=ie(e.value);t.value&&At.success(ne("sys.copySuccess"))}}},render(){let e=this.val;return this.val||!0!==this.isEmptyText||(e=_gct.store.getEmptyDisplay),be("div",{class:this.ns.b()},[be("span",{class:this.ns.e("info")},[e]),this.model.copy&&be("span",{class:this.ns.e("copy")},[be("i",{class:"iconfont icon-fuzhi primary-gct",onClick:this.handleClipboardKey},null)])])}}),Vn=Tl(pl.SPAN,()=>new zn,$n),Hn=class{constructor(){n(this,"component","gct-form-switch")}},Kn=/* @__PURE__ */we({name:"GctFormSwitch",props:{model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},setup:()=>({ns:re("gct-form-switch"),val:Yl()}),render(){return be("div",{class:this.ns.b()},[be(ze("a-switch"),Oe({checked:this.val,"onUpdate:checked":e=>this.val=e,size:this.size},this.model.props||{}),null)])}}),Gn=Tl(pl.SWITCH,()=>new Hn,Kn),qn=class{constructor(){n(this,"component","gct-form-text")}},Yn=/* @__PURE__ */we({name:"GctFormText",props:{model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},emits:["update:value"],setup(e){const t=re("gct-form-text"),l=Wl(e.model.prefix||e.model.addonBefore,e.model.suffix||e.model.addonAfter);function a(){"string"==typeof l.value&&(l.value=l.value.trim())}return()=>be(ze("a-input"),Oe({value:l.value,"onUpdate:value":e=>l.value=e,size:e.size},e.model.props||{},{class:t.b(),prefix:e.model.prefix,suffix:e.model.suffix,addonBefore:e.model.addonBefore,addonAfter:e.model.addonAfter,placeholder:e.model.placeholder,"show-count":null!=e.model.max,maxlength:e.model.max,onBlur:a}),null)}}),Wn=Tl(pl.TEXT,()=>new qn,Yn),Jn=/* @__PURE__ */we({name:"GctFormEmpty",setup(){const e=re("gct-form-empty");return()=>be("span",{class:e.b()},null)}}),Xn=class{constructor(){n(this,"component","gct-form-empty")}},Qn=Tl(pl.EMPTY,()=>new Xn,Jn),Zn=class{constructor(){n(this,"component","gct-form-textarea")}},eo=/* @__PURE__ */we({name:"GctFormTextarea",props:{model:{type:Object,required:!0},value:{type:String,default:null}},emits:["update:value"],setup(){const e=re("gct-form-textarea"),t=Yl();return{ns:e,val:t,handleBlur:()=>{"string"==typeof t.value&&(t.value=t.value.trim())}}},render(){return be(ze("a-textarea"),Oe({value:this.val,"onUpdate:value":e=>this.val=e,class:this.ns.b(),"auto-size":this.model.autoSize,"show-count":null!=this.model.max,maxlength:this.model.max,placeholder:this.model.placeholder,onBlur:this.handleBlur},this.model.props||{}),null)}}),to=Tl(pl.TEXTAREA,()=>new Zn,eo);function lo(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var ao=/* @__PURE__ */we({name:"GctFormRadio",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},emits:["update:value"],setup:()=>({ns:re("gct-form-radio"),val:Yl()}),render(){let e;const t={...this.model.props||{},allowClear:!0,disabled:this.c.state.disabled};if(this.model.buttonMode){let e;return be(Ft,Oe({class:[this.ns.b(),this.ns.m("button")],value:this.val,"onUpdate:value":e=>this.val=e,size:"small","button-style":"solid"},t),lo(e=this.c.state.options.map(e=>be(Tt,{key:e.value,value:e.value},{default:()=>[e.label]})))?e:{default:()=>[e]})}return be(Ft,Oe({class:[this.ns.b(),this.ns.m("radio")],value:this.val,"onUpdate:value":e=>this.val=e,size:this.size},t),lo(e=this.c.state.options.map(e=>{var t;return be(It,{class:[this.ns.e("item"),this.ns.em("item","pos-"+((null===(t=this.model.icon)||void 0===t?void 0:t.pos)||"left"))],key:e.value,value:e.value,disabled:e.disabled},{default:()=>{var t,l,a;return[e.icon?be("span",{class:this.ns.e("item-icon"),style:{width:null===(t=this.model.icon)||void 0===t?void 0:t.width,height:null===(l=this.model.icon)||void 0===l?void 0:l.height,fontSize:null===(a=this.model.icon)||void 0===a?void 0:a.fontSize}},["string"==typeof e.icon&&e.icon.endsWith(".svg")?be(ze("assets-svg-icon"),{src:e.icon},null):e.icon]):null,be("span",{class:this.ns.e("item-label")},[e.label])]}})}))?e:{default:()=>[e]})}}),no=class{constructor(){n(this,"component","gct-form-radio")}},oo=Tl(pl.RADIO,()=>new no,ao),io=/* @__PURE__ */we({name:"GctFormInfo",props:{value:{type:String,default:""},model:{type:Object,required:!0},size:{type:String},isEmptyText:{type:Boolean,default:!1}},emits:["update:value"],setup:()=>({ns:re("gct-form-info"),val:Yl()}),render(){let e=this.val||this.model.content;return this.val||!0!==this.isEmptyText||(e=_gct.store.getEmptyDisplay),be("div",{class:[this.ns.b(),this.size?this.ns.m(this.size):null]},[this.model.icon?be("span",{class:this.ns.e("icon")},[be("i",{class:`iconfont ${this.model.icon}`},null)]):null,be("span",{class:this.ns.e("content"),title:e},[e])])}}),so=class{constructor(){n(this,"component","gct-form-info")}},ro=Tl(pl.INFO,()=>new so,io),uo=Gt,co=/* @__PURE__ */we({name:"GctFormCheckbox",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},size:{type:String}},emits:["update:value"],setup(e,{emit:t}){const l=re("gct-form-checkbox"),a=Yl(),n=de(()=>e.model.isDrag?(a.value||[]).filter(e=>e.checked).map(e=>e.value):a.value),o=de(()=>{var t;return e.model.isDrag&&a.value&&(null===(t=a.value)||void 0===t?void 0:t.length)?a.value.map(t=>{var l;return{...t,label:(null===(l=e.c.state.options.find(e=>e.value===t.value))||void 0===l?void 0:l.label)||""}}):e.c.state.options});return{ns:l,checked:n,onChange:l=>{o.value.forEach(t=>{e.model.minLength&&l.length<=e.model.minLength&&l.includes(t.value)?t.disabled=!0:t.disabled=!1,t.checked=l.includes(t.value)}),e.model.isDrag?t("update:value",o.value):t("update:value",l)},onDragEnd:e=>{const{newIndex:l,oldIndex:a}=e;o.value.splice(l,0,o.value.splice(a,1)[0]),t("update:value",o.value)},slots:{item:({element:e})=>be("div",{class:"drag-checkbox-item ks-row-middle"},[be("i",{class:"icon-drag iconfont mr4px cursor-move text-[#C3C3C3] primary-gct-hover"},null),be(xt,{value:e.value,disabled:e.disabled},{default:()=>[e.label]})])},options:o}},render(){const e={...this.model.props||{},class:[this.ns.b(),this.ns.m("checkbox"),"column"===this.model.layout&&"isColumn",this.size?this.ns.m(this.size):null],disabled:this.c.state.disabled};return[lt(be(wt,Oe({value:this.checked,"onUpdate:value":e=>this.checked=e},e,{onChange:this.onChange}),{default:()=>[be(uo,{modelValue:this.options,"onUpdate:modelValue":e=>this.options=e,handle:".cursor-move",animation:"200","chosen-class":"drawing-chosen","drag-class":"drawing-drag","item-key":"value",class:"drag-wrap",onEnd:this.onDragEnd},this.slots)]}),[[Qe,this.model.isDrag]]),lt(be(wt,Oe({value:this.checked,"onUpdate:value":e=>this.checked=e,options:this.options},e,{onChange:this.onChange}),null),[[Qe,!this.model.isDrag]])]}}),po=class{constructor(){n(this,"component","gct-form-checkbox")}},mo=Tl(pl.CHECKBOX,()=>new po,co);function vo(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var ho=[{value:"entity",label:"sys.pageDesigner.entity"},{value:"data",label:"sys.pageDesigner.data"},{value:"view",label:"sys.pageDesigner.view"},{value:"form",label:"sys.pageDesigner.form",project:["eDHR","MEDPRO"]},{value:"system",label:"sys.pageDesigner.system"}],fo=/* @__PURE__ */we({name:"GctFormModelSelect",props:{model:{type:Object,required:!0},value:{type:String}},setup(e){const t=re("form-model-select"),l=Yl(),a=Yl("category"),n=Yl("categorySelect"),o=Yl("modelName"),i=Yl("formId"),s=Re([]),r=Re({}),u=async()=>{return"system"===n.value?(s.value=await _api.apaas.report.getListSystemModels()||[],{[ne("sys.pageDesigner.system")]:s.value}):(s.value=await _api.apaas.modelComprehensive.getModelSummary({type:(null===(t=e.model.props)||void 0===t?void 0:t.modelTypes)||"NDO,BASE,TREE,TRANSACTION,SIGN",category:a.value,report:!0})||[],rt(s.value,"group"));var t},{onFieldChange:c}=_t.useInjectFormItemContext();De(async()=>{l.value=l.value?l.value:void 0,a.value=a.value||"entity",n.value=n.value||a.value,r.value=await u()});const d=async e=>{a.value=e,l.value=null,i.value=void 0,r.value=await u()},p=e=>{const t=s.value.find(t=>t.key===e);t&&(o.value=t.name),"system"===n.value&&(a.value=t.modelCategory),c(),"system"!==n.value&&(r.value=rt(s.value,"group"))};return()=>{let a,o;return be("div",{class:t.b()},[be(ze("a-input-group"),{compact:!0},{default:()=>[be(ze("a-select"),{value:n.value,"onUpdate:value":e=>n.value=e,class:t.e("class"),placeholder:"请选择",onSelect:d,disabled:e.model.disabled},vo(a=ho.filter(t=>{var l;return(null===(l=e.model.props)||void 0===l?void 0:l.exclude)?!e.model.props.exclude.includes(t.value)&&(!t.project||t.project&&_gct.store.appInfo.suiteKey&&t.project.includes(_gct.store.appInfo.suiteKey)):!t.project||_gct.store.appInfo.suiteKey&&t.project.includes(_gct.store.appInfo.suiteKey)}).map(e=>{let t;return be(ze("a-select-option"),{key:e.value,value:e.value},vo(t=ne(e.label))?t:{default:()=>[t]})}))?a:{default:()=>[a]}),be(ze("a-select"),{value:l.value,"onUpdate:value":e=>l.value=e,class:t.e("model"),onSelect:p,"show-search":!0,placeholder:"请选择",disabled:e.model.disabled,filterOption:(e,t)=>(t.label||t.name).toLowerCase().indexOf(e.toLowerCase())>=0},vo(o=Object.keys(r.value).map(e=>{const t=r.value[e].map(e=>be(ze("a-select-option"),{key:e.key,value:e.key,label:e.name},{default:()=>[e.name]}));return be(ze("a-select-opt-group"),{key:e,label:e},vo(t)?t:{default:()=>[t]})}))?o:{default:()=>[o]})]})])}}}),go=class{constructor(){n(this,"component","gct-form-model-select")}},yo=Tl(pl.MODEL_SELECT,()=>new go,fo),bo=/* @__PURE__ */we({name:"GctFormMultipleChoice",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:Array,default:null}},emits:["update:value"],setup(e,{emit:t}){const l=re("form-multiple-choice"),a=Re(),n=de({get:()=>e.value??[],set:e=>{t("update:value",e)}});return null!=n.value&&e.c.loadDictionary(),{ns:l,rootRef:a,val:n,loadOptions:()=>e.c.loadDictionary({},e.model.force)}},render(){return be("div",{ref:"rootRef",class:this.ns.b()},[be(ze("a-select"),Oe({value:this.val,"onUpdate:value":e=>this.val=e,mode:"multiple","max-tag-count":5,disabled:this.c.state.disabled,loading:this.c.state.loading,options:this.c.state.options,placeholder:this.model.placeholder,onDropdownVisibleChange:this.loadOptions,getPopupContainer:()=>this.rootRef},this.model.props||{}),null)])}}),xo=class{constructor(){n(this,"component","GctFormMultipleChoice")}},wo=Tl(pl.MULTIPLE_CHOICE,()=>new xo,bo),ko=/* @__PURE__ */we({name:"GctFormTable",props:{model:{type:Object,required:!0},value:{type:Array,default:()=>[]}},setup(e){const t=re("form-table"),l=Yl();return()=>be("div",{class:t.b()},[be(ze("gct-table"),Oe({data:l.value,model:e.model.tableModel,count:l.value.length.toString()},e.model.props||{}),null)])}}),Co=class{constructor(){n(this,"component","gct-form-table")}},_o=Tl(pl.TABLE,()=>new Co,ko),So=/* @__PURE__ */we({name:"GctSelectFormTable",props:{model:{type:Object,required:!0},value:{type:Array,default:()=>[]}},setup(e){const t=re("select-form-table"),l=Re(),a=Re(""),n=Yl(),o=de(()=>({type:e.model.multiple?"checkbox":"radio",fixed:!0,selectedRowKeys:e.model.isKeys?n.value:n.value.map(t=>t[e.model.tableModel.key||"id"]),onChange:(t,l)=>{e.model.isKeys?n.value=t:n.value=l},getCheckboxProps:e=>({disabled:"Disabled User"===e.name,name:e.name})}));function i(){a.value?(a.value=a.value.trim(),a.value&&l.value&&l.value.reload({query:a.value})):l.value&&l.value.reload()}return()=>be("div",{class:t.b()},[be("div",{class:t.e("search")},[be(ze("a-input-search"),{placeholder:"搜索数据集名称",value:a.value,"onUpdate:value":e=>a.value=e,onSearch:i},null)]),be("div",{class:t.e("table")},[be(ze("gct-table"),Oe({ref:l,"row-selection":o.value,data:n.value,model:e.model.tableModel,count:n.value.length.toString()},e.model.props||{}),null)])])}}),Eo=class{constructor(){n(this,"component","gct-select-form-table")}},Oo=Tl(pl.SELECT_TABLE,()=>new Eo,So),Io={install(e){e.use(Ja).use(Za).use(qa).use(ln).use(hn).use(yn).use(Sn).use(kn).use(In).use(Ln).use(Bn).use(Rn).use(Un).use(Vn).use(Gn).use(Wn).use(to).use(oo).use(ro).use(mo).use(ln).use(yo).use(wo).use(_o).use(Oo).use(Va).use(Qn)}},To=/* @__PURE__ */we({name:"GctEditForm",props:{embed:{type:Boolean,default:!1},context:{type:Object,default:()=>({})},params:{type:Object,default:()=>({})},controller:{type:Object},model:{type:Object,required:!0},data:{type:Object},count:{type:Number,default:0},adaptModal:{type:Boolean,default:!0}},emits:["update:data","change"],setup(e,{emit:t,expose:l}){const a=re("gct-edit-form");console.debug("GctEditForm props:",e);const n=e.controller||Bl(()=>new Ml(e.model)),o=Re(),i=async e=>{try{await o.value.formRef.validateFields([e])}catch(t){return console.error(t),!1}return!0};n.validate=async()=>{try{await o.value.formRef.validate()}catch(e){return console.error(e),!1}return!0},n.validateItem=i;const{context:s,params:r}=Ye(e);return Ze(s,()=>{Object.assign(n.context,e.context),n.state.isNew=!n.context.id},{immediate:!0,deep:!0}),Ze(r,()=>{Object.assign(n.params,e.params)},{deep:!0}),Ze(()=>e.count,()=>{n.state.count+=1}),Ze(()=>e.data,()=>{Object.assign(n.state.data,e.data)},{deep:!0}),!1!==e.adaptModal&&se(async()=>{try{await o.value.formRef.validate();const e=await n.save();if(e)return{ok:!0,data:[ot(e)]}}catch(e){console.error(e)}return{ok:!1}}),e.data?(Object.assign(n.state.data,e.data),n.loaded()):!0!==n.state.isNew?n.load().then(()=>{n.loaded()}):n.loaded(),e.embed&&n.evt.on("change",()=>{const e=n.getData();t("update:data",e),t("change",e)}),n.evt.on("blur",e=>{i(e)}),l({c:n}),()=>{let t=null;return(n.state.isNew||0==n.state.isNew&&n.state.loaded)&&(t=be(ze("gct-form"),{class:"h-full",ref:o,c:n,model:e.model,context:e.context},null)),be("div",{class:a.b()},[t])}}}),Fo={install(e){e.use(Io),e.component(Na.name,Na),e.component(Ra.name,Ra),e.component(Ua.name,Ua),e.component(To.name,To),e.use(Aa)}},Lo=class{constructor(){n(this,"formData",{}),n(this,"items",[]),n(this,"page",1),n(this,"total",0),n(this,"size",20)}},Do=class{constructor(){n(this,"keepalive",!0),n(this,"visible",!0)}},Mo=class extends Do{constructor(...e){super(...e),n(this,"error",!1),n(this,"errMessage",""),n(this,"readonly",!1),n(this,"disabled",!1)}},Bo=class{constructor(){n(this,"hover",!1),n(this,"active",!1),n(this,"deleted",!1)}},jo=class{get value(){return this.row.data[this.model.dataIndex]}set value(e){const t=this.row.data[this.model.dataIndex];this.row.data[this.model.dataIndex]=e,this.row.change(this.model.name,e,t)}constructor(e,t){n(this,"state",this.createState()),this.row=e,this.model=t}createState(){return new Do}async init(){}async destroy(){}},Ao=class extends jo{},Ro=class extends jo{createState(){return new Mo}active(){return this.row.active()}unActive(){return this.row.unActive()}},No=class{constructor(){n(this,"promise",null),n(this,"resolve",null),n(this,"count",0)}get isLock(){return this.count>0}startPromise(){this.promise=new Promise(e=>{this.resolve=e})}endPromise(){this.resolve&&(this.resolve(),this.resolve=null,this.promise=null)}lock(){this.count+=1,this.promise||this.startPromise()}unlock(){if(this.count<1)return this.count=0,void console.warn("lock和unlock次数不匹配!");this.count-=1,0===this.count&&this.endPromise()}async await(){if(this.promise)return this.promise}};function Po(e,t,l){return{install(a){e&&t&&_gct.register.tableEditor.register(B.PREFIX+e,t),l&&a.component(l.name||l.__name,l)}}}var Uo=class{get key(){return this.data[this.model.key]}constructor(e,t,l){n(this,"item",{}),n(this,"fields",[]),n(this,"state",this.createState()),n(this,"activeCount",new No),this.table=e,this.model=t,this.data=l}async init(){const e=this.model.columns.map(e=>{let t=null;switch(e.type){case"edit":t=new Ro(this,e);break;case"actions":t=new Ao(this,e);break;default:t=new jo(this,e)}return this.fields.push(e.name),t.state=Ae(t.state),this.item[e.name]=t,t});await Promise.all(e)}change(e,t,l){this.table.change(this,e,t,l)}async destroy(){const e=Object.keys(this.item).map(e=>this.item[e].destroy());this.item={},await Promise.all(e)}active(){this.activeCount.isLock?this.activeCount.lock():(this.activeCount.lock(),this.state.active=!0,this.activeCount.await().then(()=>{this.state.active=!1}))}unActive(){this.activeCount.unlock()}createState(){return new Bo}},zo=class{constructor(e){n(this,"evt",new Sl),n(this,"state",this.createState()),n(this,"row",{}),n(this,"editorProviders",{}),this.model=e,this.init()}init(){this.initTableItems(this.model.columns)}initTableItems(e){e&&e.forEach(e=>{if("edit"===e.type){const t=_gct.register.tableEditor.get(B.PREFIX+e.editor.type);t&&(this.editorProviders[e.name]=t)}})}async setData(e){await this.destroyControllers(),await this.initControllers(e),this.state.items=e||[]}getData(){return this.state.items}createState(){return new Lo}async initControllers(e){const t=e.map(e=>{const t=e[this.model.key];if(this.row[t])return;const l=new Uo(this,this.model,e);return l.state=Ae(l.state),l.data=Ae(l.data),this.row[t]=l,Object.keys(e).forEach(l=>{this.state.formData[`${l}___${t}`]=e[l]}),l.init()});await Promise.all(t)}async destroyControllers(){const e=this.state.items.map(e=>e[this.model.key]),t=Object.keys(this.row).filter(t=>!e.includes(t)).map(e=>{const t=this.row[e];delete this.row[e];{const e=Object.keys(t.data),l=t.data[this.model.key];e.forEach(e=>{const t=`${e}___${l}`;delete this.state.formData[t]})}return t.destroy()});await Promise.all(t)}async load(e={}){if(st(e,{page:this.state.page,size:this.state.size}),this.model.fetch){const t=await this.model.fetch(e,this);this.state.items=t,this.destroyControllers(),this.initControllers(this.state.items)}}async reload(e){await this.load(e)}async search(e){await this.reload(e)}async refresh(e){await this.load(e)}destroy(){this.evt.reset()}change(e,t,l,a){const n=this.state.items.find(t=>t[this.model.key]===e.key);n&&(Object.assign(n,e.data),this.state.formData[`${t}___${n[this.model.key]}`]=l,this.evt.emit("change",n,t,l,a))}updatePagination(e){ht(e.total)||(this.state.total=e.total),ht(e.size)||(this.state.size=e.size),ht(e.page)||(this.state.page=e.page)}};function $o(e){const t=e();return t.state=Ae(t.state),Me(()=>t.destroy()),t}function Vo(e,{pagination:t=!0,triggerByWindowSize:l=!0}={}){const a=Re(0);let n=[],o=null,i=null;const s=()=>{var l,i;if(!e)return;o&&(clearTimeout(o),o=null);const r=We(e).$el??We(e),u=r.getBoundingClientRect().height??0,c=Math.max((null===(l=r.querySelector(".ant-table-thead"))||void 0===l?void 0:l.getBoundingClientRect().height)??0,48),d=t?Math.max((null===(i=r.querySelector(".ant-table-pagination"))||void 0===i?void 0:i.getBoundingClientRect().height)??0,24)+16:0;a.value=u-c-d,n.push(a.value),n.length>=3&&n[n.length-3]===n[n.length-1]&&n[n.length-2]===n[n.length-1]?n=[]:o=setTimeout(()=>{s()},100)};return l&&window.addEventListener("resize",s),Ze(e,async t=>{await Ie(),t&&(s(),(()=>{i&&(i.disconnect(),i=null);const t=We(e).$el??We(e);t&&"undefined"!=typeof ResizeObserver&&(i=new ResizeObserver(()=>{o&&clearTimeout(o),o=setTimeout(()=>{s()},100)}),i.observe(t))})())},{immediate:!0}),Me(()=>{window.removeEventListener("resize",s),i&&(i.disconnect(),i=null),o&&(clearTimeout(o),o=null)}),{scrollHeight:a,calcScrollHeight:s}}var Ho=class{constructor(){n(this,"editors",/* @__PURE__ */new Map),n(this,"providers",/* @__PURE__ */new Map)}register(e,t){this.editors.set(e,t)}unregister(e){this.editors.delete(e)}get(e){if(this.providers.has(e))return this.providers.get(e);const t=this.editors.get(e);if(t){const l=t();return this.providers.set(e,l),l}return null}},Ko=class{constructor(){n(this,"component","gct-table-span")}},Go=/* @__PURE__ */we({name:"GctTableSpan",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""}},setup:()=>({ns:re("table-span")}),render(){return be("div",{class:this.ns.b()},[this.model.icon?be("span",{class:this.ns.e("icon")},[be("i",{class:`iconfont ${"string"==typeof this.model.icon?this.model.icon:this.model.icon(this.c.row.data)}`},null)]):null,be("span",{class:this.ns.e("text")},[this.value])])}}),qo=Po(pl.SPAN,()=>new Ko,Go),Yo=class{constructor(){n(this,"component","gct-table-text")}},Wo=/* @__PURE__ */we({name:"GctTableText",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},isEdit:{type:Boolean,default:!1}},emits:["update:value"],setup(e){const t=re("table-text"),l=Wl(e.model.prefix||e.model.addonBefore,e.model.suffix||e.model.addonAfter);return{ns:t,val:l,handleBlur:()=>{"string"==typeof l.value&&(l.value=l.value.trim())}}},render(){return!1===this.isEdit?be("div",{class:[this.ns.b(),this.ns.e("info")]},[this.c.value]):be(ze("a-input"),Oe({value:this.val,"onUpdate:value":e=>this.val=e},this.model.props||{},{class:[this.ns.b(),this.ns.is("error",this.c.state.error)],prefix:this.model.prefix,suffix:this.model.suffix,addonBefore:this.model.addonBefore,addonAfter:this.model.addonAfter,placeholder:this.model.placeholder,"show-count":null!=this.model.max,maxlength:this.model.max,autocomplete:"off",onBlur:this.handleBlur}),null)}}),Jo=Po(pl.TEXT,()=>new Yo,Wo),Xo=class{constructor(){n(this,"component","gct-table-date")}},Qo=/* @__PURE__ */we({name:"GctTableDate",props:{c:{type:Object,required:!0},model:{type:Object,required:!0},value:{type:String,default:""},isEdit:{type:Boolean,default:!1}},emits:["update:value"],setup:()=>({ns:re("table-date"),val:Yl()}),render(){return!1===this.isEdit?be("div",{class:[this.ns.b(),this.ns.e("info")]},[this.c.value]):be(ze("a-date-picker"),Oe({picker:"date",value:this.val,"onUpdate:value":e=>this.val=e},this.model.props||{},{class:[this.ns.b(),this.ns.is("error",this.c.state.error)],placeholder:this.model.placeholder}),null)}}),Zo=Po(pl.DATE,()=>new Xo,Qo),ei={install(e){e.use(qo).use(Jo).use(Zo)}};function ti(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!Ee(e)}var li=/* @__PURE__ */we({name:"GctTable",props:{count:{type:Number,default:0},model:{type:Object,required:!0},data:{type:Array,default:()=>[]}},emits:["rowChange"],setup(e,{emit:t}){const l=re("gct-table"),a=Re({}),n=Re(),o=Re(),i=Re();let s=null,r=null;const u=$o(()=>new zo(e.model));u.evt.on("change",async(e,l,a,n)=>{t("rowChange",ot(e),l,a,n)}),!0===u.model.local&&Ze(()=>e.count,()=>{u.setData(ot(e.data))}),!0!==u.model.local&&!1!==u.model.autoLoad&&u.load();const c=e=>{if(!e||e===n.value)return null;return e.getAttribute("data-row-key")||c(e.parentElement)},d=e=>{const t=c(e.target);if(t){const e=u.row[t];s&&(s.state.hover=!1),e.state.hover=!0,s=e}},p=e=>{!c(e.target)&&s&&(s.state.hover=!1,s=null)},m=e=>{const t=c(e.target);if(t){const e=u.row[t];r&&r.unActive(),e.active(),r=e}else r&&(r.unActive(),r=null)},v=()=>{r&&(r.unActive(),r=null)};De(()=>{n.value&&(n.value.addEventListener("mouseover",d,{capture:!0}),n.value.addEventListener("mouseout",d,{capture:!0}),n.value.addEventListener("mouseleave",p,{capture:!0}),n.value.addEventListener("click",m,{capture:!0})),window.addEventListener("click",v,{capture:!0})}),Me(()=>{n.value&&(n.value.removeEventListener("mouseover",d,{capture:!0}),n.value.removeEventListener("mouseout",d,{capture:!0}),n.value.removeEventListener("mouseleave",p,{capture:!0}),n.value.removeEventListener("click",m,{capture:!0})),window.removeEventListener("click",v,{capture:!0})});const h=de(()=>{var t;if(ht(e.model.pagination))return!1;const l=nt(e.model.pagination);st(l,{pageSizeOptions:[10,20,30,40,50],showSizeChanger:!0,showTotal:!0});const a=!0===l.showTotal?e=>ne("sys.component.table.total",{total:e}):l.showTotal||void 0,n=null===(t=l.pageSizeOptions)||void 0===t?void 0:t.map(e=>`${e}`);return{class:"pagination-total-left",total:u.state.total,current:u.state.page,pageSize:u.state.size,pageSizeOptions:n,showSizeChanger:l.showSizeChanger,showTotal:a}}),{scrollHeight:f}=Vo(n,{pagination:!!h.value});return{ns:l,c:u,loadingState:a,elRef:n,formRef:o,tableRef:i,scrollHeight:f,pagination:h,isEdit:de(()=>u.model.columns.some(e=>"edit"===e.type)),handleTableChange:(e,t,l)=>{u.updatePagination({page:e.current,size:e.pageSize}),u.reload()},mouseOver:d,mouseOut:e=>{!c(e.target)&&s&&(s.state.hover=!1,s=null)},onValidate:(e,t,l)=>{const a=e.split("___");if(2===a.length){const[e,n]=a,o=u.row[n];if(o){const a=o.item[e];a&&(a.state.error=!t,l&&l.length>0?a.state.errMessage=l[0]:a.state.errMessage="")}}},validate:()=>o.value.validate(),reload:e=>u.load(e)}},render(){return be("div",{ref:"elRef",class:this.ns.b(),onMouseover:this.mouseOver,onMouseout:this.mouseOut},[be(ze("a-form"),{ref:"formRef",model:this.c.state.formData,onValidate:this.onValidate},{default:()=>[be(ze("a-table"),Oe({ref:"tableRef",class:["flex-1",this.ns.is("pagination",!!this.pagination),this.ns.is("not-edit",!this.isEdit)],scroll:{y:this.scrollHeight},columns:this.model.columns,"data-source":this.c.state.items,"row-key":e=>e[this.c.model.key],pagination:this.pagination,onChange:this.handleTableChange},this.$attrs),{headerCell:({title:e,column:t})=>{const l=t;if("edit"===l.type&&l.rules&&l.rules.length>0){const t=l.rules.some(e=>!0===e.required);return be("span",{title:e,class:[this.ns.e("table-header"),this.ns.is("required",t)]},[be("span",{class:this.ns.e("table-item")},[e])])}return e},bodyCell:({column:e,text:t,record:l})=>{t=null==t&&1==this.model.isEmptyText?_gct.store.getEmptyDisplay:dt(t)?t.toString():t;const a=e;if(a.customRender)return a.customRender({record:l});if("edit"===e.type){const t=l[this.c.model.key],a=this.c.row[t];if(a){let l;const n=this.c.editorProviders[e.name],o=ze(n.component),i=a.item[e.name],s=!0===a.state.hover||!0===i.state.error||!0===a.state.active||"all"===this.c.model.rowEditMode;return be(ze("a-form-item"),{name:`${e.name}___${t}`,class:[this.ns.b("table-item"),this.ns.bm("table-item","edit")],rules:i.model.rules||[]},ti(l=Ce(o,{key:i.model.name,c:i,model:i.model.editor,readonly:i.state.readonly,disabled:i.state.disabled,value:i.value,itemModel:i.model,data:a.data,keepalive:i.state.keepalive,visible:i.state.visible,isEdit:s,"onUpdate:value":e=>{i.value=e}}))?l:{default:()=>[l]})}}if("actions"===e.type){const t=e;return be("div",{class:this.ns.b("table-actions")},[t.actions.filter(e=>!e.hidden||!e.hidden(l)).map(e=>{if("divider"===e.mode)return be(ze("a-divider"),{type:"vertical"},null);const a=`${e.type}___${e.tag}___${l[this.c.model.key]}`,n=be(ze("a-button"),Oe({class:this.ns.b("table-action-item"),type:e.type,size:"small",loading:!0===this.loadingState[a],onClick:async n=>{if(!e.confirm)if(n.stopPropagation(),e.action)if(Il(e.action)||Ol(e.action)){this.loadingState[a]=!0;try{await e.action(l)}catch(o){console.log(o)}finally{this.loadingState[a]=!1}}else e.action(l);else t.action(e.tag,l)}},e.props),{default:()=>[e.text]});return e.confirm?be(ze("a-popconfirm"),Oe({onConfirm:async()=>{if(e.action)if(Il(e.action)||Ol(e.action)){this.loadingState[a]=!0;try{await e.action(l)}catch(n){console.log(n)}finally{this.loadingState[a]=!1}}else e.action(l);else t.action(e.tag,l)}},e.confirm),ti(n)?n:{default:()=>[n]}):n})])}return"link"===e.type?be("a",{class:this.ns.e("table-link"),onClick:e=>{e.stopPropagation(),a.click&&a.click(l)}},[t]):t}})]})])}}),ai={install(e){e.component(li.name,li)}},ni={install(e){e.use(ai)}},oi={install(e){e.use(ei),e.use(ni)}},ii=He(null),si=Re({visible:!1,defaultInput:"",tabActiveKey:""}),ri=Re({output:"",error:"",logs:[]});function ui(e){return Ze(()=>e,()=>{e&&Object.keys(e).forEach(t=>{si.value[t]=We(e[t])})},{immediate:!0}),Ze(()=>We(si).visible,async t=>{await Ie(),t&&!We(ii)&&(ii.value=(await x.loadMonaco()).editor.create(document.querySelector(".editor-console__input"),{value:null==e?void 0:e.defaultInput,language:"json",automaticLayout:!0,minimap:{enabled:!1}}))}),{editorConsoleState:si,consoleValueState:ri,toggleVisible:function(){si.value.visible=!We(si).visible},changeTabActiveKey:function(e){si.value.tabActiveKey=e}}}function ci(){const e=()=>{const e=We(ii);return e||console.warn("useEditorConsoleInner instance is undefined!"),e};function t(e,t){if(pt(e))return e;let l=ot(e);if("string"!=typeof e)try{l=decodeURIComponent(JSON.stringify(l))}catch(u){console.error(u),l=JSON.stringify(l)}else{try{l=decodeURIComponent(l)}catch(u){console.warn(u)}try{l=JSON.parse(l)}catch(c){console.warn(c)}l=JSON.stringify(l)}const{newline:a=!1,spaceAfterColon:n=!0}=t||{};let o=l,i=/([{}])/g;o=o.replace(i,"\r\n$1\r\n"),i=/([[\]])/g,o=o.replace(i,"\r\n$1\r\n"),i=/(,)/g,o=o.replace(i,"$1\r\n"),i=/(\r\n\r\n)/g,o=o.replace(i,"\r\n"),i=/\r\n,/g,o=o.replace(i,","),a||(i=/:\r\n\{/g,o=o.replace(i,":{"),i=/:\r\n\[/g,o=o.replace(i,":[")),n&&(i=/:/g,o=o.replace(i,": "));let s="",r=0;return o.split("\r\n").forEach(function(e){let t=0,l=0,a="";for(e.match(/\{$/)||e.match(/\[$/)?l=1:e.match(/\}/)||e.match(/\]/)?0!==r&&(r-=1):l=0,t=0;t<r;t++)a+=" ";s+=a+e+"\r\n",r+=l}),s}return{getInstance:e,showConsolePanel:function(){si.value.visible=!0},hideConsolePanel:function(){si.value.visible=!1},getInputValue:async function({showError:t=!0,ignoreError:l=!1}={}){var a;return(await x.loadMonaco()).editor.getModelMarkers({owner:"json"}).length>0&&(t&&_gct.message.error("参数语法错误"),!l)?Promise.reject():(null===(a=e())||void 0===a?void 0:a.getValue())??We(si).defaultInput},setConsoleResult:function(e){const{code:l,message:a,data:n}=e;if(200===l){const{logs:e,data:l}=n;ri.value.output=t(l),ri.value.logs=e,ri.value.error="",si.value.tabActiveKey="2"}else ri.value.output="",ri.value.logs=[],ri.value.error=a,si.value.tabActiveKey="3"},formatJson2Notes:t}}var di=xe(()=>import("./monaco-editor-5qU4ukgX.js")),pi=/* @__PURE__ */C(/* @__PURE__ */we({name:"ColorEditor",__name:"color-editor",props:{value:{}},emits:["update:value"],setup(e,{emit:t}){const l=t,a=(e,t)=>{l("update:value",t)};return(t,l)=>{const n=ze("color-picker");return Be(),me(n,{preset:We(ae),color:e.value,"onUpdate:color":a},{icon:tt(()=>[fe("div",{class:"color-picker-icon",style:Fe({backgroundColor:e.value})},null,4)]),_:1},8,["preset","color"])}}}),[["__scopeId","data-v-7b102f87"]]),mi={key:1,class:"component"},vi={class:"box"},hi={style:{borderRadius:"4px"}},fi={class:"color-picker-middle"},gi={style:{flex:"auto"}},yi={class:"color-picker-diamond"},bi={class:"color-picker-value"},xi={class:"hex"},wi=["value"],ki={class:"rgba-r"},Ci=["value"],_i={class:"rgba-g"},Si=["value"],Ei={class:"rgba-b"},Oi=["value"],Ii={class:"rgba-a"},Ti=["value"],Fi={class:"presetColor"},Li={class:"preset"},Di=["onClick"],Mi=/* @__PURE__ */we({name:"ColorPicker",__name:"ColorPicker",props:{color:{default:()=>"#FFFFFF00"},preset:{default:()=>["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},width:{default:240},useTrigger:{type:Boolean,default:!1},placement:{default:"bottomLeft"}},emits:["update:color"],setup(e,{emit:t}){const l=e,a=t,n=Re(),o=Re(),i=Re(),s=Re(""),r=Re("left: 0;"),u=Re("left: calc(100% - 6px);"),c=Re(0),d=Re(1),p=Re(1),m=Re(255),v=Re(0),h=Re(0),f=Re(1);Ze(()=>l.color,()=>{const{r:e,g:t,b:a,a:n}=A(l.color||"#FFFFFF00");m.value=e,v.value=t,h.value=a,f.value=n});const{r:g,g:y,b:b,a:x}=A(l.color||"#FFFFFF00");m.value=g,v.value=y,h.value=b,f.value=x,De(()=>{const{h:e,s:t,v:l}=N(m.value,v.value,h.value);c.value=e,d.value=t,p.value=l,s.value=`top: ${100-100*l}%;left: ${100*t}%;`,r.value=`left: ${c.value/360*100}%;`,u.value=`left: ${f.value>=1?"calc(100% - 6px)":100*f.value+"%"};`});const w=de(()=>{const e=m.value,t=v.value,l=h.value,a=f.value,n=c.value,o=d.value,i=p.value;return{rgb:`rgba(${e},${t},${l})`,rgba:`rgba(${e},${t},${l},${a})`,hex6:P(e,t,l),hex8:P(e,t,l,a),hsv:`hsv(${n},${o},${i})`,hsl:""}});function k(e){const t=e.target.value;if(/^#?([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t)){let{r:e,g:l,b:a,a:n}=U(t);m.value=e,v.value=l,h.value=a,f.value=n}}function C(e){const t=e.target.value;if(""!==t){const e=parseInt(t);e>255&&(m.value=255),e<0&&(m.value=0),e>=0&&e<=255&&(m.value=e)}}function _(e){const t=e.target.value;if(""!==t){const e=parseInt(t);e>255&&(v.value=255),e<0&&(v.value=0),e>=0&&e<=255&&(v.value=e)}}function S(e){const t=e.target.value;if(""!==t){const e=parseInt(t);e>255&&(h.value=255),e<0&&(h.value=0),e>=0&&e<=255&&(h.value=e)}}function E(e){const t=e.target.value;if(""!==t){const e=parseFloat(t);f.value=e,e>1&&(f.value=1),e<0&&(f.value=0),e>=0&&e<=1&&(f.value=e)}}function O(e){if(!n.value)return;const t=n.value.clientWidth,l=n.value.clientHeight;let a=e.pageX-n.value.getBoundingClientRect().left,o=e.pageY-n.value.getBoundingClientRect().top;a=a<t&&a>0?a:a>t?t:0,o=o<l&&o>0?o:o>l?l:0,d.value=Math.floor(a/t*100+.5)/100,p.value=Math.floor(100*(1-o/l)+.5)/100;const{r:i,g:r,b:u}=R(c.value,d.value,p.value);m.value=i,v.value=r,h.value=u,s.value=`top: ${o}px;left: ${a}px;`}function I(e){O(e),window.addEventListener("mousemove",O),window.addEventListener("mouseup",T),u.value="left: calc(100% - 6px);",f.value=1}function T(){window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",T)}function F(e){let t=o.value.clientWidth,l=e.pageX-n.value.getBoundingClientRect().left;l=l<t&&l>0?l:l>t?t:0,c.value=Math.floor(l/t*360+.5);let{r:a,g:i,b:s}=R(c.value,d.value,p.value);m.value=a,v.value=i,h.value=s,r.value=`left: ${l>=t-6?t-6:l}px;`}function L(e){F(e),window.addEventListener("mousemove",F),window.addEventListener("mouseup",D)}function D(){window.removeEventListener("mousemove",F),window.removeEventListener("mouseup",D)}function M(e){let t=i.value.clientWidth,l=e.pageX-n.value.getBoundingClientRect().left;l=l<t&&l>0?l:l>t?t:0,f.value=Math.floor(l/t*100+.5)/100,u.value=`left: ${l>=t-6?t-6:l}px;`}function B(e){M(e),window.addEventListener("mousemove",M),window.addEventListener("mouseup",j)}function j(){window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",j)}function A(e){if(e){let t,l,a,n;return"string"==typeof e?/^#?([0-9a-fA-F]{6}|[0-9a-fA-F]{8}|[0-9a-fA-F]{3}|[0-9a-fA-F]{4})$/.test(e)?U(e):function(e){const t=e.match(/^rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(?:,\s*([\d.]+))?\)$/);if(t){const e=t[4]?parseFloat(t[4]):1;return{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10),a:e}}throw new Error("Invalid RGBA string")}(e):(t=e.r>255?255:e.r<0?0:e.r,l=e.g>255?255:e.g<0?0:e.g,a=e.b>255?255:e.b<0?0:e.b,n=e.a>1?1:e.a<0?0:e.a,{r:t,g:l,b:a,a:n})}return{r:0,g:0,b:0,a:1}}function R(e,t,l){360===e&&(e=0);let a=Math.floor(e/60)%6,n=e/60-a,o=l*(1-t),i=l*(1-t*n),s=l*(1-t*(1-n)),r=0,u=0,c=0;return 0===a?(r=l,u=s,c=o):1===a?(r=i,u=l,c=o):2===a?(r=o,u=l,c=s):3===a?(r=o,u=i,c=l):4===a?(r=s,u=o,c=l):5===a&&(r=l,u=o,c=i),r=Math.floor(255*r+.5),u=Math.floor(255*u+.5),c=Math.floor(255*c+.5),{r:r,g:u,b:c}}function N(e,t,l){let a,n,o=e/255,i=t/255,s=l/255,r=Math.max(o,i,s),u=r-Math.min(o,i,s),c=0;return 0===u?c=0:r===o?c=(60*(i-s)/u+360)%360:r===i?c=60*((s-o)/u+2):r===s&&(c=60*((o-i)/u+4)),a=0===r?0:u/r,n=r,c=Math.floor(c+.5),a=Math.floor(100*a+.5)/100,n=Math.floor(100*n+.5)/100,{h:c,s:a,v:n}}function P(e,t,l,a=1){let n=2!==(e=parseInt(e)).toString(16).length?"0"+e.toString(16):e.toString(16),o=2!==(t=parseInt(t)).toString(16).length?"0"+t.toString(16):t.toString(16),i=2!==(l=parseInt(l)).toString(16).length?"0"+l.toString(16):l.toString(16),s="";if(1!==(a=parseFloat(a))){let e=Math.floor(256*a);s=2!==e.toString(16).length?"0"+e.toString(16):e.toString(16)}return`#${n}${o}${i}${s}`.toUpperCase()}function U(e){if(/^#?[0-9a-fA-F]{3}$/.test(e)){let t=e.substring(e.length-1,e.length),l=e.substring(e.length-2,e.length-1),a=e.substring(e.length-3,e.length-2);return U(`${a+a}${l+l}${t+t}`)}if(/^#?[0-9a-fA-F]{4}$/.test(e)){let t=e.substring(e.length-1,e.length),l=e.substring(e.length-2,e.length-1),a=e.substring(e.length-3,e.length-2),n=e.substring(e.length-4,e.length-3);return U(`${n+n}${a+a}${l+l}${t+t}`)}if(/^#?[0-9a-fA-F]{6}$/.test(e)){let t=parseInt("0x"+e.substring(e.length-2,e.length)),l=parseInt("0x"+e.substring(e.length-4,e.length-2));return{r:parseInt("0x"+e.substring(e.length-6,e.length-4)),g:l,b:t,a:1}}if(/^#?[0-9a-fA-F]{8}$/.test(e)){let t=parseInt("0x"+e.substring(e.length-2,e.length));t/=255;let l=parseInt("0x"+e.substring(e.length-4,e.length-2)),a=parseInt("0x"+e.substring(e.length-6,e.length-4));return{r:parseInt("0x"+e.substring(e.length-8,e.length-6)),g:a,b:l,a:t}}}return Ze(()=>w.value.hex8,()=>{a("update:color",{r:m.value,g:v.value,b:h.value,a:f.value},w.value.hex8);const{h:e,s:t,v:l}=N(m.value,v.value,h.value);c.value=e,d.value=t,p.value=l,s.value=`top: ${100-100*l}%;left: ${100*t}%;`,r.value=`left: ${c.value/360*100}%;`}),(t,l)=>{const a=ze("a-popover");return Be(),me(a,{placement:e.placement,trigger:"click","overlay-class-name":"color-picker__popover"},{content:tt(()=>[fe("div",{class:"color-picker",style:Fe({"--w":e.width+"px"})},[fe("div",{ref_key:"saturationRef",ref:n,class:"color-picker-saturation",onMousedown:I},[fe("div",{style:Fe(`background-color: hsl(${c.value}, 100%, 50%);`)},[fe("div",{class:"point",style:Fe(s.value)},null,4)],4),l[0]||(l[0]=fe("div",{class:"color-picker-saturation-t"},null,-1)),l[1]||(l[1]=fe("div",{class:"color-picker-saturation-h"},null,-1))],544),fe("div",fi,[fe("div",gi,[fe("div",{ref_key:"hueSliderRef",ref:o,class:"hue-slider",onMousedown:L},[fe("div",{class:"slider",style:Fe(r.value)},null,4)],544),fe("div",{ref_key:"alphaSliderRef",ref:i,class:"alpha-slider",onMousedown:B},[fe("div",{class:"slider",style:Fe(u.value)},null,4),fe("div",{style:Fe(`background: linear-gradient(to right, rgba(0,0,0,0), ${w.value.rgb});width: 100%;height: 100%`)},null,4)],544)]),fe("div",yi,[fe("div",{style:Fe(`background-color: ${w.value.rgba};width: 100%;height: 100%;box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), inset 0 0 4px rgba(0, 0, 0, .25);`)},null,4)])]),fe("div",bi,[fe("div",xi,[fe("label",null,[fe("input",{value:w.value.hex8,spellcheck:"false",onInput:k},null,40,wi)]),l[2]||(l[2]=fe("p",null,"Hex",-1))]),fe("div",ki,[fe("label",null,[fe("input",{value:m.value,onInput:C},null,40,Ci)]),l[3]||(l[3]=fe("p",null,"R",-1))]),fe("div",_i,[fe("label",null,[fe("input",{value:v.value,onInput:_},null,40,Si)]),l[4]||(l[4]=fe("p",null,"G",-1))]),fe("div",Ei,[fe("label",null,[fe("input",{value:h.value,onInput:S},null,40,Oi)]),l[5]||(l[5]=fe("p",null,"B",-1))]),fe("div",Ii,[fe("label",null,[fe("input",{value:f.value,onInput:E},null,40,Ti)]),l[6]||(l[6]=fe("p",null,"A",-1))])]),fe("div",Fi,[l[7]||(l[7]=fe("div",{class:"title"},"推荐颜色",-1)),fe("ul",Li,[(Be(!0),he(ce,null,Pe(e.preset,e=>(Be(),he("li",{key:e,style:Fe(`background-color: ${e}`),onClick:t=>function(e){if(/^#?([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e)){let{r:t,g:l,b:a,a:n}=U(e);m.value=t,v.value=l,h.value=a,f.value=n,u.value="left: calc(100% - 6px);",f.value=1}}(e)},null,12,Di))),128))])])],4)]),default:tt(()=>[e.useTrigger?Ue(t.$slots,"trigger",{key:0},void 0,!0):(Be(),he("div",mi,[fe("div",vi,[fe("div",hi,[Ue(t.$slots,"icon",{},void 0,!0)])])]))]),_:3},8,["placement"])}}}),Bi=/* @__PURE__ */C(Mi,[["__scopeId","data-v-7bfd9ca3"]]),ji={FIRST:"first",BEFORE:"before",AFTER:"after",LAST:"last"},Ai=/* @__PURE__ */we({name:"GctDndItem",props:{config:{type:Object,required:!0},index:{type:Number,required:!0},data:{type:Object,required:!0},last:{type:Boolean,default:!1}},emits:["drop"],setup(e,{emit:t}){const{config:l}=e,a=re("dnd-item"),n=Re(null),o=Re(!1),i=_e("vue3-dnd-drop-line-state"),s=Re(-1),[r,u,c]=p({type:l.group,item:()=>({index:e.index,id:e.data.id,data:e.data,group:l.group,mode:l.mode??"move",tagMap:l.tagMap??{},types:[]}),collect:e=>({canDrag:e.canDrag(),isDragging:e.isDragging()}),canDrag:()=>!1!==l.isDrag&&(!l.canDrag||l.canDrag(e.data)),end:async(e,t)=>{const a=t.getDropResult();if(a&&a.asyncDrop){const t=await a.asyncDrop();!0===t.success&&t.data&&(l.end&&l.end(e,t),l.add&&l.add(t.data),console.debug("drop success"))}}});if(!0!==e.config.isDrop){const[e,t]=d({accept:l.group,canDrop:()=>!1});t(n)}else{const[t,a]=d({accept:l.group,collect:e=>({handlerId:e.getHandlerId(),isOver:e.isOver(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0})}),canDrop:(t,l)=>!0!==r.value.isDragging&&t.id!==e.data.id&&l.isOver({shallow:!0}),hover(t,a){if(!1!==a.canDrop())if(a.isOver({shallow:!0})){const t=n.value.getBoundingClientRect(),s=a.getClientOffset(),r=l.offset??0;let u=0;if("vertical"===l.direction){const{top:e,height:l}=t,{y:a}=s;if(u=a-e-l/2,Math.abs(u)<r)return;o.value=u<0}else if("horizontal"===l.direction){const{left:e,width:l}=t,{x:a}=s;if(u=a-e-l/2,Math.abs(u)<r)return;o.value=u<0}i.activeKey=e.data.id,i.isBeforeHover=o.value}else i.activeKey=""},drop:(a,n)=>{if(i.activeKey="",!0===t.value.isShallowOver&&!1!==n.canDrop())return{asyncDrop:async()=>{let t=a.data;return l.drop&&(t=await l.drop(a),!t)?{group:l.group,cfg:ot(e.config),success:!1}:(m(o.value?ji.BEFORE:ji.AFTER,t),{group:l.group,success:!0,cfg:ot(e.config),data:t})}}}});a(n)}function m(e,l){t("drop",e,l)}return l.handle||!1===l.isDrag||u(n),c(n),{ns:a,rootRef:n,posState:s,collect:r,onDrop:m,drag:u}},render(){var e,t;const l={index:this.index,data:this.data,drag:this.drag};return be("div",{ref:"rootRef",class:[this.ns.b(),this.ns.is("dragging",this.collect.isDragging),this.ns.is("not-drag",!1===this.collect.canDrag)]},[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t,l)])}}),Ri=/* @__PURE__ */we({name:"GctDndDropLine",props:{config:{type:Object,required:!0},active:{type:Boolean,default:!1}},emits:["drop"],setup(e,{emit:t}){const{config:l}=e,a=re("dnd-drop-line"),n=Re(null),[o,i]=d({accept:e.config.group,collect:e=>({handlerId:e.getHandlerId(),isOver:e.isOver(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0})}),canDrop:e=>!1!==l.isDrop&&(!l.canDrop||l.canDrop(e)),drop:(a,n)=>{if(!0===o.value.isShallowOver&&!1!==n.canDrop())return{asyncDrop:async()=>{let n=a.data;return l.drop&&(n=await l.drop(a),!n)?{group:l.group,cfg:ot(e.config),success:!1}:(t("drop",n),{group:l.group,success:!0,cfg:ot(e.config),data:n})}}}});return!1!==l.isDrop&&i(n),{ns:a,rootRef:n,collect:o}},render(){return be("div",{ref:"rootRef",class:[this.collect.handlerId,this.ns.b(),this.ns.is("over",this.collect.isOver&&this.collect.canDrop),this.ns.is("shallow-over",this.collect.isShallowOver&&this.collect.canDrop),this.ns.is("not-drop",!1===this.collect.canDrop&&this.collect.isShallowOver),this.ns.is("active",this.active)]},[be("div",{class:this.ns.e("line")},null)])}}),Ni=/* @__PURE__ */we({name:"GctDndContainer",props:{config:{type:Object,default:()=>({group:"GctDnd",insertPos:ji.LAST})},items:{type:Array,default:()=>[]}},emits:["update:items"],setup(e,{emit:t}){const{config:l}=e,a=re("dnd-container"),n=Re(null),o=Ae({activeKey:"",isBeforeHover:!1});je("vue3-dnd-drop-line-state",o);const i=qe(e.items),[s,r]=d({accept:l.group,collect:e=>({handlerId:e.getHandlerId(),isOver:e.isOver(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0})}),canDrop:e=>!1!==l.isDrop&&(!l.canDrop||l.canDrop(e)),drop:(a,n)=>{if(!0===s.value.isShallowOver&&!1!==n.canDrop())return{asyncDrop:async()=>{let n=a.data;return l.drop&&(n=await l.drop(a),!n)?{group:l.group,success:!1,cfg:ot(e.config)}:(-1===i.value.findIndex(e=>e.id===a.data.id)&&u(e.config.insertPos,n),t("update:items",i.value),{group:l.group,success:!0,cfg:ot(e.config),data:n})}}}});function u(e,l,a=-1){if(l){if(e===ji.FIRST)i.value.unshift(l);else if(e===ji.LAST)i.value.push(l);else{if(-1===a)return void console.error("insertIndex is required");const t=i.value.findIndex(e=>e.id===l.id);if(t===a)return;-1!==t&&a<t&&i.value.splice(t,1),e===ji.AFTER?i.value.splice(a+1,0,l):i.value.splice(a,0,l),-1!==t&&a>t&&i.value.splice(t,1)}t("update:items",i.value)}else console.error("data is required")}return!1!==l.isDrop&&r(n),Ze(s,()=>{!0!==s.value.isOver&&(o.activeKey="")}),{ns:a,rootRef:n,dropLineState:o,collect:s,onDrop:u}},render(){var e,t,l,a;const n=this.items[this.items.length-1];return be("div",{ref:"rootRef",class:[this.collect.handlerId,this.ns.b(),this.ns.is("over",this.collect.isOver&&this.collect.canDrop),this.ns.is("not-drop",!1===this.collect.canDrop&&this.collect.isOver),this.ns.is("shallow-over",this.collect.isShallowOver&&this.collect.canDrop)]},[null===(e=(t=this.$slots).before)||void 0===e?void 0:e.call(t),this.items.map((e,t)=>{const l=this.items[t-1],a=[];return!1!==this.config.isDrop&&a.push(be(Ri,{key:e.id+"___line",config:this.config,active:!0===this.dropLineState.isBeforeHover&&this.dropLineState.activeKey===e.id||l&&this.dropLineState.activeKey===l.id&&!1===this.dropLineState.isBeforeHover,onDrop:e=>this.onDrop(ji.BEFORE,e,t)},null)),a.push(be(Ai,{key:e.id,config:this.config,index:t,data:e,last:t===this.items.length-1,onDrop:(e,l)=>this.onDrop(e,l,t)},{default:this.$slots.default})),a}),n?be(Ri,{key:n.id+"___last-line",config:this.config,active:this.dropLineState.activeKey===n.id&&!1===this.dropLineState.isBeforeHover,onDrop:e=>this.onDrop(ji.AFTER,e,this.items.length-1)},null):null,null===(l=(a=this.$slots).after)||void 0===l?void 0:l.call(a)])}}),Pi={visible:{type:Boolean},scrollTop:{type:Boolean,default:!0},height:{type:Number},outHeight:{type:Number},minHeight:{type:Number},draggable:{type:Boolean,default:!0},centered:{type:Boolean},cancelText:{type:String,default:"sys.cancelText"},okText:{type:String,default:"sys.okText"},closeFunc:Function},Ui=Object.assign({},Pi,{defaultFullscreen:{type:Boolean},canFullscreen:{type:Boolean,default:!0},wrapperFooterOffset:{type:Number,default:0},helpMessage:[String,Array],useWrapper:{type:Boolean,default:!0},loading:{type:Boolean},loadingTip:{type:String},showCancelBtn:{type:Boolean,default:!0},showOkBtn:{type:Boolean,default:!0},wrapperProps:Object,afterClose:Function,bodyStyle:Object,closable:{type:Boolean,default:!0},closeIcon:Object,confirmLoading:{type:Boolean},destroyOnClose:{type:Boolean},footer:Object,getContainer:Function,mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!1},keyboard:{type:Boolean,default:!0},maskStyle:Object,okType:{type:String,default:"primary"},okButtonProps:Object,cancelButtonProps:Object,title:{type:String},visible:{type:Boolean},width:[String,Number],wrapClassName:{type:String},zIndex:{type:Number}});function zi(e){const t=(e,t)=>getComputedStyle(e)[t],l=l=>{if(!l)return;l.setAttribute("data-drag",We(e.draggable));const a=l.querySelector(".ant-modal-header"),n=l.querySelector(".ant-modal");a&&n&&We(e.draggable)&&(a.style.cursor="move",a.onmousedown=e=>{if(!e)return;const l=e.clientX,a=e.clientY,o=document.body.clientWidth,i=document.documentElement.clientHeight,s=n.offsetWidth,r=n.offsetHeight,u=n.offsetLeft,c=o-n.offsetLeft-s,d=n.offsetTop,p=i-n.offsetTop-r,m=t(n,"left"),v=t(n,"top");let h=+m,f=+v;m.includes("%")?(h=+document.body.clientWidth*(+m.replace(/%/g,"")/100),f=+document.body.clientHeight*(+v.replace(/%/g,"")/100)):(h=+m.replace(/px/g,""),f=+v.replace(/px/g,"")),document.onmousemove=function(e){let t=e.clientX-l,o=e.clientY-a;-t>u?t=-u:t>c&&(t=c),-o>d?o=-d:o>p&&(o=p),n.style.cssText+=`;left:${t+h}px;top:${o+f}px;`},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}})};et(()=>{We(e.visible)&&We(e.draggable)&&a(()=>{(()=>{const a=document.querySelectorAll(".ant-modal-wrap");for(const n of Array.from(a)){if(!n)continue;const a=t(n,"display"),o=n.getAttribute("data-drag");"none"!==a&&(null===o||We(e.destroyOnClose))&&l(n)}})()},30)})}var $i=/* @__PURE__ */we({name:"GlobalModal",inheritAttrs:!1,props:Ui,emits:["cancel"],setup(e,{slots:t,emit:l,attrs:a}){const{visible:n,draggable:o,destroyOnClose:i}=Ye(e);zi({visible:n,destroyOnClose:i,draggable:o});const s=e=>{l("cancel",e)};return()=>Ce(Ot,{...a,...e,onCancel:s},t)}}),Vi=Symbol();function Hi(){return _e(Vi)}var Ki={loading:{type:Boolean},useWrapper:{type:Boolean,default:!0},modalHeaderHeight:{type:Number,default:57},modalFooterHeight:{type:Number,default:74},minHeight:{type:Number,default:320},height:{type:Number},footerOffset:{type:Number,default:0},visible:{type:Boolean},fullScreen:{type:Boolean},loadingTip:{type:String}},Gi=we({name:"ModalWrapper",inheritAttrs:!1,props:Ki,emits:["height-change","ext-height"],setup(e,{emit:l}){const a=Re(),n=Re(null),o=Re(0),i=Re(0),s=re("basic-modal-wrapper");let r=0;const u=Re(),{width:c,height:d}=t();Ze([d,c],()=>{m()}),O(n,()=>{m()},{attributes:!0,subtree:!0}),je(Vi,{redoModalHeight:m});const p=de(()=>{const t=.88*window.innerHeight-120;return{height:`${e.height?t>e.height-120?e.height-120:t:e.height}px`}});async function m(){var t;if(!e.visible)return;if(!a.value)return;const i=null===(t=a.value)||void 0===t||null===(t=t.getElement())||void 0===t?void 0:t.parentElement;if(i){i.style.padding="0",await Ie();try{const t=i.parentElement&&i.parentElement.parentElement;if(!t)return;const a=getComputedStyle(t).top,s=Number.parseInt(a);let u=window.innerHeight-2*s+(e.footerOffset||0)-e.modalFooterHeight-e.modalHeaderHeight;s<40&&(u-=26),await Ie();const c=We(n);if(!c)return;await Ie(),r=c.scrollHeight,e.fullScreen?o.value=window.innerHeight-e.modalFooterHeight-e.modalHeaderHeight-28:o.value=e.height?e.height:r>u?u:r,l("height-change",We(o))}catch(s){console.error(s)}}}return et(()=>{e.useWrapper&&m()}),Ze(()=>e.fullScreen,e=>{m(),e?i.value=o.value:o.value=i.value}),new ResizeObserver(t=>{for(let l of t){const t=.88*l.contentRect.height-152;u.value={height:`${e.height?t>e.height-152?e.height-152:t:e.height}px`,minHeight:e.minHeight-152+"px",[e.fullScreen?"height":"maxHeight"]:`${We(o)}px`,maxHeight:"calc(88vh - 152px)"}}}).observe(document.documentElement),De(()=>{const{modalHeaderHeight:t,modalFooterHeight:a}=e;l("ext-height",t+a)}),Me(()=>{}),{ns:s,wrapperRef:a,spinRef:n,spinStyle:u,scrollTop:async function(){Ie(()=>{var e;a.value&&(null===(e=a.value.getElement())||void 0===e||e.scrollTo(0,0))})},setModalHeight:m,scrollHeight:p}}}),qi=["loading-tip"],Yi=/* @__PURE__ */C(Gi,[["render",function(e,t,l,a,n,o){const i=ze("overlayScrollbarsComponent"),s=$e("target-loading");return Be(),me(i,{ref:"wrapperRef",class:Te(e.ns.b("scrollbar"))},{default:tt(()=>[lt((Be(),he("div",{ref:"spinRef",style:Fe(e.spinStyle),"loading-tip":e.loadingTip,class:Te(e.ns.b())},[Ue(e.$slots,"default")],14,qi)),[[s,e.loading]])]),_:3},8,["class"])}]]),Wi=/* @__PURE__ */we({__name:"ModalClose",props:{canFullscreen:{type:Boolean,default:!0},fullScreen:{type:Boolean}},emits:["cancel","fullscreen"],setup(e,{emit:t}){const l=e,a=t,n=re("basic-modal-close"),o=de(()=>[n.b(),`${n.b()}--custom`,{[`${n.b()}--can-full`]:l.canFullscreen}]);function i(e){a("cancel",e)}function s(e){null==e||e.stopPropagation(),null==e||e.preventDefault(),a("fullscreen")}return(t,l)=>(Be(),he("div",{class:Te(o.value)},[e.canFullscreen?(Be(),he(ce,{key:0},[e.fullScreen?(Be(),me(We(Mt),{key:0,title:We(ne)("sys.component.modal.restore"),placement:"bottom"},{default:tt(()=>[be(We(Qt),{role:"full",onClick:s})]),_:1},8,["title"])):(Be(),me(We(Mt),{key:1,title:We(ne)("sys.component.modal.maximize"),placement:"bottom"},{default:tt(()=>[be(We(Zt),{role:"close",onClick:s})]),_:1},8,["title"]))],64)):ve("",!0),be(We(Mt),{title:We(ne)("sys.component.modal.close"),placement:"bottom"},{default:tt(()=>[be(We(Yt),{onClick:i})]),_:1},8,["title"])],2))}}),Ji=Wi,Xi=/* @__PURE__ */we({__name:"ModalFooter",props:Ui,emits:["ok","cancel"],setup(e,{emit:t}){const l=t;function a(e){l("ok",e)}function n(e){l("cancel",e)}return(e,t)=>(Be(),he("div",null,[Ue(e.$slots,"insertFooter"),e.showCancelBtn?(Be(),me(We(bt),Oe({key:0},e.cancelButtonProps,{onClick:n}),{default:tt(()=>[ye(Ke(We(ne)(e.cancelText)),1)]),_:1},16)):ve("",!0),Ue(e.$slots,"centerFooter"),e.showOkBtn?(Be(),me(We(bt),Oe({key:1,type:e.okType,loading:e.confirmLoading},e.okButtonProps,{onClick:a}),{default:tt(()=>[ye(Ke(We(ne)(e.okText)),1)]),_:1},16,["type","loading"])):ve("",!0),Ue(e.$slots,"appendFooter")]))}}),Qi=we({name:"BasicModalHeader",props:{helpMessage:{type:[String,Array]},title:{type:String}}}),Zi=["help-message"],es=/* @__PURE__ */C(Qi,[["render",function(e,t,l,a,n,o){return Be(),he("div",{"help-message":e.helpMessage},Ke(e.title),9,Zi)}]]),ts=/* @__PURE__ */we({name:"BasicModal",__name:"BasicModal",props:Ui,emits:["visible-change","height-change","cancel","ok","register","update:visible"],setup(e,{emit:t}){const l=Je(),a=e,n=t,o=Re(!1),i=Re(null),s=Re(null),r=re("basic-modal"),u=Re(0),c={setModalProps:function(e){i.value=Q(We(i)||{},e),Reflect.has(e,"visible")&&(o.value=!!e.visible),Reflect.has(e,"defaultFullscreen")&&(h.value=!!e.defaultFullscreen)},emitVisible:void 0,redoModalHeight:()=>{Ie(()=>{We(s)&&We(s).setModalHeight()})}},d=ke();d&&n("register",c,d.uid);const p=de(()=>({...a,height:a.outHeight?a.outHeight:a.height&&a.height+120,...We(i)})),{handleFullScreen:m,getWrapClassName:v,fullScreenRef:h}=function(e){const t=Re(!1);return{getWrapClassName:de(()=>{const l=We(e.wrapClassName)||"";return We(t)?`fullscreen-modal ${l} `:We(l)}),handleFullScreen:function(e){null==e||e.stopPropagation(),t.value=!We(t)},fullScreenRef:t}}({modalWrapperRef:s,extHeightRef:u,wrapClassName:Re(`vben ${qe(p.value,"wrapClassName")}`)}),f=de(()=>({...We(p),visible:We(o),okButtonProps:void 0,cancelButtonProps:void 0,title:void 0,wrapClassName:We(v)})),g=de(()=>{const e={...l,...We(p),visible:We(o)};return e.wrapClassName=`${(null==e?void 0:e.wrapClassName)||""} ${We(v)}`,We(h)?gt(e,["height","title"]):gt(e,"title")}),y=de(()=>{if(!We(h))return We(f).height});async function b(e){var t;null==e||e.stopPropagation(),(null===(t=e.target)||void 0===t||null===(t=t.classList)||void 0===t?void 0:t.contains(r.b()+"-close--custom"))||(a.closeFunc&&vt(a.closeFunc)?o.value=!(await a.closeFunc()):(o.value=!1,n("cancel",e)))}function x(e){n("ok",e)}function w(e){n("height-change",e)}function k(e){u.value=e}function C(e){a.canFullscreen&&(e.stopPropagation(),m(e))}return et(()=>{o.value=!!a.visible,h.value=!!a.defaultFullscreen}),Ze(()=>We(o),e=>{var t;n("visible-change",e),n("update:visible",e),d&&(null===(t=c.emitVisible)||void 0===t||t.call(c,e,d.uid)),Ie(()=>{a.scrollTop&&e&&We(s)&&We(s).scrollTop()}),a.destroyOnClose&&!1===e&&(h.value=a.defaultFullscreen)},{immediate:!1}),(e,t)=>(Be(),me(We($i),Oe(g.value,{onCancel:b}),ge({default:tt(()=>[e.$slots.closeIcon?Ue(e.$slots,"closeIcon",{key:0}):ve("",!0),e.$slots.title?Ue(e.$slots,"title",{key:1}):ve("",!0),e.$slots.footer?Ue(e.$slots,"footer",{key:2}):ve("",!0),be(Yi,Oe({ref_key:"modalWrapperRef",ref:s,"use-wrapper":f.value.useWrapper,"footer-offset":e.wrapperFooterOffset,"full-screen":We(h),loading:f.value.loading,"loading-tip":f.value.loadingTip,"min-height":f.value.minHeight,height:y.value,visible:o.value,"modal-footer-height":void 0===e.footer||e.footer?void 0:0},We(gt)(f.value.wrapperProps,"visible","height","modalFooterHeight"),{onExtHeight:k,onHeightChange:w}),{default:tt(()=>[Ue(e.$slots,"default")]),_:3},16,["use-wrapper","footer-offset","full-screen","loading","loading-tip","min-height","height","visible","modal-footer-height"])]),_:2},[e.$slots.closeIcon?void 0:{name:"closeIcon",fn:tt(()=>[be(Ji,{"can-fullscreen":f.value.canFullscreen,"full-screen":We(h),onCancel:b,onFullscreen:We(m)},null,8,["can-fullscreen","full-screen","onFullscreen"])]),key:"0"},e.$slots.title?void 0:{name:"title",fn:tt(()=>[be(es,{"help-message":f.value.helpMessage,title:p.value.title,onDblclick:C},null,8,["help-message","title"])]),key:"1"},e.$slots.footer?void 0:{name:"footer",fn:tt(()=>[be(Xi,Oe(g.value,{onOk:x,onCancel:b}),null,16)]),key:"2"}]),1040))}}),ls=ts,as=Ae({}),ns=Ae({});function os(){const e=Re(null),t=Re(!1),l=Re(""),a=()=>{const t=We(e);if(!t)throw new Error("useModal instance is undefined!");return t};return[function(a,n){if(!ke())throw new Error("useModal() can only be used inside setup() or functional components!");l.value=n||"",Me(()=>{e.value=null,t.value=!1,as[We(l)]=null}),We(t)&&a===We(e)||(e.value=a,t.value=!0,a.emitVisible=(e,t)=>{ns[t]=e})},{setModalProps:e=>{var t;null===(t=a())||void 0===t||t.setModalProps(e)},getVisible:de(()=>ns[~~We(l)]),redoModalHeight:()=>{var e,t;null===(e=a())||void 0===e||null===(t=e.redoModalHeight)||void 0===t||t.call(e)},openModal:(e=!0,t,n=!0)=>{var o;null===(o=a())||void 0===o||o.setModalProps({visible:e});const i=We(l);if(n)return as[i]=null,void(as[i]=Ge(t));mt(Ge(as[i]),Ge(t))||(as[i]=Ge(t))},closeModal:()=>{var e;null===(e=a())||void 0===e||e.setModalProps({visible:!1})}}]}var is=e=>{const t=Re(null),l=ke(),a=Re(""),n=()=>{const e=We(t);if(!e)throw new Error("useModalInner instance is undefined!");return e};return et(()=>{const t=as[We(a)];e&&vt(e)&&Ie(()=>{e(t)})}),[(e,n)=>{E(()=>{t.value=null}),a.value=n||"",t.value=e,null==l||l.emit("register",e,n)},{changeLoading:(e=!0)=>{var t;null===(t=n())||void 0===t||t.setModalProps({loading:e})},getVisible:de(()=>ns[~~We(a)]),changeOkLoading:(e=!0)=>{var t;null===(t=n())||void 0===t||t.setModalProps({confirmLoading:e})},closeModal:()=>{var e;null===(e=n())||void 0===e||e.setModalProps({visible:!1})},setModalProps:e=>{var t;null===(t=n())||void 0===t||t.setModalProps(e)},redoModalHeight:()=>{var e;const t=null===(e=n())||void 0===e?void 0:e.redoModalHeight;null==t||t()}}]},ss=r(ls),rs={aspectRatio:1,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,autoCrop:!0,background:!0,highlight:!0,center:!0,responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,scalable:!0,modal:!0,guides:!0,movable:!0,rotatable:!0},us={src:{type:String,required:!0},alt:{type:String},circled:{type:Boolean,default:!1},realTimePreview:{type:Boolean,default:!0},height:{type:[String,Number],default:"360px"},width:{type:[String,Number],default:"360px"},crossorigin:{type:String,default:void 0},imageStyle:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})}},cs=we({name:"CropperImage",props:us,emits:["cropend","ready","cropendError"],setup(t,{attrs:l,emit:a}){const n=Re(),o=Re(),s=Re(!1),r=re("cropper-image"),u=i(m,80),c=de(()=>({height:t.height,width:t.width,maxWidth:"100%",...t.imageStyle})),d=de(()=>[r.b(),l.class,{[r.m("circled")]:t.circled}]),p=de(()=>({height:`${t.height}`.replace(/px/,"")+"px",width:`${t.width}`.replace(/px/,"")+"px"}));function m(){t.realTimePreview&&v()}function v(){if(!o.value)return;let e=o.value.getData();(t.circled?function(){const e=o.value.getCroppedCanvas(),t=document.createElement("canvas"),l=t.getContext("2d"),a=e.width,n=e.height;return t.width=a,t.height=n,l.imageSmoothingEnabled=!0,l.drawImage(e,0,0,a,n),l.globalCompositeOperation="destination-in",l.beginPath(),l.arc(a/2,n/2,Math.min(a,n)/2,0,2*Math.PI,!0),l.fill(),t}():o.value.getCroppedCanvas()).toBlob(t=>{if(!t)return;let l=new FileReader;l.readAsDataURL(t),l.onloadend=t=>{var l;a("cropend",{imgBase64:(null===(l=t.target)||void 0===l?void 0:l.result)??"",imgInfo:e})},l.onerror=()=>{a("cropendError")}},"image/png")}return De(async function(){const l=We(n);if(!l)return;const[{default:i}]=await Promise.all([import("./cropper-DPh9NaIi.js").then(t=>/* @__PURE__ */e(t.default,1)),Promise.resolve({ })]);o.value=new i(l,{...rs,ready:()=>{s.value=!0,m(),a("ready",o.value)},crop(){u()},zoom(){u()},cropmove(){u()},...t.options})}),Me(()=>{var e;null===(e=o.value)||void 0===e||e.destroy()}),{getClass:d,imgElRef:n,getWrapperStyle:p,getImageStyle:c,isReady:s,croppered:v}}}),ds=["src","alt","crossorigin"],ps=/* @__PURE__ */C(cs,[["render",function(e,t,l,a,n,o){return Be(),he("div",{class:Te(e.getClass),style:Fe(e.getWrapperStyle)},[lt(fe("img",{ref:"imgElRef",src:e.src,alt:e.alt,crossorigin:e.crossorigin,style:Fe(e.getImageStyle)},null,12,ds),[[Qe,e.isReady]])],6)}]]),ms={key:1,class:"empty"},vs={class:"flex flex-col justify-center items-center"},hs=["title"],fs=/* @__PURE__ */we({__name:"CopperFreeModal",props:{title:{type:String,default:"图片上传"},circled:{type:Boolean,default:!0},uploadApi:{type:Function},src:{type:String},aspectRatio:{type:Number},accept:{type:Array,default:["jpg","jpeg","png","bmp"]},beforeUpload:{type:Function},uploadText:{type:String}},emits:["uploadSuccess","register"],setup(e,{emit:t}){const l=e,a=t,n=Re(l.src||""),o=Re(l.src||""),i=Re(""),s=Re();let r=1,u=1,c="";const d=de(()=>l.accept.map(e=>`image/${e}`).join(",")),p=re("cropper-free"),[m,{closeModal:v,setModalProps:h}]=is(e=>{(null==e?void 0:e.file)&&f(e.file)});async function f(e){if(l.beforeUpload&&await l.beforeUpload(e),e.size/1024/1024>4)return At.warn(`【${e.name}】文件大小不能超过 4MB`),!1;if(!d.value.includes(e.type))return At.warning(`【${e.name}】${ne("sys.component.cropper.acceptAvatarTypeTip")}`),!1;const t=new FileReader;return t.readAsDataURL(e),n.value="",i.value="",t.onload=function(t){var l;n.value=(null===(l=t.target)||void 0===l?void 0:l.result)??"",c=e.name},!1}function g({imgBase64:e}){i.value=e}function y(e){s.value=e}function b(e,t){var l,a;"scaleX"===e&&(r=t=-1===r?1:-1),"scaleY"===e&&(u=t=-1===u?1:-1),null===(l=s.value)||void 0===l||null===(a=l[e])||void 0===a||a.call(l,t)}async function x(){const e=l.uploadApi;if(e&&vt(e)){const t=X(i.value);try{h({confirmLoading:!0});const l=await e({name:"file",file:t,filename:c});a("uploadSuccess",{source:i.value,data:l.data.data}),v()}finally{h({confirmLoading:!1})}}}function w(){n.value="",setTimeout(()=>{n.value=o.value||""})}return Ze(()=>l.src,e=>{n.value=e||"",o.value=e||""}),(t,l)=>{const a=ze("PlusOutlined"),o=ze("a-button");return Be(),me(We(ss),Oe(t.$attrs,{title:e.title,width:"640px","min-height":"510","can-fullscreen":!1,"ok-text":We(ne)("sys.okText"),onRegister:We(m),onOk:x,onCancel:w}),{default:tt(()=>[fe("div",{class:Te(We(p).b())},[fe("div",{class:Te(We(p).b("left"))},[fe("div",{class:Te(We(p).b("cropper"))},[n.value?(Be(),me(ps,{key:0,src:n.value,height:"304px",width:"538px",options:{aspectRatio:e.aspectRatio??200/120},onCropend:g,onReady:y},null,8,["src","options"])):(Be(),he("div",ms,[be(We(jt),{"list-type":"picture-card","file-list":[],accept:"image/*","before-upload":f},{default:tt(()=>[fe("div",vs,[be(a),l[14]||(l[14]=fe("div",{class:"mt12px"},"点击或将图片拖拽到这里上传",-1)),l[15]||(l[15]=fe("div",{class:"color-[#8B8B8B] mt8px"}," 仅支持JPG、PNG、JPEG、BMP格式,文件小于4M ",-1))])]),_:1})]))],2),n.value?(Be(),he("div",{key:0,class:Te(We(p).b("toolbar"))},[be(We(jt),{"file-list":[],accept:d.value,"before-upload":f},{default:tt(()=>[e.uploadText?(Be(),me(o,{key:0,type:"link",size:"small",style:{padding:"0"}},{default:tt(()=>[ye(Ke(e.uploadText),1)]),_:1})):(Be(),he("a",{key:1,title:We(ne)("sys.reUpload"),placement:"bottom"},Ke(We(ne)("sys.reUpload")),9,hs))]),_:1},8,["accept"]),be(We(Lt),null,{default:tt(()=>[be(We(Mt),{title:We(ne)("sys.component.cropper.btn_zoom_in"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[0]||(l[0]=at(()=>{},["prevent"])),onClick:l[1]||(l[1]=e=>b("zoom",.1))},{icon:tt(()=>[...l[16]||(l[16]=[fe("i",{class:"iconfont icon-fangda_zoom-in"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_zoom_out"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[2]||(l[2]=at(()=>{},["prevent"])),onClick:l[3]||(l[3]=e=>b("zoom",-.1))},{icon:tt(()=>[...l[17]||(l[17]=[fe("i",{class:"iconfont icon-a-suoxiao_zoom-out1"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_rotate_left"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[4]||(l[4]=at(()=>{},["prevent"])),onClick:l[5]||(l[5]=e=>b("rotate",-45))},{icon:tt(()=>[...l[18]||(l[18]=[fe("i",{class:"iconfont icon-xuanzhuan_rotate"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_rotate_right"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[6]||(l[6]=at(()=>{},["prevent"])),onClick:l[7]||(l[7]=e=>b("rotate",45))},{icon:tt(()=>[...l[19]||(l[19]=[fe("i",{class:"iconfont icon-xuanzhuan_2"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_scale_x"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[8]||(l[8]=at(()=>{},["prevent"])),onClick:l[9]||(l[9]=e=>b("scaleX"))},{icon:tt(()=>[...l[20]||(l[20]=[fe("i",{class:"iconfont icon-shuipingfanzhuan_flip-horizontally"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_scale_y"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[10]||(l[10]=at(()=>{},["prevent"])),onClick:l[11]||(l[11]=e=>b("scaleY"))},{icon:tt(()=>[...l[21]||(l[21]=[fe("i",{class:"iconfont icon-chuizhifanzhuan_flip-vertically"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_reset"),placement:"bottom"},{default:tt(()=>[be(o,{size:"small",disabled:!n.value,onMousedown:l[12]||(l[12]=at(()=>{},["prevent"])),onClick:l[13]||(l[13]=e=>b("reset"))},{icon:tt(()=>[be(We(tl))]),_:1},8,["disabled"])]),_:1},8,["title"])]),_:1})],2)):ve("",!0)],2)],2)]),_:1},16,["title","ok-text","onRegister"])}}}),gs=/* @__PURE__ */C(fs,[["__scopeId","data-v-9069f48a"]]),ys={key:1,class:"empty"},bs={class:"flex flex-col justify-center items-center"},xs=["title"],ws={class:"flex-col"},ks={class:"flex-col"},Cs={class:"flex-col text-center"},_s=/* @__PURE__ */we({__name:"CopperModal",props:{circled:{type:Boolean,default:!0},uploadApi:{type:Function},src:{type:String},sourceUrlValue:{type:String}},emits:["uploadSuccess","register"],setup(e,{emit:t}){const l=e,a=t,n=Re(l.src||""),o=Re(""),i=Re();let s=1,r=1,u="";const c=re("cropper-am"),[d,{closeModal:p,setModalProps:m}]=is();function v(e){if(e.size/1024/1024>4)return At.warn(`【${e.name}】文件大小不能超过 4MB`),!1;if(!["image/jpg","image/jpeg","image/png","image/bmp"].includes(e.type))return At.warning(`【${e.name}】${ne("sys.component.cropper.acceptAvatarTypeTip")}`),!1;const t=new FileReader;return t.readAsDataURL(e),n.value="",o.value="",t.onload=function(t){var l;n.value=(null===(l=t.target)||void 0===l?void 0:l.result)??"",u=e.name},!1}function h({imgBase64:e}){o.value=e}function f(e){i.value=e}function g(e,t){var l,a;"scaleX"===e&&(s=t=-1===s?1:-1),"scaleY"===e&&(r=t=-1===r?1:-1),null===(l=i.value)||void 0===l||null===(a=l[e])||void 0===a||a.call(l,t)}async function y(){const e=l.uploadApi;if(e&&vt(e)){const t=X(o.value);try{m({confirmLoading:!0});const l=await e({name:"file",file:t,filename:u});a("uploadSuccess",{source:o.value,data:l.data.data}),p()}finally{m({confirmLoading:!1})}}}return(t,l)=>{const a=ze("PlusOutlined"),i=ze("a-button"),s=ze("Avatar");return Be(),me(We(ss),Oe(t.$attrs,{title:We(ne)("sys.component.cropper.modalTitle"),width:"600px","min-height":"570","can-fullscreen":!1,"ok-text":We(ne)("sys.okText"),onRegister:We(d),onOk:y}),{default:tt(()=>[fe("div",{class:Te(We(c).b())},[fe("div",{class:Te(We(c).b("left"))},[fe("div",{class:Te(We(c).b("cropper"))},[n.value?(Be(),me(ps,{key:0,src:n.value,height:"360px",width:"360px",circled:e.circled,onCropend:h,onReady:f},null,8,["src","circled"])):ve("",!0),e.sourceUrlValue||"/404.png"!==n.value?ve("",!0):(Be(),he("div",ys,[be(We(jt),{"list-type":"picture-card","file-list":[],accept:"image/*","before-upload":v},{default:tt(()=>[fe("div",bs,[be(a),l[14]||(l[14]=fe("div",{class:"mt12px"},"点击或将图片拖拽到这里上传",-1)),l[15]||(l[15]=fe("div",{class:"color-[#8B8B8B] mt8px"}," 仅支持JPG、PNG、JPEG、BMP格式,文件小于4M ",-1))])]),_:1})]))],2),e.sourceUrlValue||"/404.png"!==n.value?(Be(),he("div",{key:0,class:Te(We(c).b("toolbar"))},[be(We(jt),{"file-list":[],accept:"image/*","before-upload":v},{default:tt(()=>[fe("a",{title:We(ne)("sys.reUpload"),placement:"bottom"},Ke(We(ne)("sys.reUpload")),9,xs)]),_:1}),be(We(Lt),null,{default:tt(()=>[be(We(Mt),{title:We(ne)("sys.component.cropper.btn_zoom_in"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[0]||(l[0]=at(()=>{},["prevent"])),onClick:l[1]||(l[1]=e=>g("zoom",.1))},{icon:tt(()=>[...l[16]||(l[16]=[fe("i",{class:"iconfont icon-fangda_zoom-in"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_zoom_out"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[2]||(l[2]=at(()=>{},["prevent"])),onClick:l[3]||(l[3]=e=>g("zoom",-.1))},{icon:tt(()=>[...l[17]||(l[17]=[fe("i",{class:"iconfont icon-a-suoxiao_zoom-out1"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_rotate_left"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[4]||(l[4]=at(()=>{},["prevent"])),onClick:l[5]||(l[5]=e=>g("rotate",-45))},{icon:tt(()=>[...l[18]||(l[18]=[fe("i",{class:"iconfont icon-xuanzhuan_rotate"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_rotate_right"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[6]||(l[6]=at(()=>{},["prevent"])),onClick:l[7]||(l[7]=e=>g("rotate",45))},{icon:tt(()=>[...l[19]||(l[19]=[fe("i",{class:"iconfont icon-xuanzhuan_2"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_scale_x"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[8]||(l[8]=at(()=>{},["prevent"])),onClick:l[9]||(l[9]=e=>g("scaleX"))},{icon:tt(()=>[...l[20]||(l[20]=[fe("i",{class:"iconfont icon-shuipingfanzhuan_flip-horizontally"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_scale_y"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[10]||(l[10]=at(()=>{},["prevent"])),onClick:l[11]||(l[11]=e=>g("scaleY"))},{icon:tt(()=>[...l[21]||(l[21]=[fe("i",{class:"iconfont icon-chuizhifanzhuan_flip-vertically"},null,-1)])]),_:1},8,["disabled"])]),_:1},8,["title"]),be(We(Mt),{title:We(ne)("sys.component.cropper.btn_reset"),placement:"bottom"},{default:tt(()=>[be(i,{size:"small",disabled:!n.value,onMousedown:l[12]||(l[12]=at(()=>{},["prevent"])),onClick:l[13]||(l[13]=e=>g("reset"))},{icon:tt(()=>[be(We(tl))]),_:1},8,["disabled"])]),_:1},8,["title"])]),_:1})],2)):ve("",!0)],2),fe("div",{class:Te([We(c).b("right"),"text-center"])},[l[22]||(l[22]=ye(" 预览 ",-1)),fe("div",{class:Te(We(c).b("group"))},[fe("div",ws,[be(s,{src:o.value,size:102},null,8,["src"])]),fe("div",ks,[be(s,{src:o.value,size:78},null,8,["src"])]),fe("div",Cs,[be(s,{src:o.value,size:28},null,8,["src"])])],2)],2)],2),l[23]||(l[23]=fe("div",{class:"absolute z-10 top-0 left-2/3 w-0 h-full",style:{"border-left":"1px solid #e0e3ea"}},null,-1))]),_:1},16,["title","ok-text","onRegister"])}}}),Ss=/* @__PURE__ */C(_s,[["__scopeId","data-v-f1134678"]]),Es=["src"],Os=/* @__PURE__ */we({__name:"CropperAvatar",props:{width:{type:[String,Number],default:"200px"},value:{type:String},showBtn:{type:Boolean,default:!0},btnProps:{type:Object},btnText:{type:String,default:""},uploadApi:{type:Function}},emits:["update:value","change"],setup(e,{expose:t,emit:l}){const a=e,n=l,o=Re("/extras-assets/images/default_avatar.png"),i=Re(oe(a.value)||""),s=Re(a.value||""),r=re("cropper-avatar"),[u,{openModal:c,closeModal:d}]=os(),p=de(()=>[r.b()]),m=de(()=>`${a.width}`.replace(/px/,"")+"px"),v=de(()=>parseInt(`${a.width}`.replace(/px/,""))/2+"px"),h=de(()=>({width:We(m)})),f=de(()=>({width:We(m),height:We(m)}));function g({source:e,data:t}){i.value=oe(t),s.value=t,n("change",{source:e,data:t})}et(()=>{i.value=oe(a.value)||"",s.value=a.value||""}),Ze(()=>s.value,e=>{n("update:value",e)});const y=()=>{c()};return t({openModal:c.bind(null,!0),closeModal:d}),(t,l)=>{const a=ze("a-button");return Be(),he("div",{class:Te(p.value),style:Fe(h.value)},[fe("div",{class:Te(We(r).b("image-wrapper")),style:Fe(f.value),onClick:y},[fe("div",{class:Te(We(r).b("image-mask")),style:Fe(f.value)},[be(We(Jt),{style:Fe({width:v.value,height:v.value}),"two-tone-color":"#d6d6d6"},null,8,["style"])],6),fe("img",{src:e.value?i.value:o.value,alt:"avatar"},null,8,Es)],6),e.showBtn?(Be(),me(a,Oe({key:0,class:We(r).b("upload-btn")},e.btnProps,{onClick:We(c)}),{default:tt(()=>[ye(Ke(e.btnText?e.btnText:We(ne)("sys.component.cropper.selectImage")),1)]),_:1},16,["class","onClick"])):ve("",!0),be(Ss,{"upload-api":e.uploadApi,src:i.value,"source-url-value":s.value,onRegister:We(u),onUploadSuccess:g},null,8,["upload-api","src","source-url-value","onRegister"])],6)}}}),Is=/* @__PURE__ */C(Os,[["__scopeId","data-v-ef939ff0"]]),Ts=/* @__PURE__ */we({__name:"picture-preview",props:{functional:{type:Boolean},imageList:{type:Array,default:()=>[]}},setup(e){const t=e,l=re("image-preview"),a=de(()=>t.imageList.map(e=>ft(e)?{src:e,placeholder:!1}:e));return(t,n)=>{const o=ze("PreviewGroup");return Be(),he("div",{class:Te(We(l).b())},[be(o,null,{default:tt(()=>[!e.imageList||t.$slots.default?Ue(t.$slots,"default",{key:0}):(Be(!0),he(ce,{key:1},Pe(a.value,e=>(Be(),me(We(St),Oe({key:e.src,ref_for:!0},e),ge({_:2},[e.placeholder?{name:"placeholder",fn:tt(()=>[be(We(St),Oe({ref_for:!0},e,{src:e.placeholder,preview:!1}),null,16,["src"])]),key:"0"}:void 0]),1040))),128))]),_:3})],2)}}}),Fs=Ts,Ls=/* @__PURE__ */function(e){return e[e.LOADING=0]="LOADING",e[e.DONE=1]="DONE",e[e.FAIL=2]="FAIL",e}(Ls||{}),Ds={show:{type:Boolean,default:!1},imageList:{type:Array,default:null},index:{type:Number,default:0},scaleStep:{type:Number},defaultWidth:{type:Number},maskClosable:{type:Boolean},rememberState:{type:Boolean}},Ms="img-preview",Bs=/* @__PURE__ */we({name:"ImagePreview",props:Ds,emits:["img-load","img-error"],setup(e,{expose:t,emit:l}){const a=/* @__PURE__ */new Map,n=Ae({currentUrl:"",imgScale:1,imgRotate:0,imgTop:0,imgLeft:0,status:Ls.LOADING,currentIndex:0,moveX:0,moveY:0,show:e.show}),o=Re(null),i=Re(null);function s(){n.imgScale=1,n.imgRotate=0,n.imgTop=0,n.imgLeft=0}const r=de(()=>{const t=(null==e?void 0:e.scaleStep)??0;return t>0&&t<100?t/100:n.imgScale/10});function u(e){(e=e||window.event).delta=e.wheelDelta||-e.detail,e.preventDefault(),e.delta>0&&c(r.value),e.delta<0&&c(-r.value)}function c(e){n.imgScale<=.2&&e<0||(n.imgScale+=.1*e,n.imgScale<0&&(n.imgScale=.02))}function d(e){n.imgRotate+=e}function p(){const e=We(i);e&&(e.onmousemove=null)}function m(t){n.status=Ls.LOADING;const o=new Image;o.src=t,o.onload=o=>{if(n.currentUrl!==t){const i=o.composedPath();if(e.rememberState){a.set(n.currentUrl,{scale:n.imgScale,top:n.imgTop,left:n.imgLeft,rotate:n.imgRotate});const l=a.get(t);l?(n.imgScale=l.scale,n.imgTop=l.top,n.imgRotate=l.rotate,n.imgLeft=l.left):(s(),e.defaultWidth&&(n.imgScale=e.defaultWidth/i[0].naturalWidth))}else e.defaultWidth&&(n.imgScale=e.defaultWidth/i[0].naturalWidth);i&&l("img-load",{index:n.currentIndex,dom:i[0],url:t})}n.currentUrl=t,n.status=Ls.DONE},o.onerror=e=>{const a=e.composedPath();a&&l("img-error",{index:n.currentIndex,dom:a[0],url:t}),n.status=Ls.FAIL}}function v(e){e&&e.stopPropagation(),h()}function h(){n.show=!1,document.body.removeEventListener("DOMMouseScroll",u),document.ondragstart=null}function f(){s()}function g(t){const{currentIndex:l}=n,{imageList:a}=e;"left"===t&&(n.currentIndex-=1,l<=0&&(n.currentIndex=a.length-1)),"right"===t&&(n.currentIndex+=1,l>=a.length-1&&(n.currentIndex=0)),m(a[n.currentIndex])}function y(e){e=e||window.event,n.moveX=e.clientX,n.moveY=e.clientY;const t=We(i);t&&(t.onmousemove=b)}function b(e){(e=e||window.event).preventDefault();const t=e.clientX-n.moveX,l=e.clientY-n.moveY;n.imgLeft+=t,n.imgTop+=l,n.moveX=e.clientX,n.moveY=e.clientY}t({resume:f,close:h,prev:g.bind(null,"left"),next:g.bind(null,"right"),setScale:e=>{e>0&&e<=10&&(n.imgScale=e)},setRotate:e=>{n.imgRotate=e}});const x=de(()=>{const{imgScale:t,imgRotate:l,imgTop:a,imgLeft:o}=n;return{transform:`scale(${t}) rotate(${l}deg)`,marginTop:`${a}px`,marginLeft:`${o}px`,maxWidth:e.defaultWidth?"unset":"100%"}}),w=de(()=>{const{imageList:t}=e;return t.length>1});et(()=>{e.show&&function(){!function(){const e=We(o);e&&(e.onmousewheel=u,document.body.addEventListener("DOMMouseScroll",u),document.ondragstart=function(){return!1})}();const{index:t,imageList:l}=e;if(!l||!l.length)throw new Error("imageList is undefined");n.currentIndex=t,m(l[t])}(),e.imageList&&s()});const k=t=>{e.maskClosable&&t.target&&t.target.classList.contains(`${Ms}-content`)&&v(t)},C=()=>{if(!We(w))return null;const{currentIndex:t}=n,{imageList:l}=e;return be("div",{class:`${Ms}__index`},[t+1,ye(" / "),l.length])},_=e=>We(w)?be("div",{class:[`${Ms}__arrow`,e],onClick:()=>g(e)},[be("left"===e?el:ll,null,null)]):null;return()=>n.show&&be("div",{class:Ms,ref:o,onMouseup:p,onClick:k},[be("div",{class:`${Ms}-content`},[be("img",{style:We(x),class:[`${Ms}-image`,n.status===Ls.DONE?"":"hidden"],ref:i,src:n.currentUrl,onMousedown:y},null),be("div",{class:`${Ms}__close`,onClick:v},[be(Yt,{class:`${Ms}__close-icon`},null)]),C(),be("div",{class:`${Ms}__controller`},[be("div",{class:`${Ms}__controller-item`,onClick:()=>c(-r.value)},[be("img",{src:"/extras-assets/svg/preview/unscale.svg"},null)]),be("div",{class:`${Ms}__controller-item`,onClick:()=>c(r.value)},[be("img",{src:"/extras-assets/svg/preview/scale.svg"},null)]),be("div",{class:`${Ms}__controller-item`,onClick:f},[be("img",{src:"/extras-assets/svg/preview/resume.svg"},null)]),be("div",{class:`${Ms}__controller-item`,onClick:()=>d(-90)},[be("img",{src:"/extras-assets/svg/preview/unrotate.svg"},null)]),be("div",{class:`${Ms}__controller-item`,onClick:()=>d(90)},[be("img",{src:"/extras-assets/svg/preview/p-rotate.svg"},null)])]),_("left"),_("right")])])}}),js=Bs,As=null;function Rs(e){var t;const l={},a=document.createElement("div");return Object.assign(l,{show:!0,index:0,scaleStep:100},e),As=be(js,l),Ne(As,a),document.body.appendChild(a),null===(t=As.component)||void 0===t?void 0:t.exposed}var Ns=["src"],Ps={key:0,class:"iconfont icon-tupian-shili"},Us={class:"prompt"},zs={key:0,class:"auxiliary"},$s="cropper-photo",Vs=/* @__PURE__ */we({__name:"CropperFree",props:{value:{type:String},uploadApi:{type:Function},aspectRatio:{type:Number},auxiliary:{type:String},icon:{type:String},isDrag:{type:Boolean,default:!1},accept:{type:Array},beforeUpload:{type:Function},modalTitle:{type:String},uploadText:{type:String},disabled:{type:Boolean,default:!1}},emits:["update:value","change"],setup(e,{expose:t,emit:l}){const a=e,n=l,o=Re(a.value||""),i=de(()=>o.value?te(o.value):"");let s={};const[r,{openModal:u,closeModal:c}]=os(),d=de(()=>a.disabled),p=de(()=>{var e,t,l;return(null===(e=a.accept)||void 0===e?void 0:e.length)?[...new Set((null===(t=a.accept)||void 0===t?void 0:t.some(e=>"jpg"===e||"jpeg"===e))?null===(l=a.accept)||void 0===l?void 0:l.concat(["jpg","jpeg"]):a.accept)].map(e=>"image/"+e):["image/jpg","image/jpeg","image/png"]});function m({source:e,data:t}){o.value=t,n("change",{source:e,data:t})}function v(){s=Rs({imageList:[i.value]})}function h(){o.value=""}et(()=>{o.value=a.value||""}),Ze(()=>o.value,e=>{n("update:value",e)}),Le(()=>{s&&s.close()}),De(()=>{const e=document.getElementById("dropzone");null==e||e.addEventListener("dragover",e=>{e.stopPropagation(),e.preventDefault()}),null==e||e.addEventListener("drop",e=>{var t;e.stopPropagation(),e.preventDefault();const l=null===(t=e.dataTransfer)||void 0===t?void 0:t.files[0];if(l){if(!p.value.includes(l.type))return void At.warning(ne("sys.component.cropper.acceptTip"));u(!0,{file:l})}})});const f=()=>{u()};return t({openModal:u.bind(null,!0),closeModal:c}),(t,l)=>{var a;const n=ze("Icon");return Be(),he("div",{id:"dropzone",class:Te([$s,d.value&&"not-allow"])},[i.value?(Be(),he(ce,{key:0},[fe("div",{class:Te(`${$s}__wrapper`)},[fe("img",{src:i.value},null,8,Ns)],2),fe("div",{class:Te(`${$s}__mask`)},[be(We(Xt),{style:{fontSize:24},"two-tone-color":"#ffffff",onClick:v}),be(We(Jt),{style:{fontSize:24},"two-tone-color":"#ffffff",onClick:l[0]||(l[0]=()=>We(u)())}),be(We(Wt),{style:{fontSize:24},"two-tone-color":"#ffffff",onClick:h})],2)],64)):(Be(),he("div",{key:1,class:Te(`${$s}__trigger`),onClick:f},[e.icon?(Be(),he("i",Ps)):(Be(),me(n,{key:1,icon:"ant-design:plus-outlined",size:36})),e.isDrag?(Be(),he(ce,{key:2},[fe("p",Us,Ke(t.$t("sys.pageDesigner.clickOrDragToUpload")),1),e.accept?(Be(),he("p",zs,Ke(`支持${null===(a=e.accept)||void 0===a?void 0:a.join("、")}图片格式,大小100KB以内`),1)):ve("",!0)],64)):ve("",!0),e.auxiliary?ve("",!0):(Be(),he(ce,{key:3},[ye(Ke(We(ne)("sys.clickToDoSth",{sth:We(ne)("sys.add")})),1)],64))],2)),be(gs,{"upload-api":e.uploadApi,"aspect-ratio":e.aspectRatio,src:i.value,accept:e.accept,"before-upload":e.beforeUpload,title:e.modalTitle,"upload-text":e.uploadText,onRegister:We(r),onUploadSuccess:m},null,8,["upload-api","aspect-ratio","src","accept","before-upload","title","upload-text","onRegister"])],2)}}}),Hs=/* @__PURE__ */C(Vs,[["__scopeId","data-v-7a51c6b9"]]),Ks={class:"inline-block align-middle"},Gs={key:0,class:"btn-title gct-text-overflow whitespace-nowrap"},qs=/* @__PURE__ */we({__name:"base-button",props:{block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},title:{type:String,default:""},size:{type:String,default:"default"},icon:{type:String,default:""},type:{type:String,default:""},hasIcon:{type:Boolean,default:!1},hasText:{type:Boolean,default:!0},danger:{type:Boolean,default:!1},buttonStyle:{type:String,default:""},i18nConfig:{type:String,default:""},hidden:{type:Boolean,default:!1},confirm:{type:Boolean,default:!1},confirmText:{type:String,default:""},enableCustomColor:{type:Boolean,default:!1},backgroundColor:{type:String,default:""},fontColor:{type:String,default:""}},emits:["click"],setup(e,{emit:t}){Xe(e=>({v75739162:l.fontColor,dfaf8ce0:l.backgroundColor,v6d7bff14:"primary"===l.type?l.backgroundColor:"transparent"}));const l=e,a=t,n=de(()=>(l.hasText,"text-top")),o=it(function(){a("click")},300),i=async e=>{const t=/\/web-render|\/web\/|web-single\/|dev-single\/|test-single\//.test(location.pathname);let n=e.target;if("SPAN"==n.nodeName&&(n=n.parentNode),n.blur(),l.confirm&&t)return await new Promise((e,t)=>{Ot.confirm({content:l.confirmText||ne("sys.pageDesigner.confirmTodo"),onOk(){e("onOk")},onCancel(){t("onCancel")}})}),void a("click");o()};return(t,l)=>{const a=ze("icon-next"),o=ze("a-button");return Be(),he("div",Ks,[be(o,{size:e.size,type:e.type,danger:e.danger,loading:e.loading,block:e.block,disabled:e.disabled,class:Te([e.enableCustomColor&&e.fontColor?"btn-font-color":"",e.enableCustomColor&&e.backgroundColor?"btn-bg-style":"",{square:e.buttonStyle===We(D).SQUARE}]),title:e.title,onClick:i},{icon:tt(()=>[e.hasIcon?(Be(),me(a,{key:0,size:e.buttonStyle===We(D).SQUARE?20:16,value:e.icon,style:Fe({"--color":"inherit",lineHeight:"1",verticalAlign:n.value})},null,8,["size","value","style"])):ve("",!0),e.icon&&e.hasText?(Be(),he("div",{key:1,class:Te({"h-6px":e.hasIcon&&e.hasText&&e.buttonStyle===We(D).SQUARE&&e.size!==We(L).SMALL,"h-4px":e.hasIcon&&e.hasText&&e.buttonStyle===We(D).SQUARE&&e.size===We(L).SMALL,"w-6px":e.hasIcon&&e.hasText&&e.buttonStyle===We(D).ORDINARY&&e.size!==We(L).SMALL,"w-4px":e.hasIcon&&e.hasText&&e.buttonStyle===We(D).ORDINARY&&e.size===We(L).SMALL})},null,2)):ve("",!0)]),default:tt(()=>[e.hasText?(Be(),he("span",Gs,Ke(e.hasText?e.title:""),1)):ve("",!0)]),_:1},8,["size","type","danger","loading","block","disabled","class","title"])])}}}),Ys=/* @__PURE__ */C(qs,[["__scopeId","data-v-5b7fe5af"]]),Ws={class:"inline-block align-middle"},Js={class:"align-middle leading-none"},Xs={class:"align-middle leading-none"},Qs=/* @__PURE__ */we({__name:"basic-button",props:{buttonType:{type:String,default:""},buttonTheme:{type:String,default:""},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:String,default:""},iconColor:{type:String,default:""},buttonStyle:{type:String,default:""},dropdown:{type:Boolean,default:!1}},emits:["dropdown"],setup(e,{emit:t}){const l=t,a=e,n=de(()=>{const{buttonTheme:e,buttonStyle:t}=a,l=[`ant-btn-${e}`];return t===D.SQUARE?l.push("square"):l.push("line"),l}),o=de(()=>{const{buttonTheme:e}=a;return`ant-btn-${e}`});function i(){l("dropdown")}return(t,l)=>{const a=ze("icon-next"),s=ze("a-button");return Be(),he("div",Ws,[e.dropdown?(Be(),he("div",{key:0,class:Te(["inline-block ant-btn-group",e.buttonStyle===We(D).SQUARE?"squaref group":""])},[be(s,{class:Te(n.value),disabled:e.disabled,type:e.buttonType,"ant-click-animating-without-extra-node":"false"},{default:tt(()=>[e.icon?(Be(),me(a,{key:0,class:"align-middle",value:e.icon,size:e.buttonStyle===We(D).SQUARE?20:14,color:e.iconColor},null,8,["value","size","color"])):ve("",!0),e.icon?(Be(),he("div",{key:1,class:Te({"inline-block w2px":e.buttonStyle===We(D).ORDINARY,"h-4px":e.buttonStyle===We(D).SQUARE})},null,2)):ve("",!0),fe("span",Js,[Ue(t.$slots,"default",{},void 0,!0)])]),_:3},8,["class","disabled","type"]),be(s,{disabled:e.disabled,type:e.buttonType,class:Te(o.value),onClick:at(i,["stop"])},{icon:tt(()=>[Ue(t.$slots,"icon",{},void 0,!0)]),_:3},8,["disabled","type","class"])],2)):(Be(),me(s,{key:1,disabled:e.disabled,type:e.buttonType,class:Te(n.value)},{default:tt(()=>[e.icon?(Be(),me(a,{key:0,class:"align-middle",value:e.icon,size:e.buttonStyle===We(D).SQUARE?20:14,color:e.iconColor},null,8,["value","size","color"])):ve("",!0),e.icon?(Be(),he("div",{key:1,class:Te({"inline-block w3px":e.buttonStyle===We(D).ORDINARY,"h-4px":e.buttonStyle===We(D).SQUARE})},null,2)):ve("",!0),fe("span",Xs,[Ue(t.$slots,"default",{},void 0,!0)])]),_:3},8,["disabled","type","class"]))])}}}),Zs=/* @__PURE__ */C(Qs,[["__scopeId","data-v-22131025"]]),er=/* @__PURE__ */we({__name:"double-input",props:{doubleValue:{},isSeparator:{type:Boolean},onEnter:{},renderScript:{},digits:{},enableStepCounter:{type:Boolean}},emits:["update:doubleValue"],setup(e,{expose:t,emit:l}){const a=e,n=l,o=Re({}),i=Re(),s=de({get(){const{val:e,precision:t}=u(a.doubleValue);return c(t),e},set(e){n("update:doubleValue",e)}}),r=e=>{const t=String(e).match(/\.(\d+)/);return t?t[1].length:0},u=e=>{const t=(e=>{let t=null==e?void 0:e.toString();a.isSeparator&&t&&(t=t.replace(/\$\s?|(,*)/g,""));const l=parseFloat(t);if(isNaN(l))return{val:null};if(0===t.toString().indexOf(".")&&(t=`0${t}`),Number.isInteger(l)){const e=new RegExp(`^${l}(\\.)`,"g");if(e.test(t)&&t.replace(new RegExp(`^(${l}(\\.))(.*)`),"$1")===`${l}.`){const a=t.replace(e,"");if(0===a.toString().indexOf("."))return{val:l};if(0===parseFloat(a)){const e=a.toString().replace(new RegExp("^(\\d*)(.*)"),"$1");return{val:`${l}.${e}`,precision:e.length}}}return{val:l}}{const e=t.replace(new RegExp("^(\\d*\\.\\d*)(.*)"),"$1");return e===l.toString()?{val:e}:{val:e,precision:r(e)}}})(e);if(ht(a.digits))return t;const{val:l,precision:n}=t;return{val:l?Number(new nl(l).toFixed(a.digits,1)):l,precision:n}},c=e=>{o.value={},void 0!==e&&ht(a.digits)&&(o.value={precision:e})},d=e=>{const{target:{value:t}}=e||{},{val:l,precision:a}=u(t);c(a),n("update:doubleValue",l)},p=e=>{var t;d(e),a.onEnter&&"function"==typeof a.onEnter&&(null===(t=a.onEnter)||void 0===t||t.call(a,e))};return t({input:i,onChangeValue:d}),(t,l)=>{const a=ze("a-input-number");return Be(),me(a,Oe({ref_key:"inputNumberRef",ref:i},o.value,{value:s.value,"onUpdate:value":l[0]||(l[0]=e=>s.value=e),onBlur:d,onPressEnter:p}),ge({_:2},[e.enableStepCounter?{name:"addonBefore",fn:tt(()=>[Ue(t.$slots,"step-down")]),key:"0"}:void 0,e.enableStepCounter||e.renderScript?{name:"addonAfter",fn:tt(()=>[e.renderScript?(Be(),me(Ve(e.renderScript),{key:0})):ve("",!0),e.enableStepCounter?Ue(t.$slots,"step-up",{key:1}):ve("",!0)]),key:"1"}:void 0]),1040,["value"])}}}),tr=er,lr={key:0,class:"copy-wrap copy-wrap-tooltip"},ar={key:0,class:"copy-key"},nr={key:1,class:"copy-wrap"},or=/* @__PURE__ */we({name:"CopyModuleKey",__name:"copy-module-key",props:{moduleKey:{type:String,require:!0},isTooltip:Boolean,supportCopy:{type:Boolean,default:!0},iconPos:{type:String,default:"right"},showText:{type:Boolean,default:!0},fontSize:{type:Number,default:14}},setup(e){const t=e,l=de(()=>t.moduleKey&&t.supportCopy);function a(){const{isSuccessRef:e}=ie(t.moduleKey);We(e)&&_gct.message.success(ne("sys.copySuccess"))}return(t,n)=>{const o=ze("a-tooltip");return e.isTooltip?(Be(),he("div",lr,[l.value&&"left"===e.iconPos?(Be(),he("i",{key:0,class:"iconfont icon-fuzhi primary-gct",style:{"margin-right":"4px"},onClick:at(a,["stop"])})):ve("",!0),be(o,null,{title:tt(()=>[ye(Ke(e.moduleKey),1)]),default:tt(()=>[Ue(t.$slots,"default",{},()=>[e.showText?(Be(),he("span",ar,Ke(e.moduleKey),1)):ve("",!0)],!0)]),_:3}),l.value&&"right"===e.iconPos?(Be(),he("i",{key:1,class:"iconfont icon-fuzhi primary-gct",style:{"margin-left":"4px"},onClick:at(a,["stop"])})):ve("",!0)])):(Be(),he("div",nr,[l.value&&"left"===e.iconPos?(Be(),he("i",{key:0,class:"iconfont icon-fuzhi primary-gct",style:{"margin-right":"4px"},onClick:at(a,["stop"])})):ve("",!0),Ue(t.$slots,"default",{},()=>[e.showText?(Be(),he("span",{key:0,style:Fe(`font-size: ${e.fontSize}px; overflow-wrap: anywhere`)},Ke(e.moduleKey),5)):ve("",!0)],!0),l.value&&"right"===e.iconPos?(Be(),he("i",{key:1,class:"iconfont icon-fuzhi primary-gct",style:{"margin-left":"4px"},onClick:at(a,["stop"])})):ve("",!0)]))}}}),ir=/* @__PURE__ */C(or,[["__scopeId","data-v-66e22862"]]),sr={class:"ant-upload-text",style:{"font-size":"14px"}},rr={key:1,class:"upload-readonly"},ur=/* @__PURE__ */C(/* @__PURE__ */we({__name:"upload-design",props:{disabled:{type:Boolean},readonly:{type:Boolean}},setup:e=>(t,l)=>{const a=ze("a-upload-dragger");return e.readonly?(Be(),he("div",rr,[...l[1]||(l[1]=[fe("i",{class:"iconfont icon-tupian-shili"},null,-1)])])):(Be(),me(a,{key:0,class:Te(e.disabled?"upload-disabled":""),"file-list":[],disabled:e.disabled},{default:tt(()=>[l[0]||(l[0]=fe("div",null,[fe("i",{class:"iconfont icon-tupian-shili"})],-1)),fe("p",sr,Ke(t.$t("sys.pageDesigner.clickOrDragToUpload")),1)]),_:1},8,["class","disabled"]))}}),[["__scopeId","data-v-575d3a1a"]]),cr=/* @__PURE__ */function(e){return e.EXCEPTION="exception",e.ACTIVE="active",e}({}),dr={class:"ant-upload-text",style:{"font-size":"14px"}},pr={key:0,class:"img-box"},mr=["onClick"],vr=/* @__PURE__ */we({__name:"base-upload",props:{modelKey:{},modelValue:{},readonly:{type:Boolean},disabled:{type:Boolean},maxCount:{},maxSize:{},accept:{},isTable:{type:Boolean},beforeUpload:{type:Function},materialType:{},getContainer:{type:Function}},emits:["update:modelValue","onBeforeUpload","saveTableRow"],setup(e,{emit:t}){const l=Re(0),a=Re([]),n=t,o=e,i=o.getContainer||document.body,s=de({get(){try{return o.modelValue?o.modelValue.split(","):[]}catch(e){return[]}},set(e){(null==e?void 0:e.length)>0?n("update:modelValue",e):n("update:modelValue",[])}});Ze(()=>o.modelValue,async()=>{const e=(o.modelValue?o.modelValue.split(","):[]).map(async e=>{const t=q+e;return{uid:ue(16,16),path:t,name:e.split("/").at(-1),status:void 0,fileSize:0,percentNum:0}});a.value=await Promise.all(e)},{immediate:!0});const r=de(()=>{const e=ot(o.accept||[]),t=[...new Set(e)],l=[];return t.forEach(e=>{l.push(e),e===e.toLowerCase()&&l.push(e.toUpperCase()),e===e.toUpperCase()&&l.push(e.toLowerCase())}),[...new Set(l)].map(e=>"."+e)}),u=de(()=>r.value+""||"image/*"),c=de(()=>null===o.maxCount||void 0===o.maxCount||a.value.length<o.maxCount),d=de(()=>null===o.maxCount||void 0===o.maxCount||o.maxCount>1);async function p({file:e}){if(l.value+=1,l.value>o.maxCount)return void(l.value-=1);const t=URL.createObjectURL(e);a.value=[...a.value,{uid:e.uid,name:e.name,fileSize:e.size,path:t,percentNum:0,status:cr.ACTIVE}],await async function(e){let t=a.value.find(t=>t.uid===e.uid)||{};try{await G.beforeUploadFun(e,{maxSize:o.maxSize||5,acceptList:(o.accept||[]).map(e=>"."+e),beforeUpload:async e=>{if(o.beforeUpload&&"[object Function]"===Object.prototype.toString.call(o.beforeUpload))return o.beforeUpload(e)}});const a=setInterval(()=>{t.percentNum&&t.percentNum<95&&(t.percentNum+=7)},100);try{const l=await G.uploadByFile(e,!0,o.modelKey);s.value=[...s.value,l],t=Object.assign(t,{path:q+l,percentNum:100,status:void 0}),clearInterval(a),await Ie(),o.isTable&&n("saveTableRow")}catch(i){l.value-=1,console.warn(i),t.status=cr.EXCEPTION,clearInterval(a)}}catch(r){l.value-=1,At.warn(r),a.value.splice(a.value.length-1,1)}}(e)}return(t,n)=>{const o=ze("a-upload-dragger"),r=ze("a-progress"),m=ze("a-image"),v=ze("close-circle-filled"),h=ze("a-image-preview-group");return Be(),he(ce,null,[lt(be(o,{class:Te(["gct-upload-image-dragger",e.disabled?"upload-disabled":""]),style:{margin:"4px 0"},disabled:e.disabled,"custom-request":p,multiple:d.value,"file-list":[],accept:u.value},{default:tt(()=>[n[0]||(n[0]=fe("div",null,[fe("i",{class:"iconfont icon-tupian-shili"})],-1)),fe("p",dr,Ke(We(ne)("sys.pageDesigner.clickOrDragToUpload")),1)]),_:1},8,["class","disabled","multiple","accept"]),[[Qe,c.value&&!e.readonly]]),a.value.length?(Be(),he("div",pr,[be(h,{preview:{getContainer:We(i)}},{default:tt(()=>[(Be(!0),he(ce,null,Pe(a.value,(t,o)=>(Be(),he("div",{key:o,class:Te(["img-item float-left mr-8px my-4px",{"material-table-field":e.materialType===We(P).MaterialTableField}])},[t.status?(Be(),me(r,{key:0,"stroke-width":4,"show-info":!1,percent:t.percentNum},null,8,["percent"])):ve("",!0),be(m,{width:"100px",height:"100px",src:t.path,preview:{maskClassName:"custom-image-preview"}},{previewMask:tt(()=>[...n[1]||(n[1]=[])]),_:1},8,["src"]),t.status||e.disabled||e.readonly?ve("",!0):(Be(),he("div",{key:1,class:"delete-icon-box",onClick:at(e=>async function(e){l.value-=1,a.value.splice(e,1),s.value.splice(e,1),s.value=[...s.value],await Ie()}(o),["stop"])},[be(v,{class:"delete-icon"})],8,mr))],2))),128))]),_:1},8,["preview"])])):ve("",!0)],64)}}}),hr=/* @__PURE__ */C(vr,[["__scopeId","data-v-2a928323"]]),fr={class:"image-upload-wrapper w-full"},gr=r(/* @__PURE__ */we({__name:"ImageUpload",props:{modelKey:{},modelValue:{},readonly:{type:Boolean},disabled:{type:Boolean},isDesign:{type:Boolean},maxSize:{},maxCount:{},accept:{},materialType:{},isTable:{type:Boolean},beforeUpload:{type:Function},getContainer:{type:Function}},emits:["update:modelValue","onBeforeUpload","saveTableRow"],setup(e,{emit:t}){const l=t,a=e=>l("update:modelValue",e),n=()=>{l("saveTableRow")};return(t,l)=>(Be(),he("div",fr,[e.isDesign?(Be(),me(ur,{key:0,disabled:e.disabled,readonly:e.readonly},null,8,["disabled","readonly"])):(Be(),me(hr,{key:1,readonly:e.readonly,disabled:e.disabled,"max-size":e.maxSize,"max-count":e.maxCount,accept:e.accept,"model-key":e.modelKey,"model-value":e.modelValue,"is-table":e.isTable,"before-upload":e.beforeUpload,"material-type":e.materialType,"get-container":e.getContainer,"onUpdate:modelValue":a,onSaveTableRow:n},null,8,["readonly","disabled","max-size","max-count","accept","model-key","model-value","is-table","before-upload","material-type","get-container"]))]))}})),yr={class:"upload-design"},br={style:{"pointer-events":"none"}},xr={class:"progress-wrap"},wr={class:"progress-box text-sm"},kr=/* @__PURE__ */C(/* @__PURE__ */we({__name:"upload-design",props:{disabled:{type:Boolean}},setup:e=>(t,l)=>{const a=ze("SvgIcon"),n=ze("a-upload-dragger"),o=ze("svg-icon"),i=ze("a-progress"),s=ze("close-outlined");return Be(),he("div",yr,[fe("div",br,[be(n,{"file-list":[],disabled:e.disabled},{default:tt(()=>[fe("div",null,[be(a,{size:"56",name:"folder"})]),l[0]||(l[0]=fe("p",{class:"ant-upload-text",style:{"font-size":"14px"}}," 点击或将文件拖拽到这里上传 ",-1))]),_:1},8,["disabled"])]),fe("div",xr,[be(o,{size:"32",name:"doc"}),fe("div",wr,[l[1]||(l[1]=fe("div",{class:"left w-full"},[fe("span",{class:"label"},"示例内容.docx"),fe("span",{class:"size ml-16px text-[#C3C3C3]"},"88M")],-1)),be(i,{"stroke-width":4,percent:88})]),be(s,{class:"mt-3px icon"})])])}}),[["__scopeId","data-v-5fd18cf8"]]),Cr=/* @__PURE__ */function(e){return e.JPG="jpg",e.JPEG="jpeg",e.PNG="png",e.BMP="bmp",e.DOCX="docx",e.PDF="pdf",e.XLSX="xlsx",e.DOC="doc",e.MP4="mp4",e.AVI="avi",e.PPT="ppt",e.GIF="gif",e.CER="cer",e}({}),_r=/* @__PURE__ */function(e){return e.EXCEPTION="exception",e.ACTIVE="active",e}({}),Sr=e=>new Promise((t,l)=>{const a=new XMLHttpRequest;a.open("GET",e),a.responseType="blob",a.onload=()=>{if(200===a.status){const e=a.response,l=new FileReader;l.onloadend=()=>{t(e.size)},l.readAsText(e)}else l(`Error ${a.status}: ${a.statusText}`)},a.send()}),Er=e=>e/1024<1?(e/1024).toFixed(2)+"K":e/1024/10<1?(e/1024).toFixed(1)+"K":e/1024/1024<1?(e/1024).toFixed(0)+"K":(e/1024/1024).toFixed(2)+"M",Or=e=>{const t=(null==e?void 0:e.split("."))??[];let l=t[t.length-1]||"png";return l=l.toLowerCase(),[Cr.PNG,Cr.JPG,Cr.JPEG,Cr.BMP,Cr.GIF].includes(l)?"img":[Cr.DOCX,Cr.DOC].includes(l)?Cr.DOC:[Cr.MP4,Cr.AVI].includes(l)?"MP4":l===Cr.PDF?"PDF":l===Cr.CER?"ssl":Object.values(Cr).includes(l)?l:"attachment"},Ir={class:"progress-box"},Tr={class:"progress-item__box pl-10px"},Fr={class:"progress-item__name"},Lr=["onClick"],Dr={key:0,class:"error",style:{color:"red"}},Mr={key:1,style:{color:"var(--ant-primary-color)"}},Br=/* @__PURE__ */we({__name:"base-upload",props:{modelKey:{},modelValue:{},readonly:{type:Boolean},disabled:{type:Boolean},maxCount:{},maxSize:{},accept:{},isTable:{type:Boolean},beforeUpload:{type:Function}},emits:["update:modelValue","onBeforeUpload","saveTableRow"],setup(e,{emit:t}){const l=Re(0),a=Re([]),n=t,o=e,i=de(()=>e=>Or(e)),s=de({get(){try{return o.modelValue?o.modelValue.split(","):[]}catch(e){return[]}},set(e){(null==e?void 0:e.length)>0?n("update:modelValue",e):n("update:modelValue",[])}});Ze(()=>o.modelValue,async()=>{const e=(o.modelValue?o.modelValue.split(","):[]).map(async e=>{const t=void 0+e;return{uid:ue(16,16),path:t,name:e.split("/").at(-1),status:void 0,fileSize:await Sr(t),percentNum:0}});a.value=await Promise.all(e)},{immediate:!0});const r=de(()=>e=>Er(e)),u=de(()=>{const e=ot(o.accept||[]),t=[...new Set(e)],l=[];return t.forEach(e=>{l.push(e),e===e.toLowerCase()&&l.push(e.toUpperCase()),e===e.toUpperCase()&&l.push(e.toLowerCase())}),[...new Set(l)].map(e=>"."+e)}),c=de(()=>null===o.maxCount||void 0===o.maxCount||a.value.length<o.maxCount),d=de(()=>null===o.maxCount||void 0===o.maxCount||o.maxCount>1);async function p({file:e}){l.value+=1,l.value>o.maxCount?l.value-=1:(a.value=[...a.value,{uid:e.uid,name:e.name,fileSize:e.size,path:"",percentNum:0,status:_r.ACTIVE}],await async function(e){let t=a.value.find(t=>t.uid===e.uid)||{};try{await G.beforeUploadFun(e,{maxSize:o.maxSize||5,acceptList:(o.accept||[]).map(e=>"."+e),beforeUpload:async e=>{if(o.beforeUpload&&"[object Function]"===Object.prototype.toString.call(o.beforeUpload))return o.beforeUpload(e)}});const a=setInterval(()=>{t.percentNum&&t.percentNum<95&&(t.percentNum+=1)},100);try{const l=await G.uploadByFile(e,!0,o.modelKey);s.value=[...s.value,l],t=Object.assign(t,{path:void 0+l,percentNum:100,status:void 0}),clearInterval(a),await Ie(),o.isTable&&n("saveTableRow")}catch(i){l.value-=1,console.warn(i),t.status=_r.EXCEPTION,clearInterval(a)}}catch(r){l.value-=1,At.warn(r),a.value.splice(a.value.length-1,1)}}(e))}return(t,n)=>{const o=ze("SvgIcon"),m=ze("a-upload-dragger"),v=ze("svg-icon"),h=ze("a-tooltip"),f=ze("a-progress"),g=ze("close-outlined");return lt((Be(),he("div",null,[lt(be(m,{style:{"margin-bottom":"16px"},disabled:e.disabled,"custom-request":p,multiple:d.value,"file-list":[],accept:u.value+""},{default:tt(()=>[fe("div",null,[be(o,{size:"56",name:"folder"})]),n[0]||(n[0]=fe("p",{class:"ant-upload-text",style:{"font-size":"14px"}}," 点击或将文件拖拽到这里上传 ",-1))]),_:1},8,["disabled","multiple","accept"]),[[Qe,c.value]]),fe("div",Ir,[(Be(!0),he(ce,null,Pe(a.value,(t,n)=>(Be(),he("div",{key:n,class:"progress-item mb-8px w-full"},[be(v,{class:"svg-icon",size:t.status?32:24,name:i.value(t.name)},null,8,["size","name"]),fe("div",Tr,[fe("div",Fr,[be(h,null,{title:tt(()=>[ye(Ke(t.name),1)]),default:tt(()=>[fe("span",{class:"label",onClick:at(e=>async function(e){ee({url:e.path})}(t),["stop"])},Ke(t.name),9,Lr)]),_:2},1024),t.fileSize?(Be(),he("span",{key:0,class:Te(["size",{"mr-40px":t.status}])},Ke(r.value(t.fileSize)),3)):ve("",!0)]),lt(be(f,{"stroke-width":4,percent:t.percentNum},{format:tt(e=>[t.status===We(_r).EXCEPTION?(Be(),he("span",Dr,Ke(We(ne)("sys.component.upload.uploadError"))+"!",1)):(Be(),he("span",Mr,Ke(e+"%"),1))]),_:2},1032,["percent"]),[[Qe,t.status]])]),e.disabled?ve("",!0):(Be(),me(g,{key:0,class:"mt-3px icon",onClick:at(e=>async function(e){l.value-=1,a.value.splice(e,1),s.value.splice(e,1),s.value=[...s.value],await Ie()}(n),["stop"])},null,8,["onClick"]))]))),128))])],512)),[[Qe,!e.readonly]])}}}),jr=/* @__PURE__ */C(Br,[["__scopeId","data-v-65872e0a"]]),Ar={class:"file-list"},Rr={key:0,class:"file-list__header"},Nr=["onClick"],Pr={class:"file-list__item-name"},Ur=["onClick"],zr=["onClick"],$r=/* @__PURE__ */we({__name:"file-list",props:{showType:{},fileList:{},isDesign:{type:Boolean},materialType:{},hasSize:{type:Boolean},nameClick:{type:Function},hideSwitch:{type:Boolean}},emits:["update:showType"],setup(e,{emit:t}){const l=e,a=t,n=Re([]),o=[{icon:"icon-liebiaozhanshi",name:"List",key:"switch_icon_list"},{icon:"icon-kapianzhanshi",name:"Card",key:"switch_icon_card"}];Ze(()=>l.fileList,async e=>{if(!l.isDesign&&l.hasSize){const e=l.fileList.map(e=>e.path.split("/")[2]);n.value=(await _api.apaas.fileResource.postList({ids:e})||[]).map(e=>{const t=void 0;return{path:/^\/w/.test(e.url)?`${t}${e.url}`:`${t}/${e.url}`,name:e.name,size:e.size}})}else n.value=e.map(e=>"string"==typeof e?{name:i(e),path:e}:e)},{immediate:!0});const i=e=>{const t=e.split("/");return t[t.length-1]},s=de(()=>e=>"external"===(null==e?void 0:e.type)?"link":Or((null==e?void 0:e.name)??e)),r=de(()=>e=>Er(e));async function u(e){l.isDesign||(l.nameClick&&vt(l.nameClick)?l.nameClick(e):ee({url:e.path}))}return(t,l)=>{const i=ze("svg-icon"),c=ze("a-tooltip");return Be(),he("div",Ar,[e.hideSwitch?ve("",!0):(Be(),he("div",Rr,[(Be(),he(ce,null,Pe(o,t=>fe("div",{key:t.key,class:Te(["switch-item",[e.showType===t.name&&"selected"]]),onClick:at(()=>{a("update:showType",t.name)},["stop"])},[fe("i",{class:Te(["iconfont",t.icon])},null,2)],10,Nr)),64))])),fe("div",{class:Te(["file-list__list","Card"===e.showType?"flex-card":"flex-list",e.hideSwitch?"hide-switch":""])},[(Be(!0),he(ce,null,Pe(n.value,(t,l)=>(Be(),he("div",{key:l,class:Te(["file-list__item",e.isDesign?"is-design":"",{"material-table-field":e.materialType===We(P).MaterialTableField}])},[be(i,{class:Te(["file-list__item-svg",e.hasSize?"":"no-size"]),size:"Card"===e.showType?32:24,name:s.value(t)},null,8,["class","size","name"]),fe("div",Pr,[e.isDesign?(Be(),he("span",{key:0,onClick:at(e=>u(t),["stop"])},Ke(t.name),9,Ur)):(Be(),me(c,{key:1},{title:tt(()=>[ye(Ke(t.name),1)]),default:tt(()=>[fe("span",{onClick:at(e=>u(t),["stop"])},Ke(t.name),9,zr)]),_:2},1024))]),fe("span",{class:Te(["file-list__item-size",[e.isDesign?"is-design":""]])},Ke(e.hasSize?r.value(t.size):""),3)],2))),128))],2)])}}}),Vr=/* @__PURE__ */C($r,[["__scopeId","data-v-543b5221"]]),Hr={class:"field-upload-wrapper w-full"},Kr=/* @__PURE__ */we({__name:"FieldUpload",props:{modelKey:{},modelValue:{},readonly:{type:Boolean},disabled:{type:Boolean},isDesign:{type:Boolean},maxSize:{},maxCount:{},accept:{},materialType:{},isTable:{type:Boolean},beforeUpload:{type:Function},nameClick:{type:Function},hideSwitch:{type:Boolean}},emits:["update:modelValue","onBeforeUpload","saveTableRow"],setup(e,{expose:t,emit:l}){const a=e,n=Re("List"),o=l,i=de(()=>!ct(a.modelValue)),s=qe(()=>ct(a.modelValue)?a.modelValue:ft(a.modelValue)?(a.modelValue?a.modelValue.split(","):[]).map(e=>({path:e,name:e.split("/").at(-1),size:a.isDesign?88e6:0})):a.modelValue||[]),r=e=>o("update:modelValue",e),u=e=>{n.value=e},c=()=>{o("saveTableRow")};return t({getShowType:()=>n.value}),(t,l)=>(Be(),he("div",Hr,[e.readonly&&s.value.length?(Be(),me(Vr,{key:0,"is-design":e.isDesign,"hide-switch":!!e.hideSwitch,"file-list":s.value,"material-type":e.materialType,"show-type":n.value,"name-click":e.nameClick,"has-size":i.value,"onUpdate:showType":u},null,8,["is-design","hide-switch","file-list","material-type","show-type","name-click","has-size"])):ve("",!0),e.readonly?ve("",!0):(Be(),he(ce,{key:1},[e.isDesign?(Be(),me(kr,{key:0,disabled:e.disabled},null,8,["disabled"])):(Be(),me(jr,{key:1,readonly:e.readonly,disabled:e.disabled,"max-size":e.maxSize,"max-count":e.maxCount,accept:e.accept,"model-key":e.modelKey,"model-value":e.modelValue,"is-table":e.isTable,"before-upload":e.beforeUpload,"onUpdate:modelValue":r,onSaveTableRow:c},null,8,["readonly","disabled","max-size","max-count","accept","model-key","model-value","is-table","before-upload"]))],64))]))}}),Gr=r(Kr),qr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAABRCAYAAACqj0o2AAAAAXNSR0IArs4c6QAADeJJREFUeF7lXAl0lNUV/t4/k8m+T8IWspCETSkCWkFtIbVVKSCIFClgjQgFLVawrdBTrfboOQWXAkpZSohpCQpVEMoieMBEBYsixQUDmgkz2dhmsg9kkvnnfz3vTybOTCYz/2TeP7H1nZNzksx997/3m/vevf99912CEI/TRmNCHImZApC7KHAbgExOItSA4AiA0hapZe+YrKxGTnz9siF+KTgQlJSUaNOzRt8nwTGHgUcALQe2PlhQGwOTAMVV1LorLyuL/a3aUBXEz8pr0qLDIhYDWAogQTUtfMEJahEIKbBJ0rrrslIvqSGDKiBWV1sGtUl4jlLMV9/qlMJCbZRgU7tEV/MGkyuIJUZjRLoQt4JSaSVAIpSqF1o6GcxVNZJ1Na9lzg3EClP9FAppLYCc0ILS66eZNBpNftbgxPd6zaFzYtAgMusbTGJeAcjCYIXpk/kEm6qlluXBWGVQIFZVNWbbJXE/BYb3CQCcHkqBcxC0U3PTEyp6w7LXILLlK0HaQYCY3jz42zaHAlYIZFZuevLhQGXrFYiGSvNiSsn6b4/nDVRt7/QUEAVCfpudkbwuEI4Bg1hRWfc0pfSZQB7yv0ZLCHkmOyP5T0rlDgjE7wKATuACAVIxiBWVdY9RSlkI890ZhC7JyUjZ7E9hRSCWV9XdCYnu/3/bA/2BI++REGZkZyYd8EXrF0QWxrRJ4qf/L17YH3Cen3d4be0NvsIfnyDKr3Ek9nQo40BJktDU2Ix2ux1ajQaxcTHQ6XSB6s6VnsWRNbRlTE8BuU8QDZWWjaBYwlUiL8zqLPUwGIw4f96EmuoLcDgcblR6fTJycrMwYuQw9OuXorY4XvlTkILczORF3j7sEURjdcNEh8NRqpbEzOK+PHMOpz75FJcuXVH8mPT0NIyfcCOGZPPK5Sp+NAiEqd72R68gdrwPx57lmHXukpSB98XnZTj2wQm0tFiVa+BBmTs0G5PybkVyclKveQQ+kRqqqXWU57L2CmJ5pflpQgn3gLq29iLePngEFnNd4PJ7maHRaDBhwk0Yf8uN0GpVTpZ3Pt9b/NgNxC+NV/qHE2LknQ/86MQpvFd6DJJEuQDoyiQ1NQVTpt0Rov2S2qi9LTc3N62mKzD31Ki80ryGULKMl6Zs+TLrY0tYzcGsMj0jDSNHDsOIkUPVtUyCopwM/YNeQVTDCt/avR9fnTOoiV833tHRURg/4SaMGTtKFTBZEH7Nbssa3WmNbsu5otLyZ0qxkpfG77/3IT48/jEvdgHzYcv8nplTkJikyhnZczmZ+qeYUF0gMo+cRmKqCYg+YGm9TKiqrMFr29/kwSooHmFhYTKQKoREjdXGL1Ly8vLELhArTPXzKKTioCR2mVxYsB1Xrph5sQuKD9svfzZ7OjKz0oPi4zmZgM7PzkzZ3gWiwWR+mx2s83jK119VYPeufTxYceMRHh6OBQ/NQ3xCHDeeFNifm6mfJoPISjtiScxFXmHN3j0Hcbbsa27C8mLEvPb0GT/lxQ7MwVhpS4oMoqHS8gAoinhx3/DXQjQ3NfNi55fPuDHDUXG+Fo1NLT5pBYHg18uWICIi3C9PpQQEAitQkEF8FRT5Sif6ohNFES8+v54HK0U8MjMGYPmv5sB6tRWF/9iHCmOtz3mz75vB1cmwep8OEE2WagBpiqT2Q8TSWBs3FPJg5ZdHdHQkVj5+P5KT4mVau13E5sI9KDtn7HHuxEm3YsItN/nlHQCBiZSX16SRsAgGIpdhNluwdQs3J9+jTFqtBo8smonhQ92zOQ6HhIKivfjsjPcA/4Yxo3DX5Nu56OpkQsqrLNOJhD28uF6+bMarW7fzYueVT7guDIsfmtENQCcxs8iNBbtx7uvKbvNZ9ufeWdO4ykcqKi0rKMUqXlwb6huxeRM3H9VNLLYH5s+bgtSURJ8iX2u1YfVftsFsca/1zMgcjJ/PvZeXujIfwtOpMIbXrrXi5bV+D8gCViJtYCryJo7D98eNhEYjKJpvNF3AS6+85pY5YkndufNnKZqvlIgYTJYSAJOUTlBC98LqV7ql+D3nsXAjK2MgBgzQIz42Wv7YIUloa7PLvwuCgJjoSPTvl4S0QaldzkPJ811pdu0txdHSk13/UglEczlAuJbDbdr4Khobmrzqyzzq3ZNvw7ixwxEVqX4JI1vWTz37N7S2tsnyqLKcy01mM6+kgxO1nTvegvF89009fXA/LF5wDxITYgM1qKDoDxw6jgOHP5R58H5rkffEcpPFzvtQvrTkGE78+xM3xVP0CVjx+P0hsT5PxK1XbVj5x/Xy3qhKiGMwWbjn68vKvsK/9rzdpQuL6Z584kG/HjUoc/MzecOWXThTdh4qBNtgjoU7iFbrVax/eUuXWrNn3o5JPxirJkZ+eR8/8Tm27zyMGfdMwfARuX7pAyEgBpO5lVf2xvXBRYWvyefJLDRhy1hpWBKI8IHQ1tU3yQ7m4UcWcE2Hde6J/B0LY8wO5Uve/QC/WzYfgwelBqKvarSr1mzH3PmzufNnjuUsUaHmOi6KoPaCWT7GTIjWQKvxWzvFXTknw9Z2CS3XJEj2q9DootHazncHUyXYZsInxgggIKi3OpAYLSA2SqMaSP4YX24U0WanSEvWwtLsgM3OGcRyk2UbAeb7EyTQz8PDCJJiNbhYLyJSR5ASH5oKBU85JUpRaxGh0xLo4zW4UCeyjDTXwSzxDwCe48q1k5k+TgOrTUJspIBInbL3Xd5yUAo0X3OAEKBdBK61SbwfAe6pME8J+3opO+W5UG+H6F6xxw1M7klZT8nYMuqf2DdL2SkL2w/ZvqjWcB4PsHy6agV/AxK1CNP2nXdusDrQ0sp/GbMvhQI1smYVJss2qoJzcX7zcVGCHOb0xWDvy7UqOJMuXQiKOkHkW/3gCZZAgIFJWrAcYqhH01UHmq6pY4WyLgT5XYf3MSTWzDub4wpYfJSA+BBbo0OiuFAvgnlodQa1tVDrgC7TKDdZ9hFgqjoPA/rCGutbHHKIpd6gh3IyUya7FDSZ51EQVc86o8MFJMeFZm9kbyVXVPTIHStZmJ+dmfRNQRPrGDI4axQr41KlmM9pDSwAjwpXN/AWHR0hjUNFI6SglhpqHcyK4N12eoPJ8iyAJ9Uz/45l3Y+FPColJNj+Z24WYeOcZPDEhPWRyM3Q/77DIl0Gq4ZAWIRRTQfDHsdOPPslaLlndkIFIEBtbZRmObuadIs5eJ9D92TVDEh9nBYsUcFjsCXMMjTtomquuEtMSuja3IyU5c5/dNOgozYnnB2jqn6eyR7OAvG4KI2cIOjtYB6YvZWoF8q4SuZuhd2Ws5M01JfDtRogNlKDmAhBMZgMMJaRaW6VYA+B9TmxoYQ+k5uR4nYr38e1tJgveB/q+7M0Zo0RYQQROkHO/3kudZYbvGqjaLNLcnY6NJbnJrWpmraMUHQtjU3rbBa035/ian0epgUGJIa5sWf7HnsD6atBNZpJuV6aEfm+qmuq2wLQkDUNYpYYptWAgEKnZUcM7oE5e40zN4lgN9tYDBhSSyTYlJOhf9jbF+j30ngaiT2txkGWUxh2ba3s7DmcOVOGEcOyMHP6HaCUQrK3QRLbu8tMCAStTv5hxU/FO/dj4MCBGDaU71mymysJ5tI4Y2QwXMmhWoEByb2JUHVNDQ4efAd19fWyzKwS7LFHHsD11w2V/6aUndC1y2ASIkAI04FowkA6Xfnrb+zHkXePy7Ts9lTepB8ie0gW19XO2hcQURqTk5Pa4906RYFFZzemPbyCcGZ9JaXv46OP3et1mPaJCXF4auVSxMd/U/S07+BRTLh5LPTJ3xR2vn/8JP5evLsbYKNHj8KdP7mdy50+dsUCApnqr2uTIhBli6w0LwYlm4L9mtntgjd37cF5o6lHVtePHIrlj3Zc4nRaW3JyIp5YvkgGstxgwkvrtsIuencyaWmDMHPG3YiJ6ah77O0ghCxT0q1JMYiyxw6yO5MSAJ0K3zvjTlRVX8TJU593YcCAXJQ/G5u3vo6GRt/3ZFL0ejzwi7m9bsKhSnMhpybBAHn4naM49Z/TvTWMgOcNGZKJ2bNmynttICMQABnfgCzRBcjHJEpfDGSPrDhvxM5/7gpEFy60P8qbiPE3K7u3wvZAQuhSJV2ZXIXrFYiMQWfXpjeVeG22jDdvKURTCK+qOZVkN0x/uTAfiYm+bxswLyxAmOOvG5O3b7bXIMrOpiP8YccKPptQfnzyFI4cZfX1fTO+N+o6TJ0yuceHs+ZBRJSm+QpjfEkeFIiMsdz+RYhd46sJ0cbNBWhoCFnv8G76slPGhxcvRHx8x/U110FBC2qo9dE+a4fqKkx5dcNE4nCwW0BuRQAsoN5WvKNvTNDlqV72RgOBsKw3y9dTmaAt0ZWh3AJBiFlB5D4SHfnIo++Weg2qQ41q//79sCD/fvYeZCNEWFUlNX/7WkS7gsK6mugEwsBcUlhUHHHp0uVQY+ZtSYvLly0t1hH6lGtPGx6CcbVET4EYmGtfWPcbh0NcCEJUPUXs2WvQRgoU2MX2zcVb16jSW0ZVEJ2K5efnR5DIAfcRic6Rr8ARqH30wHLdhwiwo6Wuee8bb2zofVMyBaYaEhBd5cjPX5agi4ueLrY7Jmm12h+LosjlsjoAE6X0GCHkkGSzHSgqWhuycCDkIHp+sU+vfjntUq1lnOQQh4OS4ZRKmSAkDRQJIDRBkmhHcSOFDaBWjUZjESXHJZ1OV9Pebj8HSs+0O+ip7QXPd/XuUmA8XEn+CzYbSUiSvfM/AAAAAElFTkSuQmCC",Yr=["src"],Wr=["title"],Jr={class:"rounded-50% border w28px h28px ks-row-center-middle text-[var(--ant-primary-color)]"},Xr={key:1,class:"text-[#3168EC] text-[12px] px4px rounded-4px",style:{backgroundColor:"hsl(from #3168EC h s 92%)"}},Qr={key:0,class:"mt8px primary-gct ks-row"},Zr=/* @__PURE__ */C(/* @__PURE__ */we({__name:"user-list",props:{data:{},tagName:{}},setup(e){const t=Re(!1);return(l,a)=>{var n,o;const i=ze("up-outlined");return Be(),he("div",null,[fe("div",{class:"user-list ks-row-middle cursor-pointer flex-wrap",onClick:a[0]||(a[0]=l=>e.data.length>3&&(t.value=!0))},[(Be(!0),he(ce,null,Pe(null===(n=e.data)||void 0===n?void 0:n.filter((e,l)=>t.value||l<3),(e,t)=>(Be(),he("div",{key:t,class:"user-list-item border w76px p4px ks-row-middle"},[fe("img",{src:e.avatar?"/minio/"+e.avatar:We(qr),width:"20",height:"20",style:{"border-radius":"50%"}},null,8,Yr),fe("div",{class:"ml8px ell",title:e.username,style:{"line-height":"20px"}},Ke(e.username),9,Wr)]))),128)),(null===(o=e.data)||void 0===o?void 0:o.length)>3&&!t.value?(Be(),he(ce,{key:0},[fe("div",Jr," +"+Ke(e.data.length-3),1),a[2]||(a[2]=fe("div",{class:"text-[#8F8F8F] ml4px mr12px"},"...",-1))],64)):ve("",!0),e.tagName?(Be(),he("div",Xr,Ke(e.tagName),1)):ve("",!0)]),t.value?(Be(),he("div",Qr,[fe("span",{class:"cursor-pointer",onClick:a[1]||(a[1]=e=>t.value=!t.value)},[ye(Ke(l.$t("sys.collapse"))+" ",1),be(i)])])):ve("",!0)])}}}),[["__scopeId","data-v-27aa2bf0"]]),eu=Re(),tu=Re({});function lu(e){const t=null==e?void 0:e.parentElement,l=null==t?void 0:t.scrollHeight,a=null==t?void 0:t.clientHeight;return l&&a&&l>a?t.clientHeight:t?lu(t):0}function au(e,t){tu.value[e.value.toString()]=o(e.value,l=>{const a=l[0].target.clientHeight;a&&(eu.value=lu(e.value),t&&"function"==typeof t&&t(a&&eu.value&&a>eu.value,eu.value,a))})}Le(()=>{for(const l in tu.value){var e,t;null===(e=tu.value[l])||void 0===e||e.unobserve(l),null===(t=tu.value[l])||void 0===t||t.disconnect()}});var nu="data:image/svg+xml,%3csvg%20width='120'%20height='69'%20viewBox='0%200%20120%2069'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.542236'%20width='119'%20height='67'%20rx='1.5'%20fill='%23F7F8FA'/%3e%3crect%20x='0.5'%20y='0.542236'%20width='119'%20height='67'%20rx='1.5'%20stroke='%23E8EBF0'%20stroke-dasharray='2%202'/%3e%3cg%20clip-path='url(%23clip0_124_7598)'%3e%3cpath%20d='M58.1246%2022.8954H61.7906L58.8902%2027.4266L64.7498%2031.449L59.5724%2041.475L60.0404%2045.189L58.8332%2040.206L60.521%2032.604L55.9316%2027.426L58.1246%2022.896V22.8954Z'%20fill='%23CCCCCC'/%3e%3cpath%20d='M56.1047%2022.938H48.8951C48.4205%2022.938%2048.0371%2023.3202%2048.0371%2023.7942V44.2704C48.0371%2044.7444%2048.4205%2045.1278%2048.8945%2045.1278H59.6711L56.4311%2040.2054L56.7791%2038.7474L53.8385%2035.2626C53.8185%2035.2386%2053.7935%2035.2194%2053.7653%2035.2062C53.737%2035.193%2053.7062%2035.1861%2053.675%2035.1861C53.6438%2035.1861%2053.613%2035.193%2053.5848%2035.2062C53.5565%2035.2194%2053.5315%2035.2386%2053.5115%2035.2626L49.9655%2039.468V24.8664H55.1711L56.1041%2022.938H56.1047ZM65.6549%2034.4406L70.1087%2039.723V24.8664H63.2951L64.5299%2022.938H71.1803C71.6543%2022.938%2072.0371%2023.3208%2072.0371%2023.7948V44.271C72.0371%2044.745%2071.6543%2045.1284%2071.1803%2045.1284H60.8633L61.4285%2041.8044L65.6549%2034.4412V34.4406ZM55.3679%2033.3534C55.0812%2033.4766%2054.7728%2033.5417%2054.4607%2033.5448C54.1486%2033.5479%2053.839%2033.489%2053.5499%2033.3715C53.2608%2033.254%2052.9978%2033.0802%2052.7764%2032.8603C52.555%2032.6404%2052.3794%2032.3786%2052.2599%2032.0903C52.1405%2031.802%2052.0795%2031.4928%2052.0804%2031.1807C52.0814%2030.8686%2052.1444%2030.5598%2052.2657%2030.2722C52.387%2029.9846%2052.5642%2029.724%2052.787%2029.5055C53.0098%2029.287%2053.2738%2029.1149%2053.5637%2028.9992C54.1393%2028.7695%2054.7821%2028.7758%2055.3531%2029.0166C55.9241%2029.2574%2056.3773%2029.7135%2056.6145%2030.286C56.8517%2030.8585%2056.8539%2031.5014%2056.6206%2032.0755C56.3873%2032.6496%2055.9372%2033.1087%2055.3679%2033.3534ZM55.2161%2031.1754C55.2161%2030.7608%2054.8807%2030.4254%2054.4661%2030.4254C54.0509%2030.4254%2053.7161%2030.7608%2053.7161%2031.1754C53.7161%2031.5912%2054.0509%2031.9254%2054.4661%2031.9254C54.8807%2031.9254%2055.2161%2031.5912%2055.2161%2031.1754Z'%20fill='%23CCCCCC'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_124_7598'%3e%3crect%20width='24.5859'%20height='24'%20fill='white'%20transform='translate(47.707%2022.0422)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ou=["title"],iu={key:0,class:"text-[#666666] text-[12px] font-400"},su={class:"ml4px"},ru={class:"process-node-content rounded-4px"},uu={class:"process-node-content-left mr12px"},cu={class:"avatar-wrap w42px"},du={class:"ks-row-center"},pu=["src"],mu=["title"],vu={class:"process-node-content-main ks-col"},hu={class:"p8px bg-[#FFFFFF] rounded-4px min-h100% pr8px"},fu={class:"ks-row text-[14px]"},gu=["title"],yu={key:0,class:"ks-row text-[#666666] mt8px"},bu={class:"mr2px"},xu={class:"bg-[#FFFFFF] pr8px process-node-content-right w148px text-right text-[#8F8F8F] ks-column p8px"},wu={key:0,class:"ks-col ks-row-end justify-end"},ku=/* @__PURE__ */we({__name:"approval-node",props:{data:{},titleHeight:{},isDesign:{type:Boolean},hiddenSignature:{type:Boolean},hiddenOpinion:{type:Boolean},isCompeleted:{type:Boolean}},setup(e){const t=e,l=Re(),a=Re(!1),n=Re(Boolean(t.data.expand));function i(){n.value=!n.value}Ze(()=>t.data.expand,e=>{n.value=Boolean(e)});const s={[M.Approve]:"#309C41",[M.Countersign]:"#6931EC",[M.Reassign]:"#31B4EC",[M.Refuse]:"#DB0000",[M.Reject]:"#DB0000"},r=de(()=>t.data.approvalList.filter(e=>e.approval).map(e=>{if(e.approval===M.Countersign)e.userList=e.countersignUsers.map(e=>({...e,username:e.fullname}));else if(e.approval===M.Reassign){var t;e.userList=e.reassigner?[{...e.reassigner,username:null===(t=e.reassigner)||void 0===t?void 0:t.fullname}]:[]}try{const t=e.signature?JSON.parse(e.signature).url:"";return{...e,signature:t}}catch(l){return e}})),u=de(()=>t.data.approvalList.filter(e=>!e.approval));return De(()=>{var e,n;t.isDesign||(e=l,n=e=>{a.value=e},tu.value[e.value.toString()]=o(e.value,e=>{const t=e[0].target.clientHeight;t&&n&&n(t&&eu.value&&t>eu.value,eu.value)}))}),(t,o)=>{var c;const d=ze("up-outlined"),p=ze("down-outlined"),m=ze("a-image");return Be(),he("div",{ref_key:"approvalNodeRef",ref:l},[fe("div",{class:Te(["process-node-title text-[14px] font-500 mb8px ks-row-middle",[a.value&&"sticky-node"]]),style:Fe({"--type-color":"#309C41","--sticky-top":`${e.titleHeight||0}px`,"--status-color":e.isCompeleted?"#3168EC":"#309C41"})},[fe("div",{class:"ell ks-col break-all",title:e.data.name},Ke(e.data.name),9,ou),e.data.startTime?(Be(),he("div",iu,[ye(Ke(e.data.startTime)+" ",1),r.value.length>5?(Be(),he("span",{key:0,class:"ml12px text-[var(--ant-primary-color)] cursor-pointer",style:{display:"inline-flex","align-items":"center"},onClick:i},[ye(Ke(n.value?t.$t("sys.collapse"):t.$t("sys.unfold"))+" ",1),fe("span",su,[n.value?(Be(),me(d,{key:0})):(Be(),me(p,{key:1}))])])):ve("",!0)])):ve("",!0)],6),fe("div",ru,[(Be(!0),he(ce,null,Pe(r.value.filter((e,t)=>n.value||t<5),(l,a)=>{var n;return Be(),he("div",{key:a,class:"ks-row mb8px bg-[#FBFBFC] p8px"},[fe("div",uu,[fe("div",cu,[fe("div",du,[fe("img",{src:l.avatar?"/minio/"+l.avatar:We(qr),alt:"",width:"32",height:"32",style:{"border-radius":"50%"}},null,8,pu)]),fe("div",{class:"ell text-[12px] text-[#666666] mt4px text-center break-all",title:l.username},Ke(l.username),9,mu)])]),fe("div",vu,[fe("div",hu,[fe("div",fu,[fe("div",{class:"mr8px",style:Fe({wordBreak:"keep-all",color:s[l.approval]})},Ke(t.$t(`sys.process.paasBpmnButtonEvent.${l.approval}`)),5),lt(fe("div",{class:"ell-3 ks-col text-[#666666] break-all",title:l.approvalMsg},Ke(l.approvalMsg),9,gu),[[Qe,!e.hiddenOpinion]])]),!e.hiddenSignature&&l.signature?(Be(),he("div",yu,[fe("div",bu,Ke(t.$t("sys.model.sign")),1),l.signature?(Be(),me(m,{key:0,width:64,height:36,src:e.isDesign?l.signature:`/minio/${l.signature}`,fallback:We(nu)},null,8,["src","fallback"])):ve("",!0)])):ve("",!0),l.userList&&(null===(n=l.userList)||void 0===n?void 0:n.length)?(Be(),me(Zr,{key:a,class:"mt8px",data:l.userList},null,8,["data"])):ve("",!0)])]),fe("div",xu,[fe("div",null,Ke(l.endTime),1),l.duration?(Be(),he("div",wu,Ke(t.$t("sys.integration.timeConsuming"))+": "+Ke(l.duration),1)):ve("",!0)])])}),128)),(null===(c=u.value)||void 0===c?void 0:c.length)?(Be(),me(Zr,{key:e.data.key,class:"process-node-content bg-[#FBFBFC] rounded-4px p8px",data:u.value,"tag-name":t.$t("sys.process.status.approving")},null,8,["data","tag-name"])):ve("",!0)])],512)}}}),Cu=/* @__PURE__ */C(ku,[["__scopeId","data-v-a88d7ef9"]]);var _u=["title"],Su={key:1,class:"py8px ks-row-middle"},Eu=["title"],Ou={class:"text-[12px] text-[#474747]"},Iu={key:0,class:"bg-[#FFFFFF] rounded-4px p16px text-[12px]"},Tu={key:0,class:"py8px"},Fu={key:1,class:"process-node-wrap pl16px"},Lu=["title"],Du={key:0,class:"text-[#666666] text-[12px] font-400"},Mu={key:2,class:"process-node-content bg-[#FBFBFC] rounded-4px ks-row p8px"},Bu={class:"process-node-content-left mr12px"},ju={class:"avatar-wrap w42px"},Au={class:"ks-row-center"},Ru=["src"],Nu=["title"],Pu={class:"process-node-content-main ks-col"},Uu={key:1,class:"node-type-msg"},zu={class:"process-node-content-right w148px text-right text-[#8F8F8F] ks-column"},$u={key:0,class:"ks-col ks-row-end justify-end"},Vu={key:1},Hu={key:0},Ku={key:1},Gu={key:2},qu=/* @__PURE__ */we({__name:"paas-bpmn-log",props:{instanceId:{},showTitle:{type:Boolean},title:{},isTable:{type:Boolean},hiddenOpinion:{type:Boolean},hiddenSignature:{type:Boolean},isDesign:{type:Boolean},info:{}},setup(e){const t=e,l=Re(),a=Re(!1),n=Ct.PRESENTED_IMAGE_SIMPLE,{logDetail:o,init:i}=function(){const e=Re();return{logDetail:e,init:function(t){!async function(t){e.value=await _api.apaas.processApprovalLog.getApproveHistory({id:t})||{}}(t)}}}(),s=de(()=>{let e=0;return t.showTitle&&t.title&&(e+=40),t.isTable||(e+=40),e}),r=de(()=>{var e;return((null===(e=o.value)||void 0===e?void 0:e.processHistoryList)??[]).reduce((e,t)=>(t.type===F.BpmnEnd||(t.type===F.BpmnApproval?e.push(...(t.approvalList.filter(e=>e.approval)||[]).map(e=>{try{const l=e.signature?JSON.parse(e.signature).url:"";return{...e,signature:l,name:t.name}}catch(l){return{...e,name:t.name}}})):e.push(t)),e),[])});return Ze(()=>t.instanceId,e=>{e&&i(e)},{immediate:!0}),De(async()=>{t.isDesign?o.value=t.info:au(l,e=>{a.value=e})}),(t,i)=>{var u,c,d,p,m,v,h;const f=ze("a-empty"),g=ze("vxe-column"),y=ze("a-image"),b=ze("vxe-table");return Be(),he("div",{ref_key:"histortyRef",ref:l,class:"approval-history relative"},[fe("div",{class:Te(["approval-history-title w100% text-[16px] text-[#242424]",[a.value&&"sticky-node"]])},[e.showTitle?(Be(),he("div",{key:0,class:"pt6px pb8px font-500 ell break-all",title:e.title},Ke(e.title),9,_u)):ve("",!0),!e.isTable&&(null===(u=We(o))||void 0===u?void 0:u.duration)?(Be(),he("div",Su,[(null===(c=We(o))||void 0===c?void 0:c.status)?(Be(),he("div",{key:0,class:"ell ks-col break-all",title:t.$t("sys.process.processStatus",{status:t.$t(We(W)[null===(d=We(o))||void 0===d?void 0:d.status]||"")})},Ke(t.$t("sys.process.processStatus",{status:t.$t(We(W)[null===(p=We(o))||void 0===p?void 0:p.status]||"")})),9,Eu)):ve("",!0),fe("div",Ou,Ke(t.$t("sys.pageDesigner.totalTimeSpent"))+":"+Ke(null===(m=We(o))||void 0===m?void 0:m.duration),1)])):ve("",!0)],2),e.isTable?(Be(),he("div",Vu,[be(b,{data:r.value,height:264,"show-overflow":"title","column-config":{resizable:!0},class:Te({default:!0})},{empty:tt(()=>[be(f,{image:We(n)},null,8,["image"])]),default:tt(()=>[be(g,{type:"seq",title:t.$t("sys.pageDesigner.index"),width:"60"},null,8,["title"]),be(g,{field:"name",title:t.$t("sys.appDesigner.approval.nodeName"),"min-width":"100px"},null,8,["title"]),be(g,{field:"username",title:t.$t("sys.pageDesigner.handler"),"min-width":"100px"},null,8,["title"]),be(g,{field:"message",title:t.$t("sys.pageDesigner.handleOperation"),"min-width":"160px"},{default:tt(({row:e})=>[e.type===We(F).BpmnApproval?(Be(),he("div",Hu,Ke(t.$t(`sys.process.paasBpmnButtonEvent.${e.approval}`)),1)):e.type===We(F).BpmnMessage?(Be(),he("div",Ku,[lt(fe("span",null,[ye(Ke(t.$t("sys.pageDesigner.numOfSuccesses",{num:e.success}))+" ",1),lt(fe("span",null,",",512),[[Qe,e.error]])],512),[[Qe,e.success]]),lt(fe("span",null,Ke(t.$t("sys.pageDesigner.numOfError",{num:e.error})),513),[[Qe,e.error]])])):(Be(),he("div",Gu,Ke(e.message),1))]),_:1},8,["title"]),be(g,{field:"endTime",title:t.$t("sys.pageDesigner.handleTime"),"min-width":"180px"},null,8,["title"]),e.hiddenOpinion?ve("",!0):(Be(),me(g,{key:0,field:"approvalMsg",title:t.$t("sys.appDesigner.approval.opinion"),"min-width":"90px"},null,8,["title"])),e.hiddenSignature?ve("",!0):(Be(),me(g,{key:1,field:"signature",title:t.$t("sys.model.sign"),"min-width":"80px"},{default:tt(({row:t})=>[t.signature?(Be(),me(y,{key:0,width:38,height:22,src:e.isDesign?t.signature:`/minio/${t.signature}`,fallback:We(nu)},{previewMask:tt(()=>[...i[0]||(i[0]=[fe("i",{class:"iconfont icon-chakan1"},null,-1)])]),_:1},8,["src","fallback"])):ve("",!0)]),_:1},8,["title"]))]),_:1},8,["data"])])):(Be(),he("div",Iu,[(null===(v=We(o))||void 0===v||null===(v=v.processHistoryList)||void 0===v?void 0:v.length)?(Be(),he("div",Fu,[(Be(!0),he(ce,null,Pe((null===(h=We(o))||void 0===h?void 0:h.processHistoryList)??[],(l,a)=>{var n,i,r,u,c;return Be(),he("div",{key:a,class:"process-node"},[l.type===We(F).BpmnApproval?(Be(),me(Cu,{key:a,data:l,"title-height":s.value,"is-design":e.isDesign,"hidden-opinion":e.hiddenOpinion,"hidden-signature":e.hiddenSignature,"is-last-node":a===((null===(n=We(o))||void 0===n||null===(n=n.processHistoryList)||void 0===n?void 0:n.length)??0)-1,"is-compeleted":(null===(i=We(o))||void 0===i?void 0:i.status)!==We($).COMPLETED&&a===((null===(r=We(o))||void 0===r||null===(r=r.processHistoryList)||void 0===r?void 0:r.length)??0)-1},null,8,["data","title-height","is-design","hidden-opinion","hidden-signature","is-last-node","is-compeleted"])):(Be(),he("div",{key:1,class:"process-node-title text-[14px] font-500 mb8px ks-row-middle",style:Fe({"--type-color":"#309C41","--status-color":(null===(u=We(o))||void 0===u?void 0:u.status)!==We($).COMPLETED&&a===((null===(c=We(o))||void 0===c||null===(c=c.processHistoryList)||void 0===c?void 0:c.length)??0)-1?"#3168EC":"#309C41"})},[fe("div",{class:"ell ks-col break-all",title:l.name},Ke(l.name),9,Lu),l.startTime?(Be(),he("div",Du,Ke(l.startTime),1)):ve("",!0)],4)),l.type!==We(F).BpmnEnd&&l.type!==We(F).BpmnApproval?(Be(),he("div",Mu,[fe("div",Bu,[fe("div",ju,[fe("div",Au,[fe("img",{src:l.avatar?"/minio/"+l.avatar:We(qr),width:"32",height:"32",style:{"border-radius":"50%"}},null,8,Ru)]),fe("div",{class:"ell text-[12px] text-[#666666] mt4px text-center break-all",title:l.username},Ke(l.username),9,Nu)])]),fe("div",Pu,[l.type===We(F).BpmnSubmit||l.type===We(F).BpmnJs?(Be(),he("div",{key:0,class:"node-type-msg circle",style:Fe({"--type-color":l.type===We(F).BpmnSubmit?"#3168EC":"#309C41"})},Ke(l.message),5)):l.type===We(F).BpmnMessage?(Be(),he("div",Uu,[lt(fe("span",{class:"text-[#309C41] mr14px"},Ke(t.$t("sys.pageDesigner.numOfSuccesses",{num:` ${l.success} `})),513),[[Qe,l.success]]),lt(fe("span",{class:"text-[#F54547]"},Ke(t.$t("sys.pageDesigner.numOfError",{num:` ${l.error} `})),513),[[Qe,l.error]])])):ve("",!0)]),fe("div",zu,[fe("div",null,Ke(l.endTime),1),l.duration?(Be(),he("div",$u,Ke(t.$t("sys.integration.timeConsuming"))+": "+Ke(l.duration),1)):ve("",!0)])])):ve("",!0)])}),128))])):(Be(),he("div",Tu,[be(f,{image:We(n)},null,8,["image"])]))]))],512)}}}),Yu=/* @__PURE__ */C(qu,[["__scopeId","data-v-c85122b0"]]),Wu=/* @__PURE__ */we({__name:"full-screen",props:{el:{type:Object,default:null}},setup(e){const{toggle:t,isFullscreen:l}=u(e.el),a=Re(!0),n=()=>{a.value=!1,t(),setTimeout(()=>{a.value=!0},100)};l.value=!!document.fullscreenElement;const o=de(()=>We(l)?ne("sys.tooltipExitFull"):ne("sys.tooltipEntryFull"));return(e,t)=>a.value?(Be(),me(We(Mt),{key:0,title:o.value,placement:"bottom","overlay-class-name":"gct-full-screen-wrap"},{default:tt(()=>[fe("span",{class:"text-16px gct-full-screen-box",onClick:n},[We(l)?(Be(),me(We(Qt),{key:1})):(Be(),me(We(Zt),{key:0})),Ue(e.$slots,"default")])]),_:3},8,["title"])):ve("",!0)}}),Ju=/* @__PURE__ */we({name:"CodeEditor",props:{value:{type:String,default:""},config:{type:Object,default:()=>({})},language:{type:String,default:"typescript"}},emits:["update:value"],setup(e,{emit:t}){const l=re("code-editor"),a=de({get:()=>e.value||"",set(e){t("update:value",e)}}),n=Re(null);let o=null;return De(()=>{g.init().then(t=>{n.value&&(o=t.editor.create(n.value,Q({value:a.value,language:e.language,automaticLayout:!0,minimap:{enabled:!1}},e.config)),o.onDidBlurEditorText(()=>{a.value=o.getValue()}))})}),Me(()=>{null==o||o.dispose()}),()=>be("div",{ref:n,class:l.b()},null)}}),Xu=/* @__PURE__ */we({name:"ViewContainer",props:{context:{type:Object},params:{type:Object},modal:{type:Object,required:!0}},setup:()=>({ns:re("view-container")}),render(){var e,t;return be("div",{class:this.ns.b()},[this.$slots.header?be("div",{class:this.ns.b("header")},[this.$slots.header()]):null,be("div",{class:this.ns.b("content")},[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t)]),this.$slots.footer?be("div",{class:this.ns.b("footer")},[this.$slots.footer()]):null])}}),Qu=/* @__PURE__ */we({name:"Vue3GridDndItem",props:{index:{type:Number,required:!0},data:{type:Object,required:!0},move:{type:Function},end:{type:Function}},setup(e){const t=re("vue3-grid-dnd-item");function l(e,t){return e&&e.classList.contains(t)?e:l(e.parentElement,t)}const a=Re(null),n=de(()=>{if(a.value){const e=l(a.value,"vxe-body--row");if(e)return e}return null}),o=Re(!1),[i,s,r]=p({type:"vue3-grid-dnd-item",item:()=>e.data,collect:e=>({canDrag:e.canDrag(),isDragging:e.isDragging()}),end(t){e.end&&e.end(t)}}),[u,c]=d({accept:"vue3-grid-dnd-item",collect:e=>({handlerId:e.getHandlerId(),canDrop:e.canDrop(),isShallowOver:e.isOver({shallow:!0})}),hover(t,l){if(!1!==l.canDrop()&&!0!==i.value.isDragging&&e.data!==t&&l.isOver({shallow:!0})){const e=a.value.getBoundingClientRect(),t=l.getClientOffset(),{top:n,height:i}=e,{y:s}=t,r=i/2;o.value=s-n-r<0}},canDrop:()=>!0!==i.value.isDragging,drop(t,l){!1!==l.canDrop()&&!0!==i.value.isDragging&&e.data!==t&&e.move&&e.move(o.value,e.data,t)}});return s(a),c(n),r(n),Ze([u,o],()=>{if(n.value&&(n.value.classList.remove(t.is("over",!0),t.is("before",!0),t.is("after",!0)),u.value.canDrop&&u.value.isShallowOver)){const e=t.is("over",!0),l=o.value?t.is("before",!0):t.is("after",!0);n.value.classList.add(e,l)}}),Ze(i,()=>{n.value&&(n.value.classList.remove(t.is("dragging",!0)),i.value.isDragging&&n.value.classList.add(t.is("dragging",!0)))}),{ns:t,rootRef:a,dropCollect:u}},render(){var e,t;return be("div",{ref:"rootRef",class:this.ns.b()},[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t)])}}),Zu=/* @__PURE__ */we({__name:"SearchInput",props:{visibleValue:{}},emits:["change"],setup(e,{emit:t}){const l=t,a=e,n=Re();function o(){l("change",n.value)}return Ze(()=>a.visibleValue.value,e=>{e||(n.value=void 0,l("change",n.value))}),(e,t)=>{const l=ze("a-input");return Be(),he("div",{class:"gct-field-cascader-search",onMousedown:t[1]||(t[1]=at(()=>{},["stop"]))},[be(l,{value:n.value,"onUpdate:value":t[0]||(t[0]=e=>n.value=e),placeholder:"搜索字段",onChange:o},{prefix:tt(()=>[...t[2]||(t[2]=[fe("span",{class:"iconfont icon-pad_search text-[#8B8B8B]"},null,-1)])]),_:1},8,["value"])],32)}}}),ec=/* @__PURE__ */C(Zu,[["__scopeId","data-v-512c4b38"]]);function tc(e,{onFieldClick:t}){const{fieldMetaList:l,modelName:a,maxLevel:n,filterFieldByFunction:o=()=>!0}=e,i=Re({}),s=Ae({}),r=Re(),u=Re([]),c=de(()=>e.value?e.value.split(e.valueSeparator||"$"):[]),d=Re(!1),p=de(()=>u.value.filter(e=>!e.title||!r.value||e.title.includes(r.value||"")).map(e=>{const t=e.isExpandField?f(e,2,i.value):[];return{...e,children:t}}));async function m({bindInfo:e,relationModelName:l,id:a,__bindFields:n,key:o,name:r},u){s[o]={name:r};const c=a+u;if(i.value[c])return void(i.value[c].keyword="");const d=await _api.apaas.modelMeta.getDetail({modelKey:e});return i.value[c]={keyword:"",option:[]},i.value[c].option=h({fields:d.fieldMetaList,title:l,search:e=>{i.value[c].keyword=e},onFieldClick:t,level:u,__bindFields:n}),i.value[c].option}function v(e,t){return{value:t,label:Ce(ec,{visibleValue:d,onChange:e}),isLeaf:!1,__props:{},isExpandField:!1}}function h({fields:t,title:l,search:a,level:i,onFieldClick:s,__bindFields:r}){const u=[e.searchable?v(a,i):null,lc(l)].filter(Boolean);return t.filter(o).forEach(e=>{u.push(function(e,{level:t,onClick:l,__bindFields:a}){const o=t<n&&nc.includes(e.type);e.__bindFields=[...a,e.key];const i=o?`${e.name}(${e.relationModelName})`:e.name,s=e.name;return{value:e.key,label:ac(s,o,l),title:s,titleWithRelation:i,isLeaf:!1,isExpandField:o,children:[],__props:e,__level:t,__id:e.id}}(e,{level:i,onClick(){s(e,i)},__bindFields:r}))}),u}function f(e,t,l){const{option:a=[],keyword:n=""}=l[e.__id+t]||{};return a.filter(e=>!e.title||!n||e.title.includes(n)).map(e=>({...e,children:e.isExpandField?f(e,t+1,l):[]}))}return De(()=>{u.value=h({fields:l,title:a,search:e=>{r.value=e},onFieldClick:t,level:1,__bindFields:[]}),async function(){const e=[...c.value];let t=[...u.value],l=1;for(;e.length>1;){const a=e.shift(),n=t.find(e=>e.value===a);if(!n)return;l+=1,t=await m(n.__props,l)||[]}}()}),{visibleValue:d,filterOptions:p,getChildrenOptionsByKey:m,fieldValues:c,fieldMapByKey:s}}function lc(e){return{value:e,label:Ce("div",{class:"gct-option-title ell"},e),isLeaf:!1,__props:{},isExpandField:!1}}var ac=(e,t,l)=>be("div",{class:"ell gct-option-label ks-row",onClick:l},[be("div",{class:"ks-col ell"},[ye(" "),e]),t?be("span",{class:"iconfont icon-pad_arrow_right"},null):null]),nc=[A.RDO_REF,A.REF,A.REF_MULTI],oc=/* @__PURE__ */we({__name:"FieldCascader",props:{fieldMetaList:{type:Object,default:()=>[]},filterFieldByFunction:{type:Function,default:()=>!0},maxLevel:{type:Number,default:3},value:{type:String,default:""},allowClear:{type:Boolean,default:!1},valueSeparator:{type:String,default:"$"},searchable:{type:Boolean,default:!0},expandToLeft:{type:Boolean,default:!1}},emits:["FieldClick","labelChange"],setup(e,{emit:t}){const l=t,a=e,{visibleValue:n,getChildrenOptionsByKey:o,filterOptions:i,fieldValues:s,fieldMapByKey:r}=tc(a,{onFieldClick:function(e){var t;l("FieldClick",null==e||null===(t=e.__bindFields)||void 0===t?void 0:t.join(a.valueSeparator),e),n.value=!1}}),u=Re(),c=async e=>{if(e.map(e=>e.value).join(",")===u.value)return;u.value=e.slice(0,-1).map(e=>e.value).join(",");const t=e.at(-1);t.isExpandField&&await o(t.__props,e.length+1)};function d(e){n.value=e}function p({labels:e,selectedOptions:t}){const a=t.length;let n=t.filter(e=>e).map((e,t)=>t===a-1?e.title:e.titleWithRelation).join(".");return!n&&e.length>0&&(n=e.map(e=>{var t;return(null===(t=r[e])||void 0===t?void 0:t.name)||""}).join(".")),l("labelChange",n),Ce("div",{class:"ell",title:n,onClick:e=>{e.stopPropagation(),e.preventDefault()}},n)}function m(e){void 0===e&&l("FieldClick",e,{})}return(t,l)=>{const o=ze("a-cascader");return Be(),me(o,{placeholder:"请选择",options:We(i),"load-data":c,"expand-trigger":"hover",class:"gct-field-cascader-selector","dropdown-class-name":"gct-field-cascader "+(a.expandToLeft?"cascader-expand-to-left":""),open:We(n),"allow-clear":e.allowClear,"display-render":p,value:We(s),placement:a.expandToLeft?"topRight":void 0,onMousedown:l[0]||(l[0]=e=>e.preventDefault()),onDropdownVisibleChange:d,onChange:m},null,8,["options","dropdown-class-name","open","allow-clear","value","placement"])}}}),ic=oc;function sc({getUserOptions:e,getUserByIds:t,getDeptOptions:l}){const a=Re([]),n=Re([]),o=Re([]),i=Re([]),s=Re([]),r=Ae({}),u=Re({checked:[]}),c=Re("");async function d(t){const{data:l=[]}=await e({orgId:c.value,pageNo:1,pageSize:9999,keyword:t})||{};o.value=l}async function p(e){c.value=e,i.value=[e],await d()}return{treeData:n,selectedKeys:i,userData:o,selectTreeNode:p,getUserTree:d,checkedBox:function(e,t,l){if(e.target.checked)l?s.value.push(t.id):s.value=[t.id],r[t.id]=Ge(t);else{const e=s.value.findIndex(e=>e===t.id);s.value.splice(e,1),r[t.id]=void 0}},checkedDepts:u,checkedUsers:s,UsersMap:r,orgsOptions:a,ready:async function({userIds:e=[],deptIds:i=[]}={},c=!0){await async function(){const e=await l();null==e||e.forEach(t=>{e.find(e=>e.id===t.parentId)||(t.parentId="ROOT")}),a.value=e,n.value=rc(e)}(),u.value.checked=ot(i||[]),c&&async function(e){var l;s.value=e;const a=null===(l=n.value[0])||void 0===l?void 0:l.key;a&&await p(a),e.forEach(async e=>{const l=o.value.find(t=>t.id===e);r[e]=l||(await t({ids:e})||[])[0]})}(ot(e||[]))}}}function rc(e,t="ROOT"){const l=[];for(const a of e)if(a.parentId===t){const t=rc(e,a.id);t.length>0?a.children=t:a.children=[],a.key=a.id,a.title=a.name,l.push(a)}return l}var uc={class:"ks-row-middle"},cc={class:"ell ks-col"},dc=/* @__PURE__ */C(/* @__PURE__ */we({__name:"user-item",props:{userId:{},usersMap:{}},emits:["deleteUser"],setup(e,{emit:t}){const{userId:l,usersMap:a}=Ae(e),n=t,o=de(()=>{const e=a[l];return(null==e?void 0:e.__LABEL__)||(null==e?void 0:e.fullname)});return(e,t)=>{const l=ze("DeleteOutlined");return Be(),he("div",uc,[t[1]||(t[1]=fe("span",{class:"iconfont icon-a-Accountnumber mr4px icon"},null,-1)),fe("div",cc,Ke(o.value),1),be(l,{class:"cursor-pointer",onClick:t[0]||(t[0]=e=>n("deleteUser"))})])}}}),[["__scopeId","data-v-1456f8b9"]]),pc={class:"ks-row-middle"},mc={class:"ell ks-col"},vc=/* @__PURE__ */C(/* @__PURE__ */we({__name:"dept-item",props:{deptId:{},deptOptions:{}},emits:["deleteDept"],setup(e,{emit:t}){const{deptId:l,deptOptions:a}=Ae(e),n=t,o=de(()=>{var e;return null===(e=a.find(e=>e.id===l))||void 0===e?void 0:e.name});return(e,t)=>{const l=ze("DeleteOutlined");return Be(),he("div",pc,[t[1]||(t[1]=fe("span",{class:"iconfont icon-wenjianjia mr4px depticon"},null,-1)),fe("div",mc,Ke(o.value),1),be(l,{class:"cursor-pointer",onClick:t[0]||(t[0]=e=>n("deleteDept"))})])}}}),[["__scopeId","data-v-075b8ce7"]]),hc=/* @__PURE__ */function(e){return e.ALL="ALL",e.APP="APP",e.ViSIBLE="ViSIBLE",e}({}),fc={class:"ks-row main"},gc={class:"h50% ks-col ks-row flex-col"},yc={class:"h40px text-center leading-10 font-bold baseborder border-0 border-b border-r"},bc={class:"ks-col overflow-x-auto pt10px"},xc={key:0,class:"h50% ks-col ks-row flex-col"},wc={class:"baseborder border-t border-0 border-b border-l h40px text-center leading-10"},kc={class:"overflow-x-auto ks-col p10px"},Cc={key:0,class:"shrink-0 ks-row w-11/36 flex-col"},_c={class:"baseborder border-0 border-b h40px text-center leading-10"},Sc={class:"p5px"},Ec={class:"overflow-x-auto ks-col ml5px mr5px"},Oc={key:0,class:"h50% ks-col ks-row flex-col"},Ic={class:"baseborder border-0 border-b border-l h40px text-center leading-10"},Tc={class:"overflow-x-auto ks-col pt5px"},Fc={key:1,class:"h50% ks-col ks-row flex-col"},Lc={class:"baseborder border-t border-0 border-b border-l h40px text-center leading-10"},Dc={class:"overflow-x-auto ks-col pt5px"},Mc=/* @__PURE__ */function(e){return e.USER="picker_user",e.DEPT="picker_dept",e.ALL="pickker_all",e}(Mc||{}),Bc=/* @__PURE__ */we({__name:"user-pick",props:{getUserOptions:{},getUserByIds:{},destroyVm:{},getDeptOptions:{},type:{}},setup(e,{expose:t}){const l=e,a=Re(!0),n=Re([]),{getUserOptions:o,getUserByIds:i,destroyVm:s,getDeptOptions:r}=Ae(l);let u;l.type===hc.ViSIBLE&&_api.apaas.designerCommon.getGetVisibleUser().then(e=>{n.value=e});const{treeData:c,selectedKeys:d,selectTreeNode:p,userData:m,getUserTree:v,checkedBox:h,checkedUsers:f,checkedDepts:g,UsersMap:y,orgsOptions:b,ready:x}=sc({getUserOptions:o,getUserByIds:i,getDeptOptions:r}),[w,{openModal:k,closeModal:C}]=os(),_=Re(""),S=Re(""),E=Re(Mc.ALL);function O(){if(C(),E.value===Mc.ALL){let e=f.value.map(e=>Ge(y[e])),t=g.value.checked.map(e=>Ge(b.value.find(t=>t.id===e)));u({userIds:Ge(f.value),deptIds:Ge(g.value.checked)},{userMaps:e,DeptMaps:t})}if(E.value===Mc.USER){let e=f.value.map(e=>Ge(y[e]));u(Ge(f.value),Ge(e))}if(E.value===Mc.DEPT){let e=g.value.checked.map(e=>Ge(b.value.find(t=>t.id===e)));u(Ge(g.value.checked),e)}s()}function I(e){let t=e[0];t&&p(t)}function T(){v(_.value)}function F(){s()}function L({checked:e}){!a.value&&e.length>1&&e.shift()}return t({openPickerByUser:function({userIds:e,multiple:t,callback:l}){x({userIds:e}),u=l,E.value=Mc.USER,S.value=ne("sys.org."+E.value),a.value=t,k()},openPicker:function({userIds:e,deptIds:t,callback:l}){x({userIds:e,deptIds:t}),u=l,E.value=Mc.ALL,S.value=ne("sys.org."+E.value),a.value=!0,k()},openPickerByDept:function({deptIds:e,multiple:t,callback:l}){x({deptIds:e},!1),u=l,E.value=Mc.DEPT,S.value=ne("sys.org."+E.value),a.value=t,k()}}),(e,t)=>{const l=ze("ScrollContainer"),o=ze("SearchOutlined"),i=ze("overlayScrollbarsComponent"),s=ze("basic-modal");return Be(),me(s,{height:500,title:S.value,centered:"",width:"740px","mask-closable":!1,"ok-button-props":{disabled:!We(f).length&&!We(g).checked.length},onRegister:We(w),onOk:O,onCancel:F},{default:tt(()=>{var e;return[fe("div",fc,[fe("div",{class:Te(["shrink-0 dept baseborder border-0 border-r ks-row flex-col",E.value!==Mc.DEPT?"w-14/36":"w-1/2"])},[fe("div",gc,[fe("div",yc,Ke(We(ne)("sys.org.orgTree")),1),fe("div",bc,[be(l,null,{default:tt(()=>{var e;return[(null===(e=We(c))||void 0===e?void 0:e.length)?(Be(),me(We(Bt),{key:0,"checked-keys":We(g),"onUpdate:checkedKeys":t[0]||(t[0]=e=>Se(g)?g.value=e:null),"check-strictly":"","selected-keys":We(d),checkable:E.value!==Mc.USER,"block-node":"","tree-data":We(c),"default-expand-all":"",virtual:!1,onSelect:I,onCheck:L},{title:tt(({title_:e})=>[t[2]||(t[2]=fe("span",{class:"iconfont icon-wenjianjia depticon"},null,-1)),ye(" "+Ke(e),1)]),_:1},8,["checked-keys","selected-keys","checkable","tree-data"])):ve("",!0)]}),_:1})])]),(null===(e=n.value)||void 0===e?void 0:e.length)?(Be(),he("div",xc,[fe("div",wc,Ke(We(ne)("sys.org.visiblePersonnel")),1),be(l,null,{default:tt(()=>[fe("div",kc,[(Be(!0),he(ce,null,Pe(n.value,e=>(Be(),he("div",{key:e.id},[be(We(xt),{checked:We(f).indexOf(e.id)>-1,onChange:t=>We(h)(t,e,a.value)},{default:tt(()=>[ye(Ke(e.fullname),1)]),_:2},1032,["checked","onChange"])]))),128))])]),_:1})])):ve("",!0)],2),E.value!==Mc.DEPT?(Be(),he("div",Cc,[fe("div",_c,Ke(We(ne)("sys.org.candidates")),1),fe("div",Sc,[be(We(Et),{value:_.value,"onUpdate:value":t[1]||(t[1]=e=>_.value=e),placeholder:We(ne)("sys.org.pleaseEnterSearchContent"),onChange:T},{prefix:tt(()=>[be(o)]),_:1},8,["value","placeholder"])]),fe("div",Ec,[be(l,null,{default:tt(()=>[lt(be(We(Ct),{image:We(Ct).PRESENTED_IMAGE_SIMPLE,description:We(ne)("sys.org.noPersonnelInformationCurrentlyAvailable")},null,8,["image","description"]),[[Qe,!We(m).length]]),(Be(!0),he(ce,null,Pe(We(m),e=>(Be(),he("div",{key:e.id},[be(We(xt),{checked:We(f).indexOf(e.id)>-1,onChange:t=>We(h)(t,e,a.value)},{default:tt(()=>[ye(Ke(e.__LABEL__||e.fullname),1)]),_:2},1032,["checked","onChange"])]))),128))]),_:1})])])):ve("",!0),fe("div",{class:Te(["shrink-0 baseborder border-0 border-l ks-row flex-col",E.value!==Mc.DEPT?"w-11/36":"w-1/2"])},[E.value!==Mc.USER?(Be(),he("div",Oc,[fe("div",Ic,Ke(We(ne)("sys.org.selectedDepartment")),1),fe("div",Tc,[be(l,null,{default:tt(()=>[lt(be(We(Ct),{image:We(Ct).PRESENTED_IMAGE_SIMPLE,description:We(ne)("sys.ipaas.noData")},null,8,["image","description"]),[[Qe,!We(g).checked.length]]),(Be(!0),he(ce,null,Pe(We(g).checked,(e,t)=>(Be(),me(vc,{key:e,"dept-options":We(b),"dept-id":e,class:"rows",onDeleteDept:e=>We(g).checked.splice(t,1)},null,8,["dept-options","dept-id","onDeleteDept"]))),128))]),_:1})])])):ve("",!0),E.value!==Mc.DEPT?(Be(),he("div",Fc,[fe("div",Lc,Ke(We(ne)("sys.org.selectedPersonnel")),1),fe("div",Dc,[be(i,null,{default:tt(()=>[lt(be(We(Ct),{image:We(Ct).PRESENTED_IMAGE_SIMPLE,description:We(ne)("sys.ipaas.noData")},null,8,["image","description"]),[[Qe,!We(f).length]]),(Be(!0),he(ce,null,Pe(We(f),(e,t)=>(Be(),me(dc,{key:e,class:"rows","user-id":e,"users-map":We(y),onDeleteUser:e=>We(f).splice(t,1)},null,8,["user-id","users-map","onDeleteUser"]))),128))]),_:1})])])):ve("",!0)],2)])]}),_:1},8,["title","ok-button-props","onRegister"])}}}),jc=/* @__PURE__ */C(Bc,[["__scopeId","data-v-a49a84da"]]);function Ac({type:e=hc.ALL,fieldKey:t,modelKey:l}={}){const{getUserOptions:a,getUserByIds:n,getDeptOptions:o}=function({type:e,fieldKey:t,modelKey:l}){return{[hc.ALL]:{getUserOptions:_api.platform.orgUserPicker.getTenantManagementOrgUserPageList,getUserByIds:_api.platform.orgUserPicker.getTenantManagementUserListByIds,getDeptOptions:_api.platform.tenant.getManagementOrgList},[hc.APP]:{getUserOptions:e=>_api.apaas.designerCommon.getGetCanBeUsedOrgUser({fieldKey:t,modelKey:l,...e}),getUserByIds:e=>_api.apaas.designerCommon.getListUserByIds({fieldKey:t,modelKey:l,...e}),getDeptOptions:_api.apaas.designerCommon.getGetCanBeUsedOrg},[hc.ViSIBLE]:{getUserOptions:_api.apaas.designerCommon.getGetVisibleOrgUser,getUserByIds:_api.platform.orgUserPicker.getTenantManagementUserListByIds,getDeptOptions:_api.apaas.designerCommon.getGetVisibleOrg}}[e]}({type:e,fieldKey:t,modelKey:l});let i;const s=document.createDocumentFragment();function r(){var t;const l=be(jc,{getUserOptions:a,getUserByIds:n,destroyVm:c,getDeptOptions:o,type:e});Ne(l,s),i=null===(t=l.component)||void 0===t?void 0:t.exposed}function u(e,t){return t||e instanceof Array||(e=[e]),e}function c(){setTimeout(()=>{Ne(null,s),i=null},300)}return{openPickerByUser:function({userIds:e=[],multiple:t=!0,callback:l}){r(),e=u(e,t),null==i||i.openPickerByUser({userIds:e,multiple:t,callback:l})},openPicker:function({userIds:e=[],deptIds:t=[],callback:l}){r(),null==i||i.openPicker({userIds:e,deptIds:t,callback:l})},openPickerByDept:function({deptIds:e=[],multiple:t=!0,callback:l}){r(),e=u(e,t),null==i||i.openPickerByDept({deptIds:e,multiple:t,callback:l})},getDeptOptions:o,getUserByIds:n}}var Rc={class:"h100% relative"},Nc={class:"absolute top-16px right-136px text-[#242424] text-[12px]",style:{"line-height":"26px"}},Pc=/* @__PURE__ */we({__name:"paas-bpmn-runtime",props:{instanceId:{}},setup(e){const{setNodeInstStatusMap:t,reset:l}=rl(),{init:a}=ul(),n=e,o={FINISHED:ol.COMPLETED,APPROVING:ol.RUNNING,UNSTART:ol.PENDING},i=de(()=>[ol.COMPLETED,ol.RUNNING,ol.PENDING].map(e=>({value:e,color:il[e],label:ne(`sys.process.flowNodeInstStatus.${e}`)})));return Le(()=>{l()}),Ze(()=>n.instanceId,async e=>{var l;if(!e)return;const n=await _api.apaas.processGraph.getGraphInfo({procInstanceId:e})||[],i=null===(l=n[0])||void 0===l?void 0:l.versionId;i&&async function(e,l){const n=await _api.apaas.pmProcessDefinitionVersion.getId({id:e});(null==n?void 0:n.json)&&a(null==n?void 0:n.json),t((l??[]).reduce((e,t)=>{let l=[t.id];if((t.type===F.BpmnExclusive||t.type===F.BpmnParallel)&&t.operationName){const e=t.operationName.split("#")[1];l.push(...e.split(","))}return l.forEach(l=>{e[l]={status:o[t.status],data:{...t,modelKey:n.modelKey,statusMsg:o[t.status]}}}),e},{}))}(i,n)},{immediate:!0}),(e,t)=>(Be(),he("div",Rc,[be(We(sl),{readonly:!0,"inst-mode":!0}),fe("div",Nc,[(Be(!0),he(ce,null,Pe(i.value,e=>(Be(),he("span",{key:e.value,class:"ml12px status-item"},[fe("span",{class:"inline-block w6px h6px rounded-50% mr8px",style:Fe({backgroundColor:e.color})},null,4),ye(" "+Ke(e.label),1)]))),128))])]))}}),Uc=Pc,zc=/* @__PURE__ */we({__name:"i18n-modal",props:{lang:{},getContainer:{type:Function}},emits:["ok","register"],setup(e,{emit:t}){const l=e,a=t,n=Re(),o=Ae({id:""}),i=Re(!1),s=e=>{e&&(i.value=!1)},[r,{closeModal:u}]=is(e=>{e&&c(e)}),c=e=>{i.value=!0,o.id=e.key;const{lang:t}=l;console.log(t,"lang========");for(const l of t){const t=l.dataIndex;o[t]=e[t]}},d=(e,t,l)=>{/^[a-zA-Z_.]*$/.test(t)||l(ne("sys.i18n.validated18nKeyErrorMsg")),l()},p=async(e,t)=>/^\s*$/g.test(t)?Promise.reject(ne("sys.notEmptySth",{sth:ne("sys.i18n")})):Promise.resolve(),m=()=>{var e;null===(e=n.value)||void 0===e||e.validate().then(()=>{a("ok",{...Ge(o)},i.value),u()})},v=()=>{var e;null===(e=n.value)||void 0===e||e.resetFields()};return(t,a)=>{const u=ze("a-input"),c=ze("a-form-item"),h=ze("a-form");return Be(),me(We(ss),Oe(t.$attrs,{title:i.value?We(ne)("sys.edit"):We(ne)("sys.new"),centered:"",width:"640px","min-height":100,"mask-closable":!1,"after-close":v,"get-container":e.getContainer,onRegister:We(r),onOk:m,onVisibleChange:s}),{default:tt(()=>[be(h,{ref_key:"formRef",ref:n,model:o,"label-col":{span:6},"wrapper-col":{span:16},autocomplete:"off",layout:"horizontal"},{default:tt(()=>[be(c,{label:We(ne)("sys.i18n.resourceIdentification"),name:"id",rules:[{required:!0,message:We(ne)("sys.pleaseInputSth",{sth:We(ne)("sys.i18n.resourceIdentification")})},{validator:d}]},{default:tt(()=>[be(u,{value:o.id,"onUpdate:value":a[0]||(a[0]=e=>o.id=e),"show-count":"",maxlength:128,disabled:i.value},null,8,["value","disabled"])]),_:1},8,["label","rules"]),(Be(!0),he(ce,null,Pe(l.lang,e=>(Be(),me(c,{key:e.dataIndex,label:e.title,name:e.dataIndex,rules:[{required:!0,message:We(ne)("sys.pleaseInputSth",{sth:e.title})},{validator:p}]},{default:tt(()=>[be(u,{value:o[e.dataIndex],"onUpdate:value":t=>o[e.dataIndex]=t,"show-count":"",maxlength:300},null,8,["value","onUpdate:value"])]),_:2},1032,["label","name","rules"]))),128))]),_:1},8,["model"])]),_:1},16,["title","get-container","onRegister"])}}}),$c=zc,Vc={class:"i18n-select-container"},Hc={class:"table-wrap"},Kc=/* @__PURE__ */we({__name:"i18n-select-container",props:{i18nModalKey:{},destroyCallback:{type:Function},saveCallback:{type:Function}},emits:["register"],setup(e){const[t,{closeModal:l}]=is(),[a,{openModal:n}]=os(),o=e,i=()=>document.querySelector(`#${o.i18nModalKey}`),s=Re(),r=Ae({keywords:""}),u=Ae({current:1,pageSize:5,total:0,size:"small",showTotal:e=>ne("sys.component.table.total",{total:e})}),c=Re([]),d=Re(),p=Re({type:"radio",hideSelectAll:!0,selectedRowKeys:[],onChange:x}),m=Re(!1),v=de(()=>_gct.i18nUtil.enableLocaleList.map(e=>({title:e.language,dataIndex:e.languageTag}))),h=async(e,t)=>{m.value=!0;const l=await _api.apaas.i18NInfo.getPageList({pageNo:t??u.current,pageSize:u.pageSize,searchKey:e});if(m.value=!1,l&&l.data){const e=l.data.map(e=>{const t=JSON.parse(null==e?void 0:e.info);return{key:e.key,type:e.type,...Object.fromEntries(t.map(e=>[e.locale,e.info]))}});u.total=l.totalCount,c.value=e}};De(h);const f=()=>{var e;null===(e=s.value)||void 0===e||e.validate().then(async()=>{await h(r.keywords,1)})},g=e=>{const{current:t,total:l,pageSize:a}=e;u.current=t,u.total=l,u.pageSize=a,h()},y=()=>{n()},b=async(e,t)=>{const l=v.value.map(t=>({locale:t.dataIndex,info:e[t.dataIndex]}));m.value=!0;try{t?await _api.apaas.i18NInfo.putKey({key:e.id},{info:JSON.stringify(l)}):await _api.apaas.i18NInfo.post({info:JSON.stringify(l),key:e.id}),h(),x([e.id],[Ae(e)])}catch(a){m.value=!1}};function x(e,t){p.value.selectedRowKeys=e,d.value=t}const w=()=>{o.destroyCallback&&"function"==typeof o.destroyCallback&&o.destroyCallback()},k=async()=>{if(o.saveCallback&&"function"==typeof o.saveCallback){const t=p.value.selectedRowKeys,l={};if(t&&t[0]){var e;const a=null===(e=d.value)||void 0===e?void 0:e[0];console.log("selectRow",a),Object.assign(l,{i18nKey:t[0],i18nTitle:a[_gct.i18nUtil.locale]})}o.saveCallback(l)}l()};return(e,l)=>{const n=ze("a-input"),o=ze("a-form-item"),d=ze("a-col"),h=ze("a-button"),x=ze("plus-outlined"),C=ze("a-row"),_=ze("a-form"),S=ze("a-table"),E=ze("basic-modal");return Be(),me(E,Oe(e.$attrs,{"min-height":40,title:We(ne)("sys.i18n.i18nConfig"),centered:"",width:"640px","can-fullscreen":!1,"mask-closable":!1,"after-close":w,"get-container":i,onRegister:We(t),onOk:k}),{default:tt(()=>[fe("div",Vc,[be(_,{ref_key:"formRef",ref:s,model:r,autocomplete:"off",layout:"horizontal"},{default:tt(()=>[be(C,null,{default:tt(()=>[be(d,{span:12},{default:tt(()=>[be(o,{name:"keywords",label:We(ne)("sys.keywords")},{default:tt(()=>[be(n,{value:r.keywords,"onUpdate:value":l[0]||(l[0]=e=>r.keywords=e),placeholder:We(ne)("sys.keywordsPlaceholder"),style:{display:"inline-flex"}},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1}),be(d,{span:12,style:{"text-align":"right"}},{default:tt(()=>[be(h,{type:"primary",onClick:f},{icon:tt(()=>[be(We(al))]),default:tt(()=>[ye(" "+Ke(We(ne)("sys.queryText")),1)]),_:1}),be(h,{style:{margin:"0 8px"},type:"primary",onClick:y},{icon:tt(()=>[be(x)]),default:tt(()=>[ye(" "+Ke(We(ne)("sys.new")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),fe("div",Hc,[be(S,{ref:"tableRef","data-source":c.value,columns:v.value,"show-index-column":!1,pagination:u,striped:!1,bordered:!0,"row-selection":p.value,loading:m.value,onChange:g},null,8,["data-source","columns","pagination","row-selection","loading"]),be($c,{lang:v.value,"get-container":i,onRegister:We(a),onOk:b},null,8,["lang","onRegister"])])])]),_:1},16,["title","onRegister"])}}}),Gc=/* @__PURE__ */C(Kc,[["__scopeId","data-v-53df3982"]]),qc=/* @__PURE__ */we({__name:"i18n-select-modal",setup(e,{expose:t}){const[l,{openModal:a}]=os();return t({open:()=>{a()}}),(e,t)=>(Be(),me(Gc,{onRegister:We(l)},null,8,["onRegister"]))}});function Yc(){let e=null,t=null;const l=Re("");function a(t){"function"==typeof t&&t(),document.querySelector(`#${We(l)}`).remove(),e&&(e.unmount(),e=null)}return{open:async function(n){let o,i=document.body;if(ut(n,"target")||ut(n,"props")){const e=n;o=e.props||{},i=e.target||document.body}else o=n;l.value=o.i18nModalKey||`i18n-select-modal-${Math.random().toString(16).substring(8)}`;const s={...o,destroyCallback:()=>a(null==o?void 0:o.destroyCallback),i18nModalKey:We(l)};if(!e){const a=document.createElement("div");a.id=We(l);const n=We(i);null==n||n.appendChild(a),e=await U.createVueApp(qc,s),t=e.mount(a)}null==t||t.open()},close:a}}var Wc={class:"i18n-tooltip-title"},Jc={style:{"margin-left":"4px"}},Xc=/* @__PURE__ */we({__name:"i18n-select-btn",props:{i18nValue:{},buttonExtraProps:{},size:{},i18nModalKey:{},simpleBtn:{type:Boolean},btnHeight:{},btnWidth:{}},emits:["on-select-i18n","closed"],setup(e,{emit:t}){const l=de(()=>_gct.i18nUtil.enableLocaleList),a=Yc(),n=e,o=t,i=Ae({}),s=de(()=>!pt(n.i18nValue));Ze(()=>n.i18nValue,()=>{pt(n.i18nValue)||(async e=>{const t=await _api.apaas.i18NInfo.getPageList({pageNo:1,pageSize:20,searchKey:e});if(t&&t.data){const e=t.data.find(e=>e.key===n.i18nValue);e&&Object.assign(i,Object.fromEntries(Object.entries(JSON.parse(e.info)).map(([e,t])=>[t.locale,t.info])))}})(n.i18nValue)},{immediate:!0});const r=()=>{a.open({i18nModalKey:n.i18nModalKey,saveCallback:e=>{o("on-select-i18n",{...e})},destroyCallback:()=>{o("closed")}})};return(t,a)=>{const n=ze("icon-next"),o=ze("assets-svg-icon"),u=ze("a-button"),c=ze("a-tooltip");return e.simpleBtn?(Be(),me(n,{key:0,class:Te(["i18n-icon simple-btn",{"is-highlight":s.value}]),icon:"ion:language",onClick:r},null,8,["class"])):s.value?(Be(),me(c,{key:1,color:"#fff",placement:"topRight"},{title:tt(()=>[fe("div",Wc,"语言标识:"+Ke(e.i18nValue),1),(Be(!0),he(ce,null,Pe(l.value,e=>(Be(),he("div",{key:e.id,class:"i18n-tooltip-item"},[fe("strong",null,Ke(e.language)+": ",1),fe("span",Jc,Ke(i[e.languageTag]),1)]))),128))]),default:tt(()=>[be(u,Oe(e.buttonExtraProps,{class:{"is-highlight":s.value},style:{"--btn-width":e.btnWidth,"--btn-height":e.btnHeight},size:e.size,onClick:r}),{icon:tt(()=>[be(o,{class:"i18n-icon",src:"/extras-assets/svg/language.svg"})]),_:1},16,["class","style","size"])]),_:1})):(Be(),me(u,Oe({key:2},e.buttonExtraProps,{class:{"is-highlight":s.value},style:{"--btn-width":e.btnWidth,"--btn-height":e.btnHeight},size:e.size,onClick:r}),{icon:tt(()=>[be(o,{class:"i18n-icon",src:"/extras-assets/svg/language.svg"})]),_:1},16,["class","style","size"]))}}}),Qc=/* @__PURE__ */C(Xc,[["__scopeId","data-v-b86f4068"]]),Zc=/* @__PURE__ */we({__name:"i18n-select-input",props:{attr:{},inputExtraProps:{},i18nConfig:{},i18nText:{},placeholderText:{},size:{},i18nModalKey:{},forceUpdate:{type:Boolean},btnHeight:{},btnWidth:{}},emits:["update:i18nText","update:i18nConfig","on-i18n-select","clickOutside","focus","blur"],setup(e,{emit:t}){const l=de(()=>!!_gct.store.appInfo.id),a=e,n=t,o=de({get:()=>a.i18nText??"",set(e){e!==a.i18nText&&n("update:i18nText",e)}}),i=de(()=>pt(a.i18nConfig)?{}:"string"==typeof a.i18nConfig?JSON.parse(a.i18nConfig)??{}:a.i18nConfig??{}),s=de(()=>{var e;return(null===(e=i.value)||void 0===e?void 0:e[a.attr])??""}),r=e=>{e&&((pt(o.value)||!0===a.forceUpdate)&&n("update:i18nText",e.i18nTitle),n("update:i18nConfig",JSON.stringify(pt(e)?gt(i.value,a.attr):{...i.value,[a.attr]:e.i18nKey})),n("on-i18n-select",e))},u=Re(),c=()=>{n("focus",u.value)},d=()=>{n("blur",u.value)},p=Re();return I(p,()=>{n("clickOutside")}),(t,a)=>{const i=ze("a-input"),m=ze("a-input-group");return Be(),me(m,{id:"i18nInputGroup",ref_key:"i18nInputGroup",ref:p,compact:""},{default:tt(()=>[Ue(t.$slots,"i18n-input",{},()=>[be(i,Oe({ref_key:"inputRef",ref:u},e.inputExtraProps,{value:o.value,"onUpdate:value":a[0]||(a[0]=e=>o.value=e),valueModifiers:{trim:!0},style:{height:e.btnHeight?e.btnHeight:e.size===We(L).SMALL?"28px":"32px",width:l.value?`calc(100% - ${e.btnWidth?e.btnWidth:e.size===We(L).SMALL?"28px":"32px"}`:"100%"},placeholder:e.placeholderText,size:e.size,"allow-clear":"",onFocus:c,onBlur:d}),null,16,["value","style","placeholder","size"])],!0),l.value?(Be(),me(Qc,{key:0,"btn-height":e.btnHeight,"btn-width":e.btnWidth,"i18n-value":s.value,size:e.size,"i18n-modal-key":e.i18nModalKey,onOnSelectI18n:r,onClosed:a[1]||(a[1]=e=>n("clickOutside"))},null,8,["btn-height","btn-width","i18n-value","size","i18n-modal-key"])):ve("",!0)]),_:3},512)}}}),ed=/* @__PURE__ */C(Zc,[["__scopeId","data-v-406c02b4"]]),td=/* @__PURE__ */we({__name:"i18n-select-input-form",props:{formItemName:{},fromItemExtraProps:{},inputExtraProps:{},i18nConfig:{},text:{},formRef:{}},emits:["update:text"],setup(e,{emit:t}){const l=e,a=t,n=de({get:()=>l.text??"",set(e){var t;a("update:text",e),null===(t=l.formRef)||void 0===t||t.validateFields([l.formItemName])}});return(t,l)=>{const a=ze("a-form-item");return Be(),he(ce,null,[be(a,Oe({name:e.formItemName},e.fromItemExtraProps),{default:tt(()=>[be(ed,Oe(t.$attrs,{"i18n-text":n.value,"onUpdate:i18nText":l[0]||(l[0]=e=>n.value=e),"input-extra-props":e.inputExtraProps,"i18n-config":e.i18nConfig,attr:Array.isArray(e.formItemName)?e.formItemName.join("."):e.formItemName,"placeholder-text":t.$t("sys.inputText")}),null,16,["i18n-text","input-extra-props","i18n-config","attr","placeholder-text"])]),_:1},16,["name"]),be(a,{name:"i18nConfig",hidden:""},{default:tt(()=>[fe("span",null,Ke(e.i18nConfig),1)]),_:1})],64)}}}),ld=td,ad={class:"inline-block w100% relative"},nd=/* @__PURE__ */we({__name:"i18n-select-textarea",props:{attr:{},inputExtraProps:{},i18nConfig:{},i18nText:{},placeholderText:{},rows:{},style:{}},emits:["update:i18nText","update:i18nConfig","on-i18n-select","clickOutside","focus"],setup(e,{emit:t}){const l=e,a=t,n=de({get:()=>l.i18nText??"",set(e){a("update:i18nText",e)}}),o=de(()=>pt(l.i18nConfig)?{}:"string"==typeof l.i18nConfig?JSON.parse(l.i18nConfig)??{}:l.i18nConfig??{}),i=de(()=>{var e;return null===(e=o.value)||void 0===e?void 0:e[l.attr]}),s=e=>{e&&(pt(n.value)&&a("update:i18nText",e.i18nTitle),a("update:i18nConfig",JSON.stringify(pt(e)?gt(o.value,l.attr):{...o.value,[l.attr]:e.i18nKey})),a("on-i18n-select",e))},r=Re(),u=()=>{a("focus",r.value)};return(t,l)=>{const o=ze("a-textarea");return Be(),he("div",ad,[be(o,Oe({ref_key:"inputRef",ref:r,value:n.value,"onUpdate:value":l[0]||(l[0]=e=>n.value=e),placeholder:e.placeholderText},e.inputExtraProps,{style:{resize:"none",...e.style},onFocus:u}),null,16,["value","placeholder","style"]),be(Qc,{"i18n-value":i.value,"simple-btn":!0,type:"text",onOnSelectI18n:s,onClosed:l[1]||(l[1]=e=>a("clickOutside"))},null,8,["i18n-value"])])}}}),od=/* @__PURE__ */C(nd,[["__scopeId","data-v-cd95c416"]]),id=/* @__PURE__ */we({__name:"i18n-select-textarea-form",props:{formItemName:{},fromItemExtraProps:{},inputExtraProps:{},i18nConfig:{},text:{},formRef:{}},emits:["update:text"],setup(e,{emit:t}){const l=e,a=t,n=de({get:()=>l.text??"",set(e){var t;a("update:text",e),null===(t=l.formRef)||void 0===t||t.validateFields([l.formItemName])}});return(t,l)=>{const a=ze("a-form-item");return Be(),he(ce,null,[be(a,Oe({name:e.formItemName},e.fromItemExtraProps),{default:tt(()=>[be(od,Oe(t.$attrs,{"i18n-text":n.value,"onUpdate:i18nText":l[0]||(l[0]=e=>n.value=e),"placeholder-text":t.$t("sys.inputText"),"input-extra-props":e.inputExtraProps,"i18n-config":e.i18nConfig,attr:Array.isArray(e.formItemName)?e.formItemName.join("."):e.formItemName}),null,16,["i18n-text","placeholder-text","input-extra-props","i18n-config","attr"])]),_:1},16,["name"]),be(a,{name:"i18nConfig",hidden:""},{default:tt(()=>[fe("span",null,Ke(e.i18nConfig),1)]),_:1})],64)}}}),sd=id,rd={class:"serial-item-container flex"},ud={class:"tit"},cd={class:"tit"},dd={class:"tit"},pd={class:"tit"},md={class:"flex flex-col mr-10px serial-num-no-error"},vd={class:"tit"},hd={class:"serial-num-no-error flex items-end"},fd={class:"tit"},gd={class:"tit"},yd={class:"tit"},bd={class:"tit"},xd={class:"flex flex-col mr-10px serial-num-no-error"},wd={class:"tit"},kd=/* @__PURE__ */we({__name:"serial-number-item",props:{fieldName:{},isShow:{type:Boolean},itemConfig:{},modelKey:{},isFeild:{type:Boolean},required:{type:Boolean},serialValiIds:{},haveIncrease:{type:Boolean}},emits:["del","update:itemConfig"],setup(e,{emit:t}){const l=Re([{value:0,label:"sys.model.lowercase"},{value:1,label:"sys.model.uppercase"}]),a=Re(["最小长度:序列号的最小长度。","起始序号:序列号会从起始序号开始编码。","填充符:序列号值的长度不够时自动补位。","步长:下一个序列号在上一个序列号上递增或递减。","终止序号:序列号会在终止序号处结束。"]),n=t,o=e,i=Re(),s=de(()=>o.haveIncrease&&h.value.type!==K.INCREASE?gt(K,"INCREASE"):K),r=de({get:()=>o.itemConfig.config.minLength,set(e){h.value.config.minLength=e||0,n("update:itemConfig",h.value)}}),u=de({get:()=>o.itemConfig.config.from,set(e){h.value.config.from=e||0,n("update:itemConfig",h.value)}}),c=de({get:()=>o.itemConfig.config.to,set(e){h.value.config.to=null===e?void 0:e,n("update:itemConfig",h.value)}}),d=de({get:()=>o.itemConfig.config.padding,set(e){h.value.config.padding=e,n("update:itemConfig",h.value)}}),p=de({get:()=>o.itemConfig.config.step,set(e){0!==e?(h.value.config.step=e||1,n("update:itemConfig",h.value)):At.error("步长不可为0!")}}),m=de({get:()=>o.itemConfig.config.value,set(e){h.value.config.value=e,n("update:itemConfig",h.value)}}),v=de({get:()=>o.itemConfig.config.pattern,set(e){h.value.config.pattern=e,n("update:itemConfig",h.value)}}),h=de({get:()=>o.itemConfig,set(e){n("update:itemConfig",e)}}),f=async e=>{var t;h.value.config.modelKey=e,h.value.config.descName=null===(t=i.value)||void 0===t?void 0:t.feildCascaderName,n("update:itemConfig",h.value)},g=de(()=>{const e=h.value.config.patternType,t=h.value.config.reset;let l=310;return l="CUSTOM"===e&&t?98:"CUSTOM"===e||t?150:310,{width:`${l}px`,marginRight:"8px",background:"#fff"}}),y=()=>{n("del")},b=e=>{e===K.LETTER&&(h.value.config.upper=1),e===K.INCREASE&&(h.value.config={minLength:4,from:1,padding:"0",step:1}),h.value.type=e,n("update:itemConfig",h.value)},x=(e,t)=>{h.value.config.pattern="CUSTOM"===e?"":t.key,n("update:itemConfig",h.value)},w=()=>{n("update:itemConfig",h.value)};return(t,n)=>{var o,k,C,_,S,E;const O=ze("a-input-number"),I=ze("a-form-item-rest"),T=ze("a-input"),F=ze("question-circle-outlined"),L=ze("a-tooltip"),D=ze("a-select-option"),M=ze("a-select"),B=ze("data-field-cascader"),j=ze("a-checkbox"),A=ze("a-button");return Be(),he("div",{class:Te(["series-item-wrapper",{"series-disable":!e.isShow}])},[n[20]||(n[20]=fe("i",{class:"iconfont icon-drag mover"},null,-1)),fe("div",rd,[e.isFeild||e.fieldName!==We(K).INCREASE?(Be(),he(ce,{key:1},[fe("div",hd,[be(I,null,{default:tt(()=>[be(M,{value:h.value.type,"onUpdate:value":n[5]||(n[5]=e=>h.value.type=e),style:{width:"100px","margin-right":"8px"},onChange:b},{default:tt(()=>[(Be(!0),he(ce,null,Pe(Object.keys(s.value),e=>(Be(),me(D,{key:e,value:We(K)[e]},{default:tt(()=>[ye(Ke(We(ne)(`sys.model.${e}`)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),h.value.type===We(K).INCREASE?(Be(),he(ce,{key:0},[fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":null!=r.value&&null!=r.value}])},[fe("div",fd,Ke(We(ne)("sys.model.minimumLengthLimit")),1),be(I,null,{default:tt(()=>[be(O,{value:r.value,"onUpdate:value":n[6]||(n[6]=e=>r.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":null!=u.value&&null!=u.value}])},[fe("div",gd,Ke(We(ne)("sys.model.startingSequenceNumber")),1),be(I,null,{default:tt(()=>[be(O,{value:u.value,"onUpdate:value":n[7]||(n[7]=e=>u.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":d.value}])},[fe("div",yd,Ke(We(ne)("sys.model.placeholder")),1),be(I,null,{default:tt(()=>[be(T,{value:d.value,"onUpdate:value":n[8]||(n[8]=e=>d.value=e)},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":p.value}])},[fe("div",bd,Ke(We(ne)("sys.model.step")),1),be(I,null,{default:tt(()=>[be(O,{value:p.value,"onUpdate:value":n[9]||(n[9]=e=>p.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",xd,[fe("div",wd,Ke(We(ne)("sys.model.endSerialNumber")),1),be(I,null,{default:tt(()=>[be(O,{value:c.value,"onUpdate:value":n[10]||(n[10]=e=>c.value=e),precision:0},null,8,["value"])]),_:1})]),be(L,{"overlay-class-name":"serial-increase-tooltip"},{title:tt(()=>[(Be(!0),he(ce,null,Pe(a.value,(e,t)=>(Be(),he("div",{key:t,class:"tip-item"},Ke(e),1))),128))]),default:tt(()=>[be(F,{style:{"margin-top":"20px",color:"#c3c3c3","line-height":"30px"}})]),_:1})],64)):ve("",!0),h.value.type===We(K).FIXED?(Be(),he("div",{key:1,class:Te({"serial-num-no-error":m.value||!(null===(o=e.serialValiIds)||void 0===o?void 0:o.includes(e.itemConfig.id))})},[be(I,null,{default:tt(()=>[be(T,{value:m.value,"onUpdate:value":n[11]||(n[11]=e=>m.value=e),style:{width:"310px"},placeholder:We(ne)("sys.pageDesigner.inputplaceholder")},null,8,["value","placeholder"])]),_:1})],2)):ve("",!0),h.value.type===We(K).PLACEHOLDER?(Be(),me(B,{key:2,ref_key:"fieldCascaderRef",ref:i,value:h.value.config.modelKey,"onUpdate:value":[n[12]||(n[12]=e=>h.value.config.modelKey=e),f],class:Te({"serial-num-no-error":h.value.config.modelKey||!(null===(k=e.serialValiIds)||void 0===k?void 0:k.includes(e.itemConfig.id))}),style:{width:"310px","margin-right":"8px"},"model-key":e.modelKey,"is-feild":e.isFeild},null,8,["value","class","model-key","is-feild"])):ve("",!0),h.value.type===We(K).DATE?(Be(),he(ce,{key:3},[fe("div",{class:Te({"serial-num-no-error":h.value.config.patternType||!(null===(C=e.serialValiIds)||void 0===C?void 0:C.includes(e.itemConfig.id))})},[be(I,null,{default:tt(()=>[be(M,{value:h.value.config.patternType,"onUpdate:value":n[13]||(n[13]=e=>h.value.config.patternType=e),style:Fe(g.value),onChange:x},{default:tt(()=>[(Be(!0),he(ce,null,Pe(We(z),(e,t)=>(Be(),me(D,{key:t,value:t},{default:tt(()=>[ye(Ke(We(ne)(We(z)[t])),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","style"])]),_:1})],2),fe("div",{class:Te({"serial-num-no-error":v.value||!(null===(_=e.serialValiIds)||void 0===_?void 0:_.includes(e.itemConfig.id))})},[be(I,null,{default:tt(()=>[lt(be(T,{value:v.value,"onUpdate:value":n[14]||(n[14]=e=>v.value=e),style:Fe(g.value),placeholder:"请输入"},null,8,["value","style"]),[[Qe,"CUSTOM"===h.value.config.patternType]])]),_:1})],2)],64)):ve("",!0),h.value.type===We(K).LETTER?(Be(),he("div",{key:4,class:Te({"serial-num-no-error":h.value.config.upper||!(null===(S=e.serialValiIds)||void 0===S?void 0:S.includes(e.itemConfig.id))})},[be(I,null,{default:tt(()=>[be(M,{value:h.value.config.upper,"onUpdate:value":n[15]||(n[15]=e=>h.value.config.upper=e),style:{width:"310px"},onChange:w},{default:tt(()=>[(Be(!0),he(ce,null,Pe(l.value,(e,t)=>(Be(),me(D,{key:`${e.value}_${t}`,value:e.value},{default:tt(()=>[ye(Ke(We(ne)(e.label)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})],2)):ve("",!0)],64)):(Be(),he(ce,{key:0},[fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":null!=r.value&&null!=r.value}])},[fe("div",ud,Ke(We(ne)("sys.model.minimumLengthLimit")),1),be(I,null,{default:tt(()=>[be(O,{value:r.value,"onUpdate:value":n[0]||(n[0]=e=>r.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":null!=u.value&&null!=u.value}])},[fe("div",cd,Ke(We(ne)("sys.model.startingSequenceNumber")),1),be(I,null,{default:tt(()=>[be(O,{value:u.value,"onUpdate:value":n[1]||(n[1]=e=>u.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":d.value}])},[fe("div",dd,Ke(We(ne)("sys.model.placeholder")),1),be(I,null,{default:tt(()=>[be(T,{value:d.value,"onUpdate:value":n[2]||(n[2]=e=>d.value=e)},null,8,["value"])]),_:1})],2),fe("div",{class:Te(["flex flex-col mr-8px",{"serial-num-no-error":p.value}])},[fe("div",pd,Ke(We(ne)("sys.model.step")),1),be(I,null,{default:tt(()=>[be(O,{value:p.value,"onUpdate:value":n[3]||(n[3]=e=>p.value=e),precision:0},null,8,["value"])]),_:1})],2),fe("div",md,[fe("div",vd,Ke(We(ne)("sys.model.endSerialNumber")),1),be(I,null,{default:tt(()=>[be(O,{value:c.value,"onUpdate:value":n[4]||(n[4]=e=>c.value=e),precision:0},null,8,["value"])]),_:1})]),be(L,{"overlay-class-name":"serial-increase-tooltip"},{title:tt(()=>[(Be(!0),he(ce,null,Pe(a.value,(e,t)=>(Be(),he("div",{key:t,class:"tip-item"},Ke(e),1))),128))]),default:tt(()=>[be(F,{style:{"margin-top":"20px",color:"#c3c3c3","line-height":"30px"}})]),_:1})],64)),h.value.type===We(K).DATE&&h.value.config.reset?(Be(),he("div",{key:2,class:Te({"serial-num-no-error":h.value.config.condition||!(null===(E=e.serialValiIds)||void 0===E?void 0:E.includes(e.itemConfig.id))})},[be(I,null,{default:tt(()=>[be(M,{value:h.value.config.condition,"onUpdate:value":n[16]||(n[16]=e=>h.value.config.condition=e),style:Fe(g.value),onChange:w},{default:tt(()=>[(Be(!0),he(ce,null,Pe(Object.keys(We(V)),e=>(Be(),me(D,{key:e,value:We(V)[e]},{default:tt(()=>[ye(Ke(We(ne)(`sys.${e}`)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","style"])]),_:1})],2)):ve("",!0),[We(K).PLACEHOLDER,We(K).DATE].includes(h.value.type)?(Be(),me(I,{key:3},{default:tt(()=>[be(j,{checked:h.value.config.reset,"onUpdate:checked":n[17]||(n[17]=e=>h.value.config.reset=e),style:{width:"70px","line-height":"30px"},onChange:w},{default:tt(()=>[...n[18]||(n[18]=[ye("重置",-1)])]),_:1},8,["checked"])]),_:1})):ve("",!0)]),e.isShow&&(e.isFeild||h.value.type!==We(K).INCREASE)?(Be(),he("div",{key:0,class:Te(["action",{"pt18px pl5px":h.value.type===We(K).INCREASE}]),onClick:y},[be(A,null,{icon:tt(()=>[...n[19]||(n[19]=[fe("span",{class:"gct-iconfont icon-icon_shanchu"},null,-1)])]),_:1})],2)):ve("",!0)],2)}}}),Cd=/* @__PURE__ */C(kd,[["__scopeId","data-v-7baf8e25"]]),_d={class:"serial-number-container-wrapper"},Sd={class:"serial-number-container-preview"},Ed={class:"preview-title"},Od={class:"preview-box"},Id=["innerHTML"],Td=/* @__PURE__ */we({__name:"serial-number-container",props:{serialConfigValue:{},disabled:{type:Boolean},readonly:{type:Boolean},field:{},isFeild:{type:Boolean},required:{type:Boolean},serialValiIds:{},increaseHidden:{type:Boolean},isDesign:{type:Boolean}},emits:["update:value"],setup(e,{emit:t}){const a=e,n=t,o=Re(),i=Re(),s=Re([]),r=de({get(){const e=[{id:Y(),type:K.INCREASE,config:{minLength:4,from:1,padding:"0",step:1}}];return a.serialConfigValue?a.serialConfigValue:{modelKey:"",ruleConfig:a.increaseHidden&&!a.isDesign?[]:e}},set(e){n("update:value",e)}}),u=de(()=>{const{ruleConfig:e}=We(r);return e}),c=de(()=>!!u.value.find(e=>e.type===K.INCREASE));l(r,async()=>{m()},{debounce:500}),De(()=>{Ie(()=>{if(!a.disabled){if(a.serialConfigValue){const{modelKey:e}=a.serialConfigValue;i.value=e}cl.create(o.value,{animation:150,onEnd(e){const{modelKey:t}=We(r),l=ot(u.value);Z(l,e.oldIndex,e.newIndex),r.value={modelKey:t,ruleConfig:l}}}),!a.serialConfigValue&&r.value&&(n("update:value",r.value),m())}})});const d=e=>{let t="";const{modelKey:l}=We(r),a=ot(u.value);a.map(e=>e.id).includes(e.id)&&(a.forEach(l=>{var a;l.id===e.id&&(l.type=e.type,l.config=e.config,l.type===K.PLACEHOLDER&&(t=null===(a=e.config.modelKey)||void 0===a?void 0:a.split(".")[0]))}),r.value={modelKey:t||l,ruleConfig:a})},p=()=>{const{modelKey:e}=We(r),t=ot(u.value),l={id:Y(),type:K.FIXED,config:{value:"",modelKey:"",pattern:"yyyyMMdd",patternType:"yyyyMMdd",condition:V.YEAR,minLength:0,from:0,padding:"",reset:!1,step:1,to:0,descName:""}};r.value={modelKey:e,ruleConfig:[...t,l]}},m=async()=>{var e;if(!a.field)return;const t=ot(u.value),l={},n=null===(e=t.filter(e=>e.type===K.PLACEHOLDER&&e.config.modelKey))||void 0===e?void 0:e.map(e=>({key:e.config.modelKey,value:"${"+e.config.descName+"}"}));n.length&&n.forEach(e=>{l[e.key]=e.value}),s.value=(await _api.apaas.fieldMeta.postPreview({ruleJson:JSON.stringify(t),placeHolders:l})||[]).map(e=>e.replace(/\$\{/g,"<span>${").replace(/\}/g,"}</span>"))};return(t,l)=>{const n=ze("plus-outlined"),i=ze("a-button");return Be(),he("div",_d,[fe("div",{ref_key:"serialRef",ref:o,class:Te(["serial-num-item-box",{"serial-disabled":e.disabled}])},[(Be(!0),he(ce,null,Pe(u.value,(t,l)=>(Be(),me(Cd,{key:t.id,class:Te(t.type===We(K).INCREASE&&0===l?"increase-mt":""),"field-name":t.type,"item-config":t,"is-show":!(e.readonly||e.disabled),"model-key":t.type===We(K).PLACEHOLDER?r.value.modelKey:"","is-feild":e.isFeild,required:e.required,"serial-vali-ids":e.serialValiIds,"have-increase":c.value,onDel:e=>(e=>{if(a.disabled)return;const{modelKey:t}=We(r),l=ot(u.value);l.splice(e,1),r.value={modelKey:t,ruleConfig:l}})(l),"onUpdate:itemConfig":d},null,8,["class","field-name","item-config","is-show","model-key","is-feild","required","serial-vali-ids","have-increase","onDel"]))),128))],2),e.readonly||e.disabled?ve("",!0):(Be(),me(i,{key:0,type:"dashed",onClick:p},{default:tt(()=>[be(n),ye(" "+Ke(We(ne)("sys.model.addMoreRule")),1)]),_:1})),fe("div",Sd,[fe("span",Ed,Ke(We(ne)("sys.preview")+":"),1),fe("div",Od,[(Be(!0),he(ce,null,Pe(s.value,(e,t)=>(Be(),he("p",{key:t,innerHTML:e},null,8,Id))),128))])])])}}}),Fd=/* @__PURE__ */C(Td,[["__scopeId","data-v-35a73b4c"]]),Ld={class:"w230px m--14px"},Dd={class:"ks-row"},Md={key:1,class:"ks-col ell"},Bd={key:2,class:"action"},jd=["onClick"],Ad=["onClick"],Rd={class:"popover-bottom"},Nd=/* @__PURE__ */we({__name:"field-tree-select",props:{fieldMap:{type:Object,default:()=>({})},groupOptions:{type:Array,default:()=>[]},fieldNames:{type:Object,default:()=>({children:"children",title:"title",key:"key"})},maxLevel:{type:Number,default:3},getLabelByFun:{type:Function,default:()=>{console.log("getLabelByFun")}},getFieldTypeByFun:{type:Function,default:()=>{console.log("getFieldTypeByFun")}},setLabelByFun:{type:Function,default:()=>{console.log("setLabelByFun")}}},emits:["change"],setup(e,{emit:t}){const l=e,a=t,{fieldNames:n,getLabelByFun:o,setLabelByFun:i,getFieldTypeByFun:s}=l,r=Re(!0),u=Re([]),c=Re(),d=Re({}),p=Re();function m(e){return e.isGroup?e[n.title]:o(l.fieldMap[e[n.key]])}function v(e){return s(l.fieldMap[e])}async function h(e){d.value=e,await Ie(),c.value&&c.value.select()}function f(){d.value={}}function g(e){let t=1;return function l(a,o){for(const i of a){if(i[n.key]===e)return t=o,!0;if(i.children&&i.children.length>0&&l(i.children,o+1))return!0}return!1}(l.groupOptions,1),t}function y(e){const{dropNode:t,dragNode:a}=e,{dropToGap:n}=e;let o=1;o=t.isGroup&&!n?g(t.key)+1:g(t.key);const i=function(e){return function e(t){if(!t.isGroup)return 0;let l=0;for(const a of t.children)l=Math.max(l,e(a));return l+1}(e)}(a);return r.value=o+i-1<=l.maxLevel,!0}const b=async e=>{if(!r.value)return;const{dropToGap:t,dragNode:n,node:o}=e,i=e.dropPosition,s=await new Promise(e=>{x(l.groupOptions,n.key,(t,l,a)=>{e(ot(a.splice(l,1)[0]))})});x(l.groupOptions,o.key,(e,l,a)=>{o.isGroup&&!t?e.children.unshift(s):a.splice(-1===i?l:l+1,0,s)}),a("change")},x=(e,t,l)=>{const a=e.length;for(let o=0;o<a;o++){const a=e[o];if(a[n.key]===t){l(a,o,e);break}a.children&&x(a.children,t,l)}};async function w(e,t){if(t)x(l.groupOptions,t,async(l,a,n)=>{const o=k(e);l.children.push(o),await Ie(),!u.value.includes(t)&&u.value.push(t),h(o),p.value.scrollTo({key:o.key})});else{const t=k(e);l.groupOptions.push(t),h(t),await Ie(),p.value.scrollTo({key:t.key})}a("change")}function k(e){const t=[];!function(e,t){if(!e)return;const l="children",a=[...e];for(;a.length>0;){const e=a.shift();if(Array.isArray(e[l]))for(let t=e[l].length-1;t>=0;t--)a.unshift(e[l][t]);t(e)}}(l.groupOptions,e=>{e.isGroup&&t.push(e.index)});const a=t.length?Math.max(...t)+1:1;return{title:`分组${a}`,groupLevel:e,key:/* @__PURE__ */(new Date).getTime(),isGroup:!0,children:[],index:a}}return(t,o)=>{const s=ze("a-select"),k=ze("a-input"),C=ze("a-tooltip"),_=ze("a-popconfirm"),S=ze("a-tree"),E=ze("plus-outlined"),O=ze("a-button"),I=ze("a-popover");return Be(),me(I,{trigger:"click",placement:"bottom","get-popup-container":e=>e.parentNode,"overlay-style":{paddingTop:0,paddingBottom:0}},{content:tt(()=>[fe("div",Ld,[e.groupOptions.length?(Be(),me(S,{key:0,ref_key:"treeRef",ref:p,"expanded-keys":u.value,"onUpdate:expandedKeys":o[0]||(o[0]=e=>u.value=e),"field-names":We(n),height:300,draggable:"","tree-data":e.groupOptions,"show-icon":"",class:Te(["tree-field",{"gct-no-drop":!r.value}]),selectable:!1,"allow-drop":y,virtual:!1,onDrop:b},{icon:tt(({isGroup:e,key:t})=>[e?(Be(),me(We(Vt),{key:0,class:"folder",size:"20",name:"folder"})):v(t)?(Be(),he("span",{key:1,class:Te(["iconfont primary-gct",We(R)[v(t)]])},null,2)):ve("",!0)]),title:tt(({key:e,isGroup:s,groupLevel:r,data:u})=>{return[fe("div",Dd,[d.value[We(n).key]===e?(Be(),me(k,{key:0,ref_key:"editorInput",ref:c,value:m(u),class:"ks-col h24px","allow-clear":!1,"onUpdate:value":e=>function(e,t){t.isGroup?d.value[n.title]=e:i(t[n.key],e),a("change")}(e,u),onBlur:f},null,8,["value","onUpdate:value"])):(Be(),he("div",Md,Ke(m(u)),1)),d.value[We(n).key]!==e?(Be(),he("div",Bd,[s?(Be(),me(_,{key:0,placement:"topLeft",title:t.$t("sys.pageDesigner.confirmTodo"),onConfirm:()=>function(e){x(l.groupOptions,e,(e,t,l)=>{e.isGroup&&e.children.length&&l.push(...e.children),l.splice(t,1)}),a("change")}(e)},{default:tt(()=>[be(C,{title:"删除"},{default:tt(()=>[...o[2]||(o[2]=[fe("span",{class:"icon-shanchu iconfont mr6px cursor-pointer primary-gct-hover"},null,-1)])]),_:1})]),_:1},8,["title","onConfirm"])):ve("",!0),s&&(p=e,g(p)<l.maxLevel)?(Be(),me(C,{key:1,title:"添加子分组"},{default:tt(()=>[fe("span",{class:"icon-chuangjian iconfont mr6px cursor-pointer primary-gct-hover",onClick:t=>w(r+1,e)},null,8,jd)]),_:2},1024)):ve("",!0),s?(Be(),me(C,{key:2,title:"重命名"},{default:tt(()=>[fe("span",{class:"icon-a-Single-linetext iconfont mr6px cursor-pointer primary-gct-hover",onClick:e=>h(u)},null,8,Ad)]),_:2},1024)):ve("",!0),be(C,{title:"拖动排序"},{default:tt(()=>[...o[3]||(o[3]=[fe("span",{class:"icon-drag iconfont"},null,-1)])]),_:1})])):ve("",!0)])];var p}),_:1},8,["expanded-keys","field-names","tree-data","class"])):ve("",!0),fe("div",Rd,[be(O,{type:"link",onClick:o[1]||(o[1]=e=>w(1))},{icon:tt(()=>[be(E)]),default:tt(()=>[o[4]||(o[4]=ye(" 添加表头分组 ",-1))]),_:1})])])]),default:tt(()=>[be(s,{value:"配置多级表头","dropdown-class-name":"hidden"})]),_:1},8,["get-popup-container"])}}}),Pd=/* @__PURE__ */C(Nd,[["__scopeId","data-v-898030d3"]]),Ud={class:"w230px m--14px pb16px"},zd={class:"ks-col ell"},$d=["onClick"],Vd=/* @__PURE__ */we({__name:"field-sort-popover",props:{fieldMap:{type:Object,default:()=>({})},groupOptions:{type:Array,default:()=>[]},fieldNames:{type:Object,default:()=>({children:"children",title:"title",key:"key"})},getLabelByFun:{type:Function,default:()=>{console.log("getLabelByFun")}},getFieldTypeByFun:{type:Function,default:()=>{console.log("getFieldTypeByFun")}},getFieldHiddenByFun:{type:Function,default:e=>e.visible},changeFieldHiddenByFun:{type:Function,default:(e,t)=>{e.visible=t}}},emits:["change"],setup(e,{emit:t}){const l=e,a=Re(!0),n=Re(),o=t,{fieldNames:i,getLabelByFun:s,fieldMap:r,getFieldTypeByFun:u,getFieldHiddenByFun:c,changeFieldHiddenByFun:d}=l,p=Ae(l.groupOptions);function m(e){return e.isGroup?e[i.title]:s(r[e[i.key]])}function v(e){return c(r[e])}function h(e){return u(r[e])}function f({node:e}){if(!e.isGroup)return;const t=e.expanded?"gct-"+e.key:void 0;n.value=t,e.dataRef.class=t}const g=async e=>{if(!a.value)return;const{dropToGap:t,dragNode:l,node:i}=e,s=e.dropPosition,r=await new Promise(e=>{y(p,l.key,(t,l,a)=>{e(ot(a.splice(l,1)[0]))})});y(p,i.key,(e,l,a)=>{i.isGroup&&!t?e.children.unshift(r):a.splice(-1===s?l:l+1,0,r)}),o("change",ot(p)),async function(){if(!n.value)return;await Ie();const e=document.querySelector(`.${n.value}`);e&&e.childNodes[2]&&e.childNodes[2].click()}()},y=(e,t,l,a)=>{const n=e.length;for(let o=0;o<n;o++){const n=e[o];if(n[i.key]===t){l(n,o,e,a);break}n.children&&y(n.children,t,l,n)}};function b({dragNode:e,dropNode:t,dropPosition:l}){return!(e.dataRef.noDrag||e.parent&&-1===l||(0===l?(null===(n=e.parent)||void 0===n?void 0:n.key)!==t.key:(a.value=function({dragNode:e,dropNode:t}){let l=!1;return y(p,t.key,(t,a,n,o)=>{var i;l=(null===(i=e.parent)||void 0===i?void 0:i.key)===(null==o?void 0:o.key)}),l}({dragNode:e,dropNode:t,dropPosition:l}),0)));var n}return(e,t)=>{const l=ze("a-tooltip"),n=ze("a-tree"),s=ze("a-popover");return Be(),me(s,{trigger:"click",placement:"bottom","get-popup-container":e=>e.parentNode,"overlay-style":{paddingTop:0}},{content:tt(()=>[fe("div",Ud,[t[1]||(t[1]=fe("div",{class:"popover-title"},"显示字段",-1)),p.length?(Be(),me(n,{key:0,"default-expand-all":"","field-names":We(i),height:300,draggable:"","tree-data":p,"show-icon":"",class:Te(["tree-field",{"gct-no-drop":!a.value}]),selectable:!1,"allow-drop":b,virtual:!1,onDrop:g,onDragstart:f},{icon:tt(({isGroup:e,key:t})=>[e?(Be(),me(We(Vt),{key:0,class:"folder",size:"20",name:"folder"})):h(t)?(Be(),he("span",{key:1,class:Te(["iconfont primary-gct",We(R)[h(t)]])},null,2)):ve("",!0)]),title:tt(({noDrag:e,data:a,key:n,isGroup:i})=>[(Be(),he("div",{key:n,class:"ks-row"},[fe("div",zd,Ke(m(a)),1),i?ve("",!0):(Be(),he("span",{key:0,class:Te(["iconfont mr-4px",v(n)?"icon-yulan":"icon-baomi"]),onClick:e=>function(e){const t=v(e);d(r[e],!t),o("change",ot(p))}(n)},null,10,$d)),e?ve("",!0):(Be(),me(l,{key:1,title:"拖动排序"},{default:tt(()=>[...t[0]||(t[0]=[fe("span",{class:"icon-drag iconfont"},null,-1)])]),_:1}))]))]),_:1},8,["field-names","tree-data","class"])):ve("",!0)])]),default:tt(()=>[Ue(e.$slots,"default",{},void 0,!0)]),_:3},8,["get-popup-container"])}}}),Hd=Pd,Kd=/* @__PURE__ */C(Vd,[["__scopeId","data-v-c1811778"]]),Gd={class:"range-box"},qd={class:"text"},Yd=/* @__PURE__ */we({__name:"number-range",props:{rangeMin:{type:[Number,void 0],default:void 0},rangeMax:{type:[Number,void 0],default:void 0},disabled:{type:Boolean,default:!1},precision:{type:Number,default:0},maxObj:{type:[Object,void 0],default:void 0},placeholderType:{type:String,default:ne("sys.model.value")}},emits:["update:rangeMin","update:rangeMax","change"],setup(e,{emit:t}){const l=e,a=de(()=>l.maxObj?l.maxObj.start:void 0),n=de(()=>l.maxObj?l.maxObj.end:void 0),o=e=>{s("update:rangeMin",e),s("change",e)},i=e=>{s("update:rangeMax",e),s("change",e)},s=t;return(t,l)=>{const s=ze("a-input-number");return Be(),he("div",Gd,[be(s,{value:e.rangeMin,min:0,max:a.value,precision:e.precision,placeholder:`${We(ne)("sys.model.pleaseInputMin")}${e.placeholderType}`,onChange:o},null,8,["value","max","precision","placeholder"]),fe("div",qd,[Ue(t.$slots,"middle-text",{},()=>[ye(Ke(t.$t("sys.webRender.to")),1)],!0)]),be(s,{value:e.rangeMax,min:0,max:n.value,precision:e.precision,placeholder:`${We(ne)("sys.model.pleaseInputMax")}${e.placeholderType}`,onChange:i},null,8,["value","max","precision","placeholder"])])}}}),Wd=/* @__PURE__ */C(Yd,[["__scopeId","data-v-283a5280"]]),Jd={install(e){e.component(ir.name,ir),e.component("IconNextPicker",xe(()=>import("./icon-next-picker-y8hJhkCi.js")))}},Xd={scrollbars:{autoHide:"leave",autoHideDelay:100,theme:"os-theme-dark"}},Qd=/* @__PURE__ */we({name:"GctOverlayScrollbars",inheritAttrs:!1,props:{options:{type:[Object,Boolean],default:null},handleColor:{type:String,default:"rgba(144, 147, 153, 0.3)"}},setup(e,{expose:t}){const l=Re(),a=de(()=>{if(!1===e.options)return!1;const t=e.options??{},l=t.scrollbars??{};return{...Xd,...t,scrollbars:{...Xd.scrollbars,...l}}}),n=de(()=>e.handleColor?{"--gct-h-bg":e.handleColor}:void 0);return t({osInstance:()=>{var e;return(null===(e=l.value)||void 0===e?void 0:e.osInstance())??null},getElement:()=>{var e;return(null===(e=l.value)||void 0===e?void 0:e.getElement())??null}}),{mergedOptions:a,colorStyle:n,setOsRef:e=>{l.value=e}}},render(){return be(T,Oe({ref:this.setOsRef,options:this.mergedOptions},this.$attrs,{"data-gct-os":"","data-gct-color":this.handleColor?"":void 0,style:this.colorStyle}),{default:()=>{var e,t;return[null===(e=(t=this.$slots).default)||void 0===e?void 0:e.call(t)]}})}}),Zd={mounted(e,t){var l;if(!t.value)return!1;null===(l=t.instance)||void 0===l||l.$nextTick(()=>{const l=t.value,a=e,n=document.createElement("div");a.appendChild(n),n.style.cursor="col-resize",n.style.position="absolute",n.style.height="100%",n.style.width="5px",n.style.right="0px",n.style.top="0px",n.style.background="rgba(255, 0, 0, 0);",n.onmousedown=t=>{const n=a.clientWidth,o=t.clientX;document.onmousemove=function(t){t.preventDefault();let i=n+(t.clientX-o);i=i<l?l:i,a.setAttribute("style",`width:${i}px !important;`);const s=new CustomEvent("drag-resize-width",{detail:{width:i,resizing:!0}});e.dispatchEvent(s)},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})}},ep={mounted(e,t){e.__ellipsisHandler__=()=>{const l=e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight,a=t.value;l?e.setAttribute("title",a):e.removeAttribute("title")},e.addEventListener("mouseenter",e.__ellipsisHandler__)},beforeUnmount(e){e.__ellipsisHandler__&&e.removeEventListener("mouseenter",e.__ellipsisHandler__)}},tp=/* @__PURE__ */C(/* @__PURE__ */we({__name:"target-loading",props:{tip:{type:String,default:""},size:{type:String,default:H.LARGE,validator:e=>[H.DEFAULT,H.SMALL,H.LARGE].includes(e)},absolute:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},background:{type:String},theme:{type:String}},setup:e=>(t,l)=>lt((Be(),he("section",{class:Te(["full-loading",{absolute:e.absolute,[e.theme]:!!e.theme}]),style:Fe([e.background?`background-color: ${e.background}`:""])},[be(We(Dt),Oe(t.$attrs,{tip:e.tip,size:e.size,spinning:e.loading}),null,16,["tip","size","spinning"])],6)),[[Qe,e.loading]])}),[["__scopeId","data-v-d448466c"]]),lp={mounted(e,t){const l=e.getAttribute("loading-tip"),a=e.getAttribute("loading-background"),n=e.getAttribute("loading-size"),o=!!t.modifiers.fullscreen;e.instance=function(e,t,l=!1){let a=null;const n=Ae({tip:"",loading:!0,...e});function o(e=document.body){a&&a.el&&e.appendChild(a.el)}return a=be(we({render:()=>Ce(tp,{...n})})),l?setTimeout(()=>{Ne(a,document.createElement("div"))},0):Ne(a,document.createElement("div")),t&&o(t),{vm:a,close:function(){(null==a?void 0:a.el)&&a.el.parentNode&&a.el.parentNode.removeChild(a.el)},open:o,setTip:e=>{n.tip=e},setLoading:e=>{n.loading=e},get loading(){return n.loading},get $el(){return null==a?void 0:a.el}}}({tip:l,background:a,size:n||"large",loading:!!t.value,absolute:!o},o?document.body:e)},updated(e,t){const l=e.instance;var a;l&&(l.setTip(e.getAttribute("loading-tip")),t.oldValue!==t.value&&(null===(a=l.setLoading)||void 0===a||a.call(l,t.value&&!l.loading)))},unmounted(e){var t;null==e||null===(t=e.instance)||void 0===t||t.close()}};async function ap(e){e.use(yt),function(e){!function(e){e.directive("dragResize",Zd)}(e),function(e){e.directive("ellipsis-title",ep)}(e),function(e){e.directive("target-loading",lp)}(e)}(e),e.use(Jd),Object.entries(qt).forEach(([t,l])=>{e.component(t,l)}),e.component(Bi.name,Bi),e.component(pi.name,pi),e.component("OverlayScrollbarsComponent",Qd),await Kt(e),e.use(Fo),e.use(oi),e.use(ss)}async function np(e){console.log("coreWebSetupApp")}_gct.message=new S,_gct.openUtil=k,_gct.register.editor=new Xl,_gct.register.formItem=new Ql,_gct.register.tableEditor=new Ho;var op=new URL("./index.min.css",import.meta.url);J.load(op.href);export{Ys as BaseButton,Zs as BasicButton,ss as BasicModal,Ju as CodeEditor,pi as ColorEditor,Bi as ColorPicker,gs as CopperFreeModal,Ss as CopperModal,ir as CopyModuleKey,Is as CropperAvatar,Hs as CropperFree,ps as CropperImage,tr as DoubleInput,Ml as EditFormController,jl as EditorController,Xl as EditorRegister,dl as EditorRegisterConst,pl as EditorType,ml as FORM_CONTROLLER_INJECT_TAG,ic as FieldCascader,Gr as FieldUpload,Pl as FormCollapseController,Nl as FormCollapsePaneController,fl as FormCollapsePaneState,gl as FormCollapseState,Vl as FormEditItemController,xl as FormEditItemState,$l as FormGroupController,wl as FormGroupState,Kl as FormHiddenItemController,Al as FormItemBasicController,hl as FormItemBasicState,Hl as FormItemController,Ql as FormItemRegister,kl as FormItemState,Gl as FormLineController,Cl as FormLineState,vl as FormState,Ul as FormTabController,zl as FormTabPaneController,bl as FormTabPaneState,yl as FormTabState,Wu as FullScreen,ji as GCT_DND_INSERT_POS,Ni as GctDndContainer,Ri as GctDndDropLine,Ai as GctDndItem,ca as GctFormCollapseModel,ia as GctFormCollapsePaneModel,Dl as GctFormController,va as GctFormGroupModel,Ba as GctFormHiddenItemModel,ja as GctFormItemModel,ya as GctFormLineModel,ka as GctFormTabModel,Oa as GctFormTabPaneModel,Da as GctFormTitleGroupModel,zo as GctTableController,$c as I18Modal,Qc as I18nSelectBtn,ed as I18nSelectInput,ld as I18nSelectInputForm,od as I18nSelectTextarea,sd as I18nSelectTextareaForm,Fs as ImagePreview,gr as ImageUpload,y as Lang,S as MessageUtil,di as MonacoEditor,Wd as NumberRange,b as OverlayController,Yu as PaasBpmnLog,Uc as PaasBpmnRuntime,w as Prop,Fd as SerialNumberContainer,Ao as TableActionItemController,Ro as TableEditItemController,Mo as TableEditItemState,Ho as TableEditorRegister,Do as TableITemState,jo as TableItemController,Uo as TableRowController,Bo as TableRowState,Lo as TableState,h as Theme,c as UseDragByLine,hc as UserPickType,Xu as ViewContainer,Qu as Vue3GridDndItem,an as WUJIE_FORMULA_EVENTS,ap as coreWebCreateAppVue,np as coreWebSetupApp,Rs as createImgPreview,Kd as gctFieldSortPopover,Hd as gctFieldTreeSelect,Jl as gctFormItemEditorProps,Fl as getValue,x as monacoLoader,pn as openFormulaEditor,k as overlay,Ll as setValue,Vo as useAntTableScrollHeight,Bl as useEditFormController,ui as useEditorConsole,ci as useEditorConsoleInner,ql as useForm,Rl as useFormItemController,Yl as useGctFormValue,Wl as useGctFormValueByText,Yc as useI18nSelect,_ as useLocale,os as useModal,Hi as useModalContext,zi as useModalDragMove,is as useModalInner,Ac as useModalPicker,$o as useTableController,f as useTheme,v as validateFieldDefaultForLength,m as validateFieldDefaultForValue,s as validateLengthRange,Tl as widthEditorInstall,r as withInstall};
|