@ibiz-template/vue3-components 0.3.4 → 0.3.6-dev.0

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.
Files changed (174) hide show
  1. package/dist/index-IQggCeg0.js +14 -0
  2. package/dist/index-IQggCeg0.js.map +1 -0
  3. package/dist/index.min.css +1 -1
  4. package/dist/index.system.min.js +1 -1
  5. package/dist/{xlsx-util-SHuu4UVN.js → xlsx-util--ODZUMX_.js} +2 -2
  6. package/dist/{xlsx-util-SHuu4UVN.js.map → xlsx-util--ODZUMX_.js.map} +1 -1
  7. package/es/control/form/edit-form/edit-form.mjs +18 -3
  8. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.css +1 -0
  9. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.d.ts +7 -6
  10. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.mjs +51 -53
  11. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.css +1 -0
  12. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.d.ts +19 -0
  13. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.mjs +72 -0
  14. package/es/control/form/form-detail/form-mdctrl/{form-mdctrl-data-view/form-mdctrl-data-view.d.ts → form-mdctrl-repeater/form-mdctrl-repeater.d.ts} +5 -7
  15. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.mjs +57 -0
  16. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.css +1 -0
  17. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +2 -0
  18. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +203 -0
  19. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.d.ts +19 -0
  20. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.mjs +59 -0
  21. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.css +1 -0
  22. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.d.ts +29 -0
  23. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.mjs +54 -0
  24. package/es/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -0
  25. package/es/control/form/form-detail/form-mdctrl/form-mdctrl.d.ts +4 -2
  26. package/es/control/form/form-detail/form-mdctrl/form-mdctrl.mjs +40 -54
  27. package/es/control/form/form-detail/form-mdctrl/form-mdctrl.provider.mjs +21 -2
  28. package/es/control/form/form-detail/form-mdctrl/index.d.ts +2 -3
  29. package/es/control/form/form-detail/form-mdctrl/index.mjs +6 -14
  30. package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.css +1 -0
  31. package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.d.ts +40 -0
  32. package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.mjs +99 -0
  33. package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +1 -1
  34. package/es/control/index.d.ts +1 -1
  35. package/es/control/index.mjs +1 -3
  36. package/es/control/report-panel/index.d.ts +2 -0
  37. package/es/control/report-panel/index.mjs +23 -0
  38. package/es/control/report-panel/report-detail/index.d.ts +2 -0
  39. package/es/control/report-panel/report-detail/index.mjs +4 -0
  40. package/es/control/report-panel/report-detail/user-report-panel/index.d.ts +14 -0
  41. package/es/control/report-panel/report-detail/user-report-panel/index.mjs +12 -0
  42. package/es/control/report-panel/report-detail/user-report-panel/user-report-panel.css +1 -0
  43. package/es/control/report-panel/report-detail/user-report-panel/user-report-panel.d.ts +16 -0
  44. package/es/control/report-panel/report-detail/user-report-panel/user-report-panel.mjs +45 -0
  45. package/es/control/report-panel/report-detail/user2-report-panel/index.d.ts +15 -0
  46. package/es/control/report-panel/report-detail/user2-report-panel/index.mjs +12 -0
  47. package/es/control/report-panel/report-detail/user2-report-panel/user2-report-panel.css +1 -0
  48. package/es/control/report-panel/report-detail/user2-report-panel/user2-report-panel.d.ts +17 -0
  49. package/es/control/report-panel/report-detail/user2-report-panel/user2-report-panel.mjs +67 -0
  50. package/es/control/report-panel/report-panel.css +1 -0
  51. package/es/control/{panel/panel/panel.d.ts → report-panel/report-panel.d.ts} +12 -22
  52. package/es/control/report-panel/report-panel.mjs +72 -0
  53. package/es/control/report-panel/report-panel.provider.d.ts +11 -0
  54. package/es/control/{panel/panel/panel.provider.mjs → report-panel/report-panel.provider.mjs} +3 -3
  55. package/es/control/tree-grid/tree-grid.mjs +1 -1
  56. package/es/editor/text-box/input/input.d.ts +1 -0
  57. package/es/editor/text-box/input/input.mjs +6 -2
  58. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +1 -0
  59. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.mjs +7 -2
  60. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.css +1 -1
  61. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.d.ts +1 -0
  62. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.mjs +6 -1
  63. package/es/index.mjs +4 -4
  64. package/es/panel-component/searchform-buttons/index.d.ts +1 -0
  65. package/es/panel-component/searchform-buttons/searchform-buttons.controller.d.ts +9 -1
  66. package/es/panel-component/searchform-buttons/searchform-buttons.controller.mjs +11 -0
  67. package/es/panel-component/searchform-buttons/searchform-buttons.css +1 -1
  68. package/es/panel-component/searchform-buttons/searchform-buttons.d.ts +1 -0
  69. package/es/panel-component/searchform-buttons/searchform-buttons.mjs +35 -1
  70. package/es/view/login-view/login-view.mjs +1 -18
  71. package/es/view-engine/edit-view.engine.d.ts +9 -0
  72. package/es/view-engine/edit-view.engine.mjs +28 -0
  73. package/es/view-engine/index.mjs +5 -0
  74. package/es/view-engine/login-view.engine.mjs +6 -35
  75. package/es/view-engine/report-view.engine.d.ts +96 -0
  76. package/es/view-engine/report-view.engine.mjs +178 -0
  77. package/es/view-engine/wf-dyna-action-view.engine.mjs +2 -0
  78. package/lib/control/form/edit-form/edit-form.cjs +17 -2
  79. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.cjs +48 -53
  80. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.css +1 -0
  81. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.cjs +74 -0
  82. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.css +1 -0
  83. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.cjs +59 -0
  84. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +205 -0
  85. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.css +1 -0
  86. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.cjs +61 -0
  87. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.cjs +56 -0
  88. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.css +1 -0
  89. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.cjs +38 -52
  90. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -0
  91. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.provider.cjs +20 -1
  92. package/lib/control/form/form-detail/form-mdctrl/index.cjs +6 -14
  93. package/lib/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.cjs +101 -0
  94. package/lib/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.css +1 -0
  95. package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +1 -1
  96. package/lib/control/index.cjs +64 -67
  97. package/lib/control/report-panel/index.cjs +28 -0
  98. package/lib/control/report-panel/report-detail/index.cjs +9 -0
  99. package/lib/control/report-panel/report-detail/user-report-panel/index.cjs +17 -0
  100. package/lib/control/report-panel/report-detail/user-report-panel/user-report-panel.cjs +47 -0
  101. package/lib/control/report-panel/report-detail/user-report-panel/user-report-panel.css +1 -0
  102. package/lib/control/report-panel/report-detail/user2-report-panel/index.cjs +17 -0
  103. package/lib/control/report-panel/report-detail/user2-report-panel/user2-report-panel.cjs +69 -0
  104. package/lib/control/report-panel/report-detail/user2-report-panel/user2-report-panel.css +1 -0
  105. package/lib/control/report-panel/report-panel.cjs +74 -0
  106. package/lib/control/report-panel/report-panel.css +1 -0
  107. package/lib/control/{panel/panel/panel.provider.cjs → report-panel/report-panel.provider.cjs} +3 -3
  108. package/lib/control/tree-grid/tree-grid.cjs +1 -1
  109. package/lib/editor/text-box/input/input.cjs +6 -2
  110. package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.cjs +6 -1
  111. package/lib/editor/upload/ibiz-image-upload/ibiz-image-upload.cjs +5 -0
  112. package/lib/editor/upload/ibiz-image-upload/ibiz-image-upload.css +1 -1
  113. package/lib/index.cjs +120 -121
  114. package/lib/panel-component/searchform-buttons/searchform-buttons.cjs +35 -1
  115. package/lib/panel-component/searchform-buttons/searchform-buttons.controller.cjs +11 -0
  116. package/lib/panel-component/searchform-buttons/searchform-buttons.css +1 -1
  117. package/lib/view/login-view/login-view.cjs +1 -18
  118. package/lib/view-engine/edit-view.engine.cjs +28 -0
  119. package/lib/view-engine/index.cjs +5 -0
  120. package/lib/view-engine/login-view.engine.cjs +6 -35
  121. package/lib/view-engine/report-view.engine.cjs +180 -0
  122. package/lib/view-engine/wf-dyna-action-view.engine.cjs +2 -0
  123. package/package.json +7 -7
  124. package/dist/index-OcHgH3lj.js +0 -14
  125. package/dist/index-OcHgH3lj.js.map +0 -1
  126. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.css +0 -1
  127. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.d.ts +0 -36
  128. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.mjs +0 -67
  129. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-data-view/form-mdctrl-data-view.mjs +0 -68
  130. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.d.ts +0 -17
  131. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.mjs +0 -70
  132. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-list/form-mdctrl-list.d.ts +0 -17
  133. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-list/form-mdctrl-list.mjs +0 -68
  134. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.d.ts +0 -72
  135. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.mjs +0 -158
  136. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.d.ts +0 -17
  137. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.mjs +0 -58
  138. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.d.ts +0 -17
  139. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.mjs +0 -55
  140. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid.css +0 -1
  141. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid.d.ts +0 -19
  142. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid.mjs +0 -113
  143. package/es/control/panel/index.d.ts +0 -2
  144. package/es/control/panel/index.mjs +0 -4
  145. package/es/control/panel/panel/index.d.ts +0 -56
  146. package/es/control/panel/panel/index.mjs +0 -12
  147. package/es/control/panel/panel/panel.css +0 -1
  148. package/es/control/panel/panel/panel.mjs +0 -133
  149. package/es/control/panel/panel/panel.provider.d.ts +0 -13
  150. package/es/control/panel/view-layout-panel/index.d.ts +0 -57
  151. package/es/control/panel/view-layout-panel/index.mjs +0 -18
  152. package/es/control/panel/view-layout-panel/view-layout-panel.css +0 -1
  153. package/es/control/panel/view-layout-panel/view-layout-panel.d.ts +0 -61
  154. package/es/control/panel/view-layout-panel/view-layout-panel.mjs +0 -135
  155. package/es/control/panel/view-layout-panel/view-layout-panel.provider.d.ts +0 -13
  156. package/es/control/panel/view-layout-panel/view-layout-panel.provider.mjs +0 -14
  157. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.cjs +0 -72
  158. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.css +0 -1
  159. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-data-view/form-mdctrl-data-view.cjs +0 -73
  160. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.cjs +0 -75
  161. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-list/form-mdctrl-list.cjs +0 -73
  162. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.cjs +0 -160
  163. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.cjs +0 -63
  164. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.cjs +0 -60
  165. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid.cjs +0 -118
  166. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid.css +0 -1
  167. package/lib/control/panel/index.cjs +0 -9
  168. package/lib/control/panel/panel/index.cjs +0 -17
  169. package/lib/control/panel/panel/panel.cjs +0 -135
  170. package/lib/control/panel/panel/panel.css +0 -1
  171. package/lib/control/panel/view-layout-panel/index.cjs +0 -23
  172. package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +0 -137
  173. package/lib/control/panel/view-layout-panel/view-layout-panel.css +0 -1
  174. package/lib/control/panel/view-layout-panel/view-layout-panel.provider.cjs +0 -16
@@ -0,0 +1,14 @@
1
+ System.register(["@ibiz-template/vue3-util","vue","@ibiz-template/runtime","qx-util","dayjs","ramda","vue-router","lodash-es","@ibiz-template/core","qs","element-plus","@floating-ui/dom","interactjs","vuedraggable","vue-i18n"],function(O,Fe){"use strict";var _,en,tn,nn,rn,on,an,ke,M,lt,sn,ln,jo,cn,ko,Uo,Go,qo,Wo,Ho,Ko,Xo,Yo,Jo,Qo,te,Zo,ea,ta,na,ra,oa,aa,ia,Ft,ct,sa,la,ca,un,be,ee,ua,da,pa,ha,ma,fa,ba,va,dn,ga,Ca,wa,ya,Pa,Ia,xt,Ue,Ot,Ea,Da,_a,Ba,Sa,Aa,Fa,xa,Oa,Ta,Na,B,a,d,A,ne,G,D,j,N,Ie,ut,za,Xe,Ra,Tt,dt,pt,ht,pe,ze,$a,La,pn,Ma,Va,ja,ka,oe,le,Re,Ge,qe,Ua,Nt,Ga,qa,Wa,De,re,Q,hn,mn,Ye,mt,fn,bn,vn,zt,Ha,Ka,Xa,gn,Ae,Cn,wn,yn,Pn,Ya,In,En,Je,Dn,_n,Bn,Sn,Ja,Qa,Za,ei,ti,ni,ri,oi,Rt,ai,ii,si,ie,li,An,Fn,xn,ci,ui,di,On,xe,pi,Tn,Nn,zn,Rn,$n,Ln,Mn,hi,mi,fi,bi,vi,gi,Ci,wi,Qe,Ze,se,ft,We,bt,$,yi,Pi,Ii,we,X,Ei,Ee,Vn,Di,_i,Oe,jn,Bi,Si,_e,Pe,Ai,Te,Fi,$t,Lt,$e,Le,et,vt,gt,xi,Oi,ve,Ti,de,Ct,Ni,kn,Mt,me,zi,Ri,$i,Li,Me,Be,Mi,wt,Vi,ji,Un,ki,Ui,Gi,qi,Wi,tt,Gn,Hi;return{setters:[function(C){_=C.useNamespace,en=C.IBizControlBase,tn=C.IBizIcon,nn=C.IBizRouterView,rn=C.IBizViewShell,on=C.IBizControlShell,an=C.IBizCodeList,ke=C.useUIStore,M=C.withInstall,lt=C.routerCallback,sn=C.onRouteChange,ln=C.route2routePath,jo=C.routePath2string,cn=C.PanelContainerController,ko=C.useAppStore,Uo=C.IBizPanelContainer,Go=C.IBizPanelCtrlPos,qo=C.IBizScrollContainer,Wo=C.IBizNavPos,Ho=C.IBizSingleDataContainer,Ko=C.IBizMultiDataContainer,Xo=C.IBizPanelField,Yo=C.IBizPanelRawItem,Jo=C.IBizGridContainer,Qo=C.IBizPanelContainerImage,te=C.useControlController,Zo=C.useClickOutside,ea=C.useEventListener,ta=C.generateRoutePath,na=C.openViewModal,ra=C.openViewPopover,oa=C.getDrawerPlacement,aa=C.openViewDrawer,ia=C.OverlayPopoverContainer,Ft=C.OverlayContainer,ct=C.useController,sa=C.useCtx,la=C.ControlLoadingPlaceholder,ca=C.getNestedRoutePath,un=C.getSpanProps,be=C.useFocusAndBlur,ee=C.getEditorEmits,ua=C.getInputProps,da=C.getInputNumberProps,pa=C.getInputIpProps,ha=C.getDropdownProps,ma=C.getCheckboxProps,fa=C.getCheckboxListProps,ba=C.getRadioProps,va=C.getDatePickerProps,dn=C.getRawProps,ga=C.getStepperProps,Ca=C.getRateProps,wa=C.getSwitchProps,ya=C.getSliderProps,Pa=C.getListBoxProps,Ia=C.getAutoCompleteProps,xt=C.getUploadProps,Ue=C.getDataPickerProps,Ot=C.renderString,Ea=C.getNumberRangeProps,Da=C.getDateRangeProps,_a=C.getCodeProps,Ba=C.getArrayProps,Sa=C.getCascaderProps,Aa=C.getColorPickerProps,Fa=C.useViewController,xa=C.IBizView,Oa=C.IBizPortalView,Ta=C.IBizViewLayoutPanelControl,Na=C.IBizPanelControl},function(C){B=C.defineComponent,a=C.createVNode,d=C.resolveComponent,A=C.computed,ne=C.h,G=C.isVNode,D=C.ref,j=C.watch,N=C.createTextVNode,Ie=C.onMounted,ut=C.nextTick,za=C.onBeforeUnmount,Xe=C.withDirectives,Ra=C.vShow,Tt=C.mergeProps,dt=C.resolveDirective,pt=C.defineAsyncComponent,ht=C.inject,pe=C.reactive,ze=C.onUnmounted,$a=C.renderSlot,La=C.getCurrentInstance,pn=C.unref,Ma=C.createApp},function(C){Va=C.calcContentAlignStyle,ja=C.asyncImportData,ka=C.importData,oe=C.PanelItemController,le=C.registerPanelItemProvider,Re=C.PanelItemState,Ge=C.Modal,qe=C.ViewMode,Ua=C.UIActionButtonState,Nt=C.UIActionUtil,Ga=C.getAsyncActionProvider,qa=C.registerAsyncActionProvider,Wa=C.AppMenuController,De=C.ViewCallTag,re=C.registerControlProvider,Q=C.ControlType,hn=C.AppMenuIconViewController,mn=C.GridFieldColumnController,Ye=C.GridRowState,mt=C.registerGridColumnProvider,fn=C.GridUAColumnController,bn=C.GridFieldEditColumnController,vn=C.GridGroupColumnController,zt=C.ControlVO,Ha=C.GridController,Ka=C.ListController,Xa=C.SearchFormController,gn=C.FormGroupPanelController,Ae=C.registerFormDetailProvider,Cn=C.FormItemController,wn=C.FormPageController,yn=C.FormButtonController,Pn=C.FormDRUIPartController,Ya=C.FormMDCtrlController,In=C.FormMDCtrlFormController,En=C.FormMDCtrlMDController,Je=C.FormMDCtrlRepeaterController,Dn=C.EditFormController,_n=C.FormRawItemController,Bn=C.FormTabPanelController,Sn=C.FormTabPageController,Ja=C.findChildFormDetails,Qa=C.ToolbarController,Za=C.CaptionBarController,ei=C.DataViewControlController,ti=C.TreeController,ni=C.PickupViewPanelController,ri=C.TabExpPanelController,oi=C.TreeExpBarController,Rt=C.ExpBarControlController,ai=C.CalendarExpBarController,ii=C.ChartExpBarController,si=C.SearchBarController,ie=C.ValueOP,li=C.WizardPanelController,An=C.ControlController,Fn=C.Srfuf,xn=C.calcNavParams,ci=C.DashboardController,ui=C.getPortletProvider,di=C.CustomDashboardController,On=C.ContainerPortletController,xe=C.registerPortletProvider,pi=C.PortletPartController,Tn=C.ViewPortletController,Nn=C.MenuPortletController,zn=C.ChartPortletController,Rn=C.RawItemPortletController,$n=C.ListPortletController,Ln=C.HtmlPortletController,Mn=C.ActionBarPortletController,hi=C.CalendarController,mi=C.KanbanController,fi=C.TreeGridExController,bi=C.TreeGridController,vi=C.MEditViewPanelController,gi=C.MapController,Ci=C.ReportPanelController,wi=C.ScriptFactory,Qe=C.CodeListEditorController,Ze=C.OpenAppViewCommand,se=C.EditorController,ft=C.getDeACMode,We=C.convertNavData,bt=C.calcDeCodeNameById,$=C.registerEditorProvider,yi=C.WFStepTraceViewController,Pi=C.registerViewProvider,Ii=C.ViewType,we=C.ViewEngineBase,X=C.SysUIActionTag,Ei=C.getAppViewRef,Ee=C.MDViewEngine,Vn=C.getControl,Di=C.getWFSubmitViewId,_i=C.TreeDataSetNodeData},function(C){Oe=C.createUUID,jn=C.notNilEmpty,Bi=C.getCookie,Si=C.QXEvent},function(C){_e=C.default},function(C){Pe=C.clone,Ai=C.reject,Te=C.isNil,Fi=C.isNotNil,$t=C.mergeDeepLeft,Lt=C.isEmpty},function(C){$e=C.useRouter,Le=C.useRoute},function(C){et=C.debounce,vt=C.isNumber,gt=C.isFunction,xi=C.isString,Oi=C.isNil,ve=C.toNumber,Ti=C.clone},function(C){de=C.RuntimeError,Ct=C.downloadFileFromBlob,Ni=C.Namespace,kn=C.recursiveIterate,Mt=C.ModelError,me=C.RuntimeModelError,zi=C.DataTypes,Ri=C.CoreConst,$i=C.HttpError,Li=C.IBizContext},function(C){Me=C.default},function(C){Be=C.ElMessageBox,Mi=C.ElLoading,wt=C.ElMessage,Vi=C.ElNotification,ji=C.default},function(C){Un=C.computePosition,ki=C.autoUpdate,Ui=C.offset,Gi=C.flip,qi=C.shift,Wi=C.arrow},function(C){tt=C.default},function(C){Gn=C.default},function(C){Hi=C.createI18n}],execute:function(){O({aZ:Ut,o:Fs,p:Ir,u:Pr});const C=O("f",B({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:_("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 Vt(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=O("b",B({name:"IBizCol",props:{layoutPos:{type:Object,required:!0},state:{type:Object,required:!0}},setup(t){const e=_("col"),n=A(()=>{const l=_("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 h=u[p];h&&c.push(l.bm(p,h.toLowerCase()))}),c}),r=A(()=>{const l=t.layoutPos;if(l.layout==="FLEX")return{};const{colXS:c,colXSOffset:u,colSM:p,colSMOffset:h,colMD:v,colMDOffset:g,colLG:b,colLGOffset:m}=l;return{xs:Vt(c,u,l.layout),sm:Vt(p,h,l.layout),md:Vt(v,g,l.layout),lg:Vt(b,m,l.layout)}}),o=Va(t.layoutPos),i=A(()=>{const l=t.state.layout,c={width:l.width,height:l.height,...o||{}};return Object.assign(c,l.extraStyle),c}),s=A(()=>{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 ne(d("el-col"),{class:this.colClass,style:this.cssVars,...this.gridAttrs},{default:()=>r})}}));function Mc(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Xi=O("e",B({name:"IBizRow",props:{layout:Object},setup(){return{ns:_("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")]},Mc(r)?r:{default:()=>[r]})}})),Yi=O("g",B({name:"IBizRawItem",props:{type:{type:String,required:!1},content:{type:[String,Object,Number]},rawItem:{type:Object,required:!1}},setup(t){const e=_("rawitem");let n=null,r="";t.rawItem&&(n=t.rawItem.rawItem,r=n.contentType);const o=D(t.type||r||""),i=D("");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=D({id:Oe(),path:"",mute:!0,autoplay:!0,replay:!1,showcontrols:!0}),u=D({contentPosition:"center",html:""}),p=D({type:"info",title:"",closeabled:!0,showIcon:!1}),h=D(""),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)&&(h.value=i.value,typeof h.value=="string"&&(h.value=h.value.replaceAll("&lt;","<"),h.value=h.value.replaceAll("&gt;",">"),h.value=h.value.replaceAll("&amp;nbsp;"," "),h.value=h.value.replaceAll("&nbsp;"," "))),["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(),j(()=>t.content,(g,b)=>{g!==b&&(i.value=g,v())},{immediate:!0}),{ns:e,rawItemText:h,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),N("\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=B({name:"IBizNoData",props:{text:{type:String,default:"\u6682\u65E0\u6570\u636E"},emptyTextLanguageRes:{type:Object,default:void 0}},setup(t){const e=_("no-data"),n=D(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=O("h",B({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=_("split"),r=D(null),o=D(0),i=D(0),s=D(!1),l=D(0),c=D(0),u=D(.5),p=D(0),h=A(()=>[n.b("wrapper"),n.is("no-select",s.value)]),v=A(()=>[n.b("pane"),s.value?n.bm("pane","moving"):""]),g=A(()=>t.mode==="horizontal"),b=A(()=>100-o.value),m=A(()=>typeof t.modelValue=="string"),f=A(()=>g.value?"offsetWidth":"offsetHeight"),w=(R,U)=>parseFloat(R)/parseFloat(U),I=R=>{const U=r.value[f.value];return m.value?typeof t[R]=="string"?t[R]:U*t[R]:typeof t[R]=="string"?w(t[R],U):t[R]},S=(R,U)=>m.value?`${Math.max(parseFloat(R),parseFloat(U))}px`:Math.max(R,U),y=R=>{let U=0;return m.value?U=`${r.value[f.value]-parseFloat(R)}px`:U=1-R,U},E=R=>{const z=(g.value?R.pageX:R.pageY)-p.value,H=r.value[f.value];let W=m.value?`${parseFloat(i.value)+z}px`:w(H*i.value+z,H);const J=y(W);parseFloat(W)<=parseFloat(l.value)&&(W=S(W,l.value)),parseFloat(J)<=parseFloat(c.value)&&(W=y(S(J,c.value))),Object.assign(R,{atMin:t.modelValue===l.value,atMax:m.value?y(t.modelValue)===c.value:y(t.modelValue).toFixed(5)===c.value.toFixed(5)}),e("update:modelValue",W),e("on-moving",R)},P=()=>{s.value=!1,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",P),e("on-move-end")},F=R=>{p.value=g.value?R.pageX:R.pageY,i.value=t.modelValue,s.value=!0,document.addEventListener("mousemove",E),document.addEventListener("mouseup",P),e("on-move-start")},x=()=>{ut(()=>{l.value=I("min"),c.value=I("max"),o.value=(m.value?w(t.modelValue,r.value[f.value]):t.modelValue)*1e4/100})};return j(()=>t.modelValue,R=>{R!==u.value&&(u.value=R,x())}),Ie(()=>{ut(()=>{x()}),window.addEventListener("resize",x)}),za(()=>{window.removeEventListener("resize",x)}),{ns:n,outerWrapper:r,offset:o,wrapperClasses:h,paneClasses:v,isHorizontal:g,anotherOffset:b,handleMousedown:F}},render(){var t,e,n,r,o,i,s,l,c,u,p,h;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")]},[(h=(p=this.$slots).bottom)==null?void 0:h.call(p)])])])}})),Zi=O("j",B({name:"IBizSplitTrigger",props:{mode:String},setup(t){const e=_("split-trigger"),n=A(()=>t.mode==="vertical"),r=A(()=>[e.b(),n.value?e.m("vertical"):e.m("horizontal")]),o=A(()=>[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))])])}})),Vc=(t,e)=>{const n=[];return e?.length>0&&t&&e.forEach(o=>{n.push(o[t])}),[...new Set(n)]},es=B({name:"IBizExtendActionTimeLine",props:{data:{type:Object}},setup(t){const e=_("extend-action-timeline"),n=D([]),r=(p,h)=>Date.parse(h.time)-Date.parse(p.time),o=p=>{const h=[];let v=Pe(p);if(v.length>0)return v=v.reverse(),v.forEach(g=>{if(g.usertasks){const b=Pe(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}),h.push(g)),g.identitylinks.length>0){const b=Vc("displayname",g.identitylinks);h.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),h.push(...g.comments))}),h},i=p=>{const h=new Map;for(let v=0;v<p.length;v++)h.has(p[v])||h.set(p[v],!0);return h},s=p=>{p.forEach(h=>{const v=[];if(h.tasks&&s(h.tasks),h.tasks)for(let b=0;b<h.tasks.length;b++){if(h.tasks[b].isLink){const m=h.tasks[b].authorName.indexOf("\u3001")!==-1?h.tasks[b].authorName.split("\u3001"):h.tasks[b].authorName;typeof m=="string"?v.push(m):v.push(...m)}if(h.tasks[b].linkName){const m=h.tasks[b].linkName.indexOf("\u3001")!==-1?h.tasks[b].linkName.split("\u3001"):h.tasks[b].linkName;typeof m=="string"?v.push(m):v.push(...m)}}const g=[...i(v).keys()];h.linkName=g.join("\u3001")})};j(()=>t.data,(p,h)=>{if(p!==h&&p){const g=Pe(p).usertasks;if(g){const b=o(g);b&&(s(b),n.value=b)}}},{immediate:!0});const l=(p,h)=>_e(p).format(h),c=p=>{p.isShow=!p.isShow},u=p=>p.map(h=>a("div",{class:[e.b("task"),e.is("wrong",h.type&&h.type.includes("\u9A73\u56DE")),e.is("link",h.isLink),e.is("linkname",h.linkName)]},[a("div",{class:e.be("task","tail")},null),a("div",{class:[e.be("task","head"),e.is("link-head",h.linkName)]},null),a("div",{class:e.be("task","top")},[a("div",{class:[e.be("task","user-task-name"),e.is("task-link",h.linkName)]},[h.taskName]),h.linkName?a("div",{class:e.be("task","link-name"),title:h.linkName},[h.linkName]):null,a("div",{class:[e.be("task","author-name"),e.is("has-type",h.type)],title:h.authorName},[h.authorName]),h.type&&a("div",{class:e.be("task","type")},[h.type]),h.time&&a("div",{class:e.be("task","last-time")},[h.time&&"\u5904\u7406\u65F6\u95F4",a("span",{class:e.be("task","last-time-text")},[h.time])])]),a("div",{class:e.be("task","bottom")},[a("div",{class:e.be("task","full-message")},[h.fullMessage?`\u5BA1\u6279\u610F\u89C1\uFF1A ${h.fullMessage}`:h.fullMessage])]),h.tasks&&h.tasks.length>=1&&a("div",{class:e.be("task","trigger"),"on-click":()=>{c(h)}},[a(d("i-icon"),{type:h.isShow?"md-remove":"md-add"},null)]),h.tasks&&Xe(a("div",{class:e.be("task","moreTask")},[u(h.tasks)]),[[Ra,h.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=B({name:"ViewMessage",props:{messages:{type:Array}},setup(){return{ns:_("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=B({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=_("pagination"),r=A(()=>(t.curPage-1)*t.size+1),o=A(()=>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"),Tt({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,[N("\u663E\u793A\xA0"),this.start,N("\xA0-\xA0"),this.end,N("\xA0\u6761\uFF0C\u5171\xA0"),this.total,N("\xA0\u6761\u6570\u636E")])]})])}}),rs=O("k",B({name:"IBizSortBar",props:{sortItems:{type:Array,required:!0}},emits:{SortChange:(t,e)=>!0},setup(t,{emit:e}){return{ns:_("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=B({name:"DataImport",props:{dismiss:{type:Function,required:!0},appDataEntity:{type:Object,required:!0},dataImport:{type:Object,required:!1}},setup(t){const e=_("data-import"),n=D(),r=D({state:"ready",message:""}),o=D(""),i=D(!1),s=()=>{t.dismiss()};return{ns:e,onLinkClick:async()=>{var p,h;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=((h=g.headers["content-disposition"].split(";").find(w=>w.indexOf("filename=")!==-1))==null?void 0:h.slice(9))||"";b=decodeURIComponent(b);const m=new Blob([g.data],{type:"application/vnd.ms-excel"}),f=document.createElement("a");f.download=b,f.style.display="none",f.href=URL.createObjectURL(m),document.body.appendChild(f),f.click(),URL.revokeObjectURL(f.href),document.body.removeChild(f)}},selectFile:()=>{n.value.click()},onCancelButtonClick:s,onFileChange:async p=>{const h=p.target;if(!h.files)return;o.value="";const v=h.files[0];h.value=null;let g;i.value=!0;try{if(ibiz.env.enableMqtt){ja(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 ka(v,t.appDataEntity,t.dataImport),ibiz.mc.command.send({srfdecodename:t.appDataEntity.codeName},"OBJECTCREATED");const{success:b,total:m,message:f}=g,w=m?Number(m):0,I=b?Number(b):0,S=m-b;r.value.state=f?"error":"over",r.value.message=f||`\u5171\u8BA1\u5BFC\u5165\u6570\u636E ${w} \u6761\uFF0C\u9519\u8BEF[${S}]\uFF0C\u6210\u529F[${I}]`}catch(b){b instanceof Error&&(o.value=b.message)}finally{i.value=!1}},inputUpLoad:n,isLoading:i,message:r,errorMessage:o}},render(){return Xe(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")},[N("\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")},[N("\u5355\u51FB\u6B64\u533A\u57DF\u8FDB\u884C\u4E0A\u4F20")])]):a("div",{class:[this.ns.b("message")]},[a("div",{class:this.ns.be("message","title")},[N("\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")},[N("\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,N("\u6570\u636E\u5BFC\u5165\u6A21\u677F\u6587\u4EF6")])]),a("div",{class:this.ns.e("button-bar")},[a(d("el-button"),{onClick:this.onCancelButtonClick},{default:()=>[N("\u53D6\u6D88")]}),this.message.state!=="ready"&&a(d("el-button"),{onClick:this.selectFile},{default:()=>[N("\u7EE7\u7EED\u5BFC\u5165")]})])]),[[dt("loading"),this.isLoading]])}}),jc=O("I",{install:t=>{t.component(en.name,en),t.component(tn.name,tn),t.component(Xi.name,Xi),t.component(Ki.name,Ki),t.component(nn.name,nn),t.component(C.name,C),t.component(rn.name,rn),t.component(on.name,on),t.component(Yi.name,Yi),t.component(an.name,an),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("IBizMapChart",pt({loader:()=>Fe.import("./map-chart-7nfIdU3w.js")}))}}),qn=B({name:"IBizAuthUserinfo",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){var e;const n=_("user-info"),r=t.controller,{srfusername:o="\u6E38\u5BA2",srfpersonname:i}=((e=ibiz.appData)==null?void 0:e.context)||{},s=$e(),l=D(!1),c=document.querySelector("html");c&&(c.classList.contains("light")?l.value=!1:c.classList.contains("dark")&&(l.value=!0));const u=b=>{if(c){const{UIStore:m}=ke(),f=b?"light":"dark",w=b?"dark":"light";m.theme=w,c.classList.remove(f),c.classList.add(w)}},p=ht("ctx",void 0),h=A(()=>p?.view&&p.view.model.mainMenuAlign||"LEFT"),v=async()=>{await ibiz.auth.logout()&&(await s.push(`/login?ru=${encodeURIComponent(window.location.hash.replace("#/","/"))}`),ibiz.util.showAppLoading(),window.location.reload())},g=A(()=>r.panel.view.state.isCollapse);return{ns:n,c:r,onClick:v,srfusername:o,srfpersonname:i,router:s,isDarkTheme:l,menuAlign:h,handleSwitchChange:u,isCollapse:g}},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},[N("\u9000\u51FA\u767B\u5F55")])]})]})})])}});var kc=Object.defineProperty,Uc=(t,e,n)=>e in t?kc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gc=(t,e,n)=>(Uc(t,typeof e!="symbol"?e+"":e,n),n);class qc{constructor(){Gc(this,"component","IBizAuthUserinfo")}async createController(e,n,r){const o=new oe(e,n,r);return await o.init(),o}}const Wc=O("at",M(qn,function(t){t.component(qn.name,qn),le("RAWITEM_AUTH_USERINFO",()=>new qc)}));var Hc=Object.defineProperty,Kc=(t,e,n)=>e in t?Hc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jt=(t,e,n)=>(Kc(t,typeof e!="symbol"?e+"":e,n),n);class as extends Re{constructor(){super(...arguments),jt(this,"currentKey",""),jt(this,"cacheKeys",["RouterShell"]),jt(this,"navViewMsgs",{}),jt(this,"operateSort",[])}}O("au",as);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,Wn=(t,e,n)=>(Yc(t,typeof e!="symbol"?e+"":e,n),n);class Hn extends oe{constructor(){super(...arguments),Wn(this,"viewModals",{}),Wn(this,"router"),Wn(this,"autoGoLast",!0)}createState(){var e;return new as((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},lt.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){lt.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)}}}O("av",Hn);const Kn=B({name:"IBizNavPosIndex",props:{modelData:{type:Object,required:!0},controller:{type:Hn,required:!0}},setup(t){var e;const n=t.controller,r=_("nav-pos-index"),o=s=>{n.onViewCreated(s)},i=$e();if(n.setRouter(i),n.routeDepth&&(sn(s=>{n.onRouteChange(s)},n.routeDepth+1),n.panel.view.model.viewType==="APPINDEXVIEW"&&!n.navTabs)){const s=Le();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,[N("\u975E\u8DEF\u7531\u6A21\u5F0F\u5BFC\u822A\u5360\u4F4D\u6682\u672A\u652F\u6301")])])}});var Jc=Object.defineProperty,Qc=(t,e,n)=>e in t?Jc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Zc=(t,e,n)=>(Qc(t,typeof e!="symbol"?e+"":e,n),n);class eu{constructor(){Zc(this,"component","IBizNavPosIndex")}async createController(e,n,r){const o=new Hn(e,n,r);return await o.init(),o}}const tu=O("aw",M(Kn,function(t){t.component(Kn.name,Kn),le("RAWITEM_NAV_POS_INDEX",()=>new eu)}));var nu=Object.defineProperty,ru=(t,e,n)=>e in t?nu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xn=(t,e,n)=>(ru(t,typeof e!="symbol"?e+"":e,n),n);class ou extends Re{constructor(){super(...arguments),Xn(this,"currentKey",""),Xn(this,"tabItems",[]),Xn(this,"activeTab","")}}class is extends oe{createState(){var e;return new ou((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,Ai(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 ss(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Yn=B({name:"IBizNavTabs",props:{modelData:{type:Object,required:!0},controller:{type:is,required:!0}},setup(t){const e=_("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 j(()=>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},ss(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:()=>[N("\u66F4\u591A "),a("ion-icon",{name:"arrow-down"},null)]}),dropdown:()=>{let n;return a(d("el-dropdown-menu"),null,ss(n=this.actions.map(r=>a(d("el-dropdown-item"),{command:r},{default:()=>[r.text]})))?n:{default:()=>[n]})}})])])}});var au=Object.defineProperty,iu=(t,e,n)=>e in t?au(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,su=(t,e,n)=>(iu(t,typeof e!="symbol"?e+"":e,n),n);class lu{constructor(){su(this,"component","IBizNavTabs")}async createController(e,n,r){const o=new is(e,n,r);return await o.init(),o}}const cu=M(Yn,function(t){t.component(Yn.name,Yn),le("RAWITEM_NAV_TABS",()=>new lu)});var uu=Object.defineProperty,du=(t,e,n)=>e in t?uu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ls=(t,e,n)=>(du(t,typeof e!="symbol"?e+"":e,n),n);class pu extends Re{constructor(){super(...arguments),ls(this,"loading",!1),ls(this,"uiActionState")}}class Jn extends oe{createState(){var e;return new pu((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 Ua(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 Nt.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)}}O("ay",Jn);const Qn=B({name:"IBizPanelButton",props:{modelData:{type:Object,required:!0},controller:{type:Jn,required:!0}},setup(t){const e=_("panel-button"),{caption:n,captionItemName:r,renderMode:o,showCaption:i,sysImage:s,codeName:l,itemStyle:c}=t.modelData,{panel:u,state:p}=t.controller,h=A(()=>r&&u.data?u.data[r.toLowerCase()]:n);let v=!1;Object.is(o,"LINK")&&(v=!0);const g=A(()=>{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:h,buttonType:g,showCaption:i,sysImage:s,codeName:l,state:p,handleButtonClick:async m=>{try{p.loading=!0,await t.controller.onActionClick(m),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 hu=Object.defineProperty,mu=(t,e,n)=>e in t?hu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fu=(t,e,n)=>(mu(t,typeof e!="symbol"?e+"":e,n),n);class bu{constructor(){fu(this,"component","IBizPanelButton")}async createController(e,n,r){const o=new Jn(e,n,r);return await o.init(),o}}const vu=O("ax",M(Qn,function(t){t.component(Qn.name,Qn),le("BUTTON",()=>new bu)}));var gu=Object.defineProperty,Cu=(t,e,n)=>e in t?gu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,He=(t,e,n)=>(Cu(t,typeof e!="symbol"?e+"":e,n),n);class wu extends Re{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 yu=Object.defineProperty,Pu=(t,e,n)=>e in t?yu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Iu=(t,e,n)=>(Pu(t,typeof e!="symbol"?e+"":e,n),n);class Zn extends oe{constructor(){super(...arguments),Iu(this,"captionSplit","|")}createState(){var e;return new wu((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)}}O("aA",Zn);const er=B({name:"IBizPanelAppTitle",props:{modelData:{type:Object,required:!0},controller:{type:Zn,required:!0}},setup(t){const e=_("panel-app-title"),n=t.controller,r=Le(),o=$e(),i=ht("ctx",void 0),s=A(()=>i?.view&&i.view.model.mainMenuAlign||"LEFT"),l=async()=>{if(i?.view){const p=ln(r);p.pathNodes=p.pathNodes.slice(0,1);const h=jo(p);o.push({path:h}),setTimeout(()=>{window.location.reload()})}t.controller.onClick()},c=A(()=>s.value==="LEFT"),u=A(()=>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 Eu=Object.defineProperty,Du=(t,e,n)=>e in t?Eu(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","IBizPanelAppTitle")}async createController(e,n,r){const o=new Zn(e,n,r);return await o.init(),o}}const Su=O("az",M(er,function(t){t.component(er.name,er),le("RAWITEM_APP_APPTITLE",()=>new Bu)}));function cs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const tr=B({name:"IBizPanelAppHeader",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){const e=_("panel-app-header"),{showCaption:n,titleBarCloseMode:r,id:o}=t.modelData,i=r!==0,s=D(r===2),l=()=>{i&&(s.value=!s.value)},c=A(()=>{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},cs(n=r.map(i=>{const s=i.props;return!s||!s.controller?i:a(d("iBizCol"),{layoutPos:s.modelData.layoutPos,state:s.controller.state},cs(i)?i:{default:()=>[i]})}))?n:{default:()=>[n]});return a("div",{class:this.classArr},[o])}});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,xu=(t,e,n)=>(Fu(t,typeof e!="symbol"?e+"":e,n),n);class Ou{constructor(){xu(this,"component","IBizPanelAppHeader")}async createController(e,n,r){const o=new oe(e,n,r);return await o.init(),o}}const Tu=M(tr,function(t){t.component(tr.name,tr),le("CONTAINER_AppHeader",()=>new Ou)});function us(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const nr=B({name:"IBizPanelViewHeader",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){const e=_("panel-view-header"),{showCaption:n,titleBarCloseMode:r,id:o}=t.modelData,i=r!==0,s=D(r===2),l=()=>{i&&(s.value=!s.value)},c=A(()=>{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},us(n=r.map(i=>{const s=i.props;return!s||!s.controller?i:a(d("iBizCol"),{layoutPos:s.modelData.layoutPos,state:s.controller.state},us(i)?i:{default:()=>[i]})}))?n:{default:()=>[n]});return a("div",{class:this.classArr},[o])}});var Nu=Object.defineProperty,zu=(t,e,n)=>e in t?Nu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ru=(t,e,n)=>(zu(t,typeof e!="symbol"?e+"":e,n),n);class $u{constructor(){Ru(this,"component","IBizPanelViewHeader")}async createController(e,n,r){const o=new oe(e,n,r);return await o.init(),o}}const Lu=M(nr,function(t){t.component(nr.name,nr),le("CONTAINER_ViewHeader",()=>new $u)});function ds(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const rr=B({name:"IBizPanelExpHeader",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){const e=_("panel-exp-header"),{showCaption:n,titleBarCloseMode:r,id:o}=t.modelData,i=r!==0,s=D(r===2),l=()=>{i&&(s.value=!s.value)},c=A(()=>{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},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},[o])}});var Mu=Object.defineProperty,Vu=(t,e,n)=>e in t?Mu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ju=(t,e,n)=>(Vu(t,typeof e!="symbol"?e+"":e,n),n);class ku{constructor(){ju(this,"component","IBizPanelExpHeader")}async createController(e,n,r){const o=new oe(e,n,r);return await o.init(),o}}const Uu=M(rr,function(t){t.component(rr.name,rr),le("CONTAINER_Exp_Header",()=>new ku)});function ps(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const or=B({name:"IBizPanelViewContent",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){const e=_("panel-view-content"),{showCaption:n,titleBarCloseMode:r,id:o}=t.modelData,i=r!==0,s=D(r===2),l=()=>{i&&(s.value=!s.value)},c=A(()=>{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},ps(n=r.map(i=>{const s=i.props;return!s||!s.controller?i:a(d("iBizCol"),{layoutPos:s.modelData.layoutPos,state:s.controller.state},ps(i)?i:{default:()=>[i]})}))?n:{default:()=>[n]});return a("div",{class:this.classArr},[o])}});var Gu=Object.defineProperty,qu=(t,e,n)=>e in t?Gu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wu=(t,e,n)=>(qu(t,typeof e!="symbol"?e+"":e,n),n);class Hu{constructor(){Wu(this,"component","IBizPanelViewContent")}async createController(e,n,r){const o=new oe(e,n,r);return await o.init(),o}}const Ku=M(or,function(t){t.component(or.name,or),le("CONTAINER_VIEWCONTENT",()=>new Hu)});function hs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const ar=B({name:"IBizPanelTabPanel",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){const e=_("panel-tab-panel"),n=A(()=>{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},hs(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},hs(i)?i:{default:()=>[i]})}))?r:{default:()=>[r]})}});var Xu=Object.defineProperty,Yu=(t,e,n)=>e in t?Xu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ju=(t,e,n)=>(Yu(t,typeof e!="symbol"?e+"":e,n),n);class Qu{constructor(){Ju(this,"component","IBizPanelTabPanel")}async createController(e,n,r){const o=new oe(e,n,r);return await o.init(),o}}const Zu=O("aB",M(ar,function(t){t.component(ar.name,ar),le("TABPANEL",()=>new Qu)}));function ms(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const ir=B({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){const e=_("panel-tab-page"),n=A(()=>{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},ms(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},ms(o)?o:{default:()=>[o]})}))?n:{default:()=>[n]})}});var ed=Object.defineProperty,td=(t,e,n)=>e in t?ed(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nd=(t,e,n)=>(td(t,typeof e!="symbol"?e+"":e,n),n);class rd{constructor(){nd(this,"component","IBizPanelTabPage")}async createController(e,n,r){const o=new oe(e,n,r);return await o.init(),o}}const od=O("aC",M(ir,function(t){t.component(ir.name,ir),le("TABPAGE",()=>new rd)}));var ad=Object.defineProperty,id=(t,e,n)=>e in t?ad(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sr=(t,e,n)=>(id(t,typeof e!="symbol"?e+"":e,n),n);class lr extends oe{constructor(){super(...arguments),sr(this,"splitMode","horizontal"),sr(this,"splitValue",.5),sr(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)}}O("aD",lr);const cr=B({name:"IBizSplitContainer",props:{modelData:{type:Object,required:!0},controller:{type:lr,required:!0}},setup(t){const e=_("split-container"),{id:n}=t.modelData,r=A(()=>{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 sd=Object.defineProperty,ld=(t,e,n)=>e in t?sd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cd=(t,e,n)=>(ld(t,typeof e!="symbol"?e+"":e,n),n);class fs{constructor(){cd(this,"component","IBizSplitContainer")}async createController(e,n,r){const o=new lr(e,n,r);return await o.init(),o}}const ud=O("aE",M(cr,function(t){t.component(cr.name,cr),le("CONTAINER_CONTAINER_H_SPLIT",()=>new fs),le("CONTAINER_CONTAINER_V_SPLIT",()=>new fs)})),ur=B({name:"IBizPanelIndexViewSearch",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){const e=_("panel-index-view-search"),n=t.controller,r=D(""),o=et(()=>{},500),i=p=>{r.value=p,o()},s=ht("ctx",void 0),l=A(()=>s?.view&&s.view.model.mainMenuAlign||"LEFT"),c=A(()=>n.panel.view.state.isCollapse),u=A(()=>{const{id:p}=t.modelData,h=[e.b(),e.m(p),e.is("collapse",c.value)];return h.push(...t.controller.containerClass),h});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 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","IBizPanelIndexViewSearch")}async createController(e,n,r){const o=new oe(e,n,r);return await o.init(),o}}const fd=O("aF",M(ur,function(t){t.component(ur.name,ur),le("RAWITEM_INDEX_VIEW_SEARCH",()=>new md)}));class bd extends Re{}class bs extends oe{createState(){var e;return new bd((e=this.parent)==null?void 0:e.state)}}function vs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const dr=B({name:"IBizPanelAppLoginView",props:{modelData:{type:Object,required:!0},controller:{type:bs,required:!0}},setup(t){const e=_("panel-app-login-view"),{id:n}=t.modelData,r=A(()=>{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},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,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?a("style",{type:"text/css"},[this.controller.model.cssStyle]):null,o])}});var vd=Object.defineProperty,gd=(t,e,n)=>e in t?vd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cd=(t,e,n)=>(gd(t,typeof e!="symbol"?e+"":e,n),n);class wd{constructor(){Cd(this,"component","IBizPanelAppLoginView")}async createController(e,n,r){const o=new bs(e,n,r);return await o.init(),o}}const yd=M(dr,function(t){t.component(dr.name,dr),le("CONTAINER_APPLOGINVIEW",()=>new wd)});class Pd extends Re{}class gs extends oe{createState(){var e;return new Pd((e=this.parent)==null?void 0:e.state)}}const pr=B({name:"IBizPanelRememberMe",props:{modelData:{type:Object,required:!0},controller:{type:gs,required:!0}},setup(t){const e=_("panel-remember-me"),{id:n}=t.modelData,r=t.controller,o=A(()=>{let s=[e.b(),e.m(n)];return s=[...s,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],s}),i=A({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 Id=Object.defineProperty,Ed=(t,e,n)=>e in t?Id(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dd=(t,e,n)=>(Ed(t,typeof e!="symbol"?e+"":e,n),n);class _d{constructor(){Dd(this,"component","IBizPanelRememberMe")}async createController(e,n,r){const o=new gs(e,n,r);return await o.init(),o}}const Bd=M(pr,function(t){t.component(pr.name,pr),le("CONTAINER_REMEMBER_ME",()=>new _d)});function Cs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const hr=B({name:"IBizIndexActions",props:{modelData:{type:Object,required:!0},controller:{type:cn,required:!0}},setup(t){const e=_("index-actions"),{id:n}=t.modelData,r=A(()=>{let i=[e.b(),e.m(n)];return i=[...i,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],i}),o=A(()=>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},Cs(n=r.map(i=>{const s=i.props;return!s||!s.controller?i:a(d("iBizCol"),{layoutPos:s.modelData.layoutPos,state:s.controller.state},Cs(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","IBizIndexActions")}async createController(e,n,r){const o=new cn(e,n,r);return await o.init(),o}}const Od=O("aG",M(hr,function(t){t.component(hr.name,hr),le("CONTAINER_INDEX_ACTIONS",()=>new xd)}));class Td extends Re{}class ws extends oe{createState(){var e;return new Td((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 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","IBizPanelContainerGroup")}async createController(e,n,r){const o=new ws(e,n,r);return await o.init(),o}}function ys(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const mr=B({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:ws,required:!0}},setup(t){const e=_("panel-container-group"),n=D(!t.controller.defaultExpansion),r=()=>{t.controller.disableClose||(n.value=!n.value)},o=A(()=>{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},ys(n=o.map(l=>{const c=l.props;return!c||!c.controller?l:a(d("iBizCol"),{layoutPos:c.modelData.layoutPos,state:c.controller.state},ys(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])])}}),Ld=M(mr,function(t){t.component(mr.name,mr),le("CONTAINER_CONTAINER_GROUP",()=>new $d)}),Md={10:"\u672A\u5F00\u59CB",20:"\u6267\u884C\u4E2D",30:"\u5DF2\u6267\u884C",40:"\u6267\u884C\u5931\u8D25"},Vd={10:"info",20:"",30:"success",40:"danger"},Ps=B({name:"IBizAsyncAction",props:{message:{type:Object,required:!0}},setup(){return{ns:_("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,N("\uFF08"),o,N("%\uFF09")]):a("div",{class:this.ns.e("begin-time")},[n])]),a("div",{class:this.ns.b("right")},[a(d("el-tag"),{type:Vd[e]},{default:()=>[Md[e]]})])])}});function jd(t){ibiz.net.request(t.url,{method:"get",responseType:"blob",baseURL:""}).then(e=>{const n=Me.parse(e.headers["content-disposition"],{delimiter:";"}).filename;if(n&&(t.name+=`.${n.split(".")[1]}`),e.status!==200)throw new de("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");if(e.data){const r=t.name;Ct(e.data,r)}else throw new de("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728")})}const kd=B({name:"IBizAsyncActionPreview",props:{asyncAction:{type:Object,required:!0},modal:{type:Object,required:!0}},setup(t){const e=_("async-action-preview"),n=()=>{t.modal.dismiss()},r=pe({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 de("\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:()=>{jd({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:()=>[N("\u4E0B\u8F7D\u9519\u8BEF\u6587\u4EF6")]}),a(d("el-button"),{onClick:this.onClose},{default:()=>[N("\u5173\u95ED")]})])]),a("div",{class:this.ns.b("time")},[a(d("el-form-item"),{label:"\u5BFC\u5165\u65F6\u95F4: "},{default:()=>[this.info.beginTime,N(" ~ "),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")},[N("\u9519\u8BEF")]),a("div",{class:this.ns.be("detail-item","error-reason")},[t.reason])])]))])])}});var Ud=Object.defineProperty,Gd=(t,e,n)=>e in t?Ud(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qd=(t,e,n)=>(Gd(t,typeof e!="symbol"?e+"":e,n),n);class Wd{constructor(){qd(this,"component","IBizAsyncAction")}onClick(e,n){ibiz.overlay.modal(r=>ne(kd,{asyncAction:e,modal:r}),{},{width:"80%",height:"80%"})}}const fr=B({name:"IBizUserMessage",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){const e=_("user-message"),n=t.controller,r=D(!1),o=D("notification"),i=t.modelData.sysImage||{imagePath:"svg/message.svg"},{appStore:s}=ko(),l=D(0),c=A(()=>{const g=s.recentAsyncActions.length+l.value;return s.allAsyncActions.filter((b,m)=>m<g)}),u=()=>{l.value=0},p=()=>{l.value+=10},h=D();return{ns:e,c:n,popoverRef:h,showPopover:r,sysImage:i,currentTab:o,appStore:s,actualMsgs:c,onMsgClick:g=>{h.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=Ga(n.actiontype);return r?ne(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")},[N("\u5F02\u6B65\u64CD\u4F5C\u7C7B\u578B"),n.actiontype,N("\u6682\u672A\u652F\u6301")])}),this.actualMsgs.length===0&&a("div",{class:this.ns.e("nodata")},[N("\u6682\u65E0\u901A\u77E5")]),t>0&&a("div",{class:this.ns.e("load-more"),onClick:this.showMoreHistory},[e])]})]})})])}});var Hd=Object.defineProperty,Kd=(t,e,n)=>e in t?Hd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xd=(t,e,n)=>(Kd(t,typeof e!="symbol"?e+"":e,n),n);class Yd{constructor(){Xd(this,"component","IBizUserMessage")}async createController(e,n,r){const o=new oe(e,n,r);return await o.init(),o}}const Jd=M(fr,function(t){t.component(fr.name,fr),t.component(Ps.name,Ps),qa("DEIMPORTDATA2",()=>new Wd),le("RAWITEM_USERMESSAGE",()=>new Yd)});var Qd=Object.defineProperty,Zd=(t,e,n)=>e in t?Qd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ep=(t,e,n)=>(Zd(t,typeof e!="symbol"?e+"":e,n),n);class Is extends oe{constructor(){super(...arguments),ep(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 de("\u5F53\u524D\u89C6\u56FE\u91CC\u6CA1\u6709\u627E\u5230\u53EBsearchform\u7684\u641C\u7D22\u8868\u5355");this.searchFrom=e}onSearchButtonClick(){Nt.execAndResolved("search",{context:this.panel.context,params:this.panel.params,data:[],view:this.panel.view})}onResetButtonClick(){Nt.execAndResolved("reset",{context:this.panel.context,params:this.panel.params,data:[],view:this.panel.view})}}const br=B({name:"IBizSearchFormButtons",props:{modelData:{type:Object,required:!0},controller:{type:Is,required:!0}},setup(t){const e=_("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:()=>[N("\u641C\u7D22")]}):a(d("el-dropdown"),{"split-button":!0,type:"primary",onClick:this.onSearchButtonClick},{default:()=>a("span",{class:this.ns.b("label")},[N("\u641C\u7D22")]),dropdown:()=>a(d("el-dropdown-menu"),null,{default:()=>[a(d("el-dropdown-item"),{onClick:this.onResetButtonClick},{default:()=>[N("\u91CD\u7F6E")]}),a(d("el-dropdown-item"),{onClick:this.saveFilterConfirm},{default:()=>[N("\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 tp=Object.defineProperty,np=(t,e,n)=>e in t?tp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rp=(t,e,n)=>(np(t,typeof e!="symbol"?e+"":e,n),n);class op{constructor(){rp(this,"component","IBizSearchFormButtons")}async createController(e,n,r){const o=new Is(e,n,r);return await o.init(),o}}const ap=M(br,function(t){t.component(br.name,br),le("RAWITEM_SEARCHFORM_BUTTONS",()=>new op)}),ip=O("as",{install:t=>{t.use(Uo),t.use(Go),t.use(qo),t.use(Wc),t.use(tu),t.use(cu),t.use(vu),t.use(Wo),t.use(Su),t.use(Ho),t.use(Ko),t.use(Xo),t.use(Tu),t.use(Lu),t.use(Uu),t.use(Yo),t.use(Ku),t.use(Jo),t.use(Zu),t.use(od),t.use(ud),t.use(fd),t.use(yd),t.use(Bd),t.use(Od),t.use(Ld),t.use(Jd),t.use(Qo),t.use(ap)}});function sp(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}function Es(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=Es(e.appMenuItems)),o})}function Ds(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 _s(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?_s(!1,s,n,r,o,i):Ds(!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 vr=B({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=te((...g)=>new Wa(...g)),e=_(`control-${t.model.controlType.toLowerCase()}`),n=D(Es(t.model.appMenuItems)),r=D(""),o=D([]),i=Le();let s=null;const l=D({}),c=D(Oe()),u=()=>{const g=t.getAllItems(),b=ibiz.hub.getApp(t.context.srfappid);return g.find(m=>{var f,w;if(m.itemType==="MENUITEM"&&m.appFuncId){const I=b.getAppFunc(m.appFuncId);return((w=(f=I?.appViewId)==null?void 0:f.split("."))==null?void 0:w[1])===i.params.view2}return!1})},p=async(g,b)=>{const m=u();m?.id!==g&&await t.onClickMenuItem(g,b)};j(()=>i.params.view2,(g,b)=>{if(g!==b&&ibiz.config.appMenu.enableEcho){const m=u();r.value=m?m.id:""}}),Ie(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 m=g.filter(w=>w.expanded&&!w.hidden);m.length>0&&m.forEach(w=>{o.value.push(w.id)});const f=t.model.appCounterRefId;f&&(s=t.getCounter(f),s&&s.onChange(w=>{l.value=w}))}),ze(()=>{s?.destroy()});const h=A(()=>{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=A(()=>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:h,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},sp(t=this.menus.map(e=>{var n;return((n=e.children)==null?void 0:n.length)>0?_s(!0,e,this.collapse,this.ns,this.c,this.counterData):Ds(!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 lp=Object.defineProperty,cp=(t,e,n)=>e in t?lp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,up=(t,e,n)=>(cp(t,typeof e!="symbol"?e+"":e,n),n);class dp{constructor(){up(this,"component","IBizAppMenuControl")}}const pp=O("l",M(vr,function(t){t.component(vr.name,vr),re(Q.APP_MENU,()=>new dp)}));var hp=Object.defineProperty,mp=(t,e,n)=>e in t?hp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fp=(t,e,n)=>(mp(t,typeof e!="symbol"?e+"":e,n),n);class bp{constructor(){fp(this,"component","IBizAppMenuIconViewControl")}}function Bs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const gr=B({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=te((...c)=>new hn(...c)),n=_(`control-${e.model.controlType.toLowerCase()}-iconview`),r=D(""),o=D([]);(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:h=>{c.appFuncId&&i(c.id,h)}},[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(h=>s(h))]}}):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},Bs(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},Bs(r)?r:{default:()=>[r]})}}),vp=O("m",M(gr,function(t){t.component(gr.name,gr),re(`${Q.APP_MENU}_ICONVIEW`,()=>new bp)})),Cr=B({name:"IBizGridFieldColumn",props:{controller:{type:mn,required:!0},row:{type:Ye,required:!0}},setup(t){const e=_("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=A(()=>t.controller.getCustomHtml(t.row)),i=A(()=>t.row.data[t.controller.model.codeName.toLowerCase()]),s=A(()=>t.controller.formatValue(i.value)),l=D(""),c=p=>{l.value=p},u=A(()=>{if(t.controller.grid.overflowMode==="ellipsis"&&Fi(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(){const t=this.controller;let e=null;return t.isCustomCode?e=a("span",{class:this.ns.e("script"),innerHTML:this.CustomHtml},null):t.codeList?e=a(d("iBizCodeList"),{class:this.ns.e("text"),codeListItems:t.codeListItems,codeList:t.codeList,value:this.fieldValue,onClick:this.onTextClick,onInfoTextChange:this.onInfoTextChange,title:this.tooltip},null):e=a("span",{class:this.ns.e("text"),title:this.tooltip,onClick:this.onTextClick},[this.formatValue,this.fieldValue!=null&&t.model.unitName]),a("div",{class:[this.ns.b(),t.clickable(this.row)&&this.ns.m("clickable"),this.ns.m(this.controller.grid.overflowMode)],onClick:this.onCellClick},[e])}});var gp=Object.defineProperty,Cp=(t,e,n)=>e in t?gp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wp=(t,e,n)=>(Cp(t,typeof e!="symbol"?e+"":e,n),n);class yp{constructor(){wp(this,"component","IBizGridFieldColumn")}async createController(e,n){const r=new mn(e,n);return await r.init(),r}}const Pp=O("q",M(Cr,function(t){t.component(Cr.name,Cr),mt("DEFGRIDCOLUMN",()=>new yp)})),wr=B({name:"IBizGridUAColumn",props:{controller:{type:fn,required:!0},row:{type:Ye,required:!0}},setup(t){return{ns:_("grid-ua-column"),onStopPropagation:o=>{o.stopPropagation()},onActionClick:async(o,i)=>{await t.controller.onActionClick(o,t.row,i)}}},render(){var t,e;return a("div",{class:this.ns.b(),onDblclick:this.onStopPropagation,onClick:this.onStopPropagation},[((e=(t=this.controller.model.deuiactionGroup)==null?void 0:t.uiactionGroupDetails)==null?void 0:e.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 Ip=Object.defineProperty,Ep=(t,e,n)=>e in t?Ip(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dp=(t,e,n)=>(Ep(t,typeof e!="symbol"?e+"":e,n),n);class _p{constructor(){Dp(this,"component","IBizGridUAColumn")}async createController(e,n){const r=new fn(e,n);return await r.init(),r}}const Bp=O("r",M(wr,function(t){t.component(wr.name,wr),mt("UAGRIDCOLUMN",()=>new _p)}));function Sp(t,e){const n=t.controller,r=A(()=>t.row.editColStates[n.fieldName].disabled),o=A(()=>t.row.editColStates[n.fieldName].readonly),i=A(()=>!!t.row.errors[n.fieldName]),s=A(()=>t.row.editColStates[n.fieldName].editable),l=E=>{t.row.editColStates[n.fieldName].editable=E},c=A(()=>!r.value&&!o.value&&!i.value),u=A(()=>i.value||c.value&&s.value),p=A(()=>!u.value),h=!1,v=!0,g=A(()=>c.value&&!s.value),b=A(()=>c.value);let m;const f=()=>{l(!0),m=Zo(e,async E=>{l(!1),m.stop()})},w=()=>{m&&m.stop(),ibiz.log.debug(`${n.fieldName}\u5C5E\u6027\u7F16\u8F91\u5668focus\u4E8B\u4EF6`)},I=()=>{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)},S=pe({showEditMask:g,stopPropagation:b,onMaskClick:f}),y=pe({autoFocus:v,disabled:h,readonly:p,onBlur:I,onFocus:w});return{gridEditItemProps:S,editorProps:y}}function Ap(t,e){const n=t.controller,r=A(()=>t.row.editColStates[n.fieldName].disabled),o=A(()=>t.row.editColStates[n.fieldName].readonly),i=A(()=>t.row.editColStates[n.fieldName].editable),s=A(()=>o.value||!i.value),l=A(()=>i.value&&r.value),c=A(()=>i.value),u=pe({stopPropagation:c}),p=pe({disabled:l,readonly:s});return{gridEditItemProps:u,editorProps:p}}function Fp(t,e){const n=t.controller,r=A(()=>t.row.editColStates[n.fieldName].disabled),o=A(()=>t.row.editColStates[n.fieldName].readonly),i=A(()=>t.controller.grid.state.rowEditOpen),s=A(()=>o.value||!i.value),l=A(()=>i.value&&r.value),c=A(()=>i.value),u=()=>{n.grid.save(t.row.data)},p=pe({stopPropagation:c}),h=pe({disabled:l,readonly:s,onBlur:u});return{gridEditItemProps:p,editorProps:h}}const yr=B({name:"GridFieldEditColumn",props:{controller:{type:bn,required:!0},row:{type:Ye,required:!0}},setup(t){const e=_("grid-field-edit-column"),n=D(),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 Sp(t,n);case"row":return Ap(t);case"all":return Fp(t);default:throw new de(`${ibiz.config.grid.editShowMode}\u6682\u672A\u652F\u6301`)}},{gridEditItemProps:l,editorProps:c}=s(),u=D(void 0),p=v=>{u.value=v},h=A(()=>{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:h,rowDataChange:i,onInfoTextChange:p,gridEditItemProps:l,editorProps:c}},render(){const t=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)],...this.gridEditItemProps},{default:()=>[this.c.editorProvider&&ne(d(this.c.editorProvider.gridEditor),{class:this.ns.e("editor"),value:this.editorProps.readonly?this.c.formatValue(t):t,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 xp=Object.defineProperty,Op=(t,e,n)=>e in t?xp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Tp=(t,e,n)=>(Op(t,typeof e!="symbol"?e+"":e,n),n);class Np{constructor(){Tp(this,"component","GridFieldEditColumn")}async createController(e,n){const r=new bn(e,n);return await r.init(),r}}const Ss=B({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=_("grid-edit-item"),r=l=>{t.stopPropagation&&l.stopPropagation()},o=l=>{t.stopPropagation&&l.stopPropagation(),t.showEditMask&&e("maskClick",l)},i=A(()=>t.error),s=A(()=>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)])]}})])}}),zp=O("s",M(yr,function(t){t.component(yr.name,yr),t.component(Ss.name,Ss),mt("DEFGRIDCOLUMN_EDIT",()=>new Np)})),Rp=B({name:"IBizGridGroupColumn",props:{controller:{type:vn,required:!0},row:{type:Ye,required:!0}},setup(){return{ns:_("grid-group-column")}},render(){return a("div",{class:[this.ns.b()]},null)}});var $p=Object.defineProperty,Lp=(t,e,n)=>e in t?$p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mp=(t,e,n)=>(Lp(t,typeof e!="symbol"?e+"":e,n),n);class Vp{constructor(){Mp(this,"component","")}async createController(e,n){const r=new vn(e,n);return await r.init(),r}}const jp=O("t",M(Rp,()=>{mt("GROUPGRIDCOLUMN",()=>new Vp)})),As=B({name:"IBizRowEditPopover",props:{show:{type:Boolean,default:!1}},emits:{confirm:()=>!0,cancel:()=>!0},setup(t,{emit:e}){const n=_("row-edit-popover"),r=()=>{e("cancel")},o=()=>{e("confirm")},i=D(document);return ea(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:()=>[N("\u786E\u5B9A")]}),a(d("el-button"),{onClick:this.onCancel},{default:()=>[N("\u53D6\u6D88")]})])}});function Pr(t){const e=D();let n=!1;async function r(c,u,p){if(ibiz.config.grid.editShowMode==="row"&&t.model.enableRowEdit){const h=t.findRowState(c);h&&h.showRowEdit!==!0&&await t.switchRowEdit(h,!0)}else t.onRowClick(c)}function o(c){t.onDbRowClick(c)}function i(c){n||t.setSelection(c)}j([()=>e.value,()=>t.state.isLoaded,()=>t.state.selectedData],([c,u,p])=>{!u||!c||(t.state.singleSelect?p[0]?e.value.setCurrentRow(p[0],!0):e.value.setCurrentRow():(n=!0,e.value.clearSelection(),p.forEach(h=>e.value.toggleRowSelection(h,!0)),n=!1))});function s(c){const{prop:u,order:p}=c,h=t.fieldColumns[u].model.appDEFieldId;let v;p==="ascending"?v="asc":p==="descending"&&(v="desc"),t.setSort(h,v),t.load()}function l({row:c}){let u="";t.state.selectedData.length>0&&t.state.selectedData.forEach(h=>{h===c&&(u="current-row")});const p=t.findRowState(c);return p?.showRowEdit&&(u+=" editing-row"),c.srfkey&&(u+=` id-${c.srfkey}`),u}return{tableRef:e,onRowClick:r,onDbRowClick:o,onSelectionChange:i,onSortChange:s,handleRowClassName:l}}function Fs(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 Ir(t,e){const n=()=>{e.data&&(t.state.items=e.data,t.state.rows=e.data.map(l=>new Ye(new zt(l),t)))},r=A(()=>{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)}),j(()=>e.data,()=>{e.isSimple&&n()},{deep:!0});const o=A(()=>{const l=t.state;if(t.model.enableGroup){const c=[];return l.groups.forEach(u=>{if(!u.children.length)return;const p=[...u.children],h=p.shift();c.push({srfkey:h?.srfkey||u.caption,isGroupData:!0,caption:u.caption,first:h,children:p})}),c}return l.rows.map(c=>c.data)}),i=A(()=>{if(t.isMultistageHeader)return t.model.degridColumns||[];const l=[];return t.state.columnStates.forEach(c=>{var u,p;if(c.hidden)return;const h=((u=t.fieldColumns[c.key])==null?void 0:u.model)||((p=t.uaColumns[c.key])==null?void 0:p.model);h&&l.push(h)}),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 xs(t,e){let n;const r=D(!1),o=D(),i=pe({}),s=h=>{if(!t.value)throw new de("\u627E\u4E0D\u5230\u8868\u683C\u7EC4\u4EF6\u5F15\u7528");const v=t.value.$el;let g=".el-table__row";h.data.srfkey&&(g+=`.id-${h.data.srfkey}`);const b=v.querySelector(g);if(!b)throw new de("\u627E\u4E0D\u5230\u5BF9\u5E94\u7684\u8868\u683C\u884Cdom\u5143\u7D20");return b},l=async h=>{const v=s(h);if(!n)throw new de("\u62FF\u4E0D\u5230pop\u7EC4\u4EF6\u7684\u5B9E\u4F8B");const g=n.$el,{x:b,y:m}=await Un(v,g,{placement:"bottom"});Object.assign(i,{top:`${m}px`,left:`${b}px`}),o.value=h,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 h=r.value&&e.state.rows[e.state.rows.length-1].showRowEdit;return[a("div",{class:"row-edit-popover__placeholder",style:{display:h?"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",h=>{h.row.showRowEdit?setTimeout(()=>{l(h.row)},0):(o.value=void 0,r.value=!1,Object.assign(i,{top:void 0,left:void 0}))}),{renderPopover:p}}var kp=Object.defineProperty,Up=(t,e,n)=>e in t?kp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Er=(t,e,n)=>(Up(t,typeof e!="symbol"?e+"":e,n),n);class Gp{constructor(){Er(this,"count",0),Er(this,"countRedirect",0),Er(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(){}}O("aS",Gp);class qp{info(e,n,r){wt.info({message:e,duration:n&&n*1e3,showClose:r})}success(e,n,r){wt.success({message:e,duration:n&&n*1e3,showClose:r})}warning(e,n,r){wt.warning({message:e,duration:n&&n*1e3,showClose:r})}error(e,n,r){wt.error({message:e,duration:n&&n*1e3,showClose:r})}}O("aT",qp);class Wp{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))})}}O("aU",Wp);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,"ns",new Ni("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))})}}O("aV",Yp);var Jp=Object.defineProperty,Qp=(t,e,n)=>e in t?Jp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Os=(t,e,n)=>(Qp(t,typeof e!="symbol"?e+"":e,n),n);class Zp{constructor(){Os(this,"callStack",[]),Os(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()}}O("aW",Zp);class eh{constructor(e){this.router=e}push(e){return lt.open(this.router,e)}async root(e,n,r){const o=await ibiz.hub.config.view.get(e),{path:i}=await ta(o,this.router.currentRoute.value,n,r);return lt.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 na({context:n,params:r,viewId:o.id},i)}async popover(e,n,r,o){const i=await ibiz.hub.config.view.get(e);return ra(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=oa(o.openMode),s={width:o.width,height:o.height,placement:i};return aa({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}}O("aX",eh);async function th(t,e,n,r){const o=[Ui(r.offsetOpts||6),Gi(),qi()];r.noArrow||o.push(Wi({element:n}));const i=await Un(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:h,y:v}=u.arrow,g={top:"bottom",right:"left",bottom:"top",left:"right"}[c.split("-")[0]];Object.assign(n.style,{left:h!=null?`${h}px`:"",top:v!=null?`${v}px`:"",right:"",bottom:"",[g]:"-4px"})}}}const nh=B({props:{opts:{type:Object,default:()=>({})}},setup(t,e){const n=_("popover"),r=D(!1),o=D(!1),i=D(),s=D(),l=A(()=>t.opts.autoClose===!0&&o.value===!1),{zIndex:c}=ke(),u=c.increment();function p(y){y.stopPropagation(),o.value=!0}function h(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 m(y){y.stopPropagation(),l.value&&!g&&b()}function f(){window.addEventListener("mousedown",m,{capture:!0}),window.addEventListener("blur",m,{capture:!0}),window.addEventListener("resize",m,{capture:!0})}function w(){window.removeEventListener("mousedown",m,{capture:!0}),window.removeEventListener("blur",m,{capture:!0}),window.removeEventListener("resize",m,{capture:!0})}f();let I=()=>{};ze(()=>{w(),I()});async function S(y){r.value=!0;const E=()=>th(y,i.value,s.value,t.opts);I=ki(y,i.value,E)}return{ns:n,el:i,arrEl:s,isShow:r,isHover:o,modal:v,popoverZIndex:u,present:S,dismiss:b,onMouseenter:p,onMouseleave:h}},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 rh(t,e){return new ia(nh,t,e)}const oh=B({props:{opts:{type:Object,default:()=>({})}},setup(t,e){const n=_("modal"),r=D(!1);let o;const{zIndex:i}=ke(),s=i.increment(),l=pe({}),{width:c,height:u}=t.opts;c&&(l.width=vt(c)?`${c}px`:c),u&&(l.height=vt(u)?`${u}px`:u);const p=D({footerHide:!0,modalClass:""});t.opts&&Object.assign(p.value,t.opts);const h=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:h,present:()=>{r.value=!0},dismiss:f=>{h.dismiss(f)},onClosed:()=>{e.emit("dismiss",o)},onBeforeClose:async f=>{await h.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 ah(t,e){return new Ft(oh,t,e)}const ih=B({props:{opts:{type:Object,default:()=>({})}},setup(t,e){const n=_("drawer"),r=D(!1);let o;const{zIndex:i}=ke(),s=i.increment(),l=D("100%"),{width:c,height:u,placement:p}=t.opts;(p==="top"||p==="bottom")&&(vt(u)?l.value=u:l.value="100%"),(p==="left"||p==="right")&&(vt(c)?l.value=c:l.value=800);const h=new Ge({mode:qe.DRAWER,viewUsage:2,dismiss:w=>{i.decrement(),r.value=!1,o=w}}),v=async w=>{await h.dismiss()&&w()},g=w=>{h.dismiss(w)},b=()=>{r.value=!0},m=()=>{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:h,dismiss:g,present:b,onClosed:m,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 sh(t,e){return new Ft(ih,t,e)}const lh=B({props:{opts:{type:Object,default:()=>({})}},setup(t,e){const n=_("float-window"),r=D(),o=D(!1);let i;const{zIndex:s}=ke(),l=s.increment(),c=D({width:500,height:600,x:100,y:100});t.opts&&Object.assign(c.value,t.opts);const u=pe({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}),h=()=>{Object.assign(r.value,p())};Ie(()=>{const f=r.value.getElementsByClassName(n.b("drag-handle")),w=f[0]?f[0]:r.value;tt(w).draggable({modifiers:[tt.modifiers.restrictRect({restriction:document.body,endOnly:!0})],cursorChecker:()=>"move",listeners:{move:I=>{u.x+=I.dx,u.y+=I.dy,h()}}}),tt(r.value).resizable({edges:{top:!0,right:!0,bottom:!0,left:!0},margin:6,modifiers:[tt.modifiers.restrictEdges({outer:document.body}),tt.modifiers.restrictSize({min:{width:u.minWidth,height:u.minHeight}})],inertia:!0,listeners:{move:I=>{u.x+=I.deltaRect.left,u.y+=I.deltaRect.top,u.width=I.rect.width,u.height=I.rect.height,h()}}})});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),N("+")])])}});function ch(t,e){return new Ft(lh,t,e)}function kt(t){return xi(t)?d(t):t}class uh{popover(e,n,r,o){const i=this.createPopover(n,r,o);return i.present(e),i.onWillDismiss()}createPopover(e,n,r){return rh(gt(e)?e:()=>ne(kt(e),{...n}),r)}drawer(e,n,r){const o=this.createDrawer(e,n,r);return o.present(),o.onWillDismiss()}createDrawer(e,n,r){return sh(gt(e)?e:()=>ne(kt(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 ah(gt(e)?e:()=>ne(kt(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(gt(e)?e:()=>ne(kt(e),{...n}),r)}}O("aY",uh);function Ut(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 dh(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(h=>h.key===i),p=l.isAdaptiveColumn||!t.hasAdaptiveColumn&&r===n.length-1?"min-width":"width";return a(d("el-table-column"),Tt({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:h})=>{let v=h;h.isGroupData&&(v=h.first);const g=t.findRowState(v);if(g){const b=d(t.providers[i].component);return ne(b,{controller:l,row:g,key:v.tempsrfkey+i})}return null}})}function Dr(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"),{label:e.caption,"min-width":l,align:c},{default:()=>s.map((u,p)=>Dr(t,u,n,p))})}return dh(t,e,n,r)}const _r=B({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=te((...I)=>new Ha(...I)),n=_(`control-${e.model.controlType.toLowerCase()}`),{tableRef:r,onRowClick:o,onDbRowClick:i,onSelectionChange:s,onSortChange:l,handleRowClassName:c}=Pr(e),{onPageChange:u,onPageRefresh:p,onPageSizeChange:h}=Ut(e),v=()=>{const{isLoaded:I}=e.state;return I&&a(d("iBizNoData"),{text:e.model.emptyText,emptyTextLanguageRes:e.model.emptyTextLanguageRes},null)},{tableData:g,renderColumns:b,defaultSort:m,summaryMethod:f}=Ir(e,t),{renderPopover:w}=xs(r,e);return{c:e,ns:n,tableRef:r,tableData:g,renderColumns:b,onDbRowClick:i,onRowClick:o,onSelectionChange:s,onSortChange:l,onPageChange:u,onPageSizeChange:h,onPageRefresh:p,handleRowClassName:c,renderNoData:v,summaryMethod:f,renderPopover:w,defaultSort:m}},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,"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)=>Dr(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,hh=(t,e,n)=>e in t?ph(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mh=(t,e,n)=>(hh(t,typeof e!="symbol"?e+"":e,n),n);class fh{constructor(){mh(this,"component","IBizGridControl")}}const bh=O("n",M(_r,t=>{t.component(_r.name,_r),t.component(As.name,As),t.use(Pp),t.use(Bp),t.use(zp),t.use(jp),re(Q.GRID,()=>new fh)}));function Ts(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Br=B({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=te((...b)=>new Ka(...b)),n=_(`control-${e.model.controlType.toLowerCase()}`),{onPageChange:r,onPageRefresh:o,onPageSizeChange:i}=Ut(e),s=A(()=>e.model.enablePagingBar===!0?!0:e.state.items.length>=e.state.total||e.state.isLoading||e.state.total<=e.state.size),l=(b,m)=>{const{context:f,params:w}=e,I=e.state.selectedData.findIndex(y=>y.srfkey===b.srfkey),S=[n.b("item"),n.is("active",I!==-1)];return a(d("iBizControlShell"),{class:S,data:b,modelData:m,context:f,params:w,onClick:()=>e.onRowClick(b),onDblclick:()=>e.onDbRowClick(b)},null)},c=b=>{const m=e.state.selectedData.findIndex(w=>w.srfkey===b.srfkey),f=[n.b("item"),n.is("active",m!==-1)];return a("div",{class:f,key:b.srfkey,onClick:()=>e.onRowClick(b),onDblclick:()=>e.onDbRowClick(b)},[`${Oi(b.srfmajortext)?"":b.srfmajortext}`])},u=b=>{const m=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=>m?l(f,m):c(f)):a("div",{class:n.bem("group-content","item","empty")},[N("\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 m;return[(m=e.state.groups)==null?void 0:m.map(f=>a("div",{class:[n.b("scroll-item")]},[u(f)]))]}});const b=t.modelData.itemLayoutPanel;return Xe(a("div",{class:[n.b("scroll"),n.b("content")],"infinite-scroll-distance":10,"infinite-scroll-disabled":s.value},[e.state.items.map(m=>a("div",{class:[n.b("scroll-item")]},[b?l(m,b):c(m)]))]),[[dt("infinite-scroll"),()=>e.loadMore()]])},h=()=>{var b;const m=(b=e.model.controls)==null?void 0:b.find(f=>f.name===`${e.model.name}_quicktoolbar`);if(m)return a(d("iBizToolbarControl"),{modelData:m,context:e.context,params:e.params},null)};return{c:e,ns:n,renderListContent:p,renderNoData:()=>{let b;const{isLoaded:m}=e.state;if(m)return m&&a(d("iBizNoData"),{class:n.b("content"),text:e.model.emptyText,emptyTextLanguageRes:e.model.emptyTextLanguageRes},Ts(b=h())?b:{default:()=>[b]})},renderBatchToolBar:()=>{var b;const m=(b=e.model.controls)==null?void 0:b.find(f=>f.name===`${e.model.name}_batchtoolbar`);if(m)return a("div",{class:n.b("batchtoolbar")},[a(d("iBizToolbarControl"),{modelData:m,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},Ts(e)?e:{default:()=>[e]})}});var vh=Object.defineProperty,gh=(t,e,n)=>e in t?vh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ch=(t,e,n)=>(gh(t,typeof e!="symbol"?e+"":e,n),n);class wh{constructor(){Ch(this,"component","IBizListControl")}}const yh=O("v",M(Br,function(t){t.component(Br.name,Br),re(Q.LIST,()=>new wh)})),Sr=B({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=te((...n)=>new Xa(...n)),e=_(`control-${t.model.controlType.toLowerCase()}`);return t.evt.on("onCreated",()=>{Object.keys(t.details).forEach(r=>{const o=t.details[r];o.state=pe(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 Ph=Object.defineProperty,Ih=(t,e,n)=>e in t?Ph(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Eh=(t,e,n)=>(Ih(t,typeof e!="symbol"?e+"":e,n),n);class Dh{constructor(){Eh(this,"component","IBizSearchFormControl")}}const _h=O("w",M(Sr,function(t){t.component(Sr.name,Sr),re(Q.SEARCHFORM,()=>new Dh)}));function Ns(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Ar=B({name:"IBizFormGroupPanel",props:{modelData:{type:Object,required:!0},controller:{type:gn,required:!0}},setup(t){const e=_("form-group"),n=D(!t.controller.defaultExpansion),r=()=>{t.controller.disableClose||(n.value=!n.value)},o=async(s,l)=>{await t.controller.onActionClick(s,l)},i=A(()=>{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},Ns(n=o.map(u=>{const p=u.props;return!p||!p.controller?u:a(d("iBizCol"),{layoutPos:p.modelData.layoutPos,state:p.controller.state},Ns(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 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","IBizFormGroupPanel")}async createController(e,n,r){const o=new gn(e,n,r);return await o.init(),o}}const xh=O("x",M(Ar,function(t){t.component(Ar.name,Ar),Ae("GROUPPANEL",()=>new Fh)}));function Oh(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Fr=B({name:"IBizFormItem",props:{modelData:{type:Object,required:!0},controller:{type:Cn,required:!0}},setup(t){const e=_("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=ne(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)},Oh(t)?t:{default:()=>[t]})}}),zs=O("z",B({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=_("form-item-container"),n=A(()=>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 Th=Object.defineProperty,Nh=(t,e,n)=>e in t?Th(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zh=(t,e,n)=>(Nh(t,typeof e!="symbol"?e+"":e,n),n);class Rh{constructor(){zh(this,"component","IBizFormItem")}async createController(e,n,r){const o=new Cn(e,n,r);return await o.init(),o}}const $h=O("y",M(Fr,function(t){t.component(Fr.name,Fr),t.component(zs.name,zs),Ae("FORMITEM",()=>new Rh)}));function Lh(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const xr=B({name:"IBizFormPage",props:{modelData:{type:Object,required:!0}},setup(){return{ns:_("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},Lh(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 Rs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const $s=O("B",B({name:"IBizFormPageItem",props:{modelData:{type:Object,required:!0},controller:{type:wn,required:!0}},setup(){return{ns:_("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},Rs(n=r.map(o=>{const i=o.props;return!i||!i.controller?o:a(d("iBizCol"),{layoutPos:i.modelData.layoutPos,state:i.controller.state},Rs(o)?o:{default:()=>[o]})}))?n:{default:()=>[n]})}}));var Mh=Object.defineProperty,Vh=(t,e,n)=>e in t?Mh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jh=(t,e,n)=>(Vh(t,typeof e!="symbol"?e+"":e,n),n);class kh{constructor(){jh(this,"component","IBizFormPageItem")}async createController(e,n,r){const o=new wn(e,n);return await o.init(),o}}const Uh=O("A",M(xr,function(t){t.component(xr.name,xr),t.component($s.name,$s),Ae("FORMPAGE",()=>new kh)})),Or=B({name:"IBizFormButton",props:{modelData:{type:Object,required:!0},controller:{type:yn,required:!0}},setup(t){const e=_("form-button"),n=A(()=>{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 Gh=Object.defineProperty,qh=(t,e,n)=>e in t?Gh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wh=(t,e,n)=>(qh(t,typeof e!="symbol"?e+"":e,n),n);class Hh{constructor(){Wh(this,"component","IBizFormButton")}async createController(e,n,r){const o=new yn(e,n,r);return await o.init(),o}}const Kh=O("C",M(Or,function(t){t.component(Or.name,Or),Ae("BUTTON",()=>new Hh)})),Tr=B({name:"IBizFormDRUIPart",props:{modelData:{type:Object,required:!0},controller:{type:Pn,required:!0}},setup(t){const e=_("form-druipart");return ct(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)},[ne(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 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","IBizFormDRUIPart")}async createController(e,n,r){const o=new Pn(e,n,r);return await o.init(),o}}const Zh=O("D",M(Tr,function(t){t.component(Tr.name,Tr),Ae("DRUIPART",()=>new Qh)})),Nr=B({name:"IBizFormMDCtrl",props:{modelData:{type:Object,required:!0},controller:{type:Ya,required:!0}},setup(t){const e=_("form-mdctrl");ct(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,N("\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])}}),Ls=B({name:"IBizFormMDCtrlForm",props:{controller:{type:In,required:!0}},setup(t){const e=_("form-mdctrl-form"),n=A(()=>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:()=>[N("\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?ne(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,[N("\u672A\u627E\u5230\u8868\u5355\u7684\u9002\u914D\u5668")])})}}),Ms=B({name:"IBizFormMDCtrlMD",props:{controller:{type:En,required:!0}},setup(t){const e=_("form-mdctrl-md"),n=A(()=>t.controller.enableCreate||t.controller.enableDelete),r=s=>{t.controller.setMDControl(s.ctrl)},o=D(!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={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"&&(n.rowEditOpen=!0);const r=ne(d(t.component),n);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:()=>[N("\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:()=>[N("\u5220\u9664")]})])])}}),Vs=B({name:"IBizRepeaterSingleForm",props:{data:{type:Object,required:!0},controller:{type:Je,required:!0}},emits:{change:t=>!0},setup(t,{emit:e}){return{ns:_("repeater-single-form"),onFormDataChange:o=>{const i={...o.data[0]};e("change",i)}}},render(){if(!this.controller.repeatedForm)throw new de("\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)}}),em=B({name:"IBizRepeaterMultiForm",props:{controller:{type:Je,required:!0}},emits:{change:t=>!0},setup(t,{emit:e}){return{ns:_("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(Vs,{key:n,data:e,controller:this.controller,onChange:r=>{this.onValueChange(r,n)}},null)})}});function tm(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const nm=B({name:"IBizRepeaterGrid",props:{controller:{type:Je,required:!0}},emits:{change:t=>!0},setup(t,{emit:e}){const n=_("repeater-grid"),r=[];kn(t.controller.repeatedForm,u=>{u.detailType==="FORMITEM"&&r.push(u)},{childrenFields:["deformPages","deformTabPages","deformDetails"]});const o=(u,p)=>{const h=[...t.controller.value];h[p]=u,e("change",h)},i=sa(),s=pe([]),l=async(u={})=>{const p=new Dn(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",h=>{const v={...h.data[0]},g=s.indexOf(p);o(v,g)})};return j(()=>t.controller.value,u=>{u&&u.length>0&&(u.forEach((p,h)=>{const v=s[h];if(v){const g=p||{};Object.keys(v.data).find(m=>g[m]!==v.data[m])&&v.setSimpleData(g)}else l(p)}),u.length<s.length&&s.forEach((p,h)=>{h>=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:()=>[N("\u5220\u9664")]})}):a(d("el-button"),{text:!0,type:"danger",class:[n.be("index","remove")],onClick:()=>t.controller.remove(u)},{default:()=>[N("\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:()=>[N("\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,[N("\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=ne(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},tm(i)?i:{default:()=>[i]})}}))]})])}}),js=B({name:"IBizFormMDCtrlRepeater",props:{controller:{type:Je,required:!0}},setup(t){return{ns:_("form-mdctrl-repeater"),onDataChange:r=>{t.controller.setValue(r)}}},render(){const t=[this.ns.b()];switch(this.controller.repeaterStyle){case"MultiForm":return a(em,{class:t,onChange:this.onDataChange,controller:this.controller},null);case"Grid":return a(nm,{class:t,controller:this.controller,onChange:this.onDataChange},null);case"SingleForm":return a(Vs,{class:t,data:this.controller.value,controller:this.controller,onChange:this.onDataChange},null);default:return a("div",{class:t},[N("\u6682\u672A\u652F\u6301\u91CD\u590D\u5668\u6837\u5F0F"),this.controller.repeaterStyle])}}});var rm=Object.defineProperty,om=(t,e,n)=>e in t?rm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,am=(t,e,n)=>(om(t,typeof e!="symbol"?e+"":e,n),n);class im{constructor(){am(this,"component","IBizFormMDCtrl")}async createController(e,n,r){let o;switch(e.contentType){case"LIST":case"GRID":case"DATAVIEW":o=new En(e,n,r);break;case"FORM":o=new In(e,n,r);break;case"REPEATER":o=new Je(e,n,r);break;default:throw new Mt(e,`\u6682\u672A\u652F\u6301\u5185\u5BB9\u7C7B\u578B\u4E3A${e.contentType}`)}return await o.init(),o}}const ks=B({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=_("mdctrl-container"),r=A(()=>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:()=>[N("\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:()=>[N("\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:()=>[N("\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,[N("\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()])])])}}),sm=O("E",M(Nr,function(t){t.component(Nr.name,Nr),t.component(Ls.name,Ls),t.component(Ms.name,Ms),t.component(js.name,js),t.component(ks.name,ks),Ae("MDCTRL",()=>new im)})),zr=B({name:"IBizFormRawItem",props:{modelData:{type:Object,required:!0},controller:{type:_n,required:!0}},setup(){return{ns:_("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 lm=Object.defineProperty,cm=(t,e,n)=>e in t?lm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,um=(t,e,n)=>(cm(t,typeof e!="symbol"?e+"":e,n),n);class dm{constructor(){um(this,"component","IBizFormRawItem")}async createController(e,n,r){const o=new _n(e,n,r);return await o.init(),o}}const pm=O("F",M(zr,function(t){t.component(zr.name,zr),Ae("RAWITEM",()=>new dm)}));function hm(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Rr=B({name:"IBizFormTabPanel",props:{modelData:{type:Object,required:!0},controller:{type:Bn,required:!0}},setup(t){const e=_("form-tab-panel");return ct(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)},hm(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 mm=Object.defineProperty,fm=(t,e,n)=>e in t?mm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bm=(t,e,n)=>(fm(t,typeof e!="symbol"?e+"":e,n),n);class vm{constructor(){bm(this,"component","IBizFormTabPanel")}async createController(e,n,r){const o=new Bn(e,n,r);return await o.init(),o}}const gm=O("G",M(Rr,function(t){t.component(Rr.name,Rr),Ae("TABPANEL",()=>new vm)}));function Us(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const $r=B({name:"IBizFormTabPage",props:{modelData:{type:Object,required:!0},controller:{type:Sn,required:!0}},setup(t){const e=_("form-tab-page");return ct(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)},Us(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},Us(o)?o:{default:()=>[o]})}))?n:{default:()=>[n]})}});var Cm=Object.defineProperty,wm=(t,e,n)=>e in t?Cm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ym=(t,e,n)=>(wm(t,typeof e!="symbol"?e+"":e,n),n);class Pm{constructor(){ym(this,"component","IBizFormTabPage")}async createController(e,n,r){const o=new Sn(e,n,r);return await o.init(),o}}const Im=O("H",M($r,function(t){t.component($r.name,$r),Ae("TABPAGE",()=>new Pm)}));var Em=Object.defineProperty,Dm=(t,e,n)=>e in t?Em(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","IBizEditFormControl")}}const Lr=B({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=te((...r)=>new Dn(...r),{excludePropsKeys:["data"]});t.isSimple&&(e.evt.on("onMounted",()=>{e.setSimpleData(t.data||{})}),j(()=>t.data,r=>{const o=r||{};Object.keys(e.data).find(s=>o[s]!==e.data[s])&&e.setSimpleData(o)},{deep:!0}));const n=_(`control-${e.model.controlType.toLowerCase()}`);return e.evt.on("onCreated",()=>{Object.keys(e.details).forEach(o=>{const i=e.details[o];i.state=pe(i.state)})}),{c:e,ns:n}},render(){return a(d("iBizFormControl"),{class:this.ns.b(),controller:this.c},{...this.$slots})}}),Sm=O("J",M(Lr,function(t){t.component(Lr.name,Lr),re(Q.FORM,()=>new Bm)}));function Am(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Mr=B({name:"IBizFormControl",props:{controller:{type:Object,required:!0}},setup(t,{slots:e}){const n=_("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 $a(e,c,{...o,...u});const p={};l.detailType==="FORMITEM"&&e[`${c}_editor`]&&(p.default=(...b)=>e[`${c}_editor`](...b));const h=Ja(l);h.length&&(p.default=()=>h.map(b=>i(b)));const v=r.providers[c];if(!v)return a("div",null,[N("\u6682\u672A\u652F\u6301\u7684\u8868\u5355\u9879\u7C7B\u578B: "),l.detailType,N("\u6216\u627E\u4E0D\u5230\u5BF9\u5E94\u9002\u914D\u5668")]);const g=d(v.component);return ne(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},Am(o)?o:{default:()=>[o]})}}),Fm=O("K",M(Mr,function(t){t.component(Mr.name,Mr),t.use(Uh),t.use($h),t.use(xh),t.use(Kh),t.use(Zh),t.use(sm),t.use(pm),t.use(gm),t.use(Im)}));function xm(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Om=B({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=_("export-excel"),r=D(1),o=D(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")},xm(t=this.btnContent(this.item))?t:{default:()=>[t]})},dropdown:()=>a(d("el-dropdown-menu"),null,{default:()=>[a(d("el-dropdown-item"),{command:"maxRowCount"},{default:()=>[N("\u5BFC\u51FA\u5168\u90E8(\u6700\u5927\u5BFC\u51FA1000\u884C)")]}),a(d("el-dropdown-item"),{command:"activatedPage"},{default:()=>[N("\u5BFC\u51FA\u5F53\u524D\u9875")]}),a(d("el-dropdown-item"),{command:"selectedRows"},{default:()=>[N("\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()}},[N("-")]),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()}},[N("\u9875")]),a(d("el-button"),{onClick:t=>this.onCommand("customPage",t),size:"small"},{default:()=>[N("\u5BFC\u51FA")]})]})]})})}});function yt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const nt=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},Vr=B({name:"IBizToolbarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=te((...s)=>new Qa(...s)),e=_(`control-${t.model.controlType.toLowerCase()}`),n=D("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)},yt(c=nt(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")]},[N("|")]);if(s.itemType==="RAWITEM")return a("div",{key:l,class:[e.e("item"),e.e("item-rawitem")]},[nt(s)]);if(s.itemType==="DEUIACTION"&&t.state.buttonsState[l].visible){let c;return s.uiactionId==="exportexcel"?a(Om,{class:[e.e("item"),e.e("item-deuiaction")],item:s,btnContent:nt,size:n.value,controller:t,onExportExcel:(p,h)=>{r(s,p,h)}},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)},yt(c=nt(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},yt(c=nt(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:h=>r(u,h)},yt(p=nt(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())]},yt(o)?o:{default:()=>[o]})}});var Tm=Object.defineProperty,Nm=(t,e,n)=>e in t?Tm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zm=(t,e,n)=>(Nm(t,typeof e!="symbol"?e+"":e,n),n);class Rm{constructor(){zm(this,"component","IBizToolbarControl")}}const $m=O("L",M(Vr,function(t){t.component(Vr.name,Vr),re(Q.TOOLBAR,()=>new Rm)})),jr=B({name:"IBizCaptionBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=te((...n)=>new Za(...n)),e=_(`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 Lm=Object.defineProperty,Mm=(t,e,n)=>e in t?Lm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vm=(t,e,n)=>(Mm(t,typeof e!="symbol"?e+"":e,n),n);class jm{constructor(){Vm(this,"component","IBizCaptionBarControl")}}const km=O("M",M(jr,function(t){t.component(jr.name,jr),re(Q.CAPTIONBAR,()=>new jm)}));function Gt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const kr=B({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=te((...I)=>new ei(...I)),n=_(`control-${e.model.controlType.toLowerCase()}`),r=A(()=>[n.is("enable-page",e.model.enablePagingBar===!0)]),o=A(()=>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}=Ut(e),c=(I,S)=>(S.stopPropagation(),e.onRowClick(I)),u=(I,S)=>(S.stopPropagation(),e.onDbRowClick(I)),p=(I,S)=>{const{context:y,params:E}=e;return a(d("iBizControlShell"),{data:I,modelData:S,context:y,params:E,onClick:P=>c(I,P),onDblclick:P=>u(I,P)},null)},h=I=>{var S;return a(d("iBizActionToolbar"),{class:n.bem("item-content","bottom","actions"),"action-details":(S=e.getOptItemModel().deuiactionGroup)==null?void 0:S.uiactionGroupDetails,"actions-state":e.getOptItemAction(I),onActionClick:(y,E)=>e.onActionClick(y,I,E)},null)},v=I=>a("div",{class:n.b("item-content")},[a("div",{class:n.be("item-content","top")},[a("div",{class:n.bem("item-content","top","title")},[I.srfmajortext]),a("div",{class:n.bem("item-content","top","description")},[I.content])]),e.getOptItemModel()?a("div",{class:n.be("item-content","bottom")},[h(I)]):null]),g=I=>{const S=e.state.selectedData.findIndex(F=>F.srfkey===I.srfkey),y=[n.b("item"),n.is("active",S!==-1)],E={};e.model.cardWidth&&Object.assign(E,{width:`${e.model.cardWidth}px`}),e.model.cardHeight&&Object.assign(E,{height:`${e.model.cardHeight}px`});const P=t.modelData.itemLayoutPanel;return a(d("el-card"),{shadow:"hover",class:y,"body-style":E,onClick:F=>c(I,F),onDblclick:F=>u(I,F)},{default:()=>[P?p(I,P):v(I)]})},b=I=>{const{cardColXS:S,cardColSM:y,cardColMD:E,cardColLG:P}=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")},[I.caption]),a("span",{class:n.be("group-content","item-action")},[e.model.groupUIActionGroup&&I.groupActionGroupState&&a(d("iBizActionToolbar"),{class:n.be("group-content","header-actions"),"action-details":e.model.groupUIActionGroup.uiactionGroupDetails,"actions-state":I.groupActionGroupState,onActionClick:(F,x)=>{e.onGroupToolbarClick(F,x,I)}},null)])]),S||y||E||P?a(d("el-row"),{class:n.be("group-content","item-row")},{default:()=>[I.children.length>0?I.children.map(F=>{let x;return a(d("el-col"),{xs:S,sm:y,md:E,lg:P,class:n.be("group-content","item-col")},Gt(x=g(F))?x:{default:()=>[x]})}):a("div",{class:n.bem("group-content","item","empty")},[N("\u65E0\u6570\u636E")])]}):a("div",{class:n.be("group-content","item-content")},[I.children.length>0?I.children.map(F=>g(F)):a("div",{class:n.bem("group-content","item","empty")},[N("\u65E0\u6570\u636E")])])])},m=()=>{const{cardColXS:I,cardColSM:S,cardColMD:y,cardColLG:E}=e.model;if(e.model.enableGroup)return a("div",{class:n.b("group-content")},[e.state.groups.map(P=>a("div",{class:[n.b("scroll-item")]},[b(P)]))]);if(I||S||y||E){let P;return a(d("el-row"),{class:[n.b("item-row")]},Gt(P=e.state.items.map(F=>{let x;return a(d("el-col"),{xs:I,sm:S,md:y,lg:E,class:[n.b("item-col")]},Gt(x=g(F))?x:{default:()=>[x]})}))?P:{default:()=>[P]})}return e.state.items.map(P=>a("div",{class:[n.b("scroll-item")]},[g(P)]))};return{c:e,ns:n,classNames:r,renderHasData:()=>Xe(a("div",{class:[n.b("scroll"),n.e("content")],"infinite-scroll-distance":10,"infinite-scroll-disabled":o.value},[m()]),[[dt("infinite-scroll"),()=>e.loadMore()]]),renderNoData:()=>{const{isLoaded:I}=e.state;if(I)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},Gt(r)?r:{default:()=>[r]})}});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 Gs{constructor(){qm(this,"component","IBizDataViewControl")}}O("O",Gs);const Wm=O("N",M(kr,function(t){t.component(kr.name,kr),re(Q.DATAVIEW,()=>new Gs)}));function Ur(t,e){return e.state.items.find(n=>n.id===t)}function Hm(t,e){const n=()=>{const s=t.value;if(!s)throw new de("\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=et(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 Gr=B({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=te((...E)=>new ti(...E)),e=_(`control-${t.model.controlType.toLowerCase()}`),n=D(null),{updateUI:r,triggerNodeExpand:o}=Hm(n,t),i=E=>E.map(P=>({id:P.id,leaf:P.leaf}));t.evt.on("onAfterRefreshParent",E=>{if(n.value){const{parentNode:P,children:F}=E;n.value.updateKeyChildren(P.id,i(F)),r()}});const s=A(()=>t.state.isLoaded?t.model.rootVisible?t.state.rootNodes:t.state.rootNodes.reduce((E,P)=>P.children?E.concat(P.children):E,[]):[]),l=D("");j(s,(E,P)=>{E!==P&&(l.value=Oe())});const c=async(E,P)=>{let F;if(E.level===0)F=s.value,ibiz.log.debug("\u521D\u59CB\u52A0\u8F7D");else{const x=Ur(E.data.id,t);x.children?(ibiz.log.debug("\u8282\u70B9\u5C55\u5F00\u52A0\u8F7D-\u672C\u5730",x),F=x.children):(ibiz.log.debug("\u8282\u70B9\u5C55\u5F00\u52A0\u8F7D-\u8FDC\u7A0B",x),F=await t.loadNodes(x))}ibiz.log.debug("\u7ED9\u6811\u8FD4\u56DE\u503C",F),P(i(F)),r()};let u=!1;t.evt.on("onLoadSuccess",()=>{u=!0,setTimeout(()=>{u=!1},200)}),t.evt.on("onSelectionChange",async()=>{var E;u&&await ut(),t.state.singleSelect?n.value.setCurrentKey(((E=t.state.selectedData[0])==null?void 0:E.id)||null):n.value.setCheckedKeys(t.state.selectedData.map(P=>P.id))});const p=(E,P)=>{const{checkedNodes:F}=P;t.setSelection(F)};let h=!1;const v=(E,P)=>{if(P.stopPropagation(),!h){if(t.state.navigational){const F=t.getNodeModel(E.nodeId);if(!F?.navAppViewId){const x=o(E.id);t.onExpandChange(E,x);return}}t.onTreeNodeClick(E),h=!0,setTimeout(()=>{h=!1},200)}},g=(E,P)=>{P.stopPropagation(),t.onDbTreeNodeClick(E)};let b;t.evt.on("onMounted",()=>{Object.values(t.contextMenus).length>0&&(()=>Fe.import("@imengyu/vue3-context-menu"))().then(P=>{b=P.default,b.default&&!b.showContextMenu&&(b=b.default)})});const m=d("IBizRawItem"),f=d("IBizIcon"),w=(E,P,F,x)=>{const R=[];return E.forEach(U=>{var z;if(U.itemType==="SEPERATOR"){R.push({divided:"self"});return}const H=x[U.id];if(H&&!H.visible)return;const W={};if(U.showCaption&&U.caption&&(W.label=U.caption),U.sysImage&&U.showIcon&&(W.icon=a(f,{icon:U.sysImage},null)),U.itemType==="DEUIACTION"){W.disabled=H.disabled,W.clickClose=!0;const{uiactionId:J}=U;J&&(W.onClick=()=>{t.doUIAction(J,P,F)})}else if(U.itemType==="RAWITEM"){const{rawItem:J}=U;J&&(W.label=a(m,{rawItem:U},null))}else U.itemType==="ITEMS"&&(z=U.detoolbarItems)!=null&&z.length&&(W.children=w(U.detoolbarItems,P,F,x));R.push(W)}),R},I=async(E,P)=>{P.preventDefault(),P.stopPropagation();const F=t.getNodeModel(E.nodeId);if(!F?.decontextMenu)return;const x=t.contextMenus[F.decontextMenu.id];if(!x.model.detoolbarItems)return;await x.calcButtonState(E.deData||(E.srfkey?E:void 0),F.appDataEntityId);const R=x.state.buttonsState,U=w(x.model.detoolbarItems,E,P,R);U.length&&b.showContextMenu({x:P.x,y:P.y,customClass:e.b("context-menu"),items:U})};return{c:t,ns:e,treeRef:n,treeData:s,treeRefreshKey:l,findNodeData:Ur,onCheck:p,onNodeClick:v,onNodeDbClick:g,onNodeContextmenu:I,loadData:c,renderContextMenu:(E,P)=>{var F,x;if((x=(F=E?.decontextMenu)==null?void 0:F.detoolbarItems)!=null&&x.length)return a("div",{class:e.b("context-menu-trigger"),onClick:R=>I(P,R)},[a("ion-icon",{class:e.be("context-menu-trigger","caption-icon"),name:"ellipsis-horizontal"},null)])},updateNodeExpand:(E,P)=>{const F=Ur(E.id,t);if(!F)throw new de(`\u6CA1\u6709\u627E\u5230id\u4E3A${E.id}\u7684\u8282\u70B9`);t.onExpandChange(F,P)}}},render(){return Xe(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)])}})]}),[[dt("loading"),this.c.state.isLoading]])}});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","IBizTreeControl")}}const Qm=O("P",M(Gr,function(t){t.component(Gr.name,Gr),re(Q.TREEVIEW,()=>new Jm)})),qr=B({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=te((...r)=>new ni(...r)),e=_(`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}):ne(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 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 nf{constructor(){tf(this,"component","IBizPickupViewPanelControl")}}const rf=O("Q",M(qr,function(t){t.component(qr.name,qr),re(Q.PICKUP_VIEW_PANEL,()=>new nf)}));function of(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Wr=B({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=te((...i)=>new ri(...i)),n=_(`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},of(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 af=Object.defineProperty,sf=(t,e,n)=>e in t?af(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lf=(t,e,n)=>(sf(t,typeof e!="symbol"?e+"":e,n),n);class cf{constructor(){lf(this,"component","IBizTabExpPanelControl")}}const uf=O("R",M(Wr,function(t){t.component(Wr.name,Wr),re(Q.TAB_EXP_PANEL,()=>new cf)}));function rt(t,e){const n=_("exp-bar"),r=et(()=>{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 ot(t){const e=t.view.modal.routeDepth;if(e){const n=Le();let r;sn(({currentKey:o,fullPath:i})=>{if(!r)r=o;else if(r===o){const s=ln(n),{srfnav:l}=s.pathNodes[e-1];t.onRouterChange({srfnav:l||"",path:i})}},e)}}function df(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Hr=B({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=te((...i)=>new oi(...i)),e=_(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=rt(t,e);ot(t);const o=A(()=>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},df(r)?r:{default:()=>[r]})}});var pf=Object.defineProperty,hf=(t,e,n)=>e in t?pf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mf=(t,e,n)=>(hf(t,typeof e!="symbol"?e+"":e,n),n);class ff{constructor(){mf(this,"component","IBizTreeExpBarControl")}}const bf=O("S",M(Hr,function(t){t.component(Hr.name,Hr),re(Q.TREE_EXP_BAR,()=>new ff)}));function vf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Kr=B({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=te((...o)=>new Rt(...o)),e=_(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=rt(t,e);return ot(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},vf(n)?n:{default:()=>[n]})}});var gf=Object.defineProperty,Cf=(t,e,n)=>e in t?gf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wf=(t,e,n)=>(Cf(t,typeof e!="symbol"?e+"":e,n),n);class yf{constructor(){wf(this,"component","IBizListExpBarControl")}}const Pf=O("T",M(Kr,function(t){t.component(Kr.name,Kr),re(Q.LIST_EXPBAR,()=>new yf)}));function If(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Xr=B({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=te((...o)=>new Rt(...o)),e=_(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=rt(t,e);return ot(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},If(n)?n:{default:()=>[n]})}});var Ef=Object.defineProperty,Df=(t,e,n)=>e in t?Ef(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_f=(t,e,n)=>(Df(t,typeof e!="symbol"?e+"":e,n),n);class Bf{constructor(){_f(this,"component","IBizGridExpBarControl")}}const Sf=O("U",M(Xr,function(t){t.component(Xr.name,Xr),re(Q.GRID_EXPBAR,()=>new Bf)}));function Af(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Yr=B({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=te((...o)=>new Rt(...o)),e=_(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=rt(t,e);return ot(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},Af(n)?n:{default:()=>[n]})}});var Ff=Object.defineProperty,xf=(t,e,n)=>e in t?Ff(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Of=(t,e,n)=>(xf(t,typeof e!="symbol"?e+"":e,n),n);class Tf{constructor(){Of(this,"component","IBizDataViewExpBarControl")}}const Nf=O("V",M(Yr,function(t){t.component(Yr.name,Yr),re(Q.DATA_VIEW_EXPBAR,()=>new Tf)}));function zf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Jr=B({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=te((...o)=>new ai(...o)),e=_(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=rt(t,e);return ot(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},zf(r)?r:{default:()=>[r]})}});var Rf=Object.defineProperty,$f=(t,e,n)=>e in t?Rf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lf=(t,e,n)=>($f(t,typeof e!="symbol"?e+"":e,n),n);class Mf{constructor(){Lf(this,"component","IBizCalendarExpBarControl")}}const Vf=O("W",M(Jr,function(t){t.component(Jr.name,Jr),re(Q.CALENDAR_EXPBAR,()=>new Mf)}));function jf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Qr=B({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=te((...o)=>new ii(...o)),e=_(`control-${t.model.controlType.toLowerCase()}`),{renderTitle:n,renderQuickSearch:r}=rt(t,e);return ot(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 kf=Object.defineProperty,Uf=(t,e,n)=>e in t?kf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gf=(t,e,n)=>(Uf(t,typeof e!="symbol"?e+"":e,n),n);class qf{constructor(){Gf(this,"component","IBizChartExpBarControl")}}const Wf=O("X",M(Qr,function(t){t.component(Qr.name,Qr),re(Q.CHART_EXPBAR,()=>new qf)}));function Hf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Zr=B({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=te((...p)=>new si(...p)),n=_(`control-${e.model.controlType.toLowerCase()}`),r=()=>{e.onSearch()},o=p=>{p.code==="Enter"&&r()},i=A(()=>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=D();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)},Hf(t)?t:{default:()=>[t]})]}})}});var Kf=Object.defineProperty,Xf=(t,e,n)=>e in t?Kf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yf=(t,e,n)=>(Xf(t,typeof e!="symbol"?e+"":e,n),n);class Jf{constructor(){Yf(this,"component","IBizSearchBarControl")}}function Qf(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Zf=[{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=B({name:"IBizFilterTreeControl",props:{controller:{type:Object,required:!0},provider:{type:Object}},emits:{close:()=>!0},setup(t,{emit:e}){const n=_("filter-tree"),r=(m,f)=>t.controller.filterControllers.find(w=>w.fieldName===m?w.valueOP?w.valueOP===f:!0:!1),o=[],i=m=>{if(!m)return;const f=o.find(w=>w.name===m);if(f)return f.valueOPs};t.controller.filterControllers.forEach(m=>{let f=o.find(w=>w.name===m.fieldName);f===void 0&&(f={name:m.fieldName,label:m.label,valueOPs:[]},o.push(f)),m.valueOP?f.valueOPs.push(m.valueOP):f.valueOPs=Zf.map(w=>w.valueOP)});const s=(m,f)=>{m.field=f},l=(m,f)=>{m.valueOP=f},c=(m,f)=>{m.logicType=f},u=m=>{m.children.push({leaf:!1,logicType:"AND",children:[{leaf:!0,field:null,valueOP:null,value:null}]})},p=m=>{m.children.push({leaf:!0,field:null,valueOP:null,value:null})},h=(m,f)=>{let w=null;if(f.editorProvider){const I=d(f.editorProvider.formEditor);w=ne(I,{value:m.value,controller:f.editor,onChange:S=>{m.value=S}})}else w=a(d("not-supported-editor"),{modelData:f.model.editor},null);return a("div",{class:n.e("editor")},[w])},v=m=>{let f;const w=r(m.field,m.valueOP),I=i(m.field);return a("div",{class:n.b("item")},[a(d("el-select"),{"model-value":m.field,teleported:!1,class:n.e("field-select"),onChange:S=>{s(m,S)}},Qf(f=o.map(S=>a(d("el-option"),{key:S.name,value:S.name,label:S.label},null)))?f:{default:()=>[f]}),I&&I.length>0&&a(d("iBizFilterModeSelect"),{class:n.e("mode-select"),value:m.valueOP,modes:I,onChange:S=>{l(m,S)}},null),w&&h(m,w)])},g=m=>a("div",{class:n.b("group")},[a("div",{class:n.be("group","actions")},[a(d("el-button"),{text:!0,type:"primary",onClick:()=>{u(m)}},{default:()=>[N("\u6DFB\u52A0\u7EC4")]}),a(d("el-button"),{text:!0,onClick:()=>{p(m)}},{default:()=>[N("\u6DFB\u52A0\u9879")]}),a(d("el-select"),{"model-value":m.logicType,teleported:!1,class:n.be("group","logic-type"),onChange:f=>{c(m,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")},[m.children.length>0&&m.children.map((f,w)=>{const I=f.leaf?v(f):g(f);return a("div",{class:n.be("group","list-item")},[a("div",{class:n.be("group","list-item-left")},[m.logicType]),I,a(d("iBizIcon"),{class:n.be("group","list-item-right"),onClick:()=>{m.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:()=>[N("\u641C\u7D22")]}),a(d("el-button"),{onClick:()=>{this.controller.resetFilter()}},{default:()=>[N("\u91CD\u7F6E")]})])])}});function eb(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Ws=[{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(#%)"}],Hs=B({name:"IBizFilterModeSelect",props:{value:String,modes:Array},emits:{change:t=>!0},setup(t,{emit:e}){return{availableModes:A(()=>{var o;return(o=t.modes)!=null&&o.length?Ws.filter(i=>t.modes.includes(i.valueOP)):Ws}),onChange:o=>{e("change",o)}}},render(){let t;return a(d("el-select"),{"model-value":this.value,teleported:!1,onChange:e=>{this.onChange(e)}},eb(t=this.availableModes.map(e=>a(d("el-option"),{key:e.valueOP,value:e.valueOP,label:e.label},null)))?t:{default:()=>[t]})}}),tb=O("Y",M(Zr,function(t){t.component(Zr.name,Zr),t.component(qs.name,qs),t.component(Hs.name,Hs),re(Q.SEARCHBAR,()=>new Jf)}));var nb=Object.defineProperty,rb=(t,e,n)=>e in t?nb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ob=(t,e,n)=>(rb(t,typeof e!="symbol"?e+"":e,n),n);class ab{constructor(){ob(this,"component","IBizChartControl")}}const ib=O("Z",{install(t){t.component("IBizChartControl",pt({loader:()=>Fe.import("./chart-ImL2qyp9.js"),loadingComponent:la,delay:0})),re(Q.CHART,()=>new ab)}});function sb(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const eo=B({name:"IBizWizardPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=te((...n)=>new li(...n)),e=_(`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),h=(t=this.c.model.deeditForms)==null?void 0:t.find(v=>{var g;return n===((g=v.dewizardForm)==null?void 0:g.formTag)});o=ne(p,{class:this.ns.e("form"),modelData:h,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 h=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:h},sb(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 lb=Object.defineProperty,cb=(t,e,n)=>e in t?lb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ub=(t,e,n)=>(cb(t,typeof e!="symbol"?e+"":e,n),n);class db{constructor(){ub(this,"component","IBizWizardPanelControl")}}const pb=O("_",M(eo,function(t){t.component(eo.name,eo),re(Q.WIZARD_PANEL,()=>new db)}));var hb=Object.defineProperty,mb=(t,e,n)=>e in t?hb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fb=(t,e,n)=>(mb(t,typeof e!="symbol"?e+"":e,n),n);class Ks extends An{constructor(){super(...arguments),fb(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!==Fn.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}=xn(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})}}O("a0",Ks);function bb(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const to=B({name:"IBizDrBarControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=te((...i)=>new Ks(...i)),e=_(`control-${t.model.controlType.toLowerCase()}`),n=$e();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},bb(t=n.map(o=>this.renderMenuItems(o)))?t:{default:()=>[t]})]}})}});var vb=Object.defineProperty,gb=(t,e,n)=>e in t?vb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cb=(t,e,n)=>(gb(t,typeof e!="symbol"?e+"":e,n),n);class wb{constructor(){Cb(this,"component","IBizDrBarControl")}}const yb=O("$",M(to,function(t){t.component(to.name,to),re(Q.DRBAR,()=>new wb)}));var Pb=Object.defineProperty,Ib=(t,e,n)=>e in t?Pb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Eb=(t,e,n)=>(Ib(t,typeof e!="symbol"?e+"":e,n),n);class Xs extends An{constructor(){super(...arguments),Eb(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!==Fn.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?ca(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}=xn(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})}}O("a2",Xs);function Db(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const no=B({name:"IBizDrTabControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=te((...o)=>new Xs(...o)),e=_(`control-${t.model.controlType.toLowerCase()}`),n=$e();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},Db(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 _b=Object.defineProperty,Bb=(t,e,n)=>e in t?_b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sb=(t,e,n)=>(Bb(t,typeof e!="symbol"?e+"":e,n),n);class Ab{constructor(){Sb(this,"component","IBizDrTabControl")}}const Fb=O("a1",M(no,function(t){t.component(no.name,no),re(Q.DRTAB,()=>new Ab)}));function Ys(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}function ro(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,[N("\u6682\u672A\u652F\u6301"),t.portletType]);const s=d(r.component);if(t.portletType==="CONTAINER"){const l=t;return ne(s,{...i,key:t.id},{default:()=>{var c;return(c=l.controls)==null?void 0:c.map(u=>ro(u,e))}})}return ne(s,{...i,key:t.id})}const oo=B({name:"IBizDashboardControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object}},setup(){const t=te((...o)=>new ci(...o)),e=D([]),n=_(`control-${t.model.controlType.toLowerCase()}`);return t.evt.on("onCreated",()=>{Object.values(t.portlets).forEach(o=>{o.state=pe(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},Ys(c=ro(s,this.c))?c:{default:()=>[c]})})]}}),o=()=>{const i={default:()=>r()};return this.customModelDatas.forEach(s=>{i[s.codeName]=()=>ro(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},Ys(t=o())?t:{default:()=>[t]}):r())]})}});function qt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Js=B({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=_("dashboard-design"),r=t.customDashboard,o=k=>{const V=[];return k.forEach(T=>{var L;Object.is(T.type,"app")&&V.push(T);const q=((L=r.model)==null?void 0:L.appDataEntityId)||"app";Object.is(T.appCodeName,q)&&V.push(T)}),V},i=(k,V)=>{let T=k.find(q=>Object.is(V.groupCodeName,q.type));T||(T={},Object.assign(T,{type:V.groupCodeName,name:V.groupName,children:[]}),k.push(T)),T.children.find(q=>Object.is(q.portletCodeName,V.portletCodeName))||T.children.push(V)},s=k=>{const V=[];return k.forEach(T=>{let L=V.find(q=>Object.is(T.type,q.type));L||(L={},Object.assign(L,{type:T.type,name:Object.is(T.type,"app")?"\u5168\u5C40":T.appName,children:[]}),V.push(L)),i(L.children,T)}),V},l=k=>{const V=[];return k.forEach(T=>{const L=V.find(q=>Object.is(q.value,T.groupCodeName));L?L.children.find(Y=>Object.is(Y.portletCodeName,T.portletCodeName))||L.children.push(T):V.push({name:T.groupName,value:T.groupCodeName,children:[T]})}),V},u=(()=>{const k=[],V=ibiz.hub.getApp(ibiz.env.appId);V.model.appPortletCats&&V.model.appPortlets&&V.model.appPortlets.forEach(Y=>{var K;const ae=(K=V.model.appPortletCats)==null?void 0:K.find(he=>{var fe;return he.codeName===((fe=Y.appPortletCat)==null?void 0:fe.codeName)}),ce={type:"app",portletCodeName:Y.codeName,portletName:Y.name,portletImage:Y.control.sysImage,groupCodeName:ae?.codeName||"",groupName:ae?.name||"",appCodeName:Y.appDataEntityId||V.model.pkgcodeName,appName:V.model.name};k.push(ce)});const T=o(k),L=s(T),q=l(T);return{portlets:T,list:L.reverse(),groups:q}})(),p=D(u.portlets),h=D(u.list),v=D(u.groups),g=D(""),b=D(Pe(r.customModelData)),m=D({}),f=D({}),w=D(null),I=A(()=>{let k=[];return g.value?k=[g.value]:h.value.forEach((V,T)=>{k.push(V.type+T),V.children.forEach((L,q)=>{k.push(L.type+q)})}),k}),S=async k=>{k?.length&&await Promise.all(k.map(async V=>{const T=await ui(V);if(T){m.value[V.id]=T;const L=await T.createController(V,t.dashboard);f.value[V.id]=L}}))},y=k=>{const V=ibiz.hub.getApp(ibiz.env.appId);if(V.model.appPortlets){const T=V.model.appPortlets.find(L=>{var q;return((q=L.control)==null?void 0:q.codeName)===k});if(T)return T.control}},E=k=>{const V=[];return k.length>0&&k.forEach(T=>{const L=y(T.portletCodeName);L&&V.push(L)}),V},P=async()=>{const k=E(b.value);await S(k)};j(()=>t.isShowDesign,async k=>{if(k){const V=await r.loadCustomModelData();b.value=Pe(V),await P()}},{immediate:!0});const F=k=>!!b.value.find(T=>T.i===k.portletCodeName),x=()=>{b.value=[]},R=async()=>{const k=await r.saveCustomModelData(b.value);e("saved",{model:k})},U=async k=>{const V=b.value.indexOf(k);if(V!==-1){b.value.splice(V,1);const T=y(k.portletCodeName);T&&await f.value[T.id].destroyed()}},z=D(0),H=async k=>{const V=w.value;V&&(z.value=V.scrollHeight+3*r.layoutRowH);let T=0;for(const L of b.value)L.y>T&&(T=L.y);if(b.value.push({w:4,h:3,x:0,y:T+3,i:k.portletCodeName,...k}),await P(),V){const L=setInterval(()=>{V.scrollHeight>=z.value&&(V.scrollTo({top:V.scrollHeight,behavior:"smooth"}),clearInterval(L))},50)}},W=k=>{r.layoutColNum=k},J=k=>{r.layoutRowH=k},Z=A(()=>`calc((100% - 10px) / ${r.layoutColNum}) ${r.layoutRowH+10}px`);return ze(async()=>{const k=Object.values(f.value);await Promise.all(k.map(async V=>{await V.destroyed()}))}),{ns:n,customC:r,portlets:p,list:h,groups:v,filterVal:g,defaultOpens:I,layoutModel:b,onReset:x,onSave:R,removeItem:U,addLayoutItem:H,handleColNumberChange:W,handleRolHChange:J,isDisabled:F,providers:m,portletControllers:f,getPortletByCodeName:y,maskSize:Z,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},qt(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"},qt(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(h=>n(h))}))})))?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,[N("\u6682\u672A\u652F\u6301"),s.portletType]);const p=d(l.component);return ne(p,{...u,key:s.id})}};return a("div",{class:this.ns.b()},[a("div",{class:this.ns.b("header")},[a("span",null,[N("\u81EA\u5B9A\u4E49\u95E8\u6237")]),a("span",{class:this.ns.b("header-utils")},[a("div",{class:this.ns.be("header-utils","col-num")},[N("\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")},[N("\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:()=>[N("\u6062\u590D\u9ED8\u8BA4")]}),a(d("el-button"),{class:this.ns.be("header-utils","save"),onClick:this.onSave},{default:()=>[N("\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")},qt(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%"}},qt(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]})])])])])}}),Qs=B({name:"IBizCustomDashboardContainer",props:{modelData:{type:Object,required:!0},dashboard:{type:Object,required:!0}},setup(t,{emit:e}){const n=_("custom-dashboard-container"),r=pe(new di(t.modelData)),o=D(!1),i=D(!1),s=D(!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 m=b.model.appPortlets.find(f=>{var w;return((w=f.control)==null?void 0:w.codeName)===g});if(m)return m.control}},p=g=>{const b=[];return g.length>0&&g.forEach(m=>{const f=u(m.portletCodeName);f&&b.push(f)}),b},h=g=>{i.value=!1;const b=p(g.model);e("changed",{model:b})},v=A(()=>r.customModelData.length===0);return Ie(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:h,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 xb=Object.defineProperty,Ob=(t,e,n)=>e in t?xb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Tb=(t,e,n)=>(Ob(t,typeof e!="symbol"?e+"":e,n),n);class Nb{constructor(){Tb(this,"component","IBizDashboardControl")}}function ao(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const io=O("a5",B({name:"IBizContainerPortlet",props:{modelData:{type:Object,required:!0},controller:{type:On,required:!0}},setup(t){var e;return{ns:_(`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},ao(n=r.map(s=>{const l=s.props;return!l||!l.controller?s:a(d("iBizCol"),{layoutPos:l.modelData.layoutPos,state:l.controller.state},ao(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},ao(o)?o:{default:()=>[o]})}}));var zb=Object.defineProperty,Rb=(t,e,n)=>e in t?zb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$b=(t,e,n)=>(Rb(t,typeof e!="symbol"?e+"":e,n),n);class Lb{constructor(){$b(this,"component","IBizContainerPortlet")}async createController(e,n,r){const o=new On(e,n,r);return await o.init(),o}}const Mb=O("a4",M(io,function(t){t.component(io.name,io),xe("CONTAINER",()=>new Lb)})),Zs=O("a6",B({name:"IBizPortletLayout",props:{controller:{type:pi,required:!0}},setup(t){const e=_("portlet-layout"),n=t.controller,r=A(()=>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 Vb(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const so=O("a8",B({name:"IBizViewPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Tn,required:!0}},setup(t){var e;const n=_(`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},Vb(t=ne(d("IBizViewShell"),{context:n,params:r,modelData:this.view}))?t:{default:()=>[t]})}}));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","IBizViewPortlet")}async createController(e,n,r){const o=new Tn(e,n,r);return await o.init(),o}}const qb=O("a7",M(so,function(t){t.component(so.name,so),xe("VIEW",()=>new Gb)}));function el(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const tl=B({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=te((...c)=>new hn(...c)),n=_(`control-${e.model.controlType.toLowerCase()}-portlet`),r=D(""),o=D([]);(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:h=>{c.appFuncId&&i(c.id,h)}},[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(h=>s(h))]}}):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},el(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},el(r)?r:{default:()=>[r]})}}),lo=O("aa",B({name:"IBizMenuPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Nn,required:!0}},setup(t){var e,n;const r=_(`portlet-${(e=t.modelData.portletType)==null?void 0:e.toLowerCase()}`),o=(n=t.modelData.controls)==null?void 0:n.find(i=>i.controlType===Q.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 Wb=Object.defineProperty,Hb=(t,e,n)=>e in t?Wb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kb=(t,e,n)=>(Hb(t,typeof e!="symbol"?e+"":e,n),n);class Xb{constructor(){Kb(this,"component","IBizMenuPortlet")}async createController(e,n,r){const o=new Nn(e,n,r);return await o.init(),o}}const Yb=O("a9",M(lo,function(t){t.component(lo.name,lo),t.component(tl.name,tl),xe("APPMENU",()=>new Xb)}));function Jb(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const co=O("ac",B({name:"IBizChartPortlet",props:{modelData:{type:Object,required:!0},controller:{type:zn,required:!0}},setup(t){var e,n;const r=_(`portlet-${(e=t.modelData.portletType)==null?void 0:e.toLowerCase()}`),o=(n=t.modelData.controls)==null?void 0:n.find(i=>i.controlType===Q.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},Jb(t=ne(d("IBizChartControl"),{context:n,params:r,modelData:this.chart}))?t:{default:()=>[t]})}}));var Qb=Object.defineProperty,Zb=(t,e,n)=>e in t?Qb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ev=(t,e,n)=>(Zb(t,typeof e!="symbol"?e+"":e,n),n);class tv{constructor(){ev(this,"component","IBizChartPortlet")}async createController(e,n,r){const o=new zn(e,n,r);return await o.init(),o}}const nv=O("ab",M(co,function(t){t.component(co.name,co),xe("CHART",()=>new tv)}));function rv(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const uo=O("ae",B({name:"IBizRawItemPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Rn,required:!0}},setup(t){var e;const n=_(`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},rv(t=ne(d("iBizRawItem"),{rawItem:this.rawItem}))?t:{default:()=>[t]})}}));var ov=Object.defineProperty,av=(t,e,n)=>e in t?ov(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iv=(t,e,n)=>(av(t,typeof e!="symbol"?e+"":e,n),n);class sv{constructor(){iv(this,"component","IBizRawItemPortlet")}async createController(e,n,r){const o=new Rn(e,n,r);return await o.init(),o}}const lv=O("ad",M(uo,function(t){t.component(uo.name,uo),xe("RAWITEM",()=>new sv)}));function cv(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const po=O("ag",B({name:"IBizListPortlet",props:{modelData:{type:Object,required:!0},controller:{type:$n,required:!0}},setup(t){var e,n;const r=_(`portlet-${(e=t.modelData.portletType)==null?void 0:e.toLowerCase()}`),o=(n=t.modelData.controls)==null?void 0:n.find(i=>i.controlType===Q.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=ne(d("IBizListControl"),{context:n,params:r,modelData:this.list}))?t:{default:()=>[t]})}}));var uv=Object.defineProperty,dv=(t,e,n)=>e in t?uv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pv=(t,e,n)=>(dv(t,typeof e!="symbol"?e+"":e,n),n);class hv{constructor(){pv(this,"component","IBizListPortlet")}async createController(e,n,r){const o=new $n(e,n,r);return await o.init(),o}}const mv=O("af",M(po,function(t){t.component(po.name,po),xe("LIST",()=>new hv)})),ho=O("ai",B({name:"IBizHtmlPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Ln,required:!0}},setup(t){var e;return{ns:_(`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 fv=Object.defineProperty,bv=(t,e,n)=>e in t?fv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vv=(t,e,n)=>(bv(t,typeof e!="symbol"?e+"":e,n),n);class gv{constructor(){vv(this,"component","IBizHtmlPortlet")}async createController(e,n,r){const o=new Ln(e,n,r);return await o.init(),o}}const Cv=O("ah",M(ho,function(t){t.component(ho.name,ho),xe("HTML",()=>new gv)})),mo=O("ak",B({name:"IBizActionBarPortlet",props:{modelData:{type:Object,required:!0},controller:{type:Mn,required:!0}},setup(t){var e;return{ns:_(`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 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 Iv{constructor(){Pv(this,"component","IBizActionBarPortlet")}async createController(e,n,r){const o=new Mn(e,n,r);return await o.init(),o}}const Ev=O("aj",M(mo,function(t){t.component(mo.name,mo),xe("ACTIONBAR",()=>new Iv)})),Dv=O("a3",M(oo,function(t){t.component(oo.name,oo),t.component(Js.name,Js),t.component(Qs.name,Qs),re(Q.DASHBOARD,()=>new Nb),t.component(Zs.name,Zs),t.use(Mb),t.use(qb),t.use(Yb),t.use(nv),t.use(lv),t.use(mv),t.use(Cv),t.use(Ev)}));function _v(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const fo=B({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=te((...i)=>new hi(...i)),e=_(`control-${t.model.controlType.toLowerCase()}`),n=D(),r=i=>{n.value&&n.value.selectDate(i)};return j(()=>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:h,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)],m=this.calcItemStyle(u);return a(d("iBizControlShell"),{class:b,data:u.deData,modelData:p,context:h,params:v,style:m,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),h=[this.ns.b("item"),this.ns.is("active",p!==-1)],v=this.calcItemStyle(u);return a("div",{class:h,key:u.deData.srfkey,style:v,onClick:()=>this.c.onRowClick(u),onDblclick:()=>this.c.onDbRowClick(u)},[`${u.text}`])},r=u=>u.map(p=>{var h;const g=((h=this.c.model.sysCalendarItems)==null?void 0:h.find(b=>p.itemType===b.itemType)).layoutPanel;return g?e(p,g):n(p)}),o=u=>{const p=_e(u).format("YYYY-MM-DD"),h=this.c.state.items.filter(v=>{const g=new Date(v.beginTime);return p===_e(g).format("YYYY-MM-DD")});return r(h)},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":h=>this.c.state.selectedDate=h,type:"month"},null),a(d("el-button-group"),null,{default:()=>[a(d("el-button"),{size:"small",onClick:()=>{this.selectDate("prev-year")}},{default:()=>[N("\u53BB\u5E74")]}),a(d("el-button"),{size:"small",onClick:()=>{this.selectDate("prev-month")}},{default:()=>[N("\u4E0A\u4E2A\u6708")]}),a(d("el-button"),{size:"small",onClick:()=>{this.selectDate("today")}},{default:()=>[N("\u4ECA\u5929")]}),a(d("el-button"),{size:"small",onClick:()=>{this.selectDate("next-month")}},{default:()=>[N("\u4E0B\u4E2A\u6708")]}),a(d("el-button"),{size:"small",onClick:()=>{this.selectDate("next-year")}},{default:()=>[N("\u660E\u5E74")]})]})])],"date-cell":({data:p})=>{const{date:h}=p;return a("div",{class:this.ns.b("day")},[a("p",{class:this.ns.b("date-text")},[h.getDate()]),a("div",{class:this.ns.b("items")},[o(h)])])}}),a("div",{class:this.ns.b("footer")},[(u=this.c.model.sysCalendarItems)==null?void 0:u.map(p=>{let h=p.name;return p.nameLanguageRes&&(h=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),h])})])])},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 h=(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:()=>[h?.layoutPanel?e(u,h.layoutPanel):n(u)]})}):s()]})]),c=()=>{switch(this.c.model.calendarStyle){case"TIMELINE":return l();default:return i()}};return a(d("iBizControlBase"),{controller:this.c},_v(t=c())?t:{default:()=>[t]})}});var Bv=Object.defineProperty,Sv=(t,e,n)=>e in t?Bv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Av=(t,e,n)=>(Sv(t,typeof e!="symbol"?e+"":e,n),n);class Fv{constructor(){Av(this,"component","IBizCalendarControl")}}const xv=O("al",M(fo,function(t){t.component(fo.name,fo),re(Q.CALENDAR,()=>new Fv)})),bo=B({name:"IBizKanbanControl",components:{draggable:Gn},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=te((...w)=>new mi(...w)),r=_(`control-${n.model.controlType.toLowerCase()}`),o=A(()=>!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,I)=>(I.stopPropagation(),n.onRowClick(w)),c=(w,I)=>(I.stopPropagation(),n.onDbRowClick(w)),u=(w,I)=>{const{context:S,params:y}=n;return a(d("iBizControlShell"),{data:w,modelData:I,context:S,params:y},null)},p=w=>{var I;return a(d("iBizActionToolbar"),{class:r.bem("item","bottom","actions"),"action-details":(I=n.getOptItemModel().deuiactionGroup)==null?void 0:I.uiactionGroupDetails,"actions-state":n.getOptItemAction(w),onActionClick:(S,y)=>n.onActionClick(S,w,y)},null)},h=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 I=n.state.selectedData.findIndex(P=>P.srfkey===w.srfkey),S=[r.b("item"),r.is("selected",I!==-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 E=t.modelData.itemLayoutPanel;return a(d("el-card"),{shadow:"hover",class:S,"body-style":y,onClick:P=>l(w,P),onDblclick:P=>c(w,P)},{default:()=>[E?u(w,E):h(w)]})},g=()=>{if(n.state.isLoaded)return a(d("iBizNoData"),{text:n.model.emptyText,emptyTextLanguageRes:n.model.emptyTextLanguageRes},null)};let b=null;const m=(w,I)=>{w.moved&&n.onDragChange({from:I,to:I,fromIndex:w.moved.oldIndex,toIndex:w.moved.newIndex}),w.added&&(b={to:I,toIndex:w.added.newIndex}),w.removed&&(b&&(b.from=I,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:I=>{n.onClickNew(I,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:(I,S)=>{n.onGroupToolbarClick(I,S,w)}},null)])]),a(Gn,{class:r.be("group","list"),modelValue:w.children,group:n.model.id,itemKey:"srfkey",disabled:o.value,onChange:I=>m(I,w.key)},{item:({element:I})=>v(I),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 Ov=Object.defineProperty,Tv=(t,e,n)=>e in t?Ov(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Nv=(t,e,n)=>(Tv(t,typeof e!="symbol"?e+"":e,n),n);class zv{constructor(){Nv(this,"component","IBizKanbanControl")}}const Rv=O("am",M(bo,function(t){t.component(bo.name,bo),re(Q.KANBAN,()=>new zv)})),vo=B({name:"IBizTreeGridExControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup(){const t=te((...u)=>new fi(...u)),e=_(`control-${t.model.controlType.toLowerCase()}`),n=_("control-grid"),r=()=>{const{isLoaded:u}=t.state;return u&&a(d("iBizNoData"),{text:t.model.emptyText,emptyTextLanguageRes:t.model.emptyTextLanguageRes},null)},o=A(()=>{const u=[];return t.state.columnStates.forEach(p=>{var h,v;if(p.hidden)return;const g=((h=t.fieldColumns[p.key])==null?void 0:h.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=A(()=>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,h)=>{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)}h(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(h=>h.key===i),p=r===this.renderColumns.length-1?"min-width":"width";return a(d("el-table-column"),Tt({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:h})=>{const v=h,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 ne(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 $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","IBizTreeGridExControl")}}const jv=O("an",M(vo,function(t){t.component(vo.name,vo),re(Q.TREE_GRIDEX,()=>new Vv)})),go=B({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=te((...x)=>new bi(...x)),n=_("control-grid"),r=_(`control-${e.model.controlType.toLowerCase()}`),{tableRef:o,onRowClick:i,onDbRowClick:s,onSelectionChange:l,onSortChange:c,handleRowClassName:u}=Pr(e),{onPageChange:p,onPageRefresh:h,onPageSizeChange:v}=Fs(e),{renderColumns:g,defaultSort:b,summaryMethod:m}=Ir(e,t),{renderPopover:f}=xs(o,e);let w="",I="";(()=>{var x,R;const U=(x=e.model.degridColumns)==null?void 0:x.find(H=>H.treeColumnMode===4||H.treeColumnMode===12),z=(R=e.model.degridColumns)==null?void 0:R.find(H=>H.treeColumnMode===2||H.treeColumnMode===3);if(!U)throw new me(e.model,"\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");if(!z)throw new me(e.model,"\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");w=z.appDEFieldId.toLowerCase(),I=U.appDEFieldId.toLowerCase()})();const y=x=>(x.hasChildren=e.state.items.some(R=>x[w]===R[I]),x.children=[],x),E=A(()=>e.state.rows.map(z=>y(z.data)).filter(z=>!z[I]));return{c:e,ns:n,ns2:r,tableRef:o,tableData:E,renderColumns:g,defaultSort:b,onDbRowClick:s,onRowClick:i,onSelectionChange:l,onSortChange:c,onPageChange:p,onPageSizeChange:v,onPageRefresh:h,handleRowClassName:u,renderNoData:()=>{const{isLoaded:x}=e.state;return x&&a(d("iBizNoData"),{text:e.model.emptyText,emptyTextLanguageRes:e.model.emptyTextLanguageRes},null)},loadData:async(x,R,U)=>{const z=e.state.items.filter(H=>x[w]===H[I]);U(z)},summaryMethod:m,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)=>Dr(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 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","IBizTreeGridControl")}}const Wv=O("ao",M(go,function(t){t.component(go.name,go),re(Q.TREEGRID,()=>new qv)}));function Hv(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Co=B({name:"IBizMEditViewPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup(){const t=te((...s)=>new vi(...s)),e=_(`control-${t.model.controlType.toLowerCase()}`),n=D(null),r=D(0);let o=null;const i=s=>{t.handleDelete(s)};return Ie(()=>{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}))}),ze(()=>{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},Hv(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&&ne(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},[[ne(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 Kv=Object.defineProperty,Xv=(t,e,n)=>e in t?Kv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yv=(t,e,n)=>(Xv(t,typeof e!="symbol"?e+"":e,n),n);class Jv{constructor(){Yv(this,"component","IBizMEditViewPanelControl")}}const Qv=O("ap",M(Co,function(t){t.component(Co.name,Co),re(Q.MULTI_EDIT_VIEWPANEL,()=>new Jv)})),nl=B({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=te((...o)=>new gi(...o)),e=_(`control-${t.model.controlType.toLowerCase()}`),n=D(),r=A(()=>({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 Zv=Object.defineProperty,eg=(t,e,n)=>e in t?Zv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tg=(t,e,n)=>(eg(t,typeof e!="symbol"?e+"":e,n),n);class ng{constructor(){tg(this,"component","IBizMapControl")}}const rg=O("aq",{install(t){t.component(nl.name,nl),re(Q.MAP,()=>new ng)}});function og(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const wo=B({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=te((...r)=>new Ci(...r)),e=_(`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,[N("\u6682\u672A\u5B9E\u73B0")])}}}},render(){let t;if(this.c.state.isCreated)return a(d("iBizControlBase"),{controller:this.c},og(t=this.renderContent())?t:{default:()=>[t]})}});var ag=Object.defineProperty,ig=(t,e,n)=>e in t?ag(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sg=(t,e,n)=>(ig(t,typeof e!="symbol"?e+"":e,n),n);class lg{constructor(){sg(this,"component","IBizReportPanelControl")}}const yo=B({name:"IBizUserReportPanel",props:{controller:{type:Object}},setup(t){const e=t.controller,n=_("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,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=M(yo,function(t){t.component(yo.name,yo)}),Po=B({name:"IBizUser2ReportPanel",props:{controller:{type:Object}},setup(t){const e=t.controller,n=_("user2-report-panel");window.handleCallClick=async i=>{if(!e)return;const s=await wi.execScriptFn({view:e.view,context:e.context,params:e.params,data:{}},i,{isAsync:!0});console.log("\u8C03\u7528view.call\u8FD4\u56DE\u6570\u636E",s)};const r=e&&e.generator,o=A(()=>{if(!e)return"";const s=e.state.data;return s?s.replace(/onClick="(.*?)"/g,function(l,c){return`onclick="handleCallClick('${c}')"`}):""});return{c:e,ns:n,generator:r,computedValue:o}},render(){return this.c?this.c.state.isLoaded?a("div",{class:this.ns.e("container"),innerHTML:this.computedValue},null):a("div",{class:this.ns.e("empty")},[N("\u6682\u65E0\u6570\u636E")]):void 0}}),ug=M(Po,function(t){t.component(Po.name,Po)}),dg=O("ar",M(wo,function(t){t.use(cg),t.use(ug),t.component(wo.name,wo),re(Q.REPORT_PANEL,()=>new lg)})),rl=B({name:"NotSupportedEditor",props:{modelData:{type:Object,required:!0}},setup(){return{ns:_("not-supported-editor")}},render(){return a("div",{class:this.ns.b()},[N("\u672A\u652F\u6301\u7684\u7F16\u8F91\u5668\u7C7B\u578B - "),this.modelData.editorType])}});var pg=O("c",typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{});function hg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ol={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(pg,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(m){return(m=+m)+(m>68?1900:2e3)},u=function(m){return function(f){this[m]=+f}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(f){if(!f||f==="Z")return 0;var w=f.match(/([+-]|\d\d)/g),I=60*w[1]+(+w[2]||0);return I===0?0:w[0]==="+"?-I:I}(m)}],h=function(m){var f=l[m];return f&&(f.indexOf?f:f.s.concat(f.f))},v=function(m,f){var w,I=l.meridiem;if(I){for(var S=1;S<=24;S+=1)if(m.indexOf(I(S,0,f))>-1){w=S>12;break}}else w=m===(f?"pm":"PM");return w},g={A:[s,function(m){this.afternoon=v(m,!1)}],a:[s,function(m){this.afternoon=v(m,!0)}],S:[/\d/,function(m){this.milliseconds=100*+m}],SS:[o,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],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(m){var f=l.ordinal,w=m.match(/\d+/);if(this.day=w[0],f)for(var I=1;I<=31;I+=1)f(I).replace(/\[|\]/g,"")===m&&(this.day=I)}],M:[i,u("month")],MM:[o,u("month")],MMM:[s,function(m){var f=h("months"),w=(h("monthsShort")||f.map(function(I){return I.slice(0,3)})).indexOf(m)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[s,function(m){var f=h("months").indexOf(m)+1;if(f<1)throw new Error;this.month=f%12||f}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(m){this.year=c(m)}],YYYY:[/\d{4}/,u("year")],Z:p,ZZ:p};function b(m){var f,w;f=m,w=l&&l.formats;for(var I=(m=f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(R,U,z){var H=z&&z.toUpperCase();return U||w[z]||n[z]||w[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(W,J,Z){return J||Z.slice(1)})})).match(r),S=I.length,y=0;y<S;y+=1){var E=I[y],P=g[E],F=P&&P[0],x=P&&P[1];I[y]=x?{regex:F,parser:x}:E.replace(/^\[|\]$/g,"")}return function(R){for(var U={},z=0,H=0;z<S;z+=1){var W=I[z];if(typeof W=="string")H+=W.length;else{var J=W.regex,Z=W.parser,k=R.slice(H),V=J.exec(k)[0];Z.call(U,V),R=R.replace(V,"")}}return function(T){var L=T.afternoon;if(L!==void 0){var q=T.hours;L?q<12&&(T.hours+=12):q===12&&(T.hours=0),delete T.afternoon}}(U),U}}return function(m,f,w){w.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(c=m.parseTwoDigitYear);var I=f.prototype,S=I.parse;I.parse=function(y){var E=y.date,P=y.utc,F=y.args;this.$u=P;var x=F[1];if(typeof x=="string"){var R=F[2]===!0,U=F[3]===!0,z=R||U,H=F[2];U&&(H=F[2]),l=this.$locale(),!R&&H&&(l=w.Ls[H]),this.$d=function(k,V,T){try{if(["x","X"].indexOf(V)>-1)return new Date((V==="X"?1e3:1)*k);var L=b(V)(k),q=L.year,Y=L.month,K=L.day,ae=L.hours,ce=L.minutes,he=L.seconds,fe=L.milliseconds,Ce=L.zone,ue=new Date,Se=K||(q||Y?1:ue.getDate()),Ke=q||ue.getFullYear(),Zt=0;q&&!Y||(Zt=Y>0?Y-1:ue.getMonth());var $o=ae||0,Lo=ce||0,Mo=he||0,Vo=fe||0;return Ce?new Date(Date.UTC(Ke,Zt,Se,$o,Lo,Mo,Vo+60*Ce.offset*1e3)):T?new Date(Date.UTC(Ke,Zt,Se,$o,Lo,Mo,Vo)):new Date(Ke,Zt,Se,$o,Lo,Mo,Vo)}catch{return new Date("")}}(E,x,P),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),z&&E!=this.format(x)&&(this.$d=new Date("")),l={}}else if(x instanceof Array)for(var W=x.length,J=1;J<=W;J+=1){F[1]=x[J-1];var Z=w.apply(this,F);if(Z.isValid()){this.$d=Z.$d,this.$L=Z.$L,this.init();break}J===W&&(this.$d=new Date(""))}else S.call(this,y)}}})})(ol);var mg=ol.exports,fg=hg(mg);_e.extend(fg);function bg(t,e){return t===e?!1:_e(t,e,!0).isValid()}const al=B({name:"IBizSpan",props:un(),setup(t,{emit:e}){var n;const r=_("span"),o=t.controller,i=D(""),s=o.codeList,l=o.model.textSeparator||((n=o.editorParams)==null?void 0:n.TEXTSEPARATOR)||",";j(()=>t.value,(p,h)=>{if(p!==h){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 m=[];p.forEach(f=>{m.push(f[o.model.objectNameField?o.model.objectNameField:"srfmajortext"])}),i.value=m.join(l)}else if(o.model.editorType==="ADDRESSPICKUP")try{const m=[];JSON.parse(p).forEach(w=>{m.push(w[o.model.objectNameField?o.model.objectNameField:"srfmajortext"])}),i.value=m.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&&zi.isDate(g))i.value=_e(p).format(v);else{const m=_e(p).format(v);bg(m,v)?i.value=m: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=D([]);s&&j(()=>t.data,p=>{o.loadCodeList(p).then(h=>{c.value=h})},{immediate:!0,deep:!0});const{componentRef:u}=be(()=>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])}}),il=B({name:"IBizSpanLink",props:un(),emits:ee(),setup(t,{emit:e}){const n=_("span-link"),r=t.controller,o=D("");j(()=>t.value,(l,c)=>{l&&l!==c&&(o.value=`${l}`)},{immediate:!0});const i=async()=>{await r.openLinkView(t.data)},{componentRef:s}=be(()=>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 vg=Object.defineProperty,gg=(t,e,n)=>e in t?vg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sl=(t,e,n)=>(gg(t,typeof e!="symbol"?e+"":e,n),n);class Cg extends Qe{constructor(){super(...arguments),sl(this,"valueItem",""),sl(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 me(this.model,"\u8BF7\u914D\u7F6E\u6570\u636E\u94FE\u63A5\u89C6\u56FE");return ibiz.commands.execute(Ze.TAG,i,r,o)}}var wg=Object.defineProperty,yg=(t,e,n)=>e in t?wg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ll=(t,e,n)=>(yg(t,typeof e!="symbol"?e+"":e,n),n);class Wt{constructor(e){ll(this,"formEditor","IBizSpan"),ll(this,"gridEditor","IBizSpan"),e==="SPAN_LINK"&&(this.formEditor="IBizSpanLink",this.gridEditor="IBizSpanLink")}async createController(e,n){const r=new Cg(e,n);return await r.init(),r}}function Pg(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const cl=B({name:"IBizInput",props:ua(),emits:ee(),setup(t,{emit:e}){const n=_("input"),r=t.controller,o=r.model,i=D(),s=D(2);o.editorType==="TEXTAREA_10"&&(s.value=10);const l=A(()=>{switch(o.editorType){case"TEXTBOX":return"text";case"PASSWORD":return"password";case"TEXTAREA":case"TEXTAREA_10":return"textarea";default:return"string"}}),c=D("");j(()=>t.value,(E,P)=>{E!==P&&(E==null?c.value="":c.value=E.toString())},{immediate:!0});let u=!1,p,h;const v=et(E=>{h!==E&&e("change",E),h=void 0,u=!1,p&&p()},300,{leading:!0}),g=E=>{u=!0,v(E)},b=E=>{E&&E.code==="Enter"&&(e("enter",E),u&&(p=()=>{i.value.$el.dispatchEvent(E)}))},m=E=>{h=E.target.value,e("change",h),e("blur",E)};t.autoFocus&&j(i,E=>{if(E){const P=l.value==="textarea"?"textarea":"input";E.$el.getElementsByTagName(P)[0].focus()}});const f=E=>{e("focus",E)};let w;const I=async()=>{var E;if(r.deService){const P=await Fe.import("@ibiz-template-plugin/ai-chat"),F=P.chat||P.default.chat;w=F;const x=F.create({question:async U=>{var z;const H=Oe();return await((z=r.deService)==null?void 0:z.aiChatSse(W=>{if(ibiz.log.info("aiChatSse",W),W.actionstate===20&&W.actionresult)x.addMessage({messageid:H,state:W.actionstate,type:"DEFAULT",role:"ASSISTANT",content:W.actionresult});else if(W.actionstate===30&&W.actionresult){const Z=JSON.parse(W.actionresult).choices;Z&&Z.length>0&&x.replaceMessage({messageid:H,state:W.actionstate,type:"DEFAULT",role:"ASSISTANT",content:Z[0].content||""})}else W.actionstate===40&&x.replaceMessage({messageid:H,state:W.actionstate,type:"ERROR",role:"ASSISTANT",content:W.actionresult})},r.context,{},{messages:U})),x.addMessage({messageid:H,state:10,type:"DEFAULT",role:"ASSISTANT",content:""}),!0},action:(U,z)=>{U==="backfill"&&g(z.content)}}),R=await((E=r.deService)==null?void 0:E.aiChatHistory(r.context,{}));R.data&&Array.isArray(R.data)&&R.data.forEach(U=>{const z={messageid:Oe(),state:30,type:"DEFAULT",role:U.role,content:U.content};x.addMessage(z)})}};ze(()=>{w&&w.close()});const S=A(()=>{const{unitName:E}=t.controller.parent;let P=`${c.value}`;return P&&E&&(P+=E),P}),y=A(()=>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:S,handleChange:g,handleKeyUp:b,onBlur:m,onFocus:f,inputRef:i,onClick:I,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},Pg(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])}}),ul=B({name:"IBizInputNumber",props:da(),emits:ee(),setup(t,{emit:e}){const n=_("input-number"),r=t.controller,o=D("");j(()=>t.value,(p,h)=>{if(p!==h){const v=Number(p);o.value=Number.isNaN(v)?"":v}},{immediate:!0});const i=p=>{e("change",p)},s=D();return t.autoFocus&&j(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])}}),dl=B({name:"IBizInputIP",props:pa(),emits:ee(),setup(t,{emit:e}){const n=_("input-ip"),r=t.controller,o=D([]),i=D(!1),s=D(!1),l=D(""),c=D(""),u=D(""),p=D("");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 h=(b,m,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=m,o.value[w]=m),l.value&&c.value&&u.value&&p.value&&e("change",`${l.value}.${c.value}.${u.value}.${p.value}`)};return j(l,(b,m)=>{h(b,m,l,0)}),j(c,(b,m)=>{h(b,m,c,1)}),j(u,(b,m)=>{h(b,m,u,2)}),j(p,(b,m)=>{h(b,m,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),N("."),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),N("."),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),N("."),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 Ig=Object.defineProperty,Eg=(t,e,n)=>e in t?Ig(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ve=(t,e,n)=>(Eg(t,typeof e!="symbol"?e+"":e,n),n);class Dg extends se{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?ve(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 ft(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 _g=Object.defineProperty,Bg=(t,e,n)=>e in t?_g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pl=(t,e,n)=>(Bg(t,typeof e!="symbol"?e+"":e,n),n);class Io{constructor(e){pl(this,"formEditor","IBizInput"),pl(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 Dg(e,n);return await r.init(),r}}function Sg(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const hl=B({name:"IBizDropdown",props:ha(),emits:ee(),setup(t,{emit:e}){const n=_("dropdown"),r=t.controller,o=D([]),i=D(!1),s=D([]),l=A(()=>r.model.editorType==="DROPDOWNLIST_100"?n.cssVarBlock({width:"100px"}):{}),c=f=>{if(f.length===0)return[];const w=[];return f.forEach(I=>{const S={label:I.text,value:I.value.toString(),disabled:I.disableSelect===!0,children:[]};I.children&&I.children.length>0&&(S.children=c(I.children)),w.push(S)}),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=A({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=A(()=>{const f=Array.isArray(u.value)?u.value:[u.value];return o.value.filter(w=>{let I=!1;return f.forEach(S=>{S==w.value&&(I=!0)}),I}).map(w=>w.text).join(",")});j(p,(f,w)=>{f!==w&&e("infoTextChange",f)},{immediate:!0});const h=D();return t.autoFocus&&j(h,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:h,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},Sg(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 Ag=Object.defineProperty,Fg=(t,e,n)=>e in t?Ag(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xg=(t,e,n)=>(Fg(t,typeof e!="symbol"?e+"":e,n),n);class Og extends Qe{constructor(){super(...arguments),xg(this,"multiple",!1)}async onInit(){super.onInit(),this.model.editorType==="MDROPDOWNLIST"&&(this.multiple=!0)}}var Tg=Object.defineProperty,Ng=(t,e,n)=>e in t?Tg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ml=(t,e,n)=>(Ng(t,typeof e!="symbol"?e+"":e,n),n);class Ht{constructor(){ml(this,"formEditor","IBizDropdown"),ml(this,"gridEditor","IBizDropdown")}async createController(e,n){const r=new Og(e,n);return await r.init(),r}}const fl=B({name:"IBizCheckbox",props:ma(),emits:ee(),setup(t,{emit:e}){var n,r;const o=_("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=A({get(){return t.value==l},set(h){let v;h?v=l:v=c,e("change",v)}}),{componentRef:p}=be(()=>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 zg extends se{}var Rg=Object.defineProperty,$g=(t,e,n)=>e in t?Rg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bl=(t,e,n)=>($g(t,typeof e!="symbol"?e+"":e,n),n);class Lg{constructor(){bl(this,"formEditor","IBizCheckbox"),bl(this,"gridEditor","IBizGridCheckbox")}async createController(e,n){const r=new zg(e,n);return await r.init(),r}}function Mg(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const vl=B({name:"IBizCheckboxList",props:fa(),emits:ee(),setup(t,{emit:e}){const n=_("checkbox-list"),r=t.controller,o=r.codeList,i=D([]);j(()=>t.data,v=>{r.loadCodeList(v).then(g=>{i.value=g})},{immediate:!0,deep:!0});const s=A(()=>o&&o.orMode?o.orMode.toLowerCase():"str");let l=",";o&&o.valueSeparator&&(l=o.valueSeparator);const c=A({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,m=g.length;b<m;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(m=>{const f=typeof m=="string"?parseInt(m,10):m;b|=f}),g=b}else if(Object.is(s.value,"str")){const b=[];i.value.length>0&&(i.value.forEach(m=>{v.findIndex(w=>Object.is(m.value,w))!==-1&&b.push(m.value)}),g=b.join(l))}e("change",g)}}),u=v=>{c.value=v},p=A(()=>{const v=Array.isArray(c.value)?c.value:[c.value];return i.value.filter(g=>{let b=!1;return v.forEach(m=>{m==g.value&&(b=!0)}),b}).map(g=>g.text).join(",")});j(p,(v,g)=>{v!==g&&e("infoTextChange",v)},{immediate:!0});const{componentRef:h}=be(()=>e("focus"),()=>e("blur"));return{ns:n,items:i,selectArray:c,valueText:p,editorRef:h,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},Mg(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 Vg=Object.defineProperty,jg=(t,e,n)=>e in t?Vg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kg=(t,e,n)=>(jg(t,typeof e!="symbol"?e+"":e,n),n);class Ug extends Qe{constructor(){super(...arguments),kg(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 Gg=Object.defineProperty,qg=(t,e,n)=>e in t?Gg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gl=(t,e,n)=>(qg(t,typeof e!="symbol"?e+"":e,n),n);class Cl{constructor(){gl(this,"formEditor","IBizCheckboxList"),gl(this,"gridEditor","IBizCheckboxList")}async createController(e,n){const r=new Ug(e,n);return await r.init(),r}}function Wg(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const wl=B({name:"IBizRadio",props:ba(),emits:ee(),setup(t,{emit:e}){const n=_("radio"),r=t.controller,o=r.model,i=u=>{e("change",u)},s=D([]);j(()=>t.data,u=>{r.loadCodeList(u).then(p=>{s.value=p})},{immediate:!0,deep:!0});const l=A(()=>{var u;return((u=s.value.find(p=>p.value==t.value))==null?void 0:u.text)||""});j(l,(u,p)=>{u!==p&&e("infoTextChange",u)},{immediate:!0});const{componentRef:c}=be(()=>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":jn(this.value)?String(this.value):"",onChange:this.onSelectValueChange},Wg(t=this.items.map((e,n)=>a(d("el-radio"),{key:n,label:jn(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 Hg extends Qe{}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,yl=(t,e,n)=>(Xg(t,typeof e!="symbol"?e+"":e,n),n);class Pl{constructor(){yl(this,"formEditor","IBizRadio"),yl(this,"gridEditor","IBizRadio")}async createController(e,n){const r=new Hg(e,n);return await r.init(),r}}const Il=B({name:"IBizDatePicker",props:va(),emits:ee(),setup(t,{emit:e}){const n=_("date-picker"),r=t.controller,o=r.model,i=D("date"),s=D("YYYY-MM-DD"),l=D(!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=D();j(()=>t.value,(m,f)=>{if(m&&m!==f){const w=_e(m).format(c);w!=="Invalid Date"?u.value=w:u.value=m}},{immediate:!0});const p=(m,f)=>{e("change",m)},h=m=>{},v=D();t.autoFocus&&j(v,m=>{m&&m.$el.getElementsByTagName("input")[0].click()});const g=m=>{e("focus",m)},b=m=>{e("blur",m)};return j(u,(m,f)=>{m!==f&&e("infoTextChange",m)},{immediate:!0}),{ns:n,c:r,editorModel:o,type:i,format:s,formatValue:u,handleChange:p,onOpenChange:h,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 Yg=Object.defineProperty,Jg=(t,e,n)=>e in t?Yg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qg=(t,e,n)=>(Jg(t,typeof e!="symbol"?e+"":e,n),n);class Zg extends se{constructor(){super(...arguments),Qg(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 eC=Object.defineProperty,tC=(t,e,n)=>e in t?eC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,El=(t,e,n)=>(tC(t,typeof e!="symbol"?e+"":e,n),n);class Dl{constructor(){El(this,"formEditor","IBizDatePicker"),El(this,"gridEditor","IBizDatePicker")}async createController(e,n){const r=new Zg(e,n);return await r.init(),r}}const _l=B({name:"IBizRaw",props:dn(),emits:ee(),setup(t){var e,n,r,o;const i=_("raw"),l=t.controller.model,c=D("");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
+ `)),j(()=>t.value,async(h,v)=>{if(h!==v&&((typeof h=="string"||typeof h=="number")&&(c.value=h),p&&h)){let g=null;if(typeof h=="string")try{g=JSON.parse(h)}catch{ibiz.log.error("JSON\u5B57\u7B26\u4E32\u8F6C\u6362\u9519\u8BEF")}c.value=await ibiz.util.hbs.render(p,g||h)}},{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 nC extends se{}var rC=Object.defineProperty,oC=(t,e,n)=>e in t?rC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bl=(t,e,n)=>(oC(t,typeof e!="symbol"?e+"":e,n),n);class Sl{constructor(){Bl(this,"formEditor","IBizRaw"),Bl(this,"gridEditor","IBizRaw")}async createController(e,n){const r=new nC(e,n);return await r.init(),r}}const Al=B({name:"IBizStepper",props:ga(),emits:ee(),setup(t,{emit:e}){const n=_("stepper"),r=t.controller,o=r.model,i=D(null);let s=1,l=0,c=1/0,u=-1/0;o.editorParams&&(o.editorParams.stepvalue&&(s=ve(o.editorParams.stepvalue)),o.editorParams.precision&&(l=ve(o.editorParams.precision)),o.editorParams.maxvalue&&(c=ve(o.editorParams.maxvalue)),o.editorParams.minvalue&&(u=ve(o.editorParams.minvalue))),j(()=>t.value,(b,m)=>{if(b!==m){const f=Number(b);i.value=Number.isNaN(f)?0:f}},{immediate:!0});const p=b=>{e("change",b)},h=D();return{ns:n,c:r,currentVal:i,handleChange:p,inputRef:h,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 aC extends se{}var iC=Object.defineProperty,sC=(t,e,n)=>e in t?iC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fl=(t,e,n)=>(sC(t,typeof e!="symbol"?e+"":e,n),n);class lC{constructor(){Fl(this,"formEditor","IBizStepper"),Fl(this,"gridEditor","IBizStepper")}async createController(e,n){const r=new aC(e,n);return await r.init(),r}}const xl=B({name:"IBizRate",props:Ca(),emits:ee(),setup(t,{emit:e}){const n=_("rate"),r=D(),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=ve(i.editorParams.maxvalue)),i.editorParams.texts&&(u=o.toObj(i.editorParams.texts))),j(()=>t.value,(v,g)=>{v!==g&&(v?r.value=v:r.value=0)},{immediate:!0});const p=v=>{e("change",v)},{componentRef:h}=be(()=>e("focus"),()=>e("blur"));return{ns:n,currentVal:r,handleChange:p,colors:s,showText:l,max:c,texts:u,editorRef:h}},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 cC extends se{}var uC=Object.defineProperty,dC=(t,e,n)=>e in t?uC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ol=(t,e,n)=>(dC(t,typeof e!="symbol"?e+"":e,n),n);class Tl{constructor(){Ol(this,"formEditor","IBizRate"),Ol(this,"gridEditor","IBizRate")}async createController(e,n){const r=new cC(e,n);return await r.init(),r}}const Nl=B({name:"IBizSwitch",props:wa(),emits:ee(),setup(t,{emit:e}){const n=_("switch"),r=t.controller,o=r.model,i=D(!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 h=c.find(g=>g.value===0);h&&(l=h.label);const v=c.find(g=>g.value===1);v&&(s=v.label)}j(()=>t.value,(h,v)=>{h!==v&&(h?i.value=t.value==1:i.value=!1)},{immediate:!0});const u=h=>{e("change",h===!0?1:0)},{componentRef:p}=be(()=>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 pC extends se{}var hC=Object.defineProperty,mC=(t,e,n)=>e in t?hC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zl=(t,e,n)=>(mC(t,typeof e!="symbol"?e+"":e,n),n);class Rl{constructor(){zl(this,"formEditor","IBizSwitch"),zl(this,"gridEditor","IBizSwitch")}async createController(e,n){const r=new pC(e,n);return await r.init(),r}}const $l=B({name:"IBizSlider",props:ya(),emits:ee(),setup(t,{emit:e}){const n=_("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=ve(o.editorParams.stepvalue)),o.editorParams.maxvalue&&(s=ve(o.editorParams.maxvalue)),o.editorParams.minvalue&&(l=ve(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 h=D();j(()=>t.value,(b,m)=>{b!==m&&(b==null?u?h.value=[0,1]:h.value=0:u?h.value=JSON.parse(b):h.value=Number(b))},{immediate:!0});const v=b=>{Array.isArray(b)?e("change",JSON.stringify(b)):e("change",b)},{componentRef:g}=be(()=>e("focus"),()=>e("blur"));return{ns:n,currentVal:h,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 fC extends se{async onInit(){super.onInit(),this.model.precision&&ibiz.log.warn("\u6ED1\u52A8\u8F93\u5165\u6761\u4E0D\u652F\u6301\u914D\u7F6E\u7CBE\u5EA6")}}var bC=Object.defineProperty,vC=(t,e,n)=>e in t?bC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ll=(t,e,n)=>(vC(t,typeof e!="symbol"?e+"":e,n),n);class Ml{constructor(){Ll(this,"formEditor","IBizSlider"),Ll(this,"gridEditor","IBizSlider")}async createController(e,n){const r=new fC(e,n);return await r.init(),r}}function Vl(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const jl=B({name:"IBizListBox",props:Pa(),emits:ee(),setup(t,{emit:e}){const n=_("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=D([]);(async()=>{if(Object.is("LISTBOX",l))r.loadCodeList(t.data).then(f=>{c.value=f});else if(Object.is("LISTBOXPICKUP",l)){const m=r;if(m.model.appDataEntityId){const f=await m.getServiceData(t.data);f&&(c.value=f.data.map(w=>({value:w[m.keyName],text:w[m.textName]})))}}})();const p=A(()=>s&&s.orMode?s.orMode.toLowerCase():"str");let h=",";s&&s.valueSeparator&&(h=s.valueSeparator);const v=D([]);j(()=>t.value,m=>{if(Te(m))v.value=[];else if(i){let f=[];if(l==="LISTBOX"){if(Object.is(p.value,"num")&&c){const w=typeof m=="string"?parseInt(m,10):m;c.value.forEach(I=>{(w&I.value)===I.value&&f.push(I.value)})}else if(Object.is(p.value,"str")&&m!==""&&s&&typeof m=="string"&&(f=m.split(h),s.codeItemValueNumber))for(let w=0,I=f.length;w<I;w++)f[w]=Number(f[w])}else l==="LISTBOXPICKUP"&&m!==""&&(f=m.split(h));v.value=f}else v.value=[m]},{immediate:!0,deep:!0});const g=m=>{let f;if(i){const w=[...m];if(Object.is("LISTBOX",l))if(Object.is(p,"num")){let I=0;w.forEach(S=>{I|=parseInt(S,10)}),f=I}else Object.is(p,"str")&&(f=w.join(h));else Object.is("LISTBOXPICKUP",l)&&(f=w.join(h))}else f=m;e("change",f)},{componentRef:b}=be(()=>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},Vl(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]},Vl(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 gC=Object.defineProperty,CC=(t,e,n)=>e in t?gC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wC=(t,e,n)=>(CC(t,typeof e!="symbol"?e+"":e,n),n);class yC extends Qe{constructor(){super(...arguments),wC(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 PC=Object.defineProperty,IC=(t,e,n)=>e in t?PC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Eo=(t,e,n)=>(IC(t,typeof e!="symbol"?e+"":e,n),n);class EC extends se{constructor(){super(...arguments),Eo(this,"keyName","srfkey"),Eo(this,"textName","srfmajortext"),Eo(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=$t(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 me(this.model,"\u8BF7\u914D\u7F6E\u5B9E\u4F53\u548C\u5B9E\u4F53\u6570\u636E\u96C6")}}var DC=Object.defineProperty,_C=(t,e,n)=>e in t?DC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kl=(t,e,n)=>(_C(t,typeof e!="symbol"?e+"":e,n),n);class Ul{constructor(){kl(this,"formEditor","IBizListBox"),kl(this,"gridEditor","IBizListBox")}async createController(e,n){let r;return e.editorType==="LISTBOXPICKUP"?r=new EC(e,n):r=new yC(e,n),await r.init(),r}}const Gl=B({name:"IBizAutoComplete",props:Ia(),emits:ee(),setup(t,{emit:e}){const n=_("autocomplete"),r=t.controller,o=r.model.editorType,i=D(""),s=D([]);j(s,(P,F)=>{if(F.length===0&&P.length>0){const x=P.findIndex(R=>Object.is(R[r.keyName],t.value));x!==-1&&(i.value=P[x][r.textName])}});const l=D(!0),c=D();j(()=>t.value,P=>{if(P||P===null){P===null&&(i.value="");const F=s.value.findIndex(x=>Object.is(x[r.keyName],P));F!==-1?i.value=s.value[F][r.textName]:i.value=P}},{immediate:!0});const u=async P=>{const F=await r.calcFillDataItems(P);F.length&&F.forEach(x=>{e("change",x.value,x.id)}),e("change",P[r.keyName])},p=async P=>{await u(P),l.value=!0},h=async(P,F)=>{if(r.model.appDataEntityId){const x=P.trim(),R=await r.getServiceData(x,t.data);R&&(s.value=R.data,F&&F instanceof Function&&F(s.value))}};h("");const v=()=>{const P=r.dataItems;P.length>0&&P.forEach(F=>{e("change",null,F.id)}),e("change",null)},g=P=>{e("focus",P)},b=P=>{e("blur",P)},m=A(()=>!Object.is("AC_NOBUTTON",o)),f=A(()=>!(Object.is("AC_NOBUTTON",o)||Object.is("AC_FS_NOBUTTON",o)));let w=!1,I;const S=et(P=>{I!==P&&e("change",P),I=void 0,w=!1},300,{leading:!0});return{ns:n,c:r,curValue:i,triggerOnFocus:m,autoCompleteClearable:f,autoCompleteRef:c,onSearch:h,onClear:v,onFocus:g,onBlur:b,onACSelect:p,items:s,handleInput:P=>{o!=="AC_FS"&&o!=="AC_FS_NOBUTTON"&&(w=!0,S(P))},isDebounce:w,handleKeyUp:P=>{P&&P.code==="Enter"&&e("enter",P)}}},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 BC=Object.defineProperty,SC=(t,e,n)=>e in t?BC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,at=(t,e,n)=>(SC(t,typeof e!="symbol"?e+"":e,n),n);class AC extends se{constructor(){super(...arguments),at(this,"keyName","srfkey"),at(this,"textName","srfmajortext"),at(this,"interfaceName",""),at(this,"sort",""),at(this,"deACMode"),at(this,"dataItems",[])}async onInit(){if(super.onInit(),this.model.appDataEntityId&&(this.model.appDEDataSetId&&(this.interfaceName=this.model.appDEDataSetId),this.model.appDEACModeId&&(this.deACMode=await ft(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=$t(o,i);if(this.interfaceName)return await ibiz.hub.getApp(this.context.srfappid).deService.exec(this.model.appDataEntityId,this.interfaceName,r,s);throw new me(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 FC=Object.defineProperty,xC=(t,e,n)=>e in t?FC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ql=(t,e,n)=>(xC(t,typeof e!="symbol"?e+"":e,n),n);class OC{constructor(){ql(this,"formEditor","IBizAutoComplete"),ql(this,"gridEditor","IBizAutoComplete")}async createController(e,n){const r=new AC(e,n);return await r.init(),r}}function Wl(t,e,n){const r=D([]),o=D({Authorization:`Bearer ${Bi(Ri.TOKEN)}`}),i=D(""),s=D(""),l={count:0,cacheFiles:[]};j(()=>t.value,m=>{r.value=m?JSON.parse(m):[]},{immediate:!0}),j(()=>t.data,m=>{if(m){const f=n.calcBaseUrl(m);i.value=f.uploadUrl,s.value=f.downloadUrl}},{immediate:!0,deep:!0}),j(r,m=>{m?.length&&s.value&&m.forEach(f=>{f.url=f.url||s.value.replace("%fileId%",f.id)})},{immediate:!0}),j(s,m=>{m&&r.value.length&&r.value.forEach(f=>{f.url=s.value.replace("%fileId%",f.id)})},{immediate:!0});const c=()=>{const m=[...r.value,...l.cacheFiles],f=m.length>0?JSON.stringify(m.map(w=>({name:w.name,id:w.id}))):null;l.cacheFiles=[],e(f)},u=()=>{l.count+=1},p=m=>{m&&(l.cacheFiles.push({name:m.filename,id:m.fileid}),l.count-=1,l.count===0&&c())},h=(...m)=>{const f=m[0];throw l.count-=1,new $i({response:{data:JSON.parse(f.message),status:f.status}})},v=m=>{if(t.disabled)return;const f=r.value.findIndex(w=>w.id===m.id);f!==-1&&r.value.splice(f,1),c()},g=m=>{const f=m.url||s.value.replace("%fileId%",m.id);n.fileDownload({url:f,name:m.name})},b=A(()=>n.multiple?9999:1);return{uploadUrl:i,downloadUrl:s,headers:o,files:r,limit:b,onDownload:g,onError:h,onRemove:v,onSuccess:p,beforeUpload:u}}const Hl=B({name:"IBizFileUpload",props:xt(),emits:ee(),setup(t,{emit:e}){const n=_("file-upload"),r=t.controller,{uploadUrl:o,headers:i,files:s,limit:l,onDownload:c,onError:u,onRemove:p,onSuccess:h,beforeUpload:v}=Wl(t,b=>{e("change",b)},r),g=A(()=>l.value===1&&s.value.length===1);return{ns:n,c:r,uploadUrl:o,headers:i,files:s,limit:l,noUploadIcon:g,onDownload:c,onError:u,onRemove:p,onSuccess:h,beforeUpload:v}},render(){return a("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[a(d("el-upload"),{"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:()=>[a(d("el-button"),{class:[this.ns.b("button")],disabled:this.noUploadIcon},{default:()=>[N("\u4E0A\u4F20\u6587\u4EF6")]})]})])}}),Kl=B({name:"IBizImageUpload",props:xt(),emits:ee(),setup(t,{emit:e}){const n=_("image-upload"),r=t.controller,{uploadUrl:o,headers:i,files:s,limit:l,onDownload:c,onError:u,onRemove:p,onSuccess:h,beforeUpload:v}=Wl(t,I=>{e("change",I)},r),g=D(""),b=D(!1),m=I=>{b.value=I},f=I=>{g.value=I.url,b.value=!0},w=A(()=>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:h,onError:u,onRemove:p,onDownload:c,onDialogVisibleChange:m,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},null):null])}}),Xl=B({name:"IBizImagePreview",props:xt(),emits:ee(),setup(t){const e=_("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 TC=Object.defineProperty,NC=(t,e,n)=>e in t?TC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pt=(t,e,n)=>(NC(t,typeof e!="symbol"?e+"":e,n),n);class zC extends se{constructor(){super(...arguments),Pt(this,"isDrag",!1),Pt(this,"multiple",!0),Pt(this,"accept",""),Pt(this,"uploadParams"),Pt(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 me(i,"\u914D\u7F6EuploadParams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F")}if(s)try{this.exportParams=JSON.parse(s)}catch{throw new me(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+=Me.stringify(o,{addQueryPrefix:!0}),r+=Me.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 de("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");if(n.data){const r=e.name;Ct(n.data,r)}else throw new de("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728")})}}var RC=Object.defineProperty,$C=(t,e,n)=>e in t?RC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yl=(t,e,n)=>($C(t,typeof e!="symbol"?e+"":e,n),n);class It{constructor(e){Yl(this,"formEditor","IBizFileUpload"),Yl(this,"gridEditor","IBizGridFileUpload");let n="IBizFileUpload";switch(e){case"PICTURE":case"PICTURE_ONE":n="IBizImageUpload";break;case"PICTURE_ONE_RAW":n="IBizImagePreview";break}this.formEditor=n}async createController(e,n){const r=new zC(e,n);return await r.init(),r}}const Jl=B({name:"IBizPicker",props:Ue(),emits:ee(),setup(t,{emit:e}){const n=_("picker"),r=t.controller,o=D(""),i=D([]),s=D(!0),l=D();j(()=>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 E=t.data[r.valueItem];if(i.value.findIndex(F=>Object.is(F[r.keyName],E))!==-1)return;i.value=[],!Lt(y)&&!Lt(E)&&i.value.push({[r.textName]:y,[r.keyName]:E})}},{immediate:!0});const c=async y=>{const E=await r.calcFillDataItems(y);E.length&&E.forEach(F=>{e("change",F.value,F.id)});const P={};Object.assign(P,y),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",y[r.textName])},u=async y=>{y.stopPropagation();const E=await r.openPickUpView(t.data);E&&E[0]&&await c(E[0])},p=async y=>{y.stopPropagation();const E=await r.openLinkView(t.data);E&&E[0]&&await c(E[0])},h=async y=>{await c(y),s.value=!0},v=async(y,E)=>{if(r.model.appDataEntityId){let P="";y!==t.value&&(P=y.trim());const F=await r.getServiceData(P,t.data);F&&(i.value=F.data,E&&E instanceof Function&&E(i.value))}},g=()=>{const y=r.dataItems;y?.length&&y.forEach(E=>{e("change",null,E.id)}),r.valueItem&&e("change",null,r.valueItem),e("change",null)},b=(r.linkView?1:0)+(r.pickupView?1:0),m=D();t.autoFocus&&j(m,y=>{y&&y.focus()});const f=y=>{e("focus",y)},w=y=>{e("blur",y)},I=y=>{y&&y.code==="Enter"&&e("enter",y)},S=A(()=>Ot(o.value));return j(S,(y,E)=>{y!==E&&e("infoTextChange",y)},{immediate:!0}),{ns:n,c:r,curValue:o,valueText:S,items:i,pickerAutoCompleteRef:l,openPickUpView:u,openLinkView:p,onACSelect:h,onSearch:v,editorRef:m,onClear:g,onFocus:f,onBlur:w,handleKeyUp:I,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 LC(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Ql=B({name:"IBizMPicker",props:Ue(),emits:ee(),setup(t,{emit:e}){const n=_("mpicker"),r=t.controller,o=D([]),i=D([]),s=D([]),l=D(!1),c=D(!1);j(()=>t.value,S=>{if(o.value=[],s.value=[],S){if(r.model.valueType==="OBJECTS")S.forEach(y=>{const E=Ti(y);Object.assign(E,{[r.keyName]:y[r.objectIdField],[r.textName]:y[r.objectNameField]}),r.objectValueField&&(Object.assign(E,{...y[r.objectValueField]}),delete E[r.objectValueField]),E[r.keyName]&&s.value.push(E)});else if(r.objectIdField&&r.model.valueSeparator)S.split(r.model.valueSeparator).forEach(E=>{s.value.push({[r.keyName]:E})});else try{s.value=JSON.parse(S)}catch{ibiz.log.error(`SIMPLE\u7C7B\u578B\u5730\u5740\u680F\u503C\u683C\u5F0F${S}\u4E0D\u7B26\u5408JSON\u5B57\u7B26\u4E32\u8981\u6C42`)}s.value.forEach(y=>{o.value.push(y[r.keyName]),i.value.findIndex(P=>Object.is(P[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=S=>{const y=[];S&&Array.isArray(S)&&S.forEach(P=>{Object.assign(P,{[r.keyName]:P[r.keyName]?P[r.keyName]:P.srfkey,[r.textName]:P[r.textName]?P[r.textName]:P.srfmajortext}),r.model.valueType==="OBJECTS"?y.push(r.handleObjectParams(P)):r.objectIdField?y.push(P[r.keyName]):y.push({[r.keyName]:P[r.keyName],[r.textName]:P[r.textName]}),i.value.findIndex(x=>Object.is(x[r.keyName],P[r.keyName]))<0&&i.value.push(P)});let E=null;y.length>0&&(r.model.valueType==="OBJECTS"?E=y:E=r.objectIdField?y.join(r.model.valueSeparator):JSON.stringify(y)),e("change",E)},p=async()=>{let S;if(s.value.length){const E=JSON.parse(JSON.stringify(s.value));E.forEach((P,F)=>{E[F].srfkey=P[r.keyName],E[F].srfmajortext=P[r.textName]}),S=JSON.stringify(E)}const y=await r.openPickUpView(t.data,S);y&&u(y)},h=S=>{const y=[];let E=null;S.length>0&&(S.forEach(P=>{let F=i.value.findIndex(R=>Object.is(R[r.keyName],P)),x={};F>=0?x=i.value[F]:(F=s.value.findIndex(R=>Object.is(R[r.keyName],P)),F>=0&&(x=s.value[F])),r.model.valueType==="OBJECTS"?y.push(r.handleObjectParams(x)):r.objectIdField?y.push(x[r.keyName]):y.push({[r.keyName]:x[r.keyName],[r.textName]:x[r.textName]})}),y.length>0&&(r.model.valueType==="OBJECTS"?E=y:E=r.objectIdField?y.join(r.model.valueSeparator):JSON.stringify(y)),e("change",E))},v=S=>{const y=s.value.findIndex(E=>Object.is(E[r.keyName],S));if(y>=0){s.value.splice(y,1);const E=[];let P=null;s.value.forEach(F=>{r.model.valueType==="OBJECTS"?E.push(r.handleObjectParams(F)):r.objectIdField?E.push(F[r.keyName]):E.push({[r.keyName]:F[r.keyName],[r.textName]:F[r.textName]})}),E.length>0&&(r.model.valueType==="OBJECTS"?P=E:P=r.objectIdField?E.join(r.model.valueSeparator):JSON.stringify(E)),e("change",P)}},g=async S=>{if(r.model.appDataEntityId){c.value=!0;try{const y=S.trim(),E=await r.getServiceData(y,t.data);c.value=!1,E&&(i.value=E.data)}catch{c.value=!1}}},b=S=>{l.value=S,l.value&&(i.value=[],g(""))},m=A(()=>s.value.map(S=>S[r.textName]).join(","));j(m,(S,y)=>{S!==y&&e("infoTextChange",S)},{immediate:!0});const f=S=>{e("focus",S)},w=S=>{e("blur",S)},I=S=>{S&&S.code==="Enter"&&e("enter",S)};return Ie(()=>{r.objectNameField&&g("")}),{ns:n,c:r,curValue:o,loading:c,items:i,valueText:m,onSearch:g,onOpenChange:b,onSelect:h,onRemove:v,openPickUpView:p,onFocus:f,onBlur:w,handleKeyUp:I}},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},LC(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 MC(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Zl=B({name:"IBizPickerDropDown",props:Ue(),emits:ee(),setup(t,{emit:e}){const n=_("picker-dropdown"),r=t.controller,o=D(""),i=D([]),s=D(!1),l=D("");j(()=>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 E=t.data[r.valueItem];if(i.value.findIndex(F=>Object.is(F[r.keyName],E))!==-1)return;i.value=[],!Te(y)&&!Te(E)&&i.value.push({[r.textName]:y,[r.keyName]:E})}},{immediate:!0}),j(()=>t.data[r.valueItem],(y,E)=>{y!==E&&(l.value=y,y===null&&e("change",null))},{immediate:!0,deep:!0});const c=D(!1),u=async y=>{const E=await r.calcFillDataItems(y);E.length&&E.forEach(F=>{e("change",F.value,F.id)});const P={};Object.assign(P,y),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",y[r.textName])},p=y=>{const E=i.value.findIndex(P=>Object.is(P[r.keyName],y));E>=0&&u(i.value[E]),s.value=!1};let h=null;const v=async y=>{if(s.value)if(r.model.appDataEntityId&&c.value===!1){c.value=!0;try{let E="";y!==t.value&&(E=y.trim());const P=await r.getServiceData(E,t.data);P&&(i.value=P.data)}finally{if(c.value=!1,h!=null){const E=h;h=null,await v(E)}}}else h=y},g=y=>{y&&(i.value=[],v(""))},b=()=>{const y=r.dataItems;y?.length&&y.forEach(E=>{e("change",null,E.id)}),r.valueItem&&e("change",null,r.valueItem),e("change",null)},m=y=>{s.value=!0,e("focus",y)},f=y=>{s.value=!1,e("blur",y)},w=y=>{y&&y.code==="Enter"&&e("enter",y)},I=()=>{s.value=!0},S=A(()=>Ot(o.value));return j(S,(y,E)=>{y!==E&&e("infoTextChange",y)},{immediate:!0}),{ns:n,c:r,refValue:l,curValue:o,valueText:S,loading:c,items:i,onOpenChange:g,onClear:b,onSelect:p,onSearch:v,onFocus:m,onBlur:f,onClick:I,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},MC(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]})])}}),ec=B({name:"IBizPickerLink",props:Ue(),emits:ee(),setup(t,{emit:e}){const n=_("picker-link"),r=t.controller,o=D("");j(()=>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}=be(()=>e("focus"),()=>e("blur")),c=A(()=>Ot(o.value));return j(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])])}}),tc=B({name:"IBizPickerEmbedView",props:Ue(),emits:ee(),setup(t,{emit:e}){const n=_("picker-embed-view"),r=t.controller,o=D(Pe(r.context)),i=D(Pe(r.params)),s=()=>{const{context:h,params:v}=r.handlePublicParams(t.data,r.context,r.params);Object.assign(o.value,h),Object.assign(i.value,v)};s(),j(()=>t.data,(h,v)=>{h!==v&&s()});const l=h=>{let v="",g="";h&&Array.isArray(h)&&(h.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=h=>{l(h.data)},{componentRef:u}=be(()=>e("focus"),()=>e("blur")),p=A(()=>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")},[ne(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,N("; ")])):a("span",null,[this.c.placeHolder])])]:null])}});function VC(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const nc=B({name:"IBizPickerSelectView",props:Ue(),emits:ee(),setup(t,{emit:e}){const n=_("picker-select-view"),r=t.controller,o=r.model,i=D(!0);o.editorParams&&o.editorParams.multiple&&(i.value=!r.toBoolean(o.editorParams.multiple));const s=D([]),l=D([]);let c=[];const u=D(""),p=D(!1),h=D("auto"),v=D(Pe(r.context)),g=D(Pe(r.params)),b=()=>{v.value={query:u.value,...v.value}},m=z=>{t.disabled||(z?p.value=z:p.value=!p.value)},{componentRef:f}=be(()=>e("focus"),()=>e("blur"));j(()=>t.value,z=>{if(i.value)r.model.valueType==="OBJECT"?u.value=z?z[r.objectNameField]:null:u.value=z||"",!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 H=[];if(z)if(!t.data||!r.valueItem||!t.data[r.valueItem])ibiz.log.error("\u503C\u9879\u5F02\u5E38");else{const W=t.data[r.valueItem].split(","),J=z.split(",");W.forEach((Z,k)=>{H.push({srfmajortext:J[k],srfkey:Z})}),l.value=[],H.forEach(Z=>{s.value.push(Z.srfkey),l.value.findIndex(V=>Object.is(V.srfkey,Z.srfkey))<0&&l.value.push({srfmajortext:Z.srfmajortext,srfkey:Z.srfkey})})}c=H,g.value.selectedData=c}},{immediate:!1,deep:!0}),Ie(()=>{f.value&&(h.value=`${f.value.offsetWidth}px`)});const w=()=>{const z=r.dataItems;z?.length&&z.forEach(H=>{e("change",null,H.id)}),r.valueItem&&e("change",null,r.valueItem),e("change",null)},I=z=>{if(z.length===0){w();return}if(i.value){if(p.value=!1,r.valueItem){const W=z[0][r.keyName]?z[0][r.keyName]:z[0].srfkey;e("change",W,r.valueItem)}const H=z[0][r.textName]?z[0][r.textName]:z[0].srfmajortext;r.model.valueType==="OBJECT"?e("change",r.handleObjectParams(z[0])):e("change",H)}else{let H="",W="";z&&Array.isArray(z)&&(l.value=[],z.forEach(J=>{const Z=J[r.keyName]?J[r.keyName]:J.srfkey;H+=`${Z},`;const k=J[r.textName]?J[r.textName]:J.srfmajortext;W+=`${k},`,l.value.findIndex(T=>Object.is(T.srfkey,Z))<0&&l.value.push({srfmajortext:k,srfkey:Z})})),H=H.substring(0,H.length-1),W=W.substring(0,W.length-1),r.valueItem&&e("change",H,r.valueItem),e("change",W)}},S=async z=>{z.stopPropagation();const H=await r.openLinkView(t.data);H&&I(H)},y=z=>{const H=[];z.length>0&&z.forEach(Z=>{const k=l.value.findIndex(V=>Object.is(V.srfkey,Z));k>=0&&H.push(l.value[k])});let W="",J="";H.forEach(Z=>{const k=Z[r.keyName]?Z[r.keyName]:Z.srfkey;W+=`${k},`;const V=Z[r.textName]?Z[r.textName]:Z.srfmajortext;J+=`${V},`}),W=W.substring(0,W.length-1),J=J.substring(0,J.length-1),r.valueItem&&e("change",W,r.valueItem),e("change",J)},E=z=>{u.value=z},P=z=>{z.data&&I(z.data)},F=new Ge({mode:qe.DRAWER,viewUsage:2,dismiss:z=>{P(z)}});return{ns:n,c:r,singleSelect:i,keySet:s,items:l,queryValue:u,visible:p,pickViewWidth:h,context:v,params:g,editorRef:f,onInputChange:b,triggerMenu:m,onViewDataChange:I,onClear:w,openLinkView:S,onSelectChange:y,remoteMethod:E,onSelectionChange:P,modal:F,onFocus:z=>{e("focus",z)},onBlur:z=>{e("blur",z)},handleKeyUp:z=>{z&&z.code==="Enter"&&e("enter",z)}}},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},VC(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&&ne(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 jC=Object.defineProperty,kC=(t,e,n)=>e in t?jC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ge=(t,e,n)=>(kC(t,typeof e!="symbol"?e+"":e,n),n);class UC extends se{constructor(){super(...arguments),ge(this,"multiple",!1),ge(this,"pickupView",null),ge(this,"linkView",null),ge(this,"valueItem",""),ge(this,"keyName","srfkey"),ge(this,"textName","srfmajortext"),ge(this,"interfaceName",""),ge(this,"sort",""),ge(this,"noAC",!1),ge(this,"noButton",!1),ge(this,"deACMode"),ge(this,"dataItems",[]),ge(this,"objectIdField",""),ge(this,"objectNameField",""),ge(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 ft(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=$t(o,i);if(this.interfaceName)return await ibiz.hub.getApp(this.context.srfappid).deService.exec(this.model.appDataEntityId,this.interfaceName,r,s);throw new me(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 me(this.model,"\u8BF7\u914D\u7F6E\u6570\u636E\u9009\u62E9\u89C6\u56FE");const i=await ibiz.commands.execute(Ze.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 me(this.model,"\u8BF7\u914D\u7F6E\u6570\u636E\u94FE\u63A5\u89C6\u56FE");return ibiz.commands.execute(Ze.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]:Pe(e)}),n}}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 ye{constructor(e){rc(this,"formEditor"),rc(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 UC(e,n);return await r.init(),r}}const oc=B({name:"IBizNumberRangePicker",props:Ea(),emits:ee(),setup(t,{emit:e}){const n=_("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 h="~";o.editorParams&&(o.editorParams.maxvalue&&(i=ve(o.editorParams.maxvalue)),o.editorParams.minvalue&&(s=ve(o.editorParams.minvalue)),o.editorParams.precision&&(l=ve(o.editorParams.precision)),o.editorParams.valueSeparator&&(c=o.editorParams.valueSeparator),o.editorParams.rangeSeparator&&(h=o.editorParams.rangeSeparator));const v=D([]),g=o.editorItems;if(g&&g.length>0){const S=g.map(y=>y.id);v.value=S}const b=D(null),m=D(null);j(()=>t.value,(S,y)=>{S!==y&&typeof S=="string"&&(b.value=S.split(c)[0]?Number(S.split(c)[0]):null,m.value=S.split(c)[1]?Number(S.split(c)[1]):null)},{immediate:!0});const f=(S,y)=>{if(y===0?b.value=S:y===1&&(m.value=S),b.value!==null&&m.value!==null&&e("change",[b.value,m.value].join(c)),v.value){const E=v.value[y];e("change",S,E)}},{componentRef:w}=be(()=>e("focus"),()=>e("blur"));return{ns:n,c:r,refFormItem:v,minValue:b,maxValue:m,handleChange:f,max:i,min:s,precision:l,valueSeparator:c,startPlaceHolder:u,endPlaceHolder:p,rangeSeparator:h,editorRef:w,handleKeyUp:S=>{S&&S.code==="Enter"&&e("enter",S)}}},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 WC extends se{}var HC=Object.defineProperty,KC=(t,e,n)=>e in t?HC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ac=(t,e,n)=>(KC(t,typeof e!="symbol"?e+"":e,n),n);class XC{constructor(){ac(this,"formEditor","IBizNumberRangePicker"),ac(this,"gridEditor","IBizNumberRangePicker")}async createController(e,n){const r=new WC(e,n);return await r.init(),r}}const ic=B({name:"IBizDateRangePicker",props:Da(),emits:ee(),setup(t,{emit:e}){const n=_("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=D("daterange");switch(o.editorType){case"DATERANGE":p.value="datetimerange";break;case"DATERANGE_NOTIME":p.value="daterange";break;default:p.value="datetimerange"}const h=D("YYYY-MM-DD"),v=r.valueFormat;v&&(h.value=v);const g=D([]),b=o.editorItems;if(b&&b.length>0){const I=b.map(S=>S.id);g.value=I}const m=A({get(){let I=[];return g.value.length>0?g.value.forEach(S=>{t.data[S]&&I.push(t.data[S])}):t.value&&typeof t.value=="string"&&(I=t.value.split(i)),I},set(I){I&&I.length>0?(e("change",I.join(i)),g.value.length>0&&I.forEach((S,y)=>{e("change",S,g.value[y])})):(e("change",null),g.value.length>0&&g.value.forEach((S,y)=>{e("change",null,g.value[y])}))}});return{ns:n,c:r,refFormItem:g,curValue:m,type:p,format:h,valueSeparator:i,startPlaceHolder:l,endPlaceHolder:c,rangeSeparator:u,unlinkPanels:s,onFocus:I=>{e("focus",I)},onBlur:I=>{e("blur",I)}}},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 YC=Object.defineProperty,JC=(t,e,n)=>e in t?YC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QC=(t,e,n)=>(JC(t,typeof e!="symbol"?e+"":e,n),n);class ZC extends se{constructor(){super(...arguments),QC(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 ew=Object.defineProperty,tw=(t,e,n)=>e in t?ew(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sc=(t,e,n)=>(tw(t,typeof e!="symbol"?e+"":e,n),n);class Do{constructor(){sc(this,"formEditor","IBizDateRangePicker"),sc(this,"gridEditor","IBizDateRangePicker")}async createController(e,n){const r=new ZC(e,n);return await r.init(),r}}function nw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lc(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?lc(Object(n),!0).forEach(function(r){nw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function rw(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 ow(t,e){if(t==null)return{};var n=rw(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 aw(t,e){return iw(t)||sw(t,e)||lw(t,e)||cw()}function iw(t){if(Array.isArray(t))return t}function sw(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 lw(t,e){if(t){if(typeof t=="string")return uc(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 uc(t,e)}}function uc(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 cw(){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 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 dc(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 pc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?dc(Object(n),!0).forEach(function(r){uw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dw(){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 Et(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 Kt(t){return{}.toString.call(t).includes("Object")}function pw(t){return!Object.keys(t).length}function Dt(t){return typeof t=="function"}function hw(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function mw(t,e){return Kt(e)||je("changeType"),Object.keys(e).some(function(n){return!hw(t,n)})&&je("changeField"),e}function fw(t){Dt(t)||je("selectorType")}function bw(t){Dt(t)||Kt(t)||je("handlerType"),Kt(t)&&Object.values(t).some(function(e){return!Dt(e)})&&je("handlersType")}function vw(t){t||je("initialIsRequired"),Kt(t)||je("initialType"),pw(t)&&je("initialContent")}function gw(t,e){throw new Error(t[e]||t.default)}var Cw={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=Et(gw)(Cw),Xt={changes:mw,selector:fw,handler:bw,initial:vw};function ww(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Xt.initial(t),Xt.handler(e);var n={current:t},r=Et(Iw)(n,e),o=Et(Pw)(n),i=Et(Xt.changes)(t),s=Et(yw)(n);function l(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(p){return p};return Xt.selector(u),u(n.current)}function c(u){dw(r,o,i,s)(u)}return[l,c]}function yw(t,e){return Dt(e)?e(t.current):e}function Pw(t,e){return t.current=pc(pc({},t.current),e),e}function Iw(t,e,n){return Dt(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 Ew={create:ww},Dw={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function _w(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 Bw(t){return{}.toString.call(t).includes("Object")}function Sw(t){return t||mc("configIsRequired"),Bw(t)||mc("configType"),t.urls?(Aw(),{paths:{vs:t.urls.monacoBase}}):t}function Aw(){console.warn(hc.deprecation)}function Fw(t,e){throw new Error(t[e]||t.default)}var hc={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
+ `},mc=_w(Fw)(hc),xw={config:Sw},Ow=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 fc(t,e){return Object.keys(e).forEach(function(n){e[n]instanceof Object&&t[n]&&Object.assign(e[n],fc(t[n],e[n]))}),cc(cc({},t),e)}var Tw={type:"cancelation",msg:"operation is manually canceled"};function _o(t){var e=!1,n=new Promise(function(r,o){t.then(function(i){return e?o(Tw):r(i)}),t.catch(o)});return n.cancel=function(){return e=!0},n}var Nw=Ew.create({config:Dw,isInitialized:!1,resolve:null,reject:null,monaco:null}),bc=aw(Nw,2),_t=bc[0],Yt=bc[1];function zw(t){var e=xw.config(t),n=e.monaco,r=ow(e,["monaco"]);Yt(function(o){return{config:fc(o.config,r),monaco:n}})}function Rw(){var t=_t(function(e){var n=e.monaco,r=e.isInitialized,o=e.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!t.isInitialized){if(Yt({isInitialized:!0}),t.monaco)return t.resolve(t.monaco),_o(Bo);if(window.monaco&&window.monaco.editor)return vc(window.monaco),t.resolve(window.monaco),_o(Bo);Ow($w,Mw)(Vw)}return _o(Bo)}function $w(t){return document.body.appendChild(t)}function Lw(t){var e=document.createElement("script");return t&&(e.src=t),e}function Mw(t){var e=_t(function(r){var o=r.config,i=r.reject;return{config:o,reject:i}}),n=Lw("".concat(e.config.paths.vs,"/loader.js"));return n.onload=function(){return t()},n.onerror=e.reject,n}function Vw(){var t=_t(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){vc(n),t.resolve(n)},function(n){t.reject(n)})}function vc(t){_t().monaco||Yt({monaco:t})}function jw(){return _t(function(t){var e=t.monaco;return e})}var Bo=new Promise(function(t,e){return Yt({resolve:t,reject:e})}),gc={config:zw,init:Rw,__getMonacoInstance:jw};const Cc=B({name:"IBizCode",props:_a(),emits:ee(),setup(t,{emit:e}){const n=_("code"),r=D("");let o,i;const{UIStore:s}=ke(),l=p=>p==="dark"?`vs-${s.theme}`:"vs";j(()=>s.theme,p=>{i.setTheme(l(p))}),j(()=>t.value,p=>{p!==r.value&&(r.value=p||"",o?.setValue(r.value))},{immediate:!0});const c=D(),u=()=>{ut(()=>{gc.config({paths:{vs:`${ibiz.env.pluginBaseUrl}/monaco-editor@0.44.0/min/vs`}}),gc.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 Ie(()=>{u()}),ze(()=>{o?.dispose()}),{ns:n,currentVal:r,codeEditBox:c}},render(){return a("div",{ref:"codeEditBox",class:this.ns.b()},null)}});class kw extends se{get language(){return this.editorParams.codeType||this.editorParams.language||"typescript"}get theme(){return this.editorParams.theme||"vs-dark"}}var Uw=Object.defineProperty,Gw=(t,e,n)=>e in t?Uw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wc=(t,e,n)=>(Gw(t,typeof e!="symbol"?e+"":e,n),n);class qw{constructor(){wc(this,"formEditor","IBizCode"),wc(this,"gridEditor","IBizCode")}async createController(e,n){const r=new kw(e,n);return await r.init(),r}}var Ww=Object.defineProperty,Hw=(t,e,n)=>e in t?Ww(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yc=(t,e,n)=>(Hw(t,typeof e!="symbol"?e+"":e,n),n);class Kw extends se{constructor(){super(...arguments),yc(this,"uploadParams"),yc(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+=Me.stringify(o,{addQueryPrefix:!0}),r+=Me.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 de("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");if(n.data){const r=e.name;Ct(n.data,r)}else throw new de("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728")})}}var Xw=Object.defineProperty,Yw=(t,e,n)=>e in t?Xw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pc=(t,e,n)=>(Yw(t,typeof e!="symbol"?e+"":e,n),n);class Jw{constructor(){Pc(this,"formEditor","IBizHtml"),Pc(this,"gridEditor","IBizHtml")}async createController(e,n){const r=new Kw(e,n);return await r.init(),r}}var Qw=Object.defineProperty,Zw=(t,e,n)=>e in t?Qw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ne=(t,e,n)=>(Zw(t,typeof e!="symbol"?e+"":e,n),n);class ey extends se{constructor(){super(...arguments),Ne(this,"uploadParams"),Ne(this,"exportParams"),Ne(this,"deService"),Ne(this,"deACMode"),Ne(this,"keyName","srfkey"),Ne(this,"textName","srfmajortext"),Ne(this,"sort","asc"),Ne(this,"dataItems",[]),Ne(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 me(n,"\u914D\u7F6Euploadparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F")}if(r)try{this.exportParams=JSON.parse(r)}catch{throw new me(r,"\u914D\u7F6Eexportparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F")}}const e=this.model;if(e.appDEACModeId&&(this.deACMode=await ft(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+=Me.stringify(o,{addQueryPrefix:!0}),r+=Me.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 de("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");if(n.data){const r=e.name;Ct(n.data,r)}else throw new de("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728")})}}var ty=Object.defineProperty,ny=(t,e,n)=>e in t?ty(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ic=(t,e,n)=>(ny(t,typeof e!="symbol"?e+"":e,n),n);class ry{constructor(){Ic(this,"formEditor","IBizMarkDown"),Ic(this,"gridEditor","IBizMarkDown")}async createController(e,n){const r=new ey(e,n);return await r.init(),r}}function oy(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const Ec=B({name:"IBizArray",props:Ba(),emits:ee(),setup(t,{emit:e}){const n=_("array"),r=t.controller,o=r.model;let i="default",s="default",l=0,c,u=!1,p="",h="",v="_blank";const g=D([]);o.editorParams&&(o.editorParams.editorStyle&&(i=o.editorParams.editorStyle),o.editorParams.size&&(s=o.editorParams.size),o.editorParams.limit&&(l=ve(o.editorParams.limit)),o.editorParams.maxLength&&(c=ve(o.editorParams.maxLength)),o.editorParams.showWordLimit&&(u=r.toBoolean(o.editorParams.showWordLimit)),o.editorParams.prepend&&(p=o.editorParams.prepend),o.editorParams.append&&(h=o.editorParams.append),o.editorParams.target&&(v=o.editorParams.target));const b=o.dataType,m=Object.is(b,"NUMBER")||Object.is(b,"INTEGER")?"number":"text";j(()=>t.value,(x,R)=>{if(x&&x!==R&&g.value.length===0){const U=x.map(z=>({value:z,key:Oe()}));g.value=U}},{immediate:!0});const f=x=>{let R=x;return R&&(p&&(R=p+R),h&&(R+=h)),R},w=()=>{const x=g.value.map(R=>R.value);e("change",x)};return{ns:n,c:r,editorStyle:i,type:m,size:s,limit:l,maxLength:c,showWordLimit:u,prepend:p,append:h,target:v,items:g,getUrl:f,addItem:x=>{if(t.disabled||t.readonly)return;const R={key:Oe(),value:null};x?g.value.splice(x,0,R):g.value.push(R),w()},removeItem:x=>{g.value.splice(x,1),w()},handleChange:(x,R)=>{g.value[R].value=x,w()},onBlur:x=>{e("blur",x)},onFocus:x=>{e("focus",x)},handleKeyUp:x=>{x&&x.code==="Enter"&&e("enter",x)}}},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},oy(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 ay extends se{}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,Dc=(t,e,n)=>(sy(t,typeof e!="symbol"?e+"":e,n),n);class _c{constructor(){Dc(this,"formEditor","IBizArray"),Dc(this,"gridEditor","IBizArray")}async createController(e,n){const r=new ay(e,n);return await r.init(),r}}const Bc=B({name:"IBizCascader",props:Sa(),emits:ee(),setup(t,{emit:e}){const n=_("cascader"),r=t.controller,o=r.model,i=D(null),s=D([]),l=o.editorItems;if(l&&l.length>0){const T=l.map(L=>({name:L.id,appDataEntityId:L.appDataEntityId,appDEDataSetId:L.appDEDataSetId}));s.value=T}let c="default",u="default",p=!0,h=!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&&(h=r.toBoolean(o.editorParams.multiple)),o.editorParams.separator&&(v=o.editorParams.separator));const g=D([]),b=D([]),m=D(null),f=D([]),w=D([]),I=D([]),S=D(""),y=D(!1),E=()=>{switch(u){case"large":return"large";case"small":return"small";default:return"default"}},P=(T,L)=>T.leaf,F=(T,L)=>L.level!==s.value.length,x=()=>{if(t.value&&s.value){const T=[],L=JSON.parse(t.value);if(L.forEach(q=>{T.push({label:q,value:[]})}),w.value.forEach(q=>{const Y=t.data[q.name]?t.data[q.name].split(","):[];q.value=Y}),f.value=[],T.forEach((q,Y)=>{w.value.forEach(ae=>{q.value.push(ae.value[Y])});const K=q.value.join(v);f.value.push({label:q.label,value:K})}),f.value.forEach(q=>{const Y=q.value.split(v),K=q.label.split(v);Y.forEach((ae,ce)=>{b.value.find(fe=>fe.value===ae)||b.value.push({value:ae,label:K[ce]})})}),Object.is(c,"default")){let q=[];h?f.value.forEach(Y=>{q.push(Y.value.split(v))}):q=f.value[0].value.split(v),m.value=q}else{h?m.value=L:m.value=L.join(v);const q=w.value[w.value.length-1].value;if(w.value.length>1){const Y=w.value[w.value.length-2].value;Y&&Y.length>0&&Y.forEach((K,ae)=>{q[ae]=`${K}_${q[ae]}`})}I.value=q}}};s.value&&s.value.length>0&&s.value.forEach(T=>{w.value.push({name:T.name,value:[]})});const R=async(T,L)=>{const q=Pe(r.context),Y=Pe(r.params);if(T>0){const K=s.value[T-1];Object.assign(q,{[bt(K.appDataEntityId)]:L});const ae=await ibiz.hub.getAppDataEntity(K.appDataEntityId);Object.assign(Y,{[`n_${ae.keyAppDEFieldId.toLowerCase()}_eq`]:L})}return{context:q,params:Y}},U=(T,L)=>{const{level:q,value:Y}=T;y.value=!0;let K=[];if(q===0)x(),g.value.length>0?L.forEach(ce=>{const he=g.value.findIndex(fe=>ce.value===fe.value);he>-1?Object.assign(g.value[he],ce):(g.value.push(ce),K.push(ce))}):(g.value=[...L],K=[...L]);else{const ce=(he,fe)=>{he&&he.length>0&&he.forEach(Ce=>{Ce.value===Y?Ce.children&&Ce.children.length>0?L.forEach(ue=>{const Se=Ce.children.findIndex(Ke=>Ke.value===ue.value);Se>-1?Object.assign(Ce.children[Se],ue):(Ce.children.push(ue),K.push(ue))}):(Ce.children=L,K=L):ce(Ce.children)})};ce(g.value)}const ae=m.value||[];return setTimeout(()=>{m.value=ae,y.value=!1}),K},z=async(T,L)=>{const{level:q}=T,Y=Object.is(c,"default")?T.value:T.data?T.data.value:null,K=s.value[q];try{if(K.appDataEntityId&&K.appDEDataSetId){const{context:ae,params:ce}=await R(q,Y),fe=await ibiz.hub.getApp(r.context.srfappid).deService.exec(K.appDataEntityId,K.appDEDataSetId,ae,ce);if(fe&&fe.status===200&&fe.data.length>0){const Ce=fe.data.map((ue,Se)=>({...ue,value:ue.srfkey,label:ue.srfmajortext?ue.srfmajortext:`\u6807\u9898${Se}`,leaf:q===s.value.length-1,nodekey:`${Y?`${Y}_${ue.srfkey}`:ue.srfkey}`}));if(Ce.forEach(ue=>{const Se=b.value.findIndex(Ke=>ue.value===Ke.value);Se>-1?b.value[Se]=ue:b.value.push(ue)}),Object.is(c,"default")){const ue=U(T,Ce);L(ue)}else L(Ce)}}L([])}catch{console.log(K,"\u67E5\u8BE2\u6570\u636E\u96C6\u5931\u8D25"),L([])}},H=()=>{const T=[];m.value=[],f.value.forEach(L=>{T.push(L.label)}),h?m.value=T:m.value=T.length>0?T[0]:null,w.value.forEach(L=>{e("change",L.value.length>0?L.value.join(","):null,L.name)}),e("change",m.value.length>0?JSON.stringify(m.value):null)},W=()=>{f.value=[],w.value.forEach(T=>{T.value=[]}),i.value&&i.value.setCheckedKeys([]),H()},J=()=>{var T,L;if(!y.value){w.value.forEach(K=>{K.value=[]}),(T=m.value)!=null&&T.length&&m.value.forEach((K,ae)=>{typeof K=="string"?w.value[ae].value.push(K):K.forEach((ce,he)=>{w.value[he].value.push(ce)})});const q=[];let Y=[];(L=m.value)!=null&&L.length&&m.value.forEach(K=>{if(h){const ae=K.map(ce=>{const he=b.value.find(fe=>fe.value===ce);if(he)return he.label});q.push(ae)}else{const ae=b.value.find(ce=>ce.value===K);ae&&q.push(ae.label)}}),w.value.forEach(K=>{e("change",K.value.length>0?K.value.join(","):null,K.name)}),q.length>0&&(h?q.forEach(K=>{Y.push(K.join(v))}):Y=[q.join(v)]),e("change",Y.length>0?JSON.stringify(Y):null)}};return{ns:n,c:r,valueItems:s,editorStyle:c,filterable:p,separator:v,onBlur:T=>{e("blur",T)},onFocus:T=>{e("focus",T)},treeData:g,items:b,selectValue:m,treeSelectData:f,valueItemData:w,defaultCheckedKeys:I,searchValue:S,isLoaded:y,getSize:E,getIsLeaf:P,getDisabled:F,loadData:z,treeRef:i,handleTreeClear:W,handleRemoveTag:()=>{setTimeout(()=>{J()})},multiple:h,handleCascaderValueChange:J}},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 ly extends se{}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,Sc=(t,e,n)=>(uy(t,typeof e!="symbol"?e+"":e,n),n);class dy{constructor(){Sc(this,"formEditor","IBizCascader"),Sc(this,"gridEditor","IBizCascader")}async createController(e,n){const r=new ly(e,n);return await r.init(),r}}const Ac=B({name:"IBizColorPicker",props:Aa(),emits:ee(),setup(t,{emit:e}){const n=_("color-picker"),r=t.controller,o=D(""),i=D(null);j(()=>t.value,(h,v)=>{h!==v&&(h?o.value=h:o.value="")},{immediate:!0});const s=h=>{e("change",h)},l=h=>{setTimeout(()=>{i.value&&i.value.show()},200)},c=A(()=>r.style?r.style:null);return{ns:n,c:r,currentVal:o,contentStyle:c,colorPicker:i,handleChange:s,showPicker:l,onFocus:h=>{e("focus",h)},onBlur:h=>{e("blur",h)}}},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 py extends se{}var hy=Object.defineProperty,my=(t,e,n)=>e in t?hy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fc=(t,e,n)=>(my(t,typeof e!="symbol"?e+"":e,n),n);class fy{constructor(){Fc(this,"formEditor","IBizColorPicker"),Fc(this,"gridEditor","IBizColorPicker")}async createController(e,n){const r=new py(e,n);return await r.init(),r}}const xc=B({name:"IBizPresetRawitem",props:dn(),emits:ee(),setup(t,{emit:e}){const n=_("preset-rawitem"),r=t.controller,o=r.model,{componentRef:i}=be(()=>e("focus"),()=>e("blur")),s=r.model.predefinedType,l=D("");return j(()=>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,[N("\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 by extends se{}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,Oc=(t,e,n)=>(gy(t,typeof e!="symbol"?e+"":e,n),n);class Cy{constructor(){Oc(this,"formEditor","IBizPresetRawitem"),Oc(this,"gridEditor","IBizPresetRawitem")}async createController(e,n){const r=new by(e,n);return await r.init(),r}}const wy=O("aH",{install:t=>{t.component(rl.name,rl),t.component(al.name,al),t.component(il.name,il),t.component(cl.name,cl),t.component(ul.name,ul),t.component(dl.name,dl),t.component(hl.name,hl),t.component(fl.name,fl),t.component(vl.name,vl),t.component(wl.name,wl),t.component(Il.name,Il),t.component(_l.name,_l),t.component(Al.name,Al),t.component(xl.name,xl),t.component(Nl.name,Nl),t.component($l.name,$l),t.component(jl.name,jl),t.component(Gl.name,Gl),t.component(Hl.name,Hl),t.component(Xl.name,Xl),t.component(Kl.name,Kl),t.component(Jl.name,Jl),t.component(Ql.name,Ql),t.component(Zl.name,Zl),t.component(ec.name,ec),t.component(tc.name,tc),t.component(nc.name,nc),t.component(oc.name,oc),t.component(ic.name,ic),t.component(Cc.name,Cc),t.component(Ec.name,Ec),t.component(Bc.name,Bc),t.component(Ac.name,Ac),t.component(xc.name,xc),t.component("IBizHtml",pt(()=>Fe.import("./wang-editor-f4440Xvw.js"))),t.component("IBizMarkDown",pt(()=>Fe.import("./ibiz-markdown-editor-BQsiQfa2.js"))),$("SPAN",()=>new Wt),$("SPAN_ADDRESSPICKUP",()=>new Wt),$("SPAN_LINK",()=>new Wt("SPAN_LINK"));const e=new Io;$("TEXTBOX",()=>e),$("TEXTAREA",()=>e),$("TEXTAREA_10",()=>e),$("PASSWORD",()=>e),$("NUMBER",()=>new Io("NUMBER")),$("IPADDRESSTEXTBOX",()=>new Io("IPADDRESSTEXTBOX")),$("DROPDOWNLIST",()=>new Ht),$("DROPDOWNLIST_100",()=>new Ht),$("MDROPDOWNLIST",()=>new Ht),$("CHECKBOX",()=>new Lg),$("CHECKBOXLIST",()=>new Cl),$("RADIOBUTTONLIST",()=>new Pl);const n=new Dl;$("DATEPICKER",()=>n),$("DATEPICKEREX",()=>n),$("DATEPICKEREX_NOTIME",()=>n),$("DATEPICKEREX_HOUR",()=>n),$("DATEPICKEREX_MINUTE",()=>n),$("DATEPICKEREX_SECOND",()=>n),$("DATEPICKEREX_NODAY",()=>n),$("DATEPICKEREX_NODAY_NOSECOND",()=>n),$("FILEUPLOADER",()=>new It("FILEUPLOADER")),$("FILEUPLOADER_ONE",()=>new It("FILEUPLOADER_ONE")),$("PICTURE",()=>new It("PICTURE")),$("PICTURE_ONE",()=>new It("PICTURE_ONE")),$("PICTURE_ONE_RAW",()=>new It("PICTURE_ONE_RAW")),$("RAW",()=>new Sl),$("STEPPER",()=>new lC),$("RATING",()=>new Tl),$("SLIDER",()=>new Ml),$("SWITCH",()=>new Rl),$("LISTBOX",()=>new Ul),$("LISTBOXPICKUP",()=>new Ul);const r=new OC;$("AC",()=>r),$("AC_FS",()=>r),$("AC_NOBUTTON",()=>r),$("AC_FS_NOBUTTON",()=>r),$("PICKER",()=>new ye("PICKER")),$("PICKEREX_NOAC",()=>new ye("PICKEREX_NOAC")),$("PICKEREX_NOAC_LINK",()=>new ye("PICKEREX_NOAC_LINK")),$("PICKEREX_TRIGGER_LINK",()=>new ye("PICKEREX_TRIGGER_LINK")),$("PICKEREX_TRIGGER",()=>new ye("PICKEREX_TRIGGER")),$("PICKEREX_LINK",()=>new ye("PICKEREX_LINK")),$("ADDRESSPICKUP",()=>new ye("ADDRESSPICKUP")),$("ADDRESSPICKUP_AC",()=>new ye("ADDRESSPICKUP_AC")),$("PICKEREX_LINKONLY",()=>new ye("PICKEREX_LINKONLY")),$("PICKEREX_NOBUTTON",()=>new ye("PICKEREX_NOBUTTON")),$("PICKEREX_DROPDOWNVIEW",()=>new ye("PICKEREX_DROPDOWNVIEW")),$("PICKEREX_DROPDOWNVIEW_LINK",()=>new ye("PICKEREX_DROPDOWNVIEW_LINK")),$("PICKUPVIEW",()=>new ye("PICKUPVIEW")),$("NUMBERRANGE",()=>new XC),$("DATERANGE",()=>new Do),$("DATERANGE_NOTIME",()=>new Do),$("CODE",()=>new qw),$("HTMLEDITOR",()=>new Jw),$("MARKDOWN",()=>new ry),$("ARRAY",()=>new _c),$("CASCADER",()=>new dy),$("COLORPICKER",()=>new fy),$("FIELD_IMAGE_PICTURE_ONE",()=>new Cy),$("FIELD_TEXT_DYNAMIC_SPAN",()=>new Wt),$("STATIC_LABEL_RAW",()=>new Sl),$("FIELD_TEXTBOX_TEXTBOX",()=>e),$("FIELD_TEXTAREA_TEXTAREA",()=>e),$("FIELD_RADIOBUTTONLIST_RADIOBUTTONLIST",()=>new Pl),$("FIELD_CHECKBOXLIST_CHECKBOXLIST",()=>new Cl),$("FIELD_DROPDOWNLIST_DROPDOWNLIST",()=>new Ht),$("FIELD_RATING_RATING",()=>new Tl),$("FIELD_SWITCH_SWITCH",()=>new Rl),$("FIELD_SLIDER_SLIDER",()=>new Ml),$("FIELD_DATEPICKER_DATEPICKER",()=>new Dl),$("FIELD_DATERANGE_DATERANGE",()=>new Do),$("FIELD_PICKER_PICKER",()=>new ye("PICKER")),$("FIELD_ARRAY_ARRAY",()=>new _c),$("AUTH_USERID_TEXTBOX",()=>e),$("AUTH_PASSWORD_PASSWORD",()=>e)}}),EP=O("aI",B({setup(){const t=_("404-view"),e=$e(),n=Le(),r=()=>{e.push("/")};Ie(()=>ibiz.util.hiddenAppLoading());const o=A(()=>!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")},[N("\u62B1\u6B49\uFF0C\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\uFF01")]),this.isTop?a("div",{class:this.ns.be("text","text2")},[N("\u60A8\u8981\u627E\u7684\u9875\u9762\u4E0D\u5B58\u5728\uFF0C\u8BF7\u8FD4\u56DE"),a("a",{"on-click":this.gotoIndexView},[N("\u9996\u9875")]),N("\u7EE7\u7EED\u6D4F\u89C8")]):null])])}})),yy={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"}]},DP=O("aJ",B({setup(){const t=_("login-view"),e=pe({username:"",password:""}),n=D(null),o=Le().query.ru||"/",i=D(!1),s=D(null),l=d("IBizViewShell"),c=Li.create({}),u={},p=D(!1),h=D(!1),v=D(!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)})},m=f=>{f.key==="Enter"&&b()};return Ie(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(),h.value=!0}),()=>h.value?i.value?ne(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:yy,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=>m(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=>m(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:()=>[N("\u767B\u5F55")]})]})]})])])])]):null}}));var Py=Object.defineProperty,Iy=(t,e,n)=>e in t?Py(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ey=(t,e,n)=>(Iy(t,typeof e!="symbol"?e+"":e,n),n);class Dy{constructor(){Ey(this,"component","IBizWFStepTraceView")}}const So=B({name:"IBizWFStepTraceView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){const t=_("view"),e=Fa((...c)=>new yi(...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)])}}),_y=O("aK",M(So,function(t){t.component(So.name,So),Pi(Ii.APP_WF_STEP_TRACE_VIEW,()=>new Dy)}));var By=Object.defineProperty,Sy=(t,e,n)=>e in t?By(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ao=(t,e,n)=>(Sy(t,typeof e!="symbol"?e+"":e,n),n);const Bt=O("a",Hi({legacy:!1,locale:"zh-CN"}));class Ay{constructor(){Ao(this,"html"),Ao(this,"defaultLang"),Ao(this,"langMap",new Map),this.defaultLang="zh-CN",this.html=document.querySelector("html");const e=localStorage.getItem("language")||navigator.language||this.defaultLang;Bt.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=Bt.global.locale.value;let n;this.langMap.has(e)?n=this.langMap.get(e):n=this.langMap.get(this.defaultLang);const r=await n();Bt.global.setLocaleMessage(Bt.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 Bt.global.t(e,n,r)}}const Fy=new Ay;class it 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=bt(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===X.SAVE?(await this.form.save(),null):e===X.SAVE_AND_EXIT?(await this.form.save(),{closeView:!0}):e===X.REMOVE_AND_EXIT?{closeView:await this.form.remove()}:e===X.SAVE_AND_NEW?(this.saveAndNew(),null):e===X.REFRESH?(await this.refresh(),null):e===X.SAVE_AND_START?(await this.wfStart(),null):e===X.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 zt,this.view.context[bt(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 de("\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=Ei(this.view.model,i);if(!c){await this.form.wfStart({viewParam:l}),await this.view.closeView();return}(await ibiz.commands.execute(Ze.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 zt?n.getOrigin():n),ibiz.mc.command.send({srfdecodename:"SysTodo"},"OBJECTUPDATED")}}class xy extends it{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drbar")}get drbar(){return this.view.getController("drbar")}}class Oy extends it{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab")}get drtab(){return this.view.getController("drtab")}}class Ty extends it{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab")}get drtab(){return this.view.getController("drtab")}}class St extends Ee{async call(e,n){return e===X.NEW_ROW?(this.grid.newRow(),null):e===X.TOGGLE_ROW_EDIT?(this.grid.toggleRowEdit(),null):e===X.SAVE_ROW?(this.grid.save(n.data[0]),null):e===X.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}}O("aM",St);class Fo 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)&&!Lt(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}}O("aN",Fo);class Tc extends Ee{get list(){return this.view.getController("list")}async onMounted(){await super.onMounted();const{model:e}=this.view;this.list.state.mdctrlActiveMode=e.mdctrlActiveMode}}class Jt extends Ee{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}}O("aO",Jt);class Nc 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===X.CANCEL?(this.cancel(),null):e===X.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:[]})}}O("aP",Nc);class Ny extends St{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 zy=Object.defineProperty,Ry=(t,e,n)=>e in t?zy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$y=(t,e,n)=>(Ry(t,typeof e!="symbol"?e+"":e,n),n);class xo extends we{constructor(){super(...arguments),$y(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===X.CANCEL?(this.cancel(),null):e===X.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 zc extends xo{get simpleList(){return this.view.getController("simplelist")}async onCreated(){if(await super.onCreated(),!this.view.providers.simplelist)throw new me(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===X.CANCEL?(this.cancel(),null):e===X.OK?(this.confirm(),null):e===X.ADD_SELECTION?(this.addSelection(),null):e===X.ADD_ALL?(this.addAll(),null):e===X.REMOVE_ALL?(this.removeAll(),null):e===X.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 Oo extends Ee{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===X.REFRESH_ALL?(await this.tree.refresh(),null):e===X.REFRESH?((r=n?.data)!=null&&r[0]?await this.tree.refreshNodeChildren(n.data[0],!1):await this.tree.refresh(),null):e===X.REFRESH_PARENT?(await this.tree.refreshNodeChildren(n.data[0],!0),null):super.call(e,n)}}class To 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=bt(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 h=p;if(h.panelItems&&h.panelItems.length>0){const v=e(l,h.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 h=p;h.panelItems&&h.panelItems.length>0&&n(l,h.panelItems)}},r=l=>{const c=e("tabexppanel");if(!c)throw new Mt(this.view.model.viewLayoutPanel,"\u672A\u627E\u5230tabexppanel\u5E03\u5C40\u5360\u4F4D");const u=e(l);if(!u)throw new Mt(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}}O("aQ",To);class Qt extends Ee{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=Vn(this.view.model,this.expBarName),{width:n,height:r}=e;!n&&!r||kn(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 Ly extends Qt{get expBarName(){return"gridexpbar"}}class My extends Qt{get expBarName(){return"listexpbar"}}class Vy extends Qt{get expBarName(){return"dataviewexpbar"}}class Rc extends Qt{get expBarName(){return"treeexpbar"}get tree(){return this.expBar.xDataController}async call(e,n){var r;return e===X.REFRESH_ALL?(await this.tree.refresh(),null):e===X.REFRESH?((r=n?.data)!=null&&r[0]?await this.tree.refreshNodeChildren(n.data[0],!1):await this.tree.refresh(),null):e===X.REFRESH_PARENT?(await this.tree.refreshNodeChildren(n.data[0],!0),null):super.call(e,n)}}O("aR",Rc);class jy 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 ky extends Ee{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 Uy=Object.defineProperty,Gy=(t,e,n)=>e in t?Uy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,At=(t,e,n)=>(Gy(t,typeof e!="symbol"?e+"":e,n),n);class No extends it{constructor(){super(...arguments),At(this,"isEditable",!1),At(this,"isCalcWFToolbar",!0),At(this,"entityService"),At(this,"processForm"),At(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=Vn(this.view.model,e.toLowerCase());if(!n)throw new me(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 me(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=Di(this.view.model,e);if(!o){await this.form.wfSubmit({viewParam:r}),await this.view.closeView();return}(await ibiz.commands.execute(Ze.TAG,o,n,r)).ok&&await this.view.closeView()}}class qy extends No{async onCreated(){await super.onCreated();const{childNames:e}=this.view;e.push("drtab")}get drtab(){return this.view.getController("drtab")}}var Wy=Object.defineProperty,Hy=(t,e,n)=>e in t?Wy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ky=(t,e,n)=>(Hy(t,typeof e!="symbol"?e+"":e,n),n);class Xy extends No{constructor(){super(...arguments),Ky(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===X.OK?(this.onOkButtonClick(),null):e===X.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 Yy=Object.defineProperty,Jy=(t,e,n)=>e in t?Yy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qy=(t,e,n)=>(Jy(t,typeof e!="symbol"?e+"":e,n),n);class Zy extends No{constructor(){super(...arguments),Qy(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===X.OK?(this.onOkButtonClick(),null):e===X.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 st 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 eP 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 tP extends we{}class nP extends Oo{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 _i&&(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 zo extends Jt{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 rP extends xo{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 oP extends Ee{}class aP 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 iP extends zc{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 sP extends Ee{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 lP extends zo{}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,$c=(t,e,n)=>(uP(t,typeof e!="symbol"?e+"":e,n),n);class dP extends we{constructor(){super(...arguments),$c(this,"route",Le()),$c(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===X.LOGIN&&await this.login(n),e===X.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 pP extends Ee{}class hP extends St{get xdataControlName(){return"treegrid"}}class mP extends Ee{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===X.NEW?(await this.meditviewpanel.handleAdd(),null):e===X.REFRESH?null:super.call(e,n)}}class fP 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 bP extends Ee{get map(){return this.view.getController("map")}async onCreated(){super.onCreated(),this.view.slotProps.map||(this.view.slotProps.map={})}}class vP 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===X.REFRESH?(await this.refresh(),null):e===X.SEARCH?(await this.searchForm.search(),null):e===X.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 gP=O("aL",{install:t=>{ibiz.engine.register("VIEW_AppIndexView",e=>new Fo(e)),ibiz.engine.register("VIEW_APPINDEXVIEW",e=>new Fo(e)),ibiz.engine.register("VIEW_GridView",e=>new St(e)),ibiz.engine.register("VIEW_ListView",e=>new Tc(e)),ibiz.engine.register("VIEW_TreeView",e=>new Oo(e)),ibiz.engine.register("VIEW_EditView",e=>new it(e)),ibiz.engine.register("VIEW_EditView2",e=>new xy(e)),ibiz.engine.register("VIEW_EditView3",e=>new Oy(e)),ibiz.engine.register("VIEW_EditView4",e=>new Ty(e)),ibiz.engine.register("VIEW_DataView",e=>new Jt(e)),ibiz.engine.register("VIEW_OptionView",e=>new Nc(e)),ibiz.engine.register("VIEW_PickupGridView",e=>new Ny(e)),ibiz.engine.register("VIEW_PickupTreeView",e=>new nP(e)),ibiz.engine.register("VIEW_DEPICKUPVIEW2",e=>new rP(e)),ibiz.engine.register("VIEW_PickupView",e=>new xo(e)),ibiz.engine.register("VIEW_MPickupView",e=>new zc(e)),ibiz.engine.register("VIEW_DEMPICKUPVIEW2",e=>new iP(e)),ibiz.engine.register("VIEW_TabExpView",e=>new To(e)),ibiz.engine.register("VIEW_GridExpView",e=>new Ly(e)),ibiz.engine.register("VIEW_ListExpView",e=>new My(e)),ibiz.engine.register("VIEW_DataViewExpView",e=>new Vy(e)),ibiz.engine.register("VIEW_ChartView",e=>new ky(e)),ibiz.engine.register("VIEW_TreeExpView",e=>new Rc(e)),ibiz.engine.register("VIEW_WizardView",e=>new jy(e)),ibiz.engine.register("VIEW_DEWFDYNAEDITVIEW3",e=>new qy(e)),ibiz.engine.register("VIEW_DEWFDYNAACTIONVIEW",e=>new Xy(e)),ibiz.engine.register("VIEW_DEWFDYNASTARTVIEW",e=>new Zy(e)),ibiz.engine.register("VIEW_APPPORTALVIEW",e=>new st(e)),ibiz.engine.register("VIEW_DEPORTALVIEW",e=>new st(e)),ibiz.engine.register("VIEW_PortalView9",e=>new st(e)),ibiz.engine.register("VIEW_PortalView",e=>new st(e)),ibiz.engine.register("VIEW_DEPANELVIEW",e=>new eP(e)),ibiz.engine.register("VIEW_DECUSTOMVIEW",e=>new tP(e)),ibiz.engine.register("VIEW_DEPICKUPDATAVIEW",e=>new zo(e)),ibiz.engine.register("VIEW_DEINDEXPICKUPDATAVIEW",e=>new zo(e)),ibiz.engine.register("VIEW_DECALENDARVIEW",e=>new oP(e)),ibiz.engine.register("VIEW_CalendarExpView",e=>new aP(e)),ibiz.engine.register("VIEW_FormPickupDataView",e=>new lP(e)),ibiz.engine.register("VIEW_KanBanView",e=>new sP(e)),ibiz.engine.register("VIEW_APPLOGINVIEW",e=>new dP(e)),ibiz.engine.register("VIEW_TreeGridExView",e=>new pP(e)),ibiz.engine.register("VIEW_DETREEGRIDVIEW",e=>new hP(e)),ibiz.engine.register("VIEW_DECHARTEXPVIEW",e=>new fP(e)),ibiz.engine.register("VIEW_GridView9",e=>new St(e)),ibiz.engine.register("VIEW_ListView9",e=>new Tc(e)),ibiz.engine.register("VIEW_EditView9",e=>new it(e)),ibiz.engine.register("VIEW_DataView9",e=>new Jt(e)),ibiz.engine.register("VIEW_TreeView9",e=>new Oo(e)),ibiz.engine.register("VIEW_DETABEXPVIEW9",e=>new To(e)),ibiz.engine.register("VIEW_PortalView9",e=>new st(e)),ibiz.engine.register("VIEW_DEPORTALVIEW9",e=>new st(e)),ibiz.engine.register("VIEW_DEMEDITVIEW9",e=>new mP(e)),ibiz.engine.register("VIEW_DEMAPVIEW",e=>new bP(e)),ibiz.engine.register("VIEW_DEREPORTVIEW",e=>new vP(e))}});/*! Element Plus v2.4.2 */var CP={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 Ro(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!G(t)}const wP=B({name:"IBizDevtoolAction",setup(){var t;const e=_("devtool-action"),n=ht("devtool-evt"),r=D([]),o=D(null),i=D(!1),s=D(""),l=D(["context","params"]),c=$e(),u=(t=La())==null?void 0:t.proxy;c.afterEach(()=>{u&&(o.value=null,u.$forceUpdate())});const p=P=>P?Object.entries(P).map(([F,x])=>({key:F,value:Object.prototype.toString.call(x)==="[object Object]"?JSON.stringify(x):`${x}`})):[],h=A(()=>o.value?p(o.value.controller.context):[]),v=A(()=>o.value?p(o.value.controller.params):[]),g=P=>{r.value=[...P.values()]},b=P=>{(P.ctrlKey||P.metaKey)&&P.code==="F12"&&(i.value=!i.value)},m=P=>{var F;P.key===((F=o.value)==null?void 0:F.key)?o.value=null:o.value=P},f=P=>{if(!P)return;ibiz.util.text.copy(P)?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"},I=()=>{s.value="100%"},S=()=>{i.value=!1},y=P=>{const F=pn(P.dom);F&&(F.style.outline="3px solid #409EFF")},E=P=>{const F=pn(P.dom);F&&(F.style.outline="")};return Ie(()=>{n.on("change",g),document.addEventListener("keydown",b)}),ze(()=>{n.off("change",g),document.removeEventListener("keydown",b)}),{ns:e,items:r,activeItem:o,height:s,isShow:i,activeCollapse:l,contextArray:h,paramsArray:v,onItemClick:m,copy:f,minimize:w,expand:I,close:S,onMouseEnter:y,onMouseLeave:E}},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"},Ro(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"},Ro(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)},Ro(s)?s:{default:()=>[s]}),a("div",{class:this.ns.be("item","button"),onClick:()=>this.copy(i)},[N("\u62F7\u8D1D")])])})])])])}});var yP=Object.defineProperty,PP=(t,e,n)=>e in t?yP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lc=(t,e,n)=>(PP(t,typeof e!="symbol"?e+"":e,n),n);class IP{constructor(){Lc(this,"viewMap",new Map),Lc(this,"evt",new Si)}init(e){const n=document.createElement("div");n.classList.add("devtool"),document.body.append(n);const r=Ma(wP);r.use(e),r.use(ji,{locale:CP}),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 _P=O("d",new IP);var BP=O("i",{install:t=>{ibiz.i18n=Fy,ibiz.util.getExcelUtil=()=>Fe.import("./xlsx-util--ODZUMX_.js"),t.use(jc),t.use(ip),t.use(gP),t.use(xa),t.use(Oa),t.use(_y),t.use(Wm),t.use(Qm),t.use(pp),t.use(vp),t.use(bh),t.use(Wv),t.use(yh),t.use(ib),t.use(rf),t.use($m),t.use(Ta),t.use(Na),t.use(Fm),t.use(Pf),t.use(Nf),t.use(Sf),t.use(_h),t.use(Sm),t.use(km),t.use(uf),t.use(bf),t.use(tb),t.use(pb),t.use(yb),t.use(Fb),t.use(Dv),t.use(xv),t.use(Vf),t.use(Rv),t.use(jv),t.use(Qv),t.use(Wf),t.use(rg),t.use(dg),t.use(wy)}})}}});
14
+ //# sourceMappingURL=index-IQggCeg0.js.map