zhytech-ui 1.0.33 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/zhytech-ui.es.js +4 -1
- package/dist/zhytech-ui.umd.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/zhytech-ui.es.js
CHANGED
|
@@ -4365,6 +4365,9 @@ const l2 = { class: "page-wrap" }, i2 = /* @__PURE__ */ te({
|
|
|
4365
4365
|
},
|
|
4366
4366
|
setup(t) {
|
|
4367
4367
|
let o = ne("formDesignerData"), e = ne("defaultSourceType"), n = o.selectComponent.props;
|
|
4368
|
+
n.pages.forEach((c) => {
|
|
4369
|
+
c.itemSourceType = e;
|
|
4370
|
+
});
|
|
4368
4371
|
const { getTempID: l } = $e(), a = () => {
|
|
4369
4372
|
n.pages.push({ label: `标签${n.pages.length + 1}`, value: l(), itemSourceType: e });
|
|
4370
4373
|
}, s = (c) => {
|
|
@@ -4635,7 +4638,7 @@ const a2 = {
|
|
|
4635
4638
|
() => n.value.props.pages,
|
|
4636
4639
|
() => {
|
|
4637
4640
|
let m = {};
|
|
4638
|
-
n.value.props.pages.forEach((u, C) => {
|
|
4641
|
+
console.log(n.value.props.pages), n.value.props.pages.forEach((u, C) => {
|
|
4639
4642
|
s.value[C] ? m[C] = s.value[C] : m[C] = [];
|
|
4640
4643
|
}), s.value = m;
|
|
4641
4644
|
},
|
package/dist/zhytech-ui.umd.js
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @author owenm <owen23355@gmail.com>
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/function Bo(o,n){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(o);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,l)}return t}function Me(o){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Bo(Object(t),!0).forEach(function(l){Dr(o,l,t[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):Bo(Object(t)).forEach(function(l){Object.defineProperty(o,l,Object.getOwnPropertyDescriptor(t,l))})}return o}function Mt(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mt=function(n){return typeof n}:Mt=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mt(o)}function Dr(o,n,t){return n in o?Object.defineProperty(o,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[n]=t,o}function ke(){return ke=Object.assign||function(o){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(o[l]=t[l])}return o},ke.apply(this,arguments)}function Sr(o,n){if(o==null)return{};var t={},l=Object.keys(o),r,a;for(a=0;a<l.length;a++)r=l[a],!(n.indexOf(r)>=0)&&(t[r]=o[r]);return t}function Mr(o,n){if(o==null)return{};var t=Sr(o,n),l,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);for(r=0;r<a.length;r++)l=a[r],!(n.indexOf(l)>=0)&&Object.prototype.propertyIsEnumerable.call(o,l)&&(t[l]=o[l])}return t}function zr(o){return $r(o)||Tr(o)||Ir(o)||Lr()}function $r(o){if(Array.isArray(o))return vt(o)}function Tr(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function Ir(o,n){if(o){if(typeof o=="string")return vt(o,n);var t=Object.prototype.toString.call(o).slice(8,-1);if(t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set")return Array.from(o);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return vt(o,n)}}function vt(o,n){(n==null||n>o.length)&&(n=o.length);for(var t=0,l=new Array(n);t<n;t++)l[t]=o[t];return l}function Lr(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
7
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ar="1.15.3";function Te(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var Ie=Te(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),st=Te(/Edge/i),Do=Te(/firefox/i),ct=Te(/safari/i)&&!Te(/chrome/i)&&!Te(/android/i),So=Te(/iP(ad|od|hone)/i),Mo=Te(/chrome/i)&&Te(/android/i),zo={capture:!1,passive:!1};function q(o,n,t){o.addEventListener(n,t,!Ie&&zo)}function U(o,n,t){o.removeEventListener(n,t,!Ie&&zo)}function zt(o,n){if(n){if(n[0]===">"&&(n=n.substring(1)),o)try{if(o.matches)return o.matches(n);if(o.msMatchesSelector)return o.msMatchesSelector(n);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(n)}catch{return!1}return!1}}function $o(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function xe(o,n,t,l){if(o){t=t||document;do{if(n!=null&&(n[0]===">"?o.parentNode===t&&zt(o,n):zt(o,n))||l&&o===t)return o;if(o===t)break}while(o=$o(o))}return null}var To=/\s+/g;function v(o,n,t){if(o&&n)if(o.classList)o.classList[t?"add":"remove"](n);else{var l=(" "+o.className+" ").replace(To," ").replace(" "+n+" "," ");o.className=(l+(t?" "+n:"")).replace(To," ")}}function M(o,n,t){var l=o&&o.style;if(l){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(t=o.currentStyle),n===void 0?t:t[n];!(n in l)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),l[n]=t+(typeof t=="string"?"":"px")}}function He(o,n){var t="";if(typeof o=="string")t=o;else do{var l=M(o,"transform");l&&l!=="none"&&(t=l+" "+t)}while(!n&&(o=o.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function Io(o,n,t){if(o){var l=o.getElementsByTagName(n),r=0,a=l.length;if(t)for(;r<a;r++)t(l[r],r);return l}return[]}function ze(){var o=document.scrollingElement;return o||document.documentElement}function J(o,n,t,l,r){if(!(!o.getBoundingClientRect&&o!==window)){var a,i,c,p,s,h,f;if(o!==window&&o.parentNode&&o!==ze()?(a=o.getBoundingClientRect(),i=a.top,c=a.left,p=a.bottom,s=a.right,h=a.height,f=a.width):(i=0,c=0,p=window.innerHeight,s=window.innerWidth,h=window.innerHeight,f=window.innerWidth),(n||t)&&o!==window&&(r=r||o.parentNode,!Ie))do if(r&&r.getBoundingClientRect&&(M(r,"transform")!=="none"||t&&M(r,"position")!=="static")){var m=r.getBoundingClientRect();i-=m.top+parseInt(M(r,"border-top-width")),c-=m.left+parseInt(M(r,"border-left-width")),p=i+a.height,s=c+a.width;break}while(r=r.parentNode);if(l&&o!==window){var d=He(r||o),y=d&&d.a,u=d&&d.d;d&&(i/=u,c/=y,f/=y,h/=u,p=i+h,s=c+f)}return{top:i,left:c,bottom:p,right:s,width:f,height:h}}}function Lo(o,n,t){for(var l=Oe(o,!0),r=J(o)[n];l;){var a=J(l)[t],i=void 0;if(t==="top"||t==="left"?i=r>=a:i=r<=a,!i)return l;if(l===ze())break;l=Oe(l,!1)}return!1}function Qe(o,n,t,l){for(var r=0,a=0,i=o.children;a<i.length;){if(i[a].style.display!=="none"&&i[a]!==I.ghost&&(l||i[a]!==I.dragged)&&xe(i[a],t.draggable,o,!1)){if(r===n)return i[a];r++}a++}return null}function eo(o,n){for(var t=o.lastElementChild;t&&(t===I.ghost||M(t,"display")==="none"||n&&!zt(t,n));)t=t.previousElementSibling;return t||null}function oe(o,n){var t=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==I.clone&&(!n||zt(o,n))&&t++;return t}function Ao(o){var n=0,t=0,l=ze();if(o)do{var r=He(o),a=r.a,i=r.d;n+=o.scrollLeft*a,t+=o.scrollTop*i}while(o!==l&&(o=o.parentNode));return[n,t]}function Or(o,n){for(var t in o)if(o.hasOwnProperty(t)){for(var l in n)if(n.hasOwnProperty(l)&&n[l]===o[t][l])return Number(t)}return-1}function Oe(o,n){if(!o||!o.getBoundingClientRect)return ze();var t=o,l=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=M(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return ze();if(l||n)return t;l=!0}}while(t=t.parentNode);return ze()}function Pr(o,n){if(o&&n)for(var t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o}function to(o,n){return Math.round(o.top)===Math.round(n.top)&&Math.round(o.left)===Math.round(n.left)&&Math.round(o.height)===Math.round(n.height)&&Math.round(o.width)===Math.round(n.width)}var dt;function Oo(o,n){return function(){if(!dt){var t=arguments,l=this;t.length===1?o.call(l,t[0]):o.apply(l,t),dt=setTimeout(function(){dt=void 0},n)}}}function Fr(){clearTimeout(dt),dt=void 0}function Po(o,n,t){o.scrollLeft+=n,o.scrollTop+=t}function oo(o){var n=window.Polymer,t=window.jQuery||window.Zepto;return n&&n.dom?n.dom(o).cloneNode(!0):t?t(o).clone(!0)[0]:o.cloneNode(!0)}function Fo(o,n){M(o,"position","absolute"),M(o,"top",n.top),M(o,"left",n.left),M(o,"width",n.width),M(o,"height",n.height)}function no(o){M(o,"position",""),M(o,"top",""),M(o,"left",""),M(o,"width",""),M(o,"height","")}function Ro(o,n,t){var l={};return Array.from(o.children).forEach(function(r){var a,i,c,p;if(!(!xe(r,n.draggable,o,!1)||r.animated||r===t)){var s=J(r);l.left=Math.min((a=l.left)!==null&&a!==void 0?a:1/0,s.left),l.top=Math.min((i=l.top)!==null&&i!==void 0?i:1/0,s.top),l.right=Math.max((c=l.right)!==null&&c!==void 0?c:-1/0,s.right),l.bottom=Math.max((p=l.bottom)!==null&&p!==void 0?p:-1/0,s.bottom)}}),l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}var pe="Sortable"+new Date().getTime();function Rr(){var o=[],n;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var l=[].slice.call(this.el.children);l.forEach(function(r){if(!(M(r,"display")==="none"||r===I.ghost)){o.push({target:r,rect:J(r)});var a=Me({},o[o.length-1].rect);if(r.thisAnimationDuration){var i=He(r,!0);i&&(a.top-=i.f,a.left-=i.e)}r.fromRect=a}})}},addAnimationState:function(l){o.push(l)},removeAnimationState:function(l){o.splice(Or(o,{target:l}),1)},animateAll:function(l){var r=this;if(!this.options.animation){clearTimeout(n),typeof l=="function"&&l();return}var a=!1,i=0;o.forEach(function(c){var p=0,s=c.target,h=s.fromRect,f=J(s),m=s.prevFromRect,d=s.prevToRect,y=c.rect,u=He(s,!0);u&&(f.top-=u.f,f.left-=u.e),s.toRect=f,s.thisAnimationDuration&&to(m,f)&&!to(h,f)&&(y.top-f.top)/(y.left-f.left)===(h.top-f.top)/(h.left-f.left)&&(p=Hr(y,m,d,r.options)),to(f,h)||(s.prevFromRect=h,s.prevToRect=f,p||(p=r.options.animation),r.animate(s,y,f,p)),p&&(a=!0,i=Math.max(i,p),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},p),s.thisAnimationDuration=p)}),clearTimeout(n),a?n=setTimeout(function(){typeof l=="function"&&l()},i):typeof l=="function"&&l(),o=[]},animate:function(l,r,a,i){if(i){M(l,"transition",""),M(l,"transform","");var c=He(this.el),p=c&&c.a,s=c&&c.d,h=(r.left-a.left)/(p||1),f=(r.top-a.top)/(s||1);l.animatingX=!!h,l.animatingY=!!f,M(l,"transform","translate3d("+h+"px,"+f+"px,0)"),this.forRepaintDummy=Ur(l),M(l,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),M(l,"transform","translate3d(0,0,0)"),typeof l.animated=="number"&&clearTimeout(l.animated),l.animated=setTimeout(function(){M(l,"transition",""),M(l,"transform",""),l.animated=!1,l.animatingX=!1,l.animatingY=!1},i)}}}}function Ur(o){return o.offsetWidth}function Hr(o,n,t,l){return Math.sqrt(Math.pow(n.top-o.top,2)+Math.pow(n.left-o.left,2))/Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))*l.animation}var ve=[],lo={initializeByDefault:!0},pt={mount:function(n){for(var t in lo)lo.hasOwnProperty(t)&&!(t in n)&&(n[t]=lo[t]);ve.forEach(function(l){if(l.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),ve.push(n)},pluginEvent:function(n,t,l){var r=this;this.eventCanceled=!1,l.cancel=function(){r.eventCanceled=!0};var a=n+"Global";ve.forEach(function(i){t[i.pluginName]&&(t[i.pluginName][a]&&t[i.pluginName][a](Me({sortable:t},l)),t.options[i.pluginName]&&t[i.pluginName][n]&&t[i.pluginName][n](Me({sortable:t},l)))})},initializePlugins:function(n,t,l,r){ve.forEach(function(c){var p=c.pluginName;if(!(!n.options[p]&&!c.initializeByDefault)){var s=new c(n,t,n.options);s.sortable=n,s.options=n.options,n[p]=s,ke(l,s.defaults)}});for(var a in n.options)if(n.options.hasOwnProperty(a)){var i=this.modifyOption(n,a,n.options[a]);typeof i<"u"&&(n.options[a]=i)}},getEventProperties:function(n,t){var l={};return ve.forEach(function(r){typeof r.eventProperties=="function"&&ke(l,r.eventProperties.call(t[r.pluginName],n))}),l},modifyOption:function(n,t,l){var r;return ve.forEach(function(a){n[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(r=a.optionListeners[t].call(n[a.pluginName],l))}),r}};function mt(o){var n=o.sortable,t=o.rootEl,l=o.name,r=o.targetEl,a=o.cloneEl,i=o.toEl,c=o.fromEl,p=o.oldIndex,s=o.newIndex,h=o.oldDraggableIndex,f=o.newDraggableIndex,m=o.originalEvent,d=o.putSortable,y=o.extraEventProperties;if(n=n||t&&t[pe],!!n){var u,_=n.options,g="on"+l.charAt(0).toUpperCase()+l.substr(1);window.CustomEvent&&!Ie&&!st?u=new CustomEvent(l,{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent(l,!0,!0)),u.to=i||t,u.from=c||t,u.item=r||t,u.clone=a,u.oldIndex=p,u.newIndex=s,u.oldDraggableIndex=h,u.newDraggableIndex=f,u.originalEvent=m,u.pullMode=d?d.lastPutMode:void 0;var V=Me(Me({},y),pt.getEventProperties(l,n));for(var w in V)u[w]=V[w];t&&t.dispatchEvent(u),_[g]&&_[g].call(n,u)}}var qr=["evt"],_e=function(n,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=l.evt,a=Mr(l,qr);pt.pluginEvent.bind(I)(n,t,Me({dragEl:N,parentEl:ne,ghostEl:O,rootEl:Z,nextEl:qe,lastDownEl:$t,cloneEl:ee,cloneHidden:Pe,dragStarted:ht,putSortable:me,activeSortable:I.active,originalEvent:r,oldIndex:et,oldDraggableIndex:ft,newIndex:be,newDraggableIndex:Fe,hideGhostForTarget:Yo,unhideGhostForTarget:Xo,cloneNowHidden:function(){Pe=!0},cloneNowShown:function(){Pe=!1},dispatchSortableEvent:function(c){ge({sortable:t,name:c,originalEvent:r})}},a))};function ge(o){mt(Me({putSortable:me,cloneEl:ee,targetEl:N,rootEl:Z,oldIndex:et,oldDraggableIndex:ft,newIndex:be,newDraggableIndex:Fe},o))}var N,ne,O,Z,qe,$t,ee,Pe,et,be,ft,Fe,Tt,me,tt=!1,It=!1,Lt=[],je,Be,ro,ao,Uo,Ho,ht,ot,ut,gt=!1,At=!1,Ot,ue,io=[],so=!1,Pt=[],Ft=typeof document<"u",Rt=So,qo=st||Ie?"cssFloat":"float",jr=Ft&&!Mo&&!So&&"draggable"in document.createElement("div"),jo=function(){if(Ft){if(Ie)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Go=function(n,t){var l=M(n),r=parseInt(l.width)-parseInt(l.paddingLeft)-parseInt(l.paddingRight)-parseInt(l.borderLeftWidth)-parseInt(l.borderRightWidth),a=Qe(n,0,t),i=Qe(n,1,t),c=a&&M(a),p=i&&M(i),s=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+J(a).width,h=p&&parseInt(p.marginLeft)+parseInt(p.marginRight)+J(i).width;if(l.display==="flex")return l.flexDirection==="column"||l.flexDirection==="column-reverse"?"vertical":"horizontal";if(l.display==="grid")return l.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&c.float&&c.float!=="none"){var f=c.float==="left"?"left":"right";return i&&(p.clear==="both"||p.clear===f)?"vertical":"horizontal"}return a&&(c.display==="block"||c.display==="flex"||c.display==="table"||c.display==="grid"||s>=r&&l[qo]==="none"||i&&l[qo]==="none"&&s+h>r)?"vertical":"horizontal"},Gr=function(n,t,l){var r=l?n.left:n.top,a=l?n.right:n.bottom,i=l?n.width:n.height,c=l?t.left:t.top,p=l?t.right:t.bottom,s=l?t.width:t.height;return r===c||a===p||r+i/2===c+s/2},Wr=function(n,t){var l;return Lt.some(function(r){var a=r[pe].options.emptyInsertThreshold;if(!(!a||eo(r))){var i=J(r),c=n>=i.left-a&&n<=i.right+a,p=t>=i.top-a&&t<=i.bottom+a;if(c&&p)return l=r}}),l},Wo=function(n){function t(a,i){return function(c,p,s,h){var f=c.options.group.name&&p.options.group.name&&c.options.group.name===p.options.group.name;if(a==null&&(i||f))return!0;if(a==null||a===!1)return!1;if(i&&a==="clone")return a;if(typeof a=="function")return t(a(c,p,s,h),i)(c,p,s,h);var m=(i?c:p).options.group.name;return a===!0||typeof a=="string"&&a===m||a.join&&a.indexOf(m)>-1}}var l={},r=n.group;(!r||Mt(r)!="object")&&(r={name:r}),l.name=r.name,l.checkPull=t(r.pull,!0),l.checkPut=t(r.put),l.revertClone=r.revertClone,n.group=l},Yo=function(){!jo&&O&&M(O,"display","none")},Xo=function(){!jo&&O&&M(O,"display","")};Ft&&!Mo&&document.addEventListener("click",function(o){if(It)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),It=!1,!1},!0);var Ge=function(n){if(N){n=n.touches?n.touches[0]:n;var t=Wr(n.clientX,n.clientY);if(t){var l={};for(var r in n)n.hasOwnProperty(r)&&(l[r]=n[r]);l.target=l.rootEl=t,l.preventDefault=void 0,l.stopPropagation=void 0,t[pe]._onDragOver(l)}}},Yr=function(n){N&&N.parentNode[pe]._isOutsideThisEl(n.target)};function I(o,n){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=n=ke({},n),o[pe]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Go(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,c){i.setData("Text",c.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:I.supportPointer!==!1&&"PointerEvent"in window&&!ct,emptyInsertThreshold:5};pt.initializePlugins(this,o,t);for(var l in t)!(l in n)&&(n[l]=t[l]);Wo(n);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=n.forceFallback?!1:jr,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?q(o,"pointerdown",this._onTapStart):(q(o,"mousedown",this._onTapStart),q(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(q(o,"dragover",this),q(o,"dragenter",this)),Lt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),ke(this,Rr())}I.prototype={constructor:I,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(ot=null)},_getDirection:function(n,t){return typeof this.options.direction=="function"?this.options.direction.call(this,n,t,N):this.options.direction},_onTapStart:function(n){if(n.cancelable){var t=this,l=this.el,r=this.options,a=r.preventOnFilter,i=n.type,c=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,p=(c||n).target,s=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||p,h=r.filter;if(ta(l),!N&&!(/mousedown|pointerdown/.test(i)&&n.button!==0||r.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&ct&&p&&p.tagName.toUpperCase()==="SELECT")&&(p=xe(p,r.draggable,l,!1),!(p&&p.animated)&&$t!==p)){if(et=oe(p),ft=oe(p,r.draggable),typeof h=="function"){if(h.call(this,n,p,this)){ge({sortable:t,rootEl:s,name:"filter",targetEl:p,toEl:l,fromEl:l}),_e("filter",t,{evt:n}),a&&n.cancelable&&n.preventDefault();return}}else if(h&&(h=h.split(",").some(function(f){if(f=xe(s,f.trim(),l,!1),f)return ge({sortable:t,rootEl:f,name:"filter",targetEl:p,fromEl:l,toEl:l}),_e("filter",t,{evt:n}),!0}),h)){a&&n.cancelable&&n.preventDefault();return}r.handle&&!xe(s,r.handle,l,!1)||this._prepareDragStart(n,c,p)}}},_prepareDragStart:function(n,t,l){var r=this,a=r.el,i=r.options,c=a.ownerDocument,p;if(l&&!N&&l.parentNode===a){var s=J(l);if(Z=a,N=l,ne=N.parentNode,qe=N.nextSibling,$t=l,Tt=i.group,I.dragged=N,je={target:N,clientX:(t||n).clientX,clientY:(t||n).clientY},Uo=je.clientX-s.left,Ho=je.clientY-s.top,this._lastX=(t||n).clientX,this._lastY=(t||n).clientY,N.style["will-change"]="all",p=function(){if(_e("delayEnded",r,{evt:n}),I.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Do&&r.nativeDraggable&&(N.draggable=!0),r._triggerDragStart(n,t),ge({sortable:r,name:"choose",originalEvent:n}),v(N,i.chosenClass,!0)},i.ignore.split(",").forEach(function(h){Io(N,h.trim(),co)}),q(c,"dragover",Ge),q(c,"mousemove",Ge),q(c,"touchmove",Ge),q(c,"mouseup",r._onDrop),q(c,"touchend",r._onDrop),q(c,"touchcancel",r._onDrop),Do&&this.nativeDraggable&&(this.options.touchStartThreshold=4,N.draggable=!0),_e("delayStart",this,{evt:n}),i.delay&&(!i.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(st||Ie))){if(I.eventCanceled){this._onDrop();return}q(c,"mouseup",r._disableDelayedDrag),q(c,"touchend",r._disableDelayedDrag),q(c,"touchcancel",r._disableDelayedDrag),q(c,"mousemove",r._delayedDragTouchMoveHandler),q(c,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&q(c,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(p,i.delay)}else p()}},_delayedDragTouchMoveHandler:function(n){var t=n.touches?n.touches[0]:n;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){N&&co(N),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;U(n,"mouseup",this._disableDelayedDrag),U(n,"touchend",this._disableDelayedDrag),U(n,"touchcancel",this._disableDelayedDrag),U(n,"mousemove",this._delayedDragTouchMoveHandler),U(n,"touchmove",this._delayedDragTouchMoveHandler),U(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,t){t=t||n.pointerType=="touch"&&n,!this.nativeDraggable||t?this.options.supportPointer?q(document,"pointermove",this._onTouchMove):t?q(document,"touchmove",this._onTouchMove):q(document,"mousemove",this._onTouchMove):(q(N,"dragend",this),q(Z,"dragstart",this._onDragStart));try{document.selection?Ht(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,t){if(tt=!1,Z&&N){_e("dragStarted",this,{evt:t}),this.nativeDraggable&&q(document,"dragover",Yr);var l=this.options;!n&&v(N,l.dragClass,!1),v(N,l.ghostClass,!0),I.active=this,n&&this._appendGhost(),ge({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Be){this._lastX=Be.clientX,this._lastY=Be.clientY,Yo();for(var n=document.elementFromPoint(Be.clientX,Be.clientY),t=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(Be.clientX,Be.clientY),n!==t);)t=n;if(N.parentNode[pe]._isOutsideThisEl(n),t)do{if(t[pe]){var l=void 0;if(l=t[pe]._onDragOver({clientX:Be.clientX,clientY:Be.clientY,target:n,rootEl:t}),l&&!this.options.dragoverBubble)break}n=t}while(t=$o(t));Xo()}},_onTouchMove:function(n){if(je){var t=this.options,l=t.fallbackTolerance,r=t.fallbackOffset,a=n.touches?n.touches[0]:n,i=O&&He(O,!0),c=O&&i&&i.a,p=O&&i&&i.d,s=Rt&&ue&&Ao(ue),h=(a.clientX-je.clientX+r.x)/(c||1)+(s?s[0]-io[0]:0)/(c||1),f=(a.clientY-je.clientY+r.y)/(p||1)+(s?s[1]-io[1]:0)/(p||1);if(!I.active&&!tt){if(l&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<l)return;this._onDragStart(n,!0)}if(O){i?(i.e+=h-(ro||0),i.f+=f-(ao||0)):i={a:1,b:0,c:0,d:1,e:h,f};var m="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");M(O,"webkitTransform",m),M(O,"mozTransform",m),M(O,"msTransform",m),M(O,"transform",m),ro=h,ao=f,Be=a}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!O){var n=this.options.fallbackOnBody?document.body:Z,t=J(N,!0,Rt,!0,n),l=this.options;if(Rt){for(ue=n;M(ue,"position")==="static"&&M(ue,"transform")==="none"&&ue!==document;)ue=ue.parentNode;ue!==document.body&&ue!==document.documentElement?(ue===document&&(ue=ze()),t.top+=ue.scrollTop,t.left+=ue.scrollLeft):ue=ze(),io=Ao(ue)}O=N.cloneNode(!0),v(O,l.ghostClass,!1),v(O,l.fallbackClass,!0),v(O,l.dragClass,!0),M(O,"transition",""),M(O,"transform",""),M(O,"box-sizing","border-box"),M(O,"margin",0),M(O,"top",t.top),M(O,"left",t.left),M(O,"width",t.width),M(O,"height",t.height),M(O,"opacity","0.8"),M(O,"position",Rt?"absolute":"fixed"),M(O,"zIndex","100000"),M(O,"pointerEvents","none"),I.ghost=O,n.appendChild(O),M(O,"transform-origin",Uo/parseInt(O.style.width)*100+"% "+Ho/parseInt(O.style.height)*100+"%")}},_onDragStart:function(n,t){var l=this,r=n.dataTransfer,a=l.options;if(_e("dragStart",this,{evt:n}),I.eventCanceled){this._onDrop();return}_e("setupClone",this),I.eventCanceled||(ee=oo(N),ee.removeAttribute("id"),ee.draggable=!1,ee.style["will-change"]="",this._hideClone(),v(ee,this.options.chosenClass,!1),I.clone=ee),l.cloneId=Ht(function(){_e("clone",l),!I.eventCanceled&&(l.options.removeCloneOnHide||Z.insertBefore(ee,N),l._hideClone(),ge({sortable:l,name:"clone"}))}),!t&&v(N,a.dragClass,!0),t?(It=!0,l._loopId=setInterval(l._emulateDragOver,50)):(U(document,"mouseup",l._onDrop),U(document,"touchend",l._onDrop),U(document,"touchcancel",l._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(l,r,N)),q(document,"drop",l),M(N,"transform","translateZ(0)")),tt=!0,l._dragStartId=Ht(l._dragStarted.bind(l,t,n)),q(document,"selectstart",l),ht=!0,ct&&M(document.body,"user-select","none")},_onDragOver:function(n){var t=this.el,l=n.target,r,a,i,c=this.options,p=c.group,s=I.active,h=Tt===p,f=c.sort,m=me||s,d,y=this,u=!1;if(so)return;function _(se,Xe){_e(se,y,Me({evt:n,isOwner:h,axis:d?"vertical":"horizontal",revert:i,dragRect:r,targetRect:a,canSort:f,fromSortable:m,target:l,completed:V,onMove:function(rt,Le){return Ut(Z,t,N,r,rt,J(rt),n,Le)},changed:w},Xe))}function g(){_("dragOverAnimationCapture"),y.captureAnimationState(),y!==m&&m.captureAnimationState()}function V(se){return _("dragOverCompleted",{insertion:se}),se&&(h?s._hideClone():s._showClone(y),y!==m&&(v(N,me?me.options.ghostClass:s.options.ghostClass,!1),v(N,c.ghostClass,!0)),me!==y&&y!==I.active?me=y:y===I.active&&me&&(me=null),m===y&&(y._ignoreWhileAnimating=l),y.animateAll(function(){_("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(l===N&&!N.animated||l===t&&!l.animated)&&(ot=null),!c.dragoverBubble&&!n.rootEl&&l!==document&&(N.parentNode[pe]._isOutsideThisEl(n.target),!se&&Ge(n)),!c.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),u=!0}function w(){be=oe(N),Fe=oe(N,c.draggable),ge({sortable:y,name:"change",toEl:t,newIndex:be,newDraggableIndex:Fe,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),l=xe(l,c.draggable,t,!0),_("dragOver"),I.eventCanceled)return u;if(N.contains(n.target)||l.animated&&l.animatingX&&l.animatingY||y._ignoreWhileAnimating===l)return V(!1);if(It=!1,s&&!c.disabled&&(h?f||(i=ne!==Z):me===this||(this.lastPutMode=Tt.checkPull(this,s,N,n))&&p.checkPut(this,s,N,n))){if(d=this._getDirection(n,l)==="vertical",r=J(N),_("dragOverValid"),I.eventCanceled)return u;if(i)return ne=Z,g(),this._hideClone(),_("revert"),I.eventCanceled||(qe?Z.insertBefore(N,qe):Z.appendChild(N)),V(!0);var b=eo(t,c.draggable);if(!b||Zr(n,d,this)&&!b.animated){if(b===N)return V(!1);if(b&&t===n.target&&(l=b),l&&(a=J(l)),Ut(Z,t,N,r,l,a,n,!!l)!==!1)return g(),b&&b.nextSibling?t.insertBefore(N,b.nextSibling):t.appendChild(N),ne=t,w(),V(!0)}else if(b&&Kr(n,d,this)){var C=Qe(t,0,c,!0);if(C===N)return V(!1);if(l=C,a=J(l),Ut(Z,t,N,r,l,a,n,!1)!==!1)return g(),t.insertBefore(N,C),ne=t,w(),V(!0)}else if(l.parentNode===t){a=J(l);var x=0,E,L=N.parentNode!==t,z=!Gr(N.animated&&N.toRect||r,l.animated&&l.toRect||a,d),D=d?"top":"left",$=Lo(l,"top","top")||Lo(N,"top","top"),F=$?$.scrollTop:void 0;ot!==l&&(E=a[D],gt=!1,At=!z&&c.invertSwap||L),x=Qr(n,l,a,d,z?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,At,ot===l);var S;if(x!==0){var R=oe(N);do R-=x,S=ne.children[R];while(S&&(M(S,"display")==="none"||S===O))}if(x===0||S===l)return V(!1);ot=l,ut=x;var j=l.nextElementSibling,W=!1;W=x===1;var le=Ut(Z,t,N,r,l,a,n,W);if(le!==!1)return(le===1||le===-1)&&(W=le===1),so=!0,setTimeout(Jr,30),g(),W&&!j?t.appendChild(N):l.parentNode.insertBefore(N,W?j:l),$&&Po($,0,F-$.scrollTop),ne=N.parentNode,E!==void 0&&!At&&(Ot=Math.abs(E-J(l)[D])),w(),V(!0)}if(t.contains(N))return V(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){U(document,"mousemove",this._onTouchMove),U(document,"touchmove",this._onTouchMove),U(document,"pointermove",this._onTouchMove),U(document,"dragover",Ge),U(document,"mousemove",Ge),U(document,"touchmove",Ge)},_offUpEvents:function(){var n=this.el.ownerDocument;U(n,"mouseup",this._onDrop),U(n,"touchend",this._onDrop),U(n,"pointerup",this._onDrop),U(n,"touchcancel",this._onDrop),U(document,"selectstart",this)},_onDrop:function(n){var t=this.el,l=this.options;if(be=oe(N),Fe=oe(N,l.draggable),_e("drop",this,{evt:n}),ne=N&&N.parentNode,be=oe(N),Fe=oe(N,l.draggable),I.eventCanceled){this._nulling();return}tt=!1,At=!1,gt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),po(this.cloneId),po(this._dragStartId),this.nativeDraggable&&(U(document,"drop",this),U(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ct&&M(document.body,"user-select",""),M(N,"transform",""),n&&(ht&&(n.cancelable&&n.preventDefault(),!l.dropBubble&&n.stopPropagation()),O&&O.parentNode&&O.parentNode.removeChild(O),(Z===ne||me&&me.lastPutMode!=="clone")&&ee&&ee.parentNode&&ee.parentNode.removeChild(ee),N&&(this.nativeDraggable&&U(N,"dragend",this),co(N),N.style["will-change"]="",ht&&!tt&&v(N,me?me.options.ghostClass:this.options.ghostClass,!1),v(N,this.options.chosenClass,!1),ge({sortable:this,name:"unchoose",toEl:ne,newIndex:null,newDraggableIndex:null,originalEvent:n}),Z!==ne?(be>=0&&(ge({rootEl:ne,name:"add",toEl:ne,fromEl:Z,originalEvent:n}),ge({sortable:this,name:"remove",toEl:ne,originalEvent:n}),ge({rootEl:ne,name:"sort",toEl:ne,fromEl:Z,originalEvent:n}),ge({sortable:this,name:"sort",toEl:ne,originalEvent:n})),me&&me.save()):be!==et&&be>=0&&(ge({sortable:this,name:"update",toEl:ne,originalEvent:n}),ge({sortable:this,name:"sort",toEl:ne,originalEvent:n})),I.active&&((be==null||be===-1)&&(be=et,Fe=ft),ge({sortable:this,name:"end",toEl:ne,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){_e("nulling",this),Z=N=ne=O=qe=ee=$t=Pe=je=Be=ht=be=Fe=et=ft=ot=ut=me=Tt=I.dragged=I.ghost=I.clone=I.active=null,Pt.forEach(function(n){n.checked=!0}),Pt.length=ro=ao=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":N&&(this._onDragOver(n),Xr(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],t,l=this.el.children,r=0,a=l.length,i=this.options;r<a;r++)t=l[r],xe(t,i.draggable,this.el,!1)&&n.push(t.getAttribute(i.dataIdAttr)||ea(t));return n},sort:function(n,t){var l={},r=this.el;this.toArray().forEach(function(a,i){var c=r.children[i];xe(c,this.options.draggable,r,!1)&&(l[a]=c)},this),t&&this.captureAnimationState(),n.forEach(function(a){l[a]&&(r.removeChild(l[a]),r.appendChild(l[a]))}),t&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,t){return xe(n,t||this.options.draggable,this.el,!1)},option:function(n,t){var l=this.options;if(t===void 0)return l[n];var r=pt.modifyOption(this,n,t);typeof r<"u"?l[n]=r:l[n]=t,n==="group"&&Wo(l)},destroy:function(){_e("destroy",this);var n=this.el;n[pe]=null,U(n,"mousedown",this._onTapStart),U(n,"touchstart",this._onTapStart),U(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(U(n,"dragover",this),U(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Lt.splice(Lt.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!Pe){if(_e("hideClone",this),I.eventCanceled)return;M(ee,"display","none"),this.options.removeCloneOnHide&&ee.parentNode&&ee.parentNode.removeChild(ee),Pe=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(Pe){if(_e("showClone",this),I.eventCanceled)return;N.parentNode==Z&&!this.options.group.revertClone?Z.insertBefore(ee,N):qe?Z.insertBefore(ee,qe):Z.appendChild(ee),this.options.group.revertClone&&this.animate(N,ee),M(ee,"display",""),Pe=!1}}};function Xr(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function Ut(o,n,t,l,r,a,i,c){var p,s=o[pe],h=s.options.onMove,f;return window.CustomEvent&&!Ie&&!st?p=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(p=document.createEvent("Event"),p.initEvent("move",!0,!0)),p.to=n,p.from=o,p.dragged=t,p.draggedRect=l,p.related=r||n,p.relatedRect=a||J(n),p.willInsertAfter=c,p.originalEvent=i,o.dispatchEvent(p),h&&(f=h.call(s,p,i)),f}function co(o){o.draggable=!1}function Jr(){so=!1}function Kr(o,n,t){var l=J(Qe(t.el,0,t.options,!0)),r=Ro(t.el,t.options,O),a=10;return n?o.clientX<r.left-a||o.clientY<l.top&&o.clientX<l.right:o.clientY<r.top-a||o.clientY<l.bottom&&o.clientX<l.left}function Zr(o,n,t){var l=J(eo(t.el,t.options.draggable)),r=Ro(t.el,t.options,O),a=10;return n?o.clientX>r.right+a||o.clientY>l.bottom&&o.clientX>l.left:o.clientY>r.bottom+a||o.clientX>l.right&&o.clientY>l.top}function Qr(o,n,t,l,r,a,i,c){var p=l?o.clientY:o.clientX,s=l?t.height:t.width,h=l?t.top:t.left,f=l?t.bottom:t.right,m=!1;if(!i){if(c&&Ot<s*r){if(!gt&&(ut===1?p>h+s*a/2:p<f-s*a/2)&&(gt=!0),gt)m=!0;else if(ut===1?p<h+Ot:p>f-Ot)return-ut}else if(p>h+s*(1-r)/2&&p<f-s*(1-r)/2)return vr(n)}return m=m||i,m&&(p<h+s*a/2||p>f-s*a/2)?p>h+s/2?1:-1:0}function vr(o){return oe(N)<oe(o)?1:-1}function ea(o){for(var n=o.tagName+o.className+o.src+o.href+o.textContent,t=n.length,l=0;t--;)l+=n.charCodeAt(t);return l.toString(36)}function ta(o){Pt.length=0;for(var n=o.getElementsByTagName("input"),t=n.length;t--;){var l=n[t];l.checked&&Pt.push(l)}}function Ht(o){return setTimeout(o,0)}function po(o){return clearTimeout(o)}Ft&&q(document,"touchmove",function(o){(I.active||tt)&&o.cancelable&&o.preventDefault()}),I.utils={on:q,off:U,css:M,find:Io,is:function(n,t){return!!xe(n,t,n,!1)},extend:Pr,throttle:Oo,closest:xe,toggleClass:v,clone:oo,index:oe,nextTick:Ht,cancelNextTick:po,detectDirection:Go,getChild:Qe,expando:pe},I.get=function(o){return o[pe]},I.mount=function(){for(var o=arguments.length,n=new Array(o),t=0;t<o;t++)n[t]=arguments[t];n[0].constructor===Array&&(n=n[0]),n.forEach(function(l){if(!l.prototype||!l.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(l));l.utils&&(I.utils=Me(Me({},I.utils),l.utils)),pt.mount(l)})},I.create=function(o,n){return new I(o,n)},I.version=Ar;var ie=[],_t,mo,fo=!1,ho,uo,qt,wt;function oa(){function o(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return o.prototype={dragStarted:function(t){var l=t.originalEvent;this.sortable.nativeDraggable?q(document,"dragover",this._handleAutoScroll):this.options.supportPointer?q(document,"pointermove",this._handleFallbackAutoScroll):l.touches?q(document,"touchmove",this._handleFallbackAutoScroll):q(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var l=t.originalEvent;!this.options.dragOverBubble&&!l.rootEl&&this._handleAutoScroll(l)},drop:function(){this.sortable.nativeDraggable?U(document,"dragover",this._handleAutoScroll):(U(document,"pointermove",this._handleFallbackAutoScroll),U(document,"touchmove",this._handleFallbackAutoScroll),U(document,"mousemove",this._handleFallbackAutoScroll)),Jo(),jt(),Fr()},nulling:function(){qt=mo=_t=fo=wt=ho=uo=null,ie.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,l){var r=this,a=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,c=document.elementFromPoint(a,i);if(qt=t,l||this.options.forceAutoScrollFallback||st||Ie||ct){go(t,this.options,c,l);var p=Oe(c,!0);fo&&(!wt||a!==ho||i!==uo)&&(wt&&Jo(),wt=setInterval(function(){var s=Oe(document.elementFromPoint(a,i),!0);s!==p&&(p=s,jt()),go(t,r.options,s,l)},10),ho=a,uo=i)}else{if(!this.options.bubbleScroll||Oe(c,!0)===ze()){jt();return}go(t,this.options,Oe(c,!1),!1)}}},ke(o,{pluginName:"scroll",initializeByDefault:!0})}function jt(){ie.forEach(function(o){clearInterval(o.pid)}),ie=[]}function Jo(){clearInterval(wt)}var go=Oo(function(o,n,t,l){if(n.scroll){var r=(o.touches?o.touches[0]:o).clientX,a=(o.touches?o.touches[0]:o).clientY,i=n.scrollSensitivity,c=n.scrollSpeed,p=ze(),s=!1,h;mo!==t&&(mo=t,jt(),_t=n.scroll,h=n.scrollFn,_t===!0&&(_t=Oe(t,!0)));var f=0,m=_t;do{var d=m,y=J(d),u=y.top,_=y.bottom,g=y.left,V=y.right,w=y.width,b=y.height,C=void 0,x=void 0,E=d.scrollWidth,L=d.scrollHeight,z=M(d),D=d.scrollLeft,$=d.scrollTop;d===p?(C=w<E&&(z.overflowX==="auto"||z.overflowX==="scroll"||z.overflowX==="visible"),x=b<L&&(z.overflowY==="auto"||z.overflowY==="scroll"||z.overflowY==="visible")):(C=w<E&&(z.overflowX==="auto"||z.overflowX==="scroll"),x=b<L&&(z.overflowY==="auto"||z.overflowY==="scroll"));var F=C&&(Math.abs(V-r)<=i&&D+w<E)-(Math.abs(g-r)<=i&&!!D),S=x&&(Math.abs(_-a)<=i&&$+b<L)-(Math.abs(u-a)<=i&&!!$);if(!ie[f])for(var R=0;R<=f;R++)ie[R]||(ie[R]={});(ie[f].vx!=F||ie[f].vy!=S||ie[f].el!==d)&&(ie[f].el=d,ie[f].vx=F,ie[f].vy=S,clearInterval(ie[f].pid),(F!=0||S!=0)&&(s=!0,ie[f].pid=setInterval((function(){l&&this.layer===0&&I.active._onTouchMove(qt);var j=ie[this.layer].vy?ie[this.layer].vy*c:0,W=ie[this.layer].vx?ie[this.layer].vx*c:0;typeof h=="function"&&h.call(I.dragged.parentNode[pe],W,j,o,qt,ie[this.layer].el)!=="continue"||Po(ie[this.layer].el,W,j)}).bind({layer:f}),24))),f++}while(n.bubbleScroll&&m!==p&&(m=Oe(m,!1)));fo=s}},30),Ko=function(n){var t=n.originalEvent,l=n.putSortable,r=n.dragEl,a=n.activeSortable,i=n.dispatchSortableEvent,c=n.hideGhostForTarget,p=n.unhideGhostForTarget;if(t){var s=l||a;c();var h=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(h.clientX,h.clientY);p(),s&&!s.el.contains(f)&&(i("spill"),this.onSpill({dragEl:r,putSortable:l}))}};function _o(){}_o.prototype={startIndex:null,dragStart:function(n){var t=n.oldDraggableIndex;this.startIndex=t},onSpill:function(n){var t=n.dragEl,l=n.putSortable;this.sortable.captureAnimationState(),l&&l.captureAnimationState();var r=Qe(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),l&&l.animateAll()},drop:Ko},ke(_o,{pluginName:"revertOnSpill"});function wo(){}wo.prototype={onSpill:function(n){var t=n.dragEl,l=n.putSortable,r=l||this.sortable;r.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),r.animateAll()},drop:Ko},ke(wo,{pluginName:"removeOnSpill"});var Ee;function na(){function o(){this.defaults={swapClass:"sortable-swap-highlight"}}return o.prototype={dragStart:function(t){var l=t.dragEl;Ee=l},dragOverValid:function(t){var l=t.completed,r=t.target,a=t.onMove,i=t.activeSortable,c=t.changed,p=t.cancel;if(i.options.swap){var s=this.sortable.el,h=this.options;if(r&&r!==s){var f=Ee;a(r)!==!1?(v(r,h.swapClass,!0),Ee=r):Ee=null,f&&f!==Ee&&v(f,h.swapClass,!1)}c(),l(!0),p()}},drop:function(t){var l=t.activeSortable,r=t.putSortable,a=t.dragEl,i=r||this.sortable,c=this.options;Ee&&v(Ee,c.swapClass,!1),Ee&&(c.swap||r&&r.options.swap)&&a!==Ee&&(i.captureAnimationState(),i!==l&&l.captureAnimationState(),la(a,Ee),i.animateAll(),i!==l&&l.animateAll())},nulling:function(){Ee=null}},ke(o,{pluginName:"swap",eventProperties:function(){return{swapItem:Ee}}})}function la(o,n){var t=o.parentNode,l=n.parentNode,r,a;!t||!l||t.isEqualNode(n)||l.isEqualNode(o)||(r=oe(o),a=oe(n),t.isEqualNode(l)&&r<a&&a++,t.insertBefore(n,t.children[r]),l.insertBefore(o,l.children[a]))}var P=[],Ve=[],yt,De,Ct=!1,we=!1,nt=!1,X,bt,Gt;function ra(){function o(n){for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this));n.options.avoidImplicitDeselect||(n.options.supportPointer?q(document,"pointerup",this._deselectMultiDrag):(q(document,"mouseup",this._deselectMultiDrag),q(document,"touchend",this._deselectMultiDrag))),q(document,"keydown",this._checkKeyDown),q(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(r,a){var i="";P.length&&De===n?P.forEach(function(c,p){i+=(p?", ":"")+c.textContent}):i=a.textContent,r.setData("Text",i)}}}return o.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var l=t.dragEl;X=l},delayEnded:function(){this.isMultiDrag=~P.indexOf(X)},setupClone:function(t){var l=t.sortable,r=t.cancel;if(this.isMultiDrag){for(var a=0;a<P.length;a++)Ve.push(oo(P[a])),Ve[a].sortableIndex=P[a].sortableIndex,Ve[a].draggable=!1,Ve[a].style["will-change"]="",v(Ve[a],this.options.selectedClass,!1),P[a]===X&&v(Ve[a],this.options.chosenClass,!1);l._hideClone(),r()}},clone:function(t){var l=t.sortable,r=t.rootEl,a=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||P.length&&De===l&&(Zo(!0,r),a("clone"),i()))},showClone:function(t){var l=t.cloneNowShown,r=t.rootEl,a=t.cancel;this.isMultiDrag&&(Zo(!1,r),Ve.forEach(function(i){M(i,"display","")}),l(),Gt=!1,a())},hideClone:function(t){var l=this;t.sortable;var r=t.cloneNowHidden,a=t.cancel;this.isMultiDrag&&(Ve.forEach(function(i){M(i,"display","none"),l.options.removeCloneOnHide&&i.parentNode&&i.parentNode.removeChild(i)}),r(),Gt=!0,a())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&De&&De.multiDrag._deselectMultiDrag(),P.forEach(function(l){l.sortableIndex=oe(l)}),P=P.sort(function(l,r){return l.sortableIndex-r.sortableIndex}),nt=!0},dragStarted:function(t){var l=this,r=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(r.captureAnimationState(),this.options.animation)){P.forEach(function(i){i!==X&&M(i,"position","absolute")});var a=J(X,!1,!0,!0);P.forEach(function(i){i!==X&&Fo(i,a)}),we=!0,Ct=!0}r.animateAll(function(){we=!1,Ct=!1,l.options.animation&&P.forEach(function(i){no(i)}),l.options.sort&&Wt()})}},dragOver:function(t){var l=t.target,r=t.completed,a=t.cancel;we&&~P.indexOf(l)&&(r(!1),a())},revert:function(t){var l=t.fromSortable,r=t.rootEl,a=t.sortable,i=t.dragRect;P.length>1&&(P.forEach(function(c){a.addAnimationState({target:c,rect:we?J(c):i}),no(c),c.fromRect=i,l.removeAnimationState(c)}),we=!1,aa(!this.options.removeCloneOnHide,r))},dragOverCompleted:function(t){var l=t.sortable,r=t.isOwner,a=t.insertion,i=t.activeSortable,c=t.parentEl,p=t.putSortable,s=this.options;if(a){if(r&&i._hideClone(),Ct=!1,s.animation&&P.length>1&&(we||!r&&!i.options.sort&&!p)){var h=J(X,!1,!0,!0);P.forEach(function(m){m!==X&&(Fo(m,h),c.appendChild(m))}),we=!0}if(!r)if(we||Wt(),P.length>1){var f=Gt;i._showClone(l),i.options.animation&&!Gt&&f&&Ve.forEach(function(m){i.addAnimationState({target:m,rect:bt}),m.fromRect=bt,m.thisAnimationDuration=null})}else i._showClone(l)}},dragOverAnimationCapture:function(t){var l=t.dragRect,r=t.isOwner,a=t.activeSortable;if(P.forEach(function(c){c.thisAnimationDuration=null}),a.options.animation&&!r&&a.multiDrag.isMultiDrag){bt=ke({},l);var i=He(X,!0);bt.top-=i.f,bt.left-=i.e}},dragOverAnimationComplete:function(){we&&(we=!1,Wt())},drop:function(t){var l=t.originalEvent,r=t.rootEl,a=t.parentEl,i=t.sortable,c=t.dispatchSortableEvent,p=t.oldIndex,s=t.putSortable,h=s||this.sortable;if(l){var f=this.options,m=a.children;if(!nt)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),v(X,f.selectedClass,!~P.indexOf(X)),~P.indexOf(X))P.splice(P.indexOf(X),1),yt=null,mt({sortable:i,rootEl:r,name:"deselect",targetEl:X,originalEvent:l});else{if(P.push(X),mt({sortable:i,rootEl:r,name:"select",targetEl:X,originalEvent:l}),l.shiftKey&&yt&&i.el.contains(yt)){var d=oe(yt),y=oe(X);if(~d&&~y&&d!==y){var u,_;for(y>d?(_=d,u=y):(_=y,u=d+1);_<u;_++)~P.indexOf(m[_])||(v(m[_],f.selectedClass,!0),P.push(m[_]),mt({sortable:i,rootEl:r,name:"select",targetEl:m[_],originalEvent:l}))}}else yt=X;De=h}if(nt&&this.isMultiDrag){if(we=!1,(a[pe].options.sort||a!==r)&&P.length>1){var g=J(X),V=oe(X,":not(."+this.options.selectedClass+")");if(!Ct&&f.animation&&(X.thisAnimationDuration=null),h.captureAnimationState(),!Ct&&(f.animation&&(X.fromRect=g,P.forEach(function(b){if(b.thisAnimationDuration=null,b!==X){var C=we?J(b):g;b.fromRect=C,h.addAnimationState({target:b,rect:C})}})),Wt(),P.forEach(function(b){m[V]?a.insertBefore(b,m[V]):a.appendChild(b),V++}),p===oe(X))){var w=!1;P.forEach(function(b){if(b.sortableIndex!==oe(b)){w=!0;return}}),w&&(c("update"),c("sort"))}P.forEach(function(b){no(b)}),h.animateAll()}De=h}(r===a||s&&s.lastPutMode!=="clone")&&Ve.forEach(function(b){b.parentNode&&b.parentNode.removeChild(b)})}},nullingGlobal:function(){this.isMultiDrag=nt=!1,Ve.length=0},destroyGlobal:function(){this._deselectMultiDrag(),U(document,"pointerup",this._deselectMultiDrag),U(document,"mouseup",this._deselectMultiDrag),U(document,"touchend",this._deselectMultiDrag),U(document,"keydown",this._checkKeyDown),U(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(typeof nt<"u"&&nt)&&De===this.sortable&&!(t&&xe(t.target,this.options.draggable,this.sortable.el,!1))&&!(t&&t.button!==0))for(;P.length;){var l=P[0];v(l,this.options.selectedClass,!1),P.shift(),mt({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:l,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},ke(o,{pluginName:"multiDrag",utils:{select:function(t){var l=t.parentNode[pe];!l||!l.options.multiDrag||~P.indexOf(t)||(De&&De!==l&&(De.multiDrag._deselectMultiDrag(),De=l),v(t,l.options.selectedClass,!0),P.push(t))},deselect:function(t){var l=t.parentNode[pe],r=P.indexOf(t);!l||!l.options.multiDrag||!~r||(v(t,l.options.selectedClass,!1),P.splice(r,1))}},eventProperties:function(){var t=this,l=[],r=[];return P.forEach(function(a){l.push({multiDragElement:a,index:a.sortableIndex});var i;we&&a!==X?i=-1:we?i=oe(a,":not(."+t.options.selectedClass+")"):i=oe(a),r.push({multiDragElement:a,index:i})}),{items:zr(P),clones:[].concat(Ve),oldIndicies:l,newIndicies:r}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),t==="ctrl"?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function aa(o,n){P.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function Zo(o,n){Ve.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function Wt(){P.forEach(function(o){o!==X&&o.parentNode&&o.parentNode.removeChild(o)})}I.mount(new oa),I.mount(wo,_o);function We(o){o.parentElement!==null&&o.parentElement.removeChild(o)}function Vt(o,n,t){const l=t===0?o.children[0]:o.children[t-1].nextSibling;o.insertBefore(n,l)}function ia(){return typeof window<"u"?window.console:global.console}const sa=ia();function ca(o){const n=Object.create(null);return function(l){return n[l]||(n[l]=o(l))}}const da=/-(\w)/g,pa=ca(o=>o.replace(da,(n,t)=>t.toUpperCase())),Qo=["Start","Add","Remove","Update","End"],vo=["Choose","Unchoose","Sort","Filter","Clone","Select","Deselect"],en=["Move"],ma=[en,Qo,vo].flatMap(o=>o).map(o=>`on${o}`),yo={manage:en,manageAndEmit:Qo,emit:vo};function fa(o){return ma.indexOf(o)!==-1}const ha=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function ua(o){return ha.includes(o)}function ga(o){return["transition-group","TransitionGroup"].includes(o)}function tn(o){return["id","class","role","style"].includes(o)||o.startsWith("data-")||o.startsWith("aria-")||o.startsWith("on")}function on(o){return o.reduce((n,[t,l])=>(n[t]=l,n),{})}function _a({$attrs:o,componentData:n={}}){return{...on(Object.entries(o).filter(([l,r])=>tn(l))),...n}}function wa({$attrs:o,callBackBuilder:n}){const t=on(nn(o));Object.entries(n).forEach(([r,a])=>{yo[r].forEach(i=>{t[`on${i}`]=a(i)})});const l=`>[data-draggable]${t.draggable||""}`;return{...t,draggable:l}}function nn(o){return Object.entries(o).filter(([n,t])=>!tn(n)).map(([n,t])=>[pa(n),t]).filter(([n,t])=>!fa(n))}const ln=({el:o})=>o,ya=(o,n)=>o.__draggable_context=n,rn=o=>o.__draggable_context;class Ca{constructor({nodes:{header:n,default:t,footer:l},root:r,realList:a}){this.defaultNodes=t,this.children=[...n,...t,...l],this.externalComponent=r.externalComponent,this.rootTransition=r.transition,this.tag=r.tag,this.realList=a}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(n,t){const{tag:l,children:r,_isRootComponent:a}=this;return n(l,t,a?{default:()=>r}:r)}updated(){const{defaultNodes:n,realList:t}=this;n.forEach((l,r)=>{ya(ln(l),{element:t[r],index:r})})}getUnderlyingVm(n){return rn(n)}getVmIndexFromDomIndex(n,t){const{defaultNodes:l}=this,{length:r}=l,a=t.children,i=a.item(n);if(i===null)return r;const c=rn(i);if(c)return c.index;if(r===0)return 0;const p=ln(l[0]),s=[...a].findIndex(h=>h===p);return n<s?0:r}}function ba(o,n){const t=o[n];return t?t():[]}function Va({$slots:o,realList:n,getKey:t,itemDataSet:l}){let r;switch(typeof l){case"function":r=l;break;case"object":r=()=>l;break}const a=n||[],[i,c]=["header","footer"].map(h=>ba(o,h)),{item:p}=o;if(!p)throw new Error("draggable element must have an item slot");const s=a.flatMap((h,f)=>p({element:h,index:f}).map(m=>{m.key=t(h);const d=r==null?void 0:r(h);return d?m.props={...m.props||{},"data-draggable":!0,...d}:m.props={...m.props||{},"data-draggable":!0},m}));if(s.length!==a.length)throw new Error("Item slot must have only one child");return{header:i,footer:c,default:s}}function ka(o){const n=ga(o),t=!ua(o)&&!n;return{transition:n,externalComponent:t,tag:t?e.resolveComponent(o):n?e.TransitionGroup:o}}function xa({$slots:o,tag:n,realList:t,getKey:l,itemDataSet:r}){const a=Va({$slots:o,realList:t,getKey:l,itemDataSet:r}),i=ka(n);return new Ca({nodes:a,root:i,realList:t})}function an(o,n){e.nextTick(()=>this.$emit(o.toLowerCase(),n))}function sn(o){return(n,t)=>{if(this.realList!==null)return this[`onDrag${o}`](n,t)}}function Ea(o){const n=sn.call(this,o);return(t,l)=>{n.call(this,t,l),an.call(this,o,t)}}function Co(o,n){const t=new I(o,n);return n.swap&&!t.swap?(I.mount(new na),t.destroy(),Co(o,n)):n.multiDrag&&!t.multiDrag?(I.mount(new ra),t.destroy(),Co(o,n)):t}function Na(o,n){return Array.from(o).reverse().map(({index:t})=>t-n)}let bo=null;const Ba={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:o=>o},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Da=["update:modelValue","change",...[...yo.manageAndEmit,...yo.emit].map(o=>o.toLowerCase())],lt=e.defineComponent({name:"draggable",inheritAttrs:!1,props:Ba,emits:Da,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:o,$attrs:n,tag:t,componentData:l,realList:r,getKey:a}=this,i=xa({$slots:o,tag:t,realList:r,getKey:a,itemDataSet:n.itemDataSet});this.componentStructure=i;const c=_a({$attrs:n,componentData:l});return i.render(e.h,c)}catch(o){return this.error=!0,e.h("pre",{style:{color:"red"}},o.stack)}},created(){this.list!==null&&this.modelValue!==null&&sa.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:o,$el:n,componentStructure:t}=this;t.updated();const l=wa({$attrs:o,callBackBuilder:{manageAndEmit:a=>Ea.call(this,a),emit:a=>an.bind(this,a),manage:a=>sn.call(this,a)}}),r=n.nodeType===1?n:n.parentElement;this._sortable=Co(r,l),this.targetDomElement=r,r.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:o}=this;return o||this.modelValue},getKey(){const{itemKey:o}=this;return typeof o=="function"?o:n=>n[o]}},watch:{$attrs:{handler(o){const{_sortable:n}=this;n&&nn(o).forEach(([t,l])=>{n.option(t,l)})},deep:!0}},methods:{getUnderlyingVm(o){return this.componentStructure.getUnderlyingVm(o)||null},getUnderlyingPotencialDraggableComponent(o){return o.__draggable_component__},emitChanges(o){e.nextTick(()=>this.$emit("change",o))},alterList(o){if(this.list){o(this.list);return}const n=[...this.modelValue];o(n),this.$emit("update:modelValue",n)},spliceList(){const o=n=>n.splice(...arguments);this.alterList(o)},removeAllFromList(o){const n=t=>o.forEach(l=>t.splice(l,1));this.alterList(n)},swapPosition(o,n){const t=l=>{const r=l[o];l[o]=l[n],l[n]=r};this.alterList(t)},updatePosition(o,n){const t=l=>l.splice(n,0,l.splice(o,1)[0]);this.alterList(t)},updatePositions(o,n){const t=l=>{const r=o.sort().reverse().flatMap(a=>l.splice(a,1)).reverse();return l.splice(n,0,...r)};this.alterList(t)},getRelatedContextFromMoveEvent({to:o,related:n}){const t=this.getUnderlyingPotencialDraggableComponent(o);if(!t)return{component:t};const l=t.realList,r={list:l,component:t};return o!==n&&l?{...t.getUnderlyingVm(n)||{},...r}:r},getVmIndexFromDomIndex(o){return this.componentStructure.getVmIndexFromDomIndex(o,this.targetDomElement)},onDragStart(o){if(Array.isArray(o.items)&&o.items.length){this.multidragContexts=o.items.map(t=>this.getUnderlyingVm(t));const n=this.multidragContexts.sort(({index:t},{index:l})=>t-l).map(t=>t.element);o.item._underlying_vm_multidrag_=this.clone(n)}this.context=this.getUnderlyingVm(o.item),o.item._underlying_vm_=this.clone(this.context.element),bo=o.item},onDragAdd(o){Array.isArray(o.items)&&o.items.length?this.onDragAddMulti(o):this.onDragAddSingle(o)},onDragAddMulti(o){const n=o.item._underlying_vm_multidrag_;if(n===void 0)return;o.items.forEach(r=>We(r));const t=this.getVmIndexFromDomIndex(o.newIndex);this.spliceList(t,0,...n);const l=n.map((r,a)=>({element:r,newIndex:t+a}));this.emitChanges({added:l})},onDragAddSingle(o){const n=this._sortable.options&&this._sortable.options.swap,t=o.item._underlying_vm_;if(t===void 0)return;const l=n?o.from.children[o.oldIndex]:null;We(o.item);let r=this.getVmIndexFromDomIndex(o.newIndex);n&&(r=r===0?0:r-1),this.spliceList(r,n?1:0,t);const a={element:t,newIndex:r,from:o.from,to:o.to};if(o.swap||(this.emitChanges({added:a}),!n))return;const i={to:o.from,from:o.to,item:l,oldIndex:o.newIndex,newIndex:o.oldIndex,swap:!0};e.nextTick(()=>{const c=i.to.__draggable_component__;c.onDragStart(i),c.onDragAdd(i)})},onDragRemove(o){Array.isArray(o.items)&&o.items.length?this.onDragRemoveMulti(o):this.onDragRemoveSingle(o)},onDragRemoveMulti(o){const n=(this.$slots.header?this.$slots.header():[]).length||0,t=o.oldIndicies.sort(({index:a},{index:i})=>a-i);if(t.forEach(({multiDragElement:a,index:i})=>{Vt(this.$el,a,i),a.parentNode&&I.utils.deselect(a)}),o.pullMode==="clone"){o.clones.forEach(a=>We(a));return}const l=Na(t,n);this.removeAllFromList(l);const r=l.sort().map(a=>({element:this.multidragContexts.find(c=>c.index===a).element,oldIndex:a}));this.emitChanges({removed:r})},onDragRemoveSingle(o){const{index:n,element:t}=this.context,l={element:t,oldIndex:n,from:o.from,to:o.to};if(this._sortable.options&&this._sortable.options.swap)return this.emitChanges({removed:l});if(Vt(this.$el,o.item,o.oldIndex),o.pullMode==="clone"){We(o.clone);return}this.spliceList(n,1),this.emitChanges({removed:l})},onDragUpdate(o){Array.isArray(o.items)&&o.items.length?o.pullMode||this.onDragUpdateMulti(o):this.onDragUpdateSingle(o)},onDragUpdateMulti(o){const{items:n,from:t}=o,l=(this.$slots.header?this.$slots.header():[]).length||0;n.forEach(p=>We(p));const r=Array.from(o.oldIndicies).sort(({index:p},{index:s})=>p-s);r.forEach(p=>Vt(t,p.multiDragElement,p.index));const a=r.map(({index:p})=>p-l),i=this.getVmIndexFromDomIndex(o.newIndex);this.updatePositions(Array.from(a),i);const c=a.map((p,s)=>({element:this.multidragContexts.find(f=>f.index===p).element,oldIndex:p,newIndex:i+s}));this.emitChanges({moved:c})},onDragUpdateSingle(o){const n=this._sortable.options&&this._sortable.options.swap,t=n?o.from.children[o.oldIndex]:null;We(o.item),Vt(o.from,o.item,o.oldIndex),n&&(We(t),Vt(o.from,t,o.newIndex));const l=this.context.index,r=this.getVmIndexFromDomIndex(o.newIndex);n?this.swapPosition(l,r):this.updatePosition(l,r);const a={element:this.context.element,oldIndex:l,newIndex:r};this.emitChanges({moved:a})},computeFutureIndex(o,n){if(!o.element)return 0;const t=[...n.to.children].filter(i=>i.style.display!=="none"),l=t.indexOf(n.related),r=o.component.getVmIndexFromDomIndex(l);return t.indexOf(bo)!==-1||!n.willInsertAfter?r:r+1},onDragMove(o,n){const{move:t,realList:l}=this;if(!t||!l)return!0;const r=this.getRelatedContextFromMoveEvent(o),a=this.computeFutureIndex(r,o),i={...this.context,futureIndex:a},c={...o,relatedContext:r,draggedContext:i};return t(c,n)},onDragEnd(){bo=null},select(o){I.utils.select(o)},deselect(o){I.utils.deselect(o)}}}),{getTempID:Sa}=de();let Se=class{constructor(n,t,l=!1,r=!1){Ce(this,"isEdit");Ce(this,"isInput");Ce(this,"type");Ce(this,"name");Ce(this,"id");Ce(this,"itemID");Ce(this,"itemSourceType");Ce(this,"rules");Ce(this,"props");Ce(this,"excludeFilterConditions");Ce(this,"filterConditionProps");Ce(this,"isLayout",!1);Ce(this,"children");this.type=n,this.name=t,this.isEdit=l,this.isInput=r,this.id=Sa(),this.props={},this.rules=[{message:"必填项",required:!1}],this.excludeFilterConditions=[],this.filterConditionProps=void 0,this.isLayout=!1,this.children=void 0}};const Ma=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;return(l,r)=>{const a=e.resolveComponent("el-color-picker"),i=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-switch"),p=e.resolveComponent("el-option"),s=e.resolveComponent("el-select"),h=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(f,{"label-width":"80px","label-suffix":":",class:"group-layout-props-editor"},{default:e.withCtx(()=>[e.createVNode(i,{label:"背景色"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:e.unref(t).backgroundColor,"onUpdate:modelValue":r[0]||(r[0]=m=>e.unref(t).backgroundColor=m)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"显示边框"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).showBorder,"onUpdate:modelValue":r[1]||(r[1]=m=>e.unref(t).showBorder=m)},null,8,["modelValue"])]),_:1}),e.unref(t).showBorder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{label:"边框样式"},{default:e.withCtx(()=>[e.createVNode(s,{class:"file-size-unit-select",modelValue:e.unref(t).borderStyle,"onUpdate:modelValue":r[2]||(r[2]=m=>e.unref(t).borderStyle=m)},{default:e.withCtx(()=>[e.createVNode(p,{label:"实线边框",value:"solid"}),e.createVNode(p,{label:"虚线边框",value:"dashed"}),e.createVNode(p,{label:"点线边框",value:"dotted"}),e.createVNode(p,{label:"双线边框",value:"double"}),e.createVNode(p,{label:"凹槽边框",value:"groove"}),e.createVNode(p,{label:"脊状边框",value:"ridge"}),e.createVNode(p,{label:"内凹边框",value:"inset"}),e.createVNode(p,{label:"外凸边框",value:"outset"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框颜色"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:e.unref(t).borderColor,"onUpdate:modelValue":r[3]||(r[3]=m=>e.unref(t).borderColor=m)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框宽度"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).borderWidth,"onUpdate:modelValue":r[4]||(r[4]=m=>e.unref(t).borderWidth=m),step:1,min:1,max:20},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框圆角"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).borderRadius,"onUpdate:modelValue":r[5]||(r[5]=m=>e.unref(t).borderRadius=m),step:1,min:0,max:100},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),Ms="",za=["onClick"],$a={key:2,class:"operates"},Vo=e.defineComponent({__name:"componentDesigner",props:{components:{type:Array,required:!0}},emits:["update:components","deleteComponent","change"],setup(o,{emit:n}){const t={...Nt,...St,...Bt,...Dt},{getTempID:l,clone:r}=de(),a=n;let i=e.inject("formData"),c=e.inject("formDesignerData");const p=o,{components:s}=e.toRefs(p);e.watch(s,()=>a("update:components",s),{immediate:!0,deep:!0});const h=u=>{u.added?(f(u.added.element),a("change")):u.moved&&(f(u.moved.element),a("change"))},f=u=>{c.selectComponent=void 0,e.nextTick(()=>c.selectComponent=u)},m=u=>{const _=d(u);s.value.push(_),f(_),a("change")},d=u=>{var g,V;let _=r(u);if(_.id=l(),delete _.itemID,(g=_.props.options)!=null&&g.length){_.props.options.forEach(b=>{b.value.includes("temp-")&&(b.value=l())});let w=new t[u.type].component;_.filterConditionProps=w.getFilterConditionProps(_.props)}if(_.isLayout&&((V=_.children)!=null&&V.length)){let w=[];_.children.forEach(b=>{w.push(d(b))}),_.children=w}return _},y=u=>{let _=r(s.value[u]);s.value.splice(u,1),c.selectComponent=void 0,a("change"),a("deleteComponent",_)};return(u,_)=>{const g=e.resolveComponent("el-form-item"),V=Q;return e.openBlock(),e.createBlock(e.unref(lt),{list:e.unref(s),"item-key":"id",class:"form-draggable",sort:!0,group:{name:"component",pull:!0,put:!0},onChange:h},{item:e.withCtx(({element:w,index:b})=>[e.createElementVNode("div",{onClick:e.withModifiers(C=>f(w),["stop"]),class:e.normalizeClass(["form-item-wrap",{"is-selected":e.unref(c).selectComponent==w},{"is-hidden":!w.props.showFlag}]),style:e.normalizeStyle({width:`${w.props.width*100/e.unref(i).props.column}%`,height:`${w.isLayout&&w.props.height?w.props.height+w.props.heightUnit:"auto"}`,"padding-left":`${w.props.paddingLeft}px`})},[w.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[w.type].renderer),{key:0,isDesigner:"",componentID:w.id,component:e.unref(s)[b],"onUpdate:component":C=>e.unref(s)[b]=C,onDeleteComponent:_[0]||(_[0]=C=>a("deleteComponent",C)),onChange:_[1]||(_[1]=C=>a("change"))},null,40,["componentID","component","onUpdate:component"])):(e.openBlock(),e.createBlock(g,{key:1,prop:w.id,class:e.normalizeClass(["form-item",{"label-new-line":w.props.labelNewLine}]),"label-width":w.props.showLabel?w.props.labelWidth:"0",rules:w.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:w.props.color||"#000000","font-size":w.props.fontSize+"px","font-weight":w.props.isBold?"bold":"normal"})},e.toDisplayString(w.props.showLabel?w.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[w.type].renderer),{isDesigner:"",componentID:w.id,componentProps:w.props,"onUpdate:componentProps":C=>w.props=C,datas:e.unref(i).datas,"onUpdate:datas":_[2]||(_[2]=C=>e.unref(i).datas=C)},null,40,["componentID","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["prop","class","label-width","rules"])),e.unref(c).selectComponent==w?(e.openBlock(),e.createElementBlock("div",$a,[w.allowRepeat?(e.openBlock(),e.createBlock(V,{key:0,name:"copy",color:"#0000ff",onClick:e.withModifiers(C=>m(w),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(V,{name:"delete",color:"#ff0000",onClick:e.withModifiers(C=>y(b),["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],14,za)]),_:1},8,["list"])}}}),zs="",Ta=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},component:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["deleteComponent","change"],setup(o,{emit:n}){const t=o,{component:l,showDescription:r}=e.toRefs(t);!l.value.children&&(l.value.children=[]);const a=e.computed(()=>{let s={"background-color":l.value.props.backgroundColor||""};return l.value.props.showBorder&&(s.border=`${l.value.props.borderWidth}px ${l.value.props.borderStyle} ${l.value.props.borderColor}`),l.value.props.borderRadius&&(s["border-radius"]=`${l.value.props.borderRadius}px`),s}),i=n,c=s=>{i("deleteComponent",s)},p=()=>{i("change")};return(s,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["layout","group-layout-component",{"is-designer":o.isDesigner}]),style:e.normalizeStyle(e.unref(a))},[e.unref(l).props.showLabel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-title",style:e.normalizeStyle({color:e.unref(l).props.color,"font-size":e.unref(l).props.fontSize+"px","font-weight":e.unref(l).props.isBold?"bold":"normal"})},e.toDisplayString(e.unref(l).props.label),5)):e.createCommentVNode("",!0),o.isDesigner?(e.openBlock(),e.createBlock(Vo,{key:1,components:e.unref(l).children,"onUpdate:components":h[0]||(h[0]=f=>e.unref(l).children=f),onDeleteComponent:c,onChange:p},null,8,["components"])):(e.openBlock(),e.createBlock(xo,{key:2,components:e.unref(l).children,showDescription:e.unref(r)},null,8,["components","showDescription"]))],6))}}),$s="",Ia={component:class extends Se{constructor(){super("groupLayout","分组"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"分组名称",fontSize:14,isBold:!0,color:"#000000",showFlag:!0,backgroundColor:"#ffffff",showBorder:!1,borderStyle:"solid",borderColor:"#cccccc",borderWidth:1,borderRadius:0},this.isLayout=!0,this.children=[]}},renderer:Ta,propEditor:Ma},La={class:"dictionary-binder"},Aa={class:"item"},Oa={class:"label"},Pa={key:0,class:"item-souce-type"},Yt=e.defineComponent({__name:"dictionaryBinder",props:{modelValue:{type:String,required:!0},dictionary:{type:Object,default:()=>{}},placeholder:{type:String,default:"请输入内容"},itemHeight:{type:Number,default:34},height:{type:String,default:"20px"},disabled:{type:Boolean,default:!1},allowCreateDictionary:{type:Boolean,default:!0}},emits:["update:modelValue","change"],setup(o,{emit:n}){var d;e.useCssVars(y=>({c9ee9b68:o.height}));let t=e.inject("defaultSourceType");const l=o,r=e.ref(),a=e.ref(l.modelValue),i=(d=l.dictionary)==null?void 0:d.souceTypeMap;r.value=(i==null?void 0:i.size)>1;let c=e.ref([]);const p=y=>{c.value=y?s(y):l.dictionary.dictionaryItems},s=y=>l.dictionary.dictionaryItems.filter(u=>u.label.toLocaleLowerCase().includes(y.toLocaleLowerCase())),h=n,{getTempID:f}=de(),m=y=>{let u=c.value.find(_=>_.value===y);u||(u={value:f(),label:y,itemSourceType:t}),h("update:modelValue",u.label),h("change",u)};return(y,u)=>{var V;const _=e.resolveComponent("el-select-v2"),g=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",La,[(V=o.dictionary)!=null&&V.dictionaryItems.length?(e.openBlock(),e.createBlock(_,{key:0,modelValue:e.unref(a),"onUpdate:modelValue":u[0]||(u[0]=w=>e.isRef(a)?a.value=w:null),filterable:"","allow-create":o.allowCreateDictionary,"reserve-keyword":!1,remote:"","remote-method":p,placeholder:o.placeholder,options:e.unref(c),"popper-class":"dictionary-binder-popper",placement:"bottom-end","item-height":o.itemHeight,height:o.itemHeight*8,disabled:o.disabled,onChange:m},{default:e.withCtx(({item:w})=>[e.createElementVNode("div",Aa,[e.createElementVNode("span",Oa,e.toDisplayString(w.label),1),e.unref(r)?(e.openBlock(),e.createElementBlock("span",Pa,e.toDisplayString(e.unref(i).get(w.itemSourceType)),1)):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","allow-create","placeholder","options","item-height","height","disabled"])):(e.openBlock(),e.createBlock(g,{key:1,modelValue:e.unref(a),"onUpdate:modelValue":u[1]||(u[1]=w=>e.isRef(a)?a.value=w:null),autosize:{minRows:2,maxRows:5},type:"textarea",disabled:o.disabled,onChange:m},null,8,["modelValue","disabled"]))])}}}),Is="",Fa={class:"page-wrap"},Ra=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}},allowCreateDictionary:{type:Boolean,default:!0}},setup(o){let n=e.inject("formDesignerData"),t=e.inject("defaultSourceType"),l=n.selectComponent.props;const{getTempID:r}=de(),a=()=>{l.pages.push({label:`标签${l.pages.length+1}`,value:r(),itemSourceType:t})},i=p=>{l.pages.splice(p,1)},c=(p,s)=>{s.value=p.value,s.itemSourceType=p.itemSourceType};return(p,s)=>{const h=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),m=e.resolveComponent("el-input"),d=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-divider"),u=Q,_=e.resolveComponent("el-button"),g=e.resolveComponent("el-switch"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(V,{"label-width":"80px","label-suffix":":",class:"tabs-props-editor"},{default:e.withCtx(()=>[e.createVNode(d,{label:"高度"},{default:e.withCtx(()=>[e.createVNode(m,{class:"height-input",type:"number",min:0,modelValue:e.unref(l).height,"onUpdate:modelValue":s[1]||(s[1]=w=>e.unref(l).height=w)},{append:e.withCtx(()=>[e.createVNode(f,{class:"height-unit-select",modelValue:e.unref(l).heightUnit,"onUpdate:modelValue":s[0]||(s[0]=w=>e.unref(l).heightUnit=w),modelModifiers:{number:!0}},{default:e.withCtx(()=>[e.createVNode(h,{value:"px"}),e.createVNode(h,{value:"%"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{label:"标签风格"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).tabType,"onUpdate:modelValue":s[2]||(s[2]=w=>e.unref(l).tabType=w)},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认",value:""}),e.createVNode(h,{label:"卡片",value:"card"}),e.createVNode(h,{label:"选项卡",value:"border-card"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{label:"默认标签"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":s[3]||(s[3]=w=>e.unref(l).defaultValue=w)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).pages,(w,b)=>(e.openBlock(),e.createBlock(h,{key:b,label:w.label,value:String(b)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(y,null,{default:e.withCtx(()=>[e.createTextVNode("标签列表")]),_:1}),e.createVNode(d,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt),{class:"pages",handle:".cursor-move",list:e.unref(l).pages,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:w,index:b})=>[e.createElementVNode("div",Fa,[e.unref(l).pages.length>1?(e.openBlock(),e.createBlock(u,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(Yt,{modelValue:w.label,"onUpdate:modelValue":C=>w.label=C,dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary,placeholder:"请输入标签","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:C=>c(C,w)},null,8,["modelValue","onUpdate:modelValue","dictionary","allowCreateDictionary","disabled","onChange"]),e.unref(n).selectComponent.allowModify&&e.unref(l).pages.length>1?(e.openBlock(),e.createBlock(u,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:C=>i(b)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(d,{key:0,class:"add-page"},{default:e.withCtx(()=>[e.createVNode(_,{class:"add-page-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(u,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(y),e.createVNode(d,{label:"标签位置"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).tabPosition,"onUpdate:modelValue":s[4]||(s[4]=w=>e.unref(l).tabPosition=w)},{default:e.withCtx(()=>[e.createVNode(h,{label:"顶部",value:"top"}),e.createVNode(h,{label:"底部",value:"bottom"}),e.createVNode(h,{label:"左侧",value:"left"}),e.createVNode(h,{label:"右侧",value:"right"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示导航"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).showNavigation,"onUpdate:modelValue":s[5]||(s[5]=w=>e.unref(l).showNavigation=w)},null,8,["modelValue"])]),_:1})]),_:1})}}}),Ls="",Ua={key:2,class:"nav-btn"},Ha=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},component:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["deleteComponent","change"],setup(o,{emit:n}){var f;const t=o,{component:l,showDescription:r}=e.toRefs(t),a=e.ref(l.value.props.defaultValue),i=e.ref({});(f=l.value.children)!=null&&f.length&&l.value.children.forEach(m=>{const d=l.value.props.pages.findIndex(u=>u.value===m.props.pageID),y=String(d);i.value[y]||(i.value[y]=[]),i.value[y].push(m)}),e.watch(()=>i.value,()=>{l.value.children=[],Object.keys(i.value).forEach(m=>{i.value[m].forEach(d=>{var y;d.props.pageID=(y=l.value.props.pages[m])==null?void 0:y.value,l.value.children.push(d)})})},{deep:!0}),e.watch(()=>l.value.props.defaultValue,()=>{a.value=l.value.props.defaultValue},{immediate:!0}),e.watch(()=>l.value.props.pages,()=>{let m={};l.value.props.pages.forEach((d,y)=>{i.value[y]?m[y]=i.value[y]:m[y]=[]}),i.value=m},{immediate:!0,deep:!0});const c=m=>{let d=parseInt(a.value||"0");m==="p"?d-=1:d+=1,a.value=String(d)},p=n,s=m=>{p("deleteComponent",m)},h=()=>{p("change")};return(m,d)=>{const y=e.resolveComponent("el-button"),u=e.resolveComponent("el-tab-pane"),_=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["layout","tabs-layout-component",{"is-designer":o.isDesigner}])},[e.createVNode(_,{class:"tabs-layout",type:e.unref(l).props.tabType,"tab-position":e.unref(l).props.tabPosition,modelValue:e.unref(a),"onUpdate:modelValue":d[2]||(d[2]=g=>e.isRef(a)?a.value=g:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).props.pages,(g,V)=>(e.openBlock(),e.createBlock(u,{key:V,label:g.label,name:String(V)},{default:e.withCtx(()=>[o.isDesigner?(e.openBlock(),e.createBlock(Vo,{key:0,components:e.unref(i)[V],"onUpdate:components":w=>e.unref(i)[V]=w,onDeleteComponent:s,onChange:h},null,8,["components","onUpdate:components"])):(e.openBlock(),e.createBlock(xo,{key:1,components:e.unref(i)[V],showDescription:e.unref(r)},null,8,["components","showDescription"])),e.unref(l).props.showNavigation?(e.openBlock(),e.createElementBlock("div",Ua,[V!==0?(e.openBlock(),e.createBlock(y,{key:0,onClick:d[0]||(d[0]=w=>c("p")),class:"print-button"},{default:e.withCtx(()=>[e.createTextVNode("上一页")]),_:1})):e.createCommentVNode("",!0),V!==e.unref(l).props.pages.length-1?(e.openBlock(),e.createBlock(y,{key:1,onClick:d[1]||(d[1]=w=>c("n")),type:"success"},{default:e.withCtx(()=>[e.createTextVNode("下一页")]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1032,["label","name"]))),128))]),_:1},8,["type","tab-position","modelValue"])],2)}}}),As="",qa={component:class extends Se{constructor(){super("tabs","标签页"),this.props={width:12,showLabel:!1,labelWidth:void 0,labelNewLine:!1,label:"",fontSize:14,isBold:!0,color:"#000000",showFlag:!0,defaultValue:"0",height:200,heightUnit:"px",tabType:"border-card",pages:[{value:"temp_1",label:"标签1"},{value:"temp_3",label:"标签2"}],tabPosition:"top",showNavigation:!1},this.isLayout=!0,this.children=[]}},renderer:Ha,propEditor:Ra},ja=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;const l=e.ref(t.fileSize);return e.watch(l,()=>t.fileSize=Number(l.value)),(r,a)=>{const i=e.resolveComponent("el-switch"),c=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-input-number"),s=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),m=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(m,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(c,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=d=>e.unref(t).multiple=d)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"文件数量"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=d=>e.unref(t).fileLimit=d),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"文件大小"},{default:e.withCtx(()=>[e.createVNode(f,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(l),"onUpdate:modelValue":a[3]||(a[3]=d=>e.isRef(l)?l.value=d:null),modelModifiers:{number:!0},placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(h,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=d=>e.unref(t).fileSizeUnit=d)},{default:e.withCtx(()=>[e.createVNode(s,{value:"KB"}),e.createVNode(s,{value:"MB"}),e.createVNode(s,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{label:"文件类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=d=>e.unref(t).fileType=d),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Ps="",Ga={class:"upload-component"},Wa=e.createElementVNode("span",{class:"button-text"},"上传文件",-1),Ya={key:0,class:"description"},Xa=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},setup(o){const{checkFile:n}=de(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),c=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const p=m=>{if(m.status==="ready"&&!n(m.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!1)){s(m);return}if(m.status==="success"&&m.response.code===0){he("error",m.response.message||"文件上传失败!"),s(m);return}l.autoUpload?a.value[t.componentID].push({name:m.name,url:m.response.data.url,id:m.response.data.id}):a.value[t.componentID].push({name:m.name,url:m.url,file:m.raw})},s=(m,d=!0)=>{d&&c.value.handleRemove(m);const y=a.value[t.componentID].findIndex(u=>u.url===m.url);y!==-1&&a.value[t.componentID].splice(y,1)},h=m=>{s(m,!1)},f=()=>{var d;let m=`最多只能上传${i.value.fileLimit}个文件`;(d=a.value[t.componentID])!=null&&d.length&&(m+=`,您已上传了${a.value[t.componentID].length}个文件,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个文件`),he("error",m)};return(m,d)=>{const y=Q,u=e.resolveComponent("el-button"),_=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",Ga,[e.createVNode(_,{ref_key:"uploadRef",ref:c,action:e.unref(l).serverApi,headers:e.unref(l).headers,data:e.unref(l).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[o.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(l).autoUpload,"on-exceed":f,"on-change":p,"on-remove":h},{default:e.withCtx(()=>{var g;return[e.unref(i).fileLimit>(((g=e.unref(a)[o.componentID])==null?void 0:g.length)||0)?(e.openBlock(),e.createBlock(u,{key:0,size:"large",color:"#409eff"},{icon:e.withCtx(()=>[e.createVNode(y,{name:"upload",color:"#ffffff"})]),default:e.withCtx(()=>[Wa]),_:1})):e.createCommentVNode("",!0)]}),_:1},8,["action","headers","data","multiple","limit","file-list","accept","auto-upload"]),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",Ya,[e.createVNode(y,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Fs="",Ja={component:class extends Se{constructor(){super("upload","文件上传"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"文件上传",fontSize:12,isBold:!1,color:"#000000",showFlag:!0,multiple:!1,fileLimit:1,fileSize:30,fileSizeUnit:"MB",fileType:".jpg,.txt,.doc,.docx,.ppt,.pptx,.xls,.xlsx,.pdf"}}},renderer:Xa,propEditor:ja},Ka=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;const l=e.ref(t.fileSize);return e.watch(l,()=>t.fileSize=Number(l.value)),(r,a)=>{const i=e.resolveComponent("el-switch"),c=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-input-number"),s=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),m=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(m,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(c,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=d=>e.unref(t).multiple=d)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"图片数量"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=d=>e.unref(t).fileLimit=d),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"图片大小"},{default:e.withCtx(()=>[e.createVNode(f,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(l),"onUpdate:modelValue":a[3]||(a[3]=d=>e.isRef(l)?l.value=d:null),placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(h,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=d=>e.unref(t).fileSizeUnit=d),modelModifiers:{number:!0}},{default:e.withCtx(()=>[e.createVNode(s,{value:"KB"}),e.createVNode(s,{value:"MB"}),e.createVNode(s,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{label:"图片类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=d=>e.unref(t).fileType=d),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Us="",Za={class:"upload-image-component"},Qa={class:"el-upload-list__item-actions"},va={class:"el-upload-list__item-preview"},e1={class:"el-upload-list__item-delete"},t1={key:0,class:"description"},o1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},setup(o){const{checkFile:n}=de(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),c=e.ref(),p=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const s=d=>{if(d.status==="ready"&&!n(d.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!0)){h(d);return}if(d.status==="success"&&d.response.code===0){he("error",d.response.message||"图片上传失败!"),h(d);return}l.autoUpload?a.value[t.componentID].push({name:d.name,url:d.response.data.url,id:d.response.data.id}):a.value[t.componentID].push({name:d.name,url:d.url,file:d.raw})},h=d=>{c.value.handleRemove(d);const y=a.value[t.componentID].findIndex(u=>u.url===d.url);y!==-1&&a.value[t.componentID].splice(y,1)},f=()=>{p.value.$el.children[0].click()},m=()=>{var y;let d=`最多只能上传${i.value.fileLimit}个图片`;(y=a.value[t.componentID])!=null&&y.length&&(d+=`,您已上传了${a.value[t.componentID].length}个图片,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个图片`),he("error",d)};return(d,y)=>{var V;const u=Q,_=e.resolveComponent("el-image"),g=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",Za,[e.createVNode(g,{ref_key:"uploadImageRef",ref:c,class:e.normalizeClass({"hidden-trigger":e.unref(i).fileLimit<=(((V=e.unref(a)[o.componentID])==null?void 0:V.length)||0)}),"list-type":"picture-card",action:e.unref(l).serverApi,headers:e.unref(l).headers,data:e.unref(l).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[o.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(l).autoUpload,"on-change":s,"on-exceed":m},{trigger:e.withCtx(()=>[e.createVNode(u,{name:"add",size:"30"})]),file:e.withCtx(({file:w})=>[e.createVNode(_,{ref_key:"imageRef",ref:p,style:{width:"100px",height:"100px"},src:w.url,"preview-src-list":[w.url],fit:"cover"},null,8,["src","preview-src-list"]),e.createElementVNode("span",Qa,[e.createElementVNode("span",va,[e.createVNode(u,{name:"previewImage",color:"#00ff00",onClick:f})]),e.createElementVNode("span",e1,[e.createVNode(u,{name:"delete",color:"#ff0000",onClick:b=>h(w)},null,8,["onClick"])])])]),_:1},8,["class","action","headers","data","multiple","limit","file-list","accept","auto-upload"]),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",t1,[e.createVNode(u,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Hs="",n1={component:class extends Se{constructor(){super("uploadImage","图片上传"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"图片上传",fontSize:12,isBold:!1,showFlag:!0,multiple:!1,fileLimit:1,fileSize:10,fileSizeUnit:"MB",fileType:".jpg,.jpeg,.png,.bmp"}}},renderer:o1,propEditor:Ka};function Xt(o){return typeof o=="function"?o():e.unref(o)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const l1=o=>typeof o<"u",cn=()=>{};function r1(o,n){function t(...l){return new Promise((r,a)=>{Promise.resolve(o(()=>n.apply(this,l),{fn:n,thisArg:this,args:l})).then(r).catch(a)})}return t}function a1(o,n={}){let t,l,r=cn;const a=c=>{clearTimeout(c),r(),r=cn};return c=>{const p=Xt(o),s=Xt(n.maxWait);return t&&a(t),p<=0||s!==void 0&&s<=0?(l&&(a(l),l=null),Promise.resolve(c())):new Promise((h,f)=>{r=n.rejectOnCancel?f:h,s&&!l&&(l=setTimeout(()=>{t&&a(t),l=null,h(c())},s)),t=setTimeout(()=>{l&&a(l),l=null,h(c())},p)})}}function dn(o,n=200,t={}){return r1(a1(n,t),o)}function i1(o,n){return e.computed(()=>Xt(o).map(t=>Xt(t)).filter(n))}function s1(o){return JSON.parse(JSON.stringify(o))}function c1(o,n,t,l={}){var r,a,i;const{clone:c=!1,passive:p=!1,eventName:s,deep:h=!1,defaultValue:f,shouldEmit:m}=l,d=e.getCurrentInstance(),y=t||(d==null?void 0:d.emit)||((r=d==null?void 0:d.$emit)==null?void 0:r.bind(d))||((i=(a=d==null?void 0:d.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(d==null?void 0:d.proxy));let u=s;n||(n="modelValue"),u=u||`update:${n.toString()}`;const _=w=>c?typeof c=="function"?c(w):s1(w):w,g=()=>l1(o[n])?_(o[n]):f,V=w=>{m?m(w)&&y(u,w):y(u,w)};if(p){const w=g(),b=e.ref(w);let C=!1;return e.watch(()=>o[n],x=>{C||(C=!0,b.value=_(x),e.nextTick(()=>C=!1))}),e.watch(b,x=>{!C&&(x!==o[n]||h)&&V(x)},{deep:h}),b}else return e.computed({get(){return g()},set(w){V(w)}})}const d1={class:"option-wrap"},p1={style:{float:"left"}},m1={style:{float:"right",color:"#8492a6"}},f1=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;const l=e.ref([]);e.watch(()=>t.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:t.options}});const r=()=>{t.type==="radio"?(t.defaultValue="",t.min=void 0,t.max=void 0,t.multiple=void 0):t.type==="checkbox"?(t.defaultValue=[],t.multiple=void 0):t.type==="selector"&&(t.defaultValue="",t.min=void 0,t.max=void 0)},a=()=>{t.options.push({label:"",value:""})},i=m=>{t.options.splice(m,1)},c=e.ref(!1);let p=e.ref(t.options);const s=dn(async m=>await n.selectComponent.searchEmployeeMethod(m),500),h=m=>{if(!m)return[];c.value=!0,s(m).then(d=>{p.value=d,c.value=!1})},f=(m,d)=>{const y=p.value.find(u=>u.value===m);t.options[d]={label:y==null?void 0:y.label,value:y==null?void 0:y.value},p.value=t.options};return(m,d)=>{const y=e.resolveComponent("el-radio-button"),u=e.resolveComponent("el-radio-group"),_=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-switch"),V=e.resolveComponent("el-input-number"),w=e.resolveComponent("el-divider"),b=Q,C=e.resolveComponent("el-option"),x=e.resolveComponent("el-select"),E=e.resolveComponent("el-button"),L=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(L,{"label-width":"80px","label-suffix":":",class:"employee-props-editor"},{default:e.withCtx(()=>[e.createVNode(_,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(t).type,"onUpdate:modelValue":d[0]||(d[0]=z=>e.unref(t).type=z),onChange:r},{default:e.withCtx(()=>[e.createVNode(y,{value:"radio"},{default:e.withCtx(()=>[e.createTextVNode("单选")]),_:1}),e.createVNode(y,{value:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode("多选")]),_:1}),e.createVNode(y,{value:"selector"},{default:e.withCtx(()=>[e.createTextVNode("下拉框")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(t).type!=="selector"?(e.openBlock(),e.createBlock(_,{key:0,label:"人员换行"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":d[1]||(d[1]=z=>e.unref(t).newLine=z)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(_,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":d[2]||(d[2]=z=>e.unref(t).multiple=z)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(_,{label:"最少选择"},{default:e.withCtx(()=>{var z;return[e.createVNode(V,{modelValue:e.unref(t).min,"onUpdate:modelValue":d[3]||(d[3]=D=>e.unref(t).min=D),step:1,min:0,max:((z=e.unref(l))==null?void 0:z.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(_,{label:"最多选择"},{default:e.withCtx(()=>{var z;return[e.createVNode(V,{modelValue:e.unref(t).max,"onUpdate:modelValue":d[4]||(d[4]=D=>e.unref(t).max=D),step:1,min:0,max:((z=e.unref(l))==null?void 0:z.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0),e.createVNode(w,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(_,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt),{class:"checkbox-options",handle:".cursor-move",list:e.unref(t).options,"item-key":"value",tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:z,index:D})=>[e.createElementVNode("div",d1,[e.unref(t).options.length>1?(e.openBlock(),e.createBlock(b,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(x,{class:"selector-component",modelValue:z.value,"onUpdate:modelValue":$=>z.value=$,filterable:"",placeholder:"检索人员",disabled:!e.unref(n).selectComponent.allowModify,remote:"","remote-method":h,loading:e.unref(c),"loading-text":"加载中……",onChange:$=>f($,D)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),($,F)=>(e.openBlock(),e.createBlock(C,{key:F,label:$.label,value:$.value},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"option",{index:F,label:$.label,suffix:$.suffix},()=>[e.createElementVNode("span",p1,e.toDisplayString($.label),1),e.createElementVNode("span",m1,e.toDisplayString($.suffix),1)])]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","loading","onChange"]),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(b,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:$=>i(D)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:3},8,["list"])]),_:3}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(_,{key:3,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(E,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(b,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:3})}}}),js="",h1={class:"employee-component"},u1={key:3,class:"description"},g1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas","update:componentProps"],setup(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,h=>h?r.value[t.componentID]=h:delete r.value[t.componentID]);const c=n;e.watch(r,h=>c("update:datas",h));const p=e.ref(!0);e.watch(a,h=>{p.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),p.value=!0}),c("update:componentProps",h)},{immediate:!0});const s=(h,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,h.preventDefault())};return(h,f)=>{const m=e.resolveComponent("el-radio"),d=e.resolveComponent("el-radio-group"),y=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),g=e.resolveComponent("el-select"),V=Q;return e.openBlock(),e.createElementBlock("div",h1,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(d,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=w=>e.isRef(i)?i.value=w:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(m,{key:b,value:w.value,onClick:C=>s(C,w.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(u,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[1]||(f[1]=w=>e.isRef(i)?i.value=w:null),disabled:o.disabled,min:e.unref(a).min,max:e.unref(a).max},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(y,{value:w.value,key:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["class","modelValue","disabled","min","max"])):e.createCommentVNode("",!0),e.unref(a).type==="selector"?(e.openBlock(),e.createBlock(g,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=w=>e.isRef(i)?i.value=w:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(_,{key:b,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",u1,[e.createVNode(V,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Gs="",_1={component:class extends Se{constructor(){super("employee","人员",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"人员",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!0,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,type:"checkbox",options:[],showRemark:!0,remarkLabel:"实习生"},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}async getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:g1,propEditor:f1};function ko(){return{getGradeItems(o){let n=[];if(!o.maxScore)return n;o.showVeto&&n.push({value:"-2",label:"单项否决"}),o.showNotGrade&&n.push({value:"-1",label:"不考评"}),o.showZero&&n.push({value:"0",label:"0分"});let t=Number(o.maxScore);for(let l=1;l<=t;l++)n.push({value:String(l),label:`${String(l)}分`});return o.scoreReverseFlag&&n.reverse(),n}}}const w1=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;const{getGradeItems:l}=ko(),r=e.ref([]);return e.watch(t,()=>{r.value=l(t),n.selectComponent.filterConditionProps||(n.selectComponent.filterConditionProps={}),n.selectComponent.filterConditionProps.options=r.value}),(a,i)=>{const c=e.resolveComponent("el-option"),p=e.resolveComponent("el-select"),s=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-switch"),m=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(m,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(s,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).defaultValue,"onUpdate:modelValue":i[0]||(i[0]=d=>e.unref(t).defaultValue=d),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(d,y)=>(e.openBlock(),e.createBlock(c,{key:y,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"最大分数"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).maxScore,"onUpdate:modelValue":i[1]||(i[1]=d=>e.unref(t).maxScore=d),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"显示0分"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showZero,"onUpdate:modelValue":i[2]||(i[2]=d=>e.unref(t).showZero=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"显示不考评"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showNotGrade,"onUpdate:modelValue":i[3]||(i[3]=d=>e.unref(t).showNotGrade=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"分数倒序"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).scoreReverseFlag,"onUpdate:modelValue":i[4]||(i[4]=d=>e.unref(t).scoreReverseFlag=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"分数换行"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":i[5]||(i[5]=d=>e.unref(t).newLine=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"显示问题"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showProblem,"onUpdate:modelValue":i[6]||(i[6]=d=>e.unref(t).showProblem=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"显示亮点"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showBrightSpot,"onUpdate:modelValue":i[7]||(i[7]=d=>e.unref(t).showBrightSpot=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"显示备注"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showRemark,"onUpdate:modelValue":i[8]||(i[8]=d=>e.unref(t).showRemark=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"单项否决"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showVeto,"onUpdate:modelValue":i[9]||(i[9]=d=>e.unref(t).showVeto=d)},null,8,["modelValue"])]),_:1})]),_:1})}}}),y1={class:"auto-complete"},C1={key:0},b1=e.defineComponent({__name:"autoComplete",props:{modelValue:{type:String,default:()=>{}},options:{type:Array,default:()=>[],required:!1},label:{type:String,default:()=>"备注:"},selectWhenUnmatched:{type:Boolean,default:()=>!0},matchMode:{type:String,default:"start"},width:{type:Number,default:500},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(o,{emit:n}){e.useCssVars(d=>({e00bfd70:e.unref(m)}));const t=e.ref(),l=o;let{options:r,width:a}=e.toRefs(l);const i=n,c=c1(l,"modelValue",i),p=()=>{i("change",c.value)},s=(d,y)=>{const u=d?i1(r,h(d)):r.value;y(e.unref(u))},h=d=>({start:u=>u.value.toLowerCase().indexOf(d.toLowerCase())===0,random:u=>u.value.indexOf(d)>=0})[l.matchMode],f=e.inject("convertPX"),m=e.computed(()=>`${f(a.value)}px`);return(d,y)=>{const u=e.resolveComponent("el-autocomplete");return e.openBlock(),e.createElementBlock("div",y1,[o.label?(e.openBlock(),e.createElementBlock("span",C1,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0),e.createVNode(u,{ref_key:"autoCompleteRef",ref:t,modelValue:e.unref(c),"onUpdate:modelValue":y[0]||(y[0]=_=>e.isRef(c)?c.value=_:null),"select-when-unmatched":o.selectWhenUnmatched,"fetch-suggestions":s,"value-key":"value",clearable:"",disabled:o.disabled,onBlur:p},{default:e.withCtx(({item:_})=>[e.createElementVNode("span",null,e.toDisplayString(_.value),1)]),_:1},8,["modelValue","select-when-unmatched","disabled"])])}}}),Ys="",V1={class:"grade-component"},k1={key:3,class:"description"},x1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(o,{emit:n}){const t=o,{getGradeItems:l}=ko();let r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),c=e.ref(a.value[t.componentID]||{});e.watch(c,f=>{a.value[t.componentID]=f,Object.keys(a.value[t.componentID]||{}).length&&(a.value[t.componentID].maxScore=i.value.maxScore)},{deep:!0});const p=e.computed(()=>l(i.value)),s=n;e.watch(a,f=>s("update:datas",f)),e.watch(i,()=>{t.isDesigner&&(c.value=i.value.defaultValue?{score:i.value.defaultValue}:{})},{immediate:!0,deep:!0});const h=(f,m)=>{i.value.clearable&&c.value.score===m&&(delete c.value.score,f.preventDefault())};return(f,m)=>{const d=e.resolveComponent("el-radio"),y=e.resolveComponent("el-radio-group"),u=b1,_=Q;return e.openBlock(),e.createElementBlock("div",V1,[e.createVNode(y,{class:e.normalizeClass(["grade-items",{"new-line":e.unref(i).newLine}]),modelValue:e.unref(c).score,"onUpdate:modelValue":m[0]||(m[0]=g=>e.unref(c).score=g),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(g,V)=>(e.openBlock(),e.createBlock(d,{key:V,value:g.value,onClick:w=>h(w,g.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"]),e.unref(i).showProblem?(e.openBlock(),e.createBlock(u,{key:0,class:"problem",modelValue:e.unref(c).problem,"onUpdate:modelValue":m[1]||(m[1]=g=>e.unref(c).problem=g),label:"问题:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showBrightSpot?(e.openBlock(),e.createBlock(u,{key:1,class:"bright-spot",modelValue:e.unref(c).brightSpot,"onUpdate:modelValue":m[2]||(m[2]=g=>e.unref(c).brightSpot=g),label:"亮点:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showRemark?(e.openBlock(),e.createBlock(u,{key:2,class:"bright-spot",modelValue:e.unref(c).remark,"onUpdate:modelValue":m[3]||(m[3]=g=>e.unref(c).remark=g),label:"备注:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",k1,[e.createVNode(_,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Xs="",{isEmpty:E1}=de(),{getGradeItems:N1}=ko(),B1={component:class extends Se{constructor(){super("grade","考评分数",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"考评分数",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,maxScore:5,showZero:!0,showNotGrade:!0,showProblem:!0,showBrightSpot:!0,scoreReverseFlag:!0,showVeto:!1},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage,validator:(t,l,r)=>{if(!l||E1(l)){r(n.requiredMessage);return}r()}}]}getFilterConditionProps(n){return{type:"selector",options:n&&N1(n)}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:x1,propEditor:w1},D1=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;e.watch(()=>t.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:t.options}});const l=()=>{t.type==="radio"?(t.defaultValue="",t.min=void 0,t.max=void 0,t.multiple=void 0):t.type==="checkbox"?(t.defaultValue=[],t.multiple=void 0):t.type==="selector"&&(t.defaultValue="",t.min=void 0,t.max=void 0)};return(r,a)=>{const i=e.resolveComponent("el-radio-button"),c=e.resolveComponent("el-radio-group"),p=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-switch"),h=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(f,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(p,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).type,"onUpdate:modelValue":a[0]||(a[0]=m=>e.unref(t).type=m),onChange:l},{default:e.withCtx(()=>[e.createVNode(i,{value:"radio"},{default:e.withCtx(()=>[e.createTextVNode("单选")]),_:1}),e.createVNode(i,{value:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode("多选")]),_:1}),e.createVNode(i,{value:"selector"},{default:e.withCtx(()=>[e.createTextVNode("下拉框")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(t).type!=="selector"?(e.openBlock(),e.createBlock(p,{key:0,label:"岗位换行"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":a[1]||(a[1]=m=>e.unref(t).newLine=m)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(p,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[2]||(a[2]=m=>e.unref(t).multiple=m)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(p,{label:"最少选择"},{default:e.withCtx(()=>{var m;return[e.createVNode(h,{modelValue:e.unref(t).min,"onUpdate:modelValue":a[3]||(a[3]=d=>e.unref(t).min=d),step:1,min:0,max:((m=e.unref(t).options)==null?void 0:m.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(p,{label:"最多选择"},{default:e.withCtx(()=>{var m;return[e.createVNode(h,{modelValue:e.unref(t).max,"onUpdate:modelValue":a[4]||(a[4]=d=>e.unref(t).max=d),step:1,min:0,max:((m=e.unref(t).options)==null?void 0:m.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),S1={class:"post-component"},M1={key:3,class:"description"},z1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas","update:componentProps"],setup(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,h=>h?r.value[t.componentID]=h:delete r.value[t.componentID]);const c=n;e.watch(r,h=>c("update:datas",h));const p=e.ref(!0);e.watch(a,h=>{p.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),p.value=!0}),c("update:componentProps",h)},{immediate:!0});const s=(h,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,h.preventDefault())};return(h,f)=>{const m=e.resolveComponent("el-radio"),d=e.resolveComponent("el-radio-group"),y=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),g=e.resolveComponent("el-select"),V=Q;return e.openBlock(),e.createElementBlock("div",S1,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(d,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=w=>e.isRef(i)?i.value=w:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(m,{key:b,value:w.value,onClick:C=>s(C,w.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(u,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[1]||(f[1]=w=>e.isRef(i)?i.value=w:null),disabled:o.disabled,min:e.unref(a).min,max:e.unref(a).max},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(y,{value:w.value,key:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["class","modelValue","disabled","min","max"])):e.createCommentVNode("",!0),e.unref(a).type==="selector"?(e.openBlock(),e.createBlock(g,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=w=>e.isRef(i)?i.value=w:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(_,{key:b,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",M1,[e.createVNode(V,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ks="",$1={component:class extends Se{constructor(){super("post","岗位",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"岗位",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!0,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,type:"checkbox",options:[]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}async getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:z1,propEditor:D1},T1={class:"option-wrap"},I1=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}},allowCreateDictionary:{type:Boolean,default:!0}},setup(o){let n=e.inject("formDesignerData"),t=e.inject("defaultSourceType"),l=n.selectComponent.props;e.watch(l.options,()=>{n.selectComponent.filterConditionProps.options=l.options});const{getTempID:r}=de(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=p=>{l.options.splice(p,1)},c=(p,s)=>{s.value=p.value,s.itemSourceType=p.itemSourceType};return(p,s)=>{const h=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),m=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-switch"),y=e.resolveComponent("el-input-number"),u=e.resolveComponent("el-divider"),_=Q,g=e.resolveComponent("el-checkbox"),V=e.resolveComponent("el-tooltip"),w=e.resolveComponent("el-button"),b=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(b,{"label-width":"80px","label-suffix":":",class:"checkbox-props-editor"},{default:e.withCtx(()=>[e.createVNode(m,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":s[0]||(s[0]=C=>e.unref(l).defaultValue=C),multiple:"",clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(C,x)=>(e.openBlock(),e.createBlock(h,{key:x,label:C.label,value:C.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(m,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":s[1]||(s[1]=C=>e.unref(l).newLine=C)},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"最少选择"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).min,"onUpdate:modelValue":s[2]||(s[2]=C=>e.unref(l).min=C),step:1,min:0,max:e.unref(l).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(m,{label:"最多选择"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).max,"onUpdate:modelValue":s[3]||(s[3]=C=>e.unref(l).max=C),step:1,min:1,max:e.unref(l).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(u,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(m,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt),{class:"checkbox-options",handle:".cursor-move",list:e.unref(l).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:C,index:x})=>[e.createElementVNode("div",T1,[e.unref(l).options.length>1?(e.openBlock(),e.createBlock(_,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(Yt,{modelValue:C.label,"onUpdate:modelValue":E=>C.label=E,dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:E=>c(E,C)},null,8,["modelValue","onUpdate:modelValue","dictionary","allowCreateDictionary","disabled","onChange"]),e.createVNode(V,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(g,{class:"input-enable",modelValue:C.inputEnable,"onUpdate:modelValue":E=>C.inputEnable=E},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(_,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:E=>i(x)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(m,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(w,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(_,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),Qs="",L1={class:"checkbox-component"},A1={key:0,class:"description"},O1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,s=>r.value[t.componentID]=s);const c=n;e.watch(r,s=>c("update:datas",s)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const p=s=>{a.value.options.forEach(h=>{const f=`${t.componentID}||${h.value}`;!s.includes(h.value)&&r.value[f]&&delete r.value[f]})};return(s,h)=>{const f=e.resolveComponent("el-checkbox"),m=e.resolveComponent("el-input"),d=e.resolveComponent("el-checkbox-group"),y=Q;return e.openBlock(),e.createElementBlock("div",L1,[e.createVNode(d,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":h[0]||(h[0]=u=>e.isRef(i)?i.value=u:null),disabled:o.disabled,min:e.unref(a).min,max:e.unref(a).max,onChange:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(u,_)=>{var g;return e.openBlock(),e.createElementBlock("div",{class:"checkbox-wrap",key:_},[e.createVNode(f,{value:u.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.label),1)]),_:2},1032,["value"]),u.inputEnable&&(o.isDesigner||(g=e.unref(i))!=null&&g.includes(u.value))?(e.openBlock(),e.createBlock(m,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${u.value}`],"onUpdate:modelValue":V=>e.unref(r)[`${o.componentID}||${u.value}`]=V},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled","min","max"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",A1,[e.createVNode(y,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),vs="",{getTempID:pn}=de(),P1={component:class extends Se{constructor(){super("checkbox","多选框",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"多选框",fontSize:12,isBold:!1,color:"#000000",defaultValue:[],required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!1,newLine:!1,labelNewLine:!1,options:[{value:pn(),label:"选项1"},{value:pn(),label:"选项2"}]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["RANGE"]}},renderer:O1,propEditor:I1},F1=e.defineComponent({__name:"propsEditor",setup(o){const{computedExpression:n}=de();let t=e.inject("formDesignerData"),l=t.selectComponent.props,r=t.selectComponent.rules;const a=p=>{p&&(r[1].pattern=n(p))},i=p=>{r[1].message=p},c=p=>{p==="text"&&(l.showPassword=!1)};return(p,s)=>{const h=e.resolveComponent("el-input"),f=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),y=e.resolveComponent("el-switch"),u=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(u,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(f,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":s[0]||(s[0]=_=>e.unref(l).defaultValue=_),placeholder:"请输入默认值"},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"类型"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(l).type,"onUpdate:modelValue":s[1]||(s[1]=_=>e.unref(l).type=_),onChange:c},{default:e.withCtx(()=>[e.createVNode(m,{value:"text"},{default:e.withCtx(()=>[e.createTextVNode("文本")]),_:1}),e.createVNode(m,{value:"password"},{default:e.withCtx(()=>[e.createTextVNode("密码")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(l).type=="password"?(e.openBlock(),e.createBlock(f,{key:0,label:"显示密码"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).showPassword,"onUpdate:modelValue":s[2]||(s[2]=_=>e.unref(l).showPassword=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(f,{label:"正则验证"},{default:e.withCtx(()=>[e.createVNode(h,{onChange:a,modelValue:e.unref(l).pattern,"onUpdate:modelValue":s[3]||(s[3]=_=>e.unref(l).pattern=_)},null,8,["modelValue"])]),_:1}),e.unref(l).pattern?(e.openBlock(),e.createBlock(f,{key:1,label:"正则提示"},{default:e.withCtx(()=>[e.createVNode(h,{onChange:i,modelValue:e.unref(l).patternMessage,"onUpdate:modelValue":s[4]||(s[4]=_=>e.unref(l).patternMessage=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),R1={class:"input-component"},U1={key:0,class:"description"},H1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,p=>r.value[t.componentID]=p);const c=n;return e.watch(r,p=>c("update:datas",p)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0}),(p,s)=>{const h=e.resolveComponent("el-input"),f=Q;return e.openBlock(),e.createElementBlock("div",R1,[e.createVNode(h,{type:e.unref(a).type,"show-password":e.unref(a).showPassword,modelValue:e.unref(i),"onUpdate:modelValue":s[0]||(s[0]=m=>e.isRef(i)?i.value=m:null),placeholder:e.unref(a).placeholder,clearable:e.unref(a).clearable,disabled:o.disabled,readonly:o.readonly},null,8,["type","show-password","modelValue","placeholder","clearable","disabled","readonly"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",U1,[e.createVNode(f,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),t2="",q1={component:class extends Se{constructor(){super("input","文本框",!0,!0),this.props={type:"text",label:"文本框",width:12,showLabel:!0,fontSize:12,isBold:!1,color:"#000000",showFlag:!0,statisticsFlag:!1,labelNewLine:!1,labelWidth:void 0,defaultValue:"",placeholder:"",required:!1,requiredMessage:"必填项",pattern:"",patternMessage:"格式不正确",disabled:!1,clearable:!1,readonly:!1,showPassword:!1},this.rules=this.getRules(this.props),this.filterConditionProps={type:"input"},this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage},{pattern:n.pattern,message:n.patternMessage}]}getFilterConditionProps(n){return{type:"input"}}getExcludeFilterConditions(){return["RANGE"]}},renderer:H1,propEditor:F1},j1={component:class extends Se{constructor(){super("label","标签"),this.props={width:12,showLabel:!1,label:"标签",showFlag:!0,labelNewLine:!1,isBold:!0,fontSize:14,color:"#000000"}}},renderer:e.defineComponent({__name:"renderer",props:{componentProps:{type:Object,required:!0}},setup(o){return(n,t)=>(e.openBlock(),e.createElementBlock("label",{class:"label-content",style:e.normalizeStyle({color:o.componentProps.color,"font-size":o.componentProps.fontSize+"px","font-weight":o.componentProps.isBold?"bold":"normal"})},e.toDisplayString(o.componentProps.label),5))}}),undefined:void 0},G1={class:"option-wrap"},W1=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}},allowCreateDictionary:{type:Boolean,default:!0}},setup(o){let n=e.inject("formDesignerData"),t=e.inject("defaultSourceType"),l=n.selectComponent.props;e.watch(l.options,()=>{n.selectComponent.filterConditionProps.options=l.options});const{getTempID:r}=de(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=p=>{l.options.splice(p,1)},c=(p,s)=>{s.value=p.value,s.itemSourceType=p.itemSourceType};return(p,s)=>{const h=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),m=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-switch"),y=e.resolveComponent("el-divider"),u=Q,_=e.resolveComponent("el-checkbox"),g=e.resolveComponent("el-tooltip"),V=e.resolveComponent("el-button"),w=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(w,{"label-width":"80px","label-suffix":":",class:"radio-props-editor"},{default:e.withCtx(()=>[e.createVNode(m,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":s[0]||(s[0]=b=>e.unref(l).defaultValue=b),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(b,C)=>(e.openBlock(),e.createBlock(h,{key:C,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(m,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":s[1]||(s[1]=b=>e.unref(l).newLine=b)},null,8,["modelValue"])]),_:1}),e.createVNode(y,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(m,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt),{class:"radio-options",handle:".cursor-move",list:e.unref(l).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:b,index:C})=>[e.createElementVNode("div",G1,[e.unref(l).options.length>1?(e.openBlock(),e.createBlock(u,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(Yt,{modelValue:b.label,"onUpdate:modelValue":x=>b.label=x,dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:x=>c(x,b)},null,8,["modelValue","onUpdate:modelValue","dictionary","allowCreateDictionary","disabled","onChange"]),e.createVNode(g,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(_,{class:"input-enable",modelValue:b.inputEnable,"onUpdate:modelValue":x=>b.inputEnable=x},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(u,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:x=>i(C)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(m,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(V,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(u,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),r2="",Y1={class:"radio-component"},X1={key:0,class:"description"},J1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,h=>r.value[t.componentID]=h);const c=n;e.watch(r,h=>c("update:datas",h)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const p=h=>{a.value.options.forEach(f=>{const m=`${t.componentID}||${f.value}`;h!==f.value&&r.value[m]&&delete r.value[m]})},s=(h,f)=>{if(a.value.clearable&&i.value===f){i.value=void 0;const m=`${t.componentID}||${f}`;r.value[m]&&delete r.value[m],h.preventDefault()}};return(h,f)=>{const m=e.resolveComponent("el-radio"),d=e.resolveComponent("el-input"),y=e.resolveComponent("el-radio-group"),u=Q;return e.openBlock(),e.createElementBlock("div",Y1,[e.createVNode(y,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=_=>e.isRef(i)?i.value=_:null),disabled:o.disabled,onChange:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(_,g)=>{var V;return e.openBlock(),e.createElementBlock("div",{class:"radio-wrap",key:g},[e.createVNode(m,{value:_.value,onClick:w=>s(w,_.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["value","onClick"]),_.inputEnable&&(o.isDesigner||(V=e.unref(i))!=null&&V.includes(_.value))?(e.openBlock(),e.createBlock(d,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${_.value}`],"onUpdate:modelValue":w=>e.unref(r)[`${o.componentID}||${_.value}`]=w},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",X1,[e.createVNode(u,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),a2="",{getTempID:mn}=de();class K1 extends Se{constructor(){super("radio","单选框",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"单选框",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!1,newLine:!1,labelNewLine:!1,options:[{value:mn(),label:"选项1"},{value:mn(),label:"选项2"}]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["RANGE"]}}const Z1={component:K1,renderer:J1,propEditor:W1},Q1={key:0,class:"component-readonly-mask"},xo=e.defineComponent({__name:"componentRenderer",props:{components:{type:Array,required:!0},showDescription:{type:Boolean,default:!1},selectMode:{type:Boolean,default:!1}},emits:["select"],setup(o,{emit:n}){const t={...Nt,...St,...Bt,...Dt},{computedExpression:l}=de();let r=e.inject("formData");const a=o,{components:i,showDescription:c,selectMode:p}=e.toRefs(a),s={show:d=>{if(d.showFlag===void 0)return String(!0);let y="";return d.showFlag?y=d.hiddenConditionExpression?`!(${d.hiddenConditionExpression})`:String(d.showFlag):y=d.showConditionExpression||String(d.showFlag),y},disabled:d=>d.disabledConditionExpression||String(d.disabled===void 0?!1:d.disabled),readonly:d=>d.readonlyConditionExpression||String(d.readonly===void 0?!1:d.readonly)},h=(d,y)=>{var g;let u=s[y](d.props);if(!u)return;["true","false"].includes(u)||u.match(/{(.*?)}/g).forEach(w=>{var E;const b=w.replace(/\{|}/g,"");let C=r.value.datas[b];const x=i.value.find(L=>L.id===b);(x==null?void 0:x.type)==="grade"&&(C=(E=r.value.datas[b])==null?void 0:E.score),u=u.replace(w,C||"")});const _=l(u);if(y==="show"&&!_){let V=[];d.isLayout&&((g=d.children)!=null&&g.length)?V=d.children:V=[d],V.forEach(w=>{r.value.datas[w.id]&&(w.type==="grade"?delete r.value.datas[w.id].score:delete r.value.datas[w.id])})}return _},f=n,m=d=>{f("select",d)};return(d,y)=>{const u=e.resolveComponent("el-checkbox"),_=e.resolveComponent("el-form-item");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(g,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V},[e.unref(p)||h(g,"show")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-item-wrap",{"select-mode":e.unref(p)},{"is-hidden":!g.props.showFlag},{selected:g.selected}]),style:e.normalizeStyle({width:`${g.props.width*100/e.unref(r).props.column}%`,height:`${g.isLayout&&g.props.height?g.props.height+g.props.heightUnit:"auto"}`,"padding-left":`${g.props.paddingLeft}px`})},[h(g,"readonly")?(e.openBlock(),e.createElementBlock("div",Q1)):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock(u,{key:1,class:"select-item",modelValue:g.selected,"onUpdate:modelValue":w=>g.selected=w,label:"选择",onChange:w=>m(g)},null,8,["modelValue","onUpdate:modelValue","onChange"])):e.createCommentVNode("",!0),g.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[g.type].renderer),{key:2,componentID:g.id,showDescription:e.unref(c),component:e.unref(i)[V],"onUpdate:component":w=>e.unref(i)[V]=w},null,40,["componentID","showDescription","component","onUpdate:component"])):(e.openBlock(),e.createBlock(_,{key:3,class:e.normalizeClass(["form-item",{"label-new-line":g.props.labelNewLine}]),prop:g.id,"label-width":g.props.showLabel?g.props.labelWidth:"0",rules:g.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:g.props.color||"#000000","font-size":g.props.fontSize+"px","font-weight":g.props.isBold?"bold":"normal"})},e.toDisplayString(g.props.showLabel?g.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[g.type].renderer),{componentID:g.id,disabled:h(g,"disabled"),showDescription:e.unref(c),componentProps:g.props,"onUpdate:componentProps":w=>g.props=w,datas:e.unref(r).datas,"onUpdate:datas":y[0]||(y[0]=w=>e.unref(r).datas=w)},null,40,["componentID","disabled","showDescription","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["class","prop","label-width","rules"]))],6)):e.createCommentVNode("",!0)],64))),128)}}}),i2="",v1={key:0,class:"select-title"},ei=e.createElementVNode("h1",{class:"title"},"请选择项目",-1),ti={key:0,class:"title"},oi={key:0,class:"readonly-mask"},ni={key:2,class:"mobile-key"},li={name:"zhy-form-renderer"},Ye=e.defineComponent({...li,props:{formData:{type:Object,default:()=>({components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formType:"1"},datas:{}}),required:!0},uploadOptions:{type:Object,default:()=>({serverApi:"",autoUpload:!1})},device:{type:String,default:"pc"},watching:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},selectMode:{type:Boolean,default:!1},selectComponents:{type:Array,default:()=>[]},hiddenTitle:{type:Boolean,default:!1}},emits:["change","select"],setup(o,{expose:n,emit:t}){const{removeEmptyAttribute:l}=de(),r={...Nt,...St,...Bt,...Dt},a=e.ref(),i=e.ref(!1),c=e.ref(!1),p=e.ref(!1),s=o,h=t,{formData:f,selectMode:m}=e.toRefs(s),d=e.ref(s.selectComponents);e.provide("uploadOptions",s.uploadOptions),e.provide("formData",f);const y=b=>{var C,x,E,L;if((C=d.value)!=null&&C.length||(d.value=[]),!b){d.value=[],f.value.components.forEach(z=>{z.selected=c.value,c.value&&d.value.push(z)}),p.value=!1,h("select",d.value);return}if(b.selected)(x=d.value)==null||x.push(b);else{const z=(E=d.value)==null?void 0:E.findIndex(D=>D.id===b.id);z!==-1&&((L=d.value)==null||L.splice(z,1))}h("select",d.value),u()},u=()=>{var b,C;if(!((b=d.value)!=null&&b.length)){p.value=!1,c.value=!1;return}if(((C=d.value)==null?void 0:C.length)<f.value.components.length){p.value=!0;return}c.value=!0,p.value=!1},_=b=>{b!=null&&b.length&&(b.forEach(C=>{var E,L;let x=new r[C.type].component;x.isEdit&&(C.props.required||C.props.pattern)&&(C.rules=x.getRules(C.props)),s.selectMode&&((E=d.value)!=null&&E.length)&&d.value.findIndex(D=>D.id===C.id)!==-1&&(C.selected=!0),C.isLayout&&((L=C==null?void 0:C.children)!=null&&L.length)&&_(C.children)}),s.selectMode&&u())};e.watch(f,()=>_(f.value.components),{immediate:!0});const g=()=>{let b=l(f.value.datas),C=[],x=[];const E=Object.keys(b);for(let L of E){if(L.includes("||")){let z=L.split("||"),D=z[0],$=z[1],F=C.findIndex(S=>S.id===$&&S.groupID===D);if(F!==-1)C[F].value=b[L];else{const S={parentID:D,id:$,value:b[L]};C.push(S)}continue}V(f.value.components,C,x,L,b)}return{data:C,fileList:x}},V=(b,C,x,E,L)=>{var $;let z,D;for(let F=0;F<b.length;F++){const S=b[F];if(S.id===E){z=S,w(C,x,E,L,z);break}if(S.isLayout&&(($=S==null?void 0:S.children)!=null&&$.length)){if(z=S.children.find(R=>R.id===E),z){D=S.id,w(C,x,E,L,z,D);break}V(S.children,C,x,E,L)}}},w=(b,C,x,E,L,z)=>{var $,F;let D=-1;switch(L.type){case"radio":D=b.findIndex(S=>S.id===E[x]),D===-1&&b.push({groupID:z,parentID:x,id:E[x],value:""});break;case"checkbox":E[x].forEach(S=>{D=b.findIndex(R=>R.id===R),D===-1&&b.push({groupID:z,parentID:x,id:S,value:""})});break;case"upload":case"uploadImage":if(!(($=s.uploadOptions)!=null&&$.autoUpload)&&((F=E[x])!=null&&F.length)){const S=E[x].map(j=>(j.file&&(j.file.id=x),j.file)),R=E[x].map(j=>{if(j.fileID)return j.fileID}).filter(j=>j!==void 0);C.push({id:x,groupID:z,fileIDs:R,files:S})}break;default:b.push({groupID:z,parentID:x,id:x,value:E[x]});break}};return s.watching&&e.watch(()=>f.value.datas,()=>{const b=g();h("change",b.data,b.fileList)},{immediate:!0,deep:!0}),n({getDatas:g,async validate(b=()=>{}){return await a.value.validate(b)},resetFields(){a.value.resetFields()},clearValidate(b){a.value.clearValidate(b)},scrollToField(b){a.value.scrollToField(b)},toggleDescription(){i.value=!i.value}}),(b,C)=>{const x=e.resolveComponent("el-checkbox"),E=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-renderer",o.device,{"examination-paper":e.unref(f).props.formType==="2"},{"select-mode":e.unref(m)}])},[e.unref(m)?(e.openBlock(),e.createElementBlock("div",v1,[ei,e.createVNode(x,{class:"select-all",modelValue:e.unref(c),"onUpdate:modelValue":C[0]||(C[0]=L=>e.isRef(c)?c.value=L:null),label:"全选",indeterminate:e.unref(p),onChange:C[1]||(C[1]=L=>y())},null,8,["modelValue","indeterminate"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!o.hiddenTitle&&e.unref(f).props.formName?(e.openBlock(),e.createElementBlock("h1",ti,e.toDisplayString(e.unref(f).props.formName),1)):e.createCommentVNode("",!0)],64)),e.createVNode(E,{ref_key:"formRenderer",ref:a,class:"renderer-form",model:e.unref(f).datas,"label-position":e.unref(f).props.labelPosition,"label-width":e.unref(f).props.labelWidth,size:e.unref(f).props.size,"scroll-to-error":"",disabled:o.disabled},{default:e.withCtx(()=>[e.unref(m)?(e.openBlock(),e.createElementBlock("div",oi)):e.createCommentVNode("",!0),e.createVNode(xo,{components:e.unref(f).components,showDescription:e.unref(i),selectMode:e.unref(m),onSelect:y},null,8,["components","showDescription","selectMode"])]),_:1},8,["model","label-position","label-width","size","disabled"]),o.device==="mobile"?(e.openBlock(),e.createElementBlock("div",ni)):e.createCommentVNode("",!0)],2)}}}),s2="",ri={class:"form-list-wrap"},ai={class:"form-list"},ii=["onClick"],si=["title"],ci={class:"form-template"},di={class:"dialog-footer"},pi={class:"left-wrap"},mi={class:"select-count-wrap"},fi={class:"count"},hi={class:"right-wrap"},ui=e.defineComponent({__name:"batchAddDialog",props:e.mergeModels({params:{type:Object,default:()=>{}}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["select"],["update:modelValue"]),setup(o,{emit:n}){const{clone:t}=de(),l=e.inject("formData"),r=l.value.props.formType==="2"?"试卷":"表单",a=l.value.props.formType==="2"?"题目":"项目",i=e.useModel(o,"modelValue"),c=o,{params:p}=e.toRefs(c),s=e.ref({}),h=e.ref(""),f=e.ref({datas:{},components:[],props:{}});e.onMounted(()=>{var D;(D=p.value.searchParams)!=null&&D.length&&(p.value.searchParams.forEach($=>{$.default&&(s.value[$.key]=$.default)}),y())});const m=(D,$,F)=>{let S=F==="datetime"?"YYYY-MM-DD HH:mm":F==="date"?"YYYY-MM-DD":"HH:mm";return $e.dayjs(D).format(S)===$e.dayjs($).format(S)},d=e.ref(p.value.formList),y=D=>{D&&u(D),d.value=t(p.value.formList);const $=Object.keys(s.value);$!=null&&$.length&&$.forEach(F=>{var j;if(!s.value[F])return;const S=(j=p.value.searchParams)==null?void 0:j.find(W=>W.key===F);if(!(S!=null&&S.type))return;const R=S.type;d.value=d.value.filter(W=>{if(!Object.keys(W).includes(S.key))return he("error",`参数配置错误,【${S.label}】的属性(${S.key})在数据中不存在!`),!1;const le=W[S.key];if(!le)return!0;if([ae.DATETIME,ae.DATE,ae.TIME].includes(R))return m(le,s.value[F],R);if(R===ae.SELECTOR)return String(le)===String(s.value[F]);if(R===ae.CASCADER_SELECTOR){const se=s.value[F],Xe=Array.isArray(se)?se[se.length-1]:se;return String(le)===String(Xe)}else if(R===ae.INPUT)return String(le).includes(String(s.value[F]));return String(le).includes(String(s.value[F]))})})},u=async D=>{var $,F;if(($=D.clearKeys)!=null&&$.length&&D.clearKeys.forEach(S=>delete s.value[S]),D.updateOptionKey){const S=(F=p.value.searchParams)==null?void 0:F.find(R=>R.key===D.updateOptionKey);S&&[ae.SELECTOR,ae.CASCADER_SELECTOR].includes(S.type)&&S.getOptions&&(S.options=await S.getOptions(s.value[D.key]))}},_=async D=>{h.value!==D&&(h.value=D,f.value={datas:{},components:[],props:{}},p.value.getFormTemplate&&(f.value=await p.value.getFormTemplate(D)))},g=e.ref(new Map),V=e.computed(()=>{let D=0;for(const[,$]of g.value)D+=$.length;return D}),w=D=>{g.value.has(h.value)?D.length?g.value.set(h.value,D):g.value.delete(h.value):g.value.set(h.value,D)},b=()=>{let D=[];for(const[,$]of g.value)$.forEach(F=>{let S=t(F);delete S.selected,D.push(S)});return D},C=e.ref(!1),x=e.ref({datas:{},components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:l.value.props.formType}}),E=()=>{x.value.components=b(),C.value=!0},L=n,z=()=>{const D=b();L("select",D),i.value=!1};return(D,$)=>{const F=Q,S=e.resolveComponent("el-input"),R=e.resolveComponent("el-option"),j=e.resolveComponent("el-select"),W=e.resolveComponent("el-cascader"),le=e.resolveComponent("el-date-picker"),se=e.resolveComponent("el-time-picker"),Xe=e.resolveComponent("el-form-item"),xt=e.resolveComponent("el-form"),rt=e.resolveComponent("el-divider"),Le=e.resolveComponent("el-empty"),Re=Ye,Eo=e.resolveComponent("el-link"),Ae=e.resolveComponent("el-button"),Je=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Je,{modelValue:i.value,"onUpdate:modelValue":$[1]||($[1]=ye=>i.value=ye),class:"batch-add-dialog","destroy-on-close":"",title:`批量添加${e.unref(a)}`},{footer:e.withCtx(()=>[e.createElementVNode("div",di,[e.createElementVNode("div",pi,[e.createElementVNode("span",mi,[e.createTextVNode(" 已选 "),e.createElementVNode("span",fi,e.toDisplayString(` ${e.unref(V)} `),1),e.createElementVNode("span",null,e.toDisplayString(` 个${e.unref(a)}`),1)]),e.createVNode(Eo,{type:"primary",disabled:e.unref(g).size===0,onClick:E},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`查看已选${e.unref(a)}`),1)]),_:1},8,["disabled"])]),e.createElementVNode("div",hi,[e.createVNode(Ae,{onClick:$[0]||($[0]=ye=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1}),e.createVNode(Ae,{type:"primary",onClick:z},{default:e.withCtx(()=>[e.createTextVNode(" 确定 ")]),_:1})])])]),default:e.withCtx(()=>{var ye,Ke,Kt;return[e.createElementVNode("div",ri,[(ye=e.unref(p).searchParams)!=null&&ye.length?(e.openBlock(),e.createBlock(xt,{key:0,model:e.unref(s),class:"search-param-form","label-suffix":":"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p).searchParams,(H,Et)=>(e.openBlock(),e.createBlock(Xe,{key:Et,label:H.label},{default:e.withCtx(()=>[H.type===e.unref(ae).INPUT?(e.openBlock(),e.createBlock(S,{key:0,class:"form-name-input",modelValue:e.unref(s)[H.key],"onUpdate:modelValue":ce=>e.unref(s)[H.key]=ce,placeholder:`搜索${H.label}`,clearable:"",onChange:ce=>y(H)},{append:e.withCtx(()=>[e.createVNode(F,{name:"search",color:"#08c979"})]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0),H.type===e.unref(ae).SELECTOR?(e.openBlock(),e.createBlock(j,{key:1,modelValue:e.unref(s)[H.key],"onUpdate:modelValue":ce=>e.unref(s)[H.key]=ce,placeholder:`请选择${H.label}`,clearable:"",onChange:ce=>y(H)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.options,(ce,Zt)=>(e.openBlock(),e.createBlock(R,{key:Zt,label:ce.label,value:ce.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0),H.type===e.unref(ae).CASCADER_SELECTOR?(e.openBlock(),e.createBlock(W,{key:2,ref_for:!0,ref:"cascaderRef",class:"cascader-component",modelValue:e.unref(s)[H.key],"onUpdate:modelValue":ce=>e.unref(s)[H.key]=ce,placeholder:`请选择${H.label}`,options:H.options,"show-all-levels":!1,props:{expandTrigger:"click",emitPath:!1},clearable:"",onChange:ce=>y(H)},null,8,["modelValue","onUpdate:modelValue","placeholder","options","onChange"])):e.createCommentVNode("",!0),[e.unref(ae).DATETIME,e.unref(ae).DATE,e.unref(ae)].includes(H.type)?(e.openBlock(),e.createBlock(le,{key:3,modelValue:e.unref(s)[H.key],"onUpdate:modelValue":ce=>e.unref(s)[H.key]=ce,type:H.type,placeholder:`请选择${H.label}`,"value-format":"YYYY-MM-DD HH:mm",clearable:"",onChange:ce=>y(H)},null,8,["modelValue","onUpdate:modelValue","type","placeholder","onChange"])):e.createCommentVNode("",!0),H.type===e.unref(ae).TIME?(e.openBlock(),e.createBlock(se,{key:4,modelValue:e.unref(s)[H.key],"onUpdate:modelValue":ce=>e.unref(s)[H.key]=ce,placeholder:`请选择${H.label}`,"value-format":"HH:mm",clearable:"",onChange:ce=>y(H)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0)]),_:2},1032,["label"]))),128))]),_:1},8,["model"])):e.createCommentVNode("",!0),e.createVNode(rt),e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(H,Et)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-item",{selected:e.unref(h)===H.formID}]),key:Et,onClick:ce=>_(H.formID)},[e.createVNode(F,{name:e.unref(l).props.formType==="1"?"form":"examination",color:e.unref(g).has(H.formID)?"#ff7400":"#108bf7"},null,8,["name","color"]),e.createElementVNode("div",{class:"form-item-name",title:H.formName},e.toDisplayString(H.formName),9,si)],10,ii))),128))])]),e.createElementVNode("div",ci,[e.unref(h)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Le,{key:0,description:`请先选择左侧${e.unref(r)}`},null,8,["description"])),(Kt=(Ke=e.unref(f))==null?void 0:Ke.components)!=null&&Kt.length?(e.openBlock(),e.createBlock(Re,{key:1,formData:e.unref(f),selectMode:"",selectComponents:e.unref(g).get(e.unref(h)),onSelect:w},null,8,["formData","selectComponents"])):e.createCommentVNode("",!0)])]}),_:1},8,["modelValue","title"]),e.createVNode(Je,{modelValue:e.unref(C),"onUpdate:modelValue":$[3]||($[3]=ye=>e.isRef(C)?C.value=ye:null),class:"select-preview-dialog","destroy-on-close":"",title:`已选${e.unref(a)}预览`},{footer:e.withCtx(()=>[e.createVNode(Ae,{onClick:$[2]||($[2]=ye=>C.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1})]),default:e.withCtx(()=>{var ye,Ke;return[(Ke=(ye=e.unref(x))==null?void 0:ye.components)!=null&&Ke.length?(e.openBlock(),e.createBlock(Re,{key:0,formData:e.unref(x)},null,8,["formData"])):e.createCommentVNode("",!0)]}),_:1},8,["modelValue","title"])])}}}),c2="",gi={key:1,class:"tip"},_i=["innerHTML"],Jt=e.defineComponent({__name:"conditionInput",props:{title:{type:String,default:"条件设置"},content:{type:String,default:""},showStyle:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},defaultValue:{type:Array,default:()=>[]}},emits:["result","clear"],setup(o,{emit:n}){let t=e.inject("formDesignerData"),l=e.inject("formData"),r=t.selectComponent;const a=e.ref(),i=e.ref(!1),c=e.ref([]),p=e.ref({}),s=e.ref({}),h=()=>{c.value=[],p.value={},s.value={},f(l.value.components),i.value=!0},f=_=>{_.forEach(g=>{var V;if(r.id!==g.id){if(g.isLayout&&((V=g.children)!=null&&V.length)){f(g.children);return}g.isEdit&&(c.value.push({label:g.props.label,id:g.id}),p.value[g.id]=m(g.excludeFilterConditions),s.value[g.id]=g.filterConditionProps)}})},m=_=>Object.keys(it).filter(V=>!(_!=null&&_.includes(V))),d=n,y=()=>{const _=a.value.getFilterData();_.message||(i.value=!1,d("result",_))},u=()=>{d("clear")};return(_,g)=>{const V=e.resolveComponent("el-button"),w=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"condition-input",onClick:h},[o.clearable&&o.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:"close",onClick:e.withModifiers(u,["stop"])},"x")):e.createCommentVNode("",!0),o.content?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:o.content},null,8,_i)):(e.openBlock(),e.createElementBlock("span",gi,"单击设置条件"))]),e.createVNode(w,{class:"filter-dialog",modelValue:e.unref(i),"onUpdate:modelValue":g[1]||(g[1]=b=>e.isRef(i)?i.value=b:null),"destroy-on-close":"",title:o.title},{footer:e.withCtx(()=>[e.createVNode(V,{onClick:g[0]||(g[0]=b=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(V,{type:"primary",onClick:y},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})]),default:e.withCtx(()=>[e.createVNode(Ze,{ref_key:"dynamicFilterRef",ref:a,showStyle:"",items:e.unref(c),conditionTypes:e.unref(p),conditionProps:e.unref(s),defaultValue:o.defaultValue},null,8,["items","conditionTypes","conditionProps","defaultValue"])]),_:1},8,["modelValue","title"])],64)}}}),d2="",wi=e.defineComponent({__name:"componentAdvancedPropsEditor",setup(o){let t=e.inject("formDesignerData").selectComponent;const l=(a,i)=>{t.props[`${i}Conditions`]=a.filterConditions,t.props[`${i}ConditionContent`]=a.filterConditionContent,t.props[`${i}ConditionExpression`]=a.filterConditionExpression},r=a=>{t.props[`${a}Conditions`]=void 0,t.props[`${a}ConditionContent`]=void 0,t.props[`${a}ConditionExpression`]=void 0};return(a,i)=>{const c=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-switch"),s=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(s,{"label-width":"90px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(t).props.showFlag?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:0,label:"显示条件"},{default:e.withCtx(()=>[e.createVNode(Jt,{title:`${e.unref(t).props.label}—显示条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.showConditionContent,defaultValue:e.unref(t).props.showConditions,onResult:i[0]||(i[0]=h=>l(h,"show")),onClear:i[1]||(i[1]=h=>r("show"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).props.showFlag?(e.openBlock(),e.createBlock(c,{key:1,label:"隐藏条件"},{default:e.withCtx(()=>[e.createVNode(Jt,{title:`${e.unref(t).props.label}—隐藏条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.hiddenConditionContent,defaultValue:e.unref(t).props.hiddenConditions,onResult:i[2]||(i[2]=h=>l(h,"hidden")),onClear:i[3]||(i[3]=h=>r("hidden"))},null,8,["title","content","defaultValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(t).props.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:2,label:"只读条件"},{default:e.withCtx(()=>[e.createVNode(Jt,{title:`${e.unref(t).props.label}—只读条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.readonlyConditionContent,defaultValue:e.unref(t).props.readonlyConditions,onResult:i[4]||(i[4]=h=>l(h,"readonly")),onClear:i[5]||(i[5]=h=>r("readonly"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(c,{label:"参与统计"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).props.statisticsFlag,"onUpdate:modelValue":i[6]||(i[6]=h=>e.unref(t).props.statisticsFlag=h)},null,8,["modelValue"])]),_:1}),e.unref(t).props.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:0,label:"禁用条件"},{default:e.withCtx(()=>[e.createVNode(Jt,{title:`${e.unref(t).props.label}—禁用条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.disabledConditionContent,defaultValue:e.unref(t).props.disabledConditions,onResult:i[7]||(i[7]=h=>l(h,"disabled")),onClear:i[8]||(i[8]=h=>r("disabled"))},null,8,["title","content","defaultValue"])]),_:1}))],64)):e.createCommentVNode("",!0)]),_:1})}}}),yi=e.defineComponent({__name:"componentBasePropsEditor",props:{dictionary:{type:Object,default:()=>{}},allowCreateDictionary:{type:Boolean,default:!0}},setup(o){const n=e.inject("formData"),t=e.inject("formDesignerData");let l=e.computed(()=>n.value.props.formType),r=t.selectComponent,a=t.selectComponent.rules;r.props.showLabel&&!r.props.labelWidth&&(r.props.labelWidth=n.value.props.labelWidth);const i=()=>{r.props.showConditionContent=void 0,r.props.showConditionExpression=void 0,r.props.showConditions=void 0,r.props.hiddenConditionContent=void 0,r.props.hiddenConditionExpression=void 0,r.props.hiddenConditions=void 0},c=()=>{r.props.readonlyConditionContent=void 0,r.props.readonlyConditionExpression=void 0,r.props.readonlyConditions=void 0},p=()=>{r.props.disabledConditionContent=void 0,r.props.disabledConditionExpression=void 0,r.props.disabledConditions=void 0},s=m=>{a[0].required=m},h=m=>{a[0].message=m},f=m=>{typeof m.value!="string"&&(r.itemID=m.value),r.id=m.value,r.itemSourceType=m.itemSourceType};return(m,d)=>{const y=e.resolveComponent("el-switch"),u=e.resolveComponent("el-form-item"),_=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-color-picker"),V=e.resolveComponent("el-slider"),w=e.resolveComponent("el-input"),b=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(b,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(l)==="1"&&e.unref(r).type!=="label"?(e.openBlock(),e.createBlock(u,{key:0,label:"显示标题"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.showLabel,"onUpdate:modelValue":d[0]||(d[0]=C=>e.unref(r).props.showLabel=C)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(r).props.showLabel||e.unref(r).type==="label"?(e.openBlock(),e.createBlock(u,{key:1,label:e.unref(r).type==="label"?"标签":e.unref(l)==="1"?"标题":"题目"},{default:e.withCtx(()=>[e.createVNode(Yt,{modelValue:e.unref(r).props.label,"onUpdate:modelValue":d[1]||(d[1]=C=>e.unref(r).props.label=C),dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary,placeholder:e.unref(r).type==="label"?"标签内容":e.unref(l)==="1"?"请输入标题":"请输入题目","item-height":50,height:"80px",onChange:f},null,8,["modelValue","dictionary","allowCreateDictionary","placeholder"])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.createVNode(u,{label:e.unref(r).type==="label"?"字体大小":e.unref(l)==="1"?"标题字号":"题目字号"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.fontSize,"onUpdate:modelValue":d[2]||(d[2]=C=>e.unref(r).props.fontSize=C),min:12,max:24},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(l)==="1"&&e.unref(r).props.showLabel?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(u,{label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.labelWidth,"onUpdate:modelValue":d[3]||(d[3]=C=>e.unref(r).props.labelWidth=C),min:0},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"标题换行"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.labelNewLine,"onUpdate:modelValue":d[4]||(d[4]=C=>e.unref(r).props.labelNewLine=C)},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(r).props.showLabel||e.unref(r).type==="label"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(u,{label:e.unref(r).type==="label"?"字体加粗":e.unref(l)==="1"?"标题加粗":"题目加粗"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.isBold,"onUpdate:modelValue":d[5]||(d[5]=C=>e.unref(r).props.isBold=C)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(u,{label:e.unref(r).type==="label"?"字体颜色":e.unref(l)==="1"?"标题颜色":"题目颜色"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.color,"onUpdate:modelValue":d[6]||(d[6]=C=>e.unref(r).props.color=C)},null,8,["modelValue"])]),_:1},8,["label"])],64)):e.createCommentVNode("",!0),e.createVNode(u,{label:"宽度"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).props.width,"onUpdate:modelValue":d[7]||(d[7]=C=>e.unref(r).props.width=C),min:3,max:e.unref(n).props.column,"show-stops":""},null,8,["modelValue","max"])]),_:1}),e.createVNode(u,{label:"左缩进"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.paddingLeft,"onUpdate:modelValue":d[8]||(d[8]=C=>e.unref(r).props.paddingLeft=C),min:0,max:100},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否显示"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.showFlag,"onUpdate:modelValue":d[9]||(d[9]=C=>e.unref(r).props.showFlag=C),onChange:i},null,8,["modelValue"])]),_:1}),e.unref(r).isInput?(e.openBlock(),e.createBlock(u,{key:4,label:"占位提示"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(r).props.placeholder,"onUpdate:modelValue":d[10]||(d[10]=C=>e.unref(r).props.placeholder=C),placeholder:"请输入占位提示"},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(r).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createVNode(u,{label:"允许清空"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.clearable,"onUpdate:modelValue":d[11]||(d[11]=C=>e.unref(r).props.clearable=C)},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否只读"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.readonly,"onUpdate:modelValue":d[12]||(d[12]=C=>e.unref(r).props.readonly=C),onChange:c},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否必填"},{default:e.withCtx(()=>[e.createVNode(y,{onChange:s,modelValue:e.unref(r).props.required,"onUpdate:modelValue":d[13]||(d[13]=C=>e.unref(r).props.required=C)},null,8,["modelValue"])]),_:1}),e.unref(r).props.required?(e.openBlock(),e.createBlock(u,{key:0,label:"必填提示"},{default:e.withCtx(()=>[e.createVNode(w,{onChange:h,modelValue:e.unref(r).props.requiredMessage,"onUpdate:modelValue":d[14]||(d[14]=C=>e.unref(r).props.requiredMessage=C)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(u,{label:"是否禁用"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.disabled,"onUpdate:modelValue":d[15]||(d[15]=C=>e.unref(r).props.disabled=C),onChange:p},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(r).type!=="label"&&!e.unref(r).isLayout?(e.openBlock(),e.createBlock(u,{key:6,label:e.unref(l)==="1"?"项目说明":"答案解析"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(r).props.description,"onUpdate:modelValue":d[16]||(d[16]=C=>e.unref(r).props.description=C),autosize:{minRows:2,maxRows:5},type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"])):e.createCommentVNode("",!0)]),_:1})}}}),Ci=e.defineComponent({__name:"formPropsEditor",setup(o,{expose:n}){const t=e.inject("formData"),l=e.ref(),r=()=>{t.value.props.formType==="2"&&(t.value.props.labelPosition="top")};return n({async validate(a=()=>{}){return await l.value.validate(a)}}),(a,i)=>{const c=e.resolveComponent("el-radio-button"),p=e.resolveComponent("el-radio-group"),s=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-input"),f=e.resolveComponent("el-input-number"),m=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(m,{ref_key:"formRef",ref:l,model:e.unref(t).props,"label-width":"80px","scroll-to-error":"","label-suffix":":"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"formBeforeExtendProps"),e.createVNode(s,{prop:"formType",label:"表单类型",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).props.formType,"onUpdate:modelValue":i[0]||(i[0]=d=>e.unref(t).props.formType=d),onChange:r},{default:e.withCtx(()=>[e.createVNode(c,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("问卷")]),_:1}),e.createVNode(c,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("试卷")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{prop:"formName",label:e.unref(t).props.formType==="1"?"问卷名称":"试卷名称",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).props.formName,"onUpdate:modelValue":i[1]||(i[1]=d=>e.unref(t).props.formName=d),autosize:"",type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(t).props.formType==="1"?(e.openBlock(),e.createBlock(s,{key:0,prop:"labelPosition",label:"标题位置"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).props.labelPosition,"onUpdate:modelValue":i[2]||(i[2]=d=>e.unref(t).props.labelPosition=d)},{default:e.withCtx(()=>[e.createVNode(c,{value:"top"},{default:e.withCtx(()=>[e.createTextVNode("上")]),_:1}),e.createVNode(c,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左")]),_:1}),e.createVNode(c,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右")]),_:1})]),_:1},8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(s,{prop:"labelWidth",label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).props.labelWidth,"onUpdate:modelValue":i[3]||(i[3]=d=>e.unref(t).props.labelWidth=d),step:5,min:0},null,8,["modelValue"])]),_:1}),e.createVNode(s,{prop:"size",label:"表单尺寸"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).props.size,"onUpdate:modelValue":i[4]||(i[4]=d=>e.unref(t).props.size=d)},{default:e.withCtx(()=>[e.createVNode(c,{value:"small"},{default:e.withCtx(()=>[e.createTextVNode("小")]),_:1}),e.createVNode(c,{value:"default"},{default:e.withCtx(()=>[e.createTextVNode("正常")]),_:1}),e.createVNode(c,{value:"large"},{default:e.withCtx(()=>[e.createTextVNode("大")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.renderSlot(a.$slots,"formAfterExtendProps")]),_:3},8,["model"])}}}),bi={class:"toolbar"},Vi=e.createElementVNode("div",{class:"devices"},null,-1),ki={class:"operates"},xi=e.createElementVNode("span",null,"清空",-1),Ei=e.createElementVNode("span",null,"模板导入",-1),Ni=e.createElementVNode("span",null,"查看JSON",-1),Bi=e.createElementVNode("span",null,"预览",-1),Di=e.createElementVNode("span",null,"保存",-1),Si=e.createElementVNode("span",null,"验证表单",-1),Mi=e.createElementVNode("span",null,"重置表单",-1),zi=e.createElementVNode("span",null,"表单数据",-1),fn=e.defineComponent({__name:"toolbar",props:{operates:{type:Array,default:()=>[]}},emits:["clearComponents","batchAdd","viewFormJson","previewFrom","saveFrom","validateForm","resetForm","viewDataJson","toggleDescription"],setup(o,{emit:n}){const t=e.inject("formData"),l=n,r=()=>{l("clearComponents")},a=()=>{l("batchAdd")},i=()=>{l("viewFormJson")},c=()=>{l("previewFrom")},p=()=>{l("saveFrom")},s=()=>{l("validateForm")},h=()=>{l("resetForm")},f=()=>{l("viewDataJson")},m=e.ref(!1),d=()=>{m.value=!m.value,l("toggleDescription",m.value)};return(y,u)=>{var w,b;const _=Q,g=e.resolveComponent("el-link"),V=e.resolveComponent("el-popconfirm");return e.openBlock(),e.createElementBlock("div",bi,[Vi,e.createElementVNode("div",ki,[o.operates.includes("clearComponents")?(e.openBlock(),e.createBlock(V,{key:0,confirmButtonText:"是",cancelButtonText:"否",title:"确定要清空所有组件吗?",width:((w=e.unref(t).components)==null?void 0:w.length)==0?0:160,onConfirm:r},{reference:e.withCtx(()=>{var C;return[e.createVNode(g,{type:"danger",underline:!1,disabled:((C=e.unref(t).components)==null?void 0:C.length)==0},{default:e.withCtx(()=>[e.createVNode(_,{name:"clear",color:"#ff0000"}),xi]),_:1},8,["disabled"])]}),_:1},8,["width"])):e.createCommentVNode("",!0),o.operates.includes("batchAdd")?(e.openBlock(),e.createBlock(g,{key:1,type:"primary",underline:!1,onClick:a},{default:e.withCtx(()=>[e.createVNode(_,{name:"batchAdd",color:"#116fff",size:"16"}),Ei]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewFormJson")?(e.openBlock(),e.createBlock(g,{key:2,type:"primary",underline:!1,onClick:i},{default:e.withCtx(()=>[e.createVNode(_,{name:"json"}),Ni]),_:1})):e.createCommentVNode("",!0),o.operates.includes("previewFrom")?(e.openBlock(),e.createBlock(g,{key:3,type:"primary",underline:!1,disabled:((b=e.unref(t).components)==null?void 0:b.length)==0,onClick:c},{default:e.withCtx(()=>[e.createVNode(_,{name:"preview",color:"#116fff"}),Bi]),_:1},8,["disabled"])):e.createCommentVNode("",!0),o.operates.includes("saveFrom")?(e.openBlock(),e.createBlock(g,{key:4,type:"primary",underline:!1,onClick:p},{default:e.withCtx(()=>[e.createVNode(_,{name:"save",size:"14px",color:"#08c979"}),Di]),_:1})):e.createCommentVNode("",!0),o.operates.includes("validateForm")?(e.openBlock(),e.createBlock(g,{key:5,type:"warning",underline:!1,onClick:s},{default:e.withCtx(()=>[e.createVNode(_,{name:"validate",color:"#e6a23c"}),Si]),_:1})):e.createCommentVNode("",!0),o.operates.includes("resetForm")?(e.openBlock(),e.createBlock(g,{key:6,type:"danger",underline:!1,onClick:h},{default:e.withCtx(()=>[e.createVNode(_,{name:"reset",color:"#ff0000"}),Mi]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewDataJson")?(e.openBlock(),e.createBlock(g,{key:7,type:"primary",underline:!1,onClick:f},{default:e.withCtx(()=>[e.createVNode(_,{name:"previewData",color:"#116fff"}),zi]),_:1})):e.createCommentVNode("",!0),o.operates.includes("toggleDescription")?(e.openBlock(),e.createBlock(g,{key:8,type:"primary",underline:!1,onClick:d},{default:e.withCtx(()=>[e.createVNode(_,{name:"description",color:"#08c979"}),e.createElementVNode("span",null,e.toDisplayString(`${e.unref(m)?"隐藏":"显示"}${e.unref(t).props.formType==="1"?"项目说明":"答案解析"}`),1)]),_:1})):e.createCommentVNode("",!0)])])}}}),p2="",$i={class:"form-designer"},Ti={class:"left-wrap"},Ii=["onClick","title"],Li={class:"component-name"},Ai={key:2,class:"no-component-tip"},Oi={key:3,class:"mobile-key"},Pi=["title"],Fi={key:1,class:"right-wrap"},Ri={class:"preview-wrap"},Ui={name:"zhy-form-designer"},kt=e.defineComponent({...Ui,props:{formData:{type:Object,required:!0},componentGroups:{type:Array,default:()=>[]},mergeGroup:{type:Boolean,default:!1},uploadOptions:{type:Object},dictionary:{type:Object,default:()=>{}},defaultSourceType:{type:String,default:void 0},allowCreateDictionary:{type:Boolean,default:!0},saveMethod:{type:Function,default:void 0},testMode:{type:Boolean,default:!1},batchAddComponentParams:{type:Object,default:()=>{}}},emits:["change","test"],setup(o,{emit:n}){const t=o,l=n,{getTempID:r,clone:a,stringifyJson:i,isEmpty:c}=de(),p={...Nt,...St,...Bt,...Dt},{formData:s,componentGroups:h,mergeGroup:f,batchAddComponentParams:m}=e.toRefs(t),d=e.reactive({selectComponent:void 0,propTab:"form",device:"pc"}),y=e.ref(!0),u=e.ref([]),_=e.computed(()=>g.value.map(B=>B.expand&&B.name)),g=e.ref([]),V=e.ref(!1),w={labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:"1"},b=[{name:"基础组件",expand:!0,components:[{type:"label",allowRepeat:!0,allowModify:!0},{type:"input",allowRepeat:!0,allowModify:!0},{type:"radio",allowRepeat:!0,allowModify:!0},{type:"checkbox",allowRepeat:!0,allowModify:!0}]},{name:"高级组件",expand:!0,components:[{type:"upload",allowRepeat:!0,allowModify:!0},{type:"uploadImage",allowRepeat:!0,allowModify:!0}]},{name:"布局组件",expand:!0,components:[{type:"groupLayout",allowRepeat:!0,allowModify:!0},{type:"tabs",allowRepeat:!0,allowModify:!0}]},{name:"应用组件",expand:!0,components:[{type:"employee",allowRepeat:!0,allowModify:!0},{type:"post",allowRepeat:!0,allowModify:!0},{type:"grade",allowRepeat:!0,allowModify:!0}]}],C=e.computed(()=>{let B=["clearComponents","previewFrom"];return m.value&&Object.keys(m.value).length&&B.push("batchAdd"),t.testMode&&B.push("viewFormJson"),t.saveMethod&&B.push("saveFrom"),B});e.onMounted(()=>{L(),x()}),e.watch(()=>d.selectComponent,B=>{if(d.propTab="component",!B){u.value=[];return}u.value=["base"],p[d.selectComponent.type].propEditor&&u.value.push("exclusive")}),e.watch([h,f],()=>{L()},{deep:!0}),e.watch(s,()=>{x()}),e.provide("uploadOptions",t.uploadOptions),e.provide("formDesignerData",d),e.provide("formData",s),e.provide("defaultSourceType",t.defaultSourceType);const x=()=>{d.selectComponent=void 0,s.value.datas||(s.value.datas={}),s.value.components?E(s.value.components):s.value.components=[],s.value.props?s.value.props=Object.assign(w,s.value.props):s.value.props=w,V.value=!s.value.props.formName},E=B=>{B.forEach(async k=>{var T;let A=new p[k.type].component;k.name=A.name,k.isEdit=A.isEdit,k.isInput=A.isInput,k.props=Object.assign(A.props,k.props),k.isEdit&&((k.props.required||k.props.pattern)&&(k.rules=A.getRules(k.props)),k.filterConditionProps=await A.getFilterConditionProps(k.props),k.excludeFilterConditions=A.getExcludeFilterConditions()),g.value.forEach(G=>{const fe=G.types.findIndex(K=>K!=null&&K.id.includes("temp")?K.type===k.type:(K==null?void 0:K.id)===k.id);fe!==-1&&(k.allowRepeat=G.types[fe].allowRepeat,k.allowModify=G.types[fe].allowModify,z(k,G.types[fe],!0),S(fe,G))}),k.isLayout&&((T=k==null?void 0:k.children)!=null&&T.length)&&E(k.children)})},L=()=>{var B;if(g.value=[],!((B=h.value)!=null&&B.length)){b.forEach(k=>{g.value.push(D(k))});return}if(t.mergeGroup){b.forEach(T=>{let G=T;const fe=h.value.find(K=>T.name===K.name);if(fe){let K=[];T.components.forEach(te=>{const Ne=fe.components.find(at=>at.type===te.type);Ne?K.push(Ne):K.push(te)}),G.components=K}g.value.push(D(G))});const k=b.map(T=>T.name);h.value.filter(T=>!k.includes(T.name)).forEach(T=>{g.value.push(D(T))})}else h.value.forEach(k=>{g.value.push(D(k))})},z=(B,k,A)=>{const T={employee:[{label:"人员1",value:r()}],post:[{label:"部门1",value:r()}],grade:[]};switch(B.type){case"employee":B.props.options=(A?k.props.options:k.options)||T.employee,k.searchEmployeeMethod?B.searchEmployeeMethod=k.searchEmployeeMethod:B.searchEmployeeMethod=G=>[];break;case"post":B.props.options=(A?k.props.options:k.options)||T.post;break;case"grade":B.props.remarkOptions=(A?k.props.remarkOptions:k.options)||T.grade;break}},D=B=>{let k=a(B);return k.types=k.components.map(A=>{var G;let T=new p[A.type].component;return T.allowRepeat=A.allowRepeat===void 0?!0:A.allowRepeat,T.allowModify=A.allowModify===void 0?!0:A.allowModify,z(T,A),!((G=A.id)!=null&&G.includes("temp"))&&!c(A.props)&&(T.props=Object.assign(T.props,A.props),T.id=A.id,T.name=A.name),T}),k.dynamicTypes=a(k.types),k.components=k.components.map(A=>A.type),k},$=(B,k)=>{const A=F(B);s.value.components.push(A),Ae();const T=k.types.findIndex(G=>B!=null&&B.id.includes("temp")?G.type===B.type:(G==null?void 0:G.id)===B.id);T!==-1&&S(T,k),d.selectComponent=void 0,e.nextTick(()=>d.selectComponent=A)},F=B=>{var T,G;let k=a(B);k.itemSourceType=t.defaultSourceType;let A=new p[B.type].component;return A.isEdit&&(k.filterConditionProps=A.getFilterConditionProps(k.props)),!((T=k.id)!=null&&T.includes("temp"))||(k.id=r(),!((G=k.props.options)!=null&&G.length)||["employee","post"].includes(k.type))||k.props.options.forEach(fe=>{fe.value=r(),fe.itemSourceType=t.defaultSourceType}),k},S=(B,k)=>{k.types[B].allowRepeat||k.types.splice(B,1)},R=B=>{B.allowRepeat||g.value.forEach(k=>{let A=[];k.dynamicTypes.forEach((T,G)=>{k.types.findIndex(K=>T!=null&&T.id.includes("temp")?T.type===K.type:(T==null?void 0:T.id)===K.id)!==-1&&A.push(a(k.dynamicTypes[G])),(T!=null&&T.id.includes("temp")&&T.type===B.type||(T==null?void 0:T.id)===B.id)&&A.push(a(k.dynamicTypes[G]))}),k.types=A})},j=()=>{s.value.components.splice(0,s.value.components.length),Ae(),d.selectComponent=void 0},W=e.ref(!1),le=()=>{W.value=!0},se=B=>{B!=null&&B.length&&(E(B),B.forEach(k=>s.value.components.push(k)),Ae())},Xe=()=>{ye.value=i(s.value),Je.value=!0},xt=e.ref(),rt=async()=>{if(t.saveMethod){if(!s.value.components.length){he("error","未发现需要保存的数据!");return}const B=await ce();B&&t.saveMethod(B)}},Le=e.ref(),Re=e.ref(!1),Eo=()=>{Re.value=!0};e.watch(()=>Re.value,()=>{s.value.datas={},s.value.components.forEach(B=>{!s.value.datas[B.id]&&!c(B.props.defaultValue)&&(B.type==="grade"?s.value.datas[B.id]={score:B.props.defaultValue}:s.value.datas[B.id]=B.props.defaultValue)})}),e.watch(()=>d.selectComponent,(B,k)=>{B&&k&&i(B.props)!==i(k)&&Ae()},{deep:!0});const Ae=dn(()=>{l("change")},50),Je=e.ref(!1),ye=e.ref(),Ke=async()=>{await Le.value.validate()?he("success","通过验证"):he("error","未通过验证")},Kt=()=>{Le.value.resetFields()},H=()=>{const{data:B,fileList:k}=Le.value.getDatas();console.log(B,k)},Et=()=>{Le.value.toggleDescription()},ce=async()=>{if(!await xt.value.validate()){he("error","请将表单属性填写完整!"),d.propTab="form";return}let k=["单选框","多选框","选项","标签","文本框","分组名称"],A=a(s.value);if(A.datas={},Zt(k,A.components))return A},Zt=(B,k,A)=>{var G,fe;let T=!0;for(let K=0;K<k.length;K++){let te=k[K];if(delete te.isEdit,delete te.isInput,delete te.name,delete te.rules,delete te.excludeFilterConditions,delete te.filterConditionProps,B.find(Ne=>te.props.label.indexOf(Ne)===0)){he("error",`请将${A?`【${A}】中`:""}第${K+1}个项目的【${te.props.label}】调整为合理描述!`),T=!1;break}if((G=te.props.options)!=null&&G.length){for(let Ne=0;Ne<te.props.options.length;Ne++){let at=te.props.options[Ne];if(B.find(Qt=>at.label.indexOf(Qt)===0)){he("error",`请将【${te.props.label}】的第${Ne+1}个选项的【${at.label}】调整为合理描述!`),T=!1;break}}if(!T)break}c(k[K].props.defaultValue)&&(k[K].props.defaultValue=void 0),te.isLayout&&((fe=te==null?void 0:te.children)!=null&&fe.length)&&(T=Zt(B,te.children,te.props.label))}return T};return e.watch(s.value.components,()=>{l("test")}),(B,k)=>{var hn;const A=Q,T=e.resolveComponent("el-collapse-item"),G=e.resolveComponent("el-collapse"),fe=e.resolveComponent("el-input"),K=e.resolveComponent("el-form"),te=e.resolveComponent("el-empty"),Ne=e.resolveComponent("el-tab-pane"),at=e.resolveComponent("el-tabs"),Qt=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",$i,[e.createElementVNode("div",Ti,[e.createVNode(G,{modelValue:e.unref(_),"onUpdate:modelValue":k[0]||(k[0]=Y=>e.isRef(_)?_.value=Y:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(Y,ji)=>(e.openBlock(),e.createBlock(T,{key:ji,title:Y.name,name:Y.name},{default:e.withCtx(()=>[e.createVNode(e.unref(lt),{list:Y.types,"item-key":"type",tag:"div",class:"component-list",clone:Ue=>F(Ue),sort:!1,onRemove:Ue=>S(Ue.oldIndex,Y),group:{name:"component",pull:"clone",put:!1}},{item:e.withCtx(({element:Ue})=>[e.createElementVNode("div",{class:"component-item",onClick:h2=>$(Ue,Y),title:Ue.name},[e.createVNode(A,{name:Ue.type,color:"#fc8720"},null,8,["name"]),e.createElementVNode("span",Li,e.toDisplayString(Ue.name),1)],8,Ii)]),_:2},1032,["list","clone","onRemove"])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])]),e.unref(s).props?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["center-wrap",{"open-props":e.unref(y)}])},[e.createVNode(fn,{operates:e.unref(C),onClearComponents:j,onBatchAdd:le,onViewFormJson:Xe,onPreviewFrom:Eo,onSaveFrom:rt},null,8,["operates"]),e.createElementVNode("div",{class:e.normalizeClass(["component-form",e.unref(d).device])},[e.unref(V)?(e.openBlock(),e.createBlock(fe,{key:0,class:"title-input",modelValue:e.unref(s).props.formName,"onUpdate:modelValue":k[1]||(k[1]=Y=>e.unref(s).props.formName=Y),placeholder:"单击输入标题",onBlur:k[2]||(k[2]=Y=>V.value=!1),onKeydown:k[3]||(k[3]=e.withKeys(Y=>V.value=!1,["enter"]))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("h2",{key:1,class:"title",onClick:k[4]||(k[4]=Y=>V.value=!0)},e.toDisplayString(e.unref(s).props.formName),1)),(hn=e.unref(s).components)!=null&&hn.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ai,"从左侧拖拽组件")),e.createVNode(K,{class:"designer-form","label-position":e.unref(s).props.labelPosition,"label-width":e.unref(s).props.labelWidth,size:e.unref(s).props.size,"status-icon":!1,"show-message":!1,disabled:""},{default:e.withCtx(()=>[e.createVNode(Vo,{components:e.unref(s).components,"onUpdate:components":k[5]||(k[5]=Y=>e.unref(s).components=Y),onDeleteComponent:R,onChange:k[6]||(k[6]=Y=>e.unref(Ae)())},null,8,["components"])]),_:1},8,["label-position","label-width","size"]),e.unref(d).device==="mobile"?(e.openBlock(),e.createElementBlock("div",Oi)):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("i",{class:e.normalizeClass(["toggle-props",e.unref(y)?"show":"hidden"]),title:e.unref(y)?"隐藏属性配置面板":"打开属性配置面板",onClick:k[7]||(k[7]=Y=>y.value=!e.unref(y))},null,10,Pi),e.unref(y)?(e.openBlock(),e.createElementBlock("div",Fi,[e.createVNode(at,{class:"prop-tabs",modelValue:e.unref(d).propTab,"onUpdate:modelValue":k[10]||(k[10]=Y=>e.unref(d).propTab=Y),type:"border-card"},{default:e.withCtx(()=>[e.createVNode(Ne,{label:"组件属性",name:"component"},{default:e.withCtx(()=>[e.unref(d).selectComponent?(e.openBlock(),e.createBlock(G,{key:1,modelValue:e.unref(u),"onUpdate:modelValue":k[9]||(k[9]=Y=>e.isRef(u)?u.value=Y:null)},{default:e.withCtx(()=>[e.createVNode(T,{title:"基础属性",name:"base"},{default:e.withCtx(()=>[e.createVNode(yi,{dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary},null,8,["dictionary","allowCreateDictionary"])]),_:1}),p[e.unref(d).selectComponent.type].propEditor?(e.openBlock(),e.createBlock(T,{key:0,title:"专有属性",name:"exclusive"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p[e.unref(d).selectComponent.type].propEditor),{componentProps:e.unref(d).selectComponent.props,"onUpdate:componentProps":k[8]||(k[8]=Y=>e.unref(d).selectComponent.props=Y),dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary},null,40,["componentProps","dictionary","allowCreateDictionary"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(T,{title:"高级属性",name:"advanced"},{default:e.withCtx(()=>[e.createVNode(wi)]),_:1})]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(te,{key:0,description:"请选择组件"}))]),_:1}),e.createVNode(Ne,{label:"表单属性",name:"form",class:"form-props"},{default:e.withCtx(()=>[e.unref(s).props?(e.openBlock(),e.createBlock(Ci,{key:0,ref_key:"formPropsEditorRef",ref:xt},{formBeforeExtendProps:e.withCtx(()=>[e.renderSlot(B.$slots,"formBeforeExtendProps")]),formAfterExtendProps:e.withCtx(()=>[e.renderSlot(B.$slots,"formAfterExtendProps")]),_:3},512)):e.createCommentVNode("",!0)]),_:3})]),_:3},8,["modelValue"])])):e.createCommentVNode("",!0)]),e.createVNode(Qt,{modelValue:e.unref(Re),"onUpdate:modelValue":k[11]||(k[11]=Y=>e.isRef(Re)?Re.value=Y:null),class:"preview-dialog no-footer","destroy-on-close":"",fullscreen:"",title:"表单预览"},{default:e.withCtx(()=>[e.createElementVNode("div",Ri,[e.createVNode(fn,{operates:["validateForm","resetForm",o.testMode?"viewDataJson":"","toggleDescription"],onValidateForm:Ke,onResetForm:Kt,onViewDataJson:H,onToggleDescription:Et},null,8,["operates"]),e.createVNode(Ye,{watching:"",ref_key:"rendererForm",ref:Le,formData:e.unref(s),uploadOptions:o.uploadOptions,device:e.unref(d).device},null,8,["formData","uploadOptions","device"])])]),_:1},8,["modelValue"]),e.createVNode(Qt,{modelValue:e.unref(Je),"onUpdate:modelValue":k[12]||(k[12]=Y=>e.isRef(Je)?Je.value=Y:null),class:"no-footer","destroy-on-close":"",title:"表单数据JSON",width:"600px"},{default:e.withCtx(()=>[e.createElementVNode("pre",null,e.toDisplayString(e.unref(ye)),1)]),_:1},8,["modelValue"]),e.unref(W)?(e.openBlock(),e.createBlock(ui,{key:0,modelValue:e.unref(W),"onUpdate:modelValue":k[13]||(k[13]=Y=>e.isRef(W)?W.value=Y:null),params:e.unref(m),onSelect:se},null,8,["modelValue","params"])):e.createCommentVNode("",!0)],64)}}}),m2="";kt.install=function(o){o.component(kt.name,kt)},Ye.install=function(o){o.component(Ye.name,Ye)},Q.install=function(o){o.component(Q.name,Q)};const Hi=[Q,kt,Ye,Ze],qi={install:function(o,n){Hi.forEach(t=>{o.component(t.name,t)})}};re.MessageType=No,re.componentType=ae,re.default=qi,re.filterConditionTypes=it,re.zhyDynamicFilter=Ze,re.zhyFormDesigner=kt,re.zhyFormRenderer=Ye,re.zhyIcon=Q,Object.defineProperties(re,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ar="1.15.3";function Te(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var Ie=Te(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),st=Te(/Edge/i),Do=Te(/firefox/i),ct=Te(/safari/i)&&!Te(/chrome/i)&&!Te(/android/i),So=Te(/iP(ad|od|hone)/i),Mo=Te(/chrome/i)&&Te(/android/i),zo={capture:!1,passive:!1};function q(o,n,t){o.addEventListener(n,t,!Ie&&zo)}function U(o,n,t){o.removeEventListener(n,t,!Ie&&zo)}function zt(o,n){if(n){if(n[0]===">"&&(n=n.substring(1)),o)try{if(o.matches)return o.matches(n);if(o.msMatchesSelector)return o.msMatchesSelector(n);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(n)}catch{return!1}return!1}}function $o(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function xe(o,n,t,l){if(o){t=t||document;do{if(n!=null&&(n[0]===">"?o.parentNode===t&&zt(o,n):zt(o,n))||l&&o===t)return o;if(o===t)break}while(o=$o(o))}return null}var To=/\s+/g;function v(o,n,t){if(o&&n)if(o.classList)o.classList[t?"add":"remove"](n);else{var l=(" "+o.className+" ").replace(To," ").replace(" "+n+" "," ");o.className=(l+(t?" "+n:"")).replace(To," ")}}function M(o,n,t){var l=o&&o.style;if(l){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(t=o.currentStyle),n===void 0?t:t[n];!(n in l)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),l[n]=t+(typeof t=="string"?"":"px")}}function He(o,n){var t="";if(typeof o=="string")t=o;else do{var l=M(o,"transform");l&&l!=="none"&&(t=l+" "+t)}while(!n&&(o=o.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function Io(o,n,t){if(o){var l=o.getElementsByTagName(n),r=0,a=l.length;if(t)for(;r<a;r++)t(l[r],r);return l}return[]}function ze(){var o=document.scrollingElement;return o||document.documentElement}function J(o,n,t,l,r){if(!(!o.getBoundingClientRect&&o!==window)){var a,i,c,p,s,h,f;if(o!==window&&o.parentNode&&o!==ze()?(a=o.getBoundingClientRect(),i=a.top,c=a.left,p=a.bottom,s=a.right,h=a.height,f=a.width):(i=0,c=0,p=window.innerHeight,s=window.innerWidth,h=window.innerHeight,f=window.innerWidth),(n||t)&&o!==window&&(r=r||o.parentNode,!Ie))do if(r&&r.getBoundingClientRect&&(M(r,"transform")!=="none"||t&&M(r,"position")!=="static")){var m=r.getBoundingClientRect();i-=m.top+parseInt(M(r,"border-top-width")),c-=m.left+parseInt(M(r,"border-left-width")),p=i+a.height,s=c+a.width;break}while(r=r.parentNode);if(l&&o!==window){var d=He(r||o),y=d&&d.a,u=d&&d.d;d&&(i/=u,c/=y,f/=y,h/=u,p=i+h,s=c+f)}return{top:i,left:c,bottom:p,right:s,width:f,height:h}}}function Lo(o,n,t){for(var l=Oe(o,!0),r=J(o)[n];l;){var a=J(l)[t],i=void 0;if(t==="top"||t==="left"?i=r>=a:i=r<=a,!i)return l;if(l===ze())break;l=Oe(l,!1)}return!1}function Qe(o,n,t,l){for(var r=0,a=0,i=o.children;a<i.length;){if(i[a].style.display!=="none"&&i[a]!==I.ghost&&(l||i[a]!==I.dragged)&&xe(i[a],t.draggable,o,!1)){if(r===n)return i[a];r++}a++}return null}function eo(o,n){for(var t=o.lastElementChild;t&&(t===I.ghost||M(t,"display")==="none"||n&&!zt(t,n));)t=t.previousElementSibling;return t||null}function oe(o,n){var t=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==I.clone&&(!n||zt(o,n))&&t++;return t}function Ao(o){var n=0,t=0,l=ze();if(o)do{var r=He(o),a=r.a,i=r.d;n+=o.scrollLeft*a,t+=o.scrollTop*i}while(o!==l&&(o=o.parentNode));return[n,t]}function Or(o,n){for(var t in o)if(o.hasOwnProperty(t)){for(var l in n)if(n.hasOwnProperty(l)&&n[l]===o[t][l])return Number(t)}return-1}function Oe(o,n){if(!o||!o.getBoundingClientRect)return ze();var t=o,l=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=M(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return ze();if(l||n)return t;l=!0}}while(t=t.parentNode);return ze()}function Pr(o,n){if(o&&n)for(var t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o}function to(o,n){return Math.round(o.top)===Math.round(n.top)&&Math.round(o.left)===Math.round(n.left)&&Math.round(o.height)===Math.round(n.height)&&Math.round(o.width)===Math.round(n.width)}var dt;function Oo(o,n){return function(){if(!dt){var t=arguments,l=this;t.length===1?o.call(l,t[0]):o.apply(l,t),dt=setTimeout(function(){dt=void 0},n)}}}function Fr(){clearTimeout(dt),dt=void 0}function Po(o,n,t){o.scrollLeft+=n,o.scrollTop+=t}function oo(o){var n=window.Polymer,t=window.jQuery||window.Zepto;return n&&n.dom?n.dom(o).cloneNode(!0):t?t(o).clone(!0)[0]:o.cloneNode(!0)}function Fo(o,n){M(o,"position","absolute"),M(o,"top",n.top),M(o,"left",n.left),M(o,"width",n.width),M(o,"height",n.height)}function no(o){M(o,"position",""),M(o,"top",""),M(o,"left",""),M(o,"width",""),M(o,"height","")}function Ro(o,n,t){var l={};return Array.from(o.children).forEach(function(r){var a,i,c,p;if(!(!xe(r,n.draggable,o,!1)||r.animated||r===t)){var s=J(r);l.left=Math.min((a=l.left)!==null&&a!==void 0?a:1/0,s.left),l.top=Math.min((i=l.top)!==null&&i!==void 0?i:1/0,s.top),l.right=Math.max((c=l.right)!==null&&c!==void 0?c:-1/0,s.right),l.bottom=Math.max((p=l.bottom)!==null&&p!==void 0?p:-1/0,s.bottom)}}),l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}var pe="Sortable"+new Date().getTime();function Rr(){var o=[],n;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var l=[].slice.call(this.el.children);l.forEach(function(r){if(!(M(r,"display")==="none"||r===I.ghost)){o.push({target:r,rect:J(r)});var a=Me({},o[o.length-1].rect);if(r.thisAnimationDuration){var i=He(r,!0);i&&(a.top-=i.f,a.left-=i.e)}r.fromRect=a}})}},addAnimationState:function(l){o.push(l)},removeAnimationState:function(l){o.splice(Or(o,{target:l}),1)},animateAll:function(l){var r=this;if(!this.options.animation){clearTimeout(n),typeof l=="function"&&l();return}var a=!1,i=0;o.forEach(function(c){var p=0,s=c.target,h=s.fromRect,f=J(s),m=s.prevFromRect,d=s.prevToRect,y=c.rect,u=He(s,!0);u&&(f.top-=u.f,f.left-=u.e),s.toRect=f,s.thisAnimationDuration&&to(m,f)&&!to(h,f)&&(y.top-f.top)/(y.left-f.left)===(h.top-f.top)/(h.left-f.left)&&(p=Hr(y,m,d,r.options)),to(f,h)||(s.prevFromRect=h,s.prevToRect=f,p||(p=r.options.animation),r.animate(s,y,f,p)),p&&(a=!0,i=Math.max(i,p),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},p),s.thisAnimationDuration=p)}),clearTimeout(n),a?n=setTimeout(function(){typeof l=="function"&&l()},i):typeof l=="function"&&l(),o=[]},animate:function(l,r,a,i){if(i){M(l,"transition",""),M(l,"transform","");var c=He(this.el),p=c&&c.a,s=c&&c.d,h=(r.left-a.left)/(p||1),f=(r.top-a.top)/(s||1);l.animatingX=!!h,l.animatingY=!!f,M(l,"transform","translate3d("+h+"px,"+f+"px,0)"),this.forRepaintDummy=Ur(l),M(l,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),M(l,"transform","translate3d(0,0,0)"),typeof l.animated=="number"&&clearTimeout(l.animated),l.animated=setTimeout(function(){M(l,"transition",""),M(l,"transform",""),l.animated=!1,l.animatingX=!1,l.animatingY=!1},i)}}}}function Ur(o){return o.offsetWidth}function Hr(o,n,t,l){return Math.sqrt(Math.pow(n.top-o.top,2)+Math.pow(n.left-o.left,2))/Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))*l.animation}var ve=[],lo={initializeByDefault:!0},pt={mount:function(n){for(var t in lo)lo.hasOwnProperty(t)&&!(t in n)&&(n[t]=lo[t]);ve.forEach(function(l){if(l.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),ve.push(n)},pluginEvent:function(n,t,l){var r=this;this.eventCanceled=!1,l.cancel=function(){r.eventCanceled=!0};var a=n+"Global";ve.forEach(function(i){t[i.pluginName]&&(t[i.pluginName][a]&&t[i.pluginName][a](Me({sortable:t},l)),t.options[i.pluginName]&&t[i.pluginName][n]&&t[i.pluginName][n](Me({sortable:t},l)))})},initializePlugins:function(n,t,l,r){ve.forEach(function(c){var p=c.pluginName;if(!(!n.options[p]&&!c.initializeByDefault)){var s=new c(n,t,n.options);s.sortable=n,s.options=n.options,n[p]=s,ke(l,s.defaults)}});for(var a in n.options)if(n.options.hasOwnProperty(a)){var i=this.modifyOption(n,a,n.options[a]);typeof i<"u"&&(n.options[a]=i)}},getEventProperties:function(n,t){var l={};return ve.forEach(function(r){typeof r.eventProperties=="function"&&ke(l,r.eventProperties.call(t[r.pluginName],n))}),l},modifyOption:function(n,t,l){var r;return ve.forEach(function(a){n[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(r=a.optionListeners[t].call(n[a.pluginName],l))}),r}};function mt(o){var n=o.sortable,t=o.rootEl,l=o.name,r=o.targetEl,a=o.cloneEl,i=o.toEl,c=o.fromEl,p=o.oldIndex,s=o.newIndex,h=o.oldDraggableIndex,f=o.newDraggableIndex,m=o.originalEvent,d=o.putSortable,y=o.extraEventProperties;if(n=n||t&&t[pe],!!n){var u,_=n.options,g="on"+l.charAt(0).toUpperCase()+l.substr(1);window.CustomEvent&&!Ie&&!st?u=new CustomEvent(l,{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent(l,!0,!0)),u.to=i||t,u.from=c||t,u.item=r||t,u.clone=a,u.oldIndex=p,u.newIndex=s,u.oldDraggableIndex=h,u.newDraggableIndex=f,u.originalEvent=m,u.pullMode=d?d.lastPutMode:void 0;var V=Me(Me({},y),pt.getEventProperties(l,n));for(var w in V)u[w]=V[w];t&&t.dispatchEvent(u),_[g]&&_[g].call(n,u)}}var qr=["evt"],_e=function(n,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=l.evt,a=Mr(l,qr);pt.pluginEvent.bind(I)(n,t,Me({dragEl:N,parentEl:ne,ghostEl:O,rootEl:Z,nextEl:qe,lastDownEl:$t,cloneEl:ee,cloneHidden:Pe,dragStarted:ht,putSortable:me,activeSortable:I.active,originalEvent:r,oldIndex:et,oldDraggableIndex:ft,newIndex:be,newDraggableIndex:Fe,hideGhostForTarget:Yo,unhideGhostForTarget:Xo,cloneNowHidden:function(){Pe=!0},cloneNowShown:function(){Pe=!1},dispatchSortableEvent:function(c){ge({sortable:t,name:c,originalEvent:r})}},a))};function ge(o){mt(Me({putSortable:me,cloneEl:ee,targetEl:N,rootEl:Z,oldIndex:et,oldDraggableIndex:ft,newIndex:be,newDraggableIndex:Fe},o))}var N,ne,O,Z,qe,$t,ee,Pe,et,be,ft,Fe,Tt,me,tt=!1,It=!1,Lt=[],je,Be,ro,ao,Uo,Ho,ht,ot,ut,gt=!1,At=!1,Ot,ue,io=[],so=!1,Pt=[],Ft=typeof document<"u",Rt=So,qo=st||Ie?"cssFloat":"float",jr=Ft&&!Mo&&!So&&"draggable"in document.createElement("div"),jo=function(){if(Ft){if(Ie)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Go=function(n,t){var l=M(n),r=parseInt(l.width)-parseInt(l.paddingLeft)-parseInt(l.paddingRight)-parseInt(l.borderLeftWidth)-parseInt(l.borderRightWidth),a=Qe(n,0,t),i=Qe(n,1,t),c=a&&M(a),p=i&&M(i),s=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+J(a).width,h=p&&parseInt(p.marginLeft)+parseInt(p.marginRight)+J(i).width;if(l.display==="flex")return l.flexDirection==="column"||l.flexDirection==="column-reverse"?"vertical":"horizontal";if(l.display==="grid")return l.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&c.float&&c.float!=="none"){var f=c.float==="left"?"left":"right";return i&&(p.clear==="both"||p.clear===f)?"vertical":"horizontal"}return a&&(c.display==="block"||c.display==="flex"||c.display==="table"||c.display==="grid"||s>=r&&l[qo]==="none"||i&&l[qo]==="none"&&s+h>r)?"vertical":"horizontal"},Gr=function(n,t,l){var r=l?n.left:n.top,a=l?n.right:n.bottom,i=l?n.width:n.height,c=l?t.left:t.top,p=l?t.right:t.bottom,s=l?t.width:t.height;return r===c||a===p||r+i/2===c+s/2},Wr=function(n,t){var l;return Lt.some(function(r){var a=r[pe].options.emptyInsertThreshold;if(!(!a||eo(r))){var i=J(r),c=n>=i.left-a&&n<=i.right+a,p=t>=i.top-a&&t<=i.bottom+a;if(c&&p)return l=r}}),l},Wo=function(n){function t(a,i){return function(c,p,s,h){var f=c.options.group.name&&p.options.group.name&&c.options.group.name===p.options.group.name;if(a==null&&(i||f))return!0;if(a==null||a===!1)return!1;if(i&&a==="clone")return a;if(typeof a=="function")return t(a(c,p,s,h),i)(c,p,s,h);var m=(i?c:p).options.group.name;return a===!0||typeof a=="string"&&a===m||a.join&&a.indexOf(m)>-1}}var l={},r=n.group;(!r||Mt(r)!="object")&&(r={name:r}),l.name=r.name,l.checkPull=t(r.pull,!0),l.checkPut=t(r.put),l.revertClone=r.revertClone,n.group=l},Yo=function(){!jo&&O&&M(O,"display","none")},Xo=function(){!jo&&O&&M(O,"display","")};Ft&&!Mo&&document.addEventListener("click",function(o){if(It)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),It=!1,!1},!0);var Ge=function(n){if(N){n=n.touches?n.touches[0]:n;var t=Wr(n.clientX,n.clientY);if(t){var l={};for(var r in n)n.hasOwnProperty(r)&&(l[r]=n[r]);l.target=l.rootEl=t,l.preventDefault=void 0,l.stopPropagation=void 0,t[pe]._onDragOver(l)}}},Yr=function(n){N&&N.parentNode[pe]._isOutsideThisEl(n.target)};function I(o,n){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=n=ke({},n),o[pe]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Go(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,c){i.setData("Text",c.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:I.supportPointer!==!1&&"PointerEvent"in window&&!ct,emptyInsertThreshold:5};pt.initializePlugins(this,o,t);for(var l in t)!(l in n)&&(n[l]=t[l]);Wo(n);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=n.forceFallback?!1:jr,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?q(o,"pointerdown",this._onTapStart):(q(o,"mousedown",this._onTapStart),q(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(q(o,"dragover",this),q(o,"dragenter",this)),Lt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),ke(this,Rr())}I.prototype={constructor:I,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(ot=null)},_getDirection:function(n,t){return typeof this.options.direction=="function"?this.options.direction.call(this,n,t,N):this.options.direction},_onTapStart:function(n){if(n.cancelable){var t=this,l=this.el,r=this.options,a=r.preventOnFilter,i=n.type,c=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,p=(c||n).target,s=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||p,h=r.filter;if(ta(l),!N&&!(/mousedown|pointerdown/.test(i)&&n.button!==0||r.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&ct&&p&&p.tagName.toUpperCase()==="SELECT")&&(p=xe(p,r.draggable,l,!1),!(p&&p.animated)&&$t!==p)){if(et=oe(p),ft=oe(p,r.draggable),typeof h=="function"){if(h.call(this,n,p,this)){ge({sortable:t,rootEl:s,name:"filter",targetEl:p,toEl:l,fromEl:l}),_e("filter",t,{evt:n}),a&&n.cancelable&&n.preventDefault();return}}else if(h&&(h=h.split(",").some(function(f){if(f=xe(s,f.trim(),l,!1),f)return ge({sortable:t,rootEl:f,name:"filter",targetEl:p,fromEl:l,toEl:l}),_e("filter",t,{evt:n}),!0}),h)){a&&n.cancelable&&n.preventDefault();return}r.handle&&!xe(s,r.handle,l,!1)||this._prepareDragStart(n,c,p)}}},_prepareDragStart:function(n,t,l){var r=this,a=r.el,i=r.options,c=a.ownerDocument,p;if(l&&!N&&l.parentNode===a){var s=J(l);if(Z=a,N=l,ne=N.parentNode,qe=N.nextSibling,$t=l,Tt=i.group,I.dragged=N,je={target:N,clientX:(t||n).clientX,clientY:(t||n).clientY},Uo=je.clientX-s.left,Ho=je.clientY-s.top,this._lastX=(t||n).clientX,this._lastY=(t||n).clientY,N.style["will-change"]="all",p=function(){if(_e("delayEnded",r,{evt:n}),I.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Do&&r.nativeDraggable&&(N.draggable=!0),r._triggerDragStart(n,t),ge({sortable:r,name:"choose",originalEvent:n}),v(N,i.chosenClass,!0)},i.ignore.split(",").forEach(function(h){Io(N,h.trim(),co)}),q(c,"dragover",Ge),q(c,"mousemove",Ge),q(c,"touchmove",Ge),q(c,"mouseup",r._onDrop),q(c,"touchend",r._onDrop),q(c,"touchcancel",r._onDrop),Do&&this.nativeDraggable&&(this.options.touchStartThreshold=4,N.draggable=!0),_e("delayStart",this,{evt:n}),i.delay&&(!i.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(st||Ie))){if(I.eventCanceled){this._onDrop();return}q(c,"mouseup",r._disableDelayedDrag),q(c,"touchend",r._disableDelayedDrag),q(c,"touchcancel",r._disableDelayedDrag),q(c,"mousemove",r._delayedDragTouchMoveHandler),q(c,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&q(c,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(p,i.delay)}else p()}},_delayedDragTouchMoveHandler:function(n){var t=n.touches?n.touches[0]:n;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){N&&co(N),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;U(n,"mouseup",this._disableDelayedDrag),U(n,"touchend",this._disableDelayedDrag),U(n,"touchcancel",this._disableDelayedDrag),U(n,"mousemove",this._delayedDragTouchMoveHandler),U(n,"touchmove",this._delayedDragTouchMoveHandler),U(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,t){t=t||n.pointerType=="touch"&&n,!this.nativeDraggable||t?this.options.supportPointer?q(document,"pointermove",this._onTouchMove):t?q(document,"touchmove",this._onTouchMove):q(document,"mousemove",this._onTouchMove):(q(N,"dragend",this),q(Z,"dragstart",this._onDragStart));try{document.selection?Ht(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,t){if(tt=!1,Z&&N){_e("dragStarted",this,{evt:t}),this.nativeDraggable&&q(document,"dragover",Yr);var l=this.options;!n&&v(N,l.dragClass,!1),v(N,l.ghostClass,!0),I.active=this,n&&this._appendGhost(),ge({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Be){this._lastX=Be.clientX,this._lastY=Be.clientY,Yo();for(var n=document.elementFromPoint(Be.clientX,Be.clientY),t=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(Be.clientX,Be.clientY),n!==t);)t=n;if(N.parentNode[pe]._isOutsideThisEl(n),t)do{if(t[pe]){var l=void 0;if(l=t[pe]._onDragOver({clientX:Be.clientX,clientY:Be.clientY,target:n,rootEl:t}),l&&!this.options.dragoverBubble)break}n=t}while(t=$o(t));Xo()}},_onTouchMove:function(n){if(je){var t=this.options,l=t.fallbackTolerance,r=t.fallbackOffset,a=n.touches?n.touches[0]:n,i=O&&He(O,!0),c=O&&i&&i.a,p=O&&i&&i.d,s=Rt&&ue&&Ao(ue),h=(a.clientX-je.clientX+r.x)/(c||1)+(s?s[0]-io[0]:0)/(c||1),f=(a.clientY-je.clientY+r.y)/(p||1)+(s?s[1]-io[1]:0)/(p||1);if(!I.active&&!tt){if(l&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<l)return;this._onDragStart(n,!0)}if(O){i?(i.e+=h-(ro||0),i.f+=f-(ao||0)):i={a:1,b:0,c:0,d:1,e:h,f};var m="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");M(O,"webkitTransform",m),M(O,"mozTransform",m),M(O,"msTransform",m),M(O,"transform",m),ro=h,ao=f,Be=a}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!O){var n=this.options.fallbackOnBody?document.body:Z,t=J(N,!0,Rt,!0,n),l=this.options;if(Rt){for(ue=n;M(ue,"position")==="static"&&M(ue,"transform")==="none"&&ue!==document;)ue=ue.parentNode;ue!==document.body&&ue!==document.documentElement?(ue===document&&(ue=ze()),t.top+=ue.scrollTop,t.left+=ue.scrollLeft):ue=ze(),io=Ao(ue)}O=N.cloneNode(!0),v(O,l.ghostClass,!1),v(O,l.fallbackClass,!0),v(O,l.dragClass,!0),M(O,"transition",""),M(O,"transform",""),M(O,"box-sizing","border-box"),M(O,"margin",0),M(O,"top",t.top),M(O,"left",t.left),M(O,"width",t.width),M(O,"height",t.height),M(O,"opacity","0.8"),M(O,"position",Rt?"absolute":"fixed"),M(O,"zIndex","100000"),M(O,"pointerEvents","none"),I.ghost=O,n.appendChild(O),M(O,"transform-origin",Uo/parseInt(O.style.width)*100+"% "+Ho/parseInt(O.style.height)*100+"%")}},_onDragStart:function(n,t){var l=this,r=n.dataTransfer,a=l.options;if(_e("dragStart",this,{evt:n}),I.eventCanceled){this._onDrop();return}_e("setupClone",this),I.eventCanceled||(ee=oo(N),ee.removeAttribute("id"),ee.draggable=!1,ee.style["will-change"]="",this._hideClone(),v(ee,this.options.chosenClass,!1),I.clone=ee),l.cloneId=Ht(function(){_e("clone",l),!I.eventCanceled&&(l.options.removeCloneOnHide||Z.insertBefore(ee,N),l._hideClone(),ge({sortable:l,name:"clone"}))}),!t&&v(N,a.dragClass,!0),t?(It=!0,l._loopId=setInterval(l._emulateDragOver,50)):(U(document,"mouseup",l._onDrop),U(document,"touchend",l._onDrop),U(document,"touchcancel",l._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(l,r,N)),q(document,"drop",l),M(N,"transform","translateZ(0)")),tt=!0,l._dragStartId=Ht(l._dragStarted.bind(l,t,n)),q(document,"selectstart",l),ht=!0,ct&&M(document.body,"user-select","none")},_onDragOver:function(n){var t=this.el,l=n.target,r,a,i,c=this.options,p=c.group,s=I.active,h=Tt===p,f=c.sort,m=me||s,d,y=this,u=!1;if(so)return;function _(se,Xe){_e(se,y,Me({evt:n,isOwner:h,axis:d?"vertical":"horizontal",revert:i,dragRect:r,targetRect:a,canSort:f,fromSortable:m,target:l,completed:V,onMove:function(rt,Le){return Ut(Z,t,N,r,rt,J(rt),n,Le)},changed:w},Xe))}function g(){_("dragOverAnimationCapture"),y.captureAnimationState(),y!==m&&m.captureAnimationState()}function V(se){return _("dragOverCompleted",{insertion:se}),se&&(h?s._hideClone():s._showClone(y),y!==m&&(v(N,me?me.options.ghostClass:s.options.ghostClass,!1),v(N,c.ghostClass,!0)),me!==y&&y!==I.active?me=y:y===I.active&&me&&(me=null),m===y&&(y._ignoreWhileAnimating=l),y.animateAll(function(){_("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(l===N&&!N.animated||l===t&&!l.animated)&&(ot=null),!c.dragoverBubble&&!n.rootEl&&l!==document&&(N.parentNode[pe]._isOutsideThisEl(n.target),!se&&Ge(n)),!c.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),u=!0}function w(){be=oe(N),Fe=oe(N,c.draggable),ge({sortable:y,name:"change",toEl:t,newIndex:be,newDraggableIndex:Fe,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),l=xe(l,c.draggable,t,!0),_("dragOver"),I.eventCanceled)return u;if(N.contains(n.target)||l.animated&&l.animatingX&&l.animatingY||y._ignoreWhileAnimating===l)return V(!1);if(It=!1,s&&!c.disabled&&(h?f||(i=ne!==Z):me===this||(this.lastPutMode=Tt.checkPull(this,s,N,n))&&p.checkPut(this,s,N,n))){if(d=this._getDirection(n,l)==="vertical",r=J(N),_("dragOverValid"),I.eventCanceled)return u;if(i)return ne=Z,g(),this._hideClone(),_("revert"),I.eventCanceled||(qe?Z.insertBefore(N,qe):Z.appendChild(N)),V(!0);var b=eo(t,c.draggable);if(!b||Zr(n,d,this)&&!b.animated){if(b===N)return V(!1);if(b&&t===n.target&&(l=b),l&&(a=J(l)),Ut(Z,t,N,r,l,a,n,!!l)!==!1)return g(),b&&b.nextSibling?t.insertBefore(N,b.nextSibling):t.appendChild(N),ne=t,w(),V(!0)}else if(b&&Kr(n,d,this)){var C=Qe(t,0,c,!0);if(C===N)return V(!1);if(l=C,a=J(l),Ut(Z,t,N,r,l,a,n,!1)!==!1)return g(),t.insertBefore(N,C),ne=t,w(),V(!0)}else if(l.parentNode===t){a=J(l);var x=0,E,L=N.parentNode!==t,z=!Gr(N.animated&&N.toRect||r,l.animated&&l.toRect||a,d),D=d?"top":"left",$=Lo(l,"top","top")||Lo(N,"top","top"),F=$?$.scrollTop:void 0;ot!==l&&(E=a[D],gt=!1,At=!z&&c.invertSwap||L),x=Qr(n,l,a,d,z?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,At,ot===l);var S;if(x!==0){var R=oe(N);do R-=x,S=ne.children[R];while(S&&(M(S,"display")==="none"||S===O))}if(x===0||S===l)return V(!1);ot=l,ut=x;var j=l.nextElementSibling,W=!1;W=x===1;var le=Ut(Z,t,N,r,l,a,n,W);if(le!==!1)return(le===1||le===-1)&&(W=le===1),so=!0,setTimeout(Jr,30),g(),W&&!j?t.appendChild(N):l.parentNode.insertBefore(N,W?j:l),$&&Po($,0,F-$.scrollTop),ne=N.parentNode,E!==void 0&&!At&&(Ot=Math.abs(E-J(l)[D])),w(),V(!0)}if(t.contains(N))return V(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){U(document,"mousemove",this._onTouchMove),U(document,"touchmove",this._onTouchMove),U(document,"pointermove",this._onTouchMove),U(document,"dragover",Ge),U(document,"mousemove",Ge),U(document,"touchmove",Ge)},_offUpEvents:function(){var n=this.el.ownerDocument;U(n,"mouseup",this._onDrop),U(n,"touchend",this._onDrop),U(n,"pointerup",this._onDrop),U(n,"touchcancel",this._onDrop),U(document,"selectstart",this)},_onDrop:function(n){var t=this.el,l=this.options;if(be=oe(N),Fe=oe(N,l.draggable),_e("drop",this,{evt:n}),ne=N&&N.parentNode,be=oe(N),Fe=oe(N,l.draggable),I.eventCanceled){this._nulling();return}tt=!1,At=!1,gt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),po(this.cloneId),po(this._dragStartId),this.nativeDraggable&&(U(document,"drop",this),U(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ct&&M(document.body,"user-select",""),M(N,"transform",""),n&&(ht&&(n.cancelable&&n.preventDefault(),!l.dropBubble&&n.stopPropagation()),O&&O.parentNode&&O.parentNode.removeChild(O),(Z===ne||me&&me.lastPutMode!=="clone")&&ee&&ee.parentNode&&ee.parentNode.removeChild(ee),N&&(this.nativeDraggable&&U(N,"dragend",this),co(N),N.style["will-change"]="",ht&&!tt&&v(N,me?me.options.ghostClass:this.options.ghostClass,!1),v(N,this.options.chosenClass,!1),ge({sortable:this,name:"unchoose",toEl:ne,newIndex:null,newDraggableIndex:null,originalEvent:n}),Z!==ne?(be>=0&&(ge({rootEl:ne,name:"add",toEl:ne,fromEl:Z,originalEvent:n}),ge({sortable:this,name:"remove",toEl:ne,originalEvent:n}),ge({rootEl:ne,name:"sort",toEl:ne,fromEl:Z,originalEvent:n}),ge({sortable:this,name:"sort",toEl:ne,originalEvent:n})),me&&me.save()):be!==et&&be>=0&&(ge({sortable:this,name:"update",toEl:ne,originalEvent:n}),ge({sortable:this,name:"sort",toEl:ne,originalEvent:n})),I.active&&((be==null||be===-1)&&(be=et,Fe=ft),ge({sortable:this,name:"end",toEl:ne,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){_e("nulling",this),Z=N=ne=O=qe=ee=$t=Pe=je=Be=ht=be=Fe=et=ft=ot=ut=me=Tt=I.dragged=I.ghost=I.clone=I.active=null,Pt.forEach(function(n){n.checked=!0}),Pt.length=ro=ao=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":N&&(this._onDragOver(n),Xr(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],t,l=this.el.children,r=0,a=l.length,i=this.options;r<a;r++)t=l[r],xe(t,i.draggable,this.el,!1)&&n.push(t.getAttribute(i.dataIdAttr)||ea(t));return n},sort:function(n,t){var l={},r=this.el;this.toArray().forEach(function(a,i){var c=r.children[i];xe(c,this.options.draggable,r,!1)&&(l[a]=c)},this),t&&this.captureAnimationState(),n.forEach(function(a){l[a]&&(r.removeChild(l[a]),r.appendChild(l[a]))}),t&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,t){return xe(n,t||this.options.draggable,this.el,!1)},option:function(n,t){var l=this.options;if(t===void 0)return l[n];var r=pt.modifyOption(this,n,t);typeof r<"u"?l[n]=r:l[n]=t,n==="group"&&Wo(l)},destroy:function(){_e("destroy",this);var n=this.el;n[pe]=null,U(n,"mousedown",this._onTapStart),U(n,"touchstart",this._onTapStart),U(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(U(n,"dragover",this),U(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Lt.splice(Lt.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!Pe){if(_e("hideClone",this),I.eventCanceled)return;M(ee,"display","none"),this.options.removeCloneOnHide&&ee.parentNode&&ee.parentNode.removeChild(ee),Pe=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(Pe){if(_e("showClone",this),I.eventCanceled)return;N.parentNode==Z&&!this.options.group.revertClone?Z.insertBefore(ee,N):qe?Z.insertBefore(ee,qe):Z.appendChild(ee),this.options.group.revertClone&&this.animate(N,ee),M(ee,"display",""),Pe=!1}}};function Xr(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function Ut(o,n,t,l,r,a,i,c){var p,s=o[pe],h=s.options.onMove,f;return window.CustomEvent&&!Ie&&!st?p=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(p=document.createEvent("Event"),p.initEvent("move",!0,!0)),p.to=n,p.from=o,p.dragged=t,p.draggedRect=l,p.related=r||n,p.relatedRect=a||J(n),p.willInsertAfter=c,p.originalEvent=i,o.dispatchEvent(p),h&&(f=h.call(s,p,i)),f}function co(o){o.draggable=!1}function Jr(){so=!1}function Kr(o,n,t){var l=J(Qe(t.el,0,t.options,!0)),r=Ro(t.el,t.options,O),a=10;return n?o.clientX<r.left-a||o.clientY<l.top&&o.clientX<l.right:o.clientY<r.top-a||o.clientY<l.bottom&&o.clientX<l.left}function Zr(o,n,t){var l=J(eo(t.el,t.options.draggable)),r=Ro(t.el,t.options,O),a=10;return n?o.clientX>r.right+a||o.clientY>l.bottom&&o.clientX>l.left:o.clientY>r.bottom+a||o.clientX>l.right&&o.clientY>l.top}function Qr(o,n,t,l,r,a,i,c){var p=l?o.clientY:o.clientX,s=l?t.height:t.width,h=l?t.top:t.left,f=l?t.bottom:t.right,m=!1;if(!i){if(c&&Ot<s*r){if(!gt&&(ut===1?p>h+s*a/2:p<f-s*a/2)&&(gt=!0),gt)m=!0;else if(ut===1?p<h+Ot:p>f-Ot)return-ut}else if(p>h+s*(1-r)/2&&p<f-s*(1-r)/2)return vr(n)}return m=m||i,m&&(p<h+s*a/2||p>f-s*a/2)?p>h+s/2?1:-1:0}function vr(o){return oe(N)<oe(o)?1:-1}function ea(o){for(var n=o.tagName+o.className+o.src+o.href+o.textContent,t=n.length,l=0;t--;)l+=n.charCodeAt(t);return l.toString(36)}function ta(o){Pt.length=0;for(var n=o.getElementsByTagName("input"),t=n.length;t--;){var l=n[t];l.checked&&Pt.push(l)}}function Ht(o){return setTimeout(o,0)}function po(o){return clearTimeout(o)}Ft&&q(document,"touchmove",function(o){(I.active||tt)&&o.cancelable&&o.preventDefault()}),I.utils={on:q,off:U,css:M,find:Io,is:function(n,t){return!!xe(n,t,n,!1)},extend:Pr,throttle:Oo,closest:xe,toggleClass:v,clone:oo,index:oe,nextTick:Ht,cancelNextTick:po,detectDirection:Go,getChild:Qe,expando:pe},I.get=function(o){return o[pe]},I.mount=function(){for(var o=arguments.length,n=new Array(o),t=0;t<o;t++)n[t]=arguments[t];n[0].constructor===Array&&(n=n[0]),n.forEach(function(l){if(!l.prototype||!l.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(l));l.utils&&(I.utils=Me(Me({},I.utils),l.utils)),pt.mount(l)})},I.create=function(o,n){return new I(o,n)},I.version=Ar;var ie=[],_t,mo,fo=!1,ho,uo,qt,wt;function oa(){function o(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return o.prototype={dragStarted:function(t){var l=t.originalEvent;this.sortable.nativeDraggable?q(document,"dragover",this._handleAutoScroll):this.options.supportPointer?q(document,"pointermove",this._handleFallbackAutoScroll):l.touches?q(document,"touchmove",this._handleFallbackAutoScroll):q(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var l=t.originalEvent;!this.options.dragOverBubble&&!l.rootEl&&this._handleAutoScroll(l)},drop:function(){this.sortable.nativeDraggable?U(document,"dragover",this._handleAutoScroll):(U(document,"pointermove",this._handleFallbackAutoScroll),U(document,"touchmove",this._handleFallbackAutoScroll),U(document,"mousemove",this._handleFallbackAutoScroll)),Jo(),jt(),Fr()},nulling:function(){qt=mo=_t=fo=wt=ho=uo=null,ie.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,l){var r=this,a=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,c=document.elementFromPoint(a,i);if(qt=t,l||this.options.forceAutoScrollFallback||st||Ie||ct){go(t,this.options,c,l);var p=Oe(c,!0);fo&&(!wt||a!==ho||i!==uo)&&(wt&&Jo(),wt=setInterval(function(){var s=Oe(document.elementFromPoint(a,i),!0);s!==p&&(p=s,jt()),go(t,r.options,s,l)},10),ho=a,uo=i)}else{if(!this.options.bubbleScroll||Oe(c,!0)===ze()){jt();return}go(t,this.options,Oe(c,!1),!1)}}},ke(o,{pluginName:"scroll",initializeByDefault:!0})}function jt(){ie.forEach(function(o){clearInterval(o.pid)}),ie=[]}function Jo(){clearInterval(wt)}var go=Oo(function(o,n,t,l){if(n.scroll){var r=(o.touches?o.touches[0]:o).clientX,a=(o.touches?o.touches[0]:o).clientY,i=n.scrollSensitivity,c=n.scrollSpeed,p=ze(),s=!1,h;mo!==t&&(mo=t,jt(),_t=n.scroll,h=n.scrollFn,_t===!0&&(_t=Oe(t,!0)));var f=0,m=_t;do{var d=m,y=J(d),u=y.top,_=y.bottom,g=y.left,V=y.right,w=y.width,b=y.height,C=void 0,x=void 0,E=d.scrollWidth,L=d.scrollHeight,z=M(d),D=d.scrollLeft,$=d.scrollTop;d===p?(C=w<E&&(z.overflowX==="auto"||z.overflowX==="scroll"||z.overflowX==="visible"),x=b<L&&(z.overflowY==="auto"||z.overflowY==="scroll"||z.overflowY==="visible")):(C=w<E&&(z.overflowX==="auto"||z.overflowX==="scroll"),x=b<L&&(z.overflowY==="auto"||z.overflowY==="scroll"));var F=C&&(Math.abs(V-r)<=i&&D+w<E)-(Math.abs(g-r)<=i&&!!D),S=x&&(Math.abs(_-a)<=i&&$+b<L)-(Math.abs(u-a)<=i&&!!$);if(!ie[f])for(var R=0;R<=f;R++)ie[R]||(ie[R]={});(ie[f].vx!=F||ie[f].vy!=S||ie[f].el!==d)&&(ie[f].el=d,ie[f].vx=F,ie[f].vy=S,clearInterval(ie[f].pid),(F!=0||S!=0)&&(s=!0,ie[f].pid=setInterval((function(){l&&this.layer===0&&I.active._onTouchMove(qt);var j=ie[this.layer].vy?ie[this.layer].vy*c:0,W=ie[this.layer].vx?ie[this.layer].vx*c:0;typeof h=="function"&&h.call(I.dragged.parentNode[pe],W,j,o,qt,ie[this.layer].el)!=="continue"||Po(ie[this.layer].el,W,j)}).bind({layer:f}),24))),f++}while(n.bubbleScroll&&m!==p&&(m=Oe(m,!1)));fo=s}},30),Ko=function(n){var t=n.originalEvent,l=n.putSortable,r=n.dragEl,a=n.activeSortable,i=n.dispatchSortableEvent,c=n.hideGhostForTarget,p=n.unhideGhostForTarget;if(t){var s=l||a;c();var h=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(h.clientX,h.clientY);p(),s&&!s.el.contains(f)&&(i("spill"),this.onSpill({dragEl:r,putSortable:l}))}};function _o(){}_o.prototype={startIndex:null,dragStart:function(n){var t=n.oldDraggableIndex;this.startIndex=t},onSpill:function(n){var t=n.dragEl,l=n.putSortable;this.sortable.captureAnimationState(),l&&l.captureAnimationState();var r=Qe(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),l&&l.animateAll()},drop:Ko},ke(_o,{pluginName:"revertOnSpill"});function wo(){}wo.prototype={onSpill:function(n){var t=n.dragEl,l=n.putSortable,r=l||this.sortable;r.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),r.animateAll()},drop:Ko},ke(wo,{pluginName:"removeOnSpill"});var Ee;function na(){function o(){this.defaults={swapClass:"sortable-swap-highlight"}}return o.prototype={dragStart:function(t){var l=t.dragEl;Ee=l},dragOverValid:function(t){var l=t.completed,r=t.target,a=t.onMove,i=t.activeSortable,c=t.changed,p=t.cancel;if(i.options.swap){var s=this.sortable.el,h=this.options;if(r&&r!==s){var f=Ee;a(r)!==!1?(v(r,h.swapClass,!0),Ee=r):Ee=null,f&&f!==Ee&&v(f,h.swapClass,!1)}c(),l(!0),p()}},drop:function(t){var l=t.activeSortable,r=t.putSortable,a=t.dragEl,i=r||this.sortable,c=this.options;Ee&&v(Ee,c.swapClass,!1),Ee&&(c.swap||r&&r.options.swap)&&a!==Ee&&(i.captureAnimationState(),i!==l&&l.captureAnimationState(),la(a,Ee),i.animateAll(),i!==l&&l.animateAll())},nulling:function(){Ee=null}},ke(o,{pluginName:"swap",eventProperties:function(){return{swapItem:Ee}}})}function la(o,n){var t=o.parentNode,l=n.parentNode,r,a;!t||!l||t.isEqualNode(n)||l.isEqualNode(o)||(r=oe(o),a=oe(n),t.isEqualNode(l)&&r<a&&a++,t.insertBefore(n,t.children[r]),l.insertBefore(o,l.children[a]))}var P=[],Ve=[],yt,De,Ct=!1,we=!1,nt=!1,X,bt,Gt;function ra(){function o(n){for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this));n.options.avoidImplicitDeselect||(n.options.supportPointer?q(document,"pointerup",this._deselectMultiDrag):(q(document,"mouseup",this._deselectMultiDrag),q(document,"touchend",this._deselectMultiDrag))),q(document,"keydown",this._checkKeyDown),q(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(r,a){var i="";P.length&&De===n?P.forEach(function(c,p){i+=(p?", ":"")+c.textContent}):i=a.textContent,r.setData("Text",i)}}}return o.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var l=t.dragEl;X=l},delayEnded:function(){this.isMultiDrag=~P.indexOf(X)},setupClone:function(t){var l=t.sortable,r=t.cancel;if(this.isMultiDrag){for(var a=0;a<P.length;a++)Ve.push(oo(P[a])),Ve[a].sortableIndex=P[a].sortableIndex,Ve[a].draggable=!1,Ve[a].style["will-change"]="",v(Ve[a],this.options.selectedClass,!1),P[a]===X&&v(Ve[a],this.options.chosenClass,!1);l._hideClone(),r()}},clone:function(t){var l=t.sortable,r=t.rootEl,a=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||P.length&&De===l&&(Zo(!0,r),a("clone"),i()))},showClone:function(t){var l=t.cloneNowShown,r=t.rootEl,a=t.cancel;this.isMultiDrag&&(Zo(!1,r),Ve.forEach(function(i){M(i,"display","")}),l(),Gt=!1,a())},hideClone:function(t){var l=this;t.sortable;var r=t.cloneNowHidden,a=t.cancel;this.isMultiDrag&&(Ve.forEach(function(i){M(i,"display","none"),l.options.removeCloneOnHide&&i.parentNode&&i.parentNode.removeChild(i)}),r(),Gt=!0,a())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&De&&De.multiDrag._deselectMultiDrag(),P.forEach(function(l){l.sortableIndex=oe(l)}),P=P.sort(function(l,r){return l.sortableIndex-r.sortableIndex}),nt=!0},dragStarted:function(t){var l=this,r=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(r.captureAnimationState(),this.options.animation)){P.forEach(function(i){i!==X&&M(i,"position","absolute")});var a=J(X,!1,!0,!0);P.forEach(function(i){i!==X&&Fo(i,a)}),we=!0,Ct=!0}r.animateAll(function(){we=!1,Ct=!1,l.options.animation&&P.forEach(function(i){no(i)}),l.options.sort&&Wt()})}},dragOver:function(t){var l=t.target,r=t.completed,a=t.cancel;we&&~P.indexOf(l)&&(r(!1),a())},revert:function(t){var l=t.fromSortable,r=t.rootEl,a=t.sortable,i=t.dragRect;P.length>1&&(P.forEach(function(c){a.addAnimationState({target:c,rect:we?J(c):i}),no(c),c.fromRect=i,l.removeAnimationState(c)}),we=!1,aa(!this.options.removeCloneOnHide,r))},dragOverCompleted:function(t){var l=t.sortable,r=t.isOwner,a=t.insertion,i=t.activeSortable,c=t.parentEl,p=t.putSortable,s=this.options;if(a){if(r&&i._hideClone(),Ct=!1,s.animation&&P.length>1&&(we||!r&&!i.options.sort&&!p)){var h=J(X,!1,!0,!0);P.forEach(function(m){m!==X&&(Fo(m,h),c.appendChild(m))}),we=!0}if(!r)if(we||Wt(),P.length>1){var f=Gt;i._showClone(l),i.options.animation&&!Gt&&f&&Ve.forEach(function(m){i.addAnimationState({target:m,rect:bt}),m.fromRect=bt,m.thisAnimationDuration=null})}else i._showClone(l)}},dragOverAnimationCapture:function(t){var l=t.dragRect,r=t.isOwner,a=t.activeSortable;if(P.forEach(function(c){c.thisAnimationDuration=null}),a.options.animation&&!r&&a.multiDrag.isMultiDrag){bt=ke({},l);var i=He(X,!0);bt.top-=i.f,bt.left-=i.e}},dragOverAnimationComplete:function(){we&&(we=!1,Wt())},drop:function(t){var l=t.originalEvent,r=t.rootEl,a=t.parentEl,i=t.sortable,c=t.dispatchSortableEvent,p=t.oldIndex,s=t.putSortable,h=s||this.sortable;if(l){var f=this.options,m=a.children;if(!nt)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),v(X,f.selectedClass,!~P.indexOf(X)),~P.indexOf(X))P.splice(P.indexOf(X),1),yt=null,mt({sortable:i,rootEl:r,name:"deselect",targetEl:X,originalEvent:l});else{if(P.push(X),mt({sortable:i,rootEl:r,name:"select",targetEl:X,originalEvent:l}),l.shiftKey&&yt&&i.el.contains(yt)){var d=oe(yt),y=oe(X);if(~d&&~y&&d!==y){var u,_;for(y>d?(_=d,u=y):(_=y,u=d+1);_<u;_++)~P.indexOf(m[_])||(v(m[_],f.selectedClass,!0),P.push(m[_]),mt({sortable:i,rootEl:r,name:"select",targetEl:m[_],originalEvent:l}))}}else yt=X;De=h}if(nt&&this.isMultiDrag){if(we=!1,(a[pe].options.sort||a!==r)&&P.length>1){var g=J(X),V=oe(X,":not(."+this.options.selectedClass+")");if(!Ct&&f.animation&&(X.thisAnimationDuration=null),h.captureAnimationState(),!Ct&&(f.animation&&(X.fromRect=g,P.forEach(function(b){if(b.thisAnimationDuration=null,b!==X){var C=we?J(b):g;b.fromRect=C,h.addAnimationState({target:b,rect:C})}})),Wt(),P.forEach(function(b){m[V]?a.insertBefore(b,m[V]):a.appendChild(b),V++}),p===oe(X))){var w=!1;P.forEach(function(b){if(b.sortableIndex!==oe(b)){w=!0;return}}),w&&(c("update"),c("sort"))}P.forEach(function(b){no(b)}),h.animateAll()}De=h}(r===a||s&&s.lastPutMode!=="clone")&&Ve.forEach(function(b){b.parentNode&&b.parentNode.removeChild(b)})}},nullingGlobal:function(){this.isMultiDrag=nt=!1,Ve.length=0},destroyGlobal:function(){this._deselectMultiDrag(),U(document,"pointerup",this._deselectMultiDrag),U(document,"mouseup",this._deselectMultiDrag),U(document,"touchend",this._deselectMultiDrag),U(document,"keydown",this._checkKeyDown),U(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(typeof nt<"u"&&nt)&&De===this.sortable&&!(t&&xe(t.target,this.options.draggable,this.sortable.el,!1))&&!(t&&t.button!==0))for(;P.length;){var l=P[0];v(l,this.options.selectedClass,!1),P.shift(),mt({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:l,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},ke(o,{pluginName:"multiDrag",utils:{select:function(t){var l=t.parentNode[pe];!l||!l.options.multiDrag||~P.indexOf(t)||(De&&De!==l&&(De.multiDrag._deselectMultiDrag(),De=l),v(t,l.options.selectedClass,!0),P.push(t))},deselect:function(t){var l=t.parentNode[pe],r=P.indexOf(t);!l||!l.options.multiDrag||!~r||(v(t,l.options.selectedClass,!1),P.splice(r,1))}},eventProperties:function(){var t=this,l=[],r=[];return P.forEach(function(a){l.push({multiDragElement:a,index:a.sortableIndex});var i;we&&a!==X?i=-1:we?i=oe(a,":not(."+t.options.selectedClass+")"):i=oe(a),r.push({multiDragElement:a,index:i})}),{items:zr(P),clones:[].concat(Ve),oldIndicies:l,newIndicies:r}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),t==="ctrl"?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function aa(o,n){P.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function Zo(o,n){Ve.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function Wt(){P.forEach(function(o){o!==X&&o.parentNode&&o.parentNode.removeChild(o)})}I.mount(new oa),I.mount(wo,_o);function We(o){o.parentElement!==null&&o.parentElement.removeChild(o)}function Vt(o,n,t){const l=t===0?o.children[0]:o.children[t-1].nextSibling;o.insertBefore(n,l)}function ia(){return typeof window<"u"?window.console:global.console}const sa=ia();function ca(o){const n=Object.create(null);return function(l){return n[l]||(n[l]=o(l))}}const da=/-(\w)/g,pa=ca(o=>o.replace(da,(n,t)=>t.toUpperCase())),Qo=["Start","Add","Remove","Update","End"],vo=["Choose","Unchoose","Sort","Filter","Clone","Select","Deselect"],en=["Move"],ma=[en,Qo,vo].flatMap(o=>o).map(o=>`on${o}`),yo={manage:en,manageAndEmit:Qo,emit:vo};function fa(o){return ma.indexOf(o)!==-1}const ha=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function ua(o){return ha.includes(o)}function ga(o){return["transition-group","TransitionGroup"].includes(o)}function tn(o){return["id","class","role","style"].includes(o)||o.startsWith("data-")||o.startsWith("aria-")||o.startsWith("on")}function on(o){return o.reduce((n,[t,l])=>(n[t]=l,n),{})}function _a({$attrs:o,componentData:n={}}){return{...on(Object.entries(o).filter(([l,r])=>tn(l))),...n}}function wa({$attrs:o,callBackBuilder:n}){const t=on(nn(o));Object.entries(n).forEach(([r,a])=>{yo[r].forEach(i=>{t[`on${i}`]=a(i)})});const l=`>[data-draggable]${t.draggable||""}`;return{...t,draggable:l}}function nn(o){return Object.entries(o).filter(([n,t])=>!tn(n)).map(([n,t])=>[pa(n),t]).filter(([n,t])=>!fa(n))}const ln=({el:o})=>o,ya=(o,n)=>o.__draggable_context=n,rn=o=>o.__draggable_context;class Ca{constructor({nodes:{header:n,default:t,footer:l},root:r,realList:a}){this.defaultNodes=t,this.children=[...n,...t,...l],this.externalComponent=r.externalComponent,this.rootTransition=r.transition,this.tag=r.tag,this.realList=a}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(n,t){const{tag:l,children:r,_isRootComponent:a}=this;return n(l,t,a?{default:()=>r}:r)}updated(){const{defaultNodes:n,realList:t}=this;n.forEach((l,r)=>{ya(ln(l),{element:t[r],index:r})})}getUnderlyingVm(n){return rn(n)}getVmIndexFromDomIndex(n,t){const{defaultNodes:l}=this,{length:r}=l,a=t.children,i=a.item(n);if(i===null)return r;const c=rn(i);if(c)return c.index;if(r===0)return 0;const p=ln(l[0]),s=[...a].findIndex(h=>h===p);return n<s?0:r}}function ba(o,n){const t=o[n];return t?t():[]}function Va({$slots:o,realList:n,getKey:t,itemDataSet:l}){let r;switch(typeof l){case"function":r=l;break;case"object":r=()=>l;break}const a=n||[],[i,c]=["header","footer"].map(h=>ba(o,h)),{item:p}=o;if(!p)throw new Error("draggable element must have an item slot");const s=a.flatMap((h,f)=>p({element:h,index:f}).map(m=>{m.key=t(h);const d=r==null?void 0:r(h);return d?m.props={...m.props||{},"data-draggable":!0,...d}:m.props={...m.props||{},"data-draggable":!0},m}));if(s.length!==a.length)throw new Error("Item slot must have only one child");return{header:i,footer:c,default:s}}function ka(o){const n=ga(o),t=!ua(o)&&!n;return{transition:n,externalComponent:t,tag:t?e.resolveComponent(o):n?e.TransitionGroup:o}}function xa({$slots:o,tag:n,realList:t,getKey:l,itemDataSet:r}){const a=Va({$slots:o,realList:t,getKey:l,itemDataSet:r}),i=ka(n);return new Ca({nodes:a,root:i,realList:t})}function an(o,n){e.nextTick(()=>this.$emit(o.toLowerCase(),n))}function sn(o){return(n,t)=>{if(this.realList!==null)return this[`onDrag${o}`](n,t)}}function Ea(o){const n=sn.call(this,o);return(t,l)=>{n.call(this,t,l),an.call(this,o,t)}}function Co(o,n){const t=new I(o,n);return n.swap&&!t.swap?(I.mount(new na),t.destroy(),Co(o,n)):n.multiDrag&&!t.multiDrag?(I.mount(new ra),t.destroy(),Co(o,n)):t}function Na(o,n){return Array.from(o).reverse().map(({index:t})=>t-n)}let bo=null;const Ba={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:o=>o},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Da=["update:modelValue","change",...[...yo.manageAndEmit,...yo.emit].map(o=>o.toLowerCase())],lt=e.defineComponent({name:"draggable",inheritAttrs:!1,props:Ba,emits:Da,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:o,$attrs:n,tag:t,componentData:l,realList:r,getKey:a}=this,i=xa({$slots:o,tag:t,realList:r,getKey:a,itemDataSet:n.itemDataSet});this.componentStructure=i;const c=_a({$attrs:n,componentData:l});return i.render(e.h,c)}catch(o){return this.error=!0,e.h("pre",{style:{color:"red"}},o.stack)}},created(){this.list!==null&&this.modelValue!==null&&sa.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:o,$el:n,componentStructure:t}=this;t.updated();const l=wa({$attrs:o,callBackBuilder:{manageAndEmit:a=>Ea.call(this,a),emit:a=>an.bind(this,a),manage:a=>sn.call(this,a)}}),r=n.nodeType===1?n:n.parentElement;this._sortable=Co(r,l),this.targetDomElement=r,r.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:o}=this;return o||this.modelValue},getKey(){const{itemKey:o}=this;return typeof o=="function"?o:n=>n[o]}},watch:{$attrs:{handler(o){const{_sortable:n}=this;n&&nn(o).forEach(([t,l])=>{n.option(t,l)})},deep:!0}},methods:{getUnderlyingVm(o){return this.componentStructure.getUnderlyingVm(o)||null},getUnderlyingPotencialDraggableComponent(o){return o.__draggable_component__},emitChanges(o){e.nextTick(()=>this.$emit("change",o))},alterList(o){if(this.list){o(this.list);return}const n=[...this.modelValue];o(n),this.$emit("update:modelValue",n)},spliceList(){const o=n=>n.splice(...arguments);this.alterList(o)},removeAllFromList(o){const n=t=>o.forEach(l=>t.splice(l,1));this.alterList(n)},swapPosition(o,n){const t=l=>{const r=l[o];l[o]=l[n],l[n]=r};this.alterList(t)},updatePosition(o,n){const t=l=>l.splice(n,0,l.splice(o,1)[0]);this.alterList(t)},updatePositions(o,n){const t=l=>{const r=o.sort().reverse().flatMap(a=>l.splice(a,1)).reverse();return l.splice(n,0,...r)};this.alterList(t)},getRelatedContextFromMoveEvent({to:o,related:n}){const t=this.getUnderlyingPotencialDraggableComponent(o);if(!t)return{component:t};const l=t.realList,r={list:l,component:t};return o!==n&&l?{...t.getUnderlyingVm(n)||{},...r}:r},getVmIndexFromDomIndex(o){return this.componentStructure.getVmIndexFromDomIndex(o,this.targetDomElement)},onDragStart(o){if(Array.isArray(o.items)&&o.items.length){this.multidragContexts=o.items.map(t=>this.getUnderlyingVm(t));const n=this.multidragContexts.sort(({index:t},{index:l})=>t-l).map(t=>t.element);o.item._underlying_vm_multidrag_=this.clone(n)}this.context=this.getUnderlyingVm(o.item),o.item._underlying_vm_=this.clone(this.context.element),bo=o.item},onDragAdd(o){Array.isArray(o.items)&&o.items.length?this.onDragAddMulti(o):this.onDragAddSingle(o)},onDragAddMulti(o){const n=o.item._underlying_vm_multidrag_;if(n===void 0)return;o.items.forEach(r=>We(r));const t=this.getVmIndexFromDomIndex(o.newIndex);this.spliceList(t,0,...n);const l=n.map((r,a)=>({element:r,newIndex:t+a}));this.emitChanges({added:l})},onDragAddSingle(o){const n=this._sortable.options&&this._sortable.options.swap,t=o.item._underlying_vm_;if(t===void 0)return;const l=n?o.from.children[o.oldIndex]:null;We(o.item);let r=this.getVmIndexFromDomIndex(o.newIndex);n&&(r=r===0?0:r-1),this.spliceList(r,n?1:0,t);const a={element:t,newIndex:r,from:o.from,to:o.to};if(o.swap||(this.emitChanges({added:a}),!n))return;const i={to:o.from,from:o.to,item:l,oldIndex:o.newIndex,newIndex:o.oldIndex,swap:!0};e.nextTick(()=>{const c=i.to.__draggable_component__;c.onDragStart(i),c.onDragAdd(i)})},onDragRemove(o){Array.isArray(o.items)&&o.items.length?this.onDragRemoveMulti(o):this.onDragRemoveSingle(o)},onDragRemoveMulti(o){const n=(this.$slots.header?this.$slots.header():[]).length||0,t=o.oldIndicies.sort(({index:a},{index:i})=>a-i);if(t.forEach(({multiDragElement:a,index:i})=>{Vt(this.$el,a,i),a.parentNode&&I.utils.deselect(a)}),o.pullMode==="clone"){o.clones.forEach(a=>We(a));return}const l=Na(t,n);this.removeAllFromList(l);const r=l.sort().map(a=>({element:this.multidragContexts.find(c=>c.index===a).element,oldIndex:a}));this.emitChanges({removed:r})},onDragRemoveSingle(o){const{index:n,element:t}=this.context,l={element:t,oldIndex:n,from:o.from,to:o.to};if(this._sortable.options&&this._sortable.options.swap)return this.emitChanges({removed:l});if(Vt(this.$el,o.item,o.oldIndex),o.pullMode==="clone"){We(o.clone);return}this.spliceList(n,1),this.emitChanges({removed:l})},onDragUpdate(o){Array.isArray(o.items)&&o.items.length?o.pullMode||this.onDragUpdateMulti(o):this.onDragUpdateSingle(o)},onDragUpdateMulti(o){const{items:n,from:t}=o,l=(this.$slots.header?this.$slots.header():[]).length||0;n.forEach(p=>We(p));const r=Array.from(o.oldIndicies).sort(({index:p},{index:s})=>p-s);r.forEach(p=>Vt(t,p.multiDragElement,p.index));const a=r.map(({index:p})=>p-l),i=this.getVmIndexFromDomIndex(o.newIndex);this.updatePositions(Array.from(a),i);const c=a.map((p,s)=>({element:this.multidragContexts.find(f=>f.index===p).element,oldIndex:p,newIndex:i+s}));this.emitChanges({moved:c})},onDragUpdateSingle(o){const n=this._sortable.options&&this._sortable.options.swap,t=n?o.from.children[o.oldIndex]:null;We(o.item),Vt(o.from,o.item,o.oldIndex),n&&(We(t),Vt(o.from,t,o.newIndex));const l=this.context.index,r=this.getVmIndexFromDomIndex(o.newIndex);n?this.swapPosition(l,r):this.updatePosition(l,r);const a={element:this.context.element,oldIndex:l,newIndex:r};this.emitChanges({moved:a})},computeFutureIndex(o,n){if(!o.element)return 0;const t=[...n.to.children].filter(i=>i.style.display!=="none"),l=t.indexOf(n.related),r=o.component.getVmIndexFromDomIndex(l);return t.indexOf(bo)!==-1||!n.willInsertAfter?r:r+1},onDragMove(o,n){const{move:t,realList:l}=this;if(!t||!l)return!0;const r=this.getRelatedContextFromMoveEvent(o),a=this.computeFutureIndex(r,o),i={...this.context,futureIndex:a},c={...o,relatedContext:r,draggedContext:i};return t(c,n)},onDragEnd(){bo=null},select(o){I.utils.select(o)},deselect(o){I.utils.deselect(o)}}}),{getTempID:Sa}=de();let Se=class{constructor(n,t,l=!1,r=!1){Ce(this,"isEdit");Ce(this,"isInput");Ce(this,"type");Ce(this,"name");Ce(this,"id");Ce(this,"itemID");Ce(this,"itemSourceType");Ce(this,"rules");Ce(this,"props");Ce(this,"excludeFilterConditions");Ce(this,"filterConditionProps");Ce(this,"isLayout",!1);Ce(this,"children");this.type=n,this.name=t,this.isEdit=l,this.isInput=r,this.id=Sa(),this.props={},this.rules=[{message:"必填项",required:!1}],this.excludeFilterConditions=[],this.filterConditionProps=void 0,this.isLayout=!1,this.children=void 0}};const Ma=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;return(l,r)=>{const a=e.resolveComponent("el-color-picker"),i=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-switch"),p=e.resolveComponent("el-option"),s=e.resolveComponent("el-select"),h=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(f,{"label-width":"80px","label-suffix":":",class:"group-layout-props-editor"},{default:e.withCtx(()=>[e.createVNode(i,{label:"背景色"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:e.unref(t).backgroundColor,"onUpdate:modelValue":r[0]||(r[0]=m=>e.unref(t).backgroundColor=m)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"显示边框"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).showBorder,"onUpdate:modelValue":r[1]||(r[1]=m=>e.unref(t).showBorder=m)},null,8,["modelValue"])]),_:1}),e.unref(t).showBorder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{label:"边框样式"},{default:e.withCtx(()=>[e.createVNode(s,{class:"file-size-unit-select",modelValue:e.unref(t).borderStyle,"onUpdate:modelValue":r[2]||(r[2]=m=>e.unref(t).borderStyle=m)},{default:e.withCtx(()=>[e.createVNode(p,{label:"实线边框",value:"solid"}),e.createVNode(p,{label:"虚线边框",value:"dashed"}),e.createVNode(p,{label:"点线边框",value:"dotted"}),e.createVNode(p,{label:"双线边框",value:"double"}),e.createVNode(p,{label:"凹槽边框",value:"groove"}),e.createVNode(p,{label:"脊状边框",value:"ridge"}),e.createVNode(p,{label:"内凹边框",value:"inset"}),e.createVNode(p,{label:"外凸边框",value:"outset"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框颜色"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:e.unref(t).borderColor,"onUpdate:modelValue":r[3]||(r[3]=m=>e.unref(t).borderColor=m)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框宽度"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).borderWidth,"onUpdate:modelValue":r[4]||(r[4]=m=>e.unref(t).borderWidth=m),step:1,min:1,max:20},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框圆角"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).borderRadius,"onUpdate:modelValue":r[5]||(r[5]=m=>e.unref(t).borderRadius=m),step:1,min:0,max:100},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),Ms="",za=["onClick"],$a={key:2,class:"operates"},Vo=e.defineComponent({__name:"componentDesigner",props:{components:{type:Array,required:!0}},emits:["update:components","deleteComponent","change"],setup(o,{emit:n}){const t={...Nt,...St,...Bt,...Dt},{getTempID:l,clone:r}=de(),a=n;let i=e.inject("formData"),c=e.inject("formDesignerData");const p=o,{components:s}=e.toRefs(p);e.watch(s,()=>a("update:components",s),{immediate:!0,deep:!0});const h=u=>{u.added?(f(u.added.element),a("change")):u.moved&&(f(u.moved.element),a("change"))},f=u=>{c.selectComponent=void 0,e.nextTick(()=>c.selectComponent=u)},m=u=>{const _=d(u);s.value.push(_),f(_),a("change")},d=u=>{var g,V;let _=r(u);if(_.id=l(),delete _.itemID,(g=_.props.options)!=null&&g.length){_.props.options.forEach(b=>{b.value.includes("temp-")&&(b.value=l())});let w=new t[u.type].component;_.filterConditionProps=w.getFilterConditionProps(_.props)}if(_.isLayout&&((V=_.children)!=null&&V.length)){let w=[];_.children.forEach(b=>{w.push(d(b))}),_.children=w}return _},y=u=>{let _=r(s.value[u]);s.value.splice(u,1),c.selectComponent=void 0,a("change"),a("deleteComponent",_)};return(u,_)=>{const g=e.resolveComponent("el-form-item"),V=Q;return e.openBlock(),e.createBlock(e.unref(lt),{list:e.unref(s),"item-key":"id",class:"form-draggable",sort:!0,group:{name:"component",pull:!0,put:!0},onChange:h},{item:e.withCtx(({element:w,index:b})=>[e.createElementVNode("div",{onClick:e.withModifiers(C=>f(w),["stop"]),class:e.normalizeClass(["form-item-wrap",{"is-selected":e.unref(c).selectComponent==w},{"is-hidden":!w.props.showFlag}]),style:e.normalizeStyle({width:`${w.props.width*100/e.unref(i).props.column}%`,height:`${w.isLayout&&w.props.height?w.props.height+w.props.heightUnit:"auto"}`,"padding-left":`${w.props.paddingLeft}px`})},[w.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[w.type].renderer),{key:0,isDesigner:"",componentID:w.id,component:e.unref(s)[b],"onUpdate:component":C=>e.unref(s)[b]=C,onDeleteComponent:_[0]||(_[0]=C=>a("deleteComponent",C)),onChange:_[1]||(_[1]=C=>a("change"))},null,40,["componentID","component","onUpdate:component"])):(e.openBlock(),e.createBlock(g,{key:1,prop:w.id,class:e.normalizeClass(["form-item",{"label-new-line":w.props.labelNewLine}]),"label-width":w.props.showLabel?w.props.labelWidth:"0",rules:w.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:w.props.color||"#000000","font-size":w.props.fontSize+"px","font-weight":w.props.isBold?"bold":"normal"})},e.toDisplayString(w.props.showLabel?w.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[w.type].renderer),{isDesigner:"",componentID:w.id,componentProps:w.props,"onUpdate:componentProps":C=>w.props=C,datas:e.unref(i).datas,"onUpdate:datas":_[2]||(_[2]=C=>e.unref(i).datas=C)},null,40,["componentID","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["prop","class","label-width","rules"])),e.unref(c).selectComponent==w?(e.openBlock(),e.createElementBlock("div",$a,[w.allowRepeat?(e.openBlock(),e.createBlock(V,{key:0,name:"copy",color:"#0000ff",onClick:e.withModifiers(C=>m(w),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(V,{name:"delete",color:"#ff0000",onClick:e.withModifiers(C=>y(b),["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],14,za)]),_:1},8,["list"])}}}),zs="",Ta=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},component:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["deleteComponent","change"],setup(o,{emit:n}){const t=o,{component:l,showDescription:r}=e.toRefs(t);!l.value.children&&(l.value.children=[]);const a=e.computed(()=>{let s={"background-color":l.value.props.backgroundColor||""};return l.value.props.showBorder&&(s.border=`${l.value.props.borderWidth}px ${l.value.props.borderStyle} ${l.value.props.borderColor}`),l.value.props.borderRadius&&(s["border-radius"]=`${l.value.props.borderRadius}px`),s}),i=n,c=s=>{i("deleteComponent",s)},p=()=>{i("change")};return(s,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["layout","group-layout-component",{"is-designer":o.isDesigner}]),style:e.normalizeStyle(e.unref(a))},[e.unref(l).props.showLabel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-title",style:e.normalizeStyle({color:e.unref(l).props.color,"font-size":e.unref(l).props.fontSize+"px","font-weight":e.unref(l).props.isBold?"bold":"normal"})},e.toDisplayString(e.unref(l).props.label),5)):e.createCommentVNode("",!0),o.isDesigner?(e.openBlock(),e.createBlock(Vo,{key:1,components:e.unref(l).children,"onUpdate:components":h[0]||(h[0]=f=>e.unref(l).children=f),onDeleteComponent:c,onChange:p},null,8,["components"])):(e.openBlock(),e.createBlock(xo,{key:2,components:e.unref(l).children,showDescription:e.unref(r)},null,8,["components","showDescription"]))],6))}}),$s="",Ia={component:class extends Se{constructor(){super("groupLayout","分组"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"分组名称",fontSize:14,isBold:!0,color:"#000000",showFlag:!0,backgroundColor:"#ffffff",showBorder:!1,borderStyle:"solid",borderColor:"#cccccc",borderWidth:1,borderRadius:0},this.isLayout=!0,this.children=[]}},renderer:Ta,propEditor:Ma},La={class:"dictionary-binder"},Aa={class:"item"},Oa={class:"label"},Pa={key:0,class:"item-souce-type"},Yt=e.defineComponent({__name:"dictionaryBinder",props:{modelValue:{type:String,required:!0},dictionary:{type:Object,default:()=>{}},placeholder:{type:String,default:"请输入内容"},itemHeight:{type:Number,default:34},height:{type:String,default:"20px"},disabled:{type:Boolean,default:!1},allowCreateDictionary:{type:Boolean,default:!0}},emits:["update:modelValue","change"],setup(o,{emit:n}){var d;e.useCssVars(y=>({c9ee9b68:o.height}));let t=e.inject("defaultSourceType");const l=o,r=e.ref(),a=e.ref(l.modelValue),i=(d=l.dictionary)==null?void 0:d.souceTypeMap;r.value=(i==null?void 0:i.size)>1;let c=e.ref([]);const p=y=>{c.value=y?s(y):l.dictionary.dictionaryItems},s=y=>l.dictionary.dictionaryItems.filter(u=>u.label.toLocaleLowerCase().includes(y.toLocaleLowerCase())),h=n,{getTempID:f}=de(),m=y=>{let u=c.value.find(_=>_.value===y);u||(u={value:f(),label:y,itemSourceType:t}),h("update:modelValue",u.label),h("change",u)};return(y,u)=>{var V;const _=e.resolveComponent("el-select-v2"),g=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",La,[(V=o.dictionary)!=null&&V.dictionaryItems.length?(e.openBlock(),e.createBlock(_,{key:0,modelValue:e.unref(a),"onUpdate:modelValue":u[0]||(u[0]=w=>e.isRef(a)?a.value=w:null),filterable:"","allow-create":o.allowCreateDictionary,"reserve-keyword":!1,remote:"","remote-method":p,placeholder:o.placeholder,options:e.unref(c),"popper-class":"dictionary-binder-popper",placement:"bottom-end","item-height":o.itemHeight,height:o.itemHeight*8,disabled:o.disabled,onChange:m},{default:e.withCtx(({item:w})=>[e.createElementVNode("div",Aa,[e.createElementVNode("span",Oa,e.toDisplayString(w.label),1),e.unref(r)?(e.openBlock(),e.createElementBlock("span",Pa,e.toDisplayString(e.unref(i).get(w.itemSourceType)),1)):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","allow-create","placeholder","options","item-height","height","disabled"])):(e.openBlock(),e.createBlock(g,{key:1,modelValue:e.unref(a),"onUpdate:modelValue":u[1]||(u[1]=w=>e.isRef(a)?a.value=w:null),autosize:{minRows:2,maxRows:5},type:"textarea",disabled:o.disabled,onChange:m},null,8,["modelValue","disabled"]))])}}}),Is="",Fa={class:"page-wrap"},Ra=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}},allowCreateDictionary:{type:Boolean,default:!0}},setup(o){let n=e.inject("formDesignerData"),t=e.inject("defaultSourceType"),l=n.selectComponent.props;l.pages.forEach(p=>{p.itemSourceType=t});const{getTempID:r}=de(),a=()=>{l.pages.push({label:`标签${l.pages.length+1}`,value:r(),itemSourceType:t})},i=p=>{l.pages.splice(p,1)},c=(p,s)=>{s.value=p.value,s.itemSourceType=p.itemSourceType};return(p,s)=>{const h=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),m=e.resolveComponent("el-input"),d=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-divider"),u=Q,_=e.resolveComponent("el-button"),g=e.resolveComponent("el-switch"),V=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(V,{"label-width":"80px","label-suffix":":",class:"tabs-props-editor"},{default:e.withCtx(()=>[e.createVNode(d,{label:"高度"},{default:e.withCtx(()=>[e.createVNode(m,{class:"height-input",type:"number",min:0,modelValue:e.unref(l).height,"onUpdate:modelValue":s[1]||(s[1]=w=>e.unref(l).height=w)},{append:e.withCtx(()=>[e.createVNode(f,{class:"height-unit-select",modelValue:e.unref(l).heightUnit,"onUpdate:modelValue":s[0]||(s[0]=w=>e.unref(l).heightUnit=w),modelModifiers:{number:!0}},{default:e.withCtx(()=>[e.createVNode(h,{value:"px"}),e.createVNode(h,{value:"%"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{label:"标签风格"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).tabType,"onUpdate:modelValue":s[2]||(s[2]=w=>e.unref(l).tabType=w)},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认",value:""}),e.createVNode(h,{label:"卡片",value:"card"}),e.createVNode(h,{label:"选项卡",value:"border-card"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{label:"默认标签"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":s[3]||(s[3]=w=>e.unref(l).defaultValue=w)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).pages,(w,b)=>(e.openBlock(),e.createBlock(h,{key:b,label:w.label,value:String(b)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(y,null,{default:e.withCtx(()=>[e.createTextVNode("标签列表")]),_:1}),e.createVNode(d,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt),{class:"pages",handle:".cursor-move",list:e.unref(l).pages,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:w,index:b})=>[e.createElementVNode("div",Fa,[e.unref(l).pages.length>1?(e.openBlock(),e.createBlock(u,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(Yt,{modelValue:w.label,"onUpdate:modelValue":C=>w.label=C,dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary,placeholder:"请输入标签","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:C=>c(C,w)},null,8,["modelValue","onUpdate:modelValue","dictionary","allowCreateDictionary","disabled","onChange"]),e.unref(n).selectComponent.allowModify&&e.unref(l).pages.length>1?(e.openBlock(),e.createBlock(u,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:C=>i(b)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(d,{key:0,class:"add-page"},{default:e.withCtx(()=>[e.createVNode(_,{class:"add-page-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(u,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(y),e.createVNode(d,{label:"标签位置"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).tabPosition,"onUpdate:modelValue":s[4]||(s[4]=w=>e.unref(l).tabPosition=w)},{default:e.withCtx(()=>[e.createVNode(h,{label:"顶部",value:"top"}),e.createVNode(h,{label:"底部",value:"bottom"}),e.createVNode(h,{label:"左侧",value:"left"}),e.createVNode(h,{label:"右侧",value:"right"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{label:"显示导航"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).showNavigation,"onUpdate:modelValue":s[5]||(s[5]=w=>e.unref(l).showNavigation=w)},null,8,["modelValue"])]),_:1})]),_:1})}}}),Ls="",Ua={key:2,class:"nav-btn"},Ha=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},component:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["deleteComponent","change"],setup(o,{emit:n}){var f;const t=o,{component:l,showDescription:r}=e.toRefs(t),a=e.ref(l.value.props.defaultValue),i=e.ref({});(f=l.value.children)!=null&&f.length&&l.value.children.forEach(m=>{const d=l.value.props.pages.findIndex(u=>u.value===m.props.pageID),y=String(d);i.value[y]||(i.value[y]=[]),i.value[y].push(m)}),e.watch(()=>i.value,()=>{l.value.children=[],Object.keys(i.value).forEach(m=>{i.value[m].forEach(d=>{var y;d.props.pageID=(y=l.value.props.pages[m])==null?void 0:y.value,l.value.children.push(d)})})},{deep:!0}),e.watch(()=>l.value.props.defaultValue,()=>{a.value=l.value.props.defaultValue},{immediate:!0}),e.watch(()=>l.value.props.pages,()=>{let m={};console.log(l.value.props.pages),l.value.props.pages.forEach((d,y)=>{i.value[y]?m[y]=i.value[y]:m[y]=[]}),i.value=m},{immediate:!0,deep:!0});const c=m=>{let d=parseInt(a.value||"0");m==="p"?d-=1:d+=1,a.value=String(d)},p=n,s=m=>{p("deleteComponent",m)},h=()=>{p("change")};return(m,d)=>{const y=e.resolveComponent("el-button"),u=e.resolveComponent("el-tab-pane"),_=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["layout","tabs-layout-component",{"is-designer":o.isDesigner}])},[e.createVNode(_,{class:"tabs-layout",type:e.unref(l).props.tabType,"tab-position":e.unref(l).props.tabPosition,modelValue:e.unref(a),"onUpdate:modelValue":d[2]||(d[2]=g=>e.isRef(a)?a.value=g:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).props.pages,(g,V)=>(e.openBlock(),e.createBlock(u,{key:V,label:g.label,name:String(V)},{default:e.withCtx(()=>[o.isDesigner?(e.openBlock(),e.createBlock(Vo,{key:0,components:e.unref(i)[V],"onUpdate:components":w=>e.unref(i)[V]=w,onDeleteComponent:s,onChange:h},null,8,["components","onUpdate:components"])):(e.openBlock(),e.createBlock(xo,{key:1,components:e.unref(i)[V],showDescription:e.unref(r)},null,8,["components","showDescription"])),e.unref(l).props.showNavigation?(e.openBlock(),e.createElementBlock("div",Ua,[V!==0?(e.openBlock(),e.createBlock(y,{key:0,onClick:d[0]||(d[0]=w=>c("p")),class:"print-button"},{default:e.withCtx(()=>[e.createTextVNode("上一页")]),_:1})):e.createCommentVNode("",!0),V!==e.unref(l).props.pages.length-1?(e.openBlock(),e.createBlock(y,{key:1,onClick:d[1]||(d[1]=w=>c("n")),type:"success"},{default:e.withCtx(()=>[e.createTextVNode("下一页")]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1032,["label","name"]))),128))]),_:1},8,["type","tab-position","modelValue"])],2)}}}),As="",qa={component:class extends Se{constructor(){super("tabs","标签页"),this.props={width:12,showLabel:!1,labelWidth:void 0,labelNewLine:!1,label:"",fontSize:14,isBold:!0,color:"#000000",showFlag:!0,defaultValue:"0",height:200,heightUnit:"px",tabType:"border-card",pages:[{value:"temp_1",label:"标签1"},{value:"temp_3",label:"标签2"}],tabPosition:"top",showNavigation:!1},this.isLayout=!0,this.children=[]}},renderer:Ha,propEditor:Ra},ja=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;const l=e.ref(t.fileSize);return e.watch(l,()=>t.fileSize=Number(l.value)),(r,a)=>{const i=e.resolveComponent("el-switch"),c=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-input-number"),s=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),m=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(m,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(c,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=d=>e.unref(t).multiple=d)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"文件数量"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=d=>e.unref(t).fileLimit=d),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"文件大小"},{default:e.withCtx(()=>[e.createVNode(f,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(l),"onUpdate:modelValue":a[3]||(a[3]=d=>e.isRef(l)?l.value=d:null),modelModifiers:{number:!0},placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(h,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=d=>e.unref(t).fileSizeUnit=d)},{default:e.withCtx(()=>[e.createVNode(s,{value:"KB"}),e.createVNode(s,{value:"MB"}),e.createVNode(s,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{label:"文件类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=d=>e.unref(t).fileType=d),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Ps="",Ga={class:"upload-component"},Wa=e.createElementVNode("span",{class:"button-text"},"上传文件",-1),Ya={key:0,class:"description"},Xa=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},setup(o){const{checkFile:n}=de(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),c=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const p=m=>{if(m.status==="ready"&&!n(m.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!1)){s(m);return}if(m.status==="success"&&m.response.code===0){he("error",m.response.message||"文件上传失败!"),s(m);return}l.autoUpload?a.value[t.componentID].push({name:m.name,url:m.response.data.url,id:m.response.data.id}):a.value[t.componentID].push({name:m.name,url:m.url,file:m.raw})},s=(m,d=!0)=>{d&&c.value.handleRemove(m);const y=a.value[t.componentID].findIndex(u=>u.url===m.url);y!==-1&&a.value[t.componentID].splice(y,1)},h=m=>{s(m,!1)},f=()=>{var d;let m=`最多只能上传${i.value.fileLimit}个文件`;(d=a.value[t.componentID])!=null&&d.length&&(m+=`,您已上传了${a.value[t.componentID].length}个文件,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个文件`),he("error",m)};return(m,d)=>{const y=Q,u=e.resolveComponent("el-button"),_=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",Ga,[e.createVNode(_,{ref_key:"uploadRef",ref:c,action:e.unref(l).serverApi,headers:e.unref(l).headers,data:e.unref(l).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[o.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(l).autoUpload,"on-exceed":f,"on-change":p,"on-remove":h},{default:e.withCtx(()=>{var g;return[e.unref(i).fileLimit>(((g=e.unref(a)[o.componentID])==null?void 0:g.length)||0)?(e.openBlock(),e.createBlock(u,{key:0,size:"large",color:"#409eff"},{icon:e.withCtx(()=>[e.createVNode(y,{name:"upload",color:"#ffffff"})]),default:e.withCtx(()=>[Wa]),_:1})):e.createCommentVNode("",!0)]}),_:1},8,["action","headers","data","multiple","limit","file-list","accept","auto-upload"]),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",Ya,[e.createVNode(y,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Fs="",Ja={component:class extends Se{constructor(){super("upload","文件上传"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"文件上传",fontSize:12,isBold:!1,color:"#000000",showFlag:!0,multiple:!1,fileLimit:1,fileSize:30,fileSizeUnit:"MB",fileType:".jpg,.txt,.doc,.docx,.ppt,.pptx,.xls,.xlsx,.pdf"}}},renderer:Xa,propEditor:ja},Ka=e.defineComponent({__name:"propsEditor",props:{},setup(o){let t=e.inject("formDesignerData").selectComponent.props;const l=e.ref(t.fileSize);return e.watch(l,()=>t.fileSize=Number(l.value)),(r,a)=>{const i=e.resolveComponent("el-switch"),c=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-input-number"),s=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),m=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(m,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(c,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=d=>e.unref(t).multiple=d)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"图片数量"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=d=>e.unref(t).fileLimit=d),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"图片大小"},{default:e.withCtx(()=>[e.createVNode(f,{class:"file-size-input",type:"number",min:0,modelValue:e.unref(l),"onUpdate:modelValue":a[3]||(a[3]=d=>e.isRef(l)?l.value=d:null),placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(h,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=d=>e.unref(t).fileSizeUnit=d),modelModifiers:{number:!0}},{default:e.withCtx(()=>[e.createVNode(s,{value:"KB"}),e.createVNode(s,{value:"MB"}),e.createVNode(s,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{label:"图片类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=d=>e.unref(t).fileType=d),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Us="",Za={class:"upload-image-component"},Qa={class:"el-upload-list__item-actions"},va={class:"el-upload-list__item-preview"},e1={class:"el-upload-list__item-delete"},t1={key:0,class:"description"},o1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},setup(o){const{checkFile:n}=de(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),c=e.ref(),p=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const s=d=>{if(d.status==="ready"&&!n(d.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!0)){h(d);return}if(d.status==="success"&&d.response.code===0){he("error",d.response.message||"图片上传失败!"),h(d);return}l.autoUpload?a.value[t.componentID].push({name:d.name,url:d.response.data.url,id:d.response.data.id}):a.value[t.componentID].push({name:d.name,url:d.url,file:d.raw})},h=d=>{c.value.handleRemove(d);const y=a.value[t.componentID].findIndex(u=>u.url===d.url);y!==-1&&a.value[t.componentID].splice(y,1)},f=()=>{p.value.$el.children[0].click()},m=()=>{var y;let d=`最多只能上传${i.value.fileLimit}个图片`;(y=a.value[t.componentID])!=null&&y.length&&(d+=`,您已上传了${a.value[t.componentID].length}个图片,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个图片`),he("error",d)};return(d,y)=>{var V;const u=Q,_=e.resolveComponent("el-image"),g=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",Za,[e.createVNode(g,{ref_key:"uploadImageRef",ref:c,class:e.normalizeClass({"hidden-trigger":e.unref(i).fileLimit<=(((V=e.unref(a)[o.componentID])==null?void 0:V.length)||0)}),"list-type":"picture-card",action:e.unref(l).serverApi,headers:e.unref(l).headers,data:e.unref(l).params,multiple:e.unref(i).multiple,limit:e.unref(i).fileLimit,"show-file-list":!0,"file-list":e.unref(a)[o.componentID],accept:e.unref(i).fileType,"auto-upload":e.unref(l).autoUpload,"on-change":s,"on-exceed":m},{trigger:e.withCtx(()=>[e.createVNode(u,{name:"add",size:"30"})]),file:e.withCtx(({file:w})=>[e.createVNode(_,{ref_key:"imageRef",ref:p,style:{width:"100px",height:"100px"},src:w.url,"preview-src-list":[w.url],fit:"cover"},null,8,["src","preview-src-list"]),e.createElementVNode("span",Qa,[e.createElementVNode("span",va,[e.createVNode(u,{name:"previewImage",color:"#00ff00",onClick:f})]),e.createElementVNode("span",e1,[e.createVNode(u,{name:"delete",color:"#ff0000",onClick:b=>h(w)},null,8,["onClick"])])])]),_:1},8,["class","action","headers","data","multiple","limit","file-list","accept","auto-upload"]),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",t1,[e.createVNode(u,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Hs="",n1={component:class extends Se{constructor(){super("uploadImage","图片上传"),this.props={width:12,showLabel:!0,labelWidth:void 0,labelNewLine:!1,label:"图片上传",fontSize:12,isBold:!1,showFlag:!0,multiple:!1,fileLimit:1,fileSize:10,fileSizeUnit:"MB",fileType:".jpg,.jpeg,.png,.bmp"}}},renderer:o1,propEditor:Ka};function Xt(o){return typeof o=="function"?o():e.unref(o)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const l1=o=>typeof o<"u",cn=()=>{};function r1(o,n){function t(...l){return new Promise((r,a)=>{Promise.resolve(o(()=>n.apply(this,l),{fn:n,thisArg:this,args:l})).then(r).catch(a)})}return t}function a1(o,n={}){let t,l,r=cn;const a=c=>{clearTimeout(c),r(),r=cn};return c=>{const p=Xt(o),s=Xt(n.maxWait);return t&&a(t),p<=0||s!==void 0&&s<=0?(l&&(a(l),l=null),Promise.resolve(c())):new Promise((h,f)=>{r=n.rejectOnCancel?f:h,s&&!l&&(l=setTimeout(()=>{t&&a(t),l=null,h(c())},s)),t=setTimeout(()=>{l&&a(l),l=null,h(c())},p)})}}function dn(o,n=200,t={}){return r1(a1(n,t),o)}function i1(o,n){return e.computed(()=>Xt(o).map(t=>Xt(t)).filter(n))}function s1(o){return JSON.parse(JSON.stringify(o))}function c1(o,n,t,l={}){var r,a,i;const{clone:c=!1,passive:p=!1,eventName:s,deep:h=!1,defaultValue:f,shouldEmit:m}=l,d=e.getCurrentInstance(),y=t||(d==null?void 0:d.emit)||((r=d==null?void 0:d.$emit)==null?void 0:r.bind(d))||((i=(a=d==null?void 0:d.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(d==null?void 0:d.proxy));let u=s;n||(n="modelValue"),u=u||`update:${n.toString()}`;const _=w=>c?typeof c=="function"?c(w):s1(w):w,g=()=>l1(o[n])?_(o[n]):f,V=w=>{m?m(w)&&y(u,w):y(u,w)};if(p){const w=g(),b=e.ref(w);let C=!1;return e.watch(()=>o[n],x=>{C||(C=!0,b.value=_(x),e.nextTick(()=>C=!1))}),e.watch(b,x=>{!C&&(x!==o[n]||h)&&V(x)},{deep:h}),b}else return e.computed({get(){return g()},set(w){V(w)}})}const d1={class:"option-wrap"},p1={style:{float:"left"}},m1={style:{float:"right",color:"#8492a6"}},f1=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;const l=e.ref([]);e.watch(()=>t.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:t.options}});const r=()=>{t.type==="radio"?(t.defaultValue="",t.min=void 0,t.max=void 0,t.multiple=void 0):t.type==="checkbox"?(t.defaultValue=[],t.multiple=void 0):t.type==="selector"&&(t.defaultValue="",t.min=void 0,t.max=void 0)},a=()=>{t.options.push({label:"",value:""})},i=m=>{t.options.splice(m,1)},c=e.ref(!1);let p=e.ref(t.options);const s=dn(async m=>await n.selectComponent.searchEmployeeMethod(m),500),h=m=>{if(!m)return[];c.value=!0,s(m).then(d=>{p.value=d,c.value=!1})},f=(m,d)=>{const y=p.value.find(u=>u.value===m);t.options[d]={label:y==null?void 0:y.label,value:y==null?void 0:y.value},p.value=t.options};return(m,d)=>{const y=e.resolveComponent("el-radio-button"),u=e.resolveComponent("el-radio-group"),_=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-switch"),V=e.resolveComponent("el-input-number"),w=e.resolveComponent("el-divider"),b=Q,C=e.resolveComponent("el-option"),x=e.resolveComponent("el-select"),E=e.resolveComponent("el-button"),L=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(L,{"label-width":"80px","label-suffix":":",class:"employee-props-editor"},{default:e.withCtx(()=>[e.createVNode(_,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:e.unref(t).type,"onUpdate:modelValue":d[0]||(d[0]=z=>e.unref(t).type=z),onChange:r},{default:e.withCtx(()=>[e.createVNode(y,{value:"radio"},{default:e.withCtx(()=>[e.createTextVNode("单选")]),_:1}),e.createVNode(y,{value:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode("多选")]),_:1}),e.createVNode(y,{value:"selector"},{default:e.withCtx(()=>[e.createTextVNode("下拉框")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(t).type!=="selector"?(e.openBlock(),e.createBlock(_,{key:0,label:"人员换行"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":d[1]||(d[1]=z=>e.unref(t).newLine=z)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(_,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":d[2]||(d[2]=z=>e.unref(t).multiple=z)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(_,{label:"最少选择"},{default:e.withCtx(()=>{var z;return[e.createVNode(V,{modelValue:e.unref(t).min,"onUpdate:modelValue":d[3]||(d[3]=D=>e.unref(t).min=D),step:1,min:0,max:((z=e.unref(l))==null?void 0:z.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(_,{label:"最多选择"},{default:e.withCtx(()=>{var z;return[e.createVNode(V,{modelValue:e.unref(t).max,"onUpdate:modelValue":d[4]||(d[4]=D=>e.unref(t).max=D),step:1,min:0,max:((z=e.unref(l))==null?void 0:z.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0),e.createVNode(w,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(_,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt),{class:"checkbox-options",handle:".cursor-move",list:e.unref(t).options,"item-key":"value",tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:z,index:D})=>[e.createElementVNode("div",d1,[e.unref(t).options.length>1?(e.openBlock(),e.createBlock(b,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(x,{class:"selector-component",modelValue:z.value,"onUpdate:modelValue":$=>z.value=$,filterable:"",placeholder:"检索人员",disabled:!e.unref(n).selectComponent.allowModify,remote:"","remote-method":h,loading:e.unref(c),"loading-text":"加载中……",onChange:$=>f($,D)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),($,F)=>(e.openBlock(),e.createBlock(C,{key:F,label:$.label,value:$.value},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"option",{index:F,label:$.label,suffix:$.suffix},()=>[e.createElementVNode("span",p1,e.toDisplayString($.label),1),e.createElementVNode("span",m1,e.toDisplayString($.suffix),1)])]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","loading","onChange"]),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(b,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:$=>i(D)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:3},8,["list"])]),_:3}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(_,{key:3,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(E,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(b,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:3})}}}),js="",h1={class:"employee-component"},u1={key:3,class:"description"},g1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas","update:componentProps"],setup(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,h=>h?r.value[t.componentID]=h:delete r.value[t.componentID]);const c=n;e.watch(r,h=>c("update:datas",h));const p=e.ref(!0);e.watch(a,h=>{p.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),p.value=!0}),c("update:componentProps",h)},{immediate:!0});const s=(h,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,h.preventDefault())};return(h,f)=>{const m=e.resolveComponent("el-radio"),d=e.resolveComponent("el-radio-group"),y=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),g=e.resolveComponent("el-select"),V=Q;return e.openBlock(),e.createElementBlock("div",h1,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(d,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=w=>e.isRef(i)?i.value=w:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(m,{key:b,value:w.value,onClick:C=>s(C,w.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(u,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[1]||(f[1]=w=>e.isRef(i)?i.value=w:null),disabled:o.disabled,min:e.unref(a).min,max:e.unref(a).max},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(y,{value:w.value,key:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["class","modelValue","disabled","min","max"])):e.createCommentVNode("",!0),e.unref(a).type==="selector"?(e.openBlock(),e.createBlock(g,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=w=>e.isRef(i)?i.value=w:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(_,{key:b,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",u1,[e.createVNode(V,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Gs="",_1={component:class extends Se{constructor(){super("employee","人员",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"人员",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!0,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,type:"checkbox",options:[],showRemark:!0,remarkLabel:"实习生"},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}async getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:g1,propEditor:f1};function ko(){return{getGradeItems(o){let n=[];if(!o.maxScore)return n;o.showVeto&&n.push({value:"-2",label:"单项否决"}),o.showNotGrade&&n.push({value:"-1",label:"不考评"}),o.showZero&&n.push({value:"0",label:"0分"});let t=Number(o.maxScore);for(let l=1;l<=t;l++)n.push({value:String(l),label:`${String(l)}分`});return o.scoreReverseFlag&&n.reverse(),n}}}const w1=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;const{getGradeItems:l}=ko(),r=e.ref([]);return e.watch(t,()=>{r.value=l(t),n.selectComponent.filterConditionProps||(n.selectComponent.filterConditionProps={}),n.selectComponent.filterConditionProps.options=r.value}),(a,i)=>{const c=e.resolveComponent("el-option"),p=e.resolveComponent("el-select"),s=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-switch"),m=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(m,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(s,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).defaultValue,"onUpdate:modelValue":i[0]||(i[0]=d=>e.unref(t).defaultValue=d),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(d,y)=>(e.openBlock(),e.createBlock(c,{key:y,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"最大分数"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).maxScore,"onUpdate:modelValue":i[1]||(i[1]=d=>e.unref(t).maxScore=d),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"显示0分"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showZero,"onUpdate:modelValue":i[2]||(i[2]=d=>e.unref(t).showZero=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"显示不考评"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showNotGrade,"onUpdate:modelValue":i[3]||(i[3]=d=>e.unref(t).showNotGrade=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"分数倒序"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).scoreReverseFlag,"onUpdate:modelValue":i[4]||(i[4]=d=>e.unref(t).scoreReverseFlag=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"分数换行"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":i[5]||(i[5]=d=>e.unref(t).newLine=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"显示问题"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showProblem,"onUpdate:modelValue":i[6]||(i[6]=d=>e.unref(t).showProblem=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"显示亮点"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showBrightSpot,"onUpdate:modelValue":i[7]||(i[7]=d=>e.unref(t).showBrightSpot=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"显示备注"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showRemark,"onUpdate:modelValue":i[8]||(i[8]=d=>e.unref(t).showRemark=d)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"单项否决"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showVeto,"onUpdate:modelValue":i[9]||(i[9]=d=>e.unref(t).showVeto=d)},null,8,["modelValue"])]),_:1})]),_:1})}}}),y1={class:"auto-complete"},C1={key:0},b1=e.defineComponent({__name:"autoComplete",props:{modelValue:{type:String,default:()=>{}},options:{type:Array,default:()=>[],required:!1},label:{type:String,default:()=>"备注:"},selectWhenUnmatched:{type:Boolean,default:()=>!0},matchMode:{type:String,default:"start"},width:{type:Number,default:500},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(o,{emit:n}){e.useCssVars(d=>({e00bfd70:e.unref(m)}));const t=e.ref(),l=o;let{options:r,width:a}=e.toRefs(l);const i=n,c=c1(l,"modelValue",i),p=()=>{i("change",c.value)},s=(d,y)=>{const u=d?i1(r,h(d)):r.value;y(e.unref(u))},h=d=>({start:u=>u.value.toLowerCase().indexOf(d.toLowerCase())===0,random:u=>u.value.indexOf(d)>=0})[l.matchMode],f=e.inject("convertPX"),m=e.computed(()=>`${f(a.value)}px`);return(d,y)=>{const u=e.resolveComponent("el-autocomplete");return e.openBlock(),e.createElementBlock("div",y1,[o.label?(e.openBlock(),e.createElementBlock("span",C1,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0),e.createVNode(u,{ref_key:"autoCompleteRef",ref:t,modelValue:e.unref(c),"onUpdate:modelValue":y[0]||(y[0]=_=>e.isRef(c)?c.value=_:null),"select-when-unmatched":o.selectWhenUnmatched,"fetch-suggestions":s,"value-key":"value",clearable:"",disabled:o.disabled,onBlur:p},{default:e.withCtx(({item:_})=>[e.createElementVNode("span",null,e.toDisplayString(_.value),1)]),_:1},8,["modelValue","select-when-unmatched","disabled"])])}}}),Ys="",V1={class:"grade-component"},k1={key:3,class:"description"},x1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(o,{emit:n}){const t=o,{getGradeItems:l}=ko();let r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),c=e.ref(a.value[t.componentID]||{});e.watch(c,f=>{a.value[t.componentID]=f,Object.keys(a.value[t.componentID]||{}).length&&(a.value[t.componentID].maxScore=i.value.maxScore)},{deep:!0});const p=e.computed(()=>l(i.value)),s=n;e.watch(a,f=>s("update:datas",f)),e.watch(i,()=>{t.isDesigner&&(c.value=i.value.defaultValue?{score:i.value.defaultValue}:{})},{immediate:!0,deep:!0});const h=(f,m)=>{i.value.clearable&&c.value.score===m&&(delete c.value.score,f.preventDefault())};return(f,m)=>{const d=e.resolveComponent("el-radio"),y=e.resolveComponent("el-radio-group"),u=b1,_=Q;return e.openBlock(),e.createElementBlock("div",V1,[e.createVNode(y,{class:e.normalizeClass(["grade-items",{"new-line":e.unref(i).newLine}]),modelValue:e.unref(c).score,"onUpdate:modelValue":m[0]||(m[0]=g=>e.unref(c).score=g),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(g,V)=>(e.openBlock(),e.createBlock(d,{key:V,value:g.value,onClick:w=>h(w,g.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"]),e.unref(i).showProblem?(e.openBlock(),e.createBlock(u,{key:0,class:"problem",modelValue:e.unref(c).problem,"onUpdate:modelValue":m[1]||(m[1]=g=>e.unref(c).problem=g),label:"问题:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showBrightSpot?(e.openBlock(),e.createBlock(u,{key:1,class:"bright-spot",modelValue:e.unref(c).brightSpot,"onUpdate:modelValue":m[2]||(m[2]=g=>e.unref(c).brightSpot=g),label:"亮点:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),e.unref(i).showRemark?(e.openBlock(),e.createBlock(u,{key:2,class:"bright-spot",modelValue:e.unref(c).remark,"onUpdate:modelValue":m[3]||(m[3]=g=>e.unref(c).remark=g),label:"备注:",filterable:"","default-first-option":"",width:400,disabled:o.disabled,options:e.unref(i).remarkOptions},null,8,["modelValue","disabled","options"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(i).description||o.showDescription&&(e.unref(r).props.formType==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",k1,[e.createVNode(_,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Xs="",{isEmpty:E1}=de(),{getGradeItems:N1}=ko(),B1={component:class extends Se{constructor(){super("grade","考评分数",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"考评分数",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,maxScore:5,showZero:!0,showNotGrade:!0,showProblem:!0,showBrightSpot:!0,scoreReverseFlag:!0,showVeto:!1},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage,validator:(t,l,r)=>{if(!l||E1(l)){r(n.requiredMessage);return}r()}}]}getFilterConditionProps(n){return{type:"selector",options:n&&N1(n)}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:x1,propEditor:w1},D1=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;e.watch(()=>t.options,()=>{n.selectComponent.filterConditionProps={type:"selector",options:t.options}});const l=()=>{t.type==="radio"?(t.defaultValue="",t.min=void 0,t.max=void 0,t.multiple=void 0):t.type==="checkbox"?(t.defaultValue=[],t.multiple=void 0):t.type==="selector"&&(t.defaultValue="",t.min=void 0,t.max=void 0)};return(r,a)=>{const i=e.resolveComponent("el-radio-button"),c=e.resolveComponent("el-radio-group"),p=e.resolveComponent("el-form-item"),s=e.resolveComponent("el-switch"),h=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(f,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(p,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).type,"onUpdate:modelValue":a[0]||(a[0]=m=>e.unref(t).type=m),onChange:l},{default:e.withCtx(()=>[e.createVNode(i,{value:"radio"},{default:e.withCtx(()=>[e.createTextVNode("单选")]),_:1}),e.createVNode(i,{value:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode("多选")]),_:1}),e.createVNode(i,{value:"selector"},{default:e.withCtx(()=>[e.createTextVNode("下拉框")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(t).type!=="selector"?(e.openBlock(),e.createBlock(p,{key:0,label:"岗位换行"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":a[1]||(a[1]=m=>e.unref(t).newLine=m)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(p,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[2]||(a[2]=m=>e.unref(t).multiple=m)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(p,{label:"最少选择"},{default:e.withCtx(()=>{var m;return[e.createVNode(h,{modelValue:e.unref(t).min,"onUpdate:modelValue":a[3]||(a[3]=d=>e.unref(t).min=d),step:1,min:0,max:((m=e.unref(t).options)==null?void 0:m.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(p,{label:"最多选择"},{default:e.withCtx(()=>{var m;return[e.createVNode(h,{modelValue:e.unref(t).max,"onUpdate:modelValue":a[4]||(a[4]=d=>e.unref(t).max=d),step:1,min:0,max:((m=e.unref(t).options)==null?void 0:m.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),S1={class:"post-component"},M1={key:3,class:"description"},z1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas","update:componentProps"],setup(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,h=>h?r.value[t.componentID]=h:delete r.value[t.componentID]);const c=n;e.watch(r,h=>c("update:datas",h));const p=e.ref(!0);e.watch(a,h=>{p.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),p.value=!0}),c("update:componentProps",h)},{immediate:!0});const s=(h,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,h.preventDefault())};return(h,f)=>{const m=e.resolveComponent("el-radio"),d=e.resolveComponent("el-radio-group"),y=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),g=e.resolveComponent("el-select"),V=Q;return e.openBlock(),e.createElementBlock("div",S1,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(d,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=w=>e.isRef(i)?i.value=w:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(m,{key:b,value:w.value,onClick:C=>s(C,w.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["class","modelValue","disabled"])):e.createCommentVNode("",!0),e.unref(a).type==="checkbox"?(e.openBlock(),e.createBlock(u,{key:1,class:e.normalizeClass(["checkbox-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[1]||(f[1]=w=>e.isRef(i)?i.value=w:null),disabled:o.disabled,min:e.unref(a).min,max:e.unref(a).max},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(y,{value:w.value,key:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["class","modelValue","disabled","min","max"])):e.createCommentVNode("",!0),e.unref(a).type==="selector"?(e.openBlock(),e.createBlock(g,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=w=>e.isRef(i)?i.value=w:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(w,b)=>(e.openBlock(),e.createBlock(_,{key:b,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",M1,[e.createVNode(V,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ks="",$1={component:class extends Se{constructor(){super("post","岗位",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"岗位",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!0,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!0,newLine:!1,labelNewLine:!1,type:"checkbox",options:[]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}async getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:z1,propEditor:D1},T1={class:"option-wrap"},I1=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}},allowCreateDictionary:{type:Boolean,default:!0}},setup(o){let n=e.inject("formDesignerData"),t=e.inject("defaultSourceType"),l=n.selectComponent.props;e.watch(l.options,()=>{n.selectComponent.filterConditionProps.options=l.options});const{getTempID:r}=de(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=p=>{l.options.splice(p,1)},c=(p,s)=>{s.value=p.value,s.itemSourceType=p.itemSourceType};return(p,s)=>{const h=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),m=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-switch"),y=e.resolveComponent("el-input-number"),u=e.resolveComponent("el-divider"),_=Q,g=e.resolveComponent("el-checkbox"),V=e.resolveComponent("el-tooltip"),w=e.resolveComponent("el-button"),b=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(b,{"label-width":"80px","label-suffix":":",class:"checkbox-props-editor"},{default:e.withCtx(()=>[e.createVNode(m,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":s[0]||(s[0]=C=>e.unref(l).defaultValue=C),multiple:"",clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(C,x)=>(e.openBlock(),e.createBlock(h,{key:x,label:C.label,value:C.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(m,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":s[1]||(s[1]=C=>e.unref(l).newLine=C)},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"最少选择"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).min,"onUpdate:modelValue":s[2]||(s[2]=C=>e.unref(l).min=C),step:1,min:0,max:e.unref(l).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(m,{label:"最多选择"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).max,"onUpdate:modelValue":s[3]||(s[3]=C=>e.unref(l).max=C),step:1,min:1,max:e.unref(l).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(u,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(m,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt),{class:"checkbox-options",handle:".cursor-move",list:e.unref(l).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:C,index:x})=>[e.createElementVNode("div",T1,[e.unref(l).options.length>1?(e.openBlock(),e.createBlock(_,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(Yt,{modelValue:C.label,"onUpdate:modelValue":E=>C.label=E,dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:E=>c(E,C)},null,8,["modelValue","onUpdate:modelValue","dictionary","allowCreateDictionary","disabled","onChange"]),e.createVNode(V,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(g,{class:"input-enable",modelValue:C.inputEnable,"onUpdate:modelValue":E=>C.inputEnable=E},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(_,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:E=>i(x)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(m,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(w,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(_,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),Qs="",L1={class:"checkbox-component"},A1={key:0,class:"description"},O1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,s=>r.value[t.componentID]=s);const c=n;e.watch(r,s=>c("update:datas",s)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const p=s=>{a.value.options.forEach(h=>{const f=`${t.componentID}||${h.value}`;!s.includes(h.value)&&r.value[f]&&delete r.value[f]})};return(s,h)=>{const f=e.resolveComponent("el-checkbox"),m=e.resolveComponent("el-input"),d=e.resolveComponent("el-checkbox-group"),y=Q;return e.openBlock(),e.createElementBlock("div",L1,[e.createVNode(d,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":h[0]||(h[0]=u=>e.isRef(i)?i.value=u:null),disabled:o.disabled,min:e.unref(a).min,max:e.unref(a).max,onChange:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(u,_)=>{var g;return e.openBlock(),e.createElementBlock("div",{class:"checkbox-wrap",key:_},[e.createVNode(f,{value:u.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.label),1)]),_:2},1032,["value"]),u.inputEnable&&(o.isDesigner||(g=e.unref(i))!=null&&g.includes(u.value))?(e.openBlock(),e.createBlock(m,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${u.value}`],"onUpdate:modelValue":V=>e.unref(r)[`${o.componentID}||${u.value}`]=V},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled","min","max"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",A1,[e.createVNode(y,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),vs="",{getTempID:pn}=de(),P1={component:class extends Se{constructor(){super("checkbox","多选框",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"多选框",fontSize:12,isBold:!1,color:"#000000",defaultValue:[],required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!1,newLine:!1,labelNewLine:!1,options:[{value:pn(),label:"选项1"},{value:pn(),label:"选项2"}]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["RANGE"]}},renderer:O1,propEditor:I1},F1=e.defineComponent({__name:"propsEditor",setup(o){const{computedExpression:n}=de();let t=e.inject("formDesignerData"),l=t.selectComponent.props,r=t.selectComponent.rules;const a=p=>{p&&(r[1].pattern=n(p))},i=p=>{r[1].message=p},c=p=>{p==="text"&&(l.showPassword=!1)};return(p,s)=>{const h=e.resolveComponent("el-input"),f=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),y=e.resolveComponent("el-switch"),u=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(u,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(f,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":s[0]||(s[0]=_=>e.unref(l).defaultValue=_),placeholder:"请输入默认值"},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"类型"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(l).type,"onUpdate:modelValue":s[1]||(s[1]=_=>e.unref(l).type=_),onChange:c},{default:e.withCtx(()=>[e.createVNode(m,{value:"text"},{default:e.withCtx(()=>[e.createTextVNode("文本")]),_:1}),e.createVNode(m,{value:"password"},{default:e.withCtx(()=>[e.createTextVNode("密码")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.unref(l).type=="password"?(e.openBlock(),e.createBlock(f,{key:0,label:"显示密码"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(l).showPassword,"onUpdate:modelValue":s[2]||(s[2]=_=>e.unref(l).showPassword=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(f,{label:"正则验证"},{default:e.withCtx(()=>[e.createVNode(h,{onChange:a,modelValue:e.unref(l).pattern,"onUpdate:modelValue":s[3]||(s[3]=_=>e.unref(l).pattern=_)},null,8,["modelValue"])]),_:1}),e.unref(l).pattern?(e.openBlock(),e.createBlock(f,{key:1,label:"正则提示"},{default:e.withCtx(()=>[e.createVNode(h,{onChange:i,modelValue:e.unref(l).patternMessage,"onUpdate:modelValue":s[4]||(s[4]=_=>e.unref(l).patternMessage=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),R1={class:"input-component"},U1={key:0,class:"description"},H1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,p=>r.value[t.componentID]=p);const c=n;return e.watch(r,p=>c("update:datas",p)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0}),(p,s)=>{const h=e.resolveComponent("el-input"),f=Q;return e.openBlock(),e.createElementBlock("div",R1,[e.createVNode(h,{type:e.unref(a).type,"show-password":e.unref(a).showPassword,modelValue:e.unref(i),"onUpdate:modelValue":s[0]||(s[0]=m=>e.isRef(i)?i.value=m:null),placeholder:e.unref(a).placeholder,clearable:e.unref(a).clearable,disabled:o.disabled,readonly:o.readonly},null,8,["type","show-password","modelValue","placeholder","clearable","disabled","readonly"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",U1,[e.createVNode(f,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),t2="",q1={component:class extends Se{constructor(){super("input","文本框",!0,!0),this.props={type:"text",label:"文本框",width:12,showLabel:!0,fontSize:12,isBold:!1,color:"#000000",showFlag:!0,statisticsFlag:!1,labelNewLine:!1,labelWidth:void 0,defaultValue:"",placeholder:"",required:!1,requiredMessage:"必填项",pattern:"",patternMessage:"格式不正确",disabled:!1,clearable:!1,readonly:!1,showPassword:!1},this.rules=this.getRules(this.props),this.filterConditionProps={type:"input"},this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage},{pattern:n.pattern,message:n.patternMessage}]}getFilterConditionProps(n){return{type:"input"}}getExcludeFilterConditions(){return["RANGE"]}},renderer:H1,propEditor:F1},j1={component:class extends Se{constructor(){super("label","标签"),this.props={width:12,showLabel:!1,label:"标签",showFlag:!0,labelNewLine:!1,isBold:!0,fontSize:14,color:"#000000"}}},renderer:e.defineComponent({__name:"renderer",props:{componentProps:{type:Object,required:!0}},setup(o){return(n,t)=>(e.openBlock(),e.createElementBlock("label",{class:"label-content",style:e.normalizeStyle({color:o.componentProps.color,"font-size":o.componentProps.fontSize+"px","font-weight":o.componentProps.isBold?"bold":"normal"})},e.toDisplayString(o.componentProps.label),5))}}),undefined:void 0},G1={class:"option-wrap"},W1=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}},allowCreateDictionary:{type:Boolean,default:!0}},setup(o){let n=e.inject("formDesignerData"),t=e.inject("defaultSourceType"),l=n.selectComponent.props;e.watch(l.options,()=>{n.selectComponent.filterConditionProps.options=l.options});const{getTempID:r}=de(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=p=>{l.options.splice(p,1)},c=(p,s)=>{s.value=p.value,s.itemSourceType=p.itemSourceType};return(p,s)=>{const h=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),m=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-switch"),y=e.resolveComponent("el-divider"),u=Q,_=e.resolveComponent("el-checkbox"),g=e.resolveComponent("el-tooltip"),V=e.resolveComponent("el-button"),w=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(w,{"label-width":"80px","label-suffix":":",class:"radio-props-editor"},{default:e.withCtx(()=>[e.createVNode(m,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":s[0]||(s[0]=b=>e.unref(l).defaultValue=b),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(b,C)=>(e.openBlock(),e.createBlock(h,{key:C,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(m,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":s[1]||(s[1]=b=>e.unref(l).newLine=b)},null,8,["modelValue"])]),_:1}),e.createVNode(y,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(m,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt),{class:"radio-options",handle:".cursor-move",list:e.unref(l).options,"item-key":"value",clone:()=>{},tag:"div",group:{name:"componentOptions",put:!1}},{item:e.withCtx(({element:b,index:C})=>[e.createElementVNode("div",G1,[e.unref(l).options.length>1?(e.openBlock(),e.createBlock(u,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(Yt,{modelValue:b.label,"onUpdate:modelValue":x=>b.label=x,dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:x=>c(x,b)},null,8,["modelValue","onUpdate:modelValue","dictionary","allowCreateDictionary","disabled","onChange"]),e.createVNode(g,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(_,{class:"input-enable",modelValue:b.inputEnable,"onUpdate:modelValue":x=>b.inputEnable=x},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(u,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:x=>i(C)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(m,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(V,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(u,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),r2="",Y1={class:"radio-component"},X1={key:0,class:"description"},J1=e.defineComponent({__name:"renderer",props:{isDesigner:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},componentID:{type:[String,Number],required:!0},datas:{type:Object,required:!0},componentProps:{type:Object,required:!0},showDescription:{type:Boolean,default:!1}},emits:["update:datas"],setup(o,{emit:n}){const t=o;let l=e.inject("formData");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,h=>r.value[t.componentID]=h);const c=n;e.watch(r,h=>c("update:datas",h)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const p=h=>{a.value.options.forEach(f=>{const m=`${t.componentID}||${f.value}`;h!==f.value&&r.value[m]&&delete r.value[m]})},s=(h,f)=>{if(a.value.clearable&&i.value===f){i.value=void 0;const m=`${t.componentID}||${f}`;r.value[m]&&delete r.value[m],h.preventDefault()}};return(h,f)=>{const m=e.resolveComponent("el-radio"),d=e.resolveComponent("el-input"),y=e.resolveComponent("el-radio-group"),u=Q;return e.openBlock(),e.createElementBlock("div",Y1,[e.createVNode(y,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=_=>e.isRef(i)?i.value=_:null),disabled:o.disabled,onChange:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(_,g)=>{var V;return e.openBlock(),e.createElementBlock("div",{class:"radio-wrap",key:g},[e.createVNode(m,{value:_.value,onClick:w=>s(w,_.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["value","onClick"]),_.inputEnable&&(o.isDesigner||(V=e.unref(i))!=null&&V.includes(_.value))?(e.openBlock(),e.createBlock(d,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${_.value}`],"onUpdate:modelValue":w=>e.unref(r)[`${o.componentID}||${_.value}`]=w},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)])}),128))]),_:1},8,["class","modelValue","disabled"]),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l).props.formType==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",X1,[e.createVNode(u,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),a2="",{getTempID:mn}=de();class K1 extends Se{constructor(){super("radio","单选框",!0),this.props={width:12,showLabel:!0,labelWidth:void 0,label:"单选框",fontSize:12,isBold:!1,color:"#000000",defaultValue:"",required:!1,requiredMessage:"必选项",disabled:!1,showFlag:!0,statisticsFlag:!1,newLine:!1,labelNewLine:!1,options:[{value:mn(),label:"选项1"},{value:mn(),label:"选项2"}]},this.rules=this.getRules(this.props),this.filterConditionProps=this.getFilterConditionProps(this.props),this.excludeFilterConditions=this.getExcludeFilterConditions()}getRules(n){return[{required:n.required,message:n.requiredMessage}]}getFilterConditionProps(n){return{type:"selector",options:n.options}}getExcludeFilterConditions(){return["RANGE"]}}const Z1={component:K1,renderer:J1,propEditor:W1},Q1={key:0,class:"component-readonly-mask"},xo=e.defineComponent({__name:"componentRenderer",props:{components:{type:Array,required:!0},showDescription:{type:Boolean,default:!1},selectMode:{type:Boolean,default:!1}},emits:["select"],setup(o,{emit:n}){const t={...Nt,...St,...Bt,...Dt},{computedExpression:l}=de();let r=e.inject("formData");const a=o,{components:i,showDescription:c,selectMode:p}=e.toRefs(a),s={show:d=>{if(d.showFlag===void 0)return String(!0);let y="";return d.showFlag?y=d.hiddenConditionExpression?`!(${d.hiddenConditionExpression})`:String(d.showFlag):y=d.showConditionExpression||String(d.showFlag),y},disabled:d=>d.disabledConditionExpression||String(d.disabled===void 0?!1:d.disabled),readonly:d=>d.readonlyConditionExpression||String(d.readonly===void 0?!1:d.readonly)},h=(d,y)=>{var g;let u=s[y](d.props);if(!u)return;["true","false"].includes(u)||u.match(/{(.*?)}/g).forEach(w=>{var E;const b=w.replace(/\{|}/g,"");let C=r.value.datas[b];const x=i.value.find(L=>L.id===b);(x==null?void 0:x.type)==="grade"&&(C=(E=r.value.datas[b])==null?void 0:E.score),u=u.replace(w,C||"")});const _=l(u);if(y==="show"&&!_){let V=[];d.isLayout&&((g=d.children)!=null&&g.length)?V=d.children:V=[d],V.forEach(w=>{r.value.datas[w.id]&&(w.type==="grade"?delete r.value.datas[w.id].score:delete r.value.datas[w.id])})}return _},f=n,m=d=>{f("select",d)};return(d,y)=>{const u=e.resolveComponent("el-checkbox"),_=e.resolveComponent("el-form-item");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(g,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V},[e.unref(p)||h(g,"show")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-item-wrap",{"select-mode":e.unref(p)},{"is-hidden":!g.props.showFlag},{selected:g.selected}]),style:e.normalizeStyle({width:`${g.props.width*100/e.unref(r).props.column}%`,height:`${g.isLayout&&g.props.height?g.props.height+g.props.heightUnit:"auto"}`,"padding-left":`${g.props.paddingLeft}px`})},[h(g,"readonly")?(e.openBlock(),e.createElementBlock("div",Q1)):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock(u,{key:1,class:"select-item",modelValue:g.selected,"onUpdate:modelValue":w=>g.selected=w,label:"选择",onChange:w=>m(g)},null,8,["modelValue","onUpdate:modelValue","onChange"])):e.createCommentVNode("",!0),g.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[g.type].renderer),{key:2,componentID:g.id,showDescription:e.unref(c),component:e.unref(i)[V],"onUpdate:component":w=>e.unref(i)[V]=w},null,40,["componentID","showDescription","component","onUpdate:component"])):(e.openBlock(),e.createBlock(_,{key:3,class:e.normalizeClass(["form-item",{"label-new-line":g.props.labelNewLine}]),prop:g.id,"label-width":g.props.showLabel?g.props.labelWidth:"0",rules:g.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:g.props.color||"#000000","font-size":g.props.fontSize+"px","font-weight":g.props.isBold?"bold":"normal"})},e.toDisplayString(g.props.showLabel?g.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[g.type].renderer),{componentID:g.id,disabled:h(g,"disabled"),showDescription:e.unref(c),componentProps:g.props,"onUpdate:componentProps":w=>g.props=w,datas:e.unref(r).datas,"onUpdate:datas":y[0]||(y[0]=w=>e.unref(r).datas=w)},null,40,["componentID","disabled","showDescription","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["class","prop","label-width","rules"]))],6)):e.createCommentVNode("",!0)],64))),128)}}}),i2="",v1={key:0,class:"select-title"},ei=e.createElementVNode("h1",{class:"title"},"请选择项目",-1),ti={key:0,class:"title"},oi={key:0,class:"readonly-mask"},ni={key:2,class:"mobile-key"},li={name:"zhy-form-renderer"},Ye=e.defineComponent({...li,props:{formData:{type:Object,default:()=>({components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formType:"1"},datas:{}}),required:!0},uploadOptions:{type:Object,default:()=>({serverApi:"",autoUpload:!1})},device:{type:String,default:"pc"},watching:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},selectMode:{type:Boolean,default:!1},selectComponents:{type:Array,default:()=>[]},hiddenTitle:{type:Boolean,default:!1}},emits:["change","select"],setup(o,{expose:n,emit:t}){const{removeEmptyAttribute:l}=de(),r={...Nt,...St,...Bt,...Dt},a=e.ref(),i=e.ref(!1),c=e.ref(!1),p=e.ref(!1),s=o,h=t,{formData:f,selectMode:m}=e.toRefs(s),d=e.ref(s.selectComponents);e.provide("uploadOptions",s.uploadOptions),e.provide("formData",f);const y=b=>{var C,x,E,L;if((C=d.value)!=null&&C.length||(d.value=[]),!b){d.value=[],f.value.components.forEach(z=>{z.selected=c.value,c.value&&d.value.push(z)}),p.value=!1,h("select",d.value);return}if(b.selected)(x=d.value)==null||x.push(b);else{const z=(E=d.value)==null?void 0:E.findIndex(D=>D.id===b.id);z!==-1&&((L=d.value)==null||L.splice(z,1))}h("select",d.value),u()},u=()=>{var b,C;if(!((b=d.value)!=null&&b.length)){p.value=!1,c.value=!1;return}if(((C=d.value)==null?void 0:C.length)<f.value.components.length){p.value=!0;return}c.value=!0,p.value=!1},_=b=>{b!=null&&b.length&&(b.forEach(C=>{var E,L;let x=new r[C.type].component;x.isEdit&&(C.props.required||C.props.pattern)&&(C.rules=x.getRules(C.props)),s.selectMode&&((E=d.value)!=null&&E.length)&&d.value.findIndex(D=>D.id===C.id)!==-1&&(C.selected=!0),C.isLayout&&((L=C==null?void 0:C.children)!=null&&L.length)&&_(C.children)}),s.selectMode&&u())};e.watch(f,()=>_(f.value.components),{immediate:!0});const g=()=>{let b=l(f.value.datas),C=[],x=[];const E=Object.keys(b);for(let L of E){if(L.includes("||")){let z=L.split("||"),D=z[0],$=z[1],F=C.findIndex(S=>S.id===$&&S.groupID===D);if(F!==-1)C[F].value=b[L];else{const S={parentID:D,id:$,value:b[L]};C.push(S)}continue}V(f.value.components,C,x,L,b)}return{data:C,fileList:x}},V=(b,C,x,E,L)=>{var $;let z,D;for(let F=0;F<b.length;F++){const S=b[F];if(S.id===E){z=S,w(C,x,E,L,z);break}if(S.isLayout&&(($=S==null?void 0:S.children)!=null&&$.length)){if(z=S.children.find(R=>R.id===E),z){D=S.id,w(C,x,E,L,z,D);break}V(S.children,C,x,E,L)}}},w=(b,C,x,E,L,z)=>{var $,F;let D=-1;switch(L.type){case"radio":D=b.findIndex(S=>S.id===E[x]),D===-1&&b.push({groupID:z,parentID:x,id:E[x],value:""});break;case"checkbox":E[x].forEach(S=>{D=b.findIndex(R=>R.id===R),D===-1&&b.push({groupID:z,parentID:x,id:S,value:""})});break;case"upload":case"uploadImage":if(!(($=s.uploadOptions)!=null&&$.autoUpload)&&((F=E[x])!=null&&F.length)){const S=E[x].map(j=>(j.file&&(j.file.id=x),j.file)),R=E[x].map(j=>{if(j.fileID)return j.fileID}).filter(j=>j!==void 0);C.push({id:x,groupID:z,fileIDs:R,files:S})}break;default:b.push({groupID:z,parentID:x,id:x,value:E[x]});break}};return s.watching&&e.watch(()=>f.value.datas,()=>{const b=g();h("change",b.data,b.fileList)},{immediate:!0,deep:!0}),n({getDatas:g,async validate(b=()=>{}){return await a.value.validate(b)},resetFields(){a.value.resetFields()},clearValidate(b){a.value.clearValidate(b)},scrollToField(b){a.value.scrollToField(b)},toggleDescription(){i.value=!i.value}}),(b,C)=>{const x=e.resolveComponent("el-checkbox"),E=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-renderer",o.device,{"examination-paper":e.unref(f).props.formType==="2"},{"select-mode":e.unref(m)}])},[e.unref(m)?(e.openBlock(),e.createElementBlock("div",v1,[ei,e.createVNode(x,{class:"select-all",modelValue:e.unref(c),"onUpdate:modelValue":C[0]||(C[0]=L=>e.isRef(c)?c.value=L:null),label:"全选",indeterminate:e.unref(p),onChange:C[1]||(C[1]=L=>y())},null,8,["modelValue","indeterminate"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!o.hiddenTitle&&e.unref(f).props.formName?(e.openBlock(),e.createElementBlock("h1",ti,e.toDisplayString(e.unref(f).props.formName),1)):e.createCommentVNode("",!0)],64)),e.createVNode(E,{ref_key:"formRenderer",ref:a,class:"renderer-form",model:e.unref(f).datas,"label-position":e.unref(f).props.labelPosition,"label-width":e.unref(f).props.labelWidth,size:e.unref(f).props.size,"scroll-to-error":"",disabled:o.disabled},{default:e.withCtx(()=>[e.unref(m)?(e.openBlock(),e.createElementBlock("div",oi)):e.createCommentVNode("",!0),e.createVNode(xo,{components:e.unref(f).components,showDescription:e.unref(i),selectMode:e.unref(m),onSelect:y},null,8,["components","showDescription","selectMode"])]),_:1},8,["model","label-position","label-width","size","disabled"]),o.device==="mobile"?(e.openBlock(),e.createElementBlock("div",ni)):e.createCommentVNode("",!0)],2)}}}),s2="",ri={class:"form-list-wrap"},ai={class:"form-list"},ii=["onClick"],si=["title"],ci={class:"form-template"},di={class:"dialog-footer"},pi={class:"left-wrap"},mi={class:"select-count-wrap"},fi={class:"count"},hi={class:"right-wrap"},ui=e.defineComponent({__name:"batchAddDialog",props:e.mergeModels({params:{type:Object,default:()=>{}}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["select"],["update:modelValue"]),setup(o,{emit:n}){const{clone:t}=de(),l=e.inject("formData"),r=l.value.props.formType==="2"?"试卷":"表单",a=l.value.props.formType==="2"?"题目":"项目",i=e.useModel(o,"modelValue"),c=o,{params:p}=e.toRefs(c),s=e.ref({}),h=e.ref(""),f=e.ref({datas:{},components:[],props:{}});e.onMounted(()=>{var D;(D=p.value.searchParams)!=null&&D.length&&(p.value.searchParams.forEach($=>{$.default&&(s.value[$.key]=$.default)}),y())});const m=(D,$,F)=>{let S=F==="datetime"?"YYYY-MM-DD HH:mm":F==="date"?"YYYY-MM-DD":"HH:mm";return $e.dayjs(D).format(S)===$e.dayjs($).format(S)},d=e.ref(p.value.formList),y=D=>{D&&u(D),d.value=t(p.value.formList);const $=Object.keys(s.value);$!=null&&$.length&&$.forEach(F=>{var j;if(!s.value[F])return;const S=(j=p.value.searchParams)==null?void 0:j.find(W=>W.key===F);if(!(S!=null&&S.type))return;const R=S.type;d.value=d.value.filter(W=>{if(!Object.keys(W).includes(S.key))return he("error",`参数配置错误,【${S.label}】的属性(${S.key})在数据中不存在!`),!1;const le=W[S.key];if(!le)return!0;if([ae.DATETIME,ae.DATE,ae.TIME].includes(R))return m(le,s.value[F],R);if(R===ae.SELECTOR)return String(le)===String(s.value[F]);if(R===ae.CASCADER_SELECTOR){const se=s.value[F],Xe=Array.isArray(se)?se[se.length-1]:se;return String(le)===String(Xe)}else if(R===ae.INPUT)return String(le).includes(String(s.value[F]));return String(le).includes(String(s.value[F]))})})},u=async D=>{var $,F;if(($=D.clearKeys)!=null&&$.length&&D.clearKeys.forEach(S=>delete s.value[S]),D.updateOptionKey){const S=(F=p.value.searchParams)==null?void 0:F.find(R=>R.key===D.updateOptionKey);S&&[ae.SELECTOR,ae.CASCADER_SELECTOR].includes(S.type)&&S.getOptions&&(S.options=await S.getOptions(s.value[D.key]))}},_=async D=>{h.value!==D&&(h.value=D,f.value={datas:{},components:[],props:{}},p.value.getFormTemplate&&(f.value=await p.value.getFormTemplate(D)))},g=e.ref(new Map),V=e.computed(()=>{let D=0;for(const[,$]of g.value)D+=$.length;return D}),w=D=>{g.value.has(h.value)?D.length?g.value.set(h.value,D):g.value.delete(h.value):g.value.set(h.value,D)},b=()=>{let D=[];for(const[,$]of g.value)$.forEach(F=>{let S=t(F);delete S.selected,D.push(S)});return D},C=e.ref(!1),x=e.ref({datas:{},components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:l.value.props.formType}}),E=()=>{x.value.components=b(),C.value=!0},L=n,z=()=>{const D=b();L("select",D),i.value=!1};return(D,$)=>{const F=Q,S=e.resolveComponent("el-input"),R=e.resolveComponent("el-option"),j=e.resolveComponent("el-select"),W=e.resolveComponent("el-cascader"),le=e.resolveComponent("el-date-picker"),se=e.resolveComponent("el-time-picker"),Xe=e.resolveComponent("el-form-item"),xt=e.resolveComponent("el-form"),rt=e.resolveComponent("el-divider"),Le=e.resolveComponent("el-empty"),Re=Ye,Eo=e.resolveComponent("el-link"),Ae=e.resolveComponent("el-button"),Je=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(Je,{modelValue:i.value,"onUpdate:modelValue":$[1]||($[1]=ye=>i.value=ye),class:"batch-add-dialog","destroy-on-close":"",title:`批量添加${e.unref(a)}`},{footer:e.withCtx(()=>[e.createElementVNode("div",di,[e.createElementVNode("div",pi,[e.createElementVNode("span",mi,[e.createTextVNode(" 已选 "),e.createElementVNode("span",fi,e.toDisplayString(` ${e.unref(V)} `),1),e.createElementVNode("span",null,e.toDisplayString(` 个${e.unref(a)}`),1)]),e.createVNode(Eo,{type:"primary",disabled:e.unref(g).size===0,onClick:E},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`查看已选${e.unref(a)}`),1)]),_:1},8,["disabled"])]),e.createElementVNode("div",hi,[e.createVNode(Ae,{onClick:$[0]||($[0]=ye=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1}),e.createVNode(Ae,{type:"primary",onClick:z},{default:e.withCtx(()=>[e.createTextVNode(" 确定 ")]),_:1})])])]),default:e.withCtx(()=>{var ye,Ke,Kt;return[e.createElementVNode("div",ri,[(ye=e.unref(p).searchParams)!=null&&ye.length?(e.openBlock(),e.createBlock(xt,{key:0,model:e.unref(s),class:"search-param-form","label-suffix":":"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p).searchParams,(H,Et)=>(e.openBlock(),e.createBlock(Xe,{key:Et,label:H.label},{default:e.withCtx(()=>[H.type===e.unref(ae).INPUT?(e.openBlock(),e.createBlock(S,{key:0,class:"form-name-input",modelValue:e.unref(s)[H.key],"onUpdate:modelValue":ce=>e.unref(s)[H.key]=ce,placeholder:`搜索${H.label}`,clearable:"",onChange:ce=>y(H)},{append:e.withCtx(()=>[e.createVNode(F,{name:"search",color:"#08c979"})]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0),H.type===e.unref(ae).SELECTOR?(e.openBlock(),e.createBlock(j,{key:1,modelValue:e.unref(s)[H.key],"onUpdate:modelValue":ce=>e.unref(s)[H.key]=ce,placeholder:`请选择${H.label}`,clearable:"",onChange:ce=>y(H)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.options,(ce,Zt)=>(e.openBlock(),e.createBlock(R,{key:Zt,label:ce.label,value:ce.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0),H.type===e.unref(ae).CASCADER_SELECTOR?(e.openBlock(),e.createBlock(W,{key:2,ref_for:!0,ref:"cascaderRef",class:"cascader-component",modelValue:e.unref(s)[H.key],"onUpdate:modelValue":ce=>e.unref(s)[H.key]=ce,placeholder:`请选择${H.label}`,options:H.options,"show-all-levels":!1,props:{expandTrigger:"click",emitPath:!1},clearable:"",onChange:ce=>y(H)},null,8,["modelValue","onUpdate:modelValue","placeholder","options","onChange"])):e.createCommentVNode("",!0),[e.unref(ae).DATETIME,e.unref(ae).DATE,e.unref(ae)].includes(H.type)?(e.openBlock(),e.createBlock(le,{key:3,modelValue:e.unref(s)[H.key],"onUpdate:modelValue":ce=>e.unref(s)[H.key]=ce,type:H.type,placeholder:`请选择${H.label}`,"value-format":"YYYY-MM-DD HH:mm",clearable:"",onChange:ce=>y(H)},null,8,["modelValue","onUpdate:modelValue","type","placeholder","onChange"])):e.createCommentVNode("",!0),H.type===e.unref(ae).TIME?(e.openBlock(),e.createBlock(se,{key:4,modelValue:e.unref(s)[H.key],"onUpdate:modelValue":ce=>e.unref(s)[H.key]=ce,placeholder:`请选择${H.label}`,"value-format":"HH:mm",clearable:"",onChange:ce=>y(H)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"])):e.createCommentVNode("",!0)]),_:2},1032,["label"]))),128))]),_:1},8,["model"])):e.createCommentVNode("",!0),e.createVNode(rt),e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(H,Et)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-item",{selected:e.unref(h)===H.formID}]),key:Et,onClick:ce=>_(H.formID)},[e.createVNode(F,{name:e.unref(l).props.formType==="1"?"form":"examination",color:e.unref(g).has(H.formID)?"#ff7400":"#108bf7"},null,8,["name","color"]),e.createElementVNode("div",{class:"form-item-name",title:H.formName},e.toDisplayString(H.formName),9,si)],10,ii))),128))])]),e.createElementVNode("div",ci,[e.unref(h)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Le,{key:0,description:`请先选择左侧${e.unref(r)}`},null,8,["description"])),(Kt=(Ke=e.unref(f))==null?void 0:Ke.components)!=null&&Kt.length?(e.openBlock(),e.createBlock(Re,{key:1,formData:e.unref(f),selectMode:"",selectComponents:e.unref(g).get(e.unref(h)),onSelect:w},null,8,["formData","selectComponents"])):e.createCommentVNode("",!0)])]}),_:1},8,["modelValue","title"]),e.createVNode(Je,{modelValue:e.unref(C),"onUpdate:modelValue":$[3]||($[3]=ye=>e.isRef(C)?C.value=ye:null),class:"select-preview-dialog","destroy-on-close":"",title:`已选${e.unref(a)}预览`},{footer:e.withCtx(()=>[e.createVNode(Ae,{onClick:$[2]||($[2]=ye=>C.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1})]),default:e.withCtx(()=>{var ye,Ke;return[(Ke=(ye=e.unref(x))==null?void 0:ye.components)!=null&&Ke.length?(e.openBlock(),e.createBlock(Re,{key:0,formData:e.unref(x)},null,8,["formData"])):e.createCommentVNode("",!0)]}),_:1},8,["modelValue","title"])])}}}),c2="",gi={key:1,class:"tip"},_i=["innerHTML"],Jt=e.defineComponent({__name:"conditionInput",props:{title:{type:String,default:"条件设置"},content:{type:String,default:""},showStyle:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},defaultValue:{type:Array,default:()=>[]}},emits:["result","clear"],setup(o,{emit:n}){let t=e.inject("formDesignerData"),l=e.inject("formData"),r=t.selectComponent;const a=e.ref(),i=e.ref(!1),c=e.ref([]),p=e.ref({}),s=e.ref({}),h=()=>{c.value=[],p.value={},s.value={},f(l.value.components),i.value=!0},f=_=>{_.forEach(g=>{var V;if(r.id!==g.id){if(g.isLayout&&((V=g.children)!=null&&V.length)){f(g.children);return}g.isEdit&&(c.value.push({label:g.props.label,id:g.id}),p.value[g.id]=m(g.excludeFilterConditions),s.value[g.id]=g.filterConditionProps)}})},m=_=>Object.keys(it).filter(V=>!(_!=null&&_.includes(V))),d=n,y=()=>{const _=a.value.getFilterData();_.message||(i.value=!1,d("result",_))},u=()=>{d("clear")};return(_,g)=>{const V=e.resolveComponent("el-button"),w=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"condition-input",onClick:h},[o.clearable&&o.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:"close",onClick:e.withModifiers(u,["stop"])},"x")):e.createCommentVNode("",!0),o.content?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:o.content},null,8,_i)):(e.openBlock(),e.createElementBlock("span",gi,"单击设置条件"))]),e.createVNode(w,{class:"filter-dialog",modelValue:e.unref(i),"onUpdate:modelValue":g[1]||(g[1]=b=>e.isRef(i)?i.value=b:null),"destroy-on-close":"",title:o.title},{footer:e.withCtx(()=>[e.createVNode(V,{onClick:g[0]||(g[0]=b=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(V,{type:"primary",onClick:y},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})]),default:e.withCtx(()=>[e.createVNode(Ze,{ref_key:"dynamicFilterRef",ref:a,showStyle:"",items:e.unref(c),conditionTypes:e.unref(p),conditionProps:e.unref(s),defaultValue:o.defaultValue},null,8,["items","conditionTypes","conditionProps","defaultValue"])]),_:1},8,["modelValue","title"])],64)}}}),d2="",wi=e.defineComponent({__name:"componentAdvancedPropsEditor",setup(o){let t=e.inject("formDesignerData").selectComponent;const l=(a,i)=>{t.props[`${i}Conditions`]=a.filterConditions,t.props[`${i}ConditionContent`]=a.filterConditionContent,t.props[`${i}ConditionExpression`]=a.filterConditionExpression},r=a=>{t.props[`${a}Conditions`]=void 0,t.props[`${a}ConditionContent`]=void 0,t.props[`${a}ConditionExpression`]=void 0};return(a,i)=>{const c=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-switch"),s=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(s,{"label-width":"90px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(t).props.showFlag?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:0,label:"显示条件"},{default:e.withCtx(()=>[e.createVNode(Jt,{title:`${e.unref(t).props.label}—显示条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.showConditionContent,defaultValue:e.unref(t).props.showConditions,onResult:i[0]||(i[0]=h=>l(h,"show")),onClear:i[1]||(i[1]=h=>r("show"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).props.showFlag?(e.openBlock(),e.createBlock(c,{key:1,label:"隐藏条件"},{default:e.withCtx(()=>[e.createVNode(Jt,{title:`${e.unref(t).props.label}—隐藏条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.hiddenConditionContent,defaultValue:e.unref(t).props.hiddenConditions,onResult:i[2]||(i[2]=h=>l(h,"hidden")),onClear:i[3]||(i[3]=h=>r("hidden"))},null,8,["title","content","defaultValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(t).props.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:2,label:"只读条件"},{default:e.withCtx(()=>[e.createVNode(Jt,{title:`${e.unref(t).props.label}—只读条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.readonlyConditionContent,defaultValue:e.unref(t).props.readonlyConditions,onResult:i[4]||(i[4]=h=>l(h,"readonly")),onClear:i[5]||(i[5]=h=>r("readonly"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(c,{label:"参与统计"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).props.statisticsFlag,"onUpdate:modelValue":i[6]||(i[6]=h=>e.unref(t).props.statisticsFlag=h)},null,8,["modelValue"])]),_:1}),e.unref(t).props.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:0,label:"禁用条件"},{default:e.withCtx(()=>[e.createVNode(Jt,{title:`${e.unref(t).props.label}—禁用条件设置`,showStyle:"",clearable:"",content:e.unref(t).props.disabledConditionContent,defaultValue:e.unref(t).props.disabledConditions,onResult:i[7]||(i[7]=h=>l(h,"disabled")),onClear:i[8]||(i[8]=h=>r("disabled"))},null,8,["title","content","defaultValue"])]),_:1}))],64)):e.createCommentVNode("",!0)]),_:1})}}}),yi=e.defineComponent({__name:"componentBasePropsEditor",props:{dictionary:{type:Object,default:()=>{}},allowCreateDictionary:{type:Boolean,default:!0}},setup(o){const n=e.inject("formData"),t=e.inject("formDesignerData");let l=e.computed(()=>n.value.props.formType),r=t.selectComponent,a=t.selectComponent.rules;r.props.showLabel&&!r.props.labelWidth&&(r.props.labelWidth=n.value.props.labelWidth);const i=()=>{r.props.showConditionContent=void 0,r.props.showConditionExpression=void 0,r.props.showConditions=void 0,r.props.hiddenConditionContent=void 0,r.props.hiddenConditionExpression=void 0,r.props.hiddenConditions=void 0},c=()=>{r.props.readonlyConditionContent=void 0,r.props.readonlyConditionExpression=void 0,r.props.readonlyConditions=void 0},p=()=>{r.props.disabledConditionContent=void 0,r.props.disabledConditionExpression=void 0,r.props.disabledConditions=void 0},s=m=>{a[0].required=m},h=m=>{a[0].message=m},f=m=>{typeof m.value!="string"&&(r.itemID=m.value),r.id=m.value,r.itemSourceType=m.itemSourceType};return(m,d)=>{const y=e.resolveComponent("el-switch"),u=e.resolveComponent("el-form-item"),_=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-color-picker"),V=e.resolveComponent("el-slider"),w=e.resolveComponent("el-input"),b=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(b,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(l)==="1"&&e.unref(r).type!=="label"?(e.openBlock(),e.createBlock(u,{key:0,label:"显示标题"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.showLabel,"onUpdate:modelValue":d[0]||(d[0]=C=>e.unref(r).props.showLabel=C)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(r).props.showLabel||e.unref(r).type==="label"?(e.openBlock(),e.createBlock(u,{key:1,label:e.unref(r).type==="label"?"标签":e.unref(l)==="1"?"标题":"题目"},{default:e.withCtx(()=>[e.createVNode(Yt,{modelValue:e.unref(r).props.label,"onUpdate:modelValue":d[1]||(d[1]=C=>e.unref(r).props.label=C),dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary,placeholder:e.unref(r).type==="label"?"标签内容":e.unref(l)==="1"?"请输入标题":"请输入题目","item-height":50,height:"80px",onChange:f},null,8,["modelValue","dictionary","allowCreateDictionary","placeholder"])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.createVNode(u,{label:e.unref(r).type==="label"?"字体大小":e.unref(l)==="1"?"标题字号":"题目字号"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.fontSize,"onUpdate:modelValue":d[2]||(d[2]=C=>e.unref(r).props.fontSize=C),min:12,max:24},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(l)==="1"&&e.unref(r).props.showLabel?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(u,{label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.labelWidth,"onUpdate:modelValue":d[3]||(d[3]=C=>e.unref(r).props.labelWidth=C),min:0},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"标题换行"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.labelNewLine,"onUpdate:modelValue":d[4]||(d[4]=C=>e.unref(r).props.labelNewLine=C)},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(r).props.showLabel||e.unref(r).type==="label"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(u,{label:e.unref(r).type==="label"?"字体加粗":e.unref(l)==="1"?"标题加粗":"题目加粗"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.isBold,"onUpdate:modelValue":d[5]||(d[5]=C=>e.unref(r).props.isBold=C)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(u,{label:e.unref(r).type==="label"?"字体颜色":e.unref(l)==="1"?"标题颜色":"题目颜色"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.color,"onUpdate:modelValue":d[6]||(d[6]=C=>e.unref(r).props.color=C)},null,8,["modelValue"])]),_:1},8,["label"])],64)):e.createCommentVNode("",!0),e.createVNode(u,{label:"宽度"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:e.unref(r).props.width,"onUpdate:modelValue":d[7]||(d[7]=C=>e.unref(r).props.width=C),min:3,max:e.unref(n).props.column,"show-stops":""},null,8,["modelValue","max"])]),_:1}),e.createVNode(u,{label:"左缩进"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:e.unref(r).props.paddingLeft,"onUpdate:modelValue":d[8]||(d[8]=C=>e.unref(r).props.paddingLeft=C),min:0,max:100},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否显示"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.showFlag,"onUpdate:modelValue":d[9]||(d[9]=C=>e.unref(r).props.showFlag=C),onChange:i},null,8,["modelValue"])]),_:1}),e.unref(r).isInput?(e.openBlock(),e.createBlock(u,{key:4,label:"占位提示"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(r).props.placeholder,"onUpdate:modelValue":d[10]||(d[10]=C=>e.unref(r).props.placeholder=C),placeholder:"请输入占位提示"},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(r).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createVNode(u,{label:"允许清空"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.clearable,"onUpdate:modelValue":d[11]||(d[11]=C=>e.unref(r).props.clearable=C)},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否只读"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.readonly,"onUpdate:modelValue":d[12]||(d[12]=C=>e.unref(r).props.readonly=C),onChange:c},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否必填"},{default:e.withCtx(()=>[e.createVNode(y,{onChange:s,modelValue:e.unref(r).props.required,"onUpdate:modelValue":d[13]||(d[13]=C=>e.unref(r).props.required=C)},null,8,["modelValue"])]),_:1}),e.unref(r).props.required?(e.openBlock(),e.createBlock(u,{key:0,label:"必填提示"},{default:e.withCtx(()=>[e.createVNode(w,{onChange:h,modelValue:e.unref(r).props.requiredMessage,"onUpdate:modelValue":d[14]||(d[14]=C=>e.unref(r).props.requiredMessage=C)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(u,{label:"是否禁用"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.disabled,"onUpdate:modelValue":d[15]||(d[15]=C=>e.unref(r).props.disabled=C),onChange:p},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0),e.unref(r).type!=="label"&&!e.unref(r).isLayout?(e.openBlock(),e.createBlock(u,{key:6,label:e.unref(l)==="1"?"项目说明":"答案解析"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:e.unref(r).props.description,"onUpdate:modelValue":d[16]||(d[16]=C=>e.unref(r).props.description=C),autosize:{minRows:2,maxRows:5},type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"])):e.createCommentVNode("",!0)]),_:1})}}}),Ci=e.defineComponent({__name:"formPropsEditor",setup(o,{expose:n}){const t=e.inject("formData"),l=e.ref(),r=()=>{t.value.props.formType==="2"&&(t.value.props.labelPosition="top")};return n({async validate(a=()=>{}){return await l.value.validate(a)}}),(a,i)=>{const c=e.resolveComponent("el-radio-button"),p=e.resolveComponent("el-radio-group"),s=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-input"),f=e.resolveComponent("el-input-number"),m=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(m,{ref_key:"formRef",ref:l,model:e.unref(t).props,"label-width":"80px","scroll-to-error":"","label-suffix":":"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"formBeforeExtendProps"),e.createVNode(s,{prop:"formType",label:"表单类型",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).props.formType,"onUpdate:modelValue":i[0]||(i[0]=d=>e.unref(t).props.formType=d),onChange:r},{default:e.withCtx(()=>[e.createVNode(c,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("问卷")]),_:1}),e.createVNode(c,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("试卷")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{prop:"formName",label:e.unref(t).props.formType==="1"?"问卷名称":"试卷名称",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:e.unref(t).props.formName,"onUpdate:modelValue":i[1]||(i[1]=d=>e.unref(t).props.formName=d),autosize:"",type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(t).props.formType==="1"?(e.openBlock(),e.createBlock(s,{key:0,prop:"labelPosition",label:"标题位置"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).props.labelPosition,"onUpdate:modelValue":i[2]||(i[2]=d=>e.unref(t).props.labelPosition=d)},{default:e.withCtx(()=>[e.createVNode(c,{value:"top"},{default:e.withCtx(()=>[e.createTextVNode("上")]),_:1}),e.createVNode(c,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左")]),_:1}),e.createVNode(c,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右")]),_:1})]),_:1},8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(s,{prop:"labelWidth",label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).props.labelWidth,"onUpdate:modelValue":i[3]||(i[3]=d=>e.unref(t).props.labelWidth=d),step:5,min:0},null,8,["modelValue"])]),_:1}),e.createVNode(s,{prop:"size",label:"表单尺寸"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(t).props.size,"onUpdate:modelValue":i[4]||(i[4]=d=>e.unref(t).props.size=d)},{default:e.withCtx(()=>[e.createVNode(c,{value:"small"},{default:e.withCtx(()=>[e.createTextVNode("小")]),_:1}),e.createVNode(c,{value:"default"},{default:e.withCtx(()=>[e.createTextVNode("正常")]),_:1}),e.createVNode(c,{value:"large"},{default:e.withCtx(()=>[e.createTextVNode("大")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.renderSlot(a.$slots,"formAfterExtendProps")]),_:3},8,["model"])}}}),bi={class:"toolbar"},Vi=e.createElementVNode("div",{class:"devices"},null,-1),ki={class:"operates"},xi=e.createElementVNode("span",null,"清空",-1),Ei=e.createElementVNode("span",null,"模板导入",-1),Ni=e.createElementVNode("span",null,"查看JSON",-1),Bi=e.createElementVNode("span",null,"预览",-1),Di=e.createElementVNode("span",null,"保存",-1),Si=e.createElementVNode("span",null,"验证表单",-1),Mi=e.createElementVNode("span",null,"重置表单",-1),zi=e.createElementVNode("span",null,"表单数据",-1),fn=e.defineComponent({__name:"toolbar",props:{operates:{type:Array,default:()=>[]}},emits:["clearComponents","batchAdd","viewFormJson","previewFrom","saveFrom","validateForm","resetForm","viewDataJson","toggleDescription"],setup(o,{emit:n}){const t=e.inject("formData"),l=n,r=()=>{l("clearComponents")},a=()=>{l("batchAdd")},i=()=>{l("viewFormJson")},c=()=>{l("previewFrom")},p=()=>{l("saveFrom")},s=()=>{l("validateForm")},h=()=>{l("resetForm")},f=()=>{l("viewDataJson")},m=e.ref(!1),d=()=>{m.value=!m.value,l("toggleDescription",m.value)};return(y,u)=>{var w,b;const _=Q,g=e.resolveComponent("el-link"),V=e.resolveComponent("el-popconfirm");return e.openBlock(),e.createElementBlock("div",bi,[Vi,e.createElementVNode("div",ki,[o.operates.includes("clearComponents")?(e.openBlock(),e.createBlock(V,{key:0,confirmButtonText:"是",cancelButtonText:"否",title:"确定要清空所有组件吗?",width:((w=e.unref(t).components)==null?void 0:w.length)==0?0:160,onConfirm:r},{reference:e.withCtx(()=>{var C;return[e.createVNode(g,{type:"danger",underline:!1,disabled:((C=e.unref(t).components)==null?void 0:C.length)==0},{default:e.withCtx(()=>[e.createVNode(_,{name:"clear",color:"#ff0000"}),xi]),_:1},8,["disabled"])]}),_:1},8,["width"])):e.createCommentVNode("",!0),o.operates.includes("batchAdd")?(e.openBlock(),e.createBlock(g,{key:1,type:"primary",underline:!1,onClick:a},{default:e.withCtx(()=>[e.createVNode(_,{name:"batchAdd",color:"#116fff",size:"16"}),Ei]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewFormJson")?(e.openBlock(),e.createBlock(g,{key:2,type:"primary",underline:!1,onClick:i},{default:e.withCtx(()=>[e.createVNode(_,{name:"json"}),Ni]),_:1})):e.createCommentVNode("",!0),o.operates.includes("previewFrom")?(e.openBlock(),e.createBlock(g,{key:3,type:"primary",underline:!1,disabled:((b=e.unref(t).components)==null?void 0:b.length)==0,onClick:c},{default:e.withCtx(()=>[e.createVNode(_,{name:"preview",color:"#116fff"}),Bi]),_:1},8,["disabled"])):e.createCommentVNode("",!0),o.operates.includes("saveFrom")?(e.openBlock(),e.createBlock(g,{key:4,type:"primary",underline:!1,onClick:p},{default:e.withCtx(()=>[e.createVNode(_,{name:"save",size:"14px",color:"#08c979"}),Di]),_:1})):e.createCommentVNode("",!0),o.operates.includes("validateForm")?(e.openBlock(),e.createBlock(g,{key:5,type:"warning",underline:!1,onClick:s},{default:e.withCtx(()=>[e.createVNode(_,{name:"validate",color:"#e6a23c"}),Si]),_:1})):e.createCommentVNode("",!0),o.operates.includes("resetForm")?(e.openBlock(),e.createBlock(g,{key:6,type:"danger",underline:!1,onClick:h},{default:e.withCtx(()=>[e.createVNode(_,{name:"reset",color:"#ff0000"}),Mi]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewDataJson")?(e.openBlock(),e.createBlock(g,{key:7,type:"primary",underline:!1,onClick:f},{default:e.withCtx(()=>[e.createVNode(_,{name:"previewData",color:"#116fff"}),zi]),_:1})):e.createCommentVNode("",!0),o.operates.includes("toggleDescription")?(e.openBlock(),e.createBlock(g,{key:8,type:"primary",underline:!1,onClick:d},{default:e.withCtx(()=>[e.createVNode(_,{name:"description",color:"#08c979"}),e.createElementVNode("span",null,e.toDisplayString(`${e.unref(m)?"隐藏":"显示"}${e.unref(t).props.formType==="1"?"项目说明":"答案解析"}`),1)]),_:1})):e.createCommentVNode("",!0)])])}}}),p2="",$i={class:"form-designer"},Ti={class:"left-wrap"},Ii=["onClick","title"],Li={class:"component-name"},Ai={key:2,class:"no-component-tip"},Oi={key:3,class:"mobile-key"},Pi=["title"],Fi={key:1,class:"right-wrap"},Ri={class:"preview-wrap"},Ui={name:"zhy-form-designer"},kt=e.defineComponent({...Ui,props:{formData:{type:Object,required:!0},componentGroups:{type:Array,default:()=>[]},mergeGroup:{type:Boolean,default:!1},uploadOptions:{type:Object},dictionary:{type:Object,default:()=>{}},defaultSourceType:{type:String,default:void 0},allowCreateDictionary:{type:Boolean,default:!0},saveMethod:{type:Function,default:void 0},testMode:{type:Boolean,default:!1},batchAddComponentParams:{type:Object,default:()=>{}}},emits:["change","test"],setup(o,{emit:n}){const t=o,l=n,{getTempID:r,clone:a,stringifyJson:i,isEmpty:c}=de(),p={...Nt,...St,...Bt,...Dt},{formData:s,componentGroups:h,mergeGroup:f,batchAddComponentParams:m}=e.toRefs(t),d=e.reactive({selectComponent:void 0,propTab:"form",device:"pc"}),y=e.ref(!0),u=e.ref([]),_=e.computed(()=>g.value.map(B=>B.expand&&B.name)),g=e.ref([]),V=e.ref(!1),w={labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:"1"},b=[{name:"基础组件",expand:!0,components:[{type:"label",allowRepeat:!0,allowModify:!0},{type:"input",allowRepeat:!0,allowModify:!0},{type:"radio",allowRepeat:!0,allowModify:!0},{type:"checkbox",allowRepeat:!0,allowModify:!0}]},{name:"高级组件",expand:!0,components:[{type:"upload",allowRepeat:!0,allowModify:!0},{type:"uploadImage",allowRepeat:!0,allowModify:!0}]},{name:"布局组件",expand:!0,components:[{type:"groupLayout",allowRepeat:!0,allowModify:!0},{type:"tabs",allowRepeat:!0,allowModify:!0}]},{name:"应用组件",expand:!0,components:[{type:"employee",allowRepeat:!0,allowModify:!0},{type:"post",allowRepeat:!0,allowModify:!0},{type:"grade",allowRepeat:!0,allowModify:!0}]}],C=e.computed(()=>{let B=["clearComponents","previewFrom"];return m.value&&Object.keys(m.value).length&&B.push("batchAdd"),t.testMode&&B.push("viewFormJson"),t.saveMethod&&B.push("saveFrom"),B});e.onMounted(()=>{L(),x()}),e.watch(()=>d.selectComponent,B=>{if(d.propTab="component",!B){u.value=[];return}u.value=["base"],p[d.selectComponent.type].propEditor&&u.value.push("exclusive")}),e.watch([h,f],()=>{L()},{deep:!0}),e.watch(s,()=>{x()}),e.provide("uploadOptions",t.uploadOptions),e.provide("formDesignerData",d),e.provide("formData",s),e.provide("defaultSourceType",t.defaultSourceType);const x=()=>{d.selectComponent=void 0,s.value.datas||(s.value.datas={}),s.value.components?E(s.value.components):s.value.components=[],s.value.props?s.value.props=Object.assign(w,s.value.props):s.value.props=w,V.value=!s.value.props.formName},E=B=>{B.forEach(async k=>{var T;let A=new p[k.type].component;k.name=A.name,k.isEdit=A.isEdit,k.isInput=A.isInput,k.props=Object.assign(A.props,k.props),k.isEdit&&((k.props.required||k.props.pattern)&&(k.rules=A.getRules(k.props)),k.filterConditionProps=await A.getFilterConditionProps(k.props),k.excludeFilterConditions=A.getExcludeFilterConditions()),g.value.forEach(G=>{const fe=G.types.findIndex(K=>K!=null&&K.id.includes("temp")?K.type===k.type:(K==null?void 0:K.id)===k.id);fe!==-1&&(k.allowRepeat=G.types[fe].allowRepeat,k.allowModify=G.types[fe].allowModify,z(k,G.types[fe],!0),S(fe,G))}),k.isLayout&&((T=k==null?void 0:k.children)!=null&&T.length)&&E(k.children)})},L=()=>{var B;if(g.value=[],!((B=h.value)!=null&&B.length)){b.forEach(k=>{g.value.push(D(k))});return}if(t.mergeGroup){b.forEach(T=>{let G=T;const fe=h.value.find(K=>T.name===K.name);if(fe){let K=[];T.components.forEach(te=>{const Ne=fe.components.find(at=>at.type===te.type);Ne?K.push(Ne):K.push(te)}),G.components=K}g.value.push(D(G))});const k=b.map(T=>T.name);h.value.filter(T=>!k.includes(T.name)).forEach(T=>{g.value.push(D(T))})}else h.value.forEach(k=>{g.value.push(D(k))})},z=(B,k,A)=>{const T={employee:[{label:"人员1",value:r()}],post:[{label:"部门1",value:r()}],grade:[]};switch(B.type){case"employee":B.props.options=(A?k.props.options:k.options)||T.employee,k.searchEmployeeMethod?B.searchEmployeeMethod=k.searchEmployeeMethod:B.searchEmployeeMethod=G=>[];break;case"post":B.props.options=(A?k.props.options:k.options)||T.post;break;case"grade":B.props.remarkOptions=(A?k.props.remarkOptions:k.options)||T.grade;break}},D=B=>{let k=a(B);return k.types=k.components.map(A=>{var G;let T=new p[A.type].component;return T.allowRepeat=A.allowRepeat===void 0?!0:A.allowRepeat,T.allowModify=A.allowModify===void 0?!0:A.allowModify,z(T,A),!((G=A.id)!=null&&G.includes("temp"))&&!c(A.props)&&(T.props=Object.assign(T.props,A.props),T.id=A.id,T.name=A.name),T}),k.dynamicTypes=a(k.types),k.components=k.components.map(A=>A.type),k},$=(B,k)=>{const A=F(B);s.value.components.push(A),Ae();const T=k.types.findIndex(G=>B!=null&&B.id.includes("temp")?G.type===B.type:(G==null?void 0:G.id)===B.id);T!==-1&&S(T,k),d.selectComponent=void 0,e.nextTick(()=>d.selectComponent=A)},F=B=>{var T,G;let k=a(B);k.itemSourceType=t.defaultSourceType;let A=new p[B.type].component;return A.isEdit&&(k.filterConditionProps=A.getFilterConditionProps(k.props)),!((T=k.id)!=null&&T.includes("temp"))||(k.id=r(),!((G=k.props.options)!=null&&G.length)||["employee","post"].includes(k.type))||k.props.options.forEach(fe=>{fe.value=r(),fe.itemSourceType=t.defaultSourceType}),k},S=(B,k)=>{k.types[B].allowRepeat||k.types.splice(B,1)},R=B=>{B.allowRepeat||g.value.forEach(k=>{let A=[];k.dynamicTypes.forEach((T,G)=>{k.types.findIndex(K=>T!=null&&T.id.includes("temp")?T.type===K.type:(T==null?void 0:T.id)===K.id)!==-1&&A.push(a(k.dynamicTypes[G])),(T!=null&&T.id.includes("temp")&&T.type===B.type||(T==null?void 0:T.id)===B.id)&&A.push(a(k.dynamicTypes[G]))}),k.types=A})},j=()=>{s.value.components.splice(0,s.value.components.length),Ae(),d.selectComponent=void 0},W=e.ref(!1),le=()=>{W.value=!0},se=B=>{B!=null&&B.length&&(E(B),B.forEach(k=>s.value.components.push(k)),Ae())},Xe=()=>{ye.value=i(s.value),Je.value=!0},xt=e.ref(),rt=async()=>{if(t.saveMethod){if(!s.value.components.length){he("error","未发现需要保存的数据!");return}const B=await ce();B&&t.saveMethod(B)}},Le=e.ref(),Re=e.ref(!1),Eo=()=>{Re.value=!0};e.watch(()=>Re.value,()=>{s.value.datas={},s.value.components.forEach(B=>{!s.value.datas[B.id]&&!c(B.props.defaultValue)&&(B.type==="grade"?s.value.datas[B.id]={score:B.props.defaultValue}:s.value.datas[B.id]=B.props.defaultValue)})}),e.watch(()=>d.selectComponent,(B,k)=>{B&&k&&i(B.props)!==i(k)&&Ae()},{deep:!0});const Ae=dn(()=>{l("change")},50),Je=e.ref(!1),ye=e.ref(),Ke=async()=>{await Le.value.validate()?he("success","通过验证"):he("error","未通过验证")},Kt=()=>{Le.value.resetFields()},H=()=>{const{data:B,fileList:k}=Le.value.getDatas();console.log(B,k)},Et=()=>{Le.value.toggleDescription()},ce=async()=>{if(!await xt.value.validate()){he("error","请将表单属性填写完整!"),d.propTab="form";return}let k=["单选框","多选框","选项","标签","文本框","分组名称"],A=a(s.value);if(A.datas={},Zt(k,A.components))return A},Zt=(B,k,A)=>{var G,fe;let T=!0;for(let K=0;K<k.length;K++){let te=k[K];if(delete te.isEdit,delete te.isInput,delete te.name,delete te.rules,delete te.excludeFilterConditions,delete te.filterConditionProps,B.find(Ne=>te.props.label.indexOf(Ne)===0)){he("error",`请将${A?`【${A}】中`:""}第${K+1}个项目的【${te.props.label}】调整为合理描述!`),T=!1;break}if((G=te.props.options)!=null&&G.length){for(let Ne=0;Ne<te.props.options.length;Ne++){let at=te.props.options[Ne];if(B.find(Qt=>at.label.indexOf(Qt)===0)){he("error",`请将【${te.props.label}】的第${Ne+1}个选项的【${at.label}】调整为合理描述!`),T=!1;break}}if(!T)break}c(k[K].props.defaultValue)&&(k[K].props.defaultValue=void 0),te.isLayout&&((fe=te==null?void 0:te.children)!=null&&fe.length)&&(T=Zt(B,te.children,te.props.label))}return T};return e.watch(s.value.components,()=>{l("test")}),(B,k)=>{var hn;const A=Q,T=e.resolveComponent("el-collapse-item"),G=e.resolveComponent("el-collapse"),fe=e.resolveComponent("el-input"),K=e.resolveComponent("el-form"),te=e.resolveComponent("el-empty"),Ne=e.resolveComponent("el-tab-pane"),at=e.resolveComponent("el-tabs"),Qt=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",$i,[e.createElementVNode("div",Ti,[e.createVNode(G,{modelValue:e.unref(_),"onUpdate:modelValue":k[0]||(k[0]=Y=>e.isRef(_)?_.value=Y:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),(Y,ji)=>(e.openBlock(),e.createBlock(T,{key:ji,title:Y.name,name:Y.name},{default:e.withCtx(()=>[e.createVNode(e.unref(lt),{list:Y.types,"item-key":"type",tag:"div",class:"component-list",clone:Ue=>F(Ue),sort:!1,onRemove:Ue=>S(Ue.oldIndex,Y),group:{name:"component",pull:"clone",put:!1}},{item:e.withCtx(({element:Ue})=>[e.createElementVNode("div",{class:"component-item",onClick:h2=>$(Ue,Y),title:Ue.name},[e.createVNode(A,{name:Ue.type,color:"#fc8720"},null,8,["name"]),e.createElementVNode("span",Li,e.toDisplayString(Ue.name),1)],8,Ii)]),_:2},1032,["list","clone","onRemove"])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])]),e.unref(s).props?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["center-wrap",{"open-props":e.unref(y)}])},[e.createVNode(fn,{operates:e.unref(C),onClearComponents:j,onBatchAdd:le,onViewFormJson:Xe,onPreviewFrom:Eo,onSaveFrom:rt},null,8,["operates"]),e.createElementVNode("div",{class:e.normalizeClass(["component-form",e.unref(d).device])},[e.unref(V)?(e.openBlock(),e.createBlock(fe,{key:0,class:"title-input",modelValue:e.unref(s).props.formName,"onUpdate:modelValue":k[1]||(k[1]=Y=>e.unref(s).props.formName=Y),placeholder:"单击输入标题",onBlur:k[2]||(k[2]=Y=>V.value=!1),onKeydown:k[3]||(k[3]=e.withKeys(Y=>V.value=!1,["enter"]))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("h2",{key:1,class:"title",onClick:k[4]||(k[4]=Y=>V.value=!0)},e.toDisplayString(e.unref(s).props.formName),1)),(hn=e.unref(s).components)!=null&&hn.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ai,"从左侧拖拽组件")),e.createVNode(K,{class:"designer-form","label-position":e.unref(s).props.labelPosition,"label-width":e.unref(s).props.labelWidth,size:e.unref(s).props.size,"status-icon":!1,"show-message":!1,disabled:""},{default:e.withCtx(()=>[e.createVNode(Vo,{components:e.unref(s).components,"onUpdate:components":k[5]||(k[5]=Y=>e.unref(s).components=Y),onDeleteComponent:R,onChange:k[6]||(k[6]=Y=>e.unref(Ae)())},null,8,["components"])]),_:1},8,["label-position","label-width","size"]),e.unref(d).device==="mobile"?(e.openBlock(),e.createElementBlock("div",Oi)):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("i",{class:e.normalizeClass(["toggle-props",e.unref(y)?"show":"hidden"]),title:e.unref(y)?"隐藏属性配置面板":"打开属性配置面板",onClick:k[7]||(k[7]=Y=>y.value=!e.unref(y))},null,10,Pi),e.unref(y)?(e.openBlock(),e.createElementBlock("div",Fi,[e.createVNode(at,{class:"prop-tabs",modelValue:e.unref(d).propTab,"onUpdate:modelValue":k[10]||(k[10]=Y=>e.unref(d).propTab=Y),type:"border-card"},{default:e.withCtx(()=>[e.createVNode(Ne,{label:"组件属性",name:"component"},{default:e.withCtx(()=>[e.unref(d).selectComponent?(e.openBlock(),e.createBlock(G,{key:1,modelValue:e.unref(u),"onUpdate:modelValue":k[9]||(k[9]=Y=>e.isRef(u)?u.value=Y:null)},{default:e.withCtx(()=>[e.createVNode(T,{title:"基础属性",name:"base"},{default:e.withCtx(()=>[e.createVNode(yi,{dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary},null,8,["dictionary","allowCreateDictionary"])]),_:1}),p[e.unref(d).selectComponent.type].propEditor?(e.openBlock(),e.createBlock(T,{key:0,title:"专有属性",name:"exclusive"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p[e.unref(d).selectComponent.type].propEditor),{componentProps:e.unref(d).selectComponent.props,"onUpdate:componentProps":k[8]||(k[8]=Y=>e.unref(d).selectComponent.props=Y),dictionary:o.dictionary,allowCreateDictionary:o.allowCreateDictionary},null,40,["componentProps","dictionary","allowCreateDictionary"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(T,{title:"高级属性",name:"advanced"},{default:e.withCtx(()=>[e.createVNode(wi)]),_:1})]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(te,{key:0,description:"请选择组件"}))]),_:1}),e.createVNode(Ne,{label:"表单属性",name:"form",class:"form-props"},{default:e.withCtx(()=>[e.unref(s).props?(e.openBlock(),e.createBlock(Ci,{key:0,ref_key:"formPropsEditorRef",ref:xt},{formBeforeExtendProps:e.withCtx(()=>[e.renderSlot(B.$slots,"formBeforeExtendProps")]),formAfterExtendProps:e.withCtx(()=>[e.renderSlot(B.$slots,"formAfterExtendProps")]),_:3},512)):e.createCommentVNode("",!0)]),_:3})]),_:3},8,["modelValue"])])):e.createCommentVNode("",!0)]),e.createVNode(Qt,{modelValue:e.unref(Re),"onUpdate:modelValue":k[11]||(k[11]=Y=>e.isRef(Re)?Re.value=Y:null),class:"preview-dialog no-footer","destroy-on-close":"",fullscreen:"",title:"表单预览"},{default:e.withCtx(()=>[e.createElementVNode("div",Ri,[e.createVNode(fn,{operates:["validateForm","resetForm",o.testMode?"viewDataJson":"","toggleDescription"],onValidateForm:Ke,onResetForm:Kt,onViewDataJson:H,onToggleDescription:Et},null,8,["operates"]),e.createVNode(Ye,{watching:"",ref_key:"rendererForm",ref:Le,formData:e.unref(s),uploadOptions:o.uploadOptions,device:e.unref(d).device},null,8,["formData","uploadOptions","device"])])]),_:1},8,["modelValue"]),e.createVNode(Qt,{modelValue:e.unref(Je),"onUpdate:modelValue":k[12]||(k[12]=Y=>e.isRef(Je)?Je.value=Y:null),class:"no-footer","destroy-on-close":"",title:"表单数据JSON",width:"600px"},{default:e.withCtx(()=>[e.createElementVNode("pre",null,e.toDisplayString(e.unref(ye)),1)]),_:1},8,["modelValue"]),e.unref(W)?(e.openBlock(),e.createBlock(ui,{key:0,modelValue:e.unref(W),"onUpdate:modelValue":k[13]||(k[13]=Y=>e.isRef(W)?W.value=Y:null),params:e.unref(m),onSelect:se},null,8,["modelValue","params"])):e.createCommentVNode("",!0)],64)}}}),m2="";kt.install=function(o){o.component(kt.name,kt)},Ye.install=function(o){o.component(Ye.name,Ye)},Q.install=function(o){o.component(Q.name,Q)};const Hi=[Q,kt,Ye,Ze],qi={install:function(o,n){Hi.forEach(t=>{o.component(t.name,t)})}};re.MessageType=No,re.componentType=ae,re.default=qi,re.filterConditionTypes=it,re.zhyDynamicFilter=Ze,re.zhyFormDesigner=kt,re.zhyFormRenderer=Ye,re.zhyIcon=Q,Object.defineProperties(re,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|