1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[356],{10154:function(t,e,r){"use strict";r.d(e,{Z:function(){return d}});var o=r(67294),n=r(50088),s=r(86212);let i=(0,s.zo)("div",{float:"left",boxSizing:"border-box",pl:"calc($$rowGap / 2)",pr:"calc($$rowGap / 2)"});var l=r(85893);let a=({children:t,span:e,offset:r,css:o,...n})=>(0,l.jsx)(i,{css:{width:100/12*e+"%",marginLeft:100/12*r+"%",...o},...n,children:t});a.toString=()=>".nextui-column";let c=o.memo(a);var d=(0,n.Z)(c,{span:12,offset:0})},42495:function(t,e,r){"use strict";r.d(e,{ZP:function(){return T}});var o=r(67294),n=r(50088),s=(t,e)=>{(0,o.useEffect)(()=>{let r=r=>{let o=t.current;r&&o&&!o.contains(r.target)&&e(r)};return document.addEventListener("click",r),()=>document.removeEventListener("click",r)},[t,e])},i=r(73935),l=r(70345),a=r(36693),c=r(98327),d=t=>{(0,o.useEffect)(()=>{let e=e=>t(e);return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[t])},u=r(61309),p=r(86212);let x=(0,p.zo)("div",{width:"max-content",display:"inherit"}),h=(0,p.zo)("span",{display:"none",content:"",size:"$5",zIndex:"-2",background:"$$tooltipColor",br:"0px 0px 2px 0px",position:"absolute"}),f=(0,p.zo)("div",{position:"relative",fs:"$sm",padding:0,variants:{hideArrow:{false:{[`& ${h}`]:{display:"block"}}}}}),m=(0,p.zo)("div",{position:"absolute",width:"auto",padding:"$3 $sm",opacity:0,zIndex:"$10",br:"$lg","@motion":{transition:"none"},variants:{color:{default:{$$tooltipColor:"$colors$background",bg:"$$tooltipColor"},primary:{$$tooltipColor:"$colors$primary",bg:"$$tooltipColor"},secondary:{$$tooltipColor:"$colors$secondary",bg:"$$tooltipColor"},success:{$$tooltipColor:"$colors$success",bg:"$$tooltipColor"},warning:{$$tooltipColor:"$colors$warning",bg:"$$tooltipColor"},error:{$$tooltipColor:"$colors$error",bg:"$$tooltipColor"},invert:{$$tooltipColor:"$colors$foreground",bg:"$$tooltipColor"}},contentColor:{default:{$$tooltipTextColor:"$colors$text",color:"$$tooltipTextColor"},primary:{$$tooltipTextColor:"$colors$primary",color:"$$tooltipTextColor"},secondary:{$$tooltipTextColor:"$colors$secondary",color:"$$tooltipTextColor"},success:{$$tooltipTextColor:"$colors$success",color:"$$tooltipTextColor"},warning:{$$tooltipTextColor:"$colors$warning",color:"$$tooltipTextColor"},error:{$$tooltipTextColor:"$colors$error",color:"$$tooltipTextColor"},invert:{$$tooltipTextColor:"$colors$invert",color:"$$tooltipTextColor"}},rounded:{true:{br:"$pill"}},shadow:{true:{bs:"$md"}},animated:{true:{transition:"opacity 0.25s ease 0s, top 0.25s ease 0s"},false:{transition:"none"}}},compoundVariants:[{color:"primary",contentColor:"default",css:{$$tooltipTextColor:"$colors$white"}},{color:"secondary",contentColor:"default",css:{$$tooltipTextColor:"$colors$white"}},{color:"success",contentColor:"default",css:{$$tooltipTextColor:"$colors$white"}},{color:"error",contentColor:"default",css:{$$tooltipTextColor:"$colors$white"}},{color:"invert",contentColor:"default",css:{$$tooltipTextColor:"$colors$background"}}],defaultVariants:{color:"default",contentColor:"default"}}),g={top:-1e3,left:-1e3,right:-1e3,bottom:-1e3,width:0,height:0},j=t=>{if(!t||!t.current)return g;let e=t.current.getBoundingClientRect();return{...e,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top,top:e.top+document.documentElement.scrollTop,bottom:e.bottom+document.documentElement.scrollTop,left:e.left+document.documentElement.scrollLeft,right:e.right+document.documentElement.scrollLeft}},$={top:"-1000px",left:"-1000px",transform:"none"},v=(t,e,r)=>{let o={top:{top:e.top-r+"px",left:`${e.left+e.width/2}px`,transform:"translate(-50%, -100%)"},topStart:{top:e.top-r+"px",left:`${e.left}px`,transform:"translate(0, -100%)"},topEnd:{top:e.top-r+"px",left:`${e.left+e.width}px`,transform:"translate(-100%, -100%)"},bottom:{top:`${e.bottom+r}px`,left:`${e.left+e.width/2}px`,transform:"translate(-50%, 0)"},bottomStart:{top:`${e.bottom+r}px`,left:`${e.left}px`,transform:"translate(0, 0)"},bottomEnd:{top:`${e.bottom+r}px`,left:`${e.left+e.width}px`,transform:"translate(-100%, 0)"},left:{top:`${e.top+e.height/2}px`,left:e.left-r+"px",transform:"translate(-100%, -50%)"},leftStart:{top:`${e.top}px`,left:e.left-r+"px",transform:"translate(-100%, 0)"},leftEnd:{top:`${e.top+e.height}px`,left:e.left-r+"px",transform:"translate(-100%, -100%)"},right:{top:`${e.top+e.height/2}px`,left:`${e.right+r}px`,transform:"translate(0, -50%)"},rightStart:{top:`${e.top}px`,left:`${e.right+r}px`,transform:"translate(0, 0)"},rightEnd:{top:`${e.top+e.height}px`,left:`${e.right+r}px`,transform:"translate(0, -100%)"}};return o[t]||o.top},w=(t,e)=>{let r={top:{top:"auto",right:"auto",left:"50%",bottom:"0px",transform:"translate(-50%, 100%) rotate(45deg)"},topStart:{top:"auto",right:"auto",left:"8%",bottom:"0px",transform:"translate(8%, 100%) rotate(45deg)"},topEnd:{top:"auto",right:"8%",left:"auto",bottom:"0px",transform:"translate(8%, 100%) rotate(45deg)"},bottom:{top:"0px",right:"auto",left:"50%",bottom:"auto",transform:"translate(-50%, -100%) rotate(225deg)"},bottomStart:{top:"0px",right:"auto",left:"8%",bottom:"auto",transform:"translate(8%, -100%) rotate(225deg)"},bottomEnd:{top:"0px",right:"8%",left:"auto",bottom:"auto",transform:"translate(8%, -100%) rotate(225deg)"},left:{top:"50%",right:`-${e-1}px`,left:"auto",bottom:"auto",transform:"translate(100%, -50%) rotate(-45deg)"},leftStart:{top:"calc(15% + 1px)",right:`-${e-1}px`,left:"auto",bottom:"auto",transform:"translate(100%, 0) rotate(-45deg)"},leftEnd:{top:"auto",right:`-${e-1}px`,left:"auto",bottom:"calc(15% + 1px)",transform:"translate(100%, 0) rotate(-45deg)"},right:{top:"50%",right:"auto",left:`-${e-1}px`,bottom:"auto",transform:"translate(-100%, -50%) rotate(135deg)"},rightStart:{top:"calc(15% + 1px)",right:"auto",left:`-${e-1}px`,bottom:"auto",transform:"translate(-100%, 0) rotate(135deg)"},rightEnd:{top:"auto",right:"auto",left:`-${e-1}px`,bottom:"calc(15% + 1px)",transform:"translate(-100%, 0) rotate(135deg)"}};return r[t]||r.top};var b=r(85893);let Z="nextui-tooltip",C=({children:t,parent:e,visible:r,offset:n,placement:s,rounded:p,animated:x,className:g,hideArrow:C,css:y,...E})=>{let T=(0,l.Z)("tooltip"),S=(0,o.useRef)(null),[D,I]=(0,o.useState)($);if(!e)return null;let N=()=>{let t=v(s,j(e),n);I(t)},{transform:P,top:k,left:F,right:A,bottom:L}=(0,o.useMemo)(()=>w(s,5),[s]);(0,a.Z)(N),d(()=>N()),(0,o.useEffect)(()=>{N()},[r]);let R=(0,o.useMemo)(()=>r?"open":"closed",[r]);return T?(0,i.createPortal)((0,b.jsx)(c.Z,{enterTime:20,leaveTime:20,name:`${Z}-wrapper`,visible:r,children:(0,b.jsx)(m,{ref:S,animated:x,className:(0,u.Z)(`${Z}-content`,`${Z}--${R}`,g),css:{left:D.left,top:`calc(${D.top} + 6px)`,transform:D.transform,[`&.${Z}-wrapper-enter-active`]:{opacity:1,top:D.top},...y},"data-state":R,onClick(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation()},...E,children:(0,b.jsxs)(f,{className:(0,u.Z)(Z,{[`${Z}--with-arrow`]:!C}),"data-state":R,hideArrow:C,role:"tooltip",children:[(0,b.jsx)(h,{className:`${Z}-arrow`,css:{left:F,top:k,right:A,bottom:L,transform:P}}),t]})})}),T):null};C.toString=()=>".nextui-tooltip-content";var y=(0,n.Z)(C,{placement:"top",offset:12,className:""});let E=({children:t,initialVisible:e,content:r,offset:n,placement:i,portalClassName:l,enterDelay:a,leaveDelay:c,trigger:d,rounded:u,animated:p,shadow:h,className:f,color:m,contentColor:g,onVisibleChange:j,hideArrow:$,css:v,triggerCss:w,onClick:Z,keepMounted:C,visible:E,...T})=>{let S=(0,o.useRef)(),D=(0,o.useRef)(null),[I,N]=(0,o.useState)(e),P=t=>{let e=()=>{clearTimeout(S.current),S.current=void 0},r=t=>{N(t),j(t),e()};e(),S.current=t?window.setTimeout(()=>r(!0),a):window.setTimeout(()=>r(!1),c)},k=t=>{"hover"===d&&P(t)};return s(D,()=>"click"===d&&!C&&P(!1)),(0,o.useEffect)(()=>{void 0!==E&&P(E)},[E]),(0,b.jsxs)(x,{ref:D,className:`nextui-tooltip-button ${f}`,css:{...w},role:"button",tabIndex:-1,onBlur:()=>k(!1),onClick(){"click"===d&&P(!I),null==Z||Z()},onFocus:()=>k(!0),onKeyUp:()=>k(!0),onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),...T,children:[t,r&&(0,b.jsx)(y,{animated:p,visible:I,css:v,shadow:h,offset:n,placement:i,rounded:u,color:m,contentColor:g,hideArrow:$,parent:D,className:l,children:r})]})};E.toString=()=>".nextui-tooltip";var T=(0,n.Z)(E,{initialVisible:!1,hideArrow:!1,animated:!0,shadow:!0,rounded:!1,keepMounted:!1,trigger:"hover",enterDelay:0,leaveDelay:0,className:"",portalClassName:"",onVisibleChange(){}})},59025:function(t,e,r){"use strict";r.d(e,{Z:function(){return l}});var o=r(19013),n=r(13882),s=r(83946),i=r(84314);function l(t,e){(0,n.Z)(1,arguments);var r,l,a,c,d,u,p,x,h=(0,i.j)(),f=(0,s.Z)(null!==(r=null!==(l=null!==(a=null!==(c=null==e?void 0:e.weekStartsOn)&&void 0!==c?c:null==e?void 0:null===(d=e.locale)||void 0===d?void 0:null===(u=d.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==a?a:h.weekStartsOn)&&void 0!==l?l:null===(p=h.locale)||void 0===p?void 0:null===(x=p.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==r?r:0);if(!(f>=0&&f<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,o.Z)(t),g=m.getUTCDay();return m.setUTCDate(m.getUTCDate()-((g<f?7:0)+g-f)),m.setUTCHours(0,0,0,0),m}},44987:function(t,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/tips/[id]/claim",function(){return r(33728)}])},46591:function(t,e,r){"use strict";r.d(e,{g:function(){return T}});var o=r(85893),n=r(67294);let s=n.forwardRef(function({title:t,titleId:e,...r},o){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true",ref:o,"aria-labelledby":e},r),t?n.createElement("title",{id:e},t):null,n.createElement("path",{fillRule:"evenodd",d:"M5.337 21.718a6.707 6.707 0 01-.533-.074.75.75 0 01-.44-1.223 3.73 3.73 0 00.814-1.686c.023-.115-.022-.317-.254-.543C3.274 16.587 2.25 14.41 2.25 12c0-5.03 4.428-9 9.75-9s9.75 3.97 9.75 9c0 5.03-4.428 9-9.75 9-.833 0-1.643-.097-2.417-.279a6.721 6.721 0 01-4.246.997z",clipRule:"evenodd"}))});var i=r(97501),l=r(8773),a=r(64040),c=r(39372),d=r(28723),u=r(10154),p=r(86979),x=r(43950),h=r(42495),f=r(27690),m=r(88348),g=r(25818),j=r(29320),$=r(97088),v=r(12195),w=r(16229),b=r(28870),Z=r(59953),C=r(77137),y=r(62461),E=r(12314);function T(t){var e,r,n,T,S,D,I,N=t.publicTip,P=t.viewing,k=t.showContinueButton,F=(0,b.h)().data,A=(0,E.$G)("common").t,L=(0,w.k)();if(!N)return(0,o.jsx)(i.ZP,{color:"currentColor",size:"sm"});var R=N.tippee?null===(e=N.tippee)||void 0===e?void 0:e.journeyStep:0,W=N[P],_="CLAIMED"===N.status||"WITHDRAWN"===N.status?"success":"warning";return(0,o.jsx)(l.ZP,{css:{dropShadow:"$sm",position:"relative","&::after":"WITHDRAWN"===N.status?{content:"",background:"url('/images/confetti.svg')",top:0,bottom:0,left:0,right:0,position:"absolute",zIndex:-1,opacity:.3}:{},background:"WITHDRAWN"===N.status?"$black":"$gray900"},children:(0,o.jsxs)(l.ZP.Body,{children:[(0,o.jsxs)(a.Z,{align:"center",children:[(0,o.jsx)(c.ZP,{src:(0,y.E$)(null!==(r=null==W?void 0:W.avatarURL)&&void 0!==r?r:void 0,null==W?void 0:W.fallbackAvatarId),size:"xl",bordered:!0}
1),(0,o.jsx)(d.Z,{x:.5}),(0,o.jsxs)(u.Z,{children:[(0,o.jsxs)(a.Z,{children:[(0,o.jsx)(p.Z,{b:!0,color:"white",css:{mr:10},children:null!==(T=null!==(n=null==W?void 0:W.name)&&void 0!==n?n:"tippee"===P?N.tippeeName:void 0)&&void 0!==T?T:Z.j2}),Z.sF.indexOf(N.status)>-1?(0,o.jsx)(m.X,{tip:N,viewing:P}):(0,o.jsx)($.B,{tip:N})]}),(0,o.jsx)(a.Z,{css:{mt:6},children:(0,o.jsx)(p.Z,{color:"white",small:!0,children:A("createdAgo",{distance:(0,v.Z)(Date.now(),new Date(N.created),{locale:L})})})})]}),(0,o.jsxs)(u.Z,{children:[(0,o.jsx)(a.Z,{justify:"flex-end",children:(0,o.jsx)(p.Z,{b:!0,color:"white",children:(0,o.jsx)(g.p,{currency:null!==(S=N.currency)&&void 0!==S?S:Z.DA,sats:N.amount,exchangeRate:null==F?void 0:F[null!==(D=N.currency)&&void 0!==D?D:Z.DA]})})}),(0,o.jsx)(a.Z,{justify:"flex-end",children:(0,o.jsx)(p.Z,{color:"white",children:A("common:amountInSats",{amount:N.amount})})})]})]}),N.note&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{}),(0,o.jsx)(l.ZP,{css:{background:"#000000AA"},children:(0,o.jsx)(l.ZP.Body,{css:{padding:"$sm"},children:(0,o.jsxs)(a.Z,{children:[(0,o.jsx)(j.J,{color:"white",children:(0,o.jsx)(s,{})}),(0,o.jsx)(d.Z,{x:.5}),(0,o.jsx)(p.Z,{color:"white",children:N.note})]})})})]}),"tippee"===P&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{}),(0,o.jsx)(x.ZP,{value:"WITHDRAWN"===N.status?100:R/C.y.length*100,status:_,color:_}),(0,o.jsx)(d.Z,{y:.5}),Z.sF.indexOf(N.status)>-1?(0,o.jsxs)(a.Z,{justify:"space-between",align:"flex-start",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(p.Z,{color:"white",size:"small",b:!0,children:"Status"}),"CLAIMED"===N.status?(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(p.Z,{color:"white",size:"small",transform:"uppercase",children:["Step ",R," of ",C.y.length," "]})}):void 0]}),(0,o.jsx)("div",{children:(0,o.jsx)($.B,{tip:N})})]}):(0,o.jsx)(a.Z,{justify:"flex-start",align:"flex-start",children:(0,o.jsx)(h.ZP,{content:new Date(null!==(I=N.lastWithdrawal)&&void 0!==I?I:N.updated).toString(),children:(0,o.jsxs)(p.Z,{color:"white",size:"small",b:!0,children:[N.lastWithdrawal?"WITHDRAWN"===N.status||"REFUNDED"===N.status?(0,o.jsx)(o.Fragment,{children:N.status[0]+N.status.substring(1).toLowerCase()}):(0,o.jsx)(o.Fragment,{children:"Last withdrawal attempt"}):(0,o.jsx)(o.Fragment,{children:"Last updated"}),"\xa0",(0,v.Z)(Date.now(),new Date(N.updated))," ","ago"]})})}),(0,o.jsx)(a.Z,{children:"CLAIMED"===N.status?(0,o.jsx)(o.Fragment,{children:R>0&&(0,o.jsx)(p.Z,{small:!0,css:{color:"$accents7"},children:"".concat(C.y[R-1].toUpperCase().substring(1).replaceAll("/"," â¡ï¸ "))})}):void 0})]}),k&&"CLAIMED"===N.status&&!(0,y.hl)(N)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.Z,{}),(0,o.jsx)(a.Z,{justify:"flex-end",children:(0,o.jsx)(f.ZP,{size:"sm",auto:!0,children:"Withdraw\xa0\uD83D\uDE80"})})]})]})})}},88348:function(t,e,r){"use strict";r.d(e,{X:function(){return p}});var o=r(85893),n=r(42495),s=r(60189),i=r(42699),l=r(12195),a=r(6939),c=r(16229),d=r(59953),u=r(12314);function p(t){var e=t.tip,r=t.viewing,p=(0,c.k)(),x=d.sF.indexOf(e.status)>=0&&(0,i.Z)(new Date,new Date(e.expiry)),h=(0,u.$G)("tip").t;return(0,o.jsx)(n.ZP,{color:"primary",placement:"right",content:"tipper"===r?h(x?"tippee.expired":"tippee.willExpire"):x?h("tipper.expired",{distance:(0,l.Z)(Date.now(),new Date(e.expiry),{locale:p})}):h("tipper.willExpire"),children:(0,o.jsxs)(s.ZP,{variant:"flat",color:x?"error":"warning",size:"xs",children:[!x&&(0,o.jsxs)(o.Fragment,{children:["â"," ",(0,a.Z)(Date.now(),new Date(e.expiry),{locale:p})]}),x&&(0,o.jsx)(o.Fragment,{children:"â Expired"})]})})}},25818:function(t,e,r){"use strict";r.d(e,{p:function(){return i}});var o=r(85893),n=r(97501),s=r(62461);function i(t){var e=t.currency,r=t.exchangeRate,i=t.sats,l=t.showApprox;if(!r)return(0,o.jsx)(n.ZP,{color:"currentColor",size:"sm"});var a=(0,s.B4)(e),c=(0,s.i_)((0,s.dh)(i,r));return(0,o.jsxs)(o.Fragment,{children:[l&&"~",(0,o.jsx)("span",{children:a}),c]})}},11367:function(t,e,r){"use strict";r.d(e,{W:function(){return f}});var o=r(85893),n=r(28723),s=r(8773),i=r(86979),l=r(64040),a=r(76064),c=r(27690),d=r(45201),u=r(77137);function p(){return(0,o.jsx)(s.ZP,{css:{dropShadow:"$sm"},children:(0,o.jsxs)(s.ZP.Body,{css:{textAlign:"center"},children:[(0,o.jsx)(i.Z,{h3:!0,children:"Claim Tips Faster"}),(0,o.jsx)(i.Z,{children:"Lightsats makes it easy for you to send and receive tips using Lightningâ¡"}),(0,o.jsx)(n.Z,{}),(0,o.jsx)(l.Z,{justify:"center",children:(0,o.jsx)(d.p,{href:u.d.signin,children:(0,o.jsx)("a",{children:(0,o.jsx)(c.ZP,{auto:!0,color:"primary",children:(0,o.jsx)(o.Fragment,{children:"\uD83D\uDE80 Sign in"})})})})})]})})}var x=r(90397),h=r(33299);function f(t){var e=t.skipOnboarding,r=(0,h.useSession)().data;return r||e?(null==r?void 0:r.user.userType)!=="tipper"?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.Z,{}),(0,o.jsx)(a.B,{})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.Z,{}),(0,o.jsx)(s.ZP,{css:{dropShadow:"$sm"},children:(0,o.jsxs)(s.ZP.Body,{css:{textAlign:"center"},children:[(0,o.jsx)(i.Z,{h3:!0,children:"Send a tip instead"}),(0,o.jsx)(i.Z,{children:"Lightsats makes it easy for you to send tips and onboard people to bitcoin."}),(0,o.jsx)(n.Z,{}),(0,o.jsx)(l.Z,{justify:"center",children:(0,o.jsx)(x.T,{})})]})})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.Z,{}),(0,o.jsx)(p,{})]})}},76064:function(t,e,r){"use strict";r.d(e,{B:function(){return j}});var o=r(47568),n=r(828),s=r(20414),i=r(85893),l=r(8773),a=r(86979),c=r(28723),d=r(64040),u=r(27690),p=r(97501),x=r(56541),h=r(77137),f=r(11163),m=r(67294),g=r(86501);function j(){var t=(0,n.Z)(m.useState(!1),2),e=t[0],r=t[1],j=(0,x.a)(),$=j.data,v=j.mutate,w=(0,f.useRouter)(),b=m.useCallback(function(){if(!(null==$?void 0:$.id)){w.push(h.d.signin);return}if(e)throw Error("Already submitting");r(!0),(0,o.Z)(function(){var t,e;return(0,s.__generator)(this,function(o){switch(o.label){case 0:return t={to:"tipper"},[4,fetch("/api/users/".concat($.id,"/transition"),{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})];case 1:if(!(e=o.sent()).ok)return[3,3];return[4,v()];case 2:return o.sent(),[3,4];case 3:g.ZP.error("Failed to update profile: "+e.statusText),o.label=4;case 4:return r(!1),[2]}})})()},[e,v,w,null==$?void 0:$.id]);return(0,i.jsx)(l.ZP,{css:{dropShadow:"$sm"},children:(0,i.jsxs)(l.ZP.Body,{css:{textAlign:"center"},children:[(0,i.jsx)(a.Z,{h3:!0,children:"Ready to start tipping in bitcoin?"}),(0,i.jsx)(a.Z,{children:"Lightsats makes it easy for you to send tips and onboard people to bitcoin."}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(d.Z,{justify:"center",children:(0,i.jsx)(u.ZP,{auto:!0,color:"primary",onClick:b,disabled:e,children:e?(0,i.jsx)(p.ZP,{color:"currentColor",size:"sm"}):(0,i.jsx)(i.Fragment,{children:"\uD83D\uDE80 Let's go!"})})})]})})}},76107:function(t,e,r){"use strict";r.d(e,{W:function(){return s}});var o=r(85893),n=r(10154);function s(t){var e=t.children;return(0,o.jsx)(n.Z,{css:{pb:120},children:e})}r(67294)},90317:function(t,e,r){"use strict";r.d(e,{_:function(){return x}});var o=r(828),n=r(85893),s=r(43165),i=r(86979),l=r(27690),a=r(54690),c=r(45201),d=r(12314),u=r(67294),p=r(73935);function x(t){var e=t.text,r=t.href,x=t.nextUp,h=(0,o.Z)(u.useState(!1),2),f=h[0],m=h[1],g=(0,d.$G)("journey").t;return(u.useEffect(function(){m(!0)},[]),f)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{height:"50px"}})," ",p.createPortal((0,n.jsx)(a.h,{style:{position:"fixed",bottom:0,left:0,width:"100%",justifyContent:"center",alignItems:"center",backgroundColor:"white",boxShadow:"0px -8px 8px #0001",zIndex:10},children:(0,n.jsx)(a.h,{style:{width:"100%",maxWidth:"600px"},children:(0,n.jsx)(s.Z,{css:{padding:"$10",pb:"$10"},children:(0,n.jsxs)(a.h,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)(a.h,{style:{flex:1},children:(0,n.jsxs)(a.h,{style:{flexDirection:"column"},children:[(0,n.jsx)(i.Z,{b:!0,small:!0,transform:"uppercase",children:g("footer.nextUp")}),(0,n.jsx)(i.Z,{children:x})]})}),(0,n.jsx)(a.h,{style:{flex:0},children:(0,n.jsx)(c.p,{href:r,passHref:!0,children:(0,n.jsx)("a",{children:(0,n.jsx)(l.ZP,{size:"lg",auto:!0,children:e})})})})]})})})}),document.body)]}):null}},90397:function(t,e,r){"use strict";r.d(e,{T:function(){return c}});var o=r(85893),n=r(75848),s=r(27690),i=r(29320),l=r(45201),a=r(77137);function c(){return(0,o.jsx)(l.p,{href:a.d.newTip,children:(0,o.jsx)("a",{children:(0,o.jsxs)(s.ZP,{children:[(0,o.jsx)(i.J,{children:(0,o.jsx)(n.Z,{})}),"\xa0Create a new tip"]})})})}},97088:function(t,e,r){"use strict";r.d(e,{B:function(){return s}});var o=r(85893),n=r(60189);function s(t){var e=t.tip,r=e.status;return(0,o.jsxs)(n.ZP,{variant:"flat",color:"UNFUNDED"===r?"error":"UNSEEN"===r||"RECLAIMED"===r?"warning":"CLAIMED"===r||"SEEN"===r?"primary":"WITHDRAWN"===r?"success":"default",css:{letterSpacing:0,textTransform:"capitalize"},children:["SEEN"===r?"\uD83D\uDC40 Seen":"UNSEEN"===r?"\uD83D\uDE48 Unseen":r.toLowerCase(),e.count&&(0,o.jsxs)(o.Fragment,{children:["\xa0",e.count]})]})}},16229:function(t,e,r){"use strict";r.d(e,{k:function(){return i}});var o=r(65097),n=r(90390),s=r(11163);function i(){return o[(0,s.useRouter)().locale||n.Z]}},28870:function(t,e,r){"use strict";r.d(e,{h:function(){return s}});var o=r(3718),n=r(8100);function s(){return(0,n.ZP)("/api/exchange/rates",o.V)}},84939:function(t,e,r){"use strict";r.r(e),r.d(e,{SelectWalletPageContent:function(){return j},__N_SSG:function(){return g}});var o=r(85893),n=r(86979),s=r(28723),i=r(97501),l=r(48786),a=r(76107),c=r(90317),d=r(87584),u=r(30531),p=r(77137),x=r(12314),h=r(9008),f=r.n(h),m=r(67294),g=!0;
1function j(t){var e,r=t.receivedTips,i=t.nextUp,d=t.href,u=t.lnurlAuthCapable,h=m.useMemo(function(){var t;return{checkTippeeBalance:!0,tippeeBalance:(null==r?void 0:r.length)?r.map(function(t){return t.amount}).reduce(function(t,e){return t+e}):0,recommendedLimit:1,recommendedItemId:null!==(e=null==r?void 0:null===(t=r[0])||void 0===t?void 0:t.recommendedWalletId)&&void 0!==e?e:void 0,lnurlAuthCapable:u,filterOtherItems:!0}},[u,r]),f=(0,x.$G)("journey").t;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(a.W,{children:[(0,o.jsx)(n.Z,{children:f("wallet.needAWallet")}),(0,o.jsx)(s.Z,{}),(0,o.jsx)(n.Z,{children:f("wallet.selfCustody")}),(0,o.jsx)(s.Z,{}),(0,o.jsx)(l.o,{category:"wallets",options:h})]}),(0,o.jsx)(c._,{href:d||p.d.withdraw,text:f("wallet.footer.text"),nextUp:i||f("wallet.footer.cta")})]})}var $=function(){var t=(0,u.EQ)().data,e=m.useMemo(function(){return null==t?void 0:t.filter(function(t){return"CLAIMED"===t.status||"WITHDRAWN"===t.status})},[t]);return e?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f(),{children:(0,o.jsx)("title",{children:"Lightsatsâ¡ - Choose a Wallet"})}),(0,o.jsx)(d.Y,{}),(0,o.jsx)(j,{receivedTips:e})]}):(0,o.jsx)(i.ZP,{})};e.default=$},33728:function(t,e,r){"use strict";r.r(e),r.d(e,{__N_SSG:function(){return F}});var o=r(47568),n=r(828),s=r(20414),i=r(85893),l=r(97501),a=r(86979),c=r(28723),d=r(87468),u=r(71206),p=r(46591),x=r(37089),h=r(42871),f=r(11367),m=r(59953),g=r(77137),j=r(3718),$=r(62461),v=r(33299),w=r(12314),b=r(9008),Z=r.n(b),C=r(41664),y=r.n(C),E=r(11163),T=r(84939),S=r(9989),D=r(67294),I=r(86501),N=r(8100),P={refreshInterval:1e3},k=function(){var t=(0,w.$G)("claim").t,e=(0,E.useRouter)(),r=(0,v.useSession)(),p=r.data,b=r.status,C=e.query,T=C.id,S=C.printed,k=C.walletInstalled,F=(0,N.ZP)(T?"/api/tippee/tips/".concat(T):null,j.V,P),L=F.data,R=F.mutate,W=p&&L&&p.user.id===L.tipperId,_=(0,n.Z)(D.useState(!1),2),z=_[0],U=_[1],M=g.d.journeyClaimed,O=e.query.secret,B=O?decodeURIComponent(O):void 0;D.useEffect(function(){B&&localStorage.setItem("nostrWalletConnectUrl",B)},[B]),D.useEffect(function(){L&&"UNSEEN"===L.status&&(!p&&"loading"!==b||p&&p.user.id!==L.tipperId)&&(0,o.Z)(function(){var t;return(0,s.__generator)(this,function(e){switch(e.label){case 0:return[4,fetch("/api/tippee/tips/".concat(T,"/markSeen"),{method:"POST",headers:{"Content-Type":"application/json"}})];case 1:return(t=e.sent()).ok||console.error("Failed to mark tip as seen: "+t.status),[2]}})})()},[T,L,p,b]);var G=L&&(0,$.hl)(L),H=L&&"SKIP"!==L.onboardingFlow&&"SEEN"===L.status&&p&&!W&&!G;D.useEffect(function(){p&&L&&"CLAIMED"===L.status&&L.tippeeId===p.user.id&&!z&&!G&&e.push(M)},[M,z,L,e,p,G]),D.useEffect(function(){p&&L&&"WITHDRAWN"===L.status&&L.tippeeId===p.user.id&&e.push(g.d.dashboard)},[L,e,p]),D.useEffect(function(){H&&!z&&e.isReady&&(U(!0),(0,o.Z)(function(){var t,r;return(0,s.__generator)(this,function(o){switch(o.label){case 0:return t={isPrinted:"true"===S},[4,fetch("/api/tippee/tips/".concat(T,"/claim"),{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})];case 1:return(r=o.sent()).ok?(R(),e.push(M)):I.ZP.error("Failed to claim tip: "+r.statusText+". Please refresh the page to try again."),[2]}})})())},[H,M,z,T,R,e,S,]);var V=!L||"UNSEEN"===L.status&&!W||"loading"===b||p&&H||z;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Z(),{children:(0,i.jsx)("title",{children:"Lightsatsâ¡ - Claim tip"})}),V?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(l.ZP,{color:"currentColor",size:"sm"})}):-1===m.Wt.indexOf(L.status)&&("CLAIMED"!==L.status||p&&p.user.id!==L.tippeeId)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.Z,{children:"This tip is no longer available."}),(0,i.jsx)(f.W,{skipOnboarding:"SKIP"===L.onboardingFlow}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(x.u,{})]}):"CLAIMED"!==L.status||p?W?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(u.b,{children:["You created this tip.\xa0",(0,i.jsx)(y(),{href:"".concat(g.d.tips,"/").concat(T),children:"Go to Tip"})]}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(A,{publicTip:L,isTipper:!0})]}):G?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.Z,{y:2}),(0,i.jsx)(a.Z,{color:"error",children:t("expired")}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(x.u,{})]}):(0,i.jsx)(A,{publicTip:L,walletInstalled:"true"===k}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.Z,{children:"This tip has been claimed but not withdrawn yet."}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(d.ZP,{bordered:!0,title:(0,i.jsx)(a.Z,{b:!0,children:"This is my Tip\uD83D\uDE4B"}),css:{width:"100%"},children:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(h.m,{instructionsText:function(){return"Confirm your account to continue"}
1,callbackUrl:(0,$.bq)(e),tipId:L.id,defaultLoginMethod:"phone",isPreview:!!W})})}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(a.Z,{children:"Not yours?"}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(x.u,{})]})]})},F=!0;function A(t){var e=t.publicTip,r=t.walletInstalled,o=t.isTipper,s=(0,w.$G)("claim").t,l=(0,E.useRouter)(),d=(0,n.Z)(D.useState(void 0),2),u=d[0],x=d[1];return D.useEffect(function(){var t=new URL(window.location.href);t.searchParams.append("walletInstalled","true"),x(t.toString())},[]),(0,i.jsxs)(i.Fragment,{children:[e.tippeeName&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(a.Z,{h3:!0,children:s("hello",{tippeeName:e.tippeeName})})}),(0,i.jsx)(p.g,{publicTip:e,viewing:"tipper"}),(0,i.jsx)(c.Z,{y:3}),"SKIP"===e.onboardingFlow?(0,i.jsx)(S.Withdraw,{flow:"anonymous",tipId:e.id,isPreview:o}):"LIGHTNING"!==e.onboardingFlow||r?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(h.m,{instructionsText:function(t){return s("claim:instructions.".concat(t))},submitText:s("claim:claim"),callbackUrl:(0,$.bq)(l),tipId:e.id,defaultLoginMethod:"LIGHTNING"===e.onboardingFlow?"lightning":"phone",allowedLoginMethods:"LIGHTNING"===e.onboardingFlow?["lightning"]:void 0,isPreview:!!o})}):(0,i.jsx)(T.SelectWalletPageContent,{receivedTips:[e],lnurlAuthCapable:!0,nextUp:s("claim"),href:u}),(0,i.jsx)(c.Z,{})]})}e.default=k},75848:function(t,e,r){"use strict";var o=r(67294);let n=o.forwardRef(function({title:t,titleId:e,...r},n){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?o.createElement("title",{id:e},t):null,o.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zM12.75 9a.75.75 0 00-1.5 0v2.25H9a.75.75 0 000 1.5h2.25V15a.75.75 0 001.5 0v-2.25H15a.75.75 0 000-1.5h-2.25V9z",clipRule:"evenodd"}))});e.Z=n}},function(t){t.O(0,[1987,5721,7536,1653,2003,5378,8584,2269,8639,380,3246,9989,2871,9774,2888,179],function(){return t(t.s=44987)}),_N_E=t.O()}]); 2//# sourceMappingURL=claim-290493209581395c.js.map
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.