import{_ as e}from"./index.BJke7RFS.js";import{bB as a,bw as l,bX as t,a7 as o,a$ as i,q as r,f as n,a_ as s,aL as c,s as u,bJ as d,av as v,B as p,ao as m,T as h,b2 as f,b0 as b,t as x,c as y}from"./index.M4bJ7AyN.js";import{_ as g}from"./index.DOFeFEsU.js";import{_ as w}from"./index.Y0luTU17.js";import{i as k,_}from"./mediaType.DGDpHjg0.js";import{_ as I}from"./index.GJvPiXIh.js";import{u as C,aC as U,aa as E,a2 as j,U as D,a4 as A,a6 as S,l as N,F as L,i as R,k as T,aj as V,g as M,$,r as P,aH as z,j as O,V as F,q as B,ap as q,ac as H,as as G,X as W,af as Q,at as X}from"./vue-vendor.CIPxpJKQ.js";import{a as J,g as Y,_ as K,D as Z,u as ee}from"./useBotInteract.Clr3NQAY.js";import{_ as ae}from"./index.Bp13JS8F.js";import{_ as le}from"./index.vue_vue_type_style_index_1_lang.BNZwTXkA.js";import"./utils-vendor.CZi4iOk4.js";import{u as te}from"./i18n.DI4_U1ww.js";import{u as oe}from"./useCharacterNavigation.Dk7xIA9o.js";import"./other-vendor.B54TxMCF.js";import"./icons.DI95tiuh.js";import"./throttle.P1UUv9uv.js";let ie=null;function re(e){ie===e&&(ie=null)}const ne=["src"],se={key:0,class:"absolute inset-0 w-full h-full overflow-hidden rounded-xl"},ce={key:2,class:"play-btn-overlay absolute inset-0 flex items-center justify-center bg-black/20 rounded-xl"},ue=["src"],de={key:0,class:"absolute inset-0 w-full h-full overflow-hidden rounded-xl"},ve={class:"absolute inset-0 flex flex-col items-center justify-center bg-black/30 rounded-xl"},pe={class:"flex items-center bg-black/50 px-2 py-1 rounded-full"},me=["src"],he={class:"text-white text-xs ml-1 font-medium"},fe=u(C({name:"GalleryVideoItem",__name:"index",props:{videoId:{},videoUrl:{},title:{},money:{},unlocked:{type:Boolean},botId:{}},emits:["unlock-success"],setup(e,{expose:u,emit:d}){const v=a(),p=l(),m=t(),{t:h}=te(),f=e,b=d,x=M(()=>p.appConfig.coinIconSrc),y=E(null),g=E(null),w=E(null),_=E(null),I=E(null),C=new WeakSet;let $=null,P=null,z=null,O=null;const F=()=>{o(z),z=null},B=()=>{o(O),O=null},q=()=>{const e=g.value,a=f.videoUrl;e&&a&&(le.value||(F(),e.removeAttribute("src"),e.load(),z=s(e,a,{onError:()=>Ie()}),!z&&c(a)&&Ie()))},H=()=>{const e=w.value,a=f.videoUrl;e&&a&&(le.value||(B(),e.removeAttribute("src"),e.load(),O=s(e,a,{onError:()=>Ie()}),!O&&c(a)&&Ie()))},G=M(()=>(()=>{const e=navigator.userAgent;return/XiaoMi|MiuiBrowser|UCBrowser|Huawei|Honor|vivo|OPPO|Heytap|Quark|Weibo|baiduboxapp|MicroMessenger|QQBrowser|mqqbrowser/i.test(e)})()),W=(e,a)=>{if(!a||!e)return;const l=a.getContext("2d");if(!l)return;if(e.readyState<2||!e.videoWidth||!e.videoHeight)return;const t=window.devicePixelRatio||1,o=a.getBoundingClientRect(),i=Math.max(1,Math.round(o.width*t)),r=Math.max(1,Math.round(o.height*t));a.width===i&&a.height===r||(a.width=i,a.height=r);const n=e.videoWidth/e.videoHeight;let s,c,u,d;i/r>n?(s=i,c=i/n,u=0,d=(r-c)/2):(c=r,s=r*n,u=(i-s)/2,d=0),l.clearRect(0,0,i,r),l.drawImage(e,u,d,s,c)},Q=()=>{null!==$&&(cancelAnimationFrame($),$=null)},X=()=>{null!==P&&(cancelAnimationFrame(P),P=null)};U(g,e=>{e&&!C.has(e)&&(C.add(e),e.addEventListener("loadeddata",()=>{G.value&&W(e,_.value)}),e.addEventListener("play",()=>{G.value&&(()=>{if(null!==$)return;const e=()=>{$=null;const a=g.value;!a||a.paused||a.ended||(W(a,_.value),$=requestAnimationFrame(e))};$=requestAnimationFrame(e)})()}),e.addEventListener("pause",()=>{G.value&&Q()})),e&&D(()=>q())}),U(w,e=>{e&&!C.has(e)&&(C.add(e),e.addEventListener("loadeddata",()=>{G.value&&W(e,I.value)}),e.addEventListener("play",()=>{G.value&&(()=>{if(null!==P)return;const e=()=>{P=null;const a=w.value;!a||a.paused||a.ended||(W(a,I.value),P=requestAnimationFrame(e))};P=requestAnimationFrame(e)})()}),e.addEventListener("pause",()=>{G.value&&X()})),e&&D(()=>H())}),U(()=>f.videoUrl,()=>{D(()=>{q(),H()})});const K=E(!1),Z=E(!1),ee=E(f.unlocked),ae=M(()=>0!==f.money&&!ee.value),le=M(()=>f.videoUrl&&k(f.videoUrl));U(()=>f.unlocked,e=>{ee.value=e});let oe=null;j(()=>{D(()=>{ae.value&&(oe&&(oe.disconnect(),oe=null),y.value&&(oe=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?be():xe()})},{threshold:.5}),oe.observe(y.value)))})}),A(()=>{oe&&(oe.disconnect(),oe=null),Q(),X(),F(),B()}),U(ae,e=>{D(()=>{e||(xe(),oe&&(oe.disconnect(),oe=null))})});const fe=()=>{var e;f.videoUrl&&!le.value&&(g.value&&(e=g.value,ie&&ie!==e&&ie.pause(),ie=e,g.value.muted=!1,g.value.play().then(()=>{K.value=!0}).catch(e=>{K.value=!1})))},be=()=>{f.videoUrl&&!le.value&&w.value&&(w.value.muted=!0,w.value.play().catch(e=>{}))},xe=()=>{le.value||w.value&&(w.value.pause(),w.value.currentTime=0)};function ye(){}function ge(){K.value=!1,re(g.value)}function we(){K.value=!1,re(g.value)}function ke(){}function _e(){if(ae.value&&y.value){const e=y.value.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight;e.top<a&&e.bottom>0&&be()}}function Ie(){i("album_vid_fail",{videoId:f.videoId})}async function Ce(e){if("VIDEO"!==e.target.tagName||!K.value)if(ae.value){try{await m.getUserInfo()}catch(a){}(Number(m.userInfo.diamondCount)||0)>=(Number(f.money)||0)?await async function(){if(Z.value||!f.videoId)return;i("album_vid_pay",{videoId:f.videoId,money:f.money}),Z.value=!0;try{await r.unlockVideo(f.videoId,f.botId),await m.getUserInfo(),i("album_vid_pay_success",{videoId:f.videoId,money:f.money}),ee.value=!0,b("unlock-success",f.videoId),n.success(h("dialogVideoUnlock.unlockSuccess"))}catch(a){i("album_vid_pay_fail",{videoId:f.videoId,money:f.money}),n.error(Y(a,h,"dialogVideoUnlock.unlockFailed"))}finally{Z.value=!1}}():v.setVideoUnlockData({videoId:f.videoId,coverUrl:"",money:f.money,botId:f.botId,source:"album"})}else K.value?le.value||g.value&&(g.value.pause(),K.value=!1,re(g.value)):fe()}return u({markAsUnlocked:()=>{ee.value=!0},videoId:f.videoId}),(a,l)=>(S(),N("div",{class:"gallery-video-item relative aspect-[9/16] rounded-xl overflow-hidden bg-[rgb(38,38,41)] cursor-pointer",ref_key:"containerRef",ref:y,onClick:Ce},[ae.value?(S(),N(L,{key:1},[l[3]||(l[3]=R("div",{class:"video-badge absolute top-2 right-2 bg-black/60 px-2 py-0.5 rounded text-white text-xs font-medium z-10"}," VIDEO ",-1)),le.value?(S(),N("img",{key:0,src:e.videoUrl,class:"w-full h-full object-cover rounded-xl blur-xl",onLoad:ke,onError:Ie},null,40,ue)):(S(),N(L,{key:1},[G.value?(S(),N("div",de,[R("video",{ref_key:"lockedVideoRef",ref:w,class:"card-image-offscreen",loop:"",muted:"",playsinline:"",autoplay:"",preload:"auto",disablepictureinpicture:"",disableremoteplayback:"",controlslist:"nodownload noremoteplayback nofullscreen","x-webkit-airplay":"deny",crossorigin:"anonymous",onLoadeddata:ke,onCanplay:_e,onError:Ie},null,544),R("canvas",{ref_key:"lockedVideoCanvasRef",ref:I,class:"absolute inset-0 w-full h-full rounded-xl blur-xl",style:{"z-index":"1"}},null,512)])):(S(),N("video",{key:1,ref_key:"lockedVideoRef",ref:w,class:"w-full h-full object-cover rounded-xl blur-xl",loop:"",muted:"",playsinline:"",autoplay:"",preload:"auto",onLoadeddata:ke,onCanplay:_e,onError:Ie},null,544))],64)),R("div",ve,[l[2]||(l[2]=R("div",{class:"w-[32px] h-[32px] mb-2"},[R("img",{src:J,class:"w-full h-full object-contain",alt:"locked"})],-1)),R("div",pe,[R("img",{src:x.value,alt:"diamond",class:"w-[14px] h-[14px] object-cover"},null,8,me),R("span",he,V(e.money),1)])])],64)):(S(),N(L,{key:0},[l[1]||(l[1]=R("div",{class:"video-badge absolute top-2 right-2 bg-black/60 px-2 py-0.5 rounded text-white text-xs font-medium z-10"}," VIDEO ",-1)),le.value?(S(),N("img",{key:0,src:e.videoUrl,class:"w-full h-full object-cover rounded-xl",onLoad:ye,onError:Ie},null,40,ne)):(S(),N(L,{key:1},[G.value?(S(),N("div",se,[R("video",{ref_key:"videoRef",ref:g,class:"card-image-offscreen",loop:"",playsinline:"",preload:"auto",disablepictureinpicture:"",disableremoteplayback:"",controlslist:"nodownload noremoteplayback nofullscreen","x-webkit-airplay":"deny",crossorigin:"anonymous",onLoadeddata:ye,onEnded:ge,onPause:we,onError:Ie},null,544),R("canvas",{ref_key:"videoCanvasRef",ref:_,class:"absolute inset-0 w-full h-full rounded-xl",style:{"z-index":"1"}},null,512)])):(S(),N("video",{key:1,ref_key:"videoRef",ref:g,class:"w-full h-full object-cover rounded-xl",loop:"",playsinline:"",preload:"auto",disablepictureinpicture:"",disableremoteplayback:"",controlslist:"nodownload noremoteplayback nofullscreen","x-webkit-airplay":"deny",onLoadeddata:ye,onEnded:ge,onPause:we,onError:Ie},null,544))],64)),K.value||le.value?T("",!0):(S(),N("div",ce,[...l[0]||(l[0]=[R("div",{class:"w-[40px] h-[40px] bg-black/50 rounded-full flex items-center justify-center"},[R("svg",{class:"w-5 h-5 text-white ml-0.5",fill:"currentColor",viewBox:"0 0 24 24"},[R("path",{d:"M8 5v14l11-7z"})])],-1)])]))],64))],512))}}),[["__scopeId","data-v-d419c7b2"]]),be=e=>{window.__PRERENDER_ERROR__=e},xe=()=>{const{t:e}=te();let a=!1,l=setTimeout(()=>{l=null,window.__PRERENDER_READY__||be("character SEO failed: timed out waiting for bot detail")},15e3);const t=()=>{null!==l&&(clearTimeout(l),l=null)};$(t);return{updateCharacterSeo:async l=>{if(t(),a)return!1;if(!l.personName||!l.personName.trim())return be("character SEO failed: bot name is empty"),!1;const o=(()=>{var e,a,l;const t=null==(a=null==(e=window.__APP_CONFIG__)?void 0:e.seo)?void 0:a.title;return(null==(l=null==t?void 0:t.split(/\s+-\s*/)[0])?void 0:l.trim())||"OnlyGF"})(),i=window.location.href,r=((e,a,l)=>{const t=[];e.personName&&t.push(e.personName),e.age&&t.push(`${a("seo.characterDetail.age")}:${e.age}`),e.vocation&&t.push(`${a("seo.characterDetail.career")}:${e.vocation}`),e.height&&t.push(`${a("seo.characterDetail.height")}:${e.height}`),e.constellation&&t.push(`${a("seo.characterDetail.constellation")}:${e.constellation}`);const o=a("seo.characterDetail.titlePrefix"),i=`${a("seo.characterDetail.aiGirlfriend")}|${l}`;return`${o}:${t.length>0?t.join(","):""}—${i}`})(l,e,o),n=((e,a,l)=>{const t=a("seo.characterDetail.descriptionTemplate",{name:e.personName||"",appName:l});return e.introduction&&e.introduction.trim()?`${e.introduction}\n${t}`:t})(l,e,o),s=((e,a)=>{const l=[];if(e.personName&&l.push(e.personName),l.push("AI girlfriend","AI chat"),e.vocation&&l.push(e.vocation),e.userTags&&e.userTags.length>0){const a=e.userTags.slice(0,5);l.push(...a)}return l.push(a),l.join(", ")})(l,o),c=((e,a)=>{const l={"@context":"https://schema.org","@type":"Person",gender:"Female",url:a};return e.personName&&(l.name=e.personName),e.introduction&&(l.description=e.introduction),e.headerUrl&&(l.image=e.headerUrl),e.vocation&&(l.jobTitle=e.vocation),e.height&&(l.height=String(e.height)),e.age&&(l.age=e.age),e.constellation&&(l.constellation=e.constellation),e.bloodType&&(l.bloodType=e.bloodType),l})(l,i);try{d({title:r,meta:[{name:"description",content:n},{name:"keywords",content:s},{property:"og:title",content:r},{property:"og:description",content:n},{name:"twitter:title",content:r},{name:"twitter:description",content:n}],script:[{type:"application/ld+json",children:JSON.stringify([c])}]}),await D(),await new Promise(e=>setTimeout(e,20))}catch(u){return be(`character SEO failed: head update error - ${String(u)}`),!1}return a=!0,window.__PRERENDER_READY__=!0,!0},markCharacterSeoError:e=>{t(),be(`character SEO failed: ${e}`)}}},ye={class:"character-container min-h-screen bg-[#121216] text-white overflow-x-hidden"},ge={class:"max-w-[1280px] mx-auto pt-[0px] pb-[84px] xl:py-[24px]"},we={class:"character-container-headder fixed top-0 left-0 right-0 z-10 h-[75px] md:hidden"},ke={class:"absolute top-[16px] left-[16px]"},_e={key:0,class:"detail-load-failed"},Ie={key:1,class:"flex flex-col xl:flex-row mb-0 xl:mb-[43px]"},Ce={class:"mb-6 xl:mb-0 relative flex-shrink-0 character-image-container pl-[0px] xl:pl-[24px]"},Ue={class:"relative"},Ee={class:"xl:rounded-[24px] rounded-[0px] overflow-hidden bg-gray-800 character-image-wrapper aspect-[3/4] overflow-hidden"},je={class:"live-entry-inner"},De={key:2,class:"absolute bottom-4 left-4 px-3 py-1 rounded-full text-xs font-medium flex items-center online-status-bg"},Ae={class:"xl:w-2/3 flex-grow xl:ml-[20px] px-[16px] xl:px-[24px] flex flex-col justify-between"},Se={class:"flex items-center mb-1 character-name-row"},Ne={class:"text-[24px] md:text-[40px] font-bold text-white mr-2"},Le={class:"flex items-center mb-4 character-stats-row"},Re={class:"text-[14px] text-[#9CA3AF] font-medium"},Te={class:"text-[rgba(255,255,255,0.6)] text-[14px] mb-[16px]"},Ve={class:"flex flex-wrap mb-[16px] attributes-container"},Me={class:"w-8 h-8 flex items-center justify-center mr-2 flex-shrink-0"},$e=["src","alt"],Pe={class:"min-w-0 flex-1"},ze={class:"text-xs text-gray-400"},Oe={class:"text-white font-medium text-sm"},Fe={class:"flex flex-wrap mb-[12px]"},Be={class:"flex h-[76px] xl:h-[56px] xl:relative xl:bottom-auto xl:left-auto xl:right-auto xl:w-auto xl:px-0 xl:py-0 xl:bg-transparent xl:backdrop-filter-none absolute bottom-0 left-0 right-0 p-[16px] bg-[rgba(26,26,29,0.8)] backdrop-blur-[9px] z-50"},qe={key:2,class:"w-full px-[16px] xl:px-[24px]"},He={class:"text-[25px] font-bold text-white mb-[24px] py-[10px] gradient-divider"},Ge={key:0,class:"flex flex-wrap gallery-container"},We=["onClick"],Qe={key:0,class:"absolute inset-0 flex flex-col items-center justify-center bg-black/30 rounded-xl cursor-pointer"},Xe={class:"flex items-center bg-black/50 px-2 py-1 rounded-full"},Je=["src"],Ye={class:"text-white text-xs ml-1 font-medium"},Ke={key:1,class:"gallery-no-data mt-[48px]"},Ze=u(C({name:"CharacterPage",__name:"index",setup(o){const s=X(),c=G(),{toCharacterChat:u}=oe(),{toggleLike:d,toggleCollect:k}=ee(),{updateCharacterSeo:C,markCharacterSeoError:D}=xe(),A=a(),$=l(),Y=t(),te=M(()=>$.device===y.MOBILE?64:56),ie=M(()=>$.device===y.MOBILE),re=M(()=>$.appConfig.profileIcons),ne=M(()=>$.appConfig.coinIconSrc),se=v.global.t,ce=E(""),ue=E(!1),de=E(!1),ve=E(!1),pe=E(!1),me=()=>!!m(h)||(A.showLoginDialog=!0,!1),he=E([]),be=E([]),Ze=E(!1),ea=E([]),aa=E(0),la=e=>{va()},ta=()=>{},oa=E({name:"",mainImage:"",headerUrl:"",chatStatus:0,isLive:!1,likes:"0",views:"0",stats:[{icon:"ri-heart-fill",color:"#A0A0A1",value:"0",key:"likes"},{icon:"ri-chat-3-fill",color:"#A0A0A1",value:"0",key:"views"}],description:"",attributes:[],tags:[]}),ia=M(()=>oa.value.headerUrl||""),ra=M(()=>1===oa.value.isLive),na=async()=>{var e;ce.value&&ra.value&&(i("character_live_entry_click",{userId:ce.value}),await f({router:s,userId:ce.value,portraitUrl:b(null==(e=oa.value.bodyMedias)?void 0:e[0]),roomImageUrl:oa.value.intimacyLoading,avatarUrl:ia.value||"",characterName:oa.value.personName||oa.value.name,showLiveAvatar:ra.value,avatarSize:te.value}))},sa=()=>{u(ce.value)},ca=async e=>{if(ce.value&&me())try{if("like"===e)return void(ue.value=await d(ce.value,!!ue.value,ce.value));de.value=await k(ce.value,!!de.value)}catch(a){}},ua=()=>{A.showShareDialog=!0},da=()=>{A.reportUserId=ce.value,A.showReportDialog=!0},va=async()=>{if(ce.value){if(!m(h))return he.value=[],void(be.value=[]);try{const e=await p.botAlbums({userId:ce.value,page:1,size:100});e&&Array.isArray(e)&&e.length>0?(he.value=e.filter(e=>e.url||e.videoUrl).map(e=>({id:e.photoId,url:e.url,title:e.title,money:e.money||0,enableView:e.enableView??!0,mediaType:e.mediaType||"image",videoId:e.videoId,videoUrl:e.videoUrl,videoCoverUrl:e.videoCoverUrl,videoMoney:e.videoMoney||0,videoEnableView:e.videoEnableView??!1})),be.value=he.value.filter(e=>"image"===e.mediaType&&e.enableView).map(e=>e.url)):(he.value=[],be.value=[])}catch(e){he.value=[],be.value=[]}}},pa=()=>{},ma=()=>{va()};return U(()=>A.showPhotoUnlockDialog,(e,a)=>{!0===a&&!1===e&&va()}),U(()=>A.showVideoUnlockDialog,(e,a)=>{!0===a&&!1===e&&va()}),j(async()=>{ce.value=c.params.id||c.query.id,ce.value&&((async()=>{if(ce.value)try{ve.value=!0,pe.value=!1;const e=await p.botDetail({userId:ce.value});if(e){const a=e;oa.value={name:a.personName||"Unknown Character",intimacyLoading:a.intimacyLoading,bodyMedias:a.bodyMedias||[],headerUrl:a.headerUrl||"",chatStatus:a.chatStatus??0,isLive:a.isLive??!1,likes:a.likeCount?a.likeCount.toString():"0",views:a.chatsCount?a.chatsCount.toString():"0",stats:[{icon:"ri-heart-fill",color:"#A0A0A1",value:a.likeCount?a.likeCount.toString():"0",key:"likes"},{icon:"ri-chat-3-fill",color:"#A0A0A1",value:a.chatsCount?a.chatsCount.toString():"0",key:"views"}],description:a.introduction||"",attributes:[{label:se("characterDetail.age"),value:a.age?a.age.toString():se("characterDetail.unknown"),icon:re.value.age},{label:se("characterDetail.career"),value:a.vocation||se("characterDetail.unknown"),icon:re.value.career},{label:se("characterDetail.height"),value:a.height?`${a.height}cm`:se("characterDetail.unknown"),icon:re.value.height},{label:se("characterDetail.constellation"),value:a.constellation||se("characterDetail.unknown"),icon:re.value.constellation},{label:se("characterDetail.bloodType"),value:a.bloodType||se("characterDetail.unknown"),icon:re.value.bloodType}],tags:a.userTags||[]},ue.value=a.isLiked,de.value=a.isFavorite,C(a)}}catch(e){return pe.value=!0,void D("bot detail request failed")}finally{ve.value=!1}})(),va())}),(a,l)=>{const t=I,o=_,s=w,c=g,u=x,d=e;return S(),N("div",ye,[R("div",ge,[R("div",we,[R("div",ke,[P(t,{color:"var(--white-color)"})])]),pe.value?(S(),N("div",_e,[P(ae)])):T("",!0),pe.value?T("",!0):(S(),N("div",Ie,[R("div",Ce,[R("div",Ue,[R("div",Ee,[P(o,{bodyMedias:oa.value.bodyMedias,alt:oa.value.name,class:"w-full h-full object-cover object-top"},null,8,["bodyMedias","alt"])]),ra.value?(S(),N("button",{key:0,class:"live-entry-btn absolute z-[3]",onClick:z(na,["stop"])},[R("div",je,[P(s,{avatar:ia.value,size:te.value,type:"girl","show-live":ra.value,class:"live-entry-avatar"},null,8,["avatar","size","show-live"])])])):T("",!0),ra.value?(S(),O(c,{key:1,"dot-position":ie.value?"left":"right",class:F(["absolute z-[3]",ie.value?"bottom-4 left-4":"top-4 right-4"])},null,8,["dot-position","class"])):(S(),N("div",De,[l[3]||(l[3]=R("div",{class:"w-2 h-2 bg-green-500 rounded-full mr-2"},null,-1)),B(" "+V(q(se)("characterDetail.online")),1)])),R("button",{class:"absolute bottom-4 right-4 w-10 h-10 rounded-full flex items-center justify-center bg-black/50 backdrop-blur hover:opacity-80",onClick:l[0]||(l[0]=e=>ca("like"))},[ue.value?(S(),O(u,{key:1,name:"heart-fill",size:"20",color:"var(--heart-fill-color)"})):(S(),N(L,{key:0},[P(u,{name:"heart-line",size:"20",class:"group-hover:hidden"}),P(u,{name:"heart-fill",size:"20",class:"hidden group-hover:block",color:"var(--heart-fill-color)"})],64))])])]),R("div",Ae,[R("div",null,[R("div",Se,[R("h1",Ne,V(oa.value.name),1),R("div",{class:"w-[28px] h-[28px] rounded-full flex items-center justify-center hover:bg-[rgba(255,255,255,0.05)] transition-colors p-1",onClick:da},[P(u,{name:"information-line",color:"var(--font-color-60)",size:"20"})])]),R("div",Le,[(S(!0),N(L,null,H(oa.value.stats,(e,a)=>(S(),N("div",{key:e.key,class:F(["flex items-center",{"mr-6":a<oa.value.stats.length-1}])},[(S(),O(Q(e.icon),{style:W({color:e.color}),class:"mr-[6px]",size:"18"},null,8,["style"])),R("span",Re,V(e.value),1)],2))),128))]),R("div",Te,V(oa.value.description),1),R("div",Ve,[(S(!0),N(L,null,H(oa.value.attributes,e=>(S(),N("div",{key:e.label,class:"flex items-center attribute-item"},[R("div",Me,[R("img",{src:e.icon,alt:e.label,class:"w-6 h-6 object-contain"},null,8,$e)]),R("div",Pe,[R("div",ze,V(e.label),1),R("div",Oe,V(e.value),1)])]))),128))]),R("div",Fe,[(S(!0),N(L,null,H(oa.value.tags,e=>(S(),N("span",{key:e,class:"px-3 py-1 bg-[#26262C] rounded-full text-sm text-white mr-2 mb-2"},V(e),1))),128))])]),R("div",Be,[R("button",{class:"flex-1 py-3 rounded-[10px] font-semibold hover:opacity-90 mr-4 text-[16px] text-white custom-gradient text-center",onClick:sa},V(q(se)("characterDetail.chatToMe")),1),R("button",{class:F(["px-6 py-3 rounded-xl font-semibold border transition-colors mr-4 text-[16px] text-center",de.value?"bg-[#757577] text-white border-[#757577]":"bg-white text-gray-900 border-gray-300 hover:bg-gray-100"]),onClick:l[1]||(l[1]=e=>ca("collect"))},V(de.value?q(se)("characterDetail.collected"):q(se)("characterDetail.collect")),3),R("button",{class:"px-6 py-3 bg-[transparent] text-white rounded-xl font-semibold border border-[rgba(255,255,255,0.3)] hover:opacity-80 transition-colors text-[16px] text-center",onClick:ua},V(q(se)("characterDetail.share")),1)])])])),pe.value?T("",!0):(S(),N("div",qe,[R("div",He,V(q(se)("characterDetail.gallery")),1),he.value&&he.value.length>0?(S(),N("div",Ge,[(S(!0),N(L,null,H(he.value,(e,a)=>(S(),N("div",{key:e.id,class:"gallery-item"},["video"===e.mediaType?(S(),O(fe,{key:0,"video-id":e.videoId,"video-url":e.videoUrl,title:e.title,money:e.videoMoney||0,unlocked:e.videoEnableView||!1,"bot-id":Number(ce.value),onUnlockSuccess:la},null,8,["video-id","video-url","title","money","unlocked","bot-id"])):(S(),N("div",{key:1,onClick:l=>(async(e,a)=>{if("video"!==e.mediaType)if(e.enableView){const e=he.value.slice(0,a+1).filter(e=>"image"===e.mediaType&&e.enableView).length-1;ea.value=be.value,aa.value=e,Ze.value=!0}else{if(!me())return;try{await Y.getUserInfo();if((Number(Y.userInfo.diamondCount)||0)>=(Number(e.money)||0))try{return await r.unlockPhoto(e.id,Number(ce.value)),await Y.getUserInfo(),i("album_photo_pay_success",{photoId:e.id,money:e.money}),n.success(se("dialogPhotoUnlock.unlockSuccess")),void(await va())}catch(l){return i("album_photo_pay_fail",{photoId:e.id,money:e.money}),void n.error(se("dialogPhotoUnlock.unlockFailed"))}}catch(l){}A.setPhotoUnlockData({photoId:e.id,photoUrl:e.url,money:e.money,source:"album",botId:Number(ce.value)})}})(e,a),class:"rounded-xl overflow-hidden bg-[rgb(38,38,41)] transition-opacity relative aspect-[9/16] cursor-pointer"},[P(d,{id:e.id,src:e.url,alt:e.title||"Gallery image",watermark:!1,class:F(["w-full h-full object-cover",{"blur-xl":!e.enableView}])},null,8,["id","src","alt","class"]),e.enableView?T("",!0):(S(),N("div",Qe,[l[4]||(l[4]=R("div",{class:"w-[32px] h-[32px] mb-2"},[R("img",{src:J,class:"w-full h-full object-contain",alt:"locked"})],-1)),R("div",Xe,[R("img",{src:ne.value,alt:"diamond",class:"w-[14px] h-[14px] object-cover"},null,8,Je),R("span",Ye,V(e.money),1)])]))],8,We))]))),128))])):(S(),N("div",Ke,[P(ae)]))]))]),P(K,{visible:q(A).showPhotoUnlockDialog,onClosed:pa,onUnlockSuccess:ma},null,8,["visible"]),P(Z,{visible:q(A).showVideoUnlockDialog,onClosed:ta},null,8,["visible"]),P(le,{show:Ze.value,"url-list":ea.value,"initial-index":aa.value,"hide-on-click-modal":!0,onClose:l[2]||(l[2]=e=>Ze.value=!1)},null,8,["show","url-list","initial-index"])])}}}),[["__scopeId","data-v-74ac299e"]]);export{Ze as default};