1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BFAaLAji.js","./WRyiheJW.js","./CRcD7-OL.js","./entry.B3OpC3pH.css","./BaseModal.CfRfiqKU.css","./DhXgJQ-f.js","./DCrCMa3K.js","./ConfirmationModal.B4Fyi43j.css","./PhotoLibraryModal.Q1ALQOfr.css","./CDZlOSKO.js"])))=>i.map(i=>d[i]); 2import{d as $,k as d,n as j,S as A,o,c as i,a,J as N,b as k,G as I,u as n,T as S,e as w,H as U,I as F,M as O,t as C,s as L,B as R,bj as G,a0 as E,a1 as P,_ as H}from"./CRcD7-OL.js";import{a as J}from"./DhXgJQ-f.js";const K=E(()=>P(()=>import("./BFAaLAji.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url).then(r=>r.default||r)),q=E(()=>P(()=>import("./CDZlOSKO.js"),__vite__mapDeps([9,6,1,2,3,4,7]),import.meta.url).then(r=>r.default||r)),Q={class:"editableImage__wrapper"},W={class:"editableImage__overlay"},X={class:"editableImage__actions"},Y={key:0,class:"d-flex align-items-center"},Z={key:1},ee={key:2,class:"ti ti-cloud-upload"},te=["onClick"],ae={class:"mb-3"},oe={class:"d-flex justify-content-end"},se=$({__name:"EditableImageTools",props:{showLibrary:{type:Boolean},customActions:{}},emits:["uploaded"],setup(r,{emit:T}){const v=T,y=d(0),_=d(!1),c=d(!1),u=d(null),g=d(null);function x(){g.value?.click()}function D(){f.value=!0}function M(s){v("uploaded",s.image),f.value=!1}async function z(s){const[e]=s.target.files,m=new FormData;m.append("file",e),_.value=!0;try{const l=new URLSearchParams(window.location.search),p=l.get("jwt"),{data:t}=await J.post("/api/upload/image",m,{headers:p?{"cc-token":l.get("jwt")}:void 0,onUploadProgress(b){const{loaded:B,total:V}=b;let h=Math.floor(B*100/(V||1));h<=100&&(y.value=h)}});t.files&&t.files.length>0&&(v("uploaded",t.location),c.value=!0)}catch(l){console.log(l);const p=l?.response?.statusText;let t="Upload failed";p==="INVALID_IMAGE"&&(t="Invalid image."),u.value=t}_.value=!1,y.value=0}const f=d(!1);return j(()=>{c.value&&setTimeout(()=>c.value=!1,1500)}),(s,e)=>{const m=K,l=q,p=A("tippy");return o(),i("div",{class:C(["editableImage",{"editableImage--processing":n(_)||n(c)}])},[a("div",Q,[N(s.$slots,"default",{},void 0,!0)]),a("div",W,[a("div",X,[a("div",{class:"editableImage__upload",onClick:x},[k(S,{name:"bounce",mode:"out-in"},{default:I(()=>[n(_)?(o(),i("div",Y,e[3]||(e[3]=[a("div",{style:{"font-size":"14px",width:"2.2rem",height:"2.2rem"},class:"spinner-border ms-auto",role:"status","aria-hidden":"true"},null,-1)]))):n(c)?(o(),i("div",Z,e[4]||(e[4]=[a("i",{class:"ti ti-check"},null,-1)]))):(o(),i("i",ee))]),_:1}),a("input",{ref_key:"filePicker",ref:g,type:"file",style:{display:"none",visibility:"hidden"},onChange:z},null,544)]),s.showLibrary?(o(),i("div",{key:0,class:"editableImage__upload",onClick:D},e[5]||(e[5]=[a("i",{class:"ti ti-photo-search"},null,-1)]))):w("",!0),(o(!0),i(U,null,F(s.customActions,t=>O((o(),i("div",{class:"editableImage__upload",onClick:b=>(t.callback,t.callback())},[a("i",{class:C(t.icon)},null,2)],8,te)),[[p,t.tooltip]])),256))])]),(o(),L(G,{to:"body"},[s.showLibrary?(o(),L(m,{key:0,"multi-select":!1,active:n(f),onClose:e[0]||(e[0]=t=>f.value=!1),onPick:M},null,8,["active"])):w("",!0),k(l,{active:n(u)!==null,"show-buttons":!1,title:"Error",type:"danger",onClose:e[2]||(e[2]=t=>u.value=null)},{default:I(()=>[a("div",null,[a("div",ae,R(n(u)),1),a("div",oe,[a("button",{class:"btn btn-danger",onClick:e[1]||(e[1]=t=>u.value=null)},"OK")])])]),_:1},8,["active"])]))],2)}}}),ne=H(se,[["__scopeId","data-v-9c66d607"]]);export{ne as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.