import{l as b,m as w,s as k,n as x,o as M,q as y,v as s,w as p,x as _,y as g,z as I,G as d,a3 as j,H as h,a4 as L,J as v,K as z,Y as B,aa as f,A as E,a9 as m,am as u,a5 as q}from"./index.881b9b68.js";function A(o){let e,l,t,a,n,r;return t=new o[0]({}),{c(){e=x("button"),l=x("div"),y(t.$$.fragment),s(l,"class","m-t-1 w-[60%] h-[60%] opacity-80 dark:text-white"),s(e,"class","text-gray-500 bg-white/90 h-5 w-5 flex items-center justify-center rounded shadow-sm hover:shadow-xl hover:ring-1 ring-inset ring-gray-200 z-10 dark:bg-gray-900 dark:ring-gray-600"),s(e,"aria-label",o[1])},m(i,c){_(i,e,c),g(e,l),I(t,l,null),a=!0,n||(r=E(e,"click",o[2]),n=!0)},p(i,[c]){(!a||c&2)&&s(e,"aria-label",i[1])},i(i){a||(d(t.$$.fragment,i),a=!0)},o(i){h(t.$$.fragment,i),a=!1},d(i){i&&v(e),z(t),n=!1,r()}}}function D(o,e,l){let{Icon:t}=e,{label:a=""}=e;function n(r){q.call(this,o,r)}return o.$$set=r=>{"Icon"in r&&l(0,t=r.Icon),"label"in r&&l(1,a=r.label)},[t,a,n]}class $ extends b{constructor(e){super(),w(this,e,D,A,k,{Icon:0,label:1})}}function G(o){let e,l,t,a;return{c(){e=m("svg"),l=m("g"),t=m("path"),a=m("path"),s(t,"d","M18,6L6.087,17.913"),u(t,"fill","none"),u(t,"fill-rule","nonzero"),u(t,"stroke-width","2px"),s(l,"transform","matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"),s(a,"d","M4.364,4.364L19.636,19.636"),u(a,"fill","none"),u(a,"fill-rule","nonzero"),u(a,"stroke-width","2px"),s(e,"width","100%"),s(e,"height","100%"),s(e,"viewBox","0 0 24 24"),s(e,"version","1.1"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),s(e,"xml:space","preserve"),s(e,"stroke","currentColor"),u(e,"fill-rule","evenodd"),u(e,"clip-rule","evenodd"),u(e,"stroke-linecap","round"),u(e,"stroke-linejoin","round")},m(n,r){_(n,e,r),g(e,l),g(l,t),g(e,a)},p:f,i:f,o:f,d(n){n&&v(e)}}}class H extends b{constructor(e){super(),w(this,e,null,G,k,{})}}function J(o){let e,l;return{c(){e=m("svg"),l=m("path"),s(l,"d","M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"),s(e,"xmlns","http://www.w3.org/2000/svg"),s(e,"width","100%"),s(e,"height","100%"),s(e,"viewBox","0 0 24 24"),s(e,"fill","none"),s(e,"stroke","currentColor"),s(e,"stroke-width","1.5"),s(e,"stroke-linecap","round"),s(e,"stroke-linejoin","round"),s(e,"class","feather feather-edit-2")},m(t,a){_(t,e,a),g(e,l)},p:f,i:f,o:f,d(t){t&&v(e)}}}class K extends b{constructor(e){super(),w(this,e,null,J,k,{})}}function C(o){let e,l;return e=new $({props:{Icon:K,label:"Edit"}}),e.$on("click",o[3]),{c(){y(e.$$.fragment)},m(t,a){I(e,t,a),l=!0},p:f,i(t){l||(d(e.$$.fragment,t),l=!0)},o(t){h(e.$$.fragment,t),l=!1},d(t){z(e,t)}}}function P(o){let e,l,t,a,n=o[0]&&C(o);return t=new $({props:{Icon:H,label:"Clear"}}),t.$on("click",o[4]),{c(){e=x("div"),n&&n.c(),l=M(),y(t.$$.fragment),s(e,"class","modify-upload z-10 top-2 right-2 justify-end flex gap-1"),p(e,"absolute",o[1]),p(e,"m-1",!o[1])},m(r,i){_(r,e,i),n&&n.m(e,null),g(e,l),I(t,e,null),a=!0},p(r,[i]){r[0]?n?(n.p(r,i),i&1&&d(n,1)):(n=C(r),n.c(),d(n,1),n.m(e,l)):n&&(j(),h(n,1,1,()=>{n=null}),L()),i&2&&p(e,"absolute",r[1]),i&2&&p(e,"m-1",!r[1])},i(r){a||(d(n),d(t.$$.fragment,r),a=!0)},o(r){h(n),h(t.$$.fragment,r),a=!1},d(r){r&&v(e),n&&n.d(),z(t)}}}function S(o,e,l){let{editable:t=!1}=e,{absolute:a=!0}=e;const n=B(),r=()=>n("edit"),i=c=>{n("clear"),c.stopPropagation()};return o.$$set=c=>{"editable"in c&&l(0,t=c.editable),"absolute"in c&&l(1,a=c.absolute)},[t,a,n,r,i]}class Y extends b{constructor(e){super(),w(this,e,S,P,k,{editable:0,absolute:1})}}export{H as C,$ as I,Y as M};
