(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{87314:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(7028)}])},7028:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eC}});var a=s(52322),l=s(5632),r=s(2784),n=s(83035),i=s(82271),o=s(73784),c=s(83764),d=s(57378),x=s(9020),u=s(2255),h=s(72834),f=s(75885),m=s(59211),p=s(1009),j=s(16760),g=s.n(j),b=s(44152),v=s(38600),w=s(27119);let N={id:"11e5c549-23b5-4913-84b0-0a182a848f52",title:"Release notes 26 august 2024",sections:[{id:"5abee3ba-6aff-49ea-a763-dda2d70c53b5",title:"Listen to voice messages",description:"Get access to listen to voice messages from your AI girlfriend(s)",image:"https://onlyn.s3.eu-west-3.amazonaws.com/release/release-26-august-2024.jpg"}]},y=(0,r.forwardRef)((e,t)=>{let[s,l]=(0,r.useState)(!1),n=(0,v.d)(),i=()=>{l(e=>!e),s&&window.localStorage.setItem("releaseId",N.id)};return(0,r.useImperativeHandle)(t,()=>({toggleOpen:()=>{i()},onOpen:()=>{l(!0)}})),(0,r.useEffect)(()=>{let e=window.localStorage.getItem("releaseId");e&&e===N.id||setTimeout(i,1e3)},[window]),(0,a.jsx)(c.R,{isOpen:s,onClose:i,hideCloseButton:!0,scrollBehavior:"inside",disableAnimation:n,children:(0,a.jsxs)(d.A,{children:[(0,a.jsx)(x.k,{children:(0,a.jsx)("p",{className:"text-light-base-content dark:text-base-content text-base font-medium",children:N.title})}),(0,a.jsxs)(u.I,{children:[g()(N.sections,e=>(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("p",{className:"text-light-base-content dark:text-base-content text-base font-medium",children:e.title}),(0,a.jsx)("p",{className:"text-light-info dark:text-info text-sm font-regular",children:e.description})]}),e.image&&(0,a.jsx)(h.J,{src:e.image,alt:e.id,width:"100%",className:"mt-2"}),(0,a.jsx)(f.z,{name:"OnlyNSFW",description:(0,b.Z)(new Date("2023-09-26"),"EEE dd MMM yyyy"),avatarProps:{src:"https://firebasestorage.googleapis.com/v0/b/onlyn-f5fb6.appspot.com/o/avatar%2Fbdfa673b-f8e6-47ec-9491-a60323a9a82b.png?alt=media&token=6b0ccf43-9c17-47c6-b6b2-804ce2a89636"},classNames:{name:"text-light-base-content dark:text-base-content"}}),(0,a.jsx)(m.A,{fullWidth:!0,onClick:i,color:"primary",children:"Noted!"})]},e.id)),(0,a.jsx)("div",{className:"absolute top-2 right-2",children:(0,a.jsx)(m.A,{onClick:i,isIconOnly:!0,children:(0,a.jsx)(w.er,{})})})]}),(0,a.jsx)(p.R,{children:(0,a.jsx)(m.A,{onClick:i,size:"sm",variant:"light",color:"danger",children:"Close"})})]})})});var C=s(45455),k=s.n(C),S=s(61258),I=s.n(S),z=s(93923),P=s(95728),E=s(20659),O=s(56746),R=s(9689),F=s(97240),A=s(47107),T=s(85701),H=s.n(T),B=s(39097),L=s.n(B),M=s(86945),_=s(81561);let q=Intl.NumberFormat("en",{notation:"compact"});var D=function(e){var t,s;let{characterId:o}=e,{character:c}=(0,M.C)((0,O.Z)(o)),[d,{isLoading:x}]=(0,E.useUpdateCharacterMutation)(),[u,{isLoading:p}]=(0,E.useLikeCharacterMutation)(),j=(0,r.useRef)(null),g=(0,M.C)(i.ei),{account:b}=(0,M.C)(i.bk),v=(0,l.useRouter)(),N=(0,n.IH)(),y=e=>()=>{(0,n.Kz)(N,"Click on Tag Character"),v.push({pathname:"/",query:{...v.query,tag:e}})},C=g&&(null==b?void 0:b.id)===(null==c?void 0:null===(t=c.author)||void 0===t?void 0:t.id);return c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L(),{legacyBehavior:!0,href:"/character/".concat(c.slug),children:(0,a.jsx)(R.w,{className:"border-none bg-background/60 dark:bg-default-100/50 w-full max-w-[610px] shadow-none",shadow:"sm",isPressable:!0,onClick:()=>{(0,n.Kz)(N,"Click on Character Card")},children:(0,a.jsx)(F.G,{children:(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-2 md:gap-4 items-center justify-center",children:[(0,a.jsx)(h.J,{alt:c.name,className:"object-cover w-full aspect-square md:w-[200px] md:h-[200px]",height:200,shadow:"md",src:c.avatar,width:200,removeWrapper:!0}),(0,a.jsxs)("div",{className:"flex flex-col w-full grow flex-1 h-full md:min-h-[200px]",children:[(0,a.jsx)("div",{className:"flex justify-between w-full items-start",children:(0,a.jsxs)("div",{className:"flex flex-col w-full",children:[(0,a.jsxs)("div",{className:"flex flex-row w-full justify-between items-center",children:[(0,a.jsx)("h3",{className:"font-semibold text-foreground/90 font-brand leading-5",children:c.name}),(0,a.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[C&&(0,a.jsx)(m.A,{isIconOnly:!0,onPress:()=>{(0,n.Kz)(N,"Click on Delete Character"),d({characterId:o,isArchived:!0}).unwrap().then(v.reload)},isLoading:x,className:"text-default-900/60 data-[hover]:bg-foreground/10",radius:"full",variant:"light",size:"sm",children:(0,a.jsx)(w._l,{...c.isLiked&&{fill:"#EF0000",filled:!0}})}),(0,a.jsx)(m.A,{isIconOnly:!0,onPress:()=>{var e;if(!g)return null===(e=j.current)||void 0===e?void 0:e.toggleOpen();(0,n.Kz)(N,"Click on Like Character"),u({characterId:o})},isLoading:p,className:"text-default-900/60 data-[hover]:bg-foreground/10",radius:"full",variant:"light",size:"sm",children:(0,a.jsx)(w.xO,{...c.isLiked&&{fill:"#EF0000",filled:!0}})})]})]}),(0,a.jsx)("p",{className:"text-xs text-foreground/80 line-clamp-4",children:c.tagLine}),(0,a.jsx)("div",{className:"flex flex-row flex-wrap gap-1 mt-2",children:H()(c.tags,5).map(e=>(0,a.jsx)(m.A,{onPress:y(e.label),variant:"light",className:"p-0 min-w-0 h-auto min-h-0 w-auto",size:"sm",children:(0,a.jsx)(A.z,{size:"sm",color:"secondary",radius:"none",children:e.label})},e.id))})]})}),(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between mt-3 gap-1",children:[(0,a.jsxs)("div",{className:"flex flex-row items-center gap-1",children:[(0,a.jsx)(A.z,{variant:"solid",size:"sm",endContent:(0,a.jsx)(w.zT,{height:16}),children:(0,a.jsx)("p",{children:q.format(c.messageCount||0)})}),(0,a.jsx)(A.z,{variant:"solid",size:"sm",endContent:(0,a.jsx)(w.xO,{height:16}),children:(0,a.jsx)("p",{children:q.format(c.likeCount||0)})})]}),c.author&&(0,a.jsx)(f.z,{name:c.author.username,avatarProps:{src:null===(s=c.author.avatar)||void 0===s?void 0:s.uri}})]})]})]})})})}),(0,a.jsx)(_.Z,{ref:j})]}):null},K=s(81823),W=function(){return(0,a.jsx)(R.w,{className:"border-none bg-background/60 dark:bg-default-100/50 max-w-[610px]",shadow:"sm",children:(0,a.jsx)(F.G,{children:(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-2 md:gap-4 items-center justify-center",children:[(0,a.jsx)(K.X,{className:"relative aspect-square w-full md:w-[200px] md:h-[200px] rounded-md"}),(0,a.jsxs)("div",{className:"flex flex-col w-full flex-1 grow md:min-h-[200px]",children:[(0,a.jsx)("div",{className:"flex justify-between items-start",children:(0,a.jsxs)("div",{className:"flex flex-col space-y-2 w-full",children:[(0,a.jsx)(K.X,{className:"rounded-md",children:(0,a.jsx)("div",{className:"h-8"})}),(0,a.jsx)(K.X,{className:"rounded-md",children:(0,a.jsx)("div",{className:"h-16"})}),(0,a.jsx)("div",{className:"flex flex-row flex-wrap gap-1 mt-2",children:I()(3,e=>(0,a.jsx)(K.X,{children:(0,a.jsx)("div",{className:"h-6 w-12 rounded-full"})},e))})]})}),(0,a.jsxs)("div",{className:"flex flex-row mt-3 gap-1",children:[(0,a.jsx)(K.X,{className:"rounded-full",children:(0,a.jsx)("div",{className:"h-6 w-12 rounded-full"})}),(0,a.jsx)(K.X,{className:"rounded-full",children:(0,a.jsx)("div",{className:"h-6 w-12 rounded-full"})})]})]})]})})})},Z=s(41584),G=s(63390),X=s(11263),J=function(){let[e,t]=(0,r.useState)(0),[s,{isFetching:i,isLoading:o,data:c},{lastArg:d}]=(0,E.useLazyRetrieveCharacterTagFeedQuery)(),x=(0,l.useRouter)(),[u,h]=(0,r.useState)(x.query.tag||""),f=(0,v.d)(),p=(0,n.IH)(),j=(null==c?void 0:c.length)>=20,[,g]=(0,X.M)({hasMore:j,shouldUseLoader:!1,onLoadMore:()=>{t(e=>e+20)}});return(0,r.useEffect)(()=>{s({limit:100,offset:u===(null==d?void 0:d.search)?e:0,search:u})},[e,u]),(0,a.jsxs)("form",{"data-tut":"reactour__tag",onSubmit:e=>{e.preventDefault(),(0,n.Kz)(p,"Search Character Tag"),x.push({pathname:"/",query:{...x.query,tag:u}})},className:"flex w-full md:w-auto justify-center md:justify-start flex-row w-auto",children:[(0,a.jsx)(Z.d,{className:"max-w-sm md:max-w-xs",variant:"flat",isLoading:o||i,placeholder:"Select a Tag",onInputChange:h,"aria-label":"Search for a tag",inputProps:{classNames:{inputWrapper:"py-[1px] h-[44px]",input:"text-base"}},fullWidth:f,scrollRef:g,inputValue:u,children:null==c?void 0:c.map(e=>(0,a.jsx)(G.R,{className:"capitalize",children:e},e))}),(0,a.jsx)(m.A,{type:"submit",className:"h-[44px]",isIconOnly:!0,color:"secondary",children:(0,a.jsx)(w.dj,{})})]})},U=function(){let[e,t]=(0,r.useState)(0),[s,{data:i,isFetching:o,isLoading:c,isSuccess:d}]=(0,E.useLazyRetrieveCharacterFeedQuery)(),x=(0,l.useRouter)(),{tag:u,search:h,sort:f}=x.query,[p,j]=(0,r.useState)(f||"top"),b=(0,n.IH)(),v=(null==i?void 0:i.ids.length)>=40+e,[w]=(0,z.Z)({loading:o,hasNextPage:v,onLoadMore:()=>{t(e=>e+40)},rootMargin:"0px 0px 400px 0px"}),N=e=>()=>{(0,n.Kz)(b,"Click on Sort Character"),j(e),x.push({pathname:"/",query:{...x.query,sort:e}})};return(0,r.useEffect)(()=>{s({limit:40,offset:e,sort:p,search:h,tags:u?[u]:[],isPremade:!1},!1)},[e,h,p,u]),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col md:flex-row gap-2 items-center",children:[(0,a.jsxs)("div",{"data-tut":"reactour__sorting",className:"flex flex-row md:gap-2 justify-start items-center",children:[(0,a.jsx)(m.A,{variant:"light",onPress:N("newest"),children:(0,a.jsx)("p",{className:"".concat("newest"===p?"underline text-white":"text-info"," uppercase font-extrabold italic text-xl md:text-3xl font-brand"),children:"NEWEST"})}),(0,a.jsx)("p",{className:"uppercase font-extrabold italic text-2xl md:text-3xl font-brand",children:"/"}),(0,a.jsx)(m.A,{variant:"light",onPress:N("top"),children:(0,a.jsx)("p",{className:"".concat("top"===p?"underline text-white":"text-info"," uppercase font-extrabold italic text-xl md:text-3xl font-brand"),children:"TOP"})}),(0,a.jsx)("p",{className:"uppercase font-extrabold italic text-xl md:text-3xl font-brand",children:"/"}),(0,a.jsx)(m.A,{variant:"light",onPress:N("trending"),children:(0,a.jsx)("p",{className:"".concat("trending"===p?"underline text-white":"text-info"," uppercase font-extrabold italic text-xl md:text-3xl font-brand"),children:"TRENDING"})})]}),(0,a.jsx)(J,{})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-2",children:[c&&I()(20,e=>(0,a.jsx)(W,{},e)),d&&!c&&k()(null==i?void 0:i.ids)&&(0,a.jsx)("div",{className:"md:pl-4",children:(0,a.jsx)("p",{className:"text-base-content font-brand font-semibold text-2xl md:text-3xl",children:"There is no result for this search."})}),g()(null==i?void 0:i.ids,(e,t)=>(0,a.jsx)("div",{...0===t&&{"data-tut":"reactour__character"},children:(0,a.jsx)(D,{characterId:e})},e))]}),(v||o)&&(0,a.jsx)("div",{className:"flex w-full p-4 justify-center",children:(0,a.jsx)(P.c,{ref:w,color:"primary"})})]})},Q=s(72003),V=s(93158);s(49498),s(64797),s(23827);let Y=[{id:"58accaa5-d103-4c06-a5c5-774419eefd50",imageDesktopHref:"https://ddou0tnxf6ba8.cloudfront.net/static/home/home-header-desktop-3.jpg",imageMobileHref:"https://ddou0tnxf6ba8.cloudfront.net/static/home/home-header-mobile-1.jpg",title:"Join our Discord now!",description:"Join our Discord server to get the latest news and updates.",link:"https://discord.gg/X9ana7eBUk",buttonText:"Join now",buttonIcon:(0,a.jsx)(w.qp,{fill:"white"}),eventName:"Click on Join the Discord"},{id:"65ab03bc-4775-44d7-b08f-3ca2c6144549",imageDesktopHref:"https://ddou0tnxf6ba8.cloudfront.net/static/home/home-header-desktop-1.jpg",imageMobileHref:"https://ddou0tnxf6ba8.cloudfront.net/static/home/home-header-mobile-3.jpg",title:"Chat with AI Characters",description:"Chat with characters created by talented artists from all around the world.",link:"#characters",buttonText:"Chat now!",eventName:"Click on Home Banner Chat now!"},{id:"14d582d4-ca04-4671-bb80-e63c79e8dffa",imageDesktopHref:"https://ddou0tnxf6ba8.cloudfront.net/static/home/home-header-desktop-2.jpg",imageMobileHref:"https://ddou0tnxf6ba8.cloudfront.net/static/home/home-header-mobile-2.jpg",title:"Enjoy our powerful Editor",description:"Begin by create the girls you want, or even more, chat with them.",link:"/character/create",buttonText:"Create now!",eventName:"Click on Home Banner Create now!"}];var $=function(){let e=(0,r.useRef)(null),[t,s]=(0,r.useState)(0),l=(0,v.d)(),i=(0,n.IH)(),o=e=>()=>{(0,n.Kz)(i,e)},c=t=>()=>{var s,a;(0,n.Kz)(i,"Slide on Home Banner",{currentIndex:null===(s=e.current)||void 0===s?void 0:s.swiper.realIndex}),null===(a=e.current)||void 0===a||a.swiper.slideTo(t)};return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(V.tq,{ref:e,autoHeight:!0,spaceBetween:l?8:16,slidesPerView:"auto",onSlideChange:()=>{var t,a;(0,n.Kz)(i,"Slide on Home Banner",{currentIndex:null===(t=e.current)||void 0===t?void 0:t.swiper.realIndex}),s((null===(a=e.current)||void 0===a?void 0:a.swiper.realIndex)||0)},className:"mySwiper",children:Y.map(e=>(0,a.jsx)(V.o5,{children:(0,a.jsx)(Q.O,{href:e.link,onClick:o(e.eventName),className:"flex",children:(0,a.jsxs)("div",{className:"relative max-h-[600px] md:max-h-none max-w-[1200px] w-full",style:{aspectRatio:l?.5:3},children:[(0,a.jsx)(h.J,{src:l?e.imageMobileHref:e.imageDesktopHref,className:"bg-opacity-50 bg-black max-h-[600px] h-full w-full",alt:e.title,style:{aspectRatio:l?.5:3}}),(0,a.jsxs)("div",{className:"z-[999] absolute top-0 p-2 md:p-4",children:[(0,a.jsx)("h2",{className:"text-white font-brand text-left text-xl md:text-2xl font-semibold leading-[24px]",children:e.title}),(0,a.jsx)("p",{className:"text-base-content text-left text-sm",children:e.description})]}),(0,a.jsx)("div",{className:"z-[999] absolute top-[50%] left-[50%] transform translate-x-[-50%] translate-y-[-50%]",children:(0,a.jsxs)(m.A,{variant:"shadow",color:"primary",className:"pointer-events-none",children:[e.buttonIcon,e.buttonText]})})]})})},e.id))}),(0,a.jsx)("div",{className:"absolute bottom-[8px] left-[8px] md:bottom-[20px] md:left-[20px] z-[99] right-0 flex h-2 w-12 gap-1 md:gap-2",children:I()(Y.length,e=>(0,a.jsx)("button",{type:"button",onClick:c(e),className:"w-2 h-2 rounded-full bg-white ".concat(e===t?"":"bg-opacity-50")},e))})]})},ee=s(69291),et=s(48344),es=s(12309),ea=s(6310),el=s(96577),er=s.n(el),en=s(41988),ei=s(73218);let eo=Intl.NumberFormat("en",{notation:"compact"});var ec=function(e){let{characterId:t}=e,[s,o]=(0,r.useState)(null),{retrieve:c}=(0,ei.u)(),{character:d}=(0,M.C)((0,O.Z)(t)),x=(0,n.IH)(),u=(0,l.useRouter)(),f=(0,M.C)(i.ei),p=(0,M.C)(i.tR),j=(0,r.useRef)(null),g=(0,r.useRef)(null),b=()=>{var e;(0,n.Kz)(x,"Click on Character Card Premade - Subscribe"),null===(e=g.current)||void 0===e||e.toggleOpen()},v=()=>{if(!f){var e;(0,n.Kz)(x,"Click on Character Card Premade - Not Connected"),null===(e=j.current)||void 0===e||e.toggleOpen();return}if(!s&&!p){(0,n.Kz)(x,"Click on Character Card Premade - Subscribe"),b();return}(0,n.Kz)(x,"Click on Character Card Premade"),u.push("/character/".concat(d.slug))};return((0,r.useEffect)(()=>{u.prefetch("/character/".concat(d.slug))},[]),(0,r.useEffect)(()=>{let e=c("@CharacterPremadeForceSubscription");o(1===e)},[]),d&&null!==s)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"relative",children:[d.isNew&&(0,a.jsx)("div",{className:"absolute overflow-visible top-[-8px] left-[8px] z-[99]",children:(0,a.jsx)(A.z,{color:"primary",variant:"bordered",className:"font-brand bg-base-200 text-foreground text-lg",size:"lg",children:"New"})}),(0,a.jsxs)(R.w,{onClick:v,isPressable:!0,shadow:"sm",className:"w-[310px]",children:[(0,a.jsx)(et.u,{className:"flex flex-col",children:(0,a.jsxs)("div",{className:"flex flex-col w-full h-[84px]",children:[(0,a.jsx)("p",{className:"text-base text-black dark:text-white font-semibold",children:d.name}),(0,a.jsx)("p",{className:"text-sm text-light-info dark:text-info",children:d.tagLine})]})}),(0,a.jsx)(h.J,{radius:"none",height:440,width:310,priority:!0,as:er(),className:"aspect-[450/658]",classNames:{img:"object-cover"},alt:d.name,src:d.avatar}),(0,a.jsxs)("div",{className:"flex flex-row items-end justify-end w-full mt-1 gap-1",children:[(0,a.jsx)(A.z,{variant:"light",color:"success",size:"sm",endContent:(0,a.jsx)(w.zT,{height:16}),children:(0,a.jsx)("p",{children:eo.format(d.messageCount||0)})}),(0,a.jsx)(A.z,{variant:"light",color:"success",size:"sm",endContent:(0,a.jsx)(w.xO,{height:16}),children:(0,a.jsx)("p",{children:eo.format(d.likeCount||0)})})]}),(0,a.jsx)(es.i,{className:"h-auto",children:(0,a.jsxs)("div",{className:"flex flex-row justify-between items-center w-full",children:[(0,a.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[d.isAbleToGenerateGeneration?(0,a.jsx)(ea.e,{content:"You are able to ask images to this character",children:(0,a.jsx)(m.A,{isIconOnly:!0,radius:"full",color:"success",variant:"flat",children:(0,a.jsx)(w.ZR,{height:18,width:18})})}):null,d.isAbleToGenerateAudio?(0,a.jsx)(ea.e,{content:"You are able to generate audio from this character",children:(0,a.jsx)(m.A,{isIconOnly:!0,radius:"full",color:"success",variant:"flat",children:(0,a.jsx)(w.dn,{height:18,width:18})})}):null,s||!d.isLocked||p?null:(0,a.jsx)(m.A,{isIconOnly:!0,radius:"full",color:"danger",variant:"flat",children:(0,a.jsx)(w.w7,{height:18,width:18})})]}),(0,a.jsx)(m.A,{className:"text-tiny",color:"primary",radius:"full",type:"button",size:"md",variant:"flat",onPress:v,children:"Chat"})]})})]})]}),(0,a.jsx)(_.Z,{ref:j}),(0,a.jsx)(en.Z,{ref:g})]}):null},ed=function(){let[e,{data:t,isLoading:s}]=(0,E.useLazyRetrieveCharacterFeedQuery)();return(0,r.useEffect)(()=>{e({limit:12,offset:0,isPremade:!0},!1)},[]),(0,a.jsxs)("div",{id:"characters",className:"flex flex-col gap-2",children:[(0,a.jsx)("div",{className:"flex flex-col gap-6",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("h2",{className:"text-2xl font-brand font-normal",children:"Selection of the week ❤️"}),(0,a.jsx)("p",{className:"text-sm font-medium text-light-info dark:text-info",children:"Discover characters made by AI artists with ❤️"})]})}),s&&(0,a.jsx)(ee.o,{orientation:"horizontal",hideScrollBar:!0,size:0,className:"flex flex-row gap-2 py-2",children:I()(6,e=>(0,a.jsx)("div",{className:"w-[310px]",children:(0,a.jsxs)(R.w,{className:"w-full h-full w-[310px] justify-end items-end",radius:"lg",children:[(0,a.jsx)(K.X,{className:"w-full h-[108px]"}),(0,a.jsx)("div",{className:"w-full h-[360px]"}),(0,a.jsx)(K.X,{className:"w-full h-[64px] flex-grow"})]},e)},e))}),(0,a.jsx)(ee.o,{orientation:"horizontal",hideScrollBar:!0,size:0,className:"flex flex-row gap-2 py-2",children:g()(null==t?void 0:t.ids,e=>(0,a.jsx)(ec,{characterId:e},e))})]})},ex=s(74479),eu=function(e){let{timestamp:t,onExpire:s}=e,{seconds:l,minutes:n,isRunning:i}=(0,ex.useTimer)({expiryTimestamp:t,onExpire:s}),[o,c]=(0,r.useState)(0);return(0,r.useEffect)(()=>{let e;return i?e=setInterval(()=>{c(e=>(e+10)%1e3)},10):clearInterval(e),()=>clearInterval(e)},[i]),(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex font-semibold flex-row items-center gap-[2px]",children:[(0,a.jsx)("p",{children:n}),(0,a.jsx)("p",{children:":"}),(0,a.jsx)("p",{children:String(l).padStart(2,"0")}),(0,a.jsx)("p",{children:":"}),(0,a.jsx)("p",{className:"w-[24px]",children:String(Math.floor(o/10)).padStart(2,"0")})]}),(0,a.jsxs)("div",{className:"flex flex-row items-center gap-[6px] md:gap-2",children:[(0,a.jsx)("p",{className:"text-xs text-info",children:"Min"}),(0,a.jsx)("p",{className:"text-xs text-info",children:"Sec"}),(0,a.jsx)("p",{className:"w-[24px] text-xs text-info",children:"Mls"})]})]})})},eh=function(){let{retrieve:e}=(0,ei.u)(),[t,s]=(0,r.useState)(null),l=(0,r.useRef)(null),o=(0,r.useRef)(null),[c,d]=(0,r.useState)(null),x=(0,M.C)(i.tR),u=(0,M.C)(i.ei),h=(0,n.IH)(),f=(0,v.d)(),[p,j]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let t=e("@FirstSubscriptionBannerOrModal");s(1===t)},[]);let g=()=>{var e,t;if(!u){(0,n.Kz)(h,"Click on First Subscription Banner - Not Connected"),null===(t=o.current)||void 0===t||t.toggleOpen();return}(0,n.Kz)(h,"Click on First Subscription Banner"),null===(e=l.current)||void 0===e||e.toggleOpen()};return((0,r.useEffect)(()=>{let e=window.localStorage.getItem("@FirstSubscriptionTimer");if(e){d(new Date(e));return}let t=new Date;t.setSeconds(t.getSeconds()+3599),d(t),window.localStorage.setItem("@FirstSubscriptionTimer",t.toString())},[]),null!==c&&c<new Date||!t||p||x)?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(R.w,{isPressable:!0,fullWidth:!0,onPress:g,className:"p-0 mb-4",children:(0,a.jsx)(F.G,{className:"py-1 relative",children:(0,a.jsxs)("div",{className:"h-[56px] flex flex-row items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-row items-center gap-2 hidden md:flex",children:[(0,a.jsx)(w.xO,{fill:"#EF0000",filled:!0}),(0,a.jsx)("p",{className:"font-brand text-foreground text-2xl font-bold",children:"FIRST SUBSCRIPTION"})]}),(0,a.jsx)("div",{className:"md:absolute md:left-[50%] md:translate-x-[-50%]",children:(0,a.jsx)(m.A,{onPress:g,radius:"full",size:f?"md":"lg",color:"success",variant:"flat",children:(0,a.jsx)("p",{className:"font-brand text-foreground text-2xl font-bold",children:"UP TO 70% OFF"})})}),null!==c&&(0,a.jsx)(m.A,{onPress:g,size:f?"md":"lg",radius:"full",color:"primary",variant:"flat",children:(0,a.jsx)(eu,{onExpire:()=>{j(!0)},timestamp:c})})]})})}),(0,a.jsx)(en.Z,{discount:!0,ref:l}),(0,a.jsx)(_.Z,{ref:o})]})},ef=s(28331);function em(e){var t;let{generationId:s}=e,l=(0,M.C)((0,ef.Z3)(s));return(0,a.jsx)("div",{className:"relative h-[300px] overflow-hidden rounded-md",children:(0,a.jsx)(h.J,{src:null==l?void 0:null===(t=l.media)||void 0===t?void 0:t.uri,alt:s,classNames:{img:"object-cover"}})})}var ep=function(e){let{keyword:t,caption:s}=e,i=(0,n.IH)(),o=(0,l.useRouter)(),[c,{data:d}]=(0,E.useLazyRetrieveGenerationFeedQuery)();return(0,r.useEffect)(()=>{c({limit:4,offset:0,keywords:[t],createdAtLte:new Date("2024-06-14"),mediaHeight:1024,mediaWidth:768,nsfw:!0},!1)},[]),(0,a.jsx)(R.w,{onPress:()=>{(0,n.Kz)(i,"Press Home Generation Card",{keyword:t}),o.push({pathname:"/images",query:{keyword:t}})},isPressable:!0,className:"min-w-[280px] cursor-pointer",children:(0,a.jsxs)(F.G,{children:[(0,a.jsx)("div",{className:"relative h-[340px]",children:g()(null==d?void 0:d.ids,(e,t)=>(0,a.jsx)("div",{className:"absolute",style:{top:"".concat(10*t,"px"),zIndex:10-t,left:"".concat(10*t,"px")},children:(0,a.jsx)(em,{generationId:e},e)},e))}),(0,a.jsx)("p",{className:"text-center font-semibold font-brand",children:s})]})})};let ej=[{id:"a18fd99d-805b-46e1-8d27-cb0cd5bac477",label:"Maid",keywork:"maid",caption:"Maid"},{id:"475f88b6-a542-490c-b4a1-b55df4e40fa1",label:"Elf",keywork:"elf",caption:"Elf"},{id:"9253c0cb-ecbb-41dc-bcf0-03eee28258a2",label:"Latex",keywork:"latex",caption:"Latex"},{id:"6cf8871e-7bbc-4ddd-b77b-dc39c914954e",label:"Police",keywork:"police",caption:"Police"},{id:"7f035adf-38f7-4afb-a007-88875e15b269",label:"Tattooed",keywork:"tattooed",caption:"Tattooed"},{id:"6bc08213-f274-4130-a8d0-4f033b65fcd1",label:"Beach",keywork:"beach",caption:"Beach"}];var eg=function(){return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("div",{className:"flex flex-col gap-6",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("h2",{className:"text-2xl font-brand font-normal",children:"Images gallery ❤️"}),(0,a.jsx)("p",{className:"text-sm font-medium text-light-info dark:text-info",children:"Discover images made by AI artists with ❤️"})]})}),(0,a.jsx)(ee.o,{orientation:"horizontal",hideScrollBar:!0,size:0,className:"flex flex-row gap-2 py-2",children:g()(ej,e=>(0,a.jsx)(ep,{keyword:e.keywork,caption:e.caption},e.id))})]})},eb=s(45847),ev=s.n(eb),ew=function(){return(0,r.useEffect)(()=>{let e=window;"function"!=typeof e.Featurebase&&(e.Featurebase=function(){(e.Featurebase.q=e.Featurebase.q||[]).push(arguments)}),e.Featurebase("initialize_survey_widget",{organization:"onlynsfw",placement:"bottom-right",theme:"dark",locale:"en"})},[]),(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(ev(),{src:"https://do.featurebase.app/js/sdk.js",id:"featurebase-sdk"})})},eN=s(95361);let ey=(0,r.forwardRef)((e,t)=>{var s,l;let{}=e,n=(0,v.d)(),[o,x]=(0,r.useState)(!1),[h,{isError:f,error:j,isLoading:g,originalArgs:b}]=(0,E.useUpdateChatSettingsMutation)(),{account:w}=(0,M.C)(i.bk),[N,y]=(0,r.useState)(""),C=(0,M.C)(i.ei),k=()=>x(e=>!e);return((0,r.useImperativeHandle)(t,()=>({toggleOpen:()=>{k()},onOpen:()=>{x(!0)}})),(0,r.useEffect)(()=>{var e;y((null==w?void 0:null===(e=w.chatSettings)||void 0===e?void 0:e.useName)||"")},[null==w?void 0:null===(s=w.chatSettings)||void 0===s?void 0:s.useName]),(0,r.useEffect)(()=>{var e;o||!C||(null==w?void 0:null===(e=w.chatSettings)||void 0===e?void 0:e.useName)||k()},[C]),w)?(0,a.jsx)(c.R,{isOpen:o,onClose:k,backdrop:"opaque",size:"sm",disableAnimation:n,hideCloseButton:!0,placement:"center",children:(0,a.jsxs)(d.A,{children:[(0,a.jsxs)(u.I,{children:[(0,a.jsx)("p",{className:"text-sm text-base-content",children:"Choose a username for the chat, so that characters can refer to you by name."}),(0,a.jsx)(eN.Y,{fullWidth:!0,onValueChange:y,isInvalid:f&&N===(null==b?void 0:null===(l=b.chatSettings)||void 0===l?void 0:l.useName),errorMessage:null==j?void 0:j.message,placeholder:"Chat username",value:N,classNames:{inputWrapper:"py-[1px] h-[44px]",input:"text-base"}}),(0,a.jsx)(m.A,{onClick:()=>{h({chatSettings:{...w.chatSettings,useName:N}}).unwrap().then(k)},isLoading:g,isDisabled:!N,color:"primary",children:"Save"})]}),(0,a.jsx)(p.R,{children:(0,a.jsx)(m.A,{onClick:k,children:"Close"})})]})}):null});function eC(){let e=(0,l.useRouter)(),{referral:t,sort:s,search:c,subId:d}=e.query,x=(0,n.IH)(),u=(0,M.C)(i.ei),h=(0,M.C)(i.tR),f=(0,r.useRef)(null),[m,p]=(0,r.useState)(null),[j,g]=(0,r.useState)(null),{retrieve:b}=(0,ei.u)();return(0,r.useEffect)(()=>{t&&(window.localStorage.setItem("referralCode",t),d&&window.localStorage.setItem("referralCodeSubId",d),e.push({pathname:"/",query:{sort:s,search:c}},"/",{shallow:!0}))},[t]),(0,r.useEffect)(()=>{if(!m)return;let e=window.localStorage.getItem("subscription-modal");if("true"!==e&&u&&!h){var t;(0,n.Kz)(x,"Open Subscription Modal after first connection"),null===(t=f.current)||void 0===t||t.toggleOpen(),window.localStorage.setItem("subscription-modal","true")}},[u,m]),(0,r.useEffect)(()=>{e.prefetch("/")},[]),(0,r.useEffect)(()=>{p(0===b("@FirstSubscriptionBannerOrModal")),g(0===b("@ShowOnlyPremadeCharacter"))},[]),(0,a.jsxs)(o.Z,{title:"OnlyNSFW.ai | NSFW AI Image and Unfiltered NSFW Chat",description:"We're the top AI for NSFW images and unfiltered NSFW chat. Our nsfw chat has no filter. Pick real or anime. Experience the best with us today.",withHeader:!0,withInsets:!0,withHorizontalPadding:!0,children:[(0,a.jsx)(ew,{}),(0,a.jsx)(eh,{}),(0,a.jsx)($,{}),(0,a.jsx)("div",{className:"h-2 md:h-4"}),(0,a.jsx)(ed,{}),(0,a.jsx)("div",{className:"h-2 md:h-4"}),(0,a.jsx)(eg,{}),(0,a.jsx)("div",{className:"h-2 md:h-4"}),j&&(0,a.jsx)(U,{}),(0,a.jsx)(y,{}),(0,a.jsx)(en.Z,{discount:!0,ref:f}),(0,a.jsx)(ey,{})]})}},56746:function(e,t,s){"use strict";s.d(t,{R:function(){return c},Z:function(){return i}});var a=s(30733),l=s.n(a),r=s(87687);let n=r.g.getSelectors(e=>e.characters),i=e=>l()(t=>{let s=n.selectById(t,e);return{character:s}}),o=r.R.getSelectors(e=>e.characterComments),c=e=>l()(t=>{let s=o.selectById(t,e);return{characterComment:s}})},28331:function(e,t,s){"use strict";s.d(t,{Z3:function(){return i}});var a=s(30733),l=s.n(a),r=s(79903);let n=r.d.getSelectors(e=>e.generations),i=e=>l()(t=>{if(!e)return null;let s=n.selectById(t,e);return s})},49498:function(){}},function(e){e.O(0,[3930,7513,5127,1678,4152,1656,6977,7885,7241,8729,4249,3784,9774,2888,179],function(){return e(e.s=87314)}),_N_E=e.O()}]);