PageSourceSearch

https://chocozap.jp/_nuxt/B7nW2RwN.js

js chocozap.jp collected 2026-09-24 18:01:41 UTC 5,553 bytes, 1 lines download raw bytes

1import{J as n,K as d}from"./SKGDL43O.js";const h={state:{isNewsLoading:!1,newsTotalPageCount:0,newsCurrentPage:0,newsList:[],newsError:"",newsFinished:!1,importantNewsTotalPageCount:0,importantNewsCurrentPage:0,importantNewsList:[],importantNewsFinished:!1,newsDetail:null,isNewsDetailsLoading:!1,newsTabStatus:-1,newsStudios:[]},actions:{setNewsLoading(e){this.isNewsLoading=e},setNewsList(e){e.isImportant?this.importantNewsList.push(...e.list):this.newsList.push(...e.list)},setNewsCurrentPage(e){e.isImportant?this.importantNewsCurrentPage=e.value:this.newsCurrentPage=e.value},setNewsTotalPageCount(e){e.isImportant?this.importantNewsTotalPageCount=e.value:this.newsTotalPageCount=e.value},setNewsFinished(e){e.isImportant?this.importantNewsFinished=e.stat:this.newsFinished=e.stat},setNewsDetail(e){this.newsDetail=e},setNewsError(e){this.newsError=e},setNewsTabStatus(e){this.newsTabStatus=e},setNewsStudios(e){e&&e.length>0?this.newsStudios=e:this.newsStudios.splice(0)},resetNewsList(e){e?(this.importantNewsTotalPageCount=0,this.importantNewsCurrentPage=0,this.importantNewsFinished=!1,this.importantNewsList.splice(0)):(this.newsList.splice(0),this.newsTotalPageCount=0,this.newsCurrentPage=0,this.newsFinished=!1),this.isNewsLoading=!1,this.newsError=""},async fetchNewsList(e){this.setNewsLoading=!0;let t=null,s=null,i=this.newsCurrentPage,w=this.newsTotalPageCount,c=this.newsFinished;const r=e&&!!e.isImportant,l=new URLSearchParams;if(e){let a=r?"is_important=true":"is_important=false";e.studios&&e.studios.length>0&&(a=`${a} OR :R(tag:q| ext_col_01 in [${e.studios.map(o=>`"${o}"`).join(",")}] |)`),r&&(i=this.importantNewsCurrentPage,w=this.importantNewsTotalPageCount,c=this.importantNewsFinished),a.length>0&&l.append("filter",a),e.newsLimit&&parseInt(e.newsLimit)>0&&l.append("cnt",e.newsLimit)}if((i===0||i<w)&&!c){const a=i===0?null:++i;a&&l.append("pageID",a);let o;try{if(o=await fetch(`${n().$config.public.kuroco.news.list}${l.toString().length>0?"?"+l.toString():""}`,{}),o&&o.status===200){const g=await o.json();t=g.list,s=g.pageInfo}else throw new Error("response error.")}catch(g){return window.console.error(`Error: api request failed. ${n().$config.public.kuroco.news.list} %O`,g),this.setNewsError("Fetch Error."),this.setNewsFinished({isImportant:r,stat:!0}),this.setNewsLoading(!1),new Error("api request failed.")}s&&t&&t.length>0&&(c=s.pageNo===s.totalPageCnt,this.setNewsError(""),this.setNewsList({isImportant:r,list:t}),this.setNewsCurrentPage({isImportant:r,value:parseInt(s.pageNo)}),this.setNewsTotalPageCount({isImportant:r,value:parseInt(s.totalPageCnt)}),this.setNewsFinished({isImportant:r,stat:c})),this.setNewsLoading=!1}else this.setNewsLoading=!1}
1,async fetchNewsDetail(e){if(e)try{this.isNewsDetailsLoading=!0;const t=await fetch(`${n().$config.public.kuroco.news.detail}/${e}`);if(t&&t.status===200){const s=await t.json();s&&"details"in s&&(this.isNewsDetailsLoading=!1,this.setNewsDetail(s.details))}}catch(t){return window.console.error(`Error: api request failed. ${n().$config.public.kuroco.news.detail} %O`,t),this.isNewsDetailsLoading=!1,new Error("api request failed.")}}}},p={state:{bannerBeginner:null,bannerBeginnerLoading:!1,bannerInitialZero:null,bannerInitialZeroLoading:null},actions:{setBannerBeginner(e){this.bannerBeginner=e},setBannerBeginnerLoading(e){this.bannerBeginnerLoading=e},setBannerInitialZero(e){this.bannerInitialZero=e},setBannerInitialZeroLoading(e){this.bannerInitialZeroLoading=e},async getBannerBeginner(){if(!this.bannerBeginnerLoading){this.setBannerBeginnerLoading(!0);try{const e=await fetch(`${n().$config.public.kuroco.banners.beginner}`);if(e&&e.status===200){const t=await e.json();t&&t.list&&t.list.length>0&&this.setBannerBeginner(t.list)}}catch(e){return window.console.error(`Error: api request failed. ${n().$config.public.kuroco.banners.beginner} %O`,e),new Error("api request failed.")}}},async getBannerInitialZero(){if(!this.bannerInitialZeroLoading){this.setBannerInitialZeroLoading(!0);try{const e=await fetch(`${n().$config.public.kuroco.banners.initialZero}`);if(e&&e.status===200){const t=await e.json();t&&t.list&&t.list.length>0&&this.setBannerInitialZero(t.list)}}catch(e){return window.console.error(`Error: api request failed. ${n().$config.public.kuroco.banners.initialZero} %O`,e),new Error("api request failed.")}}}}},u={state:{voiceTagList:[],voicePurposeTagList:[],voiceAgeTagList:[],voiceFilterAgeList:[]},getters:{getPurposeName:e=>t=>{const s=e.voicePurposeTagList.find(i=>i.topics_id===t);return s?s.name:""},getAgeName:e=>t=>{const s=e.voiceAgeTagList.find(i=>i.topics_id===t);return s?s.name:""}},actions:{async fetchVoiceTagList(){try{if(this.voiceTagList.length===0){const e=await fetch(`${n().$config.public.kuroco.voices.tags}`,{});e&&e.status===200&&(this.voiceTagList=await e.json(),this.voicePurposeTagList=f(this.voiceTagList,"purpose_tag"),this.voiceAgeTagList=f(this.voiceTagList,"age_tag"),this.voiceFilterAgeList=N(this.voiceAgeTagList))}}catch(e){window.console.error(`Error: api request failed. ${n().$config.public.kuroco.voices.tags} %O`,e)}}}},L=[{label:"20〜30代",ages:["20代","30代"]},{label:"40〜50代",ages:["40代","50代"]},{label:"60代以上",ages:["60代","70代"]}],f=(e,t)=>{const s=e.find(i=>i.category.slug===t);return s?s.list:[]},N=e=>L.map(t=>({key:e.filter(i=>t.ages.includes(i.name)).map(i=>i.topics_id).join("-"),label:t.label})),b=d("kuroco",{state:()=>({...h.state,...p.state,...u.state}),getters:{...u.getters},actions:{...h.actions,...p.actions,...u.actions}});export{b as u};

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.