react-form-create
Version:
一个基于 React + TS 的表单设计器
6 lines • 681 kB
JavaScript
var zO=Object.defineProperty,TO=Object.defineProperties;var DO=Object.getOwnPropertyDescriptors;var OM=Object.getOwnPropertySymbols;var CO=Object.prototype.hasOwnProperty,IO=Object.prototype.propertyIsEnumerable;var YM=(fe,Y,u)=>Y in fe?zO(fe,Y,{enumerable:!0,configurable:!0,writable:!0,value:u}):fe[Y]=u,w=(fe,Y)=>{for(var u in Y||(Y={}))CO.call(Y,u)&&YM(fe,u,Y[u]);if(OM)for(var u of OM(Y))IO.call(Y,u)&&YM(fe,u,Y[u]);return fe},le=(fe,Y)=>TO(fe,DO(Y));(function(fe,Y){typeof exports=="object"&&typeof module!="undefined"?Y(exports,require("react"),require("antd"),require("moment")):typeof define=="function"&&define.amd?define(["exports","react","antd","moment"],Y):(fe=typeof globalThis!="undefined"?globalThis:fe||self,Y(fe.ReactFormCreate={},fe.React,fe.antd,fe.moment))})(this,function(fe,Y,u,FM){"use strict";function lc(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}function oc(e){if(e&&e.__esModule)return e;var t={__proto__:null,[Symbol.toStringTag]:"Module"};return e&&Object.keys(e).forEach(function(a){if(a!=="default"){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}var n=lc(Y),sa=oc(Y),kM=oc(u),at=lc(FM);/**!
* Sortable 1.14.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function uc(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),a.push.apply(a,r)}return a}function kt(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?uc(Object(a),!0).forEach(function(r){_M(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):uc(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function En(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?En=function(t){return typeof t}:En=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},En(e)}function _M(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Ut(){return Ut=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},Ut.apply(this,arguments)}function PM(e,t){if(e==null)return{};var a={},r=Object.keys(e),l,i;for(i=0;i<r.length;i++)l=r[i],!(t.indexOf(l)>=0)&&(a[l]=e[l]);return a}function BM(e,t){if(e==null)return{};var a=PM(e,t),r,l;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l<i.length;l++)r=i[l],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}var $M="1.14.0";function Ht(e){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(e)}var Gt=Ht(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Dr=Ht(/Edge/i),ic=Ht(/firefox/i),Cr=Ht(/safari/i)&&!Ht(/chrome/i)&&!Ht(/android/i),cc=Ht(/iP(ad|od|hone)/i),RM=Ht(/chrome/i)&&Ht(/android/i),sc={capture:!1,passive:!1};function pe(e,t,a){e.addEventListener(t,a,!Gt&&sc)}function de(e,t,a){e.removeEventListener(t,a,!Gt&&sc)}function zn(e,t){if(!!t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function QM(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function _t(e,t,a,r){if(e){a=a||document;do{if(t!=null&&(t[0]===">"?e.parentNode===a&&zn(e,t):zn(e,t))||r&&e===a)return e;if(e===a)break}while(e=QM(e))}return null}var fc=/\s+/g;function ht(e,t,a){if(e&&t)if(e.classList)e.classList[a?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(fc," ").replace(" "+t+" "," ");e.className=(r+(a?" "+t:"")).replace(fc," ")}}function ee(e,t,a){var r=e&&e.style;if(r){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(a=e.currentStyle),t===void 0?a:a[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=a+(typeof a=="string"?"":"px")}}function ka(e,t){var a="";if(typeof e=="string")a=e;else do{var r=ee(e,"transform");r&&r!=="none"&&(a=r+" "+a)}while(!t&&(e=e.parentNode));var l=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return l&&new l(a)}function dc(e,t,a){if(e){var r=e.getElementsByTagName(t),l=0,i=r.length;if(a)for(;l<i;l++)a(r[l],l);return r}return[]}function Pt(){var e=document.scrollingElement;return e||document.documentElement}function Ue(e,t,a,r,l){if(!(!e.getBoundingClientRect&&e!==window)){var i,c,f,d,g,m,v;if(e!==window&&e.parentNode&&e!==Pt()?(i=e.getBoundingClientRect(),c=i.top,f=i.left,d=i.bottom,g=i.right,m=i.height,v=i.width):(c=0,f=0,d=window.innerHeight,g=window.innerWidth,m=window.innerHeight,v=window.innerWidth),(t||a)&&e!==window&&(l=l||e.parentNode,!Gt))do if(l&&l.getBoundingClientRect&&(ee(l,"transform")!=="none"||a&&ee(l,"position")!=="static")){var j=l.getBoundingClientRect();c-=j.top+parseInt(ee(l,"border-top-width")),f-=j.left+parseInt(ee(l,"border-left-width")),d=c+i.height,g=f+i.width;break}while(l=l.parentNode);if(r&&e!==window){var b=ka(l||e),T=b&&b.a,y=b&&b.d;b&&(c/=y,f/=T,v/=T,m/=y,d=c+m,g=f+v)}return{top:c,left:f,bottom:d,right:g,width:v,height:m}}}function Mc(e,t,a){for(var r=fa(e,!0),l=Ue(e)[t];r;){var i=Ue(r)[a],c=void 0;if(a==="top"||a==="left"?c=l>=i:c=l<=i,!c)return r;if(r===Pt())break;r=fa(r,!1)}return!1}function _a(e,t,a,r){for(var l=0,i=0,c=e.children;i<c.length;){if(c[i].style.display!=="none"&&c[i]!==q.ghost&&(r||c[i]!==q.dragged)&&_t(c[i],a.draggable,e,!1)){if(l===t)return c[i];l++}i++}return null}function go(e,t){for(var a=e.lastElementChild;a&&(a===q.ghost||ee(a,"display")==="none"||t&&!zn(a,t));)a=a.previousElementSibling;return a||null}function bt(e,t){var a=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==q.clone&&(!t||zn(e,t))&&a++;return a}function gc(e){var t=0,a=0,r=Pt();if(e)do{var l=ka(e),i=l.a,c=l.d;t+=e.scrollLeft*i,a+=e.scrollTop*c}while(e!==r&&(e=e.parentNode));return[t,a]}function UM(e,t){for(var a in e)if(!!e.hasOwnProperty(a)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[a][r])return Number(a)}return-1}function fa(e,t){if(!e||!e.getBoundingClientRect)return Pt();var a=e,r=!1;do if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var l=ee(a);if(a.clientWidth<a.scrollWidth&&(l.overflowX=="auto"||l.overflowX=="scroll")||a.clientHeight<a.scrollHeight&&(l.overflowY=="auto"||l.overflowY=="scroll")){if(!a.getBoundingClientRect||a===document.body)return Pt();if(r||t)return a;r=!0}}while(a=a.parentNode);return Pt()}function HM(e,t){if(e&&t)for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a]);return e}function ho(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var Ir;function hc(e,t){return function(){if(!Ir){var a=arguments,r=this;a.length===1?e.call(r,a[0]):e.apply(r,a),Ir=setTimeout(function(){Ir=void 0},t)}}}function GM(){clearTimeout(Ir),Ir=void 0}function mc(e,t,a){e.scrollLeft+=t,e.scrollTop+=a}function pc(e){var t=window.Polymer,a=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):a?a(e).clone(!0)[0]:e.cloneNode(!0)}var mt="Sortable"+new Date().getTime();function VM(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(l){if(!(ee(l,"display")==="none"||l===q.ghost)){e.push({target:l,rect:Ue(l)});var i=kt({},e[e.length-1].rect);if(l.thisAnimationDuration){var c=ka(l,!0);c&&(i.top-=c.f,i.left-=c.e)}l.fromRect=i}})}},addAnimationState:function(r){e.push(r)},removeAnimationState:function(r){e.splice(UM(e,{target:r}),1)},animateAll:function(r){var l=this;if(!this.options.animation){clearTimeout(t),typeof r=="function"&&r();return}var i=!1,c=0;e.forEach(function(f){var d=0,g=f.target,m=g.fromRect,v=Ue(g),j=g.prevFromRect,b=g.prevToRect,T=f.rect,y=ka(g,!0);y&&(v.top-=y.f,v.left-=y.e),g.toRect=v,g.thisAnimationDuration&&ho(j,v)&&!ho(m,v)&&(T.top-v.top)/(T.left-v.left)==(m.top-v.top)/(m.left-v.left)&&(d=JM(T,j,b,l.options)),ho(v,m)||(g.prevFromRect=m,g.prevToRect=v,d||(d=l.options.animation),l.animate(g,T,v,d)),d&&(i=!0,c=Math.max(c,d),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},d),g.thisAnimationDuration=d)}),clearTimeout(t),i?t=setTimeout(function(){typeof r=="function"&&r()},c):typeof r=="function"&&r(),e=[]},animate:function(r,l,i,c){if(c){ee(r,"transition",""),ee(r,"transform","");var f=ka(this.el),d=f&&f.a,g=f&&f.d,m=(l.left-i.left)/(d||1),v=(l.top-i.top)/(g||1);r.animatingX=!!m,r.animatingY=!!v,ee(r,"transform","translate3d("+m+"px,"+v+"px,0)"),this.forRepaintDummy=ZM(r),ee(r,"transition","transform "+c+"ms"+(this.options.easing?" "+this.options.easing:"")),ee(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){ee(r,"transition",""),ee(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},c)}}}}function ZM(e){return e.offsetWidth}function JM(e,t,a,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-a.top,2)+Math.pow(t.left-a.left,2))*r.animation}var Pa=[],mo={initializeByDefault:!0},Lr={mount:function(t){for(var a in mo)mo.hasOwnProperty(a)&&!(a in t)&&(t[a]=mo[a]);Pa.forEach(function(r){if(r.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Pa.push(t)},pluginEvent:function(t,a,r){var l=this;this.eventCanceled=!1,r.cancel=function(){l.eventCanceled=!0};var i=t+"Global";Pa.forEach(function(c){!a[c.pluginName]||(a[c.pluginName][i]&&a[c.pluginName][i](kt({sortable:a},r)),a.options[c.pluginName]&&a[c.pluginName][t]&&a[c.pluginName][t](kt({sortable:a},r)))})},initializePlugins:function(t,a,r,l){Pa.forEach(function(f){var d=f.pluginName;if(!(!t.options[d]&&!f.initializeByDefault)){var g=new f(t,a,t.options);g.sortable=t,g.options=t.options,t[d]=g,Ut(r,g.defaults)}});for(var i in t.options)if(!!t.options.hasOwnProperty(i)){var c=this.modifyOption(t,i,t.options[i]);typeof c!="undefined"&&(t.options[i]=c)}},getEventProperties:function(t,a){var r={};return Pa.forEach(function(l){typeof l.eventProperties=="function"&&Ut(r,l.eventProperties.call(a[l.pluginName],t))}),r},modifyOption:function(t,a,r){var l;return Pa.forEach(function(i){!t[i.pluginName]||i.optionListeners&&typeof i.optionListeners[a]=="function"&&(l=i.optionListeners[a].call(t[i.pluginName],r))}),l}};function XM(e){var t=e.sortable,a=e.rootEl,r=e.name,l=e.targetEl,i=e.cloneEl,c=e.toEl,f=e.fromEl,d=e.oldIndex,g=e.newIndex,m=e.oldDraggableIndex,v=e.newDraggableIndex,j=e.originalEvent,b=e.putSortable,T=e.extraEventProperties;if(t=t||a&&a[mt],!!t){var y,N=t.options,C="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Gt&&!Dr?y=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(r,!0,!0)),y.to=c||a,y.from=f||a,y.item=l||a,y.clone=i,y.oldIndex=d,y.newIndex=g,y.oldDraggableIndex=m,y.newDraggableIndex=v,y.originalEvent=j,y.pullMode=b?b.lastPutMode:void 0;var L=kt(kt({},T),Lr.getEventProperties(r,t));for(var x in L)y[x]=L[x];a&&a.dispatchEvent(y),N[C]&&N[C].call(t,y)}}var KM=["evt"],ot=function(t,a){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=r.evt,i=BM(r,KM);Lr.pluginEvent.bind(q)(t,a,kt({dragEl:$,parentEl:ke,ghostEl:ae,rootEl:Ye,nextEl:ba,lastDownEl:Tn,cloneEl:_e,cloneHidden:da,dragStarted:wr,putSortable:Ze,activeSortable:q.active,originalEvent:l,oldIndex:Ba,oldDraggableIndex:Ar,newIndex:pt,newDraggableIndex:Ma,hideGhostForTarget:zc,unhideGhostForTarget:Tc,cloneNowHidden:function(){da=!0},cloneNowShown:function(){da=!1},dispatchSortableEvent:function(f){rt({sortable:a,name:f,originalEvent:l})}},i))};function rt(e){XM(kt({putSortable:Ze,cloneEl:_e,targetEl:$,rootEl:Ye,oldIndex:Ba,oldDraggableIndex:Ar,newIndex:pt,newDraggableIndex:Ma},e))}var $,ke,ae,Ye,ba,Tn,_e,da,Ba,pt,Ar,Ma,Dn,Ze,$a=!1,Cn=!1,In=[],Ea,Ct,po,yo,yc,vc,wr,Ra,xr,Sr=!1,Ln=!1,An,qe,vo=[],No=!1,wn=[],xn=typeof document!="undefined",Sn=cc,Nc=Dr||Gt?"cssFloat":"float",qM=xn&&!RM&&!cc&&"draggable"in document.createElement("div"),jc=function(){if(!!xn){if(Gt)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),bc=function(t,a){var r=ee(t),l=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),i=_a(t,0,a),c=_a(t,1,a),f=i&&ee(i),d=c&&ee(c),g=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+Ue(i).width,m=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+Ue(c).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&f.float&&f.float!=="none"){var v=f.float==="left"?"left":"right";return c&&(d.clear==="both"||d.clear===v)?"vertical":"horizontal"}return i&&(f.display==="block"||f.display==="flex"||f.display==="table"||f.display==="grid"||g>=l&&r[Nc]==="none"||c&&r[Nc]==="none"&&g+m>l)?"vertical":"horizontal"},WM=function(t,a,r){var l=r?t.left:t.top,i=r?t.right:t.bottom,c=r?t.width:t.height,f=r?a.left:a.top,d=r?a.right:a.bottom,g=r?a.width:a.height;return l===f||i===d||l+c/2===f+g/2},eg=function(t,a){var r;return In.some(function(l){var i=l[mt].options.emptyInsertThreshold;if(!(!i||go(l))){var c=Ue(l),f=t>=c.left-i&&t<=c.right+i,d=a>=c.top-i&&a<=c.bottom+i;if(f&&d)return r=l}}),r},Ec=function(t){function a(i,c){return function(f,d,g,m){var v=f.options.group.name&&d.options.group.name&&f.options.group.name===d.options.group.name;if(i==null&&(c||v))return!0;if(i==null||i===!1)return!1;if(c&&i==="clone")return i;if(typeof i=="function")return a(i(f,d,g,m),c)(f,d,g,m);var j=(c?f:d).options.group.name;return i===!0||typeof i=="string"&&i===j||i.join&&i.indexOf(j)>-1}}var r={},l=t.group;(!l||En(l)!="object")&&(l={name:l}),r.name=l.name,r.checkPull=a(l.pull,!0),r.checkPut=a(l.put),r.revertClone=l.revertClone,t.group=r},zc=function(){!jc&&ae&&ee(ae,"display","none")},Tc=function(){!jc&&ae&&ee(ae,"display","")};xn&&document.addEventListener("click",function(e){if(Cn)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Cn=!1,!1},!0);var za=function(t){if($){t=t.touches?t.touches[0]:t;var a=eg(t.clientX,t.clientY);if(a){var r={};for(var l in t)t.hasOwnProperty(l)&&(r[l]=t[l]);r.target=r.rootEl=a,r.preventDefault=void 0,r.stopPropagation=void 0,a[mt]._onDragOver(r)}}},tg=function(t){$&&$.parentNode[mt]._isOutsideThisEl(t.target)};function q(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Ut({},t),e[mt]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return bc(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(c,f){c.setData("Text",f.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:q.supportPointer!==!1&&"PointerEvent"in window&&!Cr,emptyInsertThreshold:5};Lr.initializePlugins(this,e,a);for(var r in a)!(r in t)&&(t[r]=a[r]);Ec(t);for(var l in this)l.charAt(0)==="_"&&typeof this[l]=="function"&&(this[l]=this[l].bind(this));this.nativeDraggable=t.forceFallback?!1:qM,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?pe(e,"pointerdown",this._onTapStart):(pe(e,"mousedown",this._onTapStart),pe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(pe(e,"dragover",this),pe(e,"dragenter",this)),In.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ut(this,VM())}q.prototype={constructor:q,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Ra=null)},_getDirection:function(t,a){return typeof this.options.direction=="function"?this.options.direction.call(this,t,a,$):this.options.direction},_onTapStart:function(t){if(!!t.cancelable){var a=this,r=this.el,l=this.options,i=l.preventOnFilter,c=t.type,f=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,d=(f||t).target,g=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||d,m=l.filter;if(cg(r),!$&&!(/mousedown|pointerdown/.test(c)&&t.button!==0||l.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&Cr&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=_t(d,l.draggable,r,!1),!(d&&d.animated)&&Tn!==d)){if(Ba=bt(d),Ar=bt(d,l.draggable),typeof m=="function"){if(m.call(this,t,d,this)){rt({sortable:a,rootEl:g,name:"filter",targetEl:d,toEl:r,fromEl:r}),ot("filter",a,{evt:t}),i&&t.cancelable&&t.preventDefault();return}}else if(m&&(m=m.split(",").some(function(v){if(v=_t(g,v.trim(),r,!1),v)return rt({sortable:a,rootEl:v,name:"filter",targetEl:d,fromEl:r,toEl:r}),ot("filter",a,{evt:t}),!0}),m)){i&&t.cancelable&&t.preventDefault();return}l.handle&&!_t(g,l.handle,r,!1)||this._prepareDragStart(t,f,d)}}},_prepareDragStart:function(t,a,r){var l=this,i=l.el,c=l.options,f=i.ownerDocument,d;if(r&&!$&&r.parentNode===i){var g=Ue(r);if(Ye=i,$=r,ke=$.parentNode,ba=$.nextSibling,Tn=r,Dn=c.group,q.dragged=$,Ea={target:$,clientX:(a||t).clientX,clientY:(a||t).clientY},yc=Ea.clientX-g.left,vc=Ea.clientY-g.top,this._lastX=(a||t).clientX,this._lastY=(a||t).clientY,$.style["will-change"]="all",d=function(){if(ot("delayEnded",l,{evt:t}),q.eventCanceled){l._onDrop();return}l._disableDelayedDragEvents(),!ic&&l.nativeDraggable&&($.draggable=!0),l._triggerDragStart(t,a),rt({sortable:l,name:"choose",originalEvent:t}),ht($,c.chosenClass,!0)},c.ignore.split(",").forEach(function(m){dc($,m.trim(),jo)}),pe(f,"dragover",za),pe(f,"mousemove",za),pe(f,"touchmove",za),pe(f,"mouseup",l._onDrop),pe(f,"touchend",l._onDrop),pe(f,"touchcancel",l._onDrop),ic&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$.draggable=!0),ot("delayStart",this,{evt:t}),c.delay&&(!c.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(Dr||Gt))){if(q.eventCanceled){this._onDrop();return}pe(f,"mouseup",l._disableDelayedDrag),pe(f,"touchend",l._disableDelayedDrag),pe(f,"touchcancel",l._disableDelayedDrag),pe(f,"mousemove",l._delayedDragTouchMoveHandler),pe(f,"touchmove",l._delayedDragTouchMoveHandler),c.supportPointer&&pe(f,"pointermove",l._delayedDragTouchMoveHandler),l._dragStartTimer=setTimeout(d,c.delay)}else d()}},_delayedDragTouchMoveHandler:function(t){var a=t.touches?t.touches[0]:t;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){$&&jo($),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;de(t,"mouseup",this._disableDelayedDrag),de(t,"touchend",this._disableDelayedDrag),de(t,"touchcancel",this._disableDelayedDrag),de(t,"mousemove",this._delayedDragTouchMoveHandler),de(t,"touchmove",this._delayedDragTouchMoveHandler),de(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,a){a=a||t.pointerType=="touch"&&t,!this.nativeDraggable||a?this.options.supportPointer?pe(document,"pointermove",this._onTouchMove):a?pe(document,"touchmove",this._onTouchMove):pe(document,"mousemove",this._onTouchMove):(pe($,"dragend",this),pe(Ye,"dragstart",this._onDragStart));try{document.selection?Yn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,a){if($a=!1,Ye&&$){ot("dragStarted",this,{evt:a}),this.nativeDraggable&&pe(document,"dragover",tg);var r=this.options;!t&&ht($,r.dragClass,!1),ht($,r.ghostClass,!0),q.active=this,t&&this._appendGhost(),rt({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(Ct){this._lastX=Ct.clientX,this._lastY=Ct.clientY,zc();for(var t=document.elementFromPoint(Ct.clientX,Ct.clientY),a=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ct.clientX,Ct.clientY),t!==a);)a=t;if($.parentNode[mt]._isOutsideThisEl(t),a)do{if(a[mt]){var r=void 0;if(r=a[mt]._onDragOver({clientX:Ct.clientX,clientY:Ct.clientY,target:t,rootEl:a}),r&&!this.options.dragoverBubble)break}t=a}while(a=a.parentNode);Tc()}},_onTouchMove:function(t){if(Ea){var a=this.options,r=a.fallbackTolerance,l=a.fallbackOffset,i=t.touches?t.touches[0]:t,c=ae&&ka(ae,!0),f=ae&&c&&c.a,d=ae&&c&&c.d,g=Sn&&qe&&gc(qe),m=(i.clientX-Ea.clientX+l.x)/(f||1)+(g?g[0]-vo[0]:0)/(f||1),v=(i.clientY-Ea.clientY+l.y)/(d||1)+(g?g[1]-vo[1]:0)/(d||1);if(!q.active&&!$a){if(r&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<r)return;this._onDragStart(t,!0)}if(ae){c?(c.e+=m-(po||0),c.f+=v-(yo||0)):c={a:1,b:0,c:0,d:1,e:m,f:v};var j="matrix(".concat(c.a,",").concat(c.b,",").concat(c.c,",").concat(c.d,",").concat(c.e,",").concat(c.f,")");ee(ae,"webkitTransform",j),ee(ae,"mozTransform",j),ee(ae,"msTransform",j),ee(ae,"transform",j),po=m,yo=v,Ct=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!ae){var t=this.options.fallbackOnBody?document.body:Ye,a=Ue($,!0,Sn,!0,t),r=this.options;if(Sn){for(qe=t;ee(qe,"position")==="static"&&ee(qe,"transform")==="none"&&qe!==document;)qe=qe.parentNode;qe!==document.body&&qe!==document.documentElement?(qe===document&&(qe=Pt()),a.top+=qe.scrollTop,a.left+=qe.scrollLeft):qe=Pt(),vo=gc(qe)}ae=$.cloneNode(!0),ht(ae,r.ghostClass,!1),ht(ae,r.fallbackClass,!0),ht(ae,r.dragClass,!0),ee(ae,"transition",""),ee(ae,"transform",""),ee(ae,"box-sizing","border-box"),ee(ae,"margin",0),ee(ae,"top",a.top),ee(ae,"left",a.left),ee(ae,"width",a.width),ee(ae,"height",a.height),ee(ae,"opacity","0.8"),ee(ae,"position",Sn?"absolute":"fixed"),ee(ae,"zIndex","100000"),ee(ae,"pointerEvents","none"),q.ghost=ae,t.appendChild(ae),ee(ae,"transform-origin",yc/parseInt(ae.style.width)*100+"% "+vc/parseInt(ae.style.height)*100+"%")}},_onDragStart:function(t,a){var r=this,l=t.dataTransfer,i=r.options;if(ot("dragStart",this,{evt:t}),q.eventCanceled){this._onDrop();return}ot("setupClone",this),q.eventCanceled||(_e=pc($),_e.draggable=!1,_e.style["will-change"]="",this._hideClone(),ht(_e,this.options.chosenClass,!1),q.clone=_e),r.cloneId=Yn(function(){ot("clone",r),!q.eventCanceled&&(r.options.removeCloneOnHide||Ye.insertBefore(_e,$),r._hideClone(),rt({sortable:r,name:"clone"}))}),!a&&ht($,i.dragClass,!0),a?(Cn=!0,r._loopId=setInterval(r._emulateDragOver,50)):(de(document,"mouseup",r._onDrop),de(document,"touchend",r._onDrop),de(document,"touchcancel",r._onDrop),l&&(l.effectAllowed="move",i.setData&&i.setData.call(r,l,$)),pe(document,"drop",r),ee($,"transform","translateZ(0)")),$a=!0,r._dragStartId=Yn(r._dragStarted.bind(r,a,t)),pe(document,"selectstart",r),wr=!0,Cr&&ee(document.body,"user-select","none")},_onDragOver:function(t){var a=this.el,r=t.target,l,i,c,f=this.options,d=f.group,g=q.active,m=Dn===d,v=f.sort,j=Ze||g,b,T=this,y=!1;if(No)return;function N(De,ge){ot(De,T,kt({evt:t,isOwner:m,axis:b?"vertical":"horizontal",revert:c,dragRect:l,targetRect:i,canSort:v,fromSortable:j,target:r,completed:L,onMove:function(F,we){return On(Ye,a,$,l,F,Ue(F),t,we)},changed:x},ge))}function C(){N("dragOverAnimationCapture"),T.captureAnimationState(),T!==j&&j.captureAnimationState()}function L(De){return N("dragOverCompleted",{insertion:De}),De&&(m?g._hideClone():g._showClone(T),T!==j&&(ht($,Ze?Ze.options.ghostClass:g.options.ghostClass,!1),ht($,f.ghostClass,!0)),Ze!==T&&T!==q.active?Ze=T:T===q.active&&Ze&&(Ze=null),j===T&&(T._ignoreWhileAnimating=r),T.animateAll(function(){N("dragOverAnimationComplete"),T._ignoreWhileAnimating=null}),T!==j&&(j.animateAll(),j._ignoreWhileAnimating=null)),(r===$&&!$.animated||r===a&&!r.animated)&&(Ra=null),!f.dragoverBubble&&!t.rootEl&&r!==document&&($.parentNode[mt]._isOutsideThisEl(t.target),!De&&za(t)),!f.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function x(){pt=bt($),Ma=bt($,f.draggable),rt({sortable:T,name:"change",toEl:a,newIndex:pt,newDraggableIndex:Ma,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),r=_t(r,f.draggable,a,!0),N("dragOver"),q.eventCanceled)return y;if($.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||T._ignoreWhileAnimating===r)return L(!1);if(Cn=!1,g&&!f.disabled&&(m?v||(c=ke!==Ye):Ze===this||(this.lastPutMode=Dn.checkPull(this,g,$,t))&&d.checkPut(this,g,$,t))){if(b=this._getDirection(t,r)==="vertical",l=Ue($),N("dragOverValid"),q.eventCanceled)return y;if(c)return ke=Ye,C(),this._hideClone(),N("revert"),q.eventCanceled||(ba?Ye.insertBefore($,ba):Ye.appendChild($)),L(!0);var S=go(a,f.draggable);if(!S||lg(t,b,this)&&!S.animated){if(S===$)return L(!1);if(S&&a===t.target&&(r=S),r&&(i=Ue(r)),On(Ye,a,$,l,r,i,t,!!r)!==!1)return C(),a.appendChild($),ke=a,x(),L(!0)}else if(S&&ng(t,b,this)){var A=_a(a,0,f,!0);if(A===$)return L(!1);if(r=A,i=Ue(r),On(Ye,a,$,l,r,i,t,!1)!==!1)return C(),a.insertBefore($,A),ke=a,x(),L(!0)}else if(r.parentNode===a){i=Ue(r);var Z=0,X,P=$.parentNode!==a,Q=!WM($.animated&&$.toRect||l,r.animated&&r.toRect||i,b),be=b?"top":"left",Be=Mc(r,"top","top")||Mc($,"top","top"),$e=Be?Be.scrollTop:void 0;Ra!==r&&(X=i[be],Sr=!1,Ln=!Q&&f.invertSwap||P),Z=og(t,r,i,b,Q?1:f.swapThreshold,f.invertedSwapThreshold==null?f.swapThreshold:f.invertedSwapThreshold,Ln,Ra===r);var ye;if(Z!==0){var W=bt($);do W-=Z,ye=ke.children[W];while(ye&&(ee(ye,"display")==="none"||ye===ae))}if(Z===0||ye===r)return L(!1);Ra=r,xr=Z;var ve=r.nextElementSibling,k=!1;k=Z===1;var Ae=On(Ye,a,$,l,r,i,t,k);if(Ae!==!1)return(Ae===1||Ae===-1)&&(k=Ae===1),No=!0,setTimeout(rg,30),C(),k&&!ve?a.appendChild($):r.parentNode.insertBefore($,k?ve:r),Be&&mc(Be,0,$e-Be.scrollTop),ke=$.parentNode,X!==void 0&&!Ln&&(An=Math.abs(X-Ue(r)[be])),x(),L(!0)}if(a.contains($))return L(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){de(document,"mousemove",this._onTouchMove),de(document,"touchmove",this._onTouchMove),de(document,"pointermove",this._onTouchMove),de(document,"dragover",za),de(document,"mousemove",za),de(document,"touchmove",za)},_offUpEvents:function(){var t=this.el.ownerDocument;de(t,"mouseup",this._onDrop),de(t,"touchend",this._onDrop),de(t,"pointerup",this._onDrop),de(t,"touchcancel",this._onDrop),de(document,"selectstart",this)},_onDrop:function(t){var a=this.el,r=this.options;if(pt=bt($),Ma=bt($,r.draggable),ot("drop",this,{evt:t}),ke=$&&$.parentNode,pt=bt($),Ma=bt($,r.draggable),q.eventCanceled){this._nulling();return}$a=!1,Ln=!1,Sr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),bo(this.cloneId),bo(this._dragStartId),this.nativeDraggable&&(de(document,"drop",this),de(a,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Cr&&ee(document.body,"user-select",""),ee($,"transform",""),t&&(wr&&(t.cancelable&&t.preventDefault(),!r.dropBubble&&t.stopPropagation()),ae&&ae.parentNode&&ae.parentNode.removeChild(ae),(Ye===ke||Ze&&Ze.lastPutMode!=="clone")&&_e&&_e.parentNode&&_e.parentNode.removeChild(_e),$&&(this.nativeDraggable&&de($,"dragend",this),jo($),$.style["will-change"]="",wr&&!$a&&ht($,Ze?Ze.options.ghostClass:this.options.ghostClass,!1),ht($,this.options.chosenClass,!1),rt({sortable:this,name:"unchoose",toEl:ke,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ye!==ke?(pt>=0&&(rt({rootEl:ke,name:"add",toEl:ke,fromEl:Ye,originalEvent:t}),rt({sortable:this,name:"remove",toEl:ke,originalEvent:t}),rt({rootEl:ke,name:"sort",toEl:ke,fromEl:Ye,originalEvent:t}),rt({sortable:this,name:"sort",toEl:ke,originalEvent:t})),Ze&&Ze.save()):pt!==Ba&&pt>=0&&(rt({sortable:this,name:"update",toEl:ke,originalEvent:t}),rt({sortable:this,name:"sort",toEl:ke,originalEvent:t})),q.active&&((pt==null||pt===-1)&&(pt=Ba,Ma=Ar),rt({sortable:this,name:"end",toEl:ke,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ot("nulling",this),Ye=$=ke=ae=ba=_e=Tn=da=Ea=Ct=wr=pt=Ma=Ba=Ar=Ra=xr=Ze=Dn=q.dragged=q.ghost=q.clone=q.active=null,wn.forEach(function(t){t.checked=!0}),wn.length=po=yo=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":$&&(this._onDragOver(t),ag(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],a,r=this.el.children,l=0,i=r.length,c=this.options;l<i;l++)a=r[l],_t(a,c.draggable,this.el,!1)&&t.push(a.getAttribute(c.dataIdAttr)||ig(a));return t},sort:function(t,a){var r={},l=this.el;this.toArray().forEach(function(i,c){var f=l.children[c];_t(f,this.options.draggable,l,!1)&&(r[i]=f)},this),a&&this.captureAnimationState(),t.forEach(function(i){r[i]&&(l.removeChild(r[i]),l.appendChild(r[i]))}),a&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,a){return _t(t,a||this.options.draggable,this.el,!1)},option:function(t,a){var r=this.options;if(a===void 0)return r[t];var l=Lr.modifyOption(this,t,a);typeof l!="undefined"?r[t]=l:r[t]=a,t==="group"&&Ec(r)},destroy:function(){ot("destroy",this);var t=this.el;t[mt]=null,de(t,"mousedown",this._onTapStart),de(t,"touchstart",this._onTapStart),de(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(de(t,"dragover",this),de(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),In.splice(In.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!da){if(ot("hideClone",this),q.eventCanceled)return;ee(_e,"display","none"),this.options.removeCloneOnHide&&_e.parentNode&&_e.parentNode.removeChild(_e),da=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(da){if(ot("showClone",this),q.eventCanceled)return;$.parentNode==Ye&&!this.options.group.revertClone?Ye.insertBefore(_e,$):ba?Ye.insertBefore(_e,ba):Ye.appendChild(_e),this.options.group.revertClone&&this.animate($,_e),ee(_e,"display",""),da=!1}}};function ag(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function On(e,t,a,r,l,i,c,f){var d,g=e[mt],m=g.options.onMove,v;return window.CustomEvent&&!Gt&&!Dr?d=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(d=document.createEvent("Event"),d.initEvent("move",!0,!0)),d.to=t,d.from=e,d.dragged=a,d.draggedRect=r,d.related=l||t,d.relatedRect=i||Ue(t),d.willInsertAfter=f,d.originalEvent=c,e.dispatchEvent(d),m&&(v=m.call(g,d,c)),v}function jo(e){e.draggable=!1}function rg(){No=!1}function ng(e,t,a){var r=Ue(_a(a.el,0,a.options,!0)),l=10;return t?e.clientX<r.left-l||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-l||e.clientY<r.bottom&&e.clientX<r.left}function lg(e,t,a){var r=Ue(go(a.el,a.options.draggable)),l=10;return t?e.clientX>r.right+l||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+l}function og(e,t,a,r,l,i,c,f){var d=r?e.clientY:e.clientX,g=r?a.height:a.width,m=r?a.top:a.left,v=r?a.bottom:a.right,j=!1;if(!c){if(f&&An<g*l){if(!Sr&&(xr===1?d>m+g*i/2:d<v-g*i/2)&&(Sr=!0),Sr)j=!0;else if(xr===1?d<m+An:d>v-An)return-xr}else if(d>m+g*(1-l)/2&&d<v-g*(1-l)/2)return ug(t)}return j=j||c,j&&(d<m+g*i/2||d>v-g*i/2)?d>m+g/2?1:-1:0}function ug(e){return bt($)<bt(e)?1:-1}function ig(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,a=t.length,r=0;a--;)r+=t.charCodeAt(a);return r.toString(36)}function cg(e){wn.length=0;for(var t=e.getElementsByTagName("input"),a=t.length;a--;){var r=t[a];r.checked&&wn.push(r)}}function Yn(e){return setTimeout(e,0)}function bo(e){return clearTimeout(e)}xn&&pe(document,"touchmove",function(e){(q.active||$a)&&e.cancelable&&e.preventDefault()}),q.utils={on:pe,off:de,css:ee,find:dc,is:function(t,a){return!!_t(t,a,t,!1)},extend:HM,throttle:hc,closest:_t,toggleClass:ht,clone:pc,index:bt,nextTick:Yn,cancelNextTick:bo,detectDirection:bc,getChild:_a},q.get=function(e){return e[mt]},q.mount=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];t[0].constructor===Array&&(t=t[0]),t.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(q.utils=kt(kt({},q.utils),r.utils)),Lr.mount(r)})},q.create=function(e,t){return new q(e,t)},q.version=$M;var Qe=[],Or,Eo,zo=!1,To,Do,Fn,Yr;function sg(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(a){var r=a.originalEvent;this.sortable.nativeDraggable?pe(document,"dragover",this._handleAutoScroll):this.options.supportPointer?pe(document,"pointermove",this._handleFallbackAutoScroll):r.touches?pe(document,"touchmove",this._handleFallbackAutoScroll):pe(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(a){var r=a.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?de(document,"dragover",this._handleAutoScroll):(de(document,"pointermove",this._handleFallbackAutoScroll),de(document,"touchmove",this._handleFallbackAutoScroll),de(document,"mousemove",this._handleFallbackAutoScroll)),Dc(),kn(),GM()},nulling:function(){Fn=Eo=Or=zo=Yr=To=Do=null,Qe.length=0},_handleFallbackAutoScroll:function(a){this._handleAutoScroll(a,!0)},_handleAutoScroll:function(a,r){var l=this,i=(a.touches?a.touches[0]:a).clientX,c=(a.touches?a.touches[0]:a).clientY,f=document.elementFromPoint(i,c);if(Fn=a,r||this.options.forceAutoScrollFallback||Dr||Gt||Cr){Co(a,this.options,f,r);var d=fa(f,!0);zo&&(!Yr||i!==To||c!==Do)&&(Yr&&Dc(),Yr=setInterval(function(){var g=fa(document.elementFromPoint(i,c),!0);g!==d&&(d=g,kn()),Co(a,l.options,g,r)},10),To=i,Do=c)}else{if(!this.options.bubbleScroll||fa(f,!0)===Pt()){kn();return}Co(a,this.options,fa(f,!1),!1)}}},Ut(e,{pluginName:"scroll",initializeByDefault:!0})}function kn(){Qe.forEach(function(e){clearInterval(e.pid)}),Qe=[]}function Dc(){clearInterval(Yr)}var Co=hc(function(e,t,a,r){if(!!t.scroll){var l=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,c=t.scrollSensitivity,f=t.scrollSpeed,d=Pt(),g=!1,m;Eo!==a&&(Eo=a,kn(),Or=t.scroll,m=t.scrollFn,Or===!0&&(Or=fa(a,!0)));var v=0,j=Or;do{var b=j,T=Ue(b),y=T.top,N=T.bottom,C=T.left,L=T.right,x=T.width,S=T.height,A=void 0,Z=void 0,X=b.scrollWidth,P=b.scrollHeight,Q=ee(b),be=b.scrollLeft,Be=b.scrollTop;b===d?(A=x<X&&(Q.overflowX==="auto"||Q.overflowX==="scroll"||Q.overflowX==="visible"),Z=S<P&&(Q.overflowY==="auto"||Q.overflowY==="scroll"||Q.overflowY==="visible")):(A=x<X&&(Q.overflowX==="auto"||Q.overflowX==="scroll"),Z=S<P&&(Q.overflowY==="auto"||Q.overflowY==="scroll"));var $e=A&&(Math.abs(L-l)<=c&&be+x<X)-(Math.abs(C-l)<=c&&!!be),ye=Z&&(Math.abs(N-i)<=c&&Be+S<P)-(Math.abs(y-i)<=c&&!!Be);if(!Qe[v])for(var W=0;W<=v;W++)Qe[W]||(Qe[W]={});(Qe[v].vx!=$e||Qe[v].vy!=ye||Qe[v].el!==b)&&(Qe[v].el=b,Qe[v].vx=$e,Qe[v].vy=ye,clearInterval(Qe[v].pid),($e!=0||ye!=0)&&(g=!0,Qe[v].pid=setInterval(function(){r&&this.layer===0&&q.active._onTouchMove(Fn);var ve=Qe[this.layer].vy?Qe[this.layer].vy*f:0,k=Qe[this.layer].vx?Qe[this.layer].vx*f:0;typeof m=="function"&&m.call(q.dragged.parentNode[mt],k,ve,e,Fn,Qe[this.layer].el)!=="continue"||mc(Qe[this.layer].el,k,ve)}.bind({layer:v}),24))),v++}while(t.bubbleScroll&&j!==d&&(j=fa(j,!1)));zo=g}},30),Cc=function(t){var a=t.originalEvent,r=t.putSortable,l=t.dragEl,i=t.activeSortable,c=t.dispatchSortableEvent,f=t.hideGhostForTarget,d=t.unhideGhostForTarget;if(!!a){var g=r||i;f();var m=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,v=document.elementFromPoint(m.clientX,m.clientY);d(),g&&!g.el.contains(v)&&(c("spill"),this.onSpill({dragEl:l,putSortable:r}))}};function Io(){}Io.prototype={startIndex:null,dragStart:function(t){var a=t.oldDraggableIndex;this.startIndex=a},onSpill:function(t){var a=t.dragEl,r=t.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var l=_a(this.sortable.el,this.startIndex,this.options);l?this.sortable.el.insertBefore(a,l):this.sortable.el.appendChild(a),this.sortable.animateAll(),r&&r.animateAll()},drop:Cc},Ut(Io,{pluginName:"revertOnSpill"});function Lo(){}Lo.prototype={onSpill:function(t){var a=t.dragEl,r=t.putSortable,l=r||this.sortable;l.captureAnimationState(),a.parentNode&&a.parentNode.removeChild(a),l.animateAll()},drop:Cc},Ut(Lo,{pluginName:"removeOnSpill"}),q.mount(new sg),q.mount(Lo,Io);const ut=e=>{const{name:t,prefix:a,color:r,className:l,style:i,onClick:c}=e,f=`#${a}-${t}`;return n.default.createElement("span",{style:{display:"inline-flex",alignItems:"center"}},n.default.createElement("svg",{"aria-hidden":"true",className:`svg-icon ${l}`,style:i,onClick:c},n.default.createElement("use",{xlinkHref:f,fill:r})))};ut.defaultProps={prefix:"svg-icon",color:"currentColor",className:"",style:{},onClick:()=>{}};const fg=e=>{const{componentGroup:{title:t,components:a}}=e,r=l=>{if(l){const i={sort:!1,ghostClass:"ghost",group:{name:"people",pull:"clone",put:!1},setData:(c,f)=>{c.setData("SortableDataClone",JSON.stringify(a[parseInt(f.dataset.index,10)]))}};q.create(l,i)}};return n.default.createElement(n.default.Fragment,null,n.default.createElement("div",{className:"widget-cate"},t),n.default.createElement("ul",{ref:r},a.map((l,i)=>n.default.createElement("li",{key:l.type,className:"form-edit-widget-label","data-index":i},n.default.createElement("a",{href:"/#"},n.default.createElement(ut,{name:l.icon}),n.default.createElement("span",null,l.label))))))},Ic=e=>{const{value:t,language:a,onChange:r,height:l,theme:i,readonly:c}=e,f=Y.useRef(null),d=()=>{var v,j;const g=(v=window.monaco)==null?void 0:v.editor.createModel(t,a),m=(j=window.monaco)==null?void 0:j.editor.create(f.current,{model:g,theme:i,tabSize:2,fontSize:14,formatOnType:!0,formatOnPaste:!0,automaticLayout:!0,emptySelectionClipboard:!0,scrollBeyondLastLine:!0,readOnly:c,minimap:{enabled:!1},scrollbar:{vertical:"hidden",horizontal:"hidden",verticalScrollbarSize:0,horizontalScrollbarSize:0,alwaysConsumeMouseWheel:!1}});m==null||m.onDidChangeModelContent(()=>r==null?void 0:r(m.getValue()))};return Y.useEffect(d,[]),n.default.createElement("div",{ref:f,style:{height:l,border:"1px solid lightgrey"}})};Ic.defaultProps={height:"100%",theme:"vs",language:void 0,onChange:void 0,readonly:!1};var Fr=Y.memo(Ic),dg=typeof global=="object"&&global&&global.Object===Object&&global,Lc=dg,Mg=typeof self=="object"&&self&&self.Object===Object&&self,gg=Lc||Mg||Function("return this")(),It=gg,hg=It.Symbol,Bt=hg,Ac=Object.prototype,mg=Ac.hasOwnProperty,pg=Ac.toString,kr=Bt?Bt.toStringTag:void 0;function yg(e){var t=mg.call(e,kr),a=e[kr];try{e[kr]=void 0;var r=!0}catch{}var l=pg.call(e);return r&&(t?e[kr]=a:delete e[kr]),l}var vg=Object.prototype,Ng=vg.toString;function jg(e){return Ng.call(e)}var bg="[object Null]",Eg="[object Undefined]",wc=Bt?Bt.toStringTag:void 0;function ga(e){return e==null?e===void 0?Eg:bg:wc&&wc in Object(e)?yg(e):jg(e)}function Lt(e){return e!=null&&typeof e=="object"}var zg="[object Symbol]";function _n(e){return typeof e=="symbol"||Lt(e)&&ga(e)==zg}function xc(e,t){for(var a=-1,r=e==null?0:e.length,l=Array(r);++a<r;)l[a]=t(e[a],a,e);return l}var Tg=Array.isArray,Je=Tg,Dg=1/0,Sc=Bt?Bt.prototype:void 0,Oc=Sc?Sc.toString:void 0;function Yc(e){if(typeof e=="string")return e;if(Je(e))return xc(e,Yc)+"";if(_n(e))return Oc?Oc.call(e):"";var t=e+"";return t=="0"&&1/e==-Dg?"-0":t}var Cg=/\s/;function Ig(e){for(var t=e.length;t--&&Cg.test(e.charAt(t)););return t}var Lg=/^\s+/;function Ag(e){return e&&e.slice(0,Ig(e)+1).replace(Lg,"")}function nt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Fc=0/0,wg=/^[-+]0x[0-9a-f]+$/i,xg=/^0b[01]+$/i,Sg=/^0o[0-7]+$/i,Og=parseInt;function kc(e){if(typeof e=="number")return e;if(_n(e))return Fc;if(nt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=nt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ag(e);var a=xg.test(e);return a||Sg.test(e)?Og(e.slice(2),a?2:8):wg.test(e)?Fc:+e}function Pn(e){return e}var Yg="[object AsyncFunction]",Fg="[object Function]",kg="[object GeneratorFunction]",_g="[object Proxy]";function Ao(e){if(!nt(e))return!1;var t=ga(e);return t==Fg||t==kg||t==Yg||t==_g}var Pg=It["__core-js_shared__"],wo=Pg,_c=function(){var e=/[^.]+$/.exec(wo&&wo.keys&&wo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Bg(e){return!!_c&&_c in e}var $g=Function.prototype,Rg=$g.toString;function Ta(e){if(e!=null){try{return Rg.call(e)}catch{}try{return e+""}catch{}}return""}var Qg=/[\\^$.*+?()[\]{}|]/g,Ug=/^\[object .+?Constructor\]$/,Hg=Function.prototype,Gg=Object.prototype,Vg=Hg.toString,Zg=Gg.hasOwnProperty,Jg=RegExp("^"+Vg.call(Zg).replace(Qg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Xg(e){if(!nt(e)||Bg(e))return!1;var t=Ao(e)?Jg:Ug;return t.test(Ta(e))}function Kg(e,t){return e==null?void 0:e[t]}function Da(e,t){var a=Kg(e,t);return Xg(a)?a:void 0}var qg=Da(It,"WeakMap"),xo=qg,Pc=Object.create,Wg=function(){function e(){}return function(t){if(!nt(t))return{};if(Pc)return Pc(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}(),eh=Wg;function th(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}function Bc(e,t){var a=-1,r=e.length;for(t||(t=Array(r));++a<r;)t[a]=e[a];return t}var ah=800,rh=16,nh=Date.now;function lh(e){var t=0,a=0;return function(){var r=nh(),l=rh-(r-a);if(a=r,l>0){if(++t>=ah)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function oh(e){return function(){return e}}var uh=function(){try{var e=Da(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Bn=uh,ih=Bn?function(e,t){return Bn(e,"toString",{configurable:!0,enumerable:!1,value:oh(t),writable:!0})}:Pn,ch=ih,sh=lh(ch),fh=sh;function $c(e,t){for(var a=-1,r=e==null?0:e.length;++a<r&&t(e[a],a,e)!==!1;);return e}var dh=9007199254740991,Mh=/^(?:0|[1-9]\d*)$/;function $n(e,t){var a=typeof e;return t=t==null?dh:t,!!t&&(a=="number"||a!="symbol"&&Mh.test(e))&&e>-1&&e%1==0&&e<t}function So(e,t,a){t=="__proto__"&&Bn?Bn(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}function _r(e,t){return e===t||e!==e&&t!==t}var gh=Object.prototype,hh=gh.hasOwnProperty;function Oo(e,t,a){var r=e[t];(!(hh.call(e,t)&&_r(r,a))||a===void 0&&!(t in e))&&So(e,t,a)}function Pr(e,t,a,r){var l=!a;a||(a={});for(var i=-1,c=t.length;++i<c;){var f=t[i],d=r?r(a[f],e[f],f,a,e):void 0;d===void 0&&(d=e[f]),l?So(a,f,d):Oo(a,f,d)}return a}var Rc=Math.max;function mh(e,t,a){return t=Rc(t===void 0?e.length-1:t,0),function(){for(var r=arguments,l=-1,i=Rc(r.length-t,0),c=Array(i);++l<i;)c[l]=r[t+l];l=-1;for(var f=Array(t+1);++l<t;)f[l]=r[l];return f[t]=a(c),th(e,this,f)}}function ph(e,t){return fh(mh(e,t,Pn),e+"")}var yh=9007199254740991;function Yo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=yh}function Qa(e){return e!=null&&Yo(e.length)&&!Ao(e)}function vh(e,t,a){if(!nt(a))return!1;var r=typeof t;return(r=="number"?Qa(a)&&$n(t,a.length):r=="string"&&t in a)?_r(a[t],e):!1}function Nh(e){return ph(function(t,a){var r=-1,l=a.length,i=l>1?a[l-1]:void 0,c=l>2?a[2]:void 0;for(i=e.length>3&&typeof i=="function"?(l--,i):void 0,c&&vh(a[0],a[1],c)&&(i=l<3?void 0:i,l=1),t=Object(t);++r<l;){var f=a[r];f&&e(t,f,r,i)}return t})}var jh=Object.prototype;function Fo(e){var t=e&&e.constructor,a=typeof t=="function"&&t.prototype||jh;return e===a}function bh(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}var Eh="[object Arguments]";function Qc(e){return Lt(e)&&ga(e)==Eh}var Uc=Object.prototype,zh=Uc.hasOwnProperty,Th=Uc.propertyIsEnumerable,Dh=Qc(function(){return arguments}())?Qc:function(e){return Lt(e)&&zh.call(e,"callee")&&!Th.call(e,"callee")},Rn=Dh;function Ch(){return!1}var Hc=typeof fe=="object"&&fe&&!fe.nodeType&&fe,Gc=Hc&&typeof module=="object"&&module&&!module.nodeType&&module,Ih=Gc&&Gc.exports===Hc,Vc=Ih?It.Buffer:void 0,Lh=Vc?Vc.isBuffer:void 0,Ah=Lh||Ch,Br=Ah,wh="[object Arguments]",xh="[object Array]",Sh="[object Boolean]",Oh="[object Date]",Yh="[object Error]",Fh="[object Function]",kh="[object Map]",_h="[object Number]",Ph="[object Object]",Bh="[object RegExp]",$h="[object Set]",Rh="[object String]",Qh="[object WeakMap]",Uh="[object ArrayBuffer]",Hh="[object DataView]",Gh="[object Float32Array]",Vh="[object Float64Array]",Zh="[object Int8Array]",Jh="[object Int16Array]",Xh="[object Int32Array]",Kh="[object Uint8Array]",qh="[object Uint8ClampedArray]",Wh="[object Uint16Array]",e2="[object Uint32Array]",Ie={};Ie[Gh]=Ie[Vh]=Ie[Zh]=Ie[Jh]=Ie[Xh]=Ie[Kh]=Ie[qh]=Ie[Wh]=Ie[e2]=!0,Ie[wh]=Ie[xh]=Ie[Uh]=Ie[Sh]=Ie[Hh]=Ie[Oh]=Ie[Yh]=Ie[Fh]=Ie[kh]=Ie[_h]=Ie[Ph]=Ie[Bh]=Ie[$h]=Ie[Rh]=Ie[Qh]=!1;function t2(e){return Lt(e)&&Yo(e.length)&&!!Ie[ga(e)]}function ko(e){return function(t){return e(t)}}var Zc=typeof fe=="object"&&fe&&!fe.nodeType&&fe,$r=Zc&&typeof module=="object"&&module&&!module.nodeType&&module,a2=$r&&$r.exports===Zc,_o=a2&&Lc.process,r2=function(){try{var e=$r&&$r.require&&$r.require("util").types;return e||_o&&_o.binding&&_o.binding("util")}catch{}}(),Ua=r2,Jc=Ua&&Ua.isTypedArray,n2=Jc?ko(Jc):t2,Po=n2,l2=Object.prototype,o2=l2.hasOwnProperty;function Xc(e,t){var a=Je(e),r=!a&&Rn(e),l=!a&&!r&&Br(e),i=!a&&!r&&!l&&Po(e),c=a||r||l||i,f=c?bh(e.length,String):[],d=f.length;for(var g in e)(t||o2.call(e,g))&&!(c&&(g=="length"||l&&(g=="offset"||g=="parent")||i&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||$n(g,d)))&&f.push(g);return f}function Kc(e,t){return function(a){return e(t(a))}}var u2=Kc(Object.keys,Object),i2=u2,c2=Object.prototype,s2=c2.hasOwnProperty;function f2(e){if(!Fo(e))return i2(e);var t=[];for(var a in Object(e))s2.call(e,a)&&a!="constructor"&&t.push(a);return t}function Rr(e){return Qa(e)?Xc(e):f2(e)}function d2(e){var t=[];if(e!=null)for(var a in Object(e))t.push(a);return t}var M2=Object.prototype,g2=M2.hasOwnProperty;function h2(e){if(!nt(e))return d2(e);var t=Fo(e),a=[];for(var r in e)r=="constructor"&&(t||!g2.call(e,r))||a.push(r);return a}function Qr(e){return Qa(e)?Xc(e,!0):h2(e)}var m2=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,p2=/^\w*$/;function Bo(e,t){if(Je(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||_n(e)?!0:p2.test(e)||!m2.test(e)||t!=null&&e in Object(t)}var y2=Da(Object,"create"),Ur=y2;function v2(){this.__data__=Ur?Ur(null):{},this.size=0}function N2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var j2="__lodash_hash_undefined__",b2=Object.prototype,E2=b2.hasOwnProperty;function z2(e){var t=this.__data__;if(Ur){var a=t[e];return a===j2?void 0:a}return E2.call(t,e)?t[e]:void 0}var T2=Object.prototype,D2=T2.hasOwnProperty;function C2(e){var t=this.__data__;return Ur?t[e]!==void 0:D2.call(t,e)}var I2="__lodash_hash_undefined__";function L2(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=Ur&&t===void 0?I2:t,this}function Ca(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}Ca.prototype.clear=v2,Ca.prototype.delete=N2,Ca.prototype.get=z2,Ca.prototype.has=C2,Ca.prototype.set=L2;function A2(){this.__data__=[],this.size=0}function Qn(e,t){for(var a=e.length;a--;)if(_r(e[a][0],t))return a;return-1}var w2=Array.prototype,x2=w2.splice;function S2(e){var t=this.__data__,a=Qn(t,e);if(a<0)return!1;var r=t.length-1;return a==r?t.pop():x2.call(t,a,1),--this.size,!0}function O2(e){var t=this.__data__,a=Qn(t,e);return a<0?void 0:t[a][1]}function Y2(e){return Qn(this.__data__,e)>-1}function F2(e,t){var a=this.__data__,r=Qn(a,e);return r<0?(++this.size,a.push([e,t])):a[r][1]=t,this}function Vt(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}Vt.prototype.clear=A2,Vt.prototype.delete=S2,Vt.prototype.get=O2,Vt.prototype.has=Y2,Vt.prototype.set=F2;var k2=Da(It,"Map"),Hr=k2;function _2(){this.size=0,this.__data__={hash:new Ca,map:new(Hr||Vt),string:new Ca}}function P2(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Un(e,t){var a=e.__data__;return P2(t)?a[typeof t=="string"?"string":"hash"]:a.map}function B2(e){var t=Un(this,e).delete(e);return this.size-=t?1:0,t}function $2(e){return Un(this,e).get(e)}function R2(e){return Un(this,e).has(e)}function Q2(e,t){var a=Un(this,e),r=a.size;return a.set(e,t),this.size+=a.size==r?0:1,this}function Zt(e){var t=-1,a=e==null?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}Zt.prototype.clear=_2,Zt.prototype.delete=B2,Zt.prototype.get=$2,Zt.prototype.has=R2,Zt.prototype.set=Q2;var U2="Expected a function";function $o(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(U2);var a=function(){var r=arguments,l=t?t.apply(this,r):r[0],i=a.cache;if(i.has(l))return i.get(l);var c=e.apply(this,r);return a.cache=i.set(l,c)||i,c};ret