1/*! For license information please see artist-management-1fd5999a8852fd38.js.LICENSE.txt */ 2(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[60970],{611607:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});const s=(0,a(772919).Z)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},934464:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});const s=(0,a(772919).Z)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},484617:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advisor/artist-management",function(){return a(946995)}])},136887:function(e,t,a){"use strict";var s;a.d(t,{D:function(){return s}}),function(e){e.ARTWORKS="artwork",e.VIDEO="video",e.VIDEO_THUMBNAIL="video-thumbnail",e.AVATAR="avatar",e.NFT_IMAGE="nft-image",e.NFT_VIDEO="nft-video",e.NFT_VIDEO_THUMBNAIL="nft-video-thumbnail",e.MANUAL_ARTIST_PROFILE_PICTURE="manual-artist-profile-picture",e.AUCTION_RECORD="auction-records",e.CONTACT_US="contact-us-attachment",e.CV="cv",e.FEATURED_LINKS="featured-links",e.CUSTOM_WEBSITE="custom-website",e.EVENT_MAP="event-map",e.EVENT_SPONSOR="event-sponsor",e.POST="post",e.MOMENT_IMAGE="moment-image",e.MOMENT_VIDEO="moment-video",e.MOMENT_VIDEO_THUMBNAIL="moment-video-thumbnail",e.MANUAL_ARTIST_CV="manual-artist-cv"}(s||(s={}))},946995:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return Be}});var s=a(785893),l=a(722051),n=a(731699),r=a(722537),i=a(667294),o=a(823023),c=a(957584),d=a(262940),u=a(576249),m=a(975848),p=(0,a(533733).Z)("outline","location-question","IconLocationQuestion",[["path",{d:"M14.5 21a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5l-2.967 8.215",key:"svg-0"}],["path",{d:"M19 22v.01",key:"svg-1"}],["path",{d:"M19 19a2.003 2.003 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483",key:"svg-2"}]]),x=a(77373),h=a(627405),g=a(505152),f=a.n(g),b=a(741664),v=a.n(b),j=a(496486),N=a.n(j),y=a(31415),w=a(287536),k=a(357492),A=a(312440),P=(a(87079),a(498029)),Z=a(885345),C=a(91885);const T=async e=>{let{managedArtist:t}=e;const a=t.userId>0;try{await C.Z.createManagedArtist({managedArtist:t}),(0,Z.t5)(a?"Add artist successfully!":"Create artist successfully!")}catch(e){var s;throw(0,Z.cB)(null!==(s=e.message)&&void 0!==s?s:a?"Failed to add artist.":"Failed to create artist."),e}};var M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,P.D)({mutationFn:T,...e});return{createManagedArtist:async e=>{let{managedArtist:a}=e;await t.mutateAsync({managedArtist:a})},...t}},I=a(616310),_=a(490512),E=a(136887),S=a(724636),R=a(128227),D=a(108134),F=a(926200),U=a(45697),L=a.n(U),O=a(481835),z=a(935556),B=a(409659),q=a(718499),H=a(636316),V=a(923450),G=a.n(V),W=a(585721),X=a(609852),Y=a(871205),J=a(706928),Q=a(936611);const K=async e=>{let{file:t,type:a,onProgress:s}=e;const l=await(0,Q.Z)(t,a,{onUploadProgress:e=>{const t=Math.round(e.loaded/e.total*100);s(100===t?99:t)}});return s(100),l};var $=e=>{const t=(0,P.D)({mutationFn:K,...e}),[a,s]=(0,i.useState)(0);return{uploadFile:async e=>{let{file:a,type:l}=e;return s(0),await t.mutateAsync({file:a,type:l,onProgress:s})},uploadProgress:a,...t}};const ee=e=>{let{className:t,file:a,onDelete:l,disabled:n,isUploading:r,uploadProgress:i}=e;return(0,s.jsxs)(J.Zb,{className:(0,_.Z)("relative w-full rounded-[16px] p-[16px] hover:bg-secondary/80",t),children:[(0,s.jsxs)("div",{className:"flex items-center gap-[16px]",children:[(0,s.jsx)(q.Z,{className:"block",width:40,height:40}),(0,s.jsx)("a",{href:a.fileUrl||"#",target:"_blank",rel:"noreferrer",className:"flex-1 truncate text-sm hover:underline",children:a.fileName}),!n&&(0,s.jsx)("div",{className:"flex items-center",children:r?(0,s.jsx)(H.Z,{width:24,height:24,className:"animate-spin",color:"#898788"}):(0,s.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),l()},children:(0,s.jsx)(y.Z,{width:24,height:24})})})]}),r&&(0,s.jsx)(Y.E,{value:i,className:"mt-[8px] h-[5px]"})]})};var te=e=>{let{className:t,fileClassName:a,disabled:l=!1,type:n,value:r,multiple:i=!1,maxFiles:o=10,maxFileSize:c=2,acceptedFileTypes:d=["application/pdf"],onUpload:u,onDelete:m,innerRef:p}=e;const{uploadFile:x,uploadProgress:h,isPending:g}=$({}),f=async e=>{const t=i&&Array.isArray(r)?r.length:r?1:0;if(i&&e.length+t>o)return void(0,Z.cB)("Maximum ".concat(o," files allowed."));const a=1024*c*1024;if(N().some(e,(e=>e.size>=a)))return void(0,Z.cB)("File is too large (max ".concat(c,"MB)."));const s=(0,Z.QD)("Uploading file...");try{const t=await Promise.all(e.map((async e=>{const t=await x({file:e,type:n});return{fileName:e.name,fileUrl:t,mimeType:e.type}})));if(i){const e=Array.isArray(r)?r:[];u([...e,...t])}else u(t[0]);(0,Z.ZB)(s)}
2catch(e){(0,Z.cB)("Failed to upload file")}},b=i?Array.isArray(r)&&r.length>0:!!r;return!i&&b?(0,s.jsx)(ee,{file:r,fileClassName:a,isUploading:g,uploadProgress:h,onDelete:()=>m(),disabled:l}):(0,s.jsxs)("div",{className:(0,_.Z)("flex flex-col gap-2",t),children:[i&&b&&(0,s.jsx)("div",{className:"flex flex-col gap-2",children:r.map(((e,t)=>(0,s.jsx)(ee,{fileClassName:a,file:e,onDelete:()=>m(t),disabled:l},t)))}),(!b||i&&Array.isArray(r)&&r.length<o)&&(0,s.jsxs)(W.r,{onDrop:async e=>{let{items:t}=e;const a=N().filter(t,{kind:"file"}),s=await Promise.all(a.map((e=>e.getFile())));s.length&&f(i?s:[null==s?void 0:s[0]])},className:(0,_.Z)("relative flex flex-row justify-center gap-[16px] overflow-hidden rounded-[24px] border border-dashed border-border bg-background px-[24px] py-[12px]",{"justify-start rounded-none border-0 p-0":l},t),isDisabled:l,children:[(0,s.jsx)("div",{className:"relative flex aspect-[59/64] w-[59px] items-center",children:(0,s.jsx)("img",{className:"w-full object-contain",src:"/images/custom-website/upload-icon.png"})}),!l&&(0,s.jsxs)("div",{className:"relative flex-1 space-y-[8px]",children:[(0,s.jsxs)("p",{className:"text-[12px]",children:["Drag ",i?"files":"file"," or upload from device"]}),(0,s.jsxs)("p",{className:"text-[10px] leading-tight text-muted-foreground",children:[(0,s.jsxs)("span",{children:["Supported formats: ",d.map((e=>{var t;return null===(t=e.split("/")[1])||void 0===t?void 0:t.toUpperCase()})).join(", "),". Max:"," ",c,"MB."]}),(0,s.jsx)("br",{}),i&&(0,s.jsxs)("span",{children:["Up to ",o," ",G()("file",o)," can be uploaded."]})]}),(0,s.jsx)(z.I,{allowsMultiple:i,acceptedFileTypes:d,onSelect:e=>{const t=Array.from(e);f(i?t:[null==t?void 0:t[0]])},children:(0,s.jsx)(B.z,{ref:p,isDisabled:g,children:(0,s.jsx)(X.z,{type:"button",variant:"outline",size:"xs",loading:g,children:"Upload file"})})})]})]})]})};const ae=e=>{let{name:t,label:a,helperLabel:l,description:n,labelProps:r={},helperLabelProps:i={},uploadFileProps:o={},descriptionProps:c={}}=e;const{className:d,...u}=r,{className:m,...p}=i,{control:x}=(0,w.Gc)();return(0,s.jsx)(O.Wi,{control:x,name:t,render:e=>{let{field:t}=e;return(0,s.jsxs)(O.xJ,{children:[a&&(0,s.jsx)(O.lX,{className:(0,_.Z)("text-xs font-bold tracking-[0.6px] text-black/[.5]",d),...u,children:a}),a&&l&&(0,s.jsx)(O.lX,{className:(0,_.Z)("ml-1 text-xs font-normal tracking-[0.6px] text-black/[.5]",m),...p,children:l}),(0,s.jsx)(te,{className:"mt-[8px]",...o,value:t.value,onUpload:e=>t.onChange(e),onDelete:e=>{if(o.multiple&&Array.isArray(t.value)){const a=[...t.value];a.splice(e,1),t.onChange(a)}else t.onChange(null)},innerRef:t.ref}),n&&(0,s.jsx)(O.pf,{...c,children:n}),(0,s.jsx)(O.zG,{})]})}})};ae.propTypes={name:L().string.isRequired,label:L().string,labelProps:L().object,uploadFileProps:L().object};var se=ae;const le=I.Ry({fullName:I.Z_().required().label("Artist"),profilePicture:I.Z_().required().label("Profile picture"),profileBanner:I.Z_().nullable().optional().label("Profile banner"),biography:I.Z_().nullable().optional().label("Biography"),cv:I.Ry({fileName:I.Z_().label("File name"),fileUrl:I.Z_().label("File URL"),mimeType:I.Z_().label("File type")}).nullable().optional().default(null).test("isValidCv","CV is incomplete",(e=>!e||!!(e.fileName&&e.fileUrl&&e.mimeType))).label("CV"),averageSalePrice:I.Rx().nullable().optional().label("Average sale price"),noOfCollectors:I.Rx().nullable().optional().label("# of collectors"),noOfIgFollowers:I.Rx().nullable().optional().label("# of Instagram followers"),noOfTwitterFollowers:I.Rx().nullable().optional().label("# of Twitter followers"),noOfTiktokFollowers:I.Rx().nullable().optional().label("# of TikTok followers"),website:I.Z_().nullable().optional().label("Website URL"),instagram:I.Z_().nullable().optional().label("Instagram"),twitter:I.Z_().nullable().optional().label("Twitter"),tiktok:I.Z_().nullable().optional().label("TikTok")});var ne=e=>{let{className:t,disabled:a,onSubmit:l}=e;return(0,s.jsxs)("form",{className:(0,_.Z)("space-y-4",t),onSubmit:l,children:[(0,s.jsx)(R.Z,{label:"Artist full name",labelProps:{required:!0},name:"fullName",inputProps:{placeholder:"Blake Cameron",disabled:a}}),(0,s.jsx)(S.Z,{name:"profilePicture",label:"Profile picture",labelProps:{required:!0},uploadImageProps:{disabled:a}}),(0,s.jsx)(S.Z,{name:"profileBanner",label:"Profile banner",labelProps:{tooltip:"This image will be used as a header image for this artist in your website for theme that supports header image for artist page"},uploadImageProps:{disabled:a}}),(0,s.jsx)(D.Z,{label:"Artist bio",name:"biography",inputProps:{placeholder:"Enter artist bio",disabled:a,rows:5}}),(0,s.jsx)(se,{name:"cv",label:"Artist CV",uploadFileProps:{type:E.D.MANUA
2L_ARTIST_CV,multiple:!1,maxFileSize:20,acceptedFileTypes:["application/pdf"]}}),(0,s.jsx)(F.Z,{label:"Average artwork price",name:"averageSalePrice",disabled:a,inputProps:{placeholder:"$5,000"}}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsx)(F.Z,{type:"number",label:"# of collectors",name:"noOfCollectors",disabled:a,inputProps:{placeholder:10}}),(0,s.jsx)(F.Z,{type:"number",label:"# of Instagram followers",name:"noOfIgFollowers",disabled:a,inputProps:{placeholder:256}}),(0,s.jsx)(F.Z,{type:"number",label:"# of Twitter followers",name:"noOfTwitterFollowers",disabled:a,inputProps:{placeholder:120}}),(0,s.jsx)(F.Z,{type:"number",label:"# of TikTok followers",name:"noOfTiktokFollowers",disabled:a,inputProps:{placeholder:512}})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsx)(R.Z,{label:"Website URL",name:"website",inputProps:{placeholder:"https://www.blakecameron.com",disabled:a,type:"url"}}),(0,s.jsx)(R.Z,{label:"Instagram",name:"instagram",inputProps:{placeholder:"https://www.instagram.com/blakecameron",disabled:a,type:"url"}}),(0,s.jsx)(R.Z,{label:"Twitter",name:"twitter",inputProps:{placeholder:"https://www.twitter.com/blakecameron",disabled:a,type:"url"}}),(0,s.jsx)(R.Z,{label:"TikTok",name:"tiktok",inputProps:{placeholder:"https://www.tiktok.com/@blakecameron",disabled:a,type:"url"}})]})]})}
2,re=a(951835),ie=a(732853),oe=a(574257),ce=a(208502);var de=e=>{let{modalState:t,onCreate:a}=e;const l=(0,w.cI)({defaultValues:{},resolver:(0,k.X)(le)}),{handleSubmit:n}=l,{createManagedArtist:r,isPending:i}=M(),o=n((async e=>{(0,ce.L9)({action:"send_manage_artist_request",params:{artist_name:e.fullName,artist_status:"not_on_cohart"}});try{await r({managedArtist:{...e,userId:null}}),null==a||a(),t.close()}catch(e){}}));return(0,s.jsx)(ie.default,{blurBackdrop:!0,...t,onClose:t.close,children:(0,s.jsxs)("div",{className:"flex w-[80vw] flex-col rounded-[32px] bg-white py-10 text-[#191414] lg:w-[50vw]",children:[(0,s.jsx)("div",{className:"flex w-full items-center justify-end px-6",children:(0,s.jsx)("button",{onClick:t.close,children:(0,s.jsx)(y.Z,{className:"size-6"})})}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("h2",{className:"px-6 text-center text-[24px] font-medium",children:"Create artist profile"}),(0,s.jsx)("div",{className:"mt-4 h-[min(640px,60vh)] overflow-hidden",children:(0,s.jsx)(A.Z,{className:"h-full p-6 pt-0",children:(0,s.jsx)(w.RV,{...l,children:(0,s.jsx)(ne,{onSubmit:e=>{e.preventDefault(),e.stopPropagation()}})})})}),(0,s.jsxs)("div",{className:"flex-center mt-6 gap-[15px] px-6",children:[(0,s.jsx)(X.z,{variant:"outline",onClick:()=>t.close(),disabled:i,children:"Close"}),(0,s.jsx)(oe.Z,{perm:re.Gd.ArtistManagement.CREATE_MANAGED_ARTIST,disabled:i,loading:i,onClick:()=>o(),subscribeModalProps:{eventTrackingPage:"artist_management"},children:"Create"})]})]})]})})};const ue=async e=>{let{managedArtistId:t,dataToUpdate:a}=e;try{await C.Z.updateManagedArtist({managedArtistId:t,dataToUpdate:a}),(0,Z.t5)("Artist updated!")}catch(e){var s;throw(0,Z.cB)(null!==(s=e.message)&&void 0!==s?s:"Failed to update artist."),e}};var me=e=>{const t=(0,P.D)({mutationFn:ue,...e});return{updateManagedArtist:async e=>{let{managedArtistId:a,dataToUpdate:s}=e;await t.mutateAsync({managedArtistId:a,dataToUpdate:s})},...t}};var pe=e=>{let{modalState:t,managedArtist:a,onUpdate:l}=e;var n;const r=(0,w.cI)({defaultValues:{...N().pick(a,Object.keys(le.fields)),fullName:a.fullName||(null===(n=a.user)||void 0===n?void 0:n.fullName)},resolver:(0,k.X)(le)}),{handleSubmit:i}=r,{updateManagedArtist:o,isPending:c}=me(),d=i((async e=>{try{await o({managedArtistId:a.id,dataToUpdate:{...e}}),null==l||l(),t.close()}catch(e){}}));return(0,s.jsx)(ie.default,{blurBackdrop:!0,...t,onClose:t.close,children:(0,s.jsxs)("div",{className:"flex w-[80vw] flex-col rounded-[32px] bg-white py-10 text-[#191414] lg:w-[50vw]",children:[(0,s.jsx)("div",{className:"flex w-full items-center justify-end px-6",children:(0,s.jsx)("button",{onClick:t.close,children:(0,s.jsx)(y.Z,{className:"size-6"})})}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("h2",{className:"px-6 text-center text-[24px] font-medium",children:"Update artist"}),(0,s.jsx)("div",{className:"mt-4 h-[min(640px,60vh)] overflow-hidden",children:(0,s.jsx)(A.Z,{className:"h-full p-6 pt-0",children:(0,s.jsx)(w.RV,{...r,children:(0,s.jsx)(ne,{managedArtist:a,onSubmit:e=>{e.preventDefault(),e.stopPropagation()}})})})}),(0,s.jsxs)("div",{className:"flex-center mt-6 gap-[15px] px-6",children:[(0,s.jsx)(X.z,{variant:"outline",onClick:()=>t.close(),disabled:c,children:"Close"}),(0,s.jsx)(oe.Z,{perm:re.Gd.ArtistManagement.UPDATE_MANAGED_ARTIST,disabled:c,loading:c,onClick:()=>d(),subscribeModalProps:{eventTrackingPage:"artist_management"},children:"Update"})]})]})]})})};var xe=(0,a(452767).pL)({queryKey:["getManagedArtists"],queryFn:e=>C.Z.getManagedArtists(e)});const he=async e=>{let{artistId:t}=e;try{await C.Z.sendManageArtistRequest({artistId:t}),(0,Z.t5)("Request sent!")}catch(e){var a;(0,Z.cB)(null!==(a=e.message)&&void 0!==a?a:"Failed to send request.")}};var ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,P.D)({mutationFn:he,...e});return{sendManageArtistRequest:async e=>{let{artistId:a}=e;await t.mutateAsync({artistId:a})},...t}};const fe=async e=>{let{requestId:t}=e;try{await C.Z.cancelManageArtistRequest({requestId:t}),(0,Z.t5)("Request cancelled!")}catch(e){var a;(0,Z.cB)(null!==(a=e.message)&&void 0!==a?a:"Failed to cancel request.")}};var be=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,P.D)({mutationFn:fe,...e});return{cancelManageArtistRequest:async e=>{let{requestId:a}=e;await t.mutateAsync({requestId:a})},...t}},ve=a(899294),je=a(723028),Ne=a(803911),ye=a(195554),we=a(974196),ke=a(748874),Ae=a(932361),Pe=a(285661),Ze
2=a(171721),Ce=a(278212),Te=a(462205),Me=a(330128),Ie=a(185862),_e=a(994192),Ee=a(449138),Se=a(650846),Re=a(983464),De=a(276166),Fe=a(502035);const Ue=f()((()=>a.e(70735).then(a.bind(a,170735))),{loadableGenerated:{webpack:()=>[170735]}}),Le=f()((()=>a.e(96333).then(a.bind(a,996333))),{loadableGenerated:{webpack:()=>[996333]}}),Oe=e=>{const{artist:t,onSelectToInvite:a,onSelectToEdit:l,onSelectToDelete:n,refetchListArtists:r}=e,{id:m,profilePicture:g,fullName:f,numberOfArtworks:b,numberOfCollectors:j,averageArtworkPrice:N,createdAt:y,userId:w,user:k,latestIncomingManageArtistRequest:A,declinedRequestCount:P,isHiddenOnProfile:Z}=t,{sendManageArtistRequest:C,isPending:T}=ge({onSuccess:()=>r()}),{cancelManageArtistRequest:M,isPending:I}=be({onSuccess:()=>r()}),{updateManagedArtist:_,isPending:E}=me({onSuccess:()=>r()}),S=(0,Se.eW)(y,5,"minute"),R=(0,i.useCallback)((e=>{e.stopPropagation(),l(m)}),[l,m]),D=(0,i.useCallback)((e=>{e.stopPropagation(),n(m)}),[n,m]),F=(0,i.useCallback)((e=>{e.stopPropagation(),a(m)}),[a,m]),U=N?(0,Re.fM)(Number(N)):"-",L=j||"-";var O,z;return(0,s.jsxs)("div",{className:"relative cursor-pointer",role:"button",onClick:R,children:[(0,s.jsxs)("div",{className:"w-full overflow-hidden rounded-[8px] p-4 shadow outline outline-1 outline-black/10 hover:shadow-lg",children:[(0,s.jsxs)("div",{className:"inline-flex w-full items-center justify-between gap-2 pb-2",children:[(0,s.jsxs)("div",{className:"inline-flex flex-1 items-center gap-2",children:[(0,s.jsx)(Ze.Z,{className:"h-[24px] w-[24px]",src:null!==(z=null!==(O=null!=g?g:null==k?void 0:k.coverImageSmall)&&void 0!==O?O:null==k?void 0:k.coverImage)&&void 0!==z?z:"/images/shared/user.webp",sizes:"(max-width: 768px) 30vw, 10vw"}),(0,s.jsx)(Ce.Z,{user:{...k,fullName:f||(null==k?void 0:k.fullName)},size:"sm",maxNameLength:60}),(0,s.jsx)(Fe.Z,{artist:t})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[Z&&(0,s.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:[(0,s.jsx)(o.Z,{className:"relative top-[-1px] inline size-[14px]"})," HIDDEN IN PROFILE"]}),w&&(!A||A.status===ve.ZP.CANCELLED)&&(0,s.jsxs)(oe.Z,{variant:"outline",size:"sm",className:"!border-primary !text-primary",perm:re.Gd.ArtistManagement.CREATE_MANAGED_ARTIST,loading:T,onClick:e=>{e.stopPropagation(),e.preventDefault(),C({artistId:w})},subscribeModalProps:{eventTrackingPage:"artist_management"},children:[(0,s.jsx)(p,{className:"size-[22px]"})," Send request to manage"]}),(null==A?void 0:A.status)===ve.ZP.PENDING&&(0,s.jsxs)(X.z,{variant:"outline",size:"sm",className:"!border-destructive !text-destructive",loading:I,disabled:I,onClick:e=>{e.stopPropagation(),e.preventDefault(),M({requestId:A.id})},children:[(0,s.jsx)(x.Z,{className:"size-[22px]"})," Cancel request to manage"]}),(null==A?void 0:A.status)===ve.ZP.DECLINED&&P<=10&&(0,s.jsxs)(oe.Z,{variant:"outline",size:"sm",className:"!border-warning !text-warning",perm:re.Gd.ArtistManagement.CREATE_MANAGED_ARTIST,loading:T,onClick:e=>{e.stopPropagation(),e.preventDefault(),C({artistId:w})},subscribeModalProps:{eventTrackingPage:"artist_management"},children:[(0,s.jsx)(h.Z,{className:"size-[22px]"})," Resend request to manage"]}),(0,s.jsx)("button",{onClick:R,children:(0,s.jsx)(Ie.Z,{className:"h-[14px] w-[14px]"})}),!w&&(0,s.jsx)("button",{onClick:F,children:(0,s.jsx)(c.Z,{className:"h-4 w-4"})}),!Z&&(0,s.jsx)(Ne.pn,{children:(0,s.jsxs)(Ne.u,{children:[(0,s.jsx)(Ne.aJ,{asChild:!0,children:(0,s.jsx)(oe.Z,{variant:"ghost",className:"p-0 hover:bg-transparent",perm:re.Gd.ArtistManagement.HIDE_MANAGED_ARTIST,loading:E,onClick:async e=>{e.stopPropagation(),await _({managedArtistId:t.id,dataToUpdate:{
2isHiddenOnProfile:!0}})},children:(0,s.jsx)(o.Z,{className:"h-4 w-4"})})}),(0,s.jsx)(Ne._v,{side:"top",children:(0,s.jsx)(ye.x,{className:"text-xs font-medium",children:"Hide artist on profile."})})]})}),Z&&(0,s.jsx)(Ne.pn,{children:(0,s.jsxs)(Ne.u,{children:[(0,s.jsx)(Ne.aJ,{asChild:!0,children:(0,s.jsx)(oe.Z,{variant:"ghost",className:"p-0 hover:bg-transparent",perm:re.Gd.ArtistManagement.UNHIDE_MANAGED_ARTIST,loading:E,onClick:async e=>{e.stopPropagation(),await _({managedArtistId:t.id,dataToUpdate:{isHiddenOnProfile:!1}})},children:(0,s.jsx)(d.Z,{className:"h-4 w-4"})})}),(0,s.jsx)(Ne._v,{side:"top",children:(0,s.jsx)(ye.x,{className:"text-xs font-medium",children:"Show artist on profile."})})]})}),(0,s.jsx)(oe.Z,{variant:"ghost",className:"p-0 hover:bg-transparent",perm:re.Gd.ArtistManagement.DELETE_MANAGED_ARTIST,onClick:D,children:(0,s.jsx)(u.Z,{className:"h-4 w-4"})})]})]}),(0,s.jsxs)("div",{className:"grid w-full grid-cols-[100px_1fr] items-start gap-x-1 gap-y-2 lg:grid-cols-4 lg:items-center lg:gap-x-2 lg:gap-y-0",children:[(0,s.jsx)("div",{className:"text-[10px] font-semibold text-black/60",children:"Average artwork price"}),(0,s.jsx)("p",{className:"text-[12px] text-black",children:U}),(0,s.jsx)("div",{className:"text-[10px] font-semibold text-black/60",children:"# of artworks"}),w&&A!==ve.ZP.ACCEPTED?(0,s.jsx)("p",{className:"text-[12px] text-black",children:"-"}):(0,s.jsx)(v(),{href:w?(0,ke.Gn)(je.Z6.USER_DASHBOARD.INVENTORY.ARTIST_DETAIL_BY_ID,{artistId:w}):(0,ke.Gn)(je.Z6.USER_DASHBOARD.INVENTORY.ARTIST_DETAIL_BY_NAME,{artistName:f}),target:"_blank",className:"inline-flex text-[12px] text-primary hover:underline",onClick:e=>e.stopPropagation(),children:(0,Ae.uf)(b)}),(0,s.jsx)("div",{className:"text-[10px] font-semibold text-black/60",children:"# of buyers"}),(0,s.jsx)("p",{className:"text-[12px] text-black",children:L})]})]}),S&&(0,s.jsx)("div",{className:"absolute -left-2 -top-2 rounded-[8px] bg-primary p-1 text-[10px] uppercase text-white",children:"New"})]})};var ze=()=>{const[e,t]=(0,i.useState)(""),{data:a,page:l,pageSize:n,total:r=0,isFetching:o,refetch:c,fetchPage:d}=xe({defaultPageSize:6,queryParams:{query:{name:e}}}),u=(0,i.useCallback)(N().debounce((()=>d(1)),400),[]);var p;const{list:x=[]}=null!==(p=null==a?void 0:a.data)&&void 0!==p?p:{},{show:h}=(0,Pe.ZP)(de),g=()=>{(0,ce.L9)({action:"click_manage_artist_request"}),h({onCreate:()=>c()})},{show:f}=(0,Pe.ZP)(pe),[b,v]=(0,i.useState)(null),[j,y]=(0,i.useState)(null),w=(0,i.useCallback)((e=>{const t=x.find((t=>t.id===e));v(t||null)}),[x]),k=(0,i.useCallback)((e=>{const t=x.find((t=>t.id===e));y(t||null)}),[x]),A=(0,i.useCallback)((()=>{v(null)}),[]),P=(0,i.useCallback)((()=>{y(null)}),[]),{mutate:C}=(0,Ee.Z)(De.Z,{onSuccess:()=>{(0,Z.t5)("Invitation sent successfully"),P(),c()},onError:Z.cB}),T=(0,i.useCallback)((async(e,t)=>{(0,ce.L9)({action:"invite_artist_to_join",params:{invite_source:"manage_artist_request"}}),await C({firstName:(null==t?void 0:t.firstName)||"",lastName:(null==t?void 0:t.lastName)||"",email:(null==t?void 0:t.email)||"",message:null==t?void 0:t.message,manualArtistId:null==j?void 0:j.id})}),[C,j]);return(0,s.jsxs)("div",{className:"w-full space-y-4",children:[(0,s.jsx)("div",{className:"w-full",children:(0,s.jsxs)("div",{className:"inline-flex w-full items-center justify-between",children:[(0,s.jsx)("h2",{className:"text-[16px] font-semibold lg:text-[24px]",children:"Artists Management"}),!o&&x.length>0&&(0,s.jsxs)("button",{className:"inline-flex w-fit items-center gap-1 rounded-full text-[12px] font-semibold text-primary outline-0 outline-primary lg:px-4 lg:py-2 lg:outline lg:outline-1",onClick:()=>g(),children:[(0,s.jsx)(m.Z,{className:"h-6 w-6"}),(0,s.jsx)("span",{className:"hidden text-[12px] font-semibold lg:block",children:"Add artist"})]})]})}),(0,s.jsx)("div",{className:"w-full max-w-[510px]",children:(0,s.jsx)(Te.Z,{placeholder:"Search by artist name or email or username",defaultValue:e,onChange:e=>{t(e),u()}})}),o&&(0,s.jsx)("div",{className:"flex w-full items-center justify-center py-20",children:(0,s.jsx)(_e.Z,{className:"!h-[24px] !w-[24px]"})}),!o&&0===x.length&&(0,s.jsx)("div",{className:"flex w-full items-center justify-center rounded-[24px] border border-black/10 py-20",children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,s.jsx)("h4",{className:"text-lg font-medium",children:"No artist available"}),(0,s.jsx)("p",{className:"mb-2 text-xs font-medium text-black/40",children:"Request to manage an artist"}),(0,s.jsxs)("button",{className:"inline-flex w-fit items-center gap-1 rounded-full px-4 py-2 text-xs font-semibold text-primary outline outline-1 outline-primary",onClick:()=>g(),children:[(0,s.jsx)(m.Z,{className:"h-6 w-6"}),(0,s.jsx)("span",{className:"text-[12px] font-semibold",children:"Add artist"})]})]})}),!o&&x.length>0&&(0,s.jsx)("div",{className:"flex w-full flex-col gap-4",children:x.map((e=>(0,s.jsx)(Oe,{artist:e,onSelectToInvite:k,onSelectToEdit:()=>f({managedArtist:e,onUpdate:()=>c()}),onSelectToDelete:w,refetchListArtists:c},e.id)))}),(0,s.jsx)("div",{className:"w-full pb-2 pt-4",children:(0,s.jsx)(Me.Z,{totalPage:Math.ceil(r/n),pageIndex:l-1,onPageChange:e=>d(e+1)})}),b&&(0,s.jsx)(Ue,{artist:b,onClose:A,onArtistDeleted:c}),j&&(0,s.jsx)(Le,{invitedRole:"artist",defaultValue:{firstName:(0,we.Z)(j.fullName).firstName,lastName:(0,we.Z)(j.fullName).lastName,email:j.email},customExistedUserMessage:"The email you entered is already linked to a Cohart account. You can go back to enter a different email.",onClose:P,onSubmitInviteUserForm:T})]})};var Be=(0,r.Z)((()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.Z,{title:"Artist Management | Cohart"}),(0,s.jsx)(n.Z,{}),(0,s.jsx)("div",{className:"relative space-y-8 bg-[#F9F9F9] p-4 !pt-24",children:(0,s.jsx)("div",{className:"w-full overflow-hidden rounded-[30px] bg-white p-4 outline outline-1 outline-black/10 lg:p-6",children:(0,s.jsx)(ze,{})})})]})))},434380:function(e,t,a){"use strict";var s=a(757632),l=a(970004),n=a(983464);t.Z=async function(e){const{contentFor:t,contentType:a}=e,r=await(0,n.Dt)(l.x.post)("/v2/me/pre-signed-url",{fileName:"".concat(a.replace("/","-".concat((0,s.Z)(),"."))),contentType:a,contentFor:t}),{data:i}=r.data;return i}},936611:function(e,t,a){"use strict";var s=a(434380),l=a(409669),n=a.n(l);a(273141);t.Z=async function(e,t,a){try{let l=3;for(;l;)try{const l=await(0,s.Z)({contentType:e.type,contentFor:t});await n().put(l,e,{headers:{"Content-Type":e.type},...a});
2const r=new URL(l);return r.origin+r.pathname}catch(t){l--,console.error("Failed to upload file: ".concat(e.name,". Retries left: ").concat(l))}}catch(e){throw console.error(e),"Cannot upload files"}}},273141:function(e,t,a){"use strict";var s=a(757632),l=a(970004),n=a(983464);t.Z=async function(e){const{contentFor:t,contentType:a}=e,r=await(0,n.Dt)(l.x.post)("/v2/public/pre-signed-url",{fileName:"".concat(a.replace("/","-".concat((0,s.Z)(),"."))),contentType:a,contentFor:t}),{data:i}=r.data;return i}},424720:function(e,t,a){"use strict";var s=a(785893),l=a(496486),n=a.n(l),r=a(490512),i=a(667294),o=a(935556),c=a(409659),d=a(31415),u=a(678680),m=a(636316),p=a(923450),x=a.n(p),h=a(936611),g=a(136887),f=a(885345),b=a(585721),v=a(609852);const j=e=>{let{className:t,imageClassName:a,imageSrc:l,deleteButtonHidden:n,onDelete:i,disabled:o}=e;return(0,s.jsxs)("div",{className:(0,r.Z)("relative flex aspect-[143/100] h-[100px] items-center overflow-hidden rounded-[8px] border border-border bg-background ","bg-[url(/images/custom-website/transparent-background.jpg)] bg-cover",t),children:[(0,s.jsx)("img",{className:(0,r.Z)("w-full object-contain",a),src:l}),!o&&!n&&(0,s.jsx)("div",{className:"flex-center absolute right-[7px] top-[13px] size-[24px] cursor-pointer overflow-hidden rounded-full bg-white",onClick:e=>{e.stopPropagation(),e.preventDefault(),i()},children:(0,s.jsx)(d.Z,{className:"size-[20px] text-foreground"})})]})};t.Z=e=>{let{className:t,imageClassName:a,disabled:l=!1,currentImage:d,multiple:p=!1,maxImages:N=10,maxFileSize:y=2,description:w,onUpload:k,onDelete:A,innerRef:P}=e;const[Z,C]=(0,i.useState)(!1),T=async e=>{const t=1024*y*1024;var a;if(n().some(e,(e=>e.size>=t)))(0,f.cB)("File is too large (max ".concat(y,"MB)."));else if(p&&e.length+(null!==(a=null==d?void 0:d.length)&&void 0!==a?a:0)>N)(0,f.cB)("Maximum ".concat(N," images allowed."));else{try{C(!0);const t=(0,f.QD)("Uploading image..."),a=await Promise.all(e.map((e=>(0,h.Z)(e,g.D.CUSTOM_WEBSITE))));k(p?a:a[0]),(0,f.ZB)(t)}catch(e){(0,f.cB)("Failed to upload image")}C(!1)}};return p&&(null==d?void 0:d.length)>0?(0,s.jsxs)("div",{className:(0,r.Z)(t,"flex flex-wrap gap-2"),children:[d.map(((e,t)=>(0,s.jsx)(j,{imageClassName:a,imageSrc:null==e?void 0:e.image,onDelete:()=>A(t),disabled:l||Z},t))),(null==d?void 0:d.length)<N&&(0,s.jsx)(o.I,{allowsMultiple:!0,acceptedFileTypes:["image/png","image/jpg","image/jpeg"],onSelect:e=>{const t=Array.from(e);T(t)},children:(0,s.jsxs)(c.z,{className:"flex min-w-[40px] max-w-[143px] flex-1 items-center justify-center overflow-hidden rounded-[8px] border border-border !p-0",isDisabled:Z,children:[Z&&(0,s.jsx)(m.Z,{className:"size-[26px] animate-spin"}),!Z&&(0,s.jsx)(u.Z,{className:"size-[26px]"})]})})]}):!p&&d?(0,s.jsx)("div",{className:t,children:(0,s.jsx)(j,{imageClassName:a,imageSrc:d,onDelete:A,disabled:l})}):(0,s.jsxs)(b.r,{onDrop:async e=>{let{items:t}=e;const a=n().filter(t,{kind:"file"}),s=await Promise.all(a.map((e=>e.getFile())));s.length&&T(p?s:[null==s?void 0:s[0]])},className:(0,r.Z)("relative flex flex-row justify-center gap-[16px] overflow-hidden rounded-[24px] border border-dashed border-border bg-background px-[24px] py-[12px]",{"justify-start rounded-none border-0 p-0":l},t),isDisabled:l,children:[(0,s.jsx)("div",{className:"relative flex aspect-[59/64] w-[59px] items-center",children:(0,s.jsx)("img",{className:"w-full object-contain",src:"/images/custom-website/upload-icon.png"})}),!l&&(0,s.jsxs)("div",{className:"relative flex-1 space-y-[8px]",children:[(0,s.jsx)("p",{className:"text-[12px]",children:"Drag image or upload from device"}),w?(0,s.jsx)("p",{className:"text-[10px] leading-tight text-muted-foreground",children:w}):(0,s.jsxs)("p",{className:"text-[10px] leading-tight text-muted-foreground",children:[(0,s.jsxs)("span",{children:["Supported formats: PNG, JPG. Max: ",y,"MB."]}),(0,s.jsx)("br",{}),!p&&(0,s.jsx)("span",{children:"A high-resolution image is recommended."}),p&&(0,s.jsxs)("span",{children:["Up to ",N," ",x()("image",N)," can be uploaded."]})]}),(0,s.jsx)(o.I,{allowsMultiple:p,acceptedFileTypes:["image/png","image/jpg","image/jpeg"],onSelect:e=>{const t=Array.from(e);T(p?t:[null==t?void 0:t[0]])},children:(0,s.jsx)(c.z,{ref:P,isDisabled:Z,children:(0,s.jsx)(v.z,{type:"button",variant:"outline",size:"xs",loading:Z,children:"Upload file"})})})]})]})}},574257:function(e,t,a){"use strict";var s=a(785893),l=a(667294),n=a(490512),r=a(496486),i=a.n(r),o=a(456186),c=a(951835),d=a(619538),u=a(803911),m=a(609852),p=a(285661),x=a(524430);const h=e=>
2{const{perm:t,optionLimit:a,usageLimits:r,onShowSubscribePlanModal:h,onPurchase:g,purchaseLabel:f="Subscribe to add more",additionalTooltipContent:b,subscribeModalProps:v,children:j,className:N,loading:y,disabled:w,onClick:k,...A}=e,{isFetchingUsageSummary:P,currentUserSubscriptionPlan:Z,currentUserUsageSummary:C,hasPerm:T,isOptionAllowed:M,hasCurrentUserReachedUsageLimit:I,getCurrentUserMinimumRequiredPlanByUsageLimit:_}=(0,c.FU)(),{name:E}=(0,d.nu)(Z),[S,R]=(0,l.useState)(!1),D=(0,l.useMemo)((()=>!(!t||T(t))),[T,t]),F=(0,l.useMemo)((()=>t?(0,c.Qn)(t):null),[t]),U=(0,l.useMemo)((()=>!(!a||M(a.key,a.value))),[M,a]),L=(0,l.useMemo)((()=>a?(0,c.d)(a.key,a.value):null),[a]),O=(0,l.useMemo)((()=>!!(null==r?void 0:r.some((e=>I(e))))),[r,I]),z=(0,l.useMemo)((()=>null==r?void 0:r.map((e=>_(e)))),[r,_]),B=D||U||O,q=(0,l.useMemo)((()=>D?F:U?L:i().maxBy(z,(e=>(0,d.Ry)(e)))),[D,F,U,L,z]),{name:H}=(0,l.useMemo)((()=>(0,d.nu)(q)),[q]),V=(0,l.useMemo)((()=>q===d.lm?"":" or higher"),[q]),G=(0,l.useMemo)((()=>!!(P&&r&&r.length>0)||!!y),[P,r,y]),W=(0,l.useMemo)((()=>G||w),[G,w]),X=(e,t)=>{if(!O||!r)return null;const a=(0,c.Qf)({usageLimits:r,usageSummary:C,limitedTemplate:e,notSupportedTemplate:t});return(null==a?void 0:a.length)?a.map(((e,t)=>(0,s.jsxs)("span",{children:[t>0&&(0,s.jsx)("br",{}),e]},t))):null},{show:Y}=(0,p.ZP)(x.Z),J=(0,l.useCallback)((e=>{B?(e.preventDefault(),e.stopPropagation(),null==h||h(),R(!1),q?Y({...v,activePlan:q,visiblePlans:(0,d.OQ)(q)}):null==g||g()):null==k||k(e)}),[B,k,h,q,Y,v,g]);return(0,s.jsx)(u.pn,{children:(0,s.jsxs)(u.u,{open:S,onOpenChange:e=>R(e),children:[(0,s.jsx)(u.aJ,{asChild:!0,children:(0,s.jsxs)(m.z,{type:"button",loading:G,disabled:W,"aria-disabled":B,onClick:J,className:(0,n.Z)({"!pointer-events-auto opacity-50":B},N),...A,children:[B&&(0,s.jsx)(o.Z,{className:"h-3 w-3"}),j]})}),B&&!G&&(0,s.jsx)(u.NM,{container:"undefined"!=typeof document?document.body:void 0,children:(0,s.jsxs)(u._v,{className:"max-w-[200px] whitespace-normal lg:max-w-[500px]",side:"top",sideOffset:-5,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:[q&&(0,s.jsxs)("p",{className:"text-base font-normal",children:["To proceed, you need to subscribe to the"," ",(0,s.jsxs)("span",{className:"cursor-pointer font-semibold text-primary hover:underline",onClick:()=>{null==h||h(),R(!1),Y({...v,activePlan:q,visiblePlans:(0,d.OQ)(q)})},children:[H," Plan"]}),V,".",!D&&!U&&O&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("br",{}),X((e=>"Your current ".concat(E||""," plan allows only ").concat(e,".")),(e=>"Your current ".concat(E||""," plan does not support ").concat(e,".")))]}),b]}),!q&&O&&(0,s.jsx)("p",{className:"text-base font-normal",children:g?(0,s.jsxs)(s.Fragment,{children:[X((e=>"You have reached the maximum limit of ".concat(e," for this feature.")),(e=>"You don't have any ".concat(e," available.")))," ",(0,s.jsx)("span",{className:"cursor-pointer font-semibold text-primary hover:underline",onClick:()=>{null==h||h(),R(!1),g()},children:f}),".",b]}):(0,s.jsxs)(s.Fragment,{children:[X((e=>"You have reached the maximum limit of ".concat(e," for this feature.")),(e=>"".concat(i().startCase(e)," is currently not supported."))),b]})}),!q&&!O&&(0,s.jsxs)("p",{className:"text-base font-normal",children:["This feature is currently not available for your current plan. ",b]})]})})]})})};t.Z=(0,l.memo)(h)},585721:function(e,t,a){"use strict";a.d(t,{r:function(){return i}});var s=a(785893),l=(a(667294),a(340748)),n=a(490641),r=a(406763);const i=e=>{let{className:t,...a}=e;return(0,s.jsx)(l.r,{className:(0,n.zw)(t,(e=>(0,r.cn)("flex flex-col items-center justify-center gap-2 rounded-md border border-dashed text-sm ring-offset-background","data-[drop-target]:border-solid data-[drop-target]:border-primary data-[drop-target]:bg-accent","data-[focus-visible]:outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[focus-visible]:ring-offset-2",e))),...a})}},282425:function(e,t,a){"use strict";a.d(t,{g:function(){return r}});var s=a(785893),l=a(667294),n=a(406763);const r=l.forwardRef(((e,t)=>{let{className:a,...l}=e;return(0,s.jsx)("textarea",{className:(0,n.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-black/[.3] focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:t,...l})}));r.displayName="Textarea"},128227:function(e,t,a){"use strict";var s=a(785893),l=a(667294),n=a(693967),r=a.n(n),i=a(611607),o=a(934464),c=a(287536),d=a(679661),u=a(481835),m=a(451179),p=a(609852);t.Z=e=>{let{className:t,name:a,label:n,helperLabel:x,description:h,labelProps:g={},helperLabelProps:f={},inputProps:b={},descriptionProps:v={},transform:j=e=>e,LeftInput:N,RightInput:y,showVisibilityToggle:w=!1}=e;const{className:k,...A}=g,{className:P,...Z}=f,{className:C,maxLength:T,type:M="text",...I}=b,{className:_,...E}=v,{control:S,setFocus:R}=(0,c.Gc)(),{field:D}=(0,c.bc)({control:S,name:a}),F=(0,l.useMemo)((()=>{var e,t;return null!==(t=null===(e=D.value)||void 0===e?void 0:e.length)&&void 0!==t?t:0}),[D.value]);(0,l.useEffect)((()=>{I.autoFocus&&R(a)}),[I.autoFocus,a]);const{value:U,toggle:L}=(0,d.kt)(),O=(0,l.useMemo)((()=>w?U?M:"password":M),[w,U,M]);return(0,s.jsx)(u.Wi,{control:S,name:a,render:e=>{let{field:a}=e;return(0,s.jsxs)(u.xJ,{className:t,children:[n&&(0,s.jsx)(u.lX,{className:r()("text-xs font-bold tracking-[0.6px] text-black/[.5]",k),...A,children:n}),n&&x&&(0,s.jsx)(u.lX,{className:r()("ml-1 text-xs font-normal tracking-[0.6px] text-black/[.5]",P),...Z,children:x}),(0,s.jsxs)("div",{className:"relative flex",children:[N,(0,s.jsx)(u.NI,{children:(0,s.jsx)(m.I,{...a,type:O,onChange:e=>{const t=e.target.value;a.onChange({target:{value:j(t)}})},...I,className:r()(C,{"peer pe-[4.5rem]":T>0||w})})}),w&&(0,s.jsx)(p.z,{type:"button",variant:"ghost",className:"absolute inset-y-0 end-0 h-auto p-0 pe-4 hover:bg-transparent peer-disabled:opacity-50",onClick:L,children:U?(0,s.jsx)(i.Z,{size:16,strokeWidth:2,"aria-hidden":"true"}):(0,s.jsx)(o.Z,{size:16,strokeWidth:2,"aria-hidden":"true"})}),T>0&&(0,s.jsx)("div",{className:"pointer-events-none absolute inset-y-0 end-0 flex items-center justify-center pe-3 peer-disabled:opacity-50","aria-live":"polite",role:"status",children:(0,s.jsxs)("p",{className:"m-0 text-xs tabular-nums text-muted-foreground",children:[F,"/",T]})}),y]}),h&&(0,s.jsx)(u.pf,{className:r()("empty:hidden",_),...E,children:h}),(0,s.jsx)(u.zG,{})]})}})}},108134:function(e,t,a){"use strict";a.d(t,{Z:function(){return m}});var s=a(785893),l=a(667294),n=a(693967),r=a.n(n),i=a(287536),o=a(481835),c=a(282425),d=a(490512);const u=l.forwardRef(((e,t)=>{let{maxHeight:a=Number.MAX_SAFE_INTEGER,minHeight:n=52,className:r,onChange:i,value:o,...c}=e;const u=l.useRef(null);var m;const[p,x]=l.useState(String(null!==(m=c.defaultValue)&&void 0!==m?m:"")),h=void 0===o?p:String(o);return(e=>{let{textAreaRef:t,triggerAutoSize:a,maxHeight:s=Number.MAX_SAFE_INTEGER,minHeight:n=0}=e;const r=l.useRef({minHeight:n,maxHeight:s});l.useEffect((()=>{const e=t.current;if(!e)return;const a=r.current.minHeight!==n||r.current.maxHeight!==s;r.current={minHeight:n,maxHeight:s};const l=e.style.height,i=e.style.transition;e.style.transition="none",e.style.minHeight="".concat(n+6,"px"),e.style.maxHeight="".concat(s>n?s:n+6,"px"),e.style.height="".concat(n+6,"px");const o=e.scrollHeight,c=o>s?s:o+6;a&&l?(e.style.height=l,e.offsetHeight,e.style.transition=i,e.style.height="".concat(c,"px")):(e.style.height="".concat(c,"px"),e.offsetHeight,e.style.transition=i)}),[t.current,a,n,s])})({textAreaRef:u,triggerAutoSize:h,maxHeight:a,minHeight:n}),(0,l.useImperativeHandle)(t,(()=>({textArea:u.current,focus:()=>{var e;return null==u||null===(e=u.current)||void 0===e?void 0:e.focus()},maxHeight:a,minHeight:n}))),(0,s.jsx)("textarea",{...c,value:o,ref:u,className:(0,d.Z)("flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
2ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-transparent hover:scrollbar-thumb-gray-400",r),style:{scrollbarWidth:"thin",scrollbarColor:"#d1d5db transparent",...c.style},onChange:e=>{void 0===o&&x(e.target.value),null==i||i(e)}})}));u.displayName="AutosizeTextarea";var m=e=>{let{className:t,name:a,label:n,helperLabel:d,description:m,labelProps:p={},helperLabelProps:x={},inputProps:h={},descriptionProps:g={},transform:f=e=>e,autosize:b,LeftInput:v,RightInput:j}=e;const{className:N,...y}=p,{className:w,...k}=x,{control:A}=(0,i.Gc)(),{field:P}=(0,i.bc)({control:A,name:a}),Z=(0,l.useMemo)((()=>{var e,t;return null!==(t=null===(e=P.value)||void 0===e?void 0:e.length)&&void 0!==t?t:0}),[P.value]);return(0,s.jsx)(o.Wi,{control:A,name:a,render:e=>{let{field:a}=e;return(0,s.jsxs)(o.xJ,{className:t,children:[n&&(0,s.jsx)(o.lX,{className:r()("text-xs font-bold tracking-[0.6px] text-black/[.5]",N),...y,children:n}),n&&d&&(0,s.jsx)(o.lX,{className:r()("ml-1 text-xs font-normal tracking-[0.6px] text-black/[.5]",w),...k,children:d}),(0,s.jsxs)("div",{className:"relative flex items-end gap-2",children:[v,(0,s.jsx)("div",{className:"min-w-0 flex-1",children:(0,s.jsx)(o.NI,{children:b?(0,s.jsx)(u,{...a,onChange:e=>{const t=e.target.value;a.onChange({target:{value:f(t)}})},...h,className:r()(null==h?void 0:h.className,{peer:(null==h?void 0:h.maxLength)>0})}):(0,s.jsx)(c.g,{...a,onChange:e=>{const t=e.target.value;a.onChange({target:{value:f(t)}})},...h,className:r()(null==h?void 0:h.className,{peer:(null==h?void 0:h.maxLength)>0})})})}),(null==h?void 0:h.maxLength)>0&&(0,s.jsx)("div",{className:"pointer-events-none absolute bottom-2 right-3 flex items-center justify-end peer-disabled:opacity-50","aria-live":"polite",role:"status",children:(0,s.jsxs)("p",{className:"m-0 text-xs tabular-nums text-muted-foreground",children:[Z,"/",h.maxLength]})}),j]}),m&&(0,s.jsx)(o.pf,{...g,children:m}),(0,s.jsx)(o.zG,{})]})}})}},724636:function(e,t,a){"use strict";var s=a(785893),l=a(45697),n=a.n(l),r=a(693967),i=a.n(r),o=a(287536),c=a(481835),d=a(424720);const u=e=>{let{name:t,label:a,helperLabel:l,description:n,labelProps:r={},helperLabelProps:u={},uploadImageProps:m={},descriptionProps:p={}}=e;const{className:x,...h}=r,{className:g,...f}=u,{control:b}=(0,o.Gc)();return(0,s.jsx)(c.Wi,{control:b,name:t,render:e=>{let{field:t}=e;return(0,s.jsxs)(c.xJ,{children:[a&&(0,s.jsx)(c.lX,{className:i()("text-xs font-bold tracking-[0.6px] text-black/[.5]",x),...h,children:a}),a&&l&&(0,s.jsx)(c.lX,{className:i()("ml-1 text-xs font-normal tracking-[0.6px] text-black/[.5]",g),...f,children:l}),(0,s.jsx)(d.Z,{className:"mt-[8px]",...m,currentImage:t.value,onUpload:e=>t.onChange({target:{value:e}}),onDelete:()=>t.onChange({target:{value:""}}),innerRef:t.ref}),n&&(0,s.jsx)(c.pf,{...p,children:n}),(0,s.jsx)(c.zG,{})]})}})};u.propTypes={name:n().string.isRequired,label:n().string,labelProps:n().object,inputProps:n().object},t.Z=u},718499:function(e,t,a){"use strict";var s=a(667294);function l({title:e,titleId:t,...a},l){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const n=s.forwardRef(l);t.Z=n},262940:function(e,t,a){"use strict";var s=a(667294);function l({title:e,titleId:t,...a},l){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const n=s.forwardRef(l);t.Z=n},823023:function(e,t,a){"use strict";var s=a(667294);function l({title:e,titleId:t,...a},l){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const n=s.forwardRef(l);t.Z=n},456186:function(e,t,a){"use strict";var s=a(667294);function l({title:e,titleId:t,...a},l){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"}))}const n=s.forwardRef(l);t.Z=n},255851:function(e,t,a){"use strict";a.d(t,{M:function(){return n},_:function(){return r}});var s=a(287536);const l=(e,t,a)=>{if(e&&"reportValidity"in e){const l=(0,s.U2)(a,t);e.setCustomValidity(l&&l.message||""),e.reportValidity()}},n=(e,t)=>{for(const a in t.fields){const s=t.fields[a];s&&s.ref&&"reportValidity"in s.ref?l(s.ref,a,e):s.refs&&s.refs.forEac
2h((t=>l(t,a,e)))}},r=(e,t)=>{t.shouldUseNativeValidation&&n(e,t);const a={};for(const l in e){const n=(0,s.U2)(t.fields,l),r=Object.assign(e[l]||{},{ref:n&&n.ref});if(i(t.names||Object.keys(e),l)){const e=Object.assign({},(0,s.U2)(a,l));(0,s.t8)(e,"root",r),(0,s.t8)(a,l,e)}else(0,s.t8)(a,l,r)}return a},i=(e,t)=>e.some((e=>e.startsWith(t+".")))},357492:function(e,t,a){"use strict";a.d(t,{X:function(){return n}});var s=a(255851),l=a(287536);function n(e,t,a){return void 0===t&&(t={}),void 0===a&&(a={}),function(n,r,i){try{return Promise.resolve(function(l,o){try{var c=(t.context,Promise.resolve(e["sync"===a.mode?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:r}))).then((function(e){return i.shouldUseNativeValidation&&(0,s.M)({},i),{values:a.raw?n:e,errors:{}}})))}catch(e){return o(e)}return c&&c.then?c.then(void 0,o):c}(0,(function(e){if(!e.inner)throw e;return{values:{},errors:(0,s._)((t=e,a=!i.shouldUseNativeValidation&&"all"===i.criteriaMode,(t.inner||[]).reduce((function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),a){var s=e[t.path].types,n=s&&s[t.type];e[t.path]=(0,l.KN)(t.path,a,e,t.type,n?[].concat(n,t.message):t.message)}return e}),{})),i)};var t,a})))}catch(e){return Promise.reject(e)}}}},627405:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var s=(0,a(533733).Z)("outline","refresh-alert","IconRefreshAlert",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}],["path",{d:"M12 9l0 3",key:"svg-2"}],["path",{d:"M12 15l.01 0",key:"svg-3"}]])},77373:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var s=(0,a(533733).Z)("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]])}},function(e){e.O(0,[51627,11551,25675,17599,1852,42795,58945,57537,64101,16310,90641,22074,75609,18576,40748,81583,91885,83897,44086,18393,49774,92888,40179],(function(){return t=484617,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.