PageSourceSearch

https://tresda.institute/assets/AdminCertificateDesigner-C-_sCOYx.js

js tresda.institute collected 2026-10-02 01:58:35 UTC 19,623 bytes, 1 lines download raw bytes

1import{r as l,x as ee,j as e,m as P,l as V,bf as te,bg as oe,i as ne,ao as ae}from"./index-u0HMC9Vb.js";const y=560,G=Math.round(y*(297/210)),h=a=>a/100*y,E=a=>a/100*G,se=a=>a/y*100,re=a=>a/G*100,B={garamond:'"EB Garamond", Georgia, serif',cormorant:'"Cormorant Garamond", Georgia, serif',playfair:'"Playfair Display", Georgia, serif',baskerville:'"Libre Baskerville", Georgia, serif',cinzel:'"Cinzel", Georgia, serif',lato:'"Lato", Arial, sans-serif',raleway:'"Raleway", Arial, sans-serif',helvetica:"Arial, sans-serif",times:"Georgia, serif",courier:'"Courier New", monospace'};function ie({cfg:a,layout:r,selectedElement:v,onSelectElement:S,onUpdatePosition:F}){var t,u,D,R,k,L,I,M,U,s,i,g,b,j;const _=l.useRef(null),f=l.useRef(null),N=ee(new Date,"d MMMM yyyy"),T=(a.body_text||"").split("[STUDENT_NAME]"),c=((t=T[0])==null?void 0:t.trim())||"This certifies that",m=((u=T[1])==null?void 0:u.trim())||"",w=(a.verification_text||"").replace("[CERT_NUMBER]","TRESDA-001-SELF-2026-0001"),n=r.elements||{},d=l.useCallback((o,C)=>{var H,X;o.preventDefault(),o.stopPropagation(),S(C);const x=_.current.getBoundingClientRect(),A=o.clientX-x.left-h(((H=n[C])==null?void 0:H.x)||8),O=o.clientY-x.top-E(((X=n[C])==null?void 0:X.y)||10);f.current={key:C,startX:A,startY:O};const z=Y=>{const $=_.current.getBoundingClientRect(),Q=Math.max(0,Math.min(95,se(Y.clientX-$.left-f.current.startX))),K=Math.max(0,Math.min(97,re(Y.clientY-$.top-f.current.startY)));F(f.current.key,Q,K)},W=()=>{f.current=null,window.removeEventListener("mousemove",z),window.removeEventListener("mouseup",W)};window.addEventListener("mousemove",z),window.addEventListener("mouseup",W)},[n,S,F]),p=(o,C={})=>{const x=n[o]||{},A=v===o;return{position:"absolute",left:h(x.x??8),top:E(x.y??10),fontSize:(x.fontSize||10)*(y/210),color:x.color||"#191410",fontFamily:B[x.fontFamily]||B.helvetica,fontStyle:x.italic?"italic":"normal",fontWeight:x.bold?"600":"400",letterSpacing:x.letterSpacing?`${x.letterSpacing}px`:void 0,textAlign:x.align||"left",cursor:"grab",outline:A?"1.5px dashed #6366f1":"1.5px solid transparent",outlineOffset:3,userSelect:"none",maxWidth:y-h(x.x??8)-16,lineHeight:1.45,...C}};return e.jsxs("div",{ref:_,className:"relative flex-shrink-0 shadow-2xl",style:{width:y,height:G,background:r.background||"#F9F7F3",border:`1px solid ${r.borderColor||"#C8BFB0"}`,overflow:"hidden"},onClick:()=>S(null),children:[e.jsx("div",{style:{position:"absolute",inset:14,border:`0.5px solid ${r.borderColor||"#C8BFB0"}`,opacity:.5,pointerEvents:"none"}}),a.logo_image_url&&e.jsx("img",{src:a.logo_image_url,alt:"Logo",style:{position:"absolute",left:h(((D=n.logo)==null?void 0:D.x)??5),top:E(((R=n.logo)==null?void 0:R.y)??4),height:(((k=n.logo)==null?void 0:k.fontSize)||14)*(y/210),objectFit:"contain",cursor:"grab",outline:v==="logo"?"1.5px dashed #6366f1":"1.5px solid transparent",outlineOffset:3},onMouseDown:o=>d(o,"logo")}),e.jsx("div",{style:p("institution_name",{whiteSpace:"nowrap"}),onMouseDown:o=>d(o,"institution_name"),children:a.institution_name||"THE TRESDA INSTITUTE"}),e.jsx("div",{style:{position:"absolute",left:h(5),right:h(5),top:E(((L=n.rule_top)==null?void 0:L.y)??13),height:.5,background:r.borderColor||"#C8BFB0",opacity:.6,pointerEvents:"none"}}),e.jsx("div",{style:p("certificate_title",{whiteSpace:"nowrap"}),onMouseDown:o=>d(o,"certificate_title"),children:a.certificate_title||"CERTIFICATE OF PROGRESSION"}),e.jsx("div",{style:p("pre_name_text"),onMouseDown:o=>d(o,"pre_name_text"),children:c}),e.jsx("div",{style:p("student_name",{whiteSpace:"nowrap"}),onMouseDown:o=>d(o,"student_name"),children:"Sample Student Name"}),e.jsx("div",{style:{position:"absolute",left:h(((I=n.student_name)==null?void 0:I.x)??8),top:E((((M=n.student_name)==null?void 0:M.y)??38)+3),width:220,height:.5,background:r.borderColor||"#C8BFB0",opacity:.7,pointerEvents:"none"}}),e.jsx("div",{style:p("body_text",{maxWidth:y*.75}),onMouseDown:o=>d(o,"body_text"),children:m||"has met the progression standard for TRESDA 001 SELF…"}),e.jsx("div",{style:p("progression_line"),onMouseDown:o=>d(o,"progression_line"),children:a.progression_line||"Eligible for progression to TRESDA 002 OTHER"}),e.jsx("div",{style:{position:"absolute",left:h(5),right:h(5),top:E(((U=n.rule_bottom)==null?void 0:U.y)??72),height:.5,background:r.borderColor||"#C8BFB0",opacity:.6,pointerEvents:"none"}}),a.signature_image_url&&e.jsx("img",{src:a.signature_image_url,alt:"Signature",style:{position:"absolute",left:h(((s=n.signature_img)==null?void 0:s.x)??8),top:E(((i=n.signature_img)==null?void 0:i.y)??74),height:(((g=n.signature_img)==null?void 0:g.fontSize)||12)*(y/210),objectFit:"contain",cursor:"grab",outline:v==="signature_img"?"1.5px dashed #6366f1":"1.5px solid transparent",outlineOffset:3},onMouseDown:o=>d(o,"signature_img")}),e.jsx("div",{style:p("founder_name"),onMouseDown:o=>d(o,"founder_name"),children:a.founder_name||"Founder"}),e.jsx("div",{style:p("authority_line"),onMouseDown:o=>d(o,"authority_line"),children:a.authority_line||"THE TRESDA INSTITUTE"}),e.jsx("div",{style:{position:"absolute",left:h(((b=n.metadata)==null?void 0:b.x)??5),top:E(((j=n.metadata)==null?void 0:j.y)??88),right:h(5),display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:8,cursor:"grab",outline:v==="metadata"?"1.5px dashed #6366f1":"1.5px solid transparent",outlineOffset:3},onMouseDown:o=>d(o,"metadata"),children:[{label:"CERTIFICATION NUMBER",value:"TRESDA-001-SELF-2026-0001"},{label:"ISSUED",value:N},{label:"STUDENT REFERENCE",value:"TR-001001"},{label:"AXIS",value:a.axis_label||"SELF"}].map(o=>{var C,x,A,O,z;return e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:5.5*(y/210),letterSpacing:"1px",color:((C=n.metadata)==null?void 0:C.labelColor)||"#A09080",fontFamily:B[(x=n.metadata)==null?void 0:x.fontFamily]||B.helvetica,marginBottom:2},children:o.label}),e.jsx("div",{style:{fontSize:(((A=n.metadata)==null?void 0:A.fontSize)||7)*(y/210),color:((O=n.metadata)==null?void 0:O.color)||"#302820",fontFamily:B[(z=n.metadata)==null?void 0:z.fontFamily]||B.helvetica},children:o.value})]},o.label)})}),e.jsx("div",{style:p("verification",{width:"100%",textAlign:"center",left:0}),onMouseDown:o=>d(o,"verification"),children:w})]})}const le=[{value:"garamond",label:"EB Garamond"},{value:"cormorant",label:"Cormorant Garamond"},{value:"playfair",label:"Playfair Display"},{value:"baskerville",label:"Libre Baskerville"},{value:"cinzel",label:"Cinzel (Engraved)"},{value:"lato",label:"Lato (Modern)"},{value:"raleway",label:"Raleway (Elegant)"}
1],Z={logo:"Logo",institution_name:"Institution Name",certificate_title:"Certificate Title",pre_name_text:"Pre-Name Text",student_name:"Student Name",body_text:"Body Text",progression_line:"Progression Line",signature_img:"Signature Image",founder_name:"Founder Name",authority_line:"Authority Line",metadata:"Metadata Block",verification:"Verification Line",rule_top:"Top Rule",rule_bottom:"Bottom Rule"};function ce({layout:a,selectedElement:r,onUpdateLayout:v,onUpdateElement:S,onSelectElement:F,cfg:_,onUpdateCfg:f}){var p;const[N,T]=l.useState("elements"),c=r?((p=a.elements)==null?void 0:p[r])||{}:null,m=(t,u)=>S(r,t,u),w=(t,u)=>v(t,u),n=({label:t,children:u})=>e.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[e.jsx("span",{className:"text-[9px] font-meta uppercase tracking-widest text-stone-400 flex-shrink-0 w-24",children:t}),u]}),d=["elements","global","content"];return e.jsxs("div",{className:"w-64 flex-shrink-0 bg-stone-50 dark:bg-stone-900 border-r border-stone-200 dark:border-stone-800 flex flex-col h-full overflow-hidden",children:[e.jsx("div",{className:"flex border-b border-stone-200 dark:border-stone-800",children:d.map(t=>e.jsx("button",{onClick:()=>T(t),className:`flex-1 py-2.5 text-[9px] font-meta uppercase tracking-widest transition-colors ${N===t?"text-stone-900 dark:text-stone-100 border-b-2 border-stone-900 dark:border-stone-100":"text-stone-400 hover:text-stone-600"}`,children:t},t))}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[N==="elements"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[8px] font-meta uppercase tracking-widest text-stone-400 mb-2",children:"Select Element"}),e.jsx("div",{className:"space-y-0.5",children:Object.entries(Z).map(([t,u])=>e.jsx("button",{onClick:()=>F(t),className:`w-full text-left px-2 py-1.5 text-xs rounded-sm transition-colors ${r===t?"bg-stone-900 text-white":"text-stone-600 hover:bg-stone-100 dark:hover:bg-stone-800"}`,children:u},t))})]}),r&&c&&e.jsxs("div",{className:"border-t border-stone-200 dark:border-stone-800 pt-4",children:[e.jsx("p",{className:"text-[8px] font-meta uppercase tracking-widest text-stone-400 mb-3",children:Z[r]}),!["rule_top","rule_bottom"].includes(r)&&e.jsxs(e.Fragment,{children:[e.jsxs(n,{label:"Font Size",children:[e.jsx("input",{type:"range",min:"5",max:"40",value:c.fontSize||10,onChange:t=>m("fontSize",+t.target.value),className:"flex-1"}),e.jsx("span",{className:"text-xs text-stone-500 w-8 text-right",children:c.fontSize||10})]}),!["logo","signature_img"].includes(r)&&e.jsxs(e.Fragment,{children:[e.jsxs(n,{label:"Colour",children:[e.jsx("input",{type:"color",value:c.color||"#191410",onChange:t=>m("color",t.target.value),className:"w-8 h-7 cursor-pointer border-0 rounded"}),e.jsx("input",{type:"text",value:c.color||"#191410",onChange:t=>m("color",t.target.value),className:"flex-1 border border-stone-200 dark:border-stone-700 bg-white dark:bg-stone-900 text-xs px-2 py-1"})]}),e.jsx(n,{label:"Font",children:e.jsx("select",{value:c.fontFamily||"helvetica",onChange:t=>m("fontFamily",t.target.value),className:"flex-1 border border-stone-200 dark:border-stone-700 bg-white dark:bg-stone-900 text-xs px-2 py-1",children:le.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))})}),e.jsx(n,{label:"Style",children:e.jsx("div",{className:"flex gap-1",children:["italic","bold"].map(t=>e.jsx("button",{onClick:()=>m(t,!c[t]),className:`px-2 py-1 text-xs border transition-colors ${c[t]?"bg-stone-900 text-white border-stone-900":"border-stone-200 text-stone-500 hover:border-stone-400"}`,children:t==="italic"?"I":"B"},t))})}),e.jsx(n,{label:"Align",children:e.jsx("div",{className:"flex gap-1",children:["left","center","right"].map(t=>e.jsx("button",{onClick:()=>m("align",t),className:`px-2 py-1 text-[9px] border transition-colors ${c.align===t?"bg-stone-900 text-white border-stone-900":"border-stone-200 text-stone-500 hover:border-stone-400"}`,children:t[0].toUpperCase()},t))})}),e.jsxs(n,{label:"Spacing",children:[e.jsx("input",{type:"range",min:"0",max:"8",step:"0.5",value:c.letterSpacing||0,onChange:t=>m("letterSpacing",+t.target.value),className:"flex-1"}),e.jsx("span",{className:"text-xs text-stone-500 w-8 text-right",children:c.letterSpacing||0})]})]}),["logo","signature_img"].includes(r)&&e.jsx("p",{className:"text-[10px] text-stone-400 italic",children:"Drag to reposition. Font size controls height."}),e.jsxs("div",{className:"mt-3 pt-3 border-t border-stone-100 dar
1k:border-stone-800",children:[e.jsx("p",{className:"text-[8px] font-meta uppercase tracking-widest text-stone-400 mb-2",children:"Position"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:["x","y"].map(t=>e.jsxs("div",{children:[e.jsxs("label",{className:"text-[9px] text-stone-400",children:[t.toUpperCase()," %"]}),e.jsx("input",{type:"number",min:"0",max:"99",step:"0.5",value:Math.round((c[t]??8)*10)/10,onChange:u=>m(t,+u.target.value),className:"w-full border border-stone-200 dark:border-stone-700 bg-white dark:bg-stone-900 text-xs px-2 py-1 mt-0.5"})]},t))})]})]})]})]}),N==="global"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-[8px] font-meta uppercase tracking-widest text-stone-400 mb-2",children:"Page Style"}),e.jsxs(n,{label:"Background",children:[e.jsx("input",{type:"color",value:a.background||"#F9F7F3",onChange:t=>w("background",t.target.value),className:"w-8 h-7 cursor-pointer border-0 rounded"}),e.jsx("input",{type:"text",value:a.background||"#F9F7F3",onChange:t=>w("background",t.target.value),className:"flex-1 border border-stone-200 dark:border-stone-700 bg-white dark:bg-stone-900 text-xs px-2 py-1"})]}),e.jsxs(n,{label:"Border / Rules",children:[e.jsx("input",{type:"color",value:a.borderColor||"#C8BFB0",onChange:t=>w("borderColor",t.target.value),className:"w-8 h-7 cursor-pointer border-0 rounded"}),e.jsx("input",{type:"text",value:a.borderColor||"#C8BFB0",onChange:t=>w("borderColor",t.target.value),className:"flex-1 border border-stone-200 dark:border-stone-700 bg-white dark:bg-stone-900 text-xs px-2 py-1"})]})]}),N==="content"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-[8px] font-meta uppercase tracking-widest text-stone-400 mb-2",children:"Certificate Text"}),[{key:"institution_name",label:"Institution Name"},{key:"certificate_title",label:"Certificate Title"},{key:"body_text",label:"Body Text",multiline:!0,hint:"Use [STUDENT_NAME]"},{key:"progression_line",label:"Progression Line"},{key:"axis_label",label:"Axis Label"},{key:"founder_name",label:"Founder Name"},{key:"authority_line",label:"Authority Line"},{key:"verification_text",label:"Verification",hint:"Use [CERT_NUMBER]"}].map(({key:t,label:u,multiline:D,hint:R})=>e.jsxs("div",{children:[e.jsx("label",{className:"text-[9px] font-meta uppercase tracking-widest text-stone-400 block mb-0.5",children:u}),R&&e.jsx("p",{className:"text-[9px] text-stone-400 mb-1",children:R}),D?e.jsx("textarea",{value:_[t]||"",onChange:k=>f(t,k.target.value),rows:3,className:"w-full border border-stone-200 dark:border-stone-700 bg-white dark:bg-stone-900 text-xs px-2 py-1.5 resize-none"}):e.jsx("input",{type:"text",value:_[t]||"",onChange:k=>f(t,k.target.value),className:"w-full border border-stone-200 dark:border-stone-700 bg-white dark:bg-stone-900 text-xs px-2 py-1.5"})]},t))]})]})]})}const J={background:"#F9F7F3",borderColor:"#C8BFB0",elements:{logo:{x:5,y:4,fontSize:14},institution_name:{x:55,y:6,fontSize:7,color:"#78685F",fontFamily:"cinzel",letterSpacing:2,align:"right"},rule_top:{x:5,y:13},certificate_title:{x:8,y:17,fontSize:8,color:"#8C7C6E",fontFamily:"cinzel",letterSpacing:3},pre_name_text:{x:8,y:26,fontSize:10,color:"#6B5E52",fontFamily:"cormorant",italic:!0},student_name:{x:8,y:33,fontSize:26,color:"#191410",fontFamily:"playfair"},body_text:{x:8,y:47,fontSize:9,color:"#46413B",fontFamily:"garamond"},progression_line:{x:8,y:64,fontSize:9,color:"#3C3730",fontFamily:"cormorant",italic:!0},rule_bottom:{x:5,y:71},signature_img:{x:8,y:73,fontSize:12},founder_name:{x:8,y:82,fontSize:8,color:"#302820",fontFamily:"lato"},authority_line:{x:8,y:85,fontSize:7,color:"#967D64",fontFamily:"cinzel",letterSpacing:1.5},metadata:{x:5,y:88,fontSize:7,color:"#302820",fontFamily:"lato",labelColor:"#A09080"},verification:{x:50,y:96,fontSize:6.5,color:"#A09180",fontFamily:"lato",italic:!0,align:"center"}}},q={institution_name:"THE TRESDA INSTITUTE",certificate_title:"CERTIFICATE OF PROGRESSION",body_text:"This certifies that [STUDENT_NAME] has met the progression standard for TRESDA 001 SELF through the completion and evaluation of identity-led spatial work, demonstrating a resolved understanding of personal design identity and readiness to design beyond the self.",progression_line:"Eligible for progression to TRESDA 002 OTHER",axis_label:"SELF",founder_name:"Founder",authority_line:"THE TRESDA INSTITUTE",verification_text:"Verification available at: tresda.institute/verify/[CERT_NUMBER]",signature_image_url:"",logo_image_url:""};function xe(){const[a,r]=l.useState(q),[v,S]=l.useState(J),[F,_]=l.useState(null),[f,N]=l.useState(null),[T,c]=l.useState(!1),[m,w]=l.useState(!1),[n,d]=l.useState(.85),[p,t]=l.useState(!1),[u,D]=l.useState(!1);l.useEffect(()=>{P.entities.CertificateSettings.list().then(s=>{if(s.length>0){const i=s[0];if(_(i.id),r({...q,...i}),i.layout)try{S({...J,...JSON.parse(i.layout)})}catch{}}})},[]);const R=l.useCallback((s,i)=>{S(g=>({...g,[s]:i}))},[]),k=l.useCallback((s,i,g)=>{S(b=>{var j;return{...b,elements:{...b.elements,[s]:{...((j=b.elements)==null?void 0:j[s])||{},[i]:g}}}})},[]),L=l.useCallback((s,i,g)=>{S(b=>{var j;return{...b,elements:{...b.elements,[s]:{...((j=b.elements)==null?void 0:j[s])||{},x:i,y:g}}}})},[]),I=l.useCallback((s,i)=>{r(g=>({...g,[s]:i}))},[]);async function M(s,i,g){g(!0);const{file_url:b}=await P.integrations.Core.UploadFile({file:s});r(j=>({...j,[i]:b})),g(!1)}async function U(){c(!0);const s={...a,layout:JSON.stringify(v)};
1if(F)await P.entities.CertificateSettings.update(F,s);else{const i=await P.entities.CertificateSettings.create(s);_(i.id)}c(!1),w(!0),setTimeout(()=>w(!1),2500)}return e.jsxs("div",{className:"flex flex-col h-screen bg-background overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border bg-background z-10 flex-shrink-0",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-sm font-display uppercase tracking-widest text-foreground",children:"Certificate Designer"}),e.jsx("p",{className:"text-[9px] font-meta text-muted-foreground tracking-widest uppercase mt-0.5",children:"Drag elements · Edit styles · Save"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer px-3 py-2 border border-stone-200 dark:border-stone-700 text-xs text-stone-600 hover:border-stone-400 transition-colors",children:[e.jsx(V,{className:"w-3 h-3",strokeWidth:1.5}),p?"Uploading…":"Logo",e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:s=>s.target.files[0]&&M(s.target.files[0],"logo_image_url",t)})]}),e.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer px-3 py-2 border border-stone-200 dark:border-stone-700 text-xs text-stone-600 hover:border-stone-400 transition-colors",children:[e.jsx(V,{className:"w-3 h-3",strokeWidth:1.5}),u?"Uploading…":"Signature",e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:s=>s.target.files[0]&&M(s.target.files[0],"signature_image_url",D)})]}),e.jsxs("div",{className:"flex items-center gap-1 border border-stone-200 dark:border-stone-700",children:[e.jsx("button",{onClick:()=>d(s=>Math.max(.4,s-.1)),className:"p-2 hover:bg-stone-100 dark:hover:bg-stone-800 transition-colors",children:e.jsx(te,{className:"w-3.5 h-3.5 text-stone-500",strokeWidth:1.5})}),e.jsxs("span",{className:"text-xs text-stone-500 w-10 text-center",children:[Math.round(n*100),"%"]}),e.jsx("button",{onClick:()=>d(s=>Math.min(1.5,s+.1)),className:"p-2 hover:bg-stone-100 dark:hover:bg-stone-800 transition-colors",children:e.jsx(oe,{className:"w-3.5 h-3.5 text-stone-500",strokeWidth:1.5})})]}),e.jsxs("button",{onClick:U,disabled:T,className:"flex items-center gap-2 px-5 py-2 bg-stone-900 dark:bg-stone-100 text-white dark:text-stone-900 text-xs font-meta uppercase tracking-widest hover:opacity-80 transition-opacity disabled:opacity-50",children:[m?e.jsx(ne,{className:"w-3.5 h-3.5",strokeWidth:1.5}):e.jsx(ae,{className:"w-3.5 h-3.5",strokeWidth:1.5}),T?"Saving…":m?"Saved":"Save"]})]})]}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsx(ce,{layout:v,selectedElement:f,onUpdateLayout:R,onUpdateElement:k,onSelectElement:N,cfg:a,onUpdateCfg:I}),e.jsx("div",{className:"flex-1 overflow-auto bg-stone-200 dark:bg-stone-800 flex items-start justify-center p-10",children:e.jsx("div",{style:{transform:`scale(${n})`,transformOrigin:"top center"},children:e.jsx(ie,{cfg:a,layout:v,selectedElement:f,onSelectElement:N,onUpdatePosition:L})})})]})]})}export{xe 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.