PageSourceSearch

https://venue.ink/assets/BIYPO0AU.js

js venue.ink collected 2026-09-24 09:51:41 UTC 26,881 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0d059-0dc8-0000-0784-6ee3765120be";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01efc8c2-d459-53f4-89cd-fed71c2a5ee2")}catch(e){}}();import{j as s,r as F}from"./1_rjLJJT.js";import{c as L,u as I,O as ee,ae as ve,af as Ae,k as Y,T as ae,bR as J,C as V,F as Z,am as te,t as H,B as E,bm as Pe,a as $,j as be,aj as _e,cz as Fe,L as Se,ao as He,b$ as Ce,a0 as ge,b_ as Te,cW as we,b3 as le,aG as Ee,s as Ie,d5 as Re,d6 as $e}from"./BzLaZ4LI.js";import{ah as We,ai as ze,aj as Ne,ak as De,a2 as Ue,al as Be,am as Me}from"./CF1GVhvA.js";import{a as qe,i as Qe,D as Ge,E as Oe}from"./B8Gh17e6.js";import{L as ke,u as Le,b as Xe}from"./CJi0kXOi.js";import{u as re,a as Ke}from"./BEc5voS0.js";import{h as ne,H as je}from"./DQ0Kz3Tt.js";import{z as w}from"./BiUYuhao.js";import{u as Ve,a as ye,D as Ye,c as Ze,S as Je,v as et,d as tt,s as st,K as it,P as at,b as nt,C as lt,e as rt}from"./DTiI9Hoq.js";import{c as ot,d as ct}from"./zBJ3hGMg.js";import{T as dt,X as mt}from"./VXGilUQW.js";import{W as ut,r as ft}from"./TbZLusC8.js";import"./BnWyCVyG.js";import"./eOhqpjg0.js";import"./B7eBE0o_.js";import"./CwRjIYSi.js";import"./9r5vtoby.js";import"./CZEInz57.js";import"./BkkCmsdY.js";import"./CGkMmlqZ.js";import"./BJkpDQtF.js";import"./GCROyQFE.js";function xt(){const t=L.c(29),{personId:e,handle:i,isLoading:n}=I(),r=ee();if(n)return null;if(!e){let b;return t[0]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ve,{code:Ae.hookUseProviderFromRoute}),t[0]=b):b=t[0],b}let a;t[1]!==r||t[2]!==i||t[3]!==e?(a=r("personSettings",{personId:e,handle:i}),t[1]=r,t[2]=i,t[3]=e,t[4]=a):a=t[4];let d;t[5]!==a?(d=s.jsx(Y,{backHref:a,className:"border-b-transparent"}),t[5]=a,t[6]=d):d=t[6];let m;t[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ae,{size:"2xl",variant:"heading",children:"Artist website"}),t[7]=m):m=t[7];let l;t[8]!==r||t[9]!==i||t[10]!==e?(l=r("artistWebsiteCustomize",{personId:e,handle:i}),t[8]=r,t[9]=i,t[10]=e,t[11]=l):l=t[11];let u;t[12]!==l?(u=s.jsx(J,{icon:We,label:"Customize your website",subtext:"Edit theme, colors, and layout",isLast:!1,href:l}),t[12]=l,t[13]=u):u=t[13];let o,k,c;t[14]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(J,{icon:ze,label:"Manage pages",subtext:"Add, remove, and reorder pages",isLast:!1,href:"pages"}),k=s.jsx(J,{icon:Ne,label:"Social links",subtext:"Update your social accounts",isLast:!1,href:"socials"}),c=s.jsx(J,{icon:De,label:"Website QR code",subtext:"Download your shareable QR code",isLast:!1,href:"qr"}),t[14]=o,t[15]=k,t[16]=c):(o=t[14],k=t[15],c=t[16]);let f;t[17]!==r||t[18]!==i||t[19]!==e?(f=r("person",{personId:e,handle:i,preview:!0}),t[17]=r,t[18]=i,t[19]=e,t[20]=f):f=t[20];let g;t[21]!==f?(g=s.jsx(J,{icon:Ue,label:"Preview your website",subtext:"See what your website looks like",isLast:!0,href:f}),t[21]=f,t[22]=g):g=t[22];let j;t[23]!==u||t[24]!==g?(j=s.jsx(V,{children:s.jsxs("div",{className:"flex flex-col gap-4 p-5",children:[m,s.jsxs("div",{className:"flex flex-col",children:[u,o,k,c,g]})]})}),t[23]=u,t[24]=g,t[25]=j):j=t[25];let p;return t[26]!==d||t[27]!==j?(p=s.jsx(Z,{headerSlot:d,children:j}),t[26]=d,t[27]=j,t[28]=p):p=t[28],p}function xs(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(xt,{}),t[0]=e):e=t[0],e}const ht=w.object({title:w.string().min(1,"Link label is required"),body:ne});function pt(t){const e=L.c(43),{onBack:i}=t,{personId:n}=I(),{toast:r}=te(),a=H.useUtils();let d;e[0]!==i||e[1]!==r||e[2]!==a?(d=()=>{r({title:"External link added",description:"Your link has been successfully added to your website.",variant:"success"}),i(),a.getPersonalHomepagePagesAndLinks.invalidate()},e[0]=i,e[1]=r,e[2]=a,e[3]=d):d=e[3];let m;e[4]!==r?(m=C=>{r({title:"Error adding link",description:C.message||"Something went wrong. Please try again.",variant:"error"})},e[4]=r,e[5]=m):m=e[5];let l;e[6]!==d||e[7]!==m?(l={onSuccess:d,onError:m},e[6]=d,e[7]=m,e[8]=l):l=e[8];const{mutateAsync:u}=H.createHomepagePageAndLink.useMutation(l);let o,k;e[9]===Symbol.for("react.memo_cache_sentinel")?(o={title:"",body:""},k={onSubmit:ht},e[9]=o,e[10]=k):(o=e[9],k=e[10]);let c;e[11]!==u||e[12]!==n?(c={defaultValues:o,validators:k,onSubmit:async C=>{const{value:T}=C;n&&await u({personId:n,isLink:!0,title:T.title,body:ne.parse(T.body)})}},e[11]=u,e[12]=n,e[13]=c):c=e[13];const f=re(c);let g;e[14]!==f?(g=C=>{C.preventDefault(),f.handleSubmit()},e[14]=f,e[15]=g):g=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("div",{className:"flex flex-col gap-3 mb-2",children:[s.jsx(ae,{element:"h2",size:"lg",variant:"heading",className:"text-ink-black-900",children:"Add an external link"}),s.jsx(ae,{element:"p",size:"sm",className:"text-ink-black-600",children:"Links show up just like other pages on your website"})]}),e[16]=j):j=e[16];let p;e[17]!==f.AppField?(p=s.jsx(f.AppField,{name:"title",children:bt}),e[17]=f.AppField,e[18]=p):p=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ae,{element:"p",size:"sm",className:"leading-tighter text-ink-black-600",children:"This is what your clients will see"}),e[19]=b):b=e[19];let x;e[20]!==p?(x=s.jsxs("div",{className:"flex flex-col gap-2",children:[p,b]}),e[20]=p,e[21]=x):x=e[21];let h;e[22]!==f.AppField?(h=s.jsx(f.AppField,{name:"body",children:gt}),e[22]=f.AppField,e[23]=h):h=e[23];let y;e[24]!==x||e[25]!==h?(y=s.jsxs("div",{className:"flex flex-col gap-6",children:[x,h]}),e[24]=x,e[25]=h,e[26]=y):y=e[26];let v;e[27]!==f.SubmitButton?(v=s.jsx(f.SubmitButton,{submit:!0,fullWidth:!0,children:"Add link"}),e[27]=f.SubmitButton,e[28]=v):v=e[28];let A;e[29]!==f.AppForm||e[30]!==v?(A=s.jsx(f.AppForm,{children:v}),e[29]=f.AppForm,e[30]=v,e[31]=A):A=e[31];let S;e[32]!==i?(S=s.jsx(E,{variant:"secondary",fullWidth:!0,onClick:i,children:"Cancel"}),e[32]=i,e[33]=S):S=e[33];let N;e[34]!==A||e[35]!==S?(N=s.jsxs("div",{className:"flex flex-col gap-3 mt-6",children:[A,S]}),e[34]=A,e[35]=S,e[36]=N):N=e[36];let P;e[37]!==y||e[38]!==N?(P=s.jsxs("div",{className:"flex flex-col gap-4 px-1",children:[j,y,N]}),e[37]=y,e[38]=N,e[39]=P):P=e[39];let _;return e[40]!==P||e[41]!==g?(_=s.jsx("form",{onSubmit:g,children:P}
1),e[40]=P,e[41]=g,e[42]=_):_=e[42],_}function gt(t){return s.jsx(t.TextField,{label:"Link",placeholder:"http://www.etsy.com/gingiepop"})}function bt(t){return s.jsx(t.TextField,{label:"Link label",placeholder:"Shop my merch"})}function pe(t){const e=L.c(16),{trigger:i}=t,{personId:n,handle:r}=I(),a=ee(),[d,m]=F.useState(!1),[l,u]=F.useState("main");let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=h=>{m(h),h||u("main")},e[0]=o):o=e[0];const k=o;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{u("main")},e[1]=c):c=e[1];const f=c,g=!!i;let j;e[2]!==i?(j=i||s.jsx(_e,{size:32}),e[2]=i,e[3]=j):j=e[3];let p;e[4]!==g||e[5]!==j?(p=s.jsx(Qe,{asChild:g,children:j}),e[4]=g,e[5]=j,e[6]=p):p=e[6];let b;e[7]!==l||e[8]!==a||e[9]!==r||e[10]!==n?(b=s.jsx(qe,{showClose:!1,className:"py-8 px-5",children:l==="main"?s.jsxs("div",{className:"flex flex-col gap-4 w-full text-ink-forest text-base",children:[s.jsxs(ke,{to:a("artistWebsiteAddPage",{personId:n,handle:r}),className:$(be({variant:"secondary"}),"w-full"),viewTransition:!0,children:[s.jsx(Pe,{}),"Add a new page"]}),s.jsxs(E,{variant:"secondary",fullWidth:!0,onClick:()=>u("add-external-link"),children:[s.jsx(Ne,{className:"size-6"}),"Add an external link"]})]}):s.jsx(pt,{onBack:f})}),e[7]=l,e[8]=a,e[9]=r,e[10]=n,e[11]=b):b=e[11];let x;return e[12]!==d||e[13]!==p||e[14]!==b?(x=s.jsxs(Ge,{open:d,onOpenChange:k,children:[p,b]}),e[12]=d,e[13]=p,e[14]=b,e[15]=x):x=e[15],x}function kt(t){const e=L.c(81),{item:i,personId:n,handle:r,isReorderMode:a,justCopied:d,onCopy:m,getPath:l,isLast:u,onRestore:o}=t;let k;e[0]!==i.id?(k={id:i.id},e[0]=i.id,e[1]=k):k=e[1];const{attributes:c,listeners:f,setNodeRef:g,transform:j,transition:p,isDragging:b}=nt(k),[x,h]=F.useState(!1);let y;e[2]!==j?(y=lt.Transform.toString(j),e[2]=j,e[3]=y):y=e[3];let v;e[4]!==y||e[5]!==p?(v={transform:y,transition:p},e[4]=y,e[5]=p,e[6]=v):v=e[6];const A=v;let S;e[7]!==a||e[8]!==i.isArchived?(S=R=>{a||i.isArchived||R.target.closest("button, a")||h(!0)},e[7]=a,e[8]=i.isArchived,e[9]=S):S=e[9];const N=S;let P;e[10]!==a||e[11]!==i.isArchived?(P=R=>{a||i.isArchived||(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),h(!0))},e[10]=a,e[11]=i.isArchived,e[12]=P):P=e[12];const _=P,C=i.isArchived?"text-ink-black-400 dark:text-ink-black-600":"text-ink-black-900 dark:text-ink-black-500";let T;e[13]!==C?(T=$("font-medium",C),e[13]=C,e[14]=T):T=e[14];let W;e[15]!==i.title||e[16]!==T?(W=s.jsx("div",{className:T,children:i.title}),e[15]=i.title,e[16]=T,e[17]=W):W=e[17];let z;e[18]!==i.isArchived?(z=i.isArchived&&s.jsx("span",{className:"text-xs text-ink-black-400 bg-ink-black-100 px-2 py-0.5 rounded",children:"Deleted"}),e[18]=i.isArchived,e[19]=z):z=e[19];let D;e[20]!==W||e[21]!==z?(D=s.jsxs("div",{className:"flex items-center gap-2",children:[W,z]}),e[20]=W,e[21]=z,e[22]=D):D=e[22];let U;e[23]!==i.body||e[24]!==i.isArchived||e[25]!==i.isLink?(U=i.isLink&&s.jsx("div",{className:$("text-sm max-w-xs",i.isArchived?"text-ink-black-400":"text-ink-black-600"),children:i.body}),e[23]=i.body,e[24]=i.isArchived,e[25]=i.isLink,e[26]=U):U=e[26];let B;e[27]!==D||e[28]!==U?(B=s.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-w-0",children:[D,U]}),e[27]=D,e[28]=U,e[29]=B):B=e[29];let M;e[30]!==l||e[31]!==r||e[32]!==a||e[33]!==i.isArchived||e[34]!==i.isLink||e[35]!==i.slug||e[36]!==n?(M=!a&&!i.isLink&&i.slug&&!i.isArchived&&s.jsx(ke,{to:l("customPage",{personId:n,handle:r,pageSlug:i.slug}),state:{fromApp:!0},className:$(be({variant:"transparent"}),"text-sm font-light text-ink-forest p-3"),viewTransition:!0,children:"Preview"}),e[30]=l,e[31]=r,e[32]=a,e[33]=i.isArchived,e[34]=i.isLink,e[35]=i.slug,e[36]=n,e[37]=M):M=e[37];let q;e[38]!==a||e[39]!==i||e[40]!==o?(q=!a&&i.isArchived&&s.jsx(E,{variant:"transparent",className:"text-sm font-light text-ink-forest p-3",onClick:R=>{R.stopPropagation(),o(i)},children:"Restore"}),e[38]=a,e[39]=i,e[40]=o,e[41]=q):q=e[41];let Q;e[42]!==a||e[43]!==i||e[44]!==d||e[45]!==m?(Q=!a&&!i.isArchived&&s.jsx(E,{variant:"transparent",className:"text-sm font-light text-ink-black-600 p-3",onClick:()=>m(i),children:d===i.id?"Copied!":"Copy link"}),e[42]=a,e[43]=i,e[44]=d,e[45]=m,e[46]=Q):Q=e[46];let G;e[47]!==r||e[48]!==x||e[49]!==a||e[50]!==i||e[51]!==n?(G=a?!i.isArchived&&s.jsx("div",{className:"text-ink-black-400 pl-2 pt-3 pointer-events-none",children:s.jsx(rt,{size:24})}):!i.isArchived&&s.jsx(Oe,{item:i,personId:n,handle:r,open:x,onOpenChange:h}),e[47]=r,e[48]=x,e[49]=a,e[50]=i,e[51]=n,e[52]=G):G=e[52];let O;e[53]!==M||e[54]!==q||e[55]!==Q||e[56]!==G?(O=s.jsxs("div",{className:"flex gap-2 flex-end",children:[M,q,Q,G]}),e[53]=M,e[54]=q,e[55]=Q,e[56]=G,e[57]=O):O=e[57];let se;e[58]!==B||e[59]!==O?(se=s.jsxs("div",{className:"flex items-center justify-between min-h-[48px]",children:[B,O]}),e[58]=B,e[59]=O,e[60]=se):se=e[60];const ce=se;let X;e[61]!==c||e[62]!==a||e[63]!==i.isArchived||e[64]!==f?(X=a&&!i.isArchived?{...c,...f}:{},e[61]=c,e[62]=a,e[63]=i.isArchived,e[64]=f,e[65]=X):X=e[65];const de=!u&&"border-b border-ink-black-200",me=b&&"opacity-50",ue=a&&!i.isArchived&&"cursor-grab active:cursor-grabbing",fe=!a&&!i.isArchived&&"cursor-pointer";let K;e[66]!==de||e[67]!==me||e[68]!==ue||e[69]!==fe?(K=$("py-4",de,me,ue,fe),e[66]=de,e[67]=me,e[68]=ue,e[69]=fe,e[70]=K):K=e[70];const xe=!a&&!i.isArchived?0:void 0,he=!a&&!i.isArchived?"button":void 0;let ie;return e[71]!==_||e[72]!==N||e[73]!==ce||e[74]!==g||e[75]!==A||e[76]!==X||e[77]!==K||e[78]!==xe||e[79]!==he?(ie=s.jsx("div",{ref:g,style:A,...X,className:K,onClick:N,onKeyDown:_,tabIndex:xe,role:he,children:ce}),e[71]=_,e[72]=N,e[73]=ce,e[74]=g,e[75]=A,e[76]=X,e[77]=K,e[78]=xe,e[79]=he,e[80]=ie):ie=e[80],ie}function jt({pagesAndLinks:t,personId:e,handle:i,isReorderMode:n,justCopied:r,onCopy:a,onReorderComplete:d}){const[m,l]=F.useState(t),{bottom:u}=F.useContext(Fe),{toast:o}=te(),k=H.useUtils(),c=ee(),{mutateAsync:f}=H.updateHomepagePageAndLink.useMutation(),g=async x=>{const h=x.isLink?"Link":"Page";try{await f({homepagePageAndLinkId:x.id,isArchived:!1}),await k.getPersonalHomepagePagesAndLinks.invalidate(),o({title:`${h} restored`,description:`The ${h.toLowerCase()} has been restored successfully.`,variant:"success"})}catch{o({title:"Error",description:`Failed to restore ${h.toLowerCase()}. Please try again.`,variant:"error"})}},j=Ve(ye(at),ye(it,{coordinateGetter:st})),p=async x=>{const{active:h,over:y}=x;if(y&&h.id!==y.id){const v=m.findIndex(_=>_.id===h.id),A=m.findIndex(_=>_.id===y.id),S=tt(m,v,A);l(S);const N=S[A],P=S[A+1];try{await f({homepagePageAndLinkId:N.id,sortBeforeHomepagePageId:P?.id||null}),await k.getPersonalHomepagePagesAndLinks.invalidate()}catch{l(t),o({title:"Error",description:"Failed to update order. Please try again.",variant:"error"})}}};F.useEffect(()=>{n&&l(t)},[n,t]);const b=n?m:t;return s.jsxs(s.Fragment,{children:[s.jsx(Ye,{sensors:j,collisionDetection:Ze,onDragEnd:p,children:s.jsx(Je,{items:b.map(x=>x.id),strategy:et,children:b.map((x,h)=>s.jsx(kt,{item:x,personId:e,handle:i,isReorderMode:n,justCopied:r,onCopy:a,getPath:c,isLast:h===b.length-1,onRestore:g},x.id))})}),n&&s.jsx("div",{className:"bg-ink-white border-t border-ink-black-100 p-4 fixed left-0 right-0",style:{bottom:u},children:s.jsx("div",{className:"flex max-w-screen-xs mx-auto",children:s.jsx(E,{variant:"primary",onClick:d,className:"flex-1",children:"Done"})})})]})}function yt(){const t=L.c(11),{personId:e,handle:i}=I();let n;t[0]!==e?(n={personId:e,includeArchived:!0},t[0]=e,t[1]=n):n=t[1];const r=!!e;let a;t[2]!==r?(a={enabled:r},t[2]=r,t[3]=a):a=t[3];const{data:d,isLoading:m}=H.getPersonalHomepagePagesAndLinks.useQuery(n,a);if(m){let o;return t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Se,{}),t[4]=o):o=t[4],o}let l;t[5]!==d?(l=d||[],t[5]=d,t[6]=l):l=t[6];let u;return t[7]!==i||t[8]!==e||t[9]!==l?(u=s.jsx(vt,{personId:e,handle:i,pagesAndLinks:l}),t[7]=i,t[8]=e,t[9]=l,t[10]=u):u=t[10],u}function vt(t){const e=L.c(19),{personId:i,handle:n,pagesAndLinks:r}=t,a=ee(),[d,m]=F.useState(null),[l,u]=F.useState(!1);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=v=>{u(v)},e[0]=o):o=e[0];const k=o;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{u(!1)},e[1]=c):c=e[1];const f=c;let g;e[2]!==a||e[3]!==n||e[4]!==i?(g=async v=>{const A=v.isLink?v.body:ge.getAbsoluteUrl(a("customPage",{personId:i,handle:n,pageSlug:v.slug}));await Te(A),m(v.id),setTimeout(()=>m(null),500)},e[2]=a,e[3]=n,e[4]=i,e[5]=g):g=e[5];const j=g;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(pe,{}),e[6]=p):p=e[6];const b=l?"Reorder":"Pages";let x;e[7]!==b?(x=s.jsx("div",{className:"bg-ink-white",children:s.jsx(Y,{backHref:"..",rightSlot:p,children:b})}),e[7]=b,e[8]=x):x=e[8];let h;e[9]!==n||e[10]!==j||e[11]!==l||e[12]!==d||e[13]!==r||e[14]!==i?(h=r.length===0?s.jsx(He,{title:"Add a link to your website",icon:Ce,description:"You can add pages or external links to your artist website",children:s.jsx(pe,{trigger:s.jsx(E,{size:"sm",children:"Add a link or page"})})}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"bg-ink-black-50",children:s.jsx(V,{className:"py-1",children:s.jsxs("div",{className:"flex flex-row justify-around items-center gap-6",children:[s.jsx(pe,{trigger:s.jsxs("button",{className:"flex items-center gap-2 text-sm text-ink-black-700",children:[s.jsx(Be,{className:"size-4"}),"New link"]})}),s.jsxs("button",{className:$("flex items-center gap-2 px-4 text-sm text-ink-black-700 py-2",l&&"bg-ink-white  text-ink-forest roun
1ded-xl"),onClick:()=>k(!l),children:[s.jsx(Me,{className:"size-4"}),"Reorder"]})]})})}),s.jsx(V,{className:"p-4 sm:px-0",children:s.jsx(jt,{pagesAndLinks:r,personId:i,handle:n,isReorderMode:l,justCopied:d,onCopy:j,onReorderComplete:f})})]}),e[9]=n,e[10]=j,e[11]=l,e[12]=d,e[13]=r,e[14]=i,e[15]=h):h=e[15];let y;return e[16]!==x||e[17]!==h?(y=s.jsx(Z,{headerSlot:x,children:h}),e[16]=x,e[17]=h,e[18]=y):y=e[18],y}function hs(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(yt,{}),t[0]=e):e=t[0],e}const At=w.object({title:w.string().min(1,"Title is required"),body:w.string().min(1,"Body is required")});function St(){const t=L.c(30),{personId:e}=I(),i=ee(),n=Le(),r=H.useUtils(),a=we();let d;t[0]!==r?(d={onSuccess:async()=>{await r.getPersonalHomepagePagesAndLinks.invalidate()}},t[0]=r,t[1]=d):d=t[1];const{mutateAsync:m}=H.createHomepagePageAndLink.useMutation(d),{toast:l}=te();let u,o;t[2]===Symbol.for("react.memo_cache_sentinel")?(u={title:"",body:""},o={onSubmit:At},t[2]=u,t[3]=o):(u=t[2],o=t[3]);let k;t[4]!==m||t[5]!==i||t[6]!==n||t[7]!==e||t[8]!==l?(k={defaultValues:u,validators:o,onSubmit:async S=>{const{value:N}=S;if(e)try{await m({personId:e,isLink:!1,title:N.title,body:N.body}),l({title:"Page created",description:`Your "${N.title}" page has been created.`,variant:"success"}),n(i("artistWebsitePages",{personId:e,handle:null}))}catch{l({title:"Error",description:"Something went wrong. Please try again.",variant:"error"})}}},t[4]=m,t[5]=i,t[6]=n,t[7]=e,t[8]=l,t[9]=k):k=t[9];const c=re(k);let f;t[10]!==c?(f=S=>{S.preventDefault(),c.handleSubmit()},t[10]=c,t[11]=f):f=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Y,{className:"",backHref:"../",children:"New Page"}),t[12]=g):g=t[12];const j=a!=="compact";let p;t[13]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ke,{to:"../",relative:"path",viewTransition:!0,className:$(be({variant:"secondary"})),children:"Cancel"}),t[13]=p):p=t[13];let b;t[14]!==c.SubmitButton?(b=s.jsx(c.SubmitButton,{submit:!0,fullWidth:!0,children:"Create Page"}),t[14]=c.SubmitButton,t[15]=b):b=t[15];let x;t[16]!==c.AppForm||t[17]!==b?(x=s.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-4 mx-auto max-w-screen-xs px-4",children:[p,s.jsx(c.AppForm,{children:b})]}),t[16]=c.AppForm,t[17]=b,t[18]=x):x=t[18];let h;t[19]!==j||t[20]!==x?(h=s.jsx(le,{className:"bg-transparent dark:bg-transparent",paddingBottom:j,children:x}),t[19]=j,t[20]=x,t[21]=h):h=t[21];let y;t[22]!==c.AppField?(y=s.jsx(V,{children:s.jsx("div",{className:"flex flex-col h-full",children:s.jsxs("div",{className:"p-4 flex flex-col gap-4 flex-1",children:[s.jsx(c.AppField,{name:"title",children:Nt}),s.jsx(c.AppField,{name:"body",children:wt})]})})}),t[22]=c.AppField,t[23]=y):y=t[23];let v;t[24]!==h||t[25]!==y?(v=s.jsx(Z,{headerSlot:g,footerSlot:h,children:y}),t[24]=h,t[25]=y,t[26]=v):v=t[26];let A;return t[27]!==v||t[28]!==f?(A=s.jsx("form",{onSubmit:f,className:"flex flex-col h-full",children:v}),t[27]=v,t[28]=f,t[29]=A):A=t[29],A}function wt(t){return s.jsxs("div",{className:"flex flex-col flex-1 gap-2",children:[s.jsx("label",{htmlFor:"page-content",className:"text-sm font-medium text-ink-black-700 dark:text-ink-black-300",children:"Page content"}),s.jsx("div",{className:"flex-1",children:s.jsx(t.RichTextField,{allowImages:!0})})]})}function Nt(t){return s.jsx(t.TextField,{label:"Page title",placeholder:"Enter page title"})}function ps(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(St,{}),t[0]=e):e=t[0],e}function Lt(){const{personId:t}=I(),{page:e}=Xe(),i=Le(),n=H.useUtils(),r=we(),{data:a,isLoading:d}=H.getPersonalHomepagePagesAndLinks.useQuery({personId:t},{enabled:!!t}),m=a?.find(c=>c.slug===e||c.id===e),{mutateAsync:l}=H.updateHomepagePageAndLink.useMutation({onSuccess:async()=>{await n.getPersonalHomepagePagesAndLinks.invalidate()}}),{toast:u}=te(),o=re({defaultValues:{title:m?.title??"",body:m?.body??""},validators:{onChange:w.object({title:w.string().min(1,"Title is required"),body:m?.isLink?ne:w.string()})},onSubmit:async({value:c})=>{if(m)try{await l({homepagePageAndLinkId:m.id,title:c.title!==m.title?c.title:void 0,body:m.isLink?ne.parse(c.body):c.body}),u({title:"Updated",description:`Your ${m.isLink?"link":"page"} has been updated.`,variant:"success"}),i(-1)}catch(f){console.error(f),u({title:"Error",description:"Something went wrong. Please try again.",variant:"error"})}}});if(d)return s.jsx(Se,{});if(!m)return s.jsx(ve,{code:Ae.getPersonalHomepagePagesAndLinks});const k=m.isLink;return s.jsx("form",{onSubmit:c=>{c.preventDefault(),o.handleSubmit()},className:"flex flex-col h-full",children:s.jsx(Z,{headerSlot:s.jsx(Y,{className:"",onBack:()=>i(-1),children:k?"Edit link":"Edit page"}),footerSlot:s.jsx(le,{className:"bg-transparent dark:bg-transparent",paddingBottom:r!=="compact",children:s.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-4 mx-auto max-w-screen-xs px-4",children:[s.jsx(E,{variant:"secondary",onClick:()=>i(-1),children:"Cancel"}),s.jsx(o.AppForm,{children:s.jsx(o.SubmitButton,{submit:!0,fullWidth:!0,children:"Update"})})]})}),children:s.jsx(V,{children:s.jsx("div",{className:"flex flex-col h-full",children:s.jsxs("div",{className:"p-4 flex flex-col gap-4 flex-1",children:[s.jsx(o.AppField,{name:"title",children:c=>s.jsx(c.TextField,{label:k?"Link label":"Page title"})}),s.jsx(o.AppField,{name:"body",children:c=>k?s.jsx(c.TextField,{label:"URL",placeholder:"https://example.com"}):s.jsx("div",{className:"flex flex-col flex-1",children:s.jsx(c.RichTextField,{allowImages:!0})})})]})})})})})}function gs(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Lt,{}),t[0]=e):e=t[0],e}function bs(){const t=L.c(13),{personId:e}=I();let i;t[0]!==e?(i=ot({data:ge.getAbsoluteUrl(`/p/${e}`),size:280}),t[0]=e,t[1]=i):i=t[1];const n=i;let r;t[2]!==e?(r=ge.getAbsoluteUrl(`/p/${e}`),t[2]=e,t[3]=r):r=t[3];const a=r;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Y,{backHref:"..",children:"Website QR"}),t[4]=d):d=t[4];let m;t[5]!==n?(m=s.jsx(le,{children:s.jsx("div",{className:"flex flex-col gap-3",children:s.jsx(E,{onClick:()=>{n.then(Pt)},fullWidth:!0,children:"Download PNG"})})}),t[5]=n,t[6]=m):m=t[6];let l;t[7]!==a||t[8]!==n?(l=s.jsx(Ee,{children:s.jsx("div",{className:"flex flex-col items-center gap-6",children:s.jsx("div",{className:"bg-white p-4 rounded-xl shadow-sm border border-ink-black-100","data-qr-container":!0,children:s.jsx(_t,{qr:n,value:a})})})}),t[7]=a,t[8]=n,t[9]=l):l=t[9];let u;return t[10]!==m||t[11]!==l?(u=s.jsx(Z,{headerSlot:d,footerSlot:m,children:l}),t[10]=m,t[11]=l,t[12]=u):u=t[12],u}function Pt(t){return ct(t,"artist-website-qr")}function _t(t){const e=L.c(5),{qr:i,value:n}=t,r=F.useRef(null);let a,d;e[0]!==i||e[1]!==n?(a=()=>{r.current&&i.then(l=>{l.append(r.current||void 0),l.update({data:n})})},d=[i,n],e[0]=i,e[1]=n,e[2]=a,e[3]=d):(a=e[2],d=e[3]),F.useEffect(a,d);let m;return e[4]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{ref:r,
1style:{width:280,height:280}}),e[4]=m):m=e[4],m}const Ft=w.string().max(255).refine(t=>{if(t==null||t==="")return!0;try{const e=new URL(t.startsWith("http")?t:`https://${t}`);return e.hostname.includes(".")&&e.hostname!=="www."}catch{return!1}},{message:"Enter a valid URL (e.g., venue.ink, www.venue.ink, https://venue.ink)"}).transform(t=>{if(t==null||t==="")return"";try{return new URL(t.startsWith("http")?t:`https://${t}`).toString()}catch{return""}}),Ht=je,Ct=je,Tt=/^[a-zA-Z0-9_]{1,15}$/,Et=/^[a-zA-Z0-9_.]{2,24}$/,oe=(t=30,e=3,i=je)=>w.string().min(e,{message:`Too short (under ${e} characters)`}).max(t,{message:`Too long (over ${t} characters)`}).regex(i,{message:"Invalid username. Only letters, numbers, periods, and underscores are allowed, and it cannot end with a period."}).refine(n=>!/^\d+$/.test(n),{message:"Cannot be all numbers"}).transform(n=>n.toLowerCase()),It=oe(30,3,Ht),Rt=oe(30,3,Ct),$t=oe(15,1,Tt),Wt=oe(24,2,Et),zt=w.union([It,w.literal("")]),Dt=w.union([Rt,w.literal("")]),Ut=w.union([$t,w.literal("")]),Bt=w.union([Wt,w.literal("")]),Mt=w.object({websiteUrl:Ft,instagramHandle:zt,tiktokHandle:Bt,threadsHandle:Dt,twitterHandle:Ut});function qt(){const t=L.c(5),{personId:e}=I(),i=!!e;let n;t[0]!==i?(n={enabled:i},t[0]=i,t[1]=n):n=t[1];const{data:r,isLoading:a}=H.artistWebsite.public.getArtistWebsiteSocials.useQuery(e,n);if(a||!r)return null;let d;return t[2]!==r||t[3]!==e?(d=s.jsx(Qt,{artistWebsite:r,personId:e}),t[2]=r,t[3]=e,t[4]=d):d=t[4],d}function Qt({artistWebsite:t,personId:e}){const{toast:i}=te(),[n,r]=F.useState(null),a=F.useRef(null),d=Ie(),{mutateAsync:m}=H.artistWebsite.updateArtistWebsiteSocials.useMutation(),l=re({defaultValues:{websiteUrl:t.websiteUrl??"",instagramHandle:t.instagramHandle??"",tiktokHandle:t.tiktokHandle??"",threadsHandle:t.threadsHandle??"",twitterHandle:t.twitterHandle??""},validators:{onSubmit:Mt},onSubmit:async({value:o})=>{try{await m({personId:e,...o}),i({title:"Social accounts updated",variant:"success"}),d?.capture("social_accounts_updated")}catch(k){const c="Failed to update social accounts";console.error(c,k),r(c),d?.capture("social_accounts_update_failed")}}}),u=Ke(l.store,o=>o.isSubmitting);return s.jsx(Z,{headerSlot:s.jsx(Y,{className:"",backHref:"..",children:"Socials"}),footerSlot:s.jsx(le,{borderTop:!0,children:s.jsx(E,{onClick:()=>{ft(a)},disabled:u,fullWidth:!0,children:u?"Updating...":"Update"})}),children:s.jsx(V,{className:"p-4",children:s.jsxs("form",{className:"space-y-6",onSubmit:o=>{o.preventDefault(),l.handleSubmit()},ref:a,children:[s.jsx(l.AppField,{name:"websiteUrl",children:o=>s.jsx(o.TextField,{label:"Website",placeholder:"www.venue.ink",icon:s.jsx(ut,{size:20,className:"text-ink-black-600"})})}),s.jsx(l.AppField,{name:"instagramHandle",children:o=>s.jsx(o.TextField,{label:"Instagram",placeholder:"venue.ink",icon:s.jsx(Re,{size:20,className:"text-ink-black-600"}),prefixText:"instagram.com/"})}),s.jsx(l.AppField,{name:"tiktokHandle",children:o=>s.jsx(o.TextField,{label:"TikTok",placeholder:"venue.ink",icon:s.jsx($e,{size:20,className:"text-ink-black-600"}),prefixText:"tiktok.com/@"})}),s.jsx(l.AppField,{name:"threadsHandle",children:o=>s.jsx(o.TextField,{label:"Threads",placeholder:"venue.ink",icon:s.jsx(dt,{size:20,className:"text-ink-black-600"}),prefixText:"threads.net/@"})}),s.jsx(l.AppField,{name:"twitterHandle",children:o=>s.jsx(o.TextField,{label:"X (Twitter)",placeholder:"venue.ink",icon:s.jsx(mt,{size:20,className:"text-ink-black-600"}),prefixText:"x.com/"})}),n&&s.jsx("div",{className:"text-red-500 text-sm mt-4",children:n}),s.jsx("button",{type:"submit",className:"sr-only",children:"Update"})]})})})}function ks(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(qt,{}),t[0]=e):e=t[0],e}export{xs as ArtistWebsiteManage,ps as ArtistWebsiteNewPage,gs as ArtistWebsitePageId,hs as ArtistWebsitePages,bs as ArtistWebsiteQr,ks as ArtistWebsiteSocials};
2
3//# chunkId=01efc8c2-d459-53f4-89cd-fed71c2a5ee2

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.