1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BLNQhL3n.js","./F-A8tqvQ.js","./entry.BTbwCG15.css","./Bx7jXMJE.js","./Bt9GSuF_.js","./Index.CvoALSkg.css","./D6-C_K8q.js","./Bgj2xkuJ.js","./Collapse.rCO-YAy1.css","./CZGZtfcc.js","./D_wKZS26.js","./CFKHgDn7.js","./CnzPnBWG.js","./BwRXfLgU.js","./ItemsGrid.BxlD-WGk.css","./BIfICJaJ.js","./PaginateV2.CRlyWPuS.css","./C7yC-G-v.js","./Thumb.BSHGUgK7.css","./IXDYncXU.js","./TeamIcons.BHYpJLtk.css","./DoqsxS_n.js","./Index.BxACKxEd.css","./CQXwTYMW.js","./BVOxe0zc.js","./Select.8XHh1wch.css","./CWy09TJC.js","./PaginateV3.BwumlxdU.css","./BVMoVZvd.js","./NoResult.DWHDFUyM.css","./Agents.DsUh2cWS.css"])))=>i.map(i=>d[i]); 2import{a as X,l as Y,p as ee,B as te,$ as ae,v as l,s as D,V as se,N as ne,a0 as oe,a1 as re,a2 as ie,aQ as le,a4 as ue,a5 as me,o as m,b as _,f as O,e as t,c as S,h as $,D as ce,t as ge,Z as pe,k as f,a6 as de,H as _e,y as fe,d as I,_ as T,A as ve}from"./F-A8tqvQ.js";import{_ as H}from"./CZGZtfcc.js";import{u as ye}from"./ri8agnCJ.js";import{u as he}from"./Dsu1bCfx.js";import{u as we}from"./TzhMCERM.js";import{u as be}from"./BwRXfLgU.js";import{a as z,e as ke}from"./Bt9GSuF_.js";import{f as Pe}from"./D3iN4N-M.js";import{a as q}from"./D_wKZS26.js";import{d as Ce}from"./D2kGUjYG.js";import{a as Le}from"./BzTSvH8o.js";import"./CE1G-McA.js";const Ie=I(()=>T(()=>import("./BLNQhL3n.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(i=>i.default||i)),Te=I(()=>T(()=>import("./D6-C_K8q.js"),__vite__mapDeps([6,1,2,7,8,4,9,10,11,12,13,14,15,16,17,18,19,20,21,22]),import.meta.url).then(i=>i.default||i)),xe=I(()=>T(()=>import("./CQXwTYMW.js"),__vite__mapDeps([23,1,2,24,25,26,27,28,29,4,10,30]),import.meta.url).then(i=>i.default||i)),Re=H+"#grid-1",Ae=H+"#grid-2",We={class:"main weapon"},Ee={class:"f container"},Ne={key:0,"xlink:href":Re},Ve={key:1,"xlink:href":Ae},Be={key:1,class:"container"},De=X({__name:"[id]",async setup(i){let u,v;const{locale:x,t:M}=Y(),o=ee(),w=te(),F=pe().public.siteHost,U=ae(),R=f(()=>U.categories),{compressed:A,toggleCompressed:W}=be(),{defineUseProduct:j}=he(),c=l([]),y=l(0),g=l(Number.parseInt(o.query.page)||1),p=l(!1),b=l({}),k=l(o.query.extra||null),P=l(o.query.rarity||null),C=l(o.query.team||null),L=l(new AbortController),s=f(()=>{let e=null;return R.value.some(a=>a.items.some(r=>o?.params?.id===ke(r?.weapon||"")?(e={...r,category:a.category},!0):!1)),e}),Q=f(()=>{const e={category:o.params.id,page:g.value||1};return k.value&&(e.extra=k.value),P.value&&(e.rarity=P.value),C.value&&(e.team=C.value==="terrorists"?"T":"CT"),e});async function E(){p.value&&(L.value.abort(),L.value=new AbortController),p.value=!0;try{const{data:e,errors:a}=await de(Q.value,L.value?.signal);if(a?.length)throw new Error(a?.[0]?.message);return{items:e.itemsWeaponPage.result,pagesLength:e.itemsWeaponPage.max_pages||0,filters:e.itemsWeaponPageFilters,aggregatedRatingVotes:e?.itemsWeaponPage?.aggregatedRatingVotes,aggregatedRating:e?.itemsWeaponPage?.aggregatedRating}}catch(e){return e.name!=="AbortError"&&_e.$emit("notify",{success:!1,msg:e.message||"An error occurred"}),console.log("getWeaponItems() error",e.message),{items:[],pagesLength:0,filters:{},aggregatedRatingVotes:0,aggregatedRating:0}}finally{p.value=!1}}const{data:d}=([u,v]=D(()=>fe(`weapon-items${o.params.id}-${x.value}`,E,{watch:[s],immediate:!0})),u=await u,v(),u);Pe(!s.value,`Weapon not found: ${o.params.id}`,{upstreamDown:!R.value.length,key:o.fullPath}),c.value=d.value?.items||[],y.value=d.value?.pagesLength||0,b.value=d.value?.filters||{};async function N(e){const a={...o.query};e===1?delete a.page:a.page=e.toString(),await w.push({query:a}).catch(r=>{if(r.name!=="NavigationDuplicated")throw r}),window.scrollTo(0,0)}se(()=>o.query,async e=>{const a={...e},r=Number.parseInt(e.page);if(r===1||r===g.value)delete a.page,await w.replace({query:a});else{g.value=Number.parseInt(e.page)===g.value?1:Number.parseInt(e.page)||1,P.value=e.rarity||null,k.value=e.extra||null,C.value=e.team||null;const h=await E();c.value=h?.items||[],y.value=h?.pagesLength||1}});const n=we({category:s.value?.category,weapon:s.value?.weapon,weapon
2FullName:s.value?.full_name}),V=f(()=>q(s.value?.full_name||"")),B=f(()=>{const e=c.value?.[0],a=e?.link||e?.market_hash_name;return a?q(a):null});Ce("Weapon",{weapon:o.params.id}),ne(()=>{w.replace({query:{}})});const{alternateLinks:Z,canonical:G}=ye(`/weapons/${o.params.id}`);return oe({title:()=>n?.seoTitle,meta:[{name:"keywords",content:n?.keywords||"steam, counter strike global offensive, csgo, cs2, skins, items"}],link:()=>[...Z.value,...B.value?[{rel:"preload",as:"image",fetchpriority:"high",href:B.value}]:[]]}),re({title:()=>n?.seoTitle,ogTitle:()=>n?.seoTitle,description:()=>n?.description,ogDescription:()=>n?.description,twitterCard:"summary_large_image",twitterTitle:()=>n?.seoTitle,twitterDescription:()=>n?.description,ogSiteName:"CSMarketCap",ogUrl:()=>G.value,ogType:"website",ogLocale:()=>x.value}),ie([le({"@type":"Product",name:n?.seoTitle,description:n?.description,image:V.value,url:`${F}${z(s.value?.full_name||"")}`,sku:s.value?.full_name||"",brand:{"@type":"Brand",name:"CSMarketCap"},...Le(d.value?.aggregatedRating,d.value?.aggregatedRatingVotes,s.value?.full_name)}),ue({name:n?.seoTitle,description:n?.description,image:()=>V.value,itemListElement:([u,v]=D(async()=>Promise.all((c.value||[]).filter(e=>e?.market_hash_name).map(async(e,a)=>{const r=await j(e);return{"@type":"ListItem",position:a+1,item:r}}))),u=await u,v(),u)}),me({itemListElement:[{name:()=>M("main"),item:"/"},{name:n?.seoTitle,item:z(s.value?.full_name||"")}]})]),(e,a)=>{const r=Ie,h=Te,J=xe;return m(),_("main",We,[O("div",Ee,[t(s)?(m(),S(r,{key:0,item:t(s),type:"weapon"},null,8,["item"])):$("",!0),O("button",{class:ce([{compressed:t(A)},"compress-btn ht hd"]),"aria-label":"compressed button",onClick:a[0]||(a[0]=(...K)=>t(W)&&t(W)(...K))},[(m(),_("svg",null,[t(A)?(m(),_("use",Ne)):(m(),_("use",Ve))]))],2)]),t(s)&&t(s).weapon!=="Agents"?(m(),S(h,{key:0,filters:t(b),items:t(c),pagination:{page:t(g),pagesLength:t(y)},pending:t(p),"sub-title":t(n)?.subtitle,title:t(n)?.title,weapon:t(s),onOnPageChange:N},null,8,["filters","items","pagination","pending","sub-title","title","weapon"])):t(s)?(m(),_("div",Be,[ge(J,{filters:t(b),items:t(c),loading:t(p),"pages-length":t(y),"sub-title":t(n)?.subtitle,title:t(n)?.title,weapon:t(s),onOnPageChange:N},null,8,["filters","items","loading","pages-length","sub-title","title","weapon"])])):$("",!0)])}}}),Je=ve(De,[["__scopeId","data-v-985755d4"]]);export{Je 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.