1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d7d9054d-869a-4704-b488-5e31498bbe37",e._sentryDebugIdIdentifier="sentry-dbid-d7d9054d-869a-4704-b488-5e31498bbe37")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2733],{54465:function(e,t,n){"use strict";n.d(t,{J:function(){return f}});var r="https://js.stripe.com/v3",i=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,s=function(){for(var e=document.querySelectorAll('script[src^="'.concat(r,'"]')),t=0;t<e.length;t++){var n=e[t];if(i.test(n.src))return n}return null},o=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(r).concat(t);var i=document.head||document.body;if(!i)throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(n),n},l=function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:t})},a=null,c=function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return l(r,n),r},u=Promise.resolve().then(function(){return null!==a?a:a=new Promise(function(e,t){if("undefined"==typeof window||"undefined"==typeof document){e(null);return}if(window.Stripe,window.Stripe){e(window.Stripe);return}try{var n=s();n||(n=o(null)),n.addEventListener("load",function(){window.Stripe?e(window.Stripe):t(Error("Stripe.js not available"))}),n.addEventListener("error",function(){t(Error("Failed to load Stripe.js"))})}catch(e){t(e);return}})}),d=!1;u.catch(function(e){d||console.warn(e)});var f=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];d=!0;var r=Date.now();return u.then(function(e){return c(e,t,r)})}},65549:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ghost",function(){return n(84140)}])},84140:function(e,t,n){"use strict";n.r(t),n.d(t,{Ghost:function(){return R},default:function(){return z}});var r=n(85893),i=n(83658),s=n(68029),o=n(3712),l=n(90092),a=n(15715),c=n(52867),u=n(88329),d=n(64831),f=n(5490),h=n(34614),p=n(56978),x=n(57391),w=n(70010),m=n(45443),g=n(38488),b=n(97410),y=n(56528),S=n(67294),v=n(74931),j=n(19996),k=n(39424),_=n(65196);let M=e=>{let[t,n]=S.useState(!1),i=async t=>{e.onClickStartFreeTrial&&e.onClickStartFreeTrial();let r=await (0,_.k)();try{if("undefined"!=typeof Rewardful&&Rewardful)var i={referral:Rewardful.referral,isReferral:!!Rewardful.referral};else var i={isReferral:!1}}catch(e){var i={isReferral:!1};j.cM("error_noRewardful")}if(console.log(i),j.cM("hit_order",{...i,source:e.source?e.source:"unknown"}),!r){let e="stripe not loaded in payment";j.cM("error",{message:e}),v.default.error("Failed to initialized payment, please contact us",{style:{background:"neutral.content",color:"#222"}}),k.uT(e,"error");return}let s={isLocal:!1,amount:e.amount,count:e.count,mode:"payment",tweets:e.tweets,twUserName:e.twUserName,...i};e.customCancelUrl&&(s.customCancelUrl=e.customCancelUrl),n(!0);let o=await fetch("/api/payment",{method:"POST",headers:new Headers({"Content-Type":"application/json",token:""}),credentials:"same-origin",body:JSON.stringify(s)}),l=await o.json();l&&l.success?window.location.href=l.url:(n(!1),console.log("An error happened during checkout. Please contact us for more information"),j.cM("error_failed_subscribe",{stripeSession:l}),v.default.error("Failed to initialized payment, please contact us",{style:{background:"neutral.content",color:"#222"}}))};return(0,r.jsx)(s.x,{children:(0,r.jsx)(g.z,{size:"lg",colorScheme:e.color?e.color:"twitter",px:"8",fontWeight:"bold",fontSize:"md",textTransform:"uppercase",onClick:e=>{i(e)},isLoading:t,...e.buttonStyle,children:"Order"})})};var C=n(93964),T=n(96885),D=n(6630),E=n(5434);let R=e=>{let{query:t}=e,[n,j]=S.useState(!0),[k,_]=S.useState([]),[R,z]=S.useState([]),[O,N]=S.useState(!1),[I,P]=S.useState(null),[L,U]=S.useState("");(0,T.useRouter)();let[W,F]=S.useState(30),[A,q]=S.useState(1e3),[J,X]=S.useState(40),[Z,B]=S.useState(0),{isOpen:G,onOpen:Y,onClose:H}=(0,i.q)(),[$,K]=S.useState({});S.useEffect(()=>{"true"==t.success&&Y()},[]);let V=async(e,t)=>{if(O)return;if(!t.includes("@")){v.default.error("Use '@' to search a specific user",{style:{background:"neutral.content",color:"#222"}});return}N(!0),U(t),z([]);let r=await (0,C.yC)(e,t,{isPersonalizedSorting:n,nbMinDaysOld:W,nbMaxDaysOld:A,nbMinLikes:J,nbMinRt:Z},"ghost");r&&0!==r.success?P(r):P(null),N(!1)},Q=async e=>{console.log("toggleSelection "+e.id);let t=R.find(t=>
1t.id_str===e.id_str);t?R.splice(R.indexOf(t),1):R.push(e),z([...R])};return(0,r.jsxs)(s.x,{maxW:1200,margin:"auto",p:4,children:[(0,r.jsxs)(o.K,{mt:10,children:[(0,r.jsx)(l.x,{fontSize:"2xl",fontWeight:"600",textAlign:"center",children:"X Is Just Saying 1 Thing, 1000 different ways"}),(0,r.jsx)(l.x,{mb:4,color:"neutral.content",fontSize:"md",textAlign:"center",children:"Select your best tweets and ask our Ghostwriter team to write variations of them"}),(0,r.jsx)(a.M,{flexDirection:"column",children:[{title:"1. Select tweets and order variations"},{title:"2. Our team will write 3 variations of each"},{title:"3. You get them in less than 48 hours"},{title:"4. You grow on X"}].map((e,t)=>(0,r.jsx)(a.M,{w:"350px",alignItems:"flex-start",justifyContent:"flex-start",children:(0,r.jsx)(c.aV,{spacing:50,children:(0,r.jsxs)(c.HC,{mt:6,display:"flex",children:[(0,r.jsx)(c.DE,{as:E.ZSR,color:"neutral.content",fontSize:"20px"}),(0,r.jsx)(l.x,{fontWeight:"500",children:e.title})]})})},t))}),(0,r.jsx)(a.M,{mt:100,children:(0,r.jsx)(b.Z,{sendRequest:V,isLoading:O,placeholder:"Search any @handle",isSending:O,setIsSending:N,setData:P,nbMinRt:Z,setNbMinRt:B,nbMinLikes:J,setNbMinLikes:X,nbMaxDaysOld:A,setNbMaxDaysOld:q,nbMinDaysOld:W,setNbMinDaysOld:F,suggestions:[],searchMode:"ghost"})}),O&&(0,r.jsx)(a.M,{pt:10,children:(0,r.jsx)(D.r,{loading:O,css:"display: block; margin: 0 auto; border-color: red;",size:50})}),!O&&(null==I?void 0:I.tweets)&&(0,r.jsx)(s.x,{children:(0,r.jsx)(y.Z,{sendRequest:V,savedTweet:k,tweets:I.tweets,data:I,setData:P,disableBlur:!0,disableBookmarkButton:!0,refresher:K,refresh:$,disableSaveCsv:!0,disableEmbed:!0,disableTryAgain:!0,disableEditTweet:!0,isSelectable:!0,disableCopy:!0,disableSubMenu:!0,disableCheckmark:!1,toggleSelection:Q})})]}),(0,r.jsxs)(u.k,{position:"fixed",bottom:"0",left:"0",w:"100vw",h:"70px",bg:"white",boxShadow:"rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;",justifyContent:"center",alignItems:"center",children:[(0,r.jsxs)(u.k,{flexDirection:"column",children:[(0,r.jsxs)(l.x,{mr:10,fontSize:"20px",children:["Tweet selected: ",null==R?void 0:R.length]}),(0,r.jsx)(l.x,{mr:10,fontSize:"xs",children:"You will receive "+(null==R?void 0:R.length)*3+" tweet proposals"})]}),(0,r.jsx)(d.i,{orientation:"vertical"}),(0,r.jsxs)(l.x,{mr:10,ml:10,fontSize:"2xl",children:["$",(null==R?void 0:R.length)*5]}),(0,r.jsx)(d.i,{orientation:"vertical"}),(0,r.jsx)(s.x,{ml:10,children:(0,r.jsx)(M,{count:null==R?void 0:R.length,amount:(null==R?void 0:R.length)*5,customCancelUrl:"ghost",twUserName:L,tweets:R,buttonStyle:{isDisabled:(null==R?void 0:R.length)==0}})})]}),(0,r.jsxs)(f.u_,{isOpen:G,onClose:H,children:[(0,r.jsx)(h.Z,{}),(0,r.jsxs)(p.h,{children:[(0,r.jsx)(x.x,{children:"Thank you for your trust"}),(0,r.jsxs)(w.f,{children:[(0,r.jsx)(l.x,{children:"We have received your order!"}),(0,r.jsx)(l.x,{children:"We will come back to you in less than 48 hours."})]}),(0,r.jsx)(m.m,{children:(0,r.jsx)(g.z,{variant:"outline",colorScheme:"neutral",onClick:H,children:"Got it!"})})]})]})]})};R.getInitialProps=async e=>{let{query:t}=e;return{query:t}};var z=R},65196:function(e,t,n){"use strict";n.d(t,{k:function(){return l}});var r=n(54465),i=n(50925);let s=null;async function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=(0,i._)();if(!t)return null;for(let n=1;n<=e;n++)try{let e=await (0,r.J)(t);if(e)return e}catch(t){n<e&&await new Promise(e=>setTimeout(e,1500))}return null}function l(){return s||(s=o().then(e=>(e||(s=null),e))),s}}},function(e){e.O(0,[3422,6528,7410,9774,2888,179],function(){return e(e.s=65549)}),_N_E=e.O()}]);
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.