1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="715ec018-ae4b-44c6-8b4f-c392b5438623",e._sentryDebugIdIdentifier="sentry-dbid-715ec018-ae4b-44c6-8b4f-c392b5438623")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"3760dda84a44d22ec6850d035e472fc941129756"},(self.webpackChunkleadsbridge=self.webpackChunkleadsbridge||[]).push([[8350],{7485:(e,t,i)=>{i.d(t,{Ax:()=>l,ep:()=>a,fB:()=>s,kq:()=>r,vZ:()=>o});var n=i(89526);const o=({initialData:e,popup:t})=>{if(!e)return;const i=Object.assign(Object.assign({},e),{isLbMessage:!0});setTimeout((()=>{t.postMessage(i,"https://app.leadsbridge.com")}),1500)},d="https://leadsbridge.com,https://app.leadsbridge.com".split(",").map((e=>e.trim())).filter(Boolean),a=e=>{const[t,i]=(0,n.useState)(),o=function(e){if(d.includes(e.origin)&&e.data.isLbMessage){const t=e.data;null!==e.source&&"name"in e.source&&(t.role=e.source.name),i(t)}};return(0,n.useEffect)((()=>(e&&window.addEventListener("message",o),()=>window.removeEventListener("message",o))),[e]),{dataFromPopup:t}},s=(e,t)=>{const i=((e,t)=>{const i=void 0!==window.screenLeft?window.screenLeft:window.screenX,n=void 0!==window.screenTop?window.screenTop:window.screenY,o=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,d=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,a=o/window.screen.availWidth;return{left:(o-e)/2/a+i,top:(d-t)/2/a+n}})(e,t),n={scrollbars:"no",resizable:"no",status:"no",toolbar:"no",menubar:"no",width:e,height:t,left:i.left,top:i.top};return Object.keys(n).map((e=>`${e}=${n[e]}`)).join(",")},r=()=>{const e=window.screen.availWidth;return 900>e?95*e/100:900},l=()=>{const e=window.screen.availHeight;return 700>e?90*e/100:700}},94758:(e,t,i)=>{i.d(t,{B6:()=>s,VR:()=>a,ph:()=>d});var n=i(59934),o=i(30808);const d=e=>{const t=e&&e.attributes&&e.attributes["custom:legacySlaveUserId"]?"SUID-"+e.attributes["custom:legacySlaveUserId"]:"SUID-0";return{userId:"SUID-0"===t?e&&e.attributes&&e.attributes["custom:legacyUserId"]?"UID-"+e.attributes["custom:legacyUserId"]:"UID-0":t,accountId:(null==e?void 0:e.attributes)&&e.attributes["custom:legacyUserId"]}},a=(e,t)=>{var i,n,o,d,a,s,r;const l=t?{appId:e[t].appId,appName:e.ui&&(null===(i=e.ui[t])||void 0===i?void 0:i.selectedAppName),integrationId:e[t].integrationId,integrationName:e.ui&&(null===(n=e.ui[t])||void 0===n?void 0:n.selectedIntegrationName)}:{};return Object.assign({sourceAppId:e.source.appId,sourceAppName:null===(d=null===(o=e.ui)||void 0===o?void 0:o.source)||void 0===d?void 0:d.selectedAppName,destinationAppId:e.destination.appId,destinationAppName:null===(s=null===(a=e.ui)||void 0===a?void 0:a.destination)||void 0===s?void 0:s.selectedAppName,bridgeId:null===(r=e.ui)||void 0===r?void 0:r.bridgeId,bridgeName:e.name},l)},s=e=>{const t=(0,n.LX)(e,{path:o.VP.pricing.path,exact:!0}),i=(0,n.LX)(e,{path:o.VP.checkout.path,exact:!0});return t?"Table":i?"Checkout":void 0}},97023:(e,t,i)=>{i.d(t,{Y:()=>d});var n=i(23055);const o={[n.j.facebookConversionLeads]:{message:"Your URL is not valid, please check again from App Store or contact support.",link:"https://business.facebook.com/events_manager2/",linkText:"Go back to Meta Events Manager"},[n.j.facebook]:{message:"Your URL is not valid, please check again from App Store or contact support.",link:"https://business.facebook.com/business/app-store/",linkText:"Go back to Meta Business App Store"},[n.j.tiktok]:{message:"Your URL is not valid, please check again from your TikTok for Business dashboard or contact support.",link:"https://www.tiktok.com/business/it/apps/tiktok",linkText:"Go back to TikTok"},[n.j.app]:{message:"Your URL is not valid, please contact support.",link:"https://www.leadsbridge.com",linkText:"Go back to LeadsBridge"}},d=e=>
1o[e]||{message:"Your URL is not valid, please contact support.",link:"https://leadsbridge.com/contact-us/",linkText:"Contact support"}},5633:(e,t,i)=>{i.d(t,{Yc:()=>o,by:()=>n,hz:()=>d});const n=e=>((null==e?void 0:e.data)||[]).map((e=>({id:e.id,label:e.label,value:e.lastValue}))),o=e=>(e||[]).filter((e=>!!e.destinationFieldId)).map((e=>({destinationFieldId:e.destinationFieldId,mappingType:e.mappingType,mapping:[...e.mapping]}))),d=(e,t)=>({fieldsMapping:e.map((e=>{const i=t.find((({destinationFieldId:t})=>t===e.id));return i?i.mapping.some((e=>e.sourceFieldId))?{sourceFieldId:i.message}:{destinationText:i.message}:null}))})},54375:(e,t,i)=>{i.d(t,{Ke:()=>n,XT:()=>d,fM:()=>o});const n=e=>e.mapping.some((e=>{return!!((t=e).sourceFieldId||t.text||(null===(i=t.formula)||void 0===i?void 0:i.id));var t,i})),o=e=>!n(e),d=e=>{const t=(e||[]).filter((e=>e.isRequired));if(!t.length){return(e||[]).every((e=>!n(e)))}return!(!!t.length&&t.every((e=>n(e))))}},3387:(e,t,i)=>{i.d(t,{u:()=>n});const n=e=>{var t;const i=(null==e?void 0:e.id)||0;return 1191===i?"your webhook system":1208===i?"your email system":null!==(t=null==e?void 0:e.name)&&void 0!==t?t:""}},56722:(e,t,i)=>{i.d(t,{Eq:()=>o,G4:()=>n,ZD:()=>a,fS:()=>s,kR:()=>d});const n=["dropdown"],o=["tags"],d=["domain","subdomain"],a=["toggle"],s=["text","number","password","textarea","datetime","code","email","url"]},19830:(e,t,i)=>{i.d(t,{Rg:()=>r,VJ:()=>a,iT:()=>u,lO:()=>c,lS:()=>s});var n=i(6655);const o={password:"",textarea:"",code:"",number:"",datetime:"",domain:"",dropdown:"",email:"",text:"",tags:[],url:"",subdomain:"",toggle:!1,validate_email:"",validate_email_multi:"",google_picker:""},d=e=>{var t;return e.default||0===e.default?e.default:null!==(t=o[e.type])&&void 0!==t?t:""},a=({field:e,existingField:t})=>{var i;return{id:e.id,value:null!==(i=null==t?void 0:t.value)&&void 0!==i?i:d(e),label:e.label,type:e.type,isRequired:e.required,selectValues:e.data,hide:e.hide,default:e.default,tooltip:e.tooltip,docUrl:e.docUrl,hasChild:e.hasChild,format:e.format,refreshable:e.refreshable}},s=(e,t,i)=>({name:(null==i?void 0:i.name)||"",credentials:e.map((e=>{const t=((null==i?void 0:i.credentials)||[]).find((({key:t})=>t===e.id));return a({field:e,existingField:t})})),ui:{existingIntegrationCredentials:(null==i?void 0:i.credentials)||[]}}),r=(e,t)=>{const i=(e.credentials||[]).map((({id:e,value:t,type:i})=>"validate_email_multi"===i&&Array.isArray(t)&&1===t.length&&""===t[0]?{key:e,value:[]}:{key:e,value:t}));return{name:e.name,integrationId:e.integrationId,appId:t,credentials:i}},l=e=>e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t.value})),{}),u=()=>{const e=sessionStorage.getItem(n.E.integrationAuthFlowCredentials);try{return JSON.parse(e||"{}")}catch(e){return[]}},c=({credentials:e,redirectUri:t,appId:i,integrationId:o,isLegacy:d})=>{if(sessionStorage.setItem(n.E.integrationAuthFlowAppId,`${i}`),o&&sessionStorage.setItem("instanceId",`${o}`),d){const n=l(e),d=window.btoa(JSON.stringify(n)),a=t.includes("?"),s=`${t}${a?"&":"?"}providerId=${i}¶ms=${d}`;window.location.href=o?`${s}&instanceId=${o}`:s}else(e=>{const t=l(e);sessionStorage.setItem(n.E.integrationAuthFlowCredentials,JSON.stringify(t))})(e),window.location.href=t}},95345:(e,t,i)=>{i.d(t,{L:()=>n});const n=(e,t)=>{const i=window.opener;if(!i)return!1;const n={isLbMessage:!0,integrationId:e,integrationName:t};return setTimeout((()=>{i.postMessage(n,"*")}),300),!0}},16844:(e,t,i)=>{i.d(t,{K:()=>o,h:()=>n});const n=e=>(e||[]).map((e=>({value:`${e.id}`,parentAppId:e.parentAppId,label:e.name,logoUri:e.logoUriSmall,minimumPlan:e.minimumPlan}))),o=(e,t)=>(t||[]).find((t=>t.value===`${e}`))},73799:(e,t,i)=>{i.d(t,{DT:()=>p,Eq:()=>a,G4:()=>d,Ks:()=>l,VV:()=>u,ZD:()=>s,cT:()=>c,fS:()=>r,kL:()=>o});var n=i(85371);const o=["google_picker"],d=["dropdown"],a=["tags"],s=["toggle"],r=["text","number","password","domain","textarea","datetime","code","email","url","subdomain"],l=e=>(e||[]).map((({id:e,text:t})=>({value:e,label:t}))),u=({type:e,touched:t,errors:i,index:n})=>{var o,d,a;const s=(null===(o=t[e])||void 0===o?void 0:o.settings)&&(null===(d=t[e])||void 0===d?void 0:d.settings)||[],r=(i&&i[e]&&(null===(a=i[e])||void 0===a?void 0:a.settings)||[])[n];return{isTouched:s[n],errorMessage:r,fieldStatus:r?{error:r}:void 0}},c=(e,t)=>{window.FB||n.Z.createScriptFb();const i=e.find((e=>"pageId"===e.key)),o=e.find((e=>"advertiserAdAccountId"===e.key)),d=null==i?void 0:i.value,a=null==o?void 0:o.value;
1if(!d||!a)return;(0,FB.ui)({method:"lead_gen",page_id:d,ad_account_id:a.replace("act_","")},t)},p=(e,t)=>e.map((e=>{const i=t.find((({key:t})=>t===e.id));return i||{key:e.id,value:e.default||0===e.default?e.default:"toggle"!==e.type&&("number"===e.type?0:"")}}))},42822:(e,t,i)=>{i.d(t,{Ab:()=>b,U8:()=>g,pZ:()=>p});var n=i(64874),o=i(18305),d=i(30808),a=i(9834),s=i(18967),r=i(79344),l=i(99012),u=i(26809),c=i(86556);const p=(e,t,i)=>{const{t:a}=(0,n.$)(),s=(0,o.k6)(),r=t?d.VP.nbeeStep1Edit.makeUrl(`${t}`):d.VP.nbeeStep1New.makeUrl(),l=t?d.VP.nbeeStep2.makeUrl(`${t}`):"/";return void 0===e?[]:0===e?[{title:a("nbee.bridgeBuilder.step1Title"),label:a("nbee.bridgeBuilder.step1Title")},{title:a("nbee.bridgeBuilder.step2Title"),label:a("nbee.bridgeBuilder.step2Title")},{title:a("nbee.bridgeBuilder.step3Title"),label:a("nbee.bridgeBuilder.step3Title")}]:1===e?[{title:a("nbee.bridgeBuilder.step1Title"),label:a("nbee.bridgeBuilder.step1Title"),onStepClick:()=>{s.push(r)}},{title:a(i?"nbee.bridgeBuilder.step2TitleWelcome":"nbee.bridgeBuilder.step2Title"),label:a(i?"nbee.bridgeBuilder.step2TitleWelcome":"nbee.bridgeBuilder.step2Title")},{title:a("nbee.bridgeBuilder.step3Title"),label:a("nbee.bridgeBuilder.step3Title")}]:2===e?[{title:a("nbee.bridgeBuilder.step1Title"),label:a("nbee.bridgeBuilder.step1Title"),onStepClick:()=>{s.push(r)}},{title:a("nbee.bridgeBuilder.step2Title"),label:a("nbee.bridgeBuilder.step2Title"),onStepClick:()=>{s.push(l)}},{title:a("nbee.bridgeBuilder.step3Title"),label:a("nbee.bridgeBuilder.step3Title")}]:[]},g=e=>{const t=null==e?void 0:e.data.permissionChecklist;return!(0===(null==t?void 0:t.length)||!(null==e?void 0:e.data.executeCheck))},b=(e,t,i)=>{const n=(0,a.u6)(),p=(0,o.k6)(),g=(0,s.T)(),{mutate:b}=(0,r.g)(),{mutate:m}=(0,l.B)(),v=p.location.pathname,f=()=>{g((0,u.GD)({title:"Error",message:"Bridge update failed. Please try again.",color:"negative"}))};return()=>{const o=(0,c.u)(n.values);e?b({bridgeData:o,bridgeId:`${e}`},{onSuccess:()=>{g((0,u.Rx)(v)),p.push(d.VP.pricing.makeUrlWithState(t,i)),g((0,u.Zy)())},onError:f}):m(o,{onSuccess:e=>{var n,o;const a=null===(o=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.bridge)||void 0===o?void 0:o.id,s=d.VP.nbeeStep1Edit.makeUrl(`${a}`);g((0,u.Rx)(s)),p.push(d.VP.pricing.makeUrlWithState(t,i)),g((0,u.Zy)())},onError:f})}}},48458:(e,t,i)=>{i.d(t,{eG:()=>a,kq:()=>d,nH:()=>o});i(81463),i(73087);var n=i(23055);i(6655);const o=e=>{var t,i,n,o;try{const d=(null===(t=null==e?void 0:e.source)||void 0===t?void 0:t.logo)&&new URL(null===(i=null==e?void 0:e.source)||void 0===i?void 0:i.logo),a=(null===(n=null==e?void 0:e.destination)||void 0===n?void 0:n.logo)&&new URL(null===(o=null==e?void 0:e.destination)||void 0===o?void 0:o.logo),s=(null==e?void 0:e.requestUri)&&new URL(e.requestUri);return Boolean(d&&a&&s)}catch(e){return!1}},d=["NEW","DRAFT"],a={[n.s.tiktok]:"https://ads.tiktok.com"}},30085:(e,t,i)=>{i.d(t,{Hg:()=>l,Ho:()=>r,u2:()=>u});var n=i(26546),o=i(57864),d=i(8921),a=i(59211),s=function(e,t,i,n){return new(i||(i=Promise))((function(o,d){function a(e){try{r(n.next(e))}catch(e){d(e)}}function s(e){try{r(n.throw(e))}catch(e){d(e)}}function r(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}r((n=n.apply(e,t||[])).next())}))};const r=({username:e,idToken:t,accessToken:i,refreshToken:n})=>{const o=new a.AM({UserPoolId:"us-west-2_2xCVfg9gm",ClientId:"5olbat920m5t8rqhjopk1rdf6c"}),d=new a.xk({IdToken:t}),s=new a.ZA({AccessToken:i}),r=new a.bR({RefreshToken:n}),l=new a.ws({Username:e,Pool:o});l.setSignInUserSession(new a.MZ({AccessToken:s,IdToken:d,RefreshToken:r})),l.getCachedDeviceKeyAndPassword()},l=()=>s(void 0,void 0,void 0,(function*(){const e=yield n.g.currentSession().catch((e=>{}));if(!e)return;const t=e.getIdToken().getExpiration(),i=e.getAccessToken().getJwtToken(),a=yield n.g.currentAuthenticatedUser();yield a.getCachedDeviceKeyAndPassword();const s=new o.Z,r={accessToken:i,deviceKey:""},l=t-(new Date).getTime()/1e3;return s.set(d.b.CognitoSession,r,{path:"/",domain:".leadsbridge.com",secure:!0,sameSite:"none",maxAge:l}),r})),u=()=>{const e=(new o.Z).get(d.b.CognitoSession);return e&&"deviceKey"in e&&"accessToken"in e?e:null}}}]); 2//# sourceMappingURL=default-utils.ts-b15c7a147d7527fbc396.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.