PageSourceSearch

https://crossmint-onramp-demo.vercel.app/_next/static/chunks/2331.40d75edd9cfe6688.js

js crossmint-onramp-demo.vercel.app collected 2026-10-03 06:31:35 UTC 61,844 bytes, 604 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2331],{834:(e,t,n)=>{n.d(t,{E:()=>o,I:()=>a,a:()=>s});var i=n(20647),l=n(55211);let r=i.I4.label`
2  display: block;
3  position: relative;
4  width: 100%;
5  height: 56px;
6
7  && > :first-child {
8    position: absolute;
9    left: 0.75em;
10    top: 50%;
11    transform: translate(0, -50%);
12  }
13
14  && > input {
15    font-size: 16px;
16    line-height: 24px;
17    color: var(--privy-color-foreground);
18
19    padding: 12px 88px 12px 52px;
20    flex-grow: 1;
21    background: var(--privy-color-background);
22    border: 1px solid
23      ${({$error:e})=>e?"var(--privy-color-error) !important":"var(--privy-color-foreground-4)"};
24    border-radius: var(--privy-border-radius-md);
25    width: 100%;
26    height: 100%;
27
28    /* Tablet and Up */
29    @media (min-width: 441px) {
30      font-size: 14px;
31      padding-right: 78px;
32    }
33
34    :focus {
35      outline: none;
36      border-color: ${({$error:e})=>e?"var(--privy-color-error) !important":"var(--privy-color-accent-light)"};
37      box-shadow: ${({$error:e})=>e?"none":"0 0 0 1px var(--privy-color-accent-light)"};
38    }
39
40    :autofill,
41    :-webkit-autofill {
42      background: var(--privy-color-background);
43    }
44
45    && > input::placeholder {
46      color: var(--privy-color-foreground-3);
47    }
48    &:disabled {
49      opacity: 0.4; /* Make it visually appear disabled */
50      cursor: not-allowed; /* Change cursor to not-allowed */
51    }
52    &:disabled,
53    &:disabled:hover,
54    &:disabled > span {
55      color: var(--privy-color-foreground-3); /* Change text color to grey */
56    }
57  }
58
59  && > button:last-child {
60    right: 0px;
61    line-height: 24px;
62    padding: 13px 17px;
63    :focus {
64      outline: none;
65    }
66    &:disabled {
67      opacity: 0.4; /* Make it visually appear disabled */
68      cursor: not-allowed; /* Change cursor to not-allowed */
69    }
70    &:disabled,
71    &:disabled:hover,
72    &:disabled > span {
73      color: var(--privy-color-foreground-3); /* Change text color to grey */
74    }
75  }
76`,o=(0,i.I4)(r)`
77  background-color: var(--privy-color-background);
78  transition: background-color 200ms ease;
79
80  && > button {
81    right: 0;
82    line-height: 24px;
83    position: absolute;
84    padding: 13px 17px;
85    background-color: #090;
86
87    :focus {
88      outline: none;
89      border-color: var(--privy-color-accent);
90    }
91  }
92`,s=(0,i.I4)(r)`
93  && > input {
94    overflow: hidden;
95    white-space: nowrap;
96    text-overflow: ellipsis;
97
98    padding-right: ${e=>e.$stacked?"16px":"88px"};
99
100    border: 1px solid
101      ${({$error:e})=>e?"var(--privy-color-error) !important":"var(--privy-color-foreground-4)"};
102
103    && > input::placeholder {
104      color: var(--privy-color-foreground-3);
105    }
106  }
107
108  && > :last-child {
109    right: 16px;
110    position: absolute;
111    top: 50%;
112    transform: translate(0, -50%);
113  }
114
115  && > button:last-child {
116    right: 0px;
117    line-height: 24px;
118    padding: 13px 17px;
119
120    :focus {
121      outline: none;
122    }
123  }
124`,a=i.I4.div`
125  width: 100%;
126
127  /* Add styling for the ErrorMessage within EmailInput */
128  && > ${l.E} {
129    display: block;
130    text-align: left;
131    padding-left: var(--privy-border-radius-md);
132    padding-bottom: 5px;
133  }
134`},4471:(e,t,n)=>{n.d(t,{C:()=>u,a:()=>g});var i=n(95155),l=n(5917),r=n(75426),o=n(12115),s=n(20647);let a=s.I4.button`
135  display: flex;
136  align-items: center;
137  justify-content: end;
138  gap: 0.5rem;
139
140  svg {
141    width: 0.875rem;
142    height: 0.875rem;
143  }
144`,c=s.I4.span`
145  display: flex;
146  align-items: center;
147  gap: 0.25rem;
148  font-size: 0.875rem;
149  color: var(--privy-color-foreground-2);
150`,d=(0,s.I4)(l.A)`
151  color: var(--privy-color-icon-success);
152  flex-shrink: 0;
153`,h=(0,s.I4)(r.A)`
154  color: var(--privy-color-icon-muted);
155  flex-shrink: 0;
156`;function u({children:e,iconOnly:t,value:n,hideCopyIcon:l,...r}){let[s,u]=(0,o.useState)(!1);return(0,i.jsxs)(a,{...r,onClick:()=>{navigator.clipboard.writeText(n||("string"==typeof e?e:"")).catch(console.error),u(!0),setTimeout(()=>u(!1),1500)},children:[e," ",s?(0,i.jsxs)(c,{children:[(0,i.jsx)(d,{})," ",!t&&"Copied"]}):!l&&(0,i.jsx)(h,{})]})}let g=({value:e,includeChildren:t,children:n,...l})=>{let[r,s]=(0,o.useState)(!1),u=()=>{navigator.clipboard.writeText(e).catch(console.error),s(!0),setTimeout(()=>s(!1),1500)};return(0,i.jsxs)(i.Fragment,{children:[t?(0,i.jsx)(a,{...l,onClick:u,children:n}):(0,i.jsx)(i.Fragment,{children:n}),(0,i.jsx)(a,{...l,onClick:u,children:r?(0,i.jsx)(c,{children:(0,i.jsx)(d,{})}):(0,i.jsx)(h,{})})]})}},5917:(e,t,n)=>{n.d(t,{A:()=>i});let i=(0,n(71847).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},32331:(e,t,n)=>{n.d(t,{b:()=>M,c:()=>q,i:()=>P,u:()=>K});var i=n(95155),l=n(12115);let r=l.forwardRef(function(e,t){let{title:n,titleId:i,...r}=e;return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},r),n?l.createElement("title",{id:i},n):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))});var o=n(47650);function s(e,t,n){let i,l=n.initialDeps??[],r=!0;function o(){var o,s,a;let c,d;n.key&&(null==(o=n.debug)?void 0:o.call(n))&&(c=Date.now());let h=e();if(!(h.length!==l.length||h.some((e,t)=>l[t]!==e)))return i;if(l=h,n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(d=Date.now()),i=t(...h),n.key&&(null==(a=n.debug)?void 0:a.call(n))){let e=Math.round((Date.now()-c)*100)/100,t=Math.round((Date.now()-d)*100)/100,i=t/16,l=(e,t)=>
156{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${l(t,5)} /${l(e,5)} ms`,`
157            font-size: .6rem;
158            font-weight: bold;
159            color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return(null==n?void 0:n.onChange)&&!(r&&n.skipInitialOnChange)&&n.onChange(i),r=!1,i}return o.updateDeps=e=>{l=e},o}function a(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let c=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},d=e=>e,h=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let e=t;e<=n;e++)i.push(e);return i},u=(e,t)=>{let n=e.scrollElement;if(!n)return;let i=e.targetWindow;if(!i)return;let l=e=>{let{width:n,height:i}=e;t({width:Math.round(n),height:Math.round(i)})};if(l(c(n)),!i.ResizeObserver)return()=>{};let r=new i.ResizeObserver(t=>{let i=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void l({width:t.inlineSize,height:t.blockSize})}l(c(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return r.observe(n,{box:"border-box"}),()=>{r.unobserve(n)}},g={passive:!0},p="undefined"==typeof window||"onscrollend"in window,m=(e,t)=>
159{let n=e.scrollElement;if(!n)return;let i=e.targetWindow;if(!i)return;let l=0,r=e.options.useScrollendEvent&&p?()=>void 0:((e,t,n)=>{let i;return function(...l){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,l),n)}})(i,()=>{t(l,!1)},e.options.isScrollingResetDelay),o=i=>()=>{let{horizontal:o,isRtl:s}=e.options;l=o?n.scrollLeft*(s&&-1||1):n.scrollTop,r(),t(l,i)},s=o(!0),a=o(!1);n.addEventListener("scroll",s,g);let c=e.options.useScrollendEvent&&p;return c&&n.addEventListener("scrollend",a,g),()=>{n.removeEventListener("scroll",s),c&&n.removeEventListener("scrollend",a)}},f=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},v=(e,{adjustments:t=0,behavior:n},i)=>{var l,r;null==(r=null==(l=i.scrollElement)?void 0:l.scrollTo)||r.call(l,{[i.options.horizontal?"left":"top"]:e+t,behavior:n})};class x{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e,t,n;return(null==(n=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:n.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:d,rangeExtractor:h,onChange:()=>{},measureElement:f,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=s(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}}
159,this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,i=new Map;for(let l=t-1;l>=0;l--){let t=e[l];if(n.has(t.lane))continue;let r=i.get(t.lane);if(null==r||t.end>r.end?i.set(t.lane,t):t.end<r.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=s(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,i,l,r)=>(void 0!==this.prevLanes&&this.prevLanes!==r&&(this.lanesChangedFlag=!0),this.prevLanes=r,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:i,enabled:l,lanes:r}),{key:!1}),this.getMeasurements=s(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:i,enabled:l,lanes:r},o)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let a=this.measurementsCache.slice(0,s),c=Array(r).fill(void 0);for(let e=0;e<s;e++){let t=a[e];t&&(c[t.lane]=e)}for(let l=s;l<e;l++){let e,r,s=i(l),d=this.laneAssignments.get(l);if(void 0!==d&&this.options.lanes>1){let i=c[e=d],l=void 0!==i?a[i]:void 0;r=l?l.end+this.options.gap:t+n}else{let i=1===this.options.lanes?a[l-1]:this.getFurthestMeasurement(a,l);r=i?i.end+this.options.gap:t+n,e=i?i.lane:l%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(l,e)}let h=o.get(s),u="number"==typeof h?h:this.options.estimateSize(l),g=r+u;a[l]={index:l,start:r,size:u,end:g,key:s,lane:e},c[e]=l}return this.measurementsCache=a,a},{key:!1,debug:()=>this.options.debug}),this.calculateRange=s(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,i)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n,lanes:i}){let l=e.length-1;if(e.length<=i)return{startIndex:0,endIndex:l};let r=w(0,l,t=>e[t].start,n),o=r;if(1===i)for(;o<l&&e[o].end<n+t;)o++;else if(i>1){let s=Array(i).fill(0);for(;o<l&&s.some(e=>e<n+t);){let t=e[o];s[t.lane]=t.end,o++}let a=Array(i).fill(n+t);for(;r>=0&&a.some(e=>e>=n);){let t=e[r];a[t.lane]=t.start,r--}r=Math.max(0,r-r%i),o=Math.min(l,o+(i-1-o%i))}return{startIndex:r,endIndex:o}}({measurements:e,outerSize:t,scrollOffset:n,lanes:i}):null,{key:!1,debug:()=>this.options.debug}
159),this.getVirtualIndexes=s(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,i,l)=>null===i||null===l?[]:e({startIndex:i,endIndex:l,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let n=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==n&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),i=Math.max(0,n-t),l=Math.min(this.options.count-1,n+t);return e>=i&&e<=l}return!0},this._measureElement=(e,t)=>{if(!e.isConnected)return void this.observer.unobserve(e);let n=this.indexFromElement(e),i=this.measurementsCache[n];if(!i)return;let l=i.key,r=this.elementsCache.get(l);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(l,e)),this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{var n;let i=this.measurementsCache[e];if(!i)return;let l=t-(this.itemSizeCache.get(i.key)??i.size);0!==l&&((null==(n=this.scrollState)?void 0:n.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(i,l,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,t)),this.notify(!1))},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});this._measureElement(e,void 0)},this.getVirtualItems=s(()=>
159[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let i=0,l=e.length;i<l;i++){let l=t[e[i]];n.push(l)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return a(t[w(0,t.length-1,e=>a(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let i=this.getSize(),l=this.getScrollOffset();return"auto"===t&&(t=e>=l+i?"end":"start"),"center"===t?e+=(n-i)/2:"end"===t&&(e-=i),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),i=this.getScrollOffset(),l=this.measurementsCache[e];if(!l)return;if("auto"===t)if(l.end>=i+n-this.options.scrollPaddingEnd)t="end";else{if(!(l.start<=i+this.options.scrollPaddingStart))return[i,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let r="end"===t?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,t,l.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:n="auto"}={})=>{let i=this.getOffsetForAlignment(e,t),l=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:l,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:n="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let i=this.getOffsetForIndex(e,t);if(!i)return;let[l,r]=i,o=this.now();this.scrollState={index:e,align:r,behavior:n,startedAt:o,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let n=this.getScrollOffset()+e,i=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:i,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var e;let t,n=this.getMeasurements();if(0===n.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=n[n.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),i=n.length-1;for(;i>=0&&e.some(e=>null===e);){let t=n[i];null===e[t.lane]&&(e[t.lane]=t.end),i--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&1.01>Math.abs(t-this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.scrollState=null;return}}else this.scrollState.stableFrames=0,n&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior="auto",this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}let w=(e,t,n,i)=>{for(;e<=t;){let l=(e+t)/2|0,r=n(l);if(r<i)e=l+1;else{if(!(r>i))return l;t=l-1}}return e>0?e-1:0},y="undefined"!=typeof document?l.useLayoutEffect:l.useEffect;var b=n(92253),C=n(20647),S=n(24735),j=n(4471),k=n(80469),z=n(75276),W=n(834),I=n(36523),E=n(38680),T=n(42935),A=n(78890),$=n(16189),L=n(58862),_=n(65539);let O={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:T.M,md:T.M}}};class M{static normalize(e){return e.replace(/[-_]wallet$/,"").replace(/[-_]extension$/,"").toLowerCase()}isEth(e){return e.chains.some(e=>e.includes("eip155:"))}isSol(e){return e.chains.some(e=>e.includes("solana:"))}inAllowList(e,t){if(!this.normalizedAllowList||0===this.normalizedAllowList.length||"listing"===t&&this.includeWalletConnect)return!0;let n=M.normalize(e);return this.normalizedAllowList.some(e=>n===M.normalize(e))}inDenyList(e,t){return"listing"===t&&"rabby"===e||"agw"===M.normalize(e)}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}getAllowListKey(e,t,n,i){let l=M.normalize(e);for(let e of this.normalizedAllowList||[])if(l===M.normalize(e))return e;
159if("connector"===t){if(("injected"===n||"solana_adapter"===n)&&"ethereum"===i&&this.detectedEth)return"detected_ethereum_wallets";if(("injected"===n||"solana_adapter"===n)&&"solana"===i&&this.detectedSol)return"detected_solana_wallets"}if("listing"===t&&this.includeWalletConnect)return"wallet_connect"}connectorOk(e){return!!("null"!==e.connectorType&&"walletconnect_solana"!==e.walletBranding.id&&this.chainMatches(e.chainType)&&(this.inAllowList(e.walletClientType,"connector")||("injected"===e.connectorType||"solana_adapter"===e.connectorType)&&("ethereum"===e.chainType&&this.detectedEth||"solana"===e.chainType&&this.detectedSol)))}listingOk(e){if(e.slug.includes("coinbase"))return!1;if("ethereum-only"===this.chainFilter){if(!this.isEth(e))return!1}else if("solana-only"===this.chainFilter&&!this.isSol(e))return!1;return!(!this.inAllowList(e.slug,"listing")||this.inDenyList(e.slug,"listing"))}getWallets(e,t){let n=new Map,i=e=>{let t=n.get(e.id);if(t){t.chainType!==e.chainType&&(t.chainType="multi");let n=new Set(t.chains);e.chains.forEach(e=>n.add(e)),t.chains=Array.from(n),!t.icon&&e.icon&&(t.icon=e.icon),!t.url&&e.url&&(t.url=e.url),!t.listing&&e.listing&&(t.listing=e.listing),!t.allowListKey&&e.allowListKey&&(t.allowListKey=e.allowListKey)}else n.set(e.id,e)};e.filter(e=>this.connectorOk(e)).forEach(e=>{let t=M.normalize(e.walletClientType);i({id:t,label:e.walletBranding?.name??t,source:"connector",connector:e,chainType:e.chainType,icon:e.walletBranding?.icon,url:void 0,chains:["ethereum"===e.chainType?"eip155":"solana"],allowListKey:this.getAllowListKey(e.walletClientType,"connector",e.connectorType,e.chainType)})});let l=e.find(e=>"wallet_connect_v2"===e.connectorType),r=e.find(e=>"walletconnect_solana"===e.walletBranding.id);t.filter(e=>this.listingOk(e)).forEach(t=>{let n=[...t.chains].filter(e=>e.includes("eip155:")||e.includes("solana:"));if(e.some(e=>M.normalize(e.walletClientType)===M.normalize(t.slug)&&"ethereum"===e.chainType&&"null"!==e.connectorType)||l||t.mobile.native||t.mobile.universal||T.m[t.slug]?.chainTypes.includes("ethereum")||(n=n.filter(e=>!e.includes("eip155:"))),e.some(e=>M.normalize(e.walletClientType)===M.normalize(t.slug)&&"solana"===e.chainType&&"null"!==e.connectorType)||r||t.mobile.native||t.mobile.universal||T.m[t.slug]?.chainTypes.includes("solana")||(n=n.filter(e=>!e.includes("solana:"))),!n.length)return;let o=M.normalize(t.slug),s=O[t.slug],a=s?.image_url?.sm||t.image_url?.sm;n.some(e=>e.includes("eip155:"))&&i({id:o,label:t.name||o,source:"listing",listing:t,chainType:"ethereum",icon:a,url:t.homepage,chains:n,allowListKey:this.getAllowListKey(t.slug,"listing")}),n.some(e=>e.includes("solana:"))&&i({id:o,label:t.name||o,source:"listing",listing:t,chainType:"solana",icon:a,url:t.homepage,chains:n,allowListKey:this.getAllowListKey(t.slug,"listing")})}),this.includeWalletConnectQr&&l&&i({id:"wallet_connect_qr",label:"WalletConnect",source:"connector",connector:l,chainType:"ethereum",icon:A.W,url:void 0,chains:["eip155"],allowListKey:"wallet_connect_qr"}),this.includeWalletConnectQrSolana&&r&&i({id:"wallet_connect_qr_solana",label:"WalletConnect",source:"connector",connector:r,chainType:"solana",icon:A.W,url:void 0,chains:["solana"],allowListKey:"wallet_connect_qr_solana"});let o=Array.from(n.values());o.forEach(e=>{let t=O[e.listing?.slug||e.id];t?.image_url?.sm&&(e.icon=t.image_url.sm)});let s=new Map;return this.normalizedAllowList?.forEach((e,t)=>{s.set(M.normalize(e),t)}),{wallets:o.slice().sort((e,t)=>{if(e.allowListKey&&t.allowListKey){let n=this.normalizedAllowList?.findIndex(t=>M.normalize(t)===M.normalize(e.allowListKey))??-1,i=this.normalizedAllowList?.findIndex(e=>M.normalize(e)===M.normalize(t.allowListKey))??-1;if(n!==i&&n>=0&&i>=0)return n-i}if(e.allowListKey&&!t.allowListKey)return -1;if(!e.allowListKey&&t.allowListKey)return 1;let n=M.normalize(e.id),i=M.normalize(t.id);"binance-defi"===n?n="binance":"universalprofiles"===n?n="universal_profile":"cryptocom-defi"===n?n="cryptocom":"bitkeep"===n&&(n="bitget_wallet"),"binance-defi"===i?i="binance":"universalprofiles"===i?i="universal_profile":"cryptocom-defi"===i?i="cryptocom":"bitkeep"===i&&(i="bitget_wallet");let l=s.has(n),r=s.has(i);return l&&r?s.get(n)-s.get(i):l?-1:r?1:"connector"===e.source&&"listing"===t.source?-1:"listing"===e.source&&"connector"===t.source?1:e.label.toLowerCase().localeCompare(t.label.toLowerCase())}),walletCount:o.length}}constructor(e,t){this.chainFilter=e,t&&t.length>0&&(this.normalizedAllowList=t.map(String),this.normalizedAllowList.includes("binance")&&this.normalizedAllowList.push("binance-defi-wallet"),this.normalizedAllowList.includes("bitget_wallet")&&this.normalizedAllowList.push("bitkeep")),this.detectedEth=this.normalizedAllowList?.includes("detected_ethereum_wallets")??!1,this.detectedSol=this.normalizedAllowList?.includes("detected_solana_wallets")??!1,this.includeWalletConnect=this.normalizedAllowList?.includes("wallet_connect")??!1,this.includeWalletConnectQr=this.normalizedAllowList?.includes("wallet_connect_qr")??!1,this.includeWalletConnectQrSolana=this.normalizedAllowList?.includes("wallet_connect_qr_solana")??
159!1}}var F=e=>(0,i.jsxs)("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,i.jsx)("path",{d:"m0 0h32v32h-32z",fill:"#5469d4"}),(0,i.jsx)("path",{d:"m15.997 5.333-.143.486v14.106l.143.143 6.548-3.87z",fill:"#c2ccf4"}),(0,i.jsx)("path",{d:"m15.996 5.333-6.548 10.865 6.548 3.87z",fill:"#fff"}),(0,i.jsx)("path",{d:"m15.997 21.306-.08.098v5.025l.08.236 6.552-9.227z",fill:"#c2ccf4"}),(0,i.jsx)("path",{d:"m15.996 26.665v-5.36l-6.548-3.867z",fill:"#fff"}),(0,i.jsx)("path",{d:"m15.995 20.07 6.548-3.87-6.548-2.976v6.847z",fill:"#8698e8"}),(0,i.jsx)("path",{d:"m9.448 16.2 6.548 3.87v-6.846z",fill:"#c2ccf4"})]}),N=e=>(0,i.jsxs)("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,i.jsxs)("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"7.233",x2:"24.766",y1:"24.766",y2:"7.234",children:[(0,i.jsx)("stop",{offset:"0",stopColor:"#9945ff"}),(0,i.jsx)("stop",{offset:".2",stopColor:"#7962e7"}),(0,i.jsx)("stop",{offset:"1",stopColor:"#00d18c"})]}),(0,i.jsx)("path",{d:"m0 0h32v32h-32z",fill:"#10111a"}),(0,i.jsx)("path",{clipRule:"evenodd",d:"m9.873 20.41a.645.645 0 0 1 .476-.21l14.662.012a.323.323 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54zm15.376-2.862a.322.322 0 0 1 -.238.54l-14.662.012a.642.642 0 0 1 -.476-.21l-3.122-3.44a.323.323 0 0 1 .238-.54l14.662-.012a.644.644 0 0 1 .475.21zm-15.376-9.738a.644.644 0 0 1 .476-.21l14.662.012a.322.322 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54z",fill:"url(#a)",fillRule:"evenodd"})]});C.I4.div`
160  display: flex;
161  justify-content: space-between;
162  align-items: center;
163`,C.I4.button`
164  padding: 0.25rem;
165  height: 30px;
166  width: 30px;
167
168  display: flex;
169  align-items: center;
170  justify-content: center;
171  border-radius: var(--privy-border-radius-full);
172  background: var(--privy-color-background-2);
173`;let R=C.I4.div`
174  position: relative;
175  display: inline-flex;
176  align-items: center;
177
178  &::after {
179    content: ' ';
180    border-radius: var(--privy-border-radius-full);
181    height: 6px;
182    width: 6px;
183    background-color: var(--privy-color-icon-success);
184    position: absolute;
185    right: -3px;
186    top: -3px;
187  }
188`,B=C.I4.img`
189  width: 32px;
190  height: 32px;
191  border-radius: 0.25rem;
192  object-fit: contain;
193`,D=C.I4.span`
194  display: flex;
195  gap: 0.25rem;
196  align-items: center;
197  padding: 0.25rem 0.5rem;
198  font-size: 0.75rem;
199  font-weight: 500;
200  line-height: 1.125rem; /* 150% */
201  border-radius: var(--privy-border-radius-sm);
202  background-color: var(--privy-color-background-2);
203
204  svg {
205    width: 100%;
206    max-width: 1rem;
207    max-height: 1rem;
208    stroke-width: 2;
209  }
210`;function K({enabled:e=!0,walletList:t,walletChainType:n}){let i=(0,I.u)(),{connectors:r}=(0,$.u)(),{listings:o,loading:s}=(0,T.c)(e),a=n??i.appearance.walletChainType,c=t??i.appearance?.walletList,d=(0,l.useMemo)(()=>new M(a,c),[a,c]),{wallets:h,walletCount:u}=(0,l.useMemo)(()=>d.getWallets(r,o),[d,r,o]),[g,p]=(0,l.useState)(""),m=(0,l.useMemo)(()=>g?h.filter(e=>e.label.toLowerCase().includes(g.toLowerCase())):h,[g,h]),[f,v]=(0,l.useState)();return{selected:f,setSelected:v,search:g,setSearch:p,loadingListings:s,wallets:m,walletCount:u}}C.I4.div`
211  display: flex;
212  flex-direction: column;
213  gap: 0.5rem;
214  max-height: 24rem;
215  overflow-y: scroll;
216
217  &::-webkit-scrollbar {
218    display: none;
219  }
220
221  scrollbar-gutter: stable both-edges;
222  scrollbar-width: none;
223  -ms-overflow-style: none;
224
225  ${e=>"light"===e.$colorScheme?"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.$colorScheme?"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}
226
227  background-repeat: no-repeat;
228  background-size:
229    100% 32px,
230    100% 16px;
231  background-attachment: local, scroll;
232`;let U=e=>!e||"string"!=typeof e&&(e instanceof T.k||e instanceof T.S),q=({index:e,style:t,data:n,recent:l})=>{let r=n.wallets[e],{walletChainType:o,handleWalletClick:s}=n,{t:a}=(0,E.u)(),c={...t,boxSizing:"border-box"};return r?(0,i.jsxs)(Q,{style:c,onClick:()=>s(r),children:[r.icon&&(r.connector&&!U(r.connector)?(0,i.jsx)(R,{children:"string"==typeof r.icon?(0,i.jsx)(B,{src:r.icon}):(0,i.jsx)(r.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof r.icon?(0,i.jsx)(B,{src:r.icon}):(0,i.jsx)(r.icon,{style:{width:"32px",height:"32px"}})),(0,i.jsx)(Z,{children:r.label}),l?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(D,{children:a("connectWallet.lastUsed")}),(0,i.jsx)(Y,{children:(0,i.jsxs)(i.Fragment,{children:["ethereum-only"===o&&(0,i.jsx)(F,{}),"solana-only"===o&&(0,i.jsx)(N,{})]})})]}):(0,i.jsx)(Y,{children:"ethereum-only"!==o&&"solana-only"!==o&&(0,i.jsxs)(i.Fragment,{children:[r.chains?.some(e=>e.startsWith("eip155"))&&(0,i.jsx)(F,{}),r.chains?.some(e=>e.startsWith("solana"))&&(0,i.jsx)(N,{})]})})]}):null};var P=({className:e,customDescription:t,connectOnly:n,preSelectedWalletId:s,hideHeader:a,...c})=>{let d=(0,I.u)(),{t:h}=(0,E.u)(),{connectors:g}=(0,$.u)(),p=c.walletChainType||d.appearance.walletChainType,f=c.walletList||d.appearance?.walletList,{onBack:w,onClose:C,app:j}=c,{selected:R,setSelected:D,qrUrl:P,setQrUrl:ee,connecting:et,uiState:en,errorCode:ei,wallets:el,walletCount:er,handleConnect:eo,handleBack:es,showSearchBar:ea,isInitialConnectView:ec,title:ed,search:eh,setSearch:eu}=function({onConnect:e,onBack:t,onClose:n,onConnectError:i,walletList:r,walletChainType:o,app:s}){let a=(0,I.u)(),{connectors:c}=(0,$.u)(),{t:d}=(0,E.u)(),{wallets:h,walletCount:u,search:g,setSearch:p,selected:m,setSelected:f}=K({enabled:(0,T.s)(r??[]),walletList:r,walletChainType:o}),[v,x]=(0,l.useState)(),[w,y]=(0,l.useState)(),[C,S]=(0,l.useState)(),[j,k]=(0,l.useState)(),z=!m&&!C&&!j,W=z&&(u>6||g.length>0),L=c.find(e=>"wallet_connect_v2"===e.connectorType),_=(0,l.useCallback)(async(t,n)=>{if(!t)return;let l=n?.name??"Wallet";if(j?.connector!==t||"loading"!==v){if(x("loading"),"string"==typeof t)return A.c.debug("Connecting wallet via deeplink",{wallet:l,url:t.length>80?`${t.slice(0,80)}...`:t}),k({connector:t,name:l,icon:n?.icon,id:n?.id,url:n?.url}),void window.open(t,"_blank");A.c.debug("Connecting wallet via connector",{wallet:l,connectorType:t.connectorType}),k({connector:t,name:n?.name??t.walletBranding.name??"Wallet",icon:n?.icon??t.walletBranding.icon,id:n?.id,url:n?.url});try{let n=await t.connect({showPrompt:!0});if(!n)return A.c.warn("Wallet connection returned null",{wallet:l,connectorType:t.connectorType}),x("error"),y(void 0),void i?.(new $.P("Unable to connect wallet"));A.c.debug("Wallet connection successful",{wallet:l,connectorType:t.connectorType}),x("success"),y(void 0),(0,T.w)({address:n.address,client:n.walletClientType,appId:a.id}),setTimeout(()=>{e({connector:t,wallet:n})},I.q)}catch(n){if(n?.message?.includes("already pending for origin")||n?.message?.includes("wallet_requestPermissions"))return void A.c.debug("Connection request already pending, maintaining loading state",{wallet:l});let e=n instanceof Error?n.message:String(n?.message||"Unknown error");A.c.error("Wallet connection failed",n,{wallet:l,connectorType:t.connectorType,errorCode:n?.privyErrorCode}),x("error"),y(n?.privyErrorCode),i?.(n instanceof Error?n:new $.P(e||"Unable to connect wallet"))}}else A.c.debug("Duplicate connection attempt prevented",{wallet:l})},[a.id,e,j,v]),O=(0,l.useCallback)(()=>C?(x(void 0),y(void 0),k(void 0),void S(void 0)):j?(x(void 0),y(void 0),void k(void 0)):m?(x(void 0),y(void 0),k(void 0),void f(void 0)):"error"===v||"loading"===v?(x(void 0),y(void 0),void k(void 0)):void t?.(),[C,j,m,v,t]),M=(0,l.useMemo)(()=>j?.connector===L&&C&&b.Fr&&j?.name?d("connectWallet.goToWallet",{walletName:j.name}):j?.connector===L&&C&&j?.name?d("connectWallet.scanToConnect",{walletName:j.name}):C&&j?.name?d(b.Fr?"connectWallet.goToWallet":"connectWallet.scanToConnect",{walletName:j.name}):"string"==typeof j?.connector?d("connectWallet.openOrInstall",{walletName:j.name}):m&&!j?d("connectWallet.selectNetwork"):j?null:d("connectWallet.selectYourWallet"),[j,C,m,L,d]);return{selected:m,setSelected:f,qrUrl:C,setQrUrl:S,connecting:j,uiState:v,errorCode:w,search:g,setSearch:p,wallets:h,walletCount:u,wc:L,isInitialConnect
232View:z,showSearchBar:W,title:M,handleConnect:_,handleBack:O,onClose:n,onConnect:e,app:s}}({...c,walletList:f,walletChainType:p}),eg=g.find(e=>"wallet_connect_v2"===e.connectorType),ep=g.find(e=>"walletconnect_solana"===e.walletBranding.id),em=(0,l.useRef)(null),ef=function({useFlushSync:e=!0,...t}){let n=l.useReducer(()=>({}),{})[1],i={...t,onChange:(i,l)=>{var r;e&&l?(0,o.flushSync)(n):n(),null==(r=t.onChange)||r.call(t,i,l)}},[r]=l.useState(()=>new x(i));return r.setOptions(i),y(()=>r._didMount(),[]),y(()=>r._willUpdate()),r}({observeElementRect:u,observeElementOffset:m,scrollToFn:v,...{count:el.length,getScrollElement:()=>em.current,estimateSize:()=>56,overscan:6,gap:5}}),ev=(0,l.useCallback)(async e=>{let t="solana-only"!==p&&e.chains?.some(e=>e.startsWith("eip155")),i="ethereum-only"!==p&&e.chains?.some(e=>e.startsWith("solana")),l=()=>{let t=e.id;return T.m[t]||T.m[`${t}_wallet`]},r=t=>{let n=M.normalize(e.id);return g.find(e=>M.normalize(e.walletClientType)===n&&e.chainType===t&&!("ethereum"===e.chainType&&e instanceof T.k||"solana"===e.chainType&&e instanceof T.S))},o=async()=>{if(!eg||!e.listing)return!1;let t=O[e.listing.slug]?{...e.listing,...O[e.listing.slug]}:e.listing;return eg.setWalletEntry(t,ee),await eg.resetConnection(e.id),await eo(eg,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0},s=async()=>!!ep&&!!e.listing&&(await ep.disconnect(),ep.wallet.setWalletEntry(e.listing,ee),await new Promise(e=>setTimeout(e,100)),await eo(ep,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0),a=async t=>{let i=(e=>{let t=l();if(t)return t.getMobileRedirect({isSolana:e,connectOnly:!!n,useUniversalLink:!1})})(t);return!!i&&(await eo(i,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0)};if(t&&i)D(e);else{if(t&&!i){let t=r("ethereum");if(t&&!U(t))return A.c.debug("Attempting injected EVM connection",{wallet:e.id,connectorType:t.connectorType}),void await eo(t,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(b.Fr&&l()){if(await a(!1)||await o())return}else if(await o()||await a(!1))return}if(i&&!t){let t=r("solana");if(t&&!U(t))return A.c.debug("Attempting injected Solana connection",{wallet:e.id,connectorType:t.connectorType}),void await eo(t,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(b.Fr){if(await a(!0)||await s())return}else if(await s()||await a(!0))return}if(!U(e.connector)){if(A.c.debug("Using fallback direct connector",{wallet:e.id,connectorType:e.connector?.connectorType}),eg&&"wallet_connect_v2"===e.connector?.connectorType)if(await eg.resetConnection(e.id),"wallet_connect_qr"!==e.id&&e.listing){let t=O[e.listing.slug]?{...e.listing,...O[e.listing.slug]}:e.listing;eg.setWalletEntry(t,ee)}else eg.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},ee);return ep&&"walletconnect_solana"===e.connector?.walletBranding.id&&(await ep.disconnect(),"wallet_connect_qr_solana"!==e.id&&e.listing?ep.wallet.setWalletEntry(e.listing,ee):ep.wallet.setWalletEntry({id:"wallet_connect_solana_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect-solana",homepage:"",chains:["solana"],mobile:{native:"",universal:void 0}},ee),await new Promise(e=>setTimeout(e,100))),void await eo(e.connector,{name:e.label,icon:e.icon,id:e.id,url:e.url})}e.url?await eo(e.url,{name:e.label,icon:e.icon,id:e.id,url:e.url}):A.c.warn("No available connection method for wallet",{wallet:e.id})}},[eg,ep,eo,D,ee,p,n,g]);return(0,l.useEffect)(()=>{if(!s)return;let e=el.find(({id:e})=>e===s);e&&ev(e).catch(console.error)},[s]),(0,i.jsxs)(_.S,{className:e,children:[(0,i.jsx)(_.S.Header,{icon:a&&ec?void 0:et&&!P||P&&b.Fr&&et?.icon?et.icon:et?void 0:L.W,iconVariant:et&&!P||P&&b.Fr?"loading":void 0,iconLoadingStatus:et&&!P||P&&b.Fr?{success:"success"===en,fail:"error"===en}:void 0,title:a&&ec?void 0:et&&!P?h("connectWallet.waitingForWallet",{walletName:et.name}):P&&b.Fr?h("connectWallet.waitingForWallet",{walletName:et?.name??"connection"}):ed,subtitle:a&&ec?void 0:et&&!P&&"string"==typeof et.connector?h("connectWallet.installAndConnect",{walletName:et.name}):et&&!P&&"string"!=typeof et.connector?"error"===en?ei===$.b.NO_SOLANA_ACCOUNTS?`The connected wallet has no Solana accounts. Please add a Solana account in ${et.name} and try again.`:h("connectWallet.tryConnectingAgain"):h("connectionStatus.connectOneWallet"):ec?t??(j?h("c
232onnectWallet.connectToAccount",{appName:j.name}):null):null,showBack:!!w||!ec,showClose:!0,onBack:w||es,onClose:C}),(0,i.jsxs)(_.S.Body,{ref:em,$colorScheme:d.appearance.palette.colorScheme,style:{marginBottom:P?"0.5rem":void 0},children:[ea&&(0,i.jsx)(V,{children:(0,i.jsxs)(W.E,{style:{background:"transparent"},children:[(0,i.jsx)(T.C,{children:(0,i.jsx)(r,{})}),(0,i.jsx)("input",{className:"login-method-button",type:"text",placeholder:h("connectWallet.searchPlaceholder",{count:String(er)}),onChange:e=>eu(e.target.value),value:eh})]})}),P&&b.Fr&&"loading"===en&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:[(0,i.jsx)(S.a,{variant:"primary",onClick:()=>window.open(P.universal??P.native,"_blank"),style:{width:"100%"},children:h("connectWallet.openInApp")}),(0,i.jsx)(J,{value:P.universal??P.native,iconOnly:!0,children:"Copy link"})]}),P&&!b.Fr&&"loading"===en&&(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:(0,i.jsx)(J,{value:P.universal??P.native,iconOnly:!0,children:h("connectWallet.copyLink")})}),P&&!b.Fr&&(0,i.jsx)(z.Q,{size:280,url:P.universal??P.native,squareLogoElement:et?.icon?"string"==typeof et.icon?e=>(0,i.jsx)("svg",{...e,children:(0,i.jsx)("image",{href:et.icon,height:e.height,width:e.width})}):et.icon:A.A}),P&&!b.Fr&&et?.url&&("binance"===et.id||"binanceus"===et.id||"binance-defi"===et.id)&&(0,i.jsxs)(X,{children:[(0,i.jsxs)("span",{children:["Don't have ",et.name,"? "]}),(0,i.jsx)(k.L,{href:et.url,target:"_blank",size:"sm",children:"Download here"})]}),(0,i.jsxs)(H,{children:[et&&!P&&"string"==typeof et.connector&&(0,i.jsxs)(Q,{onClick:()=>window.open(et.connector,"_blank"),children:[et.icon&&("string"==typeof et.icon?(0,i.jsx)(B,{src:et.icon}):(0,i.jsx)(et.icon,{})),(0,i.jsx)(Z,{children:et.name})]}),R?.chains.some(e=>e.startsWith("eip155"))&&!et&&(0,i.jsxs)(Q,{onClick:()=>ev({...R,chains:R.chains.filter(e=>e.startsWith("eip155"))}),children:[R.icon&&("string"==typeof R.icon?(0,i.jsx)(B,{src:R.icon}):(0,i.jsx)(R.icon,{})),(0,i.jsx)(Z,{children:R.label}),(0,i.jsx)(Y,{children:(0,i.jsx)(F,{})})]}),R?.chains.some(e=>e.startsWith("solana"))&&!et&&(0,i.jsxs)(Q,{onClick:()=>ev({...R,chains:R.chains.filter(e=>e.startsWith("solana"))}),children:[R.icon&&("string"==typeof R.icon?(0,i.jsx)(B,{src:R.icon}):(0,i.jsx)(R.icon,{})),(0,i.jsx)(Z,{children:R.label}),(0,i.jsx)(Y,{children:(0,i.jsx)(N,{})})]}),ec&&(0,i.jsxs)(i.Fragment,{children:[!(er>0)&&(0,i.jsx)(G,{children:h("connectWallet.noWalletsFound")}),er>0&&!P&&(0,i.jsx)("div",{style:{maxHeight:56*Math.min(el.length,5)+5,width:"100%"},children:(0,i.jsx)("div",{style:{height:`${ef.getTotalSize()}px`,width:"100%",position:"relative"},children:ef.getVirtualItems().map(e=>(0,i.jsx)(q,{index:e.index,style:{position:"absolute",top:0,left:0,height:`${e.size}px`,transform:`translateY(${e.start}px)`},data:{wallets:el,walletChainType:p,handleWalletClick:ev}},e.key))})})]})]})]}),(0,i.jsxs)(_.S.Footer,{children:[et&&!P&&"string"!=typeof et.connector&&"error"===en&&(0,i.jsx)(_.S.Actions,{children:(0,i.jsx)(S.a,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>eo(et.connector,{name:et.name,icon:et.icon,id:et.id,url:et.url}),children:h("connectWallet.retry")})}),!!(j&&j.legal.privacyPolicyUrl&&j.legal.termsAndConditionsUrl)&&(0,i.jsx)(S.T,{app:j,alwaysShowImplicitConsent:!0}),(0,i.jsx)(_.S.Watermark,{})]})]})};let V=C.I4.div`
233  position: sticky;
234  // Offset by negative margin to account for focus outline
235  margin-top: -3px;
236  padding-top: 3px;
237  top: -3px;
238  z-index: 1;
239  background: var(--privy-color-background);
240  padding-bottom: calc(var(--screen-space) / 2);
241`,H=C.I4.div`
242  display: flex;
243  flex-direction: column;
244  gap: ${5}px;
245`,Q=C.I4.button`
246  && {
247    gap: 0.5rem;
248    align-items: center;
249    display: flex;
250    position: relative;
251    text-align: left;
252    font-weight: 500;
253    transition: background 200ms ease-in;
254    width: calc(100% - 4px);
255    border-radius: var(--privy-border-radius-md);
256    padding: 0.75em;
257    border: 1px solid var(--privy-color-foreground-4);
258    justify-content: space-between;
259  }
260
261  &:hover {
262    background: var(--privy-color-background-2);
263  }
264`,Y=C.I4.span`
265  display: flex;
266  align-items: center;
267  justify-content: end;
268  position: relative;
269
270  & > svg {
271    border-radius: var(--privy-border-radius-full);
272    stroke-width: 2.5;
273    width: 100%;
274    max-height: 1rem;
275    max-width: 1rem;
276    flex-shrink: 0;
277  }
278
279  & > svg:not(:last-child) {
280    border-radius: var(--privy-border-radius-full);
281    margin-right: -0.375rem;
282  }
283`,G=C.I4.div`
284  height: 60px;
285  display: flex;
286  align-items: center;
287  justify-content: center;
288  text-align: center;
289`,Z=C.I4.span`
290  text-overflow: ellipsis;
291  white-space: nowrap;
292  color: var(--privy-color-foreground);
293  font-weight: 400;
294  flex: 1;
295`,J=(0,C.I4)(j.C)`
296  && {
297    margin: 0.5rem auto 0 auto;
298  }
299`,X=C.I4.div`
300  text-align: center;
301  margin-top: 1rem;
302  font-size: 0.875rem;
303  font-weight: 400;
304  color: var(--privy-color-foreground-3);
305`},38680:(e,t,n)=>{n.d(t,{u:()=>r});var i=n(36523);let l={"connectionStatus.successfullyConnected":"Successfully connected with {walletName}","connectionStatus.errorTitle":"{errorMessage}","connectionStatus.connecting":"Connecting","connectionStatus.connectOneWallet":"For the best experience, connect only one wallet at a time.","connectionStatus.checkOtherWindows":"Don't see your wallet? Check your other browser windows.","connectionStatus.stillHere":"Still here?","connectionStatus.tryConnectingAgain":"Try connecting again","connectionStatus.or":"or","connectionStatus.useDifferentLink":"use this different link","connectWallet.connectYourWallet":"Connect a wallet","connectWallet.waitingForWallet":"Waiting for {walletName}","connectWallet.connectToAccount":"Connect a wallet to your {appName} account","connectWallet.installAndConnect":"To connect to {walletName}, install and open the app. Then confirm the connection when prompted.","connectWallet.tryConnectingAgain":"Please try connecting again.","connectWallet.openInApp":"Open in a
305pp","connectWallet.copyLink":"Copy link","connectWallet.retry":"Retry","connectWallet.searchPlaceholder":"Search through {count} wallets","connectWallet.noWalletsFound":"No wallets found. Try another search.","connectWallet.lastUsed":"Last used","connectWallet.selectYourWallet":"Select your wallet","connectWallet.selectNetwork":"Select network","connectWallet.goToWallet":"Go to {walletName} to continue","connectWallet.scanToConnect":"Scan code to connect to {walletName}","connectWallet.openOrInstall":"Open or install {walletName}"};function r(){let e=(0,i.u)();return{t:(t,n)=>{var i;let r;return i=e.intl.textLocalization,r=i?.[t]??l[t],n&&0!==Object.keys(n).length?r.replace(/\{(\w+)\}/g,(e,t)=>n[t]??e):r}}}},55211:(e,t,n)=>{n.d(t,{E:()=>l});var i=n(20647);let l=i.I4.span`
306  text-align: left;
307  font-size: 0.75rem;
308  font-weight: 500;
309  line-height: 1.125rem; /* 150% */
310
311  color: var(--privy-color-error);
312`},58862:(e,t,n)=>{n.d(t,{W:()=>l});var i=n(95155);let l=({...e})=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),(0,i.jsx)("path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2"}),(0,i.jsx)("path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21"})]})},65539:(e,t,n)=>{n.d(t,{S:()=>C});var i=n(95155),l=n(12115),r=n(20647),o=n(42935),s=n(24735),a=n(95204);let c=r.I4.div`
313  /* spacing tokens */
314  --screen-space: 16px; /* base 1x = 16 */
315  --screen-space-lg: calc(var(--screen-space) * 1.5); /* 24px */
316
317  position: relative;
318  overflow: hidden;
319  margin: 0 calc(-1 * var(--screen-space)); /* extends over modal padding */
320  height: 100%;
321  border-radius: var(--privy-border-radius-lg);
322`,d=r.I4.div`
323  display: flex;
324  flex-direction: column;
325  gap: calc(var(--screen-space) * 1.5);
326  width: 100%;
327  background: var(--privy-color-background);
328  padding: 0 var(--screen-space-lg) var(--screen-space);
329  height: 100%;
330  border-radius: var(--privy-border-radius-lg);
331`,h=r.I4.div`
332  position: relative;
333  display: flex;
334  flex-direction: column;
335`,u=(0,r.I4)(s.M)`
336  margin: 0 -8px;
337`,g=r.I4.div`
338  flex: 1 1 auto;
339  display: flex;
340  flex-direction: column;
341
342  /* Enable scrolling */
343  overflow-y: auto;
344
345  /* Hide scrollbar but keep functionality when scrollable */
346  /* Add padding for focus outline space, offset with negative margin */
347  padding: 3px;
348  margin: -3px;
349
350  &::-webkit-scrollbar {
351    display: none;
352  }
353  scrollbar-gutter: stable both-edges;
354  scrollbar-width: none;
355  -ms-overflow-style: none;
356
357  /* Gradient effect for scroll indication */
358  ${({$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}
359
360  background-repeat: no-repeat;
361  background-size:
362    100% 32px,
363    100% 16px;
364  background-attachment: local, scroll;
365`,p=r.I4.div`
366  display: flex;
367  flex-direction: column;
368  gap: var(--screen-space-lg);
369  margin-top: 1.5rem;
370`,m=r.I4.div`
371  text-align: center;
372  display: flex;
373  flex-direction: column;
374  align-items: center;
375  gap: var(--screen-space);
376`,f=r.I4.div`
377  display: flex;
378  flex-direction: column;
379  gap: 4px;
380`,v=r.I4.h3`
381  && {
382    font-size: 20px;
383    line-height: 32px;
384    font-weight: 500;
385    color: var(--privy-color-foreground);
386    margin: 0;
387  }
388`,x=r.I4.p`
389  && {
390    margin: 0;
391    font-size: 16px;
392    font-weight: 300;
393    line-height: 24px;
394    color: var(--privy-color-foreground);
395  }
396`,w=r.I4.div`
397  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)"}}};
398
399  border-radius: 50%;
400  width: 64px;
401  height: 64px;
402  display: flex;
403  align-items: center;
404  justify-content: center;
405`,y=r.I4.div`
406  display: flex;
407  align-items: center;
408  justify-content: center;
409
410  img,
411  svg {
412    max-height: 90px;
413    max-width: 180px;
414  }
415`,b=r.I4.div`
416  display: flex;
417  flex-direction: column;
418  justify-content: center;
419  align-items: center;
420  width: 100%;
421  height: 82px;
422
423  > div {
424    position: relative;
425  }
426
427  > div > :first-child {
428    position: relative;
429  }
430
431  > div > :last-child {
432    position: absolute;
433    left: 50%;
434    top: 50%;
435    transform: translate(-50%, -50%);
436  }
437`,C=({children:e,...t})=>(0,i.jsx)(c,{children:(0,i.jsx)(d,{...t,children:e})}),S=r.I4.div`
438  position: absolute;
439  top: 0;
440  left: calc(-1 * var(--screen-space-lg));
441  width: calc(100% + calc(var(--screen-space-lg) * 2));
442  height: 4px;
443  background: var(--privy-color-background-2);
444  border-top-left-radius: inherit;
445  border-top-right-radius: inherit;
446  overflow: hidden;
447`,j=(0,r.I4)(s.B)`
448  padding: 0;
449  && a {
450    padding: 0;
451    color: var(--privy-color-foreground-3);
452  }
453`,k=r.I4.div`
454  height: 100%;
455  width: ${({pct:e})=>e}%;
456  background: var(--privy-color-foreground-3);
457  border-radius: 2px;
458  transition: width 300ms ease-in-out;
459`,z=({step:e})=>e?(0,i.jsx)(S,{children:(0,i.jsx)(k,{pct:Math.min(100,e.current/e.total*100)})}):null;C.Header=({title:e,subtitle:t,icon:n,iconVariant:l,iconLoadingStatus:r,showBack:o,onBack:s,showInfo:a,onInfo:c,showClose:d,onClose:g,step:p,headerTitle:w,...y})=>(0,i.jsxs)(h,{...y,children:[(0,i.jsx)(u,{backFn:o?s:void 0,infoFn:a?c:void 0,onClose:d?g:void 0,title:w,closeable:d}),(n||l||e||t)&&(0,i.jsxs)(m,{children:[n||l?(0,i.jsx)(C.Icon,{icon:n,variant:l,loadingStatus:r}):null,!(!e&&!t)&&(0,i.jsxs)(f,{children:[e&&(0,i.jsx)(v,{children:e}),t&&(0,i.jsx)(x,{children:t})]})]}),p&&(0,i.jsx)(z,{step:p})]}),(C.Body=l.forwardRef(({children:e,...t},n)=>(0,i.jsx)(g,{ref:n,...t,children:e}))).displayName="Screen.Body",C.Footer=({children:e,...t})=>(0,i.jsx)(p,{id:"privy-content-footer-container",...t,children:e}),C.Actions=({children:e,...t})=>(0,i.jsx)(W,{...t,children:e}),C.HelpText=({children:e,...t})=>(0,i.jsx)(I,{...t,children:e}),C.FooterText=({children:e,...t})=>(0,i.jsx)(E,{...t,children:e}),C.Watermark=()=>(0,i.jsx)(j,{}),C.Icon=({icon:e,variant:t="subtle",loadingStatus:n})=>"logo"===t&&e?(0,i.jsx)(y,"string"==typeof e?{children:(0,i.jsx)("img",{src:e,alt:""})}:l.isValidElement(e)?{children:e}:{children:l.createElement(e)}):"loading"===t?e?(0,i.jsx)(b,{children:(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,i.jsx)(o.N,{success:n?.success,fail:n?.fail}),"string"==typeof e?(0,i.jsx)("span",{style:{background:`url('${e}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):l.isValidElement(e)?l.cloneElement(e,{style:{width:"38px",height:"38px"}}):l.createElement(e,{style:{width:"38px",height:"38px"}})]})}):(0,i.jsx)(w,{$variant:t,children:(0,i.jsx)(a.N,{size:"64px"})}):(0,i.jsx)(w,{$variant:t,children:e&&("string"==typeof e?(0,i.jsx)("img",{src:e,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):l.isValidElement(e)?e:l.createElement(e,{width:32,height:32,stroke:(()=>{switch(t){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 W=r.I4.div`
460  width: 100%;
461  display: flex;
462  flex-direction: column;
463  gap: calc(var(--screen-space) / 2);
464`,I=r.I4.div`
465  && {
466    margin: 0;
467    width: 100%;
468    text-align: center;
469    color: var(--privy-color-foreground-2);
470    font-size: 13px;
471    line-height: 20px;
472
473    & a {
474      text-decoration: underline;
475    }
476  }
477`,E=r.I4.div`
478  && {
479    margin-top: -1rem;
480    width: 100%;
481    text-align: center;
482    color: var(--privy-color-foreground-2);
483    font-size: 0.6875rem; // 11px
484    line-height: 1rem; // 16px
485  }
486`},71847:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(12115);let l=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},r=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];
486return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).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,i.forwardRef)((e,t)=>{let{color:n="currentColor",size:l=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:c="",children:d,iconNode:h,...u}=e;return(0,i.createElement)("svg",{ref:t,...o,width:l,height:l,stroke:n,strokeWidth:a?24*Number(s)/Number(l):s,className:r("lucide",c),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(u)&&{"aria-hidden":"true"},...u},[...h.map(e=>{let[t,n]=e;return(0,i.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),a=(e,t)=>{let n=(0,i.forwardRef)((n,o)=>{let{className:a,...c}=n;return(0,i.createElement)(s,{ref:o,iconNode:t,className:r("lucide-".concat(l(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),a),...c})});return n.displayName=l(e),n}},75276:(e,t,n)=>{n.d(t,{Q:()=>v});var i=n(95155),l=n(28365),r=n(12115),o=n(20647),s=n(36523),a=n(78890);let c=()=>(0,i.jsx)("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:(0,i.jsx)("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})}),d=(e,t,n,i,l)=>{for(let r=t;r<t+i;r++)for(let t=n;t<n+l;t++){let n=e?.[t];n&&n[r]&&(n[r]=0)}return e},h=({x:e,y:t,cellSize:n,bgColor:l,fgColor:r})=>(0,i.jsx)(i.Fragment,{children:[0,1,2].map(o=>(0,i.jsx)("circle",{r:n*(7-2*o)/2,cx:e+7*n/2,cy:t+7*n/2,fill:o%2!=0?l:r},`finder-${e}-${t}-${o}`))}),u=({cellSize:e,matrixSize:t,bgColor:n,fgColor:l})=>(0,i.jsx)(i.Fragment,{children:[[0,0],[(t-7)*e,0],[0,(t-7)*e]].map(([t,r])=>(0,i.jsx)(h,{x:t,y:r,cellSize:e,bgColor:n,fgColor:l},`finder-${t}-${r}`))}),g=({matrix:e,cellSize:t,color:n})=>(0,i.jsx)(i.Fragment,{children:e.map((e,l)=>e.map((e,o)=>e?(0,i.jsx)("rect",{height:t-.4,width:t-.4,x:l*t+.1*t,y:o*t+.1*t,rx:.5*t,ry:.5*t,fill:n},`cell-${l}-${o}`):(0,i.jsx)(r.Fragment,{},`circle-${l}-${o}`)))}),p=({cellSize:e,matrixSize:t,element:n,sizePercentage:l,bgColor:r})=>{if(!n)return(0,i.jsx)(i.Fragment,{});let o=t*(l||.14),s=Math.floor(t/2-o/2),a=Math.floor(t/2+o/2);(a-s)%2!=t%2&&(a+=1);let c=(a-s)*e,d=c-.2*c,h=s*e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:s*e,y:s*e,width:c,height:c,fill:r}),(0,i.jsx)(n,{x:h+.1*c,y:h+.1*c,height:d,width:d})]})},m=e=>{let t=e.outputSize,n=((e,t)=>{let n=l.create(e,{errorCorrectionLevel:t}).modules,i=(0,a.E)(Array.from(n.data),n.size);return i=d(i,0,0,7,7),i=d(i,i.length-7,0,7,7),d(i,0,i.length-7,7,7)})(e.url,e.errorCorrectionLevel),r=t/n.length,o=(0,a.D)(2*r,{min:.025*t,max:.036*t});return(0,i.jsxs)("svg",{height:e.outputSize,width:e.outputSize,viewBox:`0 0 ${e.outputSize} ${e.outputSize}`,style:{height:"100%",width:"100%",padding:`${o}px`},children:[(0,i.jsx)(g,{matrix:n,cellSize:r,color:e.fgColor}),(0,i.jsx)(u,{cellSize:r,matrixSize:n.length,fgColor:e.fgColor,bgColor:e.bgColor}),(0,i.jsx)(p,{cellSize:r,element:e.logo?.element,bgColor:e.bgColor,matrixSize:n.length})]})},f=o.I4.div.attrs({className:"ph-no-capture"})`
487  display: flex;
488  justify-content: center;
489  align-items: center;
490  height: ${e=>`${e.$size}px`};
491  width: ${e=>`${e.$size}px`};
492  margin: auto;
493  background-color: ${e=>e.$bgColor};
494
495  && {
496    border-width: 2px;
497    border-color: ${e=>e.$borderColor};
498    border-radius: var(--privy-border-radius-md);
499  }
500`,v=e=>{let{appearance:t}=(0,s.u)(),n=e.bgColor||"#FFFFFF",l=e.fgColor||"#000000",r=e.size||160,o="dark"===t.palette.colorScheme?n:l;return(0,i.jsx)(f,{$size:r,$bgColor:n,$fgColor:l,$borderColor:o,children:(0,i.jsx)(m,{url:e.url,logo:{element:e.squareLogoElement??c},outputSize:r,bgColor:n,fgColor:l,errorCorrectionLevel:e.errorCorrectionLevel||"Q"})})}},75426:(e,t,n)=>{n.d(t,{A:()=>i});let i=(0,n(71847).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},80469:(e,t,n)=>{n.d(t,{L:()=>o});var i=n(95155),l=n(20647);let r=l.I4.a`
501  && {
502    color: ${({$variant:e})=>"underlined"===e?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))"};
503    font-weight: 400;
504    text-decoration: ${({$variant:e})=>"underlined"===e?"underline":"var(--privy-link-navigation-decoration, none)"};
505    text-underline-offset: 4px;
506    text-decoration-thickness: 1px;
507    cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
508    opacity: ${({$disabled:e})=>e?.5:1};
509
510    font-size: ${({$size:e})=>{switch(e){case"xs":return"12px";case"sm":return"14px";default:return"16px"}}};
511
512    line-height: ${({$size:e})=>{switch(e){case"xs":return"18px";case"sm":return"22px";default:return"24px"}}};
513
514    transition:
515      color 200ms ease,
516      text-decoration-color 200ms ease,
517      opacity 200ms ease;
518
519    &:hover {
520      color: ${({$variant:e,$disabled:t})=>"underlined"===e?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))"};
521      text-decoration: ${({$disabled:e})=>e?"none":"underline"};
522      text-underline-offset: 4px;
523    }
524
525    &:active {
526      color: ${({$variant:e,$disabled:t})=>t?"underlined"===e?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))":"var(--privy-color-foreground)"};
527    }
528
529    &:focus {
530      outline: none;
531      box-shadow: 0 0 0 3px #949df9;
532      border-radius: 2px;
533    }
534  }
535`,o=({size:e="md",variant:t="navigation",disabled:n=!1,as:l,children:o,onClick:s,...a})=>(0,i.jsx)(r,{as:l,$size:e,$variant:t,$disabled:n,onClick:e=>{n?e.preventDefault():s?.(e)},...a,children:o})}
535,95204:(e,t,n)=>{n.d(t,{N:()=>r});var i=n(95155),l=n(20647);let r=({size:e,centerIcon:t})=>(0,i.jsx)(o,{$size:e,children:(0,i.jsxs)(s,{children:[(0,i.jsx)(c,{}),(0,i.jsx)(d,{}),t?(0,i.jsx)(a,{children:t}):null]})}),o=l.I4.div`
536  --spinner-size: ${e=>e.$size?e.$size:"96px"};
537
538  display: inline-flex;
539  justify-content: center;
540  align-items: center;
541
542  @media all and (display-mode: standalone) {
543    margin-bottom: 30px;
544  }
545`,s=l.I4.div`
546  position: relative;
547  height: var(--spinner-size);
548  width: var(--spinner-size);
549
550  opacity: 1;
551  animation: fadein 200ms ease;
552`,a=l.I4.div`
553  position: absolute;
554  top: 0;
555  right: 0;
556  bottom: 0;
557  left: 0;
558  display: flex;
559  align-items: center;
560  justify-content: center;
561  svg,
562  img {
563    width: calc(var(--spinner-size) * 0.4);
564    height: calc(var(--spinner-size) * 0.4);
565    border-radius: var(--privy-border-radius-full);
566  }
567`,c=l.I4.div`
568  position: absolute;
569  top: 0;
570  right: 0;
571  bottom: 0;
572  left: 0;
573  width: var(--spinner-size);
574  height: var(--spinner-size);
575
576  && {
577    border: 4px solid var(--privy-color-border-default);
578    border-radius: 50%;
579  }
580`,d=l.I4.div`
581  position: absolute;
582  top: 0;
583  right: 0;
584  bottom: 0;
585  left: 0;
586  width: var(--spinner-size);
587  height: var(--spinner-size);
588  animation: spin 1200ms linear infinite;
589
590  && {
591    border: 4px solid;
592    border-color: var(--privy-color-icon-subtle) transparent transparent transparent;
593    border-radius: 50%;
594  }
595
596  @keyframes spin {
597    from {
598      transform: rotate(0deg);
599    }
600    to {
601      transform: rotate(360deg);
602    }
603  }
604`}}]);

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.