@ibiz-template/vue3-components 0.4.3-dev.2 → 0.4.3
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-1dtzc9-X.js +14 -0
- package/dist/index-1dtzc9-X.js.map +1 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-4xzbYCrh.js → xlsx-util-Mxa6HuaG.js} +2 -2
- package/dist/{xlsx-util-4xzbYCrh.js.map → xlsx-util-Mxa6HuaG.js.map} +1 -1
- package/es/_virtual/_commonjs-dynamic-modules.mjs +5 -0
- package/es/_virtual/pluralize.mjs +3 -0
- package/es/common/data-import2/data-import2.css +1 -0
- package/es/common/data-import2/data-import2.d.ts +54 -0
- package/es/common/data-import2/data-import2.mjs +459 -0
- package/es/common/index.mjs +2 -0
- package/es/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/format-path/format-path.mjs +11 -0
- package/es/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/index.mjs +4 -0
- package/es/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/merge-model/merge-model.mjs +22 -0
- package/es/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/plural/plural.mjs +30 -0
- package/es/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/service-path-util/service-path-util.mjs +187 -0
- package/es/node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.mjs +515 -0
- package/es/panel-component/auth-userinfo/auth-userinfo.d.ts +0 -2
- package/es/panel-component/auth-userinfo/auth-userinfo.mjs +2 -25
- package/es/panel-component/auth-userinfo/index.d.ts +0 -2
- package/lib/_virtual/_commonjs-dynamic-modules.cjs +7 -0
- package/lib/_virtual/pluralize.cjs +5 -0
- package/lib/common/data-import2/data-import2.cjs +461 -0
- package/lib/common/data-import2/data-import2.css +1 -0
- package/lib/common/index.cjs +2 -0
- package/lib/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/format-path/format-path.cjs +13 -0
- package/lib/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/index.cjs +14 -0
- package/lib/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/merge-model/merge-model.cjs +24 -0
- package/lib/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/plural/plural.cjs +33 -0
- package/lib/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/service-path-util/service-path-util.cjs +189 -0
- package/lib/node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.cjs +519 -0
- package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +0 -23
- package/package.json +4 -4
- package/dist/index-xXitupxZ.js +0 -14
- package/dist/index-xXitupxZ.js.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
System.register(["@ibiz-template/vue3-util","vue","@ibiz-template/runtime","qx-util","dayjs","ramda","qs","@ibiz-template/core","vue-router","lodash-es","element-plus","@floating-ui/dom","interactjs","vuedraggable","vue-i18n"],function(N,Fe){"use strict";var B,tn,nn,rn,on,an,sn,U,ut,ln,cn,Go,un,qo,Wo,Ho,Ko,Xo,Yo,Jo,Qo,Zo,ea,ta,ne,na,ra,oa,aa,ia,sa,la,ca,Xe,Ot,dt,ua,da,pa,dn,ve,te,ha,ma,fa,ba,va,ga,Ca,wa,pn,ya,Pa,Ea,Ia,Da,_a,Tt,ke,Nt,Ba,Sa,Aa,Fa,xa,Oa,Ta,Na,za,Ra,$a,S,a,d,F,re,W,I,G,R,Pe,pt,La,Ue,Ma,zt,Ye,ht,mt,me,Re,Va,ja,hn,ka,Ua,Ga,qa,ae,ue,$e,Ge,qe,Wa,ft,Ha,Ka,Xa,De,oe,ee,mn,fn,Je,Qe,bn,vn,gn,Rt,Ya,Ja,Qa,Cn,Ae,wn,yn,Pn,En,Za,In,Dn,Ze,_n,Bn,Sn,An,ei,ti,ni,ri,oi,ai,ii,si,$t,li,ci,ui,ie,di,Fn,xn,On,pi,hi,mi,Tn,xe,fi,Nn,zn,Rn,$n,Ln,Mn,Vn,bi,vi,gi,Ci,wi,yi,Pi,et,tt,le,bt,We,vt,j,Ei,Ii,Di,we,J,_i,Ie,jn,Bi,Si,Oe,kn,Un,Ai,_e,Ee,Fi,Te,xi,Lt,Mt,Ne,Gn,pe,gt,Oi,qn,Vt,be,Ti,Ni,zi,Le,Me,nt,Ct,wt,Ri,$i,ge,Li,Be,Mi,yt,Vi,ji,Wn,ki,Ui,Gi,qi,Wi,rt,Hn,Hi;return{setters:[function(C){B=C.useNamespace,tn=C.IBizControlBase,nn=C.IBizIcon,rn=C.IBizRouterView,on=C.IBizViewShell,an=C.IBizControlShell,sn=C.IBizCodeList,U=C.withInstall,ut=C.routerCallback,ln=C.onRouteChange,cn=C.route2routePath,Go=C.routePath2string,un=C.PanelContainerController,qo=C.useAppStore,Wo=C.IBizPanelContainer,Ho=C.IBizPanelCtrlPos,Ko=C.IBizScrollContainer,Xo=C.IBizNavPos,Yo=C.IBizSingleDataContainer,Jo=C.IBizMultiDataContainer,Qo=C.IBizPanelField,Zo=C.IBizPanelRawItem,ea=C.IBizGridContainer,ta=C.IBizPanelContainerImage,ne=C.useControlController,na=C.useClickOutside,ra=C.useEventListener,oa=C.generateRoutePath,aa=C.openViewModal,ia=C.openViewPopover,sa=C.getDrawerPlacement,la=C.openViewDrawer,ca=C.OverlayPopoverContainer,Xe=C.useUIStore,Ot=C.OverlayContainer,dt=C.useController,ua=C.useCtx,da=C.ControlLoadingPlaceholder,pa=C.getNestedRoutePath,dn=C.getSpanProps,ve=C.useFocusAndBlur,te=C.getEditorEmits,ha=C.getInputProps,ma=C.getInputNumberProps,fa=C.getInputIpProps,ba=C.getDropdownProps,va=C.getCheckboxProps,ga=C.getCheckboxListProps,Ca=C.getRadioProps,wa=C.getDatePickerProps,pn=C.getRawProps,ya=C.getStepperProps,Pa=C.getRateProps,Ea=C.getSwitchProps,Ia=C.getSliderProps,Da=C.getListBoxProps,_a=C.getAutoCompleteProps,Tt=C.getUploadProps,ke=C.getDataPickerProps,Nt=C.renderString,Ba=C.getNumberRangeProps,Sa=C.getDateRangeProps,Aa=C.getCodeProps,Fa=C.getArrayProps,xa=C.getCascaderProps,Oa=C.getColorPickerProps,Ta=C.useViewController,Na=C.IBizView,za=C.IBizPortalView,Ra=C.IBizViewLayoutPanelControl,$a=C.IBizPanelControl},function(C){S=C.defineComponent,a=C.createVNode,d=C.resolveComponent,F=C.computed,re=C.h,W=C.isVNode,I=C.ref,G=C.watch,R=C.createTextVNode,Pe=C.onMounted,pt=C.nextTick,La=C.onBeforeUnmount,Ue=C.withDirectives,Ma=C.vShow,zt=C.mergeProps,Ye=C.resolveDirective,ht=C.defineAsyncComponent,mt=C.inject,me=C.reactive,Re=C.onUnmounted,Va=C.renderSlot,ja=C.getCurrentInstance,hn=C.unref,ka=C.createApp},function(C){Ua=C.calcContentAlignStyle,Ga=C.asyncImportData,qa=C.importData,ae=C.PanelItemController,ue=C.registerPanelItemProvider,$e=C.PanelItemState,Ge=C.Modal,qe=C.ViewMode,Wa=C.UIActionButtonState,ft=C.UIActionUtil,Ha=C.getAsyncActionProvider,Ka=C.registerAsyncActionProvider,Xa=C.AppMenuController,De=C.ViewCallTag,oe=C.registerControlProvider,ee=C.ControlType,mn=C.AppMenuIconViewController,fn=C.GridFieldColumnController,Je=C.GridRowState,Qe=C.registerGridColumnProvider,bn=C.GridUAColumnController,vn=C.GridFieldEditColumnController,gn=C.GridGroupColumnController,Rt=C.ControlVO,Ya=C.GridController,Ja=C.ListController,Qa=C.SearchFormController,Cn=C.FormGroupPanelController,Ae=C.registerFormDetailProvider,wn=C.FormItemController,yn=C.FormPageController,Pn=C.FormButtonController,En=C.FormDRUIPartController,Za=C.FormMDCtrlController,In=C.FormMDCtrlFormController,Dn=C.FormMDCtrlMDController,Ze=C.FormMDCtrlRepeaterController,_n=C.EditFormController,Bn=C.FormRawItemController,Sn=C.FormTabPanelController,An=C.FormTabPageController,ei=C.findChildFormDetails,ti=C.ToolbarController,ni=C.CaptionBarController,ri=C.DataViewControlController,oi=C.TreeController,ai=C.PickupViewPanelController,ii=C.TabExpPanelController,si=C.TreeExpBarController,$t=C.ExpBarControlController,li=C.CalendarExpBarController,ci=C.ChartExpBarController,ui=C.SearchBarController,ie=C.ValueOP,di=C.WizardPanelController,Fn=C.ControlController,xn=C.Srfuf,On=C.calcNavParams,pi=C.DashboardController,hi=C.getPortletProvider,mi=C.CustomDashboardController,Tn=C.ContainerPortletController,xe=C.registerPortletProvider,fi=C.PortletPartController,Nn=C.ViewPortletController,zn=C.MenuPortletController,Rn=C.ChartPortletController,$n=C.RawItemPortletController,Ln=C.ListPortletController,Mn=C.HtmlPortletController,Vn=C.ActionBarPortletController,bi=C.CalendarController,vi=C.KanbanController,gi=C.TreeGridExController,Ci=C.TreeGridController,wi=C.MEditViewPanelController,yi=C.MapController,Pi=C.ReportPanelController,et=C.CodeListEditorController,tt=C.OpenAppViewCommand,le=C.EditorController,bt=C.getDeACMode,We=C.convertNavData,vt=C.calcDeCodeNameById,j=C.registerEditorProvider,Ei=C.WFStepTraceViewController,Ii=C.registerViewProvider,Di=C.ViewType,we=C.ViewEngineBase,J=C.SysUIActionTag,_i=C.getAppViewRef,Ie=C.MDViewEngine,jn=C.getControl,Bi=C.getWFSubmitViewId,Si=C.TreeDataSetNodeData},function(C){Oe=C.createUUID,kn=C.getCookie,Un=C.notNilEmpty,Ai=C.QXEvent},function(C){_e=C.default},function(C){Ee=C.clone,Fi=C.reject,Te=C.isNil,xi=C.isNotNil,Lt=C.mergeDeepLeft,Mt=C.isEmpty},function(C){Ne=C.default},function(C){Gn=C.CoreConst,pe=C.RuntimeError,gt=C.downloadFileFromBlob,Oi=C.Namespace,qn=C.recursiveIterate,Vt=C.ModelError,be=C.RuntimeModelError,Ti=C.DataTypes,Ni=C.HttpError,zi=C.IBizContext},function(C){Le=C.useRouter,Me=C.useRoute},function(C){nt=C.debounce,Ct=C.isNumber,wt=C.isFunction,Ri=C.isString,$i=C.isNil,ge=C.toNumber,Li=C.clone},function(C){Be=C.ElMessageBox,Mi=C.ElLoading,yt=C.ElMessage,Vi=C.ElNotification,ji=C.default},function(C){Wn=C.computePosition,ki=C.autoUpdate,Ui=C.offset,Gi=C.flip,qi=C.shift,Wi=C.arrow},function(C){rt=C.default},function(C){Hn=C.default},function(C){Hi=C.createI18n}],execute:function(){N({aZ:Gt,o:$s,p:_r,u:Dr});const C=N("f",S({name:"IBizActionToolbar",props:{actionDetails:{type:Array,required:!0},actionsState:{type:Object,required:!0},caption:String,mode:{type:String,default:"buttons"}},setup(t,{emit:e}){return{ns:B("action-toolbar"),handleClick:async(o,i)=>{i.stopPropagation(),e("action-click",o,i)}}},render(){const t=this.actionDetails||[];return this.mode==="buttons"?a("div",{class:[this.ns.b(),this.ns.m("buttons")],onClick:e=>e.stopPropagation()},[t.length>0&&t.map(e=>{if(this.actionsState[e.id].visible){let n=e.caption;return e.capLanguageRes&&(n=ibiz.i18n.t(e.capLanguageRes.lanResTag,e.caption)),[e.addSeparator&&a("div",{class:this.ns.e("separator")},null),a(d("el-button"),{text:!0,size:"small",onClick:r=>this.handleClick(e,r),disabled:this.actionsState[e.id].disabled,class:[this.ns.e("item"),this.ns.is("disabled",!1)]},{default:()=>[e.showIcon&&e.sysImage&&a(d("iBizIcon"),{icon:e.sysImage},null),e.showCaption?n:""]})]}return null})]):a(d("el-dropdown"),{onCommand:e=>this.handleClick(e,new MouseEvent("click")),class:[this.ns.b(),this.ns.m("dropdown")]},{default:()=>a("span",{class:this.ns.e("caption")},[this.caption,a("ion-icon",{class:this.ns.e("caption-icon"),name:"ibiz-arrow-down"},null)]),dropdown:()=>a(d("el-dropdown-menu"),null,{default:()=>[t.length>0&&t.map(e=>this.actionsState[e.id].visible?a(d("el-dropdown-item"),{class:[this.ns.e("item"),this.ns.is("disabled",!1)],disabled:this.actionsState[e.id].disabled,command:e},{default:()=>[e.showIcon&&e.sysImage&&a(d("iBizIcon"),{icon:e.sysImage},null),e.showCaption?e.caption:""]}):null)]})})}}));function jt(t,e,n){const r=n==="TABLE_24COL"?1:2,i=!t||t===-1?n==="TABLE_24COL"?24:12:t,s=!e||e===-1?0:e,l={span:i*r};return s!==0&&(l.offset=s),l}const Ki=N("b",S({name:"IBizCol",props:{layoutPos:{type:Object,required:!0},state:{type:Object,required:!0}},setup(t){const e=B("col"),n=F(()=>{const l=B("spacing"),c=[];if(t.layoutPos.layout!=="FLEX")return c;const u={top:t.layoutPos.spacingTop,bottom:t.layoutPos.spacingBottom,left:t.layoutPos.spacingLeft,right:t.layoutPos.spacingRight};return Object.keys(u).forEach(p=>{const m=u[p];m&&c.push(l.bm(p,m.toLowerCase()))}),c}),r=F(()=>{const l=t.layoutPos;if(l.layout==="FLEX")return{};const{colXS:c,colXSOffset:u,colSM:p,colSMOffset:m,colMD:v,colMDOffset:g,colLG:b,colLGOffset:h}=l;return{xs:jt(c,u,l.layout),sm:jt(p,m,l.layout),md:jt(v,g,l.layout),lg:jt(b,h,l.layout)}}),o=Ua(t.layoutPos),i=F(()=>{const l=t.state.layout,c={width:l.width,height:l.height,...o||{}};return Object.assign(c,l.extraStyle),c}),s=F(()=>{var l;return[e.b(),((l=t.layoutPos)==null?void 0:l.layout)==="FLEX"?e.m("flex"):e.m("grid"),e.is("hidden",!t.state.visible),...n.value,o?e.m("self-align"):"",...t.state.layout.extraClass]});return{ns:e,colClass:s,gridAttrs:r,cssVars:i}},render(){var t,e,n;if(!this.state.visible&&!this.state.keepAlive)return null;const r=(e=(t=this.$slots).default)==null?void 0:e.call(t);if(((n=this.layoutPos)==null?void 0:n.layout)==="FLEX"){const o=this.layoutPos;return a("div",{class:this.colClass,style:{flexGrow:o.grow,flexShrink:o.shrink===1?void 0:o.shrink,flexBasis:o.basis,...this.cssVars}},[r])}return re(d("el-col"),{class:this.colClass,style:this.cssVars,...this.gridAttrs},{default:()=>r})}}));function Wc(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Xi=N("e",S({name:"IBizRow",props:{layout:Object},setup(){return{ns:B("row")}},render(){var t,e,n;const r=(e=(t=this.$slots).default)==null?void 0:e.call(t);if(((n=this.layout)==null?void 0:n.layout)==="FLEX"){const{dir:o,align:i,valign:s}=this.layout,l=o;return a("div",{class:[this.ns.b(),this.ns.m("flex"),this.ns.m(l)],style:{flexDirection:l,justifyContent:i,alignItems:s}},[r])}return a(d("el-row"),{class:[this.ns.b(),this.ns.m("grid")]},Wc(r)?r:{default:()=>[r]})}})),Yi=N("g",S({name:"IBizRawItem",props:{type:{type:String,required:!1},content:{type:[String,Object,Number]},rawItem:{type:Object,required:!1}},setup(t){const e=B("rawitem");let n=null,r="";t.rawItem&&(n=t.rawItem.rawItem,r=n.contentType);const o=I(t.type||r||""),i=I("");let s=null;r==="IMAGE"&&(s=n.sysImage),r==="RAW"||r==="HTML"?r==="RAW"?(o.value="TEXT",i.value=n.caption):i.value=n.content:["VIDEO","DIVIDER","INFO","WARNING","ERROR"].includes(r)||r==="IMAGE"&&s&&(i.value=s);const l=g=>/^https?:|^http?:|(\.png|\.svg|\.jpg|\.png|\.gif|\.psd|\.tif|\.bmp|\.jpeg)/.test(g),c=I({id:Oe(),path:"",mute:!0,autoplay:!0,replay:!1,showcontrols:!0}),u=I({contentPosition:"center",html:""}),p=I({type:"info",title:"",closeabled:!0,showIcon:!1}),m=I(""),v=()=>{if(o.value==="IMAGE"&&typeof t.content=="string"&&(l(t.content)?i.value={imagePath:t.content}:i.value={cssClass:t.content}),["TEXT","HEADING1","HEADING2","HEADING3","HEADING4","HEADING5","HEADING6","PARAGRAPH","HTML","RAW"].includes(o.value)&&(m.value=i.value,typeof m.value=="string"&&(m.value=m.value.replaceAll("<","<"),m.value=m.value.replaceAll(">",">"),m.value=m.value.replaceAll("&nbsp;"," "),m.value=m.value.replaceAll(" "," "))),["VIDEO","DIVIDER","INFO","WARNING","ERROR"].includes(o.value)&&i.value){let g={};try{if(typeof i.value=="string")switch(g=new Function(`return (${i.value});`)(),o.value){case"VIDEO":Object.assign(c.value,g);break;case"DIVIDER":Object.assign(u.value,g);break;case"INFO":case"WARNING":case"ERROR":p.value.type=o.value.toLocaleLowerCase(),Object.assign(p.value,g);break;default:break}}catch{ibiz.log.error(`${o.value}\u7C7B\u578B\u81EA\u5B9A\u4E49\u53C2\u6570\u914D\u7F6E\u9519\u8BEF`)}}};return v(),G(()=>t.content,(g,b)=>{g!==b&&(i.value=g,v())},{immediate:!0}),{ns:e,rawItemText:m,playerParams:c,dividerParams:u,alertParams:p,rawItemType:o,rawItemContent:i}},render(){const t=()=>this.rawItemType==="IMAGE"?a(d("i-biz-icon"),{class:[this.ns.e("image")],icon:this.rawItemContent},null):this.rawItemType==="TEXT"||this.rawItemType==="RAW"?a("span",{class:this.ns.e("text")},[this.rawItemText]):this.rawItemType==="HEADING1"?a("h1",{class:this.ns.e("h1")},[this.rawItemText]):this.rawItemType==="HEADING2"?a("h2",{class:this.ns.e("h2")},[this.rawItemText]):this.rawItemType==="HEADING3"?a("h3",{class:this.ns.e("h3")},[this.rawItemText]):this.rawItemType==="HEADING4"?a("h4",{class:this.ns.e("h4")},[this.rawItemText]):this.rawItemType==="HEADING5"?a("h5",{class:this.ns.e("h5")},[this.rawItemText]):this.rawItemType==="HEADING6"?a("h6",{class:this.ns.e("h6")},[this.rawItemText]):this.rawItemType==="PARAGRAPH"?a("p",{class:this.ns.e("paragraph")},[this.rawItemText]):this.rawItemType==="HTML"?a("div",{class:this.ns.e("paragraph"),innerHTML:this.rawItemText},null):this.rawItemType==="VIDEO"?a("div",{class:this.ns.e("video")},[a("video",{id:this.playerParams.id,src:this.playerParams.path,autoplay:this.playerParams.autoplay,controls:this.playerParams.showcontrols,loop:this.playerParams.replay,muted:this.playerParams.mute},[a("source",{src:this.playerParams.path,type:"video/mp4"},null),a("source",{src:this.playerParams.path,type:"video/ogg"},null),a("source",{src:this.playerParams.path,type:"video/webm"},null),R("\u4F60\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301video\u6807\u7B7E")])]):this.rawItemType==="DIVIDER"?a(d("el-divider"),{"content-position":this.dividerParams.contentPosition},{default:()=>[a("span",{innerHTML:this.dividerParams.html},null)]}):this.rawItemType==="INFO"||this.rawItemType==="WARNING"||this.rawItemType==="ERROR"?a(d("el-alert"),{title:this.alertParams.title,type:this.alertParams.type,"show-icon":this.alertParams.showIcon,closable:this.alertParams.closeabled},null):this.rawItemType==="MARKDOWN"?a(d("iBizMarkDown"),{value:this.content,disabled:!0},null):(["PLACEHOLDER"].includes(this.rawItemType),null);return a("div",{class:this.ns.b()},[t()])}})),Ji=S({name:"IBizNoData",props:{text:{type:String,default:"\u6682\u65E0\u6570\u636E"},emptyTextLanguageRes:{type:Object,default:void 0}},setup(t){const e=B("no-data"),n=I(t.text);return t.emptyTextLanguageRes&&(n.value=ibiz.i18n.t(t.emptyTextLanguageRes.lanResTag,t.text)),{ns:e,label:n}},render(){return a(d("el-empty"),{class:this.ns.b(),description:this.label},{default:()=>{var t,e;return[(e=(t=this.$slots).default)==null?void 0:e.call(t)]}})}}),Qi=N("h",S({name:"IBizSplit",props:{modelValue:{type:[Number,String],default:.5},mode:{validator:t=>["horizontal","vertical"].includes(t),default:"horizontal"},min:{type:[Number,String],default:"30px"},max:{type:[Number,String],default:"30px"}},emits:["update:modelValue","on-move-start","on-moving","on-move-end"],setup(t,{emit:e}){const n=B("split"),r=I(null),o=I(0),i=I(0),s=I(!1),l=I(0),c=I(0),u=I(.5),p=I(0),m=F(()=>[n.b("wrapper"),n.is("no-select",s.value)]),v=F(()=>[n.b("pane"),s.value?n.bm("pane","moving"):""]),g=F(()=>t.mode==="horizontal"),b=F(()=>100-o.value),h=F(()=>typeof t.modelValue=="string"),f=F(()=>g.value?"offsetWidth":"offsetHeight"),w=(V,q)=>parseFloat(V)/parseFloat(q),P=V=>{const q=r.value[f.value];return h.value?typeof t[V]=="string"?t[V]:q*t[V]:typeof t[V]=="string"?w(t[V],q):t[V]},_=(V,q)=>h.value?`${Math.max(parseFloat(V),parseFloat(q))}px`:Math.max(V,q),y=V=>{let q=0;return h.value?q=`${r.value[f.value]-parseFloat(V)}px`:q=1-V,q},D=V=>{const M=(g.value?V.pageX:V.pageY)-p.value,K=r.value[f.value];let H=h.value?`${parseFloat(i.value)+M}px`:w(K*i.value+M,K);const Q=y(H);parseFloat(H)<=parseFloat(l.value)&&(H=_(H,l.value)),parseFloat(Q)<=parseFloat(c.value)&&(H=y(_(Q,c.value))),Object.assign(V,{atMin:t.modelValue===l.value,atMax:h.value?y(t.modelValue)===c.value:y(t.modelValue).toFixed(5)===c.value.toFixed(5)}),e("update:modelValue",H),e("on-moving",V)},E=()=>{s.value=!1,document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",E),e("on-move-end")},x=V=>{p.value=g.value?V.pageX:V.pageY,i.value=t.modelValue,s.value=!0,document.addEventListener("mousemove",D),document.addEventListener("mouseup",E),e("on-move-start")},O=()=>{pt(()=>{l.value=P("min"),c.value=P("max"),o.value=(h.value?w(t.modelValue,r.value[f.value]):t.modelValue)*1e4/100})};return G(()=>t.modelValue,V=>{V!==u.value&&(u.value=V,O())}),Pe(()=>{pt(()=>{O()}),window.addEventListener("resize",O)}),La(()=>{window.removeEventListener("resize",O)}),{ns:n,outerWrapper:r,offset:o,wrapperClasses:m,paneClasses:v,isHorizontal:g,anotherOffset:b,handleMousedown:x}},render(){var t,e,n,r,o,i,s,l,c,u,p,m;return a("div",{class:this.wrapperClasses,ref:"outerWrapper"},[this.isHorizontal?a("div",{class:this.ns.m("horizontal")},[a("div",{style:{right:`${this.anotherOffset}%`},class:[this.paneClasses,this.ns.bm("pane","left")]},[(e=(t=this.$slots).left)==null?void 0:e.call(t)]),a("div",{style:{left:`${this.offset}%`},class:this.ns.b("trigger-con"),onMousedown:v=>this.handleMousedown(v)},[((r=(n=this.$slots).trigger)==null?void 0:r.call(n))||a(d("iBizSplitTrigger"),{mode:"vertical"},null)]),a("div",{style:{left:`${this.offset}%`},class:[this.paneClasses,this.ns.bm("pane","right")]},[(i=(o=this.$slots).right)==null?void 0:i.call(o)])]):a("div",{class:this.ns.m("vertical")},[a("div",{style:{bottom:`${this.anotherOffset}%`},class:[this.paneClasses,this.ns.bm("pane","top")]},[(l=(s=this.$slots).top)==null?void 0:l.call(s)]),a("div",{style:{top:`${this.offset}%`},class:this.ns.b("trigger-con"),onMousedown:v=>this.handleMousedown(v)},[((u=(c=this.$slots).trigger)==null?void 0:u.call(c))||a(d("iBizSplitTrigger"),{mode:"horizontal"},null)]),a("div",{style:{top:`${this.offset}%`},class:[this.paneClasses,this.ns.bm("pane","bottom")]},[(m=(p=this.$slots).bottom)==null?void 0:m.call(p)])])])}})),Zi=N("j",S({name:"IBizSplitTrigger",props:{mode:String},setup(t){const e=B("split-trigger"),n=F(()=>t.mode==="vertical"),r=F(()=>[e.b(),n.value?e.m("vertical"):e.m("horizontal")]),o=F(()=>[e.b("bar-con"),n.value?e.bm("bar-con","vertical"):e.bm("bar-con","horizontal")]),i=Array(8).fill(0);return{ns:e,classes:r,barConClasses:o,items:i}},render(){return a("div",{class:this.classes},[a("div",{class:this.barConClasses},[this.items.map((t,e)=>a("i",{class:this.ns.b("bar"),key:`trigger-${e}`},null))])])}})),Hc=(t,e)=>{const n=[];return e?.length>0&&t&&e.forEach(o=>{n.push(o[t])}),[...new Set(n)]},es=S({name:"IBizExtendActionTimeLine",props:{data:{type:Object}},setup(t){const e=B("extend-action-timeline"),n=I([]),r=(p,m)=>Date.parse(m.time)-Date.parse(p.time),o=p=>{const m=[];let v=Ee(p);if(v.length>0)return v=v.reverse(),v.forEach(g=>{if(g.usertasks){const b=Ee(g.usertasks);Object.assign(g,{tasks:o(b)}),g.isShow=!1}if(g.identitylinks.length===0&&g.comments.length===0&&(Object.assign(g,{taskName:g.userTaskName}),m.push(g)),g.identitylinks.length>0){const b=Hc("displayname",g.identitylinks);m.push({authorName:b.join("\u3001"),taskName:g.userTaskName,isLink:!0})}g.comments.length>0&&(g.comments.forEach(b=>{Object.assign(b,{taskName:g.userTaskName})}),g.comments.sort(r),m.push(...g.comments))}),m},i=p=>{const m=new Map;for(let v=0;v<p.length;v++)m.has(p[v])||m.set(p[v],!0);return m},s=p=>{p.forEach(m=>{const v=[];if(m.tasks&&s(m.tasks),m.tasks)for(let b=0;b<m.tasks.length;b++){if(m.tasks[b].isLink){const h=m.tasks[b].authorName.indexOf("\u3001")!==-1?m.tasks[b].authorName.split("\u3001"):m.tasks[b].authorName;typeof h=="string"?v.push(h):v.push(...h)}if(m.tasks[b].linkName){const h=m.tasks[b].linkName.indexOf("\u3001")!==-1?m.tasks[b].linkName.split("\u3001"):m.tasks[b].linkName;typeof h=="string"?v.push(h):v.push(...h)}}const g=[...i(v).keys()];m.linkName=g.join("\u3001")})};G(()=>t.data,(p,m)=>{if(p!==m&&p){const g=Ee(p).usertasks;if(g){const b=o(g);b&&(s(b),n.value=b)}}},{immediate:!0});const l=(p,m)=>_e(p).format(m),c=p=>{p.isShow=!p.isShow},u=p=>p.map(m=>a("div",{class:[e.b("task"),e.is("wrong",m.type&&m.type.includes("\u9A73\u56DE")),e.is("link",m.isLink),e.is("linkname",m.linkName)]},[a("div",{class:e.be("task","tail")},null),a("div",{class:[e.be("task","head"),e.is("link-head",m.linkName)]},null),a("div",{class:e.be("task","top")},[a("div",{class:[e.be("task","user-task-name"),e.is("task-link",m.linkName)]},[m.taskName]),m.linkName?a("div",{class:e.be("task","link-name"),title:m.linkName},[m.linkName]):null,a("div",{class:[e.be("task","author-name"),e.is("has-type",m.type)],title:m.authorName},[m.authorName]),m.type&&a("div",{class:e.be("task","type")},[m.type]),m.time&&a("div",{class:e.be("task","last-time")},[m.time&&"\u5904\u7406\u65F6\u95F4",a("span",{class:e.be("task","last-time-text")},[m.time])])]),a("div",{class:e.be("task","bottom")},[a("div",{class:e.be("task","full-message")},[m.fullMessage?`\u5BA1\u6279\u610F\u89C1\uFF1A ${m.fullMessage}`:m.fullMessage])]),m.tasks&&m.tasks.length>=1&&a("div",{class:e.be("task","trigger"),"on-click":()=>{c(m)}},[a(d("i-icon"),{type:m.isShow?"md-remove":"md-add"},null)]),m.tasks&&Ue(a("div",{class:e.be("task","moreTask")},[u(m.tasks)]),[[Ma,m.isShow]])]));return{ns:e,formatDate:l,UIData:n,renderTimeline:u}},render(){return a("div",{class:this.ns.b()},[this.UIData&&this.renderTimeline(this.UIData)])}}),ts=S({name:"ViewMessage",props:{messages:{type:Array}},setup(){return{ns:B("view-message"),getType:n=>{switch(n){case"WARN":return"warning";case"ERROR":return"error";default:return"info"}}}},render(){var t,e;return(t=this.messages)!=null&&t.length?a("div",{class:[this.ns.b()]},[(e=this.messages)==null?void 0:e.map(n=>a(d("el-alert"),{type:this.getType(n.messageType),title:n.title,description:n.message,closable:n.removeMode!==0},null))]):null}}),ns=S({name:"IBizPagination",props:{total:{type:Number,required:!0},curPage:{type:Number,required:!0},size:{type:Number,required:!0}},emits:["change","pageSizeChange","pageRefresh"],setup(t,{emit:e}){const n=B("pagination"),r=F(()=>(t.curPage-1)*t.size+1),o=F(()=>t.curPage*t.size);return{ns:n,start:r,end:o,onPageChange:u=>{e("change",u)},onPageSizeChange:u=>{e("pageSizeChange",u)},pageRefresh:()=>{e("pageRefresh")},inputChange:u=>{u.stopPropagation()}}},render(){return a("div",{class:this.ns.b()},[a(d("el-pagination"),zt({layout:"slot, prev, pager, next, sizes, jumper",background:!0,total:this.total,"current-page":this.curPage,"page-size":this.size,"page-sizes":[10,20,30,40,50,60,70,80,90,100]},{"onUpdate:currentPage":this.onPageChange,"onUpdate:pageSize":this.onPageSizeChange,onChange:this.inputChange}),{default:()=>[a("span",{class:this.ns.b("btn")},[a(d("el-button"),{title:"\u5237\u65B0",onClick:this.pageRefresh},{default:()=>[a("ion-icon",{name:"refresh"},null)]})]),a("span",null,[R("\u663E\u793A\xA0"),this.start,R("\xA0-\xA0"),this.end,R("\xA0\u6761\uFF0C\u5171\xA0"),this.total,R("\xA0\u6761\u6570\u636E")])]})])}}),rs=N("k",S({name:"IBizSortBar",props:{sortItems:{type:Array,required:!0}},emits:{SortChange:(t,e)=>!0},setup(t,{emit:e}){return{ns:B("sort-bar"),onItemClick:o=>{o.order==="asc"?o.order="desc":o.order==="desc"?o.order=void 0:(t.sortItems.forEach(i=>{i.order=void 0}),o.order="asc"),e("SortChange",o,o.order)}}},render(){return a("div",{class:this.ns.b()},[this.sortItems.length>0&&this.sortItems.map(t=>a("div",{onClick:()=>this.onItemClick(t),class:[this.ns.b("item"),t.order==="asc"?this.ns.bm("item","asc"):"",t.order==="desc"?this.ns.bm("item","desc"):""]},[t.caption,a("div",{class:this.ns.b("icon-wrapper")},[a("i",{class:this.ns.be("icon-wrapper","icon-asc")},null),a("i",{class:this.ns.be("icon-wrapper","icon-desc")},null)])]))])}})),os=S({name:"DataImport",props:{dismiss:{type:Function,required:!0},appDataEntity:{type:Object,required:!0},dataImport:{type:Object,required:!1}},setup(t){const e=B("data-import"),n=I(),r=I({state:"ready",message:""}),o=I(""),i=I(!1),s=()=>{t.dismiss()};return{ns:e,onLinkClick:async()=>{var p,m;let v=`${t.appDataEntity.codeName2.toLowerCase()}/importtemplate`;(p=t.dataImport)!=null&&p.codeName&&(v+=`?srfimporttag=${t.dataImport.codeName}`);const g=await ibiz.net.request(v,{responseType:"blob"});if(g.status===200){let b=((m=g.headers["content-disposition"].split(";").find(w=>w.indexOf("filename=")!==-1))==null?void 0:m.slice(9))||"";b=decodeURIComponent(b);const h=new Blob([g.data],{type:"application/vnd.ms-excel"}),f=document.createElement("a");f.download=b,f.style.display="none",f.href=URL.createObjectURL(h),document.body.appendChild(f),f.click(),URL.revokeObjectURL(f.href),document.body.removeChild(f)}},selectFile:()=>{n.value.click()},onCancelButtonClick:s,onFileChange:async p=>{const m=p.target;if(!m.files)return;o.value="";const v=m.files[0];m.value=null;let g;i.value=!0;try{if(ibiz.env.enableMqtt){Ga(v,t.appDataEntity,t.dataImport),ibiz.notification.info({desc:"\u5F00\u59CB\u5BFC\u5165\uFF0C\u8BE6\u7EC6\u8FDB\u5EA6\u548C\u7ED3\u679C\u8BF7\u770B\u5E94\u7528\u901A\u77E5"}),s();return}g=await qa(v,t.appDataEntity,t.dataImport),ibiz.mc.command.send({srfdecodename:t.appDataEntity.codeName},"OBJECTCREATED");const{success:b,total:h,message:f}=g,w=h?Number(h):0,P=b?Number(b):0,_=h-b;r.value.state=f?"error":"over",r.value.message=f||`\u5171\u8BA1\u5BFC\u5165\u6570\u636E ${w} \u6761\uFF0C\u9519\u8BEF[${_}]\uFF0C\u6210\u529F[${P}]`}catch(b){b instanceof Error&&(o.value=b.message)}finally{i.value=!1}},inputUpLoad:n,isLoading:i,message:r,errorMessage:o}},render(){return Ue(a("div",{class:this.ns.b()},[a("input",{ref:"inputUpLoad",type:"file",style:"display: none",accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",onChange:this.onFileChange},null),a("div",{class:this.ns.e("caption")},[R("\u5BFC\u5165\u6570\u636E")]),this.message.state==="ready"?a("div",{class:this.ns.b("upload"),onClick:this.selectFile},[a("img",{class:this.ns.be("upload","img"),src:"./assets/images/icon-import.svg"},null),a("span",{class:this.ns.be("upload","text")},[R("\u5355\u51FB\u6B64\u533A\u57DF\u8FDB\u884C\u4E0A\u4F20")])]):a("div",{class:[this.ns.b("message")]},[a("div",{class:this.ns.be("message","title")},[R("\u5BFC\u5165\u7ED3\u679C")]),a("div",{class:[this.ns.be("message","content"),this.ns.is("error",this.message.state==="error")]},[this.message.message])]),this.errorMessage&&a("div",{class:this.ns.b("error-message")},[this.errorMessage]),a("div",{class:this.ns.e("template-container")},[a("div",{class:this.ns.e("template-description")},[R("\u4E0B\u8F7D\u5BFC\u5165\u6A21\u7248\uFF0C\u5E76\u6309\u8981\u6C42\u586B\u5199\uFF1A")]),a("div",{class:this.ns.e("template-link"),onClick:this.onLinkClick},[a("ion-icon",{class:this.ns.e("link-icon"),name:"link"},null),this.appDataEntity.logicName,R("\u6570\u636E\u5BFC\u5165\u6A21\u677F\u6587\u4EF6")])]),a("div",{class:this.ns.e("button-bar")},[a(d("el-button"),{onClick:this.onCancelButtonClick},{default:()=>[R("\u53D6\u6D88")]}),this.message.state!=="ready"&&a(d("el-button"),{onClick:this.selectFile},{default:()=>[R("\u7EE7\u7EED\u5BFC\u5165")]})])]),[[Ye("loading"),this.isLoading]])}});var as=N("c",typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{});function is(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Kc(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ss={exports:{}};(function(t,e){(function(n,r){typeof Kc=="function"?t.exports=r():n.pluralize=r()})(as,function(){var n=[],r=[],o={},i={},s={};function l(h){return typeof h=="string"?new RegExp("^"+h+"$","i"):h}function c(h,f){return h===f?f:h===h.toLowerCase()?f.toLowerCase():h===h.toUpperCase()?f.toUpperCase():h[0]===h[0].toUpperCase()?f.charAt(0).toUpperCase()+f.substr(1).toLowerCase():f.toLowerCase()}function u(h,f){return h.replace(/\$(\d{1,2})/g,function(w,P){return f[P]||""})}function p(h,f){return h.replace(f[0],function(w,P){var _=u(f[1],arguments);return c(w===""?h[P-1]:w,_)})}function m(h,f,w){if(!h.length||o.hasOwnProperty(h))return f;for(var P=w.length;P--;){var _=w[P];if(_[0].test(f))return p(f,_)}return f}function v(h,f,w){return function(P){var _=P.toLowerCase();return f.hasOwnProperty(_)?c(P,_):h.hasOwnProperty(_)?c(P,h[_]):m(_,P,w)}}function g(h,f,w,P){return function(_){var y=_.toLowerCase();return f.hasOwnProperty(y)?!0:h.hasOwnProperty(y)?!1:m(y,y,w)===y}}function b(h,f,w){var P=f===1?b.singular(h):b.plural(h);return(w?f+" ":"")+P}return b.plural=v(s,i,n),b.isPlural=g(s,i,n),b.singular=v(i,s,r),b.isSingular=g(i,s,r),b.addPluralRule=function(h,f){n.push([l(h),f])},b.addSingularRule=function(h,f){r.push([l(h),f])},b.addUncountableRule=function(h){if(typeof h=="string"){o[h.toLowerCase()]=!0;return}b.addPluralRule(h,"$0"),b.addSingularRule(h,"$0")},b.addIrregularRule=function(h,f){f=f.toLowerCase(),h=h.toLowerCase(),s[h]=f,i[f]=h},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(h){return b.addIrregularRule(h[0],h[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(h){return b.addPluralRule(h[0],h[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(h){return b.addSingularRule(h[0],h[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(b.addUncountableRule),b})})(ss);var Xc=ss.exports,ls=is(Xc);ls.addPluralRule(/(matr|vert|ind)ix|ex$/,"$1ices");function Yc(t){return ls(t)}function Jc(t){return Yc(t).toLowerCase()}function cs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}async function Pt(t,e,n){let r="extension/import_schemas";return e&&(r=`${r}/${e}`),await ibiz.net.request(r,{method:t,data:n})}const us=S({name:"DataImport2",props:{dismiss:{type:Function,required:!0},appDataEntity:{type:Object,required:!0},dataImport:{type:Object,required:!1}},setup(t){const e=B("data-import2"),n=I(!1),r=()=>{t.dismiss()},o=I([[]]),i=new Map,s=I([]);let l=[];const c=I(),u=I();let p="",m="";const v=I(!1),g=I(""),b=I(""),h=new Map,f=I([]),w=I(!1),P=async k=>{if(k){const z=h.get(k);let $=z.fields;if(!z.fields){const L=await Pt("get",z.id);L.status===200&&L.data&&($=L.data.fields),z.fields=L.data.fields,h.set(k,z)}z.owner_type!==""&&z.owner_type!=="PERSONAL"&&(w.value=!0);const A=[...i.keys()],T=new Map;A.forEach(L=>{const X=i.get(L),Y=L.lastIndexOf("-"),Z=L.substring(0,Y);let se=T.get(Z);se||(T.set(Z,0),se=0);const ce=$.filter(fe=>fe.caption===Z)[se];ce&&(T.set(Z,se+1),ce.index=X.index,i.set(L,ce),s.value[ce.index]=ce.name)})}else[...i.keys()].forEach($=>{const A=i.get($);A&&(A.name="",i.set($,A),s.value[A.index]="")})};G(b,(k,z)=>{g.value!==k&&(v.value=!1),g.value="",P(k)});const _=async()=>{var k;if(o.value[0].length){v.value=!0;const $=[...i.values()].filter(T=>T.name!==""),A={name:`${p.split(".")[0]}|${new Date().toLocaleString()}`,fields:$,system_tag:(k=ibiz.appData)==null?void 0:k.context.srfsystemid,data_entity_tag:t.appDataEntity.codeName,import_tag:t.appDataEntity.defaultAppDEDataImportId,owner_type:"PERSONAL"};if(b.value){const T=h.get(b.value),L=await Pt("put",T.id,A);L.status===200&&L.ok&&h.set(b.value,L.data)}else{f.value.push({value:A.name,label:A.name});const T=await Pt("post","",A);T.status===200&&T.ok&&h.set(A.name,T.data),g.value=A.name,b.value=A.name}}else ibiz.message.warning("\u8BF7\u4E0A\u4F20\u6587\u4EF6")},y=async()=>{if(o.value[0].length)if(b.value){const k=h.get(b.value),{id:z}=k,$=k.data_entity_tag,A=`${Jc($)}/asyncimportdata2?srfimporttag=${t.appDataEntity.defaultAppDEDataImportId}&srfossfileid=${m}&srfimportschemaid=${z}`;await ibiz.net.request(A,{method:"get"}),ibiz.notification.info({desc:"\u5F00\u59CB\u5BFC\u5165\uFF0C\u8BE6\u7EC6\u8FDB\u5EA6\u548C\u7ED3\u679C\u8BF7\u770B\u5E94\u7528\u901A\u77E5"}),r()}else await _(),await y();else ibiz.message.warning("\u8BF7\u4E0A\u4F20\u6587\u4EF6")},D=k=>{/\bel-dialog\b/.test(k.className)?k.style.maxWidth="calc(100% - 100px)":k.parentElement&&D(k.parentElement)},E=async()=>{var k;const z={n_import_tag_eq:t.appDataEntity.defaultAppDEDataImportId,n_system_tag_eq:(k=ibiz.appData)==null?void 0:k.context.srfsystemid,n_data_entity_tag_eq:t.appDataEntity.codeName},$=await Pt("post","fetch_cur_user",z);$.status===200&&$.data&&$.data.forEach(A=>{f.value.push({value:A.name,label:A.name}),h.set(A.name,A)})};Pe(()=>{var k;const z=(k=t.appDataEntity.appDEDataImports)==null?void 0:k.find($=>$.id===t.appDataEntity.defaultAppDEDataImportId);z&&z.dedataImportItems?l=z.dedataImportItems:t.appDataEntity.appDEFields&&(l=t.appDataEntity.appDEFields),D(c.value.parentElement),E()});const x=(k,z)=>{let $;const A=T=>{s.value[z]=T;const L=i.get(`${k}-${z}`);L.name=T,i.set(`${k}-${z}`,L),v.value=!1};return a(d("el-select"),{modelValue:s.value[z],placeholder:"\u9009\u62E9\u5F53\u524D\u5217\u5BF9\u5E94\u7684\u5BFC\u5165\u5C5E\u6027",onChange:A,key:z,"popper-class":e.e("dataimport-select"),class:e.e("select")},cs($=l.map(T=>a(d("el-option"),{key:T.name,value:T.id,label:T.caption?T.caption:T.logicName},null)))?$:{default:()=>[$]})},O=()=>{const k=o.value,z=k.map((A,T)=>a("tr",{key:T},[A.map((L,X)=>T===0?a("th",{key:X,style:{border:"1px solid #e5e5e5",padding:"4px","min-width":"132px"}},[L]):a("td",{key:X,style:{border:"1px solid #e5e5e5",padding:"4px","min-width":"132px"}},[L]))])),$=[a("tr",{key:"newRow"},[k[0].map((A,T)=>a("td",{key:T,style:{border:"1px solid #e5e5e5","min-width":"132px"}},[x(A,T)]))]),...z];return a("table",{style:"border-collapse:collapse;border-spacing:0"},[a("tbody",null,[$])])},V=I({Authorization:`Bearer ${kn(Gn.TOKEN)}`}),q=F(()=>{let k=`${ibiz.env.baseUrl}/${ibiz.env.appId}${ibiz.env.uploadFileUrl}/temp`;return k+=Ne.stringify({preview:!0},{addQueryPrefix:!0}),k});return{ns:e,onButtonColumnMappingImportClick:_,onButtonImportClick:y,onCancelButtonClick:r,isLoading:n,UploadUrl:q,headers:V,onSuccess:(k,z,$)=>{if(p="",m="",k.name&&(p=k.name),k.fileid&&(m=k.fileid),k.previewinfo&&(o.value=JSON.parse(k.previewinfo),o.value[0]&&o.value[0].length>0)){const A=o.value[0].length;for(let T=1;T<o.value.length;T++){const L=o.value[T],X=L.length;if(X<A){const Y=A-X;for(let Z=0;Z<Y;Z++)L.push("")}}i.clear(),o.value[0].forEach((T,L)=>{i.set(`${T}-${L}`,{name:"",index:L,caption:T}),s.value[L]=""})}v.value=!1,n.value=!1,P(b.value)},renderTable:O,renderSelect:x,previewinfo:o,selectValues:s,renderEmpty:()=>a("div",{class:e.e("empty")},[R("\u6682\u65E0\u6570\u636E")]),beforeUpload:()=>{n.value=!0},dataimport2:c,listValue:b,options:f,handleDeleteOption:async(k,z)=>{k.stopPropagation();const $=h.get(z),A=await Pt("delete",$.id);if(A.status===200&&A.ok){const T=f.value.findIndex(L=>L.label===z);T!==-1&&f.value.splice(T,1),h.delete(z),b.value===z&&(b.value=""),u.value.blur()}},select:u,isNoPersonel:w}},render(){let t;return Ue(a("div",{class:[this.ns.b(),"ibiz-view"],ref:"dataimport2"},[a("div",{class:[this.ns.e("data-import2-toolbar"),"ibiz-panel-view-header"]},[a("div",{class:[this.ns.e("caption")]},[a("div",{class:"ibiz-panel-container"},[a("div",{class:"ibiz-control-captionbar"},[a("div",{class:"ibiz-control-captionbar-caption"},[R("\u5BFC\u5165\u6570\u636E")])])])]),a("div",{class:[this.ns.e("data-import2-toolbar-container"),"ibiz-panel-container--view_header_right"]},[a("div",{class:"ibiz-panel-container"},[a("div",{class:"ibiz-control-toolbar"},[a("div",{class:"ibiz-control-toolbar__item"},[a(d("el-select"),{ref:"select",modelValue:this.listValue,"onUpdate:modelValue":e=>this.listValue=e,clearable:!0,placeholder:"\u9009\u62E9\u5BFC\u5165\u6A21\u5F0F",disabled:!(this.previewinfo[0]&&this.previewinfo[0].length),"popper-class":this.ns.e("dataimport-select")},cs(t=this.options.map(e=>a(d("el-option"),{label:e.label,value:e.value,class:[this.ns.e("select-option")]},{default:()=>a("div",{class:[this.ns.e("select-option-item")]},[a("span",null,[e.label]),a(d("el-button"),{text:!0,size:"small",onClick:n=>this.handleDeleteOption(n,e.value),class:this.ns.e("select-option-item-button")},{default:()=>[R("\u5220\u9664")]})])})))?t:{default:()=>[t]})]),a(d("el-upload"),{class:"ibiz-control-toolbar__item",action:this.UploadUrl,headers:this.headers,"show-file-list":!1,onSuccess:this.onSuccess,"before-upload":this.beforeUpload},{default:()=>[a(d("el-button"),null,{default:()=>[R("\u6587\u4EF6\u4E0A\u4F20")]})]}),a("div",{class:"ibiz-control-toolbar__item"},[a(d("el-button"),{onClick:this.onButtonColumnMappingImportClick,disabled:this.isNoPersonel},{default:()=>[R("\u5BFC\u5165\u6A21\u5F0F\u4FDD\u5B58")]})]),a("div",{class:"ibiz-control-toolbar__item"},[a(d("el-button"),{onClick:this.onButtonImportClick},{default:()=>[R("\u5BFC\u5165")]})])])])])]),a("div",{class:[this.ns.e("template-container"),"ibiz-panel-view-content"]},[this.previewinfo[0]&&this.previewinfo[0].length?this.renderTable():this.renderEmpty()])]),[[Ye("loading"),this.isLoading]])}}),Qc=N("I",{install:t=>{t.component(tn.name,tn),t.component(nn.name,nn),t.component(Xi.name,Xi),t.component(Ki.name,Ki),t.component(rn.name,rn),t.component(C.name,C),t.component(on.name,on),t.component(an.name,an),t.component(Yi.name,Yi),t.component(sn.name,sn),t.component(Ji.name,Ji),t.component(Qi.name,Qi),t.component(Zi.name,Zi),t.component(es.name,es),t.component(ts.name,ts),t.component(ns.name,ns),t.component(rs.name,rs),t.component(os.name,os),t.component(us.name,us),t.component("IBizMapChart",ht({loader:()=>Fe.import("./map-chart-7nfIdU3w.js")}))}}),Kn=S({name:"IBizAuthUserinfo",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){var e;const n=B("user-info"),r=t.controller,{srfusername:o="\u6E38\u5BA2",srfpersonname:i}=((e=ibiz.appData)==null?void 0:e.context)||{},s=Le(),l=mt("ctx",void 0),c=F(()=>l?.view&&l.view.model.mainMenuAlign||"LEFT"),u=async()=>{await ibiz.auth.logout()&&(await s.push(`/login?ru=${encodeURIComponent(window.location.hash.replace("#/","/"))}`),ibiz.util.showAppLoading(),window.location.reload())},p=F(()=>r.panel.view.state.isCollapse);return{ns:n,c:r,onClick:u,srfusername:o,srfpersonname:i,router:s,menuAlign:c,isCollapse:p}},render(){return a("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("left",this.menuAlign==="LEFT"),this.ns.is("top",this.menuAlign==="TOP"),this.ns.is("collapse",this.isCollapse)]},[a(d("el-dropdown"),null,{default:()=>a("div",{class:this.ns.b("info")},[a("div",{class:this.ns.b("label")},[a(d("el-avatar"),{class:this.ns.b("avatar"),src:"./assets/images/user-avatar.png"},null),!this.isCollapse&&a("div",{class:this.ns.b("name")},[a("div",{class:this.ns.be("name","user-name")},[this.srfusername]),this.menuAlign==="LEFT"&&a("div",{class:this.ns.be("name","person-name")},[this.srfpersonname])])]),a("ion-icon",{class:this.ns.e("down"),name:"chevron-down-outline"},null)]),dropdown:()=>a(d("el-dropdown-menu"),null,{default:()=>[a(d("el-dropdown-item"),null,{default:()=>[a("ion-icon",{name:"log-out-outline",class:this.ns.e("icon")},null),a("span",{onClick:this.onClick},[R("\u9000\u51FA\u767B\u5F55")])]})]})})])}});var Zc=Object.defineProperty,eu=(t,e,n)=>e in t?Zc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tu=(t,e,n)=>(eu(t,typeof e!="symbol"?e+"":e,n),n);class nu{constructor(){tu(this,"component","IBizAuthUserinfo")}async createController(e,n,r){const o=new ae(e,n,r);return await o.init(),o}}const ru=N("at",U(Kn,function(t){t.component(Kn.name,Kn),ue("RAWITEM_AUTH_USERINFO",()=>new nu)}));var ou=Object.defineProperty,au=(t,e,n)=>e in t?ou(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kt=(t,e,n)=>(au(t,typeof e!="symbol"?e+"":e,n),n);class ds extends $e{constructor(){super(...arguments),kt(this,"currentKey",""),kt(this,"cacheKeys",["RouterShell"]),kt(this,"navViewMsgs",{}),kt(this,"operateSort",[])}}N("au",ds);var iu=Object.defineProperty,su=(t,e,n)=>e in t?iu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xn=(t,e,n)=>(su(t,typeof e!="symbol"?e+"":e,n),n);class Yn extends ae{constructor(){super(...arguments),Xn(this,"viewModals",{}),Xn(this,"router"),Xn(this,"autoGoLast",!0)}createState(){var e;return new ds((e=this.parent)==null?void 0:e.state)}setRouter(e){this.router=e}get routeDepth(){return this.panel.view.modal.routeDepth}get navTabs(){return this.panel.panelItems.nav_tabs}get appmenu(){return this.panel.getController("appmenu")}changeView(e){var n;const r=this.state.navViewMsgs[e];r?.fullPath&&((n=this.router)==null||n.push(r.fullPath))}onRouteChange({currentKey:e,fullPath:n}){if(this.state.currentKey!==e){if(this.state.cacheKeys.includes(e)&&this.router&&this.router.currentRoute.value.matched.length===this.routeDepth+1){const i=this.state.navViewMsgs[e].fullPath;if(i!==n){setTimeout(()=>{this.router.push({path:i})},0);return}}this.state.currentKey=e,this.navTabs&&(this.navTabs.state.currentKey=e)}if(e==="")return;const o=this.state.operateSort.indexOf(e);o!==-1&&this.state.operateSort.splice(o,1),this.state.operateSort.push(e),this.state.cacheKeys.includes(e)||(this.state.cacheKeys.push(e),this.routeDepth&&(this.viewModals[e]=new Ge({mode:qe.ROUTE,viewUsage:1,routeDepth:this.routeDepth+1,dismiss:i=>{this.dismiss(e,i)}}))),this.state.navViewMsgs[e]?this.state.navViewMsgs[e].fullPath=n:(ibiz.log.debug("\u7EF4\u62A4\u5BFC\u822A\u89C6\u56FE\u4FE1\u606F",e,n),this.state.navViewMsgs[e]={key:e,fullPath:n},ut.active(e))}onViewCreated(e){if(this.navTabs){const{view:n}=e,r=this.state.currentKey;this.navTabs.updateViewInfo(r,{caption:n.model.caption}),n.evt.on("onViewInfoChange",({caption:o,dataInfo:i})=>{this.navTabs.updateViewInfo(r,{caption:o,dataInfo:i})})}}removeCache(e){const n=this.state.cacheKeys.indexOf(e);if(n!==-1){this.state.cacheKeys.splice(n,1),delete this.viewModals[e],delete this.state.navViewMsgs[e];const r=this.state.operateSort.indexOf(e);r!==-1&&this.state.operateSort.splice(r,1)}}clearCache(){this.state.cacheKeys=[],this.viewModals={}}async closeViewByKeys(e){this.autoGoLast=!1;for(let n=0;n<e.length;n++){const r=e[n];await this.viewModals[r].dismiss()}this.goLast(),this.autoGoLast=!0}dismiss(e,n){ut.close(e,n),this.navTabs&&this.navTabs.removeCache(e),this.removeCache(e),this.autoGoLast&&this.goLast()}goLast(){const e=this.state.operateSort.pop();if(e){if(this.state.currentKey===e){this.state.operateSort.push(e);return}const n=this.state.navViewMsgs[e].fullPath;this.router.push(n)}else{const n=this.router.currentRoute.value,{appContext:r}=n.params;let o=`/${r}`;for(let i=1;i<=this.routeDepth;i++)o+=`/${n.params[`view${i}`]}/${ibiz.env.routePlaceholder}`;this.router.push(o)}}}N("av",Yn);const Jn=S({name:"IBizNavPosIndex",props:{modelData:{type:Object,required:!0},controller:{type:Yn,required:!0}},setup(t){var e;const n=t.controller,r=B("nav-pos-index"),o=s=>{n.onViewCreated(s)},i=Le();if(n.setRouter(i),n.routeDepth&&(ln(s=>{n.onRouteChange(s)},n.routeDepth+1),n.panel.view.model.viewType==="APPINDEXVIEW"&&!n.navTabs)){const s=Me();let l="";(e=n.appmenu)==null||e.evt.on("onClick",()=>{l=s.fullPath}),i.beforeEach((c,u,p)=>{u.fullPath===l&&n.clearCache(),p()})}return{ns:r,onViewCreated:o,c:n}},render(){const{state:t,viewModals:e}=this.c,{currentKey:n,cacheKeys:r}=t;return a("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[this.c.routeDepth?a(d("iBizRouterView"),{manualKey:n,modal:e[n],onCreated:this.onViewCreated},{default:({Component:o})=>a(d("keepAlive"),{include:r,max:30,isKey:!0},{default:()=>[o&&a(o,null,null)]})}):a("div",null,[R("\u975E\u8DEF\u7531\u6A21\u5F0F\u5BFC\u822A\u5360\u4F4D\u6682\u672A\u652F\u6301")])])}});var lu=Object.defineProperty,cu=(t,e,n)=>e in t?lu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uu=(t,e,n)=>(cu(t,typeof e!="symbol"?e+"":e,n),n);class du{constructor(){uu(this,"component","IBizNavPosIndex")}async createController(e,n,r){const o=new Yn(e,n,r);return await o.init(),o}}const pu=N("aw",U(Jn,function(t){t.component(Jn.name,Jn),ue("RAWITEM_NAV_POS_INDEX",()=>new du)}));var hu=Object.defineProperty,mu=(t,e,n)=>e in t?hu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qn=(t,e,n)=>(mu(t,typeof e!="symbol"?e+"":e,n),n);class fu extends $e{constructor(){super(...arguments),Qn(this,"currentKey",""),Qn(this,"tabItems",[]),Qn(this,"activeTab","")}}class ps extends ae{createState(){var e;return new fu((e=this.parent)==null?void 0:e.state)}get routeDepth(){return this.panel.view.modal.routeDepth}get navPos(){return this.panel.panelItems.nav_pos_index}findTabItem(e){return this.state.tabItems.find(n=>n.key===e)}onTabClick(e){var n;(n=this.navPos)==null||n.changeView(e)}updateViewInfo(e,n){const r=this.findTabItem(e);r?Object.assign(r,Fi(Te,n)):(this.state.tabItems.push({key:e,...n}),this.state.activeTab=this.state.currentKey)}removeCache(e){const n=this.state.tabItems.findIndex(r=>r.key===e);n!==-1&&this.state.tabItems.splice(n,1)}onTabRemove(e){var n;(n=this.navPos)==null||n.closeViewByKeys([e])}removeOther(){var e;const n=this.state.currentKey,r=[];this.state.tabItems.forEach(o=>{o.key!==n&&r.push(o.key)}),r.length>0&&((e=this.navPos)==null||e.closeViewByKeys(r))}removeAll(){var e;const n=this.state.tabItems.map(r=>r.key);n.length>0&&((e=this.navPos)==null||e.closeViewByKeys(n))}}function hs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Zn=S({name:"IBizNavTabs",props:{modelData:{type:Object,required:!0},controller:{type:ps,required:!0}},setup(t){const e=B("nav-tabs"),n=t.controller,{state:r}=t.controller,o=[{text:"\u5173\u95ED\u6240\u6709",value:"closeAll"},{text:"\u5173\u95ED\u5176\u4ED6",value:"closeOther"}],i=c=>{r.currentKey!==c.paneName&&n.onTabClick(c.paneName)},s=c=>{n.onTabRemove(c)},l=c=>{c.value==="closeAll"?n.removeAll():c.value==="closeOther"&&n.removeOther()};return G(()=>n.state.currentKey,(c,u)=>{c!==u&&n.findTabItem(c)&&(r.activeTab=c)}),{ns:e,actions:o,changePage:i,onTabRemove:s,handleCommand:l}},render(){let t;const{state:e}=this.controller;return a("div",{class:[this.ns.b(),...this.controller.containerClass]},[a("div",{class:this.ns.e("left")},[a(d("el-tabs"),{type:"card",modelValue:e.activeTab,"onUpdate:modelValue":n=>e.activeTab=n,closable:!0,onTabClick:this.changePage,onTabRemove:this.onTabRemove},hs(t=e.tabItems.map(n=>{let r=n.caption;return n.dataInfo&&(r+=` - ${n.dataInfo}`),a(d("el-tab-pane"),{name:n.key,key:n.key,label:r},null)}))?t:{default:()=>[t]})]),a("div",{class:this.ns.e("right")},[a(d("el-dropdown"),{onCommand:this.handleCommand},{default:()=>a(d("el-button"),{size:"small",type:"primary"},{default:()=>[R("\u66F4\u591A "),a("ion-icon",{name:"arrow-down"},null)]}),dropdown:()=>{let n;return a(d("el-dropdown-menu"),null,hs(n=this.actions.map(r=>a(d("el-dropdown-item"),{command:r},{default:()=>[r.text]})))?n:{default:()=>[n]})}})])])}});var bu=Object.defineProperty,vu=(t,e,n)=>e in t?bu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gu=(t,e,n)=>(vu(t,typeof e!="symbol"?e+"":e,n),n);class Cu{constructor(){gu(this,"component","IBizNavTabs")}async createController(e,n,r){const o=new ps(e,n,r);return await o.init(),o}}const wu=U(Zn,function(t){t.component(Zn.name,Zn),ue("RAWITEM_NAV_TABS",()=>new Cu)});var yu=Object.defineProperty,Pu=(t,e,n)=>e in t?yu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ms=(t,e,n)=>(Pu(t,typeof e!="symbol"?e+"":e,n),n);class Eu extends $e{constructor(){super(...arguments),ms(this,"loading",!1),ms(this,"uiActionState")}}class er extends ae{createState(){var e;return new Eu((e=this.parent)==null?void 0:e.state)}get data(){return this.dataParent.data}constructor(e,n,r){super(e,n,r),this.state.uiActionState=this.createUIActionState()}async onInit(){await super.onInit(),this.updateButtonState()}createUIActionState(){const{uiactionId:e,name:n}=this.model;return new Wa(n,this.panel.context.srfappid,e)}async dataChangeNotify(e){await this.updateButtonState(),super.dataChangeNotify(e)}async panelStateNotify(e){await this.updateButtonState(),super.panelStateNotify(e)}async updateButtonState(){await this.state.uiActionState.update(this.data)}async onActionClick(e){const{uiactionId:n}=this.model;await ft.execAndResolved(n,{context:this.panel.context,params:this.panel.params,data:[this.data],view:this.panel.view,event:e,noWaitRoute:!0})}calcItemVisible(e){if(this.state.uiActionState.visible===!1){this.state.visible=!1;return}super.calcItemVisible(e)}calcItemDisabled(e){if(this.state.uiActionState.disabled===!0){this.state.disabled=!0;return}super.calcItemDisabled(e)}}N("ay",er);const tr=S({name:"IBizPanelButton",props:{modelData:{type:Object,required:!0},controller:{type:er,required:!0}},setup(t){const e=B("panel-button"),{caption:n,captionItemName:r,renderMode:o,showCaption:i,sysImage:s,codeName:l,itemStyle:c}=t.modelData,{panel:u,state:p}=t.controller,m=F(()=>r&&u.data?u.data[r.toLowerCase()]:n);let v=!1;Object.is(o,"LINK")&&(v=!0);const g=F(()=>{if(Object.is(o,"LINK"))return null;switch(c){case"PRIMARY":return"primary";case"SUCCESS":return"success";case"INFO":return"info";case"WARNING":return"warning";case"DANGER":return"danger";case"INVERSE":return"info";default:return null}});return{ns:e,isText:v,captionText:m,buttonType:g,showCaption:i,sysImage:s,codeName:l,state:p,handleButtonClick:async h=>{try{p.loading=!0,await t.controller.onActionClick(h),t.controller.onClick()}finally{p.loading=!1}}}},render(){return this.state.visible?a("div",{class:[this.ns.b(),this.ns.m(this.codeName),this.ns.is("loading",this.state.loading),...this.controller.containerClass]},[a(d("el-button"),{type:this.buttonType,text:this.isText,disabled:this.state.disabled,loading:this.state.loading,onClick:this.handleButtonClick},{default:()=>[a("div",{class:this.ns.b("content")},[a(d("iBizIcon"),{class:this.ns.bm("content","icon"),icon:this.sysImage},null),a("span",{class:this.ns.bm("content","caption")},[this.showCaption?this.captionText:null])])]})]):null}});var Iu=Object.defineProperty,Du=(t,e,n)=>e in t?Iu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_u=(t,e,n)=>(Du(t,typeof e!="symbol"?e+"":e,n),n);class Bu{constructor(){_u(this,"component","IBizPanelButton")}async createController(e,n,r){const o=new er(e,n,r);return await o.init(),o}}const Su=N("ax",U(tr,function(t){t.component(tr.name,tr),ue("BUTTON",()=>new Bu)}));var Au=Object.defineProperty,Fu=(t,e,n)=>e in t?Au(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,He=(t,e,n)=>(Fu(t,typeof e!="symbol"?e+"":e,n),n);class xu extends $e{constructor(){super(...arguments),He(this,"caption",""),He(this,"caption2",""),He(this,"subCaption",""),He(this,"subCaption2",""),He(this,"icon",""),He(this,"icon2",""),He(this,"isSvg",!1)}}var Ou=Object.defineProperty,Tu=(t,e,n)=>e in t?Ou(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Nu=(t,e,n)=>(Tu(t,typeof e!="symbol"?e+"":e,n),n);class nr extends ae{constructor(){super(...arguments),Nu(this,"captionSplit","|")}createState(){var e;return new xu((e=this.parent)==null?void 0:e.state)}async onInit(){await super.onInit();const e=this.panel.view.model;e.title&&(document.title=e.title),e.appIconPath&&(this.state.icon=e.appIconPath),e.appIconPath2&&(this.state.icon2=e.appIconPath2),e.caption&&(this.state.caption=e.caption.split(this.captionSplit)[0],this.state.caption2=e.caption.split(this.captionSplit)[1]||e.caption.split(this.captionSplit)[0]),e.subCaption&&(this.state.subCaption=e.subCaption.split(this.captionSplit)[0],this.state.subCaption2=e.subCaption.split(this.captionSplit)[1]||e.subCaption.split(this.captionSplit)[0]),(this.state.icon.endsWith(".svg")||this.state.icon2.endsWith(".svg"))&&(this.state.isSvg=!0)}}N("aA",nr);const rr=S({name:"IBizPanelAppTitle",props:{modelData:{type:Object,required:!0},controller:{type:nr,required:!0}},setup(t){const e=B("panel-app-title"),n=t.controller,r=Me(),o=Le(),i=mt("ctx",void 0),s=F(()=>i?.view&&i.view.model.mainMenuAlign||"LEFT"),l=async()=>{if(i?.view){const p=cn(r);p.pathNodes=p.pathNodes.slice(0,1);const m=Go(p);o.push({path:m}),setTimeout(()=>{window.location.reload()})}t.controller.onClick()},c=F(()=>s.value==="LEFT"),u=F(()=>n.panel.view.state.isCollapse);return{ns:e,c:n,menuAlign:s,showImgOnly:c,handleClick:l,isCollapse:u}},render(){const{icon:t,icon2:e,isSvg:n,caption:r,caption2:o,subCaption:i,subCaption2:s}=this.c.state;let l=null;const c=a("span",{class:this.ns.e("title")},[r]);t||e?n?l=a("ion-icon",{class:this.ns.e("logo"),icon:this.isCollapse?e:t},null):l=a("span",{class:this.ns.e("logo")},[a("img",{src:this.isCollapse?e:t},null)]):this.menuAlign==="LEFT"&&(this.isCollapse?l=a("div",{class:this.ns.e("collapse-title")},[a("div",{class:this.ns.e("caption2")},[o]),a("div",{class:this.ns.e("subCaption2")},[s])]):l=a("span",{class:this.ns.e("logo")},[a("svg",{width:"256px",height:"90px",viewBox:"0 0 256 90",version:"1.1"},[a("g",{id:"\u753B\u677F",stroke:"none","stroke-width":"1","fill-rule":"evenodd"},[a("text",{id:"Omni-OA","font-family":"Poppins-Bold, Poppins","font-size":"22","font-weight":"bold"},[a("tspan",{x:"20.961",y:"39"},[r])]),a("text",{id:"\u4E00\u4F53\u5316\u529E\u516C\u5E73\u53F0","font-family":"PingFangSC-Semibold, PingFang SC","font-size":"18","font-weight":"bold"},[a("tspan",{x:"96",y:"73"},[i])])])])]));let u=null;return this.menuAlign==="LEFT"?u=l:u=[l,c],a("div",{class:[this.ns.b(),this.ns.is("only-img",this.showImgOnly),this.ns.is("collapse",this.isCollapse),...this.controller.containerClass],onClick:this.handleClick},[u])}});var zu=Object.defineProperty,Ru=(t,e,n)=>e in t?zu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$u=(t,e,n)=>(Ru(t,typeof e!="symbol"?e+"":e,n),n);class Lu{constructor(){$u(this,"component","IBizPanelAppTitle")}async createController(e,n,r){const o=new nr(e,n,r);return await o.init(),o}}const Mu=N("az",U(rr,function(t){t.component(rr.name,rr),ue("RAWITEM_APP_APPTITLE",()=>new Lu)}));function fs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const or=S({name:"IBizPanelAppHeader",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){const e=B("panel-app-header"),{showCaption:n,titleBarCloseMode:r,id:o}=t.modelData,i=r!==0,s=I(r===2),l=()=>{i&&(s.value=!s.value)},c=F(()=>{let u=[e.b(),e.m(o)];return n===!0&&(u=[...u,...t.controller.containerClass,n&&e.m("show-header"),i&&e.m("collapsible"),e.is("collapse",i&&s.value),e.is("hidden",!t.controller.state.visible)]),u});return{ns:e,isCollapse:s,classArr:c,changeCollapse:l}},render(){var t,e;let n;const r=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[],o=a(d("iBizRow"),{slot:"content",layout:this.modelData.layout},fs(n=r.map(i=>{const s=i.props;return!s||!s.controller?i:a(d("iBizCol"),{layoutPos:s.modelData.layoutPos,state:s.controller.state},fs(i)?i:{default:()=>[i]})}))?n:{default:()=>[n]});return a("div",{class:this.classArr},[o])}});var Vu=Object.defineProperty,ju=(t,e,n)=>e in t?Vu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ku=(t,e,n)=>(ju(t,typeof e!="symbol"?e+"":e,n),n);class Uu{constructor(){ku(this,"component","IBizPanelAppHeader")}async createController(e,n,r){const o=new ae(e,n,r);return await o.init(),o}}const Gu=U(or,function(t){t.component(or.name,or),ue("CONTAINER_AppHeader",()=>new Uu)});function bs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const ar=S({name:"IBizPanelViewHeader",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){const e=B("panel-view-header"),{showCaption:n,titleBarCloseMode:r,id:o}=t.modelData,i=r!==0,s=I(r===2),l=()=>{i&&(s.value=!s.value)},c=F(()=>{let u=[e.b(),e.m(o)];return n===!0&&(u=[...u,...t.controller.containerClass,n&&e.m("show-header"),i&&e.m("collapsible"),e.is("collapse",i&&s.value),e.is("hidden",!t.controller.state.visible)]),u});return{ns:e,isCollapse:s,classArr:c,changeCollapse:l}},render(){var t,e;let n;const r=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[],o=a(d("iBizRow"),{slot:"content",layout:this.modelData.layout},bs(n=r.map(i=>{const s=i.props;return!s||!s.controller?i:a(d("iBizCol"),{layoutPos:s.modelData.layoutPos,state:s.controller.state},bs(i)?i:{default:()=>[i]})}))?n:{default:()=>[n]});return a("div",{class:this.classArr},[o])}});var qu=Object.defineProperty,Wu=(t,e,n)=>e in t?qu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hu=(t,e,n)=>(Wu(t,typeof e!="symbol"?e+"":e,n),n);class Ku{constructor(){Hu(this,"component","IBizPanelViewHeader")}async createController(e,n,r){const o=new ae(e,n,r);return await o.init(),o}}const Xu=U(ar,function(t){t.component(ar.name,ar),ue("CONTAINER_ViewHeader",()=>new Ku)});function vs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const ir=S({name:"IBizPanelExpHeader",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){const e=B("panel-exp-header"),{showCaption:n,titleBarCloseMode:r,id:o}=t.modelData,i=r!==0,s=I(r===2),l=()=>{i&&(s.value=!s.value)},c=F(()=>{let u=[e.b(),e.m(o)];return n===!0&&(u=[...u,...t.controller.containerClass,n&&e.m("show-header"),i&&e.m("collapsible"),e.is("collapse",i&&s.value),e.is("hidden",!t.controller.state.visible)]),u});return{ns:e,isCollapse:s,classArr:c,changeCollapse:l}},render(){var t,e;let n;const r=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[],o=a(d("iBizRow"),{slot:"content",layout:this.modelData.layout},vs(n=r.map(i=>{const s=i.props;return!s||!s.controller?i:a(d("iBizCol"),{layoutPos:s.modelData.layoutPos,state:s.controller.state},vs(i)?i:{default:()=>[i]})}))?n:{default:()=>[n]});return a("div",{class:this.classArr},[o])}});var Yu=Object.defineProperty,Ju=(t,e,n)=>e in t?Yu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qu=(t,e,n)=>(Ju(t,typeof e!="symbol"?e+"":e,n),n);class Zu{constructor(){Qu(this,"component","IBizPanelExpHeader")}async createController(e,n,r){const o=new ae(e,n,r);return await o.init(),o}}const ed=U(ir,function(t){t.component(ir.name,ir),ue("CONTAINER_Exp_Header",()=>new Zu)});function gs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const sr=S({name:"IBizPanelViewContent",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){const e=B("panel-view-content"),{showCaption:n,titleBarCloseMode:r,id:o}=t.modelData,i=r!==0,s=I(r===2),l=()=>{i&&(s.value=!s.value)},c=F(()=>{let u=[e.b(),e.m(o)];return n===!0&&(u=[...u,...t.controller.containerClass,e.is("collapse",i&&s.value),e.is("hidden",!t.controller.state.visible)]),u});return{ns:e,isCollapse:s,classArr:c,changeCollapse:l}},render(){var t,e;let n;const r=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[],o=a(d("iBizRow"),{layout:this.modelData.layout},gs(n=r.map(i=>{const s=i.props;return!s||!s.controller?i:a(d("iBizCol"),{layoutPos:s.modelData.layoutPos,state:s.controller.state},gs(i)?i:{default:()=>[i]})}))?n:{default:()=>[n]});return a("div",{class:this.classArr},[o])}});var td=Object.defineProperty,nd=(t,e,n)=>e in t?td(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rd=(t,e,n)=>(nd(t,typeof e!="symbol"?e+"":e,n),n);class od{constructor(){rd(this,"component","IBizPanelViewContent")}async createController(e,n,r){const o=new ae(e,n,r);return await o.init(),o}}const ad=U(sr,function(t){t.component(sr.name,sr),ue("CONTAINER_VIEWCONTENT",()=>new od)});function Cs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const lr=S({name:"IBizPanelTabPanel",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){const e=B("panel-tab-panel"),n=F(()=>{const{id:r}=t.modelData,o=[e.b(),e.m(r)];return o.push(...t.controller.containerClass),o});return{ns:e,classArr:n}},render(){var t,e,n;let r;if(!this.controller.state.visible)return;const o=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[];return a(d("el-tabs"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],"model-value":(n=this.modelData.panelTabPages)==null?void 0:n[0].id},Cs(r=o.map(i=>{const s=i.props;if(!s||!s.controller)return i;const l=s.controller;return!l.state.visible&&!l.state.keepAlive?null:a(d("el-tab-pane"),{class:this.ns.b("tab-item"),label:l.model.caption,name:l.model.id,lazy:!0},Cs(i)?i:{default:()=>[i]})}))?r:{default:()=>[r]})}});var id=Object.defineProperty,sd=(t,e,n)=>e in t?id(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ld=(t,e,n)=>(sd(t,typeof e!="symbol"?e+"":e,n),n);class cd{constructor(){ld(this,"component","IBizPanelTabPanel")}async createController(e,n,r){const o=new ae(e,n,r);return await o.init(),o}}const ud=N("aB",U(lr,function(t){t.component(lr.name,lr),ue("TABPANEL",()=>new cd)}));function ws(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const cr=S({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){const e=B("panel-tab-page"),n=F(()=>{const{id:r}=t.modelData,o=[e.b(),e.m(r)];return o.push(...t.controller.containerClass),o});return{ns:e,classArr:n}},render(){var t,e;let n;const r=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[];return a(d("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},ws(n=r.map(o=>{const i=o.props;if(!i||!i.controller)return o;const s=i.controller;return a(d("iBizCol"),{layoutPos:s.model.layoutPos,state:s.state},ws(o)?o:{default:()=>[o]})}))?n:{default:()=>[n]})}});var dd=Object.defineProperty,pd=(t,e,n)=>e in t?dd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hd=(t,e,n)=>(pd(t,typeof e!="symbol"?e+"":e,n),n);class md{constructor(){hd(this,"component","IBizPanelTabPage")}async createController(e,n,r){const o=new ae(e,n,r);return await o.init(),o}}const fd=N("aC",U(cr,function(t){t.component(cr.name,cr),ue("TABPAGE",()=>new md)}));var bd=Object.defineProperty,vd=(t,e,n)=>e in t?bd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ur=(t,e,n)=>(vd(t,typeof e!="symbol"?e+"":e,n),n);class dr extends ae{constructor(){super(...arguments),ur(this,"splitMode","horizontal"),ur(this,"splitValue",.5),ur(this,"lastSplitValue",null)}initSplitValue(e,n){n==="PX"&&(this.splitValue=`${e}px`),n==="PERCENTAGE"&&(this.splitValue=e/100),this.state.splitValue=this.splitValue}async onInit(){await super.onInit();const{predefinedType:e,panelItems:n}=this.model;if(this.splitMode=e==="CONTAINER_V_SPLIT"?"vertical":"horizontal",Array.isArray(n)&&n.length){const o=n[0].layoutPos;if(o){if(this.splitMode==="horizontal"){const{width:i,widthMode:s}=o;i!=null&&s!=null&&this.initSplitValue(i,s)}if(this.splitMode==="vertical"){const{height:i,heightMode:s}=o;i!=null&&s!=null&&this.initSplitValue(i,s)}}}}hiddenPanel(e){this.lastSplitValue=this.state.splitValue,(e==="left"||e==="top")&&(this.state.splitValue=0),(e==="right"||e==="bottom")&&(this.state.splitValue=1),this.state.isHiddenTrigger=!0}showPanel(){this.lastSplitValue!=null&&(this.state.splitValue=this.lastSplitValue,this.state.isHiddenTrigger=!1,this.lastSplitValue=null)}}N("aD",dr);const pr=S({name:"IBizSplitContainer",props:{modelData:{type:Object,required:!0},controller:{type:dr,required:!0}},setup(t){const e=B("split-container"),{id:n}=t.modelData,r=F(()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible),e.is("hidden-trigger",t.controller.state.isHiddenTrigger)],o});return{ns:e,classArr:r}},render(){var t,e;const n=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[];return a("div",{class:this.classArr},[a(d("iBizSplit"),{modelValue:this.controller.state.splitValue,"onUpdate:modelValue":r=>this.controller.state.splitValue=r,mode:this.controller.splitMode},{left:()=>n[0],right:()=>n[1],top:()=>n[0],bottom:()=>n[1]})])}});var gd=Object.defineProperty,Cd=(t,e,n)=>e in t?gd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wd=(t,e,n)=>(Cd(t,typeof e!="symbol"?e+"":e,n),n);class ys{constructor(){wd(this,"component","IBizSplitContainer")}async createController(e,n,r){const o=new dr(e,n,r);return await o.init(),o}}const yd=N("aE",U(pr,function(t){t.component(pr.name,pr),ue("CONTAINER_CONTAINER_H_SPLIT",()=>new ys),ue("CONTAINER_CONTAINER_V_SPLIT",()=>new ys)})),hr=S({name:"IBizPanelIndexViewSearch",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){const e=B("panel-index-view-search"),n=t.controller,r=I(""),o=nt(()=>{},500),i=p=>{r.value=p,o()},s=mt("ctx",void 0),l=F(()=>s?.view&&s.view.model.mainMenuAlign||"LEFT"),c=F(()=>n.panel.view.state.isCollapse),u=F(()=>{const{id:p}=t.modelData,m=[e.b(),e.m(p),e.is("collapse",c.value)];return m.push(...t.controller.containerClass),m});return{ns:e,classArr:u,isCollapse:c,onInput:i,c:n,query:r,menuAlign:l}},render(){if(this.controller.state.visible)return a("div",{class:this.classArr},[this.menuAlign==="LEFT"&&!this.isCollapse?a(d("el-input"),{"model-value":this.query,class:this.ns.b("search"),placeholder:"\u641C\u7D22\u5185\u5BB9",onInput:this.onInput},{prefix:()=>a("ion-icon",{class:this.ns.e("search-icon"),name:"search"},null)}):a("div",{class:this.ns.b("btn")},[a(d("el-button"),null,{default:()=>[a("ion-icon",{class:this.ns.e("search-icon"),name:"search"},null)]})])])}});var Pd=Object.defineProperty,Ed=(t,e,n)=>e in t?Pd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Id=(t,e,n)=>(Ed(t,typeof e!="symbol"?e+"":e,n),n);class Dd{constructor(){Id(this,"component","IBizPanelIndexViewSearch")}async createController(e,n,r){const o=new ae(e,n,r);return await o.init(),o}}const _d=N("aF",U(hr,function(t){t.component(hr.name,hr),ue("RAWITEM_INDEX_VIEW_SEARCH",()=>new Dd)}));class Bd extends $e{}class Ps extends ae{createState(){var e;return new Bd((e=this.parent)==null?void 0:e.state)}}function Es(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const mr=S({name:"IBizPanelAppLoginView",props:{modelData:{type:Object,required:!0},controller:{type:Ps,required:!0}},setup(t){const e=B("panel-app-login-view"),{id:n}=t.modelData,r=F(()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o});return{ns:e,classArr:r}},render(){var t,e;let n;const r=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[],o=a(d("iBizRow"),{slot:"content",layout:this.modelData.layout},Es(n=r.map(i=>{const s=i.props;return!s||!s.controller?i:a(d("iBizCol"),{layoutPos:s.modelData.layoutPos,state:s.controller.state},Es(i)?i:{default:()=>[i]})}))?n:{default:()=>[n]});return a("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?a("style",{type:"text/css"},[this.controller.model.cssStyle]):null,o])}});var Sd=Object.defineProperty,Ad=(t,e,n)=>e in t?Sd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fd=(t,e,n)=>(Ad(t,typeof e!="symbol"?e+"":e,n),n);class xd{constructor(){Fd(this,"component","IBizPanelAppLoginView")}async createController(e,n,r){const o=new Ps(e,n,r);return await o.init(),o}}const Od=U(mr,function(t){t.component(mr.name,mr),ue("CONTAINER_APPLOGINVIEW",()=>new xd)});class Td extends $e{}class Is extends ae{createState(){var e;return new Td((e=this.parent)==null?void 0:e.state)}}const fr=S({name:"IBizPanelRememberMe",props:{modelData:{type:Object,required:!0},controller:{type:Is,required:!0}},setup(t){const e=B("panel-remember-me"),{id:n}=t.modelData,r=t.controller,o=F(()=>{let s=[e.b(),e.m(n)];return s=[...s,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],s}),i=F({get:()=>r.panel.state.data.isRemember,set:s=>{r.panel.state.data.isRemember=s}});return{ns:e,classArr:o,c:r,isRemember:i}},render(){return a("div",{class:this.classArr},[a(d("el-checkbox"),{modelValue:this.isRemember,"onUpdate:modelValue":t=>this.isRemember=t,label:"\u8BB0\u4F4F\u6211"},null)])}});var Nd=Object.defineProperty,zd=(t,e,n)=>e in t?Nd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rd=(t,e,n)=>(zd(t,typeof e!="symbol"?e+"":e,n),n);class $d{constructor(){Rd(this,"component","IBizPanelRememberMe")}async createController(e,n,r){const o=new Is(e,n,r);return await o.init(),o}}const Ld=U(fr,function(t){t.component(fr.name,fr),ue("CONTAINER_REMEMBER_ME",()=>new $d)});function Ds(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const br=S({name:"IBizIndexActions",props:{modelData:{type:Object,required:!0},controller:{type:un,required:!0}},setup(t){const e=B("index-actions"),{id:n}=t.modelData,r=F(()=>{let i=[e.b(),e.m(n)];return i=[...i,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],i}),o=F(()=>t.controller.panel.view.state.isCollapse);return{ns:e,classArr:r,isCollapse:o}},render(){var t,e;let n,r=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[];this.isCollapse&&(r=[r[0]]);const o=a(d("iBizRow"),{slot:"content",layout:this.modelData.layout},Ds(n=r.map(i=>{const s=i.props;return!s||!s.controller?i:a(d("iBizCol"),{layoutPos:s.modelData.layoutPos,state:s.controller.state},Ds(i)?i:{default:()=>[i]})}))?n:{default:()=>[n]});return a("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?a("style",{type:"text/css"},[this.controller.model.cssStyle]):null,o])}});var Md=Object.defineProperty,Vd=(t,e,n)=>e in t?Md(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jd=(t,e,n)=>(Vd(t,typeof e!="symbol"?e+"":e,n),n);class kd{constructor(){jd(this,"component","IBizIndexActions")}async createController(e,n,r){const o=new un(e,n,r);return await o.init(),o}}const Ud=N("aG",U(br,function(t){t.component(br.name,br),ue("CONTAINER_INDEX_ACTIONS",()=>new kd)}));class Gd extends $e{}class _s extends ae{createState(){var e;return new Gd((e=this.parent)==null?void 0:e.state)}get disableClose(){const{titleBarCloseMode:e}=this.model;return e===0||e===void 0}get defaultExpansion(){const{titleBarCloseMode:e}=this.model;return this.disableClose||e===1}}var qd=Object.defineProperty,Wd=(t,e,n)=>e in t?qd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hd=(t,e,n)=>(Wd(t,typeof e!="symbol"?e+"":e,n),n);class Kd{constructor(){Hd(this,"component","IBizPanelContainerGroup")}async createController(e,n,r){const o=new _s(e,n,r);return await o.init(),o}}function Bs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const vr=S({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:_s,required:!0}},setup(t){const e=B("panel-container-group"),n=I(!t.controller.defaultExpansion),r=()=>{t.controller.disableClose||(n.value=!n.value)},o=F(()=>{const{captionItemName:i,caption:s,capLanguageRes:l}=t.modelData;if(i)return t.controller.data[i];let c=s;return l&&(c=ibiz.i18n.t(l.lanResTag,s)),c});return{ns:e,captionText:o,changeCollapse:r,isCollapse:n}},render(){var t,e;let n;const r=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!this.controller.state.visible)];this.modelData.showCaption===!0&&(r.push(this.ns.m("show-header")),r.push(this.ns.b("collapse")),r.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&r.push(this.ns.bm("collapse","disable-close")));const o=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[],i=a(d("iBizRow"),{slot:"content",layout:this.modelData.layout},Bs(n=o.map(l=>{const c=l.props;return!c||!c.controller?l:a(d("iBizCol"),{layoutPos:c.modelData.layoutPos,state:c.controller.state},Bs(l)?l:{default:()=>[l]})}))?n:{default:()=>[n]});let s=null;return this.modelData.showCaption&&(s=a("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[a("div",{class:[this.ns.be("header","left")]},[a("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),a("div",{class:[this.ns.be("header","right")]},[this.modelData.titleBarCloseMode!==void 0&&this.modelData.titleBarCloseMode!==0&&(this.isCollapse?a("ion-icon",{name:"caret-forward-sharp"},null):a("ion-icon",{name:"caret-down-sharp"},null))])])),a("div",{class:r},[s,a("div",{class:[this.ns.b("content")]},[i])])}}),Xd=U(vr,function(t){t.component(vr.name,vr),ue("CONTAINER_CONTAINER_GROUP",()=>new Kd)}),Yd={10:"\u672A\u5F00\u59CB",20:"\u6267\u884C\u4E2D",30:"\u5DF2\u6267\u884C",40:"\u6267\u884C\u5931\u8D25"},Jd={10:"info",20:"",30:"success",40:"danger"},Ss=S({name:"IBizAsyncAction",props:{message:{type:Object,required:!0}},setup(){return{ns:B("async-action")}},render(){const{asyncacitonname:t,actionstate:e,begintime:n,stepinfo:r,completionrate:o}=this.message;return a("div",{class:[this.ns.b()]},[a("div",{class:this.ns.b("left")},[a("ion-icon",{name:"list-outline"},null)]),a("div",{class:this.ns.b("center")},[a("div",{class:this.ns.e("caption")},[t]),e===20?a("div",{class:this.ns.e("progress")},[r,R("\uFF08"),o,R("%\uFF09")]):a("div",{class:this.ns.e("begin-time")},[n])]),a("div",{class:this.ns.b("right")},[a(d("el-tag"),{type:Jd[e]},{default:()=>[Yd[e]]})])])}});function Qd(t){ibiz.net.request(t.url,{method:"get",responseType:"blob",baseURL:""}).then(e=>{const n=Ne.parse(e.headers["content-disposition"],{delimiter:";"}).filename;if(n&&(t.name+=`.${n.split(".")[1]}`),e.status!==200)throw new pe("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");if(e.data){const r=t.name;gt(e.data,r)}else throw new pe("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728")})}const Zd=S({name:"IBizAsyncActionPreview",props:{asyncAction:{type:Object,required:!0},modal:{type:Object,required:!0}},setup(t){const e=B("async-action-preview"),n=()=>{t.modal.dismiss()},r=me({title:"",beginTime:"",endTime:"",total:0,success:0,error:0,errorDetails:[{row:0,reason:""}],errorFileUrl:""});if(r.title=`\u5BFC\u5165\u6570\u636E\u8BE6\u60C5-${t.asyncAction.asyncacitonname}`,r.beginTime=t.asyncAction.begintime,r.endTime=t.asyncAction.endtime,t.asyncAction.actionresult){let i;try{i=JSON.parse(t.asyncAction.actionresult)}catch{throw new pe("\u89E3\u6790\u5BFC\u5165\u4FE1\u606F\u5F02\u5E38")}r.total=i.total||0,r.success=i.success||0,r.error=r.total-r.success,i.errorinfo?r.errorDetails=Object.keys(i.errorinfo).map(s=>({row:Number(s),reason:i.errorinfo[s].errorInfo})):r.errorDetails=[],i.errorfile&&(r.errorFileUrl=`${ibiz.env.baseUrl}/${ibiz.env.appId}${ibiz.env.downloadFileUrl}/${i.errorfile.folder}/${i.errorfile.fileid}`)}return{ns:e,info:r,onClose:n,onDownLoad:()=>{Qd({url:r.errorFileUrl,name:r.title})}}},render(){return a("div",{class:[this.ns.b()]},[a("div",{class:this.ns.b("header")},[a("div",{class:this.ns.e("title")},[this.info.title]),a("div",{class:this.ns.b("toolbar")},[this.info.errorFileUrl&&a(d("el-button"),{onClick:this.onDownLoad},{default:()=>[R("\u4E0B\u8F7D\u9519\u8BEF\u6587\u4EF6")]}),a(d("el-button"),{onClick:this.onClose},{default:()=>[R("\u5173\u95ED")]})])]),a("div",{class:this.ns.b("time")},[a(d("el-form-item"),{label:"\u5BFC\u5165\u65F6\u95F4: "},{default:()=>[this.info.beginTime,R(" ~ "),this.info.endTime]})]),a(d("el-row"),{class:this.ns.b("count")},{default:()=>[a(d("el-col"),{span:8},{default:()=>[a(d("el-form-item"),{label:"\u5BFC\u5165\u603B\u6761\u6570: "},{default:()=>[this.info.total]})]}),a(d("el-col"),{span:8},{default:()=>[a(d("el-form-item"),{label:"\u6210\u529F\u5BFC\u5165\u6570: "},{default:()=>[this.info.success]})]}),a(d("el-col"),{span:8},{default:()=>[a(d("el-form-item"),{label:"\u5BFC\u5165\u5931\u8D25\u6570: "},{default:()=>[this.info.error]})]})]}),this.info.errorDetails.length>0&&a("div",{class:this.ns.b("detail")},[this.info.errorDetails.map(t=>a("div",{class:this.ns.b("detail-item")},[a("div",{class:this.ns.be("detail-item","index")},[t.row]),a("div",{class:this.ns.be("detail-item","error")},[a("div",{class:this.ns.be("detail-item","error-title")},[R("\u9519\u8BEF")]),a("div",{class:this.ns.be("detail-item","error-reason")},[t.reason])])]))])])}});var ep=Object.defineProperty,tp=(t,e,n)=>e in t?ep(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,np=(t,e,n)=>(tp(t,typeof e!="symbol"?e+"":e,n),n);class rp{constructor(){np(this,"component","IBizAsyncAction")}onClick(e,n){ibiz.overlay.modal(r=>re(Zd,{asyncAction:e,modal:r}),{},{width:"80%",height:"80%"})}}const gr=S({name:"IBizUserMessage",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){const e=B("user-message"),n=t.controller,r=I(!1),o=I("notification"),i=t.modelData.sysImage||{imagePath:"svg/message.svg"},{appStore:s}=qo(),l=I(0),c=F(()=>{const g=s.recentAsyncActions.length+l.value;return s.allAsyncActions.filter((b,h)=>h<g)}),u=()=>{l.value=0},p=()=>{l.value+=10},m=I();return{ns:e,c:n,popoverRef:m,showPopover:r,sysImage:i,currentTab:o,appStore:s,actualMsgs:c,onMsgClick:g=>{m.value.hide()},hiddenHistory:u,showMoreHistory:p}},render(){const t=this.appStore.allAsyncActions.length-this.actualMsgs.length,e=this.actualMsgs.length===0?`\u67E5\u770B\u5386\u53F2\uFF08${t}\uFF09`:`\u52A0\u8F7D\u66F4\u591A\uFF08${t}\uFF09`;return a("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[a(d("el-popover"),{ref:"popoverRef","popper-class":this.ns.b("popover"),placement:"bottom",trigger:"click",modelValue:this.showPopover,"onUpdate:modelValue":n=>this.showPopover=n,onHide:this.hiddenHistory},{reference:()=>a(d("i-biz-icon"),{class:[this.ns.e("image")],icon:this.sysImage},null),default:()=>a(d("el-tabs"),{class:this.ns.b("popover-content"),modelValue:this.currentTab,"onUpdate:modelValue":n=>this.currentTab=n},{default:()=>[a(d("el-tab-pane"),{label:"\u901A\u77E5",name:"notification"},{default:()=>[this.actualMsgs.length>0&&this.actualMsgs.map(n=>{const r=Ha(n.actiontype);return r?re(d(r.component),{class:this.ns.e("notification-item"),onClick:o=>{this.onMsgClick(n),r.onClick(n,o)},message:n}):a("div",{class:this.ns.e("notification-item")},[R("\u5F02\u6B65\u64CD\u4F5C\u7C7B\u578B"),n.actiontype,R("\u6682\u672A\u652F\u6301")])}),this.actualMsgs.length===0&&a("div",{class:this.ns.e("nodata")},[R("\u6682\u65E0\u901A\u77E5")]),t>0&&a("div",{class:this.ns.e("load-more"),onClick:this.showMoreHistory},[e])]})]})})])}});var op=Object.defineProperty,ap=(t,e,n)=>e in t?op(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ip=(t,e,n)=>(ap(t,typeof e!="symbol"?e+"":e,n),n);class sp{constructor(){ip(this,"component","IBizUserMessage")}async createController(e,n,r){const o=new ae(e,n,r);return await o.init(),o}}const lp=U(gr,function(t){t.component(gr.name,gr),t.component(Ss.name,Ss),Ka("DEIMPORTDATA2",()=>new rp),ue("RAWITEM_USERMESSAGE",()=>new sp)});var cp=Object.defineProperty,up=(t,e,n)=>e in t?cp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dp=(t,e,n)=>(up(t,typeof e!="symbol"?e+"":e,n),n);class As extends ae{constructor(){super(...arguments),dp(this,"searchFrom")}get searchButtonStyle(){return this.searchFrom.model.searchButtonStyle||"DEFAULT"}get storedFilters(){var e;return((e=this.searchFrom)==null?void 0:e.state.storedFilters)||[]}async onInit(){await super.onInit();const e=this.panel.container;if(!e)throw new pe("\u5F53\u524D\u89C6\u56FE\u91CC\u6CA1\u6709\u627E\u5230\u53EBsearchform\u7684\u641C\u7D22\u8868\u5355");this.searchFrom=e}onSearchButtonClick(){ft.execAndResolved("search",{context:this.panel.context,params:this.panel.params,data:[],view:this.panel.view})}onResetButtonClick(){ft.execAndResolved("reset",{context:this.panel.context,params:this.panel.params,data:[],view:this.panel.view})}}const Cr=S({name:"IBizSearchFormButtons",props:{modelData:{type:Object,required:!0},controller:{type:As,required:!0}},setup(t){const e=B("searchform-buttons"),n=t.controller;return{ns:e,c:n,onSearchButtonClick:()=>{n.onSearchButtonClick()},onResetButtonClick:()=>{n.onResetButtonClick()},saveFilterConfirm:()=>{Be.prompt("\u8BF7\u8F93\u5165\u8981\u5B58\u50A8\u7684\u81EA\u5B9A\u4E49\u67E5\u8BE2\u540D\u79F0\uFF1A","\u5B58\u50A8\u81EA\u5B9A\u4E49\u67E5\u8BE2",{confirmButtonText:"\u4FDD\u5B58",cancelButtonText:"\u53D6\u6D88"}).then(({value:s})=>{n.searchFrom.storeFilter(s)})}}},render(){return a("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[this.controller.searchButtonStyle==="SEARCHONLY"?a(d("el-button"),{onClick:this.onSearchButtonClick},{default:()=>[R("\u641C\u7D22")]}):a(d("el-dropdown"),{"split-button":!0,type:"primary",onClick:this.onSearchButtonClick},{default:()=>a("span",{class:this.ns.b("label")},[R("\u641C\u7D22")]),dropdown:()=>a(d("el-dropdown-menu"),null,{default:()=>[a(d("el-dropdown-item"),{onClick:this.onResetButtonClick},{default:()=>[R("\u91CD\u7F6E")]}),a(d("el-dropdown-item"),{onClick:this.saveFilterConfirm},{default:()=>[R("\u4FDD\u5B58\u6761\u4EF6")]}),this.controller.storedFilters.length>0&&this.controller.storedFilters.map((t,e)=>a(d("el-dropdown-item"),{class:this.ns.b("filter-item"),onClick:()=>{this.controller.searchFrom.applyStoredFilter(e)}},{default:()=>[a("span",{class:this.ns.be("filter-item","text")},[t.name,a("ion-icon",{class:this.ns.be("filter-item","remove"),onClick:n=>{n.stopPropagation(),this.controller.searchFrom.removeStoredFilter(e)},name:"close-outline"},null)])]}))]})})])}});var pp=Object.defineProperty,hp=(t,e,n)=>e in t?pp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mp=(t,e,n)=>(hp(t,typeof e!="symbol"?e+"":e,n),n);class fp{constructor(){mp(this,"component","IBizSearchFormButtons")}async createController(e,n,r){const o=new As(e,n,r);return await o.init(),o}}const bp=U(Cr,function(t){t.component(Cr.name,Cr),ue("RAWITEM_SEARCHFORM_BUTTONS",()=>new fp)}),vp=N("as",{install:t=>{t.use(Wo),t.use(Ho),t.use(Ko),t.use(ru),t.use(pu),t.use(wu),t.use(Su),t.use(Xo),t.use(Mu),t.use(Yo),t.use(Jo),t.use(Qo),t.use(Gu),t.use(Xu),t.use(ed),t.use(Zo),t.use(ad),t.use(ea),t.use(ud),t.use(fd),t.use(yd),t.use(_d),t.use(Od),t.use(Ld),t.use(Ud),t.use(Xd),t.use(lp),t.use(ta),t.use(bp)}});function gp(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}function Fs(t){return t.map(e=>{var n;let r=e.caption;e.capLanguageRes&&(r=ibiz.i18n.t(e.capLanguageRes.lanResTag,e.caption));const o={key:e.id,label:r,image:e.sysImage,counterId:e.counterId,disabled:!e.appFuncId,tooltip:e.tooltip};return(n=e.appMenuItems)!=null&&n.length&&(o.children=Fs(e.appMenuItems)),o})}function xs(t,e,n,r,o,i){if(o.state.menuItemsState[e.key].visible)return t&&n?a(d("el-tooltip"),{class:r.b("tooltip"),content:e.label,placement:"left",theme:"light"},{default:()=>[a(d("el-menu-item"),{class:r.e("item"),index:e.key,disabled:e.disabled},{default:()=>[e.image?a(d("iBizIcon"),{class:r.e("icon"),icon:e.image},null):e.label.slice(0,1)]})]}):a(d("el-menu-item"),{class:r.e("item"),index:e.key,disabled:e.disabled,title:e.tooltip},{default:()=>[e.image?a(d("iBizIcon"),{class:r.e("icon"),icon:e.image},null):null,e.label,i[e.counterId]!=null?a("div",{class:r.e("counter")},[i[e.counterId]]):null]})}function Os(t,e,n,r,o,i){if(o.state.menuItemsState[e.key].visible)return a(d("el-sub-menu"),{class:r.b("submenu"),index:e.key},{default:()=>e.children.map(s=>s.children?Os(!1,s,n,r,o,i):xs(!1,s,n,r,o,i)),title:()=>n?e.image?a(d("iBizIcon"),{class:r.e("icon"),icon:e.image},null):[t?e.label.slice(0,1):e.label,t?null:a("ion-icon",{name:"chevron-forward-outline"},null)]:[a(d("iBizIcon"),{class:r.e("icon"),icon:e.image},null),e.label]})}const wr=S({name:"IBizAppMenuControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},collapse:Boolean,currentPath:String},setup(){const t=ne((...g)=>new Xa(...g)),e=B(`control-${t.model.controlType.toLowerCase()}`),n=I(Fs(t.model.appMenuItems)),r=I(""),o=I([]),i=Me();let s=null;const l=I({}),c=I(Oe()),u=()=>{const g=t.getAllItems(),b=ibiz.hub.getApp(t.context.srfappid);return g.find(h=>{var f,w;if(h.itemType==="MENUITEM"&&h.appFuncId){const P=b.getAppFunc(h.appFuncId);return((w=(f=P?.appViewId)==null?void 0:f.split("."))==null?void 0:w[1])===i.params.view2}return!1})},p=async(g,b)=>{const h=u();h?.id!==g&&await t.onClickMenuItem(g,b)};G(()=>i.params.view2,(g,b)=>{if(g!==b&&ibiz.config.appMenu.enableEcho){const h=u();r.value=h?h.id:""}}),Pe(async()=>{const g=t.getAllItems(),b=g.find(w=>w.openDefault&&!w.hidden);if(b&&!i.params.view2&&!i.fullPath.includes("404"))r.value=b.id,p(r.value);else if(ibiz.config.appMenu.enableEcho){const w=u();r.value=w?w.id:""}const h=g.filter(w=>w.expanded&&!w.hidden);h.length>0&&h.forEach(w=>{o.value.push(w.id)});const f=t.model.appCounterRefId;f&&(s=t.getCounter(f),s&&s.onChange(w=>{l.value=w}))}),Re(()=>{s?.destroy()});const m=F(()=>{switch(t.view.model.mainMenuAlign){case"TOP":return"horizontal";default:return"vertical"}});t.view.model.mainMenuAlign&&t.view.model.mainMenuAlign!=="LEFT"&&t.view.model.mainMenuAlign!=="TOP"&&ibiz.message.warning(`\u6682\u672A\u652F\u6301\u83DC\u5355\u65B9\u5411\u4E3A${t.view.model.mainMenuAlign}\uFF01`);const v=F(()=>t.view.model.mainMenuAlign==="LEFT"||t.view.model.mainMenuAlign===void 0);return{menus:n,c:t,key:c,onClick:p,ns:e,defaultActive:r,defaultOpens:o,menuMode:m,counterData:l,isShowCollapse:v}},render(){let t;return a(d("iBizControlBase"),{class:[this.ns.b(),this.ns.m(this.menuMode),this.ns.is("collapse",this.collapse),this.ns.is("show-collapse",this.isShowCollapse)],controller:this.c},{default:()=>[this.c.state.isCreated&&a(d("el-menu"),{key:this.key,ref:"menu","default-active":this.defaultActive,"default-openeds":this.defaultOpens,collapse:this.collapse,"collapse-transition":!1,onSelect:this.onClick,theme:"light",mode:this.menuMode,ellipsis:!1},gp(t=this.menus.map(e=>{var n;return((n=e.children)==null?void 0:n.length)>0?Os(!0,e,this.collapse,this.ns,this.c,this.counterData):xs(!0,e,this.collapse,this.ns,this.c,this.counterData)}))?t:{default:()=>[t]}),this.isShowCollapse&&a("div",{class:[this.ns.b("collapse-icon"),this.ns.is("collapse",this.collapse)],onClick:()=>{this.c.view.call(De.TOGGLE_COLLAPSE)}},[a("ion-icon",{name:"menu-collapse"},null)])]})}});var Cp=Object.defineProperty,wp=(t,e,n)=>e in t?Cp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yp=(t,e,n)=>(wp(t,typeof e!="symbol"?e+"":e,n),n);class Pp{constructor(){yp(this,"component","IBizAppMenuControl")}}const Ep=N("l",U(wr,function(t){t.component(wr.name,wr),oe(ee.APP_MENU,()=>new Pp)}));var Ip=Object.defineProperty,Dp=(t,e,n)=>e in t?Ip(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_p=(t,e,n)=>(Dp(t,typeof e!="symbol"?e+"":e,n),n);class Bp{constructor(){_p(this,"component","IBizAppMenuIconViewControl")}}function Ts(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const yr=S({name:"IBizAppMenuIconViewControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},collapse:Boolean,currentPath:String},setup(){var t;const e=ne((...c)=>new mn(...c)),n=B(`control-${e.model.controlType.toLowerCase()}-iconview`),r=I(""),o=I([]);(t=e.model.appMenuItems)==null||t.forEach(c=>{c.itemType==="MENUITEM"&&o.value.push(c.id)});const i=async(c,u)=>{await e.onClickMenuItem(c,u)},s=c=>{if(!e.state.menuItemsState[c.id].visible)return null;let p=c.caption;return c.capLanguageRes&&(p=ibiz.i18n.t(c.capLanguageRes.lanResTag,c.caption)),a("div",{class:[n.b("item"),n.is("disabled",!c.appFuncId)],title:c.tooltip||c.caption,onClick:m=>{c.appFuncId&&i(c.id,m)}},[a(d("iBizIcon"),{class:n.be("item","icon"),icon:c.sysImage},null),a("span",{class:n.be("item","label")},[p])])};return{c:e,ns:n,defaultActive:r,defaultOpens:o,onClick:i,renderGroup:c=>e.state.menuItemsState[c.id].visible?a(d("el-collapse-item"),{class:n.b("group"),name:c.id,title:c.caption},{default:()=>{var p;return[(p=c.appMenuItems)==null?void 0:p.map(m=>s(m))]}}):null,renderItem:s}},render(){var t;const{state:e,model:n}=this.c;let r=null;if(e.isCreated&&((t=n.appMenuItems)!=null&&t.length)){let o;r=a(d("el-collapse"),{class:this.ns.e("content"),modelValue:this.defaultOpens,"onUpdate:modelValue":i=>this.defaultOpens=i},Ts(o=n.appMenuItems.map(i=>i.itemType!=="MENUITEM"?null:this.renderGroup(i)))?o:{default:()=>[o]})}return a(d("iBizControlBase"),{class:[this.ns.b()],controller:this.c},Ts(r)?r:{default:()=>[r]})}}),Sp=N("m",U(yr,function(t){t.component(yr.name,yr),oe(`${ee.APP_MENU}_ICONVIEW`,()=>new Bp)})),Pr=S({name:"IBizGridFieldColumn",props:{controller:{type:fn,required:!0},row:{type:Je,required:!0}},setup(t){const e=B("grid-field-column"),n=p=>{t.controller.hasAction&&(p.stopPropagation(),t.controller.triggerAction(t.row,p))},r=p=>{t.controller.isLinkColumn&&(p.stopPropagation(),t.controller.openLinkView(t.row,p))},o=F(()=>t.controller.getCustomHtml(t.row)),i=F(()=>t.row.data[t.controller.model.codeName.toLowerCase()]),s=F(()=>t.controller.formatValue(i.value)),l=I(""),c=p=>{l.value=p},u=F(()=>{if(t.controller.grid.overflowMode==="ellipsis"&&xi(i.value)&&i.value!=="")return t.controller.codeList?l.value:s.value+(t.controller.model.unitName||"")});return{ns:e,onCellClick:n,onTextClick:r,onInfoTextChange:c,CustomHtml:o,fieldValue:i,formatValue:s,tooltip:u}},render(){var t;const e=this.controller;let n=null;return e.isCustomCode?n=a("span",{class:this.ns.e("script"),innerHTML:this.CustomHtml},null):e.codeList?n=a(d("iBizCodeList"),{class:this.ns.e("text"),codeListItems:e.codeListItems,codeList:e.codeList,value:this.fieldValue,onClick:this.onTextClick,onInfoTextChange:this.onInfoTextChange,title:this.tooltip},null):n=a("span",{class:this.ns.e("text"),title:this.tooltip,onClick:this.onTextClick},[this.formatValue,this.fieldValue!=null&&e.model.unitName]),a("div",{class:[this.ns.b(),e.clickable(this.row)&&this.ns.m("clickable"),this.ns.m(this.controller.grid.overflowMode),(t=this.controller.model.cellSysCss)==null?void 0:t.cssName],onClick:this.onCellClick},[n])}});var Ap=Object.defineProperty,Fp=(t,e,n)=>e in t?Ap(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xp=(t,e,n)=>(Fp(t,typeof e!="symbol"?e+"":e,n),n);class Ns{constructor(){xp(this,"component","IBizGridFieldColumn")}async createController(e,n){const r=new fn(e,n);return await r.init(),r}}const Op=N("q",U(Pr,function(t){t.component(Pr.name,Pr),Qe("DEFGRIDCOLUMN",()=>new Ns),Qe("DEFTREEGRIDCOLUMN",()=>new Ns)})),Er=S({name:"IBizGridUAColumn",props:{controller:{type:bn,required:!0},row:{type:Je,required:!0}},setup(t){return{ns:B("grid-ua-column"),onStopPropagation:o=>{o.stopPropagation()},onActionClick:async(o,i)=>{await t.controller.onActionClick(o,t.row,i)}}},render(){var t,e,n;return a("div",{class:[this.ns.b(),(t=this.controller.model.cellSysCss)==null?void 0:t.cssName],onDblclick:this.onStopPropagation,onClick:this.onStopPropagation},[((n=(e=this.controller.model.deuiactionGroup)==null?void 0:e.uiactionGroupDetails)==null?void 0:n.length)&&a(d("iBizActionToolbar"),{"action-details":this.controller.model.deuiactionGroup.uiactionGroupDetails,"actions-state":this.row.uaColStates[this.controller.model.codeName],onActionClick:this.onActionClick},null)])}});var Tp=Object.defineProperty,Np=(t,e,n)=>e in t?Tp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zp=(t,e,n)=>(Np(t,typeof e!="symbol"?e+"":e,n),n);class Rp{constructor(){zp(this,"component","IBizGridUAColumn")}async createController(e,n){const r=new bn(e,n);return await r.init(),r}}const $p=N("r",U(Er,function(t){t.component(Er.name,Er),Qe("UAGRIDCOLUMN",()=>new Rp)}));function Lp(t,e){const n=t.controller,r=F(()=>t.row.editColStates[n.fieldName].disabled),o=F(()=>t.row.editColStates[n.fieldName].readonly),i=F(()=>!!t.row.errors[n.fieldName]),s=F(()=>t.row.editColStates[n.fieldName].editable),l=D=>{t.row.editColStates[n.fieldName].editable=D},c=F(()=>!r.value&&!o.value&&!i.value),u=F(()=>i.value||c.value&&s.value),p=F(()=>!u.value),m=!1,v=!0,g=F(()=>c.value&&!s.value),b=F(()=>c.value);let h;const f=()=>{l(!0),h=na(e,async D=>{l(!1),h.stop()})},w=()=>{h&&h.stop(),ibiz.log.debug(`${n.fieldName}\u5C5E\u6027\u7F16\u8F91\u5668focus\u4E8B\u4EF6`)},P=()=>{ibiz.log.debug(`${n.fieldName}\u5C5E\u6027\u7F16\u8F91\u5668blur\u4E8B\u4EF6`),l(!1),ibiz.config.grid.editSaveMode==="cell-blur"&&n.grid.save(t.row.data)},_=me({showEditMask:g,stopPropagation:b,onMaskClick:f}),y=me({autoFocus:v,disabled:m,readonly:p,onBlur:P,onFocus:w});return{gridEditItemProps:_,editorProps:y}}function Mp(t,e){const n=t.controller,r=F(()=>t.row.editColStates[n.fieldName].disabled),o=F(()=>t.row.editColStates[n.fieldName].readonly),i=F(()=>t.row.editColStates[n.fieldName].editable),s=F(()=>o.value||!i.value),l=F(()=>i.value&&r.value),c=F(()=>i.value),u=me({stopPropagation:c}),p=me({disabled:l,readonly:s});return{gridEditItemProps:u,editorProps:p}}function Vp(t,e){const n=t.controller,r=F(()=>t.row.editColStates[n.fieldName].disabled),o=F(()=>t.row.editColStates[n.fieldName].readonly),i=F(()=>t.controller.grid.state.rowEditOpen),s=F(()=>o.value||!i.value),l=F(()=>i.value&&r.value),c=F(()=>i.value),u=()=>{n.grid.save(t.row.data)},p=me({stopPropagation:c}),m=me({disabled:l,readonly:s,onBlur:u});return{gridEditItemProps:p,editorProps:m}}const Ir=S({name:"GridFieldEditColumn",props:{controller:{type:vn,required:!0},row:{type:Je,required:!0}},setup(t){const e=B("grid-field-edit-column"),n=I(),r=t.controller,o=r.editItem.codeName,i=async(v,g)=>{ibiz.log.debug(`${o}\u503C\u53D8\u66F4`,v),await r.setRowValue(t.row,v,g)},s=()=>{switch(ibiz.config.grid.editShowMode){case"cell":return Lp(t,n);case"row":return Mp(t);case"all":return Vp(t);default:throw new pe(`${ibiz.config.grid.editShowMode}\u6682\u672A\u652F\u6301`)}},{gridEditItemProps:l,editorProps:c}=s(),u=I(void 0),p=v=>{u.value=v},m=F(()=>{if(c.readonly){if(Te(u.value)){const v=t.row.data[o];return r.formatValue(v)}return u.value}});return{ns:e,c:r,fieldName:o,componentRef:n,tooltip:m,rowDataChange:i,onInfoTextChange:p,gridEditItemProps:l,editorProps:c}},render(){var t;const e=this.row.data[this.fieldName];return a(d("iBizGridEditItem"),{ref:"componentRef",required:!this.c.editItem.allowEmpty,error:this.row.errors[this.fieldName],overflowMode:this.controller.grid.overflowMode,class:[this.ns,this.ns.m(this.c.grid.overflowMode),(t=this.controller.model.cellSysCss)==null?void 0:t.cssName],...this.gridEditItemProps},{default:()=>[this.c.editorProvider&&re(d(this.c.editorProvider.gridEditor),{class:this.ns.e("editor"),value:this.editorProps.readonly?this.c.formatValue(e):e,data:this.row.data,controller:this.c.editor,overflowMode:this.c.grid.overflowMode,onChange:this.rowDataChange,onInfoTextChange:this.onInfoTextChange,title:this.tooltip,...this.editorProps})]})}});var jp=Object.defineProperty,kp=(t,e,n)=>e in t?jp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Up=(t,e,n)=>(kp(t,typeof e!="symbol"?e+"":e,n),n);class Gp{constructor(){Up(this,"component","GridFieldEditColumn")}async createController(e,n){const r=new vn(e,n);return await r.init(),r}}const zs=S({name:"IBizGridEditItem",props:{required:{type:Boolean,default:!1},showEditMask:{type:Boolean,default:!1},stopPropagation:{type:Boolean,default:!1},error:{type:String}},emits:{maskClick:t=>!0},setup(t,{emit:e}){const n=B("grid-edit-item"),r=l=>{t.stopPropagation&&l.stopPropagation()},o=l=>{t.stopPropagation&&l.stopPropagation(),t.showEditMask&&e("maskClick",l)},i=F(()=>t.error),s=F(()=>t.error);return{ns:n,tooltipContent:s,showTooltip:i,onClick:o,onStopPropagation:r}},render(){return a("div",{class:[this.ns.b(),this.ns.is("error",!!this.error),this.showEditMask&&this.ns.m("show-mask")],onDblclick:this.onStopPropagation,onClick:this.onClick},[a(d("el-tooltip"),{content:this.tooltipContent,disabled:!this.showTooltip,transfer:!0,"transfer-class-name":this.ns.e("tooltip-popper"),placement:"top"},{default:()=>{var t,e;return[a("div",{class:this.ns.e("tooltip")},[(e=(t=this.$slots).default)==null?void 0:e.call(t)])]}})])}}),qp=N("s",U(Ir,function(t){t.component(Ir.name,Ir),t.component(zs.name,zs),Qe("DEFGRIDCOLUMN_EDIT",()=>new Gp)})),Wp=S({name:"IBizGridGroupColumn",props:{controller:{type:gn,required:!0},row:{type:Je,required:!0}},setup(){return{ns:B("grid-group-column")}},render(){return a("div",{class:[this.ns.b()]},null)}});var Hp=Object.defineProperty,Kp=(t,e,n)=>e in t?Hp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xp=(t,e,n)=>(Kp(t,typeof e!="symbol"?e+"":e,n),n);class Yp{constructor(){Xp(this,"component","")}async createController(e,n){const r=new gn(e,n);return await r.init(),r}}const Jp=N("t",U(Wp,()=>{Qe("GROUPGRIDCOLUMN",()=>new Yp)})),Rs=S({name:"IBizRowEditPopover",props:{show:{type:Boolean,default:!1}},emits:{confirm:()=>!0,cancel:()=>!0},setup(t,{emit:e}){const n=B("row-edit-popover"),r=()=>{e("cancel")},o=()=>{e("confirm")},i=I(document);return ra(i,"keydown",s=>{t.show&&s.key==="Escape"&&r()},{capture:!0}),{ns:n,onCancel:r,onConfirm:o}},render(){return a("div",{class:[this.ns.b(),this.ns.is("hidden",!this.show)]},[a(d("el-button"),{onClick:this.onConfirm},{default:()=>[R("\u786E\u5B9A")]}),a(d("el-button"),{onClick:this.onCancel},{default:()=>[R("\u53D6\u6D88")]})])}});function Dr(t){const e=I();let n=!1;async function r(u,p,m){if(ibiz.config.grid.editShowMode==="row"&&t.model.enableRowEdit){const v=t.findRowState(u);v&&v.showRowEdit!==!0&&await t.switchRowEdit(v,!0)}else t.onRowClick(u)}function o(u){t.onDbRowClick(u)}function i(u){n||t.setSelection(u)}G([()=>e.value,()=>t.state.isLoaded,()=>t.state.selectedData],([u,p,m])=>{!p||!u||(t.state.singleSelect?m[0]?e.value.setCurrentRow(m[0],!0):e.value.setCurrentRow():(n=!0,e.value.clearSelection(),m.forEach(v=>e.value.toggleRowSelection(v,!0)),n=!1))});function s(u){const{prop:p,order:m}=u,v=t.fieldColumns[p].model.appDEFieldId;let g;m==="ascending"?g="asc":m==="descending"&&(g="desc"),t.setSort(v,g),t.load()}function l({row:u}){let p="";t.state.selectedData.length>0&&t.state.selectedData.forEach(v=>{v===u&&(p="current-row")});const m=t.findRowState(u);return m?.showRowEdit&&(p+=" editing-row"),u.srfkey&&(p+=` id-${u.srfkey}`),p}function c({_row:u,column:p,_rowIndex:m,_columnIndex:v}){var g;const b=(g=t.model.degridColumns)==null?void 0:g.find(h=>h.codeName===p.property);return b&&b.headerSysCss&&b.headerSysCss.cssName?b.headerSysCss.cssName:""}return{tableRef:e,onRowClick:r,onDbRowClick:o,onSelectionChange:i,onSortChange:s,handleRowClassName:l,handleHeaderCellClassName:c}}function $s(t){function e(o){!o||o===t.state.curPage||(t.state.curPage=o,t.load())}function n(o){!o||o===t.state.size||(t.state.size=o,t.state.curPage===1&&t.load())}function r(){t.load()}return{onPageChange:e,onPageSizeChange:n,onPageRefresh:r}}function _r(t,e){const n=()=>{e.data&&(t.state.items=e.data,t.state.rows=e.data.map(l=>new Je(new Rt(l),t)))},r=F(()=>{var l;const c=Object.values(t.fieldColumns).find(u=>u.model.appDEFieldId===t.model.minorSortAppDEFieldId);return{prop:c?.model.codeName,order:((l=t.model.minorSortDir)==null?void 0:l.toLowerCase())==="desc"?"descending":"ascending"}});t.evt.on("onCreated",async()=>{e.isSimple&&(n(),t.state.isLoaded=!0)}),G(()=>e.data,()=>{e.isSimple&&n()},{deep:!0});const o=F(()=>{const l=t.state;if(t.model.enableGroup){const c=[];return l.groups.forEach(u=>{if(!u.children.length)return;const p=[...u.children],m=p.shift();c.push({srfkey:m?.srfkey||u.caption,isGroupData:!0,caption:u.caption,first:m,children:p})}),c}return l.rows.map(c=>c.data)}),i=F(()=>{if(t.isMultistageHeader)return t.model.degridColumns||[];const l=[];return t.state.columnStates.forEach(c=>{var u,p;if(c.hidden)return;const m=((u=t.fieldColumns[c.key])==null?void 0:u.model)||((p=t.uaColumns[c.key])==null?void 0:p.model);m&&l.push(m)}),l});return{tableData:o,renderColumns:i,defaultSort:r,summaryMethod:({columns:l})=>l.map((c,u)=>u===0?t.aggTitle:t.state.aggResult[c.property])}}function Ls(t,e){let n;const r=I(!1),o=I(),i=me({}),s=m=>{if(!t.value)throw new pe("\u627E\u4E0D\u5230\u8868\u683C\u7EC4\u4EF6\u5F15\u7528");const v=t.value.$el;let g=".el-table__row";m.data.srfkey&&(g+=`.id-${m.data.srfkey}`);const b=v.querySelector(g);if(!b)throw new pe("\u627E\u4E0D\u5230\u5BF9\u5E94\u7684\u8868\u683C\u884Cdom\u5143\u7D20");return b},l=async m=>{const v=s(m);if(!n)throw new pe("\u62FF\u4E0D\u5230pop\u7EC4\u4EF6\u7684\u5B9E\u4F8B");const g=n.$el,{x:b,y:h}=await Wn(v,g,{placement:"bottom"});Object.assign(i,{top:`${h}px`,left:`${b}px`}),o.value=m,r.value=!0},c=async()=>{o.value&&e.switchRowEdit(o.value,!1,!0)},u=async()=>{o.value&&e.switchRowEdit(o.value,!1,!1)},p=()=>{const m=r.value&&e.state.rows[e.state.rows.length-1].showRowEdit;return[a("div",{class:"row-edit-popover__placeholder",style:{display:m?"block":"none"}},null),a(d("iBizRowEditPopover"),{ref:v=>{n=v},style:i,show:r.value,onConfirm:c,onCancel:u},null)]};return e.evt.on("onRowEditChange",m=>{m.row.showRowEdit?setTimeout(()=>{l(m.row)},0):(o.value=void 0,r.value=!1,Object.assign(i,{top:void 0,left:void 0}))}),{renderPopover:p}}var Qp=Object.defineProperty,Zp=(t,e,n)=>e in t?Qp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Br=(t,e,n)=>(Zp(t,typeof e!="symbol"?e+"":e,n),n);class eh{constructor(){Br(this,"count",0),Br(this,"countRedirect",0),Br(this,"loading")}show(){this.count===0&&(this.loading=Mi.service({lock:!0,fullscreen:!0})),this.count+=1}hide(){this.count>0&&(this.count-=1),this.count===0&&this.loading&&this.loading.close()}showRedirect(){}hideRedirect(){}}N("aS",eh);class th{info(e,n,r){yt.info({message:e,duration:n&&n*1e3,showClose:r})}success(e,n,r){yt.success({message:e,duration:n&&n*1e3,showClose:r})}warning(e,n,r){yt.warning({message:e,duration:n&&n*1e3,showClose:r})}error(e,n,r){yt.error({message:e,duration:n&&n*1e3,showClose:r})}}N("aT",th);class nh{async info(e){await Be.alert(e.desc,e.title,{type:"info"})}async success(e){await Be.alert(e.desc,e.title,{type:"success"})}async warning(e){await Be.alert(e.desc,e.title,{type:"warning"})}async error(e){await Be.alert(e.desc,e.title,{type:"error"})}async confirm(e){return new Promise(n=>{Be.confirm(e.desc,e.title,e).then(()=>n(!0)).catch(()=>n(!1))})}}N("aU",nh);var rh=Object.defineProperty,oh=(t,e,n)=>e in t?rh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ah=(t,e,n)=>(oh(t,typeof e!="symbol"?e+"":e,n),n);class ih{constructor(){ah(this,"ns",new Oi("confirm"))}async info(e){return new Promise(n=>{Be.confirm(e.desc,e.title,{customClass:`${this.ns.b()} ${this.ns.e("info")}`,type:"info",cancelButtonClass:`${this.ns.b("cancel")} el-button--info`,confirmButtonClass:`${this.ns.b("ok")}`,...e.options}).then(()=>n(!0)).catch(()=>n(!1))})}async success(e){return new Promise(n=>{Be.confirm(e.desc,e.title,{customClass:`${this.ns.b()} ${this.ns.e("success")}`,cancelButtonClass:`${this.ns.b("cancel")} el-button--info`,confirmButtonClass:`${this.ns.b("ok")}`,type:"success",...e.options}).then(()=>n(!0)).catch(()=>n(!1))})}async warning(e){return new Promise(n=>{Be.confirm(e.desc,e.title,{customClass:`${this.ns.b()} ${this.ns.e("warning")}`,cancelButtonClass:`${this.ns.b("cancel")} el-button--info`,confirmButtonClass:`${this.ns.b("ok")}`,type:"warning",...e.options}).then(()=>n(!0)).catch(()=>n(!1))})}async error(e){return new Promise(n=>{Be.confirm(e.desc,e.title,{customClass:`${this.ns.b()} ${this.ns.e("error")}`,cancelButtonClass:`${this.ns.b("cancel")} el-button--info`,confirmButtonClass:`${this.ns.b("ok")}`,type:"error",...e.options}).then(()=>n(!0)).catch(()=>n(!1))})}}N("aV",ih);var sh=Object.defineProperty,lh=(t,e,n)=>e in t?sh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ms=(t,e,n)=>(lh(t,typeof e!="symbol"?e+"":e,n),n);class ch{constructor(){Ms(this,"callStack",[]),Ms(this,"intervalId",null)}executeNext(){const e=this.callStack.shift();e?e():(clearInterval(this.intervalId),this.intervalId=null)}handleNotice(e,n){const r=e.duration?e.duration*1e3:4500;Vi({title:e.title,message:e.desc,type:n,duration:r})}setTimer(){this.intervalId||(this.intervalId=setInterval(()=>{this.executeNext()},50))}info(e){this.callStack.push(()=>this.handleNotice(e,"info")),this.setTimer()}success(e){this.callStack.push(()=>this.handleNotice(e,"success")),this.setTimer()}warning(e){this.callStack.push(()=>this.handleNotice(e,"warning")),this.setTimer()}error(e){this.callStack.push(()=>this.handleNotice(e,"error")),this.setTimer()}}N("aW",ch);class uh{constructor(e){this.router=e}push(e){return ut.open(this.router,e)}async root(e,n,r){const o=await ibiz.hub.config.view.get(e),{path:i}=await oa(o,this.router.currentRoute.value,n,r);return ut.open(this.router,i)}async modal(e,n,r){const o=await ibiz.hub.config.view.get(e),i={width:o.width||"80%",height:o.height||"80%",footerHide:!0};return aa({context:n,params:r,viewId:o.id},i)}async popover(e,n,r,o){const i=await ibiz.hub.config.view.get(e);return ia(n,{context:r,params:o,viewId:i.id},{autoClose:!0,placement:"bottom"})}async drawer(e,n,r){const o=await ibiz.hub.config.view.get(e),i=sa(o.openMode),s={width:o.width,height:o.height,placement:i};return la({context:n,params:r,viewId:o.id},s)}async custom(e,n,r){const o=await ibiz.hub.config.view.get(e);throw ibiz.log.warn("openUserCustom",o,n,r),new Error}}N("aX",uh);async function dh(t,e,n,r){const o=[Ui(r.offsetOpts||6),Gi(),qi()];r.noArrow||o.push(Wi({element:n}));const i=await Wn(t,e,{placement:r.placement,strategy:"absolute",middleware:o});{const{x:s,y:l,placement:c,middlewareData:u}=i,{style:p}=e;if(p.left=`${s}px`,p.top=`${l}px`,!r.noArrow){const{x:m,y:v}=u.arrow,g={top:"bottom",right:"left",bottom:"top",left:"right"}[c.split("-")[0]];Object.assign(n.style,{left:m!=null?`${m}px`:"",top:v!=null?`${v}px`:"",right:"",bottom:"",[g]:"-4px"})}}}const ph=S({props:{opts:{type:Object,default:()=>({})}},setup(t,e){const n=B("popover"),r=I(!1),o=I(!1),i=I(),s=I(),l=F(()=>t.opts.autoClose===!0&&o.value===!1),{zIndex:c}=Xe(),u=c.increment();function p(y){y.stopPropagation(),o.value=!0}function m(y){y.stopPropagation(),o.value=!1}const v=new Ge({mode:qe.POPOVER,viewUsage:2,dismiss:y=>{c.decrement(),e.emit("dismiss",y)}});let g=!1;async function b(y){g=!0,await v.dismiss(y),setTimeout(()=>{g=!1},300)}function h(y){y.stopPropagation(),l.value&&!g&&b()}function f(){window.addEventListener("mousedown",h,{capture:!0}),window.addEventListener("blur",h,{capture:!0}),window.addEventListener("resize",h,{capture:!0})}function w(){window.removeEventListener("mousedown",h,{capture:!0}),window.removeEventListener("blur",h,{capture:!0}),window.removeEventListener("resize",h,{capture:!0})}f();let P=()=>{};Re(()=>{w(),P()});async function _(y){r.value=!0;const D=()=>dh(y,i.value,s.value,t.opts);P=ki(y,i.value,D)}return{ns:n,el:i,arrEl:s,isShow:r,isHover:o,modal:v,popoverZIndex:u,present:_,dismiss:b,onMouseenter:p,onMouseleave:m}},render(){var t,e;return a("div",{class:[this.ns.b(),this.ns.is("show",this.isShow),this.ns.is("hover",this.isHover)],ref:"el",style:{zIndex:this.popoverZIndex},onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},[!this.opts.noArrow&&a("div",{class:[this.ns.e("arrow")],ref:"arrEl"},null),(e=(t=this.$slots).default)==null?void 0:e.call(t,this.modal)])}});function hh(t,e){return new ca(ph,t,e)}const mh=S({props:{opts:{type:Object,default:()=>({})}},setup(t,e){const n=B("modal"),r=I(!1);let o;const{zIndex:i}=Xe(),s=i.increment(),l=me({}),{width:c,height:u}=t.opts;c&&(l.width=Ct(c)?`${c}px`:c),u&&(l.height=Ct(u)?`${u}px`:u);const p=I({footerHide:!0,modalClass:""});t.opts&&Object.assign(p.value,t.opts);const m=new Ge({mode:qe.MODAL,viewUsage:2,dismiss:f=>{i.decrement(),r.value=!1,o=f}});return{ns:n,isShow:r,options:p,modalZIndex:s,customStyle:l,modal:m,present:()=>{r.value=!0},dismiss:f=>{m.dismiss(f)},onClosed:()=>{e.emit("dismiss",o)},onBeforeClose:async f=>{await m.dismiss()&&f()}}},render(){return a(d("el-dialog"),{"model-value":this.isShow,"align-center":!0,class:[this.ns.b(),this.options.placement&&this.ns.m(this.options.placement),this.options.modalClass],style:this.customStyle,"z-index":this.modalZIndex,onClosed:this.onClosed,"before-close":this.onBeforeClose},{default:()=>{var t,e;return[(e=(t=this.$slots).default)==null?void 0:e.call(t,this.modal)]}})}});function fh(t,e){return new Ot(mh,t,e)}const bh=S({props:{opts:{type:Object,default:()=>({})}},setup(t,e){const n=B("drawer"),r=I(!1);let o;const{zIndex:i}=Xe(),s=i.increment(),l=I("100%"),{width:c,height:u,placement:p}=t.opts;(p==="top"||p==="bottom")&&(Ct(u)?l.value=u:l.value="100%"),(p==="left"||p==="right")&&(Ct(c)?l.value=c:l.value=800);const m=new Ge({mode:qe.DRAWER,viewUsage:2,dismiss:w=>{i.decrement(),r.value=!1,o=w}}),v=async w=>{await m.dismiss()&&w()},g=w=>{m.dismiss(w)},b=()=>{r.value=!0},h=()=>{e.emit("dismiss",o)};let f="";switch(t.opts.placement){case"left":f="ltr";break;case"top":f="ttb";break;case"bottom":f="btt";break;default:f="rtl"}return{ns:n,isShow:r,size:l,direction:f,drawerZIndex:s,modal:m,dismiss:g,present:b,onClosed:h,onBeforeClose:v}},render(){return a(d("el-drawer"),{"model-value":this.isShow,"lock-scroll":!0,size:this.size,class:this.ns.b(),"z-index":this.drawerZIndex,direction:this.direction,"before-close":this.onBeforeClose,onClosed:this.onClosed},{default:()=>{var t,e;return[(e=(t=this.$slots).default)==null?void 0:e.call(t,this.modal)]}})}});function vh(t,e){return new Ot(bh,t,e)}const gh=S({props:{opts:{type:Object,default:()=>({})}},setup(t,e){const n=B("float-window"),r=I(),o=I(!1);let i;const{zIndex:s}=Xe(),l=s.increment(),c=I({width:500,height:600,x:100,y:100});t.opts&&Object.assign(c.value,t.opts);const u=me({x:window.innerWidth-600,y:100,width:500,height:600,minWidth:300,minHeight:300}),p=()=>({left:`${u.x}px`,top:`${u.y}px`,height:`${u.height}px`,width:`${u.width}px`,zIndex:l}),m=()=>{Object.assign(r.value,p())};Pe(()=>{const f=r.value.getElementsByClassName(n.b("drag-handle")),w=f[0]?f[0]:r.value;rt(w).draggable({modifiers:[rt.modifiers.restrictRect({restriction:document.body,endOnly:!0})],cursorChecker:()=>"move",listeners:{move:P=>{u.x+=P.dx,u.y+=P.dy,m()}}}),rt(r.value).resizable({edges:{top:!0,right:!0,bottom:!0,left:!0},margin:6,modifiers:[rt.modifiers.restrictEdges({outer:document.body}),rt.modifiers.restrictSize({min:{width:u.minWidth,height:u.minHeight}})],inertia:!0,listeners:{move:P=>{u.x+=P.deltaRect.left,u.y+=P.deltaRect.top,u.width=P.rect.width,u.height=P.rect.height,m()}}})});const v=new Ge({mode:qe.MODAL,viewUsage:2,dismiss:f=>{s.decrement(),o.value=!1,i=f}});return{ns:n,isShow:o,options:c,modalZIndex:l,modal:v,calcStyle:p,present:()=>{o.value=!0},dismiss:f=>{v.dismiss(f)},onClosed:()=>{e.emit("dismiss",i)},containerRef:r}},render(){var t,e;return a("div",{class:[this.ns.b(),this.ns.is("show",this.isShow),this.options.windowClass],style:this.calcStyle(),"z-index":this.modalZIndex,ref:"containerRef"},[a("div",{class:this.ns.b("header")},[a("div",{class:this.ns.be("header","caption")},null),a("div",{class:this.ns.b("actions")},[a("i",{class:this.ns.b("action-item"),onClick:()=>{this.dismiss()}},null)])]),a("div",{class:this.ns.b("content")},[(e=(t=this.$slots).default)==null?void 0:e.call(t,this.modal),R("+")])])}});function Ch(t,e){return new Ot(gh,t,e)}function Ut(t){return Ri(t)?d(t):t}class wh{popover(e,n,r,o){const i=this.createPopover(n,r,o);return i.present(e),i.onWillDismiss()}createPopover(e,n,r){return hh(wt(e)?e:()=>re(Ut(e),{...n}),r)}drawer(e,n,r){const o=this.createDrawer(e,n,r);return o.present(),o.onWillDismiss()}createDrawer(e,n,r){return vh(wt(e)?e:()=>re(Ut(e),{...n}),r)}async modal(e,n,r){const o=this.createModal(e,n,r);return o.present(),o.onWillDismiss()}createModal(e,n,r){return fh(wt(e)?e:()=>re(Ut(e),{...n}),r)}async floatWindow(e,n,r){const o=this.createFloatWindow(e,n,r);return o.present(),o.onWillDismiss()}createFloatWindow(e,n,r){return Ch(wt(e)?e:()=>re(Ut(e),{...n}),r)}}N("aY",wh);function Gt(t){function e(o){!o||o===t.state.curPage||(t.state.curPage=o,t.load())}function n(o){!o||o===t.state.size||(t.state.size=o,t.state.curPage===1&&t.load())}function r(){t.load()}return{onPageChange:e,onPageSizeChange:n,onPageRefresh:r}}function yh(t,e,n,r){var o;if(e.hideDefault)return null;const{codeName:i,width:s}=e,l=t.columns[i],c=t.state.columnStates.find(m=>m.key===i),p=l.isAdaptiveColumn||!t.hasAdaptiveColumn&&r===n.length-1?"min-width":"width";return a(d("el-table-column"),zt({label:e.caption,prop:i},{[p]:s},{fixed:c.fixed,sortable:e.enableSort?"custom":!1,align:((o=e.align)==null?void 0:o.toLowerCase())||"center"}),{default:({row:m})=>{let v=m;m.isGroupData&&(v=m.first);const g=t.findRowState(v);if(g){const b=d(t.providers[i].component);return re(b,{controller:l,row:g,key:v.tempsrfkey+i})}return null}})}function Sr(t,e,n,r){var o,i;if(e.columnType==="GROUPGRIDCOLUMN"){const s=((o=e.degridColumns)==null?void 0:o.filter(u=>!u.hideDefault))||[],{width:l}=e,c=((i=e.align)==null?void 0:i.toLowerCase())||"center";return a(d("el-table-column"),{prop:e.codeName,label:e.caption,"min-width":l,align:c},{default:()=>s.map((u,p)=>Sr(t,u,n,p))})}return yh(t,e,n,r)}const Ar=S({name:"IBizGridControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},rowEditOpen:{type:Boolean,default:void 0},isSimple:{type:Boolean,required:!1},data:{type:Array,required:!1},loadDefault:{type:Boolean,default:!0}},setup(t){const e=ne((..._)=>new Ya(..._)),n=B(`control-${e.model.controlType.toLowerCase()}`),{tableRef:r,onRowClick:o,onDbRowClick:i,onSelectionChange:s,onSortChange:l,handleRowClassName:c,handleHeaderCellClassName:u}=Dr(e),{onPageChange:p,onPageRefresh:m,onPageSizeChange:v}=Gt(e),g=()=>{const{isLoaded:_}=e.state;return _&&a(d("iBizNoData"),{text:e.model.emptyText,emptyTextLanguageRes:e.model.emptyTextLanguageRes},null)},{tableData:b,renderColumns:h,defaultSort:f,summaryMethod:w}=_r(e,t),{renderPopover:P}=Ls(r,e);return{c:e,ns:n,tableRef:r,tableData:b,renderColumns:h,onDbRowClick:i,onRowClick:o,onSelectionChange:s,onSortChange:l,onPageChange:p,onPageSizeChange:v,onPageRefresh:m,handleRowClassName:c,handleHeaderCellClassName:u,renderNoData:g,summaryMethod:w,renderPopover:P,defaultSort:f}},render(){if(!this.c.state.isCreated)return;const t=this.c.state,{hideHeader:e,enablePagingBar:n}=this.c.model;return a(d("iBizControlBase"),{class:[this.ns.is("show-header",!e),this.ns.is("enable-page",n),this.ns.is("enable-group",this.c.model.enableGroup)],controller:this.c},{default:()=>[a(d("el-table"),{ref:"tableRef",class:this.ns.e("table"),"default-sort":this.defaultSort,border:!0,"show-header":!e,"show-summary":this.c.enableAgg,"summary-method":this.summaryMethod,"highlight-current-row":t.singleSelect,"row-class-name":this.handleRowClassName,"header-cell-class-name":this.handleHeaderCellClassName,"row-key":"tempsrfkey",data:this.tableData,onRowClick:this.onRowClick,onRowDblclick:this.onDbRowClick,onSelectionChange:this.onSelectionChange,onSortChange:this.onSortChange,"tooltip-effect":"light"},{empty:this.renderNoData,default:()=>[!t.singleSelect&&a(d("el-table-column"),{"class-name":this.ns.e("selection"),type:"selection",width:"55"},null),this.renderColumns.map((r,o)=>Sr(this.c,r,this.renderColumns,o))],append:()=>this.renderPopover()}),n&&a(d("iBizPagination"),{total:t.total,curPage:t.curPage,size:t.size,onChange:this.onPageChange,onPageSizeChange:this.onPageSizeChange,onPageRefresh:this.onPageRefresh},null)]})}});var Ph=Object.defineProperty,Eh=(t,e,n)=>e in t?Ph(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ih=(t,e,n)=>(Eh(t,typeof e!="symbol"?e+"":e,n),n);class Dh{constructor(){Ih(this,"component","IBizGridControl")}}const _h=N("n",U(Ar,t=>{t.component(Ar.name,Ar),t.component(Rs.name,Rs),t.use(Op),t.use($p),t.use(qp),t.use(Jp),oe(ee.GRID,()=>new Dh)}));function Vs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Fr=S({name:"IBizListControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},isSimple:{type:Boolean,required:!1},loadDefault:{type:Boolean,default:!0}},setup(t){const e=ne((...b)=>new Ja(...b)),n=B(`control-${e.model.controlType.toLowerCase()}`),{onPageChange:r,onPageRefresh:o,onPageSizeChange:i}=Gt(e),s=F(()=>e.model.enablePagingBar===!0?!0:e.state.items.length>=e.state.total||e.state.isLoading||e.state.total<=e.state.size),l=(b,h)=>{const{context:f,params:w}=e,P=e.state.selectedData.findIndex(y=>y.srfkey===b.srfkey),_=[n.b("item"),n.is("active",P!==-1)];return a(d("iBizControlShell"),{class:_,data:b,modelData:h,context:f,params:w,onClick:()=>e.onRowClick(b),onDblclick:()=>e.onDbRowClick(b)},null)},c=b=>{const h=e.state.selectedData.findIndex(w=>w.srfkey===b.srfkey),f=[n.b("item"),n.is("active",h!==-1)];return a("div",{class:f,key:b.srfkey,onClick:()=>e.onRowClick(b),onDblclick:()=>e.onDbRowClick(b)},[`${$i(b.srfmajortext)?"":b.srfmajortext}`])},u=b=>{const h=t.modelData.itemLayoutPanel;return a(d("el-collapse-item"),{title:b.caption,class:n.be("group-content","item")},{default:()=>[b.children.length>0?b.children.map(f=>h?l(f,h):c(f)):a("div",{class:n.bem("group-content","item","empty")},[R("\u65E0\u6570\u636E")])]})},p=()=>{if(e.model.enableGroup&&!e.state.isSimple)return a(d("el-collapse"),{class:[n.b("group-content"),n.b("content")]},{default:()=>{var h;return[(h=e.state.groups)==null?void 0:h.map(f=>a("div",{class:[n.b("scroll-item")]},[u(f)]))]}});const b=t.modelData.itemLayoutPanel;return Ue(a("div",{class:[n.b("scroll"),n.b("content")],"infinite-scroll-distance":10,"infinite-scroll-disabled":s.value},[e.state.items.map(h=>a("div",{class:[n.b("scroll-item")]},[b?l(h,b):c(h)]))]),[[Ye("infinite-scroll"),()=>e.loadMore()]])},m=()=>{var b;const h=(b=e.model.controls)==null?void 0:b.find(f=>f.name===`${e.model.name}_quicktoolbar`);if(h)return a(d("iBizToolbarControl"),{modelData:h,context:e.context,params:e.params},null)};return{c:e,ns:n,renderListContent:p,renderNoData:()=>{let b;const{isLoaded:h}=e.state;if(h)return h&&a(d("iBizNoData"),{class:n.b("content"),text:e.model.emptyText,emptyTextLanguageRes:e.model.emptyTextLanguageRes},Vs(b=m())?b:{default:()=>[b]})},renderBatchToolBar:()=>{var b;const h=(b=e.model.controls)==null?void 0:b.find(f=>f.name===`${e.model.name}_batchtoolbar`);if(h)return a("div",{class:n.b("batchtoolbar")},[a(d("iBizToolbarControl"),{modelData:h,context:e.context,params:e.params},null)])},onPageChange:r,onPageRefresh:o,onPageSizeChange:i}},render(){const{enablePagingBar:t}=this.c.model;let e=null;return this.c.state.isCreated&&(e=[this.c.state.items.length>0?this.renderListContent():this.renderNoData(),this.renderBatchToolBar(),t?a(d("iBizPagination"),{class:this.ns.e("pagination"),total:this.c.state.total,curPage:this.c.state.curPage,size:this.c.state.size,onChange:this.onPageChange,onPageSizeChange:this.onPageSizeChange,onPageRefresh:this.onPageRefresh},null):null]),a(d("iBizControlBase"),{class:[this.ns.is("enable-page",!!t)],controller:this.c},Vs(e)?e:{default:()=>[e]})}});var Bh=Object.defineProperty,Sh=(t,e,n)=>e in t?Bh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ah=(t,e,n)=>(Sh(t,typeof e!="symbol"?e+"":e,n),n);class Fh{constructor(){Ah(this,"component","IBizListControl")}}const xh=N("v",U(Fr,function(t){t.component(Fr.name,Fr),oe(ee.LIST,()=>new Fh)})),xr=S({name:"IBizSearchFormControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},loadDefault:{type:Boolean,default:!0}},setup(){const t=ne((...n)=>new Qa(...n)),e=B(`control-${t.model.controlType.toLowerCase()}`);return t.evt.on("onCreated",()=>{Object.keys(t.details).forEach(r=>{const o=t.details[r];o.state=me(o.state)})}),{c:t,ns:e}},render(){const{state:t}=this.c;if(t.isCreated)return a(d("iBizFormControl"),{class:[this.ns.b()],controller:this.c,onKeyup:e=>this.c.onKeyUp(e)},{...this.$slots})}});var Oh=Object.defineProperty,Th=(t,e,n)=>e in t?Oh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Nh=(t,e,n)=>(Th(t,typeof e!="symbol"?e+"":e,n),n);class zh{constructor(){Nh(this,"component","IBizSearchFormControl")}}const Rh=N("w",U(xr,function(t){t.component(xr.name,xr),oe(ee.SEARCHFORM,()=>new zh)}));function js(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Or=S({name:"IBizFormGroupPanel",props:{modelData:{type:Object,required:!0},controller:{type:Cn,required:!0}},setup(t){const e=B("form-group"),n=I(!t.controller.defaultExpansion),r=()=>{t.controller.disableClose||(n.value=!n.value)},o=async(s,l)=>{await t.controller.onActionClick(s,l)},i=F(()=>{const{captionItemName:s,caption:l,capLanguageRes:c}=t.modelData;if(s)return t.controller.data[s];let u=l;return c&&(u=ibiz.i18n.t(c.lanResTag,l)),u});return{ns:e,isCollapse:n,captionText:i,changeCollapse:r,onActionClick:o}},render(){var t,e;let n;const{state:r}=this.controller,o=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[],i=a(d("iBizRow"),{class:this.ns.be("content","row"),layout:this.modelData.layout},js(n=o.map(u=>{const p=u.props;return!p||!p.controller?u:a(d("iBizCol"),{layoutPos:p.modelData.layoutPos,state:p.controller.state},js(u)?u:{default:()=>[u]})}))?n:{default:()=>[n]}),s=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass];this.modelData.showCaption===!0&&(s.push(this.ns.m("show-header")),s.push(this.ns.b("collapse")),s.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&s.push(this.ns.bm("collapse","disable-close")),this.modelData.showMoreMode===2&&s.push(this.ns.m("show-more")));let l=null;this.modelData.showCaption&&(l=a("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[a("div",{class:[this.ns.be("header","left")]},[a("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),a("div",{class:[this.ns.be("header","right")]},[this.modelData.uiactionGroup&&a(d("iBizActionToolbar"),{class:this.ns.e("toolbar"),"action-details":this.modelData.uiactionGroup.uiactionGroupDetails,"actions-state":r.actionGroupState,onActionClick:this.onActionClick,caption:this.modelData.uiactionGroup.name,mode:this.modelData.actionGroupExtractMode==="ITEMS"?"dropdown":"buttons"},null),this.modelData.titleBarCloseMode!==void 0&&this.modelData.titleBarCloseMode!==0&&(this.isCollapse?a("ion-icon",{name:"caret-forward-sharp"},null):a("ion-icon",{name:"caret-down-sharp"},null))])]));let c=null;return this.modelData.showMoreMode===2&&(c=a("div",{class:[this.ns.b("footer")]},[a("div",{class:this.ns.be("footer","show-more-button"),onClick:()=>{r.isShowMore=!r.isShowMore}},[r.isShowMore?"\u6536\u8D77":"\u663E\u793A\u66F4\u591A"])])),a("div",{class:s,onClick:u=>this.controller.onClick(u)},[l,a("div",{class:[this.ns.b("content")]},[i]),c])}});var $h=Object.defineProperty,Lh=(t,e,n)=>e in t?$h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mh=(t,e,n)=>(Lh(t,typeof e!="symbol"?e+"":e,n),n);class Vh{constructor(){Mh(this,"component","IBizFormGroupPanel")}async createController(e,n,r){const o=new Cn(e,n,r);return await o.init(),o}}const jh=N("x",U(Or,function(t){t.component(Or.name,Or),Ae("GROUPPANEL",()=>new Vh)}));function kh(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Tr=S({name:"IBizFormItem",props:{modelData:{type:Object,required:!0},controller:{type:wn,required:!0}},setup(t){const e=B("form-item"),n=t.controller;return{ns:e,c:n,onValueChange:(o,i)=>{t.controller.setDataValue(o,i)}}},render(){if(!this.c.state.visible)return null;let t=null;const e={style:this.controller.editor.style,value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,readonly:this.controller.model.editor.readOnly,onChange:this.onValueChange,onFocus:n=>this.c.onFocus(n),onBlur:n=>this.c.onBlur(n),onEnter:n=>this.controller.onEnter(n)};if(this.c.form.state.isLoaded)if(this.$slots.default)t=this.$slots.default(e);else if(this.controller.editorProvider){const n=d(this.controller.editorProvider.formEditor);t=re(n,{...e})}else t=a(d("not-supported-editor"),{modelData:this.modelData.editor},null);return a(d("iBizFormItemContainer"),{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass],required:this.c.state.required,error:this.c.state.error,label:this.modelData.caption,labelClass:this.controller.labelClass,"label-pos":this.c.model.labelPos,"label-width":this.c.model.labelWidth,onClick:n=>this.c.onClick(n)},kh(t)?t:{default:()=>[t]})}}),ks=N("z",S({name:"IBizFormItemContainer",props:{required:{type:Boolean,required:!0},error:{type:String},label:{type:String},labelClass:{type:Array},labelPos:{type:String,required:!0},labelWidth:{type:Number,default:130}},setup(t){const e=B("form-item-container"),n=F(()=>t.labelWidth!==130?e.cssVarBlock({"label-width":`${t.labelWidth}px`}):{});return{ns:e,cssVars:n}},render(){var t,e;const n=a("div",{class:[this.ns.e("label"),...this.labelClass||[]],title:this.label},[this.label]),r=a("div",{class:[this.ns.e("content"),this.ns.em("content",`label-${this.labelPos.toLowerCase()}`)]},[a("div",{class:[this.ns.e("editor")]},[(e=(t=this.$slots).default)==null?void 0:e.call(t)]),this.error?a("div",{title:this.error,class:[this.ns.e("error")]},[this.error]):null]);return a("div",{class:[this.ns.b(),this.ns.m(this.labelPos.toLowerCase()),this.ns.is("required",this.required),this.ns.is("error",!!this.error)],style:this.cssVars},[this.labelPos==="LEFT"||this.labelPos==="TOP"?n:null,r,this.labelPos==="RIGHT"||this.labelPos==="BOTTOM"?n:null])}}));var Uh=Object.defineProperty,Gh=(t,e,n)=>e in t?Uh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qh=(t,e,n)=>(Gh(t,typeof e!="symbol"?e+"":e,n),n);class Wh{constructor(){qh(this,"component","IBizFormItem")}async createController(e,n,r){const o=new wn(e,n,r);return await o.init(),o}}const Hh=N("y",U(Tr,function(t){t.component(Tr.name,Tr),t.component(ks.name,ks),Ae("FORMITEM",()=>new Wh)}));function Kh(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Nr=S({name:"IBizFormPage",props:{modelData:{type:Object,required:!0}},setup(){return{ns:B("form-page")}},render(){var t,e,n,r;let o;const{noTabHeader:i}=this.modelData,s=((n=(e=(t=this.$slots).default)==null?void 0:e.call(t)[0])==null?void 0:n.children)||[];return s.length===1||i?a("div",{class:[this.ns.b(),this.ns.m("no-tab-header")]},[s]):a(d("el-tabs"),{class:[this.ns.b(),this.ns.b("tab")],"model-value":(r=s[0])==null?void 0:r.key},Kh(o=s.map(l=>{const c=l.props;if(!c||!c.controller)return l;const u=c.controller;return!u.state.visible&&!u.state.keepAlive?null:a(d("el-tab-pane"),{class:this.ns.b("tab-item"),name:u.model.id,lazy:!0},{default:()=>l,label:()=>a("span",{class:u.labelClass},[u.model.sysImage?a(d("iBizIcon"),{icon:u.model.sysImage},null):null,u.model.caption])})}))?o:{default:()=>[o]})}});function Us(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Gs=N("B",S({name:"IBizFormPageItem",props:{modelData:{type:Object,required:!0},controller:{type:yn,required:!0}},setup(){return{ns:B("form-page-item")}},render(){var t,e;let n;const r=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[];return r.forEach(o=>{var i;const s=(i=o.component)==null?void 0:i.data;s&&(s.class={[this.ns.b("child")]:!0})}),a(d("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass],layout:this.modelData.layout},Us(n=r.map(o=>{const i=o.props;return!i||!i.controller?o:a(d("iBizCol"),{layoutPos:i.modelData.layoutPos,state:i.controller.state},Us(o)?o:{default:()=>[o]})}))?n:{default:()=>[n]})}}));var Xh=Object.defineProperty,Yh=(t,e,n)=>e in t?Xh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jh=(t,e,n)=>(Yh(t,typeof e!="symbol"?e+"":e,n),n);class Qh{constructor(){Jh(this,"component","IBizFormPageItem")}async createController(e,n,r){const o=new yn(e,n);return await o.init(),o}}const Zh=N("A",U(Nr,function(t){t.component(Nr.name,Nr),t.component(Gs.name,Gs),Ae("FORMPAGE",()=>new Qh)})),zr=S({name:"IBizFormButton",props:{modelData:{type:Object,required:!0},controller:{type:Pn,required:!0}},setup(t){const e=B("form-button"),n=F(()=>{const{caption:r,captionItemName:o,capLanguageRes:i}=t.modelData;if(o&&t.controller.data[o])return t.controller.data[o];let s=r;return i&&(s=ibiz.i18n.t(i.lanResTag,r)),s});return{ns:e,captionText:n}},render(){return this.controller.state.visible?a("div",{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.ns.is("loading",this.controller.state.loading),...this.controller.containerClass]},[a(d("el-button"),{sime:"small",onClick:this.controller.onClick.bind(this.controller),loading:this.controller.state.loading,disabled:this.controller.state.disabled},{default:()=>[a("div",{class:this.ns.b("content")},[a(d("iBizIcon"),{class:this.ns.bm("content","icon"),icon:this.modelData.sysImage},null),a("span",{class:this.ns.bm("content","caption")},[this.modelData.showCaption?this.captionText:null])])]})]):null}});var em=Object.defineProperty,tm=(t,e,n)=>e in t?em(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nm=(t,e,n)=>(tm(t,typeof e!="symbol"?e+"":e,n),n);class rm{constructor(){nm(this,"component","IBizFormButton")}async createController(e,n,r){const o=new Pn(e,n,r);return await o.init(),o}}const om=N("C",U(zr,function(t){t.component(zr.name,zr),Ae("BUTTON",()=>new rm)})),Rr=S({name:"IBizFormDRUIPart",props:{modelData:{type:Object,required:!0},controller:{type:En,required:!0}},setup(t){const e=B("form-druipart");return dt(t.controller),{ns:e,onCreated:r=>{t.controller.setEmbedView(r.view)}}},render(){if(!this.controller.state.visible||!this.controller.state.viewComponentKey)return null;const t=d("IBizViewShell");return a("div",{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],onClick:e=>this.controller.onClick(e)},[re(t,{context:this.controller.navContext,params:this.controller.navParams,key:this.controller.state.viewComponentKey,viewId:this.controller.model.appViewId,state:{noLoadDefault:!0},onCreated:this.onCreated}),this.controller.state.showMask&&a("div",{class:this.ns.e("mask")},[this.modelData.maskInfo||"\u8BF7\u5148\u4FDD\u5B58\u4E3B\u6570\u636E"])])}});var am=Object.defineProperty,im=(t,e,n)=>e in t?am(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sm=(t,e,n)=>(im(t,typeof e!="symbol"?e+"":e,n),n);class lm{constructor(){sm(this,"component","IBizFormDRUIPart")}async createController(e,n,r){const o=new En(e,n,r);return await o.init(),o}}const cm=N("D",U(Rr,function(t){t.component(Rr.name,Rr),Ae("DRUIPART",()=>new lm)})),$r=S({name:"IBizFormMDCtrl",props:{modelData:{type:Object,required:!0},controller:{type:Za,required:!0}},setup(t){const e=B("form-mdctrl");dt(t.controller);const n=t.controller,r=n.model.showCaption&&!!n.model.caption;return{c:n,ns:e,hasCaption:r}},render(){const{model:t}=this.c;let e;switch(t.contentType){case"GRID":case"LIST":case"DATAVIEW":e=a(d("iBizFormMDCtrlMD"),{controller:this.c},null);break;case"FORM":e=a(d("iBizFormMDCtrlForm"),{controller:this.c},null);break;case"REPEATER":e=a(d("iBizFormMDCtrlRepeater"),{controller:this.c},null);break;default:a("div",null,[t.contentType,R("\u6682\u672A\u652F\u6301")]);break}return a("div",{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass,this.hasCaption?this.ns.m("show-caption"):""]},[this.hasCaption&&a("div",{class:this.ns.b("header")},[a("span",{class:this.ns.e("title")},[this.c.model.caption])]),e])}}),qs=S({name:"IBizFormMDCtrlForm",props:{controller:{type:In,required:!0}},setup(t){const e=B("form-mdctrl-form"),n=F(()=>t.controller.enableCreate||t.controller.enableDelete);return{ns:e,showActions:n,onCreated:(i,s)=>{t.controller.setFormController(i,s.ctrl)},renderAddBtn:()=>a(d("el-button"),{class:[e.be("item-actions","create"),e.be("item-actions","btn")],onClick:()=>t.controller.create()},{default:()=>[R("\u6DFB\u52A0")]})}},render(){const{state:t,formProvider:e,model:n}=this.controller;return a(d("iBizMDCtrlContainer"),{class:this.ns.b(),items:t.items,enableCreate:this.controller.enableCreate,enableDelete:this.controller.enableDelete,onAddClick:()=>this.controller.create(),onRemoveClick:r=>this.controller.remove(r.id)},{item:({data:r})=>e?re(d(e.component),{class:this.ns.be("item","form"),modelData:n.contentControl,context:r.context,params:r.params,onCreated:i=>{this.onCreated(r.id,i)}}):a("div",null,[R("\u672A\u627E\u5230\u8868\u5355\u7684\u9002\u914D\u5668")])})}}),Ws=S({name:"IBizFormMDCtrlMD",props:{controller:{type:Dn,required:!0}},setup(t){const e=B("form-mdctrl-md"),n=F(()=>t.controller.enableCreate||t.controller.enableDelete),r=s=>{t.controller.setMDControl(s.ctrl)},o=I(!1);return{ns:e,showActions:n,isSelected:o,onCreated:r,onSelectionChange:s=>{o.value=s.data.length>0}}},render(){const{mdProvider:t,model:e}=this.controller,n=this.controller.form.state.isLoaded;let r=null;if(n){const o={class:this.ns.b("content"),modelData:e.contentControl,context:this.controller.form.context,params:this.controller.form.params,onCreated:this.onCreated,onSelectionChange:this.onSelectionChange};e.contentType==="GRID"&&(o.rowEditOpen=!0),r=re(d(t.component),o)}return a("div",{class:this.ns.b()},[r,this.showActions&&a("div",{class:this.ns.b("actions")},[this.controller.enableCreate&&a(d("el-button"),{class:[this.ns.be("actions","create"),this.ns.be("actions","btn")],onClick:()=>this.controller.create()},{default:()=>[R("\u6DFB\u52A0")]}),this.controller.enableDelete&&a(d("el-button"),{type:"danger",disabled:!this.isSelected,class:[this.ns.be("actions","remove"),this.ns.be("actions","btn")],onClick:()=>this.controller.remove()},{default:()=>[R("\u5220\u9664")]})])])}}),Hs=S({name:"IBizRepeaterSingleForm",props:{data:{type:Object,required:!0},controller:{type:Ze,required:!0}},emits:{change:t=>!0},setup(t,{emit:e}){return{ns:B("repeater-single-form"),onFormDataChange:o=>{const i={...o.data[0]};e("change",i)}}},render(){if(!this.controller.repeatedForm)throw new pe("\u6CA1\u6709repeatedForm");return a(d("iBizControlShell"),{class:this.ns.b(),context:this.controller.context,params:this.controller.params,modelData:this.controller.repeatedForm,isSimple:!0,data:this.data,onFormDataChange:this.onFormDataChange},null)}}),um=S({name:"IBizRepeaterMultiForm",props:{controller:{type:Ze,required:!0}},emits:{change:t=>!0},setup(t,{emit:e}){return{ns:B("repeater-multi-form"),onValueChange:(o,i)=>{const s=[...t.controller.value];s[i]=o,e("change",s)}}},render(){const t=this.controller.value;return a(d("iBizMDCtrlContainer"),{class:this.ns.b(),items:t,enableCreate:this.controller.enableCreate,enableDelete:this.controller.enableDelete,onAddClick:()=>this.controller.create(),onRemoveClick:(e,n)=>this.controller.remove(n)},{item:({data:e,index:n})=>a(Hs,{key:n,data:e,controller:this.controller,onChange:r=>{this.onValueChange(r,n)}},null)})}});function dm(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const pm=S({name:"IBizRepeaterGrid",props:{controller:{type:Ze,required:!0}},emits:{change:t=>!0},setup(t,{emit:e}){const n=B("repeater-grid"),r=[];qn(t.controller.repeatedForm,u=>{u.detailType==="FORMITEM"&&r.push(u)},{childrenFields:["deformPages","deformTabPages","deformDetails"]});const o=(u,p)=>{const m=[...t.controller.value];m[p]=u,e("change",m)},i=ua(),s=me([]),l=async(u={})=>{const p=new _n(t.controller.repeatedForm,t.controller.context,t.controller.params,i);p.state.isSimple=!0,await p.created(),p.setSimpleData(u),s.push(p),p.evt.on("onFormDataChange",m=>{const v={...m.data[0]},g=s.indexOf(p);o(v,g)})};return G(()=>t.controller.value,u=>{u&&u.length>0&&(u.forEach((p,m)=>{const v=s[m];if(v){const g=p||{};Object.keys(v.data).find(h=>g[h]!==v.data[h])&&v.setSimpleData(g)}else l(p)}),u.length<s.length&&s.forEach((p,m)=>{m>=u.length&&(p.state.isLoaded=!1)}))},{immediate:!0,deep:!0}),{ns:n,formItems:r,formControllers:s,renderRemoveBtn:u=>t.controller.enableDelete?ibiz.config.form.mdCtrlConfirmBeforeRemove?a(d("el-popconfirm"),{title:"\u662F\u5426\u5220\u9664\u9009\u4E2D\u9879","confirm-button-text":"\u786E\u8BA4","cancel-button-text":"\u53D6\u6D88",onConfirm:()=>t.controller.remove(u)},{reference:()=>a(d("el-button"),{text:!0,type:"danger",class:[n.be("index","remove")]},{default:()=>[R("\u5220\u9664")]})}):a(d("el-button"),{text:!0,type:"danger",class:[n.be("index","remove")],onClick:()=>t.controller.remove(u)},{default:()=>[R("\u5220\u9664")]}):null}},render(){return a("div",{class:this.ns.b()},[this.controller.enableCreate&&a(d("el-button"),{class:this.ns.e("add-btn"),onClick:()=>{this.controller.create()}},{default:()=>[R("\u6DFB\u52A0")]}),a(d("el-table"),{class:this.ns.e("table"),"show-header":!0,data:this.controller.value,"cell-class-name":({columnIndex:t})=>t===0?this.ns.b("index"):""},{default:()=>[a(d("el-table-column"),{type:"index",width:66,align:"center"},{default:t=>{const{$index:e}=t;return this.controller.enableDelete?[this.renderRemoveBtn(e),a("span",{class:this.ns.be("index","text")},[e+1])]:a("span",null,[e+1])}}),this.formItems.length>0&&this.formItems.map(t=>a(d("el-table-column"),{label:t.caption,prop:t.id,align:"center"},{default:e=>{const{$index:n}=e,r=this.formControllers[n];if(!r||!r.state.isLoaded)return a("div",null,[R("\u4E0D\u5B58\u5728\u6216\u52A0\u8F7D\u4E2D")]);const o=r.formItems.find(s=>s.name===t.id);let i=null;if(!o.editorProvider)i=a(d("not-supported-editor"),{modelData:t.editor},null);else{const s=d(o.editorProvider.formEditor);i=re(s,{value:o.value,data:o.data,controller:o.editor,disabled:o.state.disabled,readonly:o.model.editor.readOnly,onChange:(l,c)=>{o.setDataValue(l,c)}})}return a(d("iBizGridEditItem"),{error:o.state.error,required:o.state.required},dm(i)?i:{default:()=>[i]})}}))]})])}}),Ks=S({name:"IBizFormMDCtrlRepeater",props:{controller:{type:Ze,required:!0}},setup(t){return{ns:B("form-mdctrl-repeater"),onDataChange:r=>{t.controller.setValue(r)}}},render(){const t=[this.ns.b()];switch(this.controller.repeaterStyle){case"MultiForm":return a(um,{class:t,onChange:this.onDataChange,controller:this.controller},null);case"Grid":return a(pm,{class:t,controller:this.controller,onChange:this.onDataChange},null);case"SingleForm":return a(Hs,{class:t,data:this.controller.value,controller:this.controller,onChange:this.onDataChange},null);default:return a("div",{class:t},[R("\u6682\u672A\u652F\u6301\u91CD\u590D\u5668\u6837\u5F0F"),this.controller.repeaterStyle])}}});var hm=Object.defineProperty,mm=(t,e,n)=>e in t?hm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fm=(t,e,n)=>(mm(t,typeof e!="symbol"?e+"":e,n),n);class bm{constructor(){fm(this,"component","IBizFormMDCtrl")}async createController(e,n,r){let o;switch(e.contentType){case"LIST":case"GRID":case"DATAVIEW":o=new Dn(e,n,r);break;case"FORM":o=new In(e,n,r);break;case"REPEATER":o=new Ze(e,n,r);break;default:throw new Vt(e,`\u6682\u672A\u652F\u6301\u5185\u5BB9\u7C7B\u578B\u4E3A${e.contentType}`)}return await o.init(),o}}const Xs=S({name:"IBizMDCtrlContainer",props:{enableCreate:{type:Boolean,required:!0},enableDelete:{type:Boolean,required:!0},items:{type:Object,required:!0}},emits:{addClick:()=>!0,removeClick:(t,e)=>!0},setup(t,{emit:e}){const n=B("mdctrl-container"),r=F(()=>t.enableCreate||t.enableDelete);return{ns:n,showActions:r,renderAddBtn:()=>a(d("el-button"),{class:[n.be("item-actions","create"),n.be("item-actions","btn")],onClick:()=>e("addClick")},{default:()=>[R("\u6DFB\u52A0")]}),renderRemoveBtn:(s,l)=>t.enableDelete?ibiz.config.form.mdCtrlConfirmBeforeRemove?a(d("el-popconfirm"),{title:"\u662F\u5426\u5220\u9664\u9009\u4E2D\u9879","confirm-button-text":"\u786E\u8BA4","cancel-button-text":"\u53D6\u6D88",onConfirm:()=>e("removeClick",s,l)},{reference:()=>a(d("el-button"),{type:"danger",class:[n.be("item-actions","remove"),n.be("item-actions","btn")]},{default:()=>[R("\u5220\u9664")]})}):a(d("el-button"),{type:"danger",class:[n.be("item-actions","remove"),n.be("item-actions","btn")],onClick:()=>e("removeClick",s,l)},{default:()=>[R("\u5220\u9664")]}):null}},render(){var t;return a("div",{class:this.ns.b()},[(t=this.items)!=null&&t.length?this.items.map((e,n)=>{const r=this.$slots.item?this.$slots.item({data:e,index:n}):a("div",null,[R("\u672A\u63D0\u4F9Bitem\u63D2\u69FD")]);return a("div",{class:this.ns.b("item")},[r,this.showActions&&a("div",{class:this.ns.b("item-actions")},[n===0&&this.enableCreate&&this.renderAddBtn(),this.renderRemoveBtn(e,n)])])}):a("div",{class:this.ns.b("no-data")},[this.enableCreate&&a("div",{class:this.ns.b("item-actions")},[this.renderAddBtn()])])])}}),vm=N("E",U($r,function(t){t.component($r.name,$r),t.component(qs.name,qs),t.component(Ws.name,Ws),t.component(Ks.name,Ks),t.component(Xs.name,Xs),Ae("MDCTRL",()=>new bm)})),Lr=S({name:"IBizFormRawItem",props:{modelData:{type:Object,required:!0},controller:{type:Bn,required:!0}},setup(){return{ns:B("form-raw-item")}},render(){return this.controller.state.visible?a(d("iBizRawItem"),{class:[this.ns.b(),...this.controller.containerClass],rawItem:this.modelData,onClick:t=>this.controller.onClick(t)},null):null}});var gm=Object.defineProperty,Cm=(t,e,n)=>e in t?gm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wm=(t,e,n)=>(Cm(t,typeof e!="symbol"?e+"":e,n),n);class ym{constructor(){wm(this,"component","IBizFormRawItem")}async createController(e,n,r){const o=new Bn(e,n,r);return await o.init(),o}}const Pm=N("F",U(Lr,function(t){t.component(Lr.name,Lr),Ae("RAWITEM",()=>new ym)}));function Em(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Mr=S({name:"IBizFormTabPanel",props:{modelData:{type:Object,required:!0},controller:{type:Sn,required:!0}},setup(t){const e=B("form-tab-panel");return dt(t.controller),{ns:e}},render(){var t,e,n;let r;const o=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[];return a(d("el-tabs"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],"model-value":(n=this.modelData.deformTabPages)==null?void 0:n[0].id,onClick:i=>this.controller.onClick(i)},Em(r=o.map(i=>{const s=i.props;if(!s||!s.controller)return i;const l=s.controller;return!l.state.visible&&!l.state.keepAlive?null:a(d("el-tab-pane"),{class:this.ns.b("tab-item"),label:l.model.caption,name:l.model.id,lazy:!0},{default:()=>i,label:()=>a("span",{class:l.labelClass},[l.model.sysImage&&a(d("iBizIcon"),{icon:l.model.sysImage},null),l.model.showCaption&&l.model.caption])})}))?r:{default:()=>[r]})}});var Im=Object.defineProperty,Dm=(t,e,n)=>e in t?Im(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_m=(t,e,n)=>(Dm(t,typeof e!="symbol"?e+"":e,n),n);class Bm{constructor(){_m(this,"component","IBizFormTabPanel")}async createController(e,n,r){const o=new Sn(e,n,r);return await o.init(),o}}const Sm=N("G",U(Mr,function(t){t.component(Mr.name,Mr),Ae("TABPANEL",()=>new Bm)}));function Ys(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Vr=S({name:"IBizFormTabPage",props:{modelData:{type:Object,required:!0},controller:{type:An,required:!0}},setup(t){const e=B("form-tab-page");return dt(t.controller),{ns:e}},render(){var t,e;let n;const r=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[];return a(d("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],layout:this.modelData.layout,onClick:o=>this.controller.onClick(o)},Ys(n=r.map(o=>{const i=o.props;if(!i||!i.controller)return o;const s=i.controller;return a(d("iBizCol"),{layoutPos:s.model.layoutPos,state:s.state},Ys(o)?o:{default:()=>[o]})}))?n:{default:()=>[n]})}});var Am=Object.defineProperty,Fm=(t,e,n)=>e in t?Am(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xm=(t,e,n)=>(Fm(t,typeof e!="symbol"?e+"":e,n),n);class Om{constructor(){xm(this,"component","IBizFormTabPage")}async createController(e,n,r){const o=new An(e,n,r);return await o.init(),o}}const Tm=N("H",U(Vr,function(t){t.component(Vr.name,Vr),Ae("TABPAGE",()=>new Om)}));var Nm=Object.defineProperty,zm=(t,e,n)=>e in t?Nm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rm=(t,e,n)=>(zm(t,typeof e!="symbol"?e+"":e,n),n);class $m{constructor(){Rm(this,"component","IBizEditFormControl")}}const jr=S({name:"IBizEditFormControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},isSimple:{type:Boolean,required:!1},data:{type:Object,required:!1},loadDefault:{type:Boolean,default:!0}},setup(t){const e=ne((...r)=>new _n(...r),{excludePropsKeys:["data"]});t.isSimple&&(e.evt.on("onMounted",()=>{e.setSimpleData(t.data||{})}),G(()=>t.data,r=>{const o=r||{};Object.keys(e.data).find(s=>o[s]!==e.data[s])&&e.setSimpleData(o)},{deep:!0}));const n=B(`control-${e.model.controlType.toLowerCase()}`);return e.evt.on("onCreated",()=>{Object.keys(e.details).forEach(o=>{const i=e.details[o];i.state=me(i.state)})}),{c:e,ns:n}},render(){return a(d("iBizFormControl"),{class:this.ns.b(),controller:this.c},{...this.$slots})}}),Lm=N("J",U(jr,function(t){t.component(jr.name,jr),oe(ee.FORM,()=>new $m)}));function Mm(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const kr=S({name:"IBizFormControl",props:{controller:{type:Object,required:!0}},setup(t,{slots:e}){const n=B("control-form"),r=t.controller,o={form:r},i=l=>{if(l.hidden)return;const c=l.id,u={modelData:l,controller:r.details[c],key:l.id};if(e[c])return Va(e,c,{...o,...u});const p={};l.detailType==="FORMITEM"&&e[`${c}_editor`]&&(p.default=(...b)=>e[`${c}_editor`](...b));const m=ei(l);m.length&&(p.default=()=>m.map(b=>i(b)));const v=r.providers[c];if(!v)return a("div",null,[R("\u6682\u672A\u652F\u6301\u7684\u8868\u5355\u9879\u7C7B\u578B: "),l.detailType,R("\u6216\u627E\u4E0D\u5230\u5BF9\u5E94\u9002\u914D\u5668")]);const g=d(v.component);return re(g,{...u},p)},s=l=>{const{modelData:c}=l;return(c instanceof Array?c:[c]).map(p=>i(p))};return s.props=["modelData"],o.FormDetail=s,{ns:n,c:r,FormDetail:s,slotProps:o,renderByDetailType:i}},render(){const{state:t,model:e,controlPanel:n}=this.c,{isCreated:r}=t,o={};if(r)if(this.$slots.default)o.default=()=>this.$slots.default({...this.slotProps});else{const i=n?e.name:"default";o[i]=()=>a(d("iBizFormPage"),{modelData:this.c.model,controller:this.c},{default:()=>{var s;return[(s=this.c.model.deformPages)==null?void 0:s.map(l=>this.renderByDetailType(l))]}})}return a(d("iBizControlBase"),{class:[this.ns.b()],controller:this.c},Mm(o)?o:{default:()=>[o]})}}),Vm=N("K",U(kr,function(t){t.component(kr.name,kr),t.use(Zh),t.use(Hh),t.use(jh),t.use(om),t.use(cm),t.use(vm),t.use(Pm),t.use(Sm),t.use(Tm)}));function jm(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const km=S({name:"IBizExportExcel",props:{size:{type:String,required:!1},item:{type:Object,required:!0},btnContent:{type:Function,required:!0},controller:{type:Object}},emits:["exportExcel"],setup(t,{emit:e}){const n=B("export-excel"),r=I(1),o=I(9999);return{ns:n,endPage:o,startPage:r,onCommand:(s,l)=>{s&&e("exportExcel",l,{type:s,startPage:r.value,endPage:o.value})}}},render(){return a(d("el-dropdown"),{size:this.$props.size,onCommand:this.onCommand,"popper-class":this.ns.b(),trigger:"click"},{default:()=>{let t;return a(d("el-button"),{title:this.item.tooltip,size:this.$props.size,class:this.ns.e("button")},jm(t=this.btnContent(this.item))?t:{default:()=>[t]})},dropdown:()=>a(d("el-dropdown-menu"),null,{default:()=>[a(d("el-dropdown-item"),{command:"maxRowCount"},{default:()=>[R("\u5BFC\u51FA\u5168\u90E8(\u6700\u5927\u5BFC\u51FA1000\u884C)")]}),a(d("el-dropdown-item"),{command:"activatedPage"},{default:()=>[R("\u5BFC\u51FA\u5F53\u524D\u9875")]}),a(d("el-dropdown-item"),{command:"selectedRows"},{default:()=>[R("\u5BFC\u51FA\u5F53\u524D\u9009\u4E2D")]}),a(d("el-dropdown-item"),{class:this.ns.e("custom"),command:""},{default:()=>[a(d("el-input"),{type:"number",modelValue:this.startPage,"onUpdate:modelValue":t=>this.startPage=t,size:"small",maxlength:"4",onClick:t=>{t.stopPropagation()},onChange:t=>{this.startPage=t}},null),a("span",{class:"item-text",onClick:t=>{t.stopPropagation()}},[R("-")]),a(d("el-input"),{modelValue:this.endPage,"onUpdate:modelValue":t=>this.endPage=t,size:"small",type:"number",maxlength:"4",onClick:t=>{t.stopPropagation()}},null),a("span",{class:"item-text",onClick:t=>{t.stopPropagation()}},[R("\u9875")]),a(d("el-button"),{onClick:t=>this.onCommand("customPage",t),size:"small"},{default:()=>[R("\u5BFC\u51FA")]})]})]})})}});function Et(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const ot=t=>{const e=t.sysImage,n=[];if(t.showIcon&&e&&n.push(a(d("iBizIcon"),{icon:e},null)),t.showCaption)if(t.capLanguageRes){const r=ibiz.i18n.t(t.capLanguageRes.lanResTag,t.caption);n.push(r)}else t.caption&&n.push(t.caption);return n},Ur=S({name:"IBizToolbarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=ne((...s)=>new ti(...s)),e=B(`control-${t.model.controlType.toLowerCase()}`),n=I("default"),r=async(s,l,c)=>{await t.onItemClick(s,l,c)};return{c:t,btnSize:n,ns:e,handleClick:r,renderExtraButtons:s=>s.map(l=>{let c;return a("div",{key:l.id,class:[e.e("item")]},[a(d("el-button"),{title:l.tooltip,size:n.value,onClick:u=>r(l,u)},Et(c=ot(l))?c:{default:()=>[c]})])}),renderToolbarItem:s=>{const l=s.id;if(s.itemType==="SEPERATOR")return a("div",{key:l,class:[e.e("item"),e.e("item-separator")]},[R("|")]);if(s.itemType==="RAWITEM")return a("div",{key:l,class:[e.e("item"),e.e("item-rawitem")]},[ot(s)]);if(s.itemType==="DEUIACTION"&&t.state.buttonsState[l].visible){let c;return s.uiactionId==="exportexcel"?a(km,{class:[e.e("item"),e.e("item-deuiaction")],item:s,btnContent:ot,size:n.value,controller:t,onExportExcel:(p,m)=>{r(s,p,m)}},null):a("div",{key:l,class:[e.e("item"),e.e("item-deuiaction"),e.is("loading",t.state.buttonsState[l].loading)]},[a(d("el-button"),{title:s.tooltip,size:n.value,loading:t.state.buttonsState[l].loading,disabled:t.state.buttonsState[l].disabled,onClick:p=>r(s,p)},Et(c=ot(s))?c:{default:()=>[c]})])}return s.itemType==="ITEMS"?a("div",{key:l,class:[e.e("item"),e.e("item-items")]},[a(d("el-dropdown"),{trigger:"click",placement:"bottom-start"},{default:()=>{let c;return a(d("el-button"),{title:s.tooltip,size:n.value},Et(c=ot(s))?c:{default:()=>[c]})},dropdown:()=>a(d("el-dropdown-menu"),null,{default:()=>{var c;return[(c=s.detoolbarItems)==null?void 0:c.map(u=>{let p;return a(d("el-dropdown-item"),{key:u.id,disabled:t.state.buttonsState[u.id].disabled,onClick:m=>r(u,m)},Et(p=ot(u))?p:{default:()=>[p]})})]}})})]):null}}},render(){var t,e,n;const{state:r}=this.c;let o=null;return r.isCreated&&(o=[((t=r.extraButtons.before)==null?void 0:t.length)>0&&this.renderExtraButtons(r.extraButtons.before),(e=this.modelData.detoolbarItems)==null?void 0:e.map((i,s)=>{var l;const c=this.renderToolbarItem(i);return(l=r.extraButtons[s])!=null&&l.length?[c,this.renderExtraButtons(r.extraButtons[s])]:c}),((n=r.extraButtons.after)==null?void 0:n.length)>0&&this.renderExtraButtons(r.extraButtons.after)]),a(d("iBizControlBase"),{controller:this.c,class:[this.ns.m(r.viewMode.toLowerCase())]},Et(o)?o:{default:()=>[o]})}});var Um=Object.defineProperty,Gm=(t,e,n)=>e in t?Um(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qm=(t,e,n)=>(Gm(t,typeof e!="symbol"?e+"":e,n),n);class Wm{constructor(){qm(this,"component","IBizToolbarControl")}}const Hm=N("L",U(Ur,function(t){t.component(Ur.name,Ur),oe(ee.TOOLBAR,()=>new Wm)})),Gr=S({name:"IBizCaptionBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=ne((...n)=>new ni(...n)),e=B(`control-${t.model.controlType.toLowerCase()}`);return{c:t,ns:e}},render(){return a(d("iBizControlBase"),{controller:this.c,class:[this.ns.b()]},{default:()=>[a("div",{class:[this.ns.b("caption"),this.ns.is("show-icon",!!this.c.model.sysImage)]},[this.c.model.sysImage&&a(d("iBizIcon"),{class:[this.ns.be("caption","icon")],icon:this.c.model.sysImage},null),this.c.state.caption])]})}});var Km=Object.defineProperty,Xm=(t,e,n)=>e in t?Km(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ym=(t,e,n)=>(Xm(t,typeof e!="symbol"?e+"":e,n),n);class Jm{constructor(){Ym(this,"component","IBizCaptionBarControl")}}const Qm=N("M",U(Gr,function(t){t.component(Gr.name,Gr),oe(ee.CAPTIONBAR,()=>new Jm)}));function qt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const qr=S({name:"IBizDataViewControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},loadDefault:{type:Boolean,default:!0}},setup(t){const e=ne((...P)=>new ri(...P)),n=B(`control-${e.model.controlType.toLowerCase()}`),r=F(()=>[n.is("enable-page",e.model.enablePagingBar===!0)]),o=F(()=>e.model.enablePagingBar===!0?!0:e.state.items.length>=e.state.total||e.state.isLoading||e.state.total<=e.state.size),{onPageChange:i,onPageRefresh:s,onPageSizeChange:l}=Gt(e),c=(P,_)=>(_.stopPropagation(),e.onRowClick(P)),u=(P,_)=>(_.stopPropagation(),e.onDbRowClick(P)),p=(P,_)=>{const{context:y,params:D}=e;return a(d("iBizControlShell"),{data:P,modelData:_,context:y,params:D,onClick:E=>c(P,E),onDblclick:E=>u(P,E)},null)},m=P=>{var _;return a(d("iBizActionToolbar"),{class:n.bem("item-content","bottom","actions"),"action-details":(_=e.getOptItemModel().deuiactionGroup)==null?void 0:_.uiactionGroupDetails,"actions-state":e.getOptItemAction(P),onActionClick:(y,D)=>e.onActionClick(y,P,D)},null)},v=P=>a("div",{class:n.b("item-content")},[a("div",{class:n.be("item-content","top")},[a("div",{class:n.bem("item-content","top","title")},[P.srfmajortext]),a("div",{class:n.bem("item-content","top","description")},[P.content])]),e.getOptItemModel()?a("div",{class:n.be("item-content","bottom")},[m(P)]):null]),g=P=>{const _=e.state.selectedData.findIndex(x=>x.srfkey===P.srfkey),y=[n.b("item"),n.is("active",_!==-1)],D={};e.model.cardWidth&&Object.assign(D,{width:`${e.model.cardWidth}px`}),e.model.cardHeight&&Object.assign(D,{height:`${e.model.cardHeight}px`});const E=t.modelData.itemLayoutPanel;return a(d("el-card"),{shadow:"hover",class:y,"body-style":D,onClick:x=>c(P,x),onDblclick:x=>u(P,x)},{default:()=>[E?p(P,E):v(P)]})},b=P=>{const{cardColXS:_,cardColSM:y,cardColMD:D,cardColLG:E}=e.model;return a("div",{class:n.be("group-content","item")},[a("div",{class:n.be("group-content","item-header")},[a("span",{class:n.be("group-content","item-title")},[P.caption]),a("span",{class:n.be("group-content","item-action")},[e.model.groupUIActionGroup&&P.groupActionGroupState&&a(d("iBizActionToolbar"),{class:n.be("group-content","header-actions"),"action-details":e.model.groupUIActionGroup.uiactionGroupDetails,"actions-state":P.groupActionGroupState,onActionClick:(x,O)=>{e.onGroupToolbarClick(x,O,P)}},null)])]),_||y||D||E?a(d("el-row"),{class:n.be("group-content","item-row")},{default:()=>[P.children.length>0?P.children.map(x=>{let O;return a(d("el-col"),{xs:_,sm:y,md:D,lg:E,class:n.be("group-content","item-col")},qt(O=g(x))?O:{default:()=>[O]})}):a("div",{class:n.bem("group-content","item","empty")},[R("\u65E0\u6570\u636E")])]}):a("div",{class:n.be("group-content","item-content")},[P.children.length>0?P.children.map(x=>g(x)):a("div",{class:n.bem("group-content","item","empty")},[R("\u65E0\u6570\u636E")])])])},h=()=>{const{cardColXS:P,cardColSM:_,cardColMD:y,cardColLG:D}=e.model;if(e.model.enableGroup)return a("div",{class:n.b("group-content")},[e.state.groups.map(E=>a("div",{class:[n.b("scroll-item")]},[b(E)]))]);if(P||_||y||D){let E;return a(d("el-row"),{class:[n.b("item-row")]},qt(E=e.state.items.map(x=>{let O;return a(d("el-col"),{xs:P,sm:_,md:y,lg:D,class:[n.b("item-col")]},qt(O=g(x))?O:{default:()=>[O]})}))?E:{default:()=>[E]})}return e.state.items.map(E=>a("div",{class:[n.b("scroll-item")]},[g(E)]))};return{c:e,ns:n,classNames:r,renderHasData:()=>Ue(a("div",{class:[n.b("scroll"),n.e("content")],"infinite-scroll-distance":10,"infinite-scroll-disabled":o.value},[h()]),[[Ye("infinite-scroll"),()=>e.loadMore()]]),renderNoData:()=>{const{isLoaded:P}=e.state;if(P)return a(d("iBizNoData"),{class:n.e("content"),text:e.model.emptyText,emptyTextLanguageRes:e.model.emptyTextLanguageRes},null)},onPageChange:i,onPageRefresh:s,onPageSizeChange:l}},render(){const{items:t,isCreated:e}=this.c.state,{enablePagingBar:n}=this.c.model;let r=null;return e&&(r=[this.c.state.noSort?null:a(d("iBizSortBar"),{onSortChange:(o,i)=>{this.c.setSort(o.key,i),this.c.load()},sortItems:this.c.state.sortItems},null),t.length>0?this.renderHasData():this.renderNoData(),n?a(d("iBizPagination"),{class:this.ns.e("pagination"),total:this.c.state.total,curPage:this.c.state.curPage,size:this.c.state.size,onChange:this.onPageChange,onPageSizeChange:this.onPageSizeChange,onPageRefresh:this.onPageRefresh},null):null]),a(d("iBizControlBase"),{class:[this.ns.is("enable-page",!!n)],controller:this.c},qt(r)?r:{default:()=>[r]})}});var Zm=Object.defineProperty,ef=(t,e,n)=>e in t?Zm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tf=(t,e,n)=>(ef(t,typeof e!="symbol"?e+"":e,n),n);class Js{constructor(){tf(this,"component","IBizDataViewControl")}}N("O",Js);const nf=N("N",U(qr,function(t){t.component(qr.name,qr),oe(ee.DATAVIEW,()=>new Js)}));function Wr(t,e){return e.state.items.find(n=>n.id===t)}function rf(t,e){const n=()=>{const s=t.value;if(!s)throw new pe("\u627E\u4E0D\u5230el-tree\u5B9E\u4F8B\u5BF9\u8C61");return s},r=()=>{var s;const l=t.value;if(!l){setTimeout(()=>{r()},200);return}Object.values(l.store.nodesMap).forEach(c=>{const u=e.state.expandedKeys.includes(c.data.id);u!==c.expanded&&(u?c.expand():c.collapse())}),e.state.singleSelect?t.value.setCurrentKey(((s=e.state.selectedData[0])==null?void 0:s.id)||null):l.setCheckedKeys(e.state.selectedData.map(c=>c.id))},o=nt(r,500);return{getTreeInstance:n,updateUI:o,triggerNodeExpand:s=>{const c=n().store.nodesMap[s];if(c)return c.expanded?(c.collapse(),!1):(c.expand(),!0)}}}const Hr=S({name:"IBizTreeControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},navigational:{type:Boolean,default:void 0},defaultExpandedKeys:{type:Array},loadDefault:{type:Boolean,default:!0}},setup(){const t=ne((...D)=>new oi(...D)),e=B(`control-${t.model.controlType.toLowerCase()}`),n=I(null),{updateUI:r,triggerNodeExpand:o}=rf(n,t),i=D=>D.map(E=>({id:E.id,leaf:E.leaf}));t.evt.on("onAfterRefreshParent",D=>{if(n.value){const{parentNode:E,children:x}=D;n.value.updateKeyChildren(E.id,i(x)),r()}});const s=F(()=>t.state.isLoaded?t.model.rootVisible?t.state.rootNodes:t.state.rootNodes.reduce((D,E)=>E.children?D.concat(E.children):D,[]):[]),l=I("");G(s,(D,E)=>{D!==E&&(l.value=Oe())});const c=async(D,E)=>{let x;if(D.level===0)x=s.value,ibiz.log.debug("\u521D\u59CB\u52A0\u8F7D");else{const O=Wr(D.data.id,t);O.children?(ibiz.log.debug("\u8282\u70B9\u5C55\u5F00\u52A0\u8F7D-\u672C\u5730",O),x=O.children):(ibiz.log.debug("\u8282\u70B9\u5C55\u5F00\u52A0\u8F7D-\u8FDC\u7A0B",O),x=await t.loadNodes(O))}ibiz.log.debug("\u7ED9\u6811\u8FD4\u56DE\u503C",x),E(i(x)),r()};let u=!1;t.evt.on("onLoadSuccess",()=>{u=!0,setTimeout(()=>{u=!1},200)}),t.evt.on("onSelectionChange",async()=>{var D;u&&await pt(),t.state.singleSelect?n.value.setCurrentKey(((D=t.state.selectedData[0])==null?void 0:D.id)||null):n.value.setCheckedKeys(t.state.selectedData.map(E=>E.id))});const p=(D,E)=>{const{checkedNodes:x}=E;t.setSelection(x)};let m=!1;const v=(D,E)=>{if(E.stopPropagation(),!m){if(t.state.navigational){const x=t.getNodeModel(D.nodeId);if(!x?.navAppViewId){const O=o(D.id);t.onExpandChange(D,O);return}}t.onTreeNodeClick(D),m=!0,setTimeout(()=>{m=!1},200)}},g=(D,E)=>{E.stopPropagation(),t.onDbTreeNodeClick(D)};let b;t.evt.on("onMounted",()=>{Object.values(t.contextMenus).length>0&&(()=>Fe.import("@imengyu/vue3-context-menu"))().then(E=>{b=E.default,b.default&&!b.showContextMenu&&(b=b.default)})});const h=d("IBizRawItem"),f=d("IBizIcon"),w=(D,E,x,O)=>{const V=[];return D.forEach(q=>{var M;if(q.itemType==="SEPERATOR"){V.push({divided:"self"});return}const K=O[q.id];if(K&&!K.visible)return;const H={};if(q.showCaption&&q.caption&&(H.label=q.caption),q.sysImage&&q.showIcon&&(H.icon=a(f,{icon:q.sysImage},null)),q.itemType==="DEUIACTION"){H.disabled=K.disabled,H.clickClose=!0;const{uiactionId:Q}=q;Q&&(H.onClick=()=>{t.doUIAction(Q,E,x)})}else if(q.itemType==="RAWITEM"){const{rawItem:Q}=q;Q&&(H.label=a(h,{rawItem:q},null))}else q.itemType==="ITEMS"&&(M=q.detoolbarItems)!=null&&M.length&&(H.children=w(q.detoolbarItems,E,x,O));V.push(H)}),V},P=async(D,E)=>{E.preventDefault(),E.stopPropagation();const x=t.getNodeModel(D.nodeId);if(!x?.decontextMenu)return;const O=t.contextMenus[x.decontextMenu.id];if(!O.model.detoolbarItems)return;await O.calcButtonState(D.deData||(D.srfkey?D:void 0),x.appDataEntityId);const V=O.state.buttonsState,q=w(O.model.detoolbarItems,D,E,V);q.length&&b.showContextMenu({x:E.x,y:E.y,customClass:e.b("context-menu"),items:q})};return{c:t,ns:e,treeRef:n,treeData:s,treeRefreshKey:l,findNodeData:Wr,onCheck:p,onNodeClick:v,onNodeDbClick:g,onNodeContextmenu:P,loadData:c,renderContextMenu:(D,E)=>{var x,O;if((O=(x=D?.decontextMenu)==null?void 0:x.detoolbarItems)!=null&&O.length)return a("div",{class:e.b("context-menu-trigger"),onClick:V=>P(E,V)},[a("ion-icon",{class:e.be("context-menu-trigger","caption-icon"),name:"ellipsis-horizontal"},null)])},updateNodeExpand:(D,E)=>{const x=Wr(D.id,t);if(!x)throw new pe(`\u6CA1\u6709\u627E\u5230id\u4E3A${D.id}\u7684\u8282\u70B9`);t.onExpandChange(x,E)}}},render(){return Ue(a(d("iBizControlBase"),{controller:this.c},{default:()=>[this.c.state.isLoaded&&this.treeRefreshKey&&a(d("el-tree"),{ref:"treeRef",key:this.treeRefreshKey,"node-key":"id","highlight-current":!0,"expand-on-click-node":!1,"auto-expand-parent":!1,"show-checkbox":!this.c.state.singleSelect,"check-strictly":!0,"default-expanded-keys":this.c.state.expandedKeys,props:{label:"text",children:"children",isLeaf:"leaf"},lazy:!0,load:this.loadData,onCheck:this.onCheck,onNodeExpand:t=>{this.updateNodeExpand(t,!0)},onNodeCollapse:t=>{this.updateNodeExpand(t,!1)}},{default:({data:t})=>{var e;const n=this.findNodeData(t.id,this.c);if(!n)return null;const r=this.c.getNodeModel(n.nodeId);return a("div",{onDblclick:o=>this.onNodeDbClick(n,o),onClick:o=>this.onNodeClick(n,o),onContextmenu:o=>this.onNodeContextmenu(n,o),class:[this.ns.b("node"),(e=r.sysCss)==null?void 0:e.cssName]},[n.icon&&a(d("iBizIcon"),{class:this.ns.be("node","icon"),icon:n.icon},null),n.textHtml?a("span",{class:this.ns.be("node","label"),innerHTML:n.textHtml},null):a("span",{class:this.ns.be("node","label")},[n.text]),this.renderContextMenu(r,n)])}})]}),[[Ye("loading"),this.c.state.isLoading]])}});var of=Object.defineProperty,af=(t,e,n)=>e in t?of(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sf=(t,e,n)=>(af(t,typeof e!="symbol"?e+"":e,n),n);class lf{constructor(){sf(this,"component","IBizTreeControl")}}const cf=N("P",U(Hr,function(t){t.component(Hr.name,Hr),oe(ee.TREEVIEW,()=>new lf)})),Kr=S({name:"IBizPickupViewPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},singleSelect:{type:Boolean,default:!0},noLoadDefault:{type:Boolean,default:!1}},setup(){const t=ne((...r)=>new ai(...r)),e=B(`control-${t.model.controlType.toLowerCase()}`);return{c:t,ns:e,onCreated:r=>{t.setEmbedView(r.view)}}},render(){return a(d("iBizControlBase"),{controller:this.c},{default:()=>[this.c.state.isCreated&&(this.$slots.default?this.$slots.default({context:this.c.state.context,params:this.c.state.params,state:{singleSelect:this.c.state.singleSelect,noLoadDefault:this.noLoadDefault},onCreated:this.onCreated}):re(d("IBizViewShell"),{context:this.c.state.context,params:this.c.state.params,viewId:this.c.model.embeddedAppDEViewId,state:{singleSelect:this.c.state.singleSelect,noLoadDefault:this.noLoadDefault},onCreated:this.onCreated}))]})}});var uf=Object.defineProperty,df=(t,e,n)=>e in t?uf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pf=(t,e,n)=>(df(t,typeof e!="symbol"?e+"":e,n),n);class hf{constructor(){pf(this,"component","IBizPickupViewPanelControl")}}const mf=N("Q",U(Kr,function(t){t.component(Kr.name,Kr),oe(ee.PICKUP_VIEW_PANEL,()=>new hf)}));function ff(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Xr=S({name:"IBizTabExpPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},defaultTabName:{type:String,required:!1}},setup(){var t;const e=ne((...i)=>new ii(...i)),n=B(`control-${e.model.controlType.toLowerCase()}`),r=()=>{e.handleTabChange()},o=((t=e.view.model.tabLayout)==null?void 0:t.toLowerCase())||"top";return{c:e,ns:n,tabPosition:o,handleTabChange:r}},render(){let t;const{isCreated:e,tabPages:n}=this.c.state;return a(d("iBizControlBase"),{controller:this.c},{default:()=>[e&&a(d("el-tabs"),{modelValue:this.c.state.activeName,"onUpdate:modelValue":r=>this.c.state.activeName=r,tabPosition:this.tabPosition,onTabChange:this.handleTabChange},ff(t=n.map(r=>a(d("el-tab-pane"),{class:[this.ns.e("tab-item")],label:r.caption,name:r.tabTag},{label:()=>a("span",{class:[...r.class]},[this.c.isShowIcon&&a(d("iBizIcon"),{icon:r.sysImage},null),this.c.isShowCaption&&r.caption])})))?t:{default:()=>[t]})]})}});var bf=Object.defineProperty,vf=(t,e,n)=>e in t?bf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gf=(t,e,n)=>(vf(t,typeof e!="symbol"?e+"":e,n),n);class Cf{constructor(){gf(this,"component","IBizTabExpPanelControl")}}const wf=N("R",U(Xr,function(t){t.component(Xr.name,Xr),oe(ee.TAB_EXP_PANEL,()=>new Cf)}));function at(t,e){const n=B("exp-bar"),r=nt(()=>{t.load()},500),o=l=>{t.state.query=l,r()};return{renderTitle:()=>{const{model:l}=t;if(!l.showTitleBar)return null;let c=l.title;return l.titleLanguageRes&&(c=ibiz.i18n.t(l.titleLanguageRes.lanResTag,l.title)),a("div",{class:[e.b("caption"),n.b("caption")]},[l.sysImage&&a(d("iBizIcon"),{class:[n.be("caption","icon")],icon:l.sysImage},null),c&&a("span",{class:[e.be("caption","text")]},[c])])},renderQuickSearch:()=>{const{model:l}=t;return l.enableSearch?a(d("el-input"),{"model-value":t.state.query,class:[e.b("quick-search"),n.b("quick-search")],placeholder:t.state.placeHolder,onInput:o},{prefix:()=>a("ion-icon",{class:e.e("search-icon"),name:"search"},null)}):null}}}function it(t){const e=t.view.modal.routeDepth;if(e){const n=Me();let r;ln(({currentKey:o,fullPath:i})=>{if(!r)r=o;else if(r===o){const s=cn(n),{srfnav:l}=s.pathNodes[e-1];t.onRouterChange({srfnav:l||"",path:i})}},e)}}function yf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Yr=S({name:"IBizTreeExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},noNeedNavView:{type:Boolean,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const t=ne((...i)=>new si(...i)),e=B(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=at(t,e);it(t);const o=F(()=>t.view.model.viewType!=="DEMPICKUPVIEW2");return{c:t,ns:e,navigational:o,renderTitle:n,renderQuickSearch:r}},render(){const{state:t,XDataModel:e}=this.c,{isCreated:n}=t,r={captionbar:this.renderTitle,searchbar:this.renderQuickSearch};if(n&&e){const o=this.c.controlPanel?e.name:"default";r[o]=()=>a(d("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:e,singleSelect:!0,navigational:this.navigational,mdctrlActiveMode:1,loadDefault:!1,"default-expanded-keys":this.c.defaultExpandedKeys},null)}return a(d("iBizControlBase"),{controller:this.c},yf(r)?r:{default:()=>[r]})}});var Pf=Object.defineProperty,Ef=(t,e,n)=>e in t?Pf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,If=(t,e,n)=>(Ef(t,typeof e!="symbol"?e+"":e,n),n);class Df{constructor(){If(this,"component","IBizTreeExpBarControl")}}const _f=N("S",U(Yr,function(t){t.component(Yr.name,Yr),oe(ee.TREE_EXP_BAR,()=>new Df)}));function Bf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Jr=S({name:"IBizListExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const t=ne((...o)=>new $t(...o)),e=B(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=at(t,e);return it(t),{c:t,ns:e,renderTitle:n,renderQuickSearch:r}},render(){const{isCreated:t}=this.c.state,{XDataModel:e}=this.c,n={captionbar:this.renderTitle,searchbar:this.renderQuickSearch};if(t&&e){const r=this.c.controlPanel?e.name:"default";n[r]=()=>a(d("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:e,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return a(d("iBizControlBase"),{controller:this.c},Bf(n)?n:{default:()=>[n]})}});var Sf=Object.defineProperty,Af=(t,e,n)=>e in t?Sf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ff=(t,e,n)=>(Af(t,typeof e!="symbol"?e+"":e,n),n);class xf{constructor(){Ff(this,"component","IBizListExpBarControl")}}const Of=N("T",U(Jr,function(t){t.component(Jr.name,Jr),oe(ee.LIST_EXPBAR,()=>new xf)}));function Tf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Qr=S({name:"IBizGridExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const t=ne((...o)=>new $t(...o)),e=B(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=at(t,e);return it(t),{c:t,ns:e,renderTitle:n,renderQuickSearch:r}},render(){const{isCreated:t}=this.c.state,{XDataModel:e}=this.c,n={captionbar:this.renderTitle,searchbar:this.renderQuickSearch};if(t&&e){const r=this.c.controlPanel?e.name:"default";n[r]=()=>a(d("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:e,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return a(d("iBizControlBase"),{controller:this.c},Tf(n)?n:{default:()=>[n]})}});var Nf=Object.defineProperty,zf=(t,e,n)=>e in t?Nf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rf=(t,e,n)=>(zf(t,typeof e!="symbol"?e+"":e,n),n);class $f{constructor(){Rf(this,"component","IBizGridExpBarControl")}}const Lf=N("U",U(Qr,function(t){t.component(Qr.name,Qr),oe(ee.GRID_EXPBAR,()=>new $f)}));function Mf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Zr=S({name:"IBizDataViewExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const t=ne((...o)=>new $t(...o)),e=B(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=at(t,e);return it(t),{c:t,ns:e,renderTitle:n,renderQuickSearch:r}},render(){const{isCreated:t}=this.c.state,{XDataModel:e}=this.c,n={captionbar:this.renderTitle,searchbar:this.renderQuickSearch};if(t&&e){const r=this.c.controlPanel?e.name:"default";n[r]=()=>a(d("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:e,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return a(d("iBizControlBase"),{controller:this.c},Mf(n)?n:{default:()=>[n]})}});var Vf=Object.defineProperty,jf=(t,e,n)=>e in t?Vf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kf=(t,e,n)=>(jf(t,typeof e!="symbol"?e+"":e,n),n);class Uf{constructor(){kf(this,"component","IBizDataViewExpBarControl")}}const Gf=N("V",U(Zr,function(t){t.component(Zr.name,Zr),oe(ee.DATA_VIEW_EXPBAR,()=>new Uf)}));function qf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const eo=S({name:"IBizCalendarExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const t=ne((...o)=>new li(...o)),e=B(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=at(t,e);return it(t),{c:t,ns:e,renderTitle:n,renderQuickSearch:r}},render(){const{state:t,XDataModel:e}=this.c,{isCreated:n}=t,r={captionbar:this.renderTitle,searchbar:this.renderQuickSearch};if(n&&e){const o=this.c.controlPanel?e.name:"default";r[o]=()=>a(d("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:e,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return a(d("iBizControlBase"),{controller:this.c},qf(r)?r:{default:()=>[r]})}});var Wf=Object.defineProperty,Hf=(t,e,n)=>e in t?Wf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kf=(t,e,n)=>(Hf(t,typeof e!="symbol"?e+"":e,n),n);class Xf{constructor(){Kf(this,"component","IBizCalendarExpBarControl")}}const Yf=N("W",U(eo,function(t){t.component(eo.name,eo),oe(ee.CALENDAR_EXPBAR,()=>new Xf)}));function Jf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const to=S({name:"IBizChartExpBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},srfnav:{type:String,required:!1},loadDefault:{type:Boolean,default:!0}},setup(){const t=ne((...o)=>new ci(...o)),e=B(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=at(t,e);return it(t),{c:t,ns:e,renderTitle:n,renderQuickSearch:r}},render(){const{isCreated:t}=this.c.state,{XDataModel:e}=this.c,n={captionbar:this.renderTitle,searchbar:this.renderQuickSearch};if(t&&e){const r=this.c.controlPanel?e.name:"default";n[r]=()=>a(d("iBizControlShell"),{context:this.c.context,params:this.c.params,modelData:e,singleSelect:!0,mdctrlActiveMode:1,loadDefault:!1},null)}return a(d("iBizControlBase"),{controller:this.c},Jf(n)?n:{default:()=>[n]})}});var Qf=Object.defineProperty,Zf=(t,e,n)=>e in t?Qf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eb=(t,e,n)=>(Zf(t,typeof e!="symbol"?e+"":e,n),n);class tb{constructor(){eb(this,"component","IBizChartExpBarControl")}}const nb=N("X",U(to,function(t){t.component(to.name,to),oe(ee.CHART_EXPBAR,()=>new tb)}));function rb(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const no=S({name:"IBizSearchBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){var t;const e=ne((...p)=>new ui(...p)),n=B(`control-${e.model.controlType.toLowerCase()}`),r=()=>{e.onSearch()},o=p=>{p.code==="Enter"&&r()},i=F(()=>e.model.quickSearchWidth?n.cssVarBlock({"quick-search-width":`${e.model.quickSearchWidth}px`}):{}),s=p=>{e.state.selectedGroupItem=p,r()};e.model.enableGroup&&e.model.searchBarGroups&&((t=e.model.searchBarGroups)==null?void 0:t.length)>0&&(e.state.selectedGroupItem=e.model.searchBarGroups[0]);const l=I();let c;return{c:e,ns:n,cssVars:i,filterButtonRef:l,onSearch:r,onKeydown:o,onGroupClick:s,showFilter:async()=>{c=ibiz.overlay.createPopover(()=>a(d("iBizFilterTreeControl"),{onClose:()=>{c&&c.dismiss()},controller:e},null),void 0,{placement:"bottom-end",autoClose:!0}),c.present(l.value.$el),await c.onWillDismiss(),c=void 0}}},render(){const t={};return this.c.model.enableFilter&&(t.append=()=>a(d("el-button"),{ref:"filterButtonRef",type:"primary",onClick:()=>this.showFilter()},{default:()=>[a(d("iBizIcon"),{icon:{cssClass:"funnel-outline"}},null)]})),a(d("iBizControlBase"),{controller:this.c,class:[this.ns.b()],style:this.cssVars},{default:()=>{var e;return[this.c.model.enableGroup&&a("div",{class:this.ns.b("quick-group")},[(e=this.c.model.searchBarGroups)==null?void 0:e.map(n=>{var r;return a("span",{class:[this.ns.b("quick-group-item"),this.ns.is("selected",((r=this.c.state.selectedGroupItem)==null?void 0:r.id)===n.id)],onClick:()=>this.onGroupClick(n)},[n.caption])})]),this.c.model.enableQuickSearch&&a(d("el-input"),{modelValue:this.c.state.query,"onUpdate:modelValue":n=>this.c.state.query=n,class:this.ns.b("quick-search"),placeholder:this.c.placeHolder,clearable:!0,onKeydown:this.onKeydown,"suffix-icon":a("ion-icon",{onClick:this.onSearch,class:this.ns.e("search-icon"),name:"search"},null)},rb(t)?t:{default:()=>[t]})]}})}});var ob=Object.defineProperty,ab=(t,e,n)=>e in t?ob(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ib=(t,e,n)=>(ab(t,typeof e!="symbol"?e+"":e,n),n);class sb{constructor(){ib(this,"component","IBizSearchBarControl")}}function lb(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const cb=[{valueOP:ie.EQ,label:"\u7B49\u4E8E(=)"},{valueOP:ie.NOT_EQ,label:"\u4E0D\u7B49\u4E8E(<>)"},{valueOP:ie.GT,label:"\u5927\u4E8E(>)"},{valueOP:ie.GT_AND_EQ,label:"\u5927\u4E8E\u7B49\u4E8E(>=)"},{valueOP:ie.LT,label:"\u5C0F\u4E8E(<)"},{valueOP:ie.LT_AND_EQ,label:"\u5C0F\u4E8E\u7B49\u4E8E(<=)"},{valueOP:ie.IS_NULL,label:"\u503C\u4E3A\u7A7A(Nil)"},{valueOP:ie.IS_NOT_NULL,label:"\u503C\u4E0D\u4E3A\u7A7A(NotNil)"},{valueOP:ie.IN,label:"\u503C\u5728\u8303\u56F4\u4E2D(In)"},{valueOP:ie.NOT_IN,label:"\u503C\u4E0D\u5728\u8303\u56F4\u4E2D(NotIn)"},{valueOP:ie.LIKE,label:"\u6587\u672C\u5305\u542B(%)"},{valueOP:ie.LIFT_LIKE,label:"\u6587\u672C\u5DE6\u5305\u542B(%#)"},{valueOP:ie.RIGHT_LIKE,label:"\u6587\u672C\u53F3\u5305\u542B(#%)"}],Qs=S({name:"IBizFilterTreeControl",props:{controller:{type:Object,required:!0},provider:{type:Object}},emits:{close:()=>!0},setup(t,{emit:e}){const n=B("filter-tree"),r=(h,f)=>t.controller.filterControllers.find(w=>w.fieldName===h?w.valueOP?w.valueOP===f:!0:!1),o=[],i=h=>{if(!h)return;const f=o.find(w=>w.name===h);if(f)return f.valueOPs};t.controller.filterControllers.forEach(h=>{let f=o.find(w=>w.name===h.fieldName);f===void 0&&(f={name:h.fieldName,label:h.label,valueOPs:[]},o.push(f)),h.valueOP?f.valueOPs.push(h.valueOP):f.valueOPs=cb.map(w=>w.valueOP)});const s=(h,f)=>{h.field=f},l=(h,f)=>{h.valueOP=f},c=(h,f)=>{h.logicType=f},u=h=>{h.children.push({leaf:!1,logicType:"AND",children:[{leaf:!0,field:null,valueOP:null,value:null}]})},p=h=>{h.children.push({leaf:!0,field:null,valueOP:null,value:null})},m=(h,f)=>{let w=null;if(f.editorProvider){const P=d(f.editorProvider.formEditor);w=re(P,{value:h.value,controller:f.editor,onChange:_=>{h.value=_}})}else w=a(d("not-supported-editor"),{modelData:f.model.editor},null);return a("div",{class:n.e("editor")},[w])},v=h=>{let f;const w=r(h.field,h.valueOP),P=i(h.field);return a("div",{class:n.b("item")},[a(d("el-select"),{"model-value":h.field,teleported:!1,class:n.e("field-select"),onChange:_=>{s(h,_)}},lb(f=o.map(_=>a(d("el-option"),{key:_.name,value:_.name,label:_.label},null)))?f:{default:()=>[f]}),P&&P.length>0&&a(d("iBizFilterModeSelect"),{class:n.e("mode-select"),value:h.valueOP,modes:P,onChange:_=>{l(h,_)}},null),w&&m(h,w)])},g=h=>a("div",{class:n.b("group")},[a("div",{class:n.be("group","actions")},[a(d("el-button"),{text:!0,type:"primary",onClick:()=>{u(h)}},{default:()=>[R("\u6DFB\u52A0\u7EC4")]}),a(d("el-button"),{text:!0,onClick:()=>{p(h)}},{default:()=>[R("\u6DFB\u52A0\u9879")]}),a(d("el-select"),{"model-value":h.logicType,teleported:!1,class:n.be("group","logic-type"),onChange:f=>{c(h,f)}},{default:()=>[a(d("el-option"),{key:"AND",value:"AND",label:"AND"},null),a(d("el-option"),{key:"OR",value:"OR",label:"OR"},null)]})]),a("div",{class:n.be("group","list")},[h.children.length>0&&h.children.map((f,w)=>{const P=f.leaf?v(f):g(f);return a("div",{class:n.be("group","list-item")},[a("div",{class:n.be("group","list-item-left")},[h.logicType]),P,a(d("iBizIcon"),{class:n.be("group","list-item-right"),onClick:()=>{h.children.splice(w,1)},icon:{cssClass:"trash"}},null)])})])]);return{ns:n,renderFilterGroup:g,renderFilterItem:v,onClose:()=>{e("close")}}},render(){const{state:t}=this.controller;return a("div",{class:[this.ns.b()]},[t.filterNodes.length>0&&t.filterNodes.map(e=>e.leaf?this.renderFilterItem(e):this.renderFilterGroup(e)),a("div",{class:this.ns.b("footer")},[a(d("el-button"),{onClick:()=>{this.controller.onSearch(),this.onClose()}},{default:()=>[R("\u641C\u7D22")]}),a(d("el-button"),{onClick:()=>{this.controller.resetFilter()}},{default:()=>[R("\u91CD\u7F6E")]})])])}});function ub(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Zs=[{valueOP:ie.EQ,label:"\u7B49\u4E8E(=)"},{valueOP:ie.NOT_EQ,label:"\u4E0D\u7B49\u4E8E(<>)"},{valueOP:ie.GT,label:"\u5927\u4E8E(>)"},{valueOP:ie.GT_AND_EQ,label:"\u5927\u4E8E\u7B49\u4E8E(>=)"},{valueOP:ie.LT,label:"\u5C0F\u4E8E(<)"},{valueOP:ie.LT_AND_EQ,label:"\u5C0F\u4E8E\u7B49\u4E8E(<=)"},{valueOP:ie.IS_NULL,label:"\u503C\u4E3A\u7A7A(Nil)"},{valueOP:ie.IS_NOT_NULL,label:"\u503C\u4E0D\u4E3A\u7A7A(NotNil)"},{valueOP:ie.IN,label:"\u503C\u5728\u8303\u56F4\u4E2D(In)"},{valueOP:ie.NOT_IN,label:"\u503C\u4E0D\u5728\u8303\u56F4\u4E2D(NotIn)"},{valueOP:ie.LIKE,label:"\u6587\u672C\u5305\u542B(%)"},{valueOP:ie.LIFT_LIKE,label:"\u6587\u672C\u5DE6\u5305\u542B(%#)"},{valueOP:ie.RIGHT_LIKE,label:"\u6587\u672C\u53F3\u5305\u542B(#%)"}],el=S({name:"IBizFilterModeSelect",props:{value:String,modes:Array},emits:{change:t=>!0},setup(t,{emit:e}){return{availableModes:F(()=>{var o;return(o=t.modes)!=null&&o.length?Zs.filter(i=>t.modes.includes(i.valueOP)):Zs}),onChange:o=>{e("change",o)}}},render(){let t;return a(d("el-select"),{"model-value":this.value,teleported:!1,onChange:e=>{this.onChange(e)}},ub(t=this.availableModes.map(e=>a(d("el-option"),{key:e.valueOP,value:e.valueOP,label:e.label},null)))?t:{default:()=>[t]})}}),db=N("Y",U(no,function(t){t.component(no.name,no),t.component(Qs.name,Qs),t.component(el.name,el),oe(ee.SEARCHBAR,()=>new sb)}));var pb=Object.defineProperty,hb=(t,e,n)=>e in t?pb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mb=(t,e,n)=>(hb(t,typeof e!="symbol"?e+"":e,n),n);class fb{constructor(){mb(this,"component","IBizChartControl")}}const bb=N("Z",{install(t){t.component("IBizChartControl",ht({loader:()=>Fe.import("./chart-ImL2qyp9.js"),loadingComponent:da,delay:0})),oe(ee.CHART,()=>new fb)}});function vb(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const ro=S({name:"IBizWizardPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=ne((...n)=>new di(...n)),e=B(`control-${t.model.controlType.toLowerCase()}`);return{c:t,ns:e}},render(){var t,e;const{activeFormTag:n}=this.c.state;let r=null,o=null,i=null;if(n&&this.c.activeWizardForm){const l=this.c.activeWizardForm.stepActions;if(this.c.providers[n]){const p=d(this.c.providers[n].component),m=(t=this.c.model.deeditForms)==null?void 0:t.find(v=>{var g;return n===((g=v.dewizardForm)==null?void 0:g.formTag)});o=re(p,{class:this.ns.e("form"),modelData:m,context:this.c.context,params:this.c.params,key:n,onMounted:v=>this.c.onFormMounted(n,v),onSaveSuccess:v=>this.c.onFormSaved(v)})}const{dewizard:c}=this.c.model;i=l&&c&&a("div",{key:`${n}footer`,class:this.ns.b("footer")},[l.includes("PREV")&&a(d("el-button"),{onClick:()=>{this.c.onPrevClick()}},{default:()=>[c.prevCaption?c.prevCaption:"\u540E\u9000"]}),l.includes("NEXT")&&a(d("el-button"),{onClick:()=>{this.c.onNextClick()}},{default:()=>[c.nextCaption?c.nextCaption:"\u524D\u8FDB"]}),l.includes("FINISH")&&a(d("el-button"),{onClick:()=>{this.c.onFinishClick()}},{default:()=>[c.finishCaption?c.finishCaption:"\u5B8C\u6210"]})]);const{dewizardSteps:u}=c;if(this.c.model.showStepBar&&u&&u.length>0){let p;const m=this.c.steps.indexOf(this.c.stepTags[`${this.c.model.name}_form_${(e=this.c.state.activeFormTag)==null?void 0:e.toLowerCase()}`])+1;r=a(d("el-steps"),{class:this.ns.b("header"),"align-center":!0,"finish-status":"success",active:m},vb(p=u.map(v=>a(d("el-step"),{title:v.title},null)))?p:{default:()=>[p]})}}return a(d("iBizControlBase"),{controller:this.c,class:[this.ns.b(),this.ns.is("header",this.c.model.showStepBar)]},{default:()=>[r,o,i]})}});var gb=Object.defineProperty,Cb=(t,e,n)=>e in t?gb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wb=(t,e,n)=>(Cb(t,typeof e!="symbol"?e+"":e,n),n);class yb{constructor(){wb(this,"component","IBizWizardPanelControl")}}const Pb=N("_",U(ro,function(t){t.component(ro.name,ro),oe(ee.WIZARD_PANEL,()=>new yb)}));var Eb=Object.defineProperty,Ib=(t,e,n)=>e in t?Eb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Db=(t,e,n)=>(Ib(t,typeof e!="symbol"?e+"":e,n),n);class tl extends Fn{constructor(){super(...arguments),Db(this,"router")}get navPos(){var e;return(e=this.view.layoutPanel)==null?void 0:e.panelItems.nav_pos}get form(){return this.view.getController("form")}getData(){var e;return((e=this.form)==null?void 0:e.getData())||[{}]}setRouter(e){this.router=e}get routeDepth(){return this.view.modal.routeDepth}initState(){super.initState(),this.state.drBarItems=[]}async onCreated(){await super.onCreated(),this.initDRBarItems()}async onMounted(){await super.onMounted(),this.form&&(this.form.evt.on("onLoadSuccess",()=>{this.handleFormChange()}),this.form.evt.on("onLoadDraftSuccess",()=>{this.handleFormChange()}),this.form.evt.on("onSaveSuccess",()=>{this.handleFormChange()}))}handleFormChange(){const e=this.getData()[0].srfuf!==xn.UPDATE;this.setDRBarItemsState(this.state.drBarItems,e)}setDRBarItemsState(e,n){e.forEach(r=>{r.tag!==this.model.uniqueTag&&(r.disabled=n),r.children&&this.setDRBarItemsState(r.children,n)})}initDRBarItems(){const{editItemCaption:e,editItemCapLanguageRes:n,hideEditItem:r,editItemSysImage:o,uniqueTag:i,dedrctrlItems:s}=this.model,l=[];let c=e;n&&(c=ibiz.i18n.t(n.lanResTag,e)),l.push({tag:i,caption:c,hidden:!!r,disabled:!1,sysImage:o,fullPath:this.router.currentRoute.value.fullPath}),s?.forEach(u=>{let p=u.caption;u.capLanguageRes&&(p=ibiz.i18n.t(u.capLanguageRes.lanResTag,u.caption)),l.push({tag:u.id,caption:p,sysImage:u.sysImage,hidden:!1,disabled:!1})}),this.state.drBarItems=l}handleSelectChange(e){var n;const r=(n=this.model.dedrctrlItems)==null?void 0:n.find(o=>o.id===e);r?(this.setVisible("navPos"),this.openNavPosView(r)):(this.setVisible("form"),this.routeDepth&&this.router.push(this.state.drBarItems[0].fullPath))}setVisible(e){var n;const r=(n=this.view.layoutPanel)==null?void 0:n.panelItems.view_form;e==="form"?(r&&(r.state.visible=!0,r.state.keepAlive=!0),this.navPos&&(this.navPos.state.visible=!1,this.navPos.state.keepAlive=!0)):(r&&(r.state.visible=!1,r.state.keepAlive=!0),this.navPos&&(this.navPos.state.visible=!0,this.navPos.state.keepAlive=!0))}prepareParams(e){const{navigateContexts:n,navigateParams:r}=e,o={navContexts:n,navParams:r},i={context:this.context,params:this.params,data:this.getData()[0]},{resultContext:s,resultParams:l}=On(o,i),c=Object.assign(this.context.clone(),s),u={...this.params,...l};return{context:c,params:u}}async openNavPosView(e){var n;const{context:r,params:o}=this.prepareParams(e);(n=this.navPos)==null||n.openView({key:e.id,context:r,params:o,viewId:e.appViewId})}}N("a0",tl);function _b(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const oo=S({name:"IBizDrBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=ne((...i)=>new tl(...i)),e=B(`control-${t.model.controlType.toLowerCase()}`),n=Le();t.setRouter(n);const r=i=>{t.handleSelectChange(i)},o=i=>{if(!i.hidden)return i.children?a(d("el-sub-menu"),{class:e.b("group"),index:i.tag},{default:()=>i.children.map(s=>o(s)),title:()=>[a(d("iBizIcon"),{class:e.e("icon"),icon:i.sysImage},null),a("span",null,[i.caption])]}):a(d("el-menu-item"),{class:e.e("item"),index:i.tag,disabled:i.disabled},{default:()=>[a(d("iBizIcon"),{class:e.e("icon"),icon:i.sysImage},null),a("span",null,[i.caption])]})};return{c:t,ns:e,handleSelect:r,renderMenuItems:o}},render(){let t;const{isCreated:e,drBarItems:n}=this.c.state;return a(d("iBizControlBase"),{controller:this.c,class:this.ns.b()},{default:()=>{var r;return[e&&a(d("el-menu"),{"default-active":(r=n[0])==null?void 0:r.tag,onSelect:this.handleSelect},_b(t=n.map(o=>this.renderMenuItems(o)))?t:{default:()=>[t]})]}})}});var Bb=Object.defineProperty,Sb=(t,e,n)=>e in t?Bb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ab=(t,e,n)=>(Sb(t,typeof e!="symbol"?e+"":e,n),n);class Fb{constructor(){Ab(this,"component","IBizDrBarControl")}}const xb=N("$",U(oo,function(t){t.component(oo.name,oo),oe(ee.DRBAR,()=>new Fb)}));var Ob=Object.defineProperty,Tb=(t,e,n)=>e in t?Ob(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Nb=(t,e,n)=>(Tb(t,typeof e!="symbol"?e+"":e,n),n);class nl extends Fn{constructor(){super(...arguments),Nb(this,"router")}get navPos(){var e;return(e=this.view.layoutPanel)==null?void 0:e.panelItems.nav_pos}get form(){return this.view.getController("form")}get routeDepth(){return this.view.modal.routeDepth}setRouter(e){this.router=e}getData(){var e;return((e=this.form)==null?void 0:e.getData())||[{}]}initState(){super.initState(),this.state.drTabPages=[]}async onCreated(){await super.onCreated()}async onMounted(){await super.onMounted(),this.form&&(this.form.evt.on("onLoadSuccess",()=>{this.handleFormChange()}),this.form.evt.on("onLoadDraftSuccess",()=>{this.handleFormChange()}),this.form.evt.on("onSaveSuccess",()=>{this.handleFormChange()})),this.initDRTabPages()}handleFormChange(){const e=this.getData()[0].srfuf!==xn.UPDATE;this.setDRTabPagesState(this.state.drTabPages,e)}setDRTabPagesState(e,n){e.forEach(r=>{r.tag!==this.model.uniqueTag&&(r.disabled=n)})}initDRTabPages(){const{editItemCaption:e,editItemCapLanguageRes:n,hideEditItem:r,editItemSysImage:o,uniqueTag:i,dedrtabPages:s}=this.model,l=[];let c=e;n&&(c=ibiz.i18n.t(n.lanResTag,e)),l.push({tag:i,caption:c,hidden:!!r,disabled:!1,sysImage:o,fullPath:this.routeDepth?pa(this.router.currentRoute.value,this.routeDepth):""}),s?.forEach(u=>{let p=u.caption;u.capLanguageRes&&(p=ibiz.i18n.t(u.capLanguageRes.lanResTag,u.caption)),l.push({tag:u.id,caption:p,sysImage:u.sysImage,hidden:!1,disabled:!1})}),this.state.drTabPages=l,this.view.state.srfnav?(this.state.activeName=this.view.state.srfnav,this.handleTabChange()):this.state.activeName=l[0].tag}handleTabChange(){var e;const{activeName:n}=this.state,r=(e=this.model.dedrtabPages)==null?void 0:e.find(o=>o.id===n);r?(this.setVisible("navPos"),this.openNavPosView(r)):(this.setVisible("form"),this.routeDepth&&this.router.push(this.state.drTabPages[0].fullPath))}setVisible(e){var n;const r=(n=this.view.layoutPanel)==null?void 0:n.panelItems.view_form;e==="form"?(r&&(r.state.visible=!0,r.state.keepAlive=!0),this.navPos&&(this.navPos.state.visible=!1,this.navPos.state.keepAlive=!0)):(r&&(r.state.visible=!1,r.state.keepAlive=!0),this.navPos&&(this.navPos.state.visible=!0,this.navPos.state.keepAlive=!0))}prepareParams(e){const{navigateContexts:n,navigateParams:r}=e,o={navContexts:n,navParams:r},i={context:this.context,params:this.params,data:this.getData()[0]},{resultContext:s,resultParams:l}=On(o,i),c=Object.assign(this.context.clone(),s,{currentSrfNav:e.id}),u={...this.params,...l};return{context:c,params:u}}async openNavPosView(e){var n;const{context:r,params:o}=this.prepareParams(e);(n=this.navPos)==null||n.openView({key:e.id,context:r,params:o,viewId:e.appViewId})}}N("a2",nl);function zb(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const ao=S({name:"IBizDrTabControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=ne((...o)=>new nl(...o)),e=B(`control-${t.model.controlType.toLowerCase()}`),n=Le();return t.setRouter(n),{c:t,ns:e,handleTabChange:()=>{t.handleTabChange()}}},render(){let t;const{isCreated:e,drTabPages:n}=this.c.state;return a(d("iBizControlBase"),{controller:this.c,class:this.ns.b()},{default:()=>[e&&a(d("el-tabs"),{modelValue:this.c.state.activeName,"onUpdate:modelValue":r=>this.c.state.activeName=r,onTabChange:this.handleTabChange},zb(t=n.map(r=>a(d("el-tab-pane"),{class:this.ns.e("tab-item"),label:r.caption,disabled:r.disabled,name:r.tag},null)))?t:{default:()=>[t]})]})}});var Rb=Object.defineProperty,$b=(t,e,n)=>e in t?Rb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lb=(t,e,n)=>($b(t,typeof e!="symbol"?e+"":e,n),n);class Mb{constructor(){Lb(this,"component","IBizDrTabControl")}}const Vb=N("a1",U(ao,function(t){t.component(ao.name,ao),oe(ee.DRTAB,()=>new Mb)}));function rl(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}function io(t,e,n){const r=e.providers[t.id],o=e.portlets[t.id],i={modelData:t,controller:o};if(!r)return a("div",null,[R("\u6682\u672A\u652F\u6301"),t.portletType]);const s=d(r.component);if(t.portletType==="CONTAINER"){const l=t;return re(s,{...i,key:t.id},{default:()=>{var c;return(c=l.controls)==null?void 0:c.map(u=>io(u,e))}})}return re(s,{...i,key:t.id})}const so=S({name:"IBizDashboardControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=ne((...o)=>new pi(...o)),e=I([]),n=B(`control-${t.model.controlType.toLowerCase()}`);return t.evt.on("onCreated",()=>{Object.values(t.portlets).forEach(o=>{o.state=me(o.state)})}),{c:t,ns:n,customModelDatas:e,handleCustomModelChange:async o=>{e.value=o.model,await t.initPortlets(e.value)}}},render(){let t;const{state:e,model:n}=this.c,r=()=>a(d("iBizRow"),{class:[this.ns.b()],layout:n.layout},{default:()=>{var i;return[(i=n.controls)==null?void 0:i.map(s=>{var l;let c;return a(d("iBizCol"),{layoutPos:s.layoutPos,state:(l=this.c.portlets[s.id])==null?void 0:l.state},rl(c=io(s,this.c))?c:{default:()=>[c]})})]}}),o=()=>{const i={default:()=>r()};return this.customModelDatas.forEach(s=>{i[s.codeName]=()=>io(s,this.c)}),i};return a(d("iBizControlBase"),{controller:this.c,class:[this.ns.b()]},{default:()=>[e.isCreated&&(n.enableCustomized?a(d("iBizCustomDashboardContainer"),{modelData:this.modelData,dashboard:this.c,onChanged:this.handleCustomModelChange},rl(t=o())?t:{default:()=>[t]}):r())]})}});function Wt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const ol=S({name:"IBizDashboardDesign",props:{dashboard:{type:Object,required:!0},customDashboard:{type:Object,required:!0},isShowDesign:{type:Boolean,required:!0}},emits:["saved"],setup(t,{emit:e}){const n=B("dashboard-design"),r=t.customDashboard,o=z=>{const $=[];return z.forEach(A=>{var T;Object.is(A.type,"app")&&$.push(A);const L=((T=r.model)==null?void 0:T.appDataEntityId)||"app";Object.is(A.appCodeName,L)&&$.push(A)}),$},i=(z,$)=>{let A=z.find(L=>Object.is($.groupCodeName,L.type));A||(A={},Object.assign(A,{type:$.groupCodeName,name:$.groupName,children:[]}),z.push(A)),A.children.find(L=>Object.is(L.portletCodeName,$.portletCodeName))||A.children.push($)},s=z=>{const $=[];return z.forEach(A=>{let T=$.find(L=>Object.is(A.type,L.type));T||(T={},Object.assign(T,{type:A.type,name:Object.is(A.type,"app")?"\u5168\u5C40":A.appName,children:[]}),$.push(T)),i(T.children,A)}),$},l=z=>{const $=[];return z.forEach(A=>{const T=$.find(L=>Object.is(L.value,A.groupCodeName));T?T.children.find(X=>Object.is(X.portletCodeName,A.portletCodeName))||T.children.push(A):$.push({name:A.groupName,value:A.groupCodeName,children:[A]})}),$},u=(()=>{const z=[],$=ibiz.hub.getApp(ibiz.env.appId);$.model.appPortletCats&&$.model.appPortlets&&$.model.appPortlets.forEach(X=>{var Y;const Z=(Y=$.model.appPortletCats)==null?void 0:Y.find(he=>{var ce;return he.codeName===((ce=X.appPortletCat)==null?void 0:ce.codeName)}),se={type:"app",portletCodeName:X.codeName,portletName:X.name,portletImage:X.control.sysImage,groupCodeName:Z?.codeName||"",groupName:Z?.name||"",appCodeName:X.appDataEntityId||$.model.pkgcodeName,appName:$.model.name};z.push(se)});const A=o(z),T=s(A),L=l(A);return{portlets:A,list:T.reverse(),groups:L}})(),p=I(u.portlets),m=I(u.list),v=I(u.groups),g=I(""),b=I(Ee(r.customModelData)),h=I({}),f=I({}),w=I(null),P=F(()=>{let z=[];return g.value?z=[g.value]:m.value.forEach(($,A)=>{z.push($.type+A),$.children.forEach((T,L)=>{z.push(T.type+L)})}),z}),_=async z=>{z?.length&&await Promise.all(z.map(async $=>{const A=await hi($);if(A){h.value[$.id]=A;const T=await A.createController($,t.dashboard);f.value[$.id]=T}}))},y=z=>{const $=ibiz.hub.getApp(ibiz.env.appId);if($.model.appPortlets){const A=$.model.appPortlets.find(T=>{var L;return((L=T.control)==null?void 0:L.codeName)===z});if(A)return A.control}},D=z=>{const $=[];return z.length>0&&z.forEach(A=>{const T=y(A.portletCodeName);T&&$.push(T)}),$},E=async()=>{const z=D(b.value);await _(z)};G(()=>t.isShowDesign,async z=>{if(z){const $=await r.loadCustomModelData();b.value=Ee($),await E()}},{immediate:!0});const x=z=>!!b.value.find(A=>A.i===z.portletCodeName),O=()=>{b.value=[]},V=async()=>{const z=await r.saveCustomModelData(b.value);e("saved",{model:z})},q=async z=>{const $=b.value.indexOf(z);if($!==-1){b.value.splice($,1);const A=y(z.portletCodeName);A&&await f.value[A.id].destroyed()}},M=I(0),K=async z=>{const $=w.value;$&&(M.value=$.scrollHeight+3*r.layoutRowH);let A=0;for(const T of b.value)T.y>A&&(A=T.y);if(b.value.push({w:4,h:3,x:0,y:A+3,i:z.portletCodeName,...z}),await E(),$){const T=setInterval(()=>{$.scrollHeight>=M.value&&($.scrollTo({top:$.scrollHeight,behavior:"smooth"}),clearInterval(T))},50)}},H=z=>{r.layoutColNum=z},Q=z=>{r.layoutRowH=z},k=F(()=>`calc((100% - 10px) / ${r.layoutColNum}) ${r.layoutRowH+10}px`);return Re(async()=>{const z=Object.values(f.value);await Promise.all(z.map(async $=>{await $.destroyed()}))}),{ns:n,customC:r,portlets:p,list:m,groups:v,filterVal:g,defaultOpens:P,layoutModel:b,onReset:O,onSave:V,removeItem:q,addLayoutItem:K,handleColNumberChange:H,handleRolHChange:Q,isDisabled:x,providers:h,portletControllers:f,getPortletByCodeName:y,maskSize:k,designPanel:w}},render(){let t,e;const n=i=>a(d("el-menu-item"),{key:i.portletCodeName,index:i.portletCodeName,tag:i.portletCodeName,disabled:this.isDisabled(i)},{default:()=>[a("span",null,[a("ion-icon",{icon:i.portletImage},null),i.portletName]),a("ion-icon",{title:"\u6DFB\u52A0",name:"arrow-forward-outline",onClick:()=>this.addLayoutItem(i)},null)]}),r=()=>{let i,s;return this.filterVal?a(d("el-menu"),{"default-openeds":this.defaultOpens,class:this.ns.is("filter",!0),key:this.filterVal},Wt(i=this.groups.map(l=>l.value===this.filterVal?a(d("el-sub-menu"),{key:l.value,index:l.value},{title:()=>l.name,default:()=>l.children.map(c=>n(c))}):null))?i:{default:()=>[i]}):a(d("el-menu"),{class:this.ns.is("no-filter",!0),"default-openeds":this.defaultOpens,key:"default"},Wt(s=this.list.map((l,c)=>a(d("el-sub-menu"),{key:l.type+c,index:l.type+c},{title:()=>l.type==="app"?"\u5168\u5C40":l.name,default:()=>l.children.map((u,p)=>a(d("el-sub-menu"),{key:u.type+p,index:u.type+p},{title:()=>u.name,default:()=>u.children.map(m=>n(m))}))})))?s:{default:()=>[s]})},o=i=>{const s=this.getPortletByCodeName(i.portletCodeName);if(s){const l=this.providers[s.id],c=this.portletControllers[s.id],u={modelData:s,controller:c};if(!l)return a("div",null,[R("\u6682\u672A\u652F\u6301"),s.portletType]);const p=d(l.component);return re(p,{...u,key:s.id})}};return a("div",{class:this.ns.b()},[a("div",{class:this.ns.b("header")},[a("span",null,[R("\u81EA\u5B9A\u4E49\u95E8\u6237")]),a("span",{class:this.ns.b("header-utils")},[a("div",{class:this.ns.be("header-utils","col-num")},[R("\u5217\u6570\uFF1A"),a(d("el-input-number"),{modelValue:this.customC.layoutColNum,"onUpdate:modelValue":i=>this.customC.layoutColNum=i,onChange:this.handleColNumberChange},null)]),a("div",{class:this.ns.be("header-utils","row-h")},[R("\u5355\u5143\u683C\u9AD8\u5EA6\uFF1A"),a(d("el-input-number"),{modelValue:this.customC.layoutRowH,"onUpdate:modelValue":i=>this.customC.layoutRowH=i,onChange:this.handleRolHChange},null)]),a(d("el-button"),{class:this.ns.be("header-utils","reset"),onClick:this.onReset},{default:()=>[R("\u6062\u590D\u9ED8\u8BA4")]}),a(d("el-button"),{class:this.ns.be("header-utils","save"),onClick:this.onSave},{default:()=>[R("\u4FDD\u5B58")]})])]),a("div",{class:this.ns.b("content")},[a("div",{class:this.ns.b("tree")},[a(d("el-select"),{modelValue:this.filterVal,"onUpdate:modelValue":i=>this.filterVal=i,clearable:!0,class:this.ns.b("tree-filter")},Wt(t=this.groups.map(i=>a(d("el-option"),{key:i.value,value:i.value,label:i.name},null)))?t:{default:()=>[t]}),a("div",{class:this.ns.b("tree-content")},[r()])]),a("div",{class:this.ns.b("scroll-box"),ref:"designPanel"},[a("div",{class:this.ns.b("panel")},[a("div",{class:this.ns.b("grid-layout-mask"),style:{backgroundSize:this.maskSize}},null),a(d("grid-layout"),{class:this.ns.b("grid-layout"),layout:this.layoutModel,"col-num":this.customC.layoutColNum,"row-height":this.customC.layoutRowH,"is-draggable":!0,"is-resizable":!0,"is-mirrored":!1,"vertical-compact":!0,margin:[10,10],"use-css-transforms":!0,style:{maxHeight:"100%"}},Wt(e=this.layoutModel.map(i=>a(d("grid-item"),{x:i.x,y:i.y,w:i.w,h:i.h,i:i.i,key:i.i},{default:()=>[a(d("el-card"),{class:this.ns.b("grid-layout-item")},{default:()=>[a("div",{class:this.ns.b("grid-layout-item-header")},[a("span",null,[i.portletName]),a("ion-icon",{name:"close-outline",onClick:()=>this.removeItem(i)},null)]),a("div",{class:this.ns.b("grid-layout-item-content")},[o(i)])]})]})))?e:{default:()=>[e]})])])])])}}),al=S({name:"IBizCustomDashboardContainer",props:{modelData:{type:Object,required:!0},dashboard:{type:Object,required:!0}},setup(t,{emit:e}){const n=B("custom-dashboard-container"),r=me(new mi(t.modelData)),o=I(!1),i=I(!1),s=I(!1),l=()=>{i.value=!0},c=g=>{s.value=g==="left"},u=g=>{const b=ibiz.hub.getApp(ibiz.env.appId);if(b.model.appPortlets){const h=b.model.appPortlets.find(f=>{var w;return((w=f.control)==null?void 0:w.codeName)===g});if(h)return h.control}},p=g=>{const b=[];return g.length>0&&g.forEach(h=>{const f=u(h.portletCodeName);f&&b.push(f)}),b},m=g=>{i.value=!1;const b=p(g.model);e("changed",{model:b})},v=F(()=>r.customModelData.length===0);return Pe(async()=>{const g=await r.loadCustomModelData(),b=p(g);e("changed",{model:b}),o.value=!0}),{ns:n,customC:r,isShowDesign:i,isInited:o,isShowDefault:v,showTypeDir:s,openDesign:l,onSaved:m,clickCollapse:c}},render(){var t,e;return a("div",{class:[this.ns.b()]},[a("div",{class:this.ns.b("build-btn")},[this.showTypeDir?a("div",null,[a(d("el-button"),{class:this.ns.b("deisgn-btn"),onClick:this.openDesign},{default:()=>[a("ion-icon",{name:"build-outline"},null)]}),a(d("el-button"),{class:this.ns.b("forward-btn"),onClick:()=>this.clickCollapse("right")},{default:()=>[a("ion-icon",{name:"chevron-forward-outline"},null)]})]):a(d("el-button"),{class:this.ns.b("back-btn"),onClick:()=>this.clickCollapse("left")},{default:()=>[a("ion-icon",{name:"chevron-back-outline"},null)]})]),a(d("el-drawer"),{modelValue:this.isShowDesign,"onUpdate:modelValue":n=>this.isShowDesign=n,"with-header":!1,size:"80%","modal-class":"custom-dashboard-drawer"},{default:()=>[this.isShowDesign&&a(d("iBizDashboardDesign"),{dashboard:this.dashboard,"custom-dashboard":this.customC,"is-show-design":this.isShowDesign,onSaved:this.onSaved},null)]}),this.isInited&&(this.isShowDefault?(e=(t=this.$slots).default)==null?void 0:e.call(t):this.customC.customModelData.map(n=>{var r,o;const i={position:"absolute",height:`${n.h*this.customC.layoutRowH}px`,width:`calc(100% / ${this.customC.layoutColNum} * ${n.w})`,top:`${n.y*this.customC.layoutRowH}px`,left:`calc(100% / ${this.customC.layoutColNum} * ${n.x})`};return a("div",{style:i},[(o=(r=this.$slots)[n.portletCodeName])==null?void 0:o.call(r)])}))])}});var jb=Object.defineProperty,kb=(t,e,n)=>e in t?jb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ub=(t,e,n)=>(kb(t,typeof e!="symbol"?e+"":e,n),n);class Gb{constructor(){Ub(this,"component","IBizDashboardControl")}}function lo(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const co=N("a5",S({name:"IBizContainerPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Tn,required:!0}},setup(t){var e;return{ns:B(`portlet-${(e=t.modelData.portletType)==null?void 0:e.toLowerCase()}`)}},render(){var t,e;let n;const r=((e=(t=this.$slots).default)==null?void 0:e.call(t))||[],o=a(d("iBizRow"),{layout:this.modelData.layout},lo(n=r.map(s=>{const l=s.props;return!l||!l.controller?s:a(d("iBizCol"),{layoutPos:l.modelData.layoutPos,state:l.controller.state},lo(s)?s:{default:()=>[s]})}))?n:{default:()=>[n]}),i=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass];return a(d("iBizPortletLayout"),{controller:this.controller,class:i},lo(o)?o:{default:()=>[o]})}}));var qb=Object.defineProperty,Wb=(t,e,n)=>e in t?qb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hb=(t,e,n)=>(Wb(t,typeof e!="symbol"?e+"":e,n),n);class Kb{constructor(){Hb(this,"component","IBizContainerPortlet")}async createController(e,n,r){const o=new Tn(e,n,r);return await o.init(),o}}const Xb=N("a4",U(co,function(t){t.component(co.name,co),xe("CONTAINER",()=>new Kb)})),il=N("a6",S({name:"IBizPortletLayout",props:{controller:{type:fi,required:!0}},setup(t){const e=B("portlet-layout"),n=t.controller,r=F(()=>n.model.showTitleBar&&(n.model.title||n.model.sysImage)||n.model.uiactionGroup);return{c:n,ns:e,isShowHeader:r,onActionClick:async(i,s)=>{await t.controller.onActionClick(i,s)}}},render(){var t,e;const{model:n,state:r}=this.controller;let o=n.title;return n.titleLanguageRes&&(o=ibiz.i18n.t(n.titleLanguageRes.lanResTag,n.title)),a("div",{class:[this.ns.b(),this.ns.is("no-header",!this.isShowHeader)]},[this.isShowHeader&&a("div",{key:"header",class:this.ns.b("header")},[a("div",{class:this.ns.be("header","left")},[n.showTitleBar&&a("div",{class:this.ns.e("caption")},[a(d("iBizIcon"),{class:this.ns.e("caption-icon"),icon:n.sysImage},null),a("span",{class:this.ns.e("caption-text"),title:o},[o])])]),a("div",{class:this.ns.be("header","right")},[n.uiactionGroup&&a(d("iBizActionToolbar"),{class:this.ns.e("toolbar"),"action-details":n.uiactionGroup.uiactionGroupDetails,"actions-state":r.actionGroupState,onActionClick:this.onActionClick},null)])]),a("div",{key:"content",class:this.ns.b("content")},[(e=(t=this.$slots).default)==null?void 0:e.call(t)])])}}));function Yb(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const uo=N("a8",S({name:"IBizViewPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Nn,required:!0}},setup(t){var e;const n=B(`portlet-${(e=t.modelData.portletType)==null?void 0:e.toLowerCase()}`),r=t.modelData.portletAppView;return{ns:n,view:r}},render(){let t;const e=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],{context:n,params:r}=this.controller;return a(d("iBizPortletLayout"),{controller:this.controller,class:e},Yb(t=re(d("IBizViewShell"),{context:n,params:r,modelData:this.view}))?t:{default:()=>[t]})}}));var Jb=Object.defineProperty,Qb=(t,e,n)=>e in t?Jb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Zb=(t,e,n)=>(Qb(t,typeof e!="symbol"?e+"":e,n),n);class ev{constructor(){Zb(this,"component","IBizViewPortlet")}async createController(e,n,r){const o=new Nn(e,n,r);return await o.init(),o}}const tv=N("a7",U(uo,function(t){t.component(uo.name,uo),xe("VIEW",()=>new ev)}));function sl(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const ll=S({name:"IBizAppMenuPortletControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},collapse:Boolean,currentPath:String},setup(){var t;const e=ne((...c)=>new mn(...c)),n=B(`control-${e.model.controlType.toLowerCase()}-portlet`),r=I(""),o=I([]);(t=e.model.appMenuItems)==null||t.forEach(c=>{c.itemType==="MENUITEM"&&o.value.push(c.id)});const i=async(c,u)=>{await e.onClickMenuItem(c,u)},s=c=>{if(!e.state.menuItemsState[c.id].visible)return null;let p=c.caption;return c.capLanguageRes&&(p=ibiz.i18n.t(c.capLanguageRes.lanResTag,c.caption)),a("div",{class:[n.b("item"),n.is("disabled",!c.appFuncId)],title:c.tooltip||c.caption,onClick:m=>{c.appFuncId&&i(c.id,m)}},[a(d("iBizIcon"),{class:n.be("item","icon"),icon:c.sysImage},null),a("span",{class:n.be("item","label")},[p])])};return{c:e,ns:n,defaultActive:r,defaultOpens:o,onClick:i,renderGroup:c=>e.state.menuItemsState[c.id].visible?a(d("el-collapse-item"),{class:n.b("group"),name:c.id,title:c.caption},{default:()=>{var p;return[(p=c.appMenuItems)==null?void 0:p.map(m=>s(m))]}}):null,renderItem:s}},render(){var t;const{state:e,model:n}=this.c;let r=null;if(e.isCreated&&((t=n.appMenuItems)!=null&&t.length)){let o;r=a(d("el-collapse"),{class:this.ns.e("content"),modelValue:this.defaultOpens,"onUpdate:modelValue":i=>this.defaultOpens=i},sl(o=n.appMenuItems.map(i=>i.itemType!=="MENUITEM"?null:this.renderGroup(i)))?o:{default:()=>[o]})}return a(d("iBizControlBase"),{class:[this.ns.b()],controller:this.c},sl(r)?r:{default:()=>[r]})}}),po=N("aa",S({name:"IBizMenuPortlet",props:{modelData:{type:Object,required:!0},controller:{type:zn,required:!0}},setup(t){var e,n;const r=B(`portlet-${(e=t.modelData.portletType)==null?void 0:e.toLowerCase()}`),o=(n=t.modelData.controls)==null?void 0:n.find(i=>i.controlType===ee.APP_MENU);return{ns:r,menu:o}},render(){const t=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],{context:e,params:n}=this.controller;return a(d("iBizPortletLayout"),{controller:this.controller,class:t},{default:()=>[this.menu&&a(d("iBizAppMenuPortletControl"),{modelData:this.menu,context:e,params:n},null)]})}}));var nv=Object.defineProperty,rv=(t,e,n)=>e in t?nv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ov=(t,e,n)=>(rv(t,typeof e!="symbol"?e+"":e,n),n);class av{constructor(){ov(this,"component","IBizMenuPortlet")}async createController(e,n,r){const o=new zn(e,n,r);return await o.init(),o}}const iv=N("a9",U(po,function(t){t.component(po.name,po),t.component(ll.name,ll),xe("APPMENU",()=>new av)}));function sv(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const ho=N("ac",S({name:"IBizChartPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Rn,required:!0}},setup(t){var e,n;const r=B(`portlet-${(e=t.modelData.portletType)==null?void 0:e.toLowerCase()}`),o=(n=t.modelData.controls)==null?void 0:n.find(i=>i.controlType===ee.CHART);return{ns:r,chart:o}},render(){let t;const e=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],{context:n,params:r}=this.controller;return a(d("iBizPortletLayout"),{controller:this.controller,class:e},sv(t=re(d("IBizChartControl"),{context:n,params:r,modelData:this.chart}))?t:{default:()=>[t]})}}));var lv=Object.defineProperty,cv=(t,e,n)=>e in t?lv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uv=(t,e,n)=>(cv(t,typeof e!="symbol"?e+"":e,n),n);class dv{constructor(){uv(this,"component","IBizChartPortlet")}async createController(e,n,r){const o=new Rn(e,n,r);return await o.init(),o}}const pv=N("ab",U(ho,function(t){t.component(ho.name,ho),xe("CHART",()=>new dv)}));function hv(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const mo=N("ae",S({name:"IBizRawItemPortlet",props:{modelData:{type:Object,required:!0},controller:{type:$n,required:!0}},setup(t){var e;const n=B(`portlet-${(e=t.modelData.portletType)==null?void 0:e.toLowerCase()}`),r=t.modelData;return{ns:n,rawItem:r}},render(){let t;const e=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass];return a(d("iBizPortletLayout"),{controller:this.controller,class:e},hv(t=re(d("iBizRawItem"),{rawItem:this.rawItem}))?t:{default:()=>[t]})}}));var mv=Object.defineProperty,fv=(t,e,n)=>e in t?mv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bv=(t,e,n)=>(fv(t,typeof e!="symbol"?e+"":e,n),n);class vv{constructor(){bv(this,"component","IBizRawItemPortlet")}async createController(e,n,r){const o=new $n(e,n,r);return await o.init(),o}}const gv=N("ad",U(mo,function(t){t.component(mo.name,mo),xe("RAWITEM",()=>new vv)}));function Cv(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const fo=N("ag",S({name:"IBizListPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Ln,required:!0}},setup(t){var e,n;const r=B(`portlet-${(e=t.modelData.portletType)==null?void 0:e.toLowerCase()}`),o=(n=t.modelData.controls)==null?void 0:n.find(i=>i.controlType===ee.LIST);return{ns:r,list:o}},render(){let t;const e=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass],{context:n,params:r}=this.controller;return a(d("iBizPortletLayout"),{controller:this.controller,class:e},Cv(t=re(d("IBizListControl"),{context:n,params:r,modelData:this.list}))?t:{default:()=>[t]})}}));var wv=Object.defineProperty,yv=(t,e,n)=>e in t?wv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pv=(t,e,n)=>(yv(t,typeof e!="symbol"?e+"":e,n),n);class Ev{constructor(){Pv(this,"component","IBizListPortlet")}async createController(e,n,r){const o=new Ln(e,n,r);return await o.init(),o}}const Iv=N("af",U(fo,function(t){t.component(fo.name,fo),xe("LIST",()=>new Ev)})),bo=N("ai",S({name:"IBizHtmlPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Mn,required:!0}},setup(t){var e;return{ns:B(`portlet-${(e=t.modelData.portletType)==null?void 0:e.toLowerCase()}`)}},render(){const t=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass];return a(d("iBizPortletLayout"),{controller:this.controller,class:t},{default:()=>[a("iframe",{src:this.modelData.pageUrl},null)]})}}));var Dv=Object.defineProperty,_v=(t,e,n)=>e in t?Dv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bv=(t,e,n)=>(_v(t,typeof e!="symbol"?e+"":e,n),n);class Sv{constructor(){Bv(this,"component","IBizHtmlPortlet")}async createController(e,n,r){const o=new Mn(e,n,r);return await o.init(),o}}const Av=N("ah",U(bo,function(t){t.component(bo.name,bo),xe("HTML",()=>new Sv)})),vo=N("ak",S({name:"IBizActionBarPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Vn,required:!0}},setup(t){var e;return{ns:B(`portlet-${(e=t.modelData.portletType)==null?void 0:e.toLowerCase()}`),onActionClick:async(o,i)=>{await t.controller.onActionClick(o,i)}}},render(){const t=[this.ns.b(),this.ns.m(this.modelData.codeName),...this.controller.containerClass];return a(d("iBizPortletLayout"),{controller:this.controller,class:t},{default:()=>[this.modelData.uiactionGroup&&a(d("iBizActionToolbar"),{"action-details":this.modelData.uiactionGroup.uiactionGroupDetails,"actions-state":this.controller.state.actionGroupState,onActionClick:this.onActionClick},null)]})}}));var Fv=Object.defineProperty,xv=(t,e,n)=>e in t?Fv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ov=(t,e,n)=>(xv(t,typeof e!="symbol"?e+"":e,n),n);class Tv{constructor(){Ov(this,"component","IBizActionBarPortlet")}async createController(e,n,r){const o=new Vn(e,n,r);return await o.init(),o}}const Nv=N("aj",U(vo,function(t){t.component(vo.name,vo),xe("ACTIONBAR",()=>new Tv)})),zv=N("a3",U(so,function(t){t.component(so.name,so),t.component(ol.name,ol),t.component(al.name,al),oe(ee.DASHBOARD,()=>new Gb),t.component(il.name,il),t.use(Xb),t.use(tv),t.use(iv),t.use(pv),t.use(gv),t.use(Iv),t.use(Av),t.use(Nv)}));function Rv(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const go=S({name:"IBizCalendarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},loadDefault:{type:Boolean,default:!0}},setup(){const t=ne((...i)=>new bi(...i)),e=B(`control-${t.model.controlType.toLowerCase()}`),n=I(),r=i=>{n.value&&n.value.selectDate(i)};return G(()=>t.state.selectedDate,(i,s)=>{const l=_e(i).format("YYYY-MM"),c=_e(s).format("YYYY-MM");l!==c&&t.load()}),{c:t,ns:e,calendarRef:n,selectDate:r,calcItemStyle:i=>({color:i.color,backgroundColor:i.bkColor})}},render(){let t;const e=(u,p)=>{const{context:m,params:v}=this.c,g=this.c.state.selectedData.findIndex(f=>f.deData.srfkey===u.deData.srfkey),b=[this.ns.b("item"),this.ns.is("active",g!==-1)],h=this.calcItemStyle(u);return a(d("iBizControlShell"),{class:b,data:u.deData,modelData:p,context:m,params:v,style:h,onClick:f=>(f.stopPropagation(),this.c.onRowClick(u)),onDblclick:f=>(f.stopPropagation(),this.c.onDbRowClick(u))},null)},n=u=>{const p=this.c.state.selectedData.findIndex(g=>g.deData.srfkey===u.deData.srfkey),m=[this.ns.b("item"),this.ns.is("active",p!==-1)],v=this.calcItemStyle(u);return a("div",{class:m,key:u.deData.srfkey,style:v,onClick:()=>this.c.onRowClick(u),onDblclick:()=>this.c.onDbRowClick(u)},[`${u.text}`])},r=u=>u.map(p=>{var m;const g=((m=this.c.model.sysCalendarItems)==null?void 0:m.find(b=>p.itemType===b.itemType)).layoutPanel;return g?e(p,g):n(p)}),o=u=>{const p=_e(u).format("YYYY-MM-DD"),m=this.c.state.items.filter(v=>{const g=new Date(v.beginTime);return p===_e(g).format("YYYY-MM-DD")});return r(m)},i=()=>{var u;return a("div",{class:this.ns.b("content")},[a(d("el-calendar"),{modelValue:this.c.state.selectedDate,"onUpdate:modelValue":p=>this.c.state.selectedDate=p,ref:"calendarRef"},{header:({date:p})=>[a("span",null,[p]),a("div",{class:this.ns.b("content-header")},[a(d("el-date-picker"),{modelValue:this.c.state.selectedDate,"onUpdate:modelValue":m=>this.c.state.selectedDate=m,type:"month"},null),a(d("el-button-group"),null,{default:()=>[a(d("el-button"),{size:"small",onClick:()=>{this.selectDate("prev-year")}},{default:()=>[R("\u53BB\u5E74")]}),a(d("el-button"),{size:"small",onClick:()=>{this.selectDate("prev-month")}},{default:()=>[R("\u4E0A\u4E2A\u6708")]}),a(d("el-button"),{size:"small",onClick:()=>{this.selectDate("today")}},{default:()=>[R("\u4ECA\u5929")]}),a(d("el-button"),{size:"small",onClick:()=>{this.selectDate("next-month")}},{default:()=>[R("\u4E0B\u4E2A\u6708")]}),a(d("el-button"),{size:"small",onClick:()=>{this.selectDate("next-year")}},{default:()=>[R("\u660E\u5E74")]})]})])],"date-cell":({data:p})=>{const{date:m}=p;return a("div",{class:this.ns.b("day")},[a("p",{class:this.ns.b("date-text")},[m.getDate()]),a("div",{class:this.ns.b("items")},[o(m)])])}}),a("div",{class:this.ns.b("footer")},[(u=this.c.model.sysCalendarItems)==null?void 0:u.map(p=>{let m=p.name;return p.nameLanguageRes&&(m=ibiz.i18n.t(p.nameLanguageRes.lanResTag,p.name)),a("div",{class:this.ns.e("calendar-item")},[a("div",{class:this.ns.e("icon"),style:{background:p.bkcolor,color:p.color}},null),m])})])])},s=()=>{const{isLoaded:u}=this.c.state;return u&&a(d("iBizNoData"),{text:this.c.model.emptyText,emptyTextLanguageRes:this.c.model.emptyTextLanguageRes},null)},l=()=>a("div",{class:this.ns.b("timeline-content")},[a(d("el-timeline"),null,{default:()=>[this.c.state.items.length>0?this.c.state.items.map(u=>{var p;const m=(p=this.c.model.sysCalendarItems)==null?void 0:p.find(v=>u.itemType===v.itemType);return a(d("el-timeline-item"),{key:u.id,placement:"top",color:u.bkColor,timestamp:u.beginTime},{default:()=>[m?.layoutPanel?e(u,m.layoutPanel):n(u)]})}):s()]})]),c=()=>{switch(this.c.model.calendarStyle){case"TIMELINE":return l();default:return i()}};return a(d("iBizControlBase"),{controller:this.c},Rv(t=c())?t:{default:()=>[t]})}});var $v=Object.defineProperty,Lv=(t,e,n)=>e in t?$v(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mv=(t,e,n)=>(Lv(t,typeof e!="symbol"?e+"":e,n),n);class Vv{constructor(){Mv(this,"component","IBizCalendarControl")}}const jv=N("al",U(go,function(t){t.component(go.name,go),oe(ee.CALENDAR,()=>new Vv)})),Co=S({name:"IBizKanbanControl",components:{draggable:Hn},props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},loadDefault:{type:Boolean,default:!0}},setup(t){var e;const n=ne((...w)=>new vi(...w)),r=B(`control-${n.model.controlType.toLowerCase()}`),o=F(()=>!n.state.draggable||n.state.updating),i=((e=n.model.groupSysCss)==null?void 0:e.cssName)||"",s={};switch(n.model.groupLayout){case"ROW":s.width=`${n.model.groupWidth||300}px`,s.height="100%";break;case"COLUMN":s.width="100%",s.height=`${n.model.height||500}px`;break}const l=(w,P)=>(P.stopPropagation(),n.onRowClick(w)),c=(w,P)=>(P.stopPropagation(),n.onDbRowClick(w)),u=(w,P)=>{const{context:_,params:y}=n;return a(d("iBizControlShell"),{data:w,modelData:P,context:_,params:y},null)},p=w=>{var P;return a(d("iBizActionToolbar"),{class:r.bem("item","bottom","actions"),"action-details":(P=n.getOptItemModel().deuiactionGroup)==null?void 0:P.uiactionGroupDetails,"actions-state":n.getOptItemAction(w),onActionClick:(_,y)=>n.onActionClick(_,w,y)},null)},m=w=>[a("div",{class:r.be("item","top")},[a("div",{class:r.bem("item","top","title")},[w.srfmajortext]),a("div",{class:r.bem("item","top","description")},[w.content])]),n.getOptItemModel()?a("div",{class:r.be("item","bottom")},[p(w)]):null],v=w=>{const P=n.state.selectedData.findIndex(E=>E.srfkey===w.srfkey),_=[r.b("item"),r.is("selected",P!==-1),r.is("disabled",o.value)],y={};n.model.cardWidth&&(y.width=`${n.model.cardWidth}px`),n.model.cardHeight&&(y.height=`${n.model.cardHeight}px`);const D=t.modelData.itemLayoutPanel;return a(d("el-card"),{shadow:"hover",class:_,"body-style":y,onClick:E=>l(w,E),onDblclick:E=>c(w,E)},{default:()=>[D?u(w,D):m(w)]})},g=()=>{if(n.state.isLoaded)return a(d("iBizNoData"),{text:n.model.emptyText,emptyTextLanguageRes:n.model.emptyTextLanguageRes},null)};let b=null;const h=(w,P)=>{w.moved&&n.onDragChange({from:P,to:P,fromIndex:w.moved.oldIndex,toIndex:w.moved.newIndex}),w.added&&(b={to:P,toIndex:w.added.newIndex}),w.removed&&(b&&(b.from=P,b.fromIndex=w.removed.oldIndex,n.onDragChange(b)),b=null)};return{c:n,ns:r,renderGroup:w=>a("div",{class:[r.b("group"),i],style:s},[a("div",{style:{},class:r.be("group","header")},[a("span",{class:r.be("group","header-caption")},[w.caption]),a("span",{class:r.be("group","header-right")},[n.enableNew&&a(d("el-button"),{class:r.be("group","header-new"),text:!0,circle:!0,onClick:P=>{n.onClickNew(P,w.key)}},{default:()=>[a("ion-icon",{name:"add-outline",title:"\u65B0\u5EFA"},null)]}),n.model.groupUIActionGroup&&w.groupActionGroupState&&a(d("iBizActionToolbar"),{class:r.be("group","header-actions"),"action-details":n.model.groupUIActionGroup.uiactionGroupDetails,caption:"...",mode:"dropdown","actions-state":n.state.groupActionGroupState,onActionClick:(P,_)=>{n.onGroupToolbarClick(P,_,w)}},null)])]),a(Hn,{class:r.be("group","list"),modelValue:w.children,group:n.model.id,itemKey:"srfkey",disabled:o.value,onChange:P=>h(P,w.key)},{item:({element:P})=>v(P),header:()=>w.children.length?null:a("div",{class:r.be("group","list")},[g()])})])}},render(){var t;const{groups:e,isCreated:n}=this.c.state;return a(d("iBizControlBase"),{controller:this.c,class:[this.ns.m((t=this.modelData.groupLayout)==null?void 0:t.toLowerCase())]},{default:()=>[n&&e.length>0&&e.map(r=>this.renderGroup(r))]})}});var kv=Object.defineProperty,Uv=(t,e,n)=>e in t?kv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gv=(t,e,n)=>(Uv(t,typeof e!="symbol"?e+"":e,n),n);class qv{constructor(){Gv(this,"component","IBizKanbanControl")}}const Wv=N("am",U(Co,function(t){t.component(Co.name,Co),oe(ee.KANBAN,()=>new qv)})),wo=S({name:"IBizTreeGridExControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup(){const t=ne((...u)=>new gi(...u)),e=B(`control-${t.model.controlType.toLowerCase()}`),n=B("control-grid"),r=()=>{const{isLoaded:u}=t.state;return u&&a(d("iBizNoData"),{text:t.model.emptyText,emptyTextLanguageRes:t.model.emptyTextLanguageRes},null)},o=F(()=>{const u=[];return t.state.columnStates.forEach(p=>{var m,v;if(p.hidden)return;const g=((m=t.fieldColumns[p.key])==null?void 0:m.model)||((v=t.uaColumns[p.key])==null?void 0:v.model);g&&u.push(g)}),u}),i=u=>t.state.items.find(p=>p.id===u),s=u=>(u.hasChildren=!u.leaf,u),l=F(()=>t.state.isLoaded?t.model.rootVisible?t.state.rootNodes:t.state.rootNodes.reduce((u,p)=>(s(p),p.children?u.concat(p.children.map(s)):u),[]):[]);return{c:t,ns:n,ns2:e,treeData:l,renderColumns:o,renderNoData:r,loadData:async(u,p,m)=>{let v;if(u.level===0)v=l.value;else{const g=i(u.id);g.children?v=g.children:v=await t.loadNodes(g)}m(v)}}},render(){const t=this.c.state,e=(n,r)=>{var o;if(n.hideDefault)return null;const{codeName:i,width:s}=n,l=this.c.columns[i],c=this.c.state.columnStates.find(m=>m.key===i),p=r===this.renderColumns.length-1?"min-width":"width";return a(d("el-table-column"),zt({label:n.caption,prop:i},{[p]:s},{fixed:c.fixed,sortable:n.enableSort?"custom":!1,align:((o=n.align)==null?void 0:o.toLowerCase())||"center"}),{default:({row:m})=>{const v=m,g=t.items.find(b=>b.srfkey===v.srfkey);if(g){Object.assign(g,{data:g.deData});const b=d(this.c.providers[i].component);return re(b,{controller:l,row:g,key:v.srfkey+i})}return null}})};return a(d("iBizControlBase"),{controller:this.c,class:[this.ns.b(),this.ns2.b()]},{default:()=>[this.c.state.isLoaded&&a(d("el-table"),{ref:"tableRef",class:this.ns.e("table"),border:!0,"row-key":"id",lazy:!0,data:this.treeData,"tree-props":{children:"children",hasChildren:"hasChildren"},load:this.loadData},{empty:this.renderNoData,default:()=>[this.renderColumns.map((n,r)=>e(n,r))]})]})}});var Hv=Object.defineProperty,Kv=(t,e,n)=>e in t?Hv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xv=(t,e,n)=>(Kv(t,typeof e!="symbol"?e+"":e,n),n);class Yv{constructor(){Xv(this,"component","IBizTreeGridExControl")}}const Jv=N("an",U(wo,function(t){t.component(wo.name,wo),oe(ee.TREE_GRIDEX,()=>new Yv)})),yo=S({name:"IBizTreeGridControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},singleSelect:{type:Boolean,default:void 0},rowEditOpen:{type:Boolean,default:void 0},isSimple:{type:Boolean,required:!1},data:{type:Array,required:!1},loadDefault:{type:Boolean,default:!0}},setup(t){const e=ne((...O)=>new Ci(...O)),n=B("control-grid"),r=B(`control-${e.model.controlType.toLowerCase()}`),{tableRef:o,onRowClick:i,onDbRowClick:s,onSelectionChange:l,onSortChange:c,handleRowClassName:u}=Dr(e),{onPageChange:p,onPageRefresh:m,onPageSizeChange:v}=$s(e),{renderColumns:g,defaultSort:b,summaryMethod:h}=_r(e,t),{renderPopover:f}=Ls(o,e);let w="",P="";(()=>{var O,V;const q=(O=e.model.degridColumns)==null?void 0:O.find(K=>K.treeColumnMode===4||K.treeColumnMode===12),M=(V=e.model.degridColumns)==null?void 0:V.find(K=>K.treeColumnMode===2||K.treeColumnMode===3);if(!q)throw new be(e.model,"\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");if(!M)throw new be(e.model,"\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");w=M.appDEFieldId.toLowerCase(),P=q.appDEFieldId.toLowerCase()})();const y=O=>(O.hasChildren=e.state.items.some(V=>O[w]===V[P]),O.children=[],O),D=F(()=>e.state.rows.map(M=>y(M.data)).filter(M=>!M[P]));return{c:e,ns:n,ns2:r,tableRef:o,tableData:D,renderColumns:g,defaultSort:b,onDbRowClick:s,onRowClick:i,onSelectionChange:l,onSortChange:c,onPageChange:p,onPageSizeChange:v,onPageRefresh:m,handleRowClassName:u,renderNoData:()=>{const{isLoaded:O}=e.state;return O&&a(d("iBizNoData"),{text:e.model.emptyText,emptyTextLanguageRes:e.model.emptyTextLanguageRes},null)},loadData:async(O,V,q)=>{const M=e.state.items.filter(K=>O[w]===K[P]);q(M)},summaryMethod:h,renderPopover:f}},render(){const t=this.c.state,{hideHeader:e,enablePagingBar:n}=this.c.model;return a(d("iBizControlBase"),{class:[this.ns.b(),this.ns2.b(),this.ns.is("show-header",!e),this.ns.is("enable-page",n),this.ns.is("enable-group",this.c.model.enableGroup)],controller:this.c},{default:()=>[this.c.state.isLoaded&&a(d("el-table"),{ref:"tableRef",class:this.ns.e("table"),"default-sort":this.defaultSort,border:!0,"show-header":!e,"show-summary":this.c.enableAgg,"summary-method":this.summaryMethod,"highlight-current-row":t.singleSelect,"row-class-name":this.handleRowClassName,"row-key":"srfkey",data:this.tableData,onRowClick:this.onRowClick,onRowDblclick:this.onDbRowClick,onSelectionChange:this.onSelectionChange,onSortChange:this.onSortChange,"tooltip-effect":"light","tree-props":{children:"children",hasChildren:"hasChildren"},load:this.loadData,lazy:!0},{empty:this.renderNoData,default:()=>[!t.singleSelect&&a(d("el-table-column"),{"class-name":this.ns.e("selection"),type:"selection",width:"55"},null),t.isCreated&&this.renderColumns.map((r,o)=>Sr(this.c,r,this.renderColumns,o))],append:()=>this.renderPopover()}),n&&a(d("iBizPagination"),{total:t.total,curPage:t.curPage,size:t.size,onChange:this.onPageChange,onPageSizeChange:this.onPageSizeChange,onPageRefresh:this.onPageRefresh},null)]})}});var Qv=Object.defineProperty,Zv=(t,e,n)=>e in t?Qv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eg=(t,e,n)=>(Zv(t,typeof e!="symbol"?e+"":e,n),n);class tg{constructor(){eg(this,"component","IBizTreeGridControl")}}const ng=N("ao",U(yo,function(t){t.component(yo.name,yo),oe(ee.TREEGRID,()=>new tg)}));function rg(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Po=S({name:"IBizMEditViewPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup(){const t=ne((...s)=>new wi(...s)),e=B(`control-${t.model.controlType.toLowerCase()}`),n=I(null),r=I(0);let o=null;const i=s=>{t.handleDelete(s)};return Pe(()=>{n.value&&(o=new MutationObserver(()=>{const s=n.value.scrollHeight;s!==r.value&&t.state.isNeedScroll&&(r.value=s,n.value.scrollTop=s)}),o.observe(n.value,{childList:!0,attributes:!0,characterData:!0,subtree:!0}))}),Re(()=>{o&&o.disconnect()}),{c:t,ns:e,panelContent:n,handleDelete:i}},render(){const t=d("IBizViewShell"),e=()=>{let o;return a(d("el-tabs"),{class:this.ns.b("tabs"),modelValue:this.c.state.activeTab,"onUpdate:modelValue":i=>this.c.state.activeTab=i},rg(o=this.c.state.panelUiItems.map((i,s)=>a(d("el-tab-pane"),{key:i.id+i.srfmajortext,name:i.id},{label:()=>a("div",{class:this.ns.b("tab-label")},[a("span",null,[i.srfmajortext]),a("ion-icon",{name:"close-outline",onClick:()=>this.c.handleTabDelete(i,s)},null)]),default:()=>this.c.state.activeTab===i.id&&re(t,{context:i.context,params:i.params,viewId:this.c.model.embeddedAppViewId,onDataChange:l=>this.c.onViewDataChange(l,i.id)})})))?o:{default:()=>[o]})},n=()=>this.c.state.panelUiItems.map(o=>a("div",{class:this.ns.b("item"),key:o.id},[[re(t,{context:o.context,params:o.params,viewId:this.c.model.embeddedAppViewId,onDataChange:i=>this.c.onViewDataChange(i,o.id)}),a("div",{class:this.ns.b("close")},[a("ion-icon",{name:"close-outline",onClick:()=>this.handleDelete(o)},null)])]])),r=()=>{if(this.c.model.embeddedAppViewId)return Object.is(this.c.model.panelStyle,"TAB_TOP")?e():n()};return a(d("iBizControlBase"),{controller:this.c},{default:()=>[a("div",{class:this.ns.b("content"),ref:"panelContent"},[this.c.state.panelUiItems.length>0?r():null])]})}});var og=Object.defineProperty,ag=(t,e,n)=>e in t?og(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ig=(t,e,n)=>(ag(t,typeof e!="symbol"?e+"":e,n),n);class sg{constructor(){ig(this,"component","IBizMEditViewPanelControl")}}const lg=N("ap",U(Po,function(t){t.component(Po.name,Po),oe(ee.MULTI_EDIT_VIEWPANEL,()=>new sg)})),cl=S({name:"IBizMapControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},loadDefault:{type:Boolean,default:!0}},setup(){const t=ne((...o)=>new yi(...o)),e=B(`control-${t.model.controlType.toLowerCase()}`),n=I(),r=F(()=>({strAreaCode:t.state.strAreaCode,defaultAreaCode:t.state.defaultAreaCode,jsonBaseUrl:t.state.jsonBaseUrl}));return{c:t,ns:e,mapRef:n,mapOpts:r}},render(){const{state:t}=this.c;return a(d("iBizControlBase"),{controller:this.c},{default:()=>[t.isLoaded&&a(d("iBizMapChart"),{areaData:t.areaData,pointData:t.pointData,options:this.mapOpts,class:this.ns.e("map"),onMapChange:e=>{this.c.onMapChange(e.areaCode)},onPointChange:e=>{this.c.onAreaClick(e)},onAreaChange:e=>{this.c.onPointClick(e)}},null)]})}});var cg=Object.defineProperty,ug=(t,e,n)=>e in t?cg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dg=(t,e,n)=>(ug(t,typeof e!="symbol"?e+"":e,n),n);class pg{constructor(){dg(this,"component","IBizMapControl")}}const hg=N("aq",{install(t){t.component(cl.name,cl),oe(ee.MAP,()=>new pg)}});function mg(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Eo=S({name:"IBizReportPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},noLoadDefault:{type:Boolean,default:!1}},setup(){const t=ne((...r)=>new Pi(...r)),e=B(`control-${t.model.controlType.toLowerCase()}`);return{c:t,ns:e,renderContent:()=>{const{reportType:r}=t.state;switch(r){case"USER":return a(d("iBizUserReportPanel"),{controller:t},null);case"USER2":return a(d("iBizUser2ReportPanel"),{controller:t},null);default:return a("div",null,[R("\u6682\u672A\u5B9E\u73B0")])}}}},render(){let t;if(this.c.state.isCreated)return a(d("iBizControlBase"),{controller:this.c},mg(t=this.renderContent())?t:{default:()=>[t]})}});var fg=Object.defineProperty,bg=(t,e,n)=>e in t?fg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vg=(t,e,n)=>(bg(t,typeof e!="symbol"?e+"":e,n),n);class gg{constructor(){vg(this,"component","IBizReportPanelControl")}}const Io=S({name:"IBizUserReportPanel",props:{controller:{type:Object}},setup(t){const e=t.controller,n=B("user-report-panel"),r=e&&e.generator;return{c:e,ns:n,generator:r}},render(){if(!this.c)return;const t=this.c.state;return a("div",{class:this.ns.e("container")},[a(d("iBizRelationshipDesign"),{data:t.data,context:this.c.context,params:this.c.params,config:this.generator&&this.generator.config.CONFIG,pluginConfig:this.generator&&this.generator.config.PLUGINCONFIG,nodeLegendConfig:this.generator&&this.generator.config.NODELEGENDCONFIG,edgeLegendConfig:this.generator&&this.generator.config.EDGELEGENDCONFIG,hooks:this.generator&&this.generator.config.HOOKS,showLoading:!0,onInit:e=>{this.generator&&this.generator.init(e)}},null)])}}),Cg=U(Io,function(t){t.component(Io.name,Io)}),Do=S({name:"IBizUser2ReportPanel",props:{controller:{type:Object}},setup(t){const e=t.controller,n=B("user2-report-panel"),r=e&&e.generator;return{c:e,ns:n,generator:r,handleClick:async i=>{let s=i.target.getAttribute("click"),l=i.target.getAttribute("params");if(!s||!e||!l)return;s=s.replaceAll("`",""),l=l.replaceAll("`",'"');const u=/\(([^)]+)\)/.exec(s);u&&u[1]&&ft.exec(u[1],{context:e.context,params:e.params,data:[JSON.parse(l)],view:e.view})}}},render(){if(!this.c)return;const t=this.c.state;return t.isLoaded?a("div",{class:this.ns.e("container"),innerHTML:t.data,onClick:e=>{this.handleClick(e)}},null):a("div",{class:this.ns.e("empty")},[R("\u6682\u65E0\u6570\u636E")])}}),wg=U(Do,function(t){t.component(Do.name,Do)}),yg=N("ar",U(Eo,function(t){t.use(Cg),t.use(wg),t.component(Eo.name,Eo),oe(ee.REPORT_PANEL,()=>new gg)})),ul=S({name:"NotSupportedEditor",props:{modelData:{type:Object,required:!0}},setup(){return{ns:B("not-supported-editor")}},render(){return a("div",{class:this.ns.b()},[R("\u672A\u652F\u6301\u7684\u7F16\u8F91\u5668\u7C7B\u578B - "),this.modelData.editorType])}});var dl={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(as,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},c=function(h){return(h=+h)+(h>68?1900:2e3)},u=function(h){return function(f){this[h]=+f}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(h){(this.zone||(this.zone={})).offset=function(f){if(!f||f==="Z")return 0;var w=f.match(/([+-]|\d\d)/g),P=60*w[1]+(+w[2]||0);return P===0?0:w[0]==="+"?-P:P}(h)}],m=function(h){var f=l[h];return f&&(f.indexOf?f:f.s.concat(f.f))},v=function(h,f){var w,P=l.meridiem;if(P){for(var _=1;_<=24;_+=1)if(h.indexOf(P(_,0,f))>-1){w=_>12;break}}else w=h===(f?"pm":"PM");return w},g={A:[s,function(h){this.afternoon=v(h,!1)}],a:[s,function(h){this.afternoon=v(h,!0)}],S:[/\d/,function(h){this.milliseconds=100*+h}],SS:[o,function(h){this.milliseconds=10*+h}],SSS:[/\d{3}/,function(h){this.milliseconds=+h}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[o,u("day")],Do:[s,function(h){var f=l.ordinal,w=h.match(/\d+/);if(this.day=w[0],f)for(var P=1;P<=31;P+=1)f(P).replace(/\[|\]/g,"")===h&&(this.day=P)}],M:[i,u("month")],MM:[o,u("month")],MMM:[s,function(h){var f=m("months"),w=(m("monthsShort")||f.map(function(P){return P.slice(0,3)})).indexOf(h)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[s,function(h){var f=m("months").indexOf(h)+1;if(f<1)throw new Error;this.month=f%12||f}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(h){this.year=c(h)}],YYYY:[/\d{4}/,u("year")],Z:p,ZZ:p};function b(h){var f,w;f=h,w=l&&l.formats;for(var P=(h=f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(V,q,M){var K=M&&M.toUpperCase();return q||w[M]||n[M]||w[K].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(H,Q,k){return Q||k.slice(1)})})).match(r),_=P.length,y=0;y<_;y+=1){var D=P[y],E=g[D],x=E&&E[0],O=E&&E[1];P[y]=O?{regex:x,parser:O}:D.replace(/^\[|\]$/g,"")}return function(V){for(var q={},M=0,K=0;M<_;M+=1){var H=P[M];if(typeof H=="string")K+=H.length;else{var Q=H.regex,k=H.parser,z=V.slice(K),$=Q.exec(z)[0];k.call(q,$),V=V.replace($,"")}}return function(A){var T=A.afternoon;if(T!==void 0){var L=A.hours;T?L<12&&(A.hours+=12):L===12&&(A.hours=0),delete A.afternoon}}(q),q}}return function(h,f,w){w.p.customParseFormat=!0,h&&h.parseTwoDigitYear&&(c=h.parseTwoDigitYear);var P=f.prototype,_=P.parse;P.parse=function(y){var D=y.date,E=y.utc,x=y.args;this.$u=E;var O=x[1];if(typeof O=="string"){var V=x[2]===!0,q=x[3]===!0,M=V||q,K=x[2];q&&(K=x[2]),l=this.$locale(),!V&&K&&(l=w.Ls[K]),this.$d=function(z,$,A){try{if(["x","X"].indexOf($)>-1)return new Date(($==="X"?1e3:1)*z);var T=b($)(z),L=T.year,X=T.month,Y=T.day,Z=T.hours,se=T.minutes,he=T.seconds,ce=T.milliseconds,fe=T.zone,de=new Date,Se=Y||(L||X?1:de.getDate()),Ke=L||de.getFullYear(),en=0;L&&!X||(en=X>0?X-1:de.getMonth());var Vo=Z||0,jo=se||0,ko=he||0,Uo=ce||0;return fe?new Date(Date.UTC(Ke,en,Se,Vo,jo,ko,Uo+60*fe.offset*1e3)):A?new Date(Date.UTC(Ke,en,Se,Vo,jo,ko,Uo)):new Date(Ke,en,Se,Vo,jo,ko,Uo)}catch{return new Date("")}}(D,O,E),this.init(),K&&K!==!0&&(this.$L=this.locale(K).$L),M&&D!=this.format(O)&&(this.$d=new Date("")),l={}}else if(O instanceof Array)for(var H=O.length,Q=1;Q<=H;Q+=1){x[1]=O[Q-1];var k=w.apply(this,x);if(k.isValid()){this.$d=k.$d,this.$L=k.$L,this.init();break}Q===H&&(this.$d=new Date(""))}else _.call(this,y)}}})})(dl);var Pg=dl.exports,Eg=is(Pg);_e.extend(Eg);function Ig(t,e){return t===e?!1:_e(t,e,!0).isValid()}const pl=S({name:"IBizSpan",props:dn(),setup(t,{emit:e}){var n;const r=B("span"),o=t.controller,i=I(""),s=o.codeList,l=o.model.textSeparator||((n=o.editorParams)==null?void 0:n.TEXTSEPARATOR)||",";G(()=>t.value,(p,m)=>{if(p!==m){if(Te(p)){i.value="";return}const{valueFormat:v,dataType:g,unitName:b}=o.parent;if(o.model.valueType==="SIMPLES")i.value=p.join(l);else if(o.model.valueType==="OBJECT")i.value=p[o.model.objectNameField?o.model.objectNameField:"srfmajortext"];else if(o.model.valueType==="OBJECTS"){const h=[];p.forEach(f=>{h.push(f[o.model.objectNameField?o.model.objectNameField:"srfmajortext"])}),i.value=h.join(l)}else if(o.model.editorType==="ADDRESSPICKUP")try{const h=[];JSON.parse(p).forEach(w=>{h.push(w[o.model.objectNameField?o.model.objectNameField:"srfmajortext"])}),i.value=h.join(l)}catch{ibiz.log.error(`\u6807\u7B7E\u5730\u5740\u9009\u62E9\u5668\u7684\u503C\u4E0D\u7B26\u5408JSON\u683C\u5F0F${p}`)}else if(v)try{if(g!=null&&Ti.isDate(g))i.value=_e(p).format(v);else{const h=_e(p).format(v);Ig(h,v)?i.value=h:i.value=ibiz.util.text.format(`${p}`,v)}}catch{i.value=`${p}`,ibiz.log.error(`${p} \u503C\u683C\u5F0F\u5316\u9519\u8BEF`)}else i.value=`${p}`;b&&(i.value+=b)}},{immediate:!0});const c=I([]);s&&G(()=>t.data,p=>{o.loadCodeList(p).then(m=>{c.value=m})},{immediate:!0,deep:!0});const{componentRef:u}=ve(()=>e("focus"),()=>e("blur"));return{ns:r,c:o,text:i,editorRef:u,items:c}},render(){let t=null;return this.c.codeList&&this.items.length>0?t=a(d("iBizCodeList"),{class:this.ns.e("code-list"),codeListItems:this.items,codeList:this.c.codeList,value:this.text},null):this.text?t=this.text:t="- - -",a("span",{class:[this.ns.b(),this.readonly?this.ns.m("readonly"):""],ref:"editorRef"},[t])}}),hl=S({name:"IBizSpanLink",props:dn(),emits:te(),setup(t,{emit:e}){const n=B("span-link"),r=t.controller,o=I("");G(()=>t.value,(l,c)=>{l&&l!==c&&(o.value=`${l}`)},{immediate:!0});const i=async()=>{await r.openLinkView(t.data)},{componentRef:s}=ve(()=>e("focus"),()=>e("blur"));return{ns:n,openLinkView:i,curValue:o,editorRef:s}},render(){return a("div",{class:[this.ns.b(),this.readonly?this.ns.m("readonly"):""],ref:"editorRef"},[a("a",{onClick:this.openLinkView},[this.curValue])])}});var Dg=Object.defineProperty,_g=(t,e,n)=>e in t?Dg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ml=(t,e,n)=>(_g(t,typeof e!="symbol"?e+"":e,n),n);class Bg extends et{constructor(){super(...arguments),ml(this,"valueItem",""),ml(this,"codeList")}async onInit(){var e,n;if(super.onInit(),(n=(e=this.model)==null?void 0:e.editorItems)!=null&&n[0]&&(this.valueItem=this.model.editorItems[0].id),this.model.appCodeListId){const r=await ibiz.hub.getApp(this.context.srfappid);this.codeList=r.codeList.getCodeList(this.model.appCodeListId)}}async openLinkView(e){const n=this.context.clone();e[this.valueItem]&&(n.srfkey=e[this.valueItem]);const{context:r,params:o}=this.handlePublicParams(e,n,this.params),{linkAppViewId:i}=this.model;if(!i)throw new be(this.model,"\u8BF7\u914D\u7F6E\u6570\u636E\u94FE\u63A5\u89C6\u56FE");return ibiz.commands.execute(tt.TAG,i,r,o)}}var Sg=Object.defineProperty,Ag=(t,e,n)=>e in t?Sg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fl=(t,e,n)=>(Ag(t,typeof e!="symbol"?e+"":e,n),n);class Ht{constructor(e){fl(this,"formEditor","IBizSpan"),fl(this,"gridEditor","IBizSpan"),e==="SPAN_LINK"&&(this.formEditor="IBizSpanLink",this.gridEditor="IBizSpanLink")}async createController(e,n){const r=new Bg(e,n);return await r.init(),r}}function Fg(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const bl=S({name:"IBizInput",props:ha(),emits:te(),setup(t,{emit:e}){const n=B("input"),r=t.controller,o=r.model,i=I(),s=I(2);o.editorType==="TEXTAREA_10"&&(s.value=10);const l=F(()=>{switch(o.editorType){case"TEXTBOX":return"text";case"PASSWORD":return"password";case"TEXTAREA":case"TEXTAREA_10":return"textarea";default:return"string"}}),c=I("");G(()=>t.value,(D,E)=>{D!==E&&(D==null?c.value="":c.value=D.toString())},{immediate:!0});let u=!1,p,m;const v=nt(D=>{m!==D&&e("change",D),m=void 0,u=!1,p&&p()},300,{leading:!0}),g=D=>{u=!0,v(D)},b=D=>{D&&D.code==="Enter"&&(e("enter",D),u&&(p=()=>{i.value.$el.dispatchEvent(D)}))},h=D=>{m=D.target.value,m!=t.value&&e("change",m),e("blur",D)};t.autoFocus&&G(i,D=>{if(D){const E=l.value==="textarea"?"textarea":"input";D.$el.getElementsByTagName(E)[0].focus()}});const f=D=>{e("focus",D)};let w;const P=async()=>{var D;if(r.deService){const E=await Fe.import("@ibiz-template-plugin/ai-chat"),x=E.chat||E.default.chat;w=x;const O=x.create({question:async q=>{var M;const K=Oe();return await((M=r.deService)==null?void 0:M.aiChatSse(H=>{if(ibiz.log.info("aiChatSse",H),H.actionstate===20&&H.actionresult)O.addMessage({messageid:K,state:H.actionstate,type:"DEFAULT",role:"ASSISTANT",content:H.actionresult});else if(H.actionstate===30&&H.actionresult){const k=JSON.parse(H.actionresult).choices;k&&k.length>0&&O.replaceMessage({messageid:K,state:H.actionstate,type:"DEFAULT",role:"ASSISTANT",content:k[0].content||""})}else H.actionstate===40&&O.replaceMessage({messageid:K,state:H.actionstate,type:"ERROR",role:"ASSISTANT",content:H.actionresult})},r.context,{},{messages:q})),O.addMessage({messageid:K,state:10,type:"DEFAULT",role:"ASSISTANT",content:""}),!0},action:(q,M)=>{q==="backfill"&&g(M.content)}}),V=await((D=r.deService)==null?void 0:D.aiChatHistory(r.context,{}));V.data&&Array.isArray(V.data)&&V.data.forEach(q=>{const M={messageid:Oe(),state:30,type:"DEFAULT",role:q.role,content:q.content};O.addMessage(M)})}};Re(()=>{w&&w.close()});const _=F(()=>{const{unitName:D}=t.controller.parent;let E=`${c.value}`;return E&&D&&(E+=D),E}),y=F(()=>r.model.editorParams&&r.model.editorParams.autocomplete&&r.toBoolean(r.model.editorParams.autocomplete)?"on":"new-password");return{c:r,ns:n,rows:s,type:l,currentVal:c,readonlyText:_,handleChange:g,handleKeyUp:b,onBlur:h,onFocus:f,inputRef:i,onClick:P,shouldAutoComplete:y}},render(){const{unitName:t}=this.c.parent,{editorWidth:e,editorHeight:n,predefinedType:r}=this.c.model;let o=null;if(this.readonly)o=this.readonlyText;else{const i={};t&&(i.suffix=()=>a("i",{class:this.ns.e("unit")},[t])),r==="AUTH_USERID"?i.prefix=()=>a("ion-icon",{name:"person"},null):r==="AUTH_PASSWORD"&&(i.prefix=()=>a("ion-icon",{name:"unlock-alt"},null)),o=a(d("el-input"),{ref:"inputRef",clearable:!0,modelValue:this.currentVal,"onUpdate:modelValue":s=>this.currentVal=s,placeholder:this.c.placeHolder,type:this.type,rows:this.rows,resize:"none",onInput:this.handleChange,onKeyup:this.handleKeyUp,onBlur:this.onBlur,onFocus:this.onFocus,class:this.ns.b("input"),disabled:this.disabled,"show-password":this.type==="password",autocomplete:this.shouldAutoComplete},Fg(i)?i:{default:()=>[i]})}return a("div",{class:[this.ns.b(),this.ns.is("textarea",Object.is(this.type,"textarea")),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""],style:{width:e?`${e}px`:"",height:n?`${n}px`:""}},[o,this.c.chatCompletion?a("div",{class:this.ns.e("ai-chat"),onClick:this.onClick},[a("ion-icon",{src:"./assets/images/svg/chat.svg"},null)]):null])}}),vl=S({name:"IBizInputNumber",props:ma(),emits:te(),setup(t,{emit:e}){const n=B("input-number"),r=t.controller,o=I("");G(()=>t.value,(p,m)=>{if(p!==m){const v=Number(p);o.value=Number.isNaN(v)?"":v}},{immediate:!0});const i=p=>{e("change",p)},s=I();return t.autoFocus&&G(s,p=>{p&&p.$el.getElementsByTagName("input")[0].focus()}),{ns:n,c:r,currentVal:o,handleChange:i,inputRef:s,onFocus:p=>{e("focus",p)},onBlur:p=>{e("blur",p)},handleKeyUp:p=>{p&&p.code==="Enter"&&e("enter",p)}}},render(){const{unitName:t}=this.c.parent;let e=null;return this.readonly?(e=`${this.currentVal}`,e&&t&&(e+=t)):e=[a(d("el-input-number"),{ref:"inputRef",modelValue:this.currentVal,"onUpdate:modelValue":n=>this.currentVal=n,placeholder:this.c.placeHolder,precision:this.c.precision,disabled:this.disabled,onChange:this.handleChange,onFocus:this.onFocus,onBlur:this.onBlur,onKeyup:this.handleKeyUp},null),t&&a("i",{class:this.ns.e("unit")},[t])],a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[e])}}),gl=S({name:"IBizInputIP",props:fa(),emits:te(),setup(t,{emit:e}){const n=B("input-ip"),r=t.controller,o=I([]),i=I(!1),s=I(!1),l=I(""),c=I(""),u=I(""),p=I("");if(t.value){const b=t.value.split(".");o.value=b,l.value=o.value[0],c.value=o.value[1],u.value=o.value[2],p.value=o.value[3]}const m=(b,h,f,w)=>{if(b==="")return;/^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/g.test(b)?o.value[w]=b:f&&(ibiz.message.warning(`ip\u683C\u5F0F\u9A8C\u8BC1\u672A\u901A\u8FC7\uFF0C\u7B2C${w+1}\u6BB5ip\u91CD\u7F6E\u56DE\u65E7\u503C`),f.value=h,o.value[w]=h),l.value&&c.value&&u.value&&p.value&&e("change",`${l.value}.${c.value}.${u.value}.${p.value}`)};return G(l,(b,h)=>{m(b,h,l,0)}),G(c,(b,h)=>{m(b,h,c,1)}),G(u,(b,h)=>{m(b,h,u,2)}),G(p,(b,h)=>{m(b,h,p,3)}),{ns:n,c:r,currentVal:o,getFocus:()=>{i.value=!0,s.value&&(s.value=!1,e("focus"))},blur:()=>{i.value=!1,setTimeout(()=>{i.value||(s.value=!0,e("blur"))},0)},firstIp:l,secIp:c,thirdIp:u,forIp:p}},render(){return a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[a(d("el-input"),{type:"text",size:"small",disabled:this.disabled,readonly:this.readonly,onFocus:this.getFocus,onBlur:this.blur,maxlength:3,modelValue:this.firstIp,"onUpdate:modelValue":t=>this.firstIp=t},null),R("."),a(d("el-input"),{type:"text",size:"small",disabled:this.disabled,readonly:this.readonly,onFocus:this.getFocus,onBlur:this.blur,maxlength:3,modelValue:this.secIp,"onUpdate:modelValue":t=>this.secIp=t},null),R("."),a(d("el-input"),{type:"text",size:"small",disabled:this.disabled,readonly:this.readonly,onFocus:this.getFocus,onBlur:this.blur,maxlength:3,modelValue:this.thirdIp,"onUpdate:modelValue":t=>this.thirdIp=t},null),R("."),a(d("el-input"),{type:"text",size:"small",disabled:this.disabled,readonly:this.readonly,onFocus:this.getFocus,onBlur:this.blur,maxlength:3,modelValue:this.forIp,"onUpdate:modelValue":t=>this.forIp=t},null)])}});var xg=Object.defineProperty,Og=(t,e,n)=>e in t?xg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ve=(t,e,n)=>(Og(t,typeof e!="symbol"?e+"":e,n),n);class Tg extends le{constructor(){super(...arguments),Ve(this,"precision"),Ve(this,"deService"),Ve(this,"deACMode"),Ve(this,"keyName","srfkey"),Ve(this,"textName","srfmajortext"),Ve(this,"sort","asc"),Ve(this,"dataItems",[]),Ve(this,"chatCompletion",!1)}async onInit(){if(await super.onInit(),this.precision=this.editorParams.precision?ge(this.editorParams.precision):this.model.precision,this.model.editorType==="TEXTAREA"||this.model.editorType==="TEXTAREA_10"){const e=this.model;if(e.appDEACModeId&&(this.deACMode=await bt(e.appDEACModeId,e.appDataEntityId,this.context.srfappid),this.deACMode)){if(this.deACMode.actype==="AUTOCOMPLETE"){const{minorSortAppDEFieldId:n,minorSortDir:r}=this.deACMode;n&&r&&(this.sort=`${n.toLowerCase()},${r.toLowerCase()}`),this.deACMode.textAppDEFieldId&&(this.textName=this.deACMode.textAppDEFieldId),this.deACMode.valueAppDEFieldId&&(this.keyName=this.deACMode.valueAppDEFieldId),this.deACMode.deacmodeDataItems&&(this.dataItems=[],this.deACMode.deacmodeDataItems.forEach(o=>{o.id!=="value"&&o.id!=="text"&&this.dataItems.push(o)}))}this.deACMode.actype==="CHATCOMPLETION"&&(this.deService=await ibiz.hub.getApp(e.appId).deService.getService(e.appDataEntityId),this.chatCompletion=!0)}}this.model.predefinedType==="AUTH_USERID"?this.placeHolder="\u8BF7\u8F93\u5165\u8D26\u53F7":this.model.predefinedType==="AUTH_PASSWORD"&&(this.placeHolder="\u8BF7\u8F93\u5165\u5BC6\u7801")}}var Ng=Object.defineProperty,zg=(t,e,n)=>e in t?Ng(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cl=(t,e,n)=>(zg(t,typeof e!="symbol"?e+"":e,n),n);class _o{constructor(e){Cl(this,"formEditor","IBizInput"),Cl(this,"gridEditor","IBizInput"),e==="NUMBER"&&(this.formEditor="IBizInputNumber",this.gridEditor="IBizInputNumber"),e==="IPADDRESSTEXTBOX"&&(this.formEditor="IBizInputIP",this.gridEditor="IBizInputIP")}async createController(e,n){const r=new Tg(e,n);return await r.init(),r}}function Rg(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const wl=S({name:"IBizDropdown",props:ba(),emits:te(),setup(t,{emit:e}){const n=B("dropdown"),r=t.controller,o=I([]),i=I(!1),s=I([]),l=F(()=>r.model.editorType==="DROPDOWNLIST_100"?n.cssVarBlock({width:"100px"}):{}),c=f=>{if(f.length===0)return[];const w=[];return f.forEach(P=>{const _={label:P.text,value:P.value.toString(),disabled:P.disableSelect===!0,children:[]};P.children&&P.children.length>0&&(_.children=c(P.children)),w.push(_)}),w};r.loadCodeList(t.data).then(f=>{o.value=f;for(let w=0;w<o.value.length;w++)if(o.value[w].children){i.value=!0,s.value=c(f);break}});const u=F({get(){var f,w;return t.value?r.multiple?(f=t.value)==null?void 0:f.toString().split(","):t.value.toString():(w=t.value)==null?void 0:w.toString()},set(f){Array.isArray(f)?e("change",f.length===0?null:f.join(",")):e("change",f)}}),p=F(()=>{const f=Array.isArray(u.value)?u.value:[u.value];return o.value.filter(w=>{let P=!1;return f.forEach(_=>{_==w.value&&(P=!0)}),P}).map(w=>w.text).join(",")});G(p,(f,w)=>{f!==w&&e("infoTextChange",f)},{immediate:!0});const m=I();return t.autoFocus&&G(m,f=>{f&&f.focus()}),{ns:n,c:r,curValue:u,items:o,customNodeClass:(f,w)=>f.children.length?n.e("branch-node"):null,valueText:p,hasChildren:i,onBlur:f=>{setTimeout(()=>{e("blur",f)},100)},onFocus:f=>{e("focus",f)},editorRef:m,treeNodes:s,cssVars:l,handleKeyUp:f=>{f&&f.code==="Enter"&&e("enter",f)}}},render(){let t;const e=this.hasChildren?a(d("el-tree-select"),{modelValue:this.curValue,"onUpdate:modelValue":n=>this.curValue=n,clearable:!0,data:this.treeNodes,"check-strictly":!0,"render-after-expand":!1,multiple:this.c.multiple,placeholder:this.c.placeHolder?this.c.placeHolder:" ",disabled:this.disabled,props:{class:this.customNodeClass}},null):a(d("el-select"),{ref:"editorRef",modelValue:this.curValue,"onUpdate:modelValue":n=>this.curValue=n,clearable:!0,class:[this.ns.e("select")],multiple:this.c.multiple,placeholder:this.c.placeHolder?this.c.placeHolder:" ",disabled:this.disabled,onBlur:this.onBlur,onFocus:this.onFocus,onKeyup:this.handleKeyUp},Rg(t=this.items.map(n=>a(d("el-option"),{key:n.value,value:n.value.toString(),label:n.text,disabled:n.disableSelect===!0},null)))?t:{default:()=>[t]});return a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""],style:this.cssVars},[this.readonly?this.valueText:e])}});var $g=Object.defineProperty,Lg=(t,e,n)=>e in t?$g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mg=(t,e,n)=>(Lg(t,typeof e!="symbol"?e+"":e,n),n);class Vg extends et{constructor(){super(...arguments),Mg(this,"multiple",!1)}async onInit(){super.onInit(),this.model.editorType==="MDROPDOWNLIST"&&(this.multiple=!0)}}var jg=Object.defineProperty,kg=(t,e,n)=>e in t?jg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yl=(t,e,n)=>(kg(t,typeof e!="symbol"?e+"":e,n),n);class Kt{constructor(){yl(this,"formEditor","IBizDropdown"),yl(this,"gridEditor","IBizDropdown")}async createController(e,n){const r=new Vg(e,n);return await r.init(),r}}const Pl=S({name:"IBizCheckbox",props:va(),emits:te(),setup(t,{emit:e}){var n,r;const o=B("checkbox"),s=t.controller.model;let l=1,c=0;(n=s.editorParams)!=null&&n.selectValue&&(l=s.editorParams.selectValue),(r=s.editorParams)!=null&&r.nullValue&&(c=s.editorParams.nullValue);const u=F({get(){return t.value==l},set(m){let v;m?v=l:v=c,e("change",v)}}),{componentRef:p}=ve(()=>e("focus"),()=>e("blur"));return{ns:o,editorModel:s,currentVal:u,editorRef:p}},render(){return a("div",{class:[this.ns.b()],ref:"editorRef"},[a(d("el-checkbox"),{modelValue:this.currentVal,"onUpdate:modelValue":t=>this.currentVal=t,disabled:this.disabled||this.readonly},null)])}});class Ug extends le{}var Gg=Object.defineProperty,qg=(t,e,n)=>e in t?Gg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,El=(t,e,n)=>(qg(t,typeof e!="symbol"?e+"":e,n),n);class Wg{constructor(){El(this,"formEditor","IBizCheckbox"),El(this,"gridEditor","IBizGridCheckbox")}async createController(e,n){const r=new Ug(e,n);return await r.init(),r}}function Hg(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Il=S({name:"IBizCheckboxList",props:ga(),emits:te(),setup(t,{emit:e}){const n=B("checkbox-list"),r=t.controller,o=r.codeList,i=I([]);G(()=>t.data,v=>{r.loadCodeList(v).then(g=>{i.value=g})},{immediate:!0,deep:!0});const s=F(()=>o&&o.orMode?o.orMode.toLowerCase():"str");let l=",";o&&o.valueSeparator&&(l=o.valueSeparator);const c=F({get(){if(!Te(t.value)){if(Object.is(s.value,"num")&&i){const v=[],g=typeof t.value=="string"?parseInt(t.value,10):t.value;return i.value.forEach(b=>{(g&b.value)===b.value&&v.push(b.value)}),v}if(Object.is(s.value,"str")){const v=t.value;if(v!==""){if(o){const g=v.split(l);if(o.codeItemValueNumber)for(let b=0,h=g.length;b<h;b++)g[b]=Number(g[b]);return g}return v.split(",")}}}return[]},set(v){let g=null;if(Object.is(s.value,"num")){let b=0;v.forEach(h=>{const f=typeof h=="string"?parseInt(h,10):h;b|=f}),g=b}else if(Object.is(s.value,"str")){const b=[];i.value.length>0&&(i.value.forEach(h=>{v.findIndex(w=>Object.is(h.value,w))!==-1&&b.push(h.value)}),g=b.join(l))}e("change",g)}}),u=v=>{c.value=v},p=F(()=>{const v=Array.isArray(c.value)?c.value:[c.value];return i.value.filter(g=>{let b=!1;return v.forEach(h=>{h==g.value&&(b=!0)}),b}).map(g=>g.text).join(",")});G(p,(v,g)=>{v!==g&&e("infoTextChange",v)},{immediate:!0});const{componentRef:m}=ve(()=>e("focus"),()=>e("blur"));return{ns:n,items:i,selectArray:c,valueText:p,editorRef:m,onSelectArrayChange:u}},render(){let t;return a("div",{ref:"editorRef",class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[this.readonly?this.valueText:a(d("el-checkbox-group"),{"model-value":this.selectArray,onChange:this.onSelectArrayChange},Hg(t=this.items.map((e,n)=>a(d("el-checkbox"),{key:n,label:e.value,disabled:this.disabled||e.disableSelect===!0},{default:()=>[a("span",{class:this.ns.e("text")},[e.text])]})))?t:{default:()=>[t]})])}});var Kg=Object.defineProperty,Xg=(t,e,n)=>e in t?Kg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yg=(t,e,n)=>(Xg(t,typeof e!="symbol"?e+"":e,n),n);class Jg extends et{constructor(){super(...arguments),Yg(this,"codeList")}async onInit(){if(super.onInit(),this.model.appCodeListId){const e=await ibiz.hub.getApp(this.context.srfappid);this.codeList=e.codeList.getCodeList(this.model.appCodeListId)}}}var Qg=Object.defineProperty,Zg=(t,e,n)=>e in t?Qg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dl=(t,e,n)=>(Zg(t,typeof e!="symbol"?e+"":e,n),n);class _l{constructor(){Dl(this,"formEditor","IBizCheckboxList"),Dl(this,"gridEditor","IBizCheckboxList")}async createController(e,n){const r=new Jg(e,n);return await r.init(),r}}function eC(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Bl=S({name:"IBizRadio",props:Ca(),emits:te(),setup(t,{emit:e}){const n=B("radio"),r=t.controller,o=r.model,i=u=>{e("change",u)},s=I([]);G(()=>t.data,u=>{r.loadCodeList(u).then(p=>{s.value=p})},{immediate:!0,deep:!0});const l=F(()=>{var u;return((u=s.value.find(p=>p.value==t.value))==null?void 0:u.text)||""});G(l,(u,p)=>{u!==p&&e("infoTextChange",u)},{immediate:!0});const{componentRef:c}=ve(()=>e("focus"),()=>e("blur"));return{ns:n,editorModel:o,items:s,valueText:l,onSelectValueChange:i,editorRef:c}},render(){let t;return a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""],ref:"editorRef"},[this.readonly?this.valueText:a(d("el-radio-group"),{class:this.ns.e("group"),"model-value":Un(this.value)?String(this.value):"",onChange:this.onSelectValueChange},eC(t=this.items.map((e,n)=>a(d("el-radio"),{key:n,label:Un(e.value)?String(e.value):"",disabled:this.disabled||e.disableSelect===!0},{default:()=>[a("span",{class:this.ns.e("text")},[e.text])]})))?t:{default:()=>[t]})])}});class tC extends et{}var nC=Object.defineProperty,rC=(t,e,n)=>e in t?nC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sl=(t,e,n)=>(rC(t,typeof e!="symbol"?e+"":e,n),n);class Al{constructor(){Sl(this,"formEditor","IBizRadio"),Sl(this,"gridEditor","IBizRadio")}async createController(e,n){const r=new tC(e,n);return await r.init(),r}}const Fl=S({name:"IBizDatePicker",props:wa(),emits:te(),setup(t,{emit:e}){const n=B("date-picker"),r=t.controller,o=r.model,i=I("date"),s=I("YYYY-MM-DD"),l=I(!1);switch(o.editorType){case"DATEPICKEREX":case"DATEPICKEREX_NOTIME":i.value="date";break;case"DATEPICKEREX_NODAY":case"DATEPICKEREX_NODAY_NOSECOND":l.value=!0,i.value="time";break;case"DATEPICKEREX_HOUR":case"DATEPICKEREX_MINUTE":case"DATEPICKEREX_SECOND":case"DATEPICKEREX_NOSECOND":case"DATEPICKER":default:i.value="datetime"}const c=r.valueFormat;c&&(s.value=c);const u=I();G(()=>t.value,(h,f)=>{if(h&&h!==f){const w=_e(h).format(c);w!=="Invalid Date"?u.value=w:u.value=h}},{immediate:!0});const p=(h,f)=>{e("change",h)},m=h=>{},v=I();t.autoFocus&&G(v,h=>{h&&h.$el.getElementsByTagName("input")[0].click()});const g=h=>{e("focus",h)},b=h=>{e("blur",h)};return G(u,(h,f)=>{h!==f&&e("infoTextChange",h)},{immediate:!0}),{ns:n,c:r,editorModel:o,type:i,format:s,formatValue:u,handleChange:p,onOpenChange:m,inputRef:v,isTimePicker:l,onFocus:g,onBlur:b}},render(){return a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):"",this.ns.e(this.editorModel.editorType)]},[this.readonly?this.formatValue:this.isTimePicker?a(d("el-time-picker"),{ref:"inputRef",type:this.type,format:this.format,"value-format":this.format,placeholder:this.c.placeHolder,modelValue:this.formatValue,"onUpdate:modelValue":t=>this.formatValue=t,onVisibleChange:this.onOpenChange,onChange:this.handleChange,disabled:this.disabled,onFocus:this.onFocus,onBlur:this.onBlur},null):a(d("el-date-picker"),{ref:"inputRef",type:this.type,format:this.format,"value-format":this.format,placeholder:this.c.placeHolder,modelValue:this.formatValue,"onUpdate:modelValue":t=>this.formatValue=t,onVisibleChange:this.onOpenChange,onChange:this.handleChange,disabled:this.disabled,onFocus:this.onFocus,onBlur:this.onBlur},null)])}});var oC=Object.defineProperty,aC=(t,e,n)=>e in t?oC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iC=(t,e,n)=>(aC(t,typeof e!="symbol"?e+"":e,n),n);class sC extends le{constructor(){super(...arguments),iC(this,"valueFormat")}getFormatByType(e){switch(e){case"DATEPICKER":return"YYYY-MM-DD HH:mm:ss";case"DATEPICKEREX":return"YYYY-MM-DD HH:mm:ss";case"DATEPICKEREX_NOTIME":return"YYYY-MM-DD";case"DATEPICKEREX_HOUR":return"YYYY-MM-DD HH";case"DATEPICKEREX_MINUTE":return"YYYY-MM-DD HH:mm";case"DATEPICKEREX_SECOND":return"YYYY-MM-DD HH:mm:ss";case"DATEPICKEREX_NODAY":return"HH:mm:ss";case"DATEPICKEREX_NODAY_NOSECOND":return"HH:mm";case"DATEPICKEREX_NOSECOND":return"YYYY-MM-DD HH:mm";default:return"YYYY-MM-DD HH:mm:ss"}}async onInit(){super.onInit(),this.valueFormat=this.getFormatByType(this.model.editorType)}}var lC=Object.defineProperty,cC=(t,e,n)=>e in t?lC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xl=(t,e,n)=>(cC(t,typeof e!="symbol"?e+"":e,n),n);class Ol{constructor(){xl(this,"formEditor","IBizDatePicker"),xl(this,"gridEditor","IBizDatePicker")}async createController(e,n){const r=new sC(e,n);return await r.init(),r}}const Tl=S({name:"IBizRaw",props:pn(),emits:te(),setup(t){var e,n,r,o;const i=B("raw"),l=t.controller.model,c=I("");let u="TEXT",p="";return l.contentType&&(u=l.contentType),(e=l.editorParams)!=null&&e.contenttype&&(u=(n=l.editorParams)==null?void 0:n.contenttype),(r=l.editorParams)!=null&&r.template&&(p=l.editorParams.template.replaceAll("//n",`
|
|
2
|
+
`)),(o=l.editorParams)!=null&&o.TEMPLATE&&(p=l.editorParams.TEMPLATE.replaceAll("//n",`
|
|
3
|
+
`)),G(()=>t.value,async(m,v)=>{if(m!==v&&((typeof m=="string"||typeof m=="number")&&(c.value=m),p&&m)){let g=null;if(typeof m=="string")try{g=JSON.parse(m)}catch{ibiz.log.error("JSON\u5B57\u7B26\u4E32\u8F6C\u6362\u9519\u8BEF")}c.value=await ibiz.util.hbs.render(p,g||m)}},{immediate:!0}),{ns:i,content:c,type:u,template:p}},render(){return a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[this.content&&a(d("iBizRawItem"),{class:this.ns.b("content"),content:this.content,type:this.type},null)])}});class uC extends le{}var dC=Object.defineProperty,pC=(t,e,n)=>e in t?dC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Nl=(t,e,n)=>(pC(t,typeof e!="symbol"?e+"":e,n),n);class zl{constructor(){Nl(this,"formEditor","IBizRaw"),Nl(this,"gridEditor","IBizRaw")}async createController(e,n){const r=new uC(e,n);return await r.init(),r}}const Rl=S({name:"IBizStepper",props:ya(),emits:te(),setup(t,{emit:e}){const n=B("stepper"),r=t.controller,o=r.model,i=I(null);let s=1,l=0,c=1/0,u=-1/0;o.editorParams&&(o.editorParams.stepvalue&&(s=ge(o.editorParams.stepvalue)),o.editorParams.precision&&(l=ge(o.editorParams.precision)),o.editorParams.maxvalue&&(c=ge(o.editorParams.maxvalue)),o.editorParams.minvalue&&(u=ge(o.editorParams.minvalue))),G(()=>t.value,(b,h)=>{if(b!==h){const f=Number(b);i.value=Number.isNaN(f)?0:f}},{immediate:!0});const p=b=>{e("change",b)},m=I();return{ns:n,c:r,currentVal:i,handleChange:p,inputRef:m,step:s,precision:l,max:c,min:u,onFocus:()=>{e("focus")},onBlur:()=>{e("blur")}}},render(){let t=null;return this.readonly?t=`${this.currentVal}`:t=[a(d("el-input-number"),{ref:"inputRef",modelValue:this.currentVal,"onUpdate:modelValue":e=>this.currentVal=e,placeholder:this.c.placeHolder,precision:this.precision,min:this.min,max:this.max,step:this.step,disabled:this.disabled,onChange:this.handleChange,onFocus:this.onFocus,onBlur:this.onBlur},null)],a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[t])}});class hC extends le{}var mC=Object.defineProperty,fC=(t,e,n)=>e in t?mC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$l=(t,e,n)=>(fC(t,typeof e!="symbol"?e+"":e,n),n);class bC{constructor(){$l(this,"formEditor","IBizStepper"),$l(this,"gridEditor","IBizStepper")}async createController(e,n){const r=new hC(e,n);return await r.init(),r}}const Ll=S({name:"IBizRate",props:Pa(),emits:te(),setup(t,{emit:e}){const n=B("rate"),r=I(),o=t.controller,i=o.model;let s=[],l=!1,c=5,u=[];i.editorParams&&(i.editorParams.colors&&(s=o.toObj(i.editorParams.colors)),i.editorParams.showText&&(l=o.toBoolean(i.editorParams.showText)),i.editorParams.maxvalue&&(c=ge(i.editorParams.maxvalue)),i.editorParams.texts&&(u=o.toObj(i.editorParams.texts))),G(()=>t.value,(v,g)=>{v!==g&&(v?r.value=v:r.value=0)},{immediate:!0});const p=v=>{e("change",v)},{componentRef:m}=ve(()=>e("focus"),()=>e("blur"));return{ns:n,currentVal:r,handleChange:p,colors:s,showText:l,max:c,texts:u,editorRef:m}},render(){return a("div",{class:[this.ns.b()],ref:"editorRef"},[a(d("el-rate"),{modelValue:this.currentVal,"onUpdate:modelValue":t=>this.currentVal=t,disabled:this.disabled||this.readonly,max:this.max,colors:this.colors,showText:this.showText,texts:this.texts,onChange:this.handleChange},null)])}});class vC extends le{}var gC=Object.defineProperty,CC=(t,e,n)=>e in t?gC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ml=(t,e,n)=>(CC(t,typeof e!="symbol"?e+"":e,n),n);class Vl{constructor(){Ml(this,"formEditor","IBizRate"),Ml(this,"gridEditor","IBizRate")}async createController(e,n){const r=new vC(e,n);return await r.init(),r}}const jl=S({name:"IBizSwitch",props:Ea(),emits:te(),setup(t,{emit:e}){const n=B("switch"),r=t.controller,o=r.model,i=I(!1);let s="",l="",c=[{value:0,label:""},{value:1,label:""}];if(o.editorParams&&o.editorParams.dicData&&(c=r.toObj(o.editorParams.dicData)),c&&Array.isArray(c)){const m=c.find(g=>g.value===0);m&&(l=m.label);const v=c.find(g=>g.value===1);v&&(s=v.label)}G(()=>t.value,(m,v)=>{m!==v&&(m?i.value=t.value==1:i.value=!1)},{immediate:!0});const u=m=>{e("change",m===!0?1:0)},{componentRef:p}=ve(()=>e("focus"),()=>e("blur"));return{ns:n,currentVal:i,activeText:s,inactiveText:l,handleChange:u,dicData:c,editorRef:p}},render(){return a("div",{class:[this.ns.b()],ref:"editorRef"},[a(d("el-switch"),{modelValue:this.currentVal,"onUpdate:modelValue":t=>this.currentVal=t,disabled:this.disabled||this.readonly,activeText:this.activeText,inactiveText:this.inactiveText,onChange:this.handleChange},null)])}});class wC extends le{}var yC=Object.defineProperty,PC=(t,e,n)=>e in t?yC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kl=(t,e,n)=>(PC(t,typeof e!="symbol"?e+"":e,n),n);class Ul{constructor(){kl(this,"formEditor","IBizSwitch"),kl(this,"gridEditor","IBizSwitch")}async createController(e,n){const r=new wC(e,n);return await r.init(),r}}const Gl=S({name:"IBizSlider",props:Ia(),emits:te(),setup(t,{emit:e}){const n=B("slider"),r=t.controller,o=r.model;let i=1,s=100,l=0,c=!1,u=!1,p=!1;o.editorParams&&(o.editorParams.stepvalue&&(i=ge(o.editorParams.stepvalue)),o.editorParams.maxvalue&&(s=ge(o.editorParams.maxvalue)),o.editorParams.minvalue&&(l=ge(o.editorParams.minvalue)),o.editorParams.showstops&&(c=r.toBoolean(o.editorParams.showstops)),o.editorParams.range&&(u=r.toBoolean(o.editorParams.range)),o.editorParams.showinput&&(p=r.toBoolean(o.editorParams.showinput)));const m=I();G(()=>t.value,(b,h)=>{b!==h&&(b==null?u?m.value=[0,1]:m.value=0:u?m.value=JSON.parse(b):m.value=Number(b))},{immediate:!0});const v=b=>{Array.isArray(b)?e("change",JSON.stringify(b)):e("change",b)},{componentRef:g}=ve(()=>e("focus"),()=>e("blur"));return{ns:n,currentVal:m,handleChange:v,step:i,max:s,min:l,showStops:c,range:u,showInput:p,editorRef:g}},render(){return a("div",{class:[this.ns.b(),this.readonly?this.ns.m("readonly"):""],ref:"editorRef"},[a(d("el-slider"),{modelValue:this.currentVal,"onUpdate:modelValue":t=>this.currentVal=t,disabled:this.disabled||this.readonly,step:this.step,max:this.max,min:this.min,showStops:this.showStops,range:this.range,showInput:this.showInput,onChange:this.handleChange},null)])}});class EC extends le{async onInit(){super.onInit(),this.model.precision&&ibiz.log.warn("\u6ED1\u52A8\u8F93\u5165\u6761\u4E0D\u652F\u6301\u914D\u7F6E\u7CBE\u5EA6")}}var IC=Object.defineProperty,DC=(t,e,n)=>e in t?IC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ql=(t,e,n)=>(DC(t,typeof e!="symbol"?e+"":e,n),n);class Wl{constructor(){ql(this,"formEditor","IBizSlider"),ql(this,"gridEditor","IBizSlider")}async createController(e,n){const r=new EC(e,n);return await r.init(),r}}function Hl(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const Kl=S({name:"IBizListBox",props:Da(),emits:te(),setup(t,{emit:e}){const n=B("list-box"),r=t.controller,o=r.model;let i=!1;o.editorParams&&o.editorParams.multiple&&(i=r.toBoolean(o.editorParams.multiple));const s=r.codeList,l=o.editorType,c=I([]);(async()=>{if(Object.is("LISTBOX",l))r.loadCodeList(t.data).then(f=>{c.value=f});else if(Object.is("LISTBOXPICKUP",l)){const h=r;if(h.model.appDataEntityId){const f=await h.getServiceData(t.data);f&&(c.value=f.data.map(w=>({value:w[h.keyName],text:w[h.textName]})))}}})();const p=F(()=>s&&s.orMode?s.orMode.toLowerCase():"str");let m=",";s&&s.valueSeparator&&(m=s.valueSeparator);const v=I([]);G(()=>t.value,h=>{if(Te(h))v.value=[];else if(i){let f=[];if(l==="LISTBOX"){if(Object.is(p.value,"num")&&c){const w=typeof h=="string"?parseInt(h,10):h;c.value.forEach(P=>{(w&P.value)===P.value&&f.push(P.value)})}else if(Object.is(p.value,"str")&&h!==""&&s&&typeof h=="string"&&(f=h.split(m),s.codeItemValueNumber))for(let w=0,P=f.length;w<P;w++)f[w]=Number(f[w])}else l==="LISTBOXPICKUP"&&h!==""&&(f=h.split(m));v.value=f}else v.value=[h]},{immediate:!0,deep:!0});const g=h=>{let f;if(i){const w=[...h];if(Object.is("LISTBOX",l))if(Object.is(p,"num")){let P=0;w.forEach(_=>{P|=parseInt(_,10)}),f=P}else Object.is(p,"str")&&(f=w.join(m));else Object.is("LISTBOXPICKUP",l)&&(f=w.join(m))}else f=h;e("change",f)},{componentRef:b}=ve(()=>e("focus"),()=>e("blur"));return{ns:n,items:c,selectArray:v,onSelectArrayChange:g,multiple:i,editorRef:b}},render(){let t,e;return a("div",{class:[this.ns.b()],ref:"editorRef"},[this.multiple?a(d("el-checkbox-group"),{class:this.ns.b("checkbox"),modelValue:this.selectArray,onChange:this.onSelectArrayChange},Hl(t=this.items.map((n,r)=>a(d("el-checkbox"),{key:r,label:n.value,disabled:this.disabled||this.readonly||n.disableSelect===!0},{default:()=>[a("span",{class:this.ns.e("text")},[n.text])]})))?t:{default:()=>[t]}):a(d("el-radio-group"),{class:this.ns.b("radio"),modelValue:this.selectArray[0]},Hl(e=this.items.map((n,r)=>a(d("el-radio"),{key:r,label:n.value,disabled:this.disabled||this.readonly||n.disableSelect===!0,onChange:()=>{this.onSelectArrayChange(n.value)}},{default:()=>[a("span",{class:this.ns.e("text")},[n.text])]})))?e:{default:()=>[e]})])}});var _C=Object.defineProperty,BC=(t,e,n)=>e in t?_C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SC=(t,e,n)=>(BC(t,typeof e!="symbol"?e+"":e,n),n);class AC extends et{constructor(){super(...arguments),SC(this,"codeList")}async onInit(){if(super.onInit(),this.model.appCodeListId){const e=await ibiz.hub.getApp(this.context.srfappid);this.codeList=e.codeList.getCodeList(this.model.appCodeListId)}}}var FC=Object.defineProperty,xC=(t,e,n)=>e in t?FC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bo=(t,e,n)=>(xC(t,typeof e!="symbol"?e+"":e,n),n);class OC extends le{constructor(){super(...arguments),Bo(this,"keyName","srfkey"),Bo(this,"textName","srfmajortext"),Bo(this,"interfaceName","")}async onInit(){super.onInit(),this.model.editorType==="LISTBOXPICKUP"&&this.model.appDEDataSetId&&(this.interfaceName=this.model.appDEDataSetId)}async getServiceData(e){const{context:n,params:r}=this.handlePublicParams(e,this.context,this.params),o=Lt(r,{size:1e3});if(this.interfaceName)return await ibiz.hub.getApp(this.context.srfappid).deService.exec(this.model.appDataEntityId,this.interfaceName,n,o);throw new be(this.model,"\u8BF7\u914D\u7F6E\u5B9E\u4F53\u548C\u5B9E\u4F53\u6570\u636E\u96C6")}}var TC=Object.defineProperty,NC=(t,e,n)=>e in t?TC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xl=(t,e,n)=>(NC(t,typeof e!="symbol"?e+"":e,n),n);class Yl{constructor(){Xl(this,"formEditor","IBizListBox"),Xl(this,"gridEditor","IBizListBox")}async createController(e,n){let r;return e.editorType==="LISTBOXPICKUP"?r=new OC(e,n):r=new AC(e,n),await r.init(),r}}const Jl=S({name:"IBizAutoComplete",props:_a(),emits:te(),setup(t,{emit:e}){const n=B("autocomplete"),r=t.controller,o=r.model.editorType,i=I(""),s=I([]);G(s,(E,x)=>{if(x.length===0&&E.length>0){const O=E.findIndex(V=>Object.is(V[r.keyName],t.value));O!==-1&&(i.value=E[O][r.textName])}});const l=I(!0),c=I();G(()=>t.value,E=>{if(E||E===null){E===null&&(i.value="");const x=s.value.findIndex(O=>Object.is(O[r.keyName],E));x!==-1?i.value=s.value[x][r.textName]:i.value=E}},{immediate:!0});const u=async E=>{const x=await r.calcFillDataItems(E);x.length&&x.forEach(O=>{e("change",O.value,O.id)}),e("change",E[r.keyName])},p=async E=>{await u(E),l.value=!0},m=async(E,x)=>{if(r.model.appDataEntityId){const O=E.trim(),V=await r.getServiceData(O,t.data);V&&(s.value=V.data,x&&x instanceof Function&&x(s.value))}};m("");const v=()=>{const E=r.dataItems;E.length>0&&E.forEach(x=>{e("change",null,x.id)}),e("change",null)},g=E=>{e("focus",E)},b=E=>{e("blur",E)},h=F(()=>!Object.is("AC_NOBUTTON",o)),f=F(()=>!(Object.is("AC_NOBUTTON",o)||Object.is("AC_FS_NOBUTTON",o)));let w=!1,P;const _=nt(E=>{P!==E&&e("change",E),P=void 0,w=!1},300,{leading:!0});return{ns:n,c:r,curValue:i,triggerOnFocus:h,autoCompleteClearable:f,autoCompleteRef:c,onSearch:m,onClear:v,onFocus:g,onBlur:b,onACSelect:p,items:s,handleInput:E=>{o!=="AC_FS"&&o!=="AC_FS_NOBUTTON"&&(w=!0,_(E))},isDebounce:w,handleKeyUp:E=>{E&&E.code==="Enter"&&e("enter",E)}}},render(){return a(d("el-autocomplete"),{class:this.ns.b(),ref:"autoCompleteRef",modelValue:this.curValue,"onUpdate:modelValue":t=>this.curValue=t,"value-key":this.c.textName,placeholder:this.c.placeHolder,placement:"bottom",clearable:this.autoCompleteClearable,"popper-class":this.ns.e("transfer"),teleported:!1,"fetch-suggestions":this.onSearch,onClear:this.onClear,disabled:this.disabled||this.readonly,onSelect:this.onACSelect,onInput:this.handleInput,onFocus:this.onFocus,onBlur:this.onBlur,onKeyup:this.handleKeyUp},{default:({item:t})=>a("div",{class:this.ns.e("transfer-item")},[t[this.c.textName]]),suffix:()=>{}})}});var zC=Object.defineProperty,RC=(t,e,n)=>e in t?zC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,st=(t,e,n)=>(RC(t,typeof e!="symbol"?e+"":e,n),n);class $C extends le{constructor(){super(...arguments),st(this,"keyName","srfkey"),st(this,"textName","srfmajortext"),st(this,"interfaceName",""),st(this,"sort",""),st(this,"deACMode"),st(this,"dataItems",[])}async onInit(){if(super.onInit(),this.model.appDataEntityId&&(this.model.appDEDataSetId&&(this.interfaceName=this.model.appDEDataSetId),this.model.appDEACModeId&&(this.deACMode=await bt(this.model.appDEACModeId,this.model.appDataEntityId,this.context.srfappid),this.deACMode))){const{minorSortAppDEFieldId:e,minorSortDir:n}=this.deACMode;e&&n&&(this.sort=`${e.toLowerCase()},${n.toLowerCase()}`),this.deACMode.textAppDEFieldId&&(this.textName=this.deACMode.textAppDEFieldId),this.deACMode.valueAppDEFieldId&&(this.keyName=this.deACMode.valueAppDEFieldId),this.deACMode.deacmodeDataItems&&(this.dataItems=[],this.deACMode.deacmodeDataItems.forEach(r=>{r.id!=="value"&&r.id!=="text"&&this.dataItems.push(r)}))}}async getServiceData(e,n){const{context:r,params:o}=this.handlePublicParams(n,this.context,this.params),i={};this.sort&&!Object.is(this.sort,"")&&Object.assign(i,{sort:this.sort}),e&&Object.assign(i,{query:e}),Object.assign(i,{size:1e3});const s=Lt(o,i);if(this.interfaceName)return await ibiz.hub.getApp(this.context.srfappid).deService.exec(this.model.appDataEntityId,this.interfaceName,r,s);throw new be(this.model,"\u8BF7\u914D\u7F6E\u5B9E\u4F53\u548C\u5B9E\u4F53\u6570\u636E\u96C6")}async calcFillDataItems(e){return this.deACMode?this.dataItems.length===0?[]:await Promise.all(this.dataItems.map(r=>{const o=e[r.appDEFieldId];return r.format||r.convertToCodeItemText&&r.codeListId||r.customCode,{id:r.id,value:o}})):[]}}var LC=Object.defineProperty,MC=(t,e,n)=>e in t?LC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ql=(t,e,n)=>(MC(t,typeof e!="symbol"?e+"":e,n),n);class VC{constructor(){Ql(this,"formEditor","IBizAutoComplete"),Ql(this,"gridEditor","IBizAutoComplete")}async createController(e,n){const r=new $C(e,n);return await r.init(),r}}function Zl(t,e,n){const r=I([]),o=I({Authorization:`Bearer ${kn(Gn.TOKEN)}`}),i=I(""),s=I(""),l={count:0,cacheFiles:[]};G(()=>t.value,h=>{r.value=h?JSON.parse(h):[]},{immediate:!0}),G(()=>t.data,h=>{if(h){const f=n.calcBaseUrl(h);i.value=f.uploadUrl,s.value=f.downloadUrl}},{immediate:!0,deep:!0}),G(r,h=>{h?.length&&s.value&&h.forEach(f=>{f.url=f.url||s.value.replace("%fileId%",f.id)})},{immediate:!0}),G(s,h=>{h&&r.value.length&&r.value.forEach(f=>{f.url=s.value.replace("%fileId%",f.id)})},{immediate:!0});const c=()=>{const h=[...r.value,...l.cacheFiles],f=h.length>0?JSON.stringify(h.map(w=>({name:w.name,id:w.id}))):null;l.cacheFiles=[],e(f)},u=()=>{l.count+=1},p=h=>{h&&(l.cacheFiles.push({name:h.filename,id:h.fileid}),l.count-=1,l.count===0&&c())},m=(...h)=>{const f=h[0];throw l.count-=1,new Ni({response:{data:JSON.parse(f.message),status:f.status}})},v=h=>{if(t.disabled)return;const f=r.value.findIndex(w=>w.id===h.id);f!==-1&&r.value.splice(f,1),c()},g=h=>{const f=h.url||s.value.replace("%fileId%",h.id);n.fileDownload({url:f,name:h.name})},b=F(()=>n.multiple?9999:1);return{uploadUrl:i,downloadUrl:s,headers:o,files:r,limit:b,onDownload:g,onError:m,onRemove:v,onSuccess:p,beforeUpload:u}}const ec=S({name:"IBizFileUpload",props:Tt(),emits:te(),setup(t,{emit:e}){const n=B("file-upload"),r=t.controller,{uploadUrl:o,headers:i,files:s,limit:l,onDownload:c,onError:u,onRemove:p,onSuccess:m,beforeUpload:v}=Zl(t,h=>{e("change",h)},r),g=F(()=>{var h;return l.value===1&&((h=s.value)==null?void 0:h.length)===1}),b=F(()=>!!r.parent.model.columnType);return{ns:n,c:r,uploadUrl:o,headers:i,files:s,limit:l,noUploadIcon:g,onDownload:c,onError:u,onRemove:p,onSuccess:m,beforeUpload:v,isGridEditor:b}},render(){return a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[a(d("el-upload"),{class:[this.ns.b("icon"),this.ns.is("not-show",this.noUploadIcon)],"file-list":this.files,action:this.uploadUrl,headers:this.headers,disabled:this.disabled,multiple:this.c.multiple,limit:this.limit,drag:!!this.c.isDrag,accept:this.c.accept,"before-upload":this.beforeUpload,onSuccess:this.onSuccess,onError:this.onError,onRemove:this.onRemove,onPreview:this.onDownload},{default:()=>[this.noUploadIcon?null:a(d("el-button"),{class:[this.ns.b("button")],size:this.isGridEditor?"small":"default"},{default:()=>[R("\u4E0A\u4F20\u6587\u4EF6")]})]})])}}),tc=S({name:"IBizImageUpload",props:Tt(),emits:te(),setup(t,{emit:e}){const n=B("image-upload"),r=t.controller,{uploadUrl:o,headers:i,files:s,limit:l,onDownload:c,onError:u,onRemove:p,onSuccess:m,beforeUpload:v}=Zl(t,P=>{e("change",P)},r),g=I(""),b=I(!1),h=P=>{b.value=P},f=P=>{g.value=P.url,b.value=!0},w=F(()=>l.value===1&&s.value.length===1);return{ns:n,c:r,files:s,limit:l,headers:i,uploadUrl:o,dialogImageUrl:g,dialogVisible:b,noUploadIcon:w,beforeUpload:v,onSuccess:m,onError:u,onRemove:p,onDownload:c,onDialogVisibleChange:h,onPreview:f}},render(){return a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[a("div",{class:this.ns.e("image-upload-list")},[this.files.map(t=>a("div",{key:t.id,class:this.ns.e("list-item")},[a("img",{src:t.url},null),a("div",{class:this.ns.e("list-item-cover")},[a("ion-icon",{class:this.ns.e("preview-icon"),onClick:()=>this.onPreview(t),name:"search"},null),a("ion-icon",{class:this.ns.e("download-icon"),onClick:()=>this.onDownload(t),name:"download"},null),a("ion-icon",{class:this.ns.e("remove-icon"),onClick:()=>this.onRemove(t),name:"remove"},null)])]))]),a(d("el-upload"),{ref:"imageUpload",class:[this.ns.b("icon"),this.ns.is("not-show",this.noUploadIcon)],"file-list":this.files,action:this.uploadUrl,headers:this.headers,disabled:this.disabled,multiple:this.c.multiple,limit:this.limit,"show-file-list":!1,accept:this.c.accept,"list-type":"picture-card","before-upload":this.beforeUpload,onSuccess:this.onSuccess,onError:this.onError,onRemove:this.onRemove,onPreview:this.onDownload},{default:()=>[a("ion-icon",{name:"add-outline",class:this.ns.e("image-upload-add")},null)]}),this.dialogVisible?a(d("el-image-viewer"),{onClose:()=>this.onDialogVisibleChange(!1),"url-list":[this.dialogImageUrl],"hide-on-click-modal":!0,"close-on-press-escape":!0,teleported:!0,"z-index":9999},null):null])}}),nc=S({name:"IBizImagePreview",props:Tt(),emits:te(),setup(t){const e=B("image-preview"),n=t.controller;return{ns:e,c:n}},render(){return a("div",{class:[this.ns.b()],onClick:t=>{t.stopPropagation()}},[a(d("el-image"),{fit:"contain",src:this.value,"preview-src-list":[this.value]},null)])}});var jC=Object.defineProperty,kC=(t,e,n)=>e in t?jC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,It=(t,e,n)=>(kC(t,typeof e!="symbol"?e+"":e,n),n);class UC extends le{constructor(){super(...arguments),It(this,"isDrag",!1),It(this,"multiple",!0),It(this,"accept",""),It(this,"uploadParams"),It(this,"exportParams")}async onInit(){var e;if(await super.onInit(),(e=this.model.editorType)!=null&&e.includes("PICTURE")&&(this.accept="image/*"),["FILEUPLOADER_ONE","PICTURE_ONE","PICTURE_ONE_RAW"].includes(this.model.editorType)&&(this.multiple=!1),this.editorParams){const{isDrag:n,multiple:r,accept:o,uploadParams:i,exportParams:s}=this.editorParams;if(n&&(this.isDrag=!!n),r&&(this.multiple=!!r),o&&(this.accept=o),i)try{this.uploadParams=JSON.parse(i)}catch{throw new be(i,"\u914D\u7F6EuploadParams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F")}if(s)try{this.exportParams=JSON.parse(s)}catch{throw new be(s,"\u914D\u7F6EexportParams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F")}}}calcBaseUrl(e){let n=`${ibiz.env.baseUrl}/${ibiz.env.appId}${ibiz.env.uploadFileUrl}`,r=`${ibiz.env.baseUrl}/${ibiz.env.appId}${ibiz.env.downloadFileUrl}/%fileId%`,o={},i={};return this.uploadParams&&(o=We(this.uploadParams,e,this.params,this.context)),this.exportParams&&(i=We(this.exportParams,e,this.params,this.context)),n+=Ne.stringify(o,{addQueryPrefix:!0}),r+=Ne.stringify(i,{addQueryPrefix:!0}),{uploadUrl:n,downloadUrl:r}}fileDownload(e){ibiz.net.request(e.url,{method:"get",responseType:"blob",baseURL:""}).then(n=>{if(n.status!==200)throw new pe("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");if(n.data){const r=e.name;gt(n.data,r)}else throw new pe("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728")})}}var GC=Object.defineProperty,qC=(t,e,n)=>e in t?GC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rc=(t,e,n)=>(qC(t,typeof e!="symbol"?e+"":e,n),n);class Dt{constructor(e){rc(this,"formEditor","IBizFileUpload"),rc(this,"gridEditor","IBizFileUpload");let n="IBizFileUpload";switch(e){case"PICTURE":case"PICTURE_ONE":n="IBizImageUpload";break;case"PICTURE_ONE_RAW":n="IBizImagePreview";break}this.formEditor=n,this.gridEditor=n}async createController(e,n){const r=new UC(e,n);return await r.init(),r}}const oc=S({name:"IBizPicker",props:ke(),emits:te(),setup(t,{emit:e}){const n=B("picker"),r=t.controller,o=I(""),i=I([]),s=I(!0),l=I();G(()=>t.value,y=>{if(y||y===null){r.model.valueType==="OBJECT"?o.value=y?y[r.objectNameField]:null:o.value=y,y===null&&(o.value="");const D=t.data[r.valueItem];if(i.value.findIndex(x=>Object.is(x[r.keyName],D))!==-1)return;i.value=[],!Mt(y)&&!Mt(D)&&i.value.push({[r.textName]:y,[r.keyName]:D})}},{immediate:!0});const c=async y=>{const D=await r.calcFillDataItems(y);D.length&&D.forEach(x=>{e("change",x.value,x.id)});const E={};Object.assign(E,y),Object.assign(E,{[r.keyName]:E[r.keyName]?E[r.keyName]:E.srfkey,[r.textName]:E[r.textName]?E[r.textName]:E.srfmajortext}),r.valueItem&&e("change",E[r.keyName],r.valueItem),r.model.valueType==="OBJECT"?e("change",r.handleObjectParams(E)):e("change",y[r.textName])},u=async y=>{y.stopPropagation();const D=await r.openPickUpView(t.data);D&&D[0]&&await c(D[0])},p=async y=>{y.stopPropagation();const D=await r.openLinkView(t.data);D&&D[0]&&await c(D[0])},m=async y=>{await c(y),s.value=!0},v=async(y,D)=>{if(r.model.appDataEntityId){let E="";y!==t.value&&(E=y.trim());const x=await r.getServiceData(E,t.data);x&&(i.value=x.data,D&&D instanceof Function&&D(i.value))}},g=()=>{const y=r.dataItems;y?.length&&y.forEach(D=>{e("change",null,D.id)}),r.valueItem&&e("change",null,r.valueItem),e("change",null)},b=(r.linkView?1:0)+(r.pickupView?1:0),h=I();t.autoFocus&&G(h,y=>{y&&y.focus()});const f=y=>{e("focus",y)},w=y=>{e("blur",y)},P=y=>{y&&y.code==="Enter"&&e("enter",y)},_=F(()=>Nt(o.value));return G(_,(y,D)=>{y!==D&&e("infoTextChange",y)},{immediate:!0}),{ns:n,c:r,curValue:o,valueText:_,items:i,pickerAutoCompleteRef:l,openPickUpView:u,openLinkView:p,onACSelect:m,onSearch:v,editorRef:h,onClear:g,onFocus:f,onBlur:w,handleKeyUp:P,closeCircle:b}},render(){return this.readonly?a("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]):a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):""]},[this.c.noAC?a(d("el-input"),{ref:"editorRef",modelValue:this.curValue,"onUpdate:modelValue":t=>this.curValue=t,clearable:!0,placeholder:this.c.placeHolder,onClear:this.onClear,disabled:this.disabled,onBlur:this.onBlur,onFocus:this.onFocus,onKeyup:this.handleKeyUp},{suffix:()=>{if(this.$slots.append)return this.$slots.append({});if(!this.c.noButton)return[this.c.model.pickupAppViewId?a("ion-icon",{onClick:this.openPickUpView,name:"search"},null):null,this.c.model.linkAppViewId?a("ion-icon",{onClick:this.openLinkView,name:"link-arrow"},null):null]}}):a("div",{class:[this.ns.e("autocomplete"),this.ns.m(this.closeCircle.toString())]},[a(d("el-autocomplete"),{ref:"editorRef",modelValue:this.curValue,"onUpdate:modelValue":t=>this.curValue=t,"value-key":this.c.textName,placeholder:this.c.placeHolder,clearable:!0,"popper-class":this.ns.e("transfer"),"fetch-suggestions":this.onSearch,onClear:this.onClear,onBlur:this.onBlur,onFocus:this.onFocus,onKeyup:this.handleKeyUp,disabled:this.disabled},{default:({item:t})=>this.$slots.append?this.$slots.append({}):a("div",{class:this.ns.e("transfer-item"),onClick:()=>{this.onACSelect(t)}},[t[this.c.textName]]),suffix:()=>{if(!this.c.noButton)return[this.c.model.pickupAppViewId?a("ion-icon",{onClick:this.openPickUpView,name:"search"},null):null,this.c.model.linkAppViewId?a("ion-icon",{onClick:this.openLinkView,name:"link-arrow"},null):null]}})])])}});function WC(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const ac=S({name:"IBizMPicker",props:ke(),emits:te(),setup(t,{emit:e}){const n=B("mpicker"),r=t.controller,o=I([]),i=I([]),s=I([]),l=I(!1),c=I(!1);G(()=>t.value,_=>{if(o.value=[],s.value=[],_){if(r.model.valueType==="OBJECTS")_.forEach(y=>{const D=Li(y);Object.assign(D,{[r.keyName]:y[r.objectIdField],[r.textName]:y[r.objectNameField]}),r.objectValueField&&(Object.assign(D,{...y[r.objectValueField]}),delete D[r.objectValueField]),D[r.keyName]&&s.value.push(D)});else if(r.objectIdField&&r.model.valueSeparator)_.split(r.model.valueSeparator).forEach(D=>{s.value.push({[r.keyName]:D})});else try{s.value=JSON.parse(_)}catch{ibiz.log.error(`SIMPLE\u7C7B\u578B\u5730\u5740\u680F\u503C\u683C\u5F0F${_}\u4E0D\u7B26\u5408JSON\u5B57\u7B26\u4E32\u8981\u6C42`)}s.value.forEach(y=>{o.value.push(y[r.keyName]),i.value.findIndex(E=>Object.is(E[r.keyName],y[r.keyName]))<0&&i.value.push({[r.keyName]:y[r.keyName],[r.textName]:y[r.textName]})})}},{immediate:!0,deep:!0});const u=_=>{const y=[];_&&Array.isArray(_)&&_.forEach(E=>{Object.assign(E,{[r.keyName]:E[r.keyName]?E[r.keyName]:E.srfkey,[r.textName]:E[r.textName]?E[r.textName]:E.srfmajortext}),r.model.valueType==="OBJECTS"?y.push(r.handleObjectParams(E)):r.objectIdField?y.push(E[r.keyName]):y.push({[r.keyName]:E[r.keyName],[r.textName]:E[r.textName]}),i.value.findIndex(O=>Object.is(O[r.keyName],E[r.keyName]))<0&&i.value.push(E)});let D=null;y.length>0&&(r.model.valueType==="OBJECTS"?D=y:D=r.objectIdField?y.join(r.model.valueSeparator):JSON.stringify(y)),e("change",D)},p=async()=>{let _;if(s.value.length){const D=JSON.parse(JSON.stringify(s.value));D.forEach((E,x)=>{D[x].srfkey=E[r.keyName],D[x].srfmajortext=E[r.textName]}),_=JSON.stringify(D)}const y=await r.openPickUpView(t.data,_);y&&u(y)},m=_=>{const y=[];let D=null;_.length>0&&(_.forEach(E=>{let x=i.value.findIndex(V=>Object.is(V[r.keyName],E)),O={};x>=0?O=i.value[x]:(x=s.value.findIndex(V=>Object.is(V[r.keyName],E)),x>=0&&(O=s.value[x])),r.model.valueType==="OBJECTS"?y.push(r.handleObjectParams(O)):r.objectIdField?y.push(O[r.keyName]):y.push({[r.keyName]:O[r.keyName],[r.textName]:O[r.textName]})}),y.length>0&&(r.model.valueType==="OBJECTS"?D=y:D=r.objectIdField?y.join(r.model.valueSeparator):JSON.stringify(y)),e("change",D))},v=_=>{const y=s.value.findIndex(D=>Object.is(D[r.keyName],_));if(y>=0){s.value.splice(y,1);const D=[];let E=null;s.value.forEach(x=>{r.model.valueType==="OBJECTS"?D.push(r.handleObjectParams(x)):r.objectIdField?D.push(x[r.keyName]):D.push({[r.keyName]:x[r.keyName],[r.textName]:x[r.textName]})}),D.length>0&&(r.model.valueType==="OBJECTS"?E=D:E=r.objectIdField?D.join(r.model.valueSeparator):JSON.stringify(D)),e("change",E)}},g=async _=>{if(r.model.appDataEntityId){c.value=!0;try{const y=_.trim(),D=await r.getServiceData(y,t.data);c.value=!1,D&&(i.value=D.data)}catch{c.value=!1}}},b=_=>{l.value=_,l.value&&(i.value=[],g(""))},h=F(()=>s.value.map(_=>_[r.textName]).join(","));G(h,(_,y)=>{_!==y&&e("infoTextChange",_)},{immediate:!0});const f=_=>{e("focus",_)},w=_=>{e("blur",_)},P=_=>{_&&_.code==="Enter"&&e("enter",_)};return Pe(()=>{r.objectNameField&&g("")}),{ns:n,c:r,curValue:o,loading:c,items:i,valueText:h,onSearch:g,onOpenChange:b,onSelect:m,onRemove:v,openPickUpView:p,onFocus:f,onBlur:w,handleKeyUp:P}},render(){let t;return a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""],ref:"editorRef"},[this.readonly&&this.valueText,!this.readonly&&a(d("el-select"),{modelValue:this.curValue,"onUpdate:modelValue":e=>this.curValue=e,filterable:!0,remote:!0,multiple:!0,loading:this.loading,placeholder:this.c.placeHolder?this.c.placeHolder:" ","remote-method":this.onSearch,onVisibleChange:this.onOpenChange,onChange:this.onSelect,onRemoveTag:this.onRemove,disabled:this.disabled,onFocus:this.onFocus,onBlur:this.onBlur,onKeyup:this.handleKeyUp},WC(t=this.items.map(e=>a(d("el-option"),{key:e[this.c.keyName],value:e[this.c.keyName],label:e[this.c.textName]},null)))?t:{default:()=>[t]}),!this.readonly&&a("div",{class:this.ns.e("buns-position")},[a("div",{class:this.ns.e("btns")},[this.c.model.pickupAppViewId?a("ion-icon",{onClick:this.openPickUpView,name:"search"},null):null])])])}});function HC(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const ic=S({name:"IBizPickerDropDown",props:ke(),emits:te(),setup(t,{emit:e}){const n=B("picker-dropdown"),r=t.controller,o=I(""),i=I([]),s=I(!1),l=I("");G(()=>t.value,y=>{if(y||y===null){r.model.valueType==="OBJECT"?o.value=y?y[r.objectNameField]:null:o.value=y,y===null&&(o.value=""),l.value=o.value;const D=t.data[r.valueItem];if(i.value.findIndex(x=>Object.is(x[r.keyName],D))!==-1)return;i.value=[],!Te(y)&&!Te(D)&&i.value.push({[r.textName]:y,[r.keyName]:D})}},{immediate:!0}),G(()=>t.data[r.valueItem],(y,D)=>{y!==D&&(l.value=y,y===null&&e("change",null))},{immediate:!0,deep:!0});const c=I(!1),u=async y=>{const D=await r.calcFillDataItems(y);D.length&&D.forEach(x=>{e("change",x.value,x.id)});const E={};Object.assign(E,y),Object.assign(E,{[r.keyName]:E[r.keyName]?E[r.keyName]:E.srfkey,[r.textName]:E[r.textName]?E[r.textName]:E.srfmajortext}),r.valueItem&&e("change",E[r.keyName],r.valueItem),r.model.valueType==="OBJECT"?e("change",r.handleObjectParams(E)):e("change",y[r.textName])},p=y=>{const D=i.value.findIndex(E=>Object.is(E[r.keyName],y));D>=0&&u(i.value[D]),s.value=!1};let m=null;const v=async y=>{if(s.value)if(r.model.appDataEntityId&&c.value===!1){c.value=!0;try{let D="";y!==t.value&&(D=y.trim());const E=await r.getServiceData(D,t.data);E&&(i.value=E.data)}finally{if(c.value=!1,m!=null){const D=m;m=null,await v(D)}}}else m=y},g=y=>{y&&(i.value=[],v(""))},b=()=>{const y=r.dataItems;y?.length&&y.forEach(D=>{e("change",null,D.id)}),r.valueItem&&e("change",null,r.valueItem),e("change",null)},h=y=>{s.value=!0,e("focus",y)},f=y=>{s.value=!1,e("blur",y)},w=y=>{y&&y.code==="Enter"&&e("enter",y)},P=()=>{s.value=!0},_=F(()=>Nt(o.value));return G(_,(y,D)=>{y!==D&&e("infoTextChange",y)},{immediate:!0}),{ns:n,c:r,refValue:l,curValue:o,valueText:_,loading:c,items:i,onOpenChange:g,onClear:b,onSelect:p,onSearch:v,onFocus:h,onBlur:f,onClick:P,handleKeyUp:w}},render(){let t;return this.readonly?a("div",{class:(this.ns.b(),this.ns.m("readonly"))},[this.valueText]):a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[this.readonly?this.value:a(d("el-select"),{modelValue:this.refValue,"onUpdate:modelValue":e=>this.refValue=e,filterable:!0,remote:!0,"remote-show-suffix":!0,clearable:!0,loading:this.loading,placeholder:this.c.placeHolder?this.c.placeHolder:" ","remote-method":this.onSearch,onVisibleChange:this.onOpenChange,onChange:this.onSelect,onClear:this.onClear,disabled:this.disabled,onFocus:this.onFocus,onBlur:this.onBlur,onKeyup:this.handleKeyUp,onClick:this.onClick},HC(t=this.items.map(e=>a(d("el-option"),{value:e[this.c.keyName],key:e[this.c.keyName],label:e[this.c.textName]},null)))?t:{default:()=>[t]})])}}),sc=S({name:"IBizPickerLink",props:ke(),emits:te(),setup(t,{emit:e}){const n=B("picker-link"),r=t.controller,o=I("");G(()=>t.value,(u,p)=>{u&&u!==p&&(r.model.valueType==="OBJECT"?o.value=u?u[r.objectNameField]:"":o.value=u)},{immediate:!0});const i=u=>{const p={};Object.assign(p,u),Object.assign(p,{[r.keyName]:p[r.keyName]?p[r.keyName]:p.srfkey,[r.textName]:p[r.textName]?p[r.textName]:p.srfmajortext}),r.valueItem&&e("change",p[r.keyName],r.valueItem),r.model.valueType==="OBJECT"?e("change",r.handleObjectParams(p)):e("change",u[r.textName])},s=async()=>{const u=await r.openLinkView(t.data);u&&i(u[0])},{componentRef:l}=ve(()=>e("focus"),()=>e("blur")),c=F(()=>Nt(o.value));return G(c,(u,p)=>{u!==p&&e("infoTextChange",u)},{immediate:!0}),{ns:n,openLinkView:s,curValue:o,editorRef:l}},render(){return a("div",{class:[this.ns.b(),this.readonly?this.ns.m("readonly"):""],ref:"editorRef"},[a("a",{onClick:this.openLinkView},[this.curValue])])}}),lc=S({name:"IBizPickerEmbedView",props:ke(),emits:te(),setup(t,{emit:e}){const n=B("picker-embed-view"),r=t.controller,o=I(Ee(r.context)),i=I(Ee(r.params)),s=()=>{const{context:m,params:v}=r.handlePublicParams(t.data,r.context,r.params);Object.assign(o.value,m),Object.assign(i.value,v)};s(),G(()=>t.data,(m,v)=>{m!==v&&s()});const l=m=>{let v="",g="";m&&Array.isArray(m)&&(m.forEach(b=>{v+=`${b.srfkey},`,g+=`${b.srfmajortext},`}),v=v.substring(0,v.length-1),g=g.substring(0,g.length-1),r.valueItem&&e("change",v,r.valueItem),e("change",g))},c=m=>{l(m.data)},{componentRef:u}=ve(()=>e("focus"),()=>e("blur")),p=F(()=>r.pickupView);return{ns:n,c:r,context:o,params:i,onSelectionChange:c,editorRef:u,pickupViewModel:p}},render(){var t;const e=d("IBizViewShell");return a("div",{class:[this.ns.b()],ref:"editorRef"},[this.pickupViewModel?[a("div",{class:this.ns.b("view")},[re(e,{context:this.context,params:this.params,viewId:(t=this.c.pickupView)==null?void 0:t.id,onSelectionChange:this.onSelectionChange})]),a("div",{class:this.ns.b("value")},[this.$props.value?this.$props.value.split(",").map(n=>a("span",null,[n,R("; ")])):a("span",null,[this.c.placeHolder])])]:null])}});function KC(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const cc=S({name:"IBizPickerSelectView",props:ke(),emits:te(),setup(t,{emit:e}){const n=B("picker-select-view"),r=t.controller,o=r.model,i=I(!0);o.editorParams&&o.editorParams.multiple&&(i.value=!r.toBoolean(o.editorParams.multiple));const s=I([]),l=I([]);let c=[];const u=I(""),p=I(!1),m=I("auto"),v=I(Ee(r.context)),g=I(Ee(r.params)),b=()=>{v.value={query:u.value,...v.value}},h=M=>{t.disabled||(M?p.value=M:p.value=!p.value)},{componentRef:f}=ve(()=>e("focus"),()=>e("blur"));G(()=>t.value,M=>{if(i.value)r.model.valueType==="OBJECT"?u.value=M?M[r.objectNameField]:null:u.value=M||"",!t.data||!r.valueItem||!t.data[r.valueItem]?ibiz.log.error("\u503C\u9879\u5F02\u5E38"):(c=[{srfkey:t.data[r.valueItem],srfmajortext:t.value}],g.value.selectedData=c);else{s.value=[];const K=[];if(M)if(!t.data||!r.valueItem||!t.data[r.valueItem])ibiz.log.error("\u503C\u9879\u5F02\u5E38");else{const H=t.data[r.valueItem].split(","),Q=M.split(",");H.forEach((k,z)=>{K.push({srfmajortext:Q[z],srfkey:k})}),l.value=[],K.forEach(k=>{s.value.push(k.srfkey),l.value.findIndex($=>Object.is($.srfkey,k.srfkey))<0&&l.value.push({srfmajortext:k.srfmajortext,srfkey:k.srfkey})})}c=K,g.value.selectedData=c}},{immediate:!1,deep:!0}),Pe(()=>{f.value&&(m.value=`${f.value.offsetWidth}px`)});const w=()=>{const M=r.dataItems;M?.length&&M.forEach(K=>{e("change",null,K.id)}),r.valueItem&&e("change",null,r.valueItem),e("change",null)},P=M=>{if(M.length===0){w();return}if(i.value){if(p.value=!1,r.valueItem){const H=M[0][r.keyName]?M[0][r.keyName]:M[0].srfkey;e("change",H,r.valueItem)}const K=M[0][r.textName]?M[0][r.textName]:M[0].srfmajortext;r.model.valueType==="OBJECT"?e("change",r.handleObjectParams(M[0])):e("change",K)}else{let K="",H="";M&&Array.isArray(M)&&(l.value=[],M.forEach(Q=>{const k=Q[r.keyName]?Q[r.keyName]:Q.srfkey;K+=`${k},`;const z=Q[r.textName]?Q[r.textName]:Q.srfmajortext;H+=`${z},`,l.value.findIndex(A=>Object.is(A.srfkey,k))<0&&l.value.push({srfmajortext:z,srfkey:k})})),K=K.substring(0,K.length-1),H=H.substring(0,H.length-1),r.valueItem&&e("change",K,r.valueItem),e("change",H)}},_=async M=>{M.stopPropagation();const K=await r.openLinkView(t.data);K&&P(K)},y=M=>{const K=[];M.length>0&&M.forEach(k=>{const z=l.value.findIndex($=>Object.is($.srfkey,k));z>=0&&K.push(l.value[z])});let H="",Q="";K.forEach(k=>{const z=k[r.keyName]?k[r.keyName]:k.srfkey;H+=`${z},`;const $=k[r.textName]?k[r.textName]:k.srfmajortext;Q+=`${$},`}),H=H.substring(0,H.length-1),Q=Q.substring(0,Q.length-1),r.valueItem&&e("change",H,r.valueItem),e("change",Q)},D=M=>{u.value=M},E=M=>{M.data&&P(M.data)},x=new Ge({mode:qe.DRAWER,viewUsage:2,dismiss:M=>{E(M)}});return{ns:n,c:r,singleSelect:i,keySet:s,items:l,queryValue:u,visible:p,pickViewWidth:m,context:v,params:g,editorRef:f,onInputChange:b,triggerMenu:h,onViewDataChange:P,onClear:w,openLinkView:_,onSelectChange:y,remoteMethod:D,onSelectionChange:E,modal:x,onFocus:M=>{e("focus",M)},onBlur:M=>{e("blur",M)},handleKeyUp:M=>{M&&M.code==="Enter"&&e("enter",M)}}},render(){return a("div",{class:[this.ns.b()],ref:"editorRef"},[a(d("el-dropdown"),{trigger:"click","popper-class":this.ns.b("popper")},{default:()=>{let t;return this.singleSelect?a(d("el-input"),{modelValue:this.queryValue,"onUpdate:modelValue":e=>this.queryValue=e,class:this.ns.b("input"),placeholder:this.c.placeHolder,disabled:this.disabled,readonly:this.readonly,onChange:this.onInputChange,onFocus:e=>{this.triggerMenu(!0),this.onFocus(e)},onBlur:this.onBlur,onKeyup:this.handleKeyUp},{suffix:()=>[this.queryValue&&!this.disabled&&!this.readonly&&a("ion-icon",{onClick:this.onClear,name:"clear"},null),this.c.model.linkAppViewId&&a("ion-icon",{onClick:this.openLinkView,name:"link-arrow"},null)]}):a(d("el-select"),{"popper-class":"select","model-value":this.keySet,placeholder:this.c.placeHolder?this.c.placeHolder:" ",multiple:!0,filterable:!0,remote:!0,"remote-method":this.remoteMethod,onChange:this.onSelectChange,onFocus:e=>{this.triggerMenu(!0),this.onFocus(e)},onBlur:this.onBlur,onKeyup:this.handleKeyUp,disabled:this.disabled||this.readonly},KC(t=this.items.map((e,n)=>a(d("el-option"),{key:e.srfkey+n,label:e.srfmajortext,value:e.srfkey},null)))?t:{default:()=>[t]})},dropdown:()=>{const t=d("IBizViewShell");return a(d("el-dropdown-menu"),null,{default:()=>[this.c.pickupView&&re(t,{context:this.context,params:this.params,viewId:this.c.pickupView.id,style:{height:"100%",width:this.pickViewWidth},onSelectionChange:this.onSelectionChange,modal:this.modal})]})}})])}});var XC=Object.defineProperty,YC=(t,e,n)=>e in t?XC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ce=(t,e,n)=>(YC(t,typeof e!="symbol"?e+"":e,n),n);class JC extends le{constructor(){super(...arguments),Ce(this,"multiple",!1),Ce(this,"pickupView",null),Ce(this,"linkView",null),Ce(this,"valueItem",""),Ce(this,"keyName","srfkey"),Ce(this,"textName","srfmajortext"),Ce(this,"interfaceName",""),Ce(this,"sort",""),Ce(this,"noAC",!1),Ce(this,"noButton",!1),Ce(this,"deACMode"),Ce(this,"dataItems",[]),Ce(this,"objectIdField",""),Ce(this,"objectNameField",""),Ce(this,"objectValueField","")}async onInit(){var e,n,r,o;if(super.onInit(),this.initParams(),this.valueItem=((e=this.model.valueItemName)==null?void 0:e.toLowerCase())||"",this.model.appDataEntityId&&(this.model.appDEDataSetId&&(this.interfaceName=this.model.appDEDataSetId),this.model.appDEACModeId&&(this.deACMode=await bt(this.model.appDEACModeId,this.model.appDataEntityId,this.context.srfappid),this.deACMode))){const{minorSortAppDEFieldId:s,minorSortDir:l}=this.deACMode;s&&l&&(this.sort=`${s.toLowerCase()},${l.toLowerCase()}`),this.deACMode.textAppDEFieldId&&(this.textName=this.deACMode.textAppDEFieldId),this.deACMode.valueAppDEFieldId&&(this.keyName=this.deACMode.valueAppDEFieldId),this.deACMode.deacmodeDataItems&&(this.dataItems=[],this.deACMode.deacmodeDataItems.forEach(c=>{c.id!=="value"&&c.id!=="text"&&this.dataItems.push(c)}))}const i=["PICKEREX_DROPDOWNVIEW","PICKEREX_DROPDOWNVIEW_LINK","PICKUPVIEW"];this.model.editorType&&i.includes(this.model.editorType)&&this.initPickupViewParams(),this.objectIdField=(n=this.model.objectIdField)==null?void 0:n.toLowerCase(),this.objectNameField=(r=this.model.objectNameField)==null?void 0:r.toLowerCase(),this.objectValueField=(o=this.model.objectValueField)==null?void 0:o.toLowerCase()}initParams(){switch(this.model.editorType){case"PICKEREX_NOAC":case"PICKEREX_NOAC_LINK":this.noAC=!0;break;case"PICKEREX_NOBUTTON":this.noButton=!0;break;default:this.noButton=!1,this.noAC=!1}}async initPickupViewParams(){this.model.pickupAppViewId&&(this.pickupView=await ibiz.hub.config.view.get(this.model.pickupAppViewId))}async initLinkViewParams(){this.model.linkAppViewId&&(this.linkView=await ibiz.hub.config.view.get(this.model.linkAppViewId))}async getServiceData(e,n){const{context:r,params:o}=this.handlePublicParams(n,this.context,this.params),i={};this.sort&&!Object.is(this.sort,"")&&Object.assign(i,{sort:this.sort}),e&&Object.assign(i,{query:e}),Object.assign(i,{size:1e3});const s=Lt(o,i);if(this.interfaceName)return await ibiz.hub.getApp(this.context.srfappid).deService.exec(this.model.appDataEntityId,this.interfaceName,r,s);throw new be(this.model,"\u8BF7\u914D\u7F6E\u5B9E\u4F53\u548C\u5B9E\u4F53\u6570\u636E\u96C6")}async openPickUpView(e,n){await this.initPickupViewParams();const{context:r,params:o}=this.handlePublicParams(e,this.context,this.params);if(n&&(o.selectedData=n),!this.pickupView)throw new be(this.model,"\u8BF7\u914D\u7F6E\u6570\u636E\u9009\u62E9\u89C6\u56FE");const i=await ibiz.commands.execute(tt.TAG,this.pickupView.id,r,o,{openMode:"POPUPMODAL"});if(i&&i.ok&&i.data)return i.data;ibiz.log.debug("\u6A21\u6001\u53D6\u6D88\u6216\u5173\u95ED\u5F02\u5E38",i)}async openLinkView(e){const n=this.context.clone();e[this.valueItem]&&(n.srfkey=e[this.valueItem]);const{context:r,params:o}=this.handlePublicParams(e,n,this.params),{linkAppViewId:i}=this.model;if(!i)throw new be(this.model,"\u8BF7\u914D\u7F6E\u6570\u636E\u94FE\u63A5\u89C6\u56FE");return ibiz.commands.execute(tt.TAG,i,r,o)}async calcFillDataItems(e){return this.deACMode?this.dataItems.length===0?[]:await Promise.all(this.dataItems.map(r=>{const o=e[r.appDEFieldId];return r.format||r.convertToCodeItemText&&r.codeListId||r.customCode,{id:r.id,value:o}})):[]}handleObjectParams(e){const n={};return this.objectIdField&&Object.assign(n,{[this.objectIdField]:e[this.keyName]}),this.objectNameField&&Object.assign(n,{[this.objectNameField]:e[this.textName]}),this.objectValueField&&Object.assign(n,{[this.objectValueField]:Ee(e)}),n}}var QC=Object.defineProperty,ZC=(t,e,n)=>e in t?QC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uc=(t,e,n)=>(ZC(t,typeof e!="symbol"?e+"":e,n),n);class ye{constructor(e){uc(this,"formEditor"),uc(this,"gridEditor");let n="IBizPicker";switch(e){case"PICKEREX_TRIGGER":n="IBizPickerDropDown";break;case"PICKEREX_LINK":case"PICKEREX_LINKONLY":n="IBizPickerLink";break;case"ADDRESSPICKUP":case"ADDRESSPICKUP_AC":n="IBizMPicker";break;case"PICKEREX_DROPDOWNVIEW":case"PICKEREX_DROPDOWNVIEW_LINK":n="IBizPickerSelectView";break;case"PICKUPVIEW":n="IBizPickerEmbedView";break}this.formEditor=n,this.gridEditor=n}async createController(e,n){const r=new JC(e,n);return await r.init(),r}}const dc=S({name:"IBizNumberRangePicker",props:Ba(),emits:te(),setup(t,{emit:e}){const n=B("number-range-picker"),r=t.controller,o=r.model;let i=1/0,s=-1/0,l=0,c="-";const u=o.placeHolder&&o.placeHolder.split(";")[0]||"",p=o.placeHolder&&o.placeHolder.split(";")[1]||"";let m="~";o.editorParams&&(o.editorParams.maxvalue&&(i=ge(o.editorParams.maxvalue)),o.editorParams.minvalue&&(s=ge(o.editorParams.minvalue)),o.editorParams.precision&&(l=ge(o.editorParams.precision)),o.editorParams.valueSeparator&&(c=o.editorParams.valueSeparator),o.editorParams.rangeSeparator&&(m=o.editorParams.rangeSeparator));const v=I([]),g=o.editorItems;if(g&&g.length>0){const _=g.map(y=>y.id);v.value=_}const b=I(null),h=I(null);G(()=>t.value,(_,y)=>{_!==y&&typeof _=="string"&&(b.value=_.split(c)[0]?Number(_.split(c)[0]):null,h.value=_.split(c)[1]?Number(_.split(c)[1]):null)},{immediate:!0});const f=(_,y)=>{if(y===0?b.value=_:y===1&&(h.value=_),b.value!==null&&h.value!==null&&e("change",[b.value,h.value].join(c)),v.value){const D=v.value[y];e("change",_,D)}},{componentRef:w}=ve(()=>e("focus"),()=>e("blur"));return{ns:n,c:r,refFormItem:v,minValue:b,maxValue:h,handleChange:f,max:i,min:s,precision:l,valueSeparator:c,startPlaceHolder:u,endPlaceHolder:p,rangeSeparator:m,editorRef:w,handleKeyUp:_=>{_&&_.code==="Enter"&&e("enter",_)}}},render(){return a("div",{class:[this.ns.b()],ref:"editorRef"},[a(d("el-input-number"),{min:this.min,modelValue:this.minValue,disabled:this.disabled,readonly:this.readonly,precision:this.controller.model.precision,placeholder:this.startPlaceHolder,controls:!1,onChange:t=>this.handleChange(t,0),onKeyup:this.handleKeyUp},null),a("div",{class:this.ns.b("separator")},[this.rangeSeparator]),a(d("el-input-number"),{min:typeof this.minValue=="number"?this.minValue+1:-1/0,max:this.max,modelValue:this.maxValue,disabled:this.disabled,readonly:this.readonly,precision:this.controller.model.precision,placeholder:this.endPlaceHolder,controls:!1,onChange:t=>this.handleChange(t,1),onKeyup:this.handleKeyUp},null)])}});class ew extends le{}var tw=Object.defineProperty,nw=(t,e,n)=>e in t?tw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pc=(t,e,n)=>(nw(t,typeof e!="symbol"?e+"":e,n),n);class rw{constructor(){pc(this,"formEditor","IBizNumberRangePicker"),pc(this,"gridEditor","IBizNumberRangePicker")}async createController(e,n){const r=new ew(e,n);return await r.init(),r}}const hc=S({name:"IBizDateRangePicker",props:Sa(),emits:te(),setup(t,{emit:e}){const n=B("date-range-picker"),r=t.controller,o=r.model;let i=",",s=!1;const l=o.placeHolder&&o.placeHolder.split(";")[0]||"",c=o.placeHolder&&o.placeHolder.split(";")[1]||"";let u="\u81F3";o.editorParams&&(o.editorParams.valueSeparator&&(i=o.editorParams.valueSeparator),o.editorParams.rangeSeparator&&(u=o.editorParams.rangeSeparator),o.editorParams.unlinkPanels&&(s=r.toBoolean(o.editorParams.unlinkPanels)));const p=I("daterange");switch(o.editorType){case"DATERANGE":p.value="datetimerange";break;case"DATERANGE_NOTIME":p.value="daterange";break;default:p.value="datetimerange"}const m=I("YYYY-MM-DD"),v=r.valueFormat;v&&(m.value=v);const g=I([]),b=o.editorItems;if(b&&b.length>0){const P=b.map(_=>_.id);g.value=P}const h=F({get(){let P=[];return g.value.length>0?g.value.forEach(_=>{t.data[_]&&P.push(t.data[_])}):t.value&&typeof t.value=="string"&&(P=t.value.split(i)),P},set(P){P&&P.length>0?(e("change",P.join(i)),g.value.length>0&&P.forEach((_,y)=>{e("change",_,g.value[y])})):(e("change",null),g.value.length>0&&g.value.forEach((_,y)=>{e("change",null,g.value[y])}))}});return{ns:n,c:r,refFormItem:g,curValue:h,type:p,format:m,valueSeparator:i,startPlaceHolder:l,endPlaceHolder:c,rangeSeparator:u,unlinkPanels:s,onFocus:P=>{e("focus",P)},onBlur:P=>{e("blur",P)}}},render(){return a("div",{class:[this.ns.b()]},[a(d("el-date-picker"),{modelValue:this.curValue,"onUpdate:modelValue":t=>this.curValue=t,type:this.type,"popper-class":this.ns.b("popper"),format:this.format,"value-format":this.format,disabled:this.disabled,readonly:this.readonly,"range-separator":this.rangeSeparator,"start-placeholder":this.startPlaceHolder,"end-placeholder":this.endPlaceHolder,"unlink-panels":this.unlinkPanels,onFocus:this.onFocus,onBlur:this.onBlur},null)])}});var ow=Object.defineProperty,aw=(t,e,n)=>e in t?ow(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iw=(t,e,n)=>(aw(t,typeof e!="symbol"?e+"":e,n),n);class sw extends le{constructor(){super(...arguments),iw(this,"valueFormat")}getFormatByType(){switch(this.model.editorType){case"DATERANGE":return"YYYY-MM-DD HH:mm:ss";case"DATERANGE_NOTIME":return"YYYY-MM-DD";default:return"YYYY-MM-DD HH:mm:ss"}}async onInit(){super.onInit(),this.valueFormat=this.getFormatByType()}}var lw=Object.defineProperty,cw=(t,e,n)=>e in t?lw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mc=(t,e,n)=>(cw(t,typeof e!="symbol"?e+"":e,n),n);class So{constructor(){mc(this,"formEditor","IBizDateRangePicker"),mc(this,"gridEditor","IBizDateRangePicker")}async createController(e,n){const r=new sw(e,n);return await r.init(),r}}function uw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function bc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fc(Object(n),!0).forEach(function(r){uw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dw(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}function pw(t,e){if(t==null)return{};var n=dw(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hw(t,e){return mw(t)||fw(t,e)||bw(t,e)||vw()}function mw(t){if(Array.isArray(t))return t}function fw(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var n=[],r=!0,o=!1,i=void 0;try{for(var s=t[Symbol.iterator](),l;!(r=(l=s.next()).done)&&(n.push(l.value),!(e&&n.length===e));r=!0);}catch(c){o=!0,i=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(o)throw i}}return n}}function bw(t,e){if(t){if(typeof t=="string")return vc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vc(t,e)}}function vc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function vw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Cc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gc(Object(n),!0).forEach(function(r){gw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Cw(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){return e.reduceRight(function(o,i){return i(o)},r)}}function _t(t){return function e(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.length>=t.length?t.apply(this,o):function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return e.apply(n,[].concat(o,l))}}}function Xt(t){return{}.toString.call(t).includes("Object")}function ww(t){return!Object.keys(t).length}function Bt(t){return typeof t=="function"}function yw(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Pw(t,e){return Xt(e)||je("changeType"),Object.keys(e).some(function(n){return!yw(t,n)})&&je("changeField"),e}function Ew(t){Bt(t)||je("selectorType")}function Iw(t){Bt(t)||Xt(t)||je("handlerType"),Xt(t)&&Object.values(t).some(function(e){return!Bt(e)})&&je("handlersType")}function Dw(t){t||je("initialIsRequired"),Xt(t)||je("initialType"),ww(t)&&je("initialContent")}function _w(t,e){throw new Error(t[e]||t.default)}var Bw={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},je=_t(_w)(Bw),Yt={changes:Pw,selector:Ew,handler:Iw,initial:Dw};function Sw(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Yt.initial(t),Yt.handler(e);var n={current:t},r=_t(xw)(n,e),o=_t(Fw)(n),i=_t(Yt.changes)(t),s=_t(Aw)(n);function l(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(p){return p};return Yt.selector(u),u(n.current)}function c(u){Cw(r,o,i,s)(u)}return[l,c]}function Aw(t,e){return Bt(e)?e(t.current):e}function Fw(t,e){return t.current=Cc(Cc({},t.current),e),e}function xw(t,e,n){return Bt(e)?e(t.current):Object.keys(n).forEach(function(r){var o;return(o=e[r])===null||o===void 0?void 0:o.call(e,t.current[r])}),n}var Ow={create:Sw},Tw={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function Nw(t){return function e(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.length>=t.length?t.apply(this,o):function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return e.apply(n,[].concat(o,l))}}}function zw(t){return{}.toString.call(t).includes("Object")}function Rw(t){return t||yc("configIsRequired"),zw(t)||yc("configType"),t.urls?($w(),{paths:{vs:t.urls.monacoBase}}):t}function $w(){console.warn(wc.deprecation)}function Lw(t,e){throw new Error(t[e]||t.default)}var wc={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
5
|
+
You are using deprecated way of configuration.
|
|
6
|
+
|
|
7
|
+
Instead of using
|
|
8
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
9
|
+
use
|
|
10
|
+
monaco.config({ paths: { vs: '...' } })
|
|
11
|
+
|
|
12
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
13
|
+
`},yc=Nw(Lw)(wc),Mw={config:Rw},Vw=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(o){return n.reduceRight(function(i,s){return s(i)},o)}};function Pc(t,e){return Object.keys(e).forEach(function(n){e[n]instanceof Object&&t[n]&&Object.assign(e[n],Pc(t[n],e[n]))}),bc(bc({},t),e)}var jw={type:"cancelation",msg:"operation is manually canceled"};function Ao(t){var e=!1,n=new Promise(function(r,o){t.then(function(i){return e?o(jw):r(i)}),t.catch(o)});return n.cancel=function(){return e=!0},n}var kw=Ow.create({config:Tw,isInitialized:!1,resolve:null,reject:null,monaco:null}),Ec=hw(kw,2),St=Ec[0],Jt=Ec[1];function Uw(t){var e=Mw.config(t),n=e.monaco,r=pw(e,["monaco"]);Jt(function(o){return{config:Pc(o.config,r),monaco:n}})}function Gw(){var t=St(function(e){var n=e.monaco,r=e.isInitialized,o=e.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!t.isInitialized){if(Jt({isInitialized:!0}),t.monaco)return t.resolve(t.monaco),Ao(Fo);if(window.monaco&&window.monaco.editor)return Ic(window.monaco),t.resolve(window.monaco),Ao(Fo);Vw(qw,Hw)(Kw)}return Ao(Fo)}function qw(t){return document.body.appendChild(t)}function Ww(t){var e=document.createElement("script");return t&&(e.src=t),e}function Hw(t){var e=St(function(r){var o=r.config,i=r.reject;return{config:o,reject:i}}),n=Ww("".concat(e.config.paths.vs,"/loader.js"));return n.onload=function(){return t()},n.onerror=e.reject,n}function Kw(){var t=St(function(n){var r=n.config,o=n.resolve,i=n.reject;return{config:r,resolve:o,reject:i}}),e=window.require;e.config(t.config),e(["vs/editor/editor.main"],function(n){Ic(n),t.resolve(n)},function(n){t.reject(n)})}function Ic(t){St().monaco||Jt({monaco:t})}function Xw(){return St(function(t){var e=t.monaco;return e})}var Fo=new Promise(function(t,e){return Jt({resolve:t,reject:e})}),Dc={config:Uw,init:Gw,__getMonacoInstance:Xw};const _c=S({name:"IBizCode",props:Aa(),emits:te(),setup(t,{emit:e}){const n=B("code"),r=I("");let o,i;const{UIStore:s}=Xe(),l=p=>p==="dark"?`vs-${s.theme}`:"vs";G(()=>s.theme,p=>{i.setTheme(l(p))}),G(()=>t.value,p=>{p!==r.value&&(r.value=p||"",o?.setValue(r.value))},{immediate:!0});const c=I(),u=()=>{pt(()=>{Dc.config({paths:{vs:`${ibiz.env.pluginBaseUrl}/monaco-editor@0.44.0/min/vs`}}),Dc.init().then(p=>{o||(i=p.editor,o=i.create(c.value,{language:t.language||t.controller.language,theme:l(s.theme),foldingStrategy:"indentation",renderLineHighlight:"all",selectOnLineNumbers:!0,minimap:{enabled:!0},readOnly:!1,fontSize:16,scrollBeyondLastLine:!1,overviewRulerBorder:!1})),setTimeout(()=>{o.layout(),o.setValue(r.value)}),o.onDidChangeModelContent(()=>{r.value=o.getValue(),e("change",r.value)}),window.addEventListener("resize",()=>{o.layout()})})})};return Pe(()=>{u()}),Re(()=>{o?.dispose()}),{ns:n,currentVal:r,codeEditBox:c}},render(){return a("div",{ref:"codeEditBox",class:this.ns.b()},null)}});class Yw extends le{get language(){return this.editorParams.codeType||this.editorParams.language||"typescript"}get theme(){return this.editorParams.theme||"vs-dark"}}var Jw=Object.defineProperty,Qw=(t,e,n)=>e in t?Jw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bc=(t,e,n)=>(Qw(t,typeof e!="symbol"?e+"":e,n),n);class Zw{constructor(){Bc(this,"formEditor","IBizCode"),Bc(this,"gridEditor","IBizCode")}async createController(e,n){const r=new Yw(e,n);return await r.init(),r}}var ey=Object.defineProperty,ty=(t,e,n)=>e in t?ey(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sc=(t,e,n)=>(ty(t,typeof e!="symbol"?e+"":e,n),n);class ny extends le{constructor(){super(...arguments),Sc(this,"uploadParams"),Sc(this,"exportParams")}async onInit(){if(await super.onInit(),this.editorParams){const{uploadParams:e,exportParams:n}=this.editorParams;if(e)try{this.uploadParams=JSON.parse(e)}catch(r){ibiz.log.error(`\u7F16\u8F91\u5668[${ibiz.log.error(r)}]\u7F16\u8F91\u5668\u53C2\u6570 uploadParams \u975E json \u683C\u5F0F`)}if(n)try{this.exportParams=JSON.parse(n)}catch(r){ibiz.log.error(`\u7F16\u8F91\u5668[${ibiz.log.error(r)}]\u7F16\u8F91\u5668\u53C2\u6570 exportParams \u975E json \u683C\u5F0F`)}}}calcBaseUrl(e){let n=`${ibiz.env.baseUrl}/${ibiz.env.appId}${ibiz.env.uploadFileUrl}`,r=`${ibiz.env.baseUrl}/${ibiz.env.appId}${ibiz.env.downloadFileUrl}/%fileId%`,o={},i={};return this.uploadParams&&(o=We(this.uploadParams,e,this.params,this.context)),this.exportParams&&(i=We(this.exportParams,e,this.params,this.context)),n+=Ne.stringify(o,{addQueryPrefix:!0}),r+=Ne.stringify(i,{addQueryPrefix:!0}),{uploadUrl:n,downloadUrl:r}}fileDownload(e){ibiz.net.request(e.url,{method:"get",responseType:"blob",baseURL:""}).then(n=>{if(n.status!==200)throw new pe("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");if(n.data){const r=e.name;gt(n.data,r)}else throw new pe("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728")})}}var ry=Object.defineProperty,oy=(t,e,n)=>e in t?ry(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ac=(t,e,n)=>(oy(t,typeof e!="symbol"?e+"":e,n),n);class ay{constructor(){Ac(this,"formEditor","IBizHtml"),Ac(this,"gridEditor","IBizHtml")}async createController(e,n){const r=new ny(e,n);return await r.init(),r}}var iy=Object.defineProperty,sy=(t,e,n)=>e in t?iy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ze=(t,e,n)=>(sy(t,typeof e!="symbol"?e+"":e,n),n);class ly extends le{constructor(){super(...arguments),ze(this,"uploadParams"),ze(this,"exportParams"),ze(this,"deService"),ze(this,"deACMode"),ze(this,"keyName","srfkey"),ze(this,"textName","srfmajortext"),ze(this,"sort","asc"),ze(this,"dataItems",[]),ze(this,"chatCompletion",!1)}async onInit(){if(await super.onInit(),this.style.height||(this.style.height="600px"),this.editorParams){const{uploadparams:n,exportparams:r}=this.editorParams;if(n)try{this.uploadParams=JSON.parse(n)}catch{throw new be(n,"\u914D\u7F6Euploadparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F")}if(r)try{this.exportParams=JSON.parse(r)}catch{throw new be(r,"\u914D\u7F6Eexportparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F")}}const e=this.model;if(e.appDEACModeId&&(this.deACMode=await bt(e.appDEACModeId,e.appDataEntityId,this.context.srfappid),this.deACMode)){if(this.deACMode.actype==="AUTOCOMPLETE"){const{minorSortAppDEFieldId:n,minorSortDir:r}=this.deACMode;n&&r&&(this.sort=`${n.toLowerCase()},${r.toLowerCase()}`),this.deACMode.textAppDEFieldId&&(this.textName=this.deACMode.textAppDEFieldId),this.deACMode.valueAppDEFieldId&&(this.keyName=this.deACMode.valueAppDEFieldId),this.deACMode.deacmodeDataItems&&(this.dataItems=[],this.deACMode.deacmodeDataItems.forEach(o=>{o.id!=="value"&&o.id!=="text"&&this.dataItems.push(o)}))}this.deACMode.actype==="CHATCOMPLETION"&&(this.deService=await ibiz.hub.getApp(e.appId).deService.getService(e.appDataEntityId),this.chatCompletion=!0)}}calcBaseUrl(e){let n=`${ibiz.env.baseUrl}/${ibiz.env.appId}${ibiz.env.uploadFileUrl}`,r=`${ibiz.env.baseUrl}/${ibiz.env.appId}${ibiz.env.downloadFileUrl}/%fileId%`,o={},i={};return this.uploadParams&&(o=We(this.uploadParams,e,this.params,this.context)),this.exportParams&&(i=We(this.exportParams,e,this.params,this.context)),n+=Ne.stringify(o,{addQueryPrefix:!0}),r+=Ne.stringify(i,{addQueryPrefix:!0}),{uploadUrl:n,downloadUrl:r}}fileDownload(e){ibiz.net.request(e.url,{method:"get",responseType:"blob",baseURL:""}).then(n=>{if(n.status!==200)throw new pe("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");if(n.data){const r=e.name;gt(n.data,r)}else throw new pe("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728")})}}var cy=Object.defineProperty,uy=(t,e,n)=>e in t?cy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fc=(t,e,n)=>(uy(t,typeof e!="symbol"?e+"":e,n),n);class dy{constructor(){Fc(this,"formEditor","IBizMarkDown"),Fc(this,"gridEditor","IBizMarkDown")}async createController(e,n){const r=new ly(e,n);return await r.init(),r}}function py(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const xc=S({name:"IBizArray",props:Fa(),emits:te(),setup(t,{emit:e}){const n=B("array"),r=t.controller,o=r.model;let i="default",s="default",l=0,c,u=!1,p="",m="",v="_blank";const g=I([]);o.editorParams&&(o.editorParams.editorStyle&&(i=o.editorParams.editorStyle),o.editorParams.size&&(s=o.editorParams.size),o.editorParams.limit&&(l=ge(o.editorParams.limit)),o.editorParams.maxLength&&(c=ge(o.editorParams.maxLength)),o.editorParams.showWordLimit&&(u=r.toBoolean(o.editorParams.showWordLimit)),o.editorParams.prepend&&(p=o.editorParams.prepend),o.editorParams.append&&(m=o.editorParams.append),o.editorParams.target&&(v=o.editorParams.target));const b=o.dataType,h=Object.is(b,"NUMBER")||Object.is(b,"INTEGER")?"number":"text";G(()=>t.value,(O,V)=>{if(O&&O!==V&&g.value.length===0){const q=O.map(M=>({value:M,key:Oe()}));g.value=q}},{immediate:!0});const f=O=>{let V=O;return V&&(p&&(V=p+V),m&&(V+=m)),V},w=()=>{const O=g.value.map(V=>V.value);e("change",O)};return{ns:n,c:r,editorStyle:i,type:h,size:s,limit:l,maxLength:c,showWordLimit:u,prepend:p,append:m,target:v,items:g,getUrl:f,addItem:O=>{if(t.disabled||t.readonly)return;const V={key:Oe(),value:null};O?g.value.splice(O,0,V):g.value.push(V),w()},removeItem:O=>{g.value.splice(O,1),w()},handleChange:(O,V)=>{g.value[V].value=O,w()},onBlur:O=>{e("blur",O)},onFocus:O=>{e("focus",O)},handleKeyUp:O=>{O&&O.code==="Enter"&&e("enter",O)}}},render(){return a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[this.items.length===0?a("ion-icon",{class:this.ns.b("add-icon"),name:"add",onClick:this.addItem},null):this.items.map((t,e)=>a("div",{class:this.ns.b("item"),key:t.key},[this.editorStyle==="default"?a(d("el-input"),{type:this.type,size:this.size,modelValue:t.value,"onUpdate:modelValue":n=>t.value=n,placeholder:this.c.placeHolder,disabled:this.disabled,onBlur:this.onBlur,onFocus:this.onFocus,onKeyup:this.handleKeyUp,onChange:n=>this.handleChange(n,e)},null):a(d("el-tooltip"),{placement:"bottom",trigger:"hover"},{default:()=>a(d("el-input"),{type:this.type,size:this.size,modelValue:t.value,"onUpdate:modelValue":n=>t.value=n,placeholder:this.c.placeHolder,disabled:this.disabled,maxlength:Object.is(this.editorStyle,"url")?this.maxLength:null,"show-word-limit":Object.is(this.editorStyle,"url")?this.showWordLimit:null,onBlur:this.onBlur,onFocus:this.onFocus,onChange:n=>this.handleChange(n,e),onKeyup:this.handleKeyUp},{prefix:()=>Object.is(this.editorStyle,"url")&&this.prepend?this.prepend:null,suffix:()=>Object.is(this.editorStyle,"url")&&this.append?this.append:null}),content:()=>{let n;return this.editorStyle==="img"?a(d("el-image"),{fit:"contain",src:t.value},null):a(d("el-link"),{href:this.getUrl(t.value),target:this.target},py(n=this.getUrl(t.value))?n:{default:()=>[n]})}}),!(this.disabled||this.readonly)&&a("div",{class:this.ns.b("icons")},[(!this.limit||this.items.length<this.limit)&&a("ion-icon",{class:this.ns.b("add-icon"),name:"add",onClick:()=>this.addItem(e+1)},null),a("ion-icon",{class:this.ns.b("remove-icon"),name:"remove",onClick:()=>this.removeItem(e)},null)])]))])}});class hy extends le{}var my=Object.defineProperty,fy=(t,e,n)=>e in t?my(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oc=(t,e,n)=>(fy(t,typeof e!="symbol"?e+"":e,n),n);class Tc{constructor(){Oc(this,"formEditor","IBizArray"),Oc(this,"gridEditor","IBizArray")}async createController(e,n){const r=new hy(e,n);return await r.init(),r}}const Nc=S({name:"IBizCascader",props:xa(),emits:te(),setup(t,{emit:e}){const n=B("cascader"),r=t.controller,o=r.model,i=I(null),s=I([]),l=o.editorItems;if(l&&l.length>0){const A=l.map(T=>({name:T.id,appDataEntityId:T.appDataEntityId,appDEDataSetId:T.appDEDataSetId}));s.value=A}let c="default",u="default",p=!0,m=!1,v="/";o.editorParams&&(o.editorParams.editorStyle&&(c=o.editorParams.editorStyle),o.editorParams.size&&(u=o.editorParams.size),o.editorParams.filterable&&(p=r.toBoolean(o.editorParams.filterable)),o.editorParams.multiple&&(m=r.toBoolean(o.editorParams.multiple)),o.editorParams.separator&&(v=o.editorParams.separator));const g=I([]),b=I([]),h=I(null),f=I([]),w=I([]),P=I([]),_=I(""),y=I(!1),D=()=>{switch(u){case"large":return"large";case"small":return"small";default:return"default"}},E=(A,T)=>A.leaf,x=(A,T)=>T.level!==s.value.length,O=()=>{if(t.value&&s.value){const A=[],T=JSON.parse(t.value);if(T.forEach(L=>{A.push({label:L,value:[]})}),w.value.forEach(L=>{const X=t.data[L.name]?t.data[L.name].split(","):[];L.value=X}),f.value=[],A.forEach((L,X)=>{w.value.forEach(Z=>{L.value.push(Z.value[X])});const Y=L.value.join(v);f.value.push({label:L.label,value:Y})}),f.value.forEach(L=>{const X=L.value.split(v),Y=L.label.split(v);X.forEach((Z,se)=>{b.value.find(ce=>ce.value===Z)||b.value.push({value:Z,label:Y[se]})})}),Object.is(c,"default")){let L=[];m?f.value.forEach(X=>{L.push(X.value.split(v))}):L=f.value[0].value.split(v),h.value=L}else{m?h.value=T:h.value=T.join(v);const L=w.value[w.value.length-1].value;if(w.value.length>1){const X=w.value[w.value.length-2].value;X&&X.length>0&&X.forEach((Y,Z)=>{L[Z]=`${Y}_${L[Z]}`})}P.value=L}}};s.value&&s.value.length>0&&s.value.forEach(A=>{w.value.push({name:A.name,value:[]})});const V=async(A,T)=>{const L=Ee(r.context),X=Ee(r.params);if(A>0){const Y=s.value[A-1];Object.assign(L,{[vt(Y.appDataEntityId)]:T});const Z=await ibiz.hub.getAppDataEntity(Y.appDataEntityId);Object.assign(X,{[`n_${Z.keyAppDEFieldId.toLowerCase()}_eq`]:T})}return{context:L,params:X}},q=(A,T)=>{const{level:L,value:X}=A;y.value=!0;let Y=[];if(L===0)O(),g.value.length>0?T.forEach(se=>{const he=g.value.findIndex(ce=>se.value===ce.value);he>-1?Object.assign(g.value[he],se):(g.value.push(se),Y.push(se))}):(g.value=[...T],Y=[...T]);else{const se=(he,ce)=>{he&&he.length>0&&he.forEach(fe=>{fe.value===X?fe.children&&fe.children.length>0?T.forEach(de=>{const Se=fe.children.findIndex(Ke=>Ke.value===de.value);Se>-1?Object.assign(fe.children[Se],de):(fe.children.push(de),Y.push(de))}):(fe.children=T,Y=T):se(fe.children)})};se(g.value)}const Z=h.value||[];return setTimeout(()=>{h.value=Z,y.value=!1}),Y},M=async(A,T)=>{const{level:L}=A,X=Object.is(c,"default")?A.value:A.data?A.data.value:null,Y=s.value[L];try{if(Y.appDataEntityId&&Y.appDEDataSetId){const{context:Z,params:se}=await V(L,X),ce=await ibiz.hub.getApp(r.context.srfappid).deService.exec(Y.appDataEntityId,Y.appDEDataSetId,Z,se);if(ce&&ce.status===200&&ce.data.length>0){const fe=ce.data.map((de,Se)=>({...de,value:de.srfkey,label:de.srfmajortext?de.srfmajortext:`\u6807\u9898${Se}`,leaf:L===s.value.length-1,nodekey:`${X?`${X}_${de.srfkey}`:de.srfkey}`}));if(fe.forEach(de=>{const Se=b.value.findIndex(Ke=>de.value===Ke.value);Se>-1?b.value[Se]=de:b.value.push(de)}),Object.is(c,"default")){const de=q(A,fe);T(de)}else T(fe)}}T([])}catch{console.log(Y,"\u67E5\u8BE2\u6570\u636E\u96C6\u5931\u8D25"),T([])}},K=()=>{const A=[];h.value=[],f.value.forEach(T=>{A.push(T.label)}),m?h.value=A:h.value=A.length>0?A[0]:null,w.value.forEach(T=>{e("change",T.value.length>0?T.value.join(","):null,T.name)}),e("change",h.value.length>0?JSON.stringify(h.value):null)},H=()=>{f.value=[],w.value.forEach(A=>{A.value=[]}),i.value&&i.value.setCheckedKeys([]),K()},Q=()=>{var A,T;if(!y.value){w.value.forEach(Y=>{Y.value=[]}),(A=h.value)!=null&&A.length&&h.value.forEach((Y,Z)=>{typeof Y=="string"?w.value[Z].value.push(Y):Y.forEach((se,he)=>{w.value[he].value.push(se)})});const L=[];let X=[];(T=h.value)!=null&&T.length&&h.value.forEach(Y=>{if(m){const Z=Y.map(se=>{const he=b.value.find(ce=>ce.value===se);if(he)return he.label});L.push(Z)}else{const Z=b.value.find(se=>se.value===Y);Z&&L.push(Z.label)}}),w.value.forEach(Y=>{e("change",Y.value.length>0?Y.value.join(","):null,Y.name)}),L.length>0&&(m?L.forEach(Y=>{X.push(Y.join(v))}):X=[L.join(v)]),e("change",X.length>0?JSON.stringify(X):null)}};return{ns:n,c:r,valueItems:s,editorStyle:c,filterable:p,separator:v,onBlur:A=>{e("blur",A)},onFocus:A=>{e("focus",A)},treeData:g,items:b,selectValue:h,treeSelectData:f,valueItemData:w,defaultCheckedKeys:P,searchValue:_,isLoaded:y,getSize:D,getIsLeaf:E,getDisabled:x,loadData:M,treeRef:i,handleTreeClear:H,handleRemoveTag:()=>{setTimeout(()=>{Q()})},multiple:m,handleCascaderValueChange:Q}},render(){return a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[a(d("el-cascader"),{"popper-class":this.ns.b("popper"),clearable:!0,options:this.treeData,size:this.getSize(),separator:this.separator,filterable:this.filterable,placeholder:this.c.placeHolder?this.c.placeHolder:" ",props:{lazy:!0,multiple:this.multiple,lazyLoad:this.loadData},disable:this.disabled,modelValue:this.selectValue,"onUpdate:modelValue":t=>this.selectValue=t,onBlur:this.onBlur,onFocus:this.onFocus,onRemoveTag:this.handleRemoveTag,onChange:this.handleCascaderValueChange},null)])}});class by extends le{}var vy=Object.defineProperty,gy=(t,e,n)=>e in t?vy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zc=(t,e,n)=>(gy(t,typeof e!="symbol"?e+"":e,n),n);class Cy{constructor(){zc(this,"formEditor","IBizCascader"),zc(this,"gridEditor","IBizCascader")}async createController(e,n){const r=new by(e,n);return await r.init(),r}}const Rc=S({name:"IBizColorPicker",props:Oa(),emits:te(),setup(t,{emit:e}){const n=B("color-picker"),r=t.controller,o=I(""),i=I(null);G(()=>t.value,(m,v)=>{m!==v&&(m?o.value=m:o.value="")},{immediate:!0});const s=m=>{e("change",m)},l=m=>{setTimeout(()=>{i.value&&i.value.show()},200)},c=F(()=>r.style?r.style:null);return{ns:n,c:r,currentVal:o,contentStyle:c,colorPicker:i,handleChange:s,showPicker:l,onFocus:m=>{e("focus",m)},onBlur:m=>{e("blur",m)}}},render(){let t=null;return this.readonly?t=`${this.currentVal}`:t=a("span",{class:this.ns.b("content"),style:this.contentStyle,onClick:this.showPicker},[a(d("el-color-picker"),{ref:"colorPicker",modelValue:this.currentVal,"onUpdate:modelValue":e=>this.currentVal=e,disabled:this.disabled,onChange:this.handleChange,onBlur:this.onBlur,onFocus:this.onFocus,size:"small"},null),a("span",{class:this.ns.b("text")},[this.currentVal])]),a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""],style:{color:this.currentVal||""}},[t])}});class wy extends le{}var yy=Object.defineProperty,Py=(t,e,n)=>e in t?yy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$c=(t,e,n)=>(Py(t,typeof e!="symbol"?e+"":e,n),n);class Ey{constructor(){$c(this,"formEditor","IBizColorPicker"),$c(this,"gridEditor","IBizColorPicker")}async createController(e,n){const r=new wy(e,n);return await r.init(),r}}const Lc=S({name:"IBizPresetRawitem",props:pn(),emits:te(),setup(t,{emit:e}){const n=B("preset-rawitem"),r=t.controller,o=r.model,{componentRef:i}=ve(()=>e("focus"),()=>e("blur")),s=r.model.predefinedType,l=I("");return G(()=>t.value,(c,u)=>{c!==u&&(l.value=c)},{immediate:!0}),{ns:n,editorModel:o,editorRef:i,type:s,content:l}},render(){let t=null;return this.type==="FIELD_IMAGE"?t=a(d("iBizRawItem"),{content:this.content,type:"IMAGE"},null):this.type==="FIELD_TEXT_DYNAMIC"?t=a(d("iBizRawItem"),{content:this.content,type:"TEXT"},null):t=a("div",null,[R("\u6682\u672A\u652F\u6301"),this.type]),a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""],ref:"editorRef"},[t])}});class Iy extends le{}var Dy=Object.defineProperty,_y=(t,e,n)=>e in t?Dy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mc=(t,e,n)=>(_y(t,typeof e!="symbol"?e+"":e,n),n);class By{constructor(){Mc(this,"formEditor","IBizPresetRawitem"),Mc(this,"gridEditor","IBizPresetRawitem")}async createController(e,n){const r=new Iy(e,n);return await r.init(),r}}const Sy=N("aH",{install:t=>{t.component(ul.name,ul),t.component(pl.name,pl),t.component(hl.name,hl),t.component(bl.name,bl),t.component(vl.name,vl),t.component(gl.name,gl),t.component(wl.name,wl),t.component(Pl.name,Pl),t.component(Il.name,Il),t.component(Bl.name,Bl),t.component(Fl.name,Fl),t.component(Tl.name,Tl),t.component(Rl.name,Rl),t.component(Ll.name,Ll),t.component(jl.name,jl),t.component(Gl.name,Gl),t.component(Kl.name,Kl),t.component(Jl.name,Jl),t.component(ec.name,ec),t.component(nc.name,nc),t.component(tc.name,tc),t.component(oc.name,oc),t.component(ac.name,ac),t.component(ic.name,ic),t.component(sc.name,sc),t.component(lc.name,lc),t.component(cc.name,cc),t.component(dc.name,dc),t.component(hc.name,hc),t.component(_c.name,_c),t.component(xc.name,xc),t.component(Nc.name,Nc),t.component(Rc.name,Rc),t.component(Lc.name,Lc),t.component("IBizHtml",ht(()=>Fe.import("./wang-editor-f4440Xvw.js"))),t.component("IBizMarkDown",ht(()=>Fe.import("./ibiz-markdown-editor-BQsiQfa2.js"))),j("SPAN",()=>new Ht),j("SPAN_ADDRESSPICKUP",()=>new Ht),j("SPAN_LINK",()=>new Ht("SPAN_LINK"));const e=new _o;j("TEXTBOX",()=>e),j("TEXTAREA",()=>e),j("TEXTAREA_10",()=>e),j("PASSWORD",()=>e),j("NUMBER",()=>new _o("NUMBER")),j("IPADDRESSTEXTBOX",()=>new _o("IPADDRESSTEXTBOX")),j("DROPDOWNLIST",()=>new Kt),j("DROPDOWNLIST_100",()=>new Kt),j("MDROPDOWNLIST",()=>new Kt),j("CHECKBOX",()=>new Wg),j("CHECKBOXLIST",()=>new _l),j("RADIOBUTTONLIST",()=>new Al);const n=new Ol;j("DATEPICKER",()=>n),j("DATEPICKEREX",()=>n),j("DATEPICKEREX_NOTIME",()=>n),j("DATEPICKEREX_HOUR",()=>n),j("DATEPICKEREX_MINUTE",()=>n),j("DATEPICKEREX_SECOND",()=>n),j("DATEPICKEREX_NODAY",()=>n),j("DATEPICKEREX_NODAY_NOSECOND",()=>n),j("FILEUPLOADER",()=>new Dt("FILEUPLOADER")),j("FILEUPLOADER_ONE",()=>new Dt("FILEUPLOADER_ONE")),j("PICTURE",()=>new Dt("PICTURE")),j("PICTURE_ONE",()=>new Dt("PICTURE_ONE")),j("PICTURE_ONE_RAW",()=>new Dt("PICTURE_ONE_RAW")),j("RAW",()=>new zl),j("STEPPER",()=>new bC),j("RATING",()=>new Vl),j("SLIDER",()=>new Wl),j("SWITCH",()=>new Ul),j("LISTBOX",()=>new Yl),j("LISTBOXPICKUP",()=>new Yl);const r=new VC;j("AC",()=>r),j("AC_FS",()=>r),j("AC_NOBUTTON",()=>r),j("AC_FS_NOBUTTON",()=>r),j("PICKER",()=>new ye("PICKER")),j("PICKEREX_NOAC",()=>new ye("PICKEREX_NOAC")),j("PICKEREX_NOAC_LINK",()=>new ye("PICKEREX_NOAC_LINK")),j("PICKEREX_TRIGGER_LINK",()=>new ye("PICKEREX_TRIGGER_LINK")),j("PICKEREX_TRIGGER",()=>new ye("PICKEREX_TRIGGER")),j("PICKEREX_LINK",()=>new ye("PICKEREX_LINK")),j("ADDRESSPICKUP",()=>new ye("ADDRESSPICKUP")),j("ADDRESSPICKUP_AC",()=>new ye("ADDRESSPICKUP_AC")),j("PICKEREX_LINKONLY",()=>new ye("PICKEREX_LINKONLY")),j("PICKEREX_NOBUTTON",()=>new ye("PICKEREX_NOBUTTON")),j("PICKEREX_DROPDOWNVIEW",()=>new ye("PICKEREX_DROPDOWNVIEW")),j("PICKEREX_DROPDOWNVIEW_LINK",()=>new ye("PICKEREX_DROPDOWNVIEW_LINK")),j("PICKUPVIEW",()=>new ye("PICKUPVIEW")),j("NUMBERRANGE",()=>new rw),j("DATERANGE",()=>new So),j("DATERANGE_NOTIME",()=>new So),j("CODE",()=>new Zw),j("HTMLEDITOR",()=>new ay),j("MARKDOWN",()=>new dy),j("ARRAY",()=>new Tc),j("CASCADER",()=>new Cy),j("COLORPICKER",()=>new Ey),j("FIELD_IMAGE_PICTURE_ONE",()=>new By),j("FIELD_TEXT_DYNAMIC_SPAN",()=>new Ht),j("STATIC_LABEL_RAW",()=>new zl),j("FIELD_TEXTBOX_TEXTBOX",()=>e),j("FIELD_TEXTAREA_TEXTAREA",()=>e),j("FIELD_RADIOBUTTONLIST_RADIOBUTTONLIST",()=>new Al),j("FIELD_CHECKBOXLIST_CHECKBOXLIST",()=>new _l),j("FIELD_DROPDOWNLIST_DROPDOWNLIST",()=>new Kt),j("FIELD_RATING_RATING",()=>new Vl),j("FIELD_SWITCH_SWITCH",()=>new Ul),j("FIELD_SLIDER_SLIDER",()=>new Wl),j("FIELD_DATEPICKER_DATEPICKER",()=>new Ol),j("FIELD_DATERANGE_DATERANGE",()=>new So),j("FIELD_PICKER_PICKER",()=>new ye("PICKER")),j("FIELD_ARRAY_ARRAY",()=>new Tc),j("AUTH_USERID_TEXTBOX",()=>e),j("AUTH_PASSWORD_PASSWORD",()=>e)}}),OP=N("aI",S({setup(){const t=B("404-view"),e=Le(),n=Me(),r=()=>{e.push("/")};Pe(()=>ibiz.util.hiddenAppLoading());const o=F(()=>!n.params.view1);return{ns:t,isTop:o,gotoIndexView:r}},render(){return a("div",{class:[this.ns.b(),this.ns.is("top",this.isTop)]},[a("img",{class:this.ns.b("img"),src:"./assets/images/404.png"},null),a("div",{class:this.ns.b("text")},[a("div",{class:this.ns.be("text","text1")},[R("\u62B1\u6B49\uFF0C\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\uFF01")]),this.isTop?a("div",{class:this.ns.be("text","text2")},[R("\u60A8\u8981\u627E\u7684\u9875\u9762\u4E0D\u5B58\u5728\uFF0C\u8BF7\u8FD4\u56DE"),a("a",{"on-click":this.gotoIndexView},[R("\u9996\u9875")]),R("\u7EE7\u7EED\u6D4F\u89C8")]):null])])}})),Ay={username:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7",trigger:"blur"}],password:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801",trigger:"blur"},{type:"string",min:6,message:"\u5BC6\u7801\u957F\u5EA6\u4E0D\u80FD\u5C11\u4E8E6\u4F4D",trigger:"blur"}]},TP=N("aJ",S({setup(){const t=B("login-view"),e=me({username:"",password:""}),n=I(null),o=Me().query.ru||"/",i=I(!1),s=I(null),l=d("IBizViewShell"),c=zi.create({}),u={},p=I(!1),m=I(!1),v=I(!1),g=ibiz.env.AppTitle;ibiz.appData=void 0,ibiz.orgData=void 0;const b=async()=>{n.value.validate(async f=>{f&&(p.value=!0,await ibiz.auth.login(e.username,e.password,v.value)===!0&&(window.location.hash=o,window.location.reload()),p.value=!1)})},h=f=>{f.key==="Enter"&&b()};return Pe(async()=>{try{const f=await ibiz.hub.getAppView("AppLoginView");f&&(s.value=f,i.value=!0)}catch(f){ibiz.log.error(f)}ibiz.util.hiddenAppLoading(),m.value=!0}),()=>m.value?i.value?re(l,{context:c,params:u,viewId:s.value.id}):a("div",{class:t.b()},[a("div",{class:t.b("box")},[a("header",{class:t.b("box-header")},[a("img",{src:"./assets/images/login-header.png"},null),a("span",{class:t.b("box-header-title")},[g])]),a("main",{class:t.b("box-main")},[a("img",{class:t.be("box-main","avatar"),src:"./assets/images/login-avatar.png"},null),a("div",{class:t.b("box-main-content")},[a(d("el-form"),{model:e,rules:Ay,ref:n},{default:()=>[a(d("el-form-item"),{size:"large",prop:"username"},{default:()=>[a(d("el-input"),{modelValue:e.username,"onUpdate:modelValue":f=>e.username=f,clearable:!0,placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7",onKeyup:f=>h(f)},{prefix:()=>a("ion-icon",{name:"person"},null)})]}),a(d("el-form-item"),{size:"large",prop:"password"},{default:()=>[a(d("el-input"),{type:"password",modelValue:e.password,"onUpdate:modelValue":f=>e.password=f,"show-password":!0,placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801",onKeyup:f=>h(f)},{prefix:()=>a("ion-icon",{name:"unlock-alt"},null)})]}),a(d("el-checkbox"),{modelValue:v.value,"onUpdate:modelValue":f=>v.value=f,label:"\u8BB0\u4F4F\u6211"},null),a(d("el-form-item"),{size:"large"},{default:()=>[a(d("el-button"),{type:"primary",onClick:b,size:"large",round:!0,loading:p.value},{default:()=>[R("\u767B\u5F55")]})]})]})])])])]):null}}));var Fy=Object.defineProperty,xy=(t,e,n)=>e in t?Fy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oy=(t,e,n)=>(xy(t,typeof e!="symbol"?e+"":e,n),n);class Ty{constructor(){Oy(this,"component","IBizWFStepTraceView")}}const xo=S({name:"IBizWFStepTraceView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){const t=B("view"),e=Ta((...c)=>new Ei(...c)),{viewType:n,sysCss:r,codeName:o}=e.model,i=n.toLowerCase(),s=r?.cssName,l=[t.b(),t.b(i),t.m(o),s];return{c:e,ns:t,viewClassNames:l}},render(){return a("div",{class:this.viewClassNames},[a(d("iBizExtendActionTimeLine"),{data:this.c.state.historyData},null)])}}),Ny=N("aK",U(xo,function(t){t.component(xo.name,xo),Ii(Di.APP_WF_STEP_TRACE_VIEW,()=>new Ty)}));var zy=Object.defineProperty,Ry=(t,e,n)=>e in t?zy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oo=(t,e,n)=>(Ry(t,typeof e!="symbol"?e+"":e,n),n);const At=N("a",Hi({legacy:!1,locale:"zh-CN"}));class $y{constructor(){Oo(this,"html"),Oo(this,"defaultLang"),Oo(this,"langMap",new Map),this.defaultLang="zh-CN",this.html=document.querySelector("html");const e=localStorage.getItem("language")||navigator.language||this.defaultLang;At.global.locale.value=e,this.html.setAttribute("lang",e),this.langMap.set("en",()=>Fe.import("./index-UNZ1dtt_.js")),this.langMap.set("zh-CN",()=>Fe.import("./index-Ul84JXar.js"))}async init(){const e=At.global.locale.value;let n;this.langMap.has(e)?n=this.langMap.get(e):n=this.langMap.get(this.defaultLang);const r=await n();At.global.setLocaleMessage(At.global.locale.value,r.default)}setLangConfigs(e){Object.keys(e).forEach(r=>{this.langMap.set(r,e[r])})}setLang(e){ibiz.confirm.warning({title:"\u63D0\u793A",desc:"\u5207\u6362\u8BED\u8A00\u9700\u8981\u5237\u65B0\u9875\u9762\uFF0C\u786E\u8BA4\u5207\u6362?"}).then(()=>{localStorage.setItem("language",e),window.location.reload()})}getLang(){return this.html.getAttribute("lang")||this.defaultLang}t(e,n,r){return At.global.t(e,n,r)}}const Ly=new $y;class lt extends we{get form(){return this.view.getController("form")}async onCreated(){await super.onCreated();const{childNames:e,modal:n}=this.view;e.push("form"),this.view.slotProps.form||(this.view.slotProps.form={}),this.view.slotProps.form.loadDefault=!1,n.hooks.shouldDismiss.tapPromise(async r=>{this.form.state.modified&&(await ibiz.confirm.error({title:"\u5173\u95ED\u63D0\u9192",desc:"\u8868\u5355\u6570\u636E\u5DF2\u7ECF\u4FEE\u6539\uFF0C\u786E\u5B9A\u8981\u5173\u95ED\uFF1F"})||(r.allowClose=!1))})}async onMounted(){await super.onMounted();const{model:e,evt:n}=this.view,r=this.form.model.appDataEntityId,o=i=>{var s;const l=i.data[0];(s=this.toolbar)==null||s.calcButtonState(l,r),l.srfkey?n.emit("onViewInfoChange",{dataInfo:l.srfmajortext||""}):n.emit("onViewInfoChange",{dataInfo:"\u65B0\u5EFA"})};this.form.evt.on("onLoadSuccess",i=>{o(i),n.emit("onDataChange",{...i,actionType:"LOAD"})}),this.form.evt.on("onLoadDraftSuccess",i=>{o(i),n.emit("onDataChange",{...i,actionType:"LOADDRAFT"})}),this.form.evt.on("onSaveSuccess",i=>{this.view.state.closeOK=!0;const s=vt(this.view.model.appDataEntityId),l=i.data[0];this.view.context[s]!==l.srfkey&&(this.view.context[s]=l.srfkey),o(i),n.emit("onDataChange",{...i,actionType:"SAVE"})}),this.form.evt.on("onRemoveSuccess",i=>{o(i),n.emit("onDataChange",{...i,actionType:"REMOVE"})}),!this.view.state.noLoadDefault&&e.loadDefault&&this.load()}getData(){return this.form.getData()}async load(){return this.form.load()}async save(){return this.form.save()}async refresh(){await this.load()}async call(e,n){return e===J.SAVE?(await this.form.save(),null):e===J.SAVE_AND_EXIT?(await this.form.save(),{closeView:!0}):e===J.REMOVE_AND_EXIT?{closeView:await this.form.remove()}:e===J.SAVE_AND_NEW?(this.saveAndNew(),null):e===J.REFRESH?(await this.refresh(),null):e===J.SAVE_AND_START?(await this.wfStart(),null):e===J.VIEW_WF_STEP?(await this.wfSubmit(),null):e===De.LOAD?(this.load(),null):e===De.VALIDATE?this.form.validate():(e===De.WF_WITHDRAW&&await this.wfWithdraw(),super.call(e,n))}async saveAndNew(){await this.form.save(),this.form.state.data=new Rt,this.view.context[vt(this.view.model.appDataEntityId)]=void 0,await this.form.load()}async wfStart(){await this.save();const r=await(await ibiz.hub.getApp(this.view.context.srfappid).deService.getService(this.view.model.appDataEntityId)).wf.getWFVersion();if(r.data.length===0)throw new pe("\u5F53\u524D\u5DE5\u4F5C\u6D41\u7248\u672C\u4E0D\u5B58\u5728");const o=r.data[0],i=`WFSTART@${o.wfversion}`,s=Object.assign(this.view.context.clone(),{activeForm:o["process-form"]}),l={processDefinitionKey:o.definitionkey},c=_i(this.view.model,i);if(!c){await this.form.wfStart({viewParam:l}),await this.view.closeView();return}(await ibiz.commands.execute(tt.TAG,c.refAppViewId,s,l)).ok&&await this.view.closeView()}wfSubmit(){return this.form.wfSubmit()}async wfWithdraw(){const e=ibiz.hub.getApp(this.view.context.srfappid),n=this.form.state.data;await(await e.deService.getService(this.view.model.appDataEntityId)).wf.exec("withdraw",this.view.context,{...this.view.params,taskId:this.view.params.taskId||this.view.params.srftaskid},n instanceof Rt?n.getOrigin():n),ibiz.mc.command.send({srfdecodename:"SysTodo"},"OBJECTUPDATED")}}class My extends lt{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drbar")}get drbar(){return this.view.getController("drbar")}}class Vy extends lt{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab")}get drtab(){return this.view.getController("drtab")}}class jy extends lt{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab")}get drtab(){return this.view.getController("drtab")}}class Ft extends Ie{async call(e,n){return e===J.NEW_ROW?(this.grid.newRow(),null):e===J.TOGGLE_ROW_EDIT?(this.grid.toggleRowEdit(),null):e===J.SAVE_ROW?(this.grid.save(n.data[0]),null):e===J.SAVE?(this.grid.saveAll(),null):super.call(e,n)}get grid(){return this.view.getController("grid")}async onCreated(){super.onCreated();const{model:e}=this.view;this.view.slotProps.grid||(this.view.slotProps.grid={}),this.view.slotProps.grid.mdctrlActiveMode=e.gridRowActiveMode,this.view.slotProps.grid.rowEditOpen=e.rowEditDefault}}N("aM",Ft);class To extends we{get appmenu(){return this.view.getController("appmenu")}get enableCollapse(){return this.view.model.mainMenuAlign==="LEFT"||this.view.model.mainMenuAlign===void 0}initViewState(){super.initViewState(),this.view.state.isCollapse=!1}async onCreated(){await super.onCreated(),this.view.childNames.push("appmenu"),this.view.slotProps.appmenu||(this.view.slotProps.appmenu={}),this.view.slotProps.appmenu.collapse=this.view.state.isCollapse,this.setTheme(),ibiz.util.hiddenAppLoading()}async onMounted(){await super.onMounted(),window.innerWidth<=1200&&this.toggleCollapse()}async call(e,n){if(e===De.TOGGLE_COLLAPSE)return this.toggleCollapse(),null}toggleCollapse(){var e;if(!this.enableCollapse){ibiz.log.error("\u975E\u5DE6\u4FA7\u83DC\u5355\u6A21\u5F0F\u6298\u53E0\u529F\u80FD\u4E0D\u542F\u7528");return}this.view.state.isCollapse=!this.view.state.isCollapse,this.view.slotProps.appmenu.collapse=this.view.state.isCollapse;const n=(e=this.view.layoutPanel)==null?void 0:e.panelItems.container_scroll_left;n&&(this.view.state.isCollapse?n.state.layout.width="56px":n.state.layout.width=`${n.model.width}px`)}setTheme(){const e=this.view.model.viewStyle,n=document.querySelector("html");let r="";if(n&&e){switch(e){case"DEFAULT":!Te(ibiz.config.theme)&&!Mt(ibiz.config.theme)?r=ibiz.config.theme:r="light";break;case"STYLE2":r="dark";break;case"STYLE3":r="omni-oa";break;default:r="light";break}n.classList.forEach(o=>{n.classList.remove(o)}),n.classList.add(r)}}calcViewHeaderVisible(){return!0}}N("aN",To);class Vc extends Ie{get list(){return this.view.getController("list")}async onMounted(){await super.onMounted();const{model:e}=this.view;this.list.state.mdctrlActiveMode=e.mdctrlActiveMode}}class Qt extends Ie{get dataview(){return this.view.getController("dataview")}async onCreated(){super.onCreated();const{model:e}=this.view;this.view.slotProps.dataview||(this.view.slotProps.dataview={}),this.view.slotProps.dataview.mdctrlActiveMode=e.mdctrlActiveMode}}N("aO",Qt);class jc extends we{get form(){return this.view.getController("form")}async onCreated(){await super.onCreated();const{childNames:e,modal:n}=this.view;e.push("form"),this.view.slotProps.form||(this.view.slotProps.form={}),this.view.slotProps.form.loadDefault=!1,n.hooks.shouldDismiss.tapPromise(async r=>{this.form.state.modified&&(await ibiz.confirm.error({title:"\u5173\u95ED\u63D0\u9192",desc:"\u8868\u5355\u6570\u636E\u5DF2\u7ECF\u4FEE\u6539\uFF0C\u786E\u5B9A\u8981\u5173\u95ED\uFF1F"})||(r.allowClose=!1))})}async onMounted(){await super.onMounted();const{model:e,evt:n}=this.view,r=this.form.model.appDataEntityId,o=i=>{var s;const l=i.data[0];(s=this.toolbar)==null||s.calcButtonState(l,r),l.srfkey&&n.emit("onViewInfoChange",{dataInfo:l.srfmajortext})};this.form.evt.on("onLoadSuccess",i=>{o(i)}),this.form.evt.on("onLoadDraftSuccess",i=>{o(i)}),this.form.evt.on("onSaveSuccess",i=>{o(i)}),!this.view.state.noLoadDefault&&e.loadDefault&&this.load()}getData(){return this.form.getData()}load(){return this.form.load()}async call(e,n){return e===J.CANCEL?(this.cancel(),null):e===J.OK?(await this.confirm(),null):e===De.LOAD?(this.load(),null):e===De.VALIDATE?this.form.validate():super.call(e,n)}async confirm(){await this.form.save(),this.view.closeView({ok:!0,data:this.getData()})}cancel(){this.view.closeView({ok:!1,data:[]})}}N("aP",jc);class ky extends Ft{get grid(){return this.view.getController("grid")}async onCreated(){super.onCreated();const{model:e}=this.view;this.view.slotProps.grid||(this.view.slotProps.grid={}),this.view.slotProps.grid.singleSelect=this.view.state.singleSelect,this.view.slotProps.grid.mdctrlActiveMode=e.gridRowActiveMode}async onMounted(){await super.onMounted(),this.xdataControl.evt.on("onSelectionChange",async e=>{this.view.evt.emit("onSelectionChange",{...e})}),this.xdataControl.evt.on("onActive",async e=>{this.view.evt.emit("onDataActive",{...e})})}async call(e,n){return e===De.GET_ALL_DATA?this.grid.state.items:super.call(e,n)}}var Uy=Object.defineProperty,Gy=(t,e,n)=>e in t?Uy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qy=(t,e,n)=>(Gy(t,typeof e!="symbol"?e+"":e,n),n);class No extends we{constructor(){super(...arguments),qy(this,"selectData",[])}get pickupViewPanel(){return this.view.getController("pickupviewpanel")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("pickupviewpanel")}async onMounted(){await super.onMounted(),this.pickupViewPanel.state.singleSelect=!0,this.pickupViewPanel.evt.on("onSelectionChange",e=>{this.selectData=e.data}),this.pickupViewPanel.evt.on("onDataActive",e=>{this.pickupViewPanelDataActive(e.data)})}pickupViewPanelDataActive(e){this.selectData=e,this.view.closeView({ok:!0,data:this.selectData})}async call(e,n){return e===J.CANCEL?(this.cancel(),null):e===J.OK?(this.confirm(),null):super.call(e,n)}confirm(){this.view.closeView({ok:!0,data:this.selectData})}cancel(){this.view.closeView({ok:!1,data:[]})}}class kc extends No{get simpleList(){return this.view.getController("simplelist")}async onCreated(){if(await super.onCreated(),!this.view.providers.simplelist)throw new be(this.view.model,"\u7F3A\u5C11\u914D\u7F6E\u53EBsimplelist\u7684\u5217\u8868\u90E8\u4EF6");const{childNames:e}=this.view;e.push("simplelist"),this.view.params.selectedData&&(this.selectData=JSON.parse(this.view.params.selectedData),delete this.view.params.selectedData),this.view.slotProps.simplelist||(this.view.slotProps.simplelist={}),this.view.slotProps.pickupviewpanel||(this.view.slotProps.pickupviewpanel={}),this.view.slotProps.simplelist.mdctrlActiveMode=2,this.view.slotProps.simplelist.isSimple=!0,this.view.slotProps.simplelist.singleSelect=!1,this.view.slotProps.pickupviewpanel.singleSelect=!1}async onMounted(){await super.onMounted(),this.simpleList.evt.on("onActive",e=>{this.simpleListActive(e.data)}),this.simpleList.setData(this.selectData)}async call(e,n){return e===J.CANCEL?(this.cancel(),null):e===J.OK?(this.confirm(),null):e===J.ADD_SELECTION?(this.addSelection(),null):e===J.ADD_ALL?(this.addAll(),null):e===J.REMOVE_ALL?(this.removeAll(),null):e===J.REMOVE_SELECTION?(this.removeSelection(),null):super.call(e,n)}pickupViewPanelDataActive(e){this.handlePushSimpleListItems(e)}simpleListActive(e){const n=this.simpleList.getAllData();e.forEach(r=>{const o=n.findIndex(i=>i.srfkey===r.srfkey);o!==-1&&n.splice(o,1)}),this.simpleList.setData(n)}async addSelection(){const e=await this.pickupViewPanel.getSelectedData();this.handlePushSimpleListItems(e)}handlePushSimpleListItems(e){const r=[...this.simpleList.getAllData(),...e],o=this.handleUniqueItems(r);this.simpleList.setData(o)}handleUniqueItems(e){const n=new Map;return e.filter(r=>!n.has(r.srfkey)&&n.set(r.srfkey,1))}async addAll(){const e=await this.pickupViewPanel.getAllData();this.handlePushSimpleListItems(e)}removeAll(){this.simpleList.setData([])}removeSelection(){const e=this.simpleList.getData(),n=this.simpleList.getAllData();e.forEach(r=>{const o=n.findIndex(i=>r.srfkey===i.srfkey);o!==-1&&n.splice(o,1)}),this.simpleList.setData(n)}confirm(){const e=this.simpleList.getAllData();this.view.closeView({ok:!0,data:e})}}class zo extends Ie{get tree(){return this.view.getController("tree")}async onCreated(){await super.onCreated(),this.view.slotProps.tree||(this.view.slotProps.tree={})}async call(e,n){var r;return e===J.REFRESH_ALL?(await this.tree.refresh(),null):e===J.REFRESH?((r=n?.data)!=null&&r[0]?await this.tree.refreshNodeChildren(n.data[0],!1):await this.tree.refresh(),null):e===J.REFRESH_PARENT?(await this.tree.refreshNodeChildren(n.data[0],!0),null):super.call(e,n)}}class Ro extends we{get tabExpPanel(){return this.view.getController("tabexppanel")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("tabexppanel"),this.view.slotProps.tabexppanel||(this.view.slotProps.tabexppanel={}),this.view.slotProps.tabexppanel.defaultTabName=this.view.state.srfnav,this.preprocessTabExpModelLayout()}async onMounted(){await super.onMounted(),await this.loadEntityData()}async loadEntityData(){const e=vt(this.view.model.appDataEntityId);if(this.view.context[e])return super.loadEntityData()}preprocessTabExpModelLayout(){const e=(l,c=this.view.model.viewLayoutPanel.rootPanelItems)=>{if(c?.length)for(let u=0;u<c.length;u++){const p=c[u];if(p.id===l)return p;const m=p;if(m.panelItems&&m.panelItems.length>0){const v=e(l,m.panelItems);if(v)return v}}},n=(l,c=this.view.model.viewLayoutPanel.rootPanelItems)=>{for(let u=0;u<c.length;u++){const p=c[u];l.includes(p.id)&&c.splice(u,1);const m=p;m.panelItems&&m.panelItems.length>0&&n(l,m.panelItems)}},r=l=>{const c=e("tabexppanel");if(!c)throw new Vt(this.view.model.viewLayoutPanel,"\u672A\u627E\u5230tabexppanel\u5E03\u5C40\u5360\u4F4D");const u=e(l);if(!u)throw new Vt(this.view.model.viewLayoutPanel,`\u672A\u627E\u5230${l}\u5E03\u5C40\u5BB9\u5668`);u.panelItems=[c]},{tabLayout:o}=this.view.model,i=["view_tabexppanel","view_tabexppanel_left","view_tabexppanel_bottom","view_tabexppanel_right"];let s="view_tabexppanel";switch(o){case"LEFT":s="view_tabexppanel_left",i.splice(1,1);break;case"BOTTOM":s="view_tabexppanel_bottom",i.splice(2,1);break;case"RIGHT":s="view_tabexppanel_right",i.splice(3,1);break;case"TOP":i.splice(0,1);break;default:i.splice(0,1);break}r(s),n(i)}calcViewHeaderVisible(){let e=super.calcViewHeaderVisible();const{tabLayout:n}=this.view.model;return(n===void 0||n==="TOP")&&this.tabExpPanel&&(e=!0),e}}N("aQ",Ro);class Zt extends Ie{get expBarName(){throw Error("\u5B50\u7C7B\u5B9E\u73B0")}get expBar(){return this.view.getController(this.expBarName)}get xdataControl(){return this.expBar.xDataController}async onCreated(){super.onCreated(),this.modifySplitContainer();const{childNames:e}=this.view;e.push(this.expBarName),this.view.slotProps[this.expBarName]||(this.view.slotProps[this.expBarName]={}),this.view.slotProps[this.expBarName].loadDefault=!1,this.view.slotProps[this.expBarName].srfnav=this.view.state.srfnav}modifySplitContainer(){const e=jn(this.view.model,this.expBarName),{width:n,height:r}=e;!n&&!r||qn(this.view.model.viewLayoutPanel,o=>{o.id==="view_exp_split"&&(n&&(o.panelItems[0].layoutPos.width=n),r&&(o.panelItems[0].layoutPos.height=r))},{childrenFields:["rootPanelItems","panelItems","panelTabPages"]})}async onXDataActive(e){}getSearchParams(){const e=super.getSearchParams();return this.expBar.state.query&&(e.query=this.expBar.state.query),e}async load(e){await this.expBar.load()}}class Wy extends Zt{get expBarName(){return"gridexpbar"}}class Hy extends Zt{get expBarName(){return"listexpbar"}}class Ky extends Zt{get expBarName(){return"dataviewexpbar"}}class Uc extends Zt{get expBarName(){return"treeexpbar"}get tree(){return this.expBar.xDataController}async call(e,n){var r;return e===J.REFRESH_ALL?(await this.tree.refresh(),null):e===J.REFRESH?((r=n?.data)!=null&&r[0]?await this.tree.refreshNodeChildren(n.data[0],!1):await this.tree.refresh(),null):e===J.REFRESH_PARENT?(await this.tree.refreshNodeChildren(n.data[0],!0),null):super.call(e,n)}}N("aR",Uc);class Xy extends we{get wizardPanel(){return this.view.getController("wizardpanel")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("wizardpanel")}async onMounted(){await super.onMounted(),this.view.slotProps.wizardpanel||(this.view.slotProps.wizardpanel={}),this.wizardPanel.initialize(),this.wizardPanel.evt.on("onFinishSuccess",e=>{this.view.closeView({ok:!0,data:[]})})}}class Yy extends Ie{get xdataControlName(){return"chart"}get chart(){return this.view.getController("chart")}async onCreated(){await super.onCreated(),this.view.slotProps.chart||(this.view.slotProps.chart={})}}var Jy=Object.defineProperty,Qy=(t,e,n)=>e in t?Jy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xt=(t,e,n)=>(Qy(t,typeof e!="symbol"?e+"":e,n),n);class $o extends lt{constructor(){super(...arguments),xt(this,"isEditable",!1),xt(this,"isCalcWFToolbar",!0),xt(this,"entityService"),xt(this,"processForm"),xt(this,"wfLinks",[])}get form(){return this.view.getController(this.processForm.name)}async onCreated(){await super.onCreated();const e=ibiz.hub.getApp(this.view.context.srfappid);this.entityService=await e.deService.getService(this.view.model.appDataEntityId),await this.calcProcessForm();const{childNames:n}=this.view;n.push(this.processForm.name)}async onMounted(){var e;await super.onMounted(),(e=this.toolbar)==null||e.evt.on("onClick",async n=>{n.buttonType==="extra"&&n.eventArg&&this.onLinkClick(n.eventArg)})}async load(){const e=await super.load();return this.isCalcWFToolbar&&this.calcWfToolbar(),e}async refresh(){const e=this.processForm;await this.calcProcessForm(),e===this.processForm&&await super.refresh()}async calcProcessFormName(){const e=await this.entityService.wf.getWFStep(this.view.params);this.isEditable=e.data.isEditable==="true";const n=`process-${ibiz.env.isMob?"mob":""}form`;return e.data[n]?`wfform_${e.data[n]}`:"form"}async calcProcessForm(){const e=await this.calcProcessFormName(),n=jn(this.view.model,e.toLowerCase());if(!n)throw new be(this.view.model,`\u627E\u4E0D\u5230\u8868\u5355${e}\u7684\u6A21\u578B`);this.processForm=n,this.view.slotProps.form||(this.view.slotProps.form={}),this.view.slotProps.form.modelData=this.processForm}async calcWfToolbar(){if(!this.toolbar)throw new be(this.view.model,"\u7F3A\u5C11\u5DE5\u5177\u680F\u90E8\u4EF6\u6A21\u578B");this.toolbar.clearExtraButtons();const r=await(await ibiz.hub.getApp(this.view.context.srfappid).deService.getService(this.view.model.appDataEntityId)).wf.getWFLink(Object.assign(this.view.context.clone(),{taskDefinitionKey:this.view.params.taskDefinitionKey}),this.getData()[0].getOrigin());this.wfLinks=r.data,this.wfLinks.forEach(i=>{i.id=Oe()});const o=this.wfLinks.map(i=>({id:i.id,caption:i.sequenceFlowName,buttonType:"extra",tooltip:i.sequenceFlowName,showCaption:!0}));this.toolbar.setExtraButtons("before",o)}async onLinkClick(e){const n=this.wfLinks.find(r=>r.id===e);if(n)return this.wfSubmitByLink(n)}async wfSubmitByLink(e){this.isEditable&&await this.save();const n=Object.assign(this.view.context.clone(),{isEditable:this.isEditable,activeForm:e.sequenceflowform}),r={...e},o=Bi(this.view.model,e);if(!o){await this.form.wfSubmit({viewParam:r}),await this.view.closeView();return}(await ibiz.commands.execute(tt.TAG,o,n,r)).ok&&await this.view.closeView()}}class Zy extends $o{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab")}get drtab(){return this.view.getController("drtab")}}var eP=Object.defineProperty,tP=(t,e,n)=>e in t?eP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nP=(t,e,n)=>(tP(t,typeof e!="symbol"?e+"":e,n),n);class rP extends $o{constructor(){super(...arguments),nP(this,"isCalcWFToolbar",!1)}async calcProcessFormName(){return this.isEditable=this.view.context.isEditable==="true",this.view.context.processForm?`wfform_${this.view.context.processForm}`:"form"}async call(e,n){return e===J.OK?(this.onOkButtonClick(),null):e===J.CANCEL?(await this.onCancelButtonClick(),null):super.call(e,n)}async onOkButtonClick(){this.view.context.isEditable?await this.save():this.form.state.modified=!1,await this.form.wfSubmit({}),await this.view.closeView({ok:!0,data:this.getData()})}async onCancelButtonClick(){await this.view.closeView({ok:!1,data:[]})}}var oP=Object.defineProperty,aP=(t,e,n)=>e in t?oP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iP=(t,e,n)=>(aP(t,typeof e!="symbol"?e+"":e,n),n);class sP extends $o{constructor(){super(...arguments),iP(this,"isCalcWFToolbar",!1)}async calcProcessFormName(){return this.isEditable=this.view.context.isEditable==="true",this.view.context.processForm?`wfform_${this.view.context.processForm}`:"form"}async call(e,n){return e===J.OK?(this.onOkButtonClick(),null):e===J.CANCEL?(await this.onCancelButtonClick(),null):super.call(e,n)}async onOkButtonClick(){await this.save(),await this.form.wfStart({}),await this.view.closeView({ok:!0,data:this.getData()})}async onCancelButtonClick(){await this.view.closeView({ok:!1,data:[]})}}class ct extends we{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("dashboard")}get dashboard(){return this.view.getController("dashboard")}async onMounted(){await super.onMounted(),this.view.model.appDataEntityId&&await this.loadEntityData()}}class lP extends we{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("panel")}get panel(){return this.view.getController("panel")}async onMounted(){await super.onMounted(),this.view.model.appDataEntityId&&await this.loadEntityData()}}class cP extends we{}class uP extends zo{async onCreated(){super.onCreated(),this.view.slotProps.tree||(this.view.slotProps.tree={}),this.view.slotProps.tree.singleSelect=this.view.state.singleSelect}async onMounted(){const{model:e}=this.view;this.xdataControl.evt.on("onSelectionChange",async n=>{n.data[0]&&n.data[0]instanceof Si&&(n.data[0]=n.data[0].deData),this.view.evt.emit("onSelectionChange",{...n})}),this.xdataControl.evt.on("onActive",async n=>{this.view.evt.emit("onDataActive",{...n})}),!this.view.state.noLoadDefault&&e.loadDefault&&this.load()}async call(e,n){return e===De.GET_ALL_DATA?this.tree.state.items:super.call(e,n)}}class Lo extends Qt{get dataview(){return this.view.getController("dataview")}async onCreated(){super.onCreated(),this.view.slotProps.dataview.singleSelect=this.view.state.singleSelect}async onMounted(){await super.onMounted(),this.xdataControl.evt.on("onSelectionChange",async e=>{this.view.evt.emit("onSelectionChange",{...e})}),this.xdataControl.evt.on("onActive",async e=>{this.view.evt.emit("onDataActive",{...e})})}async call(e,n){return e===De.GET_ALL_DATA?this.dataview.state.items:super.call(e,n)}}class dP extends No{get treeExpBar(){return this.view.getController("treeexpbar")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("treeexpbar"),this.view.slotProps.treeexpbar||(this.view.slotProps.treeexpbar={}),this.view.slotProps.treeexpbar.noNeedNavView=!0,this.view.slotProps.pickupviewpanel||(this.view.slotProps.pickupviewpanel={}),this.view.slotProps.pickupviewpanel.noLoadDefault=!0,this.view.slotProps.pickupviewpanel.singleSelect=!0}async onMounted(){await super.onMounted(),this.treeExpBar.load(),this.treeExpBar.evt.on("onNavViewChange",e=>{this.view.slotProps.pickupviewpanel.context=e.navViewMsg.context,this.view.slotProps.pickupviewpanel.params={...this.view.params,...e.navViewMsg.params}})}}class pP extends Ie{}class hP extends we{get calendarExpBar(){return this.view.getController("calendarexpbar")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("calendarexpbar"),this.view.slotProps.calendarexpbar||(this.view.slotProps.calendarexpbar={}),this.view.slotProps.calendarexpbar.srfnav=this.view.state.srfnav}async onMounted(){await super.onMounted();const{model:e}=this.view;!this.view.state.noLoadDefault&&e.loadDefault&&this.calendarExpBar.load()}}class mP extends kc{get treeExpBar(){return this.view.getController("treeexpbar")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("treeexpbar"),this.view.slotProps.treeexpbar||(this.view.slotProps.treeexpbar={}),this.view.slotProps.treeexpbar.noNeedNavView=!0,this.view.slotProps.pickupviewpanel.noLoadDefault=!0}async onMounted(){await super.onMounted(),this.treeExpBar.load(),this.treeExpBar.evt.on("onNavViewChange",e=>{this.view.slotProps.pickupviewpanel.context=e.navViewMsg.context,this.view.slotProps.pickupviewpanel.params=e.navViewMsg.params})}}class fP extends Ie{get kanbanview(){return this.view.getController("kanban")}async onCreated(){super.onCreated();const{model:e}=this.view;this.view.slotProps.kanban||(this.view.slotProps.kanban={}),this.view.slotProps.kanban.mdctrlActiveMode=e.mdctrlActiveMode}}class bP extends Lo{}var vP=Object.defineProperty,gP=(t,e,n)=>e in t?vP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gc=(t,e,n)=>(gP(t,typeof e!="symbol"?e+"":e,n),n);class CP extends we{constructor(){super(...arguments),Gc(this,"route",Me()),Gc(this,"enterKeyListener",async e=>{if(e.key==="Enter"&&this.AppLoginView.layoutPanel){const n={data:[{username:this.AppLoginView.layoutPanel.data.username,password:this.AppLoginView.layoutPanel.data.password}]};await this.login(n)}})}get AppLoginView(){return this.view.getController("AppLoginView")}async onMounted(){super.onMounted(),document.addEventListener("keydown",this.enterKeyListener)}async onDestroyed(){super.onDestroyed(),document.removeEventListener("keydown",this.enterKeyListener)}async call(e,n={}){return e===J.LOGIN&&await this.login(n),e===J.CANCEL_CHANGES&&await this.cancelChanges(),super.call(e,n)}async login(e){let n;this.AppLoginView.layoutPanel&&typeof this.AppLoginView.layoutPanel.data.isRemember=="boolean"&&(n=this.AppLoginView.layoutPanel.data.isRemember),await ibiz.auth.login(e.data[0].username,e.data[0].password,n)===!0&&(window.location.hash=this.route.query.ru||"/",window.location.reload())}async cancelChanges(){this.AppLoginView.layoutPanel&&Object.keys(this.AppLoginView.layoutPanel.panelItems).forEach(e=>{const n=this.AppLoginView.layoutPanel.panelItems[e],{viewFieldName:r}=n.model;r&&n.setDataValue("",r)})}}class wP extends Ie{}class yP extends Ft{get xdataControlName(){return"treegrid"}}class PP extends Ie{get xdataControlName(){return"meditviewpanel"}get meditviewpanel(){return this.view.getController("meditviewpanel")}async onCreated(){await super.onCreated(),this.view.slotProps.meditviewpanel||(this.view.slotProps.meditviewpanel={})}async call(e,n){return e===J.NEW?(await this.meditviewpanel.handleAdd(),null):e===J.REFRESH?null:super.call(e,n)}}class EP extends we{get chartExpBar(){return this.view.getController("chartexpbar")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("chartexpbar"),this.view.slotProps.chartexpbar||(this.view.slotProps.chartexpbar={}),this.view.slotProps.chartexpbar.srfnav=this.view.state.srfnav}}class IP extends Ie{get map(){return this.view.getController("map")}async onCreated(){super.onCreated(),this.view.slotProps.map||(this.view.slotProps.map={})}}class DP extends we{get searchForm(){return this.view.getController("searchform")}get searchBar(){return this.view.getController("searchbar")}get reportpanel(){return this.view.getController("reportpanel")}async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("searchform","searchbar","reportpanel"),this.view.slotProps.reportpanel||(this.view.slotProps.reportpanel={})}async onMounted(){await super.onMounted();const{model:e}=this.view;this.reportpanel.evt.on("onBeforeLoad",()=>{this.reportpanel.state.searchParams=this.getSearchParams()}),this.reportpanel.evt.on("onLoadSuccess",r=>{this.view.evt.emit("onDataChange",{...r,actionType:"LOAD"})});const n=this.viewLayoutPanel.panelItems.view_searchform;if(n){const r=!!this.searchForm;n.state.keepAlive=r,n.state.visible=r&&!!e.expandSearchForm}this.searchForm&&this.searchForm.evt.on("onSearch",()=>{this.reLoad()}),this.searchBar&&this.searchBar.evt.on("onSearch",()=>{this.reLoad()}),!this.view.state.noLoadDefault&&e.loadDefault&&this.load()}async call(e,n){return e===J.REFRESH?(await this.refresh(),null):e===J.SEARCH?(await this.searchForm.search(),null):e===J.RESET?(await this.searchForm.reset(),null):super.call(e,n)}getData(){return this.reportpanel.getData()}async load(){return this.reportpanel.load()}async reLoad(){await this.reportpanel.load({isInitialLoad:!0})}async refresh(){await this.load()}getSearchParams(){const e={};return this.searchForm&&Object.assign(e,this.searchForm.getFilterParams()),this.searchBar&&Object.assign(e,this.searchBar.getFilterParams()),e}calcViewHeaderVisible(){let e=super.calcViewHeaderVisible();if(!this.searchBar||!this.searchBar.state.visible){const n=this.viewLayoutPanel.panelItems.view_searchbar;n&&(n.state.visible=!1)}else e=!0;return e}toggleFilter(){if(this.searchForm){const e=this.viewLayoutPanel.panelItems.view_searchform;e&&(e.state.visible=!e.state.visible)}}}const _P=N("aL",{install:t=>{ibiz.engine.register("VIEW_AppIndexView",e=>new To(e)),ibiz.engine.register("VIEW_APPINDEXVIEW",e=>new To(e)),ibiz.engine.register("VIEW_GridView",e=>new Ft(e)),ibiz.engine.register("VIEW_ListView",e=>new Vc(e)),ibiz.engine.register("VIEW_TreeView",e=>new zo(e)),ibiz.engine.register("VIEW_EditView",e=>new lt(e)),ibiz.engine.register("VIEW_EditView2",e=>new My(e)),ibiz.engine.register("VIEW_EditView3",e=>new Vy(e)),ibiz.engine.register("VIEW_EditView4",e=>new jy(e)),ibiz.engine.register("VIEW_DataView",e=>new Qt(e)),ibiz.engine.register("VIEW_OptionView",e=>new jc(e)),ibiz.engine.register("VIEW_PickupGridView",e=>new ky(e)),ibiz.engine.register("VIEW_PickupTreeView",e=>new uP(e)),ibiz.engine.register("VIEW_DEPICKUPVIEW2",e=>new dP(e)),ibiz.engine.register("VIEW_PickupView",e=>new No(e)),ibiz.engine.register("VIEW_MPickupView",e=>new kc(e)),ibiz.engine.register("VIEW_DEMPICKUPVIEW2",e=>new mP(e)),ibiz.engine.register("VIEW_TabExpView",e=>new Ro(e)),ibiz.engine.register("VIEW_GridExpView",e=>new Wy(e)),ibiz.engine.register("VIEW_ListExpView",e=>new Hy(e)),ibiz.engine.register("VIEW_DataViewExpView",e=>new Ky(e)),ibiz.engine.register("VIEW_ChartView",e=>new Yy(e)),ibiz.engine.register("VIEW_TreeExpView",e=>new Uc(e)),ibiz.engine.register("VIEW_WizardView",e=>new Xy(e)),ibiz.engine.register("VIEW_DEWFDYNAEDITVIEW3",e=>new Zy(e)),ibiz.engine.register("VIEW_DEWFDYNAACTIONVIEW",e=>new rP(e)),ibiz.engine.register("VIEW_DEWFDYNASTARTVIEW",e=>new sP(e)),ibiz.engine.register("VIEW_APPPORTALVIEW",e=>new ct(e)),ibiz.engine.register("VIEW_DEPORTALVIEW",e=>new ct(e)),ibiz.engine.register("VIEW_PortalView9",e=>new ct(e)),ibiz.engine.register("VIEW_PortalView",e=>new ct(e)),ibiz.engine.register("VIEW_DEPANELVIEW",e=>new lP(e)),ibiz.engine.register("VIEW_DECUSTOMVIEW",e=>new cP(e)),ibiz.engine.register("VIEW_DEPICKUPDATAVIEW",e=>new Lo(e)),ibiz.engine.register("VIEW_DEINDEXPICKUPDATAVIEW",e=>new Lo(e)),ibiz.engine.register("VIEW_DECALENDARVIEW",e=>new pP(e)),ibiz.engine.register("VIEW_CalendarExpView",e=>new hP(e)),ibiz.engine.register("VIEW_FormPickupDataView",e=>new bP(e)),ibiz.engine.register("VIEW_KanBanView",e=>new fP(e)),ibiz.engine.register("VIEW_APPLOGINVIEW",e=>new CP(e)),ibiz.engine.register("VIEW_TreeGridExView",e=>new wP(e)),ibiz.engine.register("VIEW_DETREEGRIDVIEW",e=>new yP(e)),ibiz.engine.register("VIEW_DECHARTEXPVIEW",e=>new EP(e)),ibiz.engine.register("VIEW_GridView9",e=>new Ft(e)),ibiz.engine.register("VIEW_ListView9",e=>new Vc(e)),ibiz.engine.register("VIEW_EditView9",e=>new lt(e)),ibiz.engine.register("VIEW_DataView9",e=>new Qt(e)),ibiz.engine.register("VIEW_TreeView9",e=>new zo(e)),ibiz.engine.register("VIEW_DETABEXPVIEW9",e=>new Ro(e)),ibiz.engine.register("VIEW_PortalView9",e=>new ct(e)),ibiz.engine.register("VIEW_DEPORTALVIEW9",e=>new ct(e)),ibiz.engine.register("VIEW_DEMEDITVIEW9",e=>new PP(e)),ibiz.engine.register("VIEW_DEMAPVIEW",e=>new IP(e)),ibiz.engine.register("VIEW_DEREPORTVIEW",e=>new DP(e))}});/*! Element Plus v2.4.2 */var BP={name:"zh-cn",el:{colorpicker:{confirm:"\u786E\u5B9A",clear:"\u6E05\u7A7A"},datepicker:{now:"\u6B64\u523B",today:"\u4ECA\u5929",cancel:"\u53D6\u6D88",clear:"\u6E05\u7A7A",confirm:"\u786E\u5B9A",selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startDate:"\u5F00\u59CB\u65E5\u671F",startTime:"\u5F00\u59CB\u65F6\u95F4",endDate:"\u7ED3\u675F\u65E5\u671F",endTime:"\u7ED3\u675F\u65F6\u95F4",prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",prevMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",year:"\u5E74",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},months:{jan:"\u4E00\u6708",feb:"\u4E8C\u6708",mar:"\u4E09\u6708",apr:"\u56DB\u6708",may:"\u4E94\u6708",jun:"\u516D\u6708",jul:"\u4E03\u6708",aug:"\u516B\u6708",sep:"\u4E5D\u6708",oct:"\u5341\u6708",nov:"\u5341\u4E00\u6708",dec:"\u5341\u4E8C\u6708"}},select:{loading:"\u52A0\u8F7D\u4E2D",noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",placeholder:"\u8BF7\u9009\u62E9"},cascader:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D",placeholder:"\u8BF7\u9009\u62E9",noData:"\u6682\u65E0\u6570\u636E"},pagination:{goto:"\u524D\u5F80",pagesize:"\u6761/\u9875",total:"\u5171 {total} \u6761",pageClassifier:"\u9875",page:"\u9875",prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",currentPage:"\u7B2C {pager} \u9875",prevPages:"\u5411\u524D {pager} \u9875",nextPages:"\u5411\u540E {pager} \u9875",deprecationWarning:"\u4F60\u4F7F\u7528\u4E86\u4E00\u4E9B\u5DF2\u88AB\u5E9F\u5F03\u7684\u7528\u6CD5\uFF0C\u8BF7\u53C2\u8003 el-pagination \u7684\u5B98\u65B9\u6587\u6863"},messagebox:{title:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",error:"\u8F93\u5165\u7684\u6570\u636E\u4E0D\u5408\u6CD5!"},upload:{deleteTip:"\u6309 delete \u952E\u53EF\u5220\u9664",delete:"\u5220\u9664",preview:"\u67E5\u770B\u56FE\u7247",continue:"\u7EE7\u7EED\u4E0A\u4F20"},table:{emptyText:"\u6682\u65E0\u6570\u636E",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"},transfer:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",titles:["\u5217\u8868 1","\u5217\u8868 2"],filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",noCheckedFormat:"\u5171 {total} \u9879",hasCheckedFormat:"\u5DF2\u9009 {checked}/{total} \u9879"},image:{error:"\u52A0\u8F7D\u5931\u8D25"},pageHeader:{title:"\u8FD4\u56DE"},popconfirm:{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"}}};function Mo(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!W(t)}const SP=S({name:"IBizDevtoolAction",setup(){var t;const e=B("devtool-action"),n=mt("devtool-evt"),r=I([]),o=I(null),i=I(!1),s=I(""),l=I(["context","params"]),c=Le(),u=(t=ja())==null?void 0:t.proxy;c.afterEach(()=>{u&&(o.value=null,u.$forceUpdate())});const p=E=>E?Object.entries(E).map(([x,O])=>({key:x,value:Object.prototype.toString.call(O)==="[object Object]"?JSON.stringify(O):`${O}`})):[],m=F(()=>o.value?p(o.value.controller.context):[]),v=F(()=>o.value?p(o.value.controller.params):[]),g=E=>{r.value=[...E.values()]},b=E=>{(E.ctrlKey||E.metaKey)&&E.code==="F12"&&(i.value=!i.value)},h=E=>{var x;E.key===((x=o.value)==null?void 0:x.key)?o.value=null:o.value=E},f=E=>{if(!E)return;ibiz.util.text.copy(E)?ibiz.message.success("\u62F7\u8D1D\u6210\u529F!"):ibiz.message.error("\u62F7\u8D1D\u5931\u8D25\uFF0C\u6D4F\u89C8\u5668copy\u64CD\u4F5C\u4E0D\u88AB\u652F\u6301\u6216\u672A\u88AB\u542F\u7528!")},w=()=>{s.value="44px"},P=()=>{s.value="100%"},_=()=>{i.value=!1},y=E=>{const x=hn(E.dom);x&&(x.style.outline="3px solid #409EFF")},D=E=>{const x=hn(E.dom);x&&(x.style.outline="")};return Pe(()=>{n.on("change",g),document.addEventListener("keydown",b)}),Re(()=>{n.off("change",g),document.removeEventListener("keydown",b)}),{ns:e,items:r,activeItem:o,height:s,isShow:i,activeCollapse:l,contextArray:m,paramsArray:v,onItemClick:h,copy:f,minimize:w,expand:P,close:_,onMouseEnter:y,onMouseLeave:D}},render(){let t,e;if(this.isShow)return a("div",{class:this.ns.b(),style:{height:this.height}},[this.activeItem?a("div",{class:this.ns.b("collapse")},[a(d("el-collapse"),{modelValue:this.activeCollapse,"onUpdate:modelValue":n=>this.activeCollapse=n},{default:()=>[a(d("el-collapse-item"),{title:"\u5E94\u7528\u4E0A\u4E0B\u6587",name:"context"},Mo(t=this.contextArray.map(n=>a("div",{class:this.ns.b("collapse-item")},[a("div",{class:this.ns.be("collapse-item","key"),title:n.key,onClick:()=>this.copy(n.key)},[n.key]),a("div",{class:this.ns.be("collapse-item","value"),title:n.value,onClick:()=>this.copy(n.value)},[`\uFF1A${n.value}`])])))?t:{default:()=>[t]}),a(d("el-collapse-item"),{title:"\u89C6\u56FE\u53C2\u6570",name:"params"},Mo(e=this.paramsArray.map(n=>a("div",{class:this.ns.b("collapse-item")},[a("div",{class:this.ns.be("collapse-item","key"),title:n.key,onClick:()=>this.copy(n.key)},[n.key]),a("div",{class:this.ns.be("collapse-item","value"),title:n.value,onClick:()=>this.copy(n.value)},[`\uFF1A${n.value}`])])))?e:{default:()=>[e]})]})]):null,a("div",{class:this.ns.b("container")},[a("div",{class:this.ns.b("header")},[a("ion-icon",{name:"remove-outline",onClick:this.minimize},null),a("ion-icon",{name:"expand-outline",onClick:this.expand},null),a("ion-icon",{name:"close-outline",onClick:this.close},null)]),a("div",{class:this.ns.b("content")},[this.items.map(n=>{var r;if(!n.controller.isActive)return null;const{caption:o,name:i}=n.controller.model,s=`${o||""}\uFF08${i||""}\uFF09`,l=((r=this.activeItem)==null?void 0:r.key)===n.key?"success":"";return a("div",{key:n.key,class:this.ns.b("item")},[a(d("el-tag"),{type:l,class:this.ns.be("item","text"),title:s,onClick:()=>this.onItemClick(n),onMouseenter:()=>this.onMouseEnter(n),onMouseleave:()=>this.onMouseLeave(n)},Mo(s)?s:{default:()=>[s]}),a("div",{class:this.ns.be("item","button"),onClick:()=>this.copy(i)},[R("\u62F7\u8D1D")])])})])])])}});var AP=Object.defineProperty,FP=(t,e,n)=>e in t?AP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qc=(t,e,n)=>(FP(t,typeof e!="symbol"?e+"":e,n),n);class xP{constructor(){qc(this,"viewMap",new Map),qc(this,"evt",new Ai)}init(e){const n=document.createElement("div");n.classList.add("devtool"),document.body.append(n);const r=ka(SP);r.use(e),r.use(ji,{locale:BP}),r.provide("devtool-evt",this.evt),r.mount(n)}registerView(e,n,r){this.viewMap.set(e,{key:e,controller:n,dom:r}),this.evt.emit("change",this.viewMap)}unRegisterView(e){this.viewMap.delete(e),this.evt.emit("change",this.viewMap)}}const NP=N("d",new xP);var zP=N("i",{install:t=>{ibiz.i18n=Ly,ibiz.util.getExcelUtil=()=>Fe.import("./xlsx-util-Mxa6HuaG.js"),t.use(Qc),t.use(vp),t.use(_P),t.use(Na),t.use(za),t.use(Ny),t.use(nf),t.use(cf),t.use(Ep),t.use(Sp),t.use(_h),t.use(ng),t.use(xh),t.use(bb),t.use(mf),t.use(Hm),t.use(Ra),t.use($a),t.use(Vm),t.use(Of),t.use(Gf),t.use(Lf),t.use(Rh),t.use(Lm),t.use(Qm),t.use(wf),t.use(_f),t.use(db),t.use(Pb),t.use(xb),t.use(Vb),t.use(zv),t.use(jv),t.use(Yf),t.use(Wv),t.use(Jv),t.use(lg),t.use(nb),t.use(hg),t.use(yg),t.use(Sy)}})}}});
|
|
14
|
+
//# sourceMappingURL=index-1dtzc9-X.js.map
|