PageSourceSearch

https://yakihonne.com/_next/static/chunks/6381.92f1731327bb3b34.js

js yakihonne.com collected 2026-09-25 14:02:28 UTC 44,192 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6381],{15308:()=>{},36381:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>W});var s=a(33499),n=a(65235),i=a(94196),l=a(48870),r=a(92405),c=a(75206),o=a(35412),d=a(89861),p=a(98614),u=a(98982),m=a(12496),h=a(58572),g=a(57352),x=a(8006),f=a(16905),y=a(76636),b=a(82608),v=a(29788),j=a(53263),w=a(88261),k=a(97793),N=a(40295),A=a(78553),S=a(47246),C=a(80359),z=a.n(C),P=a(33631);a(34607);var B=a(15739),E=a(72615),O=a(23380);function T(e){let{pack:t,handleSingleSelection:a,handleMultiSelection:i,selectedPubkeys:l}=e,{t:r}=(0,k.Bd)(),[c,o]=(0,n.useState)(!1),d=(0,n.useMemo)(()=>{let e=new Set(l);return t.pTags.every(t=>e.has(t))},[l]);return(0,n.useEffect)(()=>{if(!c)return;let e=e=>{"Escape"===e.key&&o(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[c]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"pack-card pointer",onClick:e=>{e.stopPropagation(),o(!0),(0,b.m6)([...t.pTags,t.pubkey])},children:[(0,s.jsx)("div",{className:"pack-card-img",style:{backgroundImage:"url(".concat(t.image,")"),backgroundColor:"var(--pale-gray)"}}),(0,s.jsxs)("div",{className:"pack-card-body",children:[(0,s.jsx)("p",{className:"pack-card-title p-one-line",children:t.title}),(0,s.jsxs)("div",{className:"pack-card-meta",children:[(0,s.jsx)(E.A,{pubkeys:t.pTags,number:3,imgSize:22}),t.pCount>3&&(0,s.jsx)("p",{className:"gray-c p-medium",children:r("AZzyBMI",{count:t.pCount-3})})]})]}),(0,s.jsx)("div",{className:"pack-card-btn ".concat(d?"pack-card-btn--active":""),onClick:e=>{e.stopPropagation(),i({pubkeys:t.pTags,action:d?"remove":"add"})},children:r(d?"AyohNeT":"AzkUxnd")})]}),c&&(0,B.createPortal)((0,s.jsx)(_,{pack:t,isAllFollowing:d,handleMultiSelection:i,handleSingleSelection:a,selectedPubkeys:l,onClose:()=>o(!1)}),document.body)]})}function _(e){let{pack:t,isAllFollowing:a,handleMultiSelection:i,handleSingleSelection:l,selectedPubkeys:r,onClose:c}=e,{t:o}=(0,k.Bd)(),[d,p]=(0,n.useState)(!1),[u,m]=(0,n.useState)(!1),h=t.description&&t.description.length>200;return(0,s.jsx)("div",{className:"pack-overlay-backdrop",onClick:c,children:(0,s.jsxs)("div",{className:"pack-overlay-sheet",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("button",{className:"pack-overlay-close",onClick:c,children:[(0,s.jsx)("span",{}),(0,s.jsx)("span",{})]}),t.image&&(0,s.jsx)("div",{className:"pack-overlay-img",style:{backgroundImage:"url(".concat(t.image,")")}}),(0,s.jsxs)("div",{className:"pack-overlay-content",children:[(0,s.jsx)("h3",{className:"pack-overlay-title",children:t.title}),t.description&&(0,s.jsxs)("div",{className:"pack-overlay-desc-wrap",children:[(0,s.jsx)("p",{className:"pack-overlay-desc gray-c ".concat(!d&&h?"pack-overlay-desc--clamped":""),children:t.description}),h&&(0,s.jsx)("button",{className:"pack-overlay-see-more",onClick:()=>p(e=>!e),children:o(d?"ASeeLess":"AnWFKlu")})]}),(0,s.jsxs)("div",{className:"pack-overlay-meta",children:[(0,s.jsx)(E.A,{pubkeys:t.pTags,number:5,imgSize:26}),(0,s.jsxs)("p",{className:"gray-c p-medium",children:[t.pCount," ",o("AJ1Zfct")]})]}),(0,s.jsx)("div",{className:"pack-overlay-follow-btn ".concat(a?"pack-overlay-follow-btn--active":""),onClick:()=>i({pubkeys:t.pTags,action:a?"remove":"add"}),children:o(a?"AyohNeT":"AzkUxnd")}),(0,s.jsx)("button",{className:"pack-overlay-see-list-btn",onClick:()=>m(e=>!e),children:o(u?"AHidePackList":"ASeeWhoInPack")})]}),u&&(0,s.jsx)("div",{className:"pack-overlay-list",children:t.pTags.map(e=>{let t=r.includes(e);return(0,s.jsx)(L,{pubkey:e,isAdded:t,onClick:l},e)})})]})})}let L=n.memo(e=>{let{pubkey:t,isAdded:a,onClick:n}=e,{userProfile:i}=(0,O.A)(t);return(0,s.jsxs)("div",{className:"pack-user-row",onClick:()=>n({pubkey:t,action:a?"remove":"add"}),children:[(0,s.jsx)(x.A,{pubkey:t,img:i.picture,size:36}),(0,s.jsx)("div",{className:"pack-user-info",children:(0,s.jsx)("p",{className:"pack-user-name",children:i.display_name||i.name||"…"})}),(0,s.jsx)("div",{className:"pack-user-check ".concat(a?"pack-user-check--on":"")})]})});var K=a(75031),M=a(53429),I=a(55541);function F(e){let t=e.match(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:{r:0,g:0,b:0}}a(15308),M.os.registerPlugin(I.w6);let R=e=>{let{dotSize:t=16,gap:a=32,baseColor:i="#5227FF",activeColor:l="#5227FF",proximity:r=150,speedTrigger:c=100,shockRadius:o=250,shockStrength:d=5,maxSpeed:p=5e3,resistance:u=750,returnDuration:m=1.5,className:h="",style:g}=e,x=(0,n.useRef)(null),f=(0,n.useRef)(null),y=(0,n.useRef)([]),b=(0,n.useRef)({x:0,y:0,vx:0,vy:0,speed:0,lastTime:0,lastX:0,lastY:0}),v=(0,n.useMemo)(()=>F(i),[i]),j=(0,n.useMemo)(()=>F(l),[l]),w=(0,n.useMemo)(()=>
1{if(!window.Path2D)return null;let e=new window.Path2D;return e.arc(0,0,t/2,0,2*Math.PI),e},[t]),k=(0,n.useCallback)(()=>{let e=x.current,s=f.current;if(!e||!s)return;let{width:n,height:i}=e.getBoundingClientRect(),l=window.devicePixelRatio||1;s.width=n*l,s.height=i*l,s.style.width="".concat(n,"px"),s.style.height="".concat(i,"px");let r=s.getContext("2d");r&&r.scale(l,l);let c=Math.floor((n+a)/(t+a)),o=Math.floor((i+a)/(t+a)),d=t+a,p=(n-(d*c-a))/2+t/2,u=(i-(d*o-a))/2+t/2,m=[];for(let e=0;e<o;e++)for(let t=0;t<c;t++){let a=p+t*d,s=u+e*d;m.push({cx:a,cy:s,xOffset:0,yOffset:0,_inertiaApplied:!1})}y.current=m},[t,a]);return(0,n.useEffect)(()=>{let e;if(!w)return;let t=r*r,a=()=>{let s=f.current;if(!s)return;let n=s.getContext("2d");if(!n)return;n.clearRect(0,0,s.width,s.height);let{x:l,y:c}=b.current;for(let e of y.current){let a=e.cx+e.xOffset,s=e.cy+e.yOffset,o=e.cx-l,d=e.cy-c,p=o*o+d*d,u=i;if(p<=t){let e=1-Math.sqrt(p)/r,t=Math.round(v.r+(j.r-v.r)*e),a=Math.round(v.g+(j.g-v.g)*e),s=Math.round(v.b+(j.b-v.b)*e);u="rgb(".concat(t,",").concat(a,",").concat(s,")")}n.save(),n.translate(a,s),n.fillStyle=u,n.fill(w),n.restore()}e=requestAnimationFrame(a)};return a(),()=>cancelAnimationFrame(e)},[r,i,j,v,w]),(0,n.useEffect)(()=>{k();let e=null;return"ResizeObserver"in window?(e=new ResizeObserver(k),x.current&&e.observe(x.current)):window.addEventListener("resize",k),()=>{e?e.disconnect():window.removeEventListener("resize",k)}},[k]),(0,n.useEffect)(()=>{let e=e=>{let t=f.current.getBoundingClientRect(),a=e.clientX-t.left,s=e.clientY-t.top;for(let e of y.current){let t=Math.hypot(e.cx-a,e.cy-s);if(t<o&&!e._inertiaApplied){e._inertiaApplied=!0,M.os.killTweensOf(e);let n=Math.max(0,1-t/o),i=(e.cx-a)*d*n,l=(e.cy-s)*d*n;M.os.to(e,{inertia:{xOffset:i,yOffset:l,resistance:u},onComplete:()=>{M.os.to(e,{xOffset:0,yOffset:0,duration:m,ease:"elastic.out(1,0.75)"}),e._inertiaApplied=!1}})}}},t=((e,t)=>{let a=0;return function(){for(var s=arguments.length,n=Array(s),i=0;i<s;i++)n[i]=arguments[i];let l=performance.now();l-a>=t&&(a=l,e.apply(this,n))}})(e=>{let t=performance.now(),a=b.current,s=a.lastTime?t-a.lastTime:16,n=e.clientX-a.lastX,i=e.clientY-a.lastY,l=n/s*1e3,o=i/s*1e3,d=Math.hypot(l,o);if(d>p){let e=p/d;l*=e,o*=e,d=p}a.lastTime=t,a.lastX=e.clientX,a.lastY=e.clientY,a.vx=l,a.vy=o,a.speed=d;let h=f.current.getBoundingClientRect();for(let t of(a.x=e.clientX-h.left,a.y=e.clientY-h.top,y.current)){let e=Math.hypot(t.cx-a.x,t.cy-a.y);if(d>c&&e<r&&!t._inertiaApplied){t._inertiaApplied=!0,M.os.killTweensOf(t);let e=t.cx-a.x+.005*l,s=t.cy-a.y+.005*o;M.os.to(t,{inertia:{xOffset:e,yOffset:s,resistance:u},onComplete:()=>{M.os.to(t,{xOffset:0,yOffset:0,duration:m,ease:"elastic.out(1,0.75)"}),t._inertiaApplied=!1}})}}},50);return window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("click",e),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("click",e)}},[p,c,r,u,m,o,d]),(0,s.jsx)("section",{className:"dot-grid ".concat(h),style:g,children:(0,s.jsx)("div",{ref:x,className:"dot-grid__wrap",children:(0,s.jsx)("canvas",{ref:f,className:"dot-grid__canvas"})})})};var D=a(32873),U=a(50745),H=a(39305),Q=a(90953);let Y="https://yakihonne.s3.ap-east-1.amazonaws.com/media/images/profile-avatar.png";function W(){let{resolvedTheme:e}=(0,U.D)(),{t}=(0,k.Bd)(),a=(0,d.Bq)(),i=(0,o.UC)(a),l={pub:(0,d.lG)(a),sec:i},[c,p]=(0,n.useState)(!0),{recommendedStarterPacks:u}=function(){let[e,t]=(0,n.useState)([]),a=["streamersFollowPackh8Kz3P2q","szxs0ra5tqzu","6715ef40-2d95-4f86-8277-bd4efb0fa56b","tp9hnqpnccco","b2c75381-0335-48bd-a579-553df86903af","b56c8b24-e33b-4c32-8ca0-63a1bb7577b4","7g0zvf7gv59j","ardt92mr1e2i","m36yukpd5kts","y156932o9xfh","cioc58duuftq","cld28teq2js4","xv7j4mgavera","h308e7fzkjff"];return(0,n.useEffect)(()=>{(0,r.NZ)([{kinds:[39089],"#d":a}]).then(e=>{t(e.data.map(e=>(0,o.g7)(e)))}).catch(e=>{console.log(e)})},[]),{recommendedStarterPacks:e}}();return(0,n.useEffect)(()=>{let e=[...new Set(f.A.map(e=>e.pubkeys).flat())].map(e=>(0,o.Qj)(e));(0,b.m6)(e)},[]),(0,s.jsxs)("div",{className:"login-stage",children:[(0,s.jsx)("div",{className:"login-bg-layer",children:(0,s.jsx)(R,{dotSize:7,gap:19,baseColor:["dark","gray"].includes(e)?"#2b2b2b":"#e8e8e8",activeColor:"#ff5c27",proximity:270,shockRadius:250,shockStrength:14,resistance:1350,returnDuration:1.7})}),(0,s.jsx)("div",{className:"login-vignette"}),(0,s.jsx)("div",{className:"login-brandmark",children:(0,s.jsx)(K.A,{name:"yakihonne-logo",width:120,height:42,isColored:!1})}),(0,s.jsx)("div",{className:"login-stage-content",children:(0,s.jsxs)("div",{className:"login-card bg-dropdown-t",children:[(0,s.jsx)("button",{className:"btn btn-normal btn-gray fx-centered bg-dropdown login-back-btn",onClick:()=>z().back(),children:(0,s.jsx)(K.A,{name:"arrow",transform:"rotate(90deg)"})}),(0,s.jsxs)("div",{className:"login-card-head",children:[(0,s.jsx)("p",{className:"login-card-eyebrow",children:t("ANbrnTP")}),(0,s.jsx)("h3",{className:"login-card-title-plain",children:t(c?"AITU9z0":"AHXrr4Y")},c?"login":"signup")]}),(0,s.jsx)("div",{className:"login-mode-tabs fx-centered",children:(0,s.jsx)("div",{children:(0,s.jsx)(D.D,{selectedTab:+!c,tabs:[t("AmOtzoL"),t("AHXrr4Y")],setSelectedTab:e=>p(0===e)})})}),c&&(0,s.jsx)(X,{switchScreen:()=>p(!c),userKeys:l}),!c&&(0,s.jsx)(G,{switchScreen:()=>p(!c),userKeys:l,recommendedStarterPacks:u})]})})]})}(0,h.dz)().length;let $=e=>{let{autoLaunch:t=!1}=e,{t:a}
1=(0,k.Bd)(),r=(0,i.wA)(),[p,m]=(0,n.useState)(""),[h,x]=(0,n.useState)(""),[f,b]=(0,n.useState)(!1),v=j.YX.generate(),w=()=>{m(j.$I.nostrconnect(y.$,"wss://nostr-01.yakihonne.com",v,{name:"Yakihonne",url:"https://yakihonne.com",perms:[]}).nostrConnectUri);let e=y.$.subscribe([{kinds:[A.bZ],"#p":[v.pubkey]}],{groupable:!1});e.on("event",async t=>{let a="",s=!1,n=t.pubkey,i="bunker://".concat(n,"?relay=wss://relay.nsec.app&relay=").concat("wss://nostr-01.yakihonne.com&relay=wss://offchain.pub&relay=wss://relay.nsec.app&relay=wss://relay.damus.io");try{a=d.Q5.decrypt(t.content,d.Q5.v2.utils.getConversationKey((0,o.AS)(v.privateKey),t.pubkey)),s=!0,a=JSON.parse(a)}catch(e){console.log(e)}if(!s)try{a=d.sh.decrypt((0,o.AS)(v.privateKey),t.pubkey,t.content),a=JSON.parse(a)}catch(e){console.log(e)}if(!a)return void e.stop();e.stop();let l=await (0,N.lh)(i);if(!l)return;let p=N.md.fromBunker((0,o.AS)(v.privateKey),l,{onauth:e=>{window.open(e,"_blank","width=600,height=650,scrollbars=yes,resizable=yes")}});await p.connect();let u=await p.getPublicKey(),m={localKeys:{sec:v.privateKey,pub:(0,d.lG)((0,o.AS)(v.privateKey))},pub:u,bunker:i};r((0,c.s$)(m)),z().back()})},C=async()=>{if(!N.Sg.test(h))return void r((0,g.Kx)({type:2,desc:a("A2l1JgC")}));let e=await (0,N.lh)(h);if(!e)throw Error("Invalid bunker input");b(!0);let t=N.md.fromBunker((0,o.AS)(v.privateKey),e,{onauth:e=>{window.open(e,"_blank","width=600,height=650,scrollbars=yes,resizable=yes")}});await t.connect();let s=await t.getPublicKey(),n={localKeys:{sec:v.privateKey,pub:(0,d.lG)((0,o.AS)(v.privateKey))},pub:s,bunker:h};b(!1),r((0,c.s$)(n)),z().back()};return(0,n.useEffect)(()=>{t&&w()},[]),(0,s.jsxs)(s.Fragment,{children:[p&&(0,s.jsx)(P.A,{exit:()=>m(""),width:360,children:(0,s.jsxs)("div",{className:"login-bunker-overlay box-pad-h box-pad-v bg-dropdown-t",children:[(0,s.jsx)("div",{className:"close",onClick:()=>m(""),children:(0,s.jsx)("div",{})}),(0,s.jsx)("h4",{className:"login-card-title",style:{fontSize:"1.3rem"},children:a("A9eQr6B")}),(0,s.jsx)("p",{className:"login-card-subtitle",children:a("AJdT1m0")}),(0,s.jsx)("div",{className:"login-qr-frame",children:(0,s.jsx)(S.default,{value:p,width:220})}),(0,s.jsxs)("div",{className:"login-bunker-uri",onClick:()=>(0,u.Dk)(p,a("AB1PYvA")),children:[(0,s.jsx)("p",{className:"p-one-line gray-c",children:p}),(0,s.jsx)(K.A,{name:"copy"})]}
1),(0,s.jsxs)("div",{className:"login-divider-row",children:[(0,s.jsx)("hr",{}),(0,s.jsx)("span",{children:a("Ax46s4g")}),(0,s.jsx)("hr",{})]}),(0,s.jsx)("input",{type:"text",className:"if ifs-full",placeholder:"bunker://...",value:h,onChange:e=>x(e.target.value)}),(0,s.jsxs)("div",{className:"login-actions fit-container",children:[(0,s.jsx)("button",{className:"btn btn-normal btn-full",onClick:C,disabled:f||!h,children:f?(0,s.jsx)(l.A,{}):a("AmOtzoL")}),f&&(0,s.jsx)("button",{className:"btn btn-gst btn-full",children:a("AB4BSCe")})]})]})}),!t&&(0,s.jsx)("button",{className:"btn btn-gst btn-full",onClick:w,children:a("A9eQr6B")})]})},X=()=>{let e=(0,i.wA)(),{t}=(0,k.Bd)(),[a,u]=(0,n.useState)(""),[m,x]=(0,n.useState)(!!window.nostr),[f,y]=(0,n.useState)(!1),[b,v]=(0,n.useState)(""),[j,w]=(0,n.useState)(!1),N=[{id:"key",icon:"key-icon",title:t("AHm6tIw"),desc:t("A7uff0L")},{id:"ext",icon:"puzzle",iconV:2,title:t("AHm6tIx"),desc:t("AHm6tIu"),disabled:!m},{id:"bunker",icon:"bolt",title:t("A9eQr6B"),desc:t("AJdT1m0")},{id:"google",icon:"google",title:"Login with Google",desc:"Sign in using your Google account"}],A=async a=>{if(a){if(y(!0),a.startsWith("npub"))try{let t=(0,o.Qj)(a);await (0,r.AY)(t)&&e((0,c.s$)({pub:t})),y(!1),z().back();return}catch(a){y(!1),e((0,g.Kx)({type:2,desc:t("AiHLMRi")}))}if(a.startsWith("nsec"))try{let t=(0,o.Qj)(a);if(p.Wp.isValidPrivateKey(t)){let a=(0,o.AS)(t);if(await (0,r.AY)((0,d.lG)(a))){let s={sec:t,pub:(0,d.lG)(a)};e((0,c.s$)(s))}y(!1),z().back();return}}catch(a){y(!1),e((0,g.Kx)({type:2,desc:t("AC5ByUA")}))}if(p.Wp.isValidPrivateKey(a)){let t=(0,o.AS)(a);if(await (0,r.AY)((0,d.lG)(t))){let s={sec:a,pub:(0,d.lG)(t)};e((0,c.s$)(s))}y(!1),z().back();return}y(!1),e((0,g.Kx)({type:2,desc:t("AC5ByUA")}))}},S=async()=>{try{y(!0);let t={pub:await window.nostr.getPublicKey(),ext:!0},a=[{id:Date.now(),kind:1,entitle:"WebLN",active:!0,data:""}];(0,h.M6)(a,t.pub).length>0&&e((0,c.s$)(t)),y(!1),z().back();return}catch(a){console.log(a),y(!1),e((0,g.Kx)({type:2,desc:t("AiHLMRi")}))}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"login-conversation",children:[(0,s.jsx)("p",{className:"login-convo-question fx-centered gray-c",children:t("AHm6tIv")}),"key"!==b&&(0,s.jsx)("div",{className:"login-convo-options",children:N.map((e,t)=>(0,s.jsxs)("div",{className:"login-convo-option box-pad-h-m box-pad-v-s bg-dropdown-t ".concat(e.disabled?"disabled":""),style:{"--stagger-i":t},onClick:()=>(e=>{if(!e.disabled){if("ext"===e.id)return void S();if("google"===e.id)return void w(!0);v(e.id)}})(e),disabled:e.disabled,children:[(0,s.jsx)("span",{className:"login-convo-option-icon",children:(0,s.jsx)(K.A,{name:e.icon,v:e.iconV||1,size:32})}),(0,s.jsxs)("span",{className:"login-convo-option-copy",children:[(0,s.jsx)("b",{children:e.title}),(0,s.jsx)("span",{children:e.desc})]}),(0,s.jsx)("span",{className:"login-convo-option-go",children:(0,s.jsx)(K.A,{name:"arrow",size:14,transform:"rotate(-90deg)"})})]},e.id))},"options"),"bunker"===b&&(0,s.jsx)($,{autoLaunch:!0}),"key"===b&&(0,s.jsxs)("div",{className:"login-convo-answer",children:[(0,s.jsxs)("div",{className:"login-convo-back",onClick:()=>v(""),children:[(0,s.jsx)(K.A,{name:"arrow",size:13,transform:"rotate(90deg)"}),t("AyGDBDa")]}),(0,s.jsxs)("div",{className:"login-convo-field",children:[(0,s.jsx)("input",{type:"text",className:"if ifs-full",placeholder:t("A7uff0L"),value:a,onChange:e=>u(e.target.value),autoFocus:!0}),(0,s.jsx)("div",{className:"login-actions",children:(0,s.jsx)("button",{className:"btn btn-normal btn-full",onClick:()=>A(a),disabled:f||!a,children:f?(0,s.jsx)(l.A,{}):(0,s.jsx)(s.Fragment,{children:t("AmOtzoL")})})})]})]},b)]}),j&&(0,s.jsx)(q,{onClose:()=>w(!1)})]})},q=e=>{let{onClose:t}=e,a=(0,i.wA)(),{t:p}=(0,k.Bd)(),[m,h]=(0,n.useState)("central"),[f,y]=(0,n.useState)("idle"),[b,v]=(0,n.useState)(""),[w,N]=(0,n.useState)(null),[A,S]=(0,n.useState)(!1),C=(0,n.useMemo)(()=>j.YX.generate(),[]),B=(0,n.useMemo)(()=>H.Nh.map(e=>({...e,url:(0,Q.Hd)(e.url)})),[]),[E,O]=(0,n.useState)(B[0].url),[T,_]=(0,n.useState)(!1),[L,M]=(0,n.use
1State)(""),[I,F]=(0,n.useState)("generate"),[R,D]=(0,n.useState)(()=>(0,d.Bq)()),[U,Y]=(0,n.useState)(""),[W,$]=(0,n.useState)(""),[X,q]=(0,n.useState)(()=>H.kw.map(Q.Hd)),[G,J]=(0,n.useState)(""),[V,Z]=(0,n.useState)(()=>Math.min(2,H.kw.length)),[ee,et]=(0,n.useState)(!1),[ea,es]=(0,n.useState)(null),[en,ei]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(!(null==ea?void 0:ea.pubkey))return void ei(null);let e=!1;return(0,r.AY)(ea.pubkey).then(t=>{e||ei(t)}),()=>{e=!0}},[null==ea?void 0:ea.pubkey]);let el=T?(0,Q.$O)(L)?(0,Q.Hd)(L):"":E,er=H.iI.map(Q.Hd).filter(e=>!X.includes(e)),ec=d.Qe.nsecEncode(R),eo=!["idle","error"].includes(f),ed={authenticating:p("Apom004"),checking:p("Apom005"),creating:p("Apom006")}[f]||"",ep=e=>{let{pubkey:t,bunkerUrl:s,central:n,email:i}=e,l={localKeys:{sec:C.privateKey,pub:(0,d.lG)((0,o.AS)(C.privateKey))},pub:t,bunker:s,central:n,email:i};a((0,c.s$)(l)),z().back()},eu=async(e,t)=>{let a=await (0,Q.sU)(e,t);if(!a)return!1;let s=await (0,Q.BW)(e,t);return ep({pubkey:a.pubkey,bunkerUrl:s,central:e,email:t.email}),!0},em=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:el;if(e){v(""),y("authenticating");try{let a=await (0,Q.Xe)(e);if(N(a),y("checking"),await eu(e,a)){y("idle"),t();return}let s=await (0,Q.nf)(a.email,e);if(s){es(s),y("idle"),h("found");return}y("idle"),h("setup")}catch(e){if("POPUP_CLOSED"===e.message)return void y("idle");if("POPUP_BLOCKED"===e.message){y("error"),v(p("AHqyO3m"));return}y("error"),v(e.message||p("AEH0z9N"))}}},eh=async()=>{if(null==ea?void 0:ea.central){v(""),y("authenticating");try{let e=await (0,Q.Xe)(ea.central);if(N(e),y("checking"),await eu(ea.central,e)){y("idle"),t();return}y("idle"),es(null),h("setup")}catch(e){if("POPUP_CLOSED"===e.message)return void y("idle");y("error"),v(e.message||p("AEH0z9N"))}}},eg=()=>{let e=G.trim();if(!e||!(0,Q.$O)(e))return;let t=(0,Q.Hd)(e);if(X.includes(t))return void J("");q([...X,t]),J("")},ex=async()=>{if(!w||!el)return;v("");let e=R;if("import"===I){let t=(()=>{$("");let e=U.trim();if(!e)return null;try{if(e.startsWith("nsec")){let{type:t,data:a}=d.Qe.decode(e);if("nsec"!==t)throw Error();return a}if(!/^[0-9a-fA-F]{64}$/.test(e))throw Error();return(0,o.AS)(e)}catch(e){return $(p("AIdFeYb")),null}})();if(!t)return;e=t,D(t)}if(0===X.length||V<1||V>X.length)return void v(p("AxnAEcr"));y("creating");try{"generate"===I&&((e=>{let t=new Blob([["Important: Store this information securely.\n---","Private key: ".concat(e)].join("\n")],{type:"text/plain"}),a=URL.createObjectURL(t),s=document.createElement("a");s.href=a,s.download="nostr-private-key.txt",s.click(),URL.revokeObjectURL(a)})(d.Qe.nsecEncode(e)),a((0,g.Kx)({type:1,desc:p("Apom010")}))),await (0,Q.Bt)(el,w,X,V,e);let s=null;for(let e=0;e<10&&(await new Promise(e=>setTimeout(e,1500)),!(s=await (0,Q.sU)(el,w)));e++);if(!s)throw Error(p("Ar66dzx"));await (0,Q._R)({email:w.email,central:el,operators:X,threshold:V,secretKey:e});let n=await (0,Q.BW)(el,w);ep({pubkey:s.pubkey,bunkerUrl:n,central:el,email:w.email}),y("idle"),t()}catch(e){y("error"),v(e.message||p("AEH0z9N"))}},ef=e=>{h(e),v(""),y("idle")};return(0,s.jsx)(P.A,{exit:t,width:480,children:(0,s.jsxs)("div",{className:"login-google-overlay box-pad-h box-pad-v bg-dropdown-t",children:[(0,s.jsx)("div",{className:"close",onClick:t,children:(0,s.jsx)("div",{})}),"central"===m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"login-google-head",children:[(0,s.jsx)(K.A,{name:"google",size:32}),(0,s.jsx)("h4",{className:"p-big",children:p("Apom001")}),(0,s.jsx)("p",{className:"gray-c",children:p("Apom011")})]}),(0,s.jsxs)("div",{className:"fit-container",children:[(0,s.jsx)("p",{className:"p-bold",children:p("A8SE9H1")}),(0,s.jsx)("p",{className:"gray-c",children:p("AdoAL8m")})]}),(0,s.jsxs)("div",{className:"login-convo-options",style:{marginTop:0},children:[B.map((e,t)=>{let a=!T&&E===e.url;return(0,s.jsxs)("div",{className:"login-convo-option box-pad-h-m box-pad-v-s bg-dropdown-t ".concat(a?"selected-option":""),style:{"--stagger-i":t},onClick:()=>{_(!1),O(e.url)},children:[(0,s.jsx)("span",{className:"login-convo-option-icon",children:(0,s.jsx)(K.A,{name:a?"circle_check":"circle",size:20,v:2,isBoldThemeColor:a})}),(0,s.jsx)("span",{className:"login-convo-option-copy",children:(0,s.jsx)("b",{children:(0,Q.w4)(e.url)})}),(0,s.jsx)("span",{className:"sticker pom-central-tag",children:"default"===e.kind?p("ANmIqNJ"):p("ATqpiwj")})]},e.url)}),(0,s.jsxs)("div",{className:"login-convo-option box-pad-h-m box-pad-v-s bg-dropdown-t ".concat(T?"selected-option":""),style:{"--stagger-i":B.length},onClick:()=>_(!0),children:[(0,s.jsx)("span",{className:"login-convo-option-icon",children:(0,s.jsx)(K.A,{name:T?"circle_check":"circle",size:20,v:2,isBoldThemeColor:T})}),(0,s.jsx)("span",{className:"login-convo-option-copy",children:(0,s.jsx)("b",{children:p("AabmNg4")})})]})]}),T&&(0,s.jsx)("input",{type:"text",className:"if ifs-full",placeholder:p("AG91nf9"),value:L,onChange:e=>M(e.target.value),autoFocus:!0}),b&&(0,s.jsx)("p",{className:"red-c",style:{textAlign:"center"},children:b}),eo?(0,s.jsxs)("div",{className:"login-google-busy fx-centered fx-col",children:[(0,s.jsx)(l.A,{size:24}),(0,s.jsx)("p",{className:"gray-c",children:ed})]}):(0,s.jsx)("button",{className:"btn btn-normal btn-full",onClick:()=>em(),disabled:!el,children:b?p("AhOnn0t"):p("Apom003")})]}),"found"===m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"login-google-head",children:[(0,s.jsx)(K.A,{name:"server",size:32,isBoldThemeColor:!0}),(0,s.jsx)("h4",{className:"p-big",children:p("AR7xWde")}),(0,s.jsx)("p",{className:"gray-c",children:p("A5uh9MU",{central:(0,Q.w4)((null==ea?void 0:ea.central)||"")})})]}),b&&(0,s.jsx)("p",{className:"red-c",style:{textAlign:"center"},children:b}),eo?(0,s.jsxs)("div",{className:"login-google-busy fx-centered fx-col",children:[(0,s.jsx)(l.A,{size:24}),(0,s.jsx)("p",{className:"gray-c",children:ed})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"pom-identity-cards",children:[(0,s.jsxs)("div",{className:"pom-identity-card",children:[(0,s.jsx)(x.A,{user_id:null==ea?void 0:ea.pubkey,img:null==en?void 0:en.picture,size:64,allowClick:!1}),(0,s.jsxs)("div",{className:"pom-identity-copy",children:[(0,s.jsx)("p",{className:"p-bold p-one-line",children:en?en.display_name.startsWith("npub")?(0,o.PV)(en.display_name):en.display_name:""}),en&&!en.name.startsWith("npub")&&en.name!==en.display_name&&(0,s.jsxs)("p",{className:"gray-c p-medium p-one-line",children:["@",en.name]})]}),(0,s.jsx)("button",{className:"btn btn-normal btn-full",onClick:eh,children:p("ANqJi0v",{central:(0,Q.w4)((null==ea?void 0:ea.central)||"")})})]}),(0,s.jsxs)("div",{className:"pom-identity-card",children:[(0,s.jsx)("div",{className:"pom-identity-unknown fx-centered",children:(0,s.jsx)("span",{children:"?"})}),(0,s.jsxs)("div",{className:"pom-identity-copy",children:[(0,s.jsx)("p",{className:"p-bold p-one-line",children:p("AAvmg0n")}),(0,s.jsx)("p",{className:"gray-c p-medium p-one-line",children:p("AMUoqQa")})]}),(0,s.jsx)("button",{className:"btn btn-gst btn-full",onClick:()=>{es(null),v(""),y("idle"),h("setup")},children:p("ACwufz6")}
1)]})]}),(0,s.jsx)("div",{className:"fx-centered fit-container",children:(0,s.jsx)("button",{className:"btn btn-normal btn-gray fx-centered bg-dropdown",style:{padding:"0 1rem",borderRadius:"50%",aspectRatio:"1/1",width:"44px",height:"44px"},onClick:()=>{es(null),ef("central")},children:(0,s.jsx)(K.A,{name:"arrow",transform:"rotate(90deg)",size:16})})})]})]}),"setup"===m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"login-google-head",children:[(0,s.jsx)("h4",{className:"p-big",children:p("AcNNqSN")}),(0,s.jsx)("p",{className:"gray-c",children:p("AMQOKdV")})]}),(0,s.jsxs)("div",{className:"login-convo-options",style:{marginTop:0},children:[(0,s.jsxs)("div",{className:"login-convo-option box-pad-h-m box-pad-v-s bg-dropdown-t ".concat("generate"===I?"selected-option":""),style:{"--stagger-i":0},onClick:()=>F("generate"),children:[(0,s.jsx)("span",{className:"login-convo-option-icon",children:(0,s.jsx)(K.A,{name:"star",size:24})}),(0,s.jsxs)("span",{className:"login-convo-option-copy",children:[(0,s.jsx)("b",{children:p("AfQb7HD")}),(0,s.jsx)("span",{children:p("AjhCCrK")})]}),(0,s.jsx)("span",{className:"login-convo-option-go",children:(0,s.jsx)(K.A,{name:"generate"===I?"circle_check":"circle",size:20,v:2,isBoldThemeColor:"generate"===I})})]}),(0,s.jsxs)("div",{className:"login-convo-option box-pad-h-m box-pad-v-s bg-dropdown-t ".concat("import"===I?"selected-option":""),style:{"--stagger-i":1},onClick:()=>F("import"),children:[(0,s.jsx)("span",{className:"login-convo-option-icon",children:(0,s.jsx)(K.A,{name:"key-icon",size:24})}),(0,s.jsxs)("span",{className:"login-convo-option-copy",children:[(0,s.jsx)("b",{children:p("AbXKi4r")}),(0,s.jsx)("span",{children:p("AmQjQOI")})]}),(0,s.jsx)("span",{className:"login-convo-option-go",children:(0,s.jsx)(K.A,{name:"import"===I?"circle_check":"circle",size:20,v:2,isBoldThemeColor:"import"===I})})]})]}),"generate"===I&&(0,s.jsxs)("div",{className:"login-google-key-field",children:[(0,s.jsx)("p",{className:"p-bold",children:p("Apom008")}),(0,s.jsxs)("div",{className:"login-google-key-row",children:[(0,s.jsx)("input",{type:"text",className:"if ifs-full",value:ec,readOnly:!0,onClick:e=>e.target.select()}),(0,s.jsx)("button",{className:"btn btn-normal btn-gray fx-centered bg-dropdown",style:{padding:"0 1rem",borderRadius:"50%",aspectRatio:"1/1",width:"44px",height:"44px"},onClick:()=>{(0,u.Dk)(ec,p("AStACDI")),S(!0),setTimeout(()=>S(!1),2e3)},disabled:eo,children:(0,s.jsx)(K.A,{name:A?"check_big":"copy",size:16,v:A?2:1})})]})]}),"import"===I&&(0,s.jsxs)("div",{className:"login-google-key-field",children:[(0,s.jsx)("p",{className:"p-bold",children:p("ArPMdgT")}),(0,s.jsx)("input",{type:"password",className:"if ifs-full",placeholder:p("A7uff0L"),value:U,onChange:e=>{Y(e.target.value),$("")}}),W&&(0,s.jsx)("p",{className:"red-c",children:W})]}),(0,s.jsxs)("div",{className:"fit-container",children:[(0,s.jsxs)("div",{className:"fx-scattered pointer fit-container ".concat(ee?"pom-advanced-toggle":""),onClick:()=>et(!ee),children:[(0,s.jsxs)("div",{className:"fx-centered",children:[(0,s.jsx)(K.A,{name:"settings",size:18,v:2}),(0,s.jsx)("p",{className:"p-bold",children:p("AsoXjsL")})]}),(0,s.jsx)(K.A,{name:"arrow",size:14,transform:ee?"rotate(180deg)":"rotate(0deg)"})]}),ee&&(0,s.jsxs)("div",{className:"sc-s-18 box-pad-h-m box-pad-v-m fit-container fx-col fx-centered fx-start-v bg-dropdown",children:[(0,s.jsxs)("div",{className:"fit-container",children:[(0,s.jsx)("p",{className:"p-bold gray-c",children:p("A51mB0F")}),(0,s.jsx)("p",{className:"gray-c pom-section-label",children:p("Apndhzt")})]}),(0,s.jsx)("div",{className:"fit-container fx-col fx-centered",children:X.map(e=>(0,s.jsxs)("div",{className:"pom-operator-row",children:[(0,s.jsx)("p",{children:(0,Q.w4)(e)}),(0,s.jsx)("div",{className:"pom-operator-remove",onClick:()=>(e=>{let t=X.filter(t=>t!==e);q(t),V>t.length&&Z(Math.max(1,t.length))})(e),title:p("AzkTxuy"),children:(0,s.jsx)(K.A,{name:"trash",size:17})})]},e))}),(0,s.jsxs)("div",{className:"fx-centered fit-container",children:[(0,s.jsx)("input",{type:"text",className:"if ifs-full",placeholder:p("AHuJAY1"),value:G,onChange:e=>J(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),eg())}}),(0,s.jsx)("button",{className:"btn btn-normal btn-small",onClick:eg,disabled:!G.trim(),children:p("AflwmPU")})]}),er.length>0&&(0,s.jsxs)("div",{className:"fit-container",children:[(0,s.jsx)("p",{className:"gray-c pom-section-label",children:p("AjJP77C")}),(0,s.jsx)("div",{className:"pom-chips",children:er.map(e=>(0,s.jsxs)("div",{className:"pom-chip",onClick:()=>q([...X,e]),children:[(0,s.jsx)(K.A,{name:"add_plus",size:14,v:2}),(0,s.jsx)("p",{children:(0,Q.w4)(e)})]},e))})]}),(0,s.jsxs)("div",{className:"fit-container",children:[(0,s.jsx)("p",{className:"p-bold gray-c pom-section-label",children:p("ABnF1Ro")}
1),(0,s.jsxs)("div",{className:"pom-stepper",children:[(0,s.jsx)("button",{className:"pom-stepper-btn",onClick:()=>Z(Math.max(1,V-1)),disabled:V<=1,children:(0,s.jsx)(K.A,{name:"remove_minus",size:15,v:2})}),(0,s.jsx)("p",{className:"pom-stepper-value",children:V}),(0,s.jsx)("button",{className:"pom-stepper-btn",onClick:()=>Z(Math.min(X.length,V+1)),disabled:V>=X.length,children:(0,s.jsx)(K.A,{name:"add_plus",size:15,v:2})}),(0,s.jsx)("p",{className:"gray-c",children:p("Av55soW",{count:X.length})})]})]})]})]}),b&&(0,s.jsx)("p",{className:"red-c",style:{textAlign:"center"},children:b}),eo?(0,s.jsxs)("div",{className:"login-google-busy fx-centered fx-col",children:[(0,s.jsx)(l.A,{size:24}),(0,s.jsx)("p",{className:"gray-c",children:ed})]}):(0,s.jsxs)("div",{className:"login-google-setup-actions",children:[(0,s.jsx)("button",{className:"btn btn-normal btn-gray fx-centered bg-dropdown",style:{padding:"0 1rem",borderRadius:"50%",aspectRatio:"1/1",width:"44px",height:"44px"},onClick:()=>{N(null),ef("central")},disabled:eo,children:(0,s.jsx)(K.A,{name:"arrow",transform:"rotate(90deg)",size:16})}),(0,s.jsx)("button",{className:"btn btn-normal",onClick:ex,disabled:eo||"import"===I&&!U.trim(),children:b?p("AhOnn0t"):p("AP9F5rl")})]})]})]})})},G=e=>{let{switchScreen:t,userKeys:a,recommendedStarterPacks:r}=e,p=(0,i.wA)(),x=(0,i.d4)(e=>e.userKeys),{t:f}=(0,k.Bd)(),[b,N]=(0,n.useState)(""),[A,S]=(0,n.useState)(""),[C,P]=(0,n.useState)(""),[B,E]=(0,n.useState)(""),[O,_]=(0,n.useState)(""),[L,M]=(0,n.useState)(""),[I,F]=(0,n.useState)(""),[R,D]=(0,n.useState)(!1),[U,H]=(0,n.useState)(1),[Q,W]=(0,n.useState)(!1),[$,X]=(0,n.useState)([]),[q,G]=(0,n.useState)(!1),[Z,ee]=(0,n.use
1State)(!1),[et,ea]=(0,n.useState)(!1),[es,en]=(0,n.useState)(""),[ei,el]=(0,n.useState)([]),er=[{id:1,label:f("AyBBPWE")},{id:2,label:f("AVzZUeP")},{id:3,label:f("Ah1Kxvl")},{id:4,label:f("AimqDYY")}],ec={1:f("AyBBPWE"),2:f("AVzZUeP"),3:f("AqBdu7X"),4:f("AimqDYY")},eo=()=>{if([1,2,3].includes(U)){if(1===U&&!b)return void p((0,g.Kx)({type:2,desc:f("AdrCWCj")}));H(U+1)}},ed=async()=>{try{if(R||et)return;if(!es)return void ee(!0);if(D(!0),x){try{await v.A.post("/api/v1/logout")}catch(e){console.log(e)}p((0,m.bb)(!1))}await (0,u.xW)(a.pub,a);let e=await v.A.post("/api/v1/wallet",{username:null==es?void 0:es.toLowerCase()});M(e.data.connectionSecret),F(e.data.lightningAddress);let t=["Important: Store this information securely. If you lose it, recovery may not be possible. Keep it private and protected at all times","---","Address: ".concat(e.data.lightningAddress),"NWC secret: ".concat(e.data.connectionSecret)];(0,o.Xg)(t.join("\n"),"text/plain","".concat(e.data.lightningAddress,"-NWC.txt"),f("AIzBCBb"),!1),D(!1),H(4)}catch(e){console.log(e),D(!1),e.response.status?G(!0):p((0,g.Kx)({type:3,desc:f("AQ12OQz")}))}},ep=async()=>{try{H(5);let e=C?await (0,u.ef)({file:C,userKeys:a}):"";if(!1===e){p((0,g.Kx)({type:2,desc:f("AfM6xbs")})),H(4);return}let t=O?await (0,u.ef)({file:O,userKeys:a}):"";if(!1===t){p((0,g.Kx)({type:2,desc:f("AnmPNHc")})),H(4);return}p((0,c.s$)(a));let s=["Important: Store this information securely. If you lose it, recovery may not be possible. Keep it private and protected at all times","---","Private key: ".concat(d.Qe.nsecEncode((0,o.AS)(a.sec))),"Public key: ".concat(d.Qe.npubEncode(a.pub))];(0,o.Xg)(s.join("\n"),"text/plain","account-credentials.txt",f("AdoWp0E"),!1);let n=new j.YX(a.sec);if(y.$.signer=n,await Promise.all([eu(),em(e,t),eh(),ef()]),I){let e={id:Date.now(),kind:3,entitle:I,active:!0,data:L};(0,h.M6)([e],a.pub)}z().back()}catch(e){console.log(e),H(4)}},eu=()=>{let e=new j.QB(y.$);e.kind=0,e.content="",e.publish()},em=async(e,t)=>{try{let a=new j.QB(y.$),s={};return s.display_name=b,s.name=b,s.about=A,s.picture=e||"",s.banner=t||"",I&&(s.lud16=I),a.kind=0,a.content=JSON.stringify(s),await a.publish(void 0,2e3),a}catch(e){console.log(e);return}},eh=async()=>{(0!==$.length||0!==ei.length)&&await Promise.all([await eg(),await ex()])},eg=async()=>{try{if(0===$.length)return;let e=$.map(e=>{var t;return["t",null==(t=e.tag)?void 0:t.toLowerCase()]}),t=new j.QB(y.$);return t.kind=10015,t.content="",t.tags=e,await t.publish(void 0,2e3)}catch(e){console.log(e);return}},ex=async()=>{try{let e=[],t=[...new Set($.map(e=>e.pubkeys).flat())].map(e=>["p",e]),a=ei.map(e=>["p",e]);e=[...t,...a];let s=new j.QB(y.$);return s.kind=3,s.content="",s.tags=e,await s.publish(void 0,2e3)}catch(e){console.log(e);return}},ef=async()=>{try{let e=["wss://nostr-01.yakihonne.com","wss://nostr-02.yakihonne.com","wss://relay.damus.io"].map(e=>["r",e]),t=new j.QB(y.$,{kind:10002,content:"",tags:e});await t.publish(void 0,2e3);return}catch(e){console.log(e);return}},ey=e=>{let{pubkeys:t,action:a}=e;"add"===a?el(e=>[...new Set([...e,...t])]):(console.log(t.length),el(e=>e.filter(e=>!t.includes(e))))},eb=e=>{let{pubkey:t,action:a}=e;"add"===a?el(e=>[...new Set([...e,t])]):el(e=>e.filter(e=>e!==t))};return(0,s.jsxs)(s.Fragment,{children:[U<=4&&(0,s.jsx)("div",{className:"signup-rail",children:er.map((e,t)=>(0,s.jsx)("div",{className:"signup-rail-item ".concat(U===e.id?"active":""," ").concat(U>e.id?"done":""),children:(0,s.jsx)("span",{className:"signup-rail-marker",style:{"--marker-i":t},children:U>e.id?(0,s.jsx)(K.A,{name:"check_big",v:2,size:20,isBoldThemeColor:!0}):e.id})},e.id))}),(0,s.jsxs)("div",{className:"fit-container signup-step-body",children:[U<=4&&(0,s.jsx)("p",{className:"signup-step-title",children:ec[U]}),1===U&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.N,{element:(0,s.jsx)("div",{className:"fit-container fx-col fx-centered box-pad-h",children:(0,s.jsxs)("div",{className:"signup-avatar-wrap",children:[(0,s.jsx)("div",{className:"bg-img cover-bg sc-s signup-avatar-img",style:{backgroundImage:"url(".concat(B||Y,")")}}),(0,s.jsxs)("div",{className:"signup-avatar-overlay fx-centered fx-col pointer toggle",children:[(0,s.jsx)(K.A,{name:"image",size:24}),(0,s.jsx)("p",{className:"gray-c p-medium",children:f("AnD39Ci")})]})]})}),setFile:e=>{P(e.file),E(e.url)}}),(0,s.jsx)("div",{className:"fit-container fx-centered fx-col signup-name-field",children:(0,s.jsx)("input",{type:"text",className:"if ifs-full p-bold p-centered if-no-border",placeholder:f("At0Sp8H"),value:b,onChange:e=>{en(e.target.value),N(e.target.value)},autoFocus:!0})})]}),2===U&&(0,s.jsx)("div",{className:"signup-packs-list",children:r.map(e=>(0,s.jsx)(T,{pack:e,handleMultiSelection:ey,handleSingleSelection:eb,selectedPubkeys:ei},e.id))}),3===U&&(0,s.jsxs)("div",{className:"fit-container fx-centered fx-col",children:[(0,s.jsx)(V,{isLoading:R,isCreated:L}),!L&&(0,s.jsxs)("div",{className:"fit-container fx-centered fx-col slide-up signup-wallet-field",children:[(0,s.jsxs)("div",{className:"fit-container fx-centered",children:[(0,s.jsx)("input",{type:"text",className:"if ifs-full",placeholder:f("ALCpv2S"),value:es,onChange:e=>{let t=e.target.value,a=/^[a-zA-Z0-9]+$/.test(t);q&&G(!1),Z&&ee(!1),(!t||a&&et)&&ea(!1),!t||a||et||ea(!0),en(t)},style:{borderColor:q||Z||et?"var(--red-main)":""}}),(0,s.jsx)("p",{className:"gray-c p-big signup-wallet-domain",children:"@w
1allet.yakihonne.com"})]}),q&&(0,s.jsx)("p",{className:"red-c p-medium fit-container box-pad-h-m",children:f("AgrHddv")}),Z&&(0,s.jsx)("p",{className:"red-c p-medium fit-container box-pad-h-m",children:f("AhQtS0K")}),et&&(0,s.jsx)("p",{className:"red-c p-medium fit-container box-pad-h-m",children:f("AqSxggD")})]}),L&&(0,s.jsxs)("div",{className:"signup-wallet-address",children:[(0,s.jsx)("span",{className:"signup-wallet-address-label",children:f("A40BuYB")}),(0,s.jsx)("span",{className:"signup-wallet-address-value",children:I})]})]}),4===U&&(0,s.jsxs)("div",{className:"fit-container fx-centered fx-col signup-allset",children:[(0,s.jsx)("div",{className:"signup-allset-avatar",style:{"--allset-i":0},children:(0,s.jsx)("div",{className:"bg-img cover-bg sc-s",style:{backgroundImage:"url(".concat(B||Y,")")}})}),(0,s.jsx)("h4",{className:"signup-allset-name",style:{"--allset-i":1},children:b}),I&&(0,s.jsxs)("div",{className:"signup-wallet-address signup-wallet-address-sm",style:{"--allset-i":2},children:[(0,s.jsx)("span",{className:"signup-wallet-address-label",children:f("A40BuYB")}),(0,s.jsx)("span",{className:"signup-wallet-address-value",children:I})]})]}),U<=4&&(0,s.jsxs)("div",{className:"login-step-nav".concat(3!==U||L?"":" login-step-nav--wallet"),children:[U>1&&(0,s.jsx)("button",{className:"btn btn-gray",onClick:()=>{[2,3,4].includes(U)&&H(U-1)},disabled:R,children:f("AF7iGeG")}),3===U&&!L&&(0,s.jsx)("button",{className:"btn btn-gray",onClick:eo,disabled:R,children:f("AWallet1")}),3!==U||L?(0,s.jsx)("button",{className:"btn btn-normal",onClick:4!==U?eo:ep,children:4!==U?f("AgGi8rh"):f("AB0SnxL")}):(0,s.jsx)("button",{className:"btn btn-normal",onClick:ed,disabled:R,children:R?(0,s.jsx)(l.A,{}):f("AWallet2")})]}),5===U&&(0,s.jsx)(J,{})]},U)]})},J=()=>(0,s.jsx)("div",{className:"fit-container fx-centered fx-col",style:{height:"500px"},children:(0,s.jsx)(l.A,{size:32})}),V=e=>{let{isCreated:t,isLoading:a}=e;return(0,s.jsx)("div",{className:"signup-wallet-illustration",children:(0,s.jsx)("div",{className:"signup-wallet-ring ".concat(a?"pulse-orange":""," ").concat(t?"signup-wallet-ring--done":""),children:(0,s.jsx)("span",{className:"signup-wallet-btc",children:"₿"})})})}},39305:(e,t,a)=>{"use strict";a.d(t,{Nh:()=>i,iI:()=>s,kw:()=>n,yH:()=>l});let s=["https://po.jumble.social","https://po.coracle.social","https://po.njump.me","https://po.f7z.io","https://po.nostrver.se","https://po.yakihonne.com"],n=["https://po.yakihonne.com","https://po.jumble.social","https://po.njump.me"],i=[{url:"https://auth.njump.me",kind:"default"},{url:"https://auth.yakihonne.com",kind:"suggested"}],l=16440},72615:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(33499),n=a(23380);a(65235);var i=a(8006);function l(e){let{pubkeys:t,number:a=3,imgSize:n}=e,i=t.slice(0,a);return(0,s.jsx)("div",{className:"fx-centered",style:{position:"relative"},children:i.map((e,t)=>(0,s.jsx)("div",{style:{marginLeft:t>0?"-15px":"0",zIndex:i.length-t,position:"relative",height:"".concat(n,"px")},className:"fx-centered",children:(0,s.jsx)(r,{pubkey:e,imgSize:n})},e))})}let r=e=>{let{pubkey:t,imgSize:a=30}=e,{userProfile:l}=(0,n.A)(t,!1);return(0,s.jsx)(i.A,{size:a,mainAccountUser:!1,user_id:t,img:null==l?void 0:l.picture,allowClick:!1,allowPropagation:!0})}},90953:(e,t,a)=>{"use strict";a.d(t,{$O:()=>u,BW:()=>v,Bt:()=>S,Er:()=>k,Hd:()=>p,PB:()=>h,Xe:()=>x,_R:()=>A,lw:()=>C,nf:()=>N,s$:()=>g,sU:()=>f,w4:()=>m});var s=a(89861),n=a(66137),i=a(11288),l=a(17377),r=a(47706),c=a(76636),o=a(53263),d=a(39305);let p=e=>{let t=e.trim();return t.startsWith("http")||(t="https://"+t),new URL(t).origin},u=e=>{try{return p(e),!0}catch(e){return!1}},m=e=>{try{return new URL(e).host}catch(t){return e}},h=(e,t)=>{let a=window.screenX+Math.max(0,(window.outerWidth-600)/2),s=window.screenY+Math.max(0,(window.outerHeight-700)/2);return window.open(e,t,"popup=yes,width=".concat(600,",height=").concat(700,",left=").concat(a,",top=").concat(s))},g=(e,t,a)=>new Promise((s,n)=>{let i=()=>{window.removeEventListener("message",l),clearInterval(r),clearTimeout(c)},l=n=>{if(n.origin!==t||n.source!==e)return;let l=a(n.data);void 0!==l&&(i(),e.close(),s(l))},r=setInterval(()=>{e.closed&&(i(),n(Error("POPUP_CLOSED")))},300),c=setTimeout(()=>{i(),e.close(),n(Error("Timed out waiting for Google sign-in"))},3e5);window.addEventListener("message",l)}),x=async e=>{let t=h("".concat(e,"/login/google"),"PomegranateLogin");if(!t)throw Error("POPUP_BLOCKED");let a=await g(t,e,e=>{if(e&&"object"==typeof e&&"string"==typeof e.token)return e.token}),s=null,n="",i=JSON.parse(atob(a));if("number"==typeof i.created_at&&(s=1e3*i.created_at),Array.isArray(i.tags)){var l;let e=i.tags.find(e=>Array.isArray(e)&&"email"===e[0]);n=null!=(l=null==e?void 0:e[1])?l:""}if(!s||Date.now()-s>864e5)throw Error("Google sign-in token expired");return{raw:a,email:n,createdAt:s}},f=async(e,t)=>{let a=await fetch("".concat(e,"/account"),{headers:{Authorization:"Token ".concat(t.raw)}});if(401===a.status)throw Error("Google session expired, please sign in again");if(!a.ok)return null;let s=await a.json();return(null==s?void 0:s.pubkey)?s:null},y=async(e,t)=>{let a=await fetch("".concat(e,"/profiles"),{headers:{Authorization:"Token ".concat(t.raw)}});if(!a.ok)throw Error("Failed to load signing profiles");return await a.json()},b=async(e,t,a)=>{let s=await fetch("".concat(e,"/profiles"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Token ".concat(t.raw)},body:JSON.stringify({name:a})});if(!s.ok)throw Error("Signing profile creation failed");return await s.json()},v=async(e,t)=>{let a=await y(e,t);a.find(e=>"default"===e.name)||(await b(e,t,"default"),a=await y(e,t));let s=a.find(e=>"default"===e.name)||a[0];if(!s)throw Error("No signing profile available");return((e,t)=>{let a=e.replace(/^http/,"ws");return"bunker://".concat(t.handler_pubkey,"?relay=").concat(encodeURIComponent(a))})(e,s)},j=e=>(0,l.My)((0,n.xi)(e.trim().toLowerCase(),"pomegranate",{t:1,m:65536,p:4,dkLen:32})),w=async e=>{try{let s=j(e),n=[...await c.$.fetchEvents({kinds:[d.yH],"#m":[s]},{closeOnEose:!0,groupable:!1})].sort((e,t)=>
1t.created_at-e.created_at),i=[];for(let e of n){var t,a;let s=null==(t=e.tags.find(e=>"central"===e[0]))?void 0:t[1];if(!s)continue;let n=p(s);if(i.some(e=>e.central===n))continue;let l=e.tags.filter(e=>"operator"===e[0]&&e[1]).map(e=>e[1]),r=Number(null==(a=e.tags.find(e=>"threshold"===e[0]))?void 0:a[1]);i.push({pubkey:e.pubkey,central:n,operators:l,threshold:Number.isFinite(r)?r:null,created_at:e.created_at})}return i}catch(e){return console.log(e),[]}},k=async e=>(await w(e))[0]||null,N=async(e,t)=>{let a=await w(e),s=t?p(t):"";return a.find(e=>e.central!==s)||null},A=async e=>{let{email:t,central:a,operators:n,threshold:i,secretKey:l}=e;try{let e=(0,s.pC)({kind:d.yH,created_at:Math.floor(Date.now()/1e3),tags:[["m",j(t)],["central",a],...n.map(e=>["operator",e]),["threshold",String(i)]],content:""},l),r=new o.QB(c.$,e);return await r.publish(),!0}catch(e){return console.log(e),!1}},S=async(e,t,a,n,c)=>{let o=crypto.randomUUID(),d=BigInt("0x"+(0,l.My)(c)),{shards:p}=(0,r.Fy)(d,n,a.length),u=(0,s.pC)({kind:20445,created_at:Math.floor(Date.now()/1e3),tags:[["threshold",String(n)],...a.map((e,t)=>["operator",e,(0,r.F1)(p[t].pubShard)])],content:""},c);if(!(await fetch("".concat(e,"/register"),{method:"POST",body:JSON.stringify(u),headers:{"Content-Type":"application/json",Authorization:"Token ".concat(t.raw),"X-Pomegranate-Session":o}})).ok)throw Error("Central server registration failed");let m=new TextEncoder,h=(await Promise.all(a.map(async(a,n)=>{let d=(0,s.pC)({kind:20444,created_at:Math.floor(Date.now()/1e3),tags:[["central",e],["email",t.email]],content:(0,r.iB)(p[n])},c),u=(0,l.My)((0,i.sc)(m.encode("".concat(o,":").concat(a))));try{return(await fetch("".concat(a,"/po/register"),{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json","X-Pomegranate-Operator-Token":u}})).ok?null:a}catch(e){return a}}))).filter(Boolean);if(a.length-h.length<n)throw Error("Could not register with enough operators (".concat(a.length-h.length,"/").concat(n,"). Please try again."))},C=async(e,t)=>{try{return(await fetch("".concat(e,"/account"),{method:"DELETE",headers:{Authorization:"Token ".concat(t.raw)}})).ok}catch(e){return!1}}}}]);
2//# sourceMappingURL=6381.92f1731327bb3b34.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.