zhytech-ui 1.0.17 → 1.0.18

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.
@@ -4,4 +4,4 @@
4
4
  * @author owenm <owen23355@gmail.com>
5
5
  * @license MIT
6
6
  */function po(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 Ne(o){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?po(Object(t),!0).forEach(function(l){h3(o,l,t[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):po(Object(t)).forEach(function(l){Object.defineProperty(o,l,Object.getOwnPropertyDescriptor(t,l))})}return o}function wt(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wt=function(n){return typeof n}:wt=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wt(o)}function h3(o,n,t){return n in o?Object.defineProperty(o,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[n]=t,o}function ye(){return ye=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},ye.apply(this,arguments)}function u3(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 g3(o,n){if(o==null)return{};var t=u3(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 _3(o){return w3(o)||y3(o)||b3(o)||C3()}function w3(o){if(Array.isArray(o))return Pt(o)}function y3(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function b3(o,n){if(o){if(typeof o=="string")return Pt(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 Pt(o,n)}}function Pt(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 C3(){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 V3="1.15.2";function Se(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var Me=Se(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Qe=Se(/Edge/i),mo=Se(/firefox/i),ve=Se(/safari/i)&&!Se(/chrome/i)&&!Se(/android/i),fo=Se(/iP(ad|od|hone)/i),ho=Se(/chrome/i)&&Se(/android/i),uo={capture:!1,passive:!1};function R(o,n,t){o.addEventListener(n,t,!Me&&uo)}function F(o,n,t){o.removeEventListener(n,t,!Me&&uo)}function yt(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 x3(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function be(o,n,t,l){if(o){t=t||document;do{if(n!=null&&(n[0]===">"?o.parentNode===t&&yt(o,n):yt(o,n))||l&&o===t)return o;if(o===t)break}while(o=x3(o))}return null}var go=/\s+/g;function J(o,n,t){if(o&&n)if(o.classList)o.classList[t?"add":"remove"](n);else{var l=(" "+o.className+" ").replace(go," ").replace(" "+n+" "," ");o.className=(l+(t?" "+n:"")).replace(go," ")}}function D(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 Oe(o,n){var t="";if(typeof o=="string")t=o;else do{var l=D(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 _o(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 Be(){var o=document.scrollingElement;return o||document.documentElement}function G(o,n,t,l,r){if(!(!o.getBoundingClientRect&&o!==window)){var a,i,s,d,c,m,f;if(o!==window&&o.parentNode&&o!==Be()?(a=o.getBoundingClientRect(),i=a.top,s=a.left,d=a.bottom,c=a.right,m=a.height,f=a.width):(i=0,s=0,d=window.innerHeight,c=window.innerWidth,m=window.innerHeight,f=window.innerWidth),(n||t)&&o!==window&&(r=r||o.parentNode,!Me))do if(r&&r.getBoundingClientRect&&(D(r,"transform")!=="none"||t&&D(r,"position")!=="static")){var h=r.getBoundingClientRect();i-=h.top+parseInt(D(r,"border-top-width")),s-=h.left+parseInt(D(r,"border-left-width")),d=i+a.height,c=s+a.width;break}while(r=r.parentNode);if(l&&o!==window){var p=Oe(r||o),g=p&&p.a,u=p&&p.d;p&&(i/=u,s/=g,f/=g,m/=u,d=i+m,c=s+f)}return{top:i,left:s,bottom:d,right:c,width:f,height:m}}}function wo(o,n,t){for(var l=$e(o,!0),r=G(o)[n];l;){var a=G(l)[t],i=void 0;if(t==="top"||t==="left"?i=r>=a:i=r<=a,!i)return l;if(l===Be())break;l=$e(l,!1)}return!1}function Ge(o,n,t,l){for(var r=0,a=0,i=o.children;a<i.length;){if(i[a].style.display!=="none"&&i[a]!==$.ghost&&(l||i[a]!==$.dragged)&&be(i[a],t.draggable,o,!1)){if(r===n)return i[a];r++}a++}return null}function Rt(o,n){for(var t=o.lastElementChild;t&&(t===$.ghost||D(t,"display")==="none"||n&&!yt(t,n));)t=t.previousElementSibling;return t||null}function ee(o,n){var t=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==$.clone&&(!n||yt(o,n))&&t++;return t}function yo(o){var n=0,t=0,l=Be();if(o)do{var r=Oe(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 k3(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 $e(o,n){if(!o||!o.getBoundingClientRect)return Be();var t=o,l=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=D(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 Be();if(l||n)return t;l=!0}}while(t=t.parentNode);return Be()}function E3(o,n){if(o&&n)for(var t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o}function Ut(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 et;function bo(o,n){return function(){if(!et){var t=arguments,l=this;t.length===1?o.call(l,t[0]):o.apply(l,t),et=setTimeout(function(){et=void 0},n)}}}function N3(){clearTimeout(et),et=void 0}function Co(o,n,t){o.scrollLeft+=n,o.scrollTop+=t}function Ht(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 Vo(o,n){D(o,"position","absolute"),D(o,"top",n.top),D(o,"left",n.left),D(o,"width",n.width),D(o,"height",n.height)}function qt(o){D(o,"position",""),D(o,"top",""),D(o,"left",""),D(o,"width",""),D(o,"height","")}function xo(o,n,t){var l={};return Array.from(o.children).forEach(function(r){var a,i,s,d;if(!(!be(r,n.draggable,o,!1)||r.animated||r===t)){var c=G(r);l.left=Math.min((a=l.left)!==null&&a!==void 0?a:1/0,c.left),l.top=Math.min((i=l.top)!==null&&i!==void 0?i:1/0,c.top),l.right=Math.max((s=l.right)!==null&&s!==void 0?s:-1/0,c.right),l.bottom=Math.max((d=l.bottom)!==null&&d!==void 0?d:-1/0,c.bottom)}}),l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}var ce="Sortable"+new Date().getTime();function B3(){var o=[],n;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var l=[].slice.call(this.el.children);l.forEach(function(r){if(!(D(r,"display")==="none"||r===$.ghost)){o.push({target:r,rect:G(r)});var a=Ne({},o[o.length-1].rect);if(r.thisAnimationDuration){var i=Oe(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(k3(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(s){var d=0,c=s.target,m=c.fromRect,f=G(c),h=c.prevFromRect,p=c.prevToRect,g=s.rect,u=Oe(c,!0);u&&(f.top-=u.f,f.left-=u.e),c.toRect=f,c.thisAnimationDuration&&Ut(h,f)&&!Ut(m,f)&&(g.top-f.top)/(g.left-f.left)===(m.top-f.top)/(m.left-f.left)&&(d=S3(g,h,p,r.options)),Ut(f,m)||(c.prevFromRect=m,c.prevToRect=f,d||(d=r.options.animation),r.animate(c,g,f,d)),d&&(a=!0,i=Math.max(i,d),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},d),c.thisAnimationDuration=d)}),clearTimeout(n),a?n=setTimeout(function(){typeof l=="function"&&l()},i):typeof l=="function"&&l(),o=[]},animate:function(l,r,a,i){if(i){D(l,"transition",""),D(l,"transform","");var s=Oe(this.el),d=s&&s.a,c=s&&s.d,m=(r.left-a.left)/(d||1),f=(r.top-a.top)/(c||1);l.animatingX=!!m,l.animatingY=!!f,D(l,"transform","translate3d("+m+"px,"+f+"px,0)"),this.forRepaintDummy=D3(l),D(l,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),D(l,"transform","translate3d(0,0,0)"),typeof l.animated=="number"&&clearTimeout(l.animated),l.animated=setTimeout(function(){D(l,"transition",""),D(l,"transform",""),l.animated=!1,l.animatingX=!1,l.animatingY=!1},i)}}}}function D3(o){return o.offsetWidth}function S3(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 We=[],jt={initializeByDefault:!0},tt={mount:function(n){for(var t in jt)jt.hasOwnProperty(t)&&!(t in n)&&(n[t]=jt[t]);We.forEach(function(l){if(l.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),We.push(n)},pluginEvent:function(n,t,l){var r=this;this.eventCanceled=!1,l.cancel=function(){r.eventCanceled=!0};var a=n+"Global";We.forEach(function(i){t[i.pluginName]&&(t[i.pluginName][a]&&t[i.pluginName][a](Ne({sortable:t},l)),t.options[i.pluginName]&&t[i.pluginName][n]&&t[i.pluginName][n](Ne({sortable:t},l)))})},initializePlugins:function(n,t,l,r){We.forEach(function(s){var d=s.pluginName;if(!(!n.options[d]&&!s.initializeByDefault)){var c=new s(n,t,n.options);c.sortable=n,c.options=n.options,n[d]=c,ye(l,c.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 We.forEach(function(r){typeof r.eventProperties=="function"&&ye(l,r.eventProperties.call(t[r.pluginName],n))}),l},modifyOption:function(n,t,l){var r;return We.forEach(function(a){n[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(r=a.optionListeners[t].call(n[a.pluginName],l))}),r}};function ot(o){var n=o.sortable,t=o.rootEl,l=o.name,r=o.targetEl,a=o.cloneEl,i=o.toEl,s=o.fromEl,d=o.oldIndex,c=o.newIndex,m=o.oldDraggableIndex,f=o.newDraggableIndex,h=o.originalEvent,p=o.putSortable,g=o.extraEventProperties;if(n=n||t&&t[ce],!!n){var u,_=n.options,b="on"+l.charAt(0).toUpperCase()+l.substr(1);window.CustomEvent&&!Me&&!Qe?u=new CustomEvent(l,{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent(l,!0,!0)),u.to=i||t,u.from=s||t,u.item=r||t,u.clone=a,u.oldIndex=d,u.newIndex=c,u.oldDraggableIndex=m,u.newDraggableIndex=f,u.originalEvent=h,u.pullMode=p?p.lastPutMode:void 0;var x=Ne(Ne({},g),tt.getEventProperties(l,n));for(var y in x)u[y]=x[y];t&&t.dispatchEvent(u),_[b]&&_[b].call(n,u)}}var M3=["evt"],fe=function(n,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=l.evt,a=g3(l,M3);tt.pluginEvent.bind($)(n,t,Ne({dragEl:E,parentEl:te,ghostEl:L,rootEl:Y,nextEl:Fe,lastDownEl:bt,cloneEl:Z,cloneHidden:Te,dragStarted:lt,putSortable:re,activeSortable:$.active,originalEvent:r,oldIndex:Xe,oldDraggableIndex:nt,newIndex:_e,newDraggableIndex:Ie,hideGhostForTarget:Mo,unhideGhostForTarget:zo,cloneNowHidden:function(){Te=!0},cloneNowShown:function(){Te=!1},dispatchSortableEvent:function(s){me({sortable:t,name:s,originalEvent:r})}},a))};function me(o){ot(Ne({putSortable:re,cloneEl:Z,targetEl:E,rootEl:Y,oldIndex:Xe,oldDraggableIndex:nt,newIndex:_e,newDraggableIndex:Ie},o))}var E,te,L,Y,Fe,bt,Z,Te,Xe,_e,nt,Ie,Ct,re,Ye=!1,Vt=!1,xt=[],Pe,xe,Gt,Wt,ko,Eo,lt,Ke,rt,at=!1,kt=!1,Et,de,Xt=[],Yt=!1,Nt=[],Bt=typeof document<"u",Dt=fo,No=Qe||Me?"cssFloat":"float",z3=Bt&&!ho&&!fo&&"draggable"in document.createElement("div"),Bo=function(){if(Bt){if(Me)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Do=function(n,t){var l=D(n),r=parseInt(l.width)-parseInt(l.paddingLeft)-parseInt(l.paddingRight)-parseInt(l.borderLeftWidth)-parseInt(l.borderRightWidth),a=Ge(n,0,t),i=Ge(n,1,t),s=a&&D(a),d=i&&D(i),c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+G(a).width,m=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+G(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&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return i&&(d.clear==="both"||d.clear===f)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||c>=r&&l[No]==="none"||i&&l[No]==="none"&&c+m>r)?"vertical":"horizontal"},$3=function(n,t,l){var r=l?n.left:n.top,a=l?n.right:n.bottom,i=l?n.width:n.height,s=l?t.left:t.top,d=l?t.right:t.bottom,c=l?t.width:t.height;return r===s||a===d||r+i/2===s+c/2},T3=function(n,t){var l;return xt.some(function(r){var a=r[ce].options.emptyInsertThreshold;if(!(!a||Rt(r))){var i=G(r),s=n>=i.left-a&&n<=i.right+a,d=t>=i.top-a&&t<=i.bottom+a;if(s&&d)return l=r}}),l},So=function(n){function t(a,i){return function(s,d,c,m){var f=s.options.group.name&&d.options.group.name&&s.options.group.name===d.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(s,d,c,m),i)(s,d,c,m);var h=(i?s:d).options.group.name;return a===!0||typeof a=="string"&&a===h||a.join&&a.indexOf(h)>-1}}var l={},r=n.group;(!r||wt(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},Mo=function(){!Bo&&L&&D(L,"display","none")},zo=function(){!Bo&&L&&D(L,"display","")};Bt&&!ho&&document.addEventListener("click",function(o){if(Vt)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),Vt=!1,!1},!0);var Re=function(n){if(E){n=n.touches?n.touches[0]:n;var t=T3(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[ce]._onDragOver(l)}}},I3=function(n){E&&E.parentNode[ce]._isOutsideThisEl(n.target)};function $(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=ye({},n),o[ce]=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 Do(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,s){i.setData("Text",s.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:$.supportPointer!==!1&&"PointerEvent"in window&&!ve,emptyInsertThreshold:5};tt.initializePlugins(this,o,t);for(var l in t)!(l in n)&&(n[l]=t[l]);So(n);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=n.forceFallback?!1:z3,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?R(o,"pointerdown",this._onTapStart):(R(o,"mousedown",this._onTapStart),R(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(R(o,"dragover",this),R(o,"dragenter",this)),xt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),ye(this,B3())}$.prototype={constructor:$,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(Ke=null)},_getDirection:function(n,t){return typeof this.options.direction=="function"?this.options.direction.call(this,n,t,E):this.options.direction},_onTapStart:function(n){if(n.cancelable){var t=this,l=this.el,r=this.options,a=r.preventOnFilter,i=n.type,s=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,d=(s||n).target,c=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||d,m=r.filter;if(H3(l),!E&&!(/mousedown|pointerdown/.test(i)&&n.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&ve&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=be(d,r.draggable,l,!1),!(d&&d.animated)&&bt!==d)){if(Xe=ee(d),nt=ee(d,r.draggable),typeof m=="function"){if(m.call(this,n,d,this)){me({sortable:t,rootEl:c,name:"filter",targetEl:d,toEl:l,fromEl:l}),fe("filter",t,{evt:n}),a&&n.cancelable&&n.preventDefault();return}}else if(m&&(m=m.split(",").some(function(f){if(f=be(c,f.trim(),l,!1),f)return me({sortable:t,rootEl:f,name:"filter",targetEl:d,fromEl:l,toEl:l}),fe("filter",t,{evt:n}),!0}),m)){a&&n.cancelable&&n.preventDefault();return}r.handle&&!be(c,r.handle,l,!1)||this._prepareDragStart(n,s,d)}}},_prepareDragStart:function(n,t,l){var r=this,a=r.el,i=r.options,s=a.ownerDocument,d;if(l&&!E&&l.parentNode===a){var c=G(l);if(Y=a,E=l,te=E.parentNode,Fe=E.nextSibling,bt=l,Ct=i.group,$.dragged=E,Pe={target:E,clientX:(t||n).clientX,clientY:(t||n).clientY},ko=Pe.clientX-c.left,Eo=Pe.clientY-c.top,this._lastX=(t||n).clientX,this._lastY=(t||n).clientY,E.style["will-change"]="all",d=function(){if(fe("delayEnded",r,{evt:n}),$.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!mo&&r.nativeDraggable&&(E.draggable=!0),r._triggerDragStart(n,t),me({sortable:r,name:"choose",originalEvent:n}),J(E,i.chosenClass,!0)},i.ignore.split(",").forEach(function(m){_o(E,m.trim(),Kt)}),R(s,"dragover",Re),R(s,"mousemove",Re),R(s,"touchmove",Re),R(s,"mouseup",r._onDrop),R(s,"touchend",r._onDrop),R(s,"touchcancel",r._onDrop),mo&&this.nativeDraggable&&(this.options.touchStartThreshold=4,E.draggable=!0),fe("delayStart",this,{evt:n}),i.delay&&(!i.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Qe||Me))){if($.eventCanceled){this._onDrop();return}R(s,"mouseup",r._disableDelayedDrag),R(s,"touchend",r._disableDelayedDrag),R(s,"touchcancel",r._disableDelayedDrag),R(s,"mousemove",r._delayedDragTouchMoveHandler),R(s,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&R(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(d,i.delay)}else d()}},_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(){E&&Kt(E),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;F(n,"mouseup",this._disableDelayedDrag),F(n,"touchend",this._disableDelayedDrag),F(n,"touchcancel",this._disableDelayedDrag),F(n,"mousemove",this._delayedDragTouchMoveHandler),F(n,"touchmove",this._delayedDragTouchMoveHandler),F(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,t){t=t||n.pointerType=="touch"&&n,!this.nativeDraggable||t?this.options.supportPointer?R(document,"pointermove",this._onTouchMove):t?R(document,"touchmove",this._onTouchMove):R(document,"mousemove",this._onTouchMove):(R(E,"dragend",this),R(Y,"dragstart",this._onDragStart));try{document.selection?Mt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,t){if(Ye=!1,Y&&E){fe("dragStarted",this,{evt:t}),this.nativeDraggable&&R(document,"dragover",I3);var l=this.options;!n&&J(E,l.dragClass,!1),J(E,l.ghostClass,!0),$.active=this,n&&this._appendGhost(),me({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(xe){this._lastX=xe.clientX,this._lastY=xe.clientY,Mo();for(var n=document.elementFromPoint(xe.clientX,xe.clientY),t=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(xe.clientX,xe.clientY),n!==t);)t=n;if(E.parentNode[ce]._isOutsideThisEl(n),t)do{if(t[ce]){var l=void 0;if(l=t[ce]._onDragOver({clientX:xe.clientX,clientY:xe.clientY,target:n,rootEl:t}),l&&!this.options.dragoverBubble)break}n=t}while(t=t.parentNode);zo()}},_onTouchMove:function(n){if(Pe){var t=this.options,l=t.fallbackTolerance,r=t.fallbackOffset,a=n.touches?n.touches[0]:n,i=L&&Oe(L,!0),s=L&&i&&i.a,d=L&&i&&i.d,c=Dt&&de&&yo(de),m=(a.clientX-Pe.clientX+r.x)/(s||1)+(c?c[0]-Xt[0]:0)/(s||1),f=(a.clientY-Pe.clientY+r.y)/(d||1)+(c?c[1]-Xt[1]:0)/(d||1);if(!$.active&&!Ye){if(l&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<l)return;this._onDragStart(n,!0)}if(L){i?(i.e+=m-(Gt||0),i.f+=f-(Wt||0)):i={a:1,b:0,c:0,d:1,e:m,f};var h="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");D(L,"webkitTransform",h),D(L,"mozTransform",h),D(L,"msTransform",h),D(L,"transform",h),Gt=m,Wt=f,xe=a}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!L){var n=this.options.fallbackOnBody?document.body:Y,t=G(E,!0,Dt,!0,n),l=this.options;if(Dt){for(de=n;D(de,"position")==="static"&&D(de,"transform")==="none"&&de!==document;)de=de.parentNode;de!==document.body&&de!==document.documentElement?(de===document&&(de=Be()),t.top+=de.scrollTop,t.left+=de.scrollLeft):de=Be(),Xt=yo(de)}L=E.cloneNode(!0),J(L,l.ghostClass,!1),J(L,l.fallbackClass,!0),J(L,l.dragClass,!0),D(L,"transition",""),D(L,"transform",""),D(L,"box-sizing","border-box"),D(L,"margin",0),D(L,"top",t.top),D(L,"left",t.left),D(L,"width",t.width),D(L,"height",t.height),D(L,"opacity","0.8"),D(L,"position",Dt?"absolute":"fixed"),D(L,"zIndex","100000"),D(L,"pointerEvents","none"),$.ghost=L,n.appendChild(L),D(L,"transform-origin",ko/parseInt(L.style.width)*100+"% "+Eo/parseInt(L.style.height)*100+"%")}},_onDragStart:function(n,t){var l=this,r=n.dataTransfer,a=l.options;if(fe("dragStart",this,{evt:n}),$.eventCanceled){this._onDrop();return}fe("setupClone",this),$.eventCanceled||(Z=Ht(E),Z.removeAttribute("id"),Z.draggable=!1,Z.style["will-change"]="",this._hideClone(),J(Z,this.options.chosenClass,!1),$.clone=Z),l.cloneId=Mt(function(){fe("clone",l),!$.eventCanceled&&(l.options.removeCloneOnHide||Y.insertBefore(Z,E),l._hideClone(),me({sortable:l,name:"clone"}))}),!t&&J(E,a.dragClass,!0),t?(Vt=!0,l._loopId=setInterval(l._emulateDragOver,50)):(F(document,"mouseup",l._onDrop),F(document,"touchend",l._onDrop),F(document,"touchcancel",l._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(l,r,E)),R(document,"drop",l),D(E,"transform","translateZ(0)")),Ye=!0,l._dragStartId=Mt(l._dragStarted.bind(l,t,n)),R(document,"selectstart",l),lt=!0,ve&&D(document.body,"user-select","none")},_onDragOver:function(n){var t=this.el,l=n.target,r,a,i,s=this.options,d=s.group,c=$.active,m=Ct===d,f=s.sort,h=re||c,p,g=this,u=!1;if(Yt)return;function _(ue,Ee){fe(ue,g,Ne({evt:n,isOwner:m,axis:p?"vertical":"horizontal",revert:i,dragRect:r,targetRect:a,canSort:f,fromSortable:h,target:l,completed:x,onMove:function(ze,co){return St(Y,t,E,r,ze,G(ze),n,co)},changed:y},Ee))}function b(){_("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function x(ue){return _("dragOverCompleted",{insertion:ue}),ue&&(m?c._hideClone():c._showClone(g),g!==h&&(J(E,re?re.options.ghostClass:c.options.ghostClass,!1),J(E,s.ghostClass,!0)),re!==g&&g!==$.active?re=g:g===$.active&&re&&(re=null),h===g&&(g._ignoreWhileAnimating=l),g.animateAll(function(){_("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(l===E&&!E.animated||l===t&&!l.animated)&&(Ke=null),!s.dragoverBubble&&!n.rootEl&&l!==document&&(E.parentNode[ce]._isOutsideThisEl(n.target),!ue&&Re(n)),!s.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),u=!0}function y(){_e=ee(E),Ie=ee(E,s.draggable),me({sortable:g,name:"change",toEl:t,newIndex:_e,newDraggableIndex:Ie,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),l=be(l,s.draggable,t,!0),_("dragOver"),$.eventCanceled)return u;if(E.contains(n.target)||l.animated&&l.animatingX&&l.animatingY||g._ignoreWhileAnimating===l)return x(!1);if(Vt=!1,c&&!s.disabled&&(m?f||(i=te!==Y):re===this||(this.lastPutMode=Ct.checkPull(this,c,E,n))&&d.checkPut(this,c,E,n))){if(p=this._getDirection(n,l)==="vertical",r=G(E),_("dragOverValid"),$.eventCanceled)return u;if(i)return te=Y,b(),this._hideClone(),_("revert"),$.eventCanceled||(Fe?Y.insertBefore(E,Fe):Y.appendChild(E)),x(!0);var C=Rt(t,s.draggable);if(!C||F3(n,p,this)&&!C.animated){if(C===E)return x(!1);if(C&&t===n.target&&(l=C),l&&(a=G(l)),St(Y,t,E,r,l,a,n,!!l)!==!1)return b(),C&&C.nextSibling?t.insertBefore(E,C.nextSibling):t.appendChild(E),te=t,y(),x(!0)}else if(C&&O3(n,p,this)){var w=Ge(t,0,s,!0);if(w===E)return x(!1);if(l=w,a=G(l),St(Y,t,E,r,l,a,n,!1)!==!1)return b(),t.insertBefore(E,w),te=t,y(),x(!0)}else if(l.parentNode===t){a=G(l);var k=0,S,M=E.parentNode!==t,N=!$3(E.animated&&E.toRect||r,l.animated&&l.toRect||a,p),P=p?"top":"left",O=wo(l,"top","top")||wo(E,"top","top"),W=O?O.scrollTop:void 0;Ke!==l&&(S=a[P],at=!1,kt=!N&&s.invertSwap||M),k=P3(n,l,a,p,N?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,kt,Ke===l);var T;if(k!==0){var H=ee(E);do H-=k,T=te.children[H];while(T&&(D(T,"display")==="none"||T===L))}if(k===0||T===l)return x(!1);Ke=l,rt=k;var K=l.nextElementSibling,ae=!1;ae=k===1;var le=St(Y,t,E,r,l,a,n,ae);if(le!==!1)return(le===1||le===-1)&&(ae=le===1),Yt=!0,setTimeout(A3,30),b(),ae&&!K?t.appendChild(E):l.parentNode.insertBefore(E,ae?K:l),O&&Co(O,0,W-O.scrollTop),te=E.parentNode,S!==void 0&&!kt&&(Et=Math.abs(S-G(l)[P])),y(),x(!0)}if(t.contains(E))return x(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){F(document,"mousemove",this._onTouchMove),F(document,"touchmove",this._onTouchMove),F(document,"pointermove",this._onTouchMove),F(document,"dragover",Re),F(document,"mousemove",Re),F(document,"touchmove",Re)},_offUpEvents:function(){var n=this.el.ownerDocument;F(n,"mouseup",this._onDrop),F(n,"touchend",this._onDrop),F(n,"pointerup",this._onDrop),F(n,"touchcancel",this._onDrop),F(document,"selectstart",this)},_onDrop:function(n){var t=this.el,l=this.options;if(_e=ee(E),Ie=ee(E,l.draggable),fe("drop",this,{evt:n}),te=E&&E.parentNode,_e=ee(E),Ie=ee(E,l.draggable),$.eventCanceled){this._nulling();return}Ye=!1,kt=!1,at=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Jt(this.cloneId),Jt(this._dragStartId),this.nativeDraggable&&(F(document,"drop",this),F(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ve&&D(document.body,"user-select",""),D(E,"transform",""),n&&(lt&&(n.cancelable&&n.preventDefault(),!l.dropBubble&&n.stopPropagation()),L&&L.parentNode&&L.parentNode.removeChild(L),(Y===te||re&&re.lastPutMode!=="clone")&&Z&&Z.parentNode&&Z.parentNode.removeChild(Z),E&&(this.nativeDraggable&&F(E,"dragend",this),Kt(E),E.style["will-change"]="",lt&&!Ye&&J(E,re?re.options.ghostClass:this.options.ghostClass,!1),J(E,this.options.chosenClass,!1),me({sortable:this,name:"unchoose",toEl:te,newIndex:null,newDraggableIndex:null,originalEvent:n}),Y!==te?(_e>=0&&(me({rootEl:te,name:"add",toEl:te,fromEl:Y,originalEvent:n}),me({sortable:this,name:"remove",toEl:te,originalEvent:n}),me({rootEl:te,name:"sort",toEl:te,fromEl:Y,originalEvent:n}),me({sortable:this,name:"sort",toEl:te,originalEvent:n})),re&&re.save()):_e!==Xe&&_e>=0&&(me({sortable:this,name:"update",toEl:te,originalEvent:n}),me({sortable:this,name:"sort",toEl:te,originalEvent:n})),$.active&&((_e==null||_e===-1)&&(_e=Xe,Ie=nt),me({sortable:this,name:"end",toEl:te,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){fe("nulling",this),Y=E=te=L=Fe=Z=bt=Te=Pe=xe=lt=_e=Ie=Xe=nt=Ke=rt=re=Ct=$.dragged=$.ghost=$.clone=$.active=null,Nt.forEach(function(n){n.checked=!0}),Nt.length=Gt=Wt=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":E&&(this._onDragOver(n),L3(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],be(t,i.draggable,this.el,!1)&&n.push(t.getAttribute(i.dataIdAttr)||U3(t));return n},sort:function(n,t){var l={},r=this.el;this.toArray().forEach(function(a,i){var s=r.children[i];be(s,this.options.draggable,r,!1)&&(l[a]=s)},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 be(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=tt.modifyOption(this,n,t);typeof r<"u"?l[n]=r:l[n]=t,n==="group"&&So(l)},destroy:function(){fe("destroy",this);var n=this.el;n[ce]=null,F(n,"mousedown",this._onTapStart),F(n,"touchstart",this._onTapStart),F(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(F(n,"dragover",this),F(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xt.splice(xt.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!Te){if(fe("hideClone",this),$.eventCanceled)return;D(Z,"display","none"),this.options.removeCloneOnHide&&Z.parentNode&&Z.parentNode.removeChild(Z),Te=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(Te){if(fe("showClone",this),$.eventCanceled)return;E.parentNode==Y&&!this.options.group.revertClone?Y.insertBefore(Z,E):Fe?Y.insertBefore(Z,Fe):Y.appendChild(Z),this.options.group.revertClone&&this.animate(E,Z),D(Z,"display",""),Te=!1}}};function L3(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function St(o,n,t,l,r,a,i,s){var d,c=o[ce],m=c.options.onMove,f;return window.CustomEvent&&!Me&&!Qe?d=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(d=document.createEvent("Event"),d.initEvent("move",!0,!0)),d.to=n,d.from=o,d.dragged=t,d.draggedRect=l,d.related=r||n,d.relatedRect=a||G(n),d.willInsertAfter=s,d.originalEvent=i,o.dispatchEvent(d),m&&(f=m.call(c,d,i)),f}function Kt(o){o.draggable=!1}function A3(){Yt=!1}function O3(o,n,t){var l=G(Ge(t.el,0,t.options,!0)),r=xo(t.el,t.options,L),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 F3(o,n,t){var l=G(Rt(t.el,t.options.draggable)),r=xo(t.el,t.options,L),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 P3(o,n,t,l,r,a,i,s){var d=l?o.clientY:o.clientX,c=l?t.height:t.width,m=l?t.top:t.left,f=l?t.bottom:t.right,h=!1;if(!i){if(s&&Et<c*r){if(!at&&(rt===1?d>m+c*a/2:d<f-c*a/2)&&(at=!0),at)h=!0;else if(rt===1?d<m+Et:d>f-Et)return-rt}else if(d>m+c*(1-r)/2&&d<f-c*(1-r)/2)return R3(n)}return h=h||i,h&&(d<m+c*a/2||d>f-c*a/2)?d>m+c/2?1:-1:0}function R3(o){return ee(E)<ee(o)?1:-1}function U3(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 H3(o){Nt.length=0;for(var n=o.getElementsByTagName("input"),t=n.length;t--;){var l=n[t];l.checked&&Nt.push(l)}}function Mt(o){return setTimeout(o,0)}function Jt(o){return clearTimeout(o)}Bt&&R(document,"touchmove",function(o){($.active||Ye)&&o.cancelable&&o.preventDefault()}),$.utils={on:R,off:F,css:D,find:_o,is:function(n,t){return!!be(n,t,n,!1)},extend:E3,throttle:bo,closest:be,toggleClass:J,clone:Ht,index:ee,nextTick:Mt,cancelNextTick:Jt,detectDirection:Do,getChild:Ge},$.get=function(o){return o[ce]},$.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&&($.utils=Ne(Ne({},$.utils),l.utils)),tt.mount(l)})},$.create=function(o,n){return new $(o,n)},$.version=V3;var oe=[],it,Zt,Qt=!1,vt,eo,zt,st;function q3(){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?R(document,"dragover",this._handleAutoScroll):this.options.supportPointer?R(document,"pointermove",this._handleFallbackAutoScroll):l.touches?R(document,"touchmove",this._handleFallbackAutoScroll):R(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var l=t.originalEvent;!this.options.dragOverBubble&&!l.rootEl&&this._handleAutoScroll(l)},drop:function(){this.sortable.nativeDraggable?F(document,"dragover",this._handleAutoScroll):(F(document,"pointermove",this._handleFallbackAutoScroll),F(document,"touchmove",this._handleFallbackAutoScroll),F(document,"mousemove",this._handleFallbackAutoScroll)),$o(),$t(),N3()},nulling:function(){zt=Zt=it=Qt=st=vt=eo=null,oe.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,s=document.elementFromPoint(a,i);if(zt=t,l||this.options.forceAutoScrollFallback||Qe||Me||ve){to(t,this.options,s,l);var d=$e(s,!0);Qt&&(!st||a!==vt||i!==eo)&&(st&&$o(),st=setInterval(function(){var c=$e(document.elementFromPoint(a,i),!0);c!==d&&(d=c,$t()),to(t,r.options,c,l)},10),vt=a,eo=i)}else{if(!this.options.bubbleScroll||$e(s,!0)===Be()){$t();return}to(t,this.options,$e(s,!1),!1)}}},ye(o,{pluginName:"scroll",initializeByDefault:!0})}function $t(){oe.forEach(function(o){clearInterval(o.pid)}),oe=[]}function $o(){clearInterval(st)}var to=bo(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,s=n.scrollSpeed,d=Be(),c=!1,m;Zt!==t&&(Zt=t,$t(),it=n.scroll,m=n.scrollFn,it===!0&&(it=$e(t,!0)));var f=0,h=it;do{var p=h,g=G(p),u=g.top,_=g.bottom,b=g.left,x=g.right,y=g.width,C=g.height,w=void 0,k=void 0,S=p.scrollWidth,M=p.scrollHeight,N=D(p),P=p.scrollLeft,O=p.scrollTop;p===d?(w=y<S&&(N.overflowX==="auto"||N.overflowX==="scroll"||N.overflowX==="visible"),k=C<M&&(N.overflowY==="auto"||N.overflowY==="scroll"||N.overflowY==="visible")):(w=y<S&&(N.overflowX==="auto"||N.overflowX==="scroll"),k=C<M&&(N.overflowY==="auto"||N.overflowY==="scroll"));var W=w&&(Math.abs(x-r)<=i&&P+y<S)-(Math.abs(b-r)<=i&&!!P),T=k&&(Math.abs(_-a)<=i&&O+C<M)-(Math.abs(u-a)<=i&&!!O);if(!oe[f])for(var H=0;H<=f;H++)oe[H]||(oe[H]={});(oe[f].vx!=W||oe[f].vy!=T||oe[f].el!==p)&&(oe[f].el=p,oe[f].vx=W,oe[f].vy=T,clearInterval(oe[f].pid),(W!=0||T!=0)&&(c=!0,oe[f].pid=setInterval((function(){l&&this.layer===0&&$.active._onTouchMove(zt);var K=oe[this.layer].vy?oe[this.layer].vy*s:0,ae=oe[this.layer].vx?oe[this.layer].vx*s:0;typeof m=="function"&&m.call($.dragged.parentNode[ce],ae,K,o,zt,oe[this.layer].el)!=="continue"||Co(oe[this.layer].el,ae,K)}).bind({layer:f}),24))),f++}while(n.bubbleScroll&&h!==d&&(h=$e(h,!1)));Qt=c}},30),To=function(n){var t=n.originalEvent,l=n.putSortable,r=n.dragEl,a=n.activeSortable,i=n.dispatchSortableEvent,s=n.hideGhostForTarget,d=n.unhideGhostForTarget;if(t){var c=l||a;s();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(m.clientX,m.clientY);d(),c&&!c.el.contains(f)&&(i("spill"),this.onSpill({dragEl:r,putSortable:l}))}};function oo(){}oo.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=Ge(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:To},ye(oo,{pluginName:"revertOnSpill"});function no(){}no.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:To},ye(no,{pluginName:"removeOnSpill"});var Ce;function j3(){function o(){this.defaults={swapClass:"sortable-swap-highlight"}}return o.prototype={dragStart:function(t){var l=t.dragEl;Ce=l},dragOverValid:function(t){var l=t.completed,r=t.target,a=t.onMove,i=t.activeSortable,s=t.changed,d=t.cancel;if(i.options.swap){var c=this.sortable.el,m=this.options;if(r&&r!==c){var f=Ce;a(r)!==!1?(J(r,m.swapClass,!0),Ce=r):Ce=null,f&&f!==Ce&&J(f,m.swapClass,!1)}s(),l(!0),d()}},drop:function(t){var l=t.activeSortable,r=t.putSortable,a=t.dragEl,i=r||this.sortable,s=this.options;Ce&&J(Ce,s.swapClass,!1),Ce&&(s.swap||r&&r.options.swap)&&a!==Ce&&(i.captureAnimationState(),i!==l&&l.captureAnimationState(),G3(a,Ce),i.animateAll(),i!==l&&l.animateAll())},nulling:function(){Ce=null}},ye(o,{pluginName:"swap",eventProperties:function(){return{swapItem:Ce}}})}function G3(o,n){var t=o.parentNode,l=n.parentNode,r,a;!t||!l||t.isEqualNode(n)||l.isEqualNode(o)||(r=ee(o),a=ee(n),t.isEqualNode(l)&&r<a&&a++,t.insertBefore(n,t.children[r]),l.insertBefore(o,l.children[a]))}var A=[],we=[],ct,ke,dt=!1,he=!1,Je=!1,j,pt,Tt;function W3(){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?R(document,"pointerup",this._deselectMultiDrag):(R(document,"mouseup",this._deselectMultiDrag),R(document,"touchend",this._deselectMultiDrag))),R(document,"keydown",this._checkKeyDown),R(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(r,a){var i="";A.length&&ke===n?A.forEach(function(s,d){i+=(d?", ":"")+s.textContent}):i=a.textContent,r.setData("Text",i)}}}return o.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var l=t.dragEl;j=l},delayEnded:function(){this.isMultiDrag=~A.indexOf(j)},setupClone:function(t){var l=t.sortable,r=t.cancel;if(this.isMultiDrag){for(var a=0;a<A.length;a++)we.push(Ht(A[a])),we[a].sortableIndex=A[a].sortableIndex,we[a].draggable=!1,we[a].style["will-change"]="",J(we[a],this.options.selectedClass,!1),A[a]===j&&J(we[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||A.length&&ke===l&&(Io(!0,r),a("clone"),i()))},showClone:function(t){var l=t.cloneNowShown,r=t.rootEl,a=t.cancel;this.isMultiDrag&&(Io(!1,r),we.forEach(function(i){D(i,"display","")}),l(),Tt=!1,a())},hideClone:function(t){var l=this;t.sortable;var r=t.cloneNowHidden,a=t.cancel;this.isMultiDrag&&(we.forEach(function(i){D(i,"display","none"),l.options.removeCloneOnHide&&i.parentNode&&i.parentNode.removeChild(i)}),r(),Tt=!0,a())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&ke&&ke.multiDrag._deselectMultiDrag(),A.forEach(function(l){l.sortableIndex=ee(l)}),A=A.sort(function(l,r){return l.sortableIndex-r.sortableIndex}),Je=!0},dragStarted:function(t){var l=this,r=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(r.captureAnimationState(),this.options.animation)){A.forEach(function(i){i!==j&&D(i,"position","absolute")});var a=G(j,!1,!0,!0);A.forEach(function(i){i!==j&&Vo(i,a)}),he=!0,dt=!0}r.animateAll(function(){he=!1,dt=!1,l.options.animation&&A.forEach(function(i){qt(i)}),l.options.sort&&It()})}},dragOver:function(t){var l=t.target,r=t.completed,a=t.cancel;he&&~A.indexOf(l)&&(r(!1),a())},revert:function(t){var l=t.fromSortable,r=t.rootEl,a=t.sortable,i=t.dragRect;A.length>1&&(A.forEach(function(s){a.addAnimationState({target:s,rect:he?G(s):i}),qt(s),s.fromRect=i,l.removeAnimationState(s)}),he=!1,X3(!this.options.removeCloneOnHide,r))},dragOverCompleted:function(t){var l=t.sortable,r=t.isOwner,a=t.insertion,i=t.activeSortable,s=t.parentEl,d=t.putSortable,c=this.options;if(a){if(r&&i._hideClone(),dt=!1,c.animation&&A.length>1&&(he||!r&&!i.options.sort&&!d)){var m=G(j,!1,!0,!0);A.forEach(function(h){h!==j&&(Vo(h,m),s.appendChild(h))}),he=!0}if(!r)if(he||It(),A.length>1){var f=Tt;i._showClone(l),i.options.animation&&!Tt&&f&&we.forEach(function(h){i.addAnimationState({target:h,rect:pt}),h.fromRect=pt,h.thisAnimationDuration=null})}else i._showClone(l)}},dragOverAnimationCapture:function(t){var l=t.dragRect,r=t.isOwner,a=t.activeSortable;if(A.forEach(function(s){s.thisAnimationDuration=null}),a.options.animation&&!r&&a.multiDrag.isMultiDrag){pt=ye({},l);var i=Oe(j,!0);pt.top-=i.f,pt.left-=i.e}},dragOverAnimationComplete:function(){he&&(he=!1,It())},drop:function(t){var l=t.originalEvent,r=t.rootEl,a=t.parentEl,i=t.sortable,s=t.dispatchSortableEvent,d=t.oldIndex,c=t.putSortable,m=c||this.sortable;if(l){var f=this.options,h=a.children;if(!Je)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),J(j,f.selectedClass,!~A.indexOf(j)),~A.indexOf(j))A.splice(A.indexOf(j),1),ct=null,ot({sortable:i,rootEl:r,name:"deselect",targetEl:j,originalEvent:l});else{if(A.push(j),ot({sortable:i,rootEl:r,name:"select",targetEl:j,originalEvent:l}),l.shiftKey&&ct&&i.el.contains(ct)){var p=ee(ct),g=ee(j);if(~p&&~g&&p!==g){var u,_;for(g>p?(_=p,u=g):(_=g,u=p+1);_<u;_++)~A.indexOf(h[_])||(J(h[_],f.selectedClass,!0),A.push(h[_]),ot({sortable:i,rootEl:r,name:"select",targetEl:h[_],originalEvent:l}))}}else ct=j;ke=m}if(Je&&this.isMultiDrag){if(he=!1,(a[ce].options.sort||a!==r)&&A.length>1){var b=G(j),x=ee(j,":not(."+this.options.selectedClass+")");if(!dt&&f.animation&&(j.thisAnimationDuration=null),m.captureAnimationState(),!dt&&(f.animation&&(j.fromRect=b,A.forEach(function(C){if(C.thisAnimationDuration=null,C!==j){var w=he?G(C):b;C.fromRect=w,m.addAnimationState({target:C,rect:w})}})),It(),A.forEach(function(C){h[x]?a.insertBefore(C,h[x]):a.appendChild(C),x++}),d===ee(j))){var y=!1;A.forEach(function(C){if(C.sortableIndex!==ee(C)){y=!0;return}}),y&&(s("update"),s("sort"))}A.forEach(function(C){qt(C)}),m.animateAll()}ke=m}(r===a||c&&c.lastPutMode!=="clone")&&we.forEach(function(C){C.parentNode&&C.parentNode.removeChild(C)})}},nullingGlobal:function(){this.isMultiDrag=Je=!1,we.length=0},destroyGlobal:function(){this._deselectMultiDrag(),F(document,"pointerup",this._deselectMultiDrag),F(document,"mouseup",this._deselectMultiDrag),F(document,"touchend",this._deselectMultiDrag),F(document,"keydown",this._checkKeyDown),F(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(typeof Je<"u"&&Je)&&ke===this.sortable&&!(t&&be(t.target,this.options.draggable,this.sortable.el,!1))&&!(t&&t.button!==0))for(;A.length;){var l=A[0];J(l,this.options.selectedClass,!1),A.shift(),ot({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)}},ye(o,{pluginName:"multiDrag",utils:{select:function(t){var l=t.parentNode[ce];!l||!l.options.multiDrag||~A.indexOf(t)||(ke&&ke!==l&&(ke.multiDrag._deselectMultiDrag(),ke=l),J(t,l.options.selectedClass,!0),A.push(t))},deselect:function(t){var l=t.parentNode[ce],r=A.indexOf(t);!l||!l.options.multiDrag||!~r||(J(t,l.options.selectedClass,!1),A.splice(r,1))}},eventProperties:function(){var t=this,l=[],r=[];return A.forEach(function(a){l.push({multiDragElement:a,index:a.sortableIndex});var i;he&&a!==j?i=-1:he?i=ee(a,":not(."+t.options.selectedClass+")"):i=ee(a),r.push({multiDragElement:a,index:i})}),{items:_3(A),clones:[].concat(we),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 X3(o,n){A.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function Io(o,n){we.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function It(){A.forEach(function(o){o!==j&&o.parentNode&&o.parentNode.removeChild(o)})}$.mount(new q3),$.mount(no,oo);function Ue(o){o.parentElement!==null&&o.parentElement.removeChild(o)}function mt(o,n,t){const l=t===0?o.children[0]:o.children[t-1].nextSibling;o.insertBefore(n,l)}function Y3(){return typeof window<"u"?window.console:global.console}const K3=Y3();function J3(o){const n=Object.create(null);return function(l){return n[l]||(n[l]=o(l))}}const Z3=/-(\w)/g,Q3=J3(o=>o.replace(Z3,(n,t)=>t.toUpperCase())),Lo=["Start","Add","Remove","Update","End"],Ao=["Choose","Unchoose","Sort","Filter","Clone","Select","Deselect"],Oo=["Move"],v3=[Oo,Lo,Ao].flatMap(o=>o).map(o=>`on${o}`),lo={manage:Oo,manageAndEmit:Lo,emit:Ao};function er(o){return v3.indexOf(o)!==-1}const tr=["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 or(o){return tr.includes(o)}function nr(o){return["transition-group","TransitionGroup"].includes(o)}function Fo(o){return["id","class","role","style"].includes(o)||o.startsWith("data-")||o.startsWith("aria-")||o.startsWith("on")}function Po(o){return o.reduce((n,[t,l])=>(n[t]=l,n),{})}function lr({$attrs:o,componentData:n={}}){return{...Po(Object.entries(o).filter(([l,r])=>Fo(l))),...n}}function rr({$attrs:o,callBackBuilder:n}){const t=Po(Ro(o));Object.entries(n).forEach(([r,a])=>{lo[r].forEach(i=>{t[`on${i}`]=a(i)})});const l=`>[data-draggable]${t.draggable||""}`;return{...t,draggable:l}}function Ro(o){return Object.entries(o).filter(([n,t])=>!Fo(n)).map(([n,t])=>[Q3(n),t]).filter(([n,t])=>!er(n))}const Uo=({el:o})=>o,ar=(o,n)=>o.__draggable_context=n,Ho=o=>o.__draggable_context;class ir{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)=>{ar(Uo(l),{element:t[r],index:r})})}getUnderlyingVm(n){return Ho(n)}getVmIndexFromDomIndex(n,t){const{defaultNodes:l}=this,{length:r}=l,a=t.children,i=a.item(n);if(i===null)return r;const s=Ho(i);if(s)return s.index;if(r===0)return 0;const d=Uo(l[0]),c=[...a].findIndex(m=>m===d);return n<c?0:r}}function sr(o,n){const t=o[n];return t?t():[]}function cr({$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,s]=["header","footer"].map(m=>sr(o,m)),{item:d}=o;if(!d)throw new Error("draggable element must have an item slot");const c=a.flatMap((m,f)=>d({element:m,index:f}).map(h=>{h.key=t(m);const p=r==null?void 0:r(m);return p?h.props={...h.props||{},"data-draggable":!0,...p}:h.props={...h.props||{},"data-draggable":!0},h}));if(c.length!==a.length)throw new Error("Item slot must have only one child");return{header:i,footer:s,default:c}}function dr(o){const n=nr(o),t=!or(o)&&!n;return{transition:n,externalComponent:t,tag:t?e.resolveComponent(o):n?e.TransitionGroup:o}}function pr({$slots:o,tag:n,realList:t,getKey:l,itemDataSet:r}){const a=cr({$slots:o,realList:t,getKey:l,itemDataSet:r}),i=dr(n);return new ir({nodes:a,root:i,realList:t})}function qo(o,n){e.nextTick(()=>this.$emit(o.toLowerCase(),n))}function jo(o){return(n,t)=>{if(this.realList!==null)return this[`onDrag${o}`](n,t)}}function mr(o){const n=jo.call(this,o);return(t,l)=>{n.call(this,t,l),qo.call(this,o,t)}}function ro(o,n){const t=new $(o,n);return n.swap&&!t.swap?($.mount(new j3),t.destroy(),ro(o,n)):n.multiDrag&&!t.multiDrag?($.mount(new W3),t.destroy(),ro(o,n)):t}function fr(o,n){return Array.from(o).reverse().map(({index:t})=>t-n)}let ao=null;const hr={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}},ur=["update:modelValue","change",...[...lo.manageAndEmit,...lo.emit].map(o=>o.toLowerCase())],ft=e.defineComponent({name:"draggable",inheritAttrs:!1,props:hr,emits:ur,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:o,$attrs:n,tag:t,componentData:l,realList:r,getKey:a}=this,i=pr({$slots:o,tag:t,realList:r,getKey:a,itemDataSet:n.itemDataSet});this.componentStructure=i;const s=lr({$attrs:n,componentData:l});return i.render(e.h,s)}catch(o){return this.error=!0,e.h("pre",{style:{color:"red"}},o.stack)}},created(){this.list!==null&&this.modelValue!==null&&K3.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=rr({$attrs:o,callBackBuilder:{manageAndEmit:a=>mr.call(this,a),emit:a=>qo.bind(this,a),manage:a=>jo.call(this,a)}}),r=n.nodeType===1?n:n.parentElement;this._sortable=ro(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&&Ro(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),ao=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=>Ue(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;Ue(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 s=i.to.__draggable_component__;s.onDragStart(i),s.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})=>{mt(this.$el,a,i),a.parentNode&&$.utils.deselect(a)}),o.pullMode==="clone"){o.clones.forEach(a=>Ue(a));return}const l=fr(t,n);this.removeAllFromList(l);const r=l.sort().map(a=>({element:this.multidragContexts.find(s=>s.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(mt(this.$el,o.item,o.oldIndex),o.pullMode==="clone"){Ue(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(d=>Ue(d));const r=Array.from(o.oldIndicies).sort(({index:d},{index:c})=>d-c);r.forEach(d=>mt(t,d.multiDragElement,d.index));const a=r.map(({index:d})=>d-l),i=this.getVmIndexFromDomIndex(o.newIndex);this.updatePositions(Array.from(a),i);const s=a.map((d,c)=>({element:this.multidragContexts.find(f=>f.index===d).element,oldIndex:d,newIndex:i+c}));this.emitChanges({moved:s})},onDragUpdateSingle(o){const n=this._sortable.options&&this._sortable.options.swap,t=n?o.from.children[o.oldIndex]:null;Ue(o.item),mt(o.from,o.item,o.oldIndex),n&&(Ue(t),mt(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(ao)!==-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},s={...o,relatedContext:r,draggedContext:i};return t(s,n)},onDragEnd(){ao=null},select(o){$.utils.select(o)},deselect(o){$.utils.deselect(o)}}}),{getTempID:gr}=se();let De=class{constructor(n,t,l=!1,r=!1){ge(this,"isEdit");ge(this,"isInput");ge(this,"type");ge(this,"name");ge(this,"id");ge(this,"itemID");ge(this,"itemSourceType");ge(this,"rules");ge(this,"props");ge(this,"excludeFilterConditions");ge(this,"filterConditionProps");ge(this,"isLayout",!1);ge(this,"children");this.type=n,this.name=t,this.isEdit=l,this.isInput=r,this.id=gr(),this.props={},this.rules=[{message:"必填项",required:!1}],this.excludeFilterConditions=[],this.filterConditionProps=void 0,this.isLayout=!1,this.children=void 0}};const _r=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"),s=e.resolveComponent("el-switch"),d=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),m=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]=h=>e.unref(t).backgroundColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"显示边框"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).showBorder,"onUpdate:modelValue":r[1]||(r[1]=h=>e.unref(t).showBorder=h)},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(c,{class:"file-size-unit-select",modelValue:e.unref(t).borderStyle,"onUpdate:modelValue":r[2]||(r[2]=h=>e.unref(t).borderStyle=h)},{default:e.withCtx(()=>[e.createVNode(d,{label:"实线边框",value:"solid"}),e.createVNode(d,{label:"虚线边框",value:"dashed"}),e.createVNode(d,{label:"点线边框",value:"dotted"}),e.createVNode(d,{label:"双线边框",value:"double"}),e.createVNode(d,{label:"凹槽边框",value:"groove"}),e.createVNode(d,{label:"脊状边框",value:"ridge"}),e.createVNode(d,{label:"内凹边框",value:"inset"}),e.createVNode(d,{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]=h=>e.unref(t).borderColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框宽度"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).borderWidth,"onUpdate:modelValue":r[4]||(r[4]=h=>e.unref(t).borderWidth=h),step:1,min:1,max:20},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框圆角"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).borderRadius,"onUpdate:modelValue":r[5]||(r[5]=h=>e.unref(t).borderRadius=h),step:1,min:0,max:100},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),us="",wr=["onClick"],yr={key:2,class:"operates"},Go=e.defineComponent({__name:"componentDesigner",props:{components:{type:Array,required:!0}},emits:["update:components","deleteComponent"],setup(o,{emit:n}){const t={...ut,..._t,...gt},{getTempID:l,clone:r}=se();let a=e.inject("formData"),i=e.inject("formDesignerData");const s=o,{components:d}=e.toRefs(s),c=n;e.watch(d,()=>c("update:components",d),{immediate:!0,deep:!0});const m=u=>{u.added?f(u.added.element):u.moved&&f(u.moved.element)},f=u=>{i.selectComponent=void 0,e.nextTick(()=>i.selectComponent=u)},h=u=>{const _=p(u);d.value.push(_),f(_)},p=u=>{var b,x;let _=r(u);if(_.id=l(),delete _.itemID,(b=_.props.options)!=null&&b.length){_.props.options.forEach(C=>{C.value.includes("temp-")&&(C.value=l())});let y=new t[u.type].component;_.filterConditionProps=y.getFilterConditionProps(_.props)}if(_.isLayout&&((x=_.children)!=null&&x.length)){let y=[];_.children.forEach(C=>{y.push(p(C))}),_.children=y}return _},g=u=>{let _=r(d.value[u]);d.value.splice(u,1),i.selectComponent=void 0,c("deleteComponent",_)};return(u,_)=>{const b=e.resolveComponent("el-form-item"),x=v;return e.openBlock(),e.createBlock(e.unref(ft),{list:e.unref(d),"item-key":"id",class:"form-draggable",sort:!0,group:{name:"component",pull:!0,put:!0},onChange:m},{item:e.withCtx(({element:y,index:C})=>[e.createElementVNode("div",{onClick:e.withModifiers(w=>f(y),["stop"]),class:e.normalizeClass(["form-item-wrap",{"is-selected":e.unref(i).selectComponent==y},{"is-hidden":!y.props.showFlag}]),style:e.normalizeStyle({width:`${y.props.width*100/e.unref(a).props.column}%`,"padding-left":`${y.props.paddingLeft}px`})},[y.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[y.type].renderer),{key:0,isDesigner:"",componentID:y.id,component:e.unref(d)[C],"onUpdate:component":w=>e.unref(d)[C]=w,onDeleteComponent:_[0]||(_[0]=w=>c("deleteComponent",w))},null,40,["componentID","component","onUpdate:component"])):(e.openBlock(),e.createBlock(b,{key:1,prop:y.id,class:e.normalizeClass(["form-item",{"label-new-line":y.props.labelNewLine}]),"label-width":y.props.showLabel?y.props.labelWidth:"0",rules:y.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:y.props.color||"#000000","font-size":y.props.fontSize+"px","font-weight":y.props.isBold?"bold":"normal"})},e.toDisplayString(y.props.showLabel?y.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[y.type].renderer),{isDesigner:"",componentID:y.id,componentProps:y.props,"onUpdate:componentProps":w=>y.props=w,datas:e.unref(a).datas,"onUpdate:datas":_[1]||(_[1]=w=>e.unref(a).datas=w)},null,40,["componentID","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["prop","class","label-width","rules"])),e.unref(i).selectComponent==y?(e.openBlock(),e.createElementBlock("div",yr,[y.allowRepeat?(e.openBlock(),e.createBlock(x,{key:0,name:"copy",color:"#0000ff",onClick:e.withModifiers(w=>h(y),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(x,{name:"delete",color:"#ff0000",onClick:e.withModifiers(w=>g(C),["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],14,wr)]),_:1},8,["list"])}}}),gs="",br=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"],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 d={"background-color":l.value.props.backgroundColor||""};return l.value.props.showBorder&&(d.border=`${l.value.props.borderWidth}px ${l.value.props.borderStyle} ${l.value.props.borderColor}`),l.value.props.borderRadius&&(d["border-radius"]=`${l.value.props.borderRadius}px`),d}),i=n,s=d=>{i("deleteComponent",d)};return(d,c)=>(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(Go,{key:1,components:e.unref(l).children,"onUpdate:components":c[0]||(c[0]=m=>e.unref(l).children=m),onDeleteComponent:s},null,8,["components"])):(e.openBlock(),e.createBlock(Ko,{key:2,components:e.unref(l).children,showDescription:e.unref(r)},null,8,["components","showDescription"]))],6))}}),_s="",Cr={component:class extends De{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:br,propEditor:_r},Vr=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"),s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-input-number"),c=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(s,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=p=>e.unref(t).multiple=p)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件数量"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=p=>e.unref(t).fileLimit=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{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]=p=>e.isRef(l)?l.value=p:null),modelModifiers:{number:!0},placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(m,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=p=>e.unref(t).fileSizeUnit=p)},{default:e.withCtx(()=>[e.createVNode(c,{value:"KB"}),e.createVNode(c,{value:"MB"}),e.createVNode(c,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).fileType=p),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),ys="",xr={class:"upload-component"},kr=e.createElementVNode("span",{class:"button-text"},"上传文件",-1),Er={key:0,class:"description"},Nr=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}=se(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formType");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const d=h=>{if(h.status==="ready"&&!n(h.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!1)){c(h);return}if(h.status==="success"&&h.response.code===0){pe("error",h.response.message||"文件上传失败!"),c(h);return}l.autoUpload?a.value[t.componentID].push({name:h.name,url:h.response.data.url,id:h.response.data.id}):a.value[t.componentID].push({name:h.name,url:h.url,file:h.raw})},c=(h,p=!0)=>{p&&s.value.handleRemove(h);const g=a.value[t.componentID].findIndex(u=>u.url===h.url);g!==-1&&a.value[t.componentID].splice(g,1)},m=h=>{c(h,!1)},f=()=>{var p;let h=`最多只能上传${i.value.fileLimit}个文件`;(p=a.value[t.componentID])!=null&&p.length&&(h+=`,您已上传了${a.value[t.componentID].length}个文件,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个文件`),pe("error",h)};return(h,p)=>{const g=v,u=e.resolveComponent("el-button"),_=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",xr,[e.createVNode(_,{ref_key:"uploadRef",ref:s,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":d,"on-remove":m},{default:e.withCtx(()=>{var b;return[e.unref(i).fileLimit>(((b=e.unref(a)[o.componentID])==null?void 0:b.length)||0)?(e.openBlock(),e.createBlock(u,{key:0,size:"large",color:"#409eff"},{icon:e.withCtx(()=>[e.createVNode(g,{name:"upload",color:"#ffffff"})]),default:e.withCtx(()=>[kr]),_: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)==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",Er,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),bs="",Br={component:class extends De{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:Nr,propEditor:Vr},Dr=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"),s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-input-number"),c=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(s,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=p=>e.unref(t).multiple=p)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片数量"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=p=>e.unref(t).fileLimit=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{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]=p=>e.isRef(l)?l.value=p:null),placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(m,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=p=>e.unref(t).fileSizeUnit=p),modelModifiers:{number:!0}},{default:e.withCtx(()=>[e.createVNode(c,{value:"KB"}),e.createVNode(c,{value:"MB"}),e.createVNode(c,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).fileType=p),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Vs="",Sr={class:"upload-image-component"},Mr={class:"el-upload-list__item-actions"},zr={class:"el-upload-list__item-preview"},$r={class:"el-upload-list__item-delete"},Tr={key:0,class:"description"},Ir=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}=se(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formType");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref(),d=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const c=p=>{if(p.status==="ready"&&!n(p.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!0)){m(p);return}if(p.status==="success"&&p.response.code===0){pe("error",p.response.message||"图片上传失败!"),m(p);return}l.autoUpload?a.value[t.componentID].push({name:p.name,url:p.response.data.url,id:p.response.data.id}):a.value[t.componentID].push({name:p.name,url:p.url,file:p.raw})},m=p=>{s.value.handleRemove(p);const g=a.value[t.componentID].findIndex(u=>u.url===p.url);g!==-1&&a.value[t.componentID].splice(g,1)},f=()=>{d.value.$el.children[0].click()},h=()=>{var g;let p=`最多只能上传${i.value.fileLimit}个图片`;(g=a.value[t.componentID])!=null&&g.length&&(p+=`,您已上传了${a.value[t.componentID].length}个图片,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个图片`),pe("error",p)};return(p,g)=>{var x;const u=v,_=e.resolveComponent("el-image"),b=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",Sr,[e.createVNode(b,{ref_key:"uploadImageRef",ref:s,class:e.normalizeClass({"hidden-trigger":e.unref(i).fileLimit<=(((x=e.unref(a)[o.componentID])==null?void 0:x.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":c,"on-exceed":h},{trigger:e.withCtx(()=>[e.createVNode(u,{name:"add",size:"30"})]),file:e.withCtx(({file:y})=>[e.createVNode(_,{ref_key:"imageRef",ref:d,style:{width:"100px",height:"100px"},src:y.url,"preview-src-list":[y.url],fit:"cover"},null,8,["src","preview-src-list"]),e.createElementVNode("span",Mr,[e.createElementVNode("span",zr,[e.createVNode(u,{name:"previewImage",color:"#00ff00",onClick:f})]),e.createElementVNode("span",$r,[e.createVNode(u,{name:"delete",color:"#ff0000",onClick:C=>m(y)},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)==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",Tr,[e.createVNode(u,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),xs="",Lr={component:class extends De{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:Ir,propEditor:Dr};function Lt(o){return typeof o=="function"?o():e.unref(o)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ar=o=>typeof o<"u",Wo=()=>{};function Or(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 Fr(o,n={}){let t,l,r=Wo;const a=s=>{clearTimeout(s),r(),r=Wo};return s=>{const d=Lt(o),c=Lt(n.maxWait);return t&&a(t),d<=0||c!==void 0&&c<=0?(l&&(a(l),l=null),Promise.resolve(s())):new Promise((m,f)=>{r=n.rejectOnCancel?f:m,c&&!l&&(l=setTimeout(()=>{t&&a(t),l=null,m(s())},c)),t=setTimeout(()=>{l&&a(l),l=null,m(s())},d)})}}function Pr(o,n=200,t={}){return Or(Fr(n,t),o)}function Rr(o,n){return e.computed(()=>Lt(o).map(t=>Lt(t)).filter(n))}function Ur(o){return JSON.parse(JSON.stringify(o))}function Hr(o,n,t,l={}){var r,a,i;const{clone:s=!1,passive:d=!1,eventName:c,deep:m=!1,defaultValue:f,shouldEmit:h}=l,p=e.getCurrentInstance(),g=t||(p==null?void 0:p.emit)||((r=p==null?void 0:p.$emit)==null?void 0:r.bind(p))||((i=(a=p==null?void 0:p.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(p==null?void 0:p.proxy));let u=c;n||(n="modelValue"),u=u||`update:${n.toString()}`;const _=y=>s?typeof s=="function"?s(y):Ur(y):y,b=()=>Ar(o[n])?_(o[n]):f,x=y=>{h?h(y)&&g(u,y):g(u,y)};if(d){const y=b(),C=e.ref(y);let w=!1;return e.watch(()=>o[n],k=>{w||(w=!0,C.value=_(k),e.nextTick(()=>w=!1))}),e.watch(C,k=>{!w&&(k!==o[n]||m)&&x(k)},{deep:m}),C}else return e.computed({get(){return b()},set(y){x(y)}})}const qr={class:"option-wrap"},jr={style:{float:"left"}},Gr={style:{float:"right",color:"#8492a6"}},Wr=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=h=>{t.options.splice(h,1)},s=e.ref(!1);let d=e.ref(t.options);const c=Pr(async h=>await n.selectComponent.searchEmployeeMethod(h),500),m=h=>{if(!h)return[];s.value=!0,c(h).then(p=>{d.value=p,s.value=!1})},f=(h,p)=>{const g=d.value.find(u=>u.value===h);t.options[p]={label:g==null?void 0:g.label,value:g==null?void 0:g.value},d.value=t.options};return(h,p)=>{const g=e.resolveComponent("el-radio-button"),u=e.resolveComponent("el-radio-group"),_=e.resolveComponent("el-form-item"),b=e.resolveComponent("el-switch"),x=e.resolveComponent("el-input-number"),y=e.resolveComponent("el-divider"),C=v,w=e.resolveComponent("el-option"),k=e.resolveComponent("el-select"),S=e.resolveComponent("el-button"),M=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(M,{"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":p[0]||(p[0]=N=>e.unref(t).type=N),onChange:r},{default:e.withCtx(()=>[e.createVNode(g,{value:"radio"},{default:e.withCtx(()=>[e.createTextVNode("单选")]),_:1}),e.createVNode(g,{value:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode("多选")]),_:1}),e.createVNode(g,{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(b,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":p[1]||(p[1]=N=>e.unref(t).newLine=N)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(_,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":p[2]||(p[2]=N=>e.unref(t).multiple=N)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(_,{label:"最少选择"},{default:e.withCtx(()=>{var N;return[e.createVNode(x,{modelValue:e.unref(t).min,"onUpdate:modelValue":p[3]||(p[3]=P=>e.unref(t).min=P),step:1,min:0,max:((N=e.unref(l))==null?void 0:N.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(_,{label:"最多选择"},{default:e.withCtx(()=>{var N;return[e.createVNode(x,{modelValue:e.unref(t).max,"onUpdate:modelValue":p[4]||(p[4]=P=>e.unref(t).max=P),step:1,min:0,max:((N=e.unref(l))==null?void 0:N.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0),e.createVNode(y,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(_,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{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:N,index:P})=>[e.createElementVNode("div",qr,[e.unref(t).options.length>1?(e.openBlock(),e.createBlock(C,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(k,{class:"selector-component",modelValue:N.value,"onUpdate:modelValue":O=>N.value=O,filterable:"",placeholder:"检索人员",disabled:!e.unref(n).selectComponent.allowModify,remote:"","remote-method":m,loading:e.unref(s),"loading-text":"加载中……",onChange:O=>f(O,P)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(O,W)=>(e.openBlock(),e.createBlock(w,{key:W,label:O.label,value:O.value},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"option",{index:W,label:O.label,suffix:O.suffix},()=>[e.createElementVNode("span",jr,e.toDisplayString(O.label),1),e.createElementVNode("span",Gr,e.toDisplayString(O.suffix),1)])]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","loading","onChange"]),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(C,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:O=>i(P)},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(S,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(C,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:3})}}}),Es="",Xr={class:"employee-component"},Yr={key:3,class:"description"},Kr=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("formType");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,m=>m?r.value[t.componentID]=m:delete r.value[t.componentID]);const s=n;e.watch(r,m=>s("update:datas",m));const d=e.ref(!0);e.watch(a,m=>{d.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),d.value=!0}),s("update:componentProps",m)},{immediate:!0});const c=(m,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,m.preventDefault())};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),b=e.resolveComponent("el-select"),x=v;return e.openBlock(),e.createElementBlock("div",Xr,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(p,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=y=>e.isRef(i)?i.value=y:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(y,C)=>(e.openBlock(),e.createBlock(h,{key:C,value:y.value,onClick:w=>c(w,y.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.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]=y=>e.isRef(i)?i.value=y: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,(y,C)=>(e.openBlock(),e.createBlock(g,{value:y.value,key:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.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(b,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=y=>e.isRef(i)?i.value=y:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(y,C)=>(e.openBlock(),e.createBlock(_,{key:C,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",Yr,[e.createVNode(x,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ns="",Jr={component:class extends De{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:Kr,propEditor:Wr};function io(){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 Zr=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;const{getGradeItems:l}=io(),r=e.ref([]);return e.watch(t,()=>{r.value=l(t),n.selectComponent.filterConditionProps.options=r.value},{immediate:!0}),(a,i)=>{const s=e.resolveComponent("el-option"),d=e.resolveComponent("el-select"),c=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-switch"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(c,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).defaultValue,"onUpdate:modelValue":i[0]||(i[0]=p=>e.unref(t).defaultValue=p),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(p,g)=>(e.openBlock(),e.createBlock(s,{key:g,label:p.label,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{label:"最大分数"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).maxScore,"onUpdate:modelValue":i[1]||(i[1]=p=>e.unref(t).maxScore=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示0分"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showZero,"onUpdate:modelValue":i[2]||(i[2]=p=>e.unref(t).showZero=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示不考评"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showNotGrade,"onUpdate:modelValue":i[3]||(i[3]=p=>e.unref(t).showNotGrade=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"分数倒序"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).scoreReverseFlag,"onUpdate:modelValue":i[4]||(i[4]=p=>e.unref(t).scoreReverseFlag=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"分数换行"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":i[5]||(i[5]=p=>e.unref(t).newLine=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示问题"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showProblem,"onUpdate:modelValue":i[6]||(i[6]=p=>e.unref(t).showProblem=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示亮点"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showBrightSpot,"onUpdate:modelValue":i[7]||(i[7]=p=>e.unref(t).showBrightSpot=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示备注"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showRemark,"onUpdate:modelValue":i[8]||(i[8]=p=>e.unref(t).showRemark=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"单项否决"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showVeto,"onUpdate:modelValue":i[9]||(i[9]=p=>e.unref(t).showVeto=p)},null,8,["modelValue"])]),_:1})]),_:1})}}}),Qr={class:"auto-complete"},vr={key:0},e1=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(p=>({e00bfd70:e.unref(h)}));const t=e.ref(),l=o;let{options:r,width:a}=e.toRefs(l);const i=n,s=Hr(l,"modelValue",i),d=()=>{i("change",s.value)},c=(p,g)=>{const u=p?Rr(r,m(p)):r.value;g(e.unref(u))},m=p=>({start:u=>u.value.toLowerCase().indexOf(p.toLowerCase())===0,random:u=>u.value.indexOf(p)>=0})[l.matchMode],f=e.inject("convertPX"),h=e.computed(()=>`${f(a.value)}px`);return(p,g)=>{const u=e.resolveComponent("el-autocomplete");return e.openBlock(),e.createElementBlock("div",Qr,[o.label?(e.openBlock(),e.createElementBlock("span",vr,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0),e.createVNode(u,{ref_key:"autoCompleteRef",ref:t,modelValue:e.unref(s),"onUpdate:modelValue":g[0]||(g[0]=_=>e.isRef(s)?s.value=_:null),"select-when-unmatched":o.selectWhenUnmatched,"fetch-suggestions":c,"value-key":"value",clearable:"",disabled:o.disabled,onBlur:d},{default:e.withCtx(({item:_})=>[e.createElementVNode("span",null,e.toDisplayString(_.value),1)]),_:1},8,["modelValue","select-when-unmatched","disabled"])])}}}),Ds="",t1={class:"grade-component"},o1={key:3,class:"description"},n1=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}=io();let r=e.inject("formType");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref(a.value[t.componentID]||{});e.watch(s,f=>{a.value[t.componentID]=f,Object.keys(a.value[t.componentID]||{}).length&&(a.value[t.componentID].maxScore=i.value.maxScore)},{deep:!0});const d=e.computed(()=>l(i.value)),c=n;e.watch(a,f=>c("update:datas",f)),e.watch(i,()=>{t.isDesigner&&(s.value=i.value.defaultValue?{score:i.value.defaultValue}:{})},{immediate:!0,deep:!0});const m=(f,h)=>{i.value.clearable&&s.value.score===h&&(delete s.value.score,f.preventDefault())};return(f,h)=>{const p=e.resolveComponent("el-radio"),g=e.resolveComponent("el-radio-group"),u=e1,_=v;return e.openBlock(),e.createElementBlock("div",t1,[e.createVNode(g,{class:e.normalizeClass(["grade-items",{"new-line":e.unref(i).newLine}]),modelValue:e.unref(s).score,"onUpdate:modelValue":h[0]||(h[0]=b=>e.unref(s).score=b),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(b,x)=>(e.openBlock(),e.createBlock(p,{key:x,value:b.value,onClick:y=>m(y,b.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.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(s).problem,"onUpdate:modelValue":h[1]||(h[1]=b=>e.unref(s).problem=b),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(s).brightSpot,"onUpdate:modelValue":h[2]||(h[2]=b=>e.unref(s).brightSpot=b),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(s).remark,"onUpdate:modelValue":h[3]||(h[3]=b=>e.unref(s).remark=b),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)==="2"||e.unref(i).description)?(e.openBlock(),e.createElementBlock("div",o1,[e.createVNode(_,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r)==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ss="",{isEmpty:l1}=se(),{getGradeItems:r1}=io(),a1={component:class extends De{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||l1(l)){r(n.requiredMessage);return}r()}}]}getFilterConditionProps(n){return{type:"selector",options:n&&r1(n)}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:n1,propEditor:Zr},i1=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"),s=e.resolveComponent("el-radio-group"),d=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-switch"),m=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(d,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).type,"onUpdate:modelValue":a[0]||(a[0]=h=>e.unref(t).type=h),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(d,{key:0,label:"岗位换行"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":a[1]||(a[1]=h=>e.unref(t).newLine=h)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[2]||(a[2]=h=>e.unref(t).multiple=h)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(d,{label:"最少选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(m,{modelValue:e.unref(t).min,"onUpdate:modelValue":a[3]||(a[3]=p=>e.unref(t).min=p),step:1,min:0,max:((h=e.unref(t).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(d,{label:"最多选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(m,{modelValue:e.unref(t).max,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).max=p),step:1,min:0,max:((h=e.unref(t).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),s1={class:"post-component"},c1={key:3,class:"description"},d1=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("formType");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,m=>m?r.value[t.componentID]=m:delete r.value[t.componentID]);const s=n;e.watch(r,m=>s("update:datas",m));const d=e.ref(!0);e.watch(a,m=>{d.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),d.value=!0}),s("update:componentProps",m)},{immediate:!0});const c=(m,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,m.preventDefault())};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),b=e.resolveComponent("el-select"),x=v;return e.openBlock(),e.createElementBlock("div",s1,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(p,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=y=>e.isRef(i)?i.value=y:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(y,C)=>(e.openBlock(),e.createBlock(h,{key:C,value:y.value,onClick:w=>c(w,y.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.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]=y=>e.isRef(i)?i.value=y: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,(y,C)=>(e.openBlock(),e.createBlock(g,{value:y.value,key:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.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(b,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=y=>e.isRef(i)?i.value=y:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(y,C)=>(e.openBlock(),e.createBlock(_,{key:C,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):e.createCommentVNode("",!0),o.isDesigner&&e.unref(a).description||o.showDescription&&(e.unref(l)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",c1,[e.createVNode(x,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),zs="",p1={component:class extends De{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:d1,propEditor:i1},m1={class:"dictionary-binder"},f1={class:"item"},h1={class:"label"},u1={key:0,class:"item-souce-type"},so=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}},emits:["update:modelValue","change"],setup(o,{emit:n}){var p;e.useCssVars(g=>({"4f018582":o.height}));let t=e.inject("defaultSourceType");const l=o,r=e.ref(),a=e.ref(l.modelValue),i=(p=l.dictionary)==null?void 0:p.souceTypeMap;r.value=(i==null?void 0:i.keys.length)>1;let s=e.ref([]);const d=g=>{s.value=g?c(g):l.dictionary.dictionaryItems},c=g=>l.dictionary.dictionaryItems.filter(u=>u.label.toLocaleLowerCase().includes(g.toLocaleLowerCase())),m=n,{getTempID:f}=se(),h=g=>{let u=s.value.find(_=>_.value===g);u||(u={value:f(),label:g,itemSourceType:t}),m("update:modelValue",u.label),m("change",u)};return(g,u)=>{var x;const _=e.resolveComponent("el-select-v2"),b=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",m1,[(x=o.dictionary)!=null&&x.dictionaryItems.length?(e.openBlock(),e.createBlock(_,{key:0,modelValue:e.unref(a),"onUpdate:modelValue":u[0]||(u[0]=y=>e.isRef(a)?a.value=y:null),filterable:"","allow-create":"","reserve-keyword":!1,remote:"","remote-method":d,placeholder:o.placeholder,options:e.unref(s),"popper-class":"dictionary-binder-popper",placement:"bottom-end","item-height":o.itemHeight,height:o.itemHeight*8,disabled:o.disabled,onChange:h},{default:e.withCtx(({item:y})=>[e.createElementVNode("div",f1,[e.createElementVNode("span",h1,e.toDisplayString(y.label),1),e.unref(r)?(e.openBlock(),e.createElementBlock("span",u1,e.toDisplayString(e.unref(i).get(y.itemSourceType)),1)):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","placeholder","options","item-height","height","disabled"])):(e.openBlock(),e.createBlock(b,{key:1,modelValue:e.unref(a),"onUpdate:modelValue":u[1]||(u[1]=y=>e.isRef(a)?a.value=y:null),autosize:{minRows:2,maxRows:5},type:"textarea",disabled:o.disabled,onChange:h},null,8,["modelValue","disabled"]))])}}}),Ts="",g1={class:"option-wrap"},_1=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},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}=se(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=d=>{l.options.splice(d,1)},s=(d,c)=>{c.value=d.value,c.itemSourceType=d.itemSourceType};return(d,c)=>{const m=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),h=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-switch"),g=e.resolveComponent("el-input-number"),u=e.resolveComponent("el-divider"),_=v,b=e.resolveComponent("el-checkbox"),x=e.resolveComponent("el-tooltip"),y=e.resolveComponent("el-button"),C=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(C,{"label-width":"80px","label-suffix":":",class:"checkbox-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=w=>e.unref(l).defaultValue=w),multiple:"",clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(w,k)=>(e.openBlock(),e.createBlock(m,{key:k,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":c[1]||(c[1]=w=>e.unref(l).newLine=w)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"最少选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).min,"onUpdate:modelValue":c[2]||(c[2]=w=>e.unref(l).min=w),step:1,min:0,max:e.unref(l).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(h,{label:"最多选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).max,"onUpdate:modelValue":c[3]||(c[3]=w=>e.unref(l).max=w),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(h,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{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:w,index:k})=>[e.createElementVNode("div",g1,[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(so,{modelValue:w.label,"onUpdate:modelValue":S=>w.label=S,dictionary:o.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:S=>s(S,w)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(x,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(b,{class:"input-enable",modelValue:w.inputEnable,"onUpdate:modelValue":S=>w.inputEnable=S},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:S=>i(k)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(h,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(y,{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})}}}),Is="",w1={class:"checkbox-component"},y1={key:0,class:"description"},b1=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("formType");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,c=>r.value[t.componentID]=c);const s=n;e.watch(r,c=>s("update:datas",c)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const d=c=>{a.value.options.forEach(m=>{const f=`${t.componentID}||${m.value}`;!c.includes(m.value)&&r.value[f]&&delete r.value[f]})};return(c,m)=>{const f=e.resolveComponent("el-checkbox"),h=e.resolveComponent("el-input"),p=e.resolveComponent("el-checkbox-group"),g=v;return e.openBlock(),e.createElementBlock("div",w1,[e.createVNode(p,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":m[0]||(m[0]=u=>e.isRef(i)?i.value=u:null),disabled:o.disabled,min:e.unref(a).min,max:e.unref(a).max,onChange:d},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(u,_)=>{var b;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||(b=e.unref(i))!=null&&b.includes(u.value))?(e.openBlock(),e.createBlock(h,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${u.value}`],"onUpdate:modelValue":x=>e.unref(r)[`${o.componentID}||${u.value}`]=x},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)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",y1,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ls="",{getTempID:Xo}=se(),C1={component:class extends De{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:Xo(),label:"选项1"},{value:Xo(),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:b1,propEditor:_1},V1=e.defineComponent({__name:"propsEditor",setup(o){const{computedExpression:n}=se();let t=e.inject("formDesignerData"),l=t.selectComponent.props,r=t.selectComponent.rules;const a=d=>{d&&(r[1].pattern=n(d))},i=d=>{r[1].message=d},s=d=>{d==="text"&&(l.showPassword=!1)};return(d,c)=>{const m=e.resolveComponent("el-input"),f=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-radio-button"),p=e.resolveComponent("el-radio-group"),g=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(m,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=_=>e.unref(l).defaultValue=_),placeholder:"请输入默认值"},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"类型"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).type,"onUpdate:modelValue":c[1]||(c[1]=_=>e.unref(l).type=_),onChange:s},{default:e.withCtx(()=>[e.createVNode(h,{value:"text"},{default:e.withCtx(()=>[e.createTextVNode("文本")]),_:1}),e.createVNode(h,{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(g,{modelValue:e.unref(l).showPassword,"onUpdate:modelValue":c[2]||(c[2]=_=>e.unref(l).showPassword=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(f,{label:"正则验证"},{default:e.withCtx(()=>[e.createVNode(m,{onChange:a,modelValue:e.unref(l).pattern,"onUpdate:modelValue":c[3]||(c[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(m,{onChange:i,modelValue:e.unref(l).patternMessage,"onUpdate:modelValue":c[4]||(c[4]=_=>e.unref(l).patternMessage=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),x1={class:"input-component"},k1={key:0,class:"description"},E1=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("formType");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,d=>r.value[t.componentID]=d);const s=n;return e.watch(r,d=>s("update:datas",d)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0}),(d,c)=>{const m=e.resolveComponent("el-input"),f=v;return e.openBlock(),e.createElementBlock("div",x1,[e.createVNode(m,{type:e.unref(a).type,"show-password":e.unref(a).showPassword,modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=h=>e.isRef(i)?i.value=h: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)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",k1,[e.createVNode(f,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Os="",N1={component:class extends De{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:E1,propEditor:V1},B1={component:class extends De{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},D1={class:"option-wrap"},S1=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},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}=se(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=d=>{l.options.splice(d,1)},s=(d,c)=>{c.value=d.value,c.itemSourceType=d.itemSourceType};return(d,c)=>{const m=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),h=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-switch"),g=e.resolveComponent("el-divider"),u=v,_=e.resolveComponent("el-checkbox"),b=e.resolveComponent("el-tooltip"),x=e.resolveComponent("el-button"),y=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(y,{"label-width":"80px","label-suffix":":",class:"radio-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=C=>e.unref(l).defaultValue=C),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(C,w)=>(e.openBlock(),e.createBlock(m,{key:w,label:C.label,value:C.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":c[1]||(c[1]=C=>e.unref(l).newLine=C)},null,8,["modelValue"])]),_:1}),e.createVNode(g,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(h,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{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:C,index:w})=>[e.createElementVNode("div",D1,[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(so,{modelValue:C.label,"onUpdate:modelValue":k=>C.label=k,dictionary:o.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:k=>s(k,C)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(b,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(_,{class:"input-enable",modelValue:C.inputEnable,"onUpdate:modelValue":k=>C.inputEnable=k},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:k=>i(w)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(h,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(x,{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})}}}),Us="",M1={class:"radio-component"},z1={key:0,class:"description"},$1=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("formType");const{datas:r,componentProps:a}=e.toRefs(t),i=e.ref(r.value[t.componentID]);e.watch(i,m=>r.value[t.componentID]=m);const s=n;e.watch(r,m=>s("update:datas",m)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const d=m=>{a.value.options.forEach(f=>{const h=`${t.componentID}||${f.value}`;m!==f.value&&r.value[h]&&delete r.value[h]})},c=(m,f)=>{if(a.value.clearable&&i.value===f){i.value=void 0;const h=`${t.componentID}||${f}`;r.value[h]&&delete r.value[h],m.preventDefault()}};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-input"),g=e.resolveComponent("el-radio-group"),u=v;return e.openBlock(),e.createElementBlock("div",M1,[e.createVNode(g,{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:d},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(_,b)=>{var x;return e.openBlock(),e.createElementBlock("div",{class:"radio-wrap",key:b},[e.createVNode(h,{value:_.value,onClick:y=>c(y,_.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["value","onClick"]),_.inputEnable&&(o.isDesigner||(x=e.unref(i))!=null&&x.includes(_.value))?(e.openBlock(),e.createBlock(p,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${_.value}`],"onUpdate:modelValue":y=>e.unref(r)[`${o.componentID}||${_.value}`]=y},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)==="2"||e.unref(a).description)?(e.openBlock(),e.createElementBlock("div",z1,[e.createVNode(u,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l)==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Hs="",{getTempID:Yo}=se();class T1 extends De{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:Yo(),label:"选项1"},{value:Yo(),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 I1={component:T1,renderer:$1,propEditor:S1},L1={key:0,class:"component-readonly-mask"},Ko=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={...ut,..._t,...gt},{computedExpression:l}=se();let r=e.inject("formData");const a=o,{components:i,showDescription:s,selectMode:d}=e.toRefs(a),c={show:p=>{if(p.showFlag===void 0)return String(!0);let g="";return p.showFlag?g=p.hiddenConditionExpression?`!(${p.hiddenConditionExpression})`:String(p.showFlag):g=p.showConditionExpression||String(p.showFlag),g},disabled:p=>p.disabledConditionExpression||String(p.disabled===void 0?!1:p.disabled),readonly:p=>p.readonlyConditionExpression||String(p.readonly===void 0?!1:p.readonly)},m=(p,g)=>{var b;let u=c[g](p.props);if(!u)return;["true","false"].includes(u)||u.match(/{(.*?)}/g).forEach(y=>{var S;const C=y.replace(/\{|}/g,"");let w=r.value.datas[C];const k=i.value.find(M=>M.id===C);(k==null?void 0:k.type)==="grade"&&(w=(S=r.value.datas[C])==null?void 0:S.score),u=u.replace(y,w||"")});const _=l(u);if(g==="show"&&!_){let x=[];p.isLayout&&((b=p.children)!=null&&b.length)?x=p.children:x=[p],x.forEach(y=>{r.value.datas[y.id]&&(y.type==="grade"?delete r.value.datas[y.id].score:delete r.value.datas[y.id])})}return _},f=n,h=p=>{f("select",p)};return(p,g)=>{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),(b,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:x},[e.unref(d)||m(b,"show")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-item-wrap",{"select-mode":e.unref(d)},{"is-hidden":!b.props.showFlag},{selected:b.selected}]),style:e.normalizeStyle({width:`${b.props.width*100/e.unref(r).props.column}%`,"padding-left":`${b.props.paddingLeft}px`})},[m(b,"readonly")?(e.openBlock(),e.createElementBlock("div",L1)):e.createCommentVNode("",!0),e.unref(d)?(e.openBlock(),e.createBlock(u,{key:1,class:"select-item",modelValue:b.selected,"onUpdate:modelValue":y=>b.selected=y,label:"选择",onChange:y=>h(b)},null,8,["modelValue","onUpdate:modelValue","onChange"])):e.createCommentVNode("",!0),b.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[b.type].renderer),{key:2,componentID:b.id,showDescription:e.unref(s),component:e.unref(i)[x],"onUpdate:component":y=>e.unref(i)[x]=y},null,40,["componentID","showDescription","component","onUpdate:component"])):(e.openBlock(),e.createBlock(_,{key:3,class:e.normalizeClass(["form-item",{"label-new-line":b.props.labelNewLine}]),prop:b.id,"label-width":b.props.showLabel?b.props.labelWidth:"0",rules:b.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:b.props.color||"#000000","font-size":b.props.fontSize+"px","font-weight":b.props.isBold?"bold":"normal"})},e.toDisplayString(b.props.showLabel?b.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[b.type].renderer),{componentID:b.id,disabled:m(b,"disabled"),showDescription:e.unref(s),componentProps:b.props,"onUpdate:componentProps":y=>b.props=y,datas:e.unref(r).datas,"onUpdate:datas":g[0]||(g[0]=y=>e.unref(r).datas=y)},null,40,["componentID","disabled","showDescription","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["class","prop","label-width","rules"]))],6)):e.createCommentVNode("",!0)],64))),128)}}}),qs="",A1={key:0,class:"select-title"},O1=e.createElementVNode("h1",{class:"title"},"请选择项目",-1),F1={key:1,class:"title"},P1={key:0,class:"readonly-mask"},R1={key:2,class:"mobile-key"},U1={name:"zhy-form-renderer"},He=e.defineComponent({...U1,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:()=>[]}},emits:["change","select"],setup(o,{expose:n,emit:t}){const{removeEmptyAttribute:l}=se(),r={...ut,..._t,...gt},a=e.ref(),i=e.ref(!1),s=e.ref(!1),d=e.ref(!1),c=o,m=t,{formData:f,selectMode:h}=e.toRefs(c),p=e.ref(c.selectComponents);e.provide("uploadOptions",c.uploadOptions),e.provide("formData",f),e.provide("formType",f.value.props.formType);const g=C=>{var w,k,S,M;if((w=p.value)!=null&&w.length||(p.value=[]),!C){p.value=[],f.value.components.forEach(N=>{N.selected=s.value,s.value&&p.value.push(N)}),d.value=!1,m("select",p.value);return}if(C.selected)(k=p.value)==null||k.push(C);else{const N=(S=p.value)==null?void 0:S.findIndex(P=>P.id===C.id);N!==-1&&((M=p.value)==null||M.splice(N,1))}m("select",p.value),u()},u=()=>{var C,w;if(!((C=p.value)!=null&&C.length)){d.value=!1,s.value=!1;return}if(((w=p.value)==null?void 0:w.length)<f.value.components.length){d.value=!0;return}s.value=!0,d.value=!1},_=C=>{C!=null&&C.length&&(C.forEach(w=>{var S,M;let k=new r[w.type].component;k.isEdit&&(w.props.required||w.props.pattern)&&(w.rules=k.getRules(w.props)),c.selectMode&&((S=p.value)!=null&&S.length)&&p.value.findIndex(P=>P.id===w.id)!==-1&&(w.selected=!0),w.isLayout&&((M=w==null?void 0:w.children)!=null&&M.length)&&_(w.children)}),c.selectMode&&u())};e.watch(f,()=>_(f.value.components),{immediate:!0});const b=()=>{let C=l(f.value.datas),w=[],k=[];const S=Object.keys(C);for(let M of S){if(M.includes("||")){let N=M.split("||"),P=N[0],O=N[1],W=w.findIndex(T=>T.id===O&&T.groupID===P);if(W!==-1)w[W].value=C[M];else{const T={parentID:P,id:O,value:C[M]};w.push(T)}continue}x(f.value.components,w,k,M,C)}return{data:w,fileList:k}},x=(C,w,k,S,M)=>{var O;let N,P;for(let W=0;W<C.length;W++){const T=C[W];if(T.id===S){N=T,y(w,k,S,M,N);break}if(T.isLayout&&((O=T==null?void 0:T.children)!=null&&O.length)){if(N=T.children.find(H=>H.id===S),N){P=T.id,y(w,k,S,M,N,P);break}x(T.children,w,k,S,M)}}},y=(C,w,k,S,M,N)=>{var O,W;let P=-1;switch(M.type){case"radio":P=C.findIndex(T=>T.id===S[k]),P===-1&&C.push({groupID:N,parentID:k,id:S[k],value:""});break;case"checkbox":S[k].forEach(T=>{P=C.findIndex(H=>H.id===H),P===-1&&C.push({groupID:N,parentID:k,id:T,value:""})});break;case"upload":case"uploadImage":if(!((O=c.uploadOptions)!=null&&O.autoUpload)&&((W=S[k])!=null&&W.length)){const T=S[k].map(K=>(K.file&&(K.file.id=k),K.file)),H=S[k].map(K=>{if(K.fileID)return K.fileID}).filter(K=>K!==void 0);w.push({id:k,groupID:N,fileIDs:H,files:T})}break;default:C.push({groupID:N,parentID:k,id:k,value:S[k]});break}};return c.watching&&e.watch(()=>f.value.datas,()=>{const C=b();m("change",C.data,C.fileList)},{immediate:!0,deep:!0}),n({getDatas:b,async validate(C=()=>{}){return await a.value.validate(C)},resetFields(){a.value.resetFields()},clearValidate(C){a.value.clearValidate(C)},scrollToField(C){a.value.scrollToField(C)},toggleDescription(){i.value=!i.value}}),(C,w)=>{const k=e.resolveComponent("el-checkbox"),S=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(h)}])},[e.unref(h)?(e.openBlock(),e.createElementBlock("div",A1,[O1,e.createVNode(k,{class:"select-all",modelValue:e.unref(s),"onUpdate:modelValue":w[0]||(w[0]=M=>e.isRef(s)?s.value=M:null),label:"全选",indeterminate:e.unref(d),onChange:w[1]||(w[1]=M=>g())},null,8,["modelValue","indeterminate"])])):e.unref(f).props.formName?(e.openBlock(),e.createElementBlock("h1",F1,e.toDisplayString(e.unref(f).props.formName),1)):e.createCommentVNode("",!0),e.createVNode(S,{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(h)?(e.openBlock(),e.createElementBlock("div",P1)):e.createCommentVNode("",!0),e.createVNode(Ko,{components:e.unref(f).components,showDescription:e.unref(i),selectMode:e.unref(h),onSelect:g},null,8,["components","showDescription","selectMode"])]),_:1},8,["model","label-position","label-width","size","disabled"]),o.device==="mobile"?(e.openBlock(),e.createElementBlock("div",R1)):e.createCommentVNode("",!0)],2)}}}),js="",H1={class:"form-list-wrap"},q1={class:"form-list"},j1=["onClick"],G1=["title"],W1={class:"form-template"},X1={class:"dialog-footer"},Y1={class:"left-wrap"},K1={class:"select-count-wrap"},J1={class:"count"},Z1={class:"right-wrap"},Q1=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 t=e.inject("formData"),l=t.value.props.formType==="2"?"试卷":"表单",r=t.value.props.formType==="2"?"题目":"项目",a=e.useModel(o,"modelValue"),i=o,{params:s}=e.toRefs(i),d=e.ref(""),c=e.ref(""),m=e.ref({datas:{},components:[],props:{}}),f=e.ref(s.value.formList),h=()=>{f.value=s.value.formList,d.value&&(f.value=s.value.formList.filter(M=>M.formName.includes(d.value)))},p=async M=>{c.value!==M&&(c.value=M,m.value={datas:{},components:[],props:{}},s.value.getFormTemplateMethod&&(m.value=await s.value.getFormTemplateMethod(M)))},g=e.ref(new Map),u=e.computed(()=>{let M=0;for(const[,N]of g.value)M+=N.length;return M}),_=M=>{g.value.has(c.value)?M.length?g.value.set(c.value,M):g.value.delete(c.value):g.value.set(c.value,M)},{clone:b}=se(),x=()=>{let M=[];for(const[,N]of g.value)N.forEach(P=>{let O=b(P);delete O.selected,M.push(O)});return M},y=e.ref(!1),C=e.ref({datas:{},components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:t.value.props.formType}}),w=()=>{C.value.components=x(),y.value=!0},k=n,S=()=>{const M=x();k("select",M),a.value=!1};return(M,N)=>{const P=v,O=e.resolveComponent("el-input"),W=e.resolveComponent("el-empty"),T=He,H=e.resolveComponent("el-link"),K=e.resolveComponent("el-button"),ae=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(ae,{modelValue:a.value,"onUpdate:modelValue":N[2]||(N[2]=le=>a.value=le),class:"batch-add-dialog","destroy-on-close":"",title:`批量添加${e.unref(r)}`},{footer:e.withCtx(()=>[e.createElementVNode("div",X1,[e.createElementVNode("div",Y1,[e.createElementVNode("span",K1,[e.createTextVNode(" 已选 "),e.createElementVNode("span",J1,e.toDisplayString(` ${e.unref(u)} `),1),e.createElementVNode("span",null,e.toDisplayString(` 个${e.unref(r)}`),1)]),e.createVNode(H,{type:"primary",disabled:e.unref(g).size===0,onClick:w},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`查看已选${e.unref(r)}`),1)]),_:1},8,["disabled"])]),e.createElementVNode("div",Z1,[e.createVNode(K,{onClick:N[1]||(N[1]=le=>a.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1}),e.createVNode(K,{type:"primary",onClick:S},{default:e.withCtx(()=>[e.createTextVNode(" 确定 ")]),_:1})])])]),default:e.withCtx(()=>{var le,ue;return[e.createElementVNode("div",H1,[e.createVNode(O,{modelValue:e.unref(d),"onUpdate:modelValue":N[0]||(N[0]=Ee=>e.isRef(d)?d.value=Ee:null),placeholder:`搜索${e.unref(l)}`,class:"form-name-input",onChange:h},{append:e.withCtx(()=>[e.createVNode(P,{name:"search",color:"#08c979"})]),_:1},8,["modelValue","placeholder"]),e.createElementVNode("div",q1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(Ee,Le)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-item",{selected:e.unref(c)===Ee.formID}]),key:Le,onClick:ze=>p(Ee.formID)},[e.createVNode(P,{name:e.unref(t).props.formType==="1"?"form":"examination",color:e.unref(g).has(Ee.formID)?"#ff7400":"#108bf7"},null,8,["name","color"]),e.createElementVNode("div",{class:"form-item-name",title:Ee.formName},e.toDisplayString(Ee.formName),9,G1)],10,j1))),128))])]),e.createElementVNode("div",W1,[e.unref(c)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(W,{key:0,description:`请先选择左侧${e.unref(l)}`},null,8,["description"])),(ue=(le=e.unref(m))==null?void 0:le.components)!=null&&ue.length?(e.openBlock(),e.createBlock(T,{key:1,formData:e.unref(m),selectMode:"",selectComponents:e.unref(g).get(e.unref(c)),onSelect:_},null,8,["formData","selectComponents"])):e.createCommentVNode("",!0)])]}),_:1},8,["modelValue","title"]),e.createVNode(ae,{modelValue:e.unref(y),"onUpdate:modelValue":N[4]||(N[4]=le=>e.isRef(y)?y.value=le:null),class:"select-preview-dialog","destroy-on-close":"",title:`已选${e.unref(r)}预览`},{footer:e.withCtx(()=>[e.createVNode(K,{onClick:N[3]||(N[3]=le=>y.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1})]),default:e.withCtx(()=>{var le,ue;return[(ue=(le=e.unref(C))==null?void 0:le.components)!=null&&ue.length?(e.openBlock(),e.createBlock(T,{key:0,formData:e.unref(C)},null,8,["formData"])):e.createCommentVNode("",!0)]}),_:1},8,["modelValue","title"])])}}}),Gs="",v1={key:1,class:"tip"},ea=["innerHTML"],At=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),s=e.ref([]),d=e.ref({}),c=e.ref({}),m=()=>{s.value=[],d.value={},c.value={},f(l.value.components),i.value=!0},f=_=>{_.forEach(b=>{var x;if(r.id!==b.id){if(b.isLayout&&((x=b.children)!=null&&x.length)){f(b.children);return}b.isEdit&&(s.value.push({label:b.props.label,id:b.id}),d.value[b.id]=h(b.excludeFilterConditions),c.value[b.id]=b.filterConditionProps)}})},h=_=>Object.keys(filterConditionTypes).filter(x=>!_.includes(x)),p=n,g=()=>{const _=a.value.getFilterData();_.message||(i.value=!1,p("result",_))},u=()=>{p("clear")};return(_,b)=>{const x=e.resolveComponent("el-button"),y=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"condition-input",onClick:m},[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,ea)):(e.openBlock(),e.createElementBlock("span",v1,"单击设置条件"))]),e.createVNode(y,{class:"filter-dialog",modelValue:e.unref(i),"onUpdate:modelValue":b[1]||(b[1]=C=>e.isRef(i)?i.value=C:null),"destroy-on-close":"",title:o.title},{footer:e.withCtx(()=>[e.createVNode(x,{onClick:b[0]||(b[0]=C=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(x,{type:"primary",onClick:g},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})]),default:e.withCtx(()=>[e.createVNode(je,{ref_key:"dynamicFilterRef",ref:a,showStyle:"",items:e.unref(s),conditionTypes:e.unref(d),conditionProps:e.unref(c),defaultValue:o.defaultValue},null,8,["items","conditionTypes","conditionProps","defaultValue"])]),_:1},8,["modelValue","title"])],64)}}}),Ws="",ta=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 s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-switch"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(c,{"label-width":"90px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(t).props.showFlag?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"显示条件"},{default:e.withCtx(()=>[e.createVNode(At,{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]=m=>l(m,"show")),onClear:i[1]||(i[1]=m=>r("show"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).props.showFlag?(e.openBlock(),e.createBlock(s,{key:1,label:"隐藏条件"},{default:e.withCtx(()=>[e.createVNode(At,{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]=m=>l(m,"hidden")),onClear:i[3]||(i[3]=m=>r("hidden"))},null,8,["title","content","defaultValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(t).props.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:2,label:"只读条件"},{default:e.withCtx(()=>[e.createVNode(At,{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]=m=>l(m,"readonly")),onClear:i[5]||(i[5]=m=>r("readonly"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(s,{label:"参与统计"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.statisticsFlag,"onUpdate:modelValue":i[6]||(i[6]=m=>e.unref(t).props.statisticsFlag=m)},null,8,["modelValue"])]),_:1}),e.unref(t).props.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"禁用条件"},{default:e.withCtx(()=>[e.createVNode(At,{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]=m=>l(m,"disabled")),onClear:i[8]||(i[8]=m=>r("disabled"))},null,8,["title","content","defaultValue"])]),_:1}))],64)):e.createCommentVNode("",!0)]),_:1})}}}),oa=e.defineComponent({__name:"componentBasePropsEditor",props:{dictionary:{type:Object,default:()=>{}}},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},s=()=>{r.props.readonlyConditionContent=void 0,r.props.readonlyConditionExpression=void 0,r.props.readonlyConditions=void 0},d=()=>{r.props.disabledConditionContent=void 0,r.props.disabledConditionExpression=void 0,r.props.disabledConditions=void 0},c=h=>{a[0].required=h},m=h=>{a[0].message=h},f=h=>{typeof h.value!="string"&&(r.itemID=h.value),r.id=h.value,r.itemSourceType=h.itemSourceType};return(h,p)=>{const g=e.resolveComponent("el-switch"),u=e.resolveComponent("el-form-item"),_=e.resolveComponent("el-input-number"),b=e.resolveComponent("el-color-picker"),x=e.resolveComponent("el-slider"),y=e.resolveComponent("el-input"),C=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(C,{"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(g,{modelValue:e.unref(r).props.showLabel,"onUpdate:modelValue":p[0]||(p[0]=w=>e.unref(r).props.showLabel=w)},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(so,{modelValue:e.unref(r).props.label,"onUpdate:modelValue":p[1]||(p[1]=w=>e.unref(r).props.label=w),dictionary:o.dictionary,placeholder:e.unref(r).type==="label"?"标签内容":e.unref(l)==="1"?"请输入标题":"请输入题目","item-height":50,height:"100px",onChange:f},null,8,["modelValue","dictionary","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":p[2]||(p[2]=w=>e.unref(r).props.fontSize=w),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":p[3]||(p[3]=w=>e.unref(r).props.labelWidth=w),min:0},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"标题换行"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.labelNewLine,"onUpdate:modelValue":p[4]||(p[4]=w=>e.unref(r).props.labelNewLine=w)},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(g,{modelValue:e.unref(r).props.isBold,"onUpdate:modelValue":p[5]||(p[5]=w=>e.unref(r).props.isBold=w)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(u,{label:e.unref(r).type==="label"?"字体颜色":e.unref(l)==="1"?"标题颜色":"题目颜色"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).props.color,"onUpdate:modelValue":p[6]||(p[6]=w=>e.unref(r).props.color=w)},null,8,["modelValue"])]),_:1},8,["label"])],64)):e.createCommentVNode("",!0),e.createVNode(u,{label:"宽度"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(r).props.width,"onUpdate:modelValue":p[7]||(p[7]=w=>e.unref(r).props.width=w),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":p[8]||(p[8]=w=>e.unref(r).props.paddingLeft=w),min:0,max:100},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否显示"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.showFlag,"onUpdate:modelValue":p[9]||(p[9]=w=>e.unref(r).props.showFlag=w),onChange:i},null,8,["modelValue"])]),_:1}),e.unref(r).isInput?(e.openBlock(),e.createBlock(u,{key:4,label:"占位提示"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.placeholder,"onUpdate:modelValue":p[10]||(p[10]=w=>e.unref(r).props.placeholder=w),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(g,{modelValue:e.unref(r).props.clearable,"onUpdate:modelValue":p[11]||(p[11]=w=>e.unref(r).props.clearable=w)},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否只读"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.readonly,"onUpdate:modelValue":p[12]||(p[12]=w=>e.unref(r).props.readonly=w),onChange:s},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否必填"},{default:e.withCtx(()=>[e.createVNode(g,{onChange:c,modelValue:e.unref(r).props.required,"onUpdate:modelValue":p[13]||(p[13]=w=>e.unref(r).props.required=w)},null,8,["modelValue"])]),_:1}),e.unref(r).props.required?(e.openBlock(),e.createBlock(u,{key:0,label:"必填提示"},{default:e.withCtx(()=>[e.createVNode(y,{onChange:m,modelValue:e.unref(r).props.requiredMessage,"onUpdate:modelValue":p[14]||(p[14]=w=>e.unref(r).props.requiredMessage=w)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(u,{label:"是否禁用"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.disabled,"onUpdate:modelValue":p[15]||(p[15]=w=>e.unref(r).props.disabled=w),onChange:d},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(y,{modelValue:e.unref(r).props.description,"onUpdate:modelValue":p[16]||(p[16]=w=>e.unref(r).props.description=w),autosize:{minRows:2,maxRows:5},type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"])):e.createCommentVNode("",!0)]),_:1})}}}),na=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 s=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-input"),f=e.resolveComponent("el-input-number"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{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(c,{prop:"formType",label:"表单类型",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.formType,"onUpdate:modelValue":i[0]||(i[0]=p=>e.unref(t).props.formType=p),onChange:r},{default:e.withCtx(()=>[e.createVNode(s,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("问卷")]),_:1}),e.createVNode(s,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("试卷")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{prop:"formName",label:e.unref(t).props.formType==="1"?"问卷名称":"试卷名称",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).props.formName,"onUpdate:modelValue":i[1]||(i[1]=p=>e.unref(t).props.formName=p),autosize:"",type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(t).props.formType==="1"?(e.openBlock(),e.createBlock(c,{key:0,prop:"labelPosition",label:"标题位置"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.labelPosition,"onUpdate:modelValue":i[2]||(i[2]=p=>e.unref(t).props.labelPosition=p)},{default:e.withCtx(()=>[e.createVNode(s,{value:"top"},{default:e.withCtx(()=>[e.createTextVNode("上")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右")]),_:1})]),_:1},8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(c,{prop:"labelWidth",label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).props.labelWidth,"onUpdate:modelValue":i[3]||(i[3]=p=>e.unref(t).props.labelWidth=p),step:5,min:0},null,8,["modelValue"])]),_:1}),e.createVNode(c,{prop:"size",label:"表单尺寸"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.size,"onUpdate:modelValue":i[4]||(i[4]=p=>e.unref(t).props.size=p)},{default:e.withCtx(()=>[e.createVNode(s,{value:"small"},{default:e.withCtx(()=>[e.createTextVNode("小")]),_:1}),e.createVNode(s,{value:"default"},{default:e.withCtx(()=>[e.createTextVNode("正常")]),_:1}),e.createVNode(s,{value:"large"},{default:e.withCtx(()=>[e.createTextVNode("大")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.renderSlot(a.$slots,"formAfterExtendProps")]),_:3},8,["model"])}}}),la={class:"toolbar"},ra=e.createElementVNode("div",{class:"devices"},null,-1),aa={class:"operates"},ia=e.createElementVNode("span",null,"清空",-1),sa=e.createElementVNode("span",null,"模板导入",-1),ca=e.createElementVNode("span",null,"查看JSON",-1),da=e.createElementVNode("span",null,"预览",-1),pa=e.createElementVNode("span",null,"保存",-1),ma=e.createElementVNode("span",null,"验证表单",-1),fa=e.createElementVNode("span",null,"重置表单",-1),ha=e.createElementVNode("span",null,"表单数据",-1),Jo=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")},s=()=>{l("previewFrom")},d=()=>{l("saveFrom")},c=()=>{l("validateForm")},m=()=>{l("resetForm")},f=()=>{l("viewDataJson")},h=e.ref(!1),p=()=>{h.value=!h.value,l("toggleDescription",h.value)};return(g,u)=>{var y;const _=v,b=e.resolveComponent("el-button"),x=e.resolveComponent("el-popconfirm");return e.openBlock(),e.createElementBlock("div",la,[ra,e.createElementVNode("div",aa,[o.operates.includes("clearComponents")?(e.openBlock(),e.createBlock(x,{key:0,confirmButtonText:"是",cancelButtonText:"否",title:"确定要清空所有组件吗?",onConfirm:r},{reference:e.withCtx(()=>{var C;return[e.createVNode(b,{text:"",type:"danger",disabled:((C=e.unref(t).components)==null?void 0:C.length)==0},{default:e.withCtx(()=>[e.createVNode(_,{name:"clear",color:"#ff0000"}),ia]),_:1},8,["disabled"])]}),_:1})):e.createCommentVNode("",!0),o.operates.includes("batchAdd")?(e.openBlock(),e.createBlock(b,{key:1,text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(_,{name:"batchAdd",color:"#116fff",size:"16"}),sa]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewFormJson")?(e.openBlock(),e.createBlock(b,{key:2,text:"",type:"primary",onClick:i},{default:e.withCtx(()=>[e.createVNode(_,{name:"json"}),ca]),_:1})):e.createCommentVNode("",!0),o.operates.includes("previewFrom")?(e.openBlock(),e.createBlock(b,{key:3,text:"",type:"primary",disabled:((y=e.unref(t).components)==null?void 0:y.length)==0,onClick:s},{default:e.withCtx(()=>[e.createVNode(_,{name:"preview",color:"#116fff"}),da]),_:1},8,["disabled"])):e.createCommentVNode("",!0),o.operates.includes("saveFrom")?(e.openBlock(),e.createBlock(b,{key:4,text:"",type:"primary",onClick:d},{default:e.withCtx(()=>[e.createVNode(_,{name:"save",size:"14px",color:"#08c979"}),pa]),_:1})):e.createCommentVNode("",!0),o.operates.includes("validateForm")?(e.openBlock(),e.createBlock(b,{key:5,text:"",type:"warning",onClick:c},{default:e.withCtx(()=>[e.createVNode(_,{name:"validate",color:"#e6a23c"}),ma]),_:1})):e.createCommentVNode("",!0),o.operates.includes("resetForm")?(e.openBlock(),e.createBlock(b,{key:6,text:"",type:"danger",onClick:m},{default:e.withCtx(()=>[e.createVNode(_,{name:"reset",color:"#ff0000"}),fa]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewDataJson")?(e.openBlock(),e.createBlock(b,{key:7,text:"",type:"primary",onClick:f},{default:e.withCtx(()=>[e.createVNode(_,{name:"previewData",color:"#116fff"}),ha]),_:1})):e.createCommentVNode("",!0),o.operates.includes("toggleDescription")?(e.openBlock(),e.createBlock(b,{key:8,text:"",type:"primary",onClick:p},{default:e.withCtx(()=>[e.createVNode(_,{name:"description",color:"#08c979"}),e.createElementVNode("span",null,e.toDisplayString(`${e.unref(h)?"隐藏":"显示"}${e.unref(t).props.formType==="1"?"项目说明":"答案解析"}`),1)]),_:1})):e.createCommentVNode("",!0)])])}}}),Xs="",ua={class:"form-designer"},ga={class:"left-wrap"},_a=["onClick"],wa={class:"component-name"},ya={key:2,class:"no-component-tip"},ba={key:3,class:"mobile-key"},Ca=["title"],Va={key:1,class:"right-wrap"},xa={class:"preview-wrap"},ka={name:"zhy-form-designer"},ht=e.defineComponent({...ka,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},saveMethod:{type:Function,default:void 0},testMode:{type:Boolean,default:!1},batchAddComponentParams:{type:Object,default:()=>{}}},setup(o){const n=o,{getTempID:t,clone:l,stringifyJson:r,isEmpty:a}=se(),i={...ut,..._t,...gt},{formData:s,componentGroups:d,mergeGroup:c,batchAddComponentParams:m}=e.toRefs(n),f=e.reactive({selectComponent:void 0,propTab:"form",device:"pc"}),h=e.ref(!0),p=e.ref([]),g=e.computed(()=>u.value.map(B=>B.expand&&B.name)),u=e.ref([]),_=e.ref(!1),b={labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:"1"},x=[{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:"groupLayout",allowRepeat:!0,allowModify:!0},{type:"upload",allowRepeat:!0,allowModify:!0},{type:"uploadImage",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}]}],y=e.computed(()=>{let B=["clearComponents","previewFrom"];return m.value&&Object.keys(m.value).length&&B.push("batchAdd"),n.testMode&&B.push("viewFormJson"),n.saveMethod&&B.push("saveFrom"),B});e.onMounted(()=>{k(),C()}),e.watch(()=>f.selectComponent,B=>{if(f.propTab="component",!B){p.value=[];return}p.value=["base"],i[f.selectComponent.type].propEditor&&p.value.push("exclusive")}),e.watch([d,c],()=>{k()},{deep:!0}),e.watch(s,()=>{C()}),e.provide("uploadOptions",n.uploadOptions),e.provide("formDesignerData",f),e.provide("formData",s),e.provide("defaultSourceType",n.defaultSourceType),e.provide("formType",s.value.props.formType);const C=()=>{f.selectComponent=void 0,s.value.datas||(s.value.datas={}),s.value.components?w(s.value.components):s.value.components=[],s.value.props?s.value.props=Object.assign(b,s.value.props):s.value.props=b,_.value=!s.value.props.formName},w=B=>{B.forEach(async V=>{var z;let I=new i[V.type].component;V.name=I.name,V.isEdit=I.isEdit,V.isInput=I.isInput,V.props=Object.assign(I.props,V.props),V.isEdit&&((V.props.required||V.props.pattern)&&(V.rules=I.getRules(V.props)),V.filterConditionProps=await I.getFilterConditionProps(V.props),V.excludeFilterConditions=I.getExcludeFilterConditions()),u.value.forEach(U=>{const ie=U.types.findIndex(X=>X!=null&&X.id.includes("temp")?X.type===V.type:(X==null?void 0:X.id)===V.id);ie!==-1&&(V.allowRepeat=U.types[ie].allowRepeat,V.allowModify=U.types[ie].allowModify,S(V,U.types[ie],!0),O(ie,U))}),V.isLayout&&((z=V==null?void 0:V.children)!=null&&z.length)&&w(V.children)})},k=()=>{var B;if(u.value=[],!((B=d.value)!=null&&B.length)){x.forEach(V=>{u.value.push(M(V))});return}if(n.mergeGroup){x.forEach(z=>{let U=z;const ie=d.value.find(X=>z.name===X.name);if(ie){let X=[];z.components.forEach(Q=>{const Ve=ie.components.find(Ze=>Ze.type===Q.type);Ve?X.push(Ve):X.push(Q)}),U.components=X}u.value.push(M(U))});const V=x.map(z=>z.name);d.value.filter(z=>!V.includes(z.name)).forEach(z=>{u.value.push(M(z))})}else d.value.forEach(V=>{u.value.push(M(V))})},S=(B,V,I)=>{const z={employee:[{label:"人员1",value:t()}],post:[{label:"部门1",value:t()}],grade:[]};switch(B.type){case"employee":B.props.options=(I?V.props.options:V.options)||z.employee,V.searchEmployeeMethod?B.searchEmployeeMethod=V.searchEmployeeMethod:B.searchEmployeeMethod=U=>[];break;case"post":B.props.options=(I?V.props.options:V.options)||z.post;break;case"grade":B.props.remarkOptions=(I?V.props.remarkOptions:V.options)||z.grade;break}},M=B=>{let V=l(B);return V.types=V.components.map(I=>{var U;let z=new i[I.type].component;return z.allowRepeat=I.allowRepeat===void 0?!0:I.allowRepeat,z.allowModify=I.allowModify===void 0?!0:I.allowModify,S(z,I),!((U=I.id)!=null&&U.includes("temp"))&&!a(I.props)&&(z.props=Object.assign(z.props,I.props),z.id=I.id,z.name=I.name),z}),V.dynamicTypes=l(V.types),V.components=V.components.map(I=>I.type),V},N=(B,V)=>{const I=P(B);s.value.components.push(I);const z=V.types.findIndex(U=>B!=null&&B.id.includes("temp")?U.type===B.type:(U==null?void 0:U.id)===B.id);z!==-1&&O(z,V),f.selectComponent=void 0,e.nextTick(()=>f.selectComponent=I)},P=B=>{var z,U;let V=l(B);V.itemSourceType=n.defaultSourceType;let I=new i[B.type].component;return I.isEdit&&(V.filterConditionProps=I.getFilterConditionProps(V.props)),!((z=V.id)!=null&&z.includes("temp"))||(V.id=t(),!((U=V.props.options)!=null&&U.length)||["employee","post"].includes(V.type))||V.props.options.forEach(ie=>{ie.value=t(),ie.itemSourceType=n.defaultSourceType}),V},O=(B,V)=>{V.types[B].allowRepeat||V.types.splice(B,1)},W=B=>{B.allowRepeat||u.value.forEach(V=>{let I=[];V.dynamicTypes.forEach((z,U)=>{V.types.findIndex(X=>z!=null&&z.id.includes("temp")?z.type===X.type:(z==null?void 0:z.id)===X.id)!==-1&&I.push(l(V.dynamicTypes[U])),(z!=null&&z.id.includes("temp")&&z.type===B.type||(z==null?void 0:z.id)===B.id)&&I.push(l(V.dynamicTypes[U]))}),V.types=I})},T=()=>{s.value.components.splice(0,s.value.components.length),f.selectComponent=void 0},H=e.ref(!1),K=()=>{H.value=!0},ae=B=>{B!=null&&B.length&&(w(B),B.forEach(V=>s.value.components.push(V)))},le=()=>{Zo.value=r(s.value),Ot.value=!0},ue=e.ref(),Ee=async()=>{if(n.saveMethod){if(!s.value.components.length){pe("error","未发现需要保存的数据!");return}const B=await za();B&&n.saveMethod(B)}},Le=e.ref(),ze=e.ref(!1),co=()=>{ze.value=!0};e.watch(()=>ze.value,()=>{s.value.datas={},s.value.components.forEach(B=>{!s.value.datas[B.id]&&!a(B.props.defaultValue)&&(B.type==="grade"?s.value.datas[B.id]={score:B.props.defaultValue}:s.value.datas[B.id]=B.props.defaultValue)})});const Ot=e.ref(!1),Zo=e.ref(),Ba=async()=>{await Le.value.validate()?pe("success","通过验证"):pe("error","未通过验证")},Da=()=>{Le.value.resetFields()},Sa=()=>{const{data:B,fileList:V}=Le.value.getDatas();console.log(B,V)},Ma=()=>{Le.value.toggleDescription()},za=async()=>{if(!await ue.value.validate()){pe("error","请将表单属性填写完整!"),f.propTab="form";return}let V=["单选框","多选框","选项","标签","文本框","分组面板"],I=l(s.value);if(I.datas={},Qo(V,I.components))return I},Qo=(B,V,I)=>{var U,ie;let z=!0;for(let X=0;X<V.length;X++){let Q=V[X];if(delete Q.isEdit,delete Q.isInput,delete Q.name,delete Q.rules,delete Q.excludeFilterConditions,delete Q.filterConditionProps,B.find(Ve=>Q.props.label.indexOf(Ve)===0)){pe("error",`请将${I?`【${I}】中`:""}第${X+1}个项目的【${Q.props.label}】调整为合理描述!`),z=!1;break}if((U=Q.props.options)!=null&&U.length){for(let Ve=0;Ve<Q.props.options.length;Ve++){let Ze=Q.props.options[Ve];if(B.find(Ft=>Ze.label.indexOf(Ft)===0)){pe("error",`请将【${Q.props.label}】的第${Ve+1}个选项的【${Ze.label}】调整为合理描述!`),z=!1;break}}if(!z)break}a(V[X].props.defaultValue)&&(V[X].props.defaultValue=void 0),Q.isLayout&&((ie=Q==null?void 0:Q.children)!=null&&ie.length)&&(z=Qo(B,Q.children,Q.props.label))}return z};return(B,V)=>{var vo;const I=v,z=e.resolveComponent("el-collapse-item"),U=e.resolveComponent("el-collapse"),ie=e.resolveComponent("el-input"),X=e.resolveComponent("el-form"),Q=e.resolveComponent("el-empty"),Ve=e.resolveComponent("el-tab-pane"),Ze=e.resolveComponent("el-tabs"),Ft=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ua,[e.createElementVNode("div",ga,[e.createVNode(U,{modelValue:e.unref(g),"onUpdate:modelValue":V[0]||(V[0]=q=>e.isRef(g)?g.value=q:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),(q,$a)=>(e.openBlock(),e.createBlock(z,{key:$a,title:q.name,name:q.name},{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{list:q.types,"item-key":"type",tag:"div",class:"component-list",clone:qe=>P(qe),sort:!1,onRemove:qe=>O(qe.oldIndex,q),group:{name:"component",pull:"clone",put:!1}},{item:e.withCtx(({element:qe})=>[e.createElementVNode("div",{class:"component-item",onClick:Js=>N(qe,q)},[e.createVNode(I,{name:qe.type,color:"#fc8720"},null,8,["name"]),e.createElementVNode("span",wa,e.toDisplayString(qe.name),1)],8,_a)]),_: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(h)}])},[e.createVNode(Jo,{operates:e.unref(y),onClearComponents:T,onBatchAdd:K,onViewFormJson:le,onPreviewFrom:co,onSaveFrom:Ee},null,8,["operates"]),e.createElementVNode("div",{class:e.normalizeClass(["component-form",e.unref(f).device])},[e.unref(_)?(e.openBlock(),e.createBlock(ie,{key:0,class:"title-input",modelValue:e.unref(s).props.formName,"onUpdate:modelValue":V[1]||(V[1]=q=>e.unref(s).props.formName=q),placeholder:"单击输入标题",onBlur:V[2]||(V[2]=q=>_.value=!1),onKeydown:V[3]||(V[3]=e.withKeys(q=>_.value=!1,["enter"]))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("h2",{key:1,class:"title",onClick:V[4]||(V[4]=q=>_.value=!0)},e.toDisplayString(e.unref(s).props.formName),1)),(vo=e.unref(s).components)!=null&&vo.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ya,"从左侧拖拽组件")),e.createVNode(X,{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(Go,{components:e.unref(s).components,"onUpdate:components":V[5]||(V[5]=q=>e.unref(s).components=q),onDeleteComponent:W},null,8,["components"])]),_:1},8,["label-position","label-width","size"]),e.unref(f).device==="mobile"?(e.openBlock(),e.createElementBlock("div",ba)):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("i",{class:e.normalizeClass(["toggle-props",e.unref(h)?"show":"hidden"]),title:e.unref(h)?"隐藏属性配置面板":"打开属性配置面板",onClick:V[6]||(V[6]=q=>h.value=!e.unref(h))},null,10,Ca),e.unref(h)?(e.openBlock(),e.createElementBlock("div",Va,[e.createVNode(Ze,{class:"prop-tabs",modelValue:e.unref(f).propTab,"onUpdate:modelValue":V[9]||(V[9]=q=>e.unref(f).propTab=q),type:"border-card"},{default:e.withCtx(()=>[e.createVNode(Ve,{label:"组件属性",name:"component"},{default:e.withCtx(()=>[e.unref(f).selectComponent?(e.openBlock(),e.createBlock(U,{key:1,modelValue:e.unref(p),"onUpdate:modelValue":V[8]||(V[8]=q=>e.isRef(p)?p.value=q:null)},{default:e.withCtx(()=>[e.createVNode(z,{title:"基础属性",name:"base"},{default:e.withCtx(()=>[e.createVNode(oa,{dictionary:o.dictionary},null,8,["dictionary"])]),_:1}),i[e.unref(f).selectComponent.type].propEditor?(e.openBlock(),e.createBlock(z,{key:0,title:"专有属性",name:"exclusive"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i[e.unref(f).selectComponent.type].propEditor),{componentProps:e.unref(f).selectComponent.props,"onUpdate:componentProps":V[7]||(V[7]=q=>e.unref(f).selectComponent.props=q),dictionary:o.dictionary},null,40,["componentProps","dictionary"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(z,{title:"高级属性",name:"advanced"},{default:e.withCtx(()=>[e.createVNode(ta)]),_:1})]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(Q,{key:0,description:"请选择组件"}))]),_:1}),e.createVNode(Ve,{label:"表单属性",name:"form",class:"form-props"},{default:e.withCtx(()=>[e.unref(s).props?(e.openBlock(),e.createBlock(na,{key:0,ref_key:"formPropsEditorRef",ref:ue},{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(Ft,{modelValue:e.unref(ze),"onUpdate:modelValue":V[10]||(V[10]=q=>e.isRef(ze)?ze.value=q:null),class:"preview-dialog no-footer","destroy-on-close":"",fullscreen:"",title:"表单预览"},{default:e.withCtx(()=>[e.createElementVNode("div",xa,[e.createVNode(Jo,{operates:["validateForm","resetForm",o.testMode?"viewDataJson":"","toggleDescription"],onValidateForm:Ba,onResetForm:Da,onViewDataJson:Sa,onToggleDescription:Ma},null,8,["operates"]),e.createVNode(He,{watching:"",ref_key:"rendererForm",ref:Le,formData:e.unref(s),uploadOptions:o.uploadOptions,device:e.unref(f).device},null,8,["formData","uploadOptions","device"])])]),_:1},8,["modelValue"]),e.createVNode(Ft,{modelValue:e.unref(Ot),"onUpdate:modelValue":V[11]||(V[11]=q=>e.isRef(Ot)?Ot.value=q:null),class:"no-footer","destroy-on-close":"",title:"表单数据JSON",width:"600px"},{default:e.withCtx(()=>[e.createElementVNode("pre",null,e.toDisplayString(e.unref(Zo)),1)]),_:1},8,["modelValue"]),e.unref(H)?(e.openBlock(),e.createBlock(Q1,{key:0,modelValue:e.unref(H),"onUpdate:modelValue":V[12]||(V[12]=q=>e.isRef(H)?H.value=q:null),params:e.unref(m),onSelect:ae},null,8,["modelValue","params"])):e.createCommentVNode("",!0)],64)}}}),Ys="";ht.install=function(o){o.component(ht.name,ht)},He.install=function(o){o.component(He.name,He)},v.install=function(o){o.component(v.name,v)};const Ea=[v,ht,He,je],Na={install:function(o,n){Ea.forEach(t=>{o.component(t.name,t)})}};ne.ZhyDynamicFilter=je,ne.ZhyFormDesigner=ht,ne.ZhyFormRenderer=He,ne.ZhyIcon=v,ne.default=Na,Object.defineProperties(ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
7
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var V3="1.15.2";function Se(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var Me=Se(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Qe=Se(/Edge/i),mo=Se(/firefox/i),ve=Se(/safari/i)&&!Se(/chrome/i)&&!Se(/android/i),fo=Se(/iP(ad|od|hone)/i),ho=Se(/chrome/i)&&Se(/android/i),uo={capture:!1,passive:!1};function R(o,n,t){o.addEventListener(n,t,!Me&&uo)}function F(o,n,t){o.removeEventListener(n,t,!Me&&uo)}function yt(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 x3(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function be(o,n,t,l){if(o){t=t||document;do{if(n!=null&&(n[0]===">"?o.parentNode===t&&yt(o,n):yt(o,n))||l&&o===t)return o;if(o===t)break}while(o=x3(o))}return null}var go=/\s+/g;function J(o,n,t){if(o&&n)if(o.classList)o.classList[t?"add":"remove"](n);else{var l=(" "+o.className+" ").replace(go," ").replace(" "+n+" "," ");o.className=(l+(t?" "+n:"")).replace(go," ")}}function D(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 Oe(o,n){var t="";if(typeof o=="string")t=o;else do{var l=D(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 _o(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 Be(){var o=document.scrollingElement;return o||document.documentElement}function G(o,n,t,l,r){if(!(!o.getBoundingClientRect&&o!==window)){var a,i,s,d,c,m,f;if(o!==window&&o.parentNode&&o!==Be()?(a=o.getBoundingClientRect(),i=a.top,s=a.left,d=a.bottom,c=a.right,m=a.height,f=a.width):(i=0,s=0,d=window.innerHeight,c=window.innerWidth,m=window.innerHeight,f=window.innerWidth),(n||t)&&o!==window&&(r=r||o.parentNode,!Me))do if(r&&r.getBoundingClientRect&&(D(r,"transform")!=="none"||t&&D(r,"position")!=="static")){var h=r.getBoundingClientRect();i-=h.top+parseInt(D(r,"border-top-width")),s-=h.left+parseInt(D(r,"border-left-width")),d=i+a.height,c=s+a.width;break}while(r=r.parentNode);if(l&&o!==window){var p=Oe(r||o),g=p&&p.a,u=p&&p.d;p&&(i/=u,s/=g,f/=g,m/=u,d=i+m,c=s+f)}return{top:i,left:s,bottom:d,right:c,width:f,height:m}}}function wo(o,n,t){for(var l=$e(o,!0),r=G(o)[n];l;){var a=G(l)[t],i=void 0;if(t==="top"||t==="left"?i=r>=a:i=r<=a,!i)return l;if(l===Be())break;l=$e(l,!1)}return!1}function Ge(o,n,t,l){for(var r=0,a=0,i=o.children;a<i.length;){if(i[a].style.display!=="none"&&i[a]!==$.ghost&&(l||i[a]!==$.dragged)&&be(i[a],t.draggable,o,!1)){if(r===n)return i[a];r++}a++}return null}function Rt(o,n){for(var t=o.lastElementChild;t&&(t===$.ghost||D(t,"display")==="none"||n&&!yt(t,n));)t=t.previousElementSibling;return t||null}function ee(o,n){var t=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==$.clone&&(!n||yt(o,n))&&t++;return t}function yo(o){var n=0,t=0,l=Be();if(o)do{var r=Oe(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 k3(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 $e(o,n){if(!o||!o.getBoundingClientRect)return Be();var t=o,l=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=D(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 Be();if(l||n)return t;l=!0}}while(t=t.parentNode);return Be()}function E3(o,n){if(o&&n)for(var t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o}function Ut(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 et;function bo(o,n){return function(){if(!et){var t=arguments,l=this;t.length===1?o.call(l,t[0]):o.apply(l,t),et=setTimeout(function(){et=void 0},n)}}}function N3(){clearTimeout(et),et=void 0}function Co(o,n,t){o.scrollLeft+=n,o.scrollTop+=t}function Ht(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 Vo(o,n){D(o,"position","absolute"),D(o,"top",n.top),D(o,"left",n.left),D(o,"width",n.width),D(o,"height",n.height)}function qt(o){D(o,"position",""),D(o,"top",""),D(o,"left",""),D(o,"width",""),D(o,"height","")}function xo(o,n,t){var l={};return Array.from(o.children).forEach(function(r){var a,i,s,d;if(!(!be(r,n.draggable,o,!1)||r.animated||r===t)){var c=G(r);l.left=Math.min((a=l.left)!==null&&a!==void 0?a:1/0,c.left),l.top=Math.min((i=l.top)!==null&&i!==void 0?i:1/0,c.top),l.right=Math.max((s=l.right)!==null&&s!==void 0?s:-1/0,c.right),l.bottom=Math.max((d=l.bottom)!==null&&d!==void 0?d:-1/0,c.bottom)}}),l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}var ce="Sortable"+new Date().getTime();function B3(){var o=[],n;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var l=[].slice.call(this.el.children);l.forEach(function(r){if(!(D(r,"display")==="none"||r===$.ghost)){o.push({target:r,rect:G(r)});var a=Ne({},o[o.length-1].rect);if(r.thisAnimationDuration){var i=Oe(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(k3(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(s){var d=0,c=s.target,m=c.fromRect,f=G(c),h=c.prevFromRect,p=c.prevToRect,g=s.rect,u=Oe(c,!0);u&&(f.top-=u.f,f.left-=u.e),c.toRect=f,c.thisAnimationDuration&&Ut(h,f)&&!Ut(m,f)&&(g.top-f.top)/(g.left-f.left)===(m.top-f.top)/(m.left-f.left)&&(d=S3(g,h,p,r.options)),Ut(f,m)||(c.prevFromRect=m,c.prevToRect=f,d||(d=r.options.animation),r.animate(c,g,f,d)),d&&(a=!0,i=Math.max(i,d),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},d),c.thisAnimationDuration=d)}),clearTimeout(n),a?n=setTimeout(function(){typeof l=="function"&&l()},i):typeof l=="function"&&l(),o=[]},animate:function(l,r,a,i){if(i){D(l,"transition",""),D(l,"transform","");var s=Oe(this.el),d=s&&s.a,c=s&&s.d,m=(r.left-a.left)/(d||1),f=(r.top-a.top)/(c||1);l.animatingX=!!m,l.animatingY=!!f,D(l,"transform","translate3d("+m+"px,"+f+"px,0)"),this.forRepaintDummy=D3(l),D(l,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),D(l,"transform","translate3d(0,0,0)"),typeof l.animated=="number"&&clearTimeout(l.animated),l.animated=setTimeout(function(){D(l,"transition",""),D(l,"transform",""),l.animated=!1,l.animatingX=!1,l.animatingY=!1},i)}}}}function D3(o){return o.offsetWidth}function S3(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 We=[],jt={initializeByDefault:!0},tt={mount:function(n){for(var t in jt)jt.hasOwnProperty(t)&&!(t in n)&&(n[t]=jt[t]);We.forEach(function(l){if(l.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),We.push(n)},pluginEvent:function(n,t,l){var r=this;this.eventCanceled=!1,l.cancel=function(){r.eventCanceled=!0};var a=n+"Global";We.forEach(function(i){t[i.pluginName]&&(t[i.pluginName][a]&&t[i.pluginName][a](Ne({sortable:t},l)),t.options[i.pluginName]&&t[i.pluginName][n]&&t[i.pluginName][n](Ne({sortable:t},l)))})},initializePlugins:function(n,t,l,r){We.forEach(function(s){var d=s.pluginName;if(!(!n.options[d]&&!s.initializeByDefault)){var c=new s(n,t,n.options);c.sortable=n,c.options=n.options,n[d]=c,ye(l,c.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 We.forEach(function(r){typeof r.eventProperties=="function"&&ye(l,r.eventProperties.call(t[r.pluginName],n))}),l},modifyOption:function(n,t,l){var r;return We.forEach(function(a){n[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(r=a.optionListeners[t].call(n[a.pluginName],l))}),r}};function ot(o){var n=o.sortable,t=o.rootEl,l=o.name,r=o.targetEl,a=o.cloneEl,i=o.toEl,s=o.fromEl,d=o.oldIndex,c=o.newIndex,m=o.oldDraggableIndex,f=o.newDraggableIndex,h=o.originalEvent,p=o.putSortable,g=o.extraEventProperties;if(n=n||t&&t[ce],!!n){var u,_=n.options,b="on"+l.charAt(0).toUpperCase()+l.substr(1);window.CustomEvent&&!Me&&!Qe?u=new CustomEvent(l,{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent(l,!0,!0)),u.to=i||t,u.from=s||t,u.item=r||t,u.clone=a,u.oldIndex=d,u.newIndex=c,u.oldDraggableIndex=m,u.newDraggableIndex=f,u.originalEvent=h,u.pullMode=p?p.lastPutMode:void 0;var x=Ne(Ne({},g),tt.getEventProperties(l,n));for(var y in x)u[y]=x[y];t&&t.dispatchEvent(u),_[b]&&_[b].call(n,u)}}var M3=["evt"],fe=function(n,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=l.evt,a=g3(l,M3);tt.pluginEvent.bind($)(n,t,Ne({dragEl:E,parentEl:te,ghostEl:L,rootEl:Y,nextEl:Fe,lastDownEl:bt,cloneEl:Z,cloneHidden:Te,dragStarted:lt,putSortable:re,activeSortable:$.active,originalEvent:r,oldIndex:Xe,oldDraggableIndex:nt,newIndex:_e,newDraggableIndex:Ie,hideGhostForTarget:Mo,unhideGhostForTarget:zo,cloneNowHidden:function(){Te=!0},cloneNowShown:function(){Te=!1},dispatchSortableEvent:function(s){me({sortable:t,name:s,originalEvent:r})}},a))};function me(o){ot(Ne({putSortable:re,cloneEl:Z,targetEl:E,rootEl:Y,oldIndex:Xe,oldDraggableIndex:nt,newIndex:_e,newDraggableIndex:Ie},o))}var E,te,L,Y,Fe,bt,Z,Te,Xe,_e,nt,Ie,Ct,re,Ye=!1,Vt=!1,xt=[],Pe,xe,Gt,Wt,ko,Eo,lt,Ke,rt,at=!1,kt=!1,Et,de,Xt=[],Yt=!1,Nt=[],Bt=typeof document<"u",Dt=fo,No=Qe||Me?"cssFloat":"float",z3=Bt&&!ho&&!fo&&"draggable"in document.createElement("div"),Bo=function(){if(Bt){if(Me)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Do=function(n,t){var l=D(n),r=parseInt(l.width)-parseInt(l.paddingLeft)-parseInt(l.paddingRight)-parseInt(l.borderLeftWidth)-parseInt(l.borderRightWidth),a=Ge(n,0,t),i=Ge(n,1,t),s=a&&D(a),d=i&&D(i),c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+G(a).width,m=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+G(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&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return i&&(d.clear==="both"||d.clear===f)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||c>=r&&l[No]==="none"||i&&l[No]==="none"&&c+m>r)?"vertical":"horizontal"},$3=function(n,t,l){var r=l?n.left:n.top,a=l?n.right:n.bottom,i=l?n.width:n.height,s=l?t.left:t.top,d=l?t.right:t.bottom,c=l?t.width:t.height;return r===s||a===d||r+i/2===s+c/2},T3=function(n,t){var l;return xt.some(function(r){var a=r[ce].options.emptyInsertThreshold;if(!(!a||Rt(r))){var i=G(r),s=n>=i.left-a&&n<=i.right+a,d=t>=i.top-a&&t<=i.bottom+a;if(s&&d)return l=r}}),l},So=function(n){function t(a,i){return function(s,d,c,m){var f=s.options.group.name&&d.options.group.name&&s.options.group.name===d.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(s,d,c,m),i)(s,d,c,m);var h=(i?s:d).options.group.name;return a===!0||typeof a=="string"&&a===h||a.join&&a.indexOf(h)>-1}}var l={},r=n.group;(!r||wt(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},Mo=function(){!Bo&&L&&D(L,"display","none")},zo=function(){!Bo&&L&&D(L,"display","")};Bt&&!ho&&document.addEventListener("click",function(o){if(Vt)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),Vt=!1,!1},!0);var Re=function(n){if(E){n=n.touches?n.touches[0]:n;var t=T3(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[ce]._onDragOver(l)}}},I3=function(n){E&&E.parentNode[ce]._isOutsideThisEl(n.target)};function $(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=ye({},n),o[ce]=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 Do(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,s){i.setData("Text",s.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:$.supportPointer!==!1&&"PointerEvent"in window&&!ve,emptyInsertThreshold:5};tt.initializePlugins(this,o,t);for(var l in t)!(l in n)&&(n[l]=t[l]);So(n);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=n.forceFallback?!1:z3,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?R(o,"pointerdown",this._onTapStart):(R(o,"mousedown",this._onTapStart),R(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(R(o,"dragover",this),R(o,"dragenter",this)),xt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),ye(this,B3())}$.prototype={constructor:$,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(Ke=null)},_getDirection:function(n,t){return typeof this.options.direction=="function"?this.options.direction.call(this,n,t,E):this.options.direction},_onTapStart:function(n){if(n.cancelable){var t=this,l=this.el,r=this.options,a=r.preventOnFilter,i=n.type,s=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,d=(s||n).target,c=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||d,m=r.filter;if(H3(l),!E&&!(/mousedown|pointerdown/.test(i)&&n.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&ve&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=be(d,r.draggable,l,!1),!(d&&d.animated)&&bt!==d)){if(Xe=ee(d),nt=ee(d,r.draggable),typeof m=="function"){if(m.call(this,n,d,this)){me({sortable:t,rootEl:c,name:"filter",targetEl:d,toEl:l,fromEl:l}),fe("filter",t,{evt:n}),a&&n.cancelable&&n.preventDefault();return}}else if(m&&(m=m.split(",").some(function(f){if(f=be(c,f.trim(),l,!1),f)return me({sortable:t,rootEl:f,name:"filter",targetEl:d,fromEl:l,toEl:l}),fe("filter",t,{evt:n}),!0}),m)){a&&n.cancelable&&n.preventDefault();return}r.handle&&!be(c,r.handle,l,!1)||this._prepareDragStart(n,s,d)}}},_prepareDragStart:function(n,t,l){var r=this,a=r.el,i=r.options,s=a.ownerDocument,d;if(l&&!E&&l.parentNode===a){var c=G(l);if(Y=a,E=l,te=E.parentNode,Fe=E.nextSibling,bt=l,Ct=i.group,$.dragged=E,Pe={target:E,clientX:(t||n).clientX,clientY:(t||n).clientY},ko=Pe.clientX-c.left,Eo=Pe.clientY-c.top,this._lastX=(t||n).clientX,this._lastY=(t||n).clientY,E.style["will-change"]="all",d=function(){if(fe("delayEnded",r,{evt:n}),$.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!mo&&r.nativeDraggable&&(E.draggable=!0),r._triggerDragStart(n,t),me({sortable:r,name:"choose",originalEvent:n}),J(E,i.chosenClass,!0)},i.ignore.split(",").forEach(function(m){_o(E,m.trim(),Kt)}),R(s,"dragover",Re),R(s,"mousemove",Re),R(s,"touchmove",Re),R(s,"mouseup",r._onDrop),R(s,"touchend",r._onDrop),R(s,"touchcancel",r._onDrop),mo&&this.nativeDraggable&&(this.options.touchStartThreshold=4,E.draggable=!0),fe("delayStart",this,{evt:n}),i.delay&&(!i.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Qe||Me))){if($.eventCanceled){this._onDrop();return}R(s,"mouseup",r._disableDelayedDrag),R(s,"touchend",r._disableDelayedDrag),R(s,"touchcancel",r._disableDelayedDrag),R(s,"mousemove",r._delayedDragTouchMoveHandler),R(s,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&R(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(d,i.delay)}else d()}},_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(){E&&Kt(E),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;F(n,"mouseup",this._disableDelayedDrag),F(n,"touchend",this._disableDelayedDrag),F(n,"touchcancel",this._disableDelayedDrag),F(n,"mousemove",this._delayedDragTouchMoveHandler),F(n,"touchmove",this._delayedDragTouchMoveHandler),F(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,t){t=t||n.pointerType=="touch"&&n,!this.nativeDraggable||t?this.options.supportPointer?R(document,"pointermove",this._onTouchMove):t?R(document,"touchmove",this._onTouchMove):R(document,"mousemove",this._onTouchMove):(R(E,"dragend",this),R(Y,"dragstart",this._onDragStart));try{document.selection?Mt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,t){if(Ye=!1,Y&&E){fe("dragStarted",this,{evt:t}),this.nativeDraggable&&R(document,"dragover",I3);var l=this.options;!n&&J(E,l.dragClass,!1),J(E,l.ghostClass,!0),$.active=this,n&&this._appendGhost(),me({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(xe){this._lastX=xe.clientX,this._lastY=xe.clientY,Mo();for(var n=document.elementFromPoint(xe.clientX,xe.clientY),t=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(xe.clientX,xe.clientY),n!==t);)t=n;if(E.parentNode[ce]._isOutsideThisEl(n),t)do{if(t[ce]){var l=void 0;if(l=t[ce]._onDragOver({clientX:xe.clientX,clientY:xe.clientY,target:n,rootEl:t}),l&&!this.options.dragoverBubble)break}n=t}while(t=t.parentNode);zo()}},_onTouchMove:function(n){if(Pe){var t=this.options,l=t.fallbackTolerance,r=t.fallbackOffset,a=n.touches?n.touches[0]:n,i=L&&Oe(L,!0),s=L&&i&&i.a,d=L&&i&&i.d,c=Dt&&de&&yo(de),m=(a.clientX-Pe.clientX+r.x)/(s||1)+(c?c[0]-Xt[0]:0)/(s||1),f=(a.clientY-Pe.clientY+r.y)/(d||1)+(c?c[1]-Xt[1]:0)/(d||1);if(!$.active&&!Ye){if(l&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<l)return;this._onDragStart(n,!0)}if(L){i?(i.e+=m-(Gt||0),i.f+=f-(Wt||0)):i={a:1,b:0,c:0,d:1,e:m,f};var h="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");D(L,"webkitTransform",h),D(L,"mozTransform",h),D(L,"msTransform",h),D(L,"transform",h),Gt=m,Wt=f,xe=a}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!L){var n=this.options.fallbackOnBody?document.body:Y,t=G(E,!0,Dt,!0,n),l=this.options;if(Dt){for(de=n;D(de,"position")==="static"&&D(de,"transform")==="none"&&de!==document;)de=de.parentNode;de!==document.body&&de!==document.documentElement?(de===document&&(de=Be()),t.top+=de.scrollTop,t.left+=de.scrollLeft):de=Be(),Xt=yo(de)}L=E.cloneNode(!0),J(L,l.ghostClass,!1),J(L,l.fallbackClass,!0),J(L,l.dragClass,!0),D(L,"transition",""),D(L,"transform",""),D(L,"box-sizing","border-box"),D(L,"margin",0),D(L,"top",t.top),D(L,"left",t.left),D(L,"width",t.width),D(L,"height",t.height),D(L,"opacity","0.8"),D(L,"position",Dt?"absolute":"fixed"),D(L,"zIndex","100000"),D(L,"pointerEvents","none"),$.ghost=L,n.appendChild(L),D(L,"transform-origin",ko/parseInt(L.style.width)*100+"% "+Eo/parseInt(L.style.height)*100+"%")}},_onDragStart:function(n,t){var l=this,r=n.dataTransfer,a=l.options;if(fe("dragStart",this,{evt:n}),$.eventCanceled){this._onDrop();return}fe("setupClone",this),$.eventCanceled||(Z=Ht(E),Z.removeAttribute("id"),Z.draggable=!1,Z.style["will-change"]="",this._hideClone(),J(Z,this.options.chosenClass,!1),$.clone=Z),l.cloneId=Mt(function(){fe("clone",l),!$.eventCanceled&&(l.options.removeCloneOnHide||Y.insertBefore(Z,E),l._hideClone(),me({sortable:l,name:"clone"}))}),!t&&J(E,a.dragClass,!0),t?(Vt=!0,l._loopId=setInterval(l._emulateDragOver,50)):(F(document,"mouseup",l._onDrop),F(document,"touchend",l._onDrop),F(document,"touchcancel",l._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(l,r,E)),R(document,"drop",l),D(E,"transform","translateZ(0)")),Ye=!0,l._dragStartId=Mt(l._dragStarted.bind(l,t,n)),R(document,"selectstart",l),lt=!0,ve&&D(document.body,"user-select","none")},_onDragOver:function(n){var t=this.el,l=n.target,r,a,i,s=this.options,d=s.group,c=$.active,m=Ct===d,f=s.sort,h=re||c,p,g=this,u=!1;if(Yt)return;function _(ue,Ee){fe(ue,g,Ne({evt:n,isOwner:m,axis:p?"vertical":"horizontal",revert:i,dragRect:r,targetRect:a,canSort:f,fromSortable:h,target:l,completed:x,onMove:function(ze,co){return St(Y,t,E,r,ze,G(ze),n,co)},changed:y},Ee))}function b(){_("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function x(ue){return _("dragOverCompleted",{insertion:ue}),ue&&(m?c._hideClone():c._showClone(g),g!==h&&(J(E,re?re.options.ghostClass:c.options.ghostClass,!1),J(E,s.ghostClass,!0)),re!==g&&g!==$.active?re=g:g===$.active&&re&&(re=null),h===g&&(g._ignoreWhileAnimating=l),g.animateAll(function(){_("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(l===E&&!E.animated||l===t&&!l.animated)&&(Ke=null),!s.dragoverBubble&&!n.rootEl&&l!==document&&(E.parentNode[ce]._isOutsideThisEl(n.target),!ue&&Re(n)),!s.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),u=!0}function y(){_e=ee(E),Ie=ee(E,s.draggable),me({sortable:g,name:"change",toEl:t,newIndex:_e,newDraggableIndex:Ie,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),l=be(l,s.draggable,t,!0),_("dragOver"),$.eventCanceled)return u;if(E.contains(n.target)||l.animated&&l.animatingX&&l.animatingY||g._ignoreWhileAnimating===l)return x(!1);if(Vt=!1,c&&!s.disabled&&(m?f||(i=te!==Y):re===this||(this.lastPutMode=Ct.checkPull(this,c,E,n))&&d.checkPut(this,c,E,n))){if(p=this._getDirection(n,l)==="vertical",r=G(E),_("dragOverValid"),$.eventCanceled)return u;if(i)return te=Y,b(),this._hideClone(),_("revert"),$.eventCanceled||(Fe?Y.insertBefore(E,Fe):Y.appendChild(E)),x(!0);var C=Rt(t,s.draggable);if(!C||F3(n,p,this)&&!C.animated){if(C===E)return x(!1);if(C&&t===n.target&&(l=C),l&&(a=G(l)),St(Y,t,E,r,l,a,n,!!l)!==!1)return b(),C&&C.nextSibling?t.insertBefore(E,C.nextSibling):t.appendChild(E),te=t,y(),x(!0)}else if(C&&O3(n,p,this)){var w=Ge(t,0,s,!0);if(w===E)return x(!1);if(l=w,a=G(l),St(Y,t,E,r,l,a,n,!1)!==!1)return b(),t.insertBefore(E,w),te=t,y(),x(!0)}else if(l.parentNode===t){a=G(l);var k=0,S,M=E.parentNode!==t,N=!$3(E.animated&&E.toRect||r,l.animated&&l.toRect||a,p),P=p?"top":"left",O=wo(l,"top","top")||wo(E,"top","top"),W=O?O.scrollTop:void 0;Ke!==l&&(S=a[P],at=!1,kt=!N&&s.invertSwap||M),k=P3(n,l,a,p,N?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,kt,Ke===l);var T;if(k!==0){var H=ee(E);do H-=k,T=te.children[H];while(T&&(D(T,"display")==="none"||T===L))}if(k===0||T===l)return x(!1);Ke=l,rt=k;var K=l.nextElementSibling,ae=!1;ae=k===1;var le=St(Y,t,E,r,l,a,n,ae);if(le!==!1)return(le===1||le===-1)&&(ae=le===1),Yt=!0,setTimeout(A3,30),b(),ae&&!K?t.appendChild(E):l.parentNode.insertBefore(E,ae?K:l),O&&Co(O,0,W-O.scrollTop),te=E.parentNode,S!==void 0&&!kt&&(Et=Math.abs(S-G(l)[P])),y(),x(!0)}if(t.contains(E))return x(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){F(document,"mousemove",this._onTouchMove),F(document,"touchmove",this._onTouchMove),F(document,"pointermove",this._onTouchMove),F(document,"dragover",Re),F(document,"mousemove",Re),F(document,"touchmove",Re)},_offUpEvents:function(){var n=this.el.ownerDocument;F(n,"mouseup",this._onDrop),F(n,"touchend",this._onDrop),F(n,"pointerup",this._onDrop),F(n,"touchcancel",this._onDrop),F(document,"selectstart",this)},_onDrop:function(n){var t=this.el,l=this.options;if(_e=ee(E),Ie=ee(E,l.draggable),fe("drop",this,{evt:n}),te=E&&E.parentNode,_e=ee(E),Ie=ee(E,l.draggable),$.eventCanceled){this._nulling();return}Ye=!1,kt=!1,at=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Jt(this.cloneId),Jt(this._dragStartId),this.nativeDraggable&&(F(document,"drop",this),F(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ve&&D(document.body,"user-select",""),D(E,"transform",""),n&&(lt&&(n.cancelable&&n.preventDefault(),!l.dropBubble&&n.stopPropagation()),L&&L.parentNode&&L.parentNode.removeChild(L),(Y===te||re&&re.lastPutMode!=="clone")&&Z&&Z.parentNode&&Z.parentNode.removeChild(Z),E&&(this.nativeDraggable&&F(E,"dragend",this),Kt(E),E.style["will-change"]="",lt&&!Ye&&J(E,re?re.options.ghostClass:this.options.ghostClass,!1),J(E,this.options.chosenClass,!1),me({sortable:this,name:"unchoose",toEl:te,newIndex:null,newDraggableIndex:null,originalEvent:n}),Y!==te?(_e>=0&&(me({rootEl:te,name:"add",toEl:te,fromEl:Y,originalEvent:n}),me({sortable:this,name:"remove",toEl:te,originalEvent:n}),me({rootEl:te,name:"sort",toEl:te,fromEl:Y,originalEvent:n}),me({sortable:this,name:"sort",toEl:te,originalEvent:n})),re&&re.save()):_e!==Xe&&_e>=0&&(me({sortable:this,name:"update",toEl:te,originalEvent:n}),me({sortable:this,name:"sort",toEl:te,originalEvent:n})),$.active&&((_e==null||_e===-1)&&(_e=Xe,Ie=nt),me({sortable:this,name:"end",toEl:te,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){fe("nulling",this),Y=E=te=L=Fe=Z=bt=Te=Pe=xe=lt=_e=Ie=Xe=nt=Ke=rt=re=Ct=$.dragged=$.ghost=$.clone=$.active=null,Nt.forEach(function(n){n.checked=!0}),Nt.length=Gt=Wt=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":E&&(this._onDragOver(n),L3(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],be(t,i.draggable,this.el,!1)&&n.push(t.getAttribute(i.dataIdAttr)||U3(t));return n},sort:function(n,t){var l={},r=this.el;this.toArray().forEach(function(a,i){var s=r.children[i];be(s,this.options.draggable,r,!1)&&(l[a]=s)},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 be(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=tt.modifyOption(this,n,t);typeof r<"u"?l[n]=r:l[n]=t,n==="group"&&So(l)},destroy:function(){fe("destroy",this);var n=this.el;n[ce]=null,F(n,"mousedown",this._onTapStart),F(n,"touchstart",this._onTapStart),F(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(F(n,"dragover",this),F(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xt.splice(xt.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!Te){if(fe("hideClone",this),$.eventCanceled)return;D(Z,"display","none"),this.options.removeCloneOnHide&&Z.parentNode&&Z.parentNode.removeChild(Z),Te=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(Te){if(fe("showClone",this),$.eventCanceled)return;E.parentNode==Y&&!this.options.group.revertClone?Y.insertBefore(Z,E):Fe?Y.insertBefore(Z,Fe):Y.appendChild(Z),this.options.group.revertClone&&this.animate(E,Z),D(Z,"display",""),Te=!1}}};function L3(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function St(o,n,t,l,r,a,i,s){var d,c=o[ce],m=c.options.onMove,f;return window.CustomEvent&&!Me&&!Qe?d=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(d=document.createEvent("Event"),d.initEvent("move",!0,!0)),d.to=n,d.from=o,d.dragged=t,d.draggedRect=l,d.related=r||n,d.relatedRect=a||G(n),d.willInsertAfter=s,d.originalEvent=i,o.dispatchEvent(d),m&&(f=m.call(c,d,i)),f}function Kt(o){o.draggable=!1}function A3(){Yt=!1}function O3(o,n,t){var l=G(Ge(t.el,0,t.options,!0)),r=xo(t.el,t.options,L),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 F3(o,n,t){var l=G(Rt(t.el,t.options.draggable)),r=xo(t.el,t.options,L),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 P3(o,n,t,l,r,a,i,s){var d=l?o.clientY:o.clientX,c=l?t.height:t.width,m=l?t.top:t.left,f=l?t.bottom:t.right,h=!1;if(!i){if(s&&Et<c*r){if(!at&&(rt===1?d>m+c*a/2:d<f-c*a/2)&&(at=!0),at)h=!0;else if(rt===1?d<m+Et:d>f-Et)return-rt}else if(d>m+c*(1-r)/2&&d<f-c*(1-r)/2)return R3(n)}return h=h||i,h&&(d<m+c*a/2||d>f-c*a/2)?d>m+c/2?1:-1:0}function R3(o){return ee(E)<ee(o)?1:-1}function U3(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 H3(o){Nt.length=0;for(var n=o.getElementsByTagName("input"),t=n.length;t--;){var l=n[t];l.checked&&Nt.push(l)}}function Mt(o){return setTimeout(o,0)}function Jt(o){return clearTimeout(o)}Bt&&R(document,"touchmove",function(o){($.active||Ye)&&o.cancelable&&o.preventDefault()}),$.utils={on:R,off:F,css:D,find:_o,is:function(n,t){return!!be(n,t,n,!1)},extend:E3,throttle:bo,closest:be,toggleClass:J,clone:Ht,index:ee,nextTick:Mt,cancelNextTick:Jt,detectDirection:Do,getChild:Ge},$.get=function(o){return o[ce]},$.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&&($.utils=Ne(Ne({},$.utils),l.utils)),tt.mount(l)})},$.create=function(o,n){return new $(o,n)},$.version=V3;var oe=[],it,Zt,Qt=!1,vt,eo,zt,st;function q3(){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?R(document,"dragover",this._handleAutoScroll):this.options.supportPointer?R(document,"pointermove",this._handleFallbackAutoScroll):l.touches?R(document,"touchmove",this._handleFallbackAutoScroll):R(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var l=t.originalEvent;!this.options.dragOverBubble&&!l.rootEl&&this._handleAutoScroll(l)},drop:function(){this.sortable.nativeDraggable?F(document,"dragover",this._handleAutoScroll):(F(document,"pointermove",this._handleFallbackAutoScroll),F(document,"touchmove",this._handleFallbackAutoScroll),F(document,"mousemove",this._handleFallbackAutoScroll)),$o(),$t(),N3()},nulling:function(){zt=Zt=it=Qt=st=vt=eo=null,oe.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,s=document.elementFromPoint(a,i);if(zt=t,l||this.options.forceAutoScrollFallback||Qe||Me||ve){to(t,this.options,s,l);var d=$e(s,!0);Qt&&(!st||a!==vt||i!==eo)&&(st&&$o(),st=setInterval(function(){var c=$e(document.elementFromPoint(a,i),!0);c!==d&&(d=c,$t()),to(t,r.options,c,l)},10),vt=a,eo=i)}else{if(!this.options.bubbleScroll||$e(s,!0)===Be()){$t();return}to(t,this.options,$e(s,!1),!1)}}},ye(o,{pluginName:"scroll",initializeByDefault:!0})}function $t(){oe.forEach(function(o){clearInterval(o.pid)}),oe=[]}function $o(){clearInterval(st)}var to=bo(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,s=n.scrollSpeed,d=Be(),c=!1,m;Zt!==t&&(Zt=t,$t(),it=n.scroll,m=n.scrollFn,it===!0&&(it=$e(t,!0)));var f=0,h=it;do{var p=h,g=G(p),u=g.top,_=g.bottom,b=g.left,x=g.right,y=g.width,C=g.height,w=void 0,k=void 0,S=p.scrollWidth,M=p.scrollHeight,N=D(p),P=p.scrollLeft,O=p.scrollTop;p===d?(w=y<S&&(N.overflowX==="auto"||N.overflowX==="scroll"||N.overflowX==="visible"),k=C<M&&(N.overflowY==="auto"||N.overflowY==="scroll"||N.overflowY==="visible")):(w=y<S&&(N.overflowX==="auto"||N.overflowX==="scroll"),k=C<M&&(N.overflowY==="auto"||N.overflowY==="scroll"));var W=w&&(Math.abs(x-r)<=i&&P+y<S)-(Math.abs(b-r)<=i&&!!P),T=k&&(Math.abs(_-a)<=i&&O+C<M)-(Math.abs(u-a)<=i&&!!O);if(!oe[f])for(var H=0;H<=f;H++)oe[H]||(oe[H]={});(oe[f].vx!=W||oe[f].vy!=T||oe[f].el!==p)&&(oe[f].el=p,oe[f].vx=W,oe[f].vy=T,clearInterval(oe[f].pid),(W!=0||T!=0)&&(c=!0,oe[f].pid=setInterval((function(){l&&this.layer===0&&$.active._onTouchMove(zt);var K=oe[this.layer].vy?oe[this.layer].vy*s:0,ae=oe[this.layer].vx?oe[this.layer].vx*s:0;typeof m=="function"&&m.call($.dragged.parentNode[ce],ae,K,o,zt,oe[this.layer].el)!=="continue"||Co(oe[this.layer].el,ae,K)}).bind({layer:f}),24))),f++}while(n.bubbleScroll&&h!==d&&(h=$e(h,!1)));Qt=c}},30),To=function(n){var t=n.originalEvent,l=n.putSortable,r=n.dragEl,a=n.activeSortable,i=n.dispatchSortableEvent,s=n.hideGhostForTarget,d=n.unhideGhostForTarget;if(t){var c=l||a;s();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(m.clientX,m.clientY);d(),c&&!c.el.contains(f)&&(i("spill"),this.onSpill({dragEl:r,putSortable:l}))}};function oo(){}oo.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=Ge(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:To},ye(oo,{pluginName:"revertOnSpill"});function no(){}no.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:To},ye(no,{pluginName:"removeOnSpill"});var Ce;function j3(){function o(){this.defaults={swapClass:"sortable-swap-highlight"}}return o.prototype={dragStart:function(t){var l=t.dragEl;Ce=l},dragOverValid:function(t){var l=t.completed,r=t.target,a=t.onMove,i=t.activeSortable,s=t.changed,d=t.cancel;if(i.options.swap){var c=this.sortable.el,m=this.options;if(r&&r!==c){var f=Ce;a(r)!==!1?(J(r,m.swapClass,!0),Ce=r):Ce=null,f&&f!==Ce&&J(f,m.swapClass,!1)}s(),l(!0),d()}},drop:function(t){var l=t.activeSortable,r=t.putSortable,a=t.dragEl,i=r||this.sortable,s=this.options;Ce&&J(Ce,s.swapClass,!1),Ce&&(s.swap||r&&r.options.swap)&&a!==Ce&&(i.captureAnimationState(),i!==l&&l.captureAnimationState(),G3(a,Ce),i.animateAll(),i!==l&&l.animateAll())},nulling:function(){Ce=null}},ye(o,{pluginName:"swap",eventProperties:function(){return{swapItem:Ce}}})}function G3(o,n){var t=o.parentNode,l=n.parentNode,r,a;!t||!l||t.isEqualNode(n)||l.isEqualNode(o)||(r=ee(o),a=ee(n),t.isEqualNode(l)&&r<a&&a++,t.insertBefore(n,t.children[r]),l.insertBefore(o,l.children[a]))}var A=[],we=[],ct,ke,dt=!1,he=!1,Je=!1,j,pt,Tt;function W3(){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?R(document,"pointerup",this._deselectMultiDrag):(R(document,"mouseup",this._deselectMultiDrag),R(document,"touchend",this._deselectMultiDrag))),R(document,"keydown",this._checkKeyDown),R(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(r,a){var i="";A.length&&ke===n?A.forEach(function(s,d){i+=(d?", ":"")+s.textContent}):i=a.textContent,r.setData("Text",i)}}}return o.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var l=t.dragEl;j=l},delayEnded:function(){this.isMultiDrag=~A.indexOf(j)},setupClone:function(t){var l=t.sortable,r=t.cancel;if(this.isMultiDrag){for(var a=0;a<A.length;a++)we.push(Ht(A[a])),we[a].sortableIndex=A[a].sortableIndex,we[a].draggable=!1,we[a].style["will-change"]="",J(we[a],this.options.selectedClass,!1),A[a]===j&&J(we[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||A.length&&ke===l&&(Io(!0,r),a("clone"),i()))},showClone:function(t){var l=t.cloneNowShown,r=t.rootEl,a=t.cancel;this.isMultiDrag&&(Io(!1,r),we.forEach(function(i){D(i,"display","")}),l(),Tt=!1,a())},hideClone:function(t){var l=this;t.sortable;var r=t.cloneNowHidden,a=t.cancel;this.isMultiDrag&&(we.forEach(function(i){D(i,"display","none"),l.options.removeCloneOnHide&&i.parentNode&&i.parentNode.removeChild(i)}),r(),Tt=!0,a())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&ke&&ke.multiDrag._deselectMultiDrag(),A.forEach(function(l){l.sortableIndex=ee(l)}),A=A.sort(function(l,r){return l.sortableIndex-r.sortableIndex}),Je=!0},dragStarted:function(t){var l=this,r=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(r.captureAnimationState(),this.options.animation)){A.forEach(function(i){i!==j&&D(i,"position","absolute")});var a=G(j,!1,!0,!0);A.forEach(function(i){i!==j&&Vo(i,a)}),he=!0,dt=!0}r.animateAll(function(){he=!1,dt=!1,l.options.animation&&A.forEach(function(i){qt(i)}),l.options.sort&&It()})}},dragOver:function(t){var l=t.target,r=t.completed,a=t.cancel;he&&~A.indexOf(l)&&(r(!1),a())},revert:function(t){var l=t.fromSortable,r=t.rootEl,a=t.sortable,i=t.dragRect;A.length>1&&(A.forEach(function(s){a.addAnimationState({target:s,rect:he?G(s):i}),qt(s),s.fromRect=i,l.removeAnimationState(s)}),he=!1,X3(!this.options.removeCloneOnHide,r))},dragOverCompleted:function(t){var l=t.sortable,r=t.isOwner,a=t.insertion,i=t.activeSortable,s=t.parentEl,d=t.putSortable,c=this.options;if(a){if(r&&i._hideClone(),dt=!1,c.animation&&A.length>1&&(he||!r&&!i.options.sort&&!d)){var m=G(j,!1,!0,!0);A.forEach(function(h){h!==j&&(Vo(h,m),s.appendChild(h))}),he=!0}if(!r)if(he||It(),A.length>1){var f=Tt;i._showClone(l),i.options.animation&&!Tt&&f&&we.forEach(function(h){i.addAnimationState({target:h,rect:pt}),h.fromRect=pt,h.thisAnimationDuration=null})}else i._showClone(l)}},dragOverAnimationCapture:function(t){var l=t.dragRect,r=t.isOwner,a=t.activeSortable;if(A.forEach(function(s){s.thisAnimationDuration=null}),a.options.animation&&!r&&a.multiDrag.isMultiDrag){pt=ye({},l);var i=Oe(j,!0);pt.top-=i.f,pt.left-=i.e}},dragOverAnimationComplete:function(){he&&(he=!1,It())},drop:function(t){var l=t.originalEvent,r=t.rootEl,a=t.parentEl,i=t.sortable,s=t.dispatchSortableEvent,d=t.oldIndex,c=t.putSortable,m=c||this.sortable;if(l){var f=this.options,h=a.children;if(!Je)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),J(j,f.selectedClass,!~A.indexOf(j)),~A.indexOf(j))A.splice(A.indexOf(j),1),ct=null,ot({sortable:i,rootEl:r,name:"deselect",targetEl:j,originalEvent:l});else{if(A.push(j),ot({sortable:i,rootEl:r,name:"select",targetEl:j,originalEvent:l}),l.shiftKey&&ct&&i.el.contains(ct)){var p=ee(ct),g=ee(j);if(~p&&~g&&p!==g){var u,_;for(g>p?(_=p,u=g):(_=g,u=p+1);_<u;_++)~A.indexOf(h[_])||(J(h[_],f.selectedClass,!0),A.push(h[_]),ot({sortable:i,rootEl:r,name:"select",targetEl:h[_],originalEvent:l}))}}else ct=j;ke=m}if(Je&&this.isMultiDrag){if(he=!1,(a[ce].options.sort||a!==r)&&A.length>1){var b=G(j),x=ee(j,":not(."+this.options.selectedClass+")");if(!dt&&f.animation&&(j.thisAnimationDuration=null),m.captureAnimationState(),!dt&&(f.animation&&(j.fromRect=b,A.forEach(function(C){if(C.thisAnimationDuration=null,C!==j){var w=he?G(C):b;C.fromRect=w,m.addAnimationState({target:C,rect:w})}})),It(),A.forEach(function(C){h[x]?a.insertBefore(C,h[x]):a.appendChild(C),x++}),d===ee(j))){var y=!1;A.forEach(function(C){if(C.sortableIndex!==ee(C)){y=!0;return}}),y&&(s("update"),s("sort"))}A.forEach(function(C){qt(C)}),m.animateAll()}ke=m}(r===a||c&&c.lastPutMode!=="clone")&&we.forEach(function(C){C.parentNode&&C.parentNode.removeChild(C)})}},nullingGlobal:function(){this.isMultiDrag=Je=!1,we.length=0},destroyGlobal:function(){this._deselectMultiDrag(),F(document,"pointerup",this._deselectMultiDrag),F(document,"mouseup",this._deselectMultiDrag),F(document,"touchend",this._deselectMultiDrag),F(document,"keydown",this._checkKeyDown),F(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(typeof Je<"u"&&Je)&&ke===this.sortable&&!(t&&be(t.target,this.options.draggable,this.sortable.el,!1))&&!(t&&t.button!==0))for(;A.length;){var l=A[0];J(l,this.options.selectedClass,!1),A.shift(),ot({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)}},ye(o,{pluginName:"multiDrag",utils:{select:function(t){var l=t.parentNode[ce];!l||!l.options.multiDrag||~A.indexOf(t)||(ke&&ke!==l&&(ke.multiDrag._deselectMultiDrag(),ke=l),J(t,l.options.selectedClass,!0),A.push(t))},deselect:function(t){var l=t.parentNode[ce],r=A.indexOf(t);!l||!l.options.multiDrag||!~r||(J(t,l.options.selectedClass,!1),A.splice(r,1))}},eventProperties:function(){var t=this,l=[],r=[];return A.forEach(function(a){l.push({multiDragElement:a,index:a.sortableIndex});var i;he&&a!==j?i=-1:he?i=ee(a,":not(."+t.options.selectedClass+")"):i=ee(a),r.push({multiDragElement:a,index:i})}),{items:_3(A),clones:[].concat(we),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 X3(o,n){A.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function Io(o,n){we.forEach(function(t,l){var r=n.children[t.sortableIndex+(o?Number(l):0)];r?n.insertBefore(t,r):n.appendChild(t)})}function It(){A.forEach(function(o){o!==j&&o.parentNode&&o.parentNode.removeChild(o)})}$.mount(new q3),$.mount(no,oo);function Ue(o){o.parentElement!==null&&o.parentElement.removeChild(o)}function mt(o,n,t){const l=t===0?o.children[0]:o.children[t-1].nextSibling;o.insertBefore(n,l)}function Y3(){return typeof window<"u"?window.console:global.console}const K3=Y3();function J3(o){const n=Object.create(null);return function(l){return n[l]||(n[l]=o(l))}}const Z3=/-(\w)/g,Q3=J3(o=>o.replace(Z3,(n,t)=>t.toUpperCase())),Lo=["Start","Add","Remove","Update","End"],Ao=["Choose","Unchoose","Sort","Filter","Clone","Select","Deselect"],Oo=["Move"],v3=[Oo,Lo,Ao].flatMap(o=>o).map(o=>`on${o}`),lo={manage:Oo,manageAndEmit:Lo,emit:Ao};function er(o){return v3.indexOf(o)!==-1}const tr=["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 or(o){return tr.includes(o)}function nr(o){return["transition-group","TransitionGroup"].includes(o)}function Fo(o){return["id","class","role","style"].includes(o)||o.startsWith("data-")||o.startsWith("aria-")||o.startsWith("on")}function Po(o){return o.reduce((n,[t,l])=>(n[t]=l,n),{})}function lr({$attrs:o,componentData:n={}}){return{...Po(Object.entries(o).filter(([l,r])=>Fo(l))),...n}}function rr({$attrs:o,callBackBuilder:n}){const t=Po(Ro(o));Object.entries(n).forEach(([r,a])=>{lo[r].forEach(i=>{t[`on${i}`]=a(i)})});const l=`>[data-draggable]${t.draggable||""}`;return{...t,draggable:l}}function Ro(o){return Object.entries(o).filter(([n,t])=>!Fo(n)).map(([n,t])=>[Q3(n),t]).filter(([n,t])=>!er(n))}const Uo=({el:o})=>o,ar=(o,n)=>o.__draggable_context=n,Ho=o=>o.__draggable_context;class ir{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)=>{ar(Uo(l),{element:t[r],index:r})})}getUnderlyingVm(n){return Ho(n)}getVmIndexFromDomIndex(n,t){const{defaultNodes:l}=this,{length:r}=l,a=t.children,i=a.item(n);if(i===null)return r;const s=Ho(i);if(s)return s.index;if(r===0)return 0;const d=Uo(l[0]),c=[...a].findIndex(m=>m===d);return n<c?0:r}}function sr(o,n){const t=o[n];return t?t():[]}function cr({$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,s]=["header","footer"].map(m=>sr(o,m)),{item:d}=o;if(!d)throw new Error("draggable element must have an item slot");const c=a.flatMap((m,f)=>d({element:m,index:f}).map(h=>{h.key=t(m);const p=r==null?void 0:r(m);return p?h.props={...h.props||{},"data-draggable":!0,...p}:h.props={...h.props||{},"data-draggable":!0},h}));if(c.length!==a.length)throw new Error("Item slot must have only one child");return{header:i,footer:s,default:c}}function dr(o){const n=nr(o),t=!or(o)&&!n;return{transition:n,externalComponent:t,tag:t?e.resolveComponent(o):n?e.TransitionGroup:o}}function pr({$slots:o,tag:n,realList:t,getKey:l,itemDataSet:r}){const a=cr({$slots:o,realList:t,getKey:l,itemDataSet:r}),i=dr(n);return new ir({nodes:a,root:i,realList:t})}function qo(o,n){e.nextTick(()=>this.$emit(o.toLowerCase(),n))}function jo(o){return(n,t)=>{if(this.realList!==null)return this[`onDrag${o}`](n,t)}}function mr(o){const n=jo.call(this,o);return(t,l)=>{n.call(this,t,l),qo.call(this,o,t)}}function ro(o,n){const t=new $(o,n);return n.swap&&!t.swap?($.mount(new j3),t.destroy(),ro(o,n)):n.multiDrag&&!t.multiDrag?($.mount(new W3),t.destroy(),ro(o,n)):t}function fr(o,n){return Array.from(o).reverse().map(({index:t})=>t-n)}let ao=null;const hr={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}},ur=["update:modelValue","change",...[...lo.manageAndEmit,...lo.emit].map(o=>o.toLowerCase())],ft=e.defineComponent({name:"draggable",inheritAttrs:!1,props:hr,emits:ur,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:o,$attrs:n,tag:t,componentData:l,realList:r,getKey:a}=this,i=pr({$slots:o,tag:t,realList:r,getKey:a,itemDataSet:n.itemDataSet});this.componentStructure=i;const s=lr({$attrs:n,componentData:l});return i.render(e.h,s)}catch(o){return this.error=!0,e.h("pre",{style:{color:"red"}},o.stack)}},created(){this.list!==null&&this.modelValue!==null&&K3.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=rr({$attrs:o,callBackBuilder:{manageAndEmit:a=>mr.call(this,a),emit:a=>qo.bind(this,a),manage:a=>jo.call(this,a)}}),r=n.nodeType===1?n:n.parentElement;this._sortable=ro(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&&Ro(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),ao=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=>Ue(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;Ue(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 s=i.to.__draggable_component__;s.onDragStart(i),s.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})=>{mt(this.$el,a,i),a.parentNode&&$.utils.deselect(a)}),o.pullMode==="clone"){o.clones.forEach(a=>Ue(a));return}const l=fr(t,n);this.removeAllFromList(l);const r=l.sort().map(a=>({element:this.multidragContexts.find(s=>s.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(mt(this.$el,o.item,o.oldIndex),o.pullMode==="clone"){Ue(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(d=>Ue(d));const r=Array.from(o.oldIndicies).sort(({index:d},{index:c})=>d-c);r.forEach(d=>mt(t,d.multiDragElement,d.index));const a=r.map(({index:d})=>d-l),i=this.getVmIndexFromDomIndex(o.newIndex);this.updatePositions(Array.from(a),i);const s=a.map((d,c)=>({element:this.multidragContexts.find(f=>f.index===d).element,oldIndex:d,newIndex:i+c}));this.emitChanges({moved:s})},onDragUpdateSingle(o){const n=this._sortable.options&&this._sortable.options.swap,t=n?o.from.children[o.oldIndex]:null;Ue(o.item),mt(o.from,o.item,o.oldIndex),n&&(Ue(t),mt(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(ao)!==-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},s={...o,relatedContext:r,draggedContext:i};return t(s,n)},onDragEnd(){ao=null},select(o){$.utils.select(o)},deselect(o){$.utils.deselect(o)}}}),{getTempID:gr}=se();let De=class{constructor(n,t,l=!1,r=!1){ge(this,"isEdit");ge(this,"isInput");ge(this,"type");ge(this,"name");ge(this,"id");ge(this,"itemID");ge(this,"itemSourceType");ge(this,"rules");ge(this,"props");ge(this,"excludeFilterConditions");ge(this,"filterConditionProps");ge(this,"isLayout",!1);ge(this,"children");this.type=n,this.name=t,this.isEdit=l,this.isInput=r,this.id=gr(),this.props={},this.rules=[{message:"必填项",required:!1}],this.excludeFilterConditions=[],this.filterConditionProps=void 0,this.isLayout=!1,this.children=void 0}};const _r=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"),s=e.resolveComponent("el-switch"),d=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),m=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]=h=>e.unref(t).backgroundColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"显示边框"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).showBorder,"onUpdate:modelValue":r[1]||(r[1]=h=>e.unref(t).showBorder=h)},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(c,{class:"file-size-unit-select",modelValue:e.unref(t).borderStyle,"onUpdate:modelValue":r[2]||(r[2]=h=>e.unref(t).borderStyle=h)},{default:e.withCtx(()=>[e.createVNode(d,{label:"实线边框",value:"solid"}),e.createVNode(d,{label:"虚线边框",value:"dashed"}),e.createVNode(d,{label:"点线边框",value:"dotted"}),e.createVNode(d,{label:"双线边框",value:"double"}),e.createVNode(d,{label:"凹槽边框",value:"groove"}),e.createVNode(d,{label:"脊状边框",value:"ridge"}),e.createVNode(d,{label:"内凹边框",value:"inset"}),e.createVNode(d,{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]=h=>e.unref(t).borderColor=h)},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框宽度"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).borderWidth,"onUpdate:modelValue":r[4]||(r[4]=h=>e.unref(t).borderWidth=h),step:1,min:1,max:20},null,8,["modelValue"])]),_:1}),e.createVNode(i,{label:"边框圆角"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).borderRadius,"onUpdate:modelValue":r[5]||(r[5]=h=>e.unref(t).borderRadius=h),step:1,min:0,max:100},null,8,["modelValue"])]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),us="",wr=["onClick"],yr={key:2,class:"operates"},Go=e.defineComponent({__name:"componentDesigner",props:{components:{type:Array,required:!0}},emits:["update:components","deleteComponent"],setup(o,{emit:n}){const t={...ut,..._t,...gt},{getTempID:l,clone:r}=se();let a=e.inject("formData"),i=e.inject("formDesignerData");const s=o,{components:d}=e.toRefs(s),c=n;e.watch(d,()=>c("update:components",d),{immediate:!0,deep:!0});const m=u=>{u.added?f(u.added.element):u.moved&&f(u.moved.element)},f=u=>{i.selectComponent=void 0,e.nextTick(()=>i.selectComponent=u)},h=u=>{const _=p(u);d.value.push(_),f(_)},p=u=>{var b,x;let _=r(u);if(_.id=l(),delete _.itemID,(b=_.props.options)!=null&&b.length){_.props.options.forEach(C=>{C.value.includes("temp-")&&(C.value=l())});let y=new t[u.type].component;_.filterConditionProps=y.getFilterConditionProps(_.props)}if(_.isLayout&&((x=_.children)!=null&&x.length)){let y=[];_.children.forEach(C=>{y.push(p(C))}),_.children=y}return _},g=u=>{let _=r(d.value[u]);d.value.splice(u,1),i.selectComponent=void 0,c("deleteComponent",_)};return(u,_)=>{const b=e.resolveComponent("el-form-item"),x=v;return e.openBlock(),e.createBlock(e.unref(ft),{list:e.unref(d),"item-key":"id",class:"form-draggable",sort:!0,group:{name:"component",pull:!0,put:!0},onChange:m},{item:e.withCtx(({element:y,index:C})=>[e.createElementVNode("div",{onClick:e.withModifiers(w=>f(y),["stop"]),class:e.normalizeClass(["form-item-wrap",{"is-selected":e.unref(i).selectComponent==y},{"is-hidden":!y.props.showFlag}]),style:e.normalizeStyle({width:`${y.props.width*100/e.unref(a).props.column}%`,"padding-left":`${y.props.paddingLeft}px`})},[y.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[y.type].renderer),{key:0,isDesigner:"",componentID:y.id,component:e.unref(d)[C],"onUpdate:component":w=>e.unref(d)[C]=w,onDeleteComponent:_[0]||(_[0]=w=>c("deleteComponent",w))},null,40,["componentID","component","onUpdate:component"])):(e.openBlock(),e.createBlock(b,{key:1,prop:y.id,class:e.normalizeClass(["form-item",{"label-new-line":y.props.labelNewLine}]),"label-width":y.props.showLabel?y.props.labelWidth:"0",rules:y.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:y.props.color||"#000000","font-size":y.props.fontSize+"px","font-weight":y.props.isBold?"bold":"normal"})},e.toDisplayString(y.props.showLabel?y.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[y.type].renderer),{isDesigner:"",componentID:y.id,componentProps:y.props,"onUpdate:componentProps":w=>y.props=w,datas:e.unref(a).datas,"onUpdate:datas":_[1]||(_[1]=w=>e.unref(a).datas=w)},null,40,["componentID","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["prop","class","label-width","rules"])),e.unref(i).selectComponent==y?(e.openBlock(),e.createElementBlock("div",yr,[y.allowRepeat?(e.openBlock(),e.createBlock(x,{key:0,name:"copy",color:"#0000ff",onClick:e.withModifiers(w=>h(y),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(x,{name:"delete",color:"#ff0000",onClick:e.withModifiers(w=>g(C),["stop"])},null,8,["onClick"])])):e.createCommentVNode("",!0)],14,wr)]),_:1},8,["list"])}}}),gs="",br=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"],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 d={"background-color":l.value.props.backgroundColor||""};return l.value.props.showBorder&&(d.border=`${l.value.props.borderWidth}px ${l.value.props.borderStyle} ${l.value.props.borderColor}`),l.value.props.borderRadius&&(d["border-radius"]=`${l.value.props.borderRadius}px`),d}),i=n,s=d=>{i("deleteComponent",d)};return(d,c)=>(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(Go,{key:1,components:e.unref(l).children,"onUpdate:components":c[0]||(c[0]=m=>e.unref(l).children=m),onDeleteComponent:s},null,8,["components"])):(e.openBlock(),e.createBlock(Ko,{key:2,components:e.unref(l).children,showDescription:e.unref(r)},null,8,["components","showDescription"]))],6))}}),_s="",Cr={component:class extends De{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:br,propEditor:_r},Vr=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"),s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-input-number"),c=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(s,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=p=>e.unref(t).multiple=p)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件数量"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=p=>e.unref(t).fileLimit=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{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]=p=>e.isRef(l)?l.value=p:null),modelModifiers:{number:!0},placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(m,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=p=>e.unref(t).fileSizeUnit=p)},{default:e.withCtx(()=>[e.createVNode(c,{value:"KB"}),e.createVNode(c,{value:"MB"}),e.createVNode(c,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"文件类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).fileType=p),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),ys="",xr={class:"upload-component"},kr=e.createElementVNode("span",{class:"button-text"},"上传文件",-1),Er={key:0,class:"description"},Nr=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}=se(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const d=h=>{if(h.status==="ready"&&!n(h.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!1)){c(h);return}if(h.status==="success"&&h.response.code===0){pe("error",h.response.message||"文件上传失败!"),c(h);return}l.autoUpload?a.value[t.componentID].push({name:h.name,url:h.response.data.url,id:h.response.data.id}):a.value[t.componentID].push({name:h.name,url:h.url,file:h.raw})},c=(h,p=!0)=>{p&&s.value.handleRemove(h);const g=a.value[t.componentID].findIndex(u=>u.url===h.url);g!==-1&&a.value[t.componentID].splice(g,1)},m=h=>{c(h,!1)},f=()=>{var p;let h=`最多只能上传${i.value.fileLimit}个文件`;(p=a.value[t.componentID])!=null&&p.length&&(h+=`,您已上传了${a.value[t.componentID].length}个文件,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个文件`),pe("error",h)};return(h,p)=>{const g=v,u=e.resolveComponent("el-button"),_=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",xr,[e.createVNode(_,{ref_key:"uploadRef",ref:s,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":d,"on-remove":m},{default:e.withCtx(()=>{var b;return[e.unref(i).fileLimit>(((b=e.unref(a)[o.componentID])==null?void 0:b.length)||0)?(e.openBlock(),e.createBlock(u,{key:0,size:"large",color:"#409eff"},{icon:e.withCtx(()=>[e.createVNode(g,{name:"upload",color:"#ffffff"})]),default:e.withCtx(()=>[kr]),_: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",Er,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),bs="",Br={component:class extends De{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:Nr,propEditor:Vr},Dr=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"),s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-input-number"),c=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),f=e.resolveComponent("el-input"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":",class:"upload-props-editor"},{default:e.withCtx(()=>[e.createVNode(s,{label:"允许多选"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[0]||(a[0]=p=>e.unref(t).multiple=p)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片数量"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).fileLimit,"onUpdate:modelValue":a[1]||(a[1]=p=>e.unref(t).fileLimit=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(s,{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]=p=>e.isRef(l)?l.value=p:null),placeholder:"文件大小,0为不限"},{append:e.withCtx(()=>[e.createVNode(m,{class:"file-size-unit-select",modelValue:e.unref(t).fileSizeUnit,"onUpdate:modelValue":a[2]||(a[2]=p=>e.unref(t).fileSizeUnit=p),modelModifiers:{number:!0}},{default:e.withCtx(()=>[e.createVNode(c,{value:"KB"}),e.createVNode(c,{value:"MB"}),e.createVNode(c,{value:"GB"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),e.createVNode(s,{label:"图片类型"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).fileType,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).fileType=p),autosize:{minRows:2,maxRows:4},type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})}}}),Vs="",Sr={class:"upload-image-component"},Mr={class:"el-upload-list__item-actions"},zr={class:"el-upload-list__item-preview"},$r={class:"el-upload-list__item-delete"},Tr={key:0,class:"description"},Ir=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}=se(),t=o;let l=e.inject("uploadOptions"),r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref(),d=e.ref();a.value[t.componentID]||(a.value[t.componentID]=[]);const c=p=>{if(p.status==="ready"&&!n(p.raw,a.value[t.componentID],i.value.fileSize,i.value.fileSizeUnit,!0)){m(p);return}if(p.status==="success"&&p.response.code===0){pe("error",p.response.message||"图片上传失败!"),m(p);return}l.autoUpload?a.value[t.componentID].push({name:p.name,url:p.response.data.url,id:p.response.data.id}):a.value[t.componentID].push({name:p.name,url:p.url,file:p.raw})},m=p=>{s.value.handleRemove(p);const g=a.value[t.componentID].findIndex(u=>u.url===p.url);g!==-1&&a.value[t.componentID].splice(g,1)},f=()=>{d.value.$el.children[0].click()},h=()=>{var g;let p=`最多只能上传${i.value.fileLimit}个图片`;(g=a.value[t.componentID])!=null&&g.length&&(p+=`,您已上传了${a.value[t.componentID].length}个图片,最多还能选择${i.value.fileLimit-a.value[t.componentID].length}个图片`),pe("error",p)};return(p,g)=>{var x;const u=v,_=e.resolveComponent("el-image"),b=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",Sr,[e.createVNode(b,{ref_key:"uploadImageRef",ref:s,class:e.normalizeClass({"hidden-trigger":e.unref(i).fileLimit<=(((x=e.unref(a)[o.componentID])==null?void 0:x.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":c,"on-exceed":h},{trigger:e.withCtx(()=>[e.createVNode(u,{name:"add",size:"30"})]),file:e.withCtx(({file:y})=>[e.createVNode(_,{ref_key:"imageRef",ref:d,style:{width:"100px",height:"100px"},src:y.url,"preview-src-list":[y.url],fit:"cover"},null,8,["src","preview-src-list"]),e.createElementVNode("span",Mr,[e.createElementVNode("span",zr,[e.createVNode(u,{name:"previewImage",color:"#00ff00",onClick:f})]),e.createElementVNode("span",$r,[e.createVNode(u,{name:"delete",color:"#ff0000",onClick:C=>m(y)},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",Tr,[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)])}}}),xs="",Lr={component:class extends De{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:Ir,propEditor:Dr};function Lt(o){return typeof o=="function"?o():e.unref(o)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ar=o=>typeof o<"u",Wo=()=>{};function Or(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 Fr(o,n={}){let t,l,r=Wo;const a=s=>{clearTimeout(s),r(),r=Wo};return s=>{const d=Lt(o),c=Lt(n.maxWait);return t&&a(t),d<=0||c!==void 0&&c<=0?(l&&(a(l),l=null),Promise.resolve(s())):new Promise((m,f)=>{r=n.rejectOnCancel?f:m,c&&!l&&(l=setTimeout(()=>{t&&a(t),l=null,m(s())},c)),t=setTimeout(()=>{l&&a(l),l=null,m(s())},d)})}}function Pr(o,n=200,t={}){return Or(Fr(n,t),o)}function Rr(o,n){return e.computed(()=>Lt(o).map(t=>Lt(t)).filter(n))}function Ur(o){return JSON.parse(JSON.stringify(o))}function Hr(o,n,t,l={}){var r,a,i;const{clone:s=!1,passive:d=!1,eventName:c,deep:m=!1,defaultValue:f,shouldEmit:h}=l,p=e.getCurrentInstance(),g=t||(p==null?void 0:p.emit)||((r=p==null?void 0:p.$emit)==null?void 0:r.bind(p))||((i=(a=p==null?void 0:p.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(p==null?void 0:p.proxy));let u=c;n||(n="modelValue"),u=u||`update:${n.toString()}`;const _=y=>s?typeof s=="function"?s(y):Ur(y):y,b=()=>Ar(o[n])?_(o[n]):f,x=y=>{h?h(y)&&g(u,y):g(u,y)};if(d){const y=b(),C=e.ref(y);let w=!1;return e.watch(()=>o[n],k=>{w||(w=!0,C.value=_(k),e.nextTick(()=>w=!1))}),e.watch(C,k=>{!w&&(k!==o[n]||m)&&x(k)},{deep:m}),C}else return e.computed({get(){return b()},set(y){x(y)}})}const qr={class:"option-wrap"},jr={style:{float:"left"}},Gr={style:{float:"right",color:"#8492a6"}},Wr=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=h=>{t.options.splice(h,1)},s=e.ref(!1);let d=e.ref(t.options);const c=Pr(async h=>await n.selectComponent.searchEmployeeMethod(h),500),m=h=>{if(!h)return[];s.value=!0,c(h).then(p=>{d.value=p,s.value=!1})},f=(h,p)=>{const g=d.value.find(u=>u.value===h);t.options[p]={label:g==null?void 0:g.label,value:g==null?void 0:g.value},d.value=t.options};return(h,p)=>{const g=e.resolveComponent("el-radio-button"),u=e.resolveComponent("el-radio-group"),_=e.resolveComponent("el-form-item"),b=e.resolveComponent("el-switch"),x=e.resolveComponent("el-input-number"),y=e.resolveComponent("el-divider"),C=v,w=e.resolveComponent("el-option"),k=e.resolveComponent("el-select"),S=e.resolveComponent("el-button"),M=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(M,{"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":p[0]||(p[0]=N=>e.unref(t).type=N),onChange:r},{default:e.withCtx(()=>[e.createVNode(g,{value:"radio"},{default:e.withCtx(()=>[e.createTextVNode("单选")]),_:1}),e.createVNode(g,{value:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode("多选")]),_:1}),e.createVNode(g,{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(b,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":p[1]||(p[1]=N=>e.unref(t).newLine=N)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(_,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":p[2]||(p[2]=N=>e.unref(t).multiple=N)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(_,{label:"最少选择"},{default:e.withCtx(()=>{var N;return[e.createVNode(x,{modelValue:e.unref(t).min,"onUpdate:modelValue":p[3]||(p[3]=P=>e.unref(t).min=P),step:1,min:0,max:((N=e.unref(l))==null?void 0:N.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(_,{label:"最多选择"},{default:e.withCtx(()=>{var N;return[e.createVNode(x,{modelValue:e.unref(t).max,"onUpdate:modelValue":p[4]||(p[4]=P=>e.unref(t).max=P),step:1,min:0,max:((N=e.unref(l))==null?void 0:N.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0),e.createVNode(y,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(_,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{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:N,index:P})=>[e.createElementVNode("div",qr,[e.unref(t).options.length>1?(e.openBlock(),e.createBlock(C,{key:0,name:"move",color:"#ff0000",size:"16px",class:"cursor-move"})):e.createCommentVNode("",!0),e.createVNode(k,{class:"selector-component",modelValue:N.value,"onUpdate:modelValue":O=>N.value=O,filterable:"",placeholder:"检索人员",disabled:!e.unref(n).selectComponent.allowModify,remote:"","remote-method":m,loading:e.unref(s),"loading-text":"加载中……",onChange:O=>f(O,P)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(O,W)=>(e.openBlock(),e.createBlock(w,{key:W,label:O.label,value:O.value},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"option",{index:W,label:O.label,suffix:O.suffix},()=>[e.createElementVNode("span",jr,e.toDisplayString(O.label),1),e.createElementVNode("span",Gr,e.toDisplayString(O.suffix),1)])]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","loading","onChange"]),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(C,{key:1,name:"delete",color:"#ff0000",size:"16px",onClick:O=>i(P)},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(S,{class:"add-option-item",text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(C,{name:"plus",color:"#08c979",size:"16px"}),e.createTextVNode(" 添加 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:3})}}}),Es="",Xr={class:"employee-component"},Yr={key:3,class:"description"},Kr=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,m=>m?r.value[t.componentID]=m:delete r.value[t.componentID]);const s=n;e.watch(r,m=>s("update:datas",m));const d=e.ref(!0);e.watch(a,m=>{d.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),d.value=!0}),s("update:componentProps",m)},{immediate:!0});const c=(m,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,m.preventDefault())};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),b=e.resolveComponent("el-select"),x=v;return e.openBlock(),e.createElementBlock("div",Xr,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(p,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=y=>e.isRef(i)?i.value=y:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(y,C)=>(e.openBlock(),e.createBlock(h,{key:C,value:y.value,onClick:w=>c(w,y.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.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]=y=>e.isRef(i)?i.value=y: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,(y,C)=>(e.openBlock(),e.createBlock(g,{value:y.value,key:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.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(b,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=y=>e.isRef(i)?i.value=y:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(y,C)=>(e.openBlock(),e.createBlock(_,{key:C,label:y.label,value:y.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",Yr,[e.createVNode(x,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ns="",Jr={component:class extends De{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:Kr,propEditor:Wr};function io(){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 Zr=e.defineComponent({__name:"propsEditor",setup(o){let n=e.inject("formDesignerData"),t=n.selectComponent.props;const{getGradeItems:l}=io(),r=e.ref([]);return e.watch(t,()=>{r.value=l(t),n.selectComponent.filterConditionProps.options=r.value},{immediate:!0}),(a,i)=>{const s=e.resolveComponent("el-option"),d=e.resolveComponent("el-select"),c=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-input-number"),f=e.resolveComponent("el-switch"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{"label-width":"80px","label-suffix":":"},{default:e.withCtx(()=>[e.createVNode(c,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).defaultValue,"onUpdate:modelValue":i[0]||(i[0]=p=>e.unref(t).defaultValue=p),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(p,g)=>(e.openBlock(),e.createBlock(s,{key:g,label:p.label,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{label:"最大分数"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).maxScore,"onUpdate:modelValue":i[1]||(i[1]=p=>e.unref(t).maxScore=p),step:1,min:1},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示0分"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showZero,"onUpdate:modelValue":i[2]||(i[2]=p=>e.unref(t).showZero=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示不考评"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showNotGrade,"onUpdate:modelValue":i[3]||(i[3]=p=>e.unref(t).showNotGrade=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"分数倒序"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).scoreReverseFlag,"onUpdate:modelValue":i[4]||(i[4]=p=>e.unref(t).scoreReverseFlag=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"分数换行"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":i[5]||(i[5]=p=>e.unref(t).newLine=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示问题"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showProblem,"onUpdate:modelValue":i[6]||(i[6]=p=>e.unref(t).showProblem=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示亮点"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showBrightSpot,"onUpdate:modelValue":i[7]||(i[7]=p=>e.unref(t).showBrightSpot=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"显示备注"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showRemark,"onUpdate:modelValue":i[8]||(i[8]=p=>e.unref(t).showRemark=p)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"单项否决"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).showVeto,"onUpdate:modelValue":i[9]||(i[9]=p=>e.unref(t).showVeto=p)},null,8,["modelValue"])]),_:1})]),_:1})}}}),Qr={class:"auto-complete"},vr={key:0},e1=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(p=>({e00bfd70:e.unref(h)}));const t=e.ref(),l=o;let{options:r,width:a}=e.toRefs(l);const i=n,s=Hr(l,"modelValue",i),d=()=>{i("change",s.value)},c=(p,g)=>{const u=p?Rr(r,m(p)):r.value;g(e.unref(u))},m=p=>({start:u=>u.value.toLowerCase().indexOf(p.toLowerCase())===0,random:u=>u.value.indexOf(p)>=0})[l.matchMode],f=e.inject("convertPX"),h=e.computed(()=>`${f(a.value)}px`);return(p,g)=>{const u=e.resolveComponent("el-autocomplete");return e.openBlock(),e.createElementBlock("div",Qr,[o.label?(e.openBlock(),e.createElementBlock("span",vr,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0),e.createVNode(u,{ref_key:"autoCompleteRef",ref:t,modelValue:e.unref(s),"onUpdate:modelValue":g[0]||(g[0]=_=>e.isRef(s)?s.value=_:null),"select-when-unmatched":o.selectWhenUnmatched,"fetch-suggestions":c,"value-key":"value",clearable:"",disabled:o.disabled,onBlur:d},{default:e.withCtx(({item:_})=>[e.createElementVNode("span",null,e.toDisplayString(_.value),1)]),_:1},8,["modelValue","select-when-unmatched","disabled"])])}}}),Ds="",t1={class:"grade-component"},o1={key:3,class:"description"},n1=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}=io();let r=e.inject("formData");const{datas:a,componentProps:i}=e.toRefs(t),s=e.ref(a.value[t.componentID]||{});e.watch(s,f=>{a.value[t.componentID]=f,Object.keys(a.value[t.componentID]||{}).length&&(a.value[t.componentID].maxScore=i.value.maxScore)},{deep:!0});const d=e.computed(()=>l(i.value)),c=n;e.watch(a,f=>c("update:datas",f)),e.watch(i,()=>{t.isDesigner&&(s.value=i.value.defaultValue?{score:i.value.defaultValue}:{})},{immediate:!0,deep:!0});const m=(f,h)=>{i.value.clearable&&s.value.score===h&&(delete s.value.score,f.preventDefault())};return(f,h)=>{const p=e.resolveComponent("el-radio"),g=e.resolveComponent("el-radio-group"),u=e1,_=v;return e.openBlock(),e.createElementBlock("div",t1,[e.createVNode(g,{class:e.normalizeClass(["grade-items",{"new-line":e.unref(i).newLine}]),modelValue:e.unref(s).score,"onUpdate:modelValue":h[0]||(h[0]=b=>e.unref(s).score=b),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(b,x)=>(e.openBlock(),e.createBlock(p,{key:x,value:b.value,onClick:y=>m(y,b.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.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(s).problem,"onUpdate:modelValue":h[1]||(h[1]=b=>e.unref(s).problem=b),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(s).brightSpot,"onUpdate:modelValue":h[2]||(h[2]=b=>e.unref(s).brightSpot=b),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(s).remark,"onUpdate:modelValue":h[3]||(h[3]=b=>e.unref(s).remark=b),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",o1,[e.createVNode(_,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(r).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(i).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ss="",{isEmpty:l1}=se(),{getGradeItems:r1}=io(),a1={component:class extends De{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||l1(l)){r(n.requiredMessage);return}r()}}]}getFilterConditionProps(n){return{type:"selector",options:n&&r1(n)}}getExcludeFilterConditions(){return["INCLUDES","EXCLUDE","RANGE","EMPTY"]}},renderer:n1,propEditor:Zr},i1=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"),s=e.resolveComponent("el-radio-group"),d=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-switch"),m=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(d,{label:"显示类型"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:e.unref(t).type,"onUpdate:modelValue":a[0]||(a[0]=h=>e.unref(t).type=h),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(d,{key:0,label:"岗位换行"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).newLine,"onUpdate:modelValue":a[1]||(a[1]=h=>e.unref(t).newLine=h)},null,8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,label:"是否多选"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:e.unref(t).multiple,"onUpdate:modelValue":a[2]||(a[2]=h=>e.unref(t).multiple=h)},null,8,["modelValue"])]),_:1})),e.unref(t).type==="checkbox"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(d,{label:"最少选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(m,{modelValue:e.unref(t).min,"onUpdate:modelValue":a[3]||(a[3]=p=>e.unref(t).min=p),step:1,min:0,max:((h=e.unref(t).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1}),e.createVNode(d,{label:"最多选择"},{default:e.withCtx(()=>{var h;return[e.createVNode(m,{modelValue:e.unref(t).max,"onUpdate:modelValue":a[4]||(a[4]=p=>e.unref(t).max=p),step:1,min:0,max:((h=e.unref(t).options)==null?void 0:h.length)||0},null,8,["modelValue","max"])]}),_:1})],64)):e.createCommentVNode("",!0)]),_:1})}}}),s1={class:"post-component"},c1={key:3,class:"description"},d1=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,m=>m?r.value[t.componentID]=m:delete r.value[t.componentID]);const s=n;e.watch(r,m=>s("update:datas",m));const d=e.ref(!0);e.watch(a,m=>{d.value=!1,e.nextTick(()=>{a.value.defaultValue=void 0,t.isDesigner&&(i.value=a.value.defaultValue),d.value=!0}),s("update:componentProps",m)},{immediate:!0});const c=(m,f)=>{a.value.clearable&&r.value[t.componentID]===f&&(i.value=void 0,m.preventDefault())};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),_=e.resolveComponent("el-option"),b=e.resolveComponent("el-select"),x=v;return e.openBlock(),e.createElementBlock("div",s1,[e.unref(a).type==="radio"?(e.openBlock(),e.createBlock(p,{key:0,class:e.normalizeClass(["radio-type",{"new-line":e.unref(a).newLine}]),modelValue:e.unref(i),"onUpdate:modelValue":f[0]||(f[0]=y=>e.isRef(i)?i.value=y:null),disabled:o.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(y,C)=>(e.openBlock(),e.createBlock(h,{key:C,value:y.value,onClick:w=>c(w,y.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.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]=y=>e.isRef(i)?i.value=y: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,(y,C)=>(e.openBlock(),e.createBlock(g,{value:y.value,key:C},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.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(b,{key:2,class:"selector-type",modelValue:e.unref(i),"onUpdate:modelValue":f[2]||(f[2]=y=>e.isRef(i)?i.value=y:null),multiple:e.unref(a).multiple,placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(y,C)=>(e.openBlock(),e.createBlock(_,{key:C,label:y.label,value:y.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",c1,[e.createVNode(x,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),zs="",p1={component:class extends De{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:d1,propEditor:i1},m1={class:"dictionary-binder"},f1={class:"item"},h1={class:"label"},u1={key:0,class:"item-souce-type"},so=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}},emits:["update:modelValue","change"],setup(o,{emit:n}){var p;e.useCssVars(g=>({"4f018582":o.height}));let t=e.inject("defaultSourceType");const l=o,r=e.ref(),a=e.ref(l.modelValue),i=(p=l.dictionary)==null?void 0:p.souceTypeMap;r.value=(i==null?void 0:i.keys.length)>1;let s=e.ref([]);const d=g=>{s.value=g?c(g):l.dictionary.dictionaryItems},c=g=>l.dictionary.dictionaryItems.filter(u=>u.label.toLocaleLowerCase().includes(g.toLocaleLowerCase())),m=n,{getTempID:f}=se(),h=g=>{let u=s.value.find(_=>_.value===g);u||(u={value:f(),label:g,itemSourceType:t}),m("update:modelValue",u.label),m("change",u)};return(g,u)=>{var x;const _=e.resolveComponent("el-select-v2"),b=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",m1,[(x=o.dictionary)!=null&&x.dictionaryItems.length?(e.openBlock(),e.createBlock(_,{key:0,modelValue:e.unref(a),"onUpdate:modelValue":u[0]||(u[0]=y=>e.isRef(a)?a.value=y:null),filterable:"","allow-create":"","reserve-keyword":!1,remote:"","remote-method":d,placeholder:o.placeholder,options:e.unref(s),"popper-class":"dictionary-binder-popper",placement:"bottom-end","item-height":o.itemHeight,height:o.itemHeight*8,disabled:o.disabled,onChange:h},{default:e.withCtx(({item:y})=>[e.createElementVNode("div",f1,[e.createElementVNode("span",h1,e.toDisplayString(y.label),1),e.unref(r)?(e.openBlock(),e.createElementBlock("span",u1,e.toDisplayString(e.unref(i).get(y.itemSourceType)),1)):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","placeholder","options","item-height","height","disabled"])):(e.openBlock(),e.createBlock(b,{key:1,modelValue:e.unref(a),"onUpdate:modelValue":u[1]||(u[1]=y=>e.isRef(a)?a.value=y:null),autosize:{minRows:2,maxRows:5},type:"textarea",disabled:o.disabled,onChange:h},null,8,["modelValue","disabled"]))])}}}),Ts="",g1={class:"option-wrap"},_1=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},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}=se(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=d=>{l.options.splice(d,1)},s=(d,c)=>{c.value=d.value,c.itemSourceType=d.itemSourceType};return(d,c)=>{const m=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),h=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-switch"),g=e.resolveComponent("el-input-number"),u=e.resolveComponent("el-divider"),_=v,b=e.resolveComponent("el-checkbox"),x=e.resolveComponent("el-tooltip"),y=e.resolveComponent("el-button"),C=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(C,{"label-width":"80px","label-suffix":":",class:"checkbox-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=w=>e.unref(l).defaultValue=w),multiple:"",clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(w,k)=>(e.openBlock(),e.createBlock(m,{key:k,label:w.label,value:w.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":c[1]||(c[1]=w=>e.unref(l).newLine=w)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"最少选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).min,"onUpdate:modelValue":c[2]||(c[2]=w=>e.unref(l).min=w),step:1,min:0,max:e.unref(l).options.length},null,8,["modelValue","max"])]),_:1}),e.createVNode(h,{label:"最多选择"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(l).max,"onUpdate:modelValue":c[3]||(c[3]=w=>e.unref(l).max=w),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(h,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{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:w,index:k})=>[e.createElementVNode("div",g1,[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(so,{modelValue:w.label,"onUpdate:modelValue":S=>w.label=S,dictionary:o.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:S=>s(S,w)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(x,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(b,{class:"input-enable",modelValue:w.inputEnable,"onUpdate:modelValue":S=>w.inputEnable=S},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:S=>i(k)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(h,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(y,{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})}}}),Is="",w1={class:"checkbox-component"},y1={key:0,class:"description"},b1=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,c=>r.value[t.componentID]=c);const s=n;e.watch(r,c=>s("update:datas",c)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const d=c=>{a.value.options.forEach(m=>{const f=`${t.componentID}||${m.value}`;!c.includes(m.value)&&r.value[f]&&delete r.value[f]})};return(c,m)=>{const f=e.resolveComponent("el-checkbox"),h=e.resolveComponent("el-input"),p=e.resolveComponent("el-checkbox-group"),g=v;return e.openBlock(),e.createElementBlock("div",w1,[e.createVNode(p,{class:e.normalizeClass({"new-line":e.unref(a).newLine}),modelValue:e.unref(i),"onUpdate:modelValue":m[0]||(m[0]=u=>e.isRef(i)?i.value=u:null),disabled:o.disabled,min:e.unref(a).min,max:e.unref(a).max,onChange:d},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(u,_)=>{var b;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||(b=e.unref(i))!=null&&b.includes(u.value))?(e.openBlock(),e.createBlock(h,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${u.value}`],"onUpdate:modelValue":x=>e.unref(r)[`${o.componentID}||${u.value}`]=x},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",y1,[e.createVNode(g,{name:"tip",color:"#ff0000"}),e.createTextVNode(" "+e.toDisplayString(`${e.unref(l).props.formType==="1"?"项目说明":"答案解析"}:${e.unref(a).description||"无"}`),1)])):e.createCommentVNode("",!0)])}}}),Ls="",{getTempID:Xo}=se(),C1={component:class extends De{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:Xo(),label:"选项1"},{value:Xo(),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:b1,propEditor:_1},V1=e.defineComponent({__name:"propsEditor",setup(o){const{computedExpression:n}=se();let t=e.inject("formDesignerData"),l=t.selectComponent.props,r=t.selectComponent.rules;const a=d=>{d&&(r[1].pattern=n(d))},i=d=>{r[1].message=d},s=d=>{d==="text"&&(l.showPassword=!1)};return(d,c)=>{const m=e.resolveComponent("el-input"),f=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-radio-button"),p=e.resolveComponent("el-radio-group"),g=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(m,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=_=>e.unref(l).defaultValue=_),placeholder:"请输入默认值"},null,8,["modelValue"])]),_:1}),e.createVNode(f,{label:"类型"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).type,"onUpdate:modelValue":c[1]||(c[1]=_=>e.unref(l).type=_),onChange:s},{default:e.withCtx(()=>[e.createVNode(h,{value:"text"},{default:e.withCtx(()=>[e.createTextVNode("文本")]),_:1}),e.createVNode(h,{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(g,{modelValue:e.unref(l).showPassword,"onUpdate:modelValue":c[2]||(c[2]=_=>e.unref(l).showPassword=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(f,{label:"正则验证"},{default:e.withCtx(()=>[e.createVNode(m,{onChange:a,modelValue:e.unref(l).pattern,"onUpdate:modelValue":c[3]||(c[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(m,{onChange:i,modelValue:e.unref(l).patternMessage,"onUpdate:modelValue":c[4]||(c[4]=_=>e.unref(l).patternMessage=_)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1})}}}),x1={class:"input-component"},k1={key:0,class:"description"},E1=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,d=>r.value[t.componentID]=d);const s=n;return e.watch(r,d=>s("update:datas",d)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0}),(d,c)=>{const m=e.resolveComponent("el-input"),f=v;return e.openBlock(),e.createElementBlock("div",x1,[e.createVNode(m,{type:e.unref(a).type,"show-password":e.unref(a).showPassword,modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=h=>e.isRef(i)?i.value=h: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",k1,[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)])}}}),Os="",N1={component:class extends De{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:E1,propEditor:V1},B1={component:class extends De{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},D1={class:"option-wrap"},S1=e.defineComponent({__name:"propsEditor",props:{dictionary:{type:Object,default:()=>{}}},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}=se(),a=()=>{l.options.push({label:`选项${l.options.length+1}`,value:r(),itemSourceType:t})},i=d=>{l.options.splice(d,1)},s=(d,c)=>{c.value=d.value,c.itemSourceType=d.itemSourceType};return(d,c)=>{const m=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),h=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-switch"),g=e.resolveComponent("el-divider"),u=v,_=e.resolveComponent("el-checkbox"),b=e.resolveComponent("el-tooltip"),x=e.resolveComponent("el-button"),y=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(y,{"label-width":"80px","label-suffix":":",class:"radio-props-editor"},{default:e.withCtx(()=>[e.createVNode(h,{label:"默认值"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(l).defaultValue,"onUpdate:modelValue":c[0]||(c[0]=C=>e.unref(l).defaultValue=C),clearable:"",placeholder:"请选择默认值"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).options,(C,w)=>(e.openBlock(),e.createBlock(m,{key:w,label:C.label,value:C.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"选项换行"},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:e.unref(l).newLine,"onUpdate:modelValue":c[1]||(c[1]=C=>e.unref(l).newLine=C)},null,8,["modelValue"])]),_:1}),e.createVNode(g,null,{default:e.withCtx(()=>[e.createTextVNode("选项列表")]),_:1}),e.createVNode(h,{"label-width":"0"},{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{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:C,index:w})=>[e.createElementVNode("div",D1,[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(so,{modelValue:C.label,"onUpdate:modelValue":k=>C.label=k,dictionary:o.dictionary,placeholder:"请输入选项","item-height":50,height:"40px",disabled:!e.unref(n).selectComponent.allowModify,onChange:k=>s(k,C)},null,8,["modelValue","onUpdate:modelValue","dictionary","disabled","onChange"]),e.createVNode(b,{effect:"dark",content:"允许填空",placement:"top"},{default:e.withCtx(()=>[e.createVNode(_,{class:"input-enable",modelValue:C.inputEnable,"onUpdate:modelValue":k=>C.inputEnable=k},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:k=>i(w)},null,8,["onClick"])):e.createCommentVNode("",!0)])]),_:1},8,["list"])]),_:1}),e.unref(n).selectComponent.allowModify?(e.openBlock(),e.createBlock(h,{key:0,class:"add-option"},{default:e.withCtx(()=>[e.createVNode(x,{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})}}}),Us="",M1={class:"radio-component"},z1={key:0,class:"description"},$1=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,m=>r.value[t.componentID]=m);const s=n;e.watch(r,m=>s("update:datas",m)),e.watch(a,()=>{t.isDesigner&&(i.value=a.value.defaultValue)},{immediate:!0,deep:!0});const d=m=>{a.value.options.forEach(f=>{const h=`${t.componentID}||${f.value}`;m!==f.value&&r.value[h]&&delete r.value[h]})},c=(m,f)=>{if(a.value.clearable&&i.value===f){i.value=void 0;const h=`${t.componentID}||${f}`;r.value[h]&&delete r.value[h],m.preventDefault()}};return(m,f)=>{const h=e.resolveComponent("el-radio"),p=e.resolveComponent("el-input"),g=e.resolveComponent("el-radio-group"),u=v;return e.openBlock(),e.createElementBlock("div",M1,[e.createVNode(g,{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:d},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).options,(_,b)=>{var x;return e.openBlock(),e.createElementBlock("div",{class:"radio-wrap",key:b},[e.createVNode(h,{value:_.value,onClick:y=>c(y,_.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["value","onClick"]),_.inputEnable&&(o.isDesigner||(x=e.unref(i))!=null&&x.includes(_.value))?(e.openBlock(),e.createBlock(p,{key:0,class:"option-input",modelValue:e.unref(r)[`${o.componentID}||${_.value}`],"onUpdate:modelValue":y=>e.unref(r)[`${o.componentID}||${_.value}`]=y},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",z1,[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)])}}}),Hs="",{getTempID:Yo}=se();class T1 extends De{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:Yo(),label:"选项1"},{value:Yo(),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 I1={component:T1,renderer:$1,propEditor:S1},L1={key:0,class:"component-readonly-mask"},Ko=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={...ut,..._t,...gt},{computedExpression:l}=se();let r=e.inject("formData");const a=o,{components:i,showDescription:s,selectMode:d}=e.toRefs(a),c={show:p=>{if(p.showFlag===void 0)return String(!0);let g="";return p.showFlag?g=p.hiddenConditionExpression?`!(${p.hiddenConditionExpression})`:String(p.showFlag):g=p.showConditionExpression||String(p.showFlag),g},disabled:p=>p.disabledConditionExpression||String(p.disabled===void 0?!1:p.disabled),readonly:p=>p.readonlyConditionExpression||String(p.readonly===void 0?!1:p.readonly)},m=(p,g)=>{var b;let u=c[g](p.props);if(!u)return;["true","false"].includes(u)||u.match(/{(.*?)}/g).forEach(y=>{var S;const C=y.replace(/\{|}/g,"");let w=r.value.datas[C];const k=i.value.find(M=>M.id===C);(k==null?void 0:k.type)==="grade"&&(w=(S=r.value.datas[C])==null?void 0:S.score),u=u.replace(y,w||"")});const _=l(u);if(g==="show"&&!_){let x=[];p.isLayout&&((b=p.children)!=null&&b.length)?x=p.children:x=[p],x.forEach(y=>{r.value.datas[y.id]&&(y.type==="grade"?delete r.value.datas[y.id].score:delete r.value.datas[y.id])})}return _},f=n,h=p=>{f("select",p)};return(p,g)=>{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),(b,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:x},[e.unref(d)||m(b,"show")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-item-wrap",{"select-mode":e.unref(d)},{"is-hidden":!b.props.showFlag},{selected:b.selected}]),style:e.normalizeStyle({width:`${b.props.width*100/e.unref(r).props.column}%`,"padding-left":`${b.props.paddingLeft}px`})},[m(b,"readonly")?(e.openBlock(),e.createElementBlock("div",L1)):e.createCommentVNode("",!0),e.unref(d)?(e.openBlock(),e.createBlock(u,{key:1,class:"select-item",modelValue:b.selected,"onUpdate:modelValue":y=>b.selected=y,label:"选择",onChange:y=>h(b)},null,8,["modelValue","onUpdate:modelValue","onChange"])):e.createCommentVNode("",!0),b.isLayout?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[b.type].renderer),{key:2,componentID:b.id,showDescription:e.unref(s),component:e.unref(i)[x],"onUpdate:component":y=>e.unref(i)[x]=y},null,40,["componentID","showDescription","component","onUpdate:component"])):(e.openBlock(),e.createBlock(_,{key:3,class:e.normalizeClass(["form-item",{"label-new-line":b.props.labelNewLine}]),prop:b.id,"label-width":b.props.showLabel?b.props.labelWidth:"0",rules:b.rules},{label:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:b.props.color||"#000000","font-size":b.props.fontSize+"px","font-weight":b.props.isBold?"bold":"normal"})},e.toDisplayString(b.props.showLabel?b.props.label+":":""),5)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[b.type].renderer),{componentID:b.id,disabled:m(b,"disabled"),showDescription:e.unref(s),componentProps:b.props,"onUpdate:componentProps":y=>b.props=y,datas:e.unref(r).datas,"onUpdate:datas":g[0]||(g[0]=y=>e.unref(r).datas=y)},null,40,["componentID","disabled","showDescription","componentProps","onUpdate:componentProps","datas"]))]),_:2},1032,["class","prop","label-width","rules"]))],6)):e.createCommentVNode("",!0)],64))),128)}}}),qs="",A1={key:0,class:"select-title"},O1=e.createElementVNode("h1",{class:"title"},"请选择项目",-1),F1={key:1,class:"title"},P1={key:0,class:"readonly-mask"},R1={key:2,class:"mobile-key"},U1={name:"zhy-form-renderer"},He=e.defineComponent({...U1,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:()=>[]}},emits:["change","select"],setup(o,{expose:n,emit:t}){const{removeEmptyAttribute:l}=se(),r={...ut,..._t,...gt},a=e.ref(),i=e.ref(!1),s=e.ref(!1),d=e.ref(!1),c=o,m=t,{formData:f,selectMode:h}=e.toRefs(c),p=e.ref(c.selectComponents);e.provide("uploadOptions",c.uploadOptions),e.provide("formData",f);const g=C=>{var w,k,S,M;if((w=p.value)!=null&&w.length||(p.value=[]),!C){p.value=[],f.value.components.forEach(N=>{N.selected=s.value,s.value&&p.value.push(N)}),d.value=!1,m("select",p.value);return}if(C.selected)(k=p.value)==null||k.push(C);else{const N=(S=p.value)==null?void 0:S.findIndex(P=>P.id===C.id);N!==-1&&((M=p.value)==null||M.splice(N,1))}m("select",p.value),u()},u=()=>{var C,w;if(!((C=p.value)!=null&&C.length)){d.value=!1,s.value=!1;return}if(((w=p.value)==null?void 0:w.length)<f.value.components.length){d.value=!0;return}s.value=!0,d.value=!1},_=C=>{C!=null&&C.length&&(C.forEach(w=>{var S,M;let k=new r[w.type].component;k.isEdit&&(w.props.required||w.props.pattern)&&(w.rules=k.getRules(w.props)),c.selectMode&&((S=p.value)!=null&&S.length)&&p.value.findIndex(P=>P.id===w.id)!==-1&&(w.selected=!0),w.isLayout&&((M=w==null?void 0:w.children)!=null&&M.length)&&_(w.children)}),c.selectMode&&u())};e.watch(f,()=>_(f.value.components),{immediate:!0});const b=()=>{let C=l(f.value.datas),w=[],k=[];const S=Object.keys(C);for(let M of S){if(M.includes("||")){let N=M.split("||"),P=N[0],O=N[1],W=w.findIndex(T=>T.id===O&&T.groupID===P);if(W!==-1)w[W].value=C[M];else{const T={parentID:P,id:O,value:C[M]};w.push(T)}continue}x(f.value.components,w,k,M,C)}return{data:w,fileList:k}},x=(C,w,k,S,M)=>{var O;let N,P;for(let W=0;W<C.length;W++){const T=C[W];if(T.id===S){N=T,y(w,k,S,M,N);break}if(T.isLayout&&((O=T==null?void 0:T.children)!=null&&O.length)){if(N=T.children.find(H=>H.id===S),N){P=T.id,y(w,k,S,M,N,P);break}x(T.children,w,k,S,M)}}},y=(C,w,k,S,M,N)=>{var O,W;let P=-1;switch(M.type){case"radio":P=C.findIndex(T=>T.id===S[k]),P===-1&&C.push({groupID:N,parentID:k,id:S[k],value:""});break;case"checkbox":S[k].forEach(T=>{P=C.findIndex(H=>H.id===H),P===-1&&C.push({groupID:N,parentID:k,id:T,value:""})});break;case"upload":case"uploadImage":if(!((O=c.uploadOptions)!=null&&O.autoUpload)&&((W=S[k])!=null&&W.length)){const T=S[k].map(K=>(K.file&&(K.file.id=k),K.file)),H=S[k].map(K=>{if(K.fileID)return K.fileID}).filter(K=>K!==void 0);w.push({id:k,groupID:N,fileIDs:H,files:T})}break;default:C.push({groupID:N,parentID:k,id:k,value:S[k]});break}};return c.watching&&e.watch(()=>f.value.datas,()=>{const C=b();m("change",C.data,C.fileList)},{immediate:!0,deep:!0}),n({getDatas:b,async validate(C=()=>{}){return await a.value.validate(C)},resetFields(){a.value.resetFields()},clearValidate(C){a.value.clearValidate(C)},scrollToField(C){a.value.scrollToField(C)},toggleDescription(){i.value=!i.value}}),(C,w)=>{const k=e.resolveComponent("el-checkbox"),S=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(h)}])},[e.unref(h)?(e.openBlock(),e.createElementBlock("div",A1,[O1,e.createVNode(k,{class:"select-all",modelValue:e.unref(s),"onUpdate:modelValue":w[0]||(w[0]=M=>e.isRef(s)?s.value=M:null),label:"全选",indeterminate:e.unref(d),onChange:w[1]||(w[1]=M=>g())},null,8,["modelValue","indeterminate"])])):e.unref(f).props.formName?(e.openBlock(),e.createElementBlock("h1",F1,e.toDisplayString(e.unref(f).props.formName),1)):e.createCommentVNode("",!0),e.createVNode(S,{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(h)?(e.openBlock(),e.createElementBlock("div",P1)):e.createCommentVNode("",!0),e.createVNode(Ko,{components:e.unref(f).components,showDescription:e.unref(i),selectMode:e.unref(h),onSelect:g},null,8,["components","showDescription","selectMode"])]),_:1},8,["model","label-position","label-width","size","disabled"]),o.device==="mobile"?(e.openBlock(),e.createElementBlock("div",R1)):e.createCommentVNode("",!0)],2)}}}),js="",H1={class:"form-list-wrap"},q1={class:"form-list"},j1=["onClick"],G1=["title"],W1={class:"form-template"},X1={class:"dialog-footer"},Y1={class:"left-wrap"},K1={class:"select-count-wrap"},J1={class:"count"},Z1={class:"right-wrap"},Q1=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 t=e.inject("formData"),l=t.value.props.formType==="2"?"试卷":"表单",r=t.value.props.formType==="2"?"题目":"项目",a=e.useModel(o,"modelValue"),i=o,{params:s}=e.toRefs(i),d=e.ref(""),c=e.ref(""),m=e.ref({datas:{},components:[],props:{}}),f=e.ref(s.value.formList),h=()=>{f.value=s.value.formList,d.value&&(f.value=s.value.formList.filter(M=>M.formName.includes(d.value)))},p=async M=>{c.value!==M&&(c.value=M,m.value={datas:{},components:[],props:{}},s.value.getFormTemplateMethod&&(m.value=await s.value.getFormTemplateMethod(M)))},g=e.ref(new Map),u=e.computed(()=>{let M=0;for(const[,N]of g.value)M+=N.length;return M}),_=M=>{g.value.has(c.value)?M.length?g.value.set(c.value,M):g.value.delete(c.value):g.value.set(c.value,M)},{clone:b}=se(),x=()=>{let M=[];for(const[,N]of g.value)N.forEach(P=>{let O=b(P);delete O.selected,M.push(O)});return M},y=e.ref(!1),C=e.ref({datas:{},components:[],props:{labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:t.value.props.formType}}),w=()=>{C.value.components=x(),y.value=!0},k=n,S=()=>{const M=x();k("select",M),a.value=!1};return(M,N)=>{const P=v,O=e.resolveComponent("el-input"),W=e.resolveComponent("el-empty"),T=He,H=e.resolveComponent("el-link"),K=e.resolveComponent("el-button"),ae=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(ae,{modelValue:a.value,"onUpdate:modelValue":N[2]||(N[2]=le=>a.value=le),class:"batch-add-dialog","destroy-on-close":"",title:`批量添加${e.unref(r)}`},{footer:e.withCtx(()=>[e.createElementVNode("div",X1,[e.createElementVNode("div",Y1,[e.createElementVNode("span",K1,[e.createTextVNode(" 已选 "),e.createElementVNode("span",J1,e.toDisplayString(` ${e.unref(u)} `),1),e.createElementVNode("span",null,e.toDisplayString(` 个${e.unref(r)}`),1)]),e.createVNode(H,{type:"primary",disabled:e.unref(g).size===0,onClick:w},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(`查看已选${e.unref(r)}`),1)]),_:1},8,["disabled"])]),e.createElementVNode("div",Z1,[e.createVNode(K,{onClick:N[1]||(N[1]=le=>a.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1}),e.createVNode(K,{type:"primary",onClick:S},{default:e.withCtx(()=>[e.createTextVNode(" 确定 ")]),_:1})])])]),default:e.withCtx(()=>{var le,ue;return[e.createElementVNode("div",H1,[e.createVNode(O,{modelValue:e.unref(d),"onUpdate:modelValue":N[0]||(N[0]=Ee=>e.isRef(d)?d.value=Ee:null),placeholder:`搜索${e.unref(l)}`,class:"form-name-input",onChange:h},{append:e.withCtx(()=>[e.createVNode(P,{name:"search",color:"#08c979"})]),_:1},8,["modelValue","placeholder"]),e.createElementVNode("div",q1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(Ee,Le)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-item",{selected:e.unref(c)===Ee.formID}]),key:Le,onClick:ze=>p(Ee.formID)},[e.createVNode(P,{name:e.unref(t).props.formType==="1"?"form":"examination",color:e.unref(g).has(Ee.formID)?"#ff7400":"#108bf7"},null,8,["name","color"]),e.createElementVNode("div",{class:"form-item-name",title:Ee.formName},e.toDisplayString(Ee.formName),9,G1)],10,j1))),128))])]),e.createElementVNode("div",W1,[e.unref(c)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(W,{key:0,description:`请先选择左侧${e.unref(l)}`},null,8,["description"])),(ue=(le=e.unref(m))==null?void 0:le.components)!=null&&ue.length?(e.openBlock(),e.createBlock(T,{key:1,formData:e.unref(m),selectMode:"",selectComponents:e.unref(g).get(e.unref(c)),onSelect:_},null,8,["formData","selectComponents"])):e.createCommentVNode("",!0)])]}),_:1},8,["modelValue","title"]),e.createVNode(ae,{modelValue:e.unref(y),"onUpdate:modelValue":N[4]||(N[4]=le=>e.isRef(y)?y.value=le:null),class:"select-preview-dialog","destroy-on-close":"",title:`已选${e.unref(r)}预览`},{footer:e.withCtx(()=>[e.createVNode(K,{onClick:N[3]||(N[3]=le=>y.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("关闭")]),_:1})]),default:e.withCtx(()=>{var le,ue;return[(ue=(le=e.unref(C))==null?void 0:le.components)!=null&&ue.length?(e.openBlock(),e.createBlock(T,{key:0,formData:e.unref(C)},null,8,["formData"])):e.createCommentVNode("",!0)]}),_:1},8,["modelValue","title"])])}}}),Gs="",v1={key:1,class:"tip"},ea=["innerHTML"],At=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),s=e.ref([]),d=e.ref({}),c=e.ref({}),m=()=>{s.value=[],d.value={},c.value={},f(l.value.components),i.value=!0},f=_=>{_.forEach(b=>{var x;if(r.id!==b.id){if(b.isLayout&&((x=b.children)!=null&&x.length)){f(b.children);return}b.isEdit&&(s.value.push({label:b.props.label,id:b.id}),d.value[b.id]=h(b.excludeFilterConditions),c.value[b.id]=b.filterConditionProps)}})},h=_=>Object.keys(filterConditionTypes).filter(x=>!_.includes(x)),p=n,g=()=>{const _=a.value.getFilterData();_.message||(i.value=!1,p("result",_))},u=()=>{p("clear")};return(_,b)=>{const x=e.resolveComponent("el-button"),y=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"condition-input",onClick:m},[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,ea)):(e.openBlock(),e.createElementBlock("span",v1,"单击设置条件"))]),e.createVNode(y,{class:"filter-dialog",modelValue:e.unref(i),"onUpdate:modelValue":b[1]||(b[1]=C=>e.isRef(i)?i.value=C:null),"destroy-on-close":"",title:o.title},{footer:e.withCtx(()=>[e.createVNode(x,{onClick:b[0]||(b[0]=C=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(x,{type:"primary",onClick:g},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})]),default:e.withCtx(()=>[e.createVNode(je,{ref_key:"dynamicFilterRef",ref:a,showStyle:"",items:e.unref(s),conditionTypes:e.unref(d),conditionProps:e.unref(c),defaultValue:o.defaultValue},null,8,["items","conditionTypes","conditionProps","defaultValue"])]),_:1},8,["modelValue","title"])],64)}}}),Ws="",ta=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 s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-switch"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(c,{"label-width":"90px","label-suffix":":"},{default:e.withCtx(()=>[e.unref(t).props.showFlag?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"显示条件"},{default:e.withCtx(()=>[e.createVNode(At,{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]=m=>l(m,"show")),onClear:i[1]||(i[1]=m=>r("show"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).props.showFlag?(e.openBlock(),e.createBlock(s,{key:1,label:"隐藏条件"},{default:e.withCtx(()=>[e.createVNode(At,{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]=m=>l(m,"hidden")),onClear:i[3]||(i[3]=m=>r("hidden"))},null,8,["title","content","defaultValue"])]),_:1})):e.createCommentVNode("",!0),e.unref(t).props.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:2,label:"只读条件"},{default:e.withCtx(()=>[e.createVNode(At,{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]=m=>l(m,"readonly")),onClear:i[5]||(i[5]=m=>r("readonly"))},null,8,["title","content","defaultValue"])]),_:1})),e.unref(t).isEdit?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(s,{label:"参与统计"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.statisticsFlag,"onUpdate:modelValue":i[6]||(i[6]=m=>e.unref(t).props.statisticsFlag=m)},null,8,["modelValue"])]),_:1}),e.unref(t).props.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,label:"禁用条件"},{default:e.withCtx(()=>[e.createVNode(At,{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]=m=>l(m,"disabled")),onClear:i[8]||(i[8]=m=>r("disabled"))},null,8,["title","content","defaultValue"])]),_:1}))],64)):e.createCommentVNode("",!0)]),_:1})}}}),oa=e.defineComponent({__name:"componentBasePropsEditor",props:{dictionary:{type:Object,default:()=>{}}},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},s=()=>{r.props.readonlyConditionContent=void 0,r.props.readonlyConditionExpression=void 0,r.props.readonlyConditions=void 0},d=()=>{r.props.disabledConditionContent=void 0,r.props.disabledConditionExpression=void 0,r.props.disabledConditions=void 0},c=h=>{a[0].required=h},m=h=>{a[0].message=h},f=h=>{typeof h.value!="string"&&(r.itemID=h.value),r.id=h.value,r.itemSourceType=h.itemSourceType};return(h,p)=>{const g=e.resolveComponent("el-switch"),u=e.resolveComponent("el-form-item"),_=e.resolveComponent("el-input-number"),b=e.resolveComponent("el-color-picker"),x=e.resolveComponent("el-slider"),y=e.resolveComponent("el-input"),C=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(C,{"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(g,{modelValue:e.unref(r).props.showLabel,"onUpdate:modelValue":p[0]||(p[0]=w=>e.unref(r).props.showLabel=w)},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(so,{modelValue:e.unref(r).props.label,"onUpdate:modelValue":p[1]||(p[1]=w=>e.unref(r).props.label=w),dictionary:o.dictionary,placeholder:e.unref(r).type==="label"?"标签内容":e.unref(l)==="1"?"请输入标题":"请输入题目","item-height":50,height:"100px",onChange:f},null,8,["modelValue","dictionary","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":p[2]||(p[2]=w=>e.unref(r).props.fontSize=w),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":p[3]||(p[3]=w=>e.unref(r).props.labelWidth=w),min:0},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"标题换行"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.labelNewLine,"onUpdate:modelValue":p[4]||(p[4]=w=>e.unref(r).props.labelNewLine=w)},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(g,{modelValue:e.unref(r).props.isBold,"onUpdate:modelValue":p[5]||(p[5]=w=>e.unref(r).props.isBold=w)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(u,{label:e.unref(r).type==="label"?"字体颜色":e.unref(l)==="1"?"标题颜色":"题目颜色"},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:e.unref(r).props.color,"onUpdate:modelValue":p[6]||(p[6]=w=>e.unref(r).props.color=w)},null,8,["modelValue"])]),_:1},8,["label"])],64)):e.createCommentVNode("",!0),e.createVNode(u,{label:"宽度"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:e.unref(r).props.width,"onUpdate:modelValue":p[7]||(p[7]=w=>e.unref(r).props.width=w),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":p[8]||(p[8]=w=>e.unref(r).props.paddingLeft=w),min:0,max:100},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否显示"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.showFlag,"onUpdate:modelValue":p[9]||(p[9]=w=>e.unref(r).props.showFlag=w),onChange:i},null,8,["modelValue"])]),_:1}),e.unref(r).isInput?(e.openBlock(),e.createBlock(u,{key:4,label:"占位提示"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:e.unref(r).props.placeholder,"onUpdate:modelValue":p[10]||(p[10]=w=>e.unref(r).props.placeholder=w),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(g,{modelValue:e.unref(r).props.clearable,"onUpdate:modelValue":p[11]||(p[11]=w=>e.unref(r).props.clearable=w)},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否只读"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.readonly,"onUpdate:modelValue":p[12]||(p[12]=w=>e.unref(r).props.readonly=w),onChange:s},null,8,["modelValue"])]),_:1}),e.createVNode(u,{label:"是否必填"},{default:e.withCtx(()=>[e.createVNode(g,{onChange:c,modelValue:e.unref(r).props.required,"onUpdate:modelValue":p[13]||(p[13]=w=>e.unref(r).props.required=w)},null,8,["modelValue"])]),_:1}),e.unref(r).props.required?(e.openBlock(),e.createBlock(u,{key:0,label:"必填提示"},{default:e.withCtx(()=>[e.createVNode(y,{onChange:m,modelValue:e.unref(r).props.requiredMessage,"onUpdate:modelValue":p[14]||(p[14]=w=>e.unref(r).props.requiredMessage=w)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(u,{label:"是否禁用"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:e.unref(r).props.disabled,"onUpdate:modelValue":p[15]||(p[15]=w=>e.unref(r).props.disabled=w),onChange:d},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(y,{modelValue:e.unref(r).props.description,"onUpdate:modelValue":p[16]||(p[16]=w=>e.unref(r).props.description=w),autosize:{minRows:2,maxRows:5},type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"])):e.createCommentVNode("",!0)]),_:1})}}}),na=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 s=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-input"),f=e.resolveComponent("el-input-number"),h=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(h,{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(c,{prop:"formType",label:"表单类型",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.formType,"onUpdate:modelValue":i[0]||(i[0]=p=>e.unref(t).props.formType=p),onChange:r},{default:e.withCtx(()=>[e.createVNode(s,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("问卷")]),_:1}),e.createVNode(s,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("试卷")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(c,{prop:"formName",label:e.unref(t).props.formType==="1"?"问卷名称":"试卷名称",rules:[{message:"必填字段",required:!0,trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:e.unref(t).props.formName,"onUpdate:modelValue":i[1]||(i[1]=p=>e.unref(t).props.formName=p),autosize:"",type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"]),e.unref(t).props.formType==="1"?(e.openBlock(),e.createBlock(c,{key:0,prop:"labelPosition",label:"标题位置"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.labelPosition,"onUpdate:modelValue":i[2]||(i[2]=p=>e.unref(t).props.labelPosition=p)},{default:e.withCtx(()=>[e.createVNode(s,{value:"top"},{default:e.withCtx(()=>[e.createTextVNode("上")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右")]),_:1})]),_:1},8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(c,{prop:"labelWidth",label:"标题宽度"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:e.unref(t).props.labelWidth,"onUpdate:modelValue":i[3]||(i[3]=p=>e.unref(t).props.labelWidth=p),step:5,min:0},null,8,["modelValue"])]),_:1}),e.createVNode(c,{prop:"size",label:"表单尺寸"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(t).props.size,"onUpdate:modelValue":i[4]||(i[4]=p=>e.unref(t).props.size=p)},{default:e.withCtx(()=>[e.createVNode(s,{value:"small"},{default:e.withCtx(()=>[e.createTextVNode("小")]),_:1}),e.createVNode(s,{value:"default"},{default:e.withCtx(()=>[e.createTextVNode("正常")]),_:1}),e.createVNode(s,{value:"large"},{default:e.withCtx(()=>[e.createTextVNode("大")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.renderSlot(a.$slots,"formAfterExtendProps")]),_:3},8,["model"])}}}),la={class:"toolbar"},ra=e.createElementVNode("div",{class:"devices"},null,-1),aa={class:"operates"},ia=e.createElementVNode("span",null,"清空",-1),sa=e.createElementVNode("span",null,"模板导入",-1),ca=e.createElementVNode("span",null,"查看JSON",-1),da=e.createElementVNode("span",null,"预览",-1),pa=e.createElementVNode("span",null,"保存",-1),ma=e.createElementVNode("span",null,"验证表单",-1),fa=e.createElementVNode("span",null,"重置表单",-1),ha=e.createElementVNode("span",null,"表单数据",-1),Jo=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")},s=()=>{l("previewFrom")},d=()=>{l("saveFrom")},c=()=>{l("validateForm")},m=()=>{l("resetForm")},f=()=>{l("viewDataJson")},h=e.ref(!1),p=()=>{h.value=!h.value,l("toggleDescription",h.value)};return(g,u)=>{var y;const _=v,b=e.resolveComponent("el-button"),x=e.resolveComponent("el-popconfirm");return e.openBlock(),e.createElementBlock("div",la,[ra,e.createElementVNode("div",aa,[o.operates.includes("clearComponents")?(e.openBlock(),e.createBlock(x,{key:0,confirmButtonText:"是",cancelButtonText:"否",title:"确定要清空所有组件吗?",onConfirm:r},{reference:e.withCtx(()=>{var C;return[e.createVNode(b,{text:"",type:"danger",disabled:((C=e.unref(t).components)==null?void 0:C.length)==0},{default:e.withCtx(()=>[e.createVNode(_,{name:"clear",color:"#ff0000"}),ia]),_:1},8,["disabled"])]}),_:1})):e.createCommentVNode("",!0),o.operates.includes("batchAdd")?(e.openBlock(),e.createBlock(b,{key:1,text:"",type:"primary",onClick:a},{default:e.withCtx(()=>[e.createVNode(_,{name:"batchAdd",color:"#116fff",size:"16"}),sa]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewFormJson")?(e.openBlock(),e.createBlock(b,{key:2,text:"",type:"primary",onClick:i},{default:e.withCtx(()=>[e.createVNode(_,{name:"json"}),ca]),_:1})):e.createCommentVNode("",!0),o.operates.includes("previewFrom")?(e.openBlock(),e.createBlock(b,{key:3,text:"",type:"primary",disabled:((y=e.unref(t).components)==null?void 0:y.length)==0,onClick:s},{default:e.withCtx(()=>[e.createVNode(_,{name:"preview",color:"#116fff"}),da]),_:1},8,["disabled"])):e.createCommentVNode("",!0),o.operates.includes("saveFrom")?(e.openBlock(),e.createBlock(b,{key:4,text:"",type:"primary",onClick:d},{default:e.withCtx(()=>[e.createVNode(_,{name:"save",size:"14px",color:"#08c979"}),pa]),_:1})):e.createCommentVNode("",!0),o.operates.includes("validateForm")?(e.openBlock(),e.createBlock(b,{key:5,text:"",type:"warning",onClick:c},{default:e.withCtx(()=>[e.createVNode(_,{name:"validate",color:"#e6a23c"}),ma]),_:1})):e.createCommentVNode("",!0),o.operates.includes("resetForm")?(e.openBlock(),e.createBlock(b,{key:6,text:"",type:"danger",onClick:m},{default:e.withCtx(()=>[e.createVNode(_,{name:"reset",color:"#ff0000"}),fa]),_:1})):e.createCommentVNode("",!0),o.operates.includes("viewDataJson")?(e.openBlock(),e.createBlock(b,{key:7,text:"",type:"primary",onClick:f},{default:e.withCtx(()=>[e.createVNode(_,{name:"previewData",color:"#116fff"}),ha]),_:1})):e.createCommentVNode("",!0),o.operates.includes("toggleDescription")?(e.openBlock(),e.createBlock(b,{key:8,text:"",type:"primary",onClick:p},{default:e.withCtx(()=>[e.createVNode(_,{name:"description",color:"#08c979"}),e.createElementVNode("span",null,e.toDisplayString(`${e.unref(h)?"隐藏":"显示"}${e.unref(t).props.formType==="1"?"项目说明":"答案解析"}`),1)]),_:1})):e.createCommentVNode("",!0)])])}}}),Xs="",ua={class:"form-designer"},ga={class:"left-wrap"},_a=["onClick"],wa={class:"component-name"},ya={key:2,class:"no-component-tip"},ba={key:3,class:"mobile-key"},Ca=["title"],Va={key:1,class:"right-wrap"},xa={class:"preview-wrap"},ka={name:"zhy-form-designer"},ht=e.defineComponent({...ka,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},saveMethod:{type:Function,default:void 0},testMode:{type:Boolean,default:!1},batchAddComponentParams:{type:Object,default:()=>{}}},setup(o){const n=o,{getTempID:t,clone:l,stringifyJson:r,isEmpty:a}=se(),i={...ut,..._t,...gt},{formData:s,componentGroups:d,mergeGroup:c,batchAddComponentParams:m}=e.toRefs(n),f=e.reactive({selectComponent:void 0,propTab:"form",device:"pc"}),h=e.ref(!0),p=e.ref([]),g=e.computed(()=>u.value.map(B=>B.expand&&B.name)),u=e.ref([]),_=e.ref(!1),b={labelPosition:"top",labelWidth:90,size:"small",column:12,formName:"",formType:"1"},x=[{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:"groupLayout",allowRepeat:!0,allowModify:!0},{type:"upload",allowRepeat:!0,allowModify:!0},{type:"uploadImage",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}]}],y=e.computed(()=>{let B=["clearComponents","previewFrom"];return m.value&&Object.keys(m.value).length&&B.push("batchAdd"),n.testMode&&B.push("viewFormJson"),n.saveMethod&&B.push("saveFrom"),B});e.onMounted(()=>{k(),C()}),e.watch(()=>f.selectComponent,B=>{if(f.propTab="component",!B){p.value=[];return}p.value=["base"],i[f.selectComponent.type].propEditor&&p.value.push("exclusive")}),e.watch([d,c],()=>{k()},{deep:!0}),e.watch(s,()=>{C()}),e.provide("uploadOptions",n.uploadOptions),e.provide("formDesignerData",f),e.provide("formData",s),e.provide("defaultSourceType",n.defaultSourceType);const C=()=>{f.selectComponent=void 0,s.value.datas||(s.value.datas={}),s.value.components?w(s.value.components):s.value.components=[],s.value.props?s.value.props=Object.assign(b,s.value.props):s.value.props=b,_.value=!s.value.props.formName},w=B=>{B.forEach(async V=>{var z;let I=new i[V.type].component;V.name=I.name,V.isEdit=I.isEdit,V.isInput=I.isInput,V.props=Object.assign(I.props,V.props),V.isEdit&&((V.props.required||V.props.pattern)&&(V.rules=I.getRules(V.props)),V.filterConditionProps=await I.getFilterConditionProps(V.props),V.excludeFilterConditions=I.getExcludeFilterConditions()),u.value.forEach(U=>{const ie=U.types.findIndex(X=>X!=null&&X.id.includes("temp")?X.type===V.type:(X==null?void 0:X.id)===V.id);ie!==-1&&(V.allowRepeat=U.types[ie].allowRepeat,V.allowModify=U.types[ie].allowModify,S(V,U.types[ie],!0),O(ie,U))}),V.isLayout&&((z=V==null?void 0:V.children)!=null&&z.length)&&w(V.children)})},k=()=>{var B;if(u.value=[],!((B=d.value)!=null&&B.length)){x.forEach(V=>{u.value.push(M(V))});return}if(n.mergeGroup){x.forEach(z=>{let U=z;const ie=d.value.find(X=>z.name===X.name);if(ie){let X=[];z.components.forEach(Q=>{const Ve=ie.components.find(Ze=>Ze.type===Q.type);Ve?X.push(Ve):X.push(Q)}),U.components=X}u.value.push(M(U))});const V=x.map(z=>z.name);d.value.filter(z=>!V.includes(z.name)).forEach(z=>{u.value.push(M(z))})}else d.value.forEach(V=>{u.value.push(M(V))})},S=(B,V,I)=>{const z={employee:[{label:"人员1",value:t()}],post:[{label:"部门1",value:t()}],grade:[]};switch(B.type){case"employee":B.props.options=(I?V.props.options:V.options)||z.employee,V.searchEmployeeMethod?B.searchEmployeeMethod=V.searchEmployeeMethod:B.searchEmployeeMethod=U=>[];break;case"post":B.props.options=(I?V.props.options:V.options)||z.post;break;case"grade":B.props.remarkOptions=(I?V.props.remarkOptions:V.options)||z.grade;break}},M=B=>{let V=l(B);return V.types=V.components.map(I=>{var U;let z=new i[I.type].component;return z.allowRepeat=I.allowRepeat===void 0?!0:I.allowRepeat,z.allowModify=I.allowModify===void 0?!0:I.allowModify,S(z,I),!((U=I.id)!=null&&U.includes("temp"))&&!a(I.props)&&(z.props=Object.assign(z.props,I.props),z.id=I.id,z.name=I.name),z}),V.dynamicTypes=l(V.types),V.components=V.components.map(I=>I.type),V},N=(B,V)=>{const I=P(B);s.value.components.push(I);const z=V.types.findIndex(U=>B!=null&&B.id.includes("temp")?U.type===B.type:(U==null?void 0:U.id)===B.id);z!==-1&&O(z,V),f.selectComponent=void 0,e.nextTick(()=>f.selectComponent=I)},P=B=>{var z,U;let V=l(B);V.itemSourceType=n.defaultSourceType;let I=new i[B.type].component;return I.isEdit&&(V.filterConditionProps=I.getFilterConditionProps(V.props)),!((z=V.id)!=null&&z.includes("temp"))||(V.id=t(),!((U=V.props.options)!=null&&U.length)||["employee","post"].includes(V.type))||V.props.options.forEach(ie=>{ie.value=t(),ie.itemSourceType=n.defaultSourceType}),V},O=(B,V)=>{V.types[B].allowRepeat||V.types.splice(B,1)},W=B=>{B.allowRepeat||u.value.forEach(V=>{let I=[];V.dynamicTypes.forEach((z,U)=>{V.types.findIndex(X=>z!=null&&z.id.includes("temp")?z.type===X.type:(z==null?void 0:z.id)===X.id)!==-1&&I.push(l(V.dynamicTypes[U])),(z!=null&&z.id.includes("temp")&&z.type===B.type||(z==null?void 0:z.id)===B.id)&&I.push(l(V.dynamicTypes[U]))}),V.types=I})},T=()=>{s.value.components.splice(0,s.value.components.length),f.selectComponent=void 0},H=e.ref(!1),K=()=>{H.value=!0},ae=B=>{B!=null&&B.length&&(w(B),B.forEach(V=>s.value.components.push(V)))},le=()=>{Zo.value=r(s.value),Ot.value=!0},ue=e.ref(),Ee=async()=>{if(n.saveMethod){if(!s.value.components.length){pe("error","未发现需要保存的数据!");return}const B=await za();B&&n.saveMethod(B)}},Le=e.ref(),ze=e.ref(!1),co=()=>{ze.value=!0};e.watch(()=>ze.value,()=>{s.value.datas={},s.value.components.forEach(B=>{!s.value.datas[B.id]&&!a(B.props.defaultValue)&&(B.type==="grade"?s.value.datas[B.id]={score:B.props.defaultValue}:s.value.datas[B.id]=B.props.defaultValue)})});const Ot=e.ref(!1),Zo=e.ref(),Ba=async()=>{await Le.value.validate()?pe("success","通过验证"):pe("error","未通过验证")},Da=()=>{Le.value.resetFields()},Sa=()=>{const{data:B,fileList:V}=Le.value.getDatas();console.log(B,V)},Ma=()=>{Le.value.toggleDescription()},za=async()=>{if(!await ue.value.validate()){pe("error","请将表单属性填写完整!"),f.propTab="form";return}let V=["单选框","多选框","选项","标签","文本框","分组面板"],I=l(s.value);if(I.datas={},Qo(V,I.components))return I},Qo=(B,V,I)=>{var U,ie;let z=!0;for(let X=0;X<V.length;X++){let Q=V[X];if(delete Q.isEdit,delete Q.isInput,delete Q.name,delete Q.rules,delete Q.excludeFilterConditions,delete Q.filterConditionProps,B.find(Ve=>Q.props.label.indexOf(Ve)===0)){pe("error",`请将${I?`【${I}】中`:""}第${X+1}个项目的【${Q.props.label}】调整为合理描述!`),z=!1;break}if((U=Q.props.options)!=null&&U.length){for(let Ve=0;Ve<Q.props.options.length;Ve++){let Ze=Q.props.options[Ve];if(B.find(Ft=>Ze.label.indexOf(Ft)===0)){pe("error",`请将【${Q.props.label}】的第${Ve+1}个选项的【${Ze.label}】调整为合理描述!`),z=!1;break}}if(!z)break}a(V[X].props.defaultValue)&&(V[X].props.defaultValue=void 0),Q.isLayout&&((ie=Q==null?void 0:Q.children)!=null&&ie.length)&&(z=Qo(B,Q.children,Q.props.label))}return z};return(B,V)=>{var vo;const I=v,z=e.resolveComponent("el-collapse-item"),U=e.resolveComponent("el-collapse"),ie=e.resolveComponent("el-input"),X=e.resolveComponent("el-form"),Q=e.resolveComponent("el-empty"),Ve=e.resolveComponent("el-tab-pane"),Ze=e.resolveComponent("el-tabs"),Ft=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ua,[e.createElementVNode("div",ga,[e.createVNode(U,{modelValue:e.unref(g),"onUpdate:modelValue":V[0]||(V[0]=q=>e.isRef(g)?g.value=q:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),(q,$a)=>(e.openBlock(),e.createBlock(z,{key:$a,title:q.name,name:q.name},{default:e.withCtx(()=>[e.createVNode(e.unref(ft),{list:q.types,"item-key":"type",tag:"div",class:"component-list",clone:qe=>P(qe),sort:!1,onRemove:qe=>O(qe.oldIndex,q),group:{name:"component",pull:"clone",put:!1}},{item:e.withCtx(({element:qe})=>[e.createElementVNode("div",{class:"component-item",onClick:Js=>N(qe,q)},[e.createVNode(I,{name:qe.type,color:"#fc8720"},null,8,["name"]),e.createElementVNode("span",wa,e.toDisplayString(qe.name),1)],8,_a)]),_: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(h)}])},[e.createVNode(Jo,{operates:e.unref(y),onClearComponents:T,onBatchAdd:K,onViewFormJson:le,onPreviewFrom:co,onSaveFrom:Ee},null,8,["operates"]),e.createElementVNode("div",{class:e.normalizeClass(["component-form",e.unref(f).device])},[e.unref(_)?(e.openBlock(),e.createBlock(ie,{key:0,class:"title-input",modelValue:e.unref(s).props.formName,"onUpdate:modelValue":V[1]||(V[1]=q=>e.unref(s).props.formName=q),placeholder:"单击输入标题",onBlur:V[2]||(V[2]=q=>_.value=!1),onKeydown:V[3]||(V[3]=e.withKeys(q=>_.value=!1,["enter"]))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("h2",{key:1,class:"title",onClick:V[4]||(V[4]=q=>_.value=!0)},e.toDisplayString(e.unref(s).props.formName),1)),(vo=e.unref(s).components)!=null&&vo.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ya,"从左侧拖拽组件")),e.createVNode(X,{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(Go,{components:e.unref(s).components,"onUpdate:components":V[5]||(V[5]=q=>e.unref(s).components=q),onDeleteComponent:W},null,8,["components"])]),_:1},8,["label-position","label-width","size"]),e.unref(f).device==="mobile"?(e.openBlock(),e.createElementBlock("div",ba)):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("i",{class:e.normalizeClass(["toggle-props",e.unref(h)?"show":"hidden"]),title:e.unref(h)?"隐藏属性配置面板":"打开属性配置面板",onClick:V[6]||(V[6]=q=>h.value=!e.unref(h))},null,10,Ca),e.unref(h)?(e.openBlock(),e.createElementBlock("div",Va,[e.createVNode(Ze,{class:"prop-tabs",modelValue:e.unref(f).propTab,"onUpdate:modelValue":V[9]||(V[9]=q=>e.unref(f).propTab=q),type:"border-card"},{default:e.withCtx(()=>[e.createVNode(Ve,{label:"组件属性",name:"component"},{default:e.withCtx(()=>[e.unref(f).selectComponent?(e.openBlock(),e.createBlock(U,{key:1,modelValue:e.unref(p),"onUpdate:modelValue":V[8]||(V[8]=q=>e.isRef(p)?p.value=q:null)},{default:e.withCtx(()=>[e.createVNode(z,{title:"基础属性",name:"base"},{default:e.withCtx(()=>[e.createVNode(oa,{dictionary:o.dictionary},null,8,["dictionary"])]),_:1}),i[e.unref(f).selectComponent.type].propEditor?(e.openBlock(),e.createBlock(z,{key:0,title:"专有属性",name:"exclusive"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i[e.unref(f).selectComponent.type].propEditor),{componentProps:e.unref(f).selectComponent.props,"onUpdate:componentProps":V[7]||(V[7]=q=>e.unref(f).selectComponent.props=q),dictionary:o.dictionary},null,40,["componentProps","dictionary"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(z,{title:"高级属性",name:"advanced"},{default:e.withCtx(()=>[e.createVNode(ta)]),_:1})]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(Q,{key:0,description:"请选择组件"}))]),_:1}),e.createVNode(Ve,{label:"表单属性",name:"form",class:"form-props"},{default:e.withCtx(()=>[e.unref(s).props?(e.openBlock(),e.createBlock(na,{key:0,ref_key:"formPropsEditorRef",ref:ue},{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(Ft,{modelValue:e.unref(ze),"onUpdate:modelValue":V[10]||(V[10]=q=>e.isRef(ze)?ze.value=q:null),class:"preview-dialog no-footer","destroy-on-close":"",fullscreen:"",title:"表单预览"},{default:e.withCtx(()=>[e.createElementVNode("div",xa,[e.createVNode(Jo,{operates:["validateForm","resetForm",o.testMode?"viewDataJson":"","toggleDescription"],onValidateForm:Ba,onResetForm:Da,onViewDataJson:Sa,onToggleDescription:Ma},null,8,["operates"]),e.createVNode(He,{watching:"",ref_key:"rendererForm",ref:Le,formData:e.unref(s),uploadOptions:o.uploadOptions,device:e.unref(f).device},null,8,["formData","uploadOptions","device"])])]),_:1},8,["modelValue"]),e.createVNode(Ft,{modelValue:e.unref(Ot),"onUpdate:modelValue":V[11]||(V[11]=q=>e.isRef(Ot)?Ot.value=q:null),class:"no-footer","destroy-on-close":"",title:"表单数据JSON",width:"600px"},{default:e.withCtx(()=>[e.createElementVNode("pre",null,e.toDisplayString(e.unref(Zo)),1)]),_:1},8,["modelValue"]),e.unref(H)?(e.openBlock(),e.createBlock(Q1,{key:0,modelValue:e.unref(H),"onUpdate:modelValue":V[12]||(V[12]=q=>e.isRef(H)?H.value=q:null),params:e.unref(m),onSelect:ae},null,8,["modelValue","params"])):e.createCommentVNode("",!0)],64)}}}),Ys="";ht.install=function(o){o.component(ht.name,ht)},He.install=function(o){o.component(He.name,He)},v.install=function(o){o.component(v.name,v)};const Ea=[v,ht,He,je],Na={install:function(o,n){Ea.forEach(t=>{o.component(t.name,t)})}};ne.ZhyDynamicFilter=je,ne.ZhyFormDesigner=ht,ne.ZhyFormRenderer=He,ne.ZhyIcon=v,ne.default=Na,Object.defineProperties(ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});