PageSourceSearch

https://app.adcero.io/_next/static/chunks/26901-eabf6da289f35bd4.js

js adcero.io collected 2026-10-02 01:59:38 UTC 7,632 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26901],{46276:(t,e,a)=>{a.d(e,{dj:()=>l,oR:()=>d});var n=a(12115);let o=0,r=new Map,i=t=>{if(r.has(t))return;let e=setTimeout(()=>{r.delete(t),u({type:"REMOVE_TOAST",toastId:t})},1e6);r.set(t,e)},s=[],c={toasts:[]};function u(t){c=((t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,5)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case"DISMISS_TOAST":{let{toastId:a}=e;return a?i(a):t.toasts.forEach(t=>{i(t.id)}),{...t,toasts:t.toasts.map(t=>t.id===a||void 0===a?{...t,open:!1}:t)}}case"REMOVE_TOAST":if(void 0===e.toastId)return{...t,toasts:[]};return{...t,toasts:t.toasts.filter(t=>t.id!==e.toastId)}}})(c,t),s.forEach(t=>{t(c)})}function d(t){let{...e}=t,a=(o=(o+1)%Number.MAX_VALUE).toString(),n=()=>u({type:"DISMISS_TOAST",toastId:a});return u({type:"ADD_TOAST",toast:{...e,id:a,open:!0,onOpenChange:t=>{t||n()}}}),{id:a,dismiss:n,update:t=>u({type:"UPDATE_TOAST",toast:{...t,id:a}})}}function l(){let[t,e]=n.useState(c);return n.useEffect(()=>(s.push(e),()=>{let t=s.indexOf(e);t>-1&&s.splice(t,1)}),[t]),{...t,toast:d,dismiss:t=>u({type:"DISMISS_TOAST",toastId:t})}}},76344:(t,e,a)=>{a.d(e,{BU:()=>g,Xt:()=>y,VR:()=>h,fh:()=>o.fh,Cz:()=>o.Cz,yh:()=>p,HN:()=>f,wp:()=>w,D1:()=>S,b9:()=>m,Lq:()=>O});var n=a(976),o=a(4213),r=a(99914),i=a(99776),s=a(80549),c=a(38535),u=a(40399),d=a(50088),l=a(92077);function y(){let t=(0,i.jE)();return(0,s.n)({mutationFn:async t=>{let{adAccountId:e,organizationId:a,platform:n,purgeData:o}=t,i=await (0,r.getAuthHeaders)(),s=await fetch("/api/organization/".concat(a,"/accounts"),{method:"DELETE",headers:i,body:JSON.stringify({adAccountId:e,platform:n,purgeData:null!=o&&o})});if(!s.ok){let t=await s.json();throw Error(t.reason||t.error||"Failed to disconnect account")}return{adAccountId:e,organizationId:a,platform:n}},onMutate:async e=>{let{adAccountId:a,organizationId:o,platform:r}=e;await t.cancelQueries({queryKey:n.O.accounts(o)});let i=t.getQueryData(n.O.accounts(o));return t.setQueryData(n.O.accounts(o),t=>t?t.filter(t=>t.ad_account_id!==a||t.platform!==r):[]),{previousAccounts:i,organizationId:o}},onSuccess:t=>{var e,a,n;let o=c.$.getState(),r=(null==(e=o.selectedAccount)?void 0:e.organization_id)===t.organizationId&&(null==(a=o.selectedAccount)?void 0:a.ad_account_id)===t.adAccountId&&(null==(n=o.selectedAccount)?void 0:n.platform)===t.platform;o.removeAccountFromOrganization(t.organizationId,t.adAccountId,t.platform);let i=u.Jv.getState();i.clearCacheForOrganization(t.organizationId),r&&"meta"===(0,d.FL)(t.platform)&&(i.updateConfig({adAccountId:null,businessId:null,currency:"USD"}),i.clearAllCache())},onError:(e,a,o)=>{(null==o?void 0:o.previousAccounts)&&t.setQueryData(n.O.accounts(o.organizationId),o.previousAccounts)},onSettled:(e,a,o)=>{t.invalidateQueries({queryKey:n.O.accounts(o.organizationId)}),t.removeQueries({queryKey:["onboarding-sync-check",o.organizationId]}),(0,l.V)(o.organizationId)}})}function m(){let t=(0,i.jE)();return(0,s.n)({mutationFn:async t=>{let{adAccountId:e,organizationId:a,platform:n}=t,o=await (0,r.getAuthHeaders)(),i=await fetch("/api/organization/".concat(a,"/accounts/set-primary"),{method:"POST",headers:o,body:JSON.stringify({adAccountId:e,platform:n})});if(!i.ok){let t=await i.json();throw Error(t.reason||t.error||"Failed to set primary account")}return{adAccountId:e,organizationId:a,platform:n}},onSuccess:(e,a)=>{t.invalidateQueries({queryKey:n.O.accounts(a.organizationId)}),(0,l.V)(a.organizationId)}})}function g(){let t=(0,i.jE)();return(0,s.n)({mutationFn:async t=>{let{adAccountId:e,organizationId:a,platform:n,action:o}=t,i=await (0,r.getAuthHeaders)(),s=await fetch("/api/organization/".concat(a,"/accounts/archive"),{method:"POST",headers:i,body:JSON.stringify({adAccountId:e,platform:n,action:o})});if(!s.ok){let t=await s.json();throw Error(t.reason||t.error||"Failed to ".concat(o," account"))}return{adAccountId:e,organizationId:a,platform:n,action:o,response:await s.json()}},onSuccess:(e,a)=>{t.invalidateQueries({queryKey:n.O.accounts(a.organizationId)}),(0,l.V)(a.organizationId)}})}function f(){let t=(0,i.jE)();return(0,s.n)({mutationFn:async t=>{let{id:e,organizationId:a,newName:n}=t,o=await (0,r.getAuthHeaders)(),i=await fetch("/api/organization/".concat(a,"/accounts"),{method:"PATCH",headers:o,body:JSON.stringify({adAccountId:e,accountName:n})});if(!i.ok){let t=await i.json();throw Error(t.reason||t.error||"Failed to rename account")}return{id:e,organizationId:a,newName:n}},onMutate:async e=>{let{id:a,organizationId:o,newName:r}=e;await t.cancelQueries({queryKey:n.O.accounts(o)});let i=t.getQueryData(n.O.accounts(o));return t.setQueryData(n.O.accounts(o),t=>t?t.map(t=>
1t.id===a?{...t,account_name:r}:t):[]),{previousAccounts:i,organizationId:o}},onError:(e,a,o)=>{(null==o?void 0:o.previousAccounts)&&t.setQueryData(n.O.accounts(o.organizationId),o.previousAccounts)},onSettled:(e,a,o)=>{t.invalidateQueries({queryKey:n.O.accounts(o.organizationId)}),(0,l.V)(o.organizationId)}})}function h(){let t=(0,i.jE)();return(0,s.n)({mutationFn:async t=>{let{organizationId:e,...a}=t,n=await (0,r.getAuthHeaders)(),o=await fetch("/api/organization/".concat(e,"/members/invite"),{method:"POST",headers:n,body:JSON.stringify(a)});if(!o.ok){let t=await o.json();throw Error(t.reason||t.error||"Failed to invite member")}return o.json()},onSuccess:(e,a)=>{var o;(null==e||null==(o=e.data)?void 0:o.directlyAdded)&&t.invalidateQueries({queryKey:n.O.members(a.organizationId)}),t.invalidateQueries({queryKey:n.O.invitations(a.organizationId)})}})}function w(){let t=(0,i.jE)();return(0,s.n)({mutationFn:async t=>{let{invitationId:e,organizationId:a,organizationName:n,inviterName:o}=t,i=await (0,r.getAuthHeaders)(),s=await fetch("/api/organization/".concat(a,"/members/invitations/").concat(e,"/resend"),{method:"POST",headers:i,body:JSON.stringify({organizationName:n,inviterName:o})});if(!s.ok){let t=await s.json();throw Error(t.reason||t.error||"Failed to resend invitation")}return s.json()},onSuccess:(e,a)=>{t.invalidateQueries({queryKey:n.O.invitations(a.organizationId)})}})}function p(){let t=(0,i.jE)();return(0,s.n)({mutationFn:async t=>{let{id:e,organizationId:a}=t,n=await (0,r.getAuthHeaders)(),o=await fetch("/api/organization/".concat(a,"/members/").concat(e),{method:"DELETE",headers:n});if(!o.ok){let t=await o.json();throw Error(t.reason||t.error||"Failed to remove member")}return o.json()},onSuccess:(e,a)=>{t.invalidateQueries({queryKey:n.O.members(a.organizationId)})}})}function O(){let t=(0,i.jE)();return(0,s.n)({mutationFn:async t=>{let{id:e,role:a,organizationId:n}=t,o=await (0,r.getAuthHeaders)(),i=await fetch("/api/organization/".concat(n,"/members/").concat(e),{method:"PATCH",headers:o,body:JSON.stringify({role:a})});if(!i.ok){let t=await i.json();throw Error(t.reason||t.error||"Failed to update member role")}return i.json()},onSuccess:(e,a)=>{t.invalidateQueries({queryKey:n.O.members(a.organizationId)})}})}function S(){let t=(0,i.jE)();return(0,s.n)({mutationFn:async t=>{let{id:e,organizationId:a}=t,n=await (0,r.getAuthHeaders)(),o=await fetch("/api/organization/".concat(a,"/members/invitations/").concat(e),{method:"DELETE",headers:n});if(!o.ok){let t=await o.json();throw Error(t.reason||t.error||"Failed to revoke invitation")}return o.json()},onSuccess:(e,a)=>{t.invalidateQueries({queryKey:n.O.invitations(a.organizationId)})}})}},92077:(t,e,a)=>{a.d(e,{V:()=>n});function n(t){window.dispatchEvent(new CustomEvent("organizations:reload",{detail:{scope:"accounts",organizationId:t}}))}}}]);

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.