1import{_ as B,j as F,u as I,F as S,p as U,k as V,o as P,c as j,w as z,a as c,a2 as C,a8 as p,av as E,n as M,b as T,m as t,q as a}from"./index-MSa8avpS.js";import{u as v}from"./FileStore-x1ACtB7T.js";import{n as q,N as D}from"./index-C3Kc5NG-.js";import"./Image-3znyceed.js";const R=["src","alt","width","height"],W=["placeholder"],G={__name:"NodeImage",props:q,setup(f){const s=f,{postSideNotification:g}=F(),{t:h}=I(),{postFile:m}=v(),{loader:_}=S(v()),o=t(()=>a.get(s,"node.attrs")),d=t(()=>a.get(o.value,"width")),x=t(()=>a.get(o.value,"height")),i=t(()=>a.get(o.value,"file")),N=t(()=>a.get(o.value,"textAlign")||"left"),w=t(()=>["//assets.koalect.com","//assets.betakoalect.com","//assets.koalect.dev"].map(e=>r.value.includes(e)).some(e=>e)),y=t(()=>({textAlign:N.value})),r=t({get:()=>a.get(o.value,"src"),set:e=>s.updateAttributes({src:e})}),n=t({get:()=>a.get(o.value,"alt"),set:e=>s.updateAttributes({alt:e})}),b=t(()=>{const e=[];return s.selected&&e.push("selected"),_.value&&e.push("is-loading"),e.join(" ")}),k=U(n.value||h("literal.description")),A=()=>{if(!i.value)return s.deleteNode();i.value.toArrayBuffer(e=>{m({params:{binary:e,name:i.value.name,type:i.value.type}}).then(l=>{if(a.isUndefined(s.getPos()))return s.deleteNode();r.value=l}).catch(l=>{a.get(l,"data.errors",[]).forEach(u=>g({text:u,type:"error"})),a.isUndefined(s.getPos())||s.deleteNode()})})};return V(()=>{w.value||A()}),(e,l)=>(P(),j(T(D),{class:M(b.value),style:p(y.value),as:"figure",draggable:"true","data-drag-handle":""},{default:z(()=>[c("img",{src:r.value,alt:n.value,width:d.value,height:x.value},null,8,R),c("figcaption",null,[C(c("input",{type:"text","onUpdate:modelValue":l[0]||(l[0]=u=>n.value=u),placeholder:k.value,style:p({width:d.value+"px"})},null,12,W),[[E,n.value]])])]),_:1},8,["class","style"]))}},O=B(G,[["__scopeId","data-v-86b25aa9"]]);export{O 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.