1import{er as e,nr as t,t as n,tr as r}from"./D3jU4pM2.js";var i=class{fetch;resource=`/api/v2/Tags`;constructor({fetch:e}){this.fetch=e}async getTagList(e){return this.fetch(this.resource,{params:e}).then(e=>e&&e.length?e:[]).catch(e=>(console.error(`[TagRepo] getTagList() Request error caught`,e),[]))}async getTagContentDetail(e){let t={items:[],total:1,page:1,pages:1};return this.fetch(`${this.resource}/content`,{params:e}).then(e=>{let{items:n,page:r,pages:i}=e;return t.items=n||[],t.page=r||1,t.pages=i||1,t}).catch(e=>(console.error(`[TagRepo] getTagContentDetail() Request error caught`,e),t))}async getSportsFilter(){return this.fetch(`${this.resource}/filters`).then(e=>e&&e.length?e:[]).catch(e=>(console.error(`[TagRepo] getSportsFilter() Request error caught`,e),[]))}async getTaggedContent(t){let{props:r}=t,i=new n(r.start,r.count),a={$pageIndex:i.pageIndex,$pageSize:i.pageSize,slug:r.extra?.slug??void 0,sectionName:r.extra?.section??void 0,sportId:r.extra?.sport??r.sport_id??void 0};return this.fetch(`${this.resource}/content`,{params:a}).then(t=>{if(!t?.items?.length)return console.error(`[TagRepo] getTaggedContent() fetch error`),[];let n=t.items.map(t=>e(t));return i.getData(n)}).catch(e=>(console.error(`[TagRepo] getTaggedContent() mapping error caught`,e),[]))}async getTags(e){let{props:t}=e,i={sportId:t.extra?.sport??t.sport_id??void 0,sectionName:t.extra?.section??void 0};return this.fetch(this.resource,{params:i}).then(e=>{if(!e||!e.length)return console.error(`[TagRepo] getTags() fetch error`),[];let a=new n(t.start,t.count),o=e.map(e=>r(e,i.sportId));return o?.length?a.getData(o):[]}).catch(e=>(console.error(`[TagRepo] getTags() mapping error caught`,e),[]))}async getTagsContent(e){let{props:r}=e,i=new n(r.start,r.count),a={$pageIndex:i.pageIndex,$pageSize:i.pageSize,slug:`extra`in r&&r?.extra?.slug?r.extra.slug:void 0,sectionName:`extra`in r&&r?.extra?.section?r.extra.section:void 0,sportId:r.sport_id&&r.sport_id!=`0`?r.sport_id:void 0};return this.fetch(`${this.resource}/content`,{params:a}).then(e=>{let n=e?.items?.map(e=>t(e));return n?.length?i.getData(n):[]}).catch(e=>(console.error(`[TagRepo] getTagsContent() Request error caught`,e),[]))}};export{i as 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.