import"./vue.db505ee4.js";import{a as N}from"./a-color-picker.7e391635.js";import{_ as S}from"./index.b35f53c6.js";import{r as b,w as T,a as V,aW as i,aR as n,ar as p,bd as a,au as o,c as m,ah as U,S as g,n as j}from"./@vue.cb43a243.js";import"./@babel.6cd0804c.js";import"./regenerator-runtime.8e24db72.js";import"./js-md5.5179c6be.js";import"./vue-router.a08742b9.js";import"./js-cookie.31874410.js";import"./ant-design-vue.6b10f349.js";import"./@ant-design.bcfb08ae.js";import"./@ctrl.fa7cbd46.js";import"./resize-observer-polyfill.8deb1e21.js";import"./vue-types.6e6d84ba.js";import"./dom-align.f1b5d360.js";import"./lodash-es.0ea26897.js";import"./dayjs.38e390ea.js";import"./async-validator.5d25c98b.js";import"./scroll-into-view-if-needed.5191fdbf.js";import"./compute-scroll-into-view.6058b3be.js";import"./lodash.c9cf1bdb.js";import"./spark-md5.2cc5764b.js";import"./@vueuse.952f4739.js";import"./vue-demi.5fb18120.js";import"./axios.e3200588.js";/* empty css                     */import"./sortablejs.412b554c.js";import"./clipboard.099d05c9.js";import"./markdown-it.80c3a67b.js";import"./entities.0d2c0164.js";import"./uc.micro.981ceb7b.js";import"./mdurl.ef76b4dc.js";import"./linkify-it.92c30060.js";import"./markdown-it-emoji.e3e91710.js";import"./escape-html.e5dfadb9.js";import"./prismjs.c97a8414.js";import"./diacritics.6be19c75.js";import"./markdown-it-container.512a5043.js";import"./markdown-it-anchor.c88e5394.js";import"./markdown-it-attrs.3af5ab50.js";import"./markdown-it-table-of-contents.8a4ce16f.js";import"./@kangc.86f7507c.js";const E={style:{width:"100%","text-align":"right"}},I=g("\u6E05\u7A7A"),O=g("\u786E\u5B9A"),R={class:"color-picker"},W={class:"color-picker__trigger"},q={class:"color-picker__color"},A={name:"ExColorPicker"},D=Object.assign(A,{props:{value:String},emits:["update:value"],setup(l,{emit:_}){const s=l,u=b();let e=s.value,d=e;const t=b(!1);let r=null,f=!1;T(t,c=>{c?h():_("update:value",e)}),V(()=>{r&&(r=null)});function h(){f?r.setColor(s.value):j(()=>{setTimeout(()=>{r=N.exports.createPicker(u.value,{color:s.value,palette:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b","#000000"]}),r.on("change",function(c){d=c.color}),f=!0},50)})}function x(){t.value=!1,e="",_("update:value",e)}function y(){e=d,t.value=!1}return(c,v)=>{const k=i("a-button"),C=i("a-space"),w=i("down-outlined"),B=i("close-outlined"),P=i("a-popover");return n(),p(P,{visible:t.value,"onUpdate:visible":v[0]||(v[0]=z=>t.value=z),trigger:"click"},{content:a(()=>[o("div",{class:"ex-color-picker",ref_key:"el",ref:u},null,512),o("div",E,[m(C,{align:"end"},{default:a(()=>[m(k,{size:"small",onClick:x},{default:a(()=>[I]),_:1}),m(k,{size:"small",onClick:y},{default:a(()=>[O]),_:1})]),_:1})])]),default:a(()=>[o("div",R,[o("div",W,[o("span",q,[o("span",{class:"color-picker__color-inner",style:U({backgroundColor:l.value})},[l.value?(n(),p(w,{key:0,class:"color-picker__icon"})):(n(),p(B,{key:1,class:"el-color-picker__empty"}))],4)])])])]),_:1},8,["visible"])}}});var Vo=S(D,[["__scopeId","data-v-31a349c0"]]);export{Vo as default};
