PageSourceSearch

https://noicemagazine.com/_next/static/chunks/0ui5qexsioo34.js?dpl=dpl_23SJobxGK74Kf7avmkKExbqdmcUn

js noicemagazine.com collected 2026-10-02 20:07:30 UTC 9,549 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,499539,e=>{"use strict";var t=e.i(843476),i=e.i(271645);e.i(546607);var n=e.i(989970),a=e.i(365747);n.gsap.registerPlugin(),e.s(["default",0,function({children:e,className:r}){let o=(0,i.useRef)(null);return(0,a.useGSAP)(()=>{if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let e=o.current;e&&n.gsap.from(e,{opacity:0,y:12,duration:.5,ease:"power2.out",clearProps:"all"})},{scope:o}),(0,t.jsx)("div",{ref:o,className:r,children:e})}])},223814,e=>{"use strict";var t=e.i(843476),i=e.i(271645);e.i(546607);var n=e.i(989970),a=e.i(365747);let r=[100,500,1e3];async function o(e){let t=function(e){let[t,i]=e.split("@");return`https://${i}/.well-known/lnurlp/${t}`}(e),i=await fetch(t);if(!i.ok)throw Error(`LNURL fetch failed: ${i.status}`);return i.json()}async function l(e,t,i){let n=new URLSearchParams({amount:String(1e3*t)});i&&n.set("comment",i.slice(0,255));let a=`${e}?${n.toString()}`,r=await fetch(a);if(!r.ok)throw Error(`Invoice fetch failed: ${r.status}`);return r.json()}async function s(e){try{let t=await fetch(e);if(!t.ok)return!1;let i=await t.json();return!0===i.settled}catch{return!1}}function c({value:e}){let i=`https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(e)}&bgcolor=ffffff&color=000000&margin=2`;return(0,t.jsx)("img",{src:i,alt:"Lightning invoice QR code",width:200,height:200,style:{display:"block",margin:"0 auto",imageRendering:"pixelated"}})}e.s(["default",0,function({postTitle:e}={}){let[d,p]=(0,i.useState)("idle"),[u,m]=(0,i.useState)(null),[y,h]=(0,i.useState)(""),[g,x]=(0,i.useState)(null),[f,b]=(0,i.useState)(null),[v,j]=(0,i.useState)(null),[N,k]=(0,i.useState)(!1),w=(0,i.useRef)(null),S=(0,i.useRef)(null),C=(0,i.useRef)(null);(0,a.useGSAP)(()=>{S.current&&"idle"!==d&&n.gsap.from(S.current,{opacity:0,y:8,duration:.35,ease:"power2.out"})},{scope:w,dependencies:[d]});let T=(0,i.useCallback)(e=>{C.current&&clearInterval(C.current),C.current=setInterval(async()=>{await s(e)&&(clearInterval(C.current),C.current=null,p("confirmed"))},3e3)},[]);(0,i.useEffect)(()=>()=>{C.current&&clearInterval(C.current)},[]),(0,i.useEffect)(()=>{if("confirmed"===d){let e=setTimeout(()=>p("idle"),6e3);return()=>clearTimeout(e)}},[d]);let B=async t=>{p("loading"),j(null);try{let i=await o("[email protected]"),n=Math.ceil(i.minSendable/1e3),a=Math.floor(i.maxSendable/1e3),r=Math.min(Math.max(t,n),a),s=e?`NOICE Blog - ${e}`:"NOICE Blog Post",c=await l(i.callback,r,s);x(c.pr),c.verify&&(b(c.verify),T(c.verify)),p("qr")}catch(e){console.error("Lightning tip error:",e),j("Couldn't generate invoice. Please try again."),p("error")}},R=()=>{let e=parseInt(y,10);e&&!(e<1)&&(m(e),B(e))},I=async()=>{if(g)try{await navigator.clipboard.writeText(g),k(!0),setTimeout(()=>k(!1),2e3)}catch{}},P=()=>{C.current&&clearInterval(C.current),C.current=null,p("selecting"),x(null),b(null),m(null),h(""),j(null),k(!1)};return(0,t.jsxs)("div",{ref:w,style:{marginTop:"2rem"},children:["idle"===d&&(0,t.jsx)("button",{onClick:()=>p("selecting"),className:"caption-text hover:opacity-100 transition-opacity",style:{opacity:.5,cursor:"pointer",background:"none",border:"none",padding:0},children:"⚡ Tip this article"}),"idle"!==d&&(0,t.jsxs)("div",{ref:S,children:["selecting"===d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"caption-text mb-3",style:{opacity:.5},children:"Send a tip via Bitcoin Lightning"}),(0,t.jsx)("div",{style:{display:"flex",gap:"0.5rem",flexWrap:"wrap",marginBottom:"0.75rem"},children:r.map(e=>(0,t.jsxs)("button",{onClick:()=>{m(e),B(e)},className:"caption-text hover:opacity-100 transition-opacity",style:{opacity:.6,cursor:"pointer",background:"none",border:"1px solid currentColor",borderRadius:"2px",padding:"0.25rem 0.6rem"},children:[e.toLocaleString()," sats"]},e))}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center"},children:[(0,t.jsx)("input",{type:"number",min:"1",placeholder:"custom sats",value:y,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&R(),className:"caption-text",style:{background:"none",border:"none",borderBottom:"1px solid currentColor",outline:"none",width:"100px",opacity:.6,padding:"0.1rem 0",fontSize:"16px"}}),(0,t.jsx)("button",{onClick:R,className:"caption-text hover:opacity-100 transition-opacity",style:{opacity:.5,cursor:"pointer",background:"none",border:"none",padding:0},children:"→"}),(0,t.jsx)("button",{onClick:()=>p("idle"),className:"caption-text hover:opacity-100 transition-opacity",style:{opacity:.3,cursor:"pointer",background:"none",border:"none",padding:0,marginLeft:"0.5rem"},children:"cancel"})]})]}),"loading"===d&&(0,t.jsx)("p",{className:"caption-text",style:{opacity:.4},children:"Generating invoice…"}),"qr"===d&&g&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"caption-text mb-3",style:{opacity:.5}
1,children:[u?.toLocaleString()," sats — scan with any Lightning wallet"]}),(0,t.jsx)(c,{value:g}),(0,t.jsxs)("div",{style:{marginTop:"0.75rem",display:"flex",gap:"0.75rem",alignItems:"center"},children:[(0,t.jsx)("button",{onClick:I,className:"caption-text hover:opacity-100 transition-opacity",style:{opacity:.5,cursor:"pointer",background:"none",border:"none",padding:0},children:N?"copied ✓":"copy invoice"}),(0,t.jsx)("button",{onClick:P,className:"caption-text hover:opacity-100 transition-opacity",style:{opacity:.3,cursor:"pointer",background:"none",border:"none",padding:0},children:"← back"})]}),!f&&(0,t.jsx)("p",{className:"caption-text mt-3",style:{opacity:.3},children:"Pay the invoice, then close this when done."})]}),"confirmed"===d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"caption-text",style:{opacity:.8},children:"⚡ Thank you for the tip!"}),(0,t.jsx)("p",{className:"caption-text mt-1",style:{opacity:.4},children:"Payment received."})]}),"error"===d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"caption-text mb-2",style:{opacity:.5},children:v}),(0,t.jsx)("button",{onClick:P,className:"caption-text hover:opacity-100 transition-opacity",style:{opacity:.4,cursor:"pointer",background:"none",border:"none",padding:0},children:"Try again"})]})]})]})}])},12075,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(522016),a=e.i(499539),r=e.i(223814);e.i(546607);var o=e.i(989970);function l(e){let[t,i,n]=e.split("-").map(Number);return new Date(t,i-1,n).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function s({post:e}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"page-heading tracking-tight mb-3",children:e.title}),(0,t.jsxs)("p",{className:"caption-text mb-4",style:{opacity:.4},children:[l(e.publishDate)," · ",e.readingTime]}),(0,t.jsx)("p",{className:"body-text",style:{marginBottom:"1.5rem",opacity:.8},children:e.description}),(0,t.jsx)(n.default,{href:`/blog/${e.slug}`,className:"body-text hover:opacity-60 transition-opacity",style:{display:"inline-block",marginBottom:"2rem"},children:"Read full article →"}),(0,t.jsx)(r.default,{postTitle:e.title})]})}e.s(["default",0,function({posts:e}){let[r,c]=(0,i.useState)(e[0]?.slug??""),d=(0,i.useRef)(null),p=(0,i.useRef)(!1),u=e.find(e=>e.slug===r)??e[0],m=(0,i.useCallback)(e=>{if(e!==r&&!p.current){if(!d.current)return void c(e);p.current=!0,o.gsap.to(d.current,{opacity:0,y:-8,duration:.2,ease:"power2.in",onComplete:()=>{c(e),o.gsap.fromTo(d.current,{opacity:0,y:10},{opacity:1,y:0,duration:.3,ease:"power2.out",onComplete:()=>{p.current=!1}})}})}},[r]);return(0,t.jsx)(a.default,{className:"pt-8 md:pt-12 pb-16 md:pb-24",children:(0,t.jsxs)("div",{className:"grid-container",children:[(0,t.jsx)("div",{className:"col-6",children:(0,t.jsx)(n.default,{href:"/",className:"site-nav inline-flex items-center gap-2 text-secondary hover:opacity-100 transition-opacity mb-6 md:mb-8",children:"← Back"})}),(0,t.jsx)("div",{className:"col-6 md:col-3",children:(0,t.jsxs)("div",{className:"md:sticky md:top-24 md:max-h-[calc(100vh-120px)] md:overflow-y-auto",children:[(0,t.jsx)("h1",{className:"page-heading tracking-tight mb-6 md:mb-8",children:"Blog"}),(0,t.jsx)("nav",{className:"hidden md:block",children:(0,t.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0},children:e.map(e=>(0,t.jsxs)("li",{style:{marginBottom:"0.75rem"},children:[(0,t.jsx)("button",{onClick:()=>m(e.slug),className:"body-text text-left hover:opacity-100 transition-opacity",style:{opacity:e.slug===r?1:.35,cursor:"pointer",background:"none",border:"none",padding:0,display:"block",width:"100%",fontWeight:e.slug===r?500:400,transitionProperty:"opacity, font-weight",transitionDuration:"0.2s"},"aria-current":e.slug===r?"true":void 0,children:e.title}),(0,t.jsx)("p",{className:"caption-text mt-0.5",style:{opacity:.3},children:l(e.publishDate)})]},e.slug))})}),(0,t.jsx)("nav",{className:"md:hidden",children:(0,t.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0},children:e.map(e=>(0,t.jsxs)("li",{style:{marginBottom:"1.5rem"},children:[(0,t.jsx)(n.default,{href:`/blog/${e.slug}`,className:"body-text hover:opacity-60 transition-opacity",style:{display:"block",marginBottom:"0.25rem"},children:e.title}),(0,t.jsxs)("p",{className:"caption-text",style:{opacity:.4,marginBottom:"0.5rem"},children:[l(e.publishDate)," · ",e.readingTime]}),(0,t.jsx)("p",{className:"body-text",style:{opacity:.6},children:e.description})]},e.slug))})})]})}),(0,t.jsx)("div",{className:"hidden md:block md:col-3",children:(0,t.jsx)("div",{ref:d,children:u&&(0,t.jsx)(s,{post:u})})})]})})}])}]);

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.