PageSourceSearch

https://thesecrethug.art/static/js/AdminHomePageEditHighlight.4da9f611.chunk.js

js thesecrethug.art collected 2026-10-09 22:42:46 UTC 9,774 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkhug_platform_ui=self.webpackChunkhug_platform_ui||[]).push([[5692],{8439:(e,t,i)=>{i.d(t,{Tw:()=>g,sL:()=>x,hc:()=>A,lX:()=>f,k:()=>j});var n=i(89379),o=i(80045),l=i(39442),s=i(9197),r=i(84747);i(27565);const a=i.p+"static/media/default-project-img.0708d2ca3947504ec55513e24818bf74.svg";var d=i(6760);const c=["mutate"],h=["handleSubmit"],u=["mutate"],g=[["Woman Artist","founderAttributes"],["LGBTQIA+ Artist","founderAttributes"],["Artist with Chronic Conditions","founderAttributes"],["Black Artist","founderAttributes"],["Latin Artist","founderAttributes"],["Asian Artist","founderAttributes"],["Indigenous Artist","founderAttributes"]],m={url:a,contentType:"text/svg",importDate:""},v={heroBlock:Array(3).fill(null).map(((e,t)=>({cta:"",url:"#".concat(t),image:m}))),discoverTagBlock:{tagName:"",tagURL:"#",ids:[],items:[]},featuredArtistBlock:{id:"",largeImage:m,images:[],artist:{id:"",type:"ARTIST",name:"",heroImage:m,links:[],highlights:[],affiliations:[],badges:[],roadmapTags:[],artTags:[],communityTags:[],artistCollections:[],hugScore:0,createdAt:"",founderTeamTags:[],technicalTags:[],projectLists:[],featuredGalleryItems:[],reviewCount:0,counterChefsKiss:0,counterMeh:0,counterMindBlowing:0,counterMustHug:0,counterNah:0,counterNeedItNow:0,counterObsessed:0,counterOutOfThisWorld:0,counterTakeMyMoney:0,counterThoughtProvoking:0,counterTotalReactions:0,counterYay:0}},highlightBlocks:[{heading:"",subheading:"",cta:"",url:"#",ids:[],entities:[]}],newestArtists:[],newestReviews:[],topReviewersForMonth:[]},x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"PUBLISHED";return(0,s.I)({queryKey:["homepage","page",e],queryFn:()=>function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"PUBLISHED";return d.FH.get("/homepage?version=".concat(e))}(e),refetchOnWindowFocus:!1,placeholderData:v})},p=()=>d.FH.post("/homepage/editor/publish",{body:"{}"}),j=()=>{const e=(0,r.n)({mutationFn:p}),{mutate:t}=e,i=(0,o.A)(e,c);return(0,n.A)({publish:()=>t()},i)},A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"PUBLISHED";return(0,s.I)({queryKey:["homepage","editor",e],queryFn:()=>function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"DRAFT";return d.FH.get("/homepage/editor?version=".concat(e))}(e),refetchOnWindowFocus:!1})},f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DRAFT";const i=(0,l.mN)({defaultValues:e}),{handleSubmit:s}=i,a=(0,o.A)(i,h),c=(0,r.n)({mutationFn:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DRAFT";return d.FH.put("/homepage/editor?version=".concat(t),{body:JSON.stringify(e)})}(e,t)}),{mutate:g}=c,m=(0,o.A)(c,u),v=s((e=>{let{heroBlock:t}=e;return g({heroBlock:t})})),x=s((e=>{let{discoverTagBlock:t}=e;return g({discoverTagBlock:t})})),p=s((e=>{let{featuredArtistBlock:t}=e;return g({featuredArtistBlock:t})})),j=s((e=>{let{highlightBlocks:t}=e;return g({highlightBlocks:t})}));return(0,n.A)((0,n.A)({onSubmitHeroBlock:v,onSubmitDiscoverBlock:x,onSubmitFeaturedBlock:p,onSubmitHighlightBlock:j},a),{},{mutation:m})}},954:(e,t,i)=>{i.d(t,{t:()=>h});var n=i(89379),o=i(27565),l=i(63353),s=i(31793),r=i(85056),a=i(39356),d=i(71929),c=i(27929);function h(e){let{typeLabel:t,setReviewable:i}=e;const[l,r]=o.useState(""),h=(0,a.ld)(l,300),{isFetching:j,data:f}=(0,d.cf)(h,12),k=e=>()=>{i(e)};return(0,c.jsxs)(u,{children:[(0,c.jsxs)(g,{children:["Search ",t,(0,c.jsx)(s.pde,{value:l,onChange:e=>r(e.target.value)})]}),(0,c.jsxs)(v,{children:[(0,c.jsx)(m,{children:"Search Results"}),(0,c.jsx)(x,{isLoading:j,children:null!==f&&void 0!==f&&f.length?f.map((e=>(0,c.jsx)(A,(0,n.A)((0,n.A)({},e),{},{image:e.heroImage,type:"ARTIST",action:(0,c.jsx)(s.$nd,{size:"xs",variant:"secondary",onClick:k(e),children:"Select"})}),e.id))):(0,c.jsxs)(p,{children:["Use the search bar above to find ",t]})})]})]})}const u=l.A.div((e=>{let{theme:t}=e;return{display:"grid",gap:"2rem",gridTemplateAreas:'\n    "input"\n    "results"\n    "selections"',[t.breakpoints.desktop]:{gridTemplateAreas:'"input null"\n    "results selections"',gridTemplateColumns:"repeat(2, 1fr)"}}})),g=(0,l.A)(s.JU7)({gridArea:"input"}),m=(0,l.A)(s.JU7)({}).withComponent("div"),v=l.A.div({gridArea:"results"}),x=l.A.ol((e=>{let{isLoading:t=!1,theme:i}=e;return{filter:t?"grayscale(1)":void 0,listStyleType:"none",border:"2px s
1olid ".concat(i.colors.fg),borderRadius:i.borderRadius.md,height:"calc(10rem + 10vw)",marginTop:"0.5rem",overflowY:"auto",padding:"1rem"}})),p=l.A.li((e=>{let{theme:t}=e;return{color:t.colors.fg60}})),j=(0,l.A)(s.Yez)((e=>{let{theme:t}=e;return{gap:"0.5rem",paddingBottom:"0.5rem","& + &":{borderTop:"1px solid ".concat(t.colors.fg20),paddingTop:"0.5rem"},"div:nth-of-type(1)":{width:"calc(40px + 1vw)"},"div:nth-of-type(2)":{flex:1,lineHeight:1.2},span:{display:"block",margin:0},"span:last-of-type":{color:t.colors.fg60,flexGrow:1}}})).withComponent("li");function A(e){let{action:t,name:i,type:n,image:o}=e;return(0,c.jsxs)(j,{children:[(0,c.jsx)(r.Vz,{src:o,alt:""}),(0,c.jsxs)("div",{children:[(0,c.jsx)(s.EYj,{as:"span",size:"xs",bold:!0,children:i}),(0,c.jsx)(s.EYj,{as:"span",size:"xxs",children:n.toLowerCase()})]}),t]})}},65922:(e,t,i)=>{i.r(t),i.d(t,{default:()=>k});var n=i(63353),o=i(31793),l=i(32039),s=i(8439),r=i(89379),a=i(27565),d=i(39442),c=i(85056),h=i(954),u=i(35952),g=i(27929);function m(e){let{nestIndex:t,control:i,register:n,setValue:l}=e;const{fields:s}=(0,d.jz)({control:i,name:"highlightBlocks.".concat(t,".ids")}),[c,m]=a.useState(Array(s.length).fill(!1)),v=e=>()=>{const t=[...c];t[e]=!0,m(t)},j=e=>()=>{const t=[...c];t[e]=!1,m(t)},A=e=>i=>{l("highlightBlocks.".concat(t,".ids.").concat(e,".id"),i.id),j(e)()};return(0,g.jsx)(g.Fragment,{children:s.map(((e,i)=>(0,g.jsxs)("div",{children:[(0,g.jsxs)(x,{children:["Artist Slug ",i+1,(0,g.jsx)(o.JZu,{}),(0,g.jsx)(p,(0,r.A)({},n("highlightBlocks.".concat(t,".ids.").concat(i,".id"),(0,r.A)({},u.H.required))))]},e.id),c[i]?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(h.t,{typeLabel:"Artists",setReviewable:A(i)}),(0,g.jsx)(o.$nd,{size:"xs",variant:"secondary",onClick:j(i),children:"Cancel"})]}):(0,g.jsx)(o.$nd,{size:"xs",variant:"secondary",onClick:v(i),children:"Search"})]},e.id)))})}const v=(0,n.A)(o.H2)({marginBottom:0,"*+&":{marginTop:"2rem"},"&+p":{marginTop:"-1.25rem"}}),x=(0,n.A)(o.JU7)({marginTop:"1rem"}),p=(0,n.A)(o.pde)({alignItems:"flex-start",flex:"1 1 400px",maxWidth:400,marginBottom:"1rem"}),j=function(e){let{homePage:t}=e;const{control:i,register:n,setValue:l,mutation:{isPending:a},formState:{errors:h},onSubmitHighlightBlock:j}=(0,s.lX)(t),{fields:A}=(0,d.jz)({control:i,name:"highlightBlocks"});return(0,g.jsxs)(o.lVW,{onSubmit:j,children:[A.map(((e,s)=>{var a,d,j,A,f,k,b,B,T,y,S,w,H,C,F,L,I,R,z,D,q,J,U,P,M;return(0,g.jsxs)("div",{children:[(0,g.jsx)(v,{size:"h3",children:"Headings"}),(0,g.jsxs)(x,{children:["Heading",(0,g.jsx)(o.JZu,{}),(0,g.jsx)(p,(0,r.A)({},n("highlightBlocks.".concat(s,".heading"),(0,r.A)({},u.H.required)))),(null===h||void 0===h||null===(a=h.highlightBlocks)||void 0===a||null===(d=a[s])||void 0===d?void 0:d.heading)&&(0,g.jsx)(o.bgj,{children:null===h||void 0===h||null===(j=h.highlightBlocks)||void 0===j||null===(A=j[s])||void 0===A||null===(f=A.heading)||void 0===f?void 0:f.message})]}),(0,g.jsxs)(x,{children:["Subheading",(0,g.jsx)(o.JZu,{}),(0,g.jsx)(p,(0,r.A)({},n("highlightBlocks.".concat(s,".subheading"),(0,r.A)({},u.H.required)))),(null===h||void 0===h||null===(k=h.highlightBlocks)||void 0===k||null===(b=k[s])||void 0===b?void 0:b.subheading)&&(0,g.jsx)(o.bgj,{children:null===h||void 0===h||null===(B=h.highlightBlocks)||void 0===B||null===(T=B[s])||void 0===T||null===(y=T.subheading)||void 0===y?void 0:y.message})]}),(0,g.jsx)(v,{size:"h3",children:"Call To Action"}),(0,g.jsxs)(x,{children:["CTA Link Text",(0,g.jsx)(o.JZu,{}),(0,g.jsx)(p,(0,r.A)({},n("highlightBlocks.".concat(s,".cta"),(0,r.A)({},u.H.required)))),(null===h||void 0===h||null===(S=h.highlightBlocks)||void 0===S||null===(w=S[s])||void 0===w?void 0:w.cta)&&(0,g.jsx)(o.bgj,{children:null===h||void 0===h||null===(H=h.highlightBlocks)||void 0===H||null===(C=H[s])||void 0===C||null===(F=C.cta)||void 0===F?void 0:F.message})]}),(0,g.jsxs)(x,{children:["CTA Link URL",(0,g.jsx)(o.JZu,{}),(0,g.jsx)(p,(0,r.A)({},n("highlightBlocks.".concat(s,".url"),(0,r.A)({},u.H.required)))),(null===h||void 0===h||null===(L=h.highlightBlocks)||void 0===L||null===(I=L[s])||void 0===I?void 0:I.url)&&(0,g.jsx)(o.bgj,{children:null===h||void 0===h||null===(R=h.highlightBlocks)||void 0===R||null===(z=R[s])||void 0===z||null===(D=z.url)||void 0===D?void 0:D.message})]}),(0,g.jsx)(v,{size:"h3",children:"Curator Logo"}),(0,g.jsxs)("fieldset",{children:[(0,g.jsxs)(o.s$2,{children:["Logo",(0,g.jsx)(o.JZu,{})]}),(0,g.jsx)(c.BR,{control:i,fieldName:"highlightBlocks.".concat(s,".logo"),aspect:"square",src:null===(q=t.highlightBlocks)||void 0===q||null===(J=q[s])||void 0===J?void 0:J.logo,errorMessage:null===(U=h.highlightBlocks)||void 0===U||null===(P=U[s])||void 0===P||null===(M=P.logo)||void 0===M?void 0:M.message})]}),(0,g.jsx)(v,{size:"h3",children:"Artist Slugs"}),(0,g.jsx)(m,{nestIndex:s,control:i,register:n,setValue:l})]},e.id)})),(0,g.jsx)("div",{children:(0,g.jsx)(o.$nd,{size:"xs",type:"submit",variant:"primary",children:"Save Draft"})}),a&&(0,g.jsx)(o.kt7,{})]})},A="Home Page: Edit Highlight Block";const f=n.A.main({display:"flex",flexDirection:"column",gap:"2rem"}),k=function(){const{isLoading:e,data:t}=(0,s.hc)("DRAFT"),i=t&&!e;return(0,g.jsxs)(f,{children:[(0,g.jsx)(l.p3,{title:A}),(0,g.jsx)(o.H1,{size:"h2",children:A}),i&&(0,g.jsx)(j,{homePage:t}),e&&(0,g.jsx)(o.kt7,{})]})}}}]);
2//# sourceMappingURL=AdminHomePageEditHighlight.4da9f611.chunk.js.map

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.