← Back
Editing: index317.js
import{_ as e,az as t,c as n,a5 as r,P as a,x as o,g as l,aG as i,r as u,k as s,c9 as c,q as d,v,e as f,y as p,z as g,F as h,a$ as m,M as y,C as b,w as D,J as S,N as O,K as w,d as I,ca as _,n as T,L as C,X as E,A as x,B as k,ai as P,ag as N,W as U,b2 as K,b3 as M,am as A,R,aj as j,ak as L,b9 as V,ba as H,i as F,bx as B,bw as z,D as q,S as W,aa as $,aQ as X}from"./base-lib.js?v=1765440387";import{c as G,v as Y,g as J,a as Q,i as Z,b as ee,e as te,D as ne,d as re,f as ae,h as oe,j as le,k as ie,l as ue,m as se,n as ce,o as de,p as ve,q as fe,r as pe,s as ge,t as he,u as me,w as ye,x as be,y as De,z as Se,A as Oe,B as we,C as Ie,E as _e,F as Te,G as Ce,H as Ee,I as xe,J as ke,K as Pe,L as Ne,M as Ue}from"./index55.js?v=1765440387";import{_ as Ke,e as Me,l as Ae,L as Re,al as je}from"./utils-lib.js?v=1765440387";import{g as Le}from"./__commonjsHelpers__.js?v=1765440387";import"./useMethod6.js?v=1765440387";import"./validator.js?v=1765440387";import"./index94.js?v=1765440387";import"./column.js?v=1765440387";import"./header-nav-tools.vue_vue_type_script_setup_true_lang.js?v=1765440387";import"./useMethod7.js?v=1765440387";import"./index93.js?v=1765440387";import"./form-item.js?v=1765440387";var Ve=Symbol.for("DndContextType");function He(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Fe="function"==typeof Symbol&&Symbol.observable||"@@observable",Be=function(){return Math.random().toString(36).substring(7).split("").join(".")},ze={INIT:"@@redux/INIT"+Be(),REPLACE:"@@redux/REPLACE"+Be(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Be()}};function qe(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(He(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(He(1));return n(qe)(e,t)}if("function"!=typeof e)throw new Error(He(2));var a=e,o=t,l=[],i=l,u=!1;function s(){i===l&&(i=l.slice())}function c(){if(u)throw new Error(He(3));return o}function d(e){if("function"!=typeof e)throw new Error(He(4));if(u)throw new Error(He(5));var t=!0;return s(),i.push(e),function(){if(t){if(u)throw new Error(He(6));t=!1,s();var n=i.indexOf(e);i.splice(n,1),l=null}}}function v(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(He(7));if(void 0===e.type)throw new Error(He(8));if(u)throw new Error(He(9));try{u=!0,o=a(o,e)}finally{u=!1}for(var t=l=i,n=0;n<t.length;n++){(0,t[n])()}return e}return v({type:ze.INIT}),(r={dispatch:v,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(He(10));a=e,v({type:ze.REPLACE})}})[Fe]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(He(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[Fe]=function(){return this},e},r}function We(e,t,...n){if("undefined"!=typeof process&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,function(){return n[r++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function $e(e){return"object"==typeof e}const Xe="dnd-core/INIT_COORDS",Ge="dnd-core/BEGIN_DRAG",Ye="dnd-core/PUBLISH_DRAG_SOURCE",Je="dnd-core/HOVER",Qe="dnd-core/DROP",Ze="dnd-core/END_DRAG";function et(e,t){return{type:Xe,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const tt={type:Xe,payload:{clientOffset:null,sourceClientOffset:null}};function nt(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:a,getSourceClientOffset:o}=n,l=e.getMonitor(),i=e.getRegistry();e.dispatch(et(a)),function(e,t,n){We(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){We(n.getSource(e),"Expected sourceIds to be registered.")})}(t,l,i);const u=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,l);if(null==u)return void e.dispatch(tt);let s=null;if(a){if(!o)throw new Error("getSourceClientOffset must be defined");!function(e){We("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(o),s=o(u)}e.dispatch(et(a,s));const c=i.getSource(u).beginDrag(l,u);if(null==c)return;!function(e){We($e(e),"Item must be an object.")}(c),i.pinSource(u);const d=i.getSourceType(u);return{type:Ge,payload:{itemType:d,item:c,sourceId:u,clientOffset:a||null,sourceClientOffset:s||null,isSourcePublic:!!r}}}}function rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function at(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){rt(e,t,n[t])})}return e}function ot(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){We(e.isDragging(),"Cannot call drop while not dragging."),We(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n);const a=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n);a.forEach((a,o)=>{const l=function(e,t,n,r){const a=n.getTarget(e);let o=a?a.drop(r,e):void 0;(function(e){We(void 0===e||$e(e),"Drop result must either be an object or undefined.")})(o),void 0===o&&(o=0===t?{}:r.getDropResult());return o}(a,o,r,n),i={type:Qe,payload:{dropResult:at({},t,l)}};e.dispatch(i)})}}function lt(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){We(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();if(null!=r){n.getSource(r,!0).endDrag(t,r),n.unpinSource()}return{type:Ze}}}function it(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function ut(e){return function(t,{clientOffset:n}={}){!function(e){We(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),a=e.getMonitor(),o=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const a=e[r];it(t.getTargetType(a),n)||e.splice(r,1)}}(r,o,a.getItemType()),function(e,t,n){We(t.isDragging(),"Cannot call hover while not dragging."),We(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r<e.length;r++){const t=e[r];We(e.lastIndexOf(t)===r,"Expected targetIds to be unique in the passed array.");We(n.getTarget(t),"Expected targetIds to be registered.")}}(r,a,o),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(r,a,o),{type:Je,payload:{targetIds:r,clientOffset:n||null}}}}function st(e){return function(){if(e.getMonitor().isDragging())return{type:Ye}}}class ct{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const n=function(e){return{beginDrag:nt(e),publishDragSource:st(e),hover:ut(e),drop:ot(e),endDrag:lt(e)}}(this);return Object.keys(n).reduce((r,a)=>{const o=n[a];var l;return r[a]=(l=o,(...n)=>{const r=l.apply(e,n);void 0!==r&&t(r)}),r},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function dt(e,t){return{x:e.x-t.x,y:e.y-t.y}}const vt=[],ft=[];vt.__IS_NONE__=!0,ft.__IS_ALL__=!0;class pt{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;We("function"==typeof e,"listener must be a function."),We(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),a=t.stateId;try{const o=a===r||a===r+1&&!function(e,t){return e!==vt&&(e===ft||void 0===t||(n=e,t.filter(e=>n.indexOf(e)>-1)).length>0);var n}(t.dirtyHandlerIds,n);o||e()}finally{r=a}})}subscribeToOffsetChange(e){We("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return We(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(We(t,"Expected to find a valid target. targetId=".concat(e)),!this.isDragging()||this.didDrop())return!1;return it(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(We(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),a=this.getItemType();if(a&&!it(r,a))return!1;const o=this.getTargetIds();if(!o.length)return!1;const l=o.indexOf(e);return n?l===o.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?dt((o=r,{x:(a=t).x+o.x,y:a.y+o.y}),n):null;var a,o}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?dt(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const gt="undefined"!=typeof global?global:self,ht=gt.MutationObserver||gt.WebKitMutationObserver;function mt(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}const yt="function"==typeof ht?function(e){let t=1;const n=new ht(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:mt;class bt{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const Dt=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=yt(this.flush),this.requestErrorThrow=mt(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},St=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new bt(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(Dt.registerPendingError);const Ot="dnd-core/ADD_SOURCE",wt="dnd-core/ADD_TARGET",It="dnd-core/REMOVE_SOURCE",_t="dnd-core/REMOVE_TARGET";function Tt(e,t){t&&Array.isArray(e)?e.forEach(e=>Tt(e,!1)):We("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var Ct,Et;(Et=Ct||(Ct={})).SOURCE="SOURCE",Et.TARGET="TARGET";let xt=0;function kt(e){const t=(xt++).toString();switch(e){case Ct.SOURCE:return"S".concat(t);case Ct.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}function Pt(e){switch(e[0]){case"S":return Ct.SOURCE;case"T":return Ct.TARGET;default:throw new Error("Cannot parse handler ID: ".concat(e))}}function Nt(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,a]}=n.next();if(a===t)return!0;r=!!e}while(!r);return!1}class Ut{addSource(e,t){Tt(e),function(e){We("function"==typeof e.canDrag,"Expected canDrag to be a function."),We("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),We("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(Ct.SOURCE,e,t);return this.store.dispatch(function(e){return{type:Ot,payload:{sourceId:e}}}(n)),n}addTarget(e,t){Tt(e,!0),function(e){We("function"==typeof e.canDrop,"Expected canDrop to be a function."),We("function"==typeof e.hover,"Expected hover to be a function."),We("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(Ct.TARGET,e,t);return this.store.dispatch(function(e){return{type:wt,payload:{targetId:e}}}(n)),n}containsHandler(e){return Nt(this.dragSources,e)||Nt(this.dropTargets,e)}getSource(e,t=!1){We(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return We(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return We(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return We(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Pt(e)===Ct.SOURCE}isTargetId(e){return Pt(e)===Ct.TARGET}removeSource(e){var t;We(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:It,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},Dt.enqueueTask(St.create(t))}removeTarget(e){We(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:_t,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);We(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){We(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=kt(e);return this.types.set(r,t),e===Ct.SOURCE?this.dragSources.set(r,n):e===Ct.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Kt=(e,t)=>e===t;function Mt(e=vt,t){switch(t.type){case Je:break;case Ot:case wt:case _t:case It:return vt;default:return ft}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,a=function(e,t){const n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const a=[];return n.forEach((e,t)=>{1===e&&a.push(t)}),a}(n,r);if(!(a.length>0||!function(e,t,n=Kt){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r)))return vt;const o=r[r.length-1],l=n[n.length-1];return o!==l&&(o&&a.push(o),l&&a.push(l)),a}function At(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Rt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function jt(e=Rt,t){const{payload:n}=t;switch(t.type){case Xe:case Ge:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Je:return r=e.clientOffset,a=n.clientOffset,!r&&!a||r&&a&&r.x===a.x&&r.y===a.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){At(e,t,n[t])})}return e}({},e,{clientOffset:n.clientOffset});case Ze:case Qe:return Rt;default:return e}var r,a}function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Lt(e,t,n[t])})}return e}const Ht={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ft(e=Ht,t){const{payload:n}=t;switch(t.type){case Ge:return Vt({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Ye:return Vt({},e,{isSourcePublic:!0});case Je:return Vt({},e,{targetIds:n.targetIds});case _t:return-1===e.targetIds.indexOf(n.targetId)?e:Vt({},e,{targetIds:(r=e.targetIds,a=n.targetId,r.filter(e=>e!==a))});case Qe:return Vt({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Ze:return Vt({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,a}function Bt(e=0,t){switch(t.type){case Ot:case wt:return e+1;case It:case _t:return e-1;default:return e}}function zt(e=0){return e+1}function qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){qt(e,t,n[t])})}return e}function $t(e={},t){return{dirtyHandlerIds:Mt(e.dirtyHandlerIds,{type:t.type,payload:Wt({},t.payload,{prevTargetIds:(n=e,r="dragOperation.targetIds",a=[],r.split(".").reduce((e,t)=>e&&e[t]?e[t]:a||null,n))})}),dragOffset:jt(e.dragOffset,t),refCount:Bt(e.refCount,t),dragOperation:Ft(e.dragOperation,t),stateId:zt(e.stateId)};var n,r,a}function Xt(e,t=void 0,n={},r=!1){const a=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return qe($t,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),o=new pt(a,new Ut(a)),l=new ct(a,o),i=e(l,t,n);return l.receiveBackend(i),l}function Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);l=!0);}catch(u){i=!0,a=u}finally{try{l||null==n.return||n.return()}finally{if(i)throw a}}return o}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Jt=0,Qt=Symbol.for("__VUE_DND_CONTEXT_INSTANCE__");function Zt(e){if(function(e){return"manager"in e&&e.manager}(e))return[e.manager,!1];var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:en(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,a=t;a[Qt]||(a[Qt]=Xt(e,t,n,r));return a[Qt]}(e.backend,e.context,e.options,e.debugMode);return[t,!e.context]}function en(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:window}const tn=n({name:"DndProvider",props:{manager:{type:Object},backend:{type:Function},context:{type:Object},options:{type:Object},debugMode:{type:Boolean}},setup:function(t,n){var a,o=n.slots,l=Yt(Zt(t),2),i=l[0],u=l[1];return u&&++Jt,r(function(){if(u){var e=en();0===--Jt&&(e[Qt]=null)}}),e(Ve,i),function(){var e;return null!==(a=null===(e=o.default)||void 0===e?void 0:e.call(o))&&void 0!==a?a:null}}});var nn=!1,rn=!1,an=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.sourceId=e},t.getHandlerId=function(){return this.sourceId},t.canDrag=function(){We(!nn,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return nn=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{nn=!1}},t.isDragging=function(){if(!this.sourceId)return!1;We(!rn,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return rn=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{rn=!1}},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.isDraggingSource=function(e){return this.internalMonitor.isDraggingSource(e)},t.isOverTarget=function(e,t){return this.internalMonitor.isOverTarget(e,t)},t.getTargetIds=function(){return this.internalMonitor.getTargetIds()},t.isSourcePublic=function(){return this.internalMonitor.isSourcePublic()},t.getSourceId=function(){return this.internalMonitor.getSourceId()},t.subscribeToOffsetChange=function(e){return this.internalMonitor.subscribeToOffsetChange(e)},t.canDragSource=function(e){return this.internalMonitor.canDragSource(e)},t.canDropOnTarget=function(e){return this.internalMonitor.canDropOnTarget(e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();var on=!1,ln=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.targetId=e},t.getHandlerId=function(){return this.targetId},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.canDrop=function(){if(!this.targetId)return!1;We(!on,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return on=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{on=!1}},t.isOver=function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();function un(e){return!!(n=e)&&!0===n.__v_isVNode&&"symbol"!=((t=e.type)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t);var t,n}function sn(e){return function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((t=n)&&t.__v_skip&&function(){throw new Error("Only native element nodes can now be passed to Vue DnD connectors.You can either wrap Component into a <div>, or turn it into a drag source or a drop target itself.")}(),!un(n)){var a=n;return e(a,r),a}}}function cn(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var a=sn(r);t[n]=function(){return a}}}),t}function dn(e,t,n,r){let a;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const o=Object.keys(e),l=Object.keys(t);if(o.length!==l.length)return!1;const i=Object.prototype.hasOwnProperty.bind(t);for(let u=0;u<o.length;u++){const n=o[u];if(!i(n))return!1;const r=e[n],l=t[n];if(a=void 0,!1===a||void 0===a&&r!==l)return!1}return!0}function vn(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}var fn=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=cn({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,n.dragPreviewNode=e,n.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceOptionsInternal=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t=e.prototype;return t.receiveHandlerId=function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())},t.reconnect=function(){var e=this.reconnectDragSource();this.reconnectDragPreview(e)},t.reconnectDragSource=function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t},t.reconnectDragPreview=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)},t.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},t.didConnectedDragSourceChange=function(){return this.lastConnectedDragSource!==this.dragSource},t.didConnectedDragPreviewChange=function(){return this.lastConnectedDragPreview!==this.dragPreview},t.didDragSourceOptionsChange=function(){return!dn(this.lastConnectedDragSourceOptions,this.dragSourceOptions)},t.didDragPreviewOptionsChange=function(){return!dn(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)},t.disconnectDragSource=function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)},t.disconnectDragPreview=function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null)},t.clearDragSource=function(){this.dragSourceNode=null},t.clearDragPreview=function(){this.dragPreviewNode=null},vn(e,[{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function(){return this.dragSourceNode}},{key:"dragPreview",get:function(){return this.dragPreviewNode}}]),e}();function pn(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}var gn=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=cn({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,a(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t=e.prototype;return t.reconnect=function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)},t.receiveHandlerId=function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())},t.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},t.didDropTargetChange=function(){return this.lastConnectedDropTarget!==this.dropTarget},t.didOptionsChange=function(){return!dn(this.lastConnectedDropTargetOptions,this.dropTargetOptions)},t.disconnectDropTarget=function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)},t.clearDropTarget=function(){this.dropTargetRef=null,this.dropTargetNode=null},pn(e,[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.value}}]),e}();var hn=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n,this.connector=r}var t=e.prototype;return t.beginDrag=function(){var e=this.spec,t=this.monitor,n=null;return null!=(n="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{})?n:null},t.canDrag=function(){var e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)},t.isDragging=function(e,t){var n=this.spec,r=this.monitor,a=n.isDragging;return a?a(r):t===e.getSourceId()},t.endDrag=function(){var e=this.spec,t=this.monitor,n=this.connector,r=e.end;r&&r(t.getItem(),t),n.reconnect()},e}();function mn(){var e=t(Ve);return We(null!=e,"Expected drag drop context"),e}function yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);l=!0);}catch(u){i=!0,a=u}finally{try{l||null==n.return||n.return()}finally{if(i)throw a}}return o}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dn(e,t,n){var r=mn(),a=function(e,t,n){var r=l(function(){return new hn(o(e),o(t),o(n))});return i(function(){r.value.spec=o(e)}),r}(e,t,n),u=function(e){return l(function(){var t=o(e).type;return We(null!=t,"spec.type must be defined"),t})}(e);i(function(e){if(null!=o(u)){var l=bn(function(e,t,n){var r=n.getRegistry(),a=r.addSource(e,t);return[a,function(){return r.removeSource(a)}]}(o(u),o(a),o(r)),2),i=l[0],s=l[1];o(t).receiveHandlerId(i),o(n).receiveHandlerId(i),e(s)}})}function Sn(e){return l(function(){return"function"==typeof e?e():e})}const On=Le(function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(a=r;0!==a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!==a--;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;for(a=r;0!==a--;){var l=o[a];if(!e(t[l],n[l]))return!1}return!0}return t!=t&&n!=n});function wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function In(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);l=!0);}catch(u){i=!0,a=u}finally{try{l||null==n.return||n.return()}finally{if(i)throw a}}return o}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return wn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _n(e,t,n){var r=In(function(e,t,n){var r=u(o(t)(o(e))),a=function(){var a=o(t)(o(e));On(r.value,a)||(r.value=a,n&&n())};return i(a),[r,a]}(e,t,n),2),a=r[0],l=r[1];return i(function(t){var n=o(e).getHandlerId();null!=n&&t(o(e).subscribeToStateChange(l,{handlerIds:[n]}))}),a}function Tn(e,t,n){return _n(t,e||function(){return{}},function(){return o(n).reconnect()})}function Cn(e,t){var n=s({el:null,options:o(t)});i(function(){e(n)},{flush:"post"});return function(e,r){c(n,"el",e);var a=o(t)||r;return On(n.options,a)||c(n,"options",a),o(e)}}function En(e,t){return Cn(function(t){o(e).hooks.dragSource()(t.el,t.options)},l(function(){return o(t).options}))}function xn(e,t){return Cn(function(t){o(e).hooks.dragPreview()(t.el,t.options)},l(function(){return o(t).previewOptions}))}function kn(e){var t,n=Sn(e),r=(t=mn(),l(function(){return new an(o(t))})),a=function(e,t){var n=mn(),r=l(function(){return new fn(o(n).getBackend())});return i(function(t){r.value.dragSourceOptions=o(e)||null,o(r).reconnect(),t(function(){r.value.disconnectDragSource()})}),i(function(e){r.value.dragPreviewOptions=o(t)||null,o(r).reconnect(),e(function(){r.value.disconnectDragPreview()})}),r}(l(function(){return o(n).options}),l(function(){return o(n).previewOptions}));return Dn(n,r,a),[Tn(l(function(){return o(n).collect||function(){return{}}}),r,a),En(a,n),xn(a,n)]}var Pn=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n}var t=e.prototype;return t.canDrop=function(){var e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)},t.hover=function(){var e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)},t.drop=function(){var e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)},e}();function Nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Un(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);l=!0);}catch(u){i=!0,a=u}finally{try{l||null==n.return||n.return()}finally{if(i)throw a}}return o}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kn(e,t,n){var r=mn(),a=function(e,t){var n=l(function(){return new Pn(o(e),o(t))});return i(function(){n.value.spec=o(e)}),n}(e,t),u=function(e){return l(function(){var t=o(e).accept;return We(null!=t,"accept must be defined"),Array.isArray(t)?t:[t]})}(e);i(function(e){var l=Un(function(e,t,n){var r=o(n).getRegistry(),a=r.addTarget(o(e),o(t));return[a,function(){return r.removeTarget(a)}]}(u,a,r),2),i=l[0],s=l[1];o(t).receiveHandlerId(i),o(n).receiveHandlerId(i),e(s)})}function Mn(e,t){return Cn(function(t){o(e).hooks.dropTarget()(t.el,t.options)},l(function(){return o(t).options}))}function An(e){var t,n=Sn(e),r=(t=mn(),l(function(){return new ln(o(t))})),a=function(e){var t=mn(),n=l(function(){return new gn(o(t).getBackend())});return i(function(t){n.value.dropTargetOptions=o(e)||null,n.value.reconnect(),t(function(){return n.value.disconnectDropTarget()})}),n}(l(function(){return o(n).options}));return Kn(n,r,a),[Tn(l(function(){return o(n).collect||function(){return{}}}),r,a),Mn(a,n)]}function Rn(e){let t=null;return()=>(null==t&&(t=e()),t)}class jn{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const a=[];return n.forEach(e=>a.push(e)),a}(this.entered.filter(t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter(e=>e!==r)),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class Ln{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>null})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Vn="__NATIVE_FILE__",Hn="__NATIVE_URL__",Fn="__NATIVE_TEXT__",Bn="__NATIVE_HTML__",zn=Object.freeze(Object.defineProperty({__proto__:null,FILE:Vn,HTML:Bn,TEXT:Fn,URL:Hn},Symbol.toStringTag,{value:"Module"}));function qn(e,t,n){const r=t.reduce((t,n)=>t||e.getData(n),"");return null!=r?r:n}const Wn={[Vn]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Bn]:{exposeProperties:{html:(e,t)=>qn(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Hn]:{exposeProperties:{urls:(e,t)=>qn(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Fn]:{exposeProperties:{text:(e,t)=>qn(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function $n(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Wn).filter(e=>{const n=Wn[e];return!!(null==n?void 0:n.matchesTypes)&&n.matchesTypes.some(e=>t.indexOf(e)>-1)})[0]||null}const Xn=Rn(()=>/firefox/i.test(navigator.userAgent)),Gn=Rn(()=>Boolean(window.safari));class Yn{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:a,c3s:o}=this;let l=t.length-1;if(e===t[l])return n[l];let i,u=0,s=o.length-1;for(;u<=s;){i=Math.floor(.5*(u+s));const r=t[i];if(r<e)u=i+1;else{if(!(r>e))return n[i];s=i-1}}l=Math.max(0,s);const c=e-t[l],d=c*c;return n[l]+r[l]*c+a[l]*d+o[l]*c*d}constructor(e,t){const{length:n}=e,r=[];for(let v=0;v<n;v++)r.push(v);r.sort((t,n)=>e[t]<e[n]?-1:1);const a=[],o=[];let l,i;for(let v=0;v<n-1;v++)l=e[v+1]-e[v],i=t[v+1]-t[v],a.push(l),o.push(i/l);const u=[o[0]];for(let v=0;v<a.length-1;v++){const e=o[v],t=o[v+1];if(e*t<=0)u.push(0);else{l=a[v];const n=a[v+1],r=l+n;u.push(3*r/((r+n)/e+(r+l)/t))}}u.push(o[o.length-1]);const s=[],c=[];let d;for(let v=0;v<u.length-1;v++){d=o[v];const e=u[v],t=1/a[v],n=e+u[v+1]-d-d;s.push((d-e-n)*t),c.push(n*t*t)}this.xs=e,this.ys=t,this.c1s=u,this.c2s=s,this.c3s=c}}function Jn(e){const t=1===e.nodeType?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Qn(e){return{x:e.clientX,y:e.clientY}}function Zn(e,t,n,r,a){const o="IMG"===(l=t).nodeName&&(Xn()||!(null===(i=document.documentElement)||void 0===i?void 0:i.contains(l)));var l,i;const u=Jn(o?e:t),s={x:n.x-u.x,y:n.y-u.y},{offsetWidth:c,offsetHeight:d}=e,{anchorX:v,anchorY:f}=r,{dragPreviewWidth:p,dragPreviewHeight:g}=function(e,t,n,r){let a=e?t.width:n,o=e?t.height:r;return Gn()&&e&&(o/=window.devicePixelRatio,a/=window.devicePixelRatio),{dragPreviewWidth:a,dragPreviewHeight:o}}(o,t,c,d),{offsetX:h,offsetY:m}=a,y=0===m||m;return{x:0===h||h?h:new Yn([0,.5,1],[s.x,s.x/c*p,s.x+p-c]).interpolate(v),y:y?m:(()=>{let e=new Yn([0,.5,1],[s.y,s.y/d*g,s.y+g-d]).interpolate(f);return Gn()&&o&&(e+=(window.devicePixelRatio-1)*g),e})()}}class er{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function tr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){tr(e,t,n[t])})}return e}class rr{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),a=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",a),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",a),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),a=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",a),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",a)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return nr({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return nr({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(zn).some(t=>zn[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=Wn[e];if(!n)throw new Error("native type ".concat(e," has no configuration"));const r=new Ln(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var e;if(this.currentDragSourceNode=null,this.rootElement)null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&Jn(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=Qn(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,a=$n(r);if(this.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),a=this.sourcePreviewNodes.get(e)||t;if(a){const{anchorX:e,anchorY:o,offsetX:l,offsetY:i}=this.getCurrentSourcePreviewNodeOptions(),u=Zn(t,a,n,{anchorX:e,anchorY:o},{offsetX:l,offsetY:i});r.setDragImage(a,u.x,u.y)}}try{null==r||r.setData("application/json",{})}catch(o){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(a)this.beginDragNativeItem(a);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=$n(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Qn(e)});t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{var t;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=Qn(e),this.scheduleHover(t);(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;(this.dropTargetIds=[],this.isDraggingNativeItem())?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):$n(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Qn(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new er(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new jn(this.isNodeInDocument)}}const ar=function(e,t,n){return new rr(e,t,n)},or={class:"text"},lr=Me(n({__name:"MenuItem",props:{itemConfig:{}},setup(e){const t=e,[,n]=kn(()=>({type:t.itemConfig.type,item:G(t.itemConfig),end(e,t){if(Y.value&&t.getDropResult()){const t=J();Q.value[Y.value].children=Q.value[Y.value].children.filter(e=>"indicator"!==e),Z(Y.value,t,e.type)}},collect:e=>({isDragging:e.isDragging()})}));return(t,r)=>{const a=Ke;return d(),v("div",{ref:o(n),class:"comp-box"},[f(a,{icon:"".concat(e.itemConfig.icon),size:24},null,8,["icon"]),p("div",or,g(e.itemConfig.name),1)],512)}}}),[["__scopeId","data-v-93d061c6"]]),ir={class:"pt-8px"},ur={class:"comp-list"},sr=Me(n({__name:"index",setup:e=>(e,t)=>(d(),v("div",ir,[t[0]||(t[0]=p("div",{class:"comp-title"},"基础组件",-1)),p("div",ur,[(d(!0),v(h,null,m(o(ee),e=>(d(),y(lr,{key:e.type,"item-config":e},null,8,["item-config"]))),128))])]))}),[["__scopeId","data-v-c60896d4"]]),cr=["innerHTML"],dr=n({__name:"index",setup:e=>(e,t)=>(d(),v("div",{innerHTML:o(te)},null,8,cr))}),vr={class:"editor-tools"},fr=Me(n({__name:"index",setup(e){const t=()=>{Ae({title:"预览",area:80,component:dr})};return(e,n)=>{const r=Ke;return d(),v("div",vr,[p("div",null,[p("span",{class:"cursor-pointer",onClick:t},[f(r,{icon:"el-view",size:18})])]),p("div",null,[b("",!0)])])}}}),[["__scopeId","data-v-e19a90a0"]]),pr=["data-handler-id"],gr={class:"viewer-action"},hr={key:0,class:"viewer-type"},mr=Me(n({__name:"Comp",props:{compKey:{},cellKey:{}},setup(e,{expose:t}){const n=e,r=I(()=>Re(()=>import("./Button.js?v=1765440387"),__vite__mapDeps([]),import.meta.url)),a=I(()=>Re(()=>import("./Divider.js?v=1765440387"),__vite__mapDeps([]),import.meta.url)),i=I(()=>Re(()=>import("./Header.js?v=1765440387"),__vite__mapDeps([]),import.meta.url)),s=I(()=>Re(()=>import("./Text.js?v=1765440387"),__vite__mapDeps([]),import.meta.url)),c=I(()=>Re(()=>import("./Image.js?v=1765440387"),__vite__mapDeps([]),import.meta.url)),m=I(()=>Re(()=>import("./Menu.js?v=1765440387"),__vite__mapDeps([]),import.meta.url)),_=I(()=>Re(()=>import("./Html.js?v=1765440387"),__vite__mapDeps([]),import.meta.url)),T=I(()=>Re(()=>import("./Other.js?v=1765440387"),__vite__mapDeps([]),import.meta.url));const C=u(""),[E,x,k]=kn({type:ne.commonComp,item:{key:n.compKey},collect:e=>({isDragging:e.isDragging()})});D(()=>E.value.isDragging,e=>{e&&(C.value=n.compKey)});const[P,N]=An({accept:re.filter(e=>"columns"!==e),hover(e,t){U(),"0"!=e.key?M(e.key,t):M("indicator",t)},drop(){K()},collect:e=>({handlerId:e.getHandlerId()})}),U=()=>{document.querySelectorAll(".comp-wrapper").forEach(e=>{var t;null==(t=e.querySelector(".viewer-selector"))||t.classList.add("no-hover")})},K=()=>{document.querySelectorAll(".comp-wrapper").forEach(e=>{var t;null==(t=e.querySelector(".viewer-selector"))||t.classList.remove("no-hover")})};function M(e,t){var r;if(e==n.compKey)return;const a=null==(r=A.value)?void 0:r.getBoundingClientRect(),o=a.top+(a.bottom-a.top)/2,l=t.getClientOffset();l.y<o&&ae(n.cellKey,n.compKey,e),l.y>o&&oe(n.cellKey,n.compKey,e)}const A=u();function R(e){A.value=k(N(e))}t({compSort:M,key:n.compKey});const j=l(()=>le(ie.value[n.compKey],"general")),L=l(()=>{switch(ue.value&&ue.value[n.compKey]?ue.value[n.compKey].type:""){case"button":return r;case"divider":return a;case"header":return i;case"text":return s;case"image":return c;case"menu":return m;case"html":return _;default:return T}});function V(){de.value=!0,ve.value=ue.value[n.compKey].type,ce.value=n.compKey;for(let e in fe.value)fe.value[e].children.includes(n.cellKey)&&(pe.value=e)}function H(e){ge(n.compKey,n.cellKey),e.stopPropagation()}return(t,n)=>{const r=Ke;return d(),v("div",{ref:R,class:S(["comp-wrapper",{indicator:o(E).isDragging||"indicator"==e.compKey}]),onClick:V,"data-handler-id":o(P).handlerId,style:w(o(j))},[o(E).isDragging?b("",!0):(d(),v(h,{key:0},[p("div",{class:S(["viewer-selector",{active:o(ce)===e.compKey}])},[p("div",{class:"viewer-drag",ref:o(x)},[f(r,{icon:"el-fullscreen-expand",color:"#fff",size:20})],512),p("div",gr,[p("div",{class:"action-btn",onClick:n[0]||(n[0]=()=>o(se)(e.compKey,e.cellKey))},[f(r,{icon:"el-document-copy",size:16,color:"#fff"})]),p("div",{class:"action-btn",onClick:H},[f(r,{icon:"el-delete",size:16,color:"#fff"})])]),o(ue)[e.compKey]?(d(),v("div",hr,g((a=o(ue)[e.compKey].type,a.charAt(0).toUpperCase()+a.slice(1))),1)):b("",!0)],2),(d(),y(O(o(L)),{"comp-key":e.compKey},null,8,["comp-key"]))],64))],14,pr);var a}}}),[["__scopeId","data-v-bfb37480"]]),yr={class:"viewer-empty"};const br=Me({},[["render",function(e,t){return d(),v("div",yr,[...t[0]||(t[0]=[p("div",null,"这里没有内容,请从左侧拖动内容。",-1)])])}],["__scopeId","data-v-08b083e1"]]),Dr=Me(n({__name:"CellContainer",props:{cellKey:{},columnKey:{}},setup(e){const t=e,n=u(!1),r=l(()=>!n.value&&0===Q.value[t.cellKey].children.length),a=l(()=>({...le(he.value[t.cellKey]),width:Q.value[t.cellKey].width})),[i,s]=An({accept:re,collect:e=>({isShallowOver:e.isOver()}),drop:e=>{const r=Q.value[t.cellKey].children.indexOf("indicator");if(r>-1&&Q.value[t.cellKey].children.splice(r,1),"0"==e.key){n.value=!1;const a=J();ye(t.cellKey,a,e.type,r)}},hover:e=>{"0"==e.key&&(n.value=!0,Q.value[t.cellKey].children.includes("indicator")||Q.value[t.cellKey].children.push("indicator"))}}),{isShallowOver:c}=_(i);D(()=>c.value,e=>{e||(n.value=!1,Q.value[t.cellKey].children=Q.value[t.cellKey].children.filter(e=>"indicator"!=e))});const f=u(null),p=e=>{e&&(f.value=s(e))},g=l(()=>fe.value[t.columnKey].children.findIndex(e=>e==t.cellKey)!==fe.value[t.columnKey].children.length-1),S=l(()=>{const e=fe.value[t.columnKey].children.findIndex(e=>e==t.cellKey);return-1!==e&&e<fe.value[t.columnKey].children.length-1?fe.value[t.columnKey].children[e+1]:""}),O=u(-1),I=u(0);let C,E,x=0,k=0;function P(e){I.value=e.clientX,x=f.value.getBoundingClientRect().width,document.addEventListener("mousemove",N)}function N(e){C=document.querySelector("#cell_".concat(t.cellKey)),E=document.querySelector("#cell_".concat(S.value)),k=e.clientX-I.value;let n="calc(".concat(Q.value[t.cellKey].width," + ").concat(k,"px)"),r="calc(".concat(Q.value[S.value].width," - ").concat(k,"px)");C.offsetWidth<=50||E.offsetWidth<=50||(C.style.width=n,E.style.width=r,e.preventDefault())}function U(e){e&&(e.addEventListener("mousedown",P),document.addEventListener("mouseup",()=>{if(0==I.value)return;document.removeEventListener("mousemove",N);let e=k/x*(Number(Q.value[t.cellKey].width.split("%")[0])/100);Q.value[t.cellKey].width=Number((100*(Number(Q.value[t.cellKey].width.split("%")[0])/100+e)).toFixed(2))+"%",Q.value[S.value].width=Number((100*(Number(Q.value[S.value].width.split("%")[0])/100-e)).toFixed(2))+"%",T(()=>{x=0,k=0,I.value=0,me.$emit("makeDom")})}))}return(t,n)=>(d(),v("div",{ref:p,class:"column-item",style:w(o(a))},[o(r)?(d(),y(br,{key:0})):b("",!0),(d(!0),v(h,null,m(o(Q)[e.cellKey].children,t=>(d(),y(mr,{key:t,"comp-key":t,"cell-key":e.cellKey},null,8,["comp-key","cell-key"]))),128)),o(g)?(d(),v("div",{key:1,ref:U,class:"resize-handle",style:w({right:o(O)+"px"})},null,4)):b("",!0)],4))}}),[["__scopeId","data-v-5f65df3e"]]),Sr=["data-handler-id","id"],Or={class:"viewer-action"},wr={key:0,class:"viewer-type"},Ir=Me(n({__name:"Columns",props:{columnKey:{}},setup(e){const t=e,n=l(()=>le(be.value[t.columnKey])),r=l(()=>De.value.maxWidth);const[a,i,s]=kn({type:"Drag_Columns",item:()=>({key:t.columnKey}),collect:e=>({isDragging:e.isDragging()})}),{isDragging:c}=_(a),[D,O]=An({accept:"Drag_Columns",hover(e,n){if(I(),e.key==t.columnKey)return;const r=E.value.getBoundingClientRect(),a=r.top+(r.bottom-r.top)/2,o=n.getClientOffset();o.y<a&&Oe(t.columnKey,e.key),o.y>a&&we(t.columnKey,e.key)},drop(){T()},collect:e=>({handlerId:e.getHandlerId()})}),I=()=>{document.querySelectorAll(".viewer-columns").forEach(e=>{var t;null==(t=e.querySelector(".viewer-selector"))||t.classList.add("no-hover")})},T=()=>{document.querySelectorAll(".viewer-columns").forEach(e=>{var t;null==(t=e.querySelector(".viewer-selector"))||t.classList.remove("no-hover")})},{handlerId:C}=_(D),E=u(),x=e=>{E.value=s(O(e))};function k(){const{columnKey:e}=t,{key:n,type:r}=fe.value[e];ve.value=r,ce.value=n,de.value=!0}return(t,a)=>{const l=Ke;return d(),v("div",{ref:x,class:S(["viewer-columns",{indicator:o(c)}]),"data-handler-id":o(C),onClickCapture:k,id:"column_".concat(e.columnKey)},[o(c)?b("",!0):(d(),v(h,{key:0},[p("div",{class:S(["viewer-selector",{active:o(ce)===e.columnKey}])},[p("div",{ref:o(i),class:"viewer-drag"},[f(l,{icon:"el-fullscreen-expand",color:"#fff",size:20})],512),p("div",Or,[b("",!0),p("div",{class:"action-btn",onClick:a[0]||(a[0]=()=>o(Se)(e.columnKey))},[f(l,{icon:"el-delete",size:16,color:"#fff"})])]),o(fe)[e.columnKey]?(d(),v("div",wr,g((u=o(fe)[e.columnKey].type,u.charAt(0).toUpperCase()+u.slice(1))),1)):b("",!0)],2),p("div",{class:"columns-container",style:w({...o(n),maxWidth:o(r),zIndex:o(pe)==e.columnKey?2e3:100})},[(d(!0),v(h,null,m(o(fe)[e.columnKey].children,t=>(d(),y(Dr,{key:t,"cell-key":t,"column-key":e.columnKey,id:"cell_".concat(t)},null,8,["cell-key","column-key","id"]))),128))],4)],64))],42,Sr);var u}}}),[["__scopeId","data-v-762eefb3"]]),_r={class:"editor-container"},Tr={key:0,class:"drag-empty"},Cr={key:1,class:"drag-empty-box"},Er={key:0,class:"drag-empty-box"},xr=Me(n({__name:"index",emits:["columnDrag"],setup(e,{emit:t}){const n=t,r=u(null),a=u(!1),i=u(0),s=l(()=>({backgroundColor:De.value.backgroundColor})),[c,g]=An({accept:[...re,ne.Columns],collect:e=>({isShallowOver:e.isOver({shallow:!0})}),drop:e=>{e.type==ne.Columns&&(n("columnDrag",e,i.value),i.value=0,a.value=!1)},hover:(e,t)=>{if(e.type==ne.Columns)Ie(()=>{const e=t.getSourceClientOffset(),n=document.querySelectorAll(".editor-container .viewer-columns");if(e&&n.length>0){const{y:t}=e;let r=!0;for(let e=n.length-1;e>=0;e--){const a=n[e],{top:o,height:l}=a.getBoundingClientRect();if(t>o+l/2){r=!1,i.value=e+1;break}}r&&(i.value=0)}a.value=y.value},150)();else if(y.value){if(_e.value.length&&"0"==e.key){const e=_e.value.at(-1),n={};fe.value[e].children.forEach(e=>n[e]=document.querySelector("#cell_".concat(e)));const r={};for(let t in n)r[t]=n[t].getBoundingClientRect();const a=t.getClientOffset();Y.value="";for(let t in r)if(a.x>r[t].left&&a.x<r[t].right){for(let e in r)Q.value[e].children=Q.value[e].children.filter(e=>"indicator"!==e);Q.value[t].children.push("indicator"),Y.value=t}else Q.value[t].children=Q.value[t].children.filter(e=>"indicator"!==e)}}else Y.value=""}}),{isShallowOver:y}=_(c),D=e=>{e&&(r.value=g(e))},S=()=>{ve.value="",ce.value=""};return(e,t)=>(d(),v("div",{class:"flex flex-col h-full",onClickCapture:S},[f(fr),p("div",_r,[p("div",{ref:D,class:"editor-draggable",style:w(o(s))},[o(a)||0!==o(_e).length?b("",!0):(d(),v("div",Tr," 这里没有内容,请从左侧拖动内容。 ")),o(a)&&0===o(i)?(d(),v("div",Cr)):b("",!0),(d(!0),v(h,null,m(o(_e),(e,t)=>(d(),v(h,{key:e},[f(Ir,{"column-key":e},null,8,["column-key"]),o(a)&&t+1===o(i)?(d(),v("div",Er)):b("",!0)],64))),128))],4)])],32))}}),[["__scopeId","data-v-7c1c71f3"]]),kr={class:"style-container"},Pr={class:"style-rows"},Nr={class:"style-label"},Ur={class:"style-value"},Kr=Me(n({__name:"BaseContainer",props:{label:{type:String,default:""}},setup:e=>(t,n)=>(d(),v("div",kr,[p("div",Pr,[p("div",Nr,g(e.label),1),p("div",Ur,[C(t.$slots,"value",{},void 0,!0)])]),C(t.$slots,"options",{},void 0,!0)]))}),[["__scopeId","data-v-561c82e6"]]),Mr=n({__name:"Head",props:{value:{},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value");return(e,n)=>{const r=P,a=N;return d(),y(Kr,{label:"标题类型"},{value:x(()=>[f(a,{size:"default",modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=e=>t.value=e)},{default:x(()=>[f(r,{label:"22px"},{default:x(()=>[...n[1]||(n[1]=[k("H1",-1)])]),_:1}),f(r,{label:"20px"},{default:x(()=>[...n[2]||(n[2]=[k("H2",-1)])]),_:1}),f(r,{label:"18px"},{default:x(()=>[...n[3]||(n[3]=[k("H3",-1)])]),_:1}),f(r,{label:"16px"},{default:x(()=>[...n[4]||(n[4]=[k("H4",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),Ar={class:"w-32px"},Rr=n({__name:"Color",props:U({label:{default:""}},{value:{default:""},valueModifiers:{}}),emits:["update:value"],setup(e){const t=E(e,"value");return(n,r)=>{const a=K;return d(),y(Kr,{label:e.label},{value:x(()=>[p("div",Ar,[f(a,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=e=>t.value=e),"show-alpha":!1,"color-format":"hex"},null,8,["modelValue"])])]),_:1},8,["label"])}}}),jr={class:"w-180px"},Lr=n({__name:"Width",props:{value:{default:""},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value"),n=u(100);D(()=>t.value,e=>{n.value=Number.parseFloat(e)},{immediate:!0});const r=e=>{t.value="".concat(e,"%")};return(e,t)=>{const a=M;return d(),y(Kr,{label:"宽度"},{value:x(()=>[p("div",jr,[f(a,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=e=>n.value=e),step:1,onInput:r},null,8,["modelValue"])])]),_:1})}}}),Vr={class:"flex items-center",style:{height:"32px"}},Hr={key:0,class:"ml-4 whitespace-nowrap"},Fr=n({__name:"WidthAuto",props:{value:{default:""},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value"),n=u(!0),r=u(100);D(()=>t.value,e=>{"auto"===e?n.value=!0:(n.value=!1,r.value=Number.parseFloat(e)),n.value||(r.value=Number.parseFloat(e))},{immediate:!0});const a=e=>{r.value=100,t.value=e?"100%":"".concat(r.value,"%")},o=e=>{t.value="".concat(e,"%")};return(e,t)=>{const l=A,i=M;return d(),y(Kr,{label:"宽度"},{value:x(()=>[t[2]||(t[2]=p("span",{class:"mr-3"},"自动",-1)),f(l,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=e=>n.value=e),onChange:a},null,8,["modelValue"])]),options:x(()=>[p("div",Vr,[f(i,{modelValue:r.value,"onUpdate:modelValue":t[1]||(t[1]=e=>r.value=e),step:1,disabled:n.value,onInput:o},null,8,["modelValue","disabled"]),n.value?b("",!0):(d(),v("span",Hr,g(r.value)+"%",1))])]),_:1})}}}),Br={class:"el-input-group"},zr={class:"el-input-group__append"},qr=n({__name:"BaseNumber",props:U({unit:{type:String,default:"px"},step:{type:Number,default:1}},{value:{default:""},valueModifiers:{}}),emits:["update:value"],setup(e){const t=E(e,"value"),n=u(0);D(()=>t.value,e=>{n.value=e?Number.parseFloat(e):0},{immediate:!0});const r=n=>{t.value="".concat(n||0).concat(e.unit)};return(t,a)=>{const o=R;return d(),v("div",Br,[f(o,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=e=>n.value=e),min:0,step:e.step,"controls-position":"right",style:{width:"92px"},onInput:r},null,8,["modelValue","step"]),p("div",zr,g(e.unit),1)])}}}),Wr=n({__name:"WidthNumber",props:{value:{default:"500px"},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value");return(e,n)=>(d(),y(Kr,{label:"宽度"},{value:x(()=>[f(qr,{value:t.value,"onUpdate:value":n[0]||(n[0]=e=>t.value=e)},null,8,["value"])]),_:1}))}}),$r={class:"w-100px"},Xr=n({__name:"FontWeight",props:U({label:{default:""}},{value:{default:""},valueModifiers:{}}),emits:["update:value"],setup(e){const t=E(e,"value"),n=[{label:"正常",value:"normal"},{label:"粗体",value:"bold"}];return t.value||(t.value=n[0].value),(e,r)=>{const a=j,o=L;return d(),y(Kr,{label:"字体粗细"},{value:x(()=>[p("div",$r,[f(o,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=e=>t.value=e)},{default:x(()=>[(d(),v(h,null,m(n,e=>f(a,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])]),_:1})}}}),Gr=n({__name:"FontSize",props:{value:{default:"14px"},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value");return(e,n)=>(d(),y(Kr,{label:"字体大小"},{value:x(()=>[f(qr,{value:t.value,"onUpdate:value":n[0]||(n[0]=e=>t.value=e)},null,8,["value"])]),_:1}))}}),Yr=n({__name:"LineHeight",props:{value:{default:"120%"},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value");return(e,n)=>(d(),y(Kr,{label:"行高"},{value:x(()=>[f(qr,{value:t.value,"onUpdate:value":n[0]||(n[0]=e=>t.value=e),unit:"%",step:10},null,8,["value"])]),_:1}))}}),Jr=n({__name:"LetterSpacing",props:{value:{default:"0px"},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value");return(e,n)=>(d(),y(Kr,{label:"字间距"},{value:x(()=>[f(qr,{value:t.value,"onUpdate:value":n[0]||(n[0]=e=>t.value=e)},null,8,["value"])]),_:1}))}}),Qr=n({__name:"TextAlign",props:U({label:{default:""}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=E(e,"value");return(n,r)=>{const a=P,o=N;return d(),y(Kr,{label:e.label||"文本对齐"},{value:x(()=>[f(o,{size:"default",modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=e=>t.value=e)},{default:x(()=>[f(a,{label:"left"},{default:x(()=>[...r[1]||(r[1]=[k("左对齐",-1)])]),_:1}),f(a,{label:"center"},{default:x(()=>[...r[2]||(r[2]=[k("居中对齐",-1)])]),_:1}),f(a,{label:"right"},{default:x(()=>[...r[3]||(r[3]=[k("右对齐",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])}}}),Zr={class:"flex flex-col gap-8px"},ea={class:"w-92px"},ta={class:"w-32px"},na=n({__name:"BaseBorder",props:{value:{default:""},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value"),n=[{label:"实线",value:"solid"},{label:"点线",value:"dotted"},{label:"虚线",value:"dashed"}],r=u("solid"),a=u(""),o=u(""),l=()=>{t.value="".concat(a.value," ").concat(r.value," ").concat(o.value||"transparent")};return D(()=>t.value,e=>{const[t,n,l]=e.split(" ");a.value=t||"",r.value=n||"solid",o.value=l||""},{immediate:!0}),(e,t)=>{const i=j,u=L,s=K;return d(),v("div",Zr,[f(qr,{value:a.value,"onUpdate:value":[t[0]||(t[0]=e=>a.value=e),l],placeholder:""},null,8,["value"]),p("div",ea,[f(u,{modelValue:r.value,"onUpdate:modelValue":t[1]||(t[1]=e=>r.value=e),onChange:l},{default:x(()=>[(d(),v(h,null,m(n,e=>f(i,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),p("div",ta,[f(s,{modelValue:o.value,"onUpdate:modelValue":t[2]||(t[2]=e=>o.value=e),"show-alpha":!1,"color-format":"hex",onChange:l},null,8,["modelValue"])])])}}}),ra=n({__name:"Line",props:{value:{default:""},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value");return(e,n)=>(d(),y(Kr,{label:"线条"},{value:x(()=>[f(na,{value:t.value,"onUpdate:value":n[0]||(n[0]=e=>t.value=e)},null,8,["value"])]),_:1}))}}),aa={class:"flex items-center h-32px"};const oa=Me({},[["render",function(e,t){return d(),v("div",aa,[C(e.$slots,"default")])}]]),la=n({__name:"MoreOptions",props:{show:{type:Boolean,default:!1}},setup:e=>(t,n)=>{const r=V,a=H;return e.show?(d(),y(a,{key:1,gutter:8},{default:x(()=>[f(r,{span:12,class:"mb-2"},{default:x(()=>[f(oa,null,{default:x(()=>[...n[1]||(n[1]=[k("上边框",-1)])]),_:1}),C(t.$slots,"top")]),_:3}),f(r,{span:12,class:"mb-2"},{default:x(()=>[f(oa,null,{default:x(()=>[...n[2]||(n[2]=[k("右边框",-1)])]),_:1}),C(t.$slots,"right")]),_:3}),f(r,{span:12,class:"mb-2"},{default:x(()=>[f(oa,null,{default:x(()=>[...n[3]||(n[3]=[k("左边框",-1)])]),_:1}),C(t.$slots,"left")]),_:3}),f(r,{span:12,class:"mb-2"},{default:x(()=>[f(oa,null,{default:x(()=>[...n[4]||(n[4]=[k("下边框",-1)])]),_:1}),C(t.$slots,"bottom")]),_:3})]),_:3})):(d(),v(h,{key:0},[f(oa,null,{default:x(()=>[...n[0]||(n[0]=[k("所有边框",-1)])]),_:1}),C(t.$slots,"all")],64))}}),ia=n({__name:"Border",props:U({label:{default:""}},{value:{default:()=>({more:!1,all:"",top:"",left:"",right:"",bottom:""})},valueModifiers:{}}),emits:["update:value"],setup(e){const t=E(e,"value"),n=e=>{e?(t.value.top=t.value.all,t.value.right=t.value.all,t.value.bottom=t.value.all,t.value.left=t.value.all):t.value.all=t.value.top};return(r,a)=>{const o=A;return d(),y(Kr,{label:e.label||"边框"},{value:x(()=>[a[6]||(a[6]=p("span",{class:"mr-12px"},"更多选项",-1)),f(o,{modelValue:t.value.more,"onUpdate:modelValue":a[0]||(a[0]=e=>t.value.more=e),onChange:n},null,8,["modelValue"])]),options:x(()=>[f(la,{show:t.value.more},{all:x(()=>[f(na,{value:t.value.all,"onUpdate:value":a[1]||(a[1]=e=>t.value.all=e)},null,8,["value"])]),top:x(()=>[f(na,{value:t.value.top,"onUpdate:value":a[2]||(a[2]=e=>t.value.top=e)},null,8,["value"])]),left:x(()=>[f(na,{value:t.value.left,"onUpdate:value":a[3]||(a[3]=e=>t.value.left=e)},null,8,["value"])]),right:x(()=>[f(na,{value:t.value.right,"onUpdate:value":a[4]||(a[4]=e=>t.value.right=e)},null,8,["value"])]),bottom:x(()=>[f(na,{value:t.value.bottom,"onUpdate:value":a[5]||(a[5]=e=>t.value.bottom=e)},null,8,["value"])]),_:1},8,["show"])]),_:1},8,["label"])}}}),ua=n({__name:"Padding",props:U({label:{default:""}},{value:{default:()=>({more:!1,all:"",top:"",left:"",right:"",bottom:""})},valueModifiers:{}}),emits:["update:value"],setup(e){const t=E(e,"value"),n=e=>{e?(t.value.top=t.value.all,t.value.right=t.value.all,t.value.bottom=t.value.all,t.value.left=t.value.all):t.value.all=t.value.top};return(r,a)=>{const o=A;return d(),y(Kr,{label:e.label||"内边距"},{value:x(()=>[a[6]||(a[6]=p("span",{class:"mr-12px"},"更多选项",-1)),f(o,{modelValue:t.value.more,"onUpdate:modelValue":a[0]||(a[0]=e=>t.value.more=e),onChange:n},null,8,["modelValue"])]),options:x(()=>[f(la,{show:t.value.more},{all:x(()=>[f(qr,{value:t.value.all,"onUpdate:value":a[1]||(a[1]=e=>t.value.all=e)},null,8,["value"])]),top:x(()=>[f(qr,{value:t.value.top,"onUpdate:value":a[2]||(a[2]=e=>t.value.top=e)},null,8,["value"])]),left:x(()=>[f(qr,{value:t.value.left,"onUpdate:value":a[3]||(a[3]=e=>t.value.left=e)},null,8,["value"])]),right:x(()=>[f(qr,{value:t.value.right,"onUpdate:value":a[4]||(a[4]=e=>t.value.right=e)},null,8,["value"])]),bottom:x(()=>[f(qr,{value:t.value.bottom,"onUpdate:value":a[5]||(a[5]=e=>t.value.bottom=e)},null,8,["value"])]),_:1},8,["show"])]),_:1},8,["label"])}}}),sa=n({__name:"Rounded",props:{value:{default:()=>({more:!1,all:"",top:"",left:"",right:"",bottom:""})},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value"),n=e=>{e?(t.value.top=t.value.all,t.value.right=t.value.all,t.value.bottom=t.value.all,t.value.left=t.value.all):t.value.all=t.value.top};return(e,r)=>{const a=A;return d(),y(Kr,{label:"圆角边框"},{value:x(()=>[r[6]||(r[6]=p("span",{class:"mr-12px"},"更多选项",-1)),f(a,{modelValue:t.value.more,"onUpdate:modelValue":r[0]||(r[0]=e=>t.value.more=e),onChange:n},null,8,["modelValue"])]),options:x(()=>[f(la,{show:t.value.more},{all:x(()=>[f(qr,{value:t.value.all,"onUpdate:value":r[1]||(r[1]=e=>t.value.all=e)},null,8,["value"])]),top:x(()=>[f(qr,{value:t.value.top,"onUpdate:value":r[2]||(r[2]=e=>t.value.top=e)},null,8,["value"])]),left:x(()=>[f(qr,{value:t.value.left,"onUpdate:value":r[3]||(r[3]=e=>t.value.left=e)},null,8,["value"])]),right:x(()=>[f(qr,{value:t.value.right,"onUpdate:value":r[4]||(r[4]=e=>t.value.right=e)},null,8,["value"])]),bottom:x(()=>[f(qr,{value:t.value.bottom,"onUpdate:value":r[5]||(r[5]=e=>t.value.bottom=e)},null,8,["value"])]),_:1},8,["show"])]),_:1})}}}),ca={class:"w-140px"},da=n({__name:"Layout",props:U({label:{default:""}},{value:{default:""},valueModifiers:{}}),emits:["update:value"],setup(e){const t=E(e,"value"),n=[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}];return t.value||(t.value=n[0].value),(e,r)=>{const a=j,o=L;return d(),y(Kr,{label:"布局"},{value:x(()=>[p("div",ca,[f(o,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=e=>t.value=e)},{default:x(()=>[(d(),v(h,null,m(n,e=>f(a,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])]),_:1})}}});function va(e){return[n({setup:(t,{slots:n})=>()=>{return f(fa,{options:e},"function"==typeof(t=n)||"[object Object]"===Object.prototype.toString.call(t)&&!F(t)?n:{default:()=>[n]});var t}})]}const fa=n({props:{value:{type:Object,default:()=>({})},options:{type:Array,default:()=>[]}},setup:(e,{slots:t})=>()=>f(h,null,[e.options.map(n=>function(e,t,n){const{key:r,attrKey:a,label:o}=e,l=r||a;switch(a){case"color":case"backgroundColor":return f(Rr,{value:t[l],"onUpdate:value":e=>t[l]=e,label:o},null);case"head":return f(Mr,{value:t[l],"onUpdate:value":e=>t[l]=e},null);case"padding":return f(ua,{value:t[l],"onUpdate:value":e=>t[l]=e,label:o},null);case"border":return f(ia,{value:t[l],"onUpdate:value":e=>t[l]=e,label:o},null);case"borderTop":return f(ra,{value:t[l],"onUpdate:value":e=>t[l]=e},null);case"width":return f(Lr,{value:t[l],"onUpdate:value":e=>t[l]=e},null);case"widthAuto":return f(Fr,{value:t[l],"onUpdate:value":e=>t[l]=e},null);case"widthNumber":return f(Wr,{value:t[l],"onUpdate:value":e=>t[l]=e},null);case"fontWeight":return f(Xr,{value:t[l],"onUpdate:value":e=>t[l]=e},null);case"fontSize":return f(Gr,{value:t[l],"onUpdate:value":e=>t[l]=e},null);case"lineHeight":return f(Yr,{value:t[l],"onUpdate:value":e=>t[l]=e},null);case"letterSpacing":return f(Jr,{value:t[l],"onUpdate:value":e=>t[l]=e},null);case"textAlign":return f(Qr,{value:t[l],"onUpdate:value":e=>t[l]=e,label:o},null);case"borderRadius":return f(sa,{value:t[l],"onUpdate:value":e=>t[l]=e},null);case"layout":return f(da,{value:t[l],"onUpdate:value":e=>t[l]=e},null);case"custom":return function(e,t){var n;if(e.render)return f(h,null,[e.render()]);if(e.key)return null==(n=t[e.key])?void 0:n.call(t)}(e,n)}}(n,e.value,t))])});const pa=Me(n({__name:"Collapse",props:{defaultExpandedNames:{}},setup(e){const t=e,n=u(t.defaultExpandedNames||[]);return D(()=>t.defaultExpandedNames,e=>{e&&(n.value=e)}),(e,t)=>{const r=B;return d(),y(r,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=e=>n.value=e)},{default:x(()=>[C(e.$slots,"default",{},void 0,!0)]),_:3},8,["modelValue"])}}}),[["__scopeId","data-v-e9555d11"]]),ga={class:"text"},ha=Me(n({__name:"ColumnItem",props:{active:{type:Boolean,default:!1},options:{default:()=>[100]}},setup:e=>(t,n)=>(d(),v("div",{class:S(["columns-tools",{active:e.active}])},[(d(!0),v(h,null,m(e.options,(e,t)=>{return d(),v("div",{key:"".concat(t+1),class:"columns-item",style:w({flex:"0 0 ".concat(e,"%")})},[p("div",ga,g((n=e,"".concat(Math.floor(n),"%"))),1)],4);var n}),128))],2))}),[["__scopeId","data-v-5204d82f"]]),ma={class:"mt-4"},ya=Me(n({__name:"ColumnsConfig",setup(e){const t=[[100],[50,50],[33.33,33.33,33.34],[25,25,25,25],[33,67],[67,33]],n=u(fe.value[ce.value].children[0]),r=l(()=>{const e=fe.value[ce.value];return e?e.children:[]}),i=l(()=>r.value.map(e=>Number.parseFloat(Q.value[e].width))),s=e=>JSON.stringify(e)===JSON.stringify(i.value),c=l({get:()=>be.value[ce.value],set(e){be.value[ce.value]=e}});D(c,()=>{me.$emit("makeDom")},{deep:!0}),D(he,()=>{me.$emit("makeDom")},{deep:!0});const[g]=va([{attrKey:"backgroundColor",label:"背景颜色"},{attrKey:"padding",label:"内边距"},{attrKey:"border",label:"边框"}]),[S]=va([{attrKey:"custom",render:()=>f(Rr,{value:be.value[ce.value].style.backgroundColor,"onUpdate:value":e=>be.value[ce.value].style.backgroundColor=e,label:"背景颜色"},null)},{attrKey:"custom",render:()=>f(ua,{value:be.value[ce.value].style.padding,"onUpdate:value":e=>be.value[ce.value].style.padding=e,label:"内边距"},null)}]);function O(){Ee(n.value,ce.value),T(()=>{n.value=fe.value[ce.value].children[0]})}return(e,r)=>{const l=V,i=H,u=z,D=q,w=je;return d(),y(pa,{"default-expanded-names":["1","2","3"]},{default:x(()=>[f(u,{title:"列项",name:"1"},{default:x(()=>[f(i,{gutter:16},{default:x(()=>[(d(),v(h,null,m(t,(e,t)=>f(l,{span:12,key:"".concat(t+1)},{default:x(()=>[f(ha,{active:s(e),options:e,onClick:t=>o(Te)(e,o(ce))},null,8,["active","options","onClick"])]),_:2},1024)),64))]),_:1})]),_:1}),f(u,{title:"列项样式",name:"2"},{default:x(()=>[f(D,{size:"default",onClick:r[0]||(r[0]=()=>o(Ce)(o(ce)))},{default:x(()=>[...r[4]||(r[4]=[k(" 添加 ",-1)])]),_:1}),o(fe)[o(ce)].children.length>1?(d(),y(D,{key:0,class:"ml-2",size:"default",onClick:O},{default:x(()=>[...r[5]||(r[5]=[k(" 删除 ",-1)])]),_:1})):b("",!0),f(w,{modelValue:o(n),"onUpdate:modelValue":r[1]||(r[1]=e=>a(n)?n.value=e:null),type:"bg-card",class:"mt-4",options:o(fe)[o(ce)].children.map((e,t)=>({label:"列项 ".concat(t+1),name:e}))},null,8,["modelValue","options"]),p("div",ma,[f(o(g),{value:o(he)[o(n)].style,"onUpdate:value":r[2]||(r[2]=e=>o(he)[o(n)].style=e)},null,8,["value"])])]),_:1}),f(u,{title:"列项样式",name:"3"},{default:x(()=>[f(o(S),{value:o(c).style,"onUpdate:value":r[3]||(r[3]=e=>o(c).style=e)},null,8,["value"])]),_:1})]),_:1})}}}),[["__scopeId","data-v-59cf3e91"]]),ba={class:"mt-3"},Da=n({__name:"Link",props:{value:{},valueModifiers:{},target:{},targetModifiers:{}},emits:["update:value","update:target"],setup(e){const t=E(e,"value"),n=E(e,"target");return(e,r)=>{const a=W,o=A;return d(),y(Kr,{label:"链接"},{options:x(()=>[p("div",null,[f(a,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=e=>t.value=e)},null,8,["modelValue"])]),p("div",ba,[f(o,{modelValue:n.value,"onUpdate:modelValue":r[1]||(r[1]=e=>n.value=e),"active-value":"_blank","inactive-value":"_self"},null,8,["modelValue"]),r[2]||(r[2]=p("span",{class:"ml-2"},"在新窗口打开",-1))])]),_:1})}}}),Sa=n({__name:"ContentText",props:{value:{},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value");return(e,n)=>{const r=W;return d(),y(Kr,{label:"内容"},{options:x(()=>[p("div",null,[f(r,{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=e=>t.value=e)},null,8,["modelValue"])])]),_:1})}}}),Oa={class:"p-20px"},wa=n({__name:"ButtonConfig",setup(e){const t=l({get:()=>ie.value[ce.value],set(e){ie.value[ce.value]=e}});D(t,()=>{me.$emit("makeDom")},{deep:!0});const[n]=va([{attrKey:"custom",render:()=>f(Sa,{value:t.value.content,"onUpdate:value":e=>t.value.content=e},null)},{attrKey:"custom",render:()=>f(Da,{value:t.value.info.href,"onUpdate:value":e=>t.value.info.href=e,target:t.value.info.target,"onUpdate:target":e=>t.value.info.target=e,label:"链接"},null)},{attrKey:"backgroundColor",label:"背景颜色"},{attrKey:"color",label:"文本颜色"},{attrKey:"widthAuto",key:"width"},{attrKey:"fontWeight"},{attrKey:"fontSize"},{attrKey:"lineHeight"},{attrKey:"letterSpacing"},{attrKey:"custom",render:()=>f(Qr,{value:t.value.general.textAlign,"onUpdate:value":e=>t.value.general.textAlign=e,label:"对齐方式"},null)},{attrKey:"padding"},{attrKey:"border"},{attrKey:"borderRadius"},{attrKey:"custom",render:()=>f(ua,{value:t.value.general.padding,"onUpdate:value":e=>t.value.general.padding=e,label:"内边距"},null)}]);return(e,r)=>(d(),v("div",Oa,[f(o(n),{value:o(t).style,"onUpdate:value":r[0]||(r[0]=e=>o(t).style=e)},null,8,["value"])]))}}),Ia={class:"p-20px"},_a=n({__name:"DividerConfig",setup(e){const t=l({get:()=>ie.value[ce.value],set(e){ie.value[ce.value]=e}});D(t,()=>{me.$emit("makeDom")},{deep:!0});const[n]=va([{attrKey:"width"},{attrKey:"borderTop"},{attrKey:"custom",render:()=>f(Qr,{value:t.value.general.textAlign,"onUpdate:value":e=>t.value.general.textAlign=e,label:"对齐方式"},null)},{attrKey:"custom",render:()=>f(ua,{value:t.value.general.padding,"onUpdate:value":e=>t.value.general.padding=e,label:"内边距"},null)}]);return(e,r)=>(d(),v("div",Ia,[f(o(n),{value:o(t).style,"onUpdate:value":r[0]||(r[0]=e=>o(t).style=e)},null,8,["value"])]))}}),Ta={class:"p-20px"},Ca=n({__name:"HeaderConfig",setup(e){const t=l({get:()=>ie.value[ce.value],set(e){ie.value[ce.value]=e}});D(t,()=>{me.$emit("makeDom")},{deep:!0});const[n]=va([{attrKey:"custom",render:()=>f(Sa,{value:t.value.content,"onUpdate:value":e=>t.value.content=e},null)},{attrKey:"head",key:"fontSize"},{attrKey:"fontWeight"},{attrKey:"fontSize"},{attrKey:"color",label:"颜色"},{attrKey:"custom",render:()=>f(Qr,{value:t.value.general.textAlign,"onUpdate:value":e=>t.value.general.textAlign=e,label:"对齐方式"},null)},{attrKey:"lineHeight"},{attrKey:"letterSpacing"},{attrKey:"custom",render:()=>f(ua,{value:t.value.general.padding,"onUpdate:value":e=>t.value.general.padding=e,label:"内边距"},null)}]);return(e,r)=>(d(),v("div",Ta,[f(o(n),{value:o(t).style,"onUpdate:value":r[0]||(r[0]=e=>o(t).style=e)},null,8,["value"])]))}}),Ea={class:"p-16px"},xa=n({__name:"TextConfig",setup(e){const t=l({get:()=>ie.value[ce.value],set(e){ie.value[ce.value]=e}});D(t,()=>{me.$emit("makeDom")},{deep:!0});const[n]=va([{attrKey:"custom",render:()=>f(Sa,{value:t.value.content,"onUpdate:value":e=>t.value.content=e},null)},{attrKey:"fontWeight"},{attrKey:"fontSize"},{attrKey:"color",label:"文本颜色"},{attrKey:"textAlign"},{attrKey:"lineHeight"},{attrKey:"letterSpacing"},{attrKey:"custom",render:()=>f(ua,{value:t.value.general.padding,"onUpdate:value":e=>t.value.general.padding=e,label:"内边距"},null)}]);return(e,r)=>(d(),v("div",Ea,[f(o(n),{value:o(t).style,"onUpdate:value":r[0]||(r[0]=e=>o(t).style=e)},null,8,["value"])]))}}),ka=n({__name:"Image",props:{value:{},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value");return(e,n)=>{const r=W;return d(),y(Kr,{label:"图片链接"},{options:x(()=>[f(r,{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=e=>t.value=e)},null,8,["modelValue"])]),_:1})}}}),Pa=n({__name:"Title",props:{value:{},valueModifiers:{}},emits:["update:value"],setup(e){const t=E(e,"value");return(e,n)=>{const r=W;return d(),y(Kr,{label:"备用文本"},{options:x(()=>[f(r,{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=e=>t.value=e)},null,8,["modelValue"])]),_:1})}}}),Na={class:"p-20px"},Ua=n({__name:"ImageConfig",setup(e){const t=l({get:()=>ie.value[ce.value],set(e){ie.value[ce.value]=e}});D(t,()=>{me.$emit("makeDom")},{deep:!0});const[n]=va([{attrKey:"custom",render:()=>f(ka,{value:t.value.info.src,"onUpdate:value":e=>t.value.info.src=e},null)},{attrKey:"widthAuto",key:"width"},{attrKey:"custom",render:()=>f(Qr,{value:t.value.general.textAlign,"onUpdate:value":e=>t.value.general.textAlign=e,label:"对齐方式"},null)},{attrKey:"custom",render:()=>f(Pa,{value:t.value.info.alt,"onUpdate:value":e=>t.value.info.alt=e},null)},{attrKey:"custom",render:()=>f(Da,{value:t.value.info.href,"onUpdate:value":e=>t.value.info.href=e,target:t.value.info.target,"onUpdate:target":e=>t.value.info.target=e},null)},{attrKey:"custom",render:()=>f(ua,{value:t.value.general.padding,"onUpdate:value":e=>t.value.general.padding=e,label:"内边距"},null)}]);return(e,r)=>(d(),v("div",Na,[f(o(n),{value:o(t).style,"onUpdate:value":r[0]||(r[0]=e=>o(t).style=e)},null,8,["value"])]))}}),Ka={class:"w-100px"},Ma={class:"w-100px"},Aa=Me(n({__name:"MenuLinkItem",props:U({id:{},index:{},moveLink:{type:Function},findLink:{type:Function}},{label:{},labelModifiers:{},href:{},hrefModifiers:{}}),emits:U(["del"],["update:label","update:href"]),setup(e,{emit:t}){const n=e,r=t,a=E(e,"label"),i=E(e,"href"),u=()=>{r("del")},[s,c,g]=kn({type:"MenuLink",item:()=>({id:n.id,index:n.index}),collect:e=>({isDragging:e.isDragging()}),end:(e,t)=>{const{id:r,index:a}=e;t.didDrop()||n.moveLink(r,a)}}),[,h]=An(()=>({accept:"MenuLink",hover({id:e}){if(e!==n.id){const{index:t}=n.findLink(n.id);n.moveLink(e,t)}}})),m=e=>{e&&g(h(e))},{isDragging:y}=_(s),b=l(()=>o(y)?0:1);return(e,t)=>{const n=W,r=Ke;return d(),v("li",{ref:m,class:"link-items",style:w({opacity:o(b)})},[p("div",Ka,[f(n,{modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=e=>a.value=e)},null,8,["modelValue"])]),p("div",Ma,[f(n,{modelValue:i.value,"onUpdate:modelValue":t[1]||(t[1]=e=>i.value=e)},null,8,["modelValue"])]),p("div",{class:"w-auto cursor-pointer",onClick:u},[f(r,{icon:"el-delete",size:13})]),p("div",{ref:o(c),class:"w-auto cursor-grab"},[f(r,{icon:"el-fullscreen-expand",size:13})],512)],4)}}}),[["__scopeId","data-v-3ecdb7d7"]]),Ra={class:"flex-1"},ja={class:"link-group"},La=Me(n({__name:"MenuLink",setup(e){const t=l({get:()=>ie.value[ce.value].links,set(e){ie.value[ce.value].links=e}}),n=()=>{t.value.push({id:J(6),label:"",href:""})},r=e=>{const n=t.value.filter(t=>"".concat(t.id)===e)[0];return{link:n,index:t.value.indexOf(n)}},a=(e,n)=>{const{link:a,index:o}=r(e);t.value.splice(o,1),t.value.splice(n,0,a)};return(e,l)=>{const i=q,u=$;return d(),y(u,{label:"Links"},{default:x(()=>[p("div",Ra,[p("ul",ja,[(d(!0),v(h,null,m(o(t),(e,n)=>(d(),y(Aa,{label:e.label,"onUpdate:label":t=>e.label=t,href:e.href,"onUpdate:href":t=>e.href=t,id:e.id,index:n,key:e.id,item:e,"find-link":r,"move-link":a,onDel:e=>(e=>{t.value.splice(e,1)})(n)},null,8,["label","onUpdate:label","href","onUpdate:href","id","index","item","onDel"]))),128))]),f(i,{class:"mt-3 w-full",onClick:n},{default:x(()=>[...l[0]||(l[0]=[k("添加",-1)])]),_:1})])]),_:1})}}}),[["__scopeId","data-v-8870bd5f"]]),Va={class:"p-16px"},Ha=n({__name:"MenuConfig",setup(e){const t=l({get:()=>ie.value[ce.value],set(e){ie.value[ce.value]=e}});D(()=>t.value,()=>{me.$emit("makeDom")},{deep:!0});const[n]=va([{attrKey:"fontWeight"},{attrKey:"fontSize"},{attrKey:"letterSpacing"},{attrKey:"color",label:"文本颜色"},{attrKey:"color",key:"linkColor",label:"链接颜色"},{attrKey:"custom",render:()=>f(Qr,{value:t.value.general.textAlign,"onUpdate:value":e=>t.value.general.textAlign=e,label:"对齐方式"},null)},{attrKey:"custom",render:()=>f(da,{value:t.value.info.layout,"onUpdate:value":e=>t.value.info.layout=e},null)},{attrKey:"padding"},{attrKey:"custom",render:()=>f(ua,{value:t.value.general.padding,"onUpdate:value":e=>t.value.general.padding=e,label:"内边距"},null)}]);return(e,r)=>(d(),v("div",Va,[f(La),f(o(n),{value:o(t).style,"onUpdate:value":r[0]||(r[0]=e=>o(t).style=e)},null,8,["value"])]))}}),Fa=n({__name:"ConfigComponent",setup:e=>(e,t)=>(d(),v("div",null,["columns"==o(ve)?(d(),y(ya,{key:0})):"button"==o(ve)?(d(),y(wa,{key:1})):"divider"==o(ve)?(d(),y(_a,{key:2})):"header"==o(ve)?(d(),y(Ca,{key:3})):"text"==o(ve)?(d(),y(xa,{key:4})):"image"==o(ve)?(d(),y(Ua,{key:5})):"menu"==o(ve)?(d(),y(Ha,{key:6})):b("",!0)]))}),Ba={class:"p-20px"},za=n({__name:"ConfigPage",setup(e){D(De,()=>{me.$emit("makeDom")},{deep:!0});const[t]=va([{attrKey:"color",key:"backgroundColor",label:"背景颜色"},{attrKey:"widthNumber",key:"maxWidth"}]);return(e,n)=>(d(),v("div",Ba,[f(o(t),{value:o(De),"onUpdate:value":n[0]||(n[0]=e=>a(De)?De.value=e:null)},null,8,["value"])]))}}),qa=Me(n({__name:"index",setup(e){const t=u([{label:"内容配置",name:"component",render:()=>f(Fa,null,null)},{label:"页面配置",name:"page",render:()=>f(za,null,null)}]),n=u("component");return(e,r)=>{const l=je;return d(),y(l,{type:"card",options:o(t),modelValue:o(n),"onUpdate:modelValue":r[0]||(r[0]=e=>a(n)?n.value=e:null)},null,8,["options","modelValue"])}}}),[["__scopeId","data-v-829f61b1"]]),Wa={class:"editor-content"},$a={class:"editor-left"},Xa={class:"editor-center"},Ga={class:"editor-right"},Ya=Me(n({__name:"index",props:{save:{}},setup(e,{expose:t}){const n=e;return n.save&&(xe.value=n.save),X(()=>{ke()}),t({setEmailData:Pe,getEmailData:()=>Ne.value,getEmailHTML:()=>te.value}),(e,t)=>(d(),y(o(tn),{backend:o(ar)},{default:x(()=>[p("div",Wa,[p("div",$a,[f(sr)]),p("div",Xa,[f(xr,{onColumnDrag:o(Ue)},null,8,["onColumnDrag"])]),p("div",Ga,[f(qa)])])]),_:1},8,["backend"]))}}),[["__scopeId","data-v-57f6b4d2"]]);export{Ya as default}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = [] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) }
Save File
Cancel