1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8b5f630c-1392-4005-9249-ad3efb46a9a6",e._sentryDebugIdIdentifier="sentry-dbid-8b5f630c-1392-4005-9249-ad3efb46a9a6")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3831],{8276:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(1683).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},9076:(e,t,r)=>{"use strict";var s=r(76580);r.o(s,"useParams")&&r.d(t,{useParams:function(){return s.useParams}}),r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}}),r.o(s,"useSearchParams")&&r.d(t,{useSearchParams:function(){return s.useSearchParams}})},23544:(e,t,r)=>{"use strict";r.d(t,{L:()=>d,q:()=>i});let s=/\s+/g,a=/\[(.*?)\]\(.*?\)/g,l=/`([^`]+)`/g,n=/[*_~]/g,o=/[^a-z0-9-\u4e00-\u9fff]/g;function i(e){return e.trim().toLowerCase().replace(s,"-").replace(a,"$1").replace(l,"$1").replace(n,"").replace(o,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function d(e,t){var r;let s=null!=(r=t.get(e))?r:0;return t.set(e,s+1),0===s?e:"".concat(e,"-").concat(s)}},27097:(e,t,r)=>{Promise.resolve().then(r.bind(r,58241))},46682:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});var s=r(93303),a=r(97919),l=r(1401);let n=a.forwardRef((e,t)=>{let{className:r,type:a,...n}=e;return(0,s.jsx)("input",{type:a,className:(0,l.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:t,...n})});n.displayName="Input"},58241:(e,t,r)=>{"use strict";r.d(t,{BlogListPageEntry:()=>v});var s=r(93303),a=r(4872),l=r(97919),n=r(76643),o=r.n(n),i=r(9076),d=r(65066),c=r(30942),u=r(8276),m=r(24907),g=r(15786),x=r(46682),f=r(11800),h=r(89474),p=r(47752),y=r(18772),b=r(4981);function w(e,t,r){let s=new URLSearchParams;e&&s.set("q",e),t&&s.set("category",t),r&&r>0&&s.set("cursor",r.toString());let a=s.toString();return a.length>0?"".concat(y.S.blog,"?").concat(a):y.S.blog}function j(e){var t;let r=(0,i.useRouter)(),a=(0,l.useRef)(null),n=(0,l.useMemo)(()=>(0,f.p)(),[]),[j,v]=(0,l.useState)(null!=(t=e.normalizedKeyword)?t:""),[N,C]=(0,l.useState)(e.items),[z,S]=(0,l.useState)(e.nextCursor),[k,P]=(0,l.useState)(e.hasMore),[K,_]=(0,l.useState)(!1),[A,E]=(0,l.useState)(null);(0,l.useEffect)(()=>{var t;v(null!=(t=e.normalizedKeyword)?t:"")},[e.normalizedKeyword]),(0,l.useEffect)(()=>{C(e.items),S(e.nextCursor),P(e.hasMore),_(!1),E(null)},[e.currentCursor,e.hasMore,e.items,e.nextCursor,e.normalizedCategory,e.normalizedKeyword]);let I=(0,l.useCallback)((e,t,s)=>{let a=w(e,t,s);r.replace(a,{scroll:!1})},[r]),L=(0,l.useCallback)(()=>{I((0,b.NB)(j),e.normalizedCategory)},[j,e.normalizedCategory,I]),M=(0,l.useCallback)(t=>{I(e.normalizedKeyword,t)},[e.normalizedKeyword,I]),R=(0,l.useCallback)(async()=>{if(!K&&k&&z){_(!0),E(null);try{let t=await n.getBlogList.query({limit:b.dr,cursor:z,keyword:e.normalizedKeyword,category:e.normalizedCategory});C(e=>{let r=new Set(e.map(e=>e.id)),s=t.items.filter(e=>!r.has(e.id)&&(r.add(e.id),!0));return[...e,...s]}),P(t.hasMore),S(t.nextCursor)}catch(e){E("Failed to load more posts. Please try again.")}finally{_(!1)}}},[n,k,K,z,e.normalizedCategory,e.normalizedKeyword]);(0,l.useEffect)(()=>{if(!a.current||!k||!z)return;let e=new IntersectionObserver(e=>{let[t]=e;(null==t?void 0:t.isIntersecting)&&R()},{rootMargin:"280px 0px",threshold:0});return e.observe(a.current),()=>{e.disconnect()}},[k,R,z]);let $=(0,l.useMemo)(()=>w(e.normalizedKeyword,e.normalizedCategory),[e.normalizedCategory,e.normalizedKeyword]);return(0,s.jsxs)("div",{className:"h-screen overflow-auto bg-home-bg",children:[(0,s.jsx)(p.s,{}),(0,s.jsxs)("main",{className:"relative mx-auto w-full max-w-6xl px-4 pb-16 md:px-6",children:[(0,s.jsx)("img",{src:"assets/home-section-dot-bg.svg",className:"pointer-events-none absolute left-0 w-full",alt:"","aria-hidden":"true"}),(0,s.jsxs)("section",{className:"flex flex-col items-center p-6 md:p-10",children:[(0,s.jsx)("h1",{className:"mt-20 text-3xl font-bold tracking-tight text-foreground md:text-4xl",children:"Step1 Blog"}),(0,s.jsx)("p",{className:"mt-3 max-w-2xl text-sm text-muted-foreground md:text-base",children:"Practical guides, product notes, latest news."}),(0,s.jsx)("form",{className:"mt-6 grid w-full max-w-xl grid-cols-[1fr,auto] gap-2",role:"search",onSubmit:e=>{e.preventDefault(),L()},children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(d.A,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,s.jsx)(x.p,{value:j,onChange:e=>{v(e.target.value)},placeholder:"Search posts",className:"pl-9"})]})}),(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap gap-2",children:[(0,s.jsx)(g.$,{type:"button",size:"sm",variant:e.normalizedCategory?"outline":"default",onClick:()=>{M(void 0)},children:"All"}),e.categories.map(t=>{let r=e.normalizedCategory===t.slug;return(0,s.jsx)(g.$,{type:"button",size:"sm",variant:r?"default":"outline",onClick:()=>{M((0,b.G0)(t.slug))},children:t.name},t.id)})]}),e.normalizedKeyword||e.normalizedCategory?(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,s.jsx)("span",{children:"Searching:"}),e.normalizedKeyword?(0,s.jsx)("span",{className:"rounded-full px-2 py-1",children:e.normalizedKeyword}):null,e.normalizedCategory?(0,s.jsx)("span",{className:"rounded-full px-2 py-1",children:e.normalizedCategory}):null,(0,s.jsxs)(g.$,{variant:"ghost",size:"xs",onClick:()=>{v(""),I(void 0,void 0)},children:[(0,s.jsx)(c.A,{size:12}),"Clear"]})]}):null]}),0===N.length?(0,s.jsxs)("section",{className:"mt-8 rounded-2xl bg-background p-10 text-center",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"No posts found"}),(0,s.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"Try another keyword or category."})]}):(0,s.jsxs)("section",{className:"mt-8 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[N.map(t=>{let r=new URLSearchParams;e.normalizedCategory&&r.set("category",e.normalizedCategory);let a=r.toString()?"".concat(y.S.blogDetail(t.slug),"?").concat(r.toString()):y.S.blogDetail(t.slug);return(0,s.jsx)(m.Z,{item:t,href:a},t.id)}),K?[,,].fill(0).map((e,t)=>(0,s.jsxs)("div",{className:"overflow-hidden rounded-xl bg-background",children:[(0,s.jsx)("div",{className:"aspect-[16/10] animate-pulse bg-muted"}),(0,s.jsxs)("div",{className:"space-y-2 p-4",children:[(0,s.jsx)("div",{className:"h-4 animate-pulse rounded bg-muted"}),(0,s.jsx)("div",{className:"h-4 w-4/5 animate-pulse rounded bg-muted"}),(0,s.jsx)("div",{className:"h-3 w-2/5 animate-pulse rounded bg-muted"})]})]},"loading-".concat(t))):null]}),N.length>0?(0,s.jsxs)("section",{className:"mt-8 flex flex-col items-center gap-3",children:[e.currentCursor?(0,s.jsx)(g.$,{variant:"ghost",size:"xs",asChild:!0,children:(0,s.jsx)(o(),{href:$,children:"Back to first page"})}):null,(0,s.jsx)("div",{ref:a,className:"h-1 w-full"}),k?(0,s.jsx)(g.$,{variant:"outline",onClick:()=>{R()},disabled:K,children:K?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{className:"h-4 w-4 animate-spin"}),"Loading..."]}):"Load more"}):(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"No more posts"}),A?(0,s.jsx)("p",{className:"text-xs text-destructive",children:A}):null]}):null]}),(0,s.jsx)(h.o,{})]})}function v(e){return(0,s.jsx)(a.ClientProvider,{children:(0,s.jsx)(j,{...e})})}},65066:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(1683).A)("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])}},e=>{e.O(0,[557,1441,6643,4965,2051,3068,4872,3471,6862,7327,7358],()=>e(e.s=27097)),_N_E=e.O()}]);
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.