PageSourceSearch

https://www.fromzero.com/assets/klaviyo-BbBO199G.js

js fromzero.com collected 2026-10-09 18:27:36 UTC 1,967 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/klaviyo_error_log-2pkBm-TO.js","assets/routeTree.gen-BCaaKwgo.js","assets/main-KwtenQVE.js"])))=>i.map(i=>d[i]);
2import{_ as c}from"./main-KwtenQVE.js";var d={};async function w(t,o={},i={}){if(d.FZ_CI||t==="NONE")return!0;const{default:s}=await c(async()=>{const{default:e}=await import("./klaviyo_error_log-2pkBm-TO.js");return{default:e}},__vite__mapDeps([0,1,2]));if(!t)return await new s({created_at:new Date,event:"Profile update error",error_message:"No klaviyo_id for profile update",debug_data:{...i,klaviyo_id:t},custom_properties:o}).save(),!1;const f=d.KLAVIYO_NEW_REGISTER;if(!f)return await new s({created_at:new Date,event:"Profile update error",error_message:"Missing KLAVIYO_NEW_REGISTER API key",debug_data:{...i,klaviyo_id:t},custom_properties:o}).save(),!1;const u={data:{type:"profile",id:t,attributes:{properties:o}}};try{const e=await fetch(`https://a.klaviyo.com/api/profiles/${encodeURIComponent(t)}`,{method:"PATCH",headers:{accept:"application/vnd.api+json",revision:"2025-04-15","content-type":"application/vnd.api+json",Authorization:`Klaviyo-API-Key ${f}`},body:JSON.stringify(u)});if(!e.ok){let r,l,n=`${e.status} ${e.statusText}`;try{const a=await e.json();r=a?.errors?.[0],l=a,(r?.detail||r?.title||a?.detail)&&(n=r?.detail??r?.title??a.detail??n)}catch{const a=await e.text();l=a,a&&(n=a)}return console.error("Klaviyo profile update error:",r??l??n),await new s({created_at:new Date,event:"Profile update error",error_message:n,debug_data:{...i,status:e.status,klaviyo_id:t},custom_properties:o,klaviyo_error:r??l}).save(),!1}return!0}catch(e){const r=e?.message??"Unknown error while calling Klaviyo update endpoint";return console.error("Klaviyo profile update error:",e),await new s({created_at:new Date,event:"Profile update error",error_message:r,debug_data:{...i,klaviyo_id:t},custom_properties:o,klaviyo_error:e}).save(),!1}}export{w as updateKlaviyoProfile};

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.