PageSourceSearch

https://injective.com/_nuxt/CZDcn594.js

js injective.com collected 2026-10-02 03:22:27 UTC 9,964 bytes, 1 lines download raw bytes

1import{_ as J}from"./u2VEPqWB.js";import{i as L,c as g,e as i,H as v,t as r,w as x,ba as U,o as c,Q as $,F,z as M,G as C,k as N,O as R,P as q,B as z,l as n,r as I,m as w,_ as Q,as as E,b6 as Z,u as K,J as X,a1 as Y,av as ee,n as te,q as oe,D as ne,g as ae,aw as se,aN as le}from"#entry";import{_ as re}from"./SzxuH3UA.js";import{_ as ce,a as ie}from"./CPUryUje.js";import{u as W}from"./C7Tmi58k.js";import{_ as de}from"./BmFMuxqq.js";import{h as ue,a as _e,f as me,r as V}from"./M_0XEWaz.js";import{u as pe}from"./BRHr8GOk.js";import"./GLc7AFUj.js";import"./pbP3YwOu.js";const he={class:"flex gap-4 items-center"},ge=["src"],be={class:"flex flex-col"},fe={class:"capitalize"},xe={class:"flex gap-4 items-center"},ve=L({__name:"Author",props:{timeToRead:{},publishDate:{},author:{default:()=>({name:"injective",image:{url:"/injective-logo.svg"}})}},setup(t){return(l,d)=>{const _=U;return c(),g("div",he,[i("img",{class:"size-12 rounded-full",alt:"author profile picture",src:t.author.image?.url??"/injective-logo.svg"},null,8,ge),i("div",be,[i("span",fe,v(t.author.name),1),i("div",xe,[r(_,{variant:"label-mono-3",class:"!font-TTCommons !text-base leading-5"},{default:x(()=>[$(v(t.publishDate),1)]),_:1}),r(_,{variant:"label-mono-3",class:"!font-TTCommons !text-base leading-5"},{default:x(()=>[...d[0]||(d[0]=[$(" • ",-1)])]),_:1}),r(_,{variant:"label-mono-3",class:"!font-TTCommons !text-base leading-5"},{default:x(()=>[$(v(t.timeToRead),1)]),_:1})])])])}}}),ye=Object.assign(ve,{__name:"PageBlogArticleAuthor"}),we=L({__name:"TocChildren",props:{isExpanded:{type:Boolean},activeId:{},children:{}},setup(t){return(l,d)=>{const _=q,f=G;return c(),g("ul",{class:C([t.isExpanded?"max-h-[1000px]":"max-h-0","pl-4 overflow-hidden transition-[max-height] duration-300 ease-in-out"])},[(c(!0),g(F,null,M(t.children,e=>(c(),g("li",{key:e.id},[r(_,{href:`#${e.id}`,class:C(["block py-2 pl-3 border-l font-ABCWhyte",[t.activeId===e.id?"text-primary-ocean-main border-l-2 border-primary-ocean-main":"text-shade-grey-500 border-l border-gray-stroke"]])},{default:x(()=>[$(v(e.text),1)]),_:2},1032,["href","class"]),e.children?.length?(c(),N(f,{key:0,"is-expanded":!0,"active-id":t.activeId,children:e.children},null,8,["active-id","children"])):R("",!0)]))),128))],2)}}}),G=Object.assign(we,{__name:"PageBlogArticleSidebarTocChildren"}),$e={class:"sticky top-32 self-start"},Se={class:"text-sm space-y-2 max-h-[80vh] overflow-y-auto"},Te=L({__name:"Index",props:{activeId:{},tocItems:{}},setup(t){const l=t,d=I([]),_=I(new Set),f=w(()=>{const u={};for(const s of d.value){const o=s.id===l.activeId,b=s.children?.some(a=>a.id===l.activeId);u[s.id]=o||!!b}return u});z(()=>l.tocItems,u=>{d.value=e(u.map(s=>({...s})))},{immediate:!0}),z(()=>l.activeId,u=>{const s=d.value.find(o=>o.id===u||o.children?.some(b=>b.id===u))?.id;_.value.forEach(o=>{o!==s&&_.value.delete(o)})});function e(u){const s=[],o=[];for(const b of u){const a={...b,children:[]},T=b.level<=2?2:b.level;for(;o.length>0;){const m=o[o.length-1],k=m?m.level<=2?2:m.level??0:0;if(m&&k>=T)o.pop();else break}if(o.length===0)s.push(a);else{const m=o[o.length-1];m&&(m.children=m.children||[],m.children.push(a))}o.push(a)}return s}return(u,s)=>{const o=q,b=G;return c(),g("aside",$e,[i("nav",Se,[i("ul",null,[(c(!0),g(F,null,M(n(d),a=>(c(),g("li",{key:a.id},[r(o,{href:`#${a.id}`,class:C(["w-full text-left block border-l p-4 font-ABCWhyte",[t.activeId===a.id?"text-primary-ocean-main border-l-2 border-primary-ocean-main":"text-shade-grey-500 border-l border-gray-stroke"]])},{default:x(()=>[$(v(a.text),1)]),_:2},1032,["href","class"]),a.children?.length?(c(),N(b,{key:0,"active-id":t.activeId,children:a.children,"is-expanded":n(f)[a.id]},null,8,["active-id","children","is-expanded"])):R("",!0)]))),128))])])])}}}),ke=Object.assign(Te,{__name:"PageBlogArticleSidebarToc"}),Be={},Ae={class:"!w-1 !h-1 md:!w-2 md:!h-2 rounded-full"};function Ce(t,l){return c(),g("div",Ae)}const Ie=Object.assign(Q(Be,[["render",Ce]]),{__name:"SharedTheDot"}),Le={class:"flex flex-row gap-x-spacing-2 md:gap-x-spacing-4 items-center relative"},Pe={class:"flex w-[10px]"},Ee=L({__name:"SectionTitle",props:{title:{},theme:{}},setup(t){const l=t,d=l.theme==="light"?"text-white":l.theme==="black"?"text-black":"text-secondary-midnight-900",_=l.theme==="light"?"bg-white":l.theme==="black"?"bg-black":"bg-secondary-midnight-900";return(f,e)=>{const u=Ie,s=U;return c(),g("div",Le,[i("div",Pe,[r(u,{class:C(["absolute h-2 w-2 top-[6px] md:top-[4px]",n(_)])},null,8,["class"])]),r(s,{variant:"label-whyte-3",class:C(["flex xl:hidden",n(d)])},{default:x(()=>[$(v(f.$t(t.title)),1)]),_:1},8,["class"]),r(s,{variant:"label-whyte-2",class:C(["hidden xl:flex",n(d)])},{default:x(()=>[$(v(f.$t(t.title)),1)]),_:1},8,["class"])])}}}),Ne=Object.assign(Ee,{__name:"SharedSectionTitle"}),De={class:"container grid-container md:gap-y-10 gap-y-6 md:py-16 md:px-18 p-10"},je={class:"flex gap-x-2 xl:hidden order-1"},Oe={class:"sr-only"},Fe={class:"text-button-1"},Me=L({__name:"BlogFeaturedPosts",props:{variant:{}},setup(t){const l=t,d=W(),_={news:E.Blog,developers:E.Learn,learn_individuals:E.BlogLearnTag,learn_developers:E.Learn},f=I("start"),e=I(null),u=w(()=>l.variant==="news"||l.variant==="learn_developers"||l.variant==="learn_individuals");function s(a){f.value=a}function o(){e.value?.scrollPrev()}function b(){e.value?.scrollNext()}return(a,T)=>{const m=Ne,k=U,D=re,H=ce,j=ie,y=Z,P=q;return c(),g("section",De,[n(u)?(c(),N(m,{key:0,class:"col-span-2 xl:col-span-12",title:`shared.blog.eyebrow_${t.variant}`},null,8,["title"])):R("",!0),r(k,{variant:"h6",class:"text-h6 md:text-h4 col-span-2 xl:col-span-12"},{default:x(()=>[$(v(a.$t(`shared.blog.headline_${t.variant}`)),1)]),_:1}),(c(!0),g(F,null,M(n(d).featuredBlogs.slice(0,3),S=>(c(),N(D,{key:S.id,article:S,class:"hidden xl:flex col-span-4"},null,8,["article"]))),128)),r(H,{ref_key:"cardList",ref:e,class:"xl:hidden col-span-2 -mr-10",items:n(d).featuredBlogs.slice(0,3),"onScroll:update":s},{item:x(({item:S})=>[r(D,{article:S,"mins-suffix":""},null,8,["article"])]),_:1},8,["items"]),i("div",je,[r(j,{icon:"ArrowLeft","is-disabled":n(f)==="start",onClick:o},null,8,["is-disabled"]),r(j,{icon:"ArrowRight","is-disabled":n(f)==="end",onClick:b},null,8,["is-disabled"])]),r(P,{to:`${_[t.variant]||n(E).Blog}
1`,class:"xl:col-span-2 col-span-1 order-2 justify-self-end xl:justify-self-start"},{default:x(()=>[i("span",Oe,v(a.$t(`shared.blog.eyebrow_${t.variant}`)),1),r(y,{variant:"secondary",color:"dark"},{default:x(()=>[i("span",Fe,v(a.$t(`shared.blog.visit_blog_${t.variant}`)),1)]),_:1})]),_:1},8,["to"])])}}}),Re=Object.assign(Me,{__name:"SectionBlogFeaturedPosts"}),He={class:"theme-dark bg-black text-white"},Ue={key:0,class:"container mx-auto"},qe={class:"pt-32 md:pt-28 px-10 md:px-[72px] pb-10 md:pb-16"},ze={class:"grid gap-4 md:w-1/2 mx-auto"},Ve={class:"flex right-6 gap-x-3"},We={class:"text-h6 md:text-h4 font-normal"},Ge=["alt","src"],Je={class:"grid grid-cols-12 gap-6 p-10 md:pt-8 md:pb-16 md:px-[72px]"},Qe={class:"hidden md:block md:col-span-3"},Ze=["innerHTML"],rt=L({__name:"[slug]",async setup(t){let l,d;const _=K(),{locale:f}=X(),e=W(),u=w(()=>e.blog?.body.body.includes("twitter-tweet"));Y(w(()=>({script:u.value?[{async:!0,key:"twitter-widgets",src:"https://platform.twitter.com/widgets.js",onload:()=>{window.twttr?.widgets&&window.twttr.widgets.load()}}]:[]})));const s=w(()=>f.value),o=_.params.slug,b=typeof o=="string"?o:o?.[0]??"";[l,d]=ee(async()=>se("blog-post",async()=>(await Promise.all([e.fetchBlog({slug:b,locale:s.value}),e.fetchFeaturedBlogs(s.value)]),!0),{watch:[s]})),await l,d();const a=w(()=>({...me,title:e.blog?.title,ogTitle:e.blog?.title,twitterTitle:e.blog?.title,description:e.blog?.excerpt,ogUrl:`${le}/blog/${_.params.slug}`,ogImage:e.blog?.coverImg?.url?V(e.blog.coverImg.url):void 0,twitterImage:e.blog?.coverImg?.url?V(e.blog.coverImg.url):void 0}));pe(e.blog?.seo,a);let T;const m=I(null),k=I([]),D=w(()=>e.blog?.body.body),H=w(()=>ue(D.value??"")),j=w(()=>{const y=e.blog;return y?new Date(_e(y)).toLocaleDateString(ne,ae):""});return te(()=>{const y=document.querySelector(".article-body");if(!y)return;const P=y.querySelectorAll("h1, h2, h3, h4");k.value=Array.from(P).map(p=>({id:p.id,text:p.textContent||"",level:Number(p.tagName.charAt(1))})),T=new IntersectionObserver(p=>{for(const h of p)if(h.isIntersecting){m.value=h.target.id;break}},{threshold:0,rootMargin:"0px 0px -70% 0px"}),P.forEach(p=>T.observe(p)),y.querySelectorAll("pre").forEach(p=>{const h=document.createElement("button");h.textContent="Copy",h.className="copy-button";const B=document.createElement("div");B.className="relative",p.parentNode?.insertBefore(B,p),B.appendChild(p),B.appendChild(h),h.addEventListener("click",async()=>{const O=p.querySelector("code")?.innerText;if(O)try{await navigator.clipboard.writeText(O);const A=h.textContent;h.textContent="Copied!",h.classList.add("copied"),setTimeout(()=>{h.textContent=A,h.classList.remove("copied")},1500)}catch(A){console.error("Failed to copy code",A)}})})}),oe(()=>{T?.disconnect()}),(y,P)=>{const S=J,p=ye,h=ke,B=Re,O=de;return c(),g("div",He,[n(e).blog?(c(),g("article",Ue,[i("div",qe,[i("div",ze,[i("div",Ve,[(c(!0),g(F,null,M(n(e).blog.tags,A=>(c(),N(S,{key:A.id,class:"!border-gray-stroke bg-gray-surface text-white"},{default:x(()=>[$(v(A.name),1)]),_:2},1024))),128))]),i("h1",We,v(n(e).blog.title),1),r(p,{author:n(e).blog.author??void 0,"time-to-read":n(e).blog.timeToRead,"publish-date":n(j)},null,8,["author","time-to-read","publish-date"])])]),i("img",{alt:n(e).blog.title,src:n(e).blog.coverImg.url,class:"rounded-radius-l md:w-2/3 mx-auto p-4"},null,8,Ge),i("div",Je,[i("div",Qe,[r(h,{"toc-items":n(k),"active-id":n(m)},null,8,["toc-items","active-id"])]),i("div",{class:"article-body col-span-12 md:col-span-6",innerHTML:n(H)},null,8,Ze)])])):R("",!0),r(B,{"has-eyebrow":"",variant:"news",items:n(e).featuredBlogs},null,8,["items"]),r(O)])}}});
1export{rt 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.