Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

9.5 KB
Raw Blame
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["48"],{31911(e,t,a){a.d(t,{A:()=>d});var s=a(74848),r=a(96540),n=a(95310),l=a(21677);function i(){if("u"<typeof window)return{q:"",c:"",a:"",s:"newest"};let e=new URLSearchParams(window.location.search),t=e.get("sort");return{q:e.get("q")??"",c:e.get("category")??"",a:e.get("author")??"",s:"oldest"===t||"author"===t?t:"newest"}}function o({post:e,showAuthors:t=!0}){return(0,s.jsxs)("div",{className:"mj-meta",children:[e.category&&(0,s.jsx)("span",{className:"mj-meta-cat",children:e.category.label}),(0,s.jsx)("time",{dateTime:e.date,children:e.formattedDate}),(0,s.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,s.jsxs)("span",{children:[e.readingMinutes," min read"]}),t&&e.authors.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,s.jsx)("span",{children:e.authors.map(e=>e.name).join(", ")})]})]})}function c({post:e,eager:t=!1}){return e.image?(0,s.jsx)("img",{className:"mj-cover",src:e.image,alt:"",loading:t?"eager":"lazy",decoding:"async"}):(0,s.jsx)("div",{className:"mj-cover mj-cover-fallback","aria-hidden":"true"})}function m({post:e}){return(0,s.jsx)("article",{className:"mj-card",children:(0,s.jsxs)(n.A,{to:e.permalink,className:"mj-card-link",children:[(0,s.jsx)("div",{className:"mj-card-media",children:(0,s.jsx)(c,{post:e})}),(0,s.jsxs)("div",{className:"mj-card-body",children:[(0,s.jsx)(o,{post:e,showAuthors:!1}),(0,s.jsx)("h3",{className:"mj-card-title",children:e.title}),(0,s.jsx)("p",{className:"mj-card-desc",children:e.description}),e.authors.length>0&&(0,s.jsx)("div",{className:"mj-byline",children:e.authors.map(e=>(0,s.jsxs)("span",{className:"mj-byline-author",children:[e.imageURL&&(0,s.jsx)("img",{src:e.imageURL,alt:"",width:22,height:22,loading:"lazy"}),e.name]},e.key??e.name))})]})]})})}function d({posts:e,eyebrow:t="Mercury Blog",heading:a,intro:h,archive:u=!1}){let j=(0,r.useMemo)(i,[]),[p,g]=(0,r.useState)(j.q),[x,f]=(0,r.useState)(j.c),[y,b]=(0,r.useState)(j.a),[w,N]=(0,r.useState)(j.s);(0,r.useEffect)(()=>(function(e,t,a,s){if("u"<typeof window)return;let r=new URLSearchParams;e&&r.set("q",e),t&&r.set("category",t),a&&r.set("author",a),"newest"!==s&&r.set("sort",s);let n=r.toString();window.history.replaceState(null,"",`${window.location.pathname}${n?`?${n}`:""}`)})(p,x,y,w),[p,x,y,w]);let v=(0,r.useMemo)(()=>{let t=new Map;for(let a of e)a.category&&t.set(a.category.label,(t.get(a.category.label)??0)+1);return[...t.entries()].sort((e,t)=>t[1]-e[1]).map(([e])=>e)},[e]),k=(0,r.useMemo)(()=>{let t=new Map;for(let a of e)for(let e of a.authors){let a=t.get(e.name)??{name:e.name,imageURL:e.imageURL,count:0};a.count++,t.set(e.name,a)}return[...t.values()].sort((e,t)=>t.count-e.count||e.name.localeCompare(t.name))},[e]),M=""!==p.trim()||""!==x||""!==y,A=u||M?void 0:e.find(e=>e.featured)??e[0],C=(0,r.useMemo)(()=>{let t=p.toLowerCase().split(/\s+/).filter(Boolean),a=e.filter(e=>{if(A&&e.permalink===A.permalink||x&&e.category?.label!==x||y&&!e.authors.some(e=>e.name===y))return!1;if(0===t.length)return!0;let a=(0,l.wK)(e);return t.every(e=>a.includes(e))}),s=(e,t)=>t.date.localeCompare(e.date);return"oldest"===w?a.sort((e,t)=>e.date.localeCompare(t.date)):"author"===w?a.sort((e,t)=>(e.authors[0]?.name??"").localeCompare(t.authors[0]?.name??"")||s(e,t)):a.sort(s)},[e,A,p,x,y,w]);return(0,s.jsxs)("main",{className:"mj-page",children:[(0,s.jsxs)("header",{className:"mj-hero",children:[(0,s.jsx)("p",{className:"mj-eyebrow",children:t}),(0,s.jsx)("h1",{className:"mj-hero-title",children:a??"News, engineering notes and field reports from the people building Mercury."}),h&&(0,s.jsx)("p",{className:"mj-hero-intro",children:h}),(0,s.jsxs)("div",{className:"mj-search",role:"search",children:[(0,s.jsx)("svg",{viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:(0,s.jsx)("path",{fill:"currentColor",d:"M10 4a6 6 0 1 0 3.87 10.59l4.27 4.27 1.41-1.41-4.27-4.27A6 6 0 0 0 10 4Zm0 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8Z"})}),(0,s.jsx)("input",{type:"search",value:p,onChange:e=>g(e.target.value),placeholder:"Search posts, topics and authors","aria-label":"Search the blog"})]})]}),A&&(0,s.jsx)("section",{className:"mj-featured","aria-label":"Featured",children:(0,s.jsxs)(n.A,{to:A.permalink,className:"mj-featured-link",children:[(0,s.jsx)(c,{post:A,eager:!0}),(0,s.jsxs)("div",{className:"mj-featured-body",children:[(0,s.jsx)(o,{post:A}),(0,s.jsx)("h2",{className:"mj-featured-title",children:A.title}),(0,s.jsx)("p",{className:"mj-featured-desc",children:A.description}),(0,s.jsxs)("span",{className:"mj-readmore",children:["Read the post ",(0,s.jsx)("span",{"aria-hidden":"true",children:"\u2192"})]})]})]})}),(0,s.jsxs)("section",{className:"mj-controls","aria-label":"Filter and sort",children:[!u&&v.length>1&&(0,s.jsxs)("div",{className:"mj-chips",role:"tablist","aria-label":"Category",children:[(0,s.jsx)("button",{type:"button",role:"tab","aria-selected":""===x,className:""===x?"is-on":"",onClick:()=>f(""),children:"All"}),v.map(e=>(0,s.jsx)("button",{type:"button",role:"tab","aria-selected":x===e,className:x===e?"is-on":"",onClick:()=>f(x===e?"":e),children:e},e))]}),(0,s.jsxs)("div",{className:"mj-controls-right",children:[!u&&k.length>1&&(0,s.jsxs)("label",{className:"mj-select",children:[(0,s.jsx)("span",{children:"Author"}),(0,s.jsxs)("select",{value:y,onChange:e=>b(e.target.value),children:[(0,s.jsx)("option",{value:"",children:"Everyone"}),k.map(e=>(0,s.jsxs)("option",{value:e.name,children:[e.name," (",e.count,")"]},e.name))]})]}),(0,s.jsxs)("label",{className:"mj-select",children:[(0,s.jsx)("span",{children:"Sort"}),(0,s.jsxs)("select",{value:w,onChange:e=>N(e.target.value),children:[(0,s.jsx)("option",{value:"newest",children:"Newest"}),(0,s.jsx)("option",{value:"oldest",children:"Oldest"}),(0,s.jsx)("option",{value:"author",children:"By author"})]})]})]})]}),C.length>0?(0,s.jsx)("section",{className:"mj-grid","aria-label":"Posts",children:C.map(e=>(0,s.jsx)(m,{post:e},e.permalink))}):(0,s.jsxs)("p",{className:"mj-empty",children:["Nothing matches ",p?(0,s.jsxs)(s.Fragment,{children:["\u201C",p,"\u201D"]}):"those filters","."," ",(0,s.jsx)("button",{type:"button",onClick:()=>{g(""),f(""),b("")},children:"Clear filters"})]}),(0,s.jsxs)("footer",{className:"mj-index-foot",children:[(0,s.jsx)("a",{href:"/blog/rss.xml",children:"RSS"}),(0,s.jsx)("a",{href:"/blog/atom.xml",children:"Atom"}),(0,s.jsx)("a",{href:"/blog/feed.json",children:"JSON Feed"}),(0,s.jsx)("a",{href:"/llms.txt",children:"llms.txt"})]})]})}},99978(e,t,a){a.d(t,{A:()=>l});var s=a(74848);a(96540);var r=a(53572),n=a(10898);function l({permalink:e,title:t,imageAlt:a,image:i,labels:o=[],creators:c=[],section:m,breadcrumbs:d}){let{siteConfig:h}=(0,n.A)(),u=e=>/^https?:/.test(e)?e:`${h.url}${e}`,j=u(i??`/img/og${e.replace(/\/$/,"")}.jpg?v=2`),p=/\.jpe?g(\?|$)/i.test(j),g=d&&{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:d.map((e,t)=>({"@type":"ListItem",position:t+1,name:e.name,item:u(e.path)}))};return(0,s.jsxs)(r.A,{children:[(0,s.jsx)("meta",{property:"og:image",content:j}),(0,s.jsx)("meta",{property:"og:image:secure_url",content:j}),!i&&(0,s.jsx)("meta",{property:"og:image:type",content:p?"image/jpeg":"image/png"}),!i&&(0,s.jsx)("meta",{property:"og:image:width",content:"1200"}),!i&&(0,s.jsx)("meta",{property:"og:image:height",content:"630"}),(0,s.jsx)("meta",{property:"og:image:alt",content:a}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,s.jsx)("meta",{name:"twitter:image",content:j}),(0,s.jsx)("meta",{name:"twitter:image:alt",content:a}),(0,s.jsx)("meta",{property:"og:title",content:t}),(0,s.jsx)("meta",{name:"twitter:title",content:t}),c[0]&&(0,s.jsx)("meta",{name:"twitter:creator",content:c[0]}),m&&(0,s.jsx)("meta",{property:"article:section",content:m}),o.slice(0,2).flatMap(([e,t],a)=>[(0,s.jsx)("meta",{name:`twitter:label${a+1}`,content:e},`l${a}`),(0,s.jsx)("meta",{name:`twitter:data${a+1}`,content:t},`d${a}`)]),g&&(0,s.jsx)("script",{type:"application/ld+json",children:JSON.stringify(g)})]})}},21677(e,t,a){function s(e){return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"})}function r(e){return e.map(({content:e})=>{let t=e.metadata;return{permalink:t.permalink,title:t.title,description:t.description,date:t.date,formattedDate:s(t.date),readingMinutes:Math.max(1,Math.round(t.readingTime??1)),category:t.tags[0]??null,tags:t.tags,authors:t.authors,image:e.assets?.image??t.frontMatter.image,featured:!0===t.frontMatter.featured}})}function n(e){return[e.title,e.description,e.category?.label,...e.tags.map(e=>e.label),...e.authors.map(e=>e.name)].filter(Boolean).join(" ").toLowerCase()}a.d(t,{Iw:()=>r,Yq:()=>s,wK:()=>n})},1228(e,t,a){a.r(t),a.d(t,{default:()=>h});var s=a(74848);a(96540);var r=a(34164),n=a(60816),l=a(34308),i=a(88287),o=a(54175),c=a(31911),m=a(99978),d=a(21677);function h({author:e,items:t}){let a=e.name??e.key,u=`${a} \xb7 Mercury Blog`,j=[e.title,e.description].filter(Boolean).join(". ");return(0,s.jsxs)(l.e3,{className:(0,r.A)(i.G.wrapper.blogPages,i.G.page.blogAuthorsPostsPage,"mj-root"),children:[(0,s.jsx)(l.be,{title:u,description:j||`Posts by ${a}.`}),(0,s.jsx)(o.A,{tag:"blog_authors_posts"}),(0,s.jsx)(m.A,{permalink:e.page?.permalink??`/blog/authors/${e.key}`,title:u,imageAlt:`Posts by ${a} on the Mercury Blog`,breadcrumbs:[{name:"Mercury",path:"/"},{name:"Blog",path:"/blog"},{name:a,path:e.page?.permalink??"/blog/authors"}]}),(0,s.jsx)(n.A,{children:(0,s.jsx)(c.A,{posts:(0,d.Iw)(t),eyebrow:"Mercury Blog \xb7 Author",heading:a,intro:j||void 0,archive:!0})})]})}}}]);