1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,835939,e=>{"use strict";let t=e=>String(e).padStart(2,"0");e.s(["SIGNUP_INTERVALS",0,["daily","weekly","monthly"],"SUBSCRIBER_PLANS",0,["pro","solo","free"],"SUBSCRIBER_PLAN_LABELS",0,{free:"Free",solo:"Solo",pro:"Pro"},"SUBSCRIBER_STATUSES",0,["current","all","payment_issue","canceled"],"SUBSCRIBER_VIEWS",0,["subscriptions","beta"],"recentQuarters",0,function(e,s=4){let n=[],i=e.getFullYear(),o=Math.floor(e.getMonth()/3);for(let e=0;e<s;e+=1){let e=3*o+1,s=new Date(Date.UTC(i,e+2,0)).getUTCDate();n.push({label:`Q${o+1} ${i}`,from:`${i}-${t(e)}-01`,to:`${i}-${t(e+2)}-${t(s)}`}),(o-=1)<0&&(o=3,i-=1)}return n},"subscriberMoney",0,function(e,t){return null!=e&&t?new Intl.NumberFormat("en-US",{style:"currency",currency:t,currencyDisplay:"code"}).format(e):"Not available"},"subscriberQuery",0,function(e){return{plans:e.plans.join(","),status:e.status,exclude_internal:e.exclude_internal?"1":"0",exclude_coupons:e.exclude_coupons?"1":"0",q:e.q,sku:e.sku,sort:e.sort,dir:e.dir}},"syncInProgress",0,function(e){return e?.status==="queued"||e?.status==="running"}])},921110,279004,435489,e=>{"use strict";let t=()=>null;function s(e,t){let s="string"==typeof e?.code?e.code:void 0,n="string"==typeof e?.error?e.error:void 0,a=s??n,r="string"==typeof e?.message&&e.message.trim()||s&&n||a&&i[a]||a||o[t]||`Request failed with status ${t}`;return{code:a,message:r,reconnectUrl:"string"==typeof e?.reconnect_url?e.reconnect_url:void 0}}class n extends Error{status;code;details;detail;reconnectUrl;constructor(e,t,s,n,i,o){super(e),this.name="ApiError",this.status=t,this.code=s,this.details=n,this.detail=i,this.reconnectUrl=o}get unauthenticated(){return 401===this.status||"not_authenticated"===this.code}get gateway(){return 0===this.status||502===this.status||503===this.status||504===this.status}}let i={invalid_subscriber_filter:"Choose a valid subscriber filter.",subscriber_sync_unavailable:"Subscriber sync is not configured.",not_authenticated:"You need to be signed in to do that.",reauth_required:"This change needs a recent sign-in. Sign out, sign back in, and try again.",name_required:"Give the token a name.",name_too_long:"Token names are at most 100 characters.",name_reserved:"That name is reserved. Pick another.",name_taken:"You already have a token with that name.",invalid_email:"That doesn't look like an email address.",not_skippable:"That step can't be skipped.",missing_message:"There was nothing to send.",unknown_model:"That model is unavailable â pick another.",chat_payload_too_large:"This conversation is too large to send.",database_read_only:"The site is read-only right now â nothing can be saved.",mailbox_limit_reached:"Your plan covers one connected mailbox, and it is already in use. Disconnect that one first, or upgrade to add another.",gmail_not_approved:"Google is still reviewing our app, so the inbox connection is open to a few accounts at a time right now.",no_root_node:"You don't have a graph yet.",focus_not_found:"That node no longer exists.",not_found:"That object isn't there â it may have been deleted.",missing_name:"Give it a name.",duplicate_email:"Another contact already has that email address.",missing_text:"Write something first.",not_authorized:"That belongs to someone else.",user_not_found:"No account with that email â they need to sign up first.",cannot_share_with_self:"That's you â no need to share with yourself.",invalid_role:"Pick a role for this person.",missing_email:"Enter an email address.",consent_confirmation_required:"Confirm that the user requested account texts before sending a code.",invalid_phone_number:"Enter a valid phone number, like (617) 555-0123.",cannot_use_service_number:"The YouSpot service number cannot be added to a user account.",phone_already_verified:"This phone number is already verified for this account.",phone_verified_elsewhere:"This phone number is already verified on another account.",phone_opted_out:"This number is opted out. Ask the user to text START to the YouSpot number, then try again.",pending_verification_exists:"Another phone number already has a pending verification. Remove it before starting a new one.",verification_rate_limited:"Please wait before requesting another verification code.",verification_send_rejected:"The verification text could not be sent. Check the number and try again.",sms_requires_
1youspot_approval:"Approve this account for YouSpot before starting SMS verification.",sms_requires_account_access:"SMS chat is available after your YouSpot account is approved.",invalid_json:"The request body was invalid. Refresh and try again.",unknown_provider:"That integration does not offer sync options.",account_not_connected:"That account is no longer connected.",unknown_dataset:"That sync option no longer exists. Refresh and try again.",dataset_unavailable:"One of those options isn't available for this account yet.",promo_invalid:"That promo code is not valid any more. Regular prices apply.",promo_plan_mismatch:"That promo code is for a different plan.",invalid_code:"Codes are 3 to 40 letters, numbers, underscores or hyphens.",duplicate_code:"A promo with that code already exists.",promo_changed:"This promo changed while you were editing. Close and reopen it to load the latest values.",promo_code_fixed:"The code stays fixed so existing promo links keep working.",promo_offer_changed:"The offer changed. Refresh the page to review the current pricing before continuing.",invalid_plan:"Pick a plan the promo applies to.",invalid_price:"Enter the price in whole cents, zero or more.",price_not_below_plan:"The promo price has to be below the plan price.",free_has_no_price:"The Free plan is already $0; leave the price empty.",invalid_duration:"Pick the first month, the first 3 months, or ongoing.",invalid_expiry:"The expiry has to be a date in the future.",stripe_rejected:"Could not save the discount. Nothing was changed."},o={502:"The server didn't answer. Try again in a moment.",503:"The service is unavailable right now. Try again in a moment.",504:"The server took too long to answer. Try again in a moment â if you were saving something, check whether it went through before repeating it."};function a(e){if(!e)return"";let t=new URLSearchParams;for(let[s,n]of Object.entries(e))if(null!=n&&""!==n){if(Array.isArray(n)){for(let e of n)""!==e&&t.append(s,e);continue}t.set(s,String(n))}let s=t.toString();return s?`?${s}`:""}class r{prefix;constructor(e="/api"){this.prefix=e}token(){try{return t()}catch{return null}}async request(e,t={}){let i,o,{method:r="GET",body:c,query:l,signal:u,tokenInPayload:d,bearer:p}=t,h=this.token(),g={Accept:"application/json"};h&&(g["X-AgentAI-User-Token"]=h),p&&(g.Authorization=`Bearer ${p}`),c instanceof FormData?(d&&h&&c.set("user_token",h),i=c):(c||d&&"GET"!==r)&&(g["Content-Type"]="application/json",i=JSON.stringify(d?{user_token:h,...c}:c));let m=a(l);try{o=await fetch(`${this.prefix}${e}${m}`,{method:r,headers:g,credentials:"include",body:i,signal:u})}catch(e){throw new n(e instanceof Error&&"AbortError"===e.name?"Request cancelled":"Couldn't reach the server. Check your connection and try again.",0)}let y=await o.text(),f=null;try{f=y?JSON.parse(y):null}catch{f=null}if(!o.ok||f&&!1===f.success){let{code:e,message:t,reconnectUrl:i}=s(f,o.status),a="string"==typeof f?.detail?f.detail:void 0;throw new n(t,o.status,e,f?.details,a,i)}return f??{}}get(e,t={}){return this.request(e,{...t,method:"GET"})}async events(e,t,i={}){let o,{body:r,query:c,signal:l}=i,u=this.token(),d={Accept:"text/event-stream"};u&&(d["X-AgentAI-User-Token"]=u),r&&(d["Content-Type"]="application/json");try{o=await fetch(`${this.prefix}${e}${a(c)}`,{method:"POST",headers:d,credentials:"include",body:r?JSON.stringify(r):void 0,signal:l})}catch(e){throw new n(e instanceof Error&&"AbortError"===e.name?"Request cancelled":"Couldn't reach the server. Check your connection and try again.",0)}if(!o.ok||!o.body||!(o.headers.get("content-type")??"").includes("text/event-stream")){let e=await o.text(),t=null;try{t=e?JSON.parse(e):null}catch{t=null}let{code:i,message:a,reconnectUrl:r}=s(t,o.status);throw new n(a,o.status,i,t?.details,t?.detail,r)}let p=o.body.getReader(),h=new TextDecoder,g="";for(;;){let{done:e,value:s}=await p.read();if(e)break;let n=(g+=h.decode(s,{stream:!0})).indexOf("\n\n");for(;-1!==n;){let e=g.slice(0,n);n=(g=g.slice(n+2)).indexOf("\n\n");let s=e.split("\n").find(e=>e.startsWith("data:"));if(!s)continue;let i=s.slice(5).trim();if("[DONE]"===i)return;t(JSON.parse(i))}}}async bytes(e,t={}){let s,i=this.token(),r={};i&&(r["X-AgentAI-User-Token"]=i);try{s=await fetch(`${this.prefix}${e}${a(t.query)}`,{headers:r,credentials:"include",signal:t.signal})}catch(e){throw new n(e instanceof Error&&"AbortError"===e.name?"Request cancelled":"Couldn't reach the server. Check your connection and try again.",0)}if(!s.ok)throw new n(o[s.status]??`Request failed with status ${s.status}`,s.status);return new Uint8Array(await s.arrayBuffer())}post(e,t,s={}){return this.request(e,{...s,method:"POST",body:t})}put(e,t,s={}){return this.request(e,{...s,method:"PUT",body:t})}patch(e,t,s={}){return this.request(e,{...s,method:"PATCH",body:t})}delete(e,t={}){return this.request(e,{...t,method:"DELETE"})}}function c(e){return new Promise((t,s)=>{let n=new FileReader;n.onload=()=>"string"==typeof n.result?t(n.result):s(Error("Failed to read file")),n.onerror=()=>s(Error("Failed to read file")),n.onabort=()=>s(Error("File reading was cancelled")),n.readAsDataURL(e)})}async function l(e,t=3145728){return d(await c(e),t)}function u(e){let t=e.slice(e.indexOf(",")+1),s=t.endsWith("==")?2:+!!t.endsWith("=");return Math.floor(3*t.length/4)-s}async function d(e,t=3145728){let s=await new Promise((t,s)=>{let n=new window.Image;n.onload=()=>t(n),n.onerror=()=>s(Error("Failed to load image")),n.src=e}),{width:n,height:i}=s;if(n<=0||i<=0)throw Error("Failed to load image");if(n<=2048&&i<=2048&&u(e)<=t)return e;if(n>2048||i>2048){let e=Math.min(2048/n,2048/i);n=Math.round(n*e),i=Math.round(i*e)}let o=document.createElement("canvas");o.width=n,o.height=i;let a=o.getContext("2d");if(!a)throw Error("Failed to prepare image");a.drawImage(s,0,0,n,i);let r=.9,c=o.toDataURL("image/jpeg",r);for(;u(c)>t&&r>.5;)r=Math.max(.5,r-.1),c=o.toDataURL("image/jpeg",r);if(u(c)>t)throw Error("This image is too large. Please choose a smaller version.");return c}function p(e){let t={image:e,type:"uploaded"};if(new TextEncoder().encode(JSON.stringify(t)).byteLength>44e5)throw Error("This image is too large. Please choose a smaller version.");return t}e.s(["ApiClient",0,r,"ApiError",0,n,"setTokenProvider",0,function(e){t=e}],921110),e.s(["dataUrlBytes",0,u,"readImageFile",0,c,"resizeDataUrl",0,d,"resizeImageFile",0,l,"uploadImageBody",0,p],279004);let h=new r("");async function g(e,t){let s=t?.signal?AbortSignal.any([t.signal,AbortSignal.timeout(t.timeoutMs??12e4)]):AbortSignal.timeout(t?.timeoutMs??12e4),i=await h.request("/imagegen/api/generate",{method:"POST",body:e,signal:s});
1if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);if(!i.url)throw new n("The image could not be saved. Please try again.",502);if(!i.image)throw new n("The saved image is missing. Please refresh your gallery before trying again.",502);return i}async function m(e,t){let s=p(await d(e)),i=await h.request("/imagegen/api/upload-image",{method:"POST",body:s,signal:t?.signal});if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);if(!i.url)throw new n("The image could not be saved. Please try again.",502);return i}async function y(e,t){let s=await h.request("/imagegen/api/import-url",{method:"POST",body:{url:e},signal:t?.signal});if(!s.success)throw new n("The server returned an invalid response. Please try again.",502);if(!s.url)throw new n("The image could not be saved. Please try again.",502);return s}async function f(e){let t=await h.request("/api/imagegen/favorites",{method:"GET",signal:e?.signal});if(!t.success)throw new n("The server returned an invalid response. Please try again.",502);return t}async function v(e){let t=await h.request("/api/imagegen/elements",{method:"GET",signal:e?.signal});if(!t.success)throw new n("The server returned an invalid response. Please try again.",502);return t}async function b(e,t){let s=await h.request("/api/imagegen/elements",{method:"POST",body:e,signal:t?.signal});if(!s.success)throw new n("The server returned an invalid response. Please try again.",502);return s}async function k(e,t,s){let i=`/api/imagegen/elements/${e}/files`,o=await h.request(i,{method:"POST",body:t,signal:s?.signal});if(!o.success)throw new n("The server returned an invalid response. Please try again.",502);return o}async function w(e,t,s){let i=`/api/imagegen/elements/${e}/files/${t}`,o=await h.request(i,{method:"DELETE",signal:s?.signal});if(!o.success)throw new n("The server returned an invalid response. Please try again.",502);return o}async function _(e){let t=await h.request("/api/imagegen/generators",{method:"GET",signal:e?.signal});if(!t.success)throw new n("The server returned an invalid response. Please try again.",502);return t}async function P(e,t){let s=`/api/imagegen/generators/${e}`,i=await h.request(s,{method:"GET",signal:t?.signal});if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);return i}async function I(e,t){let s=await h.request("/api/imagegen/generators",{method:"POST",body:e,signal:t?.signal});if(!s.success)throw new n("The server returned an invalid response. Please try again.",502);return s}async function T(e,t,s){let i=`/api/imagegen/generators/${e}`,o=await h.request(i,{method:"PUT",body:t,signal:s?.signal});if(!o.success)throw new n("The server returned an invalid response. Please try again.",502);return o}async function $(e,t){let s=`/api/imagegen/generators/${e}`,i=await h.request(s,{method:"DELETE",signal:t?.signal});if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);return i}async function q(e,t){let s=`/api/imagegen/generators/${e}/images`,i=await h.request(s,{method:"GET",signal:t?.signal});if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);return i}async function S(e,t,s){let i=new FormData;i.append("generator_id",e),i.append("file",t,t.name);let o=await h.request("/api/imagegen/generators/upload-image",{method:"POST",body:i,signal:s?.signal});if(!o.success)throw new n("The server returned an invalid response. Please try again.",502);return o}async function C(e,t){let s=`/api/imagegen/generator-images/${e}`,i=await h.request(s,{method:"DELETE",signal:t?.signal});if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);return i}async function R(e,t){let s=`/api/imagegen/generators/${e}/share`,i=await h.request(s,{method:"POST",signal:t?.signal});if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);return i}async function U(e,t){let s=`/api/imagegen/generator-shares/${e}`,i=await h.request(s,{method:"GET",signal:t?.signal});
1if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);return i}async function x(e,t){let s=`/imagegen/api/shared-generator/${e}`,i=await h.request(s,{method:"GET",signal:t?.signal});if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);return i}async function E(e,t,s){let i=`/api/imagegen/elements/${e}`,o=await h.request(i,{method:"PUT",body:t,signal:s?.signal});if(!o.success)throw new n("The server returned an invalid response. Please try again.",502);return o}async function A(e,t){let s=`/api/imagegen/elements/${e}`,i=await h.request(s,{method:"DELETE",signal:t?.signal});if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);return i}async function j(e,t){let s=await h.request("/imagegen/api/toggle-favorite",{method:"POST",body:{image_id:e},signal:t?.signal});if(!s.success)throw new n("The server returned an invalid response. Please try again.",502);return s}async function G(e,t){let s=`/imagegen/api/images/${e}/share`,i=await h.request(s,{method:"POST",signal:t?.signal});if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);return i}async function F(e,t){let s=`/imagegen/api/images/${e}`;t?.shareToken&&(s+=`?share_token=${encodeURIComponent(t.shareToken)}`);let i=await h.request(s,{method:"GET",signal:t?.signal});if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);return i}async function O(e){let t=e?.limit||5,s=e?.offset||0,i=`/api/imagegen/history?limit=${t}&offset=${s}`,o=await h.request(i,{method:"GET",signal:e?.signal});if(!o.success)throw new n("The server returned an invalid response. Please try again.",502);return o}async function D(e){let t=await h.request("/imagegen/api/admin/check-prompt",{method:"POST",body:{prompt:e.prompt,...e.imageId?{image_id:e.imageId}:{}},signal:e?.signal});if(!t.success)throw new n("The server returned an invalid response. Please try again.",502);return t}async function L(e){let t=e?.limit||20,s=e?.offset||0,i=`/imagegen/api/admin/gallery?limit=${t}&offset=${s}`,o=await h.request(i,{method:"GET",signal:e?.signal});if(!o.success)throw new n("The server returned an invalid response. Please try again.",502);return o}async function B(e,t){let s=`/api/imagegen/favorites/${encodeURIComponent(e)}`,i=await h.request(s,{method:"DELETE",signal:t?.signal});if(!i.success)throw new n("The server returned an invalid response. Please try again.",502);return i}async function N(e){let t=await h.request("/imagegen/api/user-status",{method:"GET",signal:e?.signal});if(!t.success)throw new n("The server returned an invalid response. Please try again.",502);return t}async function M(e){let t="/imagegen/api/prompt-examples",s=new URLSearchParams;e?.category&&s.set("category",e.category),e?.limit&&s.set("limit",String(e.limit));let i=s.toString();i&&(t+=`?${i}`);let o=await h.request(t,{method:"GET",signal:e?.signal});if(!o.success)throw new n("The server returned an invalid response. Please try again.",502);return o}async function z(e){let t=e?.limit||50,s=e?.offset||0,i=`/imagegen/api/public-examples?limit=${t}&offset=${s}`,o=await h.request(i,{method:"GET",signal:e?.signal});if(!o.success)throw new n("The server returned an invalid response. Please try again.",502);return o}async function W(e,t){let s=await h.request("/imagegen/api/admin/toggle-public-example",{method:"POST",body:{image_id:e},signal:t?.signal});if(!s.success)throw new n("The server returned an invalid response. Please try again.",502);return s}e.s(["addElementFile",0,k,"checkAdminPromptSafety",0,D,"createElement",0,b,"createGenerator",0,I,"createGeneratorShare",0,R,"createImageShare",0,G,"deleteElement",0,A,"deleteGenerator",0,$,"deleteGeneratorImage",0,C,"fetchAdminGallery",0,L,"fetchElements",0,v,"fetchFavorites",0,f,"fetchGenerator",0,P,"fetchGeneratorImages",0,q,"fetchGenerators",0,_,"fetchPromptExamples",0,M,"fetchPublicExamples",0,z,"fetchRecentImages",0,O,"fetchReferenceBrand",0,function(e,t){return h.get("/api/brandgrader",{query:{domain:e.trim()},signal:t})},"fetchSharedGenerator",0,x,"fetchUserAgentStatus",0,N,"getImage",0,F,"importImageFromUrl",0,y,"removeElementFile",0,w,"removeFavorite",0,B,"requestImageGeneration",0,g,"resolveGeneratorShare",0,U,"toggleFavorite",0,j,"togglePublicExample",0,W,"updateElement",0,E,"updateGenerator",0,T,"uploadGeneratorImage",0,S,"uploadImageReference",0,m],435489)},689605,716309,e=>{"use strict";var t=e.i(921110),s=e.i(435489),n=e.i(835939);function i(e){let t={};for(let s of e??[])s.id&&(t[`f.${s.id}`]=s.value,t[`f.${s.id}.op`]=s.op);return t}function o(e){let{perPage:t,page:s,sort:n,dir:o,q:a,cursor:r,includeFacets:c,filters:l,...u}=e,d={q:a,sort:n,dir:o,page:s,per_page:t,cursor:r??void 0,...i(l)};for(let[e,t]of(!1===c&&(d.include_facets=0),Object.entries(u)))Array.isArray(t)&&t.length&&(d[e]=t.join(","));return d}e.s(["columnFilterParams",0,i,"directoryQuery",0,o,"normalizeDirectoryArgs",0,function(e){let t={};for(let[s,n]of Object.entries(e))if(Array.isArray(n)){if(!n.length)continue;t[s]="filters"===s?n.map(e=>JSON.stringify(e)).sort():[...n].sort()}else null!=n&&""!==n&&(t[s]=n);return t}],716309);let a=new t.ApiClient("/signupagent/api"),r=new t.ApiClient("/execbriefing/api"),c=new t.ApiClient("/hubcode/api");function l(e){let t=new FormData;return t.set("name",e.name),null!==e.description&&t.set("description",e.description),e.file&&t.set("file",e.file),t}class u extends t.ApiClient{imagegen=s;suggestedActions={list:(e={},t=0,s)=>this.get("/suggested-actions",{query:{...e,offset:t},signal:s}),get:(e,t)=>this.get(`/suggested-actions/${encodeURIComponent(e)}`,{signal:t}),prepare:(e,t,s)=>this.post(`/suggested-actions/${encodeURIComponent(e)}/prepare`,{revision:t},{signal:s}),save:(e,t,s,n="editor")=>this.patch(`/suggested-actions/${encodeURIComponent(e)}`,{revision:t,payload:s},{query:{edit_origin:n}}),execute:(e,t)=>
1this.post(`/suggested-actions/${encodeURIComponent(e)}/execute`,{revision:t}),dismiss:(e,t)=>this.post(`/suggested-actions/${encodeURIComponent(e)}/dismiss`,{revision:t}),retry:(e,t)=>this.post(`/suggested-actions/${encodeURIComponent(e)}/retry`,{revision:t})};extension={identity:e=>this.post("/clerk/sync",void 0,{bearer:e}),completeLogin:(e,t)=>this.post("/extension/login/complete",{session_id:e,user_token:t})};faq={list:(e,t)=>this.get("/faq",{signal:t,query:e?{q:e}:{}})};youspot={session:()=>this.get("/session",{tokenInPayload:!0}),state:e=>this.get("/youspot/state",{signal:e}),joinWaitlist:()=>this.post("/youspot/waitlist/join",void 0,{tokenInPayload:!0}),betaStatus:e=>this.post("/beta/status",{email:e}),skipStep:(e,t=!0)=>this.post("/rampup/skip",{step:e,skipped:t},{tokenInPayload:!0}),claimUsername:e=>this.post("/user/username",{username:e},{tokenInPayload:!0}),checkUsername:(e,t)=>this.get("/user/username/check",{query:{username:e},signal:t}),username:e=>this.get("/user/username",{signal:e}),tour:e=>this.get("/youspot/tour",{signal:e}),finishTour:(e,t)=>this.post("/youspot/tour",{outcome:e,step:t}),chooseGoal:(e,t,s)=>this.post("/youspot/goal",{goal:e,...t?{conversation_id:t}:{},surface:s}),dismissGoal:e=>this.post("/youspot/goal/dismiss",{surface:e}),attention:(e={},t)=>this.get("/youspot/attention",{query:{limit:e.limit??5,...e.id?{id:e.id}:{}},signal:t}),firstValue:()=>this.post("/youspot/attention/first-value",void 0),firstRun:()=>this.post("/youspot/first-run",void 0),identity:e=>this.get("/youspot/first-run/identity",{signal:e}),answerIdentity:(e,t,s)=>this.post("/youspot/first-run/identity",{answer:e,conversation_id:t,seconds_shown:s}),orientation:e=>this.post("/youspot/first-run/orientation",{conversation_id:e}),orientationSettled:e=>this.get("/youspot/first-run/orientation",{signal:e}),dismissOrientation:()=>this.post("/youspot/first-run/orientation/dismiss",{}),soloAsk:e=>this.get("/youspot/solo-ask",{signal:e}),finishSoloAsk:e=>this.post("/youspot/solo-ask",{outcome:e}),textAsk:e=>this.get("/youspot/text-ask",{signal:e}),finishTextAsk:e=>this.post("/youspot/text-ask",{outcome:e}),linkedinImportStatus:e=>this.get("/user/linkedin-summary",{signal:e}),linkedinSummary:e=>this.get("/user/linkedin-summary",{signal:e}),gmailAccounts:e=>this.get("/user/integrations/gmail/accounts",{signal:e}),slackAccounts:e=>this.get("/user/integrations/slack/accounts",{signal:e}),slackDisconnect:e=>this.post("/user/integrations/slack/disconnect",{team_id:e}),slackChannel:(e,t)=>this.post("/user/integrations/slack/channels",{channel_id:e,...t}),slackFile:(e,t)=>this.bytes(`/user/integrations/slack/messages/${encodeURIComponent(e)}/files/${encodeURIComponent(t)}`),refreshSlackFiles:e=>this.post(`/user/integrations/slack/messages/${encodeURIComponent(e)}/files/refresh`,{}),saveSlackFile:(e,t)=>this.post(`/user/integrations/slack/messages/${encodeURIComponent(e)}/files/${encodeURIComponent(t)}/save`,{}),linkedinAccounts:e=>this.get("/user/integrations/linkedin/accounts",{signal:e}),linkedinDisconnect:e=>this.post("/user/integrations/linkedin/disconnect",{linkedin_member_id:e},{tokenInPayload:!0}),twitterAccounts:e=>this.get("/user/integrations/twitter/accounts",{signal:e}),twitterDisconnect:e=>this.post("/user/integrations/twitter/disconnect",{twitter_user_id:e},{tokenInPayload:!0})};gmail={contacts:e=>this.get("/user/integrations/gmail/contacts",{signal:e}),capacity:e=>this.get("/user/integrations/gmail/capacity",{signal:e}),disconnect:e=>this.post("/user/integrations/gmail/disconnect",{email_address:e}),sentContactRule:e=>this.get("/user/integrations/gmail/sent-contact-rule",{signal:e}),saveSentContactRule:e=>this.post("/user/integrations/gmail/sent-contact-rule",e),cleanUpSentContacts:()=>this.post("/user/integrations/gmail/sent-contact-rule/cleanup",{})};memories={list:e=>this.get("/user/memories",{signal:e}),add:e=>this.post("/user/memories/add",{content:e}),update:(e,t)=>this.post("/user/memories/update",{memory_id:e,content:t}),remove:e=>this.post("/user/memories/delete",{memory_id:e})};substack={status:e=>this.get("/user/integrations/substack/status",{signal:e}),accounts:e=>this.get("/user/integrations/substack/accounts",{signal:e}),connect:e=>this.post("/user/integrations/substack/connect",e),posts:(e,t)=>{let s=new URLSearchParams;return e.limit&&s.set("limit",String(e.limit)),e.q&&s.set("q",e.q),e.slug&&s.set("slug",e.slug),this.get(`/user/substack/posts?${s}`,{signal:t})},growth:(e,t)=>this.get(`/user/substack/growth?days=${e}`,{signal:t})};granola={status:e=>this.get("/user/integrations/granola/status",{signal:e}),connect:e=>this.post("/user/integrations/granola/connect",e)};connectors={list:e=>this.get("/user/integrations/connectors",{signal:e}),get:(e,t)=>this.get(`/user/integrations/connectors/${e}`,{signal:t}),probe:e=>this.post("/user/integrations/connectors/probe",{url:e}),add:e=>this.post("/user/integrations/connectors",e),update:(e,t,s)=>this.request(`/user/integrations/connectors/${e}`,{method:"PATCH",body:t,bearer:s}),remove:(e,t)=>
1this.delete(`/user/integrations/connectors/${e}`,{bearer:t}),refresh:e=>this.post(`/user/integrations/connectors/${e}/refresh`,{}),updateTool:(e,t,s,n)=>this.request(`/user/integrations/connectors/${e}/tools/${encodeURIComponent(t)}`,{method:"PATCH",body:s,bearer:n}),approveAll:e=>this.post(`/user/integrations/connectors/${e}/approve-all`,{}),calls:(e,t)=>this.get(`/user/integrations/connectors/${e}/calls`,{signal:t}),connect:(e,t={})=>this.post(`/user/integrations/connectors/${e}/connect`,t),callback:e=>this.post("/user/integrations/connectors/callback",e,{tokenInPayload:!0}),appView:(e,t,s)=>this.get(`/user/integrations/connectors/${e}/apps/view`,{query:{uri:t},signal:s}),appCall:(e,t)=>this.post(`/user/integrations/connectors/${e}/apps/call`,t),syncOptions:(e,t)=>this.get(`/user/integrations/connectors/${e}/sync-options`,{signal:t}),saveSyncOptions:(e,t)=>this.post(`/user/integrations/connectors/${e}/sync-options`,t)};social={linkedinPosts:(e,t)=>this.get("/user/linkedin/posts",{signal:t,query:{...e.limit?{limit:e.limit}:{},...e.sort?{sort:e.sort}:{}}}),xPosts:(e,t)=>this.get("/user/x/posts",{signal:t,query:{...e.limit?{limit:e.limit}:{},...e.q?{q:e.q}:{},...e.source?{source:e.source}:{},...e.author?{author:e.author}:{}}}),xPost:(e,t)=>this.get(`/user/x/posts/${encodeURIComponent(e)}`,{signal:t})};calendar={events:(e,t)=>this.get("/user/calendar/events",{signal:t,query:{...e.window?{window:e.window}:{},...e.q?{q:e.q}:{},...e.limit?{limit:e.limit}:{}}})};stats={read:(e,t)=>this.get("/user/stats",{signal:t,query:{source:e.source,days:e.days}})};integrations={linkSlackAccount:e=>this.post("/user/integrations/slack/link",{state:e,confirmed:!0}),status:e=>this.get("/user/integrations/status",{signal:e}),disconnect:(e,t,s)=>this.post("/user/integrations/disconnect",{key:e,account:t.account,confirm:t.confirm},{signal:s,bearer:t.bearer}),connectUrl:(e,t={},s)=>this.get(`/user/integrations/${e}/connect_url`,{query:{...t.loginHint?{login_hint:t.loginHint}:{},...t.returnTo?{return_to:t.returnTo}:{}},signal:s}),exchangeCode:(e,t)=>this.post(`/user/integrations/${e}/exchange`,t,{tokenInPayload:!0}),slackLink:e=>this.post("/user/integrations/slack/link",{state:e},{tokenInPayload:!0}),exchangeGmailCode:(e,t)=>this.post("/user/integrations/gmail/exchange",{code:e,state:t},{tokenInPayload:!0}),syncOptions:(e,t,s)=>this.get(`/user/integrations/${e}/sync-options`,{query:t?{account:t}:{},signal:s}),saveSyncPreferences:(e,t)=>this.post(`/user/integrations/${e}/sync-preferences`,t)};welcome={lookUpProfile:e=>this.post("/welcome/profile",void 0,{bearer:e}),saveWebsite:(e,t)=>this.post("/welcome/website",{website:e},{bearer:t}),confirmProfile:e=>this.post("/welcome/profile/confirm",{confirmed:!0},{bearer:e}),rejectProfile:e=>this.post("/welcome/profile/confirm",{confirmed:!1},{bearer:e})};linkedin={uploadStarted:(e,t)=>this.post("/user/linkedin-upload-started",{filename:e,size_bytes:t},{tokenInPayload:!0}),exportRequested:e=>this.post("/user/linkedin-export-requested",{surface:e},{tokenInPayload:!0}),analyze:(e,t)=>{let s=new FormData;return s.set("filestack_url",e),s.set("filename",t),this.post("/user/linkedin-analyze",s,{tokenInPayload:!0})},load:(e,t,s)=>this.post("/user/linkedin-import",{upload_id:e,datasets:t,...s?{surface:s}:{}},{tokenInPayload:!0}),connections:(e,t)=>this.get("/user/linkedin-connections",{query:e,signal:t,tokenInPayload:!0}),invitations:(e,t)=>this.get("/user/linkedin-invitations",{query:e,signal:t,tokenInPayload:!0}),messages:(e,t)=>this.get("/user/linkedin-messages",{query:e,signal:t,tokenInPayload:!0}),posts:(e,t,s)=>this.get("/user/linkedin-posts",{query:{page:e,per_page:t},signal:s,tokenInPayload:!0}),refreshPosts:()=>this.post("/user/linkedin-posts/refresh",void 0,{tokenInPayload:!0}),scoreMessages:(e,t)=>this.post("/user/linkedin-messages/score",t?{prompt:e,sample:t}:{prompt:e},{tokenInPayload:!0}),messageScoring:e=>this.get("/user/linkedin-messages/scoring",{signal:e,tokenInPayload:!0}),clearMessageScoring:()=>this.delete("/user/linkedin-messages/scoring",{tokenInPayload:!0}),scoreInvitations:(e,t)=>this.post("/user/linkedin-invitations/score",t?{prompt:e,sample:t}:{prompt:e},{tokenInPayload:!0}),invitationScoring:e=>this.get("/user/linkedin-invitations/scoring",{signal:e,tokenInPayload:!0}),clearInvitationScoring:()=>this.delete("/user/linkedin-invitations/scoring",{tokenInPayload:!0})};mcp={createToken:(e,t)=>this.post("/user/integrations/mcp/tokens",{name:e},{bearer:t}),deleteToken:(e,t)=>this.delete(`/user/integrations/mcp/tokens/${e}`,{bearer:t}),rotateBearer:e=>this.post("/user/integrations/mcp/rotate-token",{},{bearer:e})};profile={fields:e=>this.get("/user/profile",{signal:e,tokenInPayload:!0}),deletePreview:e=>this.get("/user/account/delete/preview",{signal:e}),deleteAccount:(e,t,s)=>this.post("/user/account/delete",{confirm_email:e,survey:t},{tokenInPayload:!0,bearer:s}),saveFirstName:e=>this.post("/user/profile",{first_name:e},{tokenInPayload:!0}),saveSocial:e=>this.post("/user/profile",e,{tokenInPayload:!0}),saveWebsite:e=>this.post("/user/profile",{primary_company_domain:e},{tokenInPayload:!0}),saveTimezone:e=>this.post("/user/profile",{timezone:e},{tokenInPayload:!0}),addProduct:e=>this.post("/user/graph-profile/products",{object_id:e}),removeProduct:e=>this.delete(`/user/graph-profile/products/${encodeURIComponent(e)}`)};emails={list:e=>this.get("/user/emails",{signal:e,tokenInPayload:!0}),add:e=>this.post("/user/emails",{email:e},{tokenInPayload:!0}),remove:e=>this.delete(`/user/emails/${e}`),makePrimary:(e,t)=>this.post(`/user/emails/${e}/primary`,void 0,{bearer:t}),sendVerification:e=>this.post("/user/emails/send-verification",{email:e},{tokenInPayload:!0}),hubspotLookup:(e,t)=>this.get("/user/emails/hubspot-lookup",{signal:t,tokenInPayload:!0,query:{email:e}}),linkHubspotAccount:(e,t)=>
1this.post("/user/hubspot-accounts",{email:e,hubspot_user_id:t},{tokenInPayload:!0})};sms={phones:e=>this.get("/user/integrations/sms/phones",{signal:e}),authorize:e=>this.post("/user/integrations/sms/authorize",{phone_number:e.phoneNumber,consent_transactional:e.consentTransactional,consent_promotional:e.consentPromotional}),sendCode:e=>this.post("/user/integrations/sms/send-code",{phone_number:e}),verifyCode:e=>this.post("/user/integrations/sms/verify-code",{code:e}),remove:e=>this.post("/user/integrations/sms/remove",{phone_number:e})};telegram={status:e=>this.get("/user/integrations/telegram/status",{signal:e}),connect:()=>this.post("/user/integrations/telegram/connect",{}),confirm:e=>this.post("/user/integrations/telegram/confirm",e),disconnect:()=>this.post("/user/integrations/telegram/disconnect",{}),retry:e=>this.post("/user/integrations/telegram/retry",e)};imessage={status:e=>this.get("/user/integrations/imessage/status",{signal:e}),sendCode:e=>this.post("/user/integrations/imessage/send-code",{phone_number:e}),resendCode:()=>this.post("/user/integrations/imessage/resend-code"),verifyCode:e=>this.post("/user/integrations/imessage/verify-code",{code:e}),remove:()=>this.post("/user/integrations/imessage/remove"),reportError:(e,t,s,n)=>this.post("/user/integrations/imessage/report-error",{step:e,message:t,status:s,detail:n})};applets={get:(e,t)=>this.get(`/applets/${encodeURIComponent(e)}`,{signal:t})};files={text:async(e,t)=>new TextDecoder().decode(await this.bytes(e.replace(/^\/api(?=\/)/,""),{signal:t})),tree:e=>this.get("/user/files/tree",{signal:e}),move:(e,t)=>this.post("/user/files/move",{from:e,to:t}),share:(e,t)=>
1this.get("/user/files/share",{query:{path:e},signal:t}),createShare:e=>this.post("/user/files/share",{path:e}),revokeShare:e=>this.delete("/user/files/share",{query:{path:e}}),upload:e=>this.post("/user/files/upload",e),filestackKey:()=>this.get("/user/filestack-key",{tokenInPayload:!0})};billing={status:e=>this.get("/billing/status",{signal:e}),promo:(e,t)=>this.get(`/billing/promo/${encodeURIComponent(e)}`,{signal:t}),credits:(e={},t)=>this.get("/credits",{signal:t,tokenInPayload:!0,query:{...e.beforeId?{before_id:e.beforeId}:{},...e.limit?{limit:e.limit}:{}}}),saveCreditSettings:e=>this.post("/credits/settings",{...e},{tokenInPayload:!0}),checkout:e=>this.post("/billing/checkout",e,{tokenInPayload:!0}),upgrade:e=>this.post("/billing/upgrade",{},{tokenInPayload:!0,bearer:e}),downgrade:e=>this.post("/billing/downgrade",{},{tokenInPayload:!0,bearer:e}),cancel:(e,t)=>this.post("/billing/cancel",e,{tokenInPayload:!0,bearer:t}),portal:(e,t)=>this.post("/billing/portal",{return_base:e},{tokenInPayload:!0,bearer:t}
1),claimHubspotPro:()=>this.post("/billing/hubspot-pro/claim",{},{tokenInPayload:!0})};tasks={list:e=>this.get("/user/tasks",{signal:e})};brainExports={capabilities:e=>this.get("/brain/portability/capabilities",{signal:e}),list:e=>this.get("/brain/exports",{signal:e}),create:e=>this.post("/brain/exports",{...e}),cancel:e=>this.post(`/brain/exports/${encodeURIComponent(e)}/cancel`,{}),download:e=>this.get(`/brain/exports/${encodeURIComponent(e)}/download`)};imports={analyze:e=>this.post("/import/analyze",e),mapCsv:e=>this.post("/import/csv/map",e),run:e=>this.post("/import/run",e),runs:e=>this.get("/import/runs",{signal:e})};activity={state:e=>this.get("/user/activity",{signal:e}),markSeen:e=>this.post("/user/activity/seen",{section:e},{tokenInPayload:!0}),log:(e,t,s)=>this.post("/log_activity",{appname:e,activity:t,detail:s},{tokenInPayload:!0})};messages={count:e=>this.get("/user/email/messages/count",{signal:e}),setSpam:(e,t)=>this.post("/user/email/messages/spam",{ids:e,spam:t})};agents={list:e=>this.get("/user/cloudagents",{signal:e,tokenInPayload:!0}),tools:e=>this.get("/user/cloudagents/tools",{signal:e,tokenInPayload:!0}),save:(e,t)=>this.post(null!==t?"/user/cloudagents/update":"/user/cloudagents/add",null!==t?{...e,agent_id:t}:e,{tokenInPayload:!0}),run:e=>this.post("/user/cloudagents/run",{agent_id:e},{tokenInPayload:!0}),setPaused:(e,t)=>this.post("/user/cloudagents/pause",{agent_id:e,paused:t},{tokenInPayload:!0}),traces:(e,t)=>this.get(`/user/cloudagents/${e}/traces`,{signal:t,tokenInPayload:!0}),activity:(e,t)=>this.get("/user/cloudagents/activity",{signal:t,tokenInPayload:!0,query:{agent_id:e.agentId,before:e.before}}),draft:e=>this.post("/user/cloudagents/draft",{description:e},{tokenInPayload:!0}),getDraft:e=>this.get(`/user/cloudagents/drafts/${encodeURIComponent(e)}`,{tokenInPayload:!0}),activateDraft:e=>this.post(`/user/cloudagents/drafts/${encodeURIComponent(e)}/activate`,void 0,{tokenInPayload:!0}),discardDraft:e=>this.post(`/user/cloudagents/drafts/${encodeURIComponent(e)}/discard`,void 0,{tokenInPayload:!0}),remove:e=>this.post("/user/cloudagents/delete",{agent_id:e},{tokenInPayload:!0})};scheduled={list:e=>this.get("/user/scheduled",{signal:e,tokenInPayload:!0}),act:(e,t,s)=>this.post(`/user/scheduled/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,{action:s},{tokenInPayload:!0})};notifications={get:e=>this.get("/user/notifications",{signal:e,tokenInPayload:!0}),update:e=>this.post("/user/notifications",e,{tokenInPayload:!0})};trackers={run:e=>this.post(`/graph/trackers/${encodeURIComponent(e)}/run`,void 0,{tokenInPayload:!0})};brainAnalysis={settings:e=>this.get("/graph/intelligence-settings",{signal:e}),updateSettings:e=>this.patch("/graph/intelligence-settings",e)};spaces={list:e=>this.get("/user/spaces",{signal:e,tokenInPayload:!0}),create:(e,t)=>this.post("/user/spaces/create",t?{name:e,username:t}:{name:e},{tokenInPayload:!0}),switch:e=>this.post("/user/spaces/switch",{space_id:e},{tokenInPayload:!0}),rename:(e,t)=>this.post("/user/spaces/update",{space_id:e,name:t},{tokenInPayload:!0}),team:e=>this.get("/user/spaces/team",{signal:e,tokenInPayload:!0}),invite:(e,t)=>this.post("/user/spaces/team/invite",{email_or_username:e,role:t},{tokenInPayload:!0}),removeMember:e=>this.post("/user/spaces/team/remove",{member_id:e},{tokenInPayload:!0}),setMemberRole:(e,t)=>this.post("/user/spaces/team/role",{member_id:e,role:t},{tokenInPayload:!0}),revokeInvite:e=>this.post("/user/spaces/invites/revoke",{invite_id:e},{tokenInPayload:!0}),invitePreview:(e,t)=>this.get("/user/spaces/invites/preview",{signal:t,tokenInPayload:!0,query:{token:e}}),acceptInvite:e=>this.post("/user/spaces/invites/accept",{token:e},{tokenInPayload:!0})};admin={overview:(e,t)=>this.get("/admin/overview",{query:{scope:e},signal:t}),users:(e,t,s)=>this.get("/admin/users",{query:{...e,offset:t,limit:50},signal:s}),userConnectors:(e,t)=>this.get(`/admin/users/${e}/connectors`,{signal:t}),subscribers:(e,t,s)=>this.get("/admin/subscribers",{query:{...(0,n.subscriberQuery)(e),offset:t,limit:25},signal:s}),subscriberTrends:(e,t)=>this.get("/admin/subscribers/trends",{query:(0,n.subscriberQuery)(e),signal:t}),subscriberSyncStatus:e=>this.get("/admin/subscribers/sync",{signal:e}),hubspotOfferTotals:e=>this.get("/admin/subscribers/hubspot-offer",{signal:e}),syncSubscribers:()=>this.post("/admin/subscribers/sync"),exportSubscribers:e=>this.get("/admin/subscribers/export",{query:(0,n.subscriberQuery)(e)}),financeExport:e=>this.get("/admin/subscribers/finance-export",{query:e}),refreshFinanceHubspot:e=>this.post("/admin/subscribers/finance-export/hubspot-refresh",void 0,{query:e}),user:(e,t)=>this.get(`/admin/users/${encodeURIComponent(e)}`,{signal:t}),sentEmail:(e,t)=>this.get(`/admin/emails_sent/${e}`,{signal:t}),tasks:(e,t)=>this.get("/admin/tasks"+(e?`?user=${encodeURIComponent(e)}`:""),{signal:t}),requeueTask:e=>this.post(`/admin/tasks/${e}/requeue`),cancelTask:e=>this.post(`/admin/tasks/${e}/cancel`),setTaskPriority:(e,t)=>this.post(`/admin/tasks/${e}/priority`,{priority:t}),requeueDeadTasks:e=>this.post("/admin/tasks/requeue-dead",{...e}),promos:e=>this.get("/admin/promos",{signal:e}),createPromo:e=>this.post("/admin/promos",{...e}),updatePromo:(e,t)=>this.post(`/admin/promos/${e}`,{...t}),setPromoActive:(e,t)=>
1this.post(`/admin/promos/${e}/status`,{active:t}),feedback:(e,t)=>this.get(`/admin/feedback/${e}`,{signal:t}),replyToFeedback:(e,t)=>this.post(`/admin/feedback/${e}/reply`,{body:t}),setFeedbackStatus:(e,t)=>this.post(`/admin/feedback/${e}/status`,{status:t}),inbox:(e,t,s)=>this.get("/admin/inbox",{query:{...e,offset:t,limit:50},signal:s}),inboxRow:(e,t,s)=>this.get(`/admin/inbox/${e}/${encodeURIComponent(t)}`,{signal:s}),sweepSupportSpam:()=>this.post("/admin/support/sweep-spam"),inboxDraft:(e,t,s)=>this.get(`/admin/inbox/${e}/${encodeURIComponent(t)}/linear`,{signal:s}),sendInboxToLinear:(e,t,s)=>this.post(`/admin/inbox/${e}/${encodeURIComponent(t)}/linear`,s),resolveInbox:(e,t)=>this.post(`/admin/inbox/${e}/${encodeURIComponent(t)}/resolve`),intakeBackfill:e=>this.get("/admin/intake/backfill",{signal:e}),startIntakeBackfill:e=>this.post("/admin/intake/backfill",{mode:e}),startSmsVerification:(e,t)=>this.post(`/admin/users/${encodeURIComponent(e)}/sms/verification`,t),removeSmsPhone:(e,t)=>this.post(`/admin/users/${encodeURIComponent(e)}/sms/remove`,{phone_number:t}),betaApplications:(e,t,s)=>this.get("/admin/beta/applications?"+new URLSearchParams({status:e.status,...e.q?{q:e.q}:{},sort:e.sort,dir:e.dir,...t?{cursor:t}:{}}).toString(),{signal:s}),approveBeta:e=>this.post(`/admin/beta/applications/${e}/approve`),approveGmail:e=>this.post(`/admin/beta/applications/${e}/gmail-approve`),approveHubspotSync:e=>this.post(`/admin/beta/applications/${e}/hubspot-sync-approve`),checkGmail:e=>this.post(`/admin/user/${e}/gmail-check`),resendConfirmation:e=>this.post(`/admin/beta/applications/${e}/resend-confirmation`),nudge:e=>this.post(`/admin/beta/applications/${e}/nudge`),onboardingCopy:e=>this.get("/admin/onboarding/copy",{signal:e}),setOnboardingCopy:(e,t)=>this.put("/admin/onboarding/copy",{path:e,text:t})};onboarding={copy:e=>this.get("/onboarding/copy",{signal:e})};hubspot={contacts:({offset:e,limit:t,q:s,sort:n,order:i,portalId:o},a)=>this.get("/hubspot/contacts",{signal:a,tokenInPayload:!0,query:{offset:e,limit:t,q:s,sort:n,order:i,portal_id:o}}),companies:({offset:e,limit:t,q:s,sort:n,order:i,portalId:o},a)=>this.get("/hubspot/companies",{signal:a,query:{offset:e,limit:t,q:s,sort:n,order:i,portal_id:o}}),disconnect:(e,t)=>this.post("/user/integrations/hubspot/disconnect",{hub_id:e,keep_records:t},{tokenInPayload:!0}),importPortals:e=>this.get("/hubspot/import/portals",{signal:e}),importCount:(e,t,s)=>this.get("/hubspot/import/count",{query:{hub_id:e,..."companies"===t?{object:t}:{}},signal:s}),importStarted:(e,t)=>this.post("/hubspot/import/started",{hub_id:e,...t}),importPage:(e,t,s,n)=>this.post("/hubspot/import/page",{hub_id:e,after:s,page_size:n,..."companies"===t?{object:t}:{}})};prospectFinder={search:({query:e,industries:t,pageSize:s},n)=>this.post("/prospectfinder/search",{query:e.trim(),page_size:s??25,...t?.length?{industries:t}:{}},{signal:n}),buildPrompt:e=>this.post("/prospectfinder/build-prompt",e),training:e=>this.post("/prospectfinder/training",{},{signal:e}),votes:(e,t)=>this.post("/prospectfinder/votes",{domains:e},{signal:t}),castVote:({domain:e,vote:t,companyData:s,reason:n})=>this.post("/prospectfinder/vote",{domain:e,vote:t,...s?{company_data:s}:{},...n?{reason:n}:{}}),deleteVote:e=>this.post("/prospectfinder/vote/delete",{domain:e}),recentReasons:e=>this.post("/prospectfinder/recent-reasons",{},{signal:e}),smartSource:()=>this.post("/prospectfinder/smartsource",{}),nearbyCity:e=>this.post("/prospectfinder/geo-lookup",{},{signal:e}),industries:e=>this.post("/prospectfinder/industries",{},{signal:e}),addToHubSpot:e=>this.post("/hubspot/add_company",{company:{domain:e}})};signupAgent={list:e=>a.get("/signups",{signal:e}),create:e=>a.post("/signups",l(e)),update:(e,t)=>a.request(`/signups/${e}`,{method:"PUT",body:l(t)}),remove:e=>a.delete(`/signups/${e}`)};execBriefing={list:e=>r.get("/briefings",{signal:e}),create:e=>r.post("/briefings",e),update:(e,t)=>r.put(`/briefings/${encodeURIComponent(e)}`,t),remove:e=>r.delete(`/briefings/${encodeURIComponent(e)}`)};hubcode={portalSummary:e=>c.get("/portal_summary",{signal:e}),settings:e=>c.get("/settings",{signal:e}),saveSettings:e=>c.post("/settings",{personal_access_key:e.personalAccessKey,...e.hubId?{hub_id:e.hubId}:{},...void 0!==e.isDefault?{is_default:e.isDefault}:{}}),portals:e=>c.get("/portals",{signal:e}),doctor:e=>c.get("/doctor",{signal:e}),projects:(e,t)=>c.get("/projects",{query:{hub_id:e},signal:t}),project:(e,t)=>
1c.get(`/projects/${encodeURIComponent(e)}`,{signal:t}),deleteProject:e=>c.delete(`/projects/${encodeURIComponent(e)}`),projectFile:(e,t,s)=>c.get(`/projects/${encodeURIComponent(e)}/file`,{query:{path:t},signal:s}),saveProjectFile:(e,t,s)=>c.put(`/projects/${encodeURIComponent(e)}/file`,{path:t,content:s}),pages:(e,t)=>c.get("/pages",{query:{hub_id:e},signal:t}),deletePage:(e,t)=>c.delete(`/pages/${encodeURIComponent(e)}`,{query:{hub_id:t}}),workflows:e=>c.get("/workflows",{signal:e}),workflow:(e,t)=>c.get(`/workflows/${encodeURIComponent(e)}`,{signal:t}),chat:e=>c.post("/chat",{prompt:e}),workflowChat:(e,t)=>c.post(`/workflows/${encodeURIComponent(e)}/chat`,{prompt:t}),uploadCard:e=>c.post("/upload_card",{card_json:e}),generateImage:e=>c.post("/generate_image",{description:e}),apply:()=>c.post("/apply"),logActivity:(e,t)=>c.post("/log_activity",{activity:e,description:t}),activityCheck:(e,t)=>c.get("/activity_check",{query:{activity:e},signal:t}),saveTutorialScore:e=>c.post("/tutorial_score",{score:e}),hubspotPortals:e=>this.get("/hubspot/portals",{signal:e})};companyResearch={tracked:(e,t)=>this.post("/companyresearch/tracked_companies",{favorites_only:e},{signal:t,tokenInPayload:!0}),toggleFavorite:e=>this.post("/companyresearch/toggle_favorite",{domain:e},{tokenInPayload:!0}),untrack:e=>this.post("/companyresearch/delete_company",{domain:e},{tokenInPayload:!0}),questions:e=>this.get("/companyresearch/questions",{signal:e}),addQuestion:e=>this.post("/companyresearch/questions",{question:e}),updateQuestion:(e,t)=>this.put(`/companyresearch/questions/${e}`,{question:t}),deleteQuestion:e=>this.delete(`/companyresearch/questions/${e}`),availableSections:e=>this.get("/companyresearch/available-sections",{signal:e}),sectionConfig:e=>this.get("/companyresearch/section-config",{signal:e}),saveSectionConfig:e=>this.post("/companyresearch/section-config",{config:e})};directory={people:(e,t)=>this.get("/directory/people",{signal:t,tokenInPayload:!0,query:o(e)}),companies:(e,t)=>this.get("/directory/companies",{signal:t,tokenInPayload:!0,query:o(e)}),facets:(e,t,s)=>this.get(`/directory/${e}/facets`,{signal:s,tokenInPayload:!0,query:o({...t,page:void 0,perPage:void 0,sort:void 0,dir:void 0,cursor:void 0})}),addCompany:e=>this.post("/directory/companies",e)};ghero={search:(e,t,s)=>this.events("/ghero/search",t,{body:e,signal:s}),save:e=>this.post("/ghero/save",{messages:e})};brand={search:(e,t)=>this.get("/brand_search",{query:{query:e},signal:t}),lookup:e=>this.post("/youspot/companies/lookup",{query:e})};assist={markdown:e=>this.post("/assist/markdown",e)};chat={evaluateCards:(e,t)=>this.post("/youspot/chat/cards/evaluate",e,{signal:t}),upload:e=>this.post("/youspot/chat/upload",e),conversations:({limit:e,before:t}={},s)=>this.get("/youspot/chat/conversations",{query:{limit:e,before:t},signal:s}),conversation:(e,{afterId:t,beforeId:s,limit:n}={},i)=>this.get("/youspot/chat/conversation",{query:{conversation_id:e,after_id:t,before_id:s,limit:n},signal:i}),suggestedPrompts:(e,t)=>this.get("/youspot/chat/suggested-prompts",{query:{limit:e},signal:t}),countSuggestionHit:(e,t,s)=>this.post("/youspot/chat/suggested-prompts/hit",{prompt:e,card_id:t,evidence_version:s}),reportSuggestionsShown:e=>this.post("/youspot/chat/suggested-prompts/shown",{cards:e,ids:e.map(e=>e.card_id)}),suggestionFeedback:e=>this.post("/youspot/chat/suggested-prompts/feedback",e),savedPrompts:e=>this.get("/youspot/chat/saved-prompts",{signal:e}),savePrompt:(e,t)=>this.post("/youspot/chat/saved-prompts",{text:e,suggestion_id:t}),toolLabels:e=>this.get("/youspot/chat/tools",{signal:e}),model:e=>this.get("/youspot/chat/model",{signal:e}),saveModel:e=>this.post("/youspot/chat/model",{model:e}),instructions:e=>this.get("/youspot/chat/instructions",{signal:e}),saveInstructions:e=>this.post("/youspot/chat/instructions",{instructions:e}),deleteConversation:e=>this.post("/youspot/chat/conversation/delete",{conversation_id:e}),pinConversation:(e,t)=>this.post("/youspot/chat/conversation/pin",{conversation_id:e,pinned:t}),rateReply:(e,t)=>this.post("/youspot/chat/feedback",{message_id:e,rating:t}),saveReplyToBrain:(e,t,s)=>this.post("/graph/objects/chat",{prompt:e,output:t,message_id:s})};newsletters={senders:(e=!1,t)=>this.get("/user/newsletters/senders",{signal:t,query:e?{rescan:"true"}:{}}),choose:(e,t)=>this.post("/user/newsletters/senders",{allow:e,block:t})};jobs={status:(e,t)=>this.get(`/jobs/${e}`,{signal:t})};duplicates={pairs:(e,t)=>this.get("/graph/duplicates",{signal:t,query:"linked"===e?{status:"linked"}:{}}),scan:()=>this.post("/graph/duplicates/scan",{}),link:(e,t)=>this.post(`/graph/duplicates/${encodeURIComponent(e)}/link`,{expected_revision:t}),unlink:(e,t)=>this.post(`/graph/duplicates/${encodeURIComponent(e)}/unlink`,{expected_revision:t}),dismiss:(e,t)=>this.post(`/graph/duplicates/${encodeURIComponent(e)}/dismiss`,{expected_revision:t})};graph={search:(e,t)=>this.get("/graph/search",{signal:t,query:{q:e}}
1),objects:({type:e,q:t,page:s,perPage:n=25,owned:o=!0,sort:a,dir:r,filters:c,cursor:l,includeCounts:u=!0,fields:d},p)=>this.get("/graph/objects",{signal:p,tokenInPayload:!0,query:{page:s,per_page:n,type:e,q:t,sort:a,dir:r,cursor:l??void 0,fields:d,...i(c),...o?{owned:1}:{},...u?{}:{include_counts:0}}}),counts:({type:e,q:t,filters:s}={},n)=>this.get("/graph/objects/counts",{signal:n,tokenInPayload:!0,query:{type:e,q:t,...i(s)}}),railPrefs:e=>this.get("/graph/rail-prefs",{signal:e,tokenInPayload:!0}),saveRailPrefs:e=>this.put("/graph/rail-prefs",e,{tokenInPayload:!0}),recordRailUse:e=>this.post("/graph/rail-prefs/used",{type:e},{tokenInPayload:!0}),capacity:e=>this.get("/graph/capacity",{signal:e,tokenInPayload:!0}),objectTypes:e=>this.get("/graph/object-types",{signal:e,tokenInPayload:!0}),objectTypeFields:(e,t)=>this.get(`/graph/object-types/${encodeURIComponent(e)}/fields`,{signal:t}),network:({focus:e,depth:t=2,perNode:s,offset:n},i)=>this.get("/graph/network",{signal:i,tokenInPayload:!0,query:{depth:t,focus:e,per_node:s,offset:n}}),object:(e,t)=>this.get(`/graph/object/${e}`,{signal:t,tokenInPayload:!0}),connect:(e,t)=>this.post(`/graph/object/${encodeURIComponent(e)}/connections`,{to_object_id:t}),disconnect:(e,t)=>this.delete(`/graph/object/${encodeURIComponent(e)}/connections/${encodeURIComponent(t)}`),startTagSuggestionRun:e=>this.post(`/graph/object/${encodeURIComponent(e)}/tag-suggestion-runs`,{inline:!0}),inferenceRun:(e,t)=>this.get(`/graph/inference-runs/${encodeURIComponent(e)}`,{signal:t}),create:e=>this.post("/graph/objects",e),previewWebLink:e=>this.post("/web-links/preview",{url:e}),createWebLink:e=>this.post("/web-links/create",e),update:(e,t)=>this.patch(`/graph/object/${e}`,t),addNote:(e,t)=>this.post(`/graph/object/${e}/notes`,{text:t}),addTag:(e,t)=>
1this.post(`/graph/object/${e}/tags`,{name:t}),tagOptions:(e,t)=>this.get(`/graph/object/${encodeURIComponent(e)}/tag-options`,{signal:t}),removeTag:(e,t)=>this.delete(`/graph/object/${e}/tags/${t}`),createFile:e=>this.post("/graph/objects/file",{...e}),remove:e=>this.delete(`/graph/object/${e}`),bulkRemove:e=>this.post("/graph/objects/bulk-delete",{object_ids:e}),purge:(e,t=!1)=>this.post("/graph/objects/purge",{...e,confirm:t}),audit:e=>this.get("/graph/audit",{signal:e}),mergePreview:(e,t,s)=>this.get("/graph/merge-preview",{signal:s,query:{keep_id:e,merge_id:t}}),merge:(e,t)=>this.post("/graph/merge",{keep_id:e,merge_id:t}),unmerge:(e,t)=>this.post("/graph/unmerge",{keep_id:e,merged_id:t}),shares:(e,t)=>this.get(`/graph/object/${e}/shares`,{signal:t}),upsertShare:(e,{email:t,role:s,includeSubgraph:n})=>this.post(`/graph/object/${e}/shares`,{email:t,role:s,include_subgraph:n}),removeShare:(e,t)=>this.delete(`/graph/object/${e}/shares/${t}`),shareTargets:(e,t)=>this.get("/graph/share-targets",{signal:t,query:{q:e}}),sharedWithMe:e=>this.get("/graph/shared",{signal:e})};artifacts={templates:e=>this.get("/studio/og/templates",{signal:e}),generate:e=>this.post("/studio/og/generate",{...e}),list:e=>this.get("/studio/artifacts",{signal:e}),get:(e,t)=>this.get(`/studio/artifacts/${encodeURIComponent(e)}`,{signal:t}),unlock:(e,t)=>this.post(`/studio/artifacts/${encodeURIComponent(e)}/unlock`,{kind:t}),share:e=>this.post(`/studio/artifacts/${encodeURIComponent(e)}/share`,{}),revokeShare:e=>this.delete(`/studio/artifacts/${encodeURIComponent(e)}/share`),edit:(e,t)=>this.post(`/studio/artifacts/${encodeURIComponent(e)}/edit`,{markdown:t}),emailTemplates:e=>this.get("/studio/email/templates",{signal:e}),generateEmail:e=>this.post("/studio/email/generate",{...e}),gmailDraft:(e,t)=>this.post(`/studio/artifacts/${encodeURIComponent(e)}/gmail-draft`,{...t}),copyBody:e=>this.post(`/studio/artifacts/${encodeURIComponent(e)}/copy`,{}),pdfTemplates:e=>this.get("/studio/pdf/templates",{signal:e}),generatePdf:e=>this.post("/studio/pdf/generate",{...e}),previewBytes:(e,t)=>this.bytes(e.replace(/^\/api(?=\/)/,""),{signal:t}),saveTemplate:(e,t)=>
1this.post(`/studio/artifacts/${encodeURIComponent(e)}/save-template`,{name:t}),savedTemplates:(e,t)=>this.get("/studio/templates",{query:e?{kind:e}:void 0,signal:t}),deleteTemplate:e=>this.delete(`/studio/templates/${encodeURIComponent(e)}`)};brandKits={extract:e=>this.post("/brand-kits/extract",e),list:e=>this.get("/brand-kits",{signal:e}),get:(e,t)=>this.get(`/brand-kits/${e}`,{signal:t}),create:e=>this.post("/brand-kits",e),save:(e,t)=>this.post(`/brand-kits/${e}`,t),setDefault:e=>this.post("/brand-kits/default",{brand_kit_id:e}),uploadLogo:(e,t,s)=>{let n=new FormData;return n.set("file",t),n.set("variant",s),this.post(`/brand-kits/${e}/logo`,n)}}}let d=new u;e.s(["api",0,d,"isCalendarSuggestion",0,function(e){return"calendar.create"===e.action_type},"isGraphFieldSuggestion",0,function(e){return"graph.field.set"===e.action_type},"isGraphRelationshipSuggestion",0,function(e){return"graph.relationship.create"===e.action_type},"isGraphSuggestion",0,function(e){return e.action_type.startsWith("graph.")},"isGraphTagSuggestion",0,function(e){return"graph.tag.attach"===e.action_type}],689605)}]);
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.