PageSourceSearch

https://capsicum-files.socios.com/assets/production/socios-web/_next/static/chunks/4621.fa60f4769af5e032.js

js socios.com collected 2026-10-01 11:42:27 UTC 18,672 bytes, 250 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0740679c-34d5-4b3c-b945-7c9898c04333",e._sentryDebugIdIdentifier="sentry-dbid-0740679c-34d5-4b3c-b945-7c9898c04333")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4621],{84621:(e,t,i)=>{i.r(t),i.d(t,{W3mConnectSocialsView:()=>C,W3mConnectingFarcasterView:()=>F,W3mConnectingSocialView:()=>_});var o=i(37039),r=i(80975),s=i(62113),a=i(27566),n=i(26257),c=i(84753);i(38827),i(56165);var l=i(66696),d=i(79431),u=i(30096),h=i(53766),p=i(30305),w=i(65059),m=i(60402);i(29669);var g=i(62823);let f=(0,c.AH)`
2  :host {
3    margin-top: ${({spacing:e})=>e["1"]};
4  }
5  wui-separator {
6    margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1)
7      ${({spacing:e})=>e["2"]} calc(${({spacing:e})=>e["3"]} * -1);
8    width: calc(100% + ${({spacing:e})=>e["3"]} * 2);
9  }
10`;var v=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};let y=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=l.a.state.connectors,this.authConnector=this.connectors.find(e=>"AUTH"===e.type),this.remoteFeatures=n.H.state.remoteFeatures,this.isPwaLoading=!1,this.hasExceededUsageLimit=d.N.state.plan.hasExceededUsageLimit,this.unsubscribe.push(l.a.subscribeKey("connectors",e=>{this.connectors=e,this.authConnector=this.connectors.find(e=>"AUTH"===e.type)}),n.H.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}connectedCallback(){super.connectedCallback(),this.handlePwaFrameLoad()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.remoteFeatures?.socials||[],t=!!this.authConnector,i=e?.length,r="ConnectSocials"===u.I.state.view;return t&&i||r?(r&&!i&&(e=h.oU.DEFAULT_SOCIALS),(0,o.qy)` <wui-flex flexDirection="column" gap="2">
11      ${e.map(e=>(0,o.qy)`<wui-list-social
12            @click=${()=>{this.onSocialClick(e)}}
13            data-testid=${`social-selector-${e}`}
14            name=${e}
15            logo=${e}
16            ?disabled=${this.isPwaLoading}
17          ></wui-list-social>`)}
18    </wui-flex>`):null}async onSocialClick(e){this.hasExceededUsageLimit?u.I.push("UsageExceeded"):e&&await (0,w.Up)(e)}async handlePwaFrameLoad(){if(m.w.isPWA()){this.isPwaLoading=!0;try{this.authConnector?.provider instanceof g.Y&&await this.authConnector.provider.init()}catch(e){p.h.open({displayMessage:"Error loading embedded wallet in PWA",debugMessage:e.message},"error")}finally{this.isPwaLoading=!1}}}};y.styles=f,v([(0,r.MZ)()],y.prototype,"tabIdx",void 0),v([(0,r.wk)()],y.prototype,"connectors",void 0),v([(0,r.wk)()],y.prototype,"authConnector",void 0),v([(0,r.wk)()],y.prototype,"remoteFeatures",void 0),v([(0,r.wk)()],y.prototype,"isPwaLoading",void 0),v([(0,r.wk)()],y.prototype,"hasExceededUsageLimit",void 0),y=v([(0,c.EM)("w3m-social-login-list")],y);let b=(0,c.AH)`
19  wui-flex {
20    max-height: clamp(360px, 540px, 80vh);
21    overflow: scroll;
22    scrollbar-width: none;
23    transition: opacity ${({durations:e})=>e.md}
24      ${({easings:e})=>e["ease-out-power-1"]};
25    will-change: opacity;
26  }
27
28  wui-flex::-webkit-scrollbar {
29    display: none;
30  }
31
32  wui-flex.disabled {
33    opacity: 0.3;
34    pointer-events: none;
35    user-select: none;
36  }
37`;var x=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};let C=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.checked=a.o.state.isLegalCheckboxChecked,this.unsubscribe.push(a.o.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=n.H.state,i=n.H.state.features?.legalCheckbox,r=!!(e||t)&&!!i&&!this.checked;return(0,o.qy)`
38      <w3m-legal-checkbox></w3m-legal-checkbox>
39      <wui-flex
40        flexDirection="column"
41        .padding=${["0","3","3","3"]}
42        gap="01"
43        class=${(0,s.J)(r?"disabled":void 0)}
44      >
45        <w3m-social-login-list tabIdx=${(0,s.J)(r?-1:void 0)}></w3m-social-login-list>
46      </wui-flex>
47    `}};C.styles=b,x([(0,r.wk)()],C.prototype,"checked",void 0),C=x([(0,c.EM)("w3m-connect-socials-view")],C);var E=i(62814),k=i(12391),P=i(5552),$=i(2842),I=i(49873),S=i(91114),W=i(52754);i(3941),i(85141),i(67002),i(43255);var L=i(41279),O=i(86867);let A=(0,c.AH)`
48  wui-logo {
49    width: 80px;
50    height: 80px;
51    border-radius: ${({borderRadius:e})=>e["8"]};
52  }
53  @keyframes shake {
54    0% {
55      transform: translateX(0);
56    }
57    25% {
58      transform: translateX(3px);
59    }
60    50% {
61      transform: translateX(-3px);
62    }
63    75% {
64      transform: translateX(3px);
65    }
66    100% {
67      transform: translateX(0);
68    }
69  }
70  wui-flex:first-child:not(:only-child) {
71    position: relative;
72  }
73  wui-loading-thumbnail {
74    position: absolute;
75  }
76  wui-icon-box {
77    position: absolute;
78    right: calc(${({spacing:e})=>e["1"]} * -1);
79    bottom: calc(${({spacing:e})=>e["1"]} * -1);
80    opacity: 0;
81    transform: scale(0.5);
82    transition: all ${({easings:e})=>e["ease-out-power-2"]}
83      ${({durations:e})=>e.lg};
84  }
85  wui-text[align='center'] {
86    width: 100%;
87    padding: 0px ${({spacing:e})=>e["4"]};
88  }
89  [data-error='true'] wui-icon-box {
90    opacity: 1;
91    transform: scale(1);
92  }
93  [data-error='true'] > wui-flex:first-child {
94    animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both;
95  }
96  .capitalize {
97    text-transform: capitalize;
98  }
99`;var R=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};let _=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.socialProvider=E.W.getAccountData()?.socialProvider,this.socialWindow=E.W.getAccountData()?.socialWindow,this.error=!1,this.connecting=!1,this.message="Connect in the provider window",this.remoteFeatures=n.H.state.remoteFeatures,this.address=E.W.getAccountData()?.address,this.connectionsByNamespace=k.x.getConnections(E.W.state.activeChain),this.hasMultipleConnections=this.connectionsByNamespace.length>0,this.authConnector=l.a.getAuthConnector(),this.handleSocialConnection=async e=>{if(e.data?.resultUri)if(e.origin===O.o.SECURE_SITE_ORIGIN){window.removeEventListener("message",this.handleSocialConnection,!1);try{if(this.authConnector&&!this.connecting){this.connecting=!0;let t=this.parseURLError(e.data.resultUri);if(t)return void this.handleSocialError(t);this.closeSocialWindow(),this.updateMessage();let i=e.data.resultUri;this.socialProvider&&P.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_REQUEST_USER_DATA",properties:{provider:this.socialProvider}}),await k.x.connectExternal({id:this.authConnector.id,type:this.authConnector.type,socialUri:i},this.authConnector.chain),this.socialProvider&&($.i.setConnectedSocialProvider(this.socialProvider),P.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:this.socialProvider}}))}}catch(e){this.error=!0,this.updateMessage(),this.socialProvider&&P.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider,message:m.w.parseError(e)}})}}else u.I.goBack(),I.P.showError("Untrusted Origin"),this.socialProvider&&P.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider,message:"Untrusted Origin"}})},L.R.EmbeddedWalletAbortController.signal.addEventListener("abort",()=>{this.closeSocialWindow()}),this.unsubscribe.push(E.W.subscribeChainProp("accountState",e=>
99{if(e&&(this.socialProvider=e.socialProvider,e.socialWindow&&(this.socialWindow=e.socialWindow),e.address)){let t=this.remoteFeatures?.multiWallet;e.address!==this.address&&(this.hasMultipleConnections&&t?(u.I.replace("ProfileWallets"),I.P.showSuccess("New Wallet Added"),this.address=e.address):(S.W.state.open||n.H.state.enableEmbedded)&&S.W.close())}}),n.H.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e})),this.authConnector&&this.connectSocial()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),window.removeEventListener("message",this.handleSocialConnection,!1),E.W.state.activeCaipAddress||!this.socialProvider||this.connecting||P.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_CANCELED",properties:{provider:this.socialProvider}}),this.closeSocialWindow()}render(){return(0,o.qy)`
100      <wui-flex
101        data-error=${(0,s.J)(this.error)}
102        flexDirection="column"
103        alignItems="center"
104        .padding=${["10","5","5","5"]}
105        gap="6"
106      >
107        <wui-flex justifyContent="center" alignItems="center">
108          <wui-logo logo=${(0,s.J)(this.socialProvider)}></wui-logo>
109          ${this.error?null:this.loaderTemplate()}
110          <wui-icon-box color="error" icon="close" size="sm"></wui-icon-box>
111        </wui-flex>
112        <wui-flex flexDirection="column" alignItems="center" gap="2">
113          <wui-text align="center" variant="lg-medium" color="primary"
114            >Log in with
115            <span class="capitalize">${this.socialProvider??"Social"}</span></wui-text
116          >
117          <wui-text align="center" variant="lg-regular" color=${this.error?"error":"secondary"}
118            >${this.message}</wui-text
119          ></wui-flex
120        >
121      </wui-flex>
122    `}loaderTemplate(){let e=W.W.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,o.qy)`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}parseURLError(e){try{let t="error=",i=e.indexOf(t);if(-1===i)return null;return e.substring(i+t.length)}catch{return null}}connectSocial(){let e=setInterval(()=>{this.socialWindow?.closed&&(this.connecting||"ConnectingSocial"!==u.I.state.view||u.I.goBack(),clearInterval(e))},1e3);window.addEventListener("message",this.handleSocialConnection,!1)}updateMessage(){this.error?this.message="Something went wrong":this.connecting?this.message="Retrieving user data":this.message="Connect in the provider window"}handleSocialError(e){this.error=!0,this.updateMessage(),this.socialProvider&&P.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider,message:e}}),this.closeSocialWindow()}closeSocialWindow(){this.socialWindow&&(this.socialWindow.close(),E.W.setAccountProp("socialWindow",void 0,E.W.state.activeChain))}};_.styles=A,R([(0,r.wk)()],_.prototype,"socialProvider",void 0),R([(0,r.wk)()],_.prototype,"socialWindow",void 0),R([(0,r.wk)()],_.prototype,"error",void 0),R([(0,r.wk)()],_.prototype,"connecting",void 0),R([(0,r.wk)()],_.prototype,"message",void 0),R([(0,r.wk)()],_.prototype,"remoteFeatures",void 0),_=R([(0,c.EM)("w3m-connecting-social-view")],_),i(71888),i(93417),i(19504),i(35527);let T=(0,c.AH)`
123  wui-shimmer {
124    width: 100%;
125    aspect-ratio: 1 / 1;
126    border-radius: ${({borderRadius:e})=>e[4]};
127  }
128
129  wui-qr-code {
130    opacity: 0;
131    animation-duration: ${({durations:e})=>e.xl};
132    animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]};
133    animation-name: fade-in;
134    animation-fill-mode: forwards;
135  }
136
137  wui-logo {
138    width: 80px;
139    height: 80px;
140    border-radius: ${({borderRadius:e})=>e["8"]};
141  }
142
143  wui-flex:first-child:not(:only-child) {
144    position: relative;
145  }
146
147  wui-loading-thumbnail {
148    position: absolute;
149  }
150
151  wui-icon-box {
152    position: absolute;
153    right: calc(${({spacing:e})=>e["1"]} * -1);
154    bottom: calc(${({spacing:e})=>e["1"]} * -1);
155    opacity: 0;
156    transform: scale(0.5);
157    transition:
158      opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]},
159      transform ${({durations:e})=>e.lg}
160        ${({easings:e})=>e["ease-out-power-2"]};
161    will-change: opacity, transform;
162  }
163
164  @keyframes fade-in {
165    from {
166      opacity: 0;
167    }
168    to {
169      opacity: 1;
170    }
171  }
172`;var U=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(a=(s<3?r(a):s>
1723?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};let F=class extends o.WF{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.socialProvider=E.W.getAccountData()?.socialProvider,this.uri=E.W.getAccountData()?.farcasterUrl,this.ready=!1,this.loading=!1,this.remoteFeatures=n.H.state.remoteFeatures,this.authConnector=l.a.getAuthConnector(),this.forceUpdate=()=>{this.requestUpdate()},this.unsubscribe.push(E.W.subscribeChainProp("accountState",e=>{this.socialProvider=e?.socialProvider,this.uri=e?.farcasterUrl,this.connectFarcaster()}),n.H.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e})),window.addEventListener("resize",this.forceUpdate)}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.timeout),window.removeEventListener("resize",this.forceUpdate),!E.W.state.activeCaipAddress&&this.socialProvider&&(this.uri||this.loading)&&P.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_CANCELED",properties:{provider:this.socialProvider}})}render(){return this.onRenderProxy(),(0,o.qy)`${this.platformTemplate()}`}platformTemplate(){return m.w.isMobile()?(0,o.qy)`${this.mobileTemplate()}`:(0,o.qy)`${this.desktopTemplate()}`}desktopTemplate(){return this.loading?(0,o.qy)`${this.loadingTemplate()}`:(0,o.qy)`${this.qrTemplate()}`}qrTemplate(){return(0,o.qy)` <wui-flex
173      flexDirection="column"
174      alignItems="center"
175      .padding=${["0","5","5","5"]}
176      gap="5"
177    >
178      <wui-shimmer width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>
179
180      <wui-text variant="lg-medium" color="primary"> Scan this QR Code with your phone </wui-text>
181      ${this.copyTemplate()}
182    </wui-flex>`}loadingTemplate(){return(0,o.qy)`
183      <wui-flex
184        flexDirection="column"
185        alignItems="center"
186        .padding=${["5","5","5","5"]}
187        gap="5"
188      >
189        <wui-flex justifyContent="center" alignItems="center">
190          <wui-logo logo="farcaster"></wui-logo>
191          ${this.loaderTemplate()}
192          <wui-icon-box color="error" icon="close" size="sm"></wui-icon-box>
193        </wui-flex>
194        <wui-flex flexDirection="column" alignItems="center" gap="2">
195          <wui-text align="center" variant="md-medium" color="primary">
196            Loading user data
197          </wui-text>
198          <wui-text align="center" variant="sm-regular" color="secondary">
199            Please wait a moment while we load your data.
200          </wui-text>
201        </wui-flex>
202      </wui-flex>
203    `}mobileTemplate(){return(0,o.qy)` <wui-flex
204      flexDirection="column"
205      alignItems="center"
206      .padding=${["10","5","5","5"]}
207      gap="5"
208    >
209      <wui-flex justifyContent="center" alignItems="center">
210        <wui-logo logo="farcaster"></wui-logo>
211        ${this.loaderTemplate()}
212        <wui-icon-box
213          color="error"
214          icon="close"
215          size="sm"
216        ></wui-icon-box>
217      </wui-flex>
218      <wui-flex flexDirection="column" alignItems="center" gap="2">
219        <wui-text align="center" variant="md-medium" color="primary"
220          >Continue in Farcaster</span></wui-text
221        >
222        <wui-text align="center" variant="sm-regular" color="secondary"
223          >Accept connection request in the app</wui-text
224        ></wui-flex
225      >
226      ${this.mobileLinkTemplate()}
227    </wui-flex>`}loaderTemplate(){let e=W.W.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,o.qy)`<wui-loading-thumbnail radius=${9*t}></wui-loading-thumbnail>`}async connectFarcaster(){if(this.authConnector)try{await this.authConnector?.provider.connectFarcaster(),this.socialProvider&&($.i.setConnectedSocialProvider(this.socialProvider),P.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_REQUEST_USER_DATA",properties:{provider:this.socialProvider}})),this.loading=!0;let e=k.x.getConnections(this.authConnector.chain).length>0;await k.x.connectExternal(this.authConnector,this.authConnector.chain);let t=this.remoteFeatures?.multiWallet;this.socialProvider&&P.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:this.socialProvider}}),this.loading=!1,e&&t?(u.I.replace("ProfileWallets"),I.P.showSuccess("New Wallet Added")):S.W.close()}catch(e){this.socialProvider&&P.E.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider,message:m.w.parseError(e)}}),u.I.goBack(),I.P.showError(e)}}mobileLinkTemplate(){return(0,o.qy)`<wui-button
228      size="md"
229      ?loading=${this.loading}
230      ?disabled=${!this.uri||this.loading}
231      @click=${()=>{this.uri&&m.w.openHref(this.uri,"_blank")}}
232    >
233      Open farcaster</wui-button
234    >`}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.getBoundingClientRect().width-40,t=W.W.state.themeVariables["--apkt-qr-color"]??W.W.state.themeVariables["--w3m-qr-color"];return(0,o.qy)` <wui-qr-code
235      size=${e}
236      theme=${W.W.state.themeMode}
237      uri=${this.uri}
238      ?farcaster=${!0}
239      data-testid="wui-qr-code"
240      color=${(0,s.J)(t)}
241    ></wui-qr-code>`}copyTemplate(){let e=!this.uri||!this.ready;return(0,o.qy)`<wui-button
242      .disabled=${e}
243      @click=${this.onCopyUri}
244      variant="neutral-secondary"
245      size="sm"
246      data-testid="copy-wc2-uri"
247    >
248      <wui-icon size="sm" color="default" slot="iconRight" name="copy"></wui-icon>
249      Copy link
250    </wui-button>
250`}onCopyUri(){try{this.uri&&(m.w.copyToClopboard(this.uri),I.P.showSuccess("Link copied"))}catch{I.P.showError("Failed to copy")}}};F.styles=T,U([(0,r.wk)()],F.prototype,"socialProvider",void 0),U([(0,r.wk)()],F.prototype,"uri",void 0),U([(0,r.wk)()],F.prototype,"ready",void 0),U([(0,r.wk)()],F.prototype,"loading",void 0),U([(0,r.wk)()],F.prototype,"remoteFeatures",void 0),F=U([(0,c.EM)("w3m-connecting-farcaster-view")],F)}}]);

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.