PageSourceSearch

https://www.simplifyingthemarket.com/assets/category-page-BdZRrOxC.js

js simplifyingthemarket.com collected 2026-10-02 05:58:47 UTC 4,609 bytes, 1 lines download raw bytes

1import{_ as U}from"./main-layout.vue_vue_type_script_setup_true_lang-BDQNlOoZ.js";import{c as x}from"./content.service-C7lYYbDz.js";import{d as Y,i as g,u as H,k as z,r as l,l as h,m as J,o as K,G as T,n as Q,c as N,b as o,w as W,f as u,g as B,t as q,e as Z,F as X,h as ee,j as te,a as ae}from"./index-CdON2mlb.js";import{_ as le}from"./feed-card.vue_vue_type_script_setup_true_lang-B5Jf5d7I.js";import{_ as ne}from"./pagination-component.vue_vue_type_script_setup_true_lang-DV8z2Klq.js";import"./card-header.vue_vue_type_script_setup_true_lang-BJIcVhWY.js";const oe={key:0,class:"mb-4"},se={key:0,class:"text-2xl font-bold"},ue={key:1,class:"text-2xl font-bold"},re={key:1},ie={class:"text-2xl font-bold"},ce={key:2,class:"flex flex-col gap-4"},ve={key:3,class:"my-5"},de={key:4,class:"my-3"},w=8,_e=Y({__name:"category-page",props:{slug:{required:!1,default:"",type:String},year:{required:!1,type:String},month:{required:!1,type:String},day:{required:!1,type:String},page:{required:!1,type:Number}},setup(C){const e=C,A=ae(),s=Q(),{t:v}=g.global,n=H(),V=z(),P=l([]),r=l([g.global.t("search.notCategory")]),I=l(["invalid"]),y=l([]),i=l(0),G=l(!1),f=l(null),S=l(e.page?e.page:1),b=l("blog"),p=l(1),d=l(1),m=l(1),_=l(""),k=l(""),D=h(()=>new Date(p.value,d.value-1,m.value).toISOString().split("T")[0]+"T05:00:00.000Z"),j=h(()=>new Date(p.value,d.value-1,m.value+1).toISOString().split("T")[0]+"T05:00:00.000Z"),F=h(()=>new Date(p.value,d.value,m.value).toISOString().split("T")[0]+"T05:00:00.000Z"),$=h(()=>new Date(p.value+1,d.value-1,m.value).toISOString().split("T")[0]+"T05:00:00.000Z"),M=h(()=>new Date(_.value).toLocaleDateString("en-us",{month:"long"})),E=h(()=>{let t="";if(e.day){let a=e.day,c=e.month;e.day.length<2&&(a="0"+e.day),e.month&&e.month.length<2&&(c="0"+e.month),t=v("search.day")+x.getDate(e.year+"-"+c+"-"+a+"T05:00:00.000Z"),t=t.includes(parseInt(e.day).toString())?t:v("search.day")+""+v("search.invalid")}else if(e.month)t=v("search.month")+M.value+" "+e.year;else if(e.year)return t=v("search.year")+e.year,t.includes("Invalid")?t.split(":")[0]+v("search.invalidDate"):t;return t}),L=t=>{const a=s.path.split("page")[0];if(a.charAt(a.length-1)==="/"||a+"",t>1&&e.page,Object.keys(s.query).length>0){const c=[];for(const O of Object.keys(s.query))c.push(O+"="+s.query[O])}return{path:s}},R=t=>{const a=L(t);A.push(a.path)};return J(()=>e.page,t=>{t&&(S.value=t)}),K(async()=>{e.year?(p.value=parseInt(e.year),e.day&&e.month?(T.modifyGoogleTagManager("day"),d.value=parseInt(e.month),m.value=parseInt(e.day),_.value=D.value,k.value=j.value,document.title=e.day+" | "+M.value+" | "+e.year+" | "+n.title1+" "+n.title2):e.month?(T.modifyGoogleTagManager("month"),d.value=parseInt(e.month),_.value=D.value,k.value=F.value,document.title=M.value+" | "+e.year+" | "+n.title1+" "+n.title2):(T.modifyGoogleTagManager("year"),document.title=e.year+" | "+n.title1+" "+n.title2,_.value=D.value,k.value=$.value),await x.getContents(S.value-1,w,b.value,g.global.locale,"","",_.value,k.value).then(t=>{t.total_count&&(y.value=t.content,f.value=Math.ceil(t.total_count/w))})):(s.query.t&&typeof s.query.t=="string"&&(s.query.t.includes("video")&&V.authIsVideo?b.value=s.query.t:b.value="blog"),T.modifyGoogleTagManager("category",[{slug:e.slug}]),await x.getCategories().then(async t=>{P.value=t.categories??[],P.value.forEach(a=>{I.value.push(a.slug),g.global.locale==="en"?r.value.push(a.name):g.global.locale==="es"&&a.translations&&a.translations.es&&a.translations.es.name?r.value.push(a.translations.es.name):r.value.push("No Translation For Category: "+a.name)}),I.value.includes(e.slug)&&(i.value=I.value.indexOf(e.slug),await x.getContents(S.value-1,w,b.value,g.global.locale,e.slug).then(a=>{a.total_count&&(y.value=a.content,f.value=Math.ceil(a.total_count/w))})),G.value=!0,i.value===0?document.title='"'+e.slug.toUpperCase()+r.value[i.value]+" | "+n.title1+" "+n.title2:document.title=r.value[i.value]+" | "+n.title1+" "+n.title2}))}),(t,a)=>(o(),N(U,null,{default:W(()=>[G.value?(o(),u("div",oe,[i.value===0?(o(),u("h1",se,' "'+q(C.slug.toUpperCase())+'"'+q(r.value[i.value]),1)):(o(),u("h1",ue,q(r.value[i.value]),1))])):B("",!0),C.year?(o(),u("div",re,[Z("h1",ie,q(E.value),1)])):B("",!0),y.value&&y.value.length>0?(o(),u("div",ce,[(o(!0),u(X,null,ee(y.value,c=>(o(),N(le,{key:c.id,content:c},null,8,["content"]))),128))])):(o(),u("div",ve,[...a[0]||(a[0]=[Z("h2",null,"No results found.",-1)])])),f.value&&f.value>1?(o(),u("div",de,[te(ne,{"current-page":S.value,"total-pages":f.value,onChange:R},null,8,["current-page","total-pages"])])):B("",!0)]),_:1}))}});
1export{_e 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.