1import{f as rt,g as Ce,M as lt,A as Se,C as Ie,o as l,N as _,w as xe,a as t,O as E,c as n,F as ie,r as de,t as y,P as B,l as s,Q as ye,p as g,q as v,R as at,_ as Ae,h as nt,S as it,i as dt,s as we,k as ut,u as pt,z as te,x as c,B as ke,T as ct,U as ft,j as _e,v as se,y as f,b as m,E as oe,G as re,n as q,V as A,d as le,m as h,X as ae,W as mt,Y as ht}from"./Bl7aIc7Y.js";import{N as vt}from"./C-5_00hN.js";import{A as gt}from"./CEuPowNu.js";import{A as bt}from"./s9I36zUG.js";import{S as xt}from"./70p5TNt4.js";import{P as ne}from"./D-aNUEV1.js";import{C as yt}from"./D3MSiAdk.js";import"./Cd8TS6ny.js";import"./B0FwBhnJ.js";const wt=rt("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]),kt={key:0},_t={key:1,class:"dropdown-select__placeholder"},Ct=["onClick"],St=Ce({__name:"DropdownSelect",props:ye({options:{},placeholder:{default:"Select"},labelKey:{default:"label"},valueKey:{default:""},triggerClass:{default:""},optionsClass:{default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:null},modelModifiers:{}}),emits:ye(["select"],["update:modelValue"]),setup(C,{emit:$}){const i=lt(C,"modelValue"),w=C,V=$,k=g(!1),b=g(null),F=g(0),L=v(()=>i.value?R(i.value):"");Se(()=>{d(),window.addEventListener("resize",d)}),Ie(()=>{window.removeEventListener("resize",d)});const P=async()=>{w.disabled||(k.value=!k.value,await at(),d())},ue=a=>{i.value=pe(a),k.value=!1,V("select",a)},d=()=>{b.value&&(F.value=b.value.offsetWidth)},R=a=>typeof a=="string"||typeof a=="number"?String(a):a?.[w.labelKey]??"",pe=a=>!w.valueKey||typeof a!="object"||a===null?a:a[w.valueKey]??a,j=(a,p)=>typeof a=="string"||typeof a=="number"?a:a?.[w.valueKey]??a?.[w.labelKey]??p;return(a,p)=>(l(),_(s(vt),{trigger:"manual",show:k.value,"show-arrow":!1,placement:"bottom-start",width:F.value,style:{"background-color":"transparent",padding:"0"}},{trigger:xe(()=>[t("div",{ref_key:"pickerTriggerRef",ref:b,class:E(["dropdown-select__trigger w-full bg-white/5 border border-white/10 rounded-xl py-3 px-4 focus:outline-hidden focus:border-brand-purple/50 transition-colors appearance-none",[C.triggerClass,C.disabled?"opacity-50 cursor-not-allowed":""]]),onClick:B(P,["stop"])},[L.value?(l(),n("span",kt,y(L.value),1)):(l(),n("span",_t,y(C.placeholder),1)),t("div",{class:E(["dropdown-select__arrow",k.value?"down":"right"])},null,2)],2)]),default:xe(()=>[t("div",{class:E(["dropdown-select__options w-full bg-white/5 border border-white/10 rounded-xl py-3 px-4 focus:outline-hidden focus:border-brand-purple/50 transition-colors appearance-none",C.optionsClass])},[(l(!0),n(ie,null,de(C.options,(S,M)=>(l(),n("div",{key:j(S,M),onClick:O=>ue(S)},y(R(S)),9,Ct))),128))],2)]),_:1},8,["show","width"]))}}),It=Object.assign(Ae(St,[["__scopeId","data-v-bfb16537"]]),{__name:"CommonDropdownSelect"}),At={class:"max-w-4xl mx-auto mt-20 mb-12 px-4 sm:px-6 md:mt-24 md:mb-24"},$t={class:"mb-12"},Vt={class:"relative flex flex-col items-stretch gap-3 md:flex-row md:items-center md:gap-4"},Lt={class:"relative flex-1"},Rt={class:"flex w-5 h-5 items-center justify-center"},Pt={class:"space-y-8"},jt={class:"glass-panel p-5 rounded-2xl md:p-8 md:rounded-3xl"},Mt={class:"grid gap-6 md:grid-cols-[200px_1fr] md:gap-8"},zt={class:"w-full space-y-2 text-left"},Ut=["src"],Et={key:0,class:"mask"},Ft={key:1},Nt={class:"space-y-5 md:space-y-6"},Kt={class:"space-y-2"},Tt=["placeholder"],Dt={class:"space-y-2"},qt={class:"md:col-span-2 space-y-2"},Bt={class:"glass-panel p-5 rounded-2xl md:p-8 md:rounded-3xl"},Ot={class:"ss-scroll flex flex-wrap gap-4 max-h-[432px] overflow-y-auto overflow-x-hidden pr-1 md:max-h-[472px]"},Wt=["onClick"],Ht=["src"],Qt={key:0,class:"mask"},Yt={key:1},Gt=["onClick"],Xt={key:0,class:"h-40 aspect-[9/16] shrink-0 rounded-xl border border-white/10 bg-white/5 flex flex-col items-center justify-center gap-2 md:h-44"},Jt={class:"text-[10px] text-white/40 text-center px-2"},Zt={class:"glass-panel p-5 rounded-2xl md:p-8 md:rounded-3xl"},es={class:"flex flex-wrap gap-4"},ts=["onClick"],ss=["src"],os={key:0,class:"mask"},rs={key:1},ls=["onClick"],as={key:0,class:"h-40 aspect-video shrink-0 rounded-xl border border-white/10 bg-white/5 flex flex-col items-center justify-center gap-2 md:h-44"},ns={class:"text-[10px] text-white/40 text-center px-2"},is={class:"flex flex-col-reverse gap-3 pt-2 sm:flex-row sm:items-center sm:justify-between md:pt-4"},ds=["disabled"],us=["disabled"],ps=Ce({__name:"[id]",setup(C){const{$firebaseAnalytics:$}=nt(),i=it(),w=dt(),{isLoggedIn:V,isReady:k}=we(w),b=ut(),{isImporting:F,appInfoID:L,appUrl:P,appID:ue,appLogo:d,appName:R,appPlatform:pe,appDescription:j,sourceType:a,categoryChoice:p,videoRes
1ources:S,screenshots:M,isUploadingScreenshots:O,crawlingProgress:x}=we(b),{fetchAppInfo:$e,crawlingAppInfo:ce,editAppInfo:Ve,fillAppInfo:Le,savePendingCreate:Re,takePendingCreate:Pe,checkSizeToUpload:je,loadScreenshotFiles:Me,loadVideoFile:ze,startCrawlingPolling:Ue,stopCrawlingPolling:Ee}=b,I=g(null),W=v(()=>I.value!==null),fe=g(""),me=v(()=>["running","ready"].includes(x.value?.status)),N=v(()=>x.value?.status==="running"),Fe=v(()=>me.value&&!x.value?.screenshots?.finished&&(x.value?.screenshots?.total||0)>0),Ne=v(()=>me.value&&!x.value?.videos?.finished&&(x.value?.videos?.total||0)>0);let T=g(null),z=g(null),D=g(null),U=g(null),H=g(!1);const Q=v(()=>!c(L.value)),Ke=v(()=>Q.value?["app","game"]:["app","game","product"]),Te=v(()=>Q.value&&a.value==="product"),he=v(()=>c(p.value)?a.value==="product":p.value==="product"),K=v(()=>he.value?"product":"app"),Y=g(null),De=()=>{Y.value?.scrollIntoView({behavior:"smooth",block:"center"}),Y.value?.focus()};pt({title:`App ${i.params.id=="create"?"Create":"Edit"}`}),Se(()=>{Be(),te.on("loginSuccess",Z),b.isCrawlingAssets&&!c(b.cachedAppKey)&&Ue(),ke([k,V,()=>i.query.app_url,()=>i.query.auto],qe,{immediate:!0})});const qe=()=>{const o=i.query.app_url,e=Array.isArray(o)?o[0]||"":o||"";if(i.params.id!=="create"||c(e)||i.query.auto!=="1"||localStorage.getItem("apptovid:pending-app-create")||(P.value=e,!k.value||!V.value))return;const r=`${i.query.auto}:${e}`;fe.value!==r&&(fe.value=r,ce())};Ie(()=>{te.off("loginSuccess",Z),Ee()});const Be=()=>{ke(k,o=>{if(o&&V.value){if(Z())return;let e=i.params.id;e=="create"?L.value="":e!=L.value&&$e(e)}},{immediate:!0})},G=o=>{U.value=U.value===o?null:o},X=o=>U.value===o?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none",Oe=()=>{$?.trackEvent("click_appedit_import_app"),ce()},J=async o=>{if($?.trackEvent("click_appedit_choose_image"),o==1){T.value?.click();return}if(o==2){if(O.value){f("Screenshot upload is in progress. Please try again later.","warning");return}z.value?.click();return}o==3&&D.value?.click()},We=o=>{const r=o.target.files?.[0]||null;r&&(je(r,1,256,256),T.value&&(T.value.value=""))},He=o=>{const e=o.target,r=Array.from(e.files||[]);if(r.length>10){H.value=!0,z.value&&(z.value.value="");return}r.length>0&&Me(r),z.value&&(z.value.value="")},Qe=o=>{const r=o.target.files?.[0]||null;r&&(mt(r).then(u=>{u.duration<30?f("Video duration must be at least 30 seconds.","error"):ze(r)}),D.value&&(D.value.value=""))},ve=()=>{H.value=!1},Ye=()=>{d.value=null,U.value=null},Ge=o=>{M.value.splice(o,1),U.value=null},Xe=o=>{S.value.splice(o,1),U.value=null},Je=o=>{$?.trackEvent("click_appedit_app_category"),p.value=o},Ze=()=>{se("/app/list")},et=()=>{$?.trackEvent("click_appedit_next"),ge("selling-points")},tt=()=>{$?.trackEvent("click_appedit_save"),ge("stay")},ge=o=>{if(W.value||!ot())return;const e=p.value==="product"?"product":"app";if(!Q.value&&!c(b.cachedAppKey)&&e!==(a.value||"app")){const r=a.value==="product"?"a product page":"an app store page";ht("Category mismatch",`This link was detected as ${r}, but you selected "${p.value}". Submit with your selection anyway?`,"Submit",()=>be(o));return}be(o)},be=o=>{if(!V.value){Re(),localStorage.removeItem("login-initiator"),te.emit("showLoginDialog");return}st(o)},st=(o="selling-points")=>{const e=i.params.id=="create";I.value=o,Ve().then(r=>{if(_e().refreshAppList(),o==="stay"){f("Saved.","success");return}const u=r?.id||L.value;se(`/app/selling-points/${u}?mode=${e?"create":"edit"}`)}).catch(r=>{f(r,"error")}).finally(()=>{I.value=null})},Z=()=>{if(!V.value)return!1;const o=Pe();return o?(ct(o).then(e=>{e?.is_first_app&&ft(w.user_id),Le(e),_e().refreshAppList(),se(`/app/selling-points/${e.id}?mode=create`)}).catch(e=>{f(e,"error")}),!0):!1},ot=()=>N.value?(f(`Please wait until enough ${K.value} assets are ready.`,"warning"),!1):d.value?.state===1||O.value||M.value.some(o=>o.state===1)||S.value.some(o=>o.state===1)?(f("Please wait for the file upload to complete.","warning"),!1):c(p.value)?(f("Please select a category","warning"),!1):!he.value&&c(d.value?.file_id)?(f("Please upload app logo","warning"),!1):c(R.value)?(f(c(b.cachedAppKey)?`Please enter ${K.value} name`:`We couldn't get the ${K.value} name from this link. Please enter it manually.`,"warning"),De(),!1):c(j.value)?(f(`Please enter ${K.value} description`,"warning"),!1):c(M.value)&&c(S.value)?(f("Please upload at least one screenshot or video.","warning"),!1):!0;return(o,e)=>(l(),n("main",At,[t("button",{class:"mb-6 inline-flex items-center gap-2 text-white/50 hover:text-white transition-colors cursor-pointer",onClick:Ze},[m(s(bt),{class:"w-5 h-5"}),e[8]||(e[8]=t("span",{class:"text-sm font-semibold"},"Back",-1))]),t("div",$t,[t("div",Vt,[t("div",Lt,[m(s(xt),{class:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-white/40"}),oe(t("input",{type:"text",placeholder:"Paste app store or product page URL...",class:"w-full bg-white/5 border border-white/10 rounded-2xl py-4 pl-12 pr-4 focus:outline-hidden focu
1s:border-brand-purple/50 transition-colors","onUpdate:modelValue":e[0]||(e[0]=r=>q(P)?P.value=r:null)},null,512),[[re,s(P)]])]),t("button",{class:"flex h-14 w-full items-center justify-center gap-2 px-6 rounded-2xl bg-linear-to-r from-brand-purple to-brand-blue font-bold whitespace-nowrap shadow-[0_0_20px_rgba(139,92,246,0.3)] cursor-pointer hover:opacity-90 transition-opacity shrink-0 md:w-[180px]",onClick:Oe},[t("span",Rt,[s(F)?(l(),_(s(A),{key:0,size:"small",stroke:"ffffff"})):(l(),_(s(wt),{key:1,class:"w-5 h-5"}))]),le(" "+y(s(F)?"Loading...":"Magic Import"),1)])]),e[9]||(e[9]=t("p",{class:"text-white/40 text-sm mt-3 md:text-base md:mt-4"}," You can also enter product information manually ",-1))]),t("div",Pt,[t("section",jt,[e[16]||(e[16]=t("h2",{class:"text-xl font-bold mb-6 font-display md:mb-8"}," Overview ",-1)),t("div",Mt,[t("div",zt,[e[12]||(e[12]=t("label",{class:"block text-xs font-semibold text-white/40 uppercase tracking-wider"},"Logo",-1)),s(d)?.url?(l(),n("div",{key:0,class:"mx-auto w-full max-w-[180px] aspect-square rounded-2xl border-2 border-solid border-white/10 bg-white/5 flex flex-col items-center justify-center gap-2 transition-all group thumb-container md:mx-0 md:max-w-none",onClick:e[1]||(e[1]=r=>G("logo"))},[t("img",{src:s(d)?.url,alt:"app logo"},null,8,Ut),[1,3].includes(s(d).state)?(l(),n("div",Et,[s(d).state===1?(l(),_(s(A),{key:0,size:"medium",stroke:"9d9d9d"})):s(d).state===3?(l(),n("span",Ft,"Upload failed")):h("",!0)])):h("",!0),t("button",{type:"button",class:E(["absolute top-2 right-2 z-10 flex items-center justify-center rounded-full bg-black/60 p-1.5 text-white/80 transition-opacity hover:text-white md:pointer-events-auto md:opacity-0 md:group-hover:opacity-100",X("logo")]),onClick:B(Ye,["stop"])},[m(s(ae),{class:"w-4 h-4"})],2)])):(l(),n("div",{key:1,class:"mx-auto w-full max-w-[180px] aspect-square rounded-2xl border-2 border-dashed border-white/10 bg-white/5 flex flex-col items-center justify-center gap-1 cursor-pointer hover:border-brand-purple/50 hover:bg-brand-purple/5 transition-all group md:mx-0 md:max-w-none",onClick:e[2]||(e[2]=r=>J(1))},[m(s(ne),{class:"w-8 h-8 text-white/20 group-hover:text-brand-purple transition-colors"}),e[10]||(e[10]=t("span",{class:"text-xs text-white/40 group-hover:text-brand-purple"},"Upload Logo",-1)),e[11]||(e[11]=t("span",{class:"text-xs text-white/40 group-hover:text-brand-purple"},"Min. 256 Ã 256 px",-1))]))]),t("div",Nt,[t("div",Kt,[e[13]||(e[13]=t("label",{class:"block text-left text-xs font-semibold text-white/40 uppercase tracking-wider"},"Name",-1)),oe(t("input",{ref_key:"nameInputRef",ref:Y,type:"text",placeholder:`Enter ${s(K)} name`,class:"w-full bg-white/5 border border-white/10 rounded-xl py-3 px-4 focus:outline-hidden focus:border-brand-purple/50 transition-colors","onUpdate:modelValue":e[3]||(e[3]=r=>q(R)?R.value=r:null)},null,8,Tt),[[re,s(R)]])]),t("div",Dt,[e[14]||(e[14]=t("label",{class:"text-xs font-semibold text-white/40 uppercase tracking-wider"},"Category",-1)),m(It,{modelValue:s(p),"onUpdate:modelValue":e[4]||(e[4]=r=>q(p)?p.value=r:null),options:s(Ke),placeholder:"Select category",disabled:s(Te),onSelect:Je},null,8,["modelValue","options","disabled"])])]),t("div",qt,[e[15]||(e[15]=t("label",{class:"text-xs font-semibold text-white/40 uppercase tracking-wider"},"Description",-1)),oe(t("textarea",{rows:4,placeholder:"Enter your description and text here...",class:"w-full bg-white/5 border border-white/10 rounded-xl py-3 px-4 focus:outline-hidden focus:border-brand-purple/50 transition-colors resize-none","onUpdate:modelValue":e[5]||(e[5]=r=>q(j)?j.value=r:null)},null,512),[[re,s(j)]])])])]),t("section",Bt,[e[18]||(e[18]=t("h2",{class:"text-xl font-bold mb-6 font-display md:mb-8"}," Image Assets ",-1)),t("div",Ot,[t("div",{class:"h-40 aspect-[9/16] shrink-0 rounded-xl border-2 border-dashed border-white/10 bg-white/5 flex flex-col items-center justify-center gap-2 cursor-pointer hover:border-brand-purple/50 hover:bg-brand-purple/5 transition-all group md:h-44",onClick:e[6]||(e[6]=r=>J(2))},[m(s(ne),{class:"w-6 h-6 text-white/20 group-hover:text-brand-purple transition-colors"}),e[17]||(e[17]=t("span",{class:"text-[10px] text-white/40 text-center px-2 group-hover:text-brand-purple"},"Add Screenshot",-1))]),(l(!0),n(ie,null,de(s(M),(r,u)=>(l(),n("div",{key:u,class:"relative h-40 shrink-0 rounded-xl border border-white/10 bg-white/5 overflow-hidden group thumb-container md:h-44",onClick:ee=>G(`screenshot-${u}`)},[t("img",{class:"screenshot-thumb block",src:r.url},null,8,Ht),[1,3].includes(r.state)?(l(),n("div",Qt,[r.state===1?(l(),_(s(A),{key:0,size:"medium",stroke:"606266"})):r.state===3?(l(),n("span",Yt,"Upload failed")):h("",!0)])):h("",!0),t("button",{type:"button",class:E(["absolute top-2 left-2 z-10 flex items-center justify-center rounded-full bg-black/60 p-1.5 text-white/80 transition-opacity hover:text-white md:pointer-events-auto md:opacity-0 md:group-hover:opacity-100 cursor-pointer",X(`screenshot-${u}`)]),onClick:B(ee=>Ge(u),["stop"])},[m(s(ae),{class:"w-4 h-4"})],10,Gt)],8,Wt))),128)),s(Fe)?(l(),n("div",Xt,[m(s(A),{size:"medium",stroke:"9d9d9d"}),t("span",Jt," Importing "+y(s(x)?.screenshots?.done||0)+"/"+y(s(x)?.screenshots?.total||0),1)])):h("",!0)])]),t("section",Zt,[e[21]||(e[21]=t("h2",{class:"text-xl font-bold mb-6 font-display md:mb-8"}," Video Assets ",-1)),t("div",es,[(l(!0),n(ie,null,de(s(S),(r,u)=>(l(),n("div",{key:u,class:"relative h-40 aspect-video shrink-0 rounded-xl border border-white/10 bg-white/5 flex items-center justify-center group thumb-container md:h-44",onClick:ee=>G(`video-${u}`)},[t("video",{class:"h-full w-full object-contain",src:r.video_url,controls:""},null,8,ss),[1,3].includes(r.state)?(l(),n("div",os,[r.state===1?(l(),_(s(A),{key:0,size:"medium",stroke:"606266"})):r.state===3?(l(),n("span",rs,"Upload failed")):h("",!0)])):h("",!0),t("button",{type:"button",class:E(["absolute top-2 right-2 z-10 flex items-center justify-center rounded-full bg-black/60 p-1.5 text-white/80 transition-opacity hover:text-white md:pointer-events-auto md:opacity-0 md:group-hover:opacity-100 cursor-pointer",X(`video-${u}`)]),onClick:B(ee=>Xe(u),["stop"])},[m(s(ae),{class:"w-4 h-4"})],10,ls)],8,ts))),128)),s(Ne)?(l(),n("div",as,[m(s(A),{size:"medium",stroke:"9d9d9d"}),t("span",ns," Importing "+y(s(x)?.videos?.done||0)+"/"+y(s(x)?.videos?.total||0),1)])):h("",!0),t("div",{class:"h-40 aspect-video shrink-0 rounded-xl border-2 border-dashed border-white/10 bg-white/5 flex flex-col items-center justify-center cursor-pointer hover:border-brand-purple/50 hover:bg-brand-purple/5 transition-all group md:h-44",onClick:e[7]||(e[7]=r=>J(3))},[m(s(ne),{class:"w-6 h-6 text-white/20 group-hover:text-brand-purple transition-colors"}),e[19]||(e[19]=t("span",{class:"text-[10px] text-white/40 group-hover:text-brand-purple"},"Add Video",-1)),e[20]||(e[20]=t("span",{class:"text-[10px] text-white/40 group-hover:text-brand-purple"},"Min. 30s",-1))])])]),t("div",is,[t("button",{class:"flex h-12 w-full items-center justify-center gap-2 rounded-2xl border border-white/10 bg-white/5 px-6 text-sm font-bold text-white/70 transition-colors hover:bg-white/10 hover:text-white cursor-pointer sm:w-auto disabled:cursor-not-allowed disabled:opacity-50",disabled:s(W),onClick:tt},[I.value==="stay"?(l(),_(s(A),{key:0,size:"small",stroke:"ffffff"})):h("",!0),le(" "+y(I.value==="stay"?"Saving...":"Save"),1)],8,ds),t("button",{class:"flex h-12 w-full cursor-pointer items-center justify-center gap-2 rounded-2xl bg-linear-to-r from-brand-purple to-brand-blue px-7 text-sm font-bold text-white shadow-[0_0_24px_rgba(139,92,246,0.3)] transition-opacity hover:opacity-90 sm:w-auto disabled:cursor-not-allowed disabled:opacity-50",disabled:s(N)||s(W),onClick:et},[s(N)||I.value==="selling-points"?(l(),_(s(A),{key:0,size:"small",stroke:"ffffff"})):h("",!0),le(" "+y(s(N)?"Importing app assets...":I.value==="selling-points"?"Saving...":"Next: Edit Product Highlights")+" ",1),!s(N)&&I.value!=="selling-points"?(l(),_(s(yt),{key:1,class:"w-5 h-5"})):h("",!0)],8,us)])]),t("input",{ref_key:"logoFileInputRef",ref:T,style:{display:"none"},type:"file",accept:"image/png,image/jpeg",onChange:We},null,544),t("input",{ref_key:"screenshotFileInputRef",ref:z,style:{display:"none"},type:"file",accept:"image/png,image/jpeg",multiple:"",onChange:He},null,544),t("input",{ref_key:"fileInputVideoRef",ref:D,style:{display:"none"},type:"file",accept:"video/mp4",onChange:Qe},null,544),m(gt,{"is-open":s(H),type:"warning",title:"Warning",content:"You can select up to 10 screenshots at a time.",onClose:ve,onGotIt:ve},null,8,["is-open"])]))}}),ws=Ae(ps,[["__scopeId","data-v-9718b3ce"]]);export{ws 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.