PageSourceSearch

https://pawr.link/_next/static/chunks/8817-2c3ee6e4fd1222f3.js

js pawr.link collected 2026-10-06 20:03:25 UTC 46,892 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8817],{17987:(e,t,a)=>{a.d(t,{u9:()=>r});async function r(e,t={},a=1e4){let s=new AbortController,n=setTimeout(()=>s.abort(),a);try{return await fetch(e,{...t,signal:s.signal})}finally{clearTimeout(n)}}},25016:(e,t,a)=>{a.d(t,{X_:()=>r,b1:()=>n,qP:()=>s});let r="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",s="0x7ad7e898FDe3Af9da10B83bf5CBdCca45fa31F7e",n={username:32,displayName:64,bio:280,avatarUrl:512,linksJson:2048,description:1024,email:320}},27086:(e,t,a)=>{a.d(t,{Cd:()=>l,Vo:()=>o,xp:()=>i});var r=a(64439),s=a(47876);let n={chainId:s.UT,chainName:r.E.name,nativeCurrency:r.E.nativeCurrency,rpcUrls:[r.E.rpcUrls.default.http[0]],blockExplorerUrls:[r.E.blockExplorers.default.url]};async function i(e){try{let t=await e.request({method:"eth_chainId"});if("number"==typeof t)return t;if("string"==typeof t)return Number.parseInt(t,16);return null}catch{return null}}async function l(e,t,a){let l=a??(()=>{}),o=await i(e);if(l("chain check (before)",{chainId:o}),o===r.E.id)return;if("function"==typeof t.switchChain)try{await t.switchChain(r.E.id),l("privy switchChain ok")}catch(e){l("privy switchChain failed",e)}let c=await i(e);if(c!==r.E.id){try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:s.UT}]}),l("wallet_switchEthereumChain ok")}catch(e){l("wallet_switchEthereumChain failed",e)}c=await i(e)}let d=c;if(d!==r.E.id){try{await e.request({method:"wallet_addEthereumChain",params:[n]}),l("wallet_addEthereumChain (Base) ok or noop")}catch(e){l("wallet_addEthereumChain (Base) failed",e)}try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:s.UT}]}),l("wallet_switchEthereumChain (retry) ok")}catch(e){l("wallet_switchEthereumChain (retry) failed",e)}d=await i(e)}if(d!==r.E.id)for(let t=0;t<4&&(await new Promise(e=>setTimeout(e,120)),(d=await i(e))!==r.E.id);t++);if(l("chain check (after)",{chainId:d}),d!==r.E.id)throw Error("wrong network – switch your wallet to Base, then click pay again")}function o(e){let t=e.toLowerCase();return t.includes("user rejected")||t.includes("user denied")||t.includes("rejected by the user")||t.includes("action_rejected")||t.includes("user closed")||t.includes("modal closed")}},37907:(e,t,a)=>{a.d(t,{m:()=>i});var r=a(19115),s=a(1512);let n=["#FF6B6B","#FFE66D","#4ECDC4","#45B7D1","#96CEB4","#FFEAA7","#DDA0DD","#FF9FF3"];function i(){return{celebrate:(0,r.useCallback)(()=>{let e,t;return e=Date.now()+2500,(0,s.A)({particleCount:60,angle:60,spread:55,origin:{x:0,y:.65},colors:n,startVelocity:45,gravity:1.2,ticks:200,scalar:1.1}),(0,s.A)({particleCount:60,angle:120,spread:55,origin:{x:1,y:.65},colors:n,startVelocity:45,gravity:1.2,ticks:200,scalar:1.1}),setTimeout(()=>{(0,s.A)({particleCount:80,spread:100,origin:{x:.5,y:.5},colors:n,startVelocity:35,gravity:.8,ticks:250,scalar:1.2})},200),setTimeout(()=>{(0,s.A)({particleCount:40,spread:160,origin:{x:.5,y:.4},colors:n,startVelocity:20,gravity:.5,ticks:300,scalar:.9,shapes:["circle"]})},600),void setTimeout(t=()=>{Date.now()>e||((0,s.A)({particleCount:8,spread:40,origin:{x:.6*Math.random()+.2,y:.4*Math.random()+.2},colors:n,startVelocity:15,gravity:.6,ticks:150,scalar:.7}),setTimeout(t,300))},1e3)},[]),pop:(0,r.useCallback)(()=>void(0,s.A)({particleCount:30,spread:70,origin:{x:.5,y:.6},colors:n,startVelocity:25,gravity:1,ticks:150,scalar:.8}),[])}}},47876:(e,t,a)=>{a.d(t,{HZ:()=>s,Qv:()=>i,UT:()=>n}),a(55036);let r=/^0x[0-9a-fA-F]{64}$/;function s(e){return"string"==typeof e&&r.test(e)}let n="0x2105";function i(e){return e?e.toLowerCase():null}},57741:(e,t,a)=>{a.d(t,{Ay:()=>s,Hn:()=>d,R8:()=>o,e3:()=>c,wA:()=>n});var r=a(43163);let s=["M28.2241 130.426C45.1003 113.244 63.269 96.3515 80.4305 79.3335C98.5425 61.3683 117.188 43.6765 135.399 25.7946C152.982 8.52979 174.285 -0.814754 199.298 0.0558249C222.136 0.736277 243.752 10.5461 259.301 27.2923C269.489 38.3646 275.952 52.1388 282.116 65.7362C305.992 118.563 317.556 176.126 315.94 234.071C314.604 253.121 306.909 271.161 294.086 285.309C279.048 301.937 258.007 311.893 235.614 312.979C226.006 313.474 214.847 312.745 205.242 312.017C157.372 308.389 110.606 295.811 67.3718 274.937C54.7067 268.833 41.5796 262.188 31.161 252.649C14.66 237.28 4.90357 216.014 4.01464 193.484C2.9973 168.68 11.5847 148.394 28.2241 130.426Z","M406.933 419.936C422.26 399.542 450.128 389.619 474.932 389.827C530.924 390.83 586.025 404.007 636.412 428.448C650.5 435.294 663.96 442.059 675.011 453.448C690.8 469.807 699.426 491.774 698.974 514.499C698.34 550.331 681.292 566.131 658.168 588.661L626.119 619.862L584.659 660.344C575.053 669.722 562.064 683.469 551.144 690.309C540.66 696.847 528.856 700.976 516.586 702.4C493.661 705.127 470.6 698.501 452.62 684.021C416.503 
1655.004 393.906 565.593 388.994 520.553C387.824 509.829 387.106 499.055 386.851 488.266C386.049 460.399 388.784 442.479 406.933 419.936Z","M20.4254 450.802C27.8137 442.964 34.5315 436.561 44.2463 431.361C94.5347 404.447 151.598 389.29 208.552 387.042C222.405 386.495 237.049 385.904 250.297 389.617C272.63 395.874 291.532 410.809 302.788 431.089C307.538 439.66 310.707 449.013 312.146 458.704C317.158 492.463 305.74 548.496 296.354 581.074C289.102 604.511 272.159 647.787 256.816 666.953C242.561 684.851 221.679 696.232 198.912 698.517C176.506 700.947 154.059 694.286 136.604 680.028C129.897 674.521 121.282 665.167 115.03 658.744L80.879 623.669L41.0241 582.884C32.887 574.551 20.7606 562.974 14.5549 553.809C6.59956 542.023 1.72298 528.432 0.368749 514.278C-1.76934 490.761 5.45213 468.893 20.4254 450.802Z","M448.187 33.5136C459.073 21.7774 469.119 14.179 484.441 8.81714C506.144 1.19207 530.003 2.61301 550.648 12.7631C557.061 15.9018 563.018 19.8995 568.35 24.6477C575.343 30.8118 584.603 40.8718 591.375 47.8247L631.849 89.3791L665.238 123.523C671.179 129.597 680.141 138.29 685.241 144.788C691.092 152.286 695.61 160.731 698.583 169.764C705.725 191.514 703.92 215.216 693.563 235.628C688.066 246.408 680.338 255.886 670.898 263.446C653.237 277.614 615.453 291.597 593.914 298.675C568.809 306.505 542.973 311.769 516.803 314.382C483.947 317.654 448.976 320.271 421.916 297.596C390.814 271.528 388.089 244.792 390.719 207.036C394.226 157.803 407.181 109.708 428.879 65.3731C434.653 53.6686 439.75 43.5836 448.187 33.5136Z"],n="0 0 703 703",i=["M229.432 491.64C205.011 491.64 183.16 488.427 163.88 482C144.6 476.216 127.891 469.468 113.752 461.756V341.256C124.677 350.253 137.852 358.608 153.276 366.32C169.343 374.032 187.337 377.888 207.26 377.888C242.607 377.888 269.92 366.641 289.2 344.148C309.123 321.655 319.084 287.915 319.084 242.928C319.084 212.08 314.585 187.337 305.588 168.7C297.233 149.42 285.023 135.281 268.956 126.284C252.889 117.287 233.931 112.788 212.08 112.788C197.299 112.788 183.803 114.716 171.592 118.572C160.024 121.785 150.063 125.963 141.708 131.104V426.088H0V110.86C0 94.7933 3.21333 81.6187 9.64 71.336C16.0667 60.4107 26.028 50.7707 39.524 42.416C58.804 30.2053 83.2253 20.244 112.788 12.532C142.351 4.17734 175.448 0 212.08 0C261.565 0 305.267 8.676 343.184 26.028C381.744 42.7373 411.628 69.0867 432.836 105.076C454.044 140.423 464.648 186.373 464.648 242.928C464.648 297.555 454.365 343.184 433.8 379.816C413.235 416.448 385.279 444.404 349.932 463.684C314.585 482.321 274.419 491.64 229.432 491.64ZM142.672 389.456V648.772C136.245 650.7 127.248 652.628 115.68 654.556C104.112 656.484 91.58 657.448 78.084 657.448C51.092 657.448 31.1693 652.628 18.316 642.988C6.10534 633.348 0 615.675 0 589.968V389.456H142.672Z","M708.661 385.6C723.442 385.6 737.902 384.315 752.041 381.744C766.822 378.531 777.426 374.996 783.852 371.14V278.596L702.877 286.308C681.026 287.593 663.674 292.092 650.82 299.804C637.967 307.516 631.541 319.084 631.541 334.508C631.541 349.932 637.646 362.464 649.857 372.104C662.067 381.101 681.669 385.6 708.661 385.6ZM702.877 0C769.714 0 823.055 14.1387 862.901 42.416C902.746 70.0507 922.669 113.109 922.669 171.592V390.42C922.669 406.487 918.491 419.661 910.137 429.944C901.782 439.584 891.178 447.939 878.325 455.008C859.045 466.576 834.945 475.573 806.025 482C777.747 489.069 745.293 492.604 708.661 492.604C643.109 492.604 590.731 479.751 551.529 454.044C512.968 428.337 493.689 390.099 493.689 339.328C493.689 295.627 507.185 262.208 534.177 239.072C561.169 215.293 601.335 200.833 654.677 195.692L782.888 182.196V170.628C782.888 148.777 774.213 133.032 756.861 123.392C740.151 113.752 716.051 108.932 684.56 108.932C660.139 108.932 636.039 111.824 612.26 117.608C589.124 123.392 568.238 130.14 549.601 137.852C541.889 132.711 535.141 124.999 529.357 114.716C524.215 103.791 521.645 92.544 521.645 80.976C521.645 53.984 536.426 34.3827 565.989 22.172C584.626 14.46 606.155 8.99734 630.577 5.78401C655.641 1.928 679.741 0 702.877 0Z","M1309.59 197.62C1302.52 229.753 1293.84 262.851 1283.56 296.912C1273.28 330.973 1263.31 362.785 1253.67 392.348C1244.68 421.911 1237.29 445.689 1231.5 463.684C1223.79 470.111 1213.19 475.252 1199.69 479.108C1186.19 483.607 1170.13 485.856 1151.49 485.856C1129.64 485.856 1110.04 482.643 1092.69 476.216C1075.98 469.789 1064.73 460.471 1058.95 448.26C1053.16 435.407 1046.41 417.091 1038.7 393.312C1031.63 369.533 1024.24 342.541 1016.53 312.336C1008.82 281.488 1001.11 249.355 993.394 215.936C986.325 182.517 979.577 150.384 973.15 119.536C966.724 88.0453 961.583 59.768 957.727 34.704C965.439 26.992 975.721 20.244 988.574 14.46C1002.07 8.03335 1016.85 4.82002 1032.92 4.82002C1052.84 4.82002 1068.91 9.64002 1081.12 19.28C1093.97 28.2773 1101.68 43.7013 1104.25 65.552C1110.68 109.253 1116.47 147.492 1121.61 180.268C1126.75 212.401 1131.25 240.036 1135.1 263.172C1139.6 286.308 1143.14 305.267 1145.71 320.048C1148.92 334.187 1151.49 345.433 1153.42 353.788H1157.27C1161.13 339.007 1166.91 316.513 1174.63 286.308C1182.34 255.46 1191.66 220.435 1202.58 181.232C1213.51 141.387 1224.43 101.22 1235.36 60.732C1246.28 54.3053 1257.53 49.4853 1269.1 46.272C1280.67 43.0587 1294.16 41.452 1309.59 41.452C1329.51 41.452 1346.54 44.6653 1360.68 51.092C1374.82 57.5187 1383.81 67.1587 1387.67 80.012C1399.24 119.215 1409.84 157.132 1419.48 193.764C1429.77 230.396 1438.76 262.851 1446.47 291.128C1454.19 318.763 1459.65 339.649 1462.86 353.788H1467.68C1476.68 302.375 1485.68 248.391 1494.67 191.836C1503.67 135.281 1511.71 78.7267 1518.77 22.172C1538.7 10.604 1560.55 4.82002 1584.33 4.82002C1604.25 4.82002 1620.32 9.31869 1632.53 18.316C1645.38 26.6707 1651.81 41.1307 1651.81 61.696C1651.81 71.336 1650.2 86.1174 1646.99 106.04C1643.77 125.963 1639.27 149.099 1633.49 175.448C1627.71 201.155 1621.28 228.468 1614.21 257.388C1607.14 286.308 1599.75 3
114.264 1592.04 341.256C1584.97 368.248 1578.22 392.348 1571.79 413.556C1565.37 434.764 1559.58 451.473 1554.44 463.684C1547.37 470.111 1535.81 475.252 1519.74 479.108C1503.67 483.607 1486.32 485.856 1467.68 485.856C1420.13 485.856 1392.17 474.288 1383.81 451.152C1378.03 433.8 1370.32 411.307 1360.68 383.672C1351.68 356.037 1342.68 326.153 1333.69 294.02C1324.69 261.244 1316.66 229.111 1309.59 197.62Z","M1840.14 138.816V259.316H1697.47V121.464C1697.47 103.469 1701.65 88.3667 1710 76.156C1719 63.3027 1731.21 52.056 1746.63 42.416C1767.84 29.5627 1793.23 19.6013 1822.79 12.532C1852.99 4.82001 1884.48 0.964016 1917.26 0.964016C1982.81 0.964016 2015.59 22.8147 2015.59 66.516C2015.59 76.7987 2013.98 86.4387 2010.77 95.436C2008.2 104.433 2004.98 112.145 2001.13 118.572C1994.7 117.287 1986.67 116.323 1977.03 115.68C1968.03 114.395 1958.07 113.752 1947.14 113.752C1927.86 113.752 1908.58 116.001 1889.3 120.5C1870.02 124.999 1853.64 131.104 1840.14 138.816ZM1697.47 222.684L1840.14 225.576V476.216C1833.71 478.144 1824.72 479.751 1813.15 481.036C1801.58 482.964 1789.05 483.928 1775.55 483.928C1748.56 483.928 1728.64 479.108 1715.78 469.468C1703.57 459.828 1697.47 442.476 1697.47 417.412V222.684Z"],l=["pawr-logo-piece pawr-logo-piece--animated pawr-logo-piece--0","pawr-logo-piece pawr-logo-piece--animated pawr-logo-piece--1","pawr-logo-piece pawr-logo-piece--animated pawr-logo-piece--2","pawr-logo-piece pawr-logo-piece--animated pawr-logo-piece--3"];function o({className:e}){return(0,r.jsx)("span",{"aria-hidden":!0,className:e??"pointer-events-none absolute -inset-3 -z-10 rounded-full bg-white/10 opacity-0 blur-xl transition-opacity duration-300 group-hover/logo:opacity-100 group-focus-visible/logo:opacity-100"})}function c({animatePieces:e=!1,className:t,decorative:a=!1,markColor:i="currentColor",pieceColors:o,style:d,title:u="pawr mark",...p}){return(0,r.jsx)("svg",{viewBox:n,fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,style:d,"aria-hidden":!!a||void 0,"aria-label":a?void 0:u,role:a?void 0:"img",...p,children:s.map((t,a)=>(0,r.jsx)("path",{d:t,fill:o?.[a]??i,className:e?l[a]:void 0},t))})}function d({animatePieces:e=!1,className:t,decorative:a=!1,markColor:n="currentColor",pieceColors:o,style:c,title:u="pawr",wordmarkColor:p="currentColor",...m}){return(0,r.jsxs)("svg",{viewBox:"0 0 3011 773",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,style:c,"aria-hidden":!!a||void 0,"aria-label":a?void 0:u,role:a?void 0:"img",...m,children:[s.map((t,a)=>(0,r.jsx)("path",{d:t,fill:o?.[a]??n,className:e?l[a]:void 0},t)),(0,r.jsx)("g",{transform:"translate(994.906 114.8203)",children:i.map(e=>(0,r.jsx)("path",{d:e,fill:p},e))})]})}['<svg width="1024" height="1024" viewBox="-160 -160 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">',...s.map(e=>`<path d="${e}" fill="currentColor"/>`),"</svg>"].join("\n")},61235:(e,t,a)=>{a.d(t,{$:()=>s});var r=a(43163);function s({size:e=16,className:t="shrink-0 rounded-full"}){return(0,r.jsx)("img",{src:"https://assets.coingecko.com/coins/images/6319/standard/usdc.png",alt:"",width:e,height:e,className:t})}},62008:(e,t,a)=>{a.d(t,{N:()=>s});var r=a(47876);function s(e,t){if(!e.length)return null;let a=(0,r.Qv)(t);return(a&&!e.some(e=>(0,r.Qv)(e.address)===a)&&(a=(0,r.Qv)(e[0]?.address)),a||(a=(0,r.Qv)(e[0]?.address)),a)?e.find(e=>(0,r.Qv)(e.address)===a)??e[0]??null:null}},62023:(e,t,a)=>{a.d(t,{h:()=>f});var r=a(19115),s=a(82594),n=a(58962),i=a(25016),l=a(47876),o=a(62008),c=a(17987),d=a(27086),u=a(96867);let p="pawr:tip:pending";function m(){try{window.localStorage.removeItem(p)}catch{}}let x=(e,t)=>{},h={idle:"",preparing:"","awaiting-signature":"open your wallet app if you don't see a prompt",confirming:"confirming on Base",success:"",error:"payment failed"},g=[{type:"function",name:"transfer",inputs:[{name:"to",type:"address"},{name:"value",type:"uint256"}],outputs:[{name:"",type:"bool"}],stateMutability:"nonpayable"}];function f(){let{wallets:e}=(0,s.u)(),t=(0,r.useRef)(e);t.current=e;let a=(0,r.useRef)(!1),f=(0,r.useRef)(0),y=(0,r.useRef)({stage:"idle",message:""}),C=(0,r.useRef)(null),[w,b]=(0,r.useState)(!1),[v,j]=(0,r.useState)(null),[N,k]=(0,r.useState)({stage:"idle",message:""}),[E,S]=(0,r.useState)(null),[B,A]=(0,r.useState)(null);(0,r.useEffect)(()=>{y.current=N},[N]),(0,r.useEffect)(()=>{A(function(){try{let e=window.localStorage.getItem(p);if(!e)return null;let t=JSON.parse(e);if(!t.txHash||!(0,l.HZ)(t.txHash)||(!Number.isInteger(t.amountUsd)&&Number.isInteger(t.coffees)&&(t.amountUsd=t.coffees*u.SR),!t.pageSlug||!Number.isInteger(t.amountUsd)))return null;if(Date.now()-t.createdAt>6048e5)return window.localStorage.removeItem(p),null;return t}catch{return null}}())},[]),(0,r.useEffect)(()=>
1{if(0===e.length){C.current=null;return}let t=C.current;C.current=t&&e.some(e=>(0,l.Qv)(e.address)===t)?t:e[0]?.address??null},[e]);let F=(0,r.useCallback)((e,t)=>{k({stage:e,message:t??h[e]})},[]),T=(0,r.useCallback)(()=>{k({stage:"idle",message:""}),j(null),S(null)},[]),P=(0,r.useCallback)(()=>{let e=y.current.stage;("preparing"===e||"awaiting-signature"===e)&&(f.current+=1,a.current=!1,b(!1),j(null),k({stage:"idle",message:""}))},[]),D=(0,r.useCallback)(async e=>{let t=await (0,c.u9)("/api/x402/tip-onchain",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({txHash:e.txHash,pageSlug:e.pageSlug,amountUsd:e.amountUsd,...e.intentId?{intentId:e.intentId}:{},...e.anonymous?{anonymous:!0}:{},...e.tipperName?{tipperName:e.tipperName}:{},...e.message?{message:e.message}:{}})},6e4),a=await t.json().catch(()=>({}));if(!t.ok)throw Error("string"==typeof a.error&&a.error?a.error:`Request failed with status ${t.status}`);return{success:!0,tipId:"number"==typeof a.tipId?a.tipId:null,..."string"==typeof a.taskId?{taskId:a.taskId}:{},...!0===a.replayed?{replayed:!0}:{}}},[]),_=(0,r.useCallback)((e,t="Payment failed")=>{var a,r;let s,n,i=e instanceof Error&&"AbortError"===e.name?"still confirming on Base, tap retry in a minute":e instanceof Error?e.message:t,l=(0,d.Vo)(i),o=(a=i,r=l,(n=(s=a.trim()).toLowerCase()).includes("another payment is already in progress")?"a payment is already running, wait a sec or cancel if the wallet prompt is stuck":n.includes("tipping is not available")?"tipping is not live on this page yet":n.includes("unknown page")?"this page could not be found":n.includes("amount too small")?"that transfer doesn't cover the tip amount":r||n.includes("user rejected")||n.includes("user denied")||n.includes("rejected by the user")||n.includes("action_rejected")||n.includes("user closed")||n.includes("modal closed")?"payment cancelled":n.includes("insufficient")&&(n.includes("usdc")||n.includes("balance")||n.includes("funds"))||n.includes("transfer amount exceeds balance")?"not enough USDC on Base in this wallet":n.includes("insufficient funds for gas")?"not enough ETH on Base for gas, top up and try again":n.includes("execution reverted")?"transfer reverted on-chain, check your USDC balance and retry":n.includes("wrong network")||n.includes("chain")&&(n.includes("mismatch")||n.includes("switch"))?"switch your wallet to Base, then tap pay again":n.includes("timed out")||n.includes("still pending")||n.includes("taking a while")?"still confirming on Base, tap retry in a minute":n.includes("didn't respond")||n.includes("did not respond")?"wallet didn't respond, check your wallet for a pending request or disconnect and retry":n.includes("failed to fetch")||n.includes("network")?"network hiccup, check your connection and try again":s);j(o),k({stage:"error",message:o})},[]),M=(0,r.useCallback)(async e=>{if(a.current)throw Error("Another payment is already in progress");a.current=!0;let r=++f.current;b(!0),j(null),S(null),F("preparing");try{let a,h,y=(0,o.N)(t.current,C.current);if(!y)throw Error("No wallet connected");if(!y.address)throw Error("Connected wallet has no address");let w=y.address,b=(0,u.Hc)(e.amountUsd),v=i.qP,j=await (0,c.u9)("/api/x402/tip-onchain/intent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pageSlug:e.pageSlug,anonymous:!0===e.anonymous})},6e4),N=await j.json().catch(()=>({}));if(!j.ok||"string"!=typeof N.payTo||"string"!=typeof N.intentId)throw Error("string"==typeof N.error&&N.error?N.error:"Could not start the tip, try again");v=N.payTo,a=N.intentId,x("start",{account:w,pageSlug:e.pageSlug,amountUsd:e.amountUsd,amountUnits:b.toString(),walletType:y.walletClientType,anonymous:!0===e.anonymous});let k=await y.getEthereumProvider();if(x("chain check (before)",{chainId:await (0,d.xp)(k)}),await (0,d.Cd)(k,y,x),r!==f.current)throw Error("PAYMENT_ABANDONED");let E=(0,n.p)({abi:g,functionName:"transfer",args:[v,b]});try{let e=await k.request({method:"eth_estimateGas",params:[{from:w,to:i.X_,data:E,value:"0x0",chainId:l.UT}]});if("string"==typeof e&&/^0x[0-9a-f]+$/i.test(e)){let t=12n*BigInt(e)/10n;h=`0x${t.toString(16)}`}}catch(t){var s;let e;if(x("eth_estimateGas skipped",t),(e=((s=t)instanceof Error?s.message:"string"==typeof s?s:JSON.stringify(s)).toLowerCase()).includes("execution reverted")||e.includes("transfer amount exceeds balance")||e.includes("insufficient funds")||e.includes("insufficient balance"))throw t}if(r!==f.current)throw Error("PAYMENT_ABANDONED");F("awaiting-signature");let B={from:w,to:i.X_,data:E,value:"0x0",chainId:l.UT};h&&(B.gas=h);let T=await new Promise((e,t)=>
1{let a=window.setTimeout(()=>{t(Error("wallet didn't respond, check your wallet for a pending request or disconnect and retry"))},18e4);k.request({method:"eth_sendTransaction",params:[B]}).then(t=>{window.clearTimeout(a),e(t)}).catch(e=>{window.clearTimeout(a),t(e)})});if(r!==f.current)throw Error("PAYMENT_ABANDONED");if(!(0,l.HZ)(T))throw Error("Wallet returned an invalid transaction hash");x("tx broadcast",{txHash:T}),S(T);let P={txHash:T,pageSlug:e.pageSlug,amountUsd:e.amountUsd,...a?{intentId:a}:{},...e.anonymous?{anonymous:!0}:{},...e.tipperName&&!e.anonymous?{tipperName:e.tipperName}:{},...e.message?{message:e.message}:{},createdAt:Date.now()};try{window.localStorage.setItem(p,JSON.stringify(P))}catch{}A(P),F("confirming");let _=await D(P);if(r!==f.current)throw Error("PAYMENT_ABANDONED");return x("server confirmed"),m(),A(null),F("success"),_}catch(e){if("PAYMENT_ABANDONED"===(e instanceof Error?e.message:""))return null;throw r===f.current&&_(e),e}finally{r===f.current&&(a.current=!1,b(!1))}},[F,D,_]),$=(0,r.useCallback)(async e=>{let t=e??B;if(!t)return null;if(a.current)throw Error("Another payment is already in progress");a.current=!0;let r=++f.current;b(!0),j(null),S(t.txHash),F("confirming");try{let e=await D(t);if(r!==f.current)throw Error("PAYMENT_ABANDONED");return m(),A(null),F("success"),e}catch(e){if("PAYMENT_ABANDONED"===(e instanceof Error?e.message:""))return null;throw r===f.current&&_(e),e}finally{r===f.current&&(a.current=!1,b(!1))}},[B,F,D,_]);return(0,r.useMemo)(()=>({payTip:M,finishPendingTip:$,abandonInFlightPayment:P,isPaying:w,error:v,status:N,pendingTip:B,resetStatus:T,hasPayerWallet:e.length>0}),[M,$,P,w,v,N,B,T,e.length])}},70690:(e,t,a)=>{a.d(t,{d:()=>i});var r=a(43163);a(19115);var s=a(53796),n=a(99785);function i({className:e,...t}){return(0,r.jsx)(s.bL,{"data-slot":"switch",className:(0,n.cn)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,children:(0,r.jsx)(s.zi,{"data-slot":"switch-thumb",className:(0,n.cn)("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform","data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})}},85219:(e,t,a)=>{a.d(t,{Bc:()=>i,ZI:()=>o,k$:()=>l,m_:()=>c});var r=a(43163);a(19115);var s=a(36980),n=a(99785);function i({delayDuration:e=300,...t}){return(0,r.jsx)(s.Kq,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function l({...e}){return(0,r.jsx)(s.l9,{"data-slot":"tooltip-trigger",...e})}function o({className:e,sideOffset:t=4,...a}){return(0,r.jsx)(s.ZL,{children:(0,r.jsx)(s.UC,{"data-slot":"tooltip-content",sideOffset:t,className:(0,n.cn)("z-50 overflow-hidden rounded-md border border-border bg-card px-3 py-1.5 text-xs text-card-foreground shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})})}let c=Object.assign(function({...e}){return(0,r.jsx)(s.bL,{"data-slot":"tooltip",...e})},{Content:o,Provider:i,Trigger:l})},95119:(e,t,a)=>{a.d(t,{E:()=>s});var r=a(52603);let s=(0,r.createServerReference)("60bae2af2eada879e67f1f09a00d6eedbf33fe9962",r.callServer,void 0,r.findSourceMapURL,"getRecentTipsBySlug")},98099:(e,t,a)=>{a.r(t),a.d(t,{CoffeeIcon:()=>x,PawAvatar:()=>m,TipJarWidget:()=>y,tipDisplayName:()=>h});var r=a(43163),s=a(19115),n=a(21868),i=a(41673),l=a(99785),o=a(57741),c=a(95119),d=a(62023),u=a(99155);function p(){Promise.all([a.e(2134),a.e(9925),a.e(4873),a.e(4023),a.e(5022),a.e(78),a.e(7106)]).then(a.bind(a,2314))}function m({seed:e,size:t=24,className:a}){let s=e.replace(/^0x/i,"").padEnd(16,"0"),n=parseInt(s.slice(0,6),16)%360,i=35+parseInt(s.slice(8,10),16)%20,l=82+parseInt(s.slice(10,12),16)%10,c=`hsl(${n}, ${i}%, ${l}%)`,d=`hsl(${n}, ${i+10}%, ${l-45}%)`;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 512 512",fill:"none",className:a,children:[(0,r.jsx)("circle",{cx:"256",cy:"256",r:"256",fill:c}),(0,r.jsx)("g",{transform:"translate(115.5, 115.5) scale(0.4)",children:o.Ay.map(e=>(0,r.jsx)("path",{d:e,fill:d},e))})]})}function x({className:e,size:t=14}){return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[(0,r.jsx)("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),(0,r.jsx)("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z"}),(0,r.jsx)("line",{x1:"6",y1:"2",x2:"6",y2:"4"}),(0,r.jsx)("line",{x1:"10",y1:"2",x2:"10",y2:"4"}),(0,r.jsx)("line",{x1:"14",y1:"2",x2:"14",y2:"4"})]})}function h(e){return e.tipperName??"someone"}function g({size:e}){let t=e<=32?"rounded-[8px]":"rounded-[10px]";return(0,r.jsxs)("div",{className:(0,l.cn)("relative flex flex-shrink-0 items-center justify-center overflow-hidden","bg-[#F5F0EB] shadow-[0_1px_2px_rgba(0,0,0,0.1)]",t),style:{width:e,height:e},children:[(0,r.jsx)(n.default,{src:"/tip-jar-preview-v2.png",alt:"tip jar",width:128,height:216,className:"object-contain",style:{height:.72*e}}),(0,r.jsx)("div",{className:(0,l.cn)("pointer-events-none absolute inset-0 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.08)]",t)})]})}let f=(0,l.cn)("group/widget relative h-full w-full cursor-pointer overflow-hidden rounded-3xl","border border-gray-200 bg-[#FDFBF9] shadow-[0_1px_3px_rgba(0,0,0,0.04)]","transition-[box-shadow,border-color] duration-300 ease-out","hover:border-gray-300 hover:shadow-md");function y({size:e="2x1",isEditable:t=!1}){let a=((0,i.usePathname)()??"").replace(/\/+$/,"").replace(/^\/+/,""),n=a.split("/")[0]||"this page",o="1x1"===e||"2x2"===e?e:"2x1",[x,C]=(0,s.use
1State)([]),[w,b]=(0,s.useState)(!1),v=(0,d.h)(),j=(0,s.useCallback)(async()=>{a&&C(await (0,c.E)(a,50))},[a]);(0,s.useEffect)(()=>{let e=!1;if(a)return(0,c.E)(a,50).then(t=>{e||C(t)}),()=>{e=!0}},[a]);let N=(0,s.useCallback)(()=>b(!0),[]),k=(0,r.jsx)("span",{className:(0,l.cn)("w-fit cursor-pointer rounded-full px-4 py-1.5 text-sm font-medium whitespace-nowrap transition-colors","bg-[#F5F0EB] text-[#6B5B4B] hover:bg-[#EDE5DB]",t&&"pointer-events-none"),children:"Buy a coffee"}),E=x.length>0&&(0,r.jsxs)("div",{className:"flex -space-x-2",children:[x.slice(0,4).map((e,t)=>(0,r.jsx)("div",{className:"rounded-full ring-2 ring-[#FDFBF9]",children:(0,r.jsx)(m,{seed:e.avatarSeed,size:28})},`${e.avatarSeed}-${t}`)),x.length>4&&(0,r.jsx)("div",{className:"flex size-7 items-center justify-center rounded-full bg-[#F5F0EB] ring-2 ring-[#FDFBF9]",children:(0,r.jsxs)("span",{className:"text-[9px] font-medium text-[#9C8B7A]",children:["+",x.length-4]})})]});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{onClick:N,onPointerEnter:p,onFocus:p,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),N())},"aria-label":`tip jar for ${n}`,className:f,children:["1x1"===o&&(0,r.jsxs)("div",{className:"flex h-full flex-col p-6",children:[(0,r.jsx)(g,{size:40}),(0,r.jsxs)("p",{className:"mt-3 flex-1 truncate text-sm font-normal text-foreground",children:["Support ",n]}),k]}),"2x1"===o&&(0,r.jsxs)("div",{className:"flex h-full",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col p-6",children:[(0,r.jsx)(g,{size:40}),(0,r.jsxs)("p",{className:"mt-3 truncate text-sm font-normal text-foreground",children:["Support ",n]}),(0,r.jsx)("div",{className:"flex-1"}),k]}),(0,r.jsx)("div",{className:"flex w-1/3 flex-shrink-0 flex-col items-end justify-end gap-2 pr-6 pb-6",children:E??(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"opacity-40",children:(0,r.jsx)(m,{seed:"0x000019000a05",size:28})}),(0,r.jsx)("span",{className:"text-[11px] whitespace-nowrap text-[#9C8B7A]",children:"Be the first"})]})})]}),"2x2"===o&&(0,r.jsxs)("div",{className:"flex h-full flex-col",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-col p-6 pb-0",children:[(0,r.jsx)(g,{size:40}),(0,r.jsxs)("p",{className:"mt-3 truncate text-sm font-normal text-foreground",children:["Support ",n]}),(0,r.jsx)("div",{className:"mt-[22px]",children:k})]}),(0,r.jsx)("div",{className:"flex-1"}),(0,r.jsxs)("div",{className:"mx-6 mb-6",children:[(0,r.jsx)("p",{className:"mb-2 text-[11px] font-medium tracking-wider text-gray-8 uppercase",children:"Recently supported"}),x.length>0?(0,r.jsx)("div",{className:"space-y-2.5 rounded-xl bg-[#F7F3EF] p-4",children:x.slice(0,2).map((e,t)=>(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,r.jsx)(m,{seed:e.avatarSeed,size:24,className:"flex-shrink-0"}),(0,r.jsxs)("span",{className:"truncate text-xs text-gray-9",children:[(0,r.jsx)("span",{className:"font-semibold text-gray-12",children:h(e)})," became a supporter."]})]},`${e.avatarSeed}-${t}`))}):(0,r.jsx)("div",{className:"rounded-xl bg-[#F7F3EF] p-4 opacity-50",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,r.jsx)(m,{seed:"0x000019000a05",size:24,className:"flex-shrink-0"}),(0,r.jsx)("span",{className:"text-xs text-[#9C8B7A]",children:"Be the first"})]})})]})]})]}),(0,r.jsx)(u.e,{open:w,onClose:()=>b(!1),pageSlug:a,pageLabel:n,tips:x,payment:v,onTipRecorded:j})]})}},99155:(e,t,a)=>{a.d(t,{e:()=>T});var r=a(43163),s=a(19115),n=a(78506),i=a(88438),l=a(80657),o=a(60808),c=a(99785),d=a(74890),u=a(89233),p=a(45004),m=a(13187),x=a(85219),h=a(70690),g=a(70018),f=a(61235),y=a(50401),C=a(37907),w=a(77682),b=a(96867),v=a(52603);let j=(0,v.createServerReference)("40201da166be925fe886ccf89ab24d4307460486b7",v.callServer,void 0,v.findSourceMapURL,"createTipCheckoutSession");var N=a(98099);let k=[.23,1,.32,1],E=(0,i.default)(()=>(0,d.s)(()=>Promise.all([a.e(2134),a.e(9925),a.e(4873),a.e(4023),a.e(5022),a.e(78),a.e(7106)]).then(a.bind(a,2314)).then(e=>({default:e.TipJar3D}))),{loadableGenerated:{webpack:()=>[2314]},ssr:!1,loading:()=>null}),S=[4,10,20],B=`Enter at least $${b.Y2}`;
1function A({onClick:e,disabled:t,tone:a,left:n,right:i,hint:l,disabledHint:o}){let[d,u]=(0,s.useState)(!1),p=(0,r.jsxs)("button",{onClick:e,disabled:t,className:(0,c.cn)("flex w-full cursor-pointer items-center justify-between gap-2 rounded-xl px-4 py-3 text-sm font-semibold transition-colors","primary"===a?"bg-gray-12 text-gray-1 hover:bg-gray-11":"border border-gray-4 bg-gray-1 text-gray-12 hover:border-gray-6 hover:bg-gray-2",t&&"cursor-not-allowed opacity-60"),children:[(0,r.jsx)("span",{className:"flex items-center gap-2",children:n}),(0,r.jsx)("span",{className:(0,c.cn)("flex items-center gap-1.5 tabular-nums","primary"===a?"text-gray-1/75":"text-gray-11"),children:i})]});return(0,r.jsx)(x.Bc,{children:(0,r.jsxs)(x.m_,{open:d,onOpenChange:u,children:[(0,r.jsx)(x.k$,{asChild:!0,children:t?(0,r.jsx)("span",{tabIndex:0,onClick:()=>u(e=>!e),className:"block w-full",children:p}):p}),(0,r.jsx)(x.ZI,{side:"top",children:t&&o||l})]})})}function F(){return(0,r.jsxs)("span",{className:"relative inline-flex",children:[(0,r.jsx)(f.$,{size:18}),(0,r.jsx)(g.h_,{className:"absolute -right-0.5 -bottom-0.5 size-2.5 rounded-full bg-gray-1"})]})}function T({open:e,onClose:t,pageSlug:a,pageLabel:i,tips:d,payment:x,externalSuccess:g=!1,externalSuccessAmount:f=null,onTipRecorded:v}){let{ensName:P,ensAvatar:D,connectWallet:_,isAuthenticated:M,authSettled:$,user:L}=(0,y.v)(),{pop:I}=(0,C.m)(),U=(0,w.j)(),[z,H]=(0,s.useState)("tip"),[R,V]=(0,s.useState)(0),[Z,O]=(0,s.useState)(""),[W,q]=(0,s.useState)(""),[Y,J]=(0,s.useState)(!1),[Q,K]=(0,s.useState)(0),[G,X]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(null),[ea,er]=(0,s.useState)(""),[es,en]=(0,s.useState)(!1),[ei,el]=(0,s.useState)(!1),eo=(0,s.useRef)(null),ec=x.status.stage,ed="preparing"===ec||"awaiting-signature"===ec||"confirming"===ec,eu=x.pendingTip&&x.pendingTip.pageSlug===a?x.pendingTip:null,ep=R>0,em=G||x.isPaying||!ep,ex=x.isPaying||!ep;(0,s.useEffect)(()=>el(!0),[]);let eh=(0,s.useCallback)(e=>{let t=(0,b.H0)(e);V(t),O(t>0?String(t):"")},[]);(0,s.useEffect)(()=>{e&&(H("tip"),eh(0),q(""),J(!1),er(""),en(!1))},[e,eh]);let eg="success"===ec||g;(0,s.useEffect)(()=>{("success"===ec||g)&&(I(),v())},[ec,g,I,v]);let ef=(0,s.useMemo)(()=>{if(!$||!M)return null;if(P)return P;let e=L?.linkedAccounts?.find(e=>"farcaster"===e.type);return e?.username||null},[$,M,P,L]),ey=ef??(W.trim()||void 0),eC=ea.trim()?ea.trim():void 0,ew=(0,s.useCallback)(()=>{("success"===ec||"error"===ec)&&x.resetStatus(),t()},[ec,x,t]);(0,s.useEffect)(()=>{if(!e)return;eo.current?.focus();let t=e=>{"Escape"!==e.key||ed||ew()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,ed,ew]);let eb=async()=>{try{await x.payTip({pageSlug:a,amountUsd:R,tipperName:Y?void 0:ey,message:eC,anonymous:Y})}catch{}},ev=async()=>{if(!G){X(!0),et(null);try{let e=await j({pageSlug:a,amountUsd:R,tipperName:Y?void 0:ey,message:eC,anonymous:Y});if(e.url){window.location.href=e.url;return}et(e.error??"Card checkout is unavailable right now")}catch{et("Card checkout is unavailable right now")}finally{X(!1)}}},ej=async()=>{try{await x.finishPendingTip()}catch{}},eN=(0,s.useMemo)(()=>{switch(ec){case"preparing":return"Preparing…";case"awaiting-signature":return"Confirm in your wallet";case"confirming":return"Confirming…";case"error":return"payment cancelled"===x.error?"Payment cancelled":"Retry payment";default:return`Support onchain${R<b.Y2?"":` \xb7 $${R}`}`}},[ec,x.error,R]),ek=g?f:eu?.amountUsd??R,eE="error"===ec&&x.error&&"payment cancelled"!==x.error,eS=(0,s.useMemo)(()=>{let e=new Map;for(let t of d){let a=t.tipperName??`anon:${t.avatarSeed}`,r=e.get(a);r?r.total+=t.amountUsd:e.set(a,{name:(0,N.tipDisplayName)(t),seed:t.avatarSeed,total:t.amountUsd})}return[...e.values()].sort((e,t)=>t.total-e.total).slice(0,3)},[d]),eB=(0,s.useMemo)(()=>d.map(e=>({seed:e.avatarSeed,amountUsd:e.amountUsd})).reverse(),[d]);if(!ei)return null;let eA=.25*!U,eF=.18*!U,eT=.15*!U;return(0,n.createPortal)((0,r.jsx)(l.N,{children:e&&(0,r.jsx)(o.P.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0,transition:{duration:eF}},transition:{duration:eA,ease:k},onClick:ed?void 0:ew,children:(0,r.jsxs)(o.P.div,{onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":`tip jar for ${i}`,initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:8,transition:{duration:eF}},transition:{duration:eA,ease:k},className:"relative mx-4 max-h-[90vh] w-full max-w-md overflow-y-auto rounded-3xl bg-[#FDFBF9] shadow-2xl",children:[(0,r.jsx)("button",{ref:eo,onClick:ew,"aria-label":"close",className:"absolute top-4 right-4 z-20 cursor-pointer rounded-lg p-1.5 text-gray-10 transition-colors hover:bg-gray-3 hover:text-gray-12",children:(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:(0,r.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})})}),(0,r.jsx)(l.N,{children:"supporters"===z&&(0,r.jsxs)(o.P.button,{ref:e=>e?.focus(),onClick:()=>H("tip"),initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:eT,ease:k},className:"absolute top-4 left-4 z-20 flex cursor-pointer items-center gap-1 rounded-lg p-1.5 text-gray-10 transition-colors hover:bg-gray-3 hover:text-gray-12",children:[(0,r.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M15 6l-6 6 6 6"})}),(0,r.jsx)("span",{className:"text-xs",children:"Back"})]})}),(0,r.jsx)(l.N,{mode:"wait",initial:!1,children:(0,r.jsx)(o.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:eT,ease:k},children:"tip"===z?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"px-6 pt-5 pb-1",children:(0,r.jsxs)("p",{className:"text-lg font-semibold tracking-tight text-gray-12",children:["Support ",i]})}),(0,r.jsx)("div",{className:"flex w-full justify-center py-4",children:(0,r.jsx)("div",{className:"h-72 w-88",children:(0,r.jsx)(E,{coins:eB,replayKey:Q,className:"h-full w-full"})})}),(0,r.jsx)("div",{className:"flex flex-col gap-4 px-6 pb-6",style:{minHeight:260},children:eg?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3",style:{minHeight:236},children:[(0,r.jsx)(o.P.div,{className:"flex size-10 items-center justify-center rounded-full bg-gray-12",initial:{scale:.6,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.2,ease:k,delay:.05},children:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,r.jsx)(o.P.path,{d:"M5.5 10.5L8.5 13.5L14.5 7",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.3,delay:.15,ease:k}})})}),(0,r.jsxs)(o.P.div,{className:"flex flex-col items-center gap-0.5",initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.2,ease:k,delay:.25},children:[(0,r.jsx)("p",{className:"text-sm font-semibold tracking-tight text-gray-12",children:"Thank you!"}),null!=ek&&(0,r.jsxs)("p",{className:"text-xs text-gray-9",children:["$",ek," tip sent"]})]}),(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:()=>K(e=>e+1),"aria-label":"Replay the coin drop",className:"cursor-pointer rounded-xl border border-gray-4 bg-gray-1 px-4 py-2.5 text-sm font-semibold text-gray-12 transition-colors hover:border-gray-6 hover:bg-gray-2",children:"Replay drop"}),(0,r.jsx)("button",{onClick:ew,className:"cursor-pointer rounded-xl bg-gray-12 px-6 py-2.5 text-sm font-semibold text-gray-1 transition-colors hover:bg-gray-11",children:"Close"})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:(0,c.cn)("flex w-full items-center gap-2 rounded-lg border bg-gray-2 py-2 pr-2 pl-3 transition-colors",ep?"border-gray-6":"border-gray-4","focus-within:border-gray-8"),children:[(0,r.jsx)("span",{className:(0,c.cn)("text-sm font-semibold",ep?"text-gray-12":"text-gray-8"),children:"$"}),(0,r.jsx)("input",{type:"text",inputMode:"numeric",value:Z,onChange:e=>O(e.target.value.replace(/[^0-9]/g,"")),onBlur:()=>eh(Number(Z)),onKeyDown:e=>{"Enter"===e.key&&eh(Number(Z))},placeholder:"Enter amount","aria-label":"tip amount in dollars",className:"min-w-0 flex-1 bg-transparent text-sm font-semibold text-gray-12 tabular-nums placeholder:font-medium placeholder:text-gray-8 focus:outline-none"}),(0,r.jsx)("div",{className:"flex flex-shrink-0 gap-1",children:S.map(e=>(0,r.jsxs)(o.P.button,{type:"button",onClick:()=>eh(R+e),whileTap:{scale:.95},transition:{duration:.15,ease:k},"aria-label":`add $${e}`,className:"cursor-pointer rounded-lg bg-gray-3 px-2 py-1 text-xs font-semibold text-gray-11 tabular-nums transition-colors hover:bg-gray-4 hover:text-gray-12",children:["+$",e]},e))})]})}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:(0,
1c.cn)("flex flex-col gap-3 transition-opacity",Y&&"pointer-events-none opacity-40"),children:[ef?(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[D?(0,r.jsx)("img",{src:D,alt:"",width:28,height:28,className:"size-7 flex-shrink-0 rounded-full",onError:e=>{e.currentTarget.style.display="none"}}):null,(0,r.jsxs)("span",{className:"truncate text-sm text-gray-11",children:["Tipping as ",ef]})]}):null,!ef&&(0,r.jsx)("input",{type:"text",value:W,onChange:e=>q(e.target.value),placeholder:"Your name (optional)",maxLength:64,disabled:Y,className:(0,c.cn)("w-full rounded-lg border border-gray-4 bg-gray-2 px-3 py-2 text-sm text-gray-12 transition-[opacity,color,background-color,border-color] placeholder:text-gray-8 focus:border-gray-8 focus:ring-1 focus:ring-gray-8 focus:outline-none",!Y&&"disabled:opacity-50")})]}),(0,r.jsx)("div",{className:"flex min-h-[38px] items-center",children:es?(0,r.jsx)("input",{type:"text",value:ea,onChange:e=>er(e.target.value),placeholder:"Say something nice...",maxLength:140,autoFocus:!0,className:"w-full rounded-lg border border-gray-4 bg-gray-2 px-3 py-2 text-sm text-gray-12 transition-colors placeholder:text-gray-8 focus:border-gray-8 focus:ring-1 focus:ring-gray-8 focus:outline-none"}):(0,r.jsxs)("button",{onClick:()=>en(!0),className:"flex w-fit cursor-pointer items-center gap-2 text-sm text-gray-8 transition-opacity hover:opacity-80",children:[(0,r.jsx)("span",{className:"flex size-5 items-center justify-center rounded-full bg-gray-3",children:(0,r.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",children:(0,r.jsx)("path",{d:"M6 2v8M2 6h8",stroke:"var(--gray-8)",strokeWidth:"1.5",strokeLinecap:"round"})})}),"Add a note"]})})]}),!eu&&(0,r.jsx)(A,{onClick:ev,disabled:em,tone:"primary",hint:`${i} gets less due to stripe and intermediary fees`,disabledHint:B,left:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.default,{width:16,height:16}),(0,r.jsx)("span",{children:G?"Redirecting…":"Support"})]}),right:ep?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:(0,c.$g)(Math.max(0,Math.round((R-(!Number.isFinite(R)||R<=0?0:Math.round((.029*R+.3)*100)/100))*100)/100))}),(0,r.jsx)(p.default,{width:13,height:13})]}):null}),eu?(0,r.jsx)("button",{onClick:ej,disabled:x.isPaying,className:(0,c.cn)("w-full cursor-pointer rounded-xl bg-gray-12 py-3 text-sm font-semibold text-gray-1 transition-colors hover:bg-gray-11",x.isPaying&&"cursor-not-allowed opacity-60"),children:ed?eN:"Finish recording your tip"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(A,{onClick:x.hasPayerWallet?eb:()=>_(),disabled:x.hasPayerWallet&&ex,tone:"secondary",hint:"instant, no fees",disabledHint:B,left:x.hasPayerWallet?(0,r.jsx)("span",{children:eN}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.default,{width:16,height:16}),(0,r.jsx)("span",{children:"Connect wallet"})]}),right:x.hasPayerWallet||!ep?(0,r.jsx)(F,{}):(0,r.jsx)("span",{children:(0,c.$g)(R)})}),x.hasPayerWallet&&(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3 px-4",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-12",children:"Tip anonymously"}),(0,r.jsxs)("p",{className:"mt-0.5 text-xs text-gray-10",children:["Your tip will land on a randomly generated public address owned by ",i,"."]})]}),(0,r.jsx)(h.d,{checked:Y,onCheckedChange:J,"aria-label":"tip anonymously",className:"mt-0.5 flex-shrink-0"})]})]}),ee&&(0,r.jsx)("p",{className:"text-center text-xs text-gray-9",children:ee}),x.status.message&&ed&&(0,r.jsx)("p",{className:"text-center text-xs text-gray-8",children:x.status.message}),eE&&(0,r.jsx)("p",{className:"text-center text-xs text-gray-9",children:x.error}),("preparing"===ec||"awaiting-signature"===ec)&&(0,r.jsx)("button",{onClick:x.abandonInFlightPayment,className:"cursor-pointer text-center text-xs text-gray-7 underline underline-offset-2 hover:text-gray-9",children:"Not seeing a prompt? Cancel"}),d.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-3 border-t border-gray-3 pt-4",children:[(0,r.jsx)("p",{className:"text-[11px] font-medium tracking-wider text-gray-8 uppercase",children:"Recently supported"}),(0,r.jsxs)("div",{className:"space-y-3.5",children:[d.slice(0,4).map((e,t)=>
1(0,r.jsxs)("div",{className:(0,c.cn)("flex min-w-0 gap-2.5",e.message?"items-start":"items-center"),children:[(0,r.jsx)(N.PawAvatar,{seed:e.avatarSeed,size:24,className:"flex-shrink-0"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("span",{className:"block truncate text-xs text-gray-9",children:[(0,r.jsx)("span",{className:"font-semibold text-gray-12",children:(0,N.tipDisplayName)(e)})," became a supporter."]}),e.message&&(0,r.jsx)("p",{className:"mt-1.5 rounded-xl bg-[#F0EAE3] px-3 py-2 text-[13px] text-gray-11",children:e.message})]})]},`${e.avatarSeed}-${t}`)),(0,r.jsxs)("button",{onClick:()=>H("supporters"),className:"mt-1 flex w-full cursor-pointer items-center justify-center gap-1.5 rounded-lg border border-gray-200 py-2 text-xs font-medium text-gray-9 transition-colors hover:border-gray-300 hover:text-gray-11",children:["See all",(0,r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"m6 9 6 6 6-6"})})]})]})]})]})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-col items-center border-b border-gray-100 pt-6 pb-4",children:[(0,r.jsx)("p",{className:"text-2xl font-bold text-gray-12 tabular-nums",children:d.length.toLocaleString()}),(0,r.jsxs)("p",{className:"text-sm text-gray-9",children:["Supporter",1!==d.length?"s":""]})]}),eS.length>0&&(0,r.jsxs)("div",{className:"flex flex-col items-center border-b border-gray-100 py-4",children:[(0,r.jsx)("p",{className:"mb-3 text-xs text-gray-8",children:"Top supporters"}),(0,r.jsx)("div",{className:"flex items-end justify-center gap-6",children:eS.map((e,t)=>(0,r.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(N.PawAvatar,{seed:e.seed,size:[56,48,44][t]??44}),(0,r.jsx)("div",{className:"absolute -top-1 -right-1 flex size-5 items-center justify-center rounded-full bg-gray-12 text-[10px] font-bold text-gray-1 ring-2 ring-gray-1",children:t+1})]}),(0,r.jsx)("span",{className:"max-w-[80px] truncate text-center text-xs font-medium text-gray-11",children:e.name})]},e.name))})]}),(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("p",{className:"px-5 pt-4 pb-2 text-sm font-semibold text-gray-12",children:"Recent supporters"}),(0,r.jsx)("div",{className:"flex max-h-72 flex-col overflow-y-auto",children:0===d.length?(0,r.jsx)("p",{className:"py-6 text-center text-sm text-gray-8",children:"No supporters yet"}):d.map((e,t)=>(0,r.jsxs)("div",{className:(0,c.cn)("flex gap-3 px-5 py-2.5",e.message?"items-start":"items-center"),children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)(N.PawAvatar,{seed:e.avatarSeed,size:36})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("p",{className:"text-sm text-gray-9",children:[(0,r.jsx)("span",{className:"font-semibold text-gray-12",children:(0,N.tipDisplayName)(e)})," ","became a supporter."]}),e.message&&(0,r.jsx)("p",{className:"mt-1.5 rounded-xl bg-[#F0EAE3] px-3 py-2 text-sm text-gray-11",children:e.message})]})]},`${e.avatarSeed}-${t}`))})]}),(0,r.jsx)("div",{className:"h-4"})]})},z)})]})},"tip-jar-modal")}),document.body)}}}]);

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.