define(['jquery'],function($){'use strict';function generateUUID(){if(crypto.randomUUID){return crypto.randomUUID();} const buf=new Uint8Array(16);crypto.getRandomValues(buf);buf[6]=buf[6]&0x0f|0x40;buf[8]=buf[8]&0x3f|0x80;return Array.from(buf).map((b,i)=>{const s=b.toString(16).padStart(2,'0'),isUuidOffsetChar=i===4||i===6||i===8||i===10;return isUuidOffsetChar?'-'+s:s;}).join('');} return function(config){const browserEventData=config.browserEventData,eventId=generateUUID();config.payload.eventId=eventId;let browserPayload=config.browserEventData.payload;browserPayload.source=browserEventData.source;browserPayload.pluginVersion=browserEventData.pluginVersion;fbq('set','agent',browserEventData.fbAgentVersion,browserEventData.fbPixelId);fbq(browserEventData.track,browserEventData.event,browserPayload,{eventID:eventId});$.ajax({showLoader:true,url:config.url,type:'POST',data:config.payload,dataType:'json',global:false,error:function(error){console.log(error);}});};});