PageSourceSearch

https://magiclight.ai/assets/BBRFDMJb.js

js magiclight.ai collected 2026-09-24 11:20:42 UTC 12,479 bytes, 1 lines download raw bytes

1import{d as qe,ae as Ye,ar as Je,af as Ze,P as Qe,a8 as $e,aK as We,r as n,bh as Xe,s as ea,c as g,x as aa,w as ta,o as ra,a1 as b,R as L,n as oa,e as sa,M as _,N as c,Q as k,O as v,a2 as p,z as q,an as ia,u as r,a5 as P,F as le,ap as ke,bj as la,a4 as Fe,Y as Te,m as na,cT as ca,cU as ua,bk as va,fJ as pa,aF as x,fp as Ae,fq as ne,fK as da,fL as ma,fs as we,aJ as fa,aL as Ce,fu as be,fv as Le,fr as ha,ft as ya,_ as Sa}from"./O4ENX8gu.js";import"./YIVqrLAq.js";import"./o-bAGOtg.js";import"./C0-vCFeG.js";import"./DjNa1xWm.js";/* empty css        */import"./D6kYyQpC.js";import{u as ga}from"./g3n8zegg.js";import{cloneCharacterFilter as Y,buildCharacterSearchExtra as _a,characterFilterCount as ka,DEFAULT_CHARACTER_FILTER as ce}from"./Dn24McYy.js";import Fa from"./CGiDtFc_.js";import Ta from"./kfLmxjZS.js";import Aa from"./Mnom_6iB.js";import wa from"./DTWZtZ1U.js";import Ca from"./BUSUyUVl.js";import ba from"./8nuEd0C1.js";import La from"./CP2bwzjz.js";import Ma from"./DIX8ebt4.js";import Ra from"./DXvf_gQC.js";import Ea from"./qkKwuYRV.js";import Oa from"./DWqvPGXB.js";import{u as J}from"./Bo6vkxEM.js";import{g as Pa,h as xa,f as V}from"./BXtYTWzS.js";import{DEFAULT_STYLE_FILTER as Me,styleFilterToParams as Va}from"./CDNvr7W3.js";import"./BwwXBuDZ.js";import"./B8LniJga.js";import"./CsJkyEta.js";import"./nVElSCXN.js";import"./D-AQiwyz.js";import"./1Za2NqAL.js";import"./CXB0TDxJ.js";import"./BOOcqttP.js";import"./CWOAZ8ao.js";import"./tZZ-UAnB.js";import"./BHXCOTiQ.js";import"./C90YLRh_.js";import"./DQCAxWWE.js";import"./D0VKpxhp.js";import"./Cj4jaMdK.js";import"./BFxSCKK-.js";import"./Ddpu-TpU.js";import"./-Uy20WTA.js";import"./M6WN_JGi.js";import"./BE_ZTSdW.js";import"./DUbfJiIe.js";import"./CWZWLSOR.js";import"./CxrOaASJ.js";/* empty css        */import"./x451irq7.js";import"./BDz7QYVK.js";import"./Cr8ycYEu.js";import"./grQ0yhiK.js";import"./DAsuw9kH.js";import"./D-wNn0_J.js";import"./D7JaESmj.js";import"./C-WkAPL7.js";import"./CWqJttkY.js";import"./CVytWi4r.js";import"./3ZlknEoX.js";import"./79P8pIax.js";import"./CnEtQz1s.js";import"./BJrITKzJ.js";import"./CD6vVWP6.js";import"./DNSUu4J3.js";import"./HQk3uNLN.js";import"./D5m24wH7.js";import"./Digl7itC.js";import"./4Moiv7kq.js";import"./2S0E6Sti.js";import"./Bw3wNZzH.js";import"./D_3odlpT.js";import"./gEevARHE.js";import"./BbWudjX0.js";import"./CwBl_OLV.js";import"./Bs6Cvsou.js";import"./CMSDecGf.js";import"./kouzHcSR.js";import"./CI5-UG_7.js";import"./BKD6WGOu.js";/* empty css        */import"./D_EYyCph.js";import"./k7QUakkP.js";import"./DYG0ngGZ.js";import"./CpFEeiTj.js";import"./CsgPc__o.js";/* empty css        */import"./gc5pyp6r.js";import"./DxWIh0Iv.js";import"./ezUJ6rSV.js";import"./Dy2mKnnE.js";import"./s53DtYjW.js";import"./D-1FftKh.js";import"./Ba6xf62J.js";import"./CDfo32Nu.js";import"./n_ZV0Vc0.js";import"./ZxH5YlqG.js";import"./4D2AfsJj.js";import"./ChM9q7bh.js";import"./CWtHVt54.js";import"./DJrkp1HG.js";import"./BWILaAtm.js";import"./CENSggcc.js";const Ia={class:"asset-store-page__content"},Ba={class:"asset-store-page__assets"},za={key:0,class:"asset-store-page__tabs-extra"},Ka={key:3,class:"asset-store-page__sort"},Ua={class:"asset-store-page__tab-title"},Da={key:0,class:"asset-store-page__tab-link-icon",viewBox:"0 0 24 24","aria-hidden":"true"},Na=qe({__name:"index",setup(Ga){const{t:M}=Ye(),Z=Je(),Re=Ze(),{isDesktop:Ee}=Qe(),h=$e(),o=We(),l=n("character"),I=n(null),Q=n(null),ue=n(null),ve=Xe("floatingCreateBarRef"),B=n(!1);let m;const pe=new Set(["all","character","visual-style","voice-emotion","polish-skills","favorite"]),$=Array.isArray(Z.query.tabId)?Z.query.tabId[0]:Z.query.tabId,t=n($&&pe.has($)?$:"all"),F=n(),R=n(""),y=n(""),T=n(Y(ce)),E=n([]),O=ea([]),A=n(0),S=n(!1);let d=0;const z=g(()=>_a(y.value,T.value)),K=g(()=>z.value.length>0),de=g(()=>A.value<E.value.length),f=J({pageSize:V.character,fetcher:e=>Ae({...e,...y.value?{name:y.value}:{}}),onLoaded:e=>o.dropFavoriteOverrides(e.map(a=>ne(a.id)))}),Oe=(e,a)=>{const i=new Map(e.map(s=>[String(s.id),s]));return a.map(s=>i.get(s)).filter(s=>!!s)},me=async e=>{var i,s;if(e!==d||S.value||!de.value)return;const a=E.value.slice(A.value,A.value+V.character);S.value=!0;try{const C=await Ae({page:1,pageSize:a.length,assetStoreSort:"forYou",ids:a.join(",")});if(e!==d)return;if(!C.data.isOk){x(C.data.msg);return}const H=Oe((s=(i=C.data.data)==null?void 0:i.data)!=null?s:[],a);o.dropFavoriteOverrides(H.map(u=>ne(u.id))),O.value=[...O.value,...H],A.value+=a.length}catch(C){e===d&&x(M("asset-store.loadFailed"))}finally{e===d&&(S.value=!1)}},fe=async()=>{var a,i;const e=++d;E.value=[],O.value=[],A.value=0,S.value=!0;try{const s=await pa({extra:z.value});if(e!==d)return;if(!s.data.isOk){x(s.data.msg);return}E.value=(i=(a=s.data.data)==null?void 0:a.ids)!=null?i:[]}catch(s){e===d&&x(M("asset-store.loadFailed"))}finally{e===d&&(S.value=!1)}await me(e)},U=()=>{d+=1,E.value=[],O.value=[],A.value=0,S.value=!1},W=n({}),X=n({...Me}),D=J({pageSize:V["visual-style"],fetcher:e=>ha({...e,...W.value}),onLoaded:e=>o.dropFavoriteOverrides(e.map(a=>we(a.id)))}),N=J({pageSize:V["voice-emotion"],fetcher:e=>ya({...e,...F.value===void 0?{}:{usecase:F.value}}),onLoaded:e=>o.dropFavoriteOverrides(e.map(a=>Ce(a.id,a.source||"refVoice")))}),ee=J({pageSize:V["polish-skills"],fetcher:be,onLoaded:e=>o.dropFavoriteOverrides(e.map(a=>Le(a.id)))}),ae=n([]),te=n([]),re=n([]),oe=n([]),G=aa({character:!1,"visual-style":!1,"voice-emotion":!1,"polish-skills":!1}),se=n(!1),j=async(e,a)=>{G[e]=!0;try{await a()}catch(i){x(M("asset-store.loadFailed"))}finally{G[e]=!1}},he=async()=>{G.character||await j("character",async()=>{var a,i;const e=await da({page:1,pageSize:10});if(!e.data.isOk)throw new Error(e.data.msg);ae.value=(i=(a=e.data.data)==null?void 0:a.data)!=null?i:[],o.dropFavoriteOverrides(ae.value.map(s=>ne(s.id)))})},Pe=async()=>{se.value||(se.value=!0,await Promise.allSettled([he(),j("visual-style",async()=>{var a,i;const e=await ma();if(!e.data.isOk)throw new Error(e.data.msg);te.value=(i=(a=e.data.data)==null?void 0:a.data)!=null?i:[],o.dropFavoriteOverrides(te.value.map(s=>we(s.id)))}),j("voice-emotion",async()=>{var a,i;const e=await fa();if(!e.data.isOk)throw new Error(e.data.msg);re.value=(i=(a=e.data.data)==null?void 0:a.data)!=null?i:[],o.dropFavoriteOverrides(re.value.map(s=>Ce(s.id,s.source||"refVoice")))}),j("polish-skills",async()=>{var a,i;const e=await be({page:1,pageSize:10,assetStoreSort:"mostUsed"});if(!e.data.isOk)throw new Error(e.data.msg);oe.value=(i=(a=e.data.data)==null?void 0:a.data)!=null?i:[],o.dropFavoriteOverrides(oe.value.map(s=>Le(s.id)))})]))},w=()=>t.value==="character"?f:t.value==="visual-style"?D:t.value==="voice-emotion"?N:ee,ye=g(()=>t.value==="favorite"?l.value==="character"?h.myFavoriteRolesLoras:l.value==="visual-style"?o.styles.list:l.value==="voice-emotion"?o.voices.list:o.skills.list:t.value==="character"?K.value?O.value:f.list.value:t.value==="visual-style"?D.list.value:t.value==="voice-emotion"?N.list.value:ee.list.value),Se=g(()=>t.value==="favorite"?l.value==="character"?h.isLoading:l.value==="visual-style"?o.styles.loading:l.value==="voice-emotion"?o.voices.loading:o.skills.loading:t.value==="character"&&K.value?S.value:w().loading.value),ge=g(()=>t.value==="favorite"?l.value==="character"?h.hasMoreMyFavoriteRolesData:l.value==="visual-style"?o.styles.hasMore:l.value==="voice-emotion"?o.voices.hasMore:o.skills.hasMore:t.value==="character"&&K.value?de.value:w().hasMore.value),xe=g(()=>w().sort.value),Ve=e=>{e==="character"?(R.value="",y.value="",T.value=Y(ce),U(),f.reset()):e==="visual-style"?(W.value={},X.value={...Me},D.reset()):e==="voice-emotion"?(F.value=void 0,N.reset()):e==="polish-skills"?ee.reset():e==="favorite"&&(l.value="character",o.resetStyles(),o.resetVoices(),o.resetSkills())},ie=async()=>
1{if(t.value==="all"){se.value?await he():await Pe();return}if(t.value==="favorite"){if(l.value==="character"){await h.getMyFavoriteRolesLoraList(!0);return}if(l.value==="visual-style"){await o.loadStyles(!0);return}if(l.value==="voice-emotion"){await o.loadVoices(!0);return}await o.loadSkills(!0);return}const e=w();e.initialized.value||await e.load()},_e=e=>{t.value!==e&&(Ve(t.value),e==="favorite"&&(l.value="character"),t.value=e)},Ie=e=>{const a=String(e);if(a==="my-creations"){b(L.AssetStoreTabClick,{assetType:a,targetPath:"/user-center"}),Re.push("/user-center?tabId=2");return}if(!pe.has(a))return;_e(a),b(L.AssetStoreTabClick,{assetType:a})},Be=e=>_e(e),ze=e=>{t.value!=="favorite"&&(t.value==="character"&&(R.value="",y.value="",T.value=Y(ce),U()),b(L.AssetStoreSortChange,{assetType:t.value,sortBy:e}),w().setSort(e))},Ke=e=>{const a=e.trim();if(a&&b(L.AssetStoreSearch,{assetType:"character",keyword:a}),!(a===y.value&&ka(T.value)===0&&f.initialized.value)){if(y.value=a,!z.value){U(),f.load(!0);return}f.reset(),fe()}},Ue=e=>{if(T.value=Y(e),f.reset(),!z.value){U(),f.load(!0);return}fe()},De=e=>{F.value!==e&&(F.value=e,N.load(!0))},Ne=e=>{X.value=e,W.value=Va(e),D.load(!0)},Ge=e=>{l.value!==e&&(l.value=e,b(L.AssetStoreFavoriteTypeClick,{assetType:e,source:"asset-store"}),ie())};ga({target:ue,itemCount:()=>ye.value.length,loading:()=>Se.value,hasMore:()=>t.value!=="all"&&ge.value,loadMore:()=>{if(t.value==="favorite"){if(l.value==="character"){!h.isLoading&&h.hasMoreMyFavoriteRolesData&&h.getMyFavoriteRolesLoraList();return}if(l.value==="visual-style"){!o.styles.loading&&o.styles.hasMore&&o.loadMoreStyles();return}if(l.value==="voice-emotion"){!o.voices.loading&&o.voices.hasMore&&o.loadMoreVoices();return}!o.skills.loading&&o.skills.hasMore&&o.loadMoreSkills();return}if(t.value==="character"&&K.value){me(d);return}w().loadMore()},root:I,rootMargin:"300px 0px",watchKey:t});const je=()=>{m==null||m.disconnect(),!(!I.value||!Q.value)&&(m=new IntersectionObserver(([e])=>{B.value=!(e!=null&&e.isIntersecting)},{root:I.value,threshold:0}),m.observe(Q.value))},He=()=>{var e;(e=ve.value)==null||e.collapse()};return ta(t,()=>{ie()}),ra(()=>{b(L.AssetStorePageExpose),ie(),oa(je)}),sa(()=>{m==null||m.disconnect()}),(e,a)=>{const i=ua,s=ca,C=la,H=va;return c(),_("main",{ref_key:"pageRef",ref:I,class:"asset-store-page",onScrollPassive:He},[k("div",Ia,[q(Fa),k("section",Ba,[k("div",{ref_key:"tabsSentinelRef",ref:Q,class:"asset-store-page__tabs-sentinel","aria-hidden":"true"},null,512),k("div",{class:ia(["asset-store-page__tabs-wrap",{"asset-store-page__tabs-wrap--stuck":r(B)}])},[q(H,{"active-key":r(t),onTabClick:Ie},{extra:P(()=>[r(B)||r(t)!=="all"?(c(),_("div",za,[r(t)==="character"?(c(),v(ba,{key:0,modelValue:r(R),"onUpdate:modelValue":a[0]||(a[0]=u=>na(R)?R.value=u:null),onSearch:Ke},null,8,["modelValue"])):p("",!0),r(t)==="character"?(c(),v(wa,{key:1,applied:r(T),onApply:Ue},null,8,["applied"])):p("",!0),r(t)==="visual-style"?(c(),v(La,{key:2,applied:r(X),onApply:Ne},null,8,["applied"])):p("",!0),r(t)!=="all"&&r(t)!=="favorite"?(c(),_("div",Ka,[q(s,{"model-value":r(xe),class:"asset-store-page__sort-control",onChange:ze},{default:P(()=>[(c(!0),_(le,null,ke(r(xa),u=>(c(),v(i,{key:u.value,value:u.value},{default:P(()=>[Fe(Te(r(M)(u.labelKey)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["model-value"])])):p("",!0)])):p("",!0)]),default:P(()=>[(c(!0),_(le,null,ke(r(Pa),u=>(c(),v(C,{key:u.key},{title:P(()=>[k("span",Ua,[Fe(Te(r(M)(u.labelKey))+" ",1),u.key==="my-creations"?(c(),_("svg",Da,[...a[1]||(a[1]=[k("path",{d:"M7 7h10v10h-2V10.4l-8.3 8.3-1.4-1.4 8.3-8.3H7V7Z"},null,-1)])])):p("",!0)])]),_:2},1024))),128))]),_:1},8,["active-key"]),r(t)==="voice-emotion"?(c(),v(Oa,{key:0,"model-value":r(F),onChange:De},null,8,["model-value"])):p("",!0),r(t)==="favorite"?(c(),v(Ca,{key:1,"model-value":r(l),onChange:Ge},null,8,["model-value"])):p("",!0)],2),r(t)==="all"?(c(),v(Ma,{key:0,characters:r(ae),styles:r(te),voices:r(re),skills:r(oe),loading:r(G),onMore:Be},null,8,["characters","styles","voices","skills","loading"])):(c(),_(le,{key:1},[q(Ta,{tab:r(t),items:r(ye),loading:r(Se),"has-more":r(ge),"favorite-mode":r(t)==="favorite","favorite-asset-tab":r(t)==="favorite"?r(l):void 0,"favorite-report-source":"asset-store"},null,8,["tab","items","loading","has-more","favorite-mode","favorite-asset-tab"]),k("div",{ref_key:"loadMoreSentinel",ref:ue,class:"asset-store-page__sentinel"},null,512)],64)),r(t)==="all"?(c(),v(Aa,{key:2})):p("",!0),r(t)==="all"?(c(),v(Ea,{key:3})):p("",!0)])]),r(B)&&r(Ee)?(c(),v(Ra,{key:0,ref_key:"floatingCreateBarRef",ref:ve},null,512)):p("",!0)],544)}}}),zr=Sa(Na,[["__scopeId","data-v-1b1eefb5"]]);export{zr as default};

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.