1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7676],{77676:function(e,a,r){r.r(a);var t=r(85893),d=r(67294);a.default=e=>{let{fields:a,sellerId:r,handleUpdateFields:c}=e;return(0,d.useEffect)(()=>{if(!a.creditCardNumber&&!a.creditCardName&&!a.creditCardValid&&!a.creditCardCod)return;c({creatingToken:!0});let e=setTimeout(async()=>{let e=null,t=!1;try{var d,i;if(!/^(\d\s?){16}$/.test(a.creditCardNumber)||!function(){var e,r;let t=null===(r=a.creditCardName)||void 0===r?void 0:null===(e=r.split(" "))||void 0===e?void 0:e.filter(e=>e);return(null==t?void 0:t.length)>=2}()||!/^(\d\/?){4}$/.test(a.creditCardValid)||!/\d{3}/.test(a.creditCardCod))return;let c={type:"card",card:{number:a.creditCardNumber.split(" ").join(""),holder_name:a.creditCardName,exp_month:(d=a.creditCardValid,parseInt(d.split("/")[0])),exp_year:(i=a.creditCardValid,parseInt(i.split("/")[1])),cvv:a.creditCardCod}},s=function(e){let a;switch(console.log(">>> isDev",!1),e){case"EJYt3GqeNaTP4U42Wazz":a="pk_75ZVJglcrahYv06G";break;case"N1WyKujDOVFcDI8tsqDf":a="pk_W9zYDqasJhzyByVa";break;case"gRr6qo1UgpZS84soFD9Q":a="pk_q1BdkLsXPFjLNK0E";break;case"Mt2I1V3sc8urKwWnNxwg":a="pk_6qdm7B9fvDIyy4bN";break;case"HOr8E3s13wiORKYlP2GN":a="pk_vYrKyVdcxOIRoAwd";break;case"XKB4F7nTD4ji9qe2PYVd":a="pk_W0zp3dT76SaYvr7j";break;case"cr4O0k3kyqG2DtebPDaU":a="pk_j4xG0bA1tJSOpMAB";break;case"CSckZTh96KCTIpKa0aoW":a="pk_rNWMPlbs9mIkVRGo";break;case"Ldk2PouQ0kk4dj84YC2G":a="pk_xGlbvaiwMhLR2jnD";break;case"3EDqy9l8DncDqA6EHbR5":a="pk_AmjVEbLtqHNv53Wn";break;case"RGla1O0CkQZDfJGkQ3oJ":a="pk_XEoVwak8fRso6P4N";break;case"P8OPITpuFyJNIfnjeEHg":a="pk_NOg8LoviXlTRzK2d";break;case"ZjvH7VbGGkUZHWJRJw1J":a="pk_yqRNDe6UPgun7k61";break;case"TIsHqxKia2YEXEQMzR2A":a="pk_1owBZMyVUDuLZdP8";break;case"Fj31tMdCwB3tiGBZkKsj":a="pk_4j5oZM5TgfQZpLbd";break;case"Lk7dhSpmUyCyvUgxioi5":a="pk_z0lA5vgSrQsg4ode";break;case"pEsbdFLAqVFFZw3pLtMd":a="pk_KPYdVWauvHDpyaj5"}return a}(r),k=await fetch("https://api.pagar.me/core/v5/tokens?appId=".concat(s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});e=(k=await k.json()).id,t=!0}catch(e){console.log(e)}finally{c({paymentToken:e,creatingToken:!1,tokenIsValid:!!e,triedGettingToken:t})}},500);return()=>clearTimeout(e)},[a.creditCardNumber,a.creditCardName,a.creditCardValid,a.creditCardCod]),(0,t.jsx)("div",{})}}}]);
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.