UNPKG

yunzai-micro-plugin

Version:

Yunzai开发管理面板

1 lines 130 kB
import{a as zt,b as il,c as dl,d as cl,e as pl,f as fl,g as ml}from"./index-499662cc.js";import{u as ft}from"./dev-730c77e3.js";import{a as J,k as R,ab as j,p as mt,v as vt,o as h,c as V,P as K,_ as te,ak as vl,al as de,b as w,e as N,l as ke,E as ht,y as $,t as ne,A as ye,r as y,i as n,w as s,F as B,g as Y,u as S,am as Ut,h as q,j as Ze,an as Ce,B as ve,C as et,D as tt,ag as he,ao as hl,ap as we,G as Ie,aq as st,ar as gl,n as Ft,as as _l,at as Lt,au as gt,O as lt,av as bl,aw as yl,ax as wl,ay as xl,af as Tt,az as kl,z as ge,aA as Cl,aB as Vl,aC as $l,aD as Sl,aE as Ml,aF as zl,aG as Ul,aH as El,aI as Il,aJ as Hl,ai as ae}from"./index-6f2f2fc7.js";import{E as qt}from"./codeEditor-23ba9fe0.js";import{_ as Rl}from"./index.vue_vue_type_script_setup_true_lang-cf9ec4b4.js";import{f as Dl}from"./data-10fa9501.js";import{a as Fl}from"./time-194208a7.js";const Ll=J({__name:"Area",emits:["move","up"],setup(e,{expose:t,emit:o}){const l=o,a=R(!1),u=R({width:0,height:0,top:0,left:0}),r=j(()=>{const{width:d,height:p,top:f,left:v}=u.value;return{width:d+"px",height:p+"px",top:f+"px",left:v+"px"}});function i(d){const{pageX:p,pageY:f}=d,v=d.target.getBoundingClientRect(),m=p-v.left,c=f-v.top,_=z=>{const g=z.pageX-p,b=z.pageY-f;let I=m,H=c,A=Math.abs(g),P=Math.abs(b);(A>2||P>2)&&(a.value=!0),g<0&&(I=m-A),b<0&&(H=c-P),u.value={width:A,height:P,left:I,top:H},l("move",{...u.value})},x=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",x),a.value=!1,u.value={width:0,height:0,top:0,left:0},l("up",u.value)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",x)}return t({onMouseDown:i,areaData:u}),(d,p)=>mt((h(),V("div",{class:"es-editor-area",style:K(r.value)},null,4)),[[vt,a.value]])}}),Tl=te(Ll,[["__scopeId","data-v-f8facc6a"]]);var Bt={exports:{}},At={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Pt={exports:{}},ql=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},Bl=ql,Al=Array.prototype.concat,Pl=Array.prototype.slice,Et=Pt.exports=function(t){for(var o=[],l=0,a=t.length;l<a;l++){var u=t[l];Bl(u)?o=Al.call(o,Pl.call(u)):o.push(u)}return o};Et.wrap=function(e){return function(){return e(Et(arguments))}};var Ol=Pt.exports,Re=At,Fe=Ol,Ot=Object.hasOwnProperty,jt=Object.create(null);for(var rt in Re)Ot.call(Re,rt)&&(jt[Re[rt]]=rt);var ie=Bt.exports={to:{},get:{}};ie.get=function(e){var t=e.substring(0,3).toLowerCase(),o,l;switch(t){case"hsl":o=ie.get.hsl(e),l="hsl";break;case"hwb":o=ie.get.hwb(e),l="hwb";break;default:o=ie.get.rgb(e),l="rgb";break}return o?{model:l,value:o}:null};ie.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,o=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,l=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,a=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,u=/^(\w+)$/,r=[0,0,0,1],i,d,p;if(i=e.match(o)){for(p=i[2],i=i[1],d=0;d<3;d++){var f=d*2;r[d]=parseInt(i.slice(f,f+2),16)}p&&(r[3]=parseInt(p,16)/255)}else if(i=e.match(t)){for(i=i[1],p=i[3],d=0;d<3;d++)r[d]=parseInt(i[d]+i[d],16);p&&(r[3]=parseInt(p+p,16)/255)}else if(i=e.match(l)){for(d=0;d<3;d++)r[d]=parseInt(i[d+1],0);i[4]&&(i[5]?r[3]=parseFloat(i[4])*.01:r[3]=parseFloat(i[4]))}else if(i=e.match(a)){for(d=0;d<3;d++)r[d]=Math.round(parseFloat(i[d+1])*2.55);i[4]&&(i[5]?r[3]=parseFloat(i[4])*.01:r[3]=parseFloat(i[4]))}else return(i=e.match(u))?i[1]==="transparent"?[0,0,0,0]:Ot.call(Re,i[1])?(r=Re[i[1]],r[3]=1,r):null:null;for(d=0;d<3;d++)r[d]=xe(r[d],0,255);return r[3]=xe(r[3],0,1),r};ie.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,o=e.match(t);if(o){var l=parseFloat(o[4]),a=(parseFloat(o[1])%360+360)%360,u=xe(parseFloat(o[2]),0,100),r=xe(parseFloat(o[3]),0,100),i=xe(isNaN(l)?1:l,0,1);return[a,u,r,i]}return null};ie.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,o=e.match(t);if(o){var l=parseFloat(o[4]),a=(parseFloat(o[1])%360+360)%360,u=xe(parseFloat(o[2]),0,100),r=xe(parseFloat(o[3]),0,100),i=xe(isNaN(l)?1:l,0,1);return[a,u,r,i]}return null};ie.to.hex=function(){var e=Fe(arguments);return"#"+Pe(e[0])+Pe(e[1])+Pe(e[2])+(e[3]<1?Pe(Math.round(e[3]*255)):"")};ie.to.rgb=function(){var e=Fe(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};ie.to.rgb.percent=function(){var e=Fe(arguments),t=Math.round(e[0]/255*100),o=Math.round(e[1]/255*100),l=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+o+"%, "+l+"%)":"rgba("+t+"%, "+o+"%, "+l+"%, "+e[3]+")"};ie.to.hsl=function(){var e=Fe(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};ie.to.hwb=function(){var e=Fe(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};ie.to.keyword=function(e){return jt[e.slice(0,3)]};function xe(e,t,o){return Math.min(Math.max(t,e),o)}function Pe(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var jl=Bt.exports;const De=At,Nt={};for(const e of Object.keys(De))Nt[De[e]]=e;const D={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Gt=D;for(const e of Object.keys(D)){if(!("channels"in D[e]))throw new Error("missing channels property: "+e);if(!("labels"in D[e]))throw new Error("missing channel labels property: "+e);if(D[e].labels.length!==D[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:o}=D[e];delete D[e].channels,delete D[e].labels,Object.defineProperty(D[e],"channels",{value:t}),Object.defineProperty(D[e],"labels",{value:o})}D.rgb.hsl=function(e){const t=e[0]/255,o=e[1]/255,l=e[2]/255,a=Math.min(t,o,l),u=Math.max(t,o,l),r=u-a;let i,d;u===a?i=0:t===u?i=(o-l)/r:o===u?i=2+(l-t)/r:l===u&&(i=4+(t-o)/r),i=Math.min(i*60,360),i<0&&(i+=360);const p=(a+u)/2;return u===a?d=0:p<=.5?d=r/(u+a):d=r/(2-u-a),[i,d*100,p*100]};D.rgb.hsv=function(e){let t,o,l,a,u;const r=e[0]/255,i=e[1]/255,d=e[2]/255,p=Math.max(r,i,d),f=p-Math.min(r,i,d),v=function(m){return(p-m)/6/f+1/2};return f===0?(a=0,u=0):(u=f/p,t=v(r),o=v(i),l=v(d),r===p?a=l-o:i===p?a=1/3+t-l:d===p&&(a=2/3+o-t),a<0?a+=1:a>1&&(a-=1)),[a*360,u*100,p*100]};D.rgb.hwb=function(e){const t=e[0],o=e[1];let l=e[2];const a=D.rgb.hsl(e)[0],u=1/255*Math.min(t,Math.min(o,l));return l=1-1/255*Math.max(t,Math.max(o,l)),[a,u*100,l*100]};D.rgb.cmyk=function(e){const t=e[0]/255,o=e[1]/255,l=e[2]/255,a=Math.min(1-t,1-o,1-l),u=(1-t-a)/(1-a)||0,r=(1-o-a)/(1-a)||0,i=(1-l-a)/(1-a)||0;return[u*100,r*100,i*100,a*100]};function Nl(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}D.rgb.keyword=function(e){const t=Nt[e];if(t)return t;let o=1/0,l;for(const a of Object.keys(De)){const u=De[a],r=Nl(e,u);r<o&&(o=r,l=a)}return l};D.keyword.rgb=function(e){return De[e]};D.rgb.xyz=function(e){let t=e[0]/255,o=e[1]/255,l=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,l=l>.04045?((l+.055)/1.055)**2.4:l/12.92;const a=t*.4124+o*.3576+l*.1805,u=t*.2126+o*.7152+l*.0722,r=t*.0193+o*.1192+l*.9505;return[a*100,u*100,r*100]};D.rgb.lab=function(e){const t=D.rgb.xyz(e);let o=t[0],l=t[1],a=t[2];o/=95.047,l/=100,a/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,l=l>.008856?l**(1/3):7.787*l+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const u=116*l-16,r=500*(o-l),i=200*(l-a);return[u,r,i]};D.hsl.rgb=function(e){const t=e[0]/360,o=e[1]/100,l=e[2]/100;let a,u,r;if(o===0)return r=l*255,[r,r,r];l<.5?a=l*(1+o):a=l+o-l*o;const i=2*l-a,d=[0,0,0];for(let p=0;p<3;p++)u=t+1/3*-(p-1),u<0&&u++,u>1&&u--,6*u<1?r=i+(a-i)*6*u:2*u<1?r=a:3*u<2?r=i+(a-i)*(2/3-u)*6:r=i,d[p]=r*255;return d};D.hsl.hsv=function(e){const t=e[0];let o=e[1]/100,l=e[2]/100,a=o;const u=Math.max(l,.01);l*=2,o*=l<=1?l:2-l,a*=u<=1?u:2-u;const r=(l+o)/2,i=l===0?2*a/(u+a):2*o/(l+o);return[t,i*100,r*100]};D.hsv.rgb=function(e){const t=e[0]/60,o=e[1]/100;let l=e[2]/100;const a=Math.floor(t)%6,u=t-Math.floor(t),r=255*l*(1-o),i=255*l*(1-o*u),d=255*l*(1-o*(1-u));switch(l*=255,a){case 0:return[l,d,r];case 1:return[i,l,r];case 2:return[r,l,d];case 3:return[r,i,l];case 4:return[d,r,l];case 5:return[l,r,i]}};D.hsv.hsl=function(e){const t=e[0],o=e[1]/100,l=e[2]/100,a=Math.max(l,.01);let u,r;r=(2-o)*l;const i=(2-o)*a;return u=o*a,u/=i<=1?i:2-i,u=u||0,r/=2,[t,u*100,r*100]};D.hwb.rgb=function(e){const t=e[0]/360;let o=e[1]/100,l=e[2]/100;const a=o+l;let u;a>1&&(o/=a,l/=a);const r=Math.floor(6*t),i=1-l;u=6*t-r,r&1&&(u=1-u);const d=o+u*(i-o);let p,f,v;switch(r){default:case 6:case 0:p=i,f=d,v=o;break;case 1:p=d,f=i,v=o;break;case 2:p=o,f=i,v=d;break;case 3:p=o,f=d,v=i;break;case 4:p=d,f=o,v=i;break;case 5:p=i,f=o,v=d;break}return[p*255,f*255,v*255]};D.cmyk.rgb=function(e){const t=e[0]/100,o=e[1]/100,l=e[2]/100,a=e[3]/100,u=1-Math.min(1,t*(1-a)+a),r=1-Math.min(1,o*(1-a)+a),i=1-Math.min(1,l*(1-a)+a);return[u*255,r*255,i*255]};D.xyz.rgb=function(e){const t=e[0]/100,o=e[1]/100,l=e[2]/100;let a,u,r;return a=t*3.2406+o*-1.5372+l*-.4986,u=t*-.9689+o*1.8758+l*.0415,r=t*.0557+o*-.204+l*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,r=r>.0031308?1.055*r**(1/2.4)-.055:r*12.92,a=Math.min(Math.max(0,a),1),u=Math.min(Math.max(0,u),1),r=Math.min(Math.max(0,r),1),[a*255,u*255,r*255]};D.xyz.lab=function(e){let t=e[0],o=e[1],l=e[2];t/=95.047,o/=100,l/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;const a=116*o-16,u=500*(t-o),r=200*(o-l);return[a,u,r]};D.lab.xyz=function(e){const t=e[0],o=e[1],l=e[2];let a,u,r;u=(t+16)/116,a=o/500+u,r=u-l/200;const i=u**3,d=a**3,p=r**3;return u=i>.008856?i:(u-16/116)/7.787,a=d>.008856?d:(a-16/116)/7.787,r=p>.008856?p:(r-16/116)/7.787,a*=95.047,u*=100,r*=108.883,[a,u,r]};D.lab.lch=function(e){const t=e[0],o=e[1],l=e[2];let a;a=Math.atan2(l,o)*360/2/Math.PI,a<0&&(a+=360);const r=Math.sqrt(o*o+l*l);return[t,r,a]};D.lch.lab=function(e){const t=e[0],o=e[1],a=e[2]/360*2*Math.PI,u=o*Math.cos(a),r=o*Math.sin(a);return[t,u,r]};D.rgb.ansi16=function(e,t=null){const[o,l,a]=e;let u=t===null?D.rgb.hsv(e)[2]:t;if(u=Math.round(u/50),u===0)return 30;let r=30+(Math.round(a/255)<<2|Math.round(l/255)<<1|Math.round(o/255));return u===2&&(r+=60),r};D.hsv.ansi16=function(e){return D.rgb.ansi16(D.hsv.rgb(e),e[2])};D.rgb.ansi256=function(e){const t=e[0],o=e[1],l=e[2];return t===o&&o===l?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(l/255*5)};D.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const o=(~~(e>50)+1)*.5,l=(t&1)*o*255,a=(t>>1&1)*o*255,u=(t>>2&1)*o*255;return[l,a,u]};D.ansi256.rgb=function(e){if(e>=232){const u=(e-232)*10+8;return[u,u,u]}e-=16;let t;const o=Math.floor(e/36)/5*255,l=Math.floor((t=e%36)/6)/5*255,a=t%6/5*255;return[o,l,a]};D.rgb.hex=function(e){const o=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(o.length)+o};D.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let o=t[0];t[0].length===3&&(o=o.split("").map(i=>i+i).join(""));const l=parseInt(o,16),a=l>>16&255,u=l>>8&255,r=l&255;return[a,u,r]};D.rgb.hcg=function(e){const t=e[0]/255,o=e[1]/255,l=e[2]/255,a=Math.max(Math.max(t,o),l),u=Math.min(Math.min(t,o),l),r=a-u;let i,d;return r<1?i=u/(1-r):i=0,r<=0?d=0:a===t?d=(o-l)/r%6:a===o?d=2+(l-t)/r:d=4+(t-o)/r,d/=6,d%=1,[d*360,r*100,i*100]};D.hsl.hcg=function(e){const t=e[1]/100,o=e[2]/100,l=o<.5?2*t*o:2*t*(1-o);let a=0;return l<1&&(a=(o-.5*l)/(1-l)),[e[0],l*100,a*100]};D.hsv.hcg=function(e){const t=e[1]/100,o=e[2]/100,l=t*o;let a=0;return l<1&&(a=(o-l)/(1-l)),[e[0],l*100,a*100]};D.hcg.rgb=function(e){const t=e[0]/360,o=e[1]/100,l=e[2]/100;if(o===0)return[l*255,l*255,l*255];const a=[0,0,0],u=t%1*6,r=u%1,i=1-r;let d=0;switch(Math.floor(u)){case 0:a[0]=1,a[1]=r,a[2]=0;break;case 1:a[0]=i,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=r;break;case 3:a[0]=0,a[1]=i,a[2]=1;break;case 4:a[0]=r,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=i}return d=(1-o)*l,[(o*a[0]+d)*255,(o*a[1]+d)*255,(o*a[2]+d)*255]};D.hcg.hsv=function(e){const t=e[1]/100,o=e[2]/100,l=t+o*(1-t);let a=0;return l>0&&(a=t/l),[e[0],a*100,l*100]};D.hcg.hsl=function(e){const t=e[1]/100,l=e[2]/100*(1-t)+.5*t;let a=0;return l>0&&l<.5?a=t/(2*l):l>=.5&&l<1&&(a=t/(2*(1-l))),[e[0],a*100,l*100]};D.hcg.hwb=function(e){const t=e[1]/100,o=e[2]/100,l=t+o*(1-t);return[e[0],(l-t)*100,(1-l)*100]};D.hwb.hcg=function(e){const t=e[1]/100,l=1-e[2]/100,a=l-t;let u=0;return a<1&&(u=(l-a)/(1-a)),[e[0],a*100,u*100]};D.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};D.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};D.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};D.gray.hsl=function(e){return[0,0,e[0]]};D.gray.hsv=D.gray.hsl;D.gray.hwb=function(e){return[0,100,e[0]]};D.gray.cmyk=function(e){return[0,0,0,e[0]]};D.gray.lab=function(e){return[e[0],0,0]};D.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,l=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(l.length)+l};D.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Qe=Gt;function Gl(){const e={},t=Object.keys(Qe);for(let o=t.length,l=0;l<o;l++)e[t[l]]={distance:-1,parent:null};return e}function Yl(e){const t=Gl(),o=[e];for(t[e].distance=0;o.length;){const l=o.pop(),a=Object.keys(Qe[l]);for(let u=a.length,r=0;r<u;r++){const i=a[r],d=t[i];d.distance===-1&&(d.distance=t[l].distance+1,d.parent=l,o.unshift(i))}}return t}function Jl(e,t){return function(o){return t(e(o))}}function Wl(e,t){const o=[t[e].parent,e];let l=Qe[t[e].parent][e],a=t[e].parent;for(;t[a].parent;)o.unshift(t[a].parent),l=Jl(Qe[t[a].parent][a],l),a=t[a].parent;return l.conversion=o,l}var Ql=function(e){const t=Yl(e),o={},l=Object.keys(t);for(let a=l.length,u=0;u<a;u++){const r=l[u];t[r].parent!==null&&(o[r]=Wl(r,t))}return o};const dt=Gt,Xl=Ql,ze={},Kl=Object.keys(dt);function Zl(e){const t=function(...o){const l=o[0];return l==null?l:(l.length>1&&(o=l),e(o))};return"conversion"in e&&(t.conversion=e.conversion),t}function en(e){const t=function(...o){const l=o[0];if(l==null)return l;l.length>1&&(o=l);const a=e(o);if(typeof a=="object")for(let u=a.length,r=0;r<u;r++)a[r]=Math.round(a[r]);return a};return"conversion"in e&&(t.conversion=e.conversion),t}Kl.forEach(e=>{ze[e]={},Object.defineProperty(ze[e],"channels",{value:dt[e].channels}),Object.defineProperty(ze[e],"labels",{value:dt[e].labels});const t=Xl(e);Object.keys(t).forEach(l=>{const a=t[l];ze[e][l]=en(a),ze[e][l].raw=Zl(a)})});var tn=ze;const Ue=jl,ue=tn,Yt=["keyword","gray","hex"],ct={};for(const e of Object.keys(ue))ct[[...ue[e].labels].sort().join("")]=e;const Xe={};function oe(e,t){if(!(this instanceof oe))return new oe(e,t);if(t&&t in Yt&&(t=null),t&&!(t in ue))throw new Error("Unknown model: "+t);let o,l;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof oe)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const a=Ue.get(e);if(a===null)throw new Error("Unable to parse color from string: "+e);this.model=a.model,l=ue[this.model].channels,this.color=a.value.slice(0,l),this.valpha=typeof a.value[l]=="number"?a.value[l]:1}else if(e.length>0){this.model=t||"rgb",l=ue[this.model].channels;const a=Array.prototype.slice.call(e,0,l);this.color=pt(a,l),this.valpha=typeof e[l]=="number"?e[l]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const a=Object.keys(e);"alpha"in e&&(a.splice(a.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const u=a.sort().join("");if(!(u in ct))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=ct[u];const{labels:r}=ue[this.model],i=[];for(o=0;o<r.length;o++)i.push(e[r[o]]);this.color=pt(i)}if(Xe[this.model])for(l=ue[this.model].channels,o=0;o<l;o++){const a=Xe[this.model][o];a&&(this.color[o]=a(this.color[o]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}oe.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Ue.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);const o=t.valpha===1?t.color:[...t.color,this.valpha];return Ue.to[t.model](o)},percentString(e){const t=this.rgb().round(typeof e=="number"?e:1),o=t.valpha===1?t.color:[...t.color,this.valpha];return Ue.to.rgb.percent(o)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=ue[this.model],{labels:o}=ue[this.model];for(let l=0;l<t;l++)e[o[l]]=this.color[l];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new oe([...this.color.map(nn(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new oe([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:X("rgb",0,le(255)),green:X("rgb",1,le(255)),blue:X("rgb",2,le(255)),hue:X(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:X("hsl",1,le(100)),lightness:X("hsl",2,le(100)),saturationv:X("hsv",1,le(100)),value:X("hsv",2,le(100)),chroma:X("hcg",1,le(100)),gray:X("hcg",2,le(100)),white:X("hwb",1,le(100)),wblack:X("hwb",2,le(100)),cyan:X("cmyk",0,le(100)),magenta:X("cmyk",1,le(100)),yellow:X("cmyk",2,le(100)),black:X("cmyk",3,le(100)),x:X("xyz",0,le(95.047)),y:X("xyz",1,le(100)),z:X("xyz",2,le(108.833)),l:X("lab",0,le(100)),a:X("lab",1),b:X("lab",2),keyword(e){return e!==void 0?new oe(e):ue[this.model].keyword(this.color)},hex(e){return e!==void 0?new oe(e):Ue.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new oe(e);const t=this.rgb().round().color;let o=Math.round(this.valpha*255).toString(16).toUpperCase();return o.length===1&&(o="0"+o),Ue.to.hex(t)+o},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[o,l]of e.entries()){const a=l/255;t[o]=a<=.04045?a/12.92:((a+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),o=e.luminosity();return t>o?(t+.05)/(o+.05):(o+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return oe.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let o=t.color[0];return o=(o+e)%360,o=o<0?360+o:o,t.color[0]=o,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const o=e.rgb(),l=this.rgb(),a=t===void 0?.5:t,u=2*a-1,r=o.alpha()-l.alpha(),i=((u*r===-1?u:(u+r)/(1+u*r))+1)/2,d=1-i;return oe.rgb(i*o.red()+d*l.red(),i*o.green()+d*l.green(),i*o.blue()+d*l.blue(),o.alpha()*a+l.alpha()*(1-a))}};for(const e of Object.keys(ue)){if(Yt.includes(e))continue;const{channels:t}=ue[e];oe.prototype[e]=function(...o){return this.model===e?new oe(this):o.length>0?new oe(o,e):new oe([...on(ue[this.model][e].raw(this.color)),this.valpha],e)},oe[e]=function(...o){let l=o[0];return typeof l=="number"&&(l=pt(o,t)),new oe(l,e)}}function ln(e,t){return Number(e.toFixed(t))}function nn(e){return function(t){return ln(t,e)}}function X(e,t,o){e=Array.isArray(e)?e:[e];for(const l of e)(Xe[l]||(Xe[l]=[]))[t]=o;return e=e[0],function(l){let a;return l!==void 0?(o&&(l=o(l)),a=this[e](),a.color[t]=l,a):(a=this[e]().color[t],o&&(a=o(a)),a)}}function le(e){return function(t){return Math.max(0,Math.min(e,t))}}function on(e){return Array.isArray(e)?e:[e]}function pt(e,t){for(let o=0;o<t;o++)typeof e[o]!="number"&&(e[o]=0);return e}var an=oe;const Jt=vl(an);let sn=1;function $e(e="es-drager"){return`${e}-${Date.now()}-${sn++}`}function He(e){return JSON.parse(JSON.stringify(e))}function rn(e,t){const o=e.filter(v=>v.selected);if(!o.length)return e;let l=1/0,a=1/0,u=-1/0,r=-1/0;Math.max(...o.map(v=>v.left)),o.forEach(v=>{const m=document.getElementById(v.id).getBoundingClientRect();l=Math.min(l,m.left-t.left),u=Math.max(u,m.right-t.left),a=Math.min(a,m.top-t.top),r=Math.max(r,m.bottom-t.top)});const i={left:l,top:a,width:u-l,height:r-a};let d=!1;o.forEach(v=>{v.left=v.left-l,v.top=v.top-a,v.groupStyle={...v.style,width:Oe(v.width/i.width),height:Oe(v.height/i.height),left:Oe(v.left/i.width),top:Oe(v.top/i.height),transform:`rotate(${v.angle||0}deg)`,position:"absolute"},v.angle&&(d=!0)});const p={id:$e(),component:"es-group",group:!0,selected:!0,...i,equalProportion:d,props:{elements:o}};return[...e.filter(v=>!v.selected),p]}function un(e,t){const o=e.find(r=>r.selected);if(!o||o.component!=="es-group")return e;const a=o.props.elements.map(r=>{const i=document.getElementById(r.id).getBoundingClientRect(),d={x:i.left-t.left+i.width/2,y:i.top-t.top+i.height/2},p=r.groupStyle,f=o.width*It(p.width),v=o.height*It(p.height),m={width:f,height:v,left:d.x-f/2,top:d.y-v/2,angle:(r.angle||0)+(o.angle||0)};return r.groupStyle={},{...r,...m}});return[...e.filter(r=>r!==o),...a]}function Oe(e){return e*100+"%"}function It(e){return parseFloat(e)/100}function dn(e){return`${e}`.match(/^[0-9.-]+(px|%|rem|em|vh|vw)$/)?e:e+"px"}const cn=["fontSize","lineHeight","borderWidth","borderRadius"],Ht=["fontSize","fontWeight","fontFamily","color","lineHeight","fontStyle","textDecoration","justifyContent","alignItems"];function Ke(e,t=!0){if(!e)return e;const o={},l=Object.keys(e).filter(a=>t?Ht.includes(a):!Ht.includes(a));for(const a of l)o[a]=cn.includes(a)?dn(e[a]):e[a];return o}function pn(e,t){return Object.keys(e).reduce((o,l)=>(t.includes(l)||(o[l]=e[l]),o),{})}const fn={width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg"},mn=["id","width","height"],vn=["d","stroke"],hn=["id","width","height"],gn=["width","height","fill"],_n=["d","stroke"],bn=["fill"],yn=J({__name:"GridRect",props:{grid:{type:Number,default:10},gridCount:{type:Number,default:5},showSmall:{type:Boolean,default:!0},borderColor:{type:String},smallGridId:String,gridId:String},setup(e){const t=de(),o=e,l=j(()=>o.smallGridId||$e("smallGrid")),a=j(()=>o.gridId||$e("grid")),u=j(()=>o.grid*o.gridCount),r=j(()=>{if(o.borderColor)return{bigGrid:o.borderColor,grid:Jt(o.borderColor).fade(.5).rgb().string()};const d=[["#e4e7ed","#ebeef5"],["#414243","#363637"]],[p,f]=d[t.theme==="light"?0:1];return{bigGrid:p,grid:f}}),i=j(()=>({"--border-color":r.value.bigGrid}));return(d,p)=>(h(),V("div",{class:"grid-rect",style:K(i.value)},[(h(),V("svg",fn,[w("defs",null,[e.showSmall?(h(),V("pattern",{key:0,id:l.value,width:e.grid,height:e.grid,patternUnits:"userSpaceOnUse"},[w("path",{d:`M ${e.grid} 0 L 0 0 0 ${e.grid}`,fill:"none",stroke:r.value.grid,"stroke-width":"0.5"},null,8,vn)],8,mn)):N("",!0),w("pattern",{id:a.value,width:u.value,height:u.value,patternUnits:"userSpaceOnUse"},[e.showSmall?(h(),V("rect",{key:0,width:u.value,height:u.value,fill:`url(#${l.value})`},null,8,gn)):N("",!0),w("path",{d:`M ${u.value} 0 L 0 0 0 ${u.value}`,fill:"none",stroke:r.value.bigGrid,"stroke-width":"1"},null,8,_n)],8,hn)]),w("rect",{width:"100%",height:"100%",fill:`url(#${a.value})`},null,8,bn)]))],4))}}),wn=te(yn,[["__scopeId","data-v-ce09f61b"]]),xn=["contenteditable"],kn=J({__name:"TextEditor",props:{editable:{type:Boolean,default:!1},text:{type:String},id:{type:Number,default:0}},setup(e){const t=de(),o=e,l=R();function a(){if(!l.value)return;const r=document.createRange();r.selectNode(l.value),window.getSelection().removeAllRanges(),window.getSelection().addRange(r)}function u(r){t.data.elements[o.id].text=r.target.innerText}return ke(()=>[o.editable],()=>{o.editable&&(a(),t.data.elements[o.id].style.display="flex")}),(r,i)=>(h(),V("div",{ref_key:"textRef",ref:l,class:ye(["es-text",{editable:e.editable}]),contenteditable:e.editable,style:{display:"flex",width:"100%",height:"100%","word-break":"break-all"},onBlur:u},[ht(r.$slots,"default",{},()=>[$(ne(e.text),1)],!0)],42,xn))}}),Wt=te(kn,[["__scopeId","data-v-c5c16f93"]]),Cn='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M938.666667 553.92V768c0 64.8-52.533333 117.333333-117.333334 117.333333H202.666667c-64.8 0-117.333333-52.533333-117.333334-117.333333V256c0-64.8 52.533333-117.333333 117.333334-117.333333h618.666666c64.8 0 117.333333 52.533333 117.333334 117.333333v297.92z m-64-74.624V256a53.333333 53.333333 0 0 0-53.333334-53.333333H202.666667a53.333333 53.333333 0 0 0-53.333334 53.333333v344.48A290.090667 290.090667 0 0 1 192 597.333333a286.88 286.88 0 0 1 183.296 65.845334C427.029333 528.384 556.906667 437.333333 704 437.333333c65.706667 0 126.997333 16.778667 170.666667 41.962667z m0 82.24c-5.333333-8.32-21.130667-21.653333-43.648-32.917333C796.768 511.488 753.045333 501.333333 704 501.333333c-121.770667 0-229.130667 76.266667-270.432 188.693334-2.730667 7.445333-7.402667 20.32-13.994667 38.581333-7.68 21.301333-34.453333 28.106667-51.370666 13.056-16.437333-14.634667-28.554667-25.066667-36.138667-31.146667A222.890667 222.890667 0 0 0 192 661.333333c-14.464 0-28.725333 1.365333-42.666667 4.053334V768a53.333333 53.333333 0 0 0 53.333334 53.333333h618.666666a53.333333 53.333333 0 0 0 53.333334-53.333333V561.525333zM320 480a96 96 0 1 1 0-192 96 96 0 0 1 0 192z m0-64a32 32 0 1 0 0-64 32 32 0 0 0 0 64z"></path></svg>',Vn='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M896 896H96a32 32 0 0 1-32-32V224a32 32 0 0 1 64 0v608h768a32 32 0 1 1 0 64z"></path><path fill="currentColor" d="M247.008 640a32 32 0 0 1-20.992-56.192l200.992-174.24a32 32 0 0 1 42.272 0.288l172.128 153.44 229.088-246.304a32 32 0 0 1 46.88 43.616l-250.432 269.216a31.936 31.936 0 0 1-44.704 2.08l-174.56-155.52-179.744 155.84a31.872 31.872 0 0 1-20.928 7.776z"></path></svg>',$n='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 928C282.624 928 96 741.376 96 512S282.624 96 512 96s416 186.624 416 416-186.624 416-416 416z m0-768C317.92 160 160 317.92 160 512s157.92 352 352 352 352-157.92 352-352S706.08 160 512 160z"></path></svg>',Sn='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M821.816 328.808H203.12c-49.072 0-88.192 33.656-88.192 74.6V701.52c0 41.504 39.792 74.6 88.192 74.6h618.688c49.072 0 88.184-33.656 88.184-74.6V403.408c0.008-40.944-39.784-74.6-88.176-74.6z m-1.96 423.496H203.76c-68.36 0-61.888-59.064-61.888-133.152v-131.68c0-73.096-6.472-133.16 61.888-133.16h616.104c68.328 0 61.88 60.064 61.88 133.16v131.688c0 73.064 6.44 133.144-61.888 133.144z"></path><path fill="currentColor" d="M693.784 460.728H329.816c-40.384 0-36.56 27.696-36.56 61.384v60.72c0 34.144-3.824 61.376 36.56 61.376h363.968c40.384 0 36.576-27.688 36.576-61.376v-60.72c0-33.688 3.808-61.384-36.576-61.384z"></path></svg>',Mn='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M853.333333 138.666667H170.666667c-17.066667 0-32 14.933333-32 32v128c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V202.666667h277.333333v618.666666H384c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h256c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32h-96v-618.666666h277.333333V298.666667c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V170.666667c0-17.066667-14.933333-32-32-32z"></path></svg>',zn='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M864 896H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h704a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zM192 832h640V192H192v640z"></path></svg>',Un=Object.assign({"./svg/图片.svg":Cn,"./svg/图表.svg":Vn,"./svg/圆形.svg":$n,"./svg/按钮.svg":Sn,"./svg/文本.svg":Mn,"./svg/矩形.svg":zn}),En={name:String,color:String,size:[String,Number]},In=e=>e?Un[`./svg/${e}.svg`]:"",Hn=["innerHTML"],Rn=J({__name:"Icon",props:En,setup(e){const t=e,o=j(()=>In(t.name)),l=j(()=>!t.size&&!t.color?{}:{fontSize:typeof t.size=="string"?t.size:`${t.size}px`,"--color":t.color});return(a,u)=>(h(),V("i",{class:"es-icon",style:K(l.value),innerHTML:o.value},null,12,Hn))}}),Dn=te(Rn,[["__scopeId","data-v-9993e1f7"]]),Fn={class:"es-layout-aside"},Ln={class:"collapse-content"},Tn=["onDragstart"],qn={class:"block-text"},Bn={class:"collapse-content"},An=["onDragstart"],Pn=J({__name:"Aside",emits:["dragstart","dragend"],setup(e,{emit:t}){const o=t,l=R(["1","2"]);function a(r,i){let d=50,p=50;i.component!=="es-icon"&&(d=i.width||r.target.offsetWidth,p=i.height||r.target.offsetHeight),o("dragstart",{...i,width:d,height:p})}function u(){o("dragend")}return(r,i)=>{const d=y("el-collapse-item"),p=y("el-collapse");return h(),V("div",Fn,[ht(r.$slots,"default",{},()=>[n(p,{modelValue:l.value,"onUpdate:modelValue":i[0]||(i[0]=f=>l.value=f)},{default:s(()=>[n(d,{title:"通用",name:"1"},{default:s(()=>[w("div",Ln,[(h(!0),V(B,null,Y(S(Ut).componentList,f=>(h(),V("div",{class:"es-block",draggable:"true",onDragstart:v=>a(v,f),onDragend:u},[n(Dn,{name:f.text},null,8,["name"]),w("span",qn,ne(f.text),1)],40,Tn))),256))])]),_:1}),n(d,{title:"图标",name:"2"},{default:s(()=>[w("div",Bn,[(h(!0),V(B,null,Y(S(Ut).iconList,f=>(h(),V("div",{class:"es-block",draggable:"true",onDragstart:v=>a(v,f),onDragend:u},[f.component?(h(),q(Ze(f.component),Ce({key:0,ref_for:!0},f.props),null,16)):(h(),V(B,{key:1},[$(ne(f.props.icon),1)],64))],40,An))),256))])]),_:1})]),_:1},8,["modelValue"])])])}}}),On={class:"es-input-number-prefix"},jn=J({__name:"InputNumber",props:{prefix:{type:String}},setup(e){return(t,o)=>{const l=y("el-input-number");return h(),V("div",{class:ye(["es-input-number",{"has-prefix":e.prefix||t.$slots.prefix}])},[w("div",On,[ht(t.$slots,"prefix",{},()=>[e.prefix?(h(),V(B,{key:0},[$(ne(e.prefix)+":",1)],64)):N("",!0)],!0)]),n(l,Ce(t.$attrs,{"controls-position":"right"}),null,16)],2)}}}),pe=te(jn,[["__scopeId","data-v-32503cf1"]]),Ve=J({__name:"ColorPicker",setup(e){const t=$e()+"-picker",o=["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgba(255, 69, 0, 0.68)","rgb(255, 120, 0)","hsv(51, 100, 98)","hsva(120, 40, 94, 0.5)","hsl(181, 100%, 37%)","hsla(209, 100%, 56%, 0.73)","#c7158577"];return ve(()=>{const l=document.querySelector(`.${t}`);l&&l.addEventListener("click",a=>a.stopPropagation())}),(l,a)=>{const u=y("el-color-picker");return h(),q(u,{"popper-class":t,"show-alpha":"",predefine:o})}}}),Qt=J({__name:"Background",props:{modelValue:{type:String}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,l=t,a={startColor:"rgba(255, 255, 255, 1)",endColor:"rgba(255, 255, 255, 1)",gradientRotate:90},u=j({get:()=>(o.modelValue||"").includes("gradient")?_("startColor"):o.modelValue,set:z=>{l("update:modelValue",z)}}),r=[{label:"纯色背景",value:1},{label:"渐变背景",value:2}],i=R(r[0].value),d=[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}],p=R(d[0].value),f=j({get:()=>_("startColor"),set:z=>{x(m.value,z,v.value)}}),v=j({get:()=>_("endColor"),set:z=>{x(m.value,f.value,z)}}),m=j({get:()=>_("gradientRotate"),set:z=>{x(z,f.value,v.value)}});function c(){i.value===1?l("update:modelValue",u.value):x(m.value,f.value,v.value)}function _(z){const g=o.modelValue||"rgba(255, 255, 255, 1)";if(!g.includes("gradient"))return z==="startColor"?Jt(g).rgb().string():a[z];let I=/gradient\((\d+deg),\s*(rgba?\([^)]+\)),\s*(rgba?\([^)]+\))\)/;g.includes("radial")&&(I=/(gradient)\(.*(rgba?\([^)]+\)),\s*(rgba?\([^)]+\))\)/);const A=g.match(I),P=a[z];return A?z==="startColor"?A[2]||P:z==="endColor"?A[3]||P:z==="gradientRotate"&&parseInt(A[1])||P:P}function x(z,g,b){let I=`linear-gradient(${z}deg, ${g}, ${b})`;p.value==="radial"&&(I=`radial-gradient(${g}, ${b})`),l("update:modelValue",I)}return(z,g)=>{const b=y("el-option"),I=y("el-select"),H=y("el-col"),A=y("el-row"),P=y("el-slider");return h(),V(B,null,[n(A,{gutter:10},{default:s(()=>[n(H,{span:12},{default:s(()=>[n(I,{modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=k=>i.value=k),onChange:c},{default:s(()=>[(h(),V(B,null,Y(r,k=>n(b,Ce({ref_for:!0},k),null,16)),64))]),_:1},8,["modelValue"])]),_:1}),n(H,{span:12},{default:s(()=>[i.value===1?(h(),q(Ve,{key:0,modelValue:u.value,"onUpdate:modelValue":g[1]||(g[1]=k=>u.value=k),"color-format":"rgb"},null,8,["modelValue"])):(h(),q(I,{key:1,modelValue:p.value,"onUpdate:modelValue":g[2]||(g[2]=k=>p.value=k),onChange:g[3]||(g[3]=k=>x(m.value,f.value,v.value))},{default:s(()=>[(h(),V(B,null,Y(d,k=>n(b,Ce({ref_for:!0},k),null,16)),64))]),_:1},8,["modelValue"]))]),_:1})]),_:1}),i.value===2?(h(),V(B,{key:0},[n(A,{gutter:10},{default:s(()=>[n(H,{span:12},{default:s(()=>[$("起点颜色:")]),_:1}),n(H,{span:12},{default:s(()=>[n(Ve,{modelValue:f.value,"onUpdate:modelValue":g[4]||(g[4]=k=>f.value=k)},null,8,["modelValue"])]),_:1})]),_:1}),n(A,{gutter:10},{default:s(()=>[n(H,{span:12},{default:s(()=>[$("终点颜色:")]),_:1}),n(H,{span:12},{default:s(()=>[n(Ve,{modelValue:v.value,"onUpdate:modelValue":g[5]||(g[5]=k=>v.value=k)},null,8,["modelValue"])]),_:1})]),_:1}),p.value==="linear"?(h(),q(A,{key:0,gutter:10},{default:s(()=>[n(H,{span:12},{default:s(()=>[$("渐变角度:")]),_:1}),n(H,{span:12},{default:s(()=>[n(P,{size:"small",modelValue:m.value,"onUpdate:modelValue":g[6]||(g[6]=k=>m.value=k),max:360},null,8,["modelValue"])]),_:1})]),_:1})):N("",!0)],64)):N("",!0)],64)}}}),Nn={style:{display:"flex","justify-content":"flex-end"}},Gn={style:{display:"flex","justify-content":"flex-end"}},Yn={style:{display:"flex","justify-content":"flex-end"}},Jn=J({__name:"EditorStyle",setup(e){const t=de(),o=R(100),l=j({get:()=>{const{width:i,height:d}=t.data.container.style;return`${i} x ${d}`},set:i=>{const[d,p]=i.split(" x ");t.data.container.style.width=+d,t.data.container.style.height=+p}}),a=[{label:"PC",options:[{label:"1360 x 760",value:"1360 x 760"},{label:"1280 x 720",value:"1280 x 720"},{label:"800 x 600",value:"800 x 600"}]},{label:"H5",options:[{label:"360 x 780",value:"360 x 780"},{label:"iPhone 6/7/8",value:"375 x 667"},{label:"iPhone 6/7/8 Plus",value:"414 x 736"}]}],u=j({get:()=>t.data.container.style.background||t.data.container.style.backgroundColor,set:i=>{t.data.container.style.background=i}}),r=i=>{t.data.container.scaleRatio=i/100};return(i,d)=>{const p=y("el-col"),f=y("el-option"),v=y("el-option-group"),m=y("el-select"),c=y("el-row"),_=y("el-input"),x=y("el-divider"),z=y("el-switch"),g=y("el-form");return h(),q(g,{model:S(t).data.container,"label-width":"90px","label-position":"left",style:{padding:"0 10px"}},{default:s(()=>[n(c,{gutter:10},{default:s(()=>[n(p,{span:10},{default:s(()=>[$("画布尺寸:")]),_:1}),n(p,{span:14},{default:s(()=>[n(m,{modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=b=>l.value=b)},{default:s(()=>[(h(),V(B,null,Y(a,b=>n(v,{key:b.label,label:b.label},{default:s(()=>[(h(!0),V(B,null,Y(b.options,I=>(h(),q(f,{label:I.label,value:I.value},null,8,["label","value"]))),256))]),_:2},1032,["label"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),n(c,{gutter:10},{default:s(()=>[n(p,{span:10},{default:s(()=>[$("缩放比例:")]),_:1}),n(p,{span:14},{default:s(()=>[n(_,{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=b=>o.value=b),modelModifiers:{number:!0},onChange:r},{suffix:s(()=>[$("%")]),_:1},8,["modelValue"])]),_:1})]),_:1}),n(c,{gutter:10},{default:s(()=>[n(p,{span:10},{default:s(()=>[$("画布宽度:")]),_:1}),n(p,{span:14},{default:s(()=>[n(pe,{modelValue:S(t).data.container.style.width,"onUpdate:modelValue":d[2]||(d[2]=b=>S(t).data.container.style.width=b)},null,8,["modelValue"])]),_:1})]),_:1}),n(c,{gutter:10},{default:s(()=>[n(p,{span:10},{default:s(()=>[$("画布高度:")]),_:1}),n(p,{span:14},{default:s(()=>[n(pe,{modelValue:S(t).data.container.style.height,"onUpdate:modelValue":d[3]||(d[3]=b=>S(t).data.container.style.height=b)},null,8,["modelValue"])]),_:1})]),_:1}),n(x),n(Qt,{modelValue:u.value,"onUpdate:modelValue":d[4]||(d[4]=b=>u.value=b)},null,8,["modelValue"]),n(x),n(c,{gutter:10},{default:s(()=>[n(p,{span:10},{default:s(()=>[$("网格吸附:")]),_:1}),n(p,{span:14},{default:s(()=>[w("div",Nn,[n(z,{modelValue:S(t).data.container.snap,"onUpdate:modelValue":d[5]||(d[5]=b=>S(t).data.container.snap=b)},null,8,["modelValue"])])]),_:1})]),_:1}),n(c,{gutter:10},{default:s(()=>[n(p,{span:10},{default:s(()=>[$("画布网格:")]),_:1}),n(p,{span:14},{default:s(()=>[w("div",Gn,[n(z,{modelValue:S(t).data.container.snapToGrid,"onUpdate:modelValue":d[6]||(d[6]=b=>S(t).data.container.snapToGrid=b)},null,8,["modelValue"])])]),_:1})]),_:1}),S(t).data.container.snapToGrid?(h(),V(B,{key:0},[n(c,{gutter:10},{default:s(()=>[n(p,{span:10},{default:s(()=>[$("网格大小:")]),_:1}),n(p,{span:14},{default:s(()=>[n(pe,{modelValue:S(t).data.container.gridSize,"onUpdate:modelValue":d[7]||(d[7]=b=>S(t).data.container.gridSize=b)},null,8,["modelValue"])]),_:1})]),_:1}),n(c,{gutter:10},{default:s(()=>[n(p,{span:10},{default:s(()=>[$("网格颜色:")]),_:1}),n(p,{span:14},{default:s(()=>[n(Ve,{modelValue:S(t).data.container.gridColor,"onUpdate:modelValue":d[8]||(d[8]=b=>S(t).data.container.gridColor=b)},null,8,["modelValue"])]),_:1})]),_:1})],64)):N("",!0),n(x),n(c,{gutter:10},{default:s(()=>[n(p,{span:10},{default:s(()=>[$("参考线:")]),_:1}),n(p,{span:14},{default:s(()=>[w("div",Yn,[n(z,{modelValue:S(t).data.container.markline.show,"onUpdate:modelValue":d[9]||(d[9]=b=>S(t).data.container.markline.show=b)},null,8,["modelValue"])])]),_:1})]),_:1})]),_:1},8,["model"])}}}),Wn='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M928 896l0 32-832 0 0-32z"></path><path fill="currentColor" d="M672 96m0 32l0 640q0 32-32 32l-256 0q-32 0-32-32l0-640q0-32 32-32l256 0q32 0 32 32Z"></path></svg>',Qn='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M928 512l0 32-192 0 0-32L928 512z m-640 0l0 32-192 0 0-32 192 0z"></path><path d="M672 128m0 32l0 736q0 32-32 32l-256 0q-32 0-32-32l0-736q0-32 32-32l256 0q32 0 32 32Z"></path></svg>',Xn='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M96 128l0-32 832 0 0 32z"></path><path fill="currentColor" d="M352 928m0-32l0-640q0-32 32-32l256 0q32 0 32 32l0 640q0 32-32 32l-256 0q-32 0-32-32Z"></path></svg>',Kn='<svg t="1692778133849" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15222" width="16" height="16"><path d="M123.26 411.37a32 32 0 1 1 45.28-45.23l311.34 311.67L479.71 97a32 32 0 0 1 32-32 32 32 0 0 1 32 32l0.17 580.89 311.59-311.76a32 32 0 0 1 45.27 45.24l-366.2 366.39-0.19 0.18-0.94 0.9-0.52 0.44-0.62 0.53-0.1 0.09-0.62 0.47-0.5 0.4c-0.05 0-0.1 0.08-0.16 0.11-0.21 0.16-0.43 0.31-0.65 0.46l-0.46 0.32-0.2 0.14-0.65 0.41-0.48 0.29a1.64 1.64 0 0 1-0.22 0.14l-0.62 0.35-0.52 0.29-0.23 0.13-0.59 0.29-0.6 0.3-0.18 0.09c-0.17 0.09-0.35 0.16-0.53 0.24l-0.71 0.3-0.19 0.08-0.48 0.18c-0.27 0.1-0.54 0.21-0.81 0.3H522.6l-0.42 0.13-0.91 0.3h-0.14l-0.39 0.11-1 0.26h-0.12l-0.38 0.08c-0.34 0.08-0.68 0.16-1 0.22h-0.06l-0.42 0.07-1 0.17h-0.09c-0.17 0-0.34 0-0.51 0.06l-0.94 0.12h-0.95l-0.75 0.05h-3.12l-0.75-0.05H508.84l-0.94-0.12c-0.17 0-0.34 0-0.51-0.06h-0.09l-1-0.17-0.42-0.07h-0.1c-0.34-0.06-0.68-0.14-1-0.22l-0.4-0.08h-0.08l-1-0.26-0.4-0.11h-0.14l-0.89-0.29-0.45-0.14-0.14-0.05c-0.26-0.09-0.53-0.19-0.79-0.3l-0.49-0.18h-0.2l-0.69-0.3-0.55-0.24-0.18-0.09-0.59-0.3-0.6-0.29-0.17-0.09h-0.05l-0.52-0.28-0.64-0.36-0.14-0.09h-0.07l-0.47-0.3c-0.22-0.14-0.45-0.27-0.67-0.42h-0.07l-0.11-0.08-0.47-0.33-0.81-0.49-0.09-0.08-0.53-0.42-0.61-0.47-0.08-0.07c-0.24-0.19-0.47-0.4-0.7-0.6l-0.46-0.4c-0.41-0.37-0.81-0.74-1.19-1.13zM896.68 895H127.32a32 32 0 1 0 0 64h769.36a32 32 0 0 0 0-64z" fill="currentColor" p-id="15223"></path></svg>',Zn='<svg t="1692774315617" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8893" width="16" height="16"><path fill="currentColor" d="M96 128h832v96H96zM96 576h832v96H96zM224 352h576v96H224zM224 800h576v96H224z" p-id="8894"></path></svg>',eo='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M800 448H704V320c0-106.4-85.6-192-192-192S320 213.6 320 320v128H224c-17.6 0-32 14.4-32 32v384c0 17.6 14.4 32 32 32h576c17.6 0 32-14.4 32-32V480c0-17.6-14.4-32-32-32zM512 736c-35.2 0-64-28.8-64-64s28.8-64 64-64 64 28.8 64 64-28.8 64-64 64z m128-288H384V320c0-70.4 57.6-128 128-128s128 57.6 128 128v128z"></path></svg>',to='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M496 96h32v192h-32V96z m0 640h32v192h-32v-192z"></path><path d="M112 352m32 0l736 0q32 0 32 32l0 256q0 32-32 32l-736 0q-32 0-32-32l0-256q0-32 32-32Z" fill="currentColor"></path></svg>',lo='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M96 96h32v832H96z"></path><path d="M224 352m32 0l640 0q32 0 32 32l0 256q0 32-32 32l-640 0q-32 0-32-32l0-256q0-32 32-32Z" fill="currentColor"></path></svg>',no='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M896 96h32v832h-32z"></path><path d="M96 352m32 0l640 0q32 0 32 32l0 256q0 32-32 32l-640 0q-32 0-32-32l0-256q0-32 32-32Z" fill="currentColor"></path></svg>',oo='<svg t="1692774266304" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6910" width="16" height="16"><path fill="currentColor" d="M96 128h832v96H96zM96 576h832v96H96zM96 352h576v96H96zM96 800h576v96H96z" p-id="6911"></path></svg>',ao='<svg t="1692778640543" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7435" width="16" height="16"><path fill="currentColor" d="M143.998942-0.011289h64.007055V1024h-64.007055zM815.982714 224.002117h64.007056v575.984478h-64.007056zM591.991886-0.011289h64.007056V1024h-64.007056zM368.001058 224.002117h63.995767v575.984478h-63.995767z" p-id="7436"></path></svg>',so='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M147.4 187.1 283.7 323.4 322.7 284.3 324.6 282.5 190.4 148.2 329.8 148.2 329.8 90.3 89.5 90.3 89.5 329 147.4 329Z"></path><path fill="currentColor" d="M322.5 739.5 283.4 700.4 281.6 698.5 147.4 832.7 147.4 693.4 89.5 693.4 89.5 933.7 328.1 933.7 328.1 875.8 186.2 875.8Z" p-id="9891"></path><path fill="currentColor" d="M694.2 90.3 694.2 148.2 833.6 148.2 701.2 280.6 699.4 282.5 738.5 321.6 740.3 323.3 876.6 187.1 876.6 329 934.5 329 934.5 90.3Z"></path><path fill="currentColor" d="M876.6 832.8 742.3 698.6 703.2 737.7 701.5 739.5 837.7 875.8 695.8 875.8 695.8 933.7 934.5 933.7 934.5 693.4 876.6 693.4Z"></path><path fill="currentColor" d="M512 291.1c-121.8 0-220.9 99.1-220.9 220.8S390.2 732.8 512 732.8 732.9 633.8 732.9 512 633.8 291.1 512 291.1zM675 512c0 89.9-73.1 163-163 163s-163-73.1-163-163c0-89.9 73.1-163 163-163S675 422.1 675 512z"></path></svg>',ro='<svg t="1692774301684" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7896" width="16" height="16"><path fill="currentColor" d="M96 128h832v96H96zM96 576h832v96H96zM352 352h576v96H352zM352 800h576v96H352z" p-id="7897"></path></svg>',uo='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M929 849a30 30 0 0 1-30-30v-83.137a447.514 447.514 0 0 1-70.921 92.209C722.935 933.225 578.442 975.008 442 953.482a444.917 444.917 0 0 1-241.139-120.591 30 30 0 1 1 37.258-47.01l0.231-0.231A385.175 385.175 0 0 0 442 892.625v-0.006c120.855 22.123 250.206-13.519 343.656-106.975a386.646 386.646 0 0 0 70.6-96.653h-87.247a30 30 0 0 1 0-60H929a30 30 0 0 1 30 30V819a30 30 0 0 1-30 30zM632 342a50 50 0 0 1 50 50v240a50 50 0 0 1-50 50H392a50 50 0 0 1-50-50V392a50 50 0 0 1 50-50h240zM402 607a15 15 0 0 0 15 15h190a15 15 0 0 0 15-15V417a15 15 0 0 0-15-15H417a15 15 0 0 0-15 15v190z m403.005-362.025a29.87 29.87 0 0 1-19.117-6.882l-0.232 0.231A386.5 386.5 0 0 0 689.478 168h-0.011c-145.646-75.182-329.021-51.747-451.117 70.35a386.615 386.615 0 0 0-70.6 96.65H255a30 30 0 0 1 0 60H95a30 30 0 0 1-30-30V205a30 30 0 0 1 60 0v83.129a447.534 447.534 0 0 1 70.923-92.206C317.981 73.866 493.048 37.2 647 85.836v-0.045a444.883 444.883 0 0 1 176.143 105.291 30 30 0 0 1-18.138 53.893z"></path></svg>',io='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M742.4 384a51.2 51.2 0 0 1 51.2 51.2v460.8a51.2 51.2 0 0 1-51.2 51.2H153.6a51.2 51.2 0 0 1-51.2-51.2V435.2a51.2 51.2 0 0 1 51.2-51.2z m-25.6 76.8H179.2v409.6h537.6V460.8zM514.7648 71.68l54.3232 54.2976-36.5568 36.5568A473.856 473.856 0 0 1 958.208 477.3376l-72.3968 25.6256A397.056 397.056 0 0 0 538.0096 239.744l31.0784 31.0528-54.3232 54.2976-126.72-126.72 126.72-126.6944z"></path></svg>',co='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M870.4 384a51.2 51.2 0 0 1 51.2 51.2v460.8a51.2 51.2 0 0 1-51.2 51.2H281.6a51.2 51.2 0 0 1-51.2-51.2V435.2a51.2 51.2 0 0 1 51