import{C as A,i as x}from"./countdown.Cgcjk_tU.js";import{g as p}from"./getCookieValue.FmDZvggo.js";import{g as y}from"./getExperiments.B3A35r5T.js";import{g as v}from"./getSectionInfo.D5UdhNIq.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="229ec4f7-b8c3-40c4-991a-69ef583f9e8b",o._sentryDebugIdIdentifier="sentry-dbid-229ec4f7-b8c3-40c4-991a-69ef583f9e8b")}catch{}})();const R=!0,U=()=>{const o=p(A),n=x(o);return o?{countdown:n?"active":"inactive",...n&&{countdown_remaining:Number(o)-Date.now()}}:{}},j=(o,{element:n,section:i,sectionId:E,elementName:S,selectedLanguage:s,plans:e,payments:a,placement:d,protectionStatus:f,custom:u,errorMessage:r,formStatus:C,formName:D,formType:N,flowType:m,step:_,duration:l}={})=>{if(!window?.tcSendEvent&&R)return;const g=document.querySelector("html[data-currency]")?.getAttribute("data-currency"),w=y(),b=p("coupon"),O=U(),c=(()=>{if(o==="plans_displayed"||o==="plans_loaded"||o==="plans_selected")return{plans:e};const{name:h,index:k}=v(n),t={...d&&{placement:d},...f&&{protection_status:f},...g&&{currency:g},...s&&{selected_language:s},..._&&{step:_},...l&&{duration:l}};if((o==="click"||o==="show"||o==="hover"||o==="video")&&(t.element_name=S||n?.dataset.gaSlug||"N/A"),o==="click"||o==="scroll"||o==="form_update"||o==="hover"||o==="video"){t.section=i||h;const I=E||k;I&&(t.section_id=I)}return o==="form_update"&&(t.form_status=C,t.form_name=D,t.form_type=N,r&&(t.error_message=r),m&&(t.flow_type=m)),o==="error"&&(t.error_message=r),t})(),P={...w&&{experiment:w},...b&&{coupon:{code:b}},...O,...c,...e&&{plans:{...c?.plans,...e}},...a&&{payments:{...c?.payments,...a}},...u&&{custom:{...c?.custom,...u}},source_nord_id:1};window.tcSendEvent?.(o,P)};export{j as s}; //# sourceMappingURL=sendTracyEvent.ypwlhgc5.js.map