PageSourceSearch

https://1and5tech.com/build/assets/PublicIndex-BMAP397y.js

js 1and5tech.com collected 2026-10-09 04:10:48 UTC 6,651 bytes, 1 lines download raw bytes

1import{r as l,j as e,H as U,L as E,a as k}from"./app-DaDA6Pu2.js";import{C as O,a as W,b as $,c as I,d as P,e as q}from"./card-Bd0nXh-E.js";import{B as X}from"./badge-BZuqKDZE.js";import{U as z}from"./user-layout-Bbkeo_NO.js";import{S as L}from"./search-CazNRfog.js";import{X as G}from"./x-BZKaDWvh.js";import{U as J}from"./user-1FxF6Hlm.js";import{C as K}from"./calendar-B9oyWA4L.js";import{C as Q}from"./clock-EO3Qvt-1.js";import{A as V}from"./arrow-right-Cnr81cfu.js";import"./createLucideIcon-MS7WP3nj.js";import"./button-CptDgvow.js";import"./app-logo-CiPFDMOy.js";import"./index-dafpmP4l.js";import"./index-D-xcGzYn.js";import"./index-DX7PYUPI.js";import"./index-C46s4u4q.js";import"./index-Djkf6lha.js";import"./index-Bi_I2jep.js";import"./app-logo-icon-CBU-IU-4.js";import"./separator-BkuEdxMz.js";import"./phone-Cd3sU_o8.js";import"./input-CeoOOgBF.js";import"./select-BDvCPuoZ.js";import"./index-uCZtX1Ff.js";import"./index-DUjEU3iZ.js";import"./index-wKqSowjC.js";import"./index-B0MEXLNQ.js";import"./chevron-down-Cqiim40T.js";import"./check-CZBjWTfm.js";import"./dropdown-menu-DcTOW5Jc.js";import"./index-L87CqYJx.js";import"./loader-circle-TvL4shei.js";import"./shopping-cart-aqnOFEL6.js";import"./trash-2-IrvXK5cP.js";import"./plus-B0uFjeMz.js";function Y(o,n,s,p){var N=this,i=l.useRef(null),u=l.useRef(0),r=l.useRef(0),a=l.useRef(null),m=l.useRef([]),d=l.useRef(),x=l.useRef(),A=l.useRef(o),f=l.useRef(!0);A.current=o;var b=typeof window<"u",g=!n&&n!==0&&b;if(typeof o!="function")throw new TypeError("Expected a function");n=+n||0;var w=!!(s=s||{}).leading,T=!("trailing"in s)||!!s.trailing,h="maxWait"in s,_="debounceOnServer"in s&&!!s.debounceOnServer,C=h?Math.max(+s.maxWait||0,n):null;l.useEffect(function(){return f.current=!0,function(){f.current=!1}},[]);var B=l.useMemo(function(){var S=function(t){var c=m.current,y=d.current;return m.current=d.current=null,u.current=t,r.current=r.current||t,x.current=A.current.apply(y,c)},j=function(t,c){g&&cancelAnimationFrame(a.current),a.current=g?requestAnimationFrame(t):setTimeout(t,c)},F=function(t){if(!f.current)return!1;var c=t-i.current;return!i.current||c>=n||c<0||h&&t-u.current>=C},D=function(t){return a.current=null,T&&m.current?S(t):(m.current=d.current=null,x.current)},R=function t(){var c=Date.now();if(w&&r.current===u.current&&H(),F(c))return D(c);if(f.current){var y=n-(c-i.current),M=h?Math.min(y,C-(c-u.current)):y;j(t,M)}},H=function(){},v=function(){if(b||_){var t=Date.now(),c=F(t);if(m.current=[].slice.call(arguments),d.current=N,i.current=t,c){if(!a.current&&f.current)return u.current=i.current,j(R,n),w?S(i.current):x.current;if(h)return j(R,n),S(i.current)}return a.current||j(R,n),x.current}};return v.cancel=function(){var t=a.current;t&&(g?cancelAnimationFrame(a.current):clearTimeout(a.current)),u.current=0,m.current=i.current=d.current=a.current=null},v.isPending=function(){return!!a.current},v.flush=function(){return a.current?D(Date.now()):x.current},v},[w,h,n,C,T,g,b,_,p]);return B}function Be({posts:o,filters:n}){const[s,p]=l.useState(n.search||""),N=Y(r=>{k.get("/blog",{search:r},{preserveState:!0,preserveScroll:!0,replace:!0})},500),i=r=>{const a=r.target.value;p(a),N(a)},u=()=>{p(""),k.get("/blog",{},{preserveState:!0,preserveScroll:!1,replace:!0})};return e.jsxs(e.Fragment,{children:[e.jsx(U,{title:"Blog"}),e.jsx(z,{children:e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("div",{className:"border-b bg-white",children:e.jsxs("div",{className:"container mx-auto px-4 py-16 text-center",children:[e.jsx(X,{className:"mb-4",children:"Latest Articles"}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-gray-900 mb-4",children:"Explore Our Blog"}),e.jsx("p",{className:"text-gray-600 max-w-2xl mx-auto",children:"Discover insights, tutorials, and stories from our team."}),e.jsx("div",{className:"mt-8 max-w-lg mx-auto",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),e.jsx("input",{type:"text",value:s,onChange:i,placeholder:"Search articles...",className:"w-full border rounded-lg py-3 pl-10 pr-10 text-gray-900 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300"}),s&&e.jsx("button",{onClick:u,className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(G,{className:"w-5 h-5"})})]})})]})}),e.jsxs("div",{className:"container mx-auto px-4 py-12",children:[s&&e.jsxs("p",{className:"text-center text-gray-600 mb-8",children:["Showing results for ",e.jsxs("span",{className:"font-semibold text-gray-900",children:['"',s,'"']})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:o.data.map(r=>e.jsx(E,{href:`/blog/${r.slug}`,children:e.jsxs(O,{className:"h-full border shadow-sm hover:shadow-md transition cursor-pointer",children:[r.featured_image&&e.jsx("div",{className:"h-48 w-full overflow-hidden rounded-t-lg bg-gray-100",children:e.jsx("img",{src:r.featured_image,className:"object-cover w-full h-full",alt:r.title})}),e.jsxs(W,{children:[e.jsx($,{className:"line-clamp-2 text-gray-900 text-lg font-semibold",children:r.title}),e.jsx(I,{className:"line-clamp-3 text-gray-500",children:r.excerpt})]}),e.jsx(P,{children:e.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-gray-500",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(J,{className:"w-4 h-4"}),r.author]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(K,{className:"w-4 h-4"}),r.published_at]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Q,{className:"w-4 h-4"}),r.read_time," min read"]})]})}),e.jsx(q,{children:e.jsxs("span",{className:"text-blue-600 font-medium flex items-center gap-1",children:["Read Article ",e.jsx(V,{className:"w-4 h-4"})]})})]})},r.id))}),o.links&&o.links.length>3&&e.jsx("div",{className:"flex justify-center gap-2 mt-12",children:o.links.map((r,a)=>e.jsx(E,{href:r.url||"#",className:`px-4 py-2 border rounded-lg text-sm ${r.active?"bg-gray-900 text-white":"bg-white text-gray-700 hover:bg-gray-100"} ${!r.url&&"opacity-50 pointer-events-none"}`,dangerouslySetInnerHTML:{__html:r.label}},a))}),o.data.length===0&&e.jsxs("div",{className:"text-center py-24",children:[e.jsx(L,{className:"w-14 h-14 mx-auto mb-6 text-gray-300"}),e.jsx("h3",{className:"text-2xl font-bold text-gray-900",children:"No Results Found"}),e.jsxs("p",{className:"text-gray-600 mt-2",children:["Try different keywords or"," ",e.jsx("button",{onClick:u,className:"text-blue-600 underline",children:"view all posts"}),"."]})]})]})]})})]})}export{Be 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.