1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5440],{45882:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>l,default:()=>s});var a=n(26514),r=n(75834),c=n(46225),i=n(41419),o=n(44525),l=!0;function s(e){let{confirmationState:t,platformAccountUsername:n,...l}=e,s=(0,c.useRouter)(),[d,u]=(0,r.useState)(t),[h,f]=(0,r.useState)(!1),[p,w]=(0,r.useState)(null),m={...l,...d?{confirmationState:d}:{}},x=async()=>{f(!0);let t=await fetch("/api/connection/twitter/confirm-duplicate",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)}).catch(()=>void 0),n=await (null==t?void 0:t.json().catch(()=>null));s.replace("string"==typeof(null==n?void 0:n.redirectUrl)&&(0,i.V)(n.redirectUrl)?n.redirectUrl:e.returnUrl&&(0,i.V)(e.returnUrl)?e.returnUrl:"/connection/auth/error?reason=duplicate_twitter_cancelled".concat("true"===e.fromOnboarding?"&fromOnboarding=true":""))},y=async()=>{f(!0),w(null);try{let e=await fetch("/api/connection/twitter/confirm-duplicate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)}),t=await e.json().catch(()=>null);if((null==t?void 0:t.confirmationStateRestored)===!0){u(void 0);let e=new URL(window.location.href);e.searchParams.has("confirmationState")&&(e.searchParams.delete("confirmationState"),window.history.replaceState(window.history.state,"","".concat(e.pathname).concat(e.search).concat(e.hash)))}if(!e.ok||!(null==t?void 0:t.success)||"string"!=typeof t.redirectUrl)throw Error((null==t?void 0:t.error)||"Unable to confirm this connection.");s.replace(t.redirectUrl)}catch(e){w(e instanceof Error?e.message:"Unable to confirm this connection."),f(!1)}};return(0,a.jsx)("div",{className:"flex h-full w-full flex-col items-center justify-center bg-white p-12 max-[700px]:p-6",children:(0,a.jsxs)("div",{className:"flex w-96 flex-col items-center gap-6 max-[700px]:w-48 max-[700px]:gap-3",children:[(0,a.jsx)("span",{className:"text-center text-[26px] font-bold leading-8",children:"Twitter/X Account Already Connected"}),(0,a.jsxs)("span",{className:"text-center",children:[n?"@".concat(n):"this Twitter/X account"," is already connected to another creator. If you proceed, that other connection will be invalidated and may need to be reconnected before it can sync again."]}),p?(0,a.jsx)("span",{className:"text-center text-status-critical",children:p}):null,(0,a.jsxs)("div",{className:"flex flex-row flex-wrap justify-center gap-3 max-[700px]:gap-1.5",children:[(0,a.jsx)(o.$,{variant:"outline",onClick:x,disabled:h,children:"Cancel"}),(0,a.jsx)(o.$,{onClick:y,disabled:h,children:h?"Connecting...":"Proceed Anyway"})]})]})})}},84862:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/connection/auth/twitter/duplicate-warning",function(){return n(45882)}])}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=84862)),_N_E=e.O()}]); 2//# sourceMappingURL=duplicate-warning-205cd0f4460c9628.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.