@farris/ui-vue 1.2.8 → 1.2.9

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 (215) hide show
  1. package/components/accordion/index.esm.js +129 -129
  2. package/components/accordion/index.umd.cjs +1 -0
  3. package/components/avatar/index.esm.js +166 -157
  4. package/components/avatar/index.umd.cjs +1 -0
  5. package/components/border-editor/index.umd.cjs +1 -0
  6. package/components/button/index.umd.cjs +1 -0
  7. package/components/button-edit/index.esm.js +343 -325
  8. package/components/button-edit/index.umd.cjs +1 -0
  9. package/components/button-group/index.umd.cjs +1 -0
  10. package/components/calculator/index.umd.cjs +1 -0
  11. package/components/calendar/index.esm.js +338 -338
  12. package/components/calendar/index.umd.cjs +1 -0
  13. package/components/capsule/index.esm.js +182 -182
  14. package/components/capsule/index.umd.cjs +1 -0
  15. package/components/checkbox/index.esm.js +326 -317
  16. package/components/checkbox/index.umd.cjs +1 -0
  17. package/components/color-picker/index.esm.js +118 -118
  18. package/components/color-picker/index.umd.cjs +3 -0
  19. package/components/combo-list/index.esm.js +338 -325
  20. package/components/combo-list/index.umd.cjs +1 -0
  21. package/components/combo-tree/index.esm.js +62 -62
  22. package/components/combo-tree/index.umd.cjs +1 -0
  23. package/components/common/index.umd.cjs +1 -0
  24. package/components/component/index.esm.js +382 -270
  25. package/components/component/index.umd.cjs +1 -0
  26. package/components/condition/index.esm.js +1018 -895
  27. package/components/condition/index.umd.cjs +1 -0
  28. package/components/content-container/index.esm.js +285 -212
  29. package/components/content-container/index.umd.cjs +1 -0
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +4761 -4319
  32. package/components/data-grid/index.umd.cjs +1 -0
  33. package/components/data-view/index.esm.js +2901 -2664
  34. package/components/data-view/index.umd.cjs +1 -0
  35. package/components/date-picker/index.esm.js +1502 -1488
  36. package/components/date-picker/index.umd.cjs +1 -0
  37. package/components/designer-canvas/index.css +1 -1
  38. package/components/designer-canvas/index.esm.js +938 -928
  39. package/components/designer-canvas/index.umd.cjs +1 -0
  40. package/components/designer-outline/index.css +1 -1
  41. package/components/designer-outline/index.esm.js +27 -27
  42. package/components/designer-outline/index.umd.cjs +1 -0
  43. package/components/designer-toolbox/index.esm.js +36 -12
  44. package/components/designer-toolbox/index.umd.cjs +1 -0
  45. package/components/discussion-editor/index.umd.cjs +3 -0
  46. package/components/discussion-list/index.umd.cjs +1 -0
  47. package/components/drawer/index.umd.cjs +1 -0
  48. package/components/dropdown/index.esm.js +241 -241
  49. package/components/dropdown/index.umd.cjs +2 -0
  50. package/components/dynamic-form/index.esm.js +1074 -885
  51. package/components/dynamic-form/index.umd.cjs +1 -0
  52. package/components/dynamic-resolver/index.esm.js +99 -94
  53. package/components/dynamic-resolver/index.umd.cjs +1 -0
  54. package/components/dynamic-view/index.umd.cjs +1 -0
  55. package/components/enum-editor/index.umd.cjs +1 -0
  56. package/components/events-editor/index.esm.js +577 -522
  57. package/components/events-editor/index.umd.cjs +1 -0
  58. package/components/expression-editor/index.esm.js +70 -70
  59. package/components/expression-editor/index.umd.cjs +1 -0
  60. package/components/external-container/index.css +1 -1
  61. package/components/external-container/index.esm.js +2938 -2619
  62. package/components/external-container/index.umd.cjs +1 -0
  63. package/components/field-selector/index.css +1 -1
  64. package/components/field-selector/index.esm.js +4766 -4325
  65. package/components/field-selector/index.umd.cjs +1 -0
  66. package/components/filter-bar/index.css +1 -1
  67. package/components/filter-bar/index.esm.js +1231 -1215
  68. package/components/filter-bar/index.umd.cjs +1 -0
  69. package/components/flow-canvas/index.css +1 -1
  70. package/components/flow-canvas/index.esm.js +1062 -1052
  71. package/components/flow-canvas/index.umd.cjs +1 -0
  72. package/components/image-cropper/index.esm.js +373 -373
  73. package/components/image-cropper/index.umd.cjs +1 -0
  74. package/components/input-group/index.esm.js +398 -394
  75. package/components/input-group/index.umd.cjs +1 -0
  76. package/components/layout/index.esm.js +268 -268
  77. package/components/layout/index.umd.cjs +1 -0
  78. package/components/list-nav/index.esm.js +234 -161
  79. package/components/list-nav/index.umd.cjs +1 -0
  80. package/components/list-view/index.css +1 -1
  81. package/components/list-view/index.esm.js +2288 -2048
  82. package/components/list-view/index.umd.cjs +1 -0
  83. package/components/loading/index.umd.cjs +8 -0
  84. package/components/locale/index.umd.cjs +1 -0
  85. package/components/lookup/index.css +1 -1
  86. package/components/lookup/index.esm.js +5776 -5305
  87. package/components/lookup/index.umd.cjs +1 -0
  88. package/components/mapping-editor/index.css +1 -1
  89. package/components/mapping-editor/index.esm.js +5496 -5036
  90. package/components/mapping-editor/index.umd.cjs +1 -0
  91. package/components/message-box/index.umd.cjs +1 -0
  92. package/components/modal/index.umd.cjs +1 -0
  93. package/components/nav/index.esm.js +383 -322
  94. package/components/nav/index.umd.cjs +3 -0
  95. package/components/notify/index.umd.cjs +1 -0
  96. package/components/number-range/index.esm.js +273 -269
  97. package/components/number-range/index.umd.cjs +1 -0
  98. package/components/number-spinner/index.esm.js +292 -283
  99. package/components/number-spinner/index.umd.cjs +1 -0
  100. package/components/order/index.css +1 -1
  101. package/components/order/index.esm.js +1008 -925
  102. package/components/order/index.umd.cjs +1 -0
  103. package/components/page-footer/index.esm.js +98 -98
  104. package/components/page-footer/index.umd.cjs +1 -0
  105. package/components/page-header/index.esm.js +949 -847
  106. package/components/page-header/index.umd.cjs +1 -0
  107. package/components/pagination/index.esm.js +464 -403
  108. package/components/pagination/index.umd.cjs +1 -0
  109. package/components/popover/index.umd.cjs +1 -0
  110. package/components/progress/index.esm.js +226 -226
  111. package/components/progress/index.umd.cjs +3 -0
  112. package/components/property-editor/index.esm.js +1110 -1092
  113. package/components/property-editor/index.umd.cjs +3 -0
  114. package/components/property-panel/index.esm.js +520 -513
  115. package/components/property-panel/index.umd.cjs +1 -0
  116. package/components/query-solution/index.css +1 -1
  117. package/components/query-solution/index.esm.js +1714 -1575
  118. package/components/query-solution/index.umd.cjs +1 -0
  119. package/components/radio-button/index.esm.js +67 -67
  120. package/components/radio-button/index.umd.cjs +1 -0
  121. package/components/radio-group/index.esm.js +298 -289
  122. package/components/radio-group/index.umd.cjs +1 -0
  123. package/components/rate/index.esm.js +195 -190
  124. package/components/rate/index.umd.cjs +1 -0
  125. package/components/response-layout/index.esm.js +112 -112
  126. package/components/response-layout/index.umd.cjs +1 -0
  127. package/components/response-layout-editor/index.esm.js +902 -877
  128. package/components/response-layout-editor/index.umd.cjs +1 -0
  129. package/components/response-toolbar/index.esm.js +874 -778
  130. package/components/response-toolbar/index.umd.cjs +1 -0
  131. package/components/schema-selector/index.css +1 -1
  132. package/components/schema-selector/index.esm.js +4594 -4289
  133. package/components/schema-selector/index.umd.cjs +8 -0
  134. package/components/search-box/index.esm.js +126 -126
  135. package/components/search-box/index.umd.cjs +1 -0
  136. package/components/section/index.esm.js +645 -503
  137. package/components/section/index.umd.cjs +1 -0
  138. package/components/smoke-detector/index.esm.js +120 -120
  139. package/components/smoke-detector/index.umd.cjs +1 -0
  140. package/components/spacing-editor/index.umd.cjs +1 -0
  141. package/components/splitter/index.esm.js +421 -348
  142. package/components/splitter/index.umd.cjs +1 -0
  143. package/components/step/index.esm.js +219 -219
  144. package/components/step/index.umd.cjs +1 -0
  145. package/components/switch/index.esm.js +232 -222
  146. package/components/switch/index.umd.cjs +1 -0
  147. package/components/tabs/index.esm.js +1823 -1744
  148. package/components/tabs/index.umd.cjs +1 -0
  149. package/components/tags/index.esm.js +399 -401
  150. package/components/tags/index.umd.cjs +1 -0
  151. package/components/text/index.esm.js +164 -164
  152. package/components/text/index.umd.cjs +1 -0
  153. package/components/textarea/index.esm.js +220 -215
  154. package/components/textarea/index.umd.cjs +1 -0
  155. package/components/time-picker/index.esm.js +693 -666
  156. package/components/time-picker/index.umd.cjs +1 -0
  157. package/components/tooltip/index.umd.cjs +1 -0
  158. package/components/transfer/index.css +1 -1
  159. package/components/transfer/index.esm.js +422 -413
  160. package/components/transfer/index.umd.cjs +1 -0
  161. package/components/tree-grid/index.css +1 -1
  162. package/components/tree-grid/index.esm.js +4799 -4358
  163. package/components/tree-grid/index.umd.cjs +1 -0
  164. package/components/tree-view/index.esm.js +2448 -2215
  165. package/components/tree-view/index.umd.cjs +1 -0
  166. package/components/uploader/index.esm.js +164 -164
  167. package/components/uploader/index.umd.cjs +2 -0
  168. package/components/verify-detail/index.esm.js +143 -143
  169. package/components/verify-detail/index.umd.cjs +1 -0
  170. package/components/video/index.esm.js +410 -331
  171. package/components/video/index.umd.cjs +1 -0
  172. package/components/weather/index.esm.js +901 -901
  173. package/components/weather/index.umd.cjs +16 -0
  174. package/farris.all.esm.js +12305 -11403
  175. package/farris.all.umd.cjs +8 -8
  176. package/index.css +1 -1
  177. package/package.json +1 -1
  178. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  179. package/types/combo-list/src/components/list-container.component.d.ts +3 -0
  180. package/types/combo-list/src/components/list-container.props.d.ts +5 -1
  181. package/types/common/entity/entity-schema.d.ts +258 -0
  182. package/types/component/src/component-ref.props.d.ts +4 -0
  183. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  184. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  185. package/types/data-grid/index.d.ts +5 -2
  186. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  187. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  188. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  189. package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
  190. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  191. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  192. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  193. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  194. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  195. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  196. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  197. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  198. package/types/data-view/composition/types.d.ts +18 -6
  199. package/types/data-view/composition/use-edit.d.ts +2 -1
  200. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  201. package/types/designer-canvas/src/types.d.ts +2 -2
  202. package/types/dynamic-form/index.d.ts +2 -1
  203. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  204. package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
  205. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  206. package/types/dynamic-resolver/src/types.d.ts +3 -2
  207. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  208. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  209. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  210. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  211. package/types/tabs/src/composition/types.d.ts +2 -2
  212. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  213. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  214. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  215. package/types/tags/index.d.ts +36 -5
@@ -0,0 +1 @@
1
+ (function(T,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("lodash-es"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../checkbox/index.umd.js"),require("../color-picker/index.umd.js"),require("../combo-list/index.umd.js"),require("../content-container/index.umd.js"),require("../data-grid/index.umd.js"),require("../date-picker/index.umd.js"),require("../dropdown/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../external-container/index.umd.js"),require("../events-editor/index.umd.js"),require("../filter-bar/index.umd.js"),require("../image-cropper/index.umd.js"),require("../input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../nav/index.umd.js"),require("../number-spinner/index.umd.js"),require("../number-range/index.umd.js"),require("../order/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../pagination/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/index.umd.js"),require("../radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../search-box/index.umd.js"),require("../section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../switch/index.umd.js"),require("../tabs/index.umd.js"),require("../tags/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../transfer/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../weather/index.umd.js"),require("../component/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../tree-grid/index.umd.js"),require("../common/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../accordion/index.umd.js","../avatar/index.umd.js","../button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../checkbox/index.umd.js","../color-picker/index.umd.js","../combo-list/index.umd.js","../content-container/index.umd.js","../data-grid/index.umd.js","../date-picker/index.umd.js","../dropdown/index.umd.js","../dynamic-form/index.umd.js","../external-container/index.umd.js","../events-editor/index.umd.js","../filter-bar/index.umd.js","../image-cropper/index.umd.js","../input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../nav/index.umd.js","../number-spinner/index.umd.js","../number-range/index.umd.js","../order/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../pagination/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../radio-group/index.umd.js","../rate/index.umd.js","../response-toolbar/index.umd.js","../response-layout/index.umd.js","../response-layout-editor/index.umd.js","../search-box/index.umd.js","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../tabs/index.umd.js","../tags/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../transfer/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../weather/index.umd.js","../component/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../tree-grid/index.umd.js","../common/index.umd.js"],s):(T=typeof globalThis<"u"?globalThis:T||self,s(T["flow-canvas"]={},T.Vue,T.LodashES,T.FAccordion,T.FAvatar,T.FButtonEdit,T.FButtonGroup,T.FCalendar,T.FCapsule,T.FCheckbox,T.FColorPicker,T.FComboList,T.FContentContainer,T.FDataGrid,T.FDatePicker,T.FDropdown,T.FDynamicForm,T.FExteranlContainer,T.FEventsEditor,T.FFilterBar,T.FImageCropper,T.FInputGroup,T.FLayout,T.FListNav,T.FListView,T.FLookup,T.FNav,T.FNumberSpinner,T.FNumberRange,T.FOrder,T.FPageHeader,T.FPageFooter,T.FPagination,T.FProgress,T.FQuerySolution,T.FRadioGroup,T.FRate,T.FResponseToolbar,T.FResponseLayout,T.FResponseLayoutEditorSetting,T.FSearchBox,T.FSection,T.FSmokeDetector,T.FSplitter,T.FStep,T.FSwitch,T.FTab,T.FTags,T.FText,T.FTimePicker,T.FTransfer,T.FTreeview,T.FUploader,T.FVerifyDetail,T.FWeather,T.FComponent,T.FVideo,T.FTextArea,T.FTreeGrid,T.common))})(this,function(T,s,Oe,Qe,Je,Ze,et,tt,nt,ot,rt,it,st,at,ct,ut,lt,dt,ft,pt,mt,vt,gt,yt,ht,xt,Ct,wt,bt,Pt,jt,It,St,Tt,Nt,Ot,Et,Ft,At,Dt,Mt,Bt,_t,Vt,qt,kt,Lt,Rt,Xt,$t,Yt,zt,Ut,Ht,Wt,Gt,Kt,Qt,Jt,Ee){"use strict";const Le={modelValue:{type:Object,default:{}}};function Zt(){const P={aroundDirection:"none",left:2,right:2,top:2,bottom:2,x:0,y:0};function V(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("fill","none"),e.setAttribute("stroke","#4d53e8"),e.setAttribute("stroke-width","2"),e.setAttribute("class",""),e}function y(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("fill","none"),e.setAttribute("stroke","#4d53e8"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e}function C(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("fill","none"),e.setAttribute("stroke","#4d53e8"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e}function b(e,t,u,g){const a=n=>{n.key==="Delete"&&(e.indexOf("^"),document.removeEventListener("keydown",a),t.remove())};u.addEventListener("mouseenter",()=>{u.setAttribute("stroke","#37d0ff"),g.setAttribute("stroke","#37d0ff"),u.setAttribute("stroke-width","3"),document.addEventListener("keydown",a)}),u.addEventListener("mouseleave",()=>{u.setAttribute("stroke","#4d53e8"),u.setAttribute("stroke-width","2"),g.setAttribute("stroke","#4d53e8"),document.removeEventListener("keydown",a)})}function m(e){let t=document.getElementById(e);if(t==null){const u=document.createElementNS("http://www.w3.org/2000/svg","svg"),g=V();u.appendChild(g);const a=y();u.appendChild(a);const n=C();u.appendChild(n);const z=C();u.appendChild(z),t=document.createElement("div"),t.id=e,t.style.position="absolute",t.appendChild(u),b(e,t,g,a);const q=document.getElementById("svg-container");return q&&q.appendChild(t),t}return t}function N(e,t,u,g,a){const n={x:0,y:0};return e==="west"&&(t==="north_west"&&(u==="north"&&(n.x=0,n.y=0-a/2),u==="west"&&(n.x=0-g/2,n.y=0)),t==="north_east"&&(u==="north"&&(n.x=-100,n.y=0-a/2),u==="east"&&(n.x=-100,n.y=0-a/2)),t==="south_east"&&(u==="south"&&(n.x=-100,n.y=0+a/2),u==="east"&&(n.x=-100,n.y=0+a/2)),t==="south_west"&&(u==="south"&&(n.x=0,n.y=0+a/2),u==="west"&&(n.x=0-g/2,n.y=0))),e==="east"&&(t==="north_west"&&(u==="north"&&(n.x=-100,n.y=0-a/2),u==="west"&&(n.x=100,n.y=0-a/2)),t==="north_east"&&(u==="north"&&(n.x=0,n.y=0-a/2),u==="east"&&(n.x=0+g/2,n.y=0)),t==="south_east"&&(u==="south"&&(n.x=0,n.y=0+a/2),u==="east"&&(n.x=0+g/2,n.y=0)),t==="south_west"&&(u==="south"&&(n.x=100,n.y=0+a/2),u==="west"&&(n.x=100,n.y=0+a/2))),e==="north"&&(t==="north_west"&&(u==="north"&&(n.x=0,n.y=0-a/2),u==="west"&&(n.x=0-g/2,n.y=0)),t==="north_east"&&(u==="north"&&(n.x=0,n.y=0-a/2),u==="east"&&(n.x=0+g/2,n.y=0)),t==="south_east"&&(u==="south"&&(n.x=0+g/2,n.y=-100),u==="east"&&(n.x=0+g/2,n.y=-100)),t==="south_west"&&(u==="south"&&(n.x=0-g/2,n.y=-100),u==="west"&&(n.x=0-g/2,n.y=-100))),e==="south"&&(t==="north_west"&&(u==="north"&&(n.x=0-g/2,n.y=100),u==="west"&&(n.x=0-g/2,n.y=100)),t==="north_east"&&(u==="north"&&(n.x=0+g/2,n.y=100),u==="east"&&(n.x=0+g/2,n.y=100)),t==="south_east"&&(u==="south"&&(n.x=0,n.y=0+a/2),u==="east"&&(n.x=0+g/2,n.y=0)),t==="south_west"&&(u==="south"&&(n.x=0,n.y=a/2),u==="west"&&(n.x=0-g/2,n.y=0))),n}function E(e,t,u,g){const a={x:0,y:0};return e==="south"&&(t==="west"&&(a.x=-100,a.y=0-g/2),t==="east"&&(a.x=100,a.y=-100),t==="south"&&(a.x=0-u/2,a.y=100),(t==="north"||t==="center")&&(a.x=0,a.y=0-g/2)),e==="north"&&(t==="west"&&(a.x=-100,a.y=100),t==="east"&&(a.x=100,a.y=100),t==="north"&&(a.x=0-u/2,a.y=-100),(t==="south"||t==="center")&&(a.x=0,a.y=g/2)),e==="east"&&(t==="north"&&(a.y=-100,a.x=-100),t==="south"&&(a.y=100,a.x=-100),t==="east"&&(a.x=100,a.y=100),(t==="west"||t==="center")&&(a.x=0-u/2,a.y=0)),e==="west"&&(t==="north"&&(a.y=-100,a.x=100),t==="south"&&(a.y=100,a.x=100),t==="west"&&(a.x=-100,a.y=g/2),(t==="east"||t==="center")&&(a.x=u/2,a.y=0)),a}function p(e,t,u,g,a,n,z){const q=z==="south"||z==="east"?"portrait":"landscape",ee=a,R=q==="landscape"?"east":"north",ie=z==="center"?q==="landscape"?"west":"south":z,se=N(ee,n,R,e,t),{x:D,y:x}=se,W=E(R,ie,e,t),{x:G,y:Q}=W;Q<0&&(t+=Math.abs(Q));const fe=new Map([["default",0+D],["portrait",0+D],["landscape",0+D]]),oe=new Map([["default",t+x],["portrait",t+x],["landscape",t+x]]);D<0&&(e+=Math.abs(D)),G>0&&(e+=G);const ge=new Map([["default",e+G],["portrait",e+G],["landscape",e+G]]),ce=new Map([["default",0+Q],["portrait",0+Q],["landscape",0+Q]]),ue=g.left>P.left,ae=g.bottom>P.bottom,pe=ue?0:ae?e/2:fe.get(q),ye=ae?t+g.bottom:ue?t/2:oe.get(q),he=ge.get(q),me=ce.get(q);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}function S(e,t,u,g,a,n,z){const q=z==="south"||z==="west"?"portrait":"landscape",ee=a,R=q==="landscape"?"west":"north",ie=z,se=N(ee,n,R,e,t),{x:D,y:x}=se,W=E(R,ie,e,t),{x:G,y:Q}=W;Q<0&&(t+=Math.abs(Q)),D>0&&(e+=D),G<0&&(e+=Math.abs(G));const fe=new Map([["default",e+D],["portrait",e+D],["landscape",e+D]]),oe=new Map([["default",t+x],["portrait",t+x],["landscape",t+x]]),ge=new Map([["default",0+G],["portrait",0+G],["landscape",0+G]]),ce=new Map([["default",0+Q],["portrait",0+Q],["landscape",0+Q]]),ue=g.right>P.right,ae=g.bottom>P.bottom,pe=ue?e+g.right:ae?e/2:fe.get(q),ye=ae?t+g.bottom:ue?t/2:oe.get(q),he=ge.get(q),me=ce.get(q);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}function f(e,t,u,g,a,n,z){const q=z==="north"||z==="east"?"portrait":"landscape",ee=a,R=q==="landscape"?"east":"south",ie=z,se=N(ee,n,R,e,t),{x:D,y:x}=se,W=E(R,ie,e,t),{x:G,y:Q}=W,fe=new Map([["default",0+D],["portrait",0+D],["landscape",0+D]]),oe=new Map([["default",0+x],["portrait",0+x],["landscape",0+x]]);D<0&&(e+=Math.abs(D)),x<0&&(t+=Math.abs(x)),G>0&&(e+=G),Q>0&&(t+=Q);const ge=new Map([["default",e+G],["portrait",e+G],["landscape",e+G]]),ce=new Map([["default",t+Q],["portrait",t+Q],["landscape",t+Q]]),ue=g.left>P.left,ae=g.top>P.top,pe=ue?0:ae?e/2:fe.get(q),ye=ae?0:ue?t/2:oe.get(q),he=ge.get(q),me=ce.get(q);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}function r(e,t,u,g,a,n,z){const q=z==="north"||z==="west"?"portrait":"landscape",ee=a,R=q==="landscape"?"west":"south",ie=z,se=N(ee,n,R,e,t),{x:D,y:x}=se,W=E(R,ie,e,t),{x:G,y:Q}=W;G<0&&(e+=Math.abs(G));const fe=new Map([["default",e+D],["portrait",e+D],["landscape",e+D]]),oe=new Map([["default",0+x],["portrait",0+x],["landscape",0+x]]);x<0&&(t+=Math.abs(x)),Q>0&&(t+=Q);const ge=new Map([["default",0+G],["portrait",0+G],["landscape",0+G]]),ce=new Map([["default",t+Q],["portrait",t+Q],["landscape",t+Q]]),ue=g.right>P.right,ae=g.top>P.top,pe=ue?e+g.right:ae?e/2:fe.get(q),ye=ae?0:ue?t/2:oe.get(q),he=ge.get(q),me=ce.get(q);return[{x:pe,y:ye},{x:he,y:me},{x:G,y:Q}]}const i=new Map([["north_east",p],["north_west",S],["south_east",f],["south_west",r]]),h=new Map([["east",["north_west","south_west"]],["west",["north_east","south_east"]],["north",["south_west","south_east"]],["south",["north_west","north_east"]],["center",[]]]);function c(e,t){return e==="north_west"?{aroundDirection:"north_west",left:t.left,right:100,top:t.top,bottom:t.top}:e==="south_west"?{aroundDirection:"south_west",left:t.left,right:100,top:t.top,bottom:t.bottom}:t}function F(e,t){return e==="north_east"?{left:100,right:t.right,top:t.top,bottom:t.top}:e==="south_east"?{left:100,right:t.right,top:t.top,bottom:t.bottom}:t}function $(e,t){return e==="south_west"?{left:t.left,right:t.right,top:100,bottom:t.top}:e==="south_east"?{left:t.left,right:t.right,top:100,bottom:t.bottom}:t}function L(e,t){return e==="north_west"?{left:t.left,right:t.right,top:t.top,bottom:100}:e==="north_east"?{left:t.left,right:t.right,top:t.top,bottom:100}:t}function l(e,t){return t}const O=new Map([["east",c],["west",F],["north",$],["south",L],["center",l]]);function H(e,t,u,g){const a=t.x-e.x,n=t.y-e.y,z=a>=0?"east":"west",q=n>=0?"south":"north",ee=`${q}_${z}`,ie=(h.get(u)||[]).includes(ee),se=O.get(u),D=ie?se(ee,P):P,x=Math.abs(a),W=Math.abs(n),G=i.get(`${q}_${z}`),[Q,fe,oe]=G(x,W,ie,D,u,ee,g),ge=z==="west"?oe.x<0?Math.abs(oe.x):0:oe.x>0?oe.x:0,ce=D.left+D.right+x+ge,ue=q==="north"?oe.y<0?Math.abs(oe.y):0:oe.y>0?oe.y:0,ae=D.top+D.bottom+W+ue,pe=z==="east"?e.x-D.left:e.x+D.right-ce,ye=q==="south"?e.y-D.top:e.y+D.bottom-ae,he=z==="east"?D.left:ce-D.right,me=q==="north"?ae-D.bottom:D.top,Ae=z==="west"?oe.x<0?Math.abs(oe.x):0:oe.x<0?ce:ce-oe.x,Te=q==="north"?oe.y<0?Math.abs(oe.y):0:oe.y<0?ae:ae-oe.y;return{width:ce,height:ae,left:pe,top:ye,startPoinInBoundray:{x:he,y:me},firstControlPoint:Q,secondControlPoint:fe,endPoinInBoundray:{x:Ae,y:Te}}}function Y(e,t,u,g,a){e.style.position="absolute",e.style.alignItems="center",e.style.left=`${t}px`,e.style.top=`${u}px`,e.style.width=g+"px",e.style.height=a+"px"}function re(e,t,u,g,a,n,z){const q=e.childNodes[0];q.setAttribute("width",String(t)),q.setAttribute("height",String(u)),e.appendChild(q);const ee=q.childNodes[0],R=`${g.x} ${g.y}`,ie=`${a.x} ${a.y}`,se=`${n.x} ${n.y}`,D=`${z.x} ${z.y}`,x="M ".concat(R).concat(" C ").concat(ie).concat(","+se+",").concat(D);ee.setAttribute("d",x),ee.setAttribute("fill","none"),ee.setAttribute("stroke","#4d53e8"),ee.setAttribute("stroke-width","2"),ee.setAttribute("class","")}function J(e,t,u,g,a){const{width:n,height:z,left:q,top:ee,startPoinInBoundray:R,firstControlPoint:ie,secondControlPoint:se,endPoinInBoundray:D}=H(t,u,g,a);Y(e,q,ee,n,z),re(e,n,z,R,ie,se,D)}function v(e,t,u,g,a){const n=m(e);J(n,t,u,g,a)}function K(e){return Number(e.replace("px",""))}function Z(e){if(e!==null){const t=e.parentNode,u=K(t.style.left),g=K(t.style.top);return{x:u+e.offsetLeft+e.offsetWidth/2,y:g+e.offsetTop+e.offsetHeight/2}}return{x:0,y:0}}function d(e,t){const u=document.getElementById(e),g=document.getElementById(t),a=Z(u),n=Z(g),z=a.x+2,q=a.y,ee=n.x-2,R=n.y;return{startPoint:{x:z,y:q},endPoint:{x:ee,y:R}}}function A(e,t,u,g){const{startPoint:a,endPoint:n}=d(e,t);v(`${e}_${t}`,a,n,u,g)}return{connect:A,drawing:v}}function en(_){const U=s.ref(),I=s.ref(0),P=s.ref(0),V=s.ref({x:0,y:0}),y=s.ref(),{drawing:C}=_;function b(c){return Number(c.replace("px",""))}function m(c){return(c&&c.className&&c.className.split?c.className.split(" "):[]).includes("f-flow-ancher")}function N(c){switch((c?c.className.split(" "):[]).find(L=>L.startsWith("circle-"))||""){case"circle-left":return"west";case"circle-right":return"east";case"circle-top":return"north";case"circle-bottom":return"south";default:return"center"}}function E(c,F,$){const L=$.getBoundingClientRect();I.value=L.left,P.value=L.top,V.value={x:c,y:F},U.value=N($)}function p(c){var Y;const F=c.clientX-I.value,$=c.clientY-P.value,L=V.value.x+F,l=V.value.y+$,O=c.target,H=O&&typeof O.className=="string"&&m(O)?N(O):"center";C(`${(Y=y.value)==null?void 0:Y.id}_curve_to`,{x:V.value.x,y:V.value.y},{x:L,y:l},U.value,H)}function S(c){const F=document.getElementById(c);F&&F.remove()}function f(){document.addEventListener("mousemove",p)}function r(){document.removeEventListener("mousemove",p)}function i(c){y.value=void 0,r()}function h(c,F){y.value=document.getElementById(c);const $=y.value.offsetParent,L=y.value.getBoundingClientRect(),l=$.getBoundingClientRect(),O=b($.style.left)+(L.left-l.left),H=b($.style.top)+(L.top-l.top),Y=O+L.width/2,re=H+L.height/2;E(Y,re,y.value),f()}return{drawFrom:h,eraseDrawingLine:S,finishToDraw:i,getAncherPointPosition:N,isAncherPoint:m}}const tn={id:{type:String,default:""},type:{type:String,default:""},modelValue:{type:Object},x:{type:Number,default:0},y:{type:Number,default:0},connection:{type:Array,default:[]}},Ie=s.ref(0);function nn(_,U){const I=U.getBoundingClientRect(),P=_.getBoundingClientRect(),V=P.top>=I.top,y=P.top<=I.bottom;return V&&y}function Re(_){if(!_)return;let U;if(_.className.includes("dgComponentSelected")?U=_:U=_.querySelector(".dgComponentSelected"),!U)return;const I=U.getBoundingClientRect();if(I.width===0&&I.height===0)return;const P=U.querySelector(".component-btn-group");if(P){if(!nn(U,_)){P.style.display="none";return}P.style.display="";const y=P.getBoundingClientRect(),C=P.querySelector("div");if(C){const b=C.getBoundingClientRect();C.style.top=y.top+"px",C.style.left=y.left-b.width+"px"}}}const on={modelValue:{type:Object,default:{}},componentId:{type:String,default:""}};var be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rn(_){return _&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_}function Se(_){throw new Error('Could not dynamically require "'+_+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Xe={exports:{}};(function(_,U){(function(I){_.exports=I()})(function(){return function(){function I(P,V,y){function C(N,E){if(!V[N]){if(!P[N]){var p=typeof Se=="function"&&Se;if(!E&&p)return p(N,!0);if(b)return b(N,!0);var S=new Error("Cannot find module '"+N+"'");throw S.code="MODULE_NOT_FOUND",S}var f=V[N]={exports:{}};P[N][0].call(f.exports,function(r){var i=P[N][1][r];return C(i||r)},f,f.exports,I,P,V,y)}return V[N].exports}for(var b=typeof Se=="function"&&Se,m=0;m<y.length;m++)C(y[m]);return C}return I}()({1:[function(I,P,V){var y={},C="(?:^|\\s)",b="(?:\\s|$)";function m(p){var S=y[p];return S?S.lastIndex=0:y[p]=S=new RegExp(C+p+b,"g"),S}function N(p,S){var f=p.className;f.length?m(S).test(f)||(p.className+=" "+S):p.className=S}function E(p,S){p.className=p.className.replace(m(S)," ").trim()}P.exports={add:N,rm:E}},{}],2:[function(I,P,V){(function(y){var C=I("contra/emitter"),b=I("crossvent"),m=I("./classes"),N=document,E=N.documentElement;function p(v,K){var Z=arguments.length;Z===1&&Array.isArray(v)===!1&&(K=v,v=[]);var d,A,e,t,u,g,a,n,z,q=null,ee,R,ie=!1,se=0,D,x=K||{};x.moves===void 0&&(x.moves=F),x.accepts===void 0&&(x.accepts=F),x.invalid===void 0&&(x.invalid=Ae),x.containers===void 0&&(x.containers=v||[]),x.isContainer===void 0&&(x.isContainer=c),x.copy===void 0&&(x.copy=!1),x.copySortSource===void 0&&(x.copySortSource=!1),x.revertOnSpill===void 0&&(x.revertOnSpill=!1),x.removeOnSpill===void 0&&(x.removeOnSpill=!1),x.direction===void 0&&(x.direction="vertical"),x.ignoreInputTextSelection===void 0&&(x.ignoreInputTextSelection=!0),x.mirrorContainer===void 0&&(x.mirrorContainer=N.body);var W=C({containers:x.containers,start:he,end:Te,cancel:He,remove:Ue,destroy:ge,canMove:ye,dragging:!1});return x.removeOnSpill===!0&&W.on("over",hn).on("out",xn),Q(),W;function G(o){return W.containers.indexOf(o)!==-1||x.isContainer(o)}function Q(o){var w=o?"remove":"add";r(E,w,"mousedown",ue),r(E,w,"mouseup",Ne)}function fe(o){var w=o?"remove":"add";r(E,w,"mousemove",ae)}function oe(o){var w=o?"remove":"add";b[w](E,"selectstart",ce),b[w](E,"click",ce)}function ge(){Q(!0),Ne({})}function ce(o){ee&&o.preventDefault()}function ue(o){t=o.clientX,u=o.clientY;var w=i(o)!==1||o.metaKey||o.ctrlKey;if(!w){var j=o.target,X=pe(j);X&&(ee=X,fe(),o.type==="mousedown"&&(O(j)?j.focus():o.preventDefault()))}}function ae(o){if(ee){if(i(o)===0){Ne({});return}if(!(o.clientX!==void 0&&Math.abs(o.clientX-t)<=(x.slideFactorX||0)&&o.clientY!==void 0&&Math.abs(o.clientY-u)<=(x.slideFactorY||0))){if(x.ignoreInputTextSelection){var w=J("clientX",o)||0,j=J("clientY",o)||0,X=N.elementFromPoint(w,j);if(O(X))return}var te=ee;fe(!0),oe(),Te(),me(te),m.add(n||e,"gu-transit"),wn(),Cn(),se=0,_e(o)}}}function pe(o){if(!(W.dragging&&d)&&!G(o)){for(var w=o;l(o)&&G(l(o))===!1;)if(x.invalid(o,w)||(o=l(o),!o))return;var j=l(o);if(j&&!x.invalid(o,w)){var X=x.moves(o,j,w,Y(o));if(X)return{item:o,source:j}}}}function ye(o){return!!pe(o)}function he(o){var w=pe(o);w&&me(w)}function me(o){On(o.item,o.source)&&(n=o.item.cloneNode(!0),W.emit("cloned",n,o.item,"copy")),A=o.source,e=o.item,g=a=Y(o.item),W.dragging=!0,W.emit("drag",e,A)}function Ae(){return!1}function Te(){if(W.dragging){var o=n||e;ze(o,l(o))}}function De(){ee=!1,fe(!0),oe(!0)}function Ne(o){if(De(),!!W.dragging){var w=n||e,j=J("clientX",o)||0,X=J("clientY",o)||0,te=h(d,j,X),ne=We(te,j,X);ne&&(n&&x.copySortSource||!n||ne!==A)?ze(w,ne):x.removeOnSpill?Ue():He()}}function ze(o,w){var j=l(o);n&&x.copySortSource&&w===A&&j.removeChild(e),Be(w)?W.emit("cancel",o,A):W.emit("drop",o,w,A,a),Me()}function Ue(){if(W.dragging){var o=n||e,w=l(o);w&&w.removeChild(o),W.emit(n?"cancel":"remove",o,w,A),Me()}}function He(o){if(W.dragging){var w=arguments.length>0?o:x.revertOnSpill,j=n||e,X=l(j),te=Be(X);te===!1&&w&&(n?X&&X.removeChild(n):A.insertBefore(j,g)),te||w?W.emit("cancel",j,A,A):W.emit("drop",j,X,A,a),Me()}}function Me(){var o=n||e;De(),bn(),Pn(),o&&m.rm(o,"gu-transit"),z&&clearTimeout(z),W.dragging=!1,q&&W.emit("out",o,q,A),W.emit("dragend",o,se),A=e=n=g=a=z=q=null}function Be(o,w){var j;return w!==void 0?j=w:d?j=a:j=Y(n||e),o===A&&j===g}function We(o,w,j){for(var X=o;X&&!te();)X=l(X);return X;function te(){var ne=G(X);if(ne===!1)return!1;var we=Ge(X,o),ve=Ke(X,we,w,j),Ce=Be(X,ve);return Ce?!0:x.accepts(e,X,A,ve)}}function _e(o){if(!d)return;o.preventDefault();var w=J("clientX",o)||0,j=J("clientY",o)||0;d.style.left=w-2+"px",d.style.top=j-2+"px";var X=n||e,te=h(d,w,j),ne=We(te,w,j),we=ne!==null&&ne!==q;(we||ne===null)&&(xe(),q=ne,je()),Nn(te,j);var ve=l(X);if(ne===A&&n&&!x.copySortSource){ve&&ve.removeChild(X);return}var Ce,Pe=Ge(ne,te);if(ie=jn(Pe,ne),Pe!==null)Ce=Ke(ne,Pe,w,j);else if(x.revertOnSpill===!0&&!n)Ce=g,ne=A;else{n&&ve&&ve.removeChild(X),n&&R&&(R.style.display="none");return}R.style.display="block",yn(Ce,X,we),Ce?Sn(Pe,Ce):Tn(ne);function le(de){W.emit(de,X,q,A)}function je(){we&&le("over")}function xe(){q&&le("out")}}function yn(o,w,j){(o===w||o===Y(w))&&(a=Y(w)),(o===null&&j||o!==w&&o!==Y(w))&&(a=o)}function hn(o){m.rm(o,"gu-hide")}function xn(o){W.dragging&&m.add(o,"gu-hide")}function Cn(){d||(d=document.createElement("div"),d.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",d.innerHTML=x.getMirrorText&&x.getMirrorText(e)||"控件",m.add(d,"gu-mirror"),x.mirrorContainer.appendChild(d),r(E,"add","mousemove",_e),m.add(x.mirrorContainer,"gu-unselectable"),W.emit("cloned",d,e,"mirror"))}function wn(){if(R=document.createElement("div"),m.add(R,"gu-insertion"),e){var o=e.getBoundingClientRect();R.style.left=o.left+"px",R.style.top=o.top+"px"}ie=!1,x.mirrorContainer.appendChild(R)}function bn(){d&&(m.rm(x.mirrorContainer,"gu-unselectable"),r(E,"remove","mousemove",_e),l(d).removeChild(d),d=null)}function Pn(){R&&(l(R).removeChild(R),R=null)}function Ge(o,w){for(var j=w;j!==o&&l(j)!==o;)j=l(j);return j===E?null:j}function jn(o,w){if(!w)return ie;var j=o||w&&w.lastElementChild;if(!j)return!0;var X=getComputedStyle(o),te=/^inline/.test(X.getPropertyValue("display"))||/^(left|right)$/.test(X.getPropertyValue("float"));if(te)return!0;if(w){var ne=getComputedStyle(w),we=ne.getPropertyValue("display");if(/flex$/.test(we)){var ve=ne.getPropertyValue("flex-direction")||"row";if(ve==="row"||ve==="row-reverse")return!In(w)}return!1}return!0}function In(o){if(!o.children||!o.children.length)return!1;for(const w of Array.from(o.children)){const X=(w.className&&w.className.split(" ")||[]).filter(te=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(te));if(!X.length)return!1;for(const te of X){const ne=te.slice(te.lastIndexOf("-")+1);if(parseInt(ne,10)!==12)return!1}}return!0}function Sn(o,w){const j=w.getBoundingClientRect();if(R.style.left=j.left+"px",R.style.top=j.top+"px",ie){if(R.style.height=j.height+"px",R.style.width="4px",o){const X=o.getBoundingClientRect();X.top!==j.top&&(R.style.left=X.right+"px",R.style.top=X.top+"px",R.style.height=X.height+"px")}}else if(R.style.height="4px",R.style.width=j.width+"px",D){const X=D.getBoundingClientRect();j.top<X.top&&(R.style.display="none")}w===e&&e&&(R.style.display="none")}function Tn(o){a=null;var w=o.lastElementChild;if(w){var j=w.getBoundingClientRect();ie?(R.style.left=j.right+"px",R.style.top=j.top+"px",R.style.height=j.height+"px",R.style.width="4px"):(R.style.left=j.left+"px",R.style.top=j.bottom+"px",R.style.height="4px",R.style.width=j.width+"px"),w===e&&e&&(R.style.display="none")}else R.style.display="none"}function Nn(o,w){if(!x.mirrorContainer.contains(o)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(D=S(o),!D||!D.contains(o)))return;const j=document.querySelector(".dgComponentSelected"),X=D.getBoundingClientRect();if(w-30<X.top&&D.scrollTop>0){let te=D.scrollTop<10?D.scrollTop:10;D.scrollBy(0,-1*te),j&&D.contains(j)&&(se=se+-1*te)}if(w+30>X.bottom&&D.scrollTop<D.scrollHeight-D.clientHeight){const te=D.scrollHeight-D.clientHeight-D.scrollTop;let ne=te<10?te:10;D.scrollBy(0,ne),j&&D.contains(j)&&(se=se+ne)}}function Ke(o,w,j,X){var te=x.direction==="horizontal",ne=x.direction==="mixed",we=w!==o?Ce():ve();return we;function ve(){var le=o.children.length,je,xe,de;for(je=0;je<le;je++)if(xe=o.children[je],de=xe.getBoundingClientRect(),te&&de.left+de.width/2>j||!ne&&!te&&de.top+de.height/2>X||ne&&de.left+de.width>j&&de.top+de.height>X)return xe;return null}function Ce(){var le=w.getBoundingClientRect();if(ne){var je=X-le.top,xe=j-le.left,de=le.bottom-X,Ve=le.right-j,qe=Math.min(xe,Ve,je,de),ke;return ie?ke=Ve<xe:ke=de===qe||Ve===qe||xe===qe,Pe(ke)}return Pe(te?j>le.left+$(le)/2:X>le.top+L(le)/2)}function Pe(le){return le?Y(w):w}}function On(o,w){return typeof x.copy=="boolean"?x.copy:x.copy(o,w)}}function S(v){const K=Array.from(window.scrollContainerList);if(K.length===1){const d=Array.from(window.scrollContainerList)[0];return document.getElementById(d)}const Z=f(K);for(const d of Z)if(d.contains(v))return d;return null}function f(v){const K=[];return v.forEach(Z=>{const d=document.getElementById(Z);d&&K.push(d)}),K.sort((Z,d)=>Z.contains(d)?1:d.contains(Z)?-1:0),K}function r(v,K,Z,d){var A={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},e={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},t={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};y.navigator.pointerEnabled?b[K](v,e[Z],d):y.navigator.msPointerEnabled?b[K](v,t[Z],d):(b[K](v,A[Z],d),b[K](v,Z,d))}function i(v){if(v.touches!==void 0)return v.touches.length;if(v.which!==void 0&&v.which!==0)return v.which;if(v.buttons!==void 0)return v.buttons;var K=v.button;if(K!==void 0)return K&1?1:K&2?3:K&4?2:0}function h(v,K,Z){v=v||{};var d=v.className||"",A;return v.className+=" gu-hide",A=N.elementFromPoint(K,Z),v.className=d,A}function c(){return!1}function F(){return!0}function $(v){return v.width||v.right-v.left}function L(v){return v.height||v.bottom-v.top}function l(v){return v.parentNode===N?null:v.parentNode}function O(v){return v.tagName==="INPUT"||v.tagName==="TEXTAREA"||v.tagName==="SELECT"||H(v)}function H(v){return!v||v.contentEditable==="false"?!1:v.contentEditable==="true"?!0:H(l(v))}function Y(v){return v.nextElementSibling||K();function K(){var Z=v;do Z=Z.nextSibling;while(Z&&Z.nodeType!==1);return Z}}function re(v){return v.targetTouches&&v.targetTouches.length?v.targetTouches[0]:v.changedTouches&&v.changedTouches.length?v.changedTouches[0]:v}function J(v,K){var Z=re(K),d={pageX:"clientX",pageY:"clientY"};return v in d&&!(v in Z)&&d[v]in Z&&(v=d[v]),Z[v]}P.exports=p}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(I,P,V){P.exports=function(C,b){return Array.prototype.slice.call(C,b)}},{}],4:[function(I,P,V){var y=I("ticky");P.exports=function(b,m,N){b&&y(function(){b.apply(N||null,m||[])})}},{ticky:10}],5:[function(I,P,V){var y=I("atoa"),C=I("./debounce");P.exports=function(m,N){var E=N||{},p={};return m===void 0&&(m={}),m.on=function(S,f){return p[S]?p[S].push(f):p[S]=[f],m},m.once=function(S,f){return f._once=!0,m.on(S,f),m},m.off=function(S,f){var r=arguments.length;if(r===1)delete p[S];else if(r===0)p={};else{var i=p[S];if(!i)return m;i.splice(i.indexOf(f),1)}return m},m.emit=function(){var S=y(arguments);return m.emitterSnapshot(S.shift()).apply(this,S)},m.emitterSnapshot=function(S){var f=(p[S]||[]).slice(0);return function(){var r=y(arguments),i=this||m;if(S==="error"&&E.throws!==!1&&!f.length)throw r.length===1?r[0]:r;return f.forEach(function(c){E.async?C(c,r,i):c.apply(i,r),c._once&&m.off(S,c)}),m}},m}},{"./debounce":4,atoa:3}],6:[function(I,P,V){(function(y){var C=I("custom-event"),b=I("./eventmap"),m=y.document,N=S,E=r,p=[];y.addEventListener||(N=f,E=i),P.exports={add:N,remove:E,fabricate:h};function S(l,O,H,Y){return l.addEventListener(O,H,Y)}function f(l,O,H){return l.attachEvent("on"+O,F(l,O,H))}function r(l,O,H,Y){return l.removeEventListener(O,H,Y)}function i(l,O,H){var Y=$(l,O,H);if(Y)return l.detachEvent("on"+O,Y)}function h(l,O,H){var Y=b.indexOf(O)===-1?J():re();l.dispatchEvent?l.dispatchEvent(Y):l.fireEvent("on"+O,Y);function re(){var v;return m.createEvent?(v=m.createEvent("Event"),v.initEvent(O,!0,!0)):m.createEventObject&&(v=m.createEventObject()),v}function J(){return new C(O,{detail:H})}}function c(l,O,H){return function(re){var J=re||y.event;J.target=J.target||J.srcElement,J.preventDefault=J.preventDefault||function(){J.returnValue=!1},J.stopPropagation=J.stopPropagation||function(){J.cancelBubble=!0},J.which=J.which||J.keyCode,H.call(l,J)}}function F(l,O,H){var Y=$(l,O,H)||c(l,O,H);return p.push({wrapper:Y,element:l,type:O,fn:H}),Y}function $(l,O,H){var Y=L(l,O,H);if(Y){var re=p[Y].wrapper;return p.splice(Y,1),re}}function L(l,O,H){var Y,re;for(Y=0;Y<p.length;Y++)if(re=p[Y],re.element===l&&re.type===O&&re.fn===H)return Y}}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(I,P,V){(function(y){var C=[],b="",m=/^on/;for(b in y)m.test(b)&&C.push(b.slice(2));P.exports=C}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(I,P,V){(function(y){var C=y.CustomEvent;function b(){try{var m=new C("cat",{detail:{foo:"bar"}});return m.type==="cat"&&m.detail.foo==="bar"}catch{}return!1}P.exports=b()?C:typeof document<"u"&&typeof document.createEvent=="function"?function(N,E){var p=document.createEvent("CustomEvent");return E?p.initCustomEvent(N,E.bubbles,E.cancelable,E.detail):p.initCustomEvent(N,!1,!1,void 0),p}:function(N,E){var p=document.createEventObject();return p.type=N,E?(p.bubbles=!!E.bubbles,p.cancelable=!!E.cancelable,p.detail=E.detail):(p.bubbles=!1,p.cancelable=!1,p.detail=void 0),p}}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(I,P,V){var y=P.exports={},C,b;function m(){throw new Error("setTimeout has not been defined")}function N(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?C=setTimeout:C=m}catch{C=m}try{typeof clearTimeout=="function"?b=clearTimeout:b=N}catch{b=N}})();function E(L){if(C===setTimeout)return setTimeout(L,0);if((C===m||!C)&&setTimeout)return C=setTimeout,setTimeout(L,0);try{return C(L,0)}catch{try{return C.call(null,L,0)}catch{return C.call(this,L,0)}}}function p(L){if(b===clearTimeout)return clearTimeout(L);if((b===N||!b)&&clearTimeout)return b=clearTimeout,clearTimeout(L);try{return b(L)}catch{try{return b.call(null,L)}catch{return b.call(this,L)}}}var S=[],f=!1,r,i=-1;function h(){!f||!r||(f=!1,r.length?S=r.concat(S):i=-1,S.length&&c())}function c(){if(!f){var L=E(h);f=!0;for(var l=S.length;l;){for(r=S,S=[];++i<l;)r&&r[i].run();i=-1,l=S.length}r=null,f=!1,p(L)}}y.nextTick=function(L){var l=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)l[O-1]=arguments[O];S.push(new F(L,l)),S.length===1&&!f&&E(c)};function F(L,l){this.fun=L,this.array=l}F.prototype.run=function(){this.fun.apply(null,this.array)},y.title="browser",y.browser=!0,y.env={},y.argv=[],y.version="",y.versions={};function $(){}y.on=$,y.addListener=$,y.once=$,y.off=$,y.removeListener=$,y.removeAllListeners=$,y.emit=$,y.prependListener=$,y.prependOnceListener=$,y.listeners=function(L){return[]},y.binding=function(L){throw new Error("process.binding is not supported")},y.cwd=function(){return"/"},y.chdir=function(L){throw new Error("process.chdir is not supported")},y.umask=function(){return 0}},{}],10:[function(I,P,V){(function(y){var C=typeof y=="function",b;C?b=function(m){y(m)}:b=function(m){setTimeout(m,0)},P.exports=b}).call(this,I("timers").setImmediate)},{timers:11}],11:[function(I,P,V){(function(y,C){var b=I("process/browser.js").nextTick,m=Function.prototype.apply,N=Array.prototype.slice,E={},p=0;V.setTimeout=function(){return new S(m.call(setTimeout,window,arguments),clearTimeout)},V.setInterval=function(){return new S(m.call(setInterval,window,arguments),clearInterval)},V.clearTimeout=V.clearInterval=function(f){f.close()};function S(f,r){this._id=f,this._clearFn=r}S.prototype.unref=S.prototype.ref=function(){},S.prototype.close=function(){this._clearFn.call(window,this._id)},V.enroll=function(f,r){clearTimeout(f._idleTimeoutId),f._idleTimeout=r},V.unenroll=function(f){clearTimeout(f._idleTimeoutId),f._idleTimeout=-1},V._unrefActive=V.active=function(f){clearTimeout(f._idleTimeoutId);var r=f._idleTimeout;r>=0&&(f._idleTimeoutId=setTimeout(function(){f._onTimeout&&f._onTimeout()},r))},V.setImmediate=typeof y=="function"?y:function(f){var r=p++,i=arguments.length<2?!1:N.call(arguments,1);return E[r]=!0,b(function(){E[r]&&(i?f.apply(null,i):f.call(null),V.clearImmediate(r))}),r},V.clearImmediate=typeof C=="function"?C:function(f){delete E[f]}}).call(this,I("timers").setImmediate,I("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Xe);var sn=Xe.exports;const $e=rn(sn);function an(_){let U;function I(r,i,h){const c={};return c.sourceElement=r,c.sourceContainer=h,c.targetContainer=i,c.sourceType=r.getAttribute("data-sourceType")||"move",c.controlType=r.getAttribute("data-controlType"),c.controlTypeName=r.getAttribute("data-controlTypeName"),c.controlCategory=r.getAttribute("data-category"),c.controlFeature=r.getAttribute("data-feature"),c.parentComponentInstance=i.componentInstance,c.controlCategory==="input"?c.bindingType="field":c.controlCategory==="dataCollection"&&(c.bindingType="entity"),r.componentInstance&&(c.controlType=r.componentInstance.value.schema.type,c.controlCategory=r.componentInstance.value.schema.category),c}function P(r,i,h){if(r.contains(i)||i.classList.contains("no-drop"))return!1;const c=!0;if(r.componentInstance&&r.componentInstance.value.getDragScopeElement){const F=r.componentInstance.value.getDragScopeElement();if(F&&!F.contains(i))return!1}if(i.componentInstance&&i.componentInstance.value.canAccepts){const F=I(r,i,h);return i.componentInstance.value.canAccepts(F)}return c}function V(r,i){const h=i.getBoundingClientRect(),c=r.getBoundingClientRect(),F=c.top>=h.top,$=c.top<h.bottom;return F&&$}function y(r,i){const h=r.querySelector(".dgComponentSelected");if(!(!h||i===0)&&V(h,r)){const c=h.querySelector(".component-btn-group");if(c){const F=c.querySelector("div");if(F&&F.style.top){const $=Number.parseFloat(F.style.top);F.style.top=$-i+"px"}}}}function C(r,i,h){r.componentInstance;let c=-1;if(!i)return-1;if(r.componentInstance.value.contents){if(h&&h.componentInstance){if(h.getAttribute("data-noattach"))c=Number(h.getAttribute("data-position"));else{const F=h.componentInstance.value.schema;let $={id:F.id};F.type==="Component"&&($={component:F.id}),c=Oe.findIndex(r.componentInstance.value.contents,$),c=c===-1?0:c}c!==-1&&r.componentInstance.value.contents.splice(c,0,i)}else r.componentInstance.value.contents.push(i);r.componentInstance.value.updateDragAndDropRules()}return c}function b(r,i){if(!r.componentInstance.value.contents)return-1;if(r.componentInstance.value.contents.length===0)return 0;if(!i||!i.componentInstance)return r.componentInstance.value.contents.length;if(i.getAttribute("data-noattach"))return Number(i.getAttribute("data-position"));const h=i.componentInstance.value.schema;let c;h.type==="Component"?c={component:h.id}:c={id:h.id};let F=Oe.findIndex(r.componentInstance.value.contents,c);return F=F===-1?0:F,F}function m(r,i,h,c){if(i.componentInstance.value.addNewChildComponentSchema){const F=b(i,c),$=String(r.getAttribute("data-controltype")),L=r.getAttribute("data-feature"),l=String(r.innerText),O=i.componentInstance.value,H={componentType:$,label:l,parentComponentInstance:O,targetPosition:F},Y=L?JSON.parse(L):{},re=Object.assign(H,Y),J=i.componentInstance.value.addNewChildComponentSchema(re,_);C(i,J,c)}i.contains(r)&&i.removeChild(r)}function N(r,i,h,c){let F,$=-1;if(r.componentInstance&&r.componentInstance.value.triggerBelongedComponentToMoveWhenMoved){const O=r.componentInstance.value.getBelongedComponentInstance(r.componentInstance);O&&(r=s.ref(O.elementRef).value.parentElement,h=r.parentElement)}const L=r.componentInstance&&r.componentInstance.value.schema;let l={id:L&&L.id};L.type==="component"&&(l={component:L&&L.id}),$=Oe.findIndex(h.componentInstance.value.contents,l),$!==-1&&h.componentInstance.value.contents&&(F=h.componentInstance.value.contents.splice($,1),F=F[0]),C(i,F,c),h.componentInstance&&h.componentInstance.value.onChildElementMovedOut&&h.componentInstance.value.onChildElementMovedOut(r),i.componentInstance&&i.componentInstance.value.onAcceptMovedChildElement&&i.componentInstance.value.onAcceptMovedChildElement(r,h)}function E(r,i,h,c){if(!i||r.contains(i))return;switch(r.getAttribute("data-sourceType")){case"control":case"field":case"entity":{m(r,i,h,c);break}default:h.componentInstance.value.contents?N(r,i,h,c):i.contains(r)&&i.removeChild(r)}Ie.value++}function p(r){U&&U.destroy(),$e&&(U=$e([],{mirrorContainer:r,direction:"mixed",revertOnSpill:!0,moves(i,h,c){let F=!0;return i.classList.contains("no-drag")&&(F=!1),i.componentInstance&&(F=!!c.getAttribute("data-dragging-icon")),F},copy(i){return i.classList.contains("drag-copy")},getMirrorText(i){return i.componentInstance&&i.componentInstance.value.getDraggingDisplayText?i.componentInstance.value.getDraggingDisplayText():i.innerText||"控件"},accepts(i,h,c){const F=P(i,h,c),$=r.lastElementChild;return F?$.className=$.className.replace("undroppable",""):$.className.includes("undroppable")||($.className+=" undroppable"),F}}).on("over",(i,h)=>{h.className+=" drag-over"}).on("out",(i,h)=>{h.className=h.className.replace("drag-over","").replace(" ","")}).on("drop",(i,h,c,F)=>{E(i,h,c,F)}).on("dragend",(i,h)=>{y(i,h)}))}function S(r,i){if(!r)return;if(i.noDragDrop)return r;const h=r.querySelector(`[data-dragref='${i.id}-container']`)||r;U&&h&&U.containers.push(h)}function f(){if(!U)return;const r=document.getElementsByClassName("controlCategory");r&&(U.containers=U.containers.filter(i=>!i.className.includes("controlCategory")),Array.from(r).forEach(i=>{U.containers.push(i)}))}return{attachComponents:S,attachToolbox:f,initializeDragula:p}}const cn={id:{type:String,default:""},componentId:{type:String,default:""},type:{type:String,default:""},canDelete:{type:Boolean,default:!0},canMove:{type:Boolean,default:!0},canSelectParent:{type:Boolean,default:!0},customButtons:{type:Array,default:[]},customClass:{type:String,default:""},customStyle:{type:String,default:""},modelValue:{type:Object},ignore:{type:Boolean,default:!1}},M={},B={},k={};let Ye=!1;function un(){Ye||(Ye=!0,Je.registerDesigner(M,B,k),Qe.registerDesigner(M,B,k),Ze.registerDesigner(M,B,k),et.registerDesigner(M,B,k),tt.registerDesigner(M,B,k),nt.registerDesigner(M,B,k),ot.registerDesigner(M,B,k),rt.registerDesigner(M,B,k),it.registerDesigner(M,B,k),st.registerDesigner(M,B,k),at.registerDesigner(M,B,k),ct.registerDesigner(M,B,k),ut.registerDesigner(M,B,k),lt.registerDesigner(M,B,k),ft.registerDesigner(M,B,k),dt.registerDesigner(M,B),pt.registerDesigner(M,B,k),mt.registerDesigner(M,B,k),vt.registerDesigner(M,B,k),gt.registerDesigner(M,B,k),ht.registerDesigner(M,B,k),yt.registerDesigner(M,B,k),Ct.registerDesigner(M,B,k),xt.registerDesigner(M,B,k),bt.registerDesigner(M,B,k),wt.registerDesigner(M,B,k),Pt.registerDesigner(M,B,k),jt.registerDesigner(M,B,k),It.registerDesigner(M,B,k),St.registerDesigner(M,B,k),Tt.registerDesigner(M,B,k),Nt.registerDesigner(M,B,k),Ot.registerDesigner(M,B,k),At.registerDesigner(M,B,k),Dt.registerDesigner(M,B,k),Ft.registerDesigner(M,B,k),Et.registerDesigner(M,B,k),Mt.registerDesigner(M,B,k),Bt.registerDesigner(M,B,k),_t.registerDesigner(M,B,k),Vt.registerDesigner(M,B,k),qt.registerDesigner(M,B,k),kt.registerDesigner(M,B,k),Lt.registerDesigner(M,B,k),Rt.registerDesigner(M,B,k),Xt.registerDesigner(M,B,k),Wt.registerDesigner(M,B,k),$t.registerDesigner(M,B,k),Yt.registerDesigner(M,B,k),zt.registerDesigner(M,B,k),Ut.registerDesigner(M,B,k),Ht.registerDesigner(M,B,k),Gt.registerDesigner(M,B),Kt.registerDesigner(M,B,k),Qt.registerDesigner(M,B,k),Jt.registerDesigner(M,B,k))}const ln={id:{type:String}},dn=s.defineComponent({name:"FDesignerPlaceholder",props:ln,emits:[],setup(_){const U=s.computed(()=>({"drag-and-drop-alert":!0,"no-drag":!0,"w-100":!0})),I=s.computed(()=>({height:"60px",display:"flex","justify-content":"center","align-items":"center",margin:0,padding:".75rem 1.25rem",border:"1px solid transparent","border-radius":"3px",color:"#315585","background-color":"#dfedff","border-color":"#d2e6ff"}));return()=>s.createVNode("div",{class:U.value,style:I.value,role:"alert","data-noattach":"true","data-position":"0"},[s.createTextVNode("拖拽组件到这里")])}});function fn(_){return typeof _=="function"||Object.prototype.toString.call(_)==="[object Object]"&&!s.isVNode(_)}const Fe=s.defineComponent({name:"FDesignerItem",props:cn,emits:["selectionChange"],setup(_,U){const I=s.ref(`${_.modelValue.id}-component`),P=s.ref(_.canMove),V=s.ref(_.canDelete),y=s.ref(!1),C=s.ref(_.modelValue),b=s.ref(_.componentId||""),m=s.ref(""),N=s.ref(""),E=s.ref(_.customClass),p=s.ref(),S=s.inject("canvas-dragula"),f=s.ref(),r=s.inject("design-item-context"),i={designerItemElementRef:p,componentInstance:f,schema:C.value,parent:r,setupContext:U};s.provide("design-item-context",i);const h=s.inject("useFormSchema"),c=s.computed(()=>{const d=_.modelValue.appearance&&_.modelValue.appearance.class||"";let A={"farris-component":!0,"flex-fill":C.value.id=="root-component","position-relative":P.value&&V.value,"farris-nested":y.value,"can-move":P.value,"d-none":p.value&&p.value.classList.contains("d-none"),dgComponentSelected:p.value&&p.value.classList.contains("dgComponentSelected"),dgComponentFocused:p.value&&p.value.classList.contains("dgComponentFocused")};return A[`farris-component-${C.value.type}`]=!0,A=Ee.getCustomClass(A,d),A=Ee.getCustomClass(A,N.value),A=Ee.getCustomClass(A,E.value),A}),F=s.computed(()=>{const d={},A=_.modelValue.appearance&&_.modelValue.appearance.style||"";return A&&A.split(";").reduce((e,t)=>{const[u,g]=t.split(":");return e[u]=g,e},d),m.value&&m.value.split(";").reduce((e,t)=>{const[u,g]=t.split(":");return u&&(e[u]=g),e},d),d});function $(d,A){var u,g,a;if(d&&(d.preventDefault(),d.stopPropagation()),f.value.triggerBelongedComponentToDeleteWhenDeleted){const n=f.value.getBelongedComponentInstance(f);if(n&&n.parent){const z=s.ref(n==null?void 0:n.parent),q=z.value.contents.findIndex(ee=>ee.id===n.schema.id);(g=(u=z.value)==null?void 0:u.contents)==null||g.splice(q,1),(a=z.value)==null||a.updateDragAndDropRules(),Ie.value++}return}let e=r,t=n=>n.id===A.id;if(A.type==="component"&&(e=r==null?void 0:r.parent,t=n=>n.component===A.id),e&&e.schema.contents){const n=e.schema.contents.findIndex(t);e.schema.contents.splice(n,1),e.componentInstance.value.updateDragAndDropRules(),Ie.value++,U.emit("selectionChange")}}function L(d){return V.value&&s.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:A=>{$(A,d)}},[s.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function l(){return P.value&&s.createVNode("div",{role:"button",class:"btn component-settings-button",title:"移动",ref:"moveComponent"},[s.createVNode("i",{"data-dragging-icon":"true",class:"cmp_move f-icon f-icon-yxs_move"},null)])}function O(){return _.customButtons&&!!_.customButtons.length&&_.customButtons.map(d=>s.createVNode("div",{role:"button",class:`btn component-settings-button ${d.class||""}`,title:d.title,ref:d.id},[s.createVNode("i",{class:d.icon},null)]))}function H(d){return s.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[s.createVNode("div",null,[L(d),l(),O()])])}function Y(d,A,e,t){U.emit("selectionChange",d,A,e,t)}function re(d){let A;const e=d.type,t=M[e],u=B[e],g=u?u(d):{};g.customClass=_.ignore?g.customClass:"",g.componentId=b.value;const a=d.contents&&d.contents.length===0;return d.contents&&!!d.contents.length&&t?s.createVNode(t,s.mergeProps({ref:f},g),fn(A=d.contents.map(z=>s.createVNode(Fe,{key:z.id,modelValue:z,"onUpdate:modelValue":q=>z=q,componentId:b.value,onSelectionChange:Y},null)))?A:{default:()=>[A]}):t?a?s.createVNode(t,s.mergeProps({ref:f},g),{default:()=>[s.createVNode(dn,null,null)]}):s.createVNode(t,s.mergeProps({ref:f},g),null):s.createVNode("div",null,null)}function J(d){if(d.type==="component-ref"){let e=h==null?void 0:h.getFormSchema().module.components.find(t=>t.id===d.component);if(e)return s.createVNode(Fe,{key:e.id,modelValue:e,"onUpdate:modelValue":t=>e=t,componentId:e.id,onSelectionChange:Y},null)}}s.watch(()=>_.modelValue,d=>{C.value=d,I.value=`${d.id}-component`});function v(d){const A=d.target;Re(A)}function K(){var d,A;(A=(d=C.value)==null?void 0:d.contents)!=null&&A.length&&p.value&&p.value.addEventListener("scroll",v)}s.onMounted(()=>{if(p.value&&f.value&&f.value.schema){const d=p.value.querySelector(`[data-dragref='${f.value.schema.id}-container']`);S&&d&&S.attachComponents(d,C.value),y.value=f.value.canNested!==void 0?f.value.canNested:y.value,V.value=f.value.canDelete!==void 0?f.value.canDelete:V.value,P.value=f.value.canMove!==void 0?f.value.canMove:P.value,m.value=f.value.styles||"",N.value=f.value.designerClass||"",p.value&&(p.value.componentInstance=f,p.value.designItemContext=i)}K(),Ie.value++}),s.onBeforeUnmount(()=>{p.value&&p.value.removeEventListener("scroll",v)});function Z(d){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(e=>e.classList.remove("dgComponentFocused")),d&&(d.preventDefault(),d.stopPropagation());const A=p.value;if(A){const e=document.getElementsByClassName("dgComponentSelected");if(!(e&&e.length===1&&e[0]===p.value)&&(Array.from(e).forEach(u=>u.classList.remove("dgComponentSelected")),A.classList.add("dgComponentFocused"),U.emit("selectionChange",C.value.type,C.value,b.value,f.value),f.value.getDraggableDesignItemElement)){const u=f.value.getDraggableDesignItemElement(i);u&&u.value&&u.value.classList.add("dgComponentSelected")}}v(d)}return()=>C.value.type==="component-ref"?J(C.value):s.createVNode("div",{id:`${C.value.id}-design-item`,ref:p,class:c.value,style:F.value,onClick:Z},[H(C.value),re(C.value)])}}),pn=s.defineComponent({name:"FDesignerCanvas",props:on,emits:["init","selectionChange","canvasChanged"],setup(_,U){const I=s.ref(),P=s.ref(),V=s.ref(),y=s.ref(),C=s.ref(),b=s.ref(_.componentId),m={eventsEditorUtils:s.inject("eventsEditorUtils"),formSchemaUtils:s.inject("useFormSchema"),formMetadataConverter:s.inject("formMetadataConverter"),designViewModelUtils:s.inject("designViewModelUtils"),controlCreatorUtils:s.inject("controlCreatorUtils"),metadataService:s.inject("Meatdata_Http_Service_Token"),schemaService:s.inject("schemaService")};s.provide("designer-host-service",m);const N=an(m);un(),s.provide("canvas-dragula",N),s.provide("design-item-context",{designerItemElementRef:y,componentInstance:C,schema:P.value,parent:void 0});const E=s.computed(()=>({"d-flex":!0,"flex-fill":!0,"flex-column":!0}));s.onMounted(()=>{V.value&&N.initializeDragula(V.value),I.value=_.modelValue,U.emit("init",N)}),s.watch(Ie,()=>{Re(V.value),U.emit("canvasChanged")},{flush:"post"});function p(S,f,r,i){U.emit("selectionChange",S,f,r,i)}return()=>s.createVNode("div",{class:"editorDiv flex-fill h-100"},[s.createVNode("div",{class:"editorPanel d-flex flex-fill flex-column PC"},[s.createVNode("div",{ref:V,class:E.value},[I.value&&s.createVNode(Fe,{modelValue:I.value,"onUpdate:modelValue":S=>I.value=S,onSelectionChange:p,componentId:b.value},null)])])])}}),mn=s.defineComponent({name:"FFlowNodeItem",props:tn,emits:[],setup(_,U){const I=s.ref(_.id),P=s.ref(_.modelValue),V=s.ref(),y=s.inject("use-drawing-bezier-composition"),{drawFrom:C,eraseDrawingLine:b,finishToDraw:m,getAncherPointPosition:N,isAncherPoint:E}=y,p=s.inject("use-bezier-curve-composition"),{connect:S}=p,f=s.inject("use-connections-composition"),{addConnection:r,getConnectionsOfNode:i}=f;new Map(_.connection);const h=s.computed(()=>({left:`${_.x}px`,top:`${_.y}px`}));function c(l,O){if(E(l)&&E(O)){const H=N(l),Y=N(O);S(l.id,O.id,H,Y);const re=l.id,J=O.id,v=re.split(/(-left-point|-right-point|-top-point|-bottom-point)/,1)[0],K=J.split(/(-left-point|-right-point|-top-point|-bottom-point)/,1)[0];r(v,re,K,J)}}function F(l){var O;document.removeEventListener("mouseup",F),m(l),b(`${(O=V.value)==null?void 0:O.id}_curve_to`),c(V.value,l.target)}function $(l,O){V.value=document.getElementById(l),C(l,O),document.addEventListener("mouseup",F),O.stopPropagation()}s.watch([()=>_.x,()=>_.y],()=>{const l=i(I.value);l.length&&l.forEach(O=>{const H=document.getElementById(O.from),Y=document.getElementById(O.to);H&&Y&&c(H,Y)})});const L=s.computed(()=>({"node-content":!0}));return()=>s.createVNode("div",{id:I.value,class:"br-node",style:h.value},[s.createVNode("div",{id:`${I.value}-left-point`,class:"f-flow-ancher circle-left",onMousedown:l=>$(`${I.value}-left-point`,l)},null),s.createVNode("div",{id:`${I.value}-top-point`,class:"f-flow-ancher circle-top",onMousedown:l=>$(`${I.value}-top-point`,l)},null),s.createVNode("div",{id:`${I.value}-content`,class:L.value,style:"min-width:200px;min-height:200px;"},[P.value&&s.createVNode(pn,{modelValue:P.value,"onUpdate:modelValue":l=>P.value=l},null)]),s.createVNode("div",{id:`${I.value}-right-point`,class:"f-flow-ancher circle-right",onMousedown:l=>$(`${I.value}-right-point`,l)},null),s.createVNode("div",{id:`${I.value}-bottom-point`,class:"f-flow-ancher circle-bottom",onMousedown:l=>$(`${I.value}-bottom-point`,l)},null)])}});function vn(_){const U=new Map,I=new Map;function P(C,b){const m=I.get(C)||[];m.filter(E=>b.from===E.from&&b.to===E.to).length>0||(m.push(b),I.set(C,m))}function V(C,b,m,N){const E=new Set(U.get(b)||[]);E.add(N),U.set(b,[...E]);const p={from:b,to:N,type:"Curve"};P(C,p),P(m,p)}function y(C){return I.get(C)||[]}return{addConnection:V,getConnectionsOfNode:y}}const gn=s.defineComponent({name:"FFlowCanvas",props:Le,emits:[],setup(_,U){const I=s.ref(),P=Zt(),V=en(P),y=vn();s.provide("use-bezier-curve-composition",P),s.provide("use-connections-composition",y),s.provide("use-drawing-bezier-composition",V);const C=s.computed(()=>({transition:"transform 0.2s","background-color":"#F2F3F5",height:"100%",width:"100%",position:"relative"}));s.onMounted(()=>{I.value=_.modelValue});const b=s.ref(),m=s.ref(),N=s.ref(),E=s.ref(),p=s.ref();function S(i){const h=i.clientX-E.value,c=i.clientY-p.value;b.value&&b.value.position&&(b.value.position.x=m.value+h,b.value.position.y=N.value+c)}function f(){document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",f),b.value=void 0,E.value=void 0,p.value=void 0}function r(i,h){b.value=i,m.value=i.position.x,N.value=i.position.y,E.value=h.clientX,p.value=h.clientY,document.addEventListener("mousemove",S),document.addEventListener("mouseup",f)}return()=>s.createVNode("div",{class:"f-flow-canvas editorDiv flex-fill h-100"},[s.createVNode("div",{id:"svg-container",class:"f-struct-wrapper flex-fill",style:C.value},[I.value&&I.value.contents.map(i=>s.createVNode(mn,{modelValue:i.content[0],"onUpdate:modelValue":h=>i.content[0]=h,id:i.id,x:i.position.x,y:i.position.y,onMousedown:h=>r(i,h)},null))])])}});T.FFlowCanvas=gn,T.flowCanvasProps=Le,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});