PageSourceSearch

https://www.chiho.ai/_next/static/chunks/4621.48e4b2b416310583.js

js chiho.ai collected 2026-10-05 15:32:28 UTC 17,265 bytes, 247 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4621],{14423:(e,r,t)=>{t.d(r,{A:()=>l});var a=t(75834);let i=e=>{let r=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase());return r.charAt(0).toUpperCase()+r.slice(1)},n=function(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return r.filter((e,r,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim()};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,a.forwardRef)((e,r)=>{let{color:t="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:c="",children:d,iconNode:p,...u}=e;return(0,a.createElement)("svg",{ref:r,...o,width:i,height:i,stroke:t,strokeWidth:l?24*Number(s)/Number(i):s,className:n("lucide",c),...!d&&!(e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0})(u)&&{"aria-hidden":"true"},...u},[...p.map(e=>{let[r,t]=e;return(0,a.createElement)(r,t)}),...Array.isArray(d)?d:[d]])}),l=(e,r)=>{let t=(0,a.forwardRef)((t,o)=>{let{className:l,...c}=t;return(0,a.createElement)(s,{ref:o,iconNode:r,className:n("lucide-".concat(i(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),l),...c})});return t.displayName=i(e),t}},14621:(e,r,t)=>{t.r(r),t.d(r,{ErrorScreen:()=>f,ErrorScreenView:()=>v,default:()=>f});var a=t(26514),i=t(68358);let n=(0,t(14423).A)("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var o=t(71366),s=t(51807),l=t(40175),c=t(33615),d=t(33861),p=t(37503),u=t(86746),h=t(89158),g=t(52082);t(75834),t(66239),t(13799),t(7287),t(38272),t(2807);let v=({error:e,allowlistConfig:r,onRetry:t,onCaptchaReset:s,onBack:l})=>{let p=((e,r)=>{if(e instanceof u.R)return{title:"Transaction failed",detail:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:e.message}),(0,a.jsxs)("span",{children:[" ","Check the"," ",(0,a.jsx)(x,{href:e.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:i.A};if(e instanceof d.P)switch(e.privyErrorCode){case d.a.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:e.message,ctaText:"Try again",icon:i.A};case d.a.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:e.message,ctaText:"Try again",icon:i.A};case d.a.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:e.message,ctaText:"Try again",icon:i.A};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i.A}}if(e instanceof c.P&&"twilio_verification_failed"===e.type)return{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:n};if(!(e instanceof d.b))return e instanceof d.c&&e.status&&[400,422].includes(e.status)?{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:i.A}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i.A};switch(e.privyErrorCode){case d.a.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:i.A};case d.a.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:e.message,ctaText:"Try another method",icon:i.A};case d.a.ALLOWLIST_REJECTED:return{title:r.errorTitle||"You don't have access to this app",detail:r.errorDetail||"Have you been invited?",ctaText:r.errorCtaText||"Try another account",icon:o.A};case d.a.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case d.a.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case d.a.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:i.A};case d.a.NOT_SUPPORTED:return{title:"This region is not supported",detail
1:"SMS authentication from this region is not available",ctaText:"Try another method",icon:i.A};case d.a.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:i.A};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i.A}}})(e,r);return(0,a.jsx)(g.S,{title:p.title,subtitle:p.detail,icon:p.icon,onBack:l,iconVariant:"error",primaryCta:{label:p.ctaText,onClick:()=>{if(e instanceof d.b&&(e.privyErrorCode===d.a.INVALID_CAPTCHA&&s?.(),e.privyErrorCode===d.a.ALLOWLIST_REJECTED)){let e=(0,h.t)(r.errorCtaLink);if(e)return void window.open(e,"_blank","noopener,noreferrer")}t?.()},variant:"error"},watermark:!0})},f={component:()=>{let{navigate:e,data:r,lastScreen:t,currentScreen:i}=(0,p.u)(),n=(0,l.u)(),{reset:o}=(0,c.a)(),s=r?.errorModalData?.previousScreen||(t===i?void 0:t);return(0,a.jsx)(v,{error:r?.errorModalData?.error||Error(),allowlistConfig:n.allowlistConfig,onRetry:()=>{e(s||"LandingScreen",!1)},onCaptchaReset:o})}},x=s.I4.a`
2  color: var(--privy-color-accent) !important;
3  font-weight: 600;
4`},52082:(e,r,t)=>{t.d(r,{S:()=>o});var a=t(26514),i=t(58156),n=t(69038);let o=({primaryCta:e,secondaryCta:r,helpText:t,footerText:o,watermark:s=!0,children:l,...c})=>{let d=e||r?(0,a.jsxs)(a.Fragment,{children:[e&&(()=>{let{label:r,...t}=e,n=t.variant||"primary";return(0,a.jsx)(i.a,{...t,variant:n,style:{width:"100%",...t.style},children:r})})(),r&&(()=>{let{label:e,...t}=r,n=t.variant||"secondary";return(0,a.jsx)(i.a,{...t,variant:n,style:{width:"100%",...t.style},children:e})})()]}):null;return(0,a.jsxs)(n.S,{id:c.id,className:c.className,children:[(0,a.jsx)(n.S.Header,{...c}),l?(0,a.jsx)(n.S.Body,{children:l}):null,t||d||s?(0,a.jsxs)(n.S.Footer,{children:[t?(0,a.jsx)(n.S.HelpText,{children:t}):null,d?(0,a.jsx)(n.S.Actions,{children:d}):null,s?(0,a.jsx)(n.S.Watermark,{}):null]}):null,o?(0,a.jsx)(n.S.FooterText,{children:o}):null]})}},68358:(e,r,t)=>{t.d(r,{A:()=>a});let a=(0,t(14423).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},69038:(e,r,t)=>{t.d(r,{S:()=>T});var a=t(26514),i=t(75834),n=t(51807),o=t(32279),s=t(58156),l=t(91012);let c=n.I4.div`
5  /* spacing tokens */
6  --screen-space: 16px; /* base 1x = 16 */
7  --screen-space-lg: calc(var(--screen-space) * 1.5); /* 24px */
8
9  position: relative;
10  overflow: hidden;
11  margin: 0 calc(-1 * var(--screen-space)); /* extends over modal padding */
12  height: 100%;
13  border-radius: var(--privy-border-radius-lg);
14`,d=n.I4.div`
15  display: flex;
16  flex-direction: column;
17  gap: calc(var(--screen-space) * 1.5);
18  width: 100%;
19  background: var(--privy-color-background);
20  padding: 0 var(--screen-space-lg) var(--screen-space);
21  height: 100%;
22  border-radius: var(--privy-border-radius-lg);
23`,p=n.I4.div`
24  position: relative;
25  display: flex;
26  flex-direction: column;
27`,u=(0,n.I4)(s.M)`
28  margin: 0 -8px;
29`,h=n.I4.div`
30  flex: 1 1 auto;
31  display: flex;
32  flex-direction: column;
33
34  /* Enable scrolling */
35  overflow-y: auto;
36
37  /* Hide scrollbar but keep functionality when scrollable */
38  /* Add padding for focus outline space, offset with negative margin */
39  padding: 3px;
40  margin: -3px;
41
42  &::-webkit-scrollbar {
43    display: none;
44  }
45  scrollbar-gutter: stable both-edges;
46  scrollbar-width: none;
47  -ms-overflow-style: none;
48
49  /* Gradient effect for scroll indication */
50  ${({$colorScheme:e})=>"light"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0}
51
52  background-repeat: no-repeat;
53  background-size:
54    100% 32px,
55    100% 16px;
56  background-attachment: local, scroll;
57`,g=n.I4.div`
58  display: flex;
59  flex-direction: column;
60  gap: var(--screen-space-lg);
61  margin-top: 1.5rem;
62`,v=n.I4.div`
63  text-align: center;
64  display: flex;
65  flex-direction: column;
66  align-items: center;
67  gap: var(--screen-space);
68`,f=n.I4.div`
69  display: flex;
70  flex-direction: column;
71  gap: 4px;
72`,x=n.I4.h3`
73  && {
74    font-size: 20px;
75    line-height: 32px;
76    font-weight: 500;
77    color: var(--privy-color-foreground);
78    margin: 0;
79  }
80`,y=n.I4.p`
81  && {
82    margin: 0;
83    font-size: 16px;
84    font-weight: 300;
85    line-height: 24px;
86    color: var(--privy-color-foreground);
87  }
88`,m=n.I4.div`
89  background: ${({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}}};
90
91  border-radius: 50%;
92  width: 64px;
93  height: 64px;
94  display: flex;
95  align-items: center;
96  justify-content: center;
97`,w=n.I4.div`
98  display: flex;
99  align-items: center;
100  justify-content: center;
101
102  img,
103  svg {
104    max-height: 90px;
105    max-width: 180px;
106  }
107`,b=n.I4.div`
108  display: flex;
109  flex-direction: column;
110  justify-content: center;
111  align-items: center;
112  width: 100%;
113  height: 82px;
114
115  > div {
116    position: relative;
117  }
118
119  > div > :first-child {
120    position: relative;
121  }
122
123  > div > :last-child {
124    position: absolute;
125    left: 50%;
126    top: 50%;
127    transform: translate(-50%, -50%);
128  }
129`,T=({children:e,...r})=>(0,a.jsx)(c,{children:(0,a.jsx)(d,{...r,children:e})}),k=n.I4.div`
130  position: absolute;
131  top: 0;
132  left: calc(-1 * var(--screen-space-lg));
133  width: calc(100% + calc(var(--screen-space-lg) * 2));
134  height: 4px;
135  background: var(--privy-color-background-2);
136  border-top-left-radius: inherit;
137  border-top-right-radius: inherit;
138  overflow: hidden;
139`,j=(0,n.I4)(s.B)`
140  padding: 0;
141  && a {
142    padding: 0;
143    color: var(--privy-color-foreground-3);
144  }
145`,A=n.I4.div`
146  height: 100%;
147  width: ${({pct:e})=>e}%;
148  background: var(--privy-color-foreground-3);
149  border-radius: 2px;
150  transition: width 300ms ease-in-out;
151`,E=({step:e})=>e?(0,a.jsx)(k,{children:(0,a.jsx)(A,{pct:Math.min(100,e.current/e.total*100)})}):null;T.Header=({title:e,subtitle:r,icon:t,iconVariant:i,iconLoadingStatus:n,showBack:o,onBack:s,showInfo:l,onInfo:c,showClose:d,onClose:h,step:g,headerTitle:m,eyebrow:w,...b})=>(0,a.jsxs)(p,{...b,children:[(0,a.jsx)(u,{backFn:o?s:void 0,infoFn:l?c:void 0,onClose:d?h:void 0,title:m,eyebrow:w,closeable:d}),(t||i||e||r)&&(0,a.jsxs)(v,{children:[t||i?(0,a.jsx)(T.Icon,{icon:t,variant:i,loadingStatus:n}):null,!(!e&&!r)&&(0,a.jsxs)(f,{children:[e&&(0,a.jsx)(x,{children:e}),r&&(0,a.jsx)(y,{children:r})]})]}),g&&(0,a.jsx)(E,{step:g})]}),(T.Body=i.forwardRef(({children:e,...r},t)=>(0,a.jsx)(h,{ref:t,...r,children:e}))).displayName="Screen.Body",T.Footer=({children:e,...r})=>(0,a.jsx)(g,{id:"privy-content-footer-container",...r,children:e}),T.Actions=({children:e,...r})=>(0,a.jsx)(I,{...r,children:e}),T.HelpText=({children:e,...r})=>(0,a.jsx)(C,{...r,children:e}),T.FooterText=({children:e,...r})=>(0,a.jsx)(S,{...r,children:e}),T.Watermark=()=>(0,a.jsx)(j,{}),T.Icon=({icon:e,variant:r="subtle",loadingStatus:t})=>"logo"===r&&e?(0,a.jsx)(w,"string"==typeof e?{children:(0,a.jsx)("img",{src:e,alt:""})}:i.isValidElement(e)?{children:e}:{children:i.createElement(e)}):"loading"===r?e?(0,a.jsx)(b,{children:(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,a.jsx)(o.C,{success:t?.success,fail:t?.fail}),"string"==typeof e?(0,a.jsx)("span",{style:{background:`url('${e}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):i.isValidElement(e)?i.cloneElement(e,{style:{width:"38px",height:"38px"}}):i.createElement(e,{style:{width:"38px",height:"38px"}})]})}):(0,a.jsx)(m,{$variant:r,children:(0,a.jsx)(l.N,{size:"64px"})}):(0,a.jsx)(m,{$variant:r,children:e&&("string"==typeof e?(0,a.jsx)("img",{src:e,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):i.isValidElement(e)?e:i.createElement(e,{width:32,height:32,stroke:(()=>{switch(r){case"success":return"var(--privy-color-icon-success)";case"warning":return"var(--privy-color-icon-warning)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}})(),strokeWidth:2}))});let I=n.I4.div`
152  width: 100%;
153  display: flex;
154  flex-direction: column;
155  gap: calc(var(--screen-space) / 2);
156`,C=n.I4.div`
157  && {
158    margin: 0;
159    width: 100%;
160    text-align: center;
161    color: var(--privy-color-foreground-2);
162    font-size: 13px;
163    line-height: 20px;
164
165    & a {
166      text-decoration: underline;
167    }
168  }
169`,S=n.I4.div`
170  && {
171    margin-top: -1rem;
172    width: 100%;
173    text-align: center;
174    color: var(--privy-color-foreground-2);
175    font-size: 0.6875rem; // 11px
176    line-height: 1rem; // 16px
177  }
178`},71366:(e,r,t)=>{t.d(r,{A:()=>a});
178let a=(0,t(14423).A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},86746:(e,r,t)=>{t.d(r,{R:()=>x,a:()=>h,b:()=>o,c:()=>n,d:()=>g,e:()=>s,g:()=>u,t:()=>c,u:()=>f});var a=t(75834),i=t(33861);let n=0x2f3fb341,o="11111111111111111111111111111111",s="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",l="0x0000000000000000000000000000000000000000",c=({appId:e,originCurrency:r,destinationCurrency:t,...a})=>({tradeType:"EXPECTED_OUTPUT",originCurrency:r??l,destinationCurrency:t??l,referrer:`privy|${e}`,...a}),d="https://api.relay.link",p="https://api.testnets.relay.link",u=async({input:e,isTestnet:r})=>{let t=await fetch((r?p:d)+"/quote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();if(!(t.ok||"string"==typeof a.message&&a.message.startsWith("Invalid address")))throw console.error("Relay error:",a),Error(a.message??"Error fetching quote from relay");return a},h=e=>{let r=e.steps[0]?.items?.[0];if(r)return{from:r.data.from,to:r.data.to,value:Number(r.data.value),chainId:Number(r.data.chainId),data:r.data.data}},g=e=>e.steps.flatMap(e=>e.items?.filter(e=>"incomplete"===e.status)??[]).map(e=>({from:e.data.from,to:e.data.to,value:Number(e.data.value),chainId:Number(e.data.chainId),data:e.data.data}));async function v({transactionHash:e,isTestnet:r}){let t=await fetch((r?p:d)+"/requests/v2?hash="+e),a=await t.json();if(!t.ok){if("message"in a&&"string"==typeof a.message)throw Error(a.message);throw Error("Error fetching request from relay")}return a.requests.at(0)?.status??"pending"}function f({transactionHash:e,isTestnet:r,bridgingStatus:t,setBridgingStatus:i,onSuccess:n,onFailure:o}){(0,a.useEffect)(()=>{if(e&&t){if(["delayed","waiting","pending"].includes(t)){let t=setInterval(async()=>{try{let t=await v({transactionHash:e,isTestnet:r});i(t)}catch(e){console.error(e)}},1e3);return()=>clearInterval(t)}"success"===t?n({transactionHash:e}):["refund","failure"].includes(t)&&o({error:new x(e,r)})}},[t,e,r])}class x extends i.P{constructor(e,r){super("We were unable to complete the bridging transaction. Funds will be refunded on your wallet.",void 0,i.a.TRANSACTION_FAILURE),this.relayLink=r?`https://testnets.relay.link/transaction/${e}`:`https://relay.link/transaction/${e}`}}},89158:(e,r,t)=>{t.d(r,{t:()=>i});let a=new Set(["https:","mailto:"]);function i(e){if(!e)return null;try{if(a.has(new URL(e).protocol))return e}catch{}return null}},91012:(e,r,t)=>{t.d(r,{N:()=>n});var a=t(26514),i=t(51807);let n=({size:e,centerIcon:r})=>(0,a.jsx)(o,{$size:e,children:(0,a.jsxs)(s,{children:[(0,a.jsx)(c,{}),(0,a.jsx)(d,{}),r?(0,a.jsx)(l,{children:r}):null]})}),o=i.I4.div`
179  --spinner-size: ${e=>e.$size?e.$size:"96px"};
180
181  display: inline-flex;
182  justify-content: center;
183  align-items: center;
184
185  @media all and (display-mode: standalone) {
186    margin-bottom: 30px;
187  }
188`,s=i.I4.div`
189  position: relative;
190  height: var(--spinner-size);
191  width: var(--spinner-size);
192
193  opacity: 1;
194  animation: fadein 200ms ease;
195`,l=i.I4.div`
196  position: absolute;
197  top: 0;
198  right: 0;
199  bottom: 0;
200  left: 0;
201  display: flex;
202  align-items: center;
203  justify-content: center;
204  svg,
205  img {
206    width: calc(var(--spinner-size) * 0.4);
207    height: calc(var(--spinner-size) * 0.4);
208    border-radius: var(--privy-border-radius-full);
209  }
210`,c=i.I4.div`
211  position: absolute;
212  top: 0;
213  right: 0;
214  bottom: 0;
215  left: 0;
216  width: var(--spinner-size);
217  height: var(--spinner-size);
218
219  && {
220    border: 4px solid var(--privy-color-border-default);
221    border-radius: 50%;
222  }
223`,d=i.I4.div`
224  position: absolute;
225  top: 0;
226  right: 0;
227  bottom: 0;
228  left: 0;
229  width: var(--spinner-size);
230  height: var(--spinner-size);
231  animation: spin 1200ms linear infinite;
232
233  && {
234    border: 4px solid;
235    border-color: var(--privy-color-icon-subtle) transparent transparent transparent;
236    border-radius: 50%;
237  }
238
239  @keyframes spin {
240    from {
241      transform: rotate(0deg);
242    }
243    to {
244      transform: rotate(360deg);
245    }
246  }
247`}}]);

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.