@picked/analytics 0.0.1-dev.1774231221701 → 0.0.1-dev.1774912386475
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/plugins/analytics/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/plugins/analytics/index.js +1 -1
- package/dist/{src-oyxYtu5z.js → src-9uswhnk3.js} +24 -11
- package/dist/src-o9AspO8g.cjs +1 -0
- package/dist/types/fixtures/analytics-event.d.ts +3 -0
- package/dist/types/fixtures/analytics-event.d.ts.map +1 -1
- package/dist/types/listeners/backspace.d.ts.map +1 -1
- package/dist/types/listeners/mouse_shake.d.ts.map +1 -1
- package/dist/types/listeners/rapid_scroll.d.ts.map +1 -1
- package/dist/types/types.d.ts +35 -22
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +119 -10
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/src-Bm5f206e.cjs +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../src-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../src-o9AspO8g.cjs`);exports.bindGlobalEventListeners=e.t,exports.bindUserInteractionListeners=e.n,exports.createCartAddTrackerEvent=e.P,exports.createCartRemoveTrackerEvent=e.M,exports.createCheckoutCompleteTrackerEvent=e.A,exports.createCheckoutStartTrackerEvent=e.O,exports.createIdentifyTrackerEvent=e.d,exports.createOrderCreateTrackerEvent=e.E,exports.createPageViewTrackerEvent=e.o,exports.createProductListViewTrackerEvent=e.w,exports.createProductViewTrackerEvent=e.x,exports.createTracker=e.q,exports.trackAppCloseEvent=e.K,exports.trackAppInitializeEvent=e.G,exports.trackAppLoadEvent=e.W,exports.trackAppOpenEvent=e.U,exports.trackCartAddEvent=e.F,exports.trackCartRemoveEvent=e.N,exports.trackCheckoutCompleteEvent=e.j,exports.trackCheckoutStartEvent=e.k,exports.trackCustomEvent=e.r,exports.trackEvent=e.a,exports.trackExperienceLoadEvent=e.H,exports.trackFeatureDecideEvent=e.V,exports.trackFieldValidationErrorEvent=e.g,exports.trackFormSubmitErrorEvent=e.m,exports.trackFormSubmitEvent=e.h,exports.trackFormSubmitSuccessEvent=e.p,exports.trackIdentifyEvent=e.f,exports.trackLeadCaptureEvent=e.u,exports.trackModalCloseEvent=e.l,exports.trackModalOpenEvent=e.c,exports.trackNamedCustomEvent=e.i,exports.trackOrderCreateEvent=e.D,exports.trackPageViewEvent=e.s,exports.trackProductListViewEvent=e.T,exports.trackProductSelectEvent=e.C,exports.trackProductViewDetailsEvent=e.S,exports.trackRecommendationPresentEvent=e.b,exports.trackSearchResultsListViewEvent=e.y,exports.trackStepComplete=e.B,exports.trackStepEnterEvent=e.z,exports.trackStepSubmitErrorEvent=e.L,exports.trackStepSubmitEvent=e.R,exports.trackStepSubmitSuccessEvent=e.I,exports.trackWaitlistJoinEvent=e.v,exports.trackWishlistAddEvent=e._;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../../src-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../../src-o9AspO8g.cjs`);let t=require(`@picked/client`),n=require(`effector`);function r(e){return e.isResolved}var i=({trackerOptions:i,enableDocumentListeners:a=!1})=>({name:`analytics`,setup:o=>{if(!(0,t.supportsWindow)())return;let{organizationId:s,projectId:c}=o,l=()=>o.features.listStore.getState().flatMap(e=>{if(!r(e))return[];let{id:t,key:n,name:i}=e,{bucket:a}=e.getBucket();return[{name:i,key:n,feature:t,bucket:a}]}),u=e=>{if(`experience`in e&&e.experience){let{experience:t}=e;return{id:t.experienceId,title:t.configStore.getState().name}}};e.q({organizationId:s,projectId:c,...i});let d=e=>{let{experience:t}=e||{},n=l();return function(){return{organizationId:s,projectId:c,sessionId:o.session?.id,identifiers:o.session?.identifiers,isUser:o.session?.isUser,features:n,...t&&{experience:{id:t.experienceId,title:t.configStore.getState().name}}}}};a&&e.t(d()),o.experienceInstances.listStore.watch(t=>{t.forEach(t=>{let n=t.target;n&&e.n(d({experience:t}),n.shadowRoot)})});function f(e){return(0,n.attach)({source:{fields:o.fields.listStore,responses:o.responses.listStore},effect:async({fields:t,responses:n},r)=>{let i=l();return e({organizationId:s,projectId:c,sessionId:o.session?.id,experience:u(r),step:`step`in r?r.step:void 0,form:`form`in r?r.form:void 0,exception:`exception`in r?r.exception.reason?.[0]:void 0,fields:t,responses:n,features:i,isUser:o.session?.isUser,identifiers:o.session?.identifiers})}})}(0,n.split)({source:o.eventBus,match:e=>e.type,cases:{load:f(e.W),initialize:f(e.G),experience_initialize:f(e.H),experience_open:f(e.U),experience_close:f(e.K),field_validation_error:f(e.g),step_enter:f(e.z),step_submit:f(e.R),step_submit_success:f(e.I),form_submit:f(e.h),form_submit_success:f(e.p),form_submit_error:f(e.m),feature_decide:f(e.V)}})}});exports.analyticsPlugin=i;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, K as l, L as u, M as d, N as f, O as p, P as m, R as h, S as g, T as _, U as v, V as y, W as b, _ as x, a as S, b as C, c as w, d as T, f as E, g as D, h as O, i as k, j as A, k as j, l as M, m as N, n as P, o as F, p as I, q as L, r as R, s as z, t as B, u as V, v as H, w as U, x as W, y as G, z as K } from "../src-
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, K as l, L as u, M as d, N as f, O as p, P as m, R as h, S as g, T as _, U as v, V as y, W as b, _ as x, a as S, b as C, c as w, d as T, f as E, g as D, h as O, i as k, j as A, k as j, l as M, m as N, n as P, o as F, p as I, q as L, r as R, s as z, t as B, u as V, v as H, w as U, x as W, y as G, z as K } from "../src-9uswhnk3.js";
|
|
2
2
|
export { B as bindGlobalEventListeners, P as bindUserInteractionListeners, m as createCartAddTrackerEvent, d as createCartRemoveTrackerEvent, e as createCheckoutCompleteTrackerEvent, p as createCheckoutStartTrackerEvent, T as createIdentifyTrackerEvent, i as createOrderCreateTrackerEvent, F as createPageViewTrackerEvent, U as createProductListViewTrackerEvent, W as createProductViewTrackerEvent, L as createTracker, l as trackAppCloseEvent, o as trackAppInitializeEvent, b as trackAppLoadEvent, v as trackAppOpenEvent, a as trackCartAddEvent, f as trackCartRemoveEvent, A as trackCheckoutCompleteEvent, j as trackCheckoutStartEvent, R as trackCustomEvent, S as trackEvent, s as trackExperienceLoadEvent, y as trackFeatureDecideEvent, D as trackFieldValidationErrorEvent, N as trackFormSubmitErrorEvent, O as trackFormSubmitEvent, I as trackFormSubmitSuccessEvent, E as trackIdentifyEvent, V as trackLeadCaptureEvent, M as trackModalCloseEvent, w as trackModalOpenEvent, k as trackNamedCustomEvent, r as trackOrderCreateEvent, z as trackPageViewEvent, _ as trackProductListViewEvent, n as trackProductSelectEvent, g as trackProductViewDetailsEvent, C as trackRecommendationPresentEvent, G as trackSearchResultsListViewEvent, t as trackStepComplete, K as trackStepEnterEvent, u as trackStepSubmitErrorEvent, h as trackStepSubmitEvent, c as trackStepSubmitSuccessEvent, H as trackWaitlistJoinEvent, x as trackWishlistAddEvent };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as e, H as t, I as n, K as r, R as i, U as a, V as o, W as s, g as c, h as l, m as u, n as d, p as f, q as p, t as m, z as h } from "../../../src-
|
|
1
|
+
import { G as e, H as t, I as n, K as r, R as i, U as a, V as o, W as s, g as c, h as l, m as u, n as d, p as f, q as p, t as m, z as h } from "../../../src-9uswhnk3.js";
|
|
2
2
|
import { supportsWindow as g } from "@picked/client";
|
|
3
3
|
import { attach as _, split as v } from "effector";
|
|
4
4
|
//#region src/plugins/analytics/plugin.ts
|
|
@@ -97,16 +97,20 @@ function C(e) {
|
|
|
97
97
|
})) };
|
|
98
98
|
}
|
|
99
99
|
function w(e) {
|
|
100
|
-
if (e.responses) return { items: e.responses.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
if (e.responses) return { items: e.responses.reduce((e, { fieldKey: t, value: n }) => {
|
|
101
|
+
if (n == null) return e;
|
|
102
|
+
let r = Array.isArray(n) ? Array.from(n, (e) => ({ value: e })) : [{ value: n }];
|
|
103
|
+
return e.push({
|
|
104
|
+
field_id: t,
|
|
105
|
+
values: r
|
|
106
|
+
}), e;
|
|
107
|
+
}, []) };
|
|
104
108
|
}
|
|
105
109
|
function T(e, t = !1) {
|
|
106
110
|
let { step: n } = e;
|
|
107
111
|
if (n) return {
|
|
108
112
|
id: n.id,
|
|
109
|
-
title: n.
|
|
113
|
+
title: n.name
|
|
110
114
|
};
|
|
111
115
|
if (t) return {
|
|
112
116
|
id: x,
|
|
@@ -982,11 +986,16 @@ var Mn = _(An, jn), Nn = 5, Pn = 500, Fn = 500, In = {
|
|
|
982
986
|
Mn(e, t), H("mouse_shake", e, t);
|
|
983
987
|
}, Pn);
|
|
984
988
|
function zn(e, t) {
|
|
985
|
-
let
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
989
|
+
let { event: n } = e;
|
|
990
|
+
if (!(n instanceof MouseEvent)) return;
|
|
991
|
+
let r = Date.now(), i = n.clientX - In.x, a = Math.sign(i);
|
|
992
|
+
r - Ln > Fn && (q = []), a !== 0 && (q.length === 0 || q.at(-1) !== a) && q.push(a), In = {
|
|
993
|
+
x: n.clientX,
|
|
994
|
+
y: n.clientY
|
|
995
|
+
}, q.length >= Nn && (Rn({
|
|
996
|
+
analyticsContext: e.analyticsContext,
|
|
997
|
+
event: n
|
|
998
|
+
}, t), q = []), Ln = r;
|
|
990
999
|
}
|
|
991
1000
|
var Bn = v("mousemove", zn), Vn = "page_visible";
|
|
992
1001
|
function Hn(e, t) {
|
|
@@ -1046,7 +1055,11 @@ var Xn = _(J, Yn);
|
|
|
1046
1055
|
//#endregion
|
|
1047
1056
|
//#region src/listeners/backspace.ts
|
|
1048
1057
|
function Zn(e, t) {
|
|
1049
|
-
|
|
1058
|
+
let { event: n } = e;
|
|
1059
|
+
n instanceof KeyboardEvent && n.key === "Backspace" && Xn({
|
|
1060
|
+
analyticsContext: e.analyticsContext,
|
|
1061
|
+
event: n
|
|
1062
|
+
}, t);
|
|
1050
1063
|
}
|
|
1051
1064
|
var Qn = v("keydown", Zn), $n = "page_hide";
|
|
1052
1065
|
function er(e, t) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require(`@snowplow/browser-tracker`),t=require(`@snowplow/browser-plugin-button-click-tracking`),n=require(`@snowplow/browser-plugin-performance-navigation-timing`),r=require(`@snowplow/browser-plugin-error-tracking`),i=require(`@snowplow/browser-plugin-web-vitals`),a=require(`@picked/client`);function o(e,t){return`iglu:dev.pckd/${e}/jsonschema/${t}`}function s(e,t,n={}){return{event:{schema:o(`event`,`1-0-0`),data:{type:e,meta:n}},context:t.filter(e=>e!==void 0)}}function c(e,t,n){return{schema:o(e,t),data:n}}function l(t,n){return(t,r)=>{(0,e.trackSelfDescribingEvent)(n(t,r))}}function u(e,t,n={passive:!0}){let r=new WeakMap;return(i,a)=>{let o=r.get(i);if(o||(o=new Set,r.set(i,o)),o.has(e))return;function s(e){t({event:e,analyticsContext:a()})}i.addEventListener(e,s,n),o.add(e)}}function d(e,t){let n=new Set;return r=>{if(n.has(e)||!(0,a.supportsDocument)())return;function i(e){t({event:e,analyticsContext:r()})}document.addEventListener(e,i,{passive:!0}),n.add(e)}}function f(e,t){let n=new Set;return r=>{if(n.has(e)||!(0,a.supportsWindow)())return;function i(e){t({event:e,analyticsContext:r()})}window.addEventListener(e,i,{passive:!0}),n.add(e)}}function p(e){return{items:e.features?.map(({feature:e,name:t,key:n,bucket:r})=>({ab_feature:e,ab_name:t,ab_key:n,ab_bucket:r}))||[]}}var m=`unknown`;function h(e){let t=D(),n={id:e.sessionId||null};return e.isUser!==void 0&&(n.is_user=e.isUser),e.identifiers&&Object.assign(n,e.identifiers),t&&(n.gaid=t),e.shopifySession?.clientId&&(n.shopify_client_id=e.shopifySession.clientId),e.shopifySession?.customerId&&(n.shopify_customer_id=e.shopifySession.customerId),e.shopifySession?.checkoutToken&&(n.shopify_checkout_token=e.shopifySession.checkoutToken),n}function g(e){if(e.fields)return{items:e.fields.map(({id:e,type:t,label:n,options:r})=>({id:e,type:t,label:n,options:Array.isArray(r)?r.map(({id:e,label:t,value:n})=>({id:e,label:t,value:n})):void 0}))}}function _(e){if(e.responses)return{items:e.responses.reduce((e,{fieldKey:t,value:n})=>{if(n==null)return e;let r=Array.isArray(n)?Array.from(n,e=>({value:e})):[{value:n}];return e.push({field_id:t,values:r}),e},[])}}function v(e,t=!1){let{step:n}=e;if(n)return{id:n.id,title:n.name};if(t)return{id:m,title:m}}function y(e,t=!1){let{productList:n}=e;if(n){let e={};`title`in n&&n.title&&Object.assign(e,{title:n.title});let t=`items`in n?n.items:n;return Object.assign(e,{items:t.map(e=>({item_id:e.itemId,item_name:e.itemName,affiliation:e.affiliation,coupon:e.coupon,currency:e.currency,creative_name:e.creativeName,creative_slot:e.creativeSlot,discount:E(e.discount),index:E(e.index),item_brand:e.itemBrand,item_category:e.itemCategory,item_category2:e.itemCategory2,item_category3:e.itemCategory3,item_category4:e.itemCategory4,item_category5:e.itemCategory5,item_list_id:e.itemListId,item_list_name:e.itemListName,item_variant:e.itemVariant,location_id:e.locationId,price:E(e.price),promotion_id:e.promotionId,promotion_name:e.promotionName,quantity:E(e.quantity),in_stock:e.inStock}))}),e}if(t)return{items:[]}}function b(e,t=!1){let{order:n}=e;if(n){let e={id:n.id};return n.checkoutToken&&(e.checkout_token=n.checkoutToken),n.cartToken&&(e.cart_token=n.cartToken),n.customerId&&(e.customer_id=n.customerId),e}if(t)return{id:m}}function x(e,t=!1){let{experience:n}=e;if(n)return{id:n.id,title:n.title};if(t)return{id:m,title:m}}function S(e,t=!1){let{exception:n}=e;if(n)return typeof n==`string`?{reason:n}:{reason:n.systemMessage};if(t)return{reason:m}}function C(e){let{form:t}=e;return t?{id:t.id,title:t.title}:{id:m,title:m}}function w(e){let{modal:t}=e;return t?{id:t.id,title:t.title}:{id:m,title:m}}function T(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function E(e){if(typeof e==`number`)return e;if(typeof e!=`string`)return;let t=parseFloat(e);if(!isNaN(t))return t}function D(){if(!(0,a.supportsDocument)()||!(0,a.supportsCookies)())return null;let e=document.cookie?document.cookie.split(`;`):[];for(let t of e){let e=t.trim();if(e.startsWith(`_ga=`)){let t=e.substring(4).split(`.`);if(t.length>2)return t.slice(2).join(`.`)}}}function ee(e){let a=[];return e.trackErrors&&a.push((0,r.ErrorTrackingPlugin)()),e.trackVitals&&a.push((0,i.WebVitalsPlugin)()),e.trackPerformance&&a.push((0,n.PerformanceNavigationTimingPlugin)()),(e.trackButtonClickAllowList||e.trackButtonClickFilter)&&a.push((0,t.ButtonClickTrackingPlugin)()),a}function te(n){n.trackActivity&&!n.trackActivityCallback&&(0,e.enableActivityTracking)({minimumVisitLength:30,heartbeatDelay:10}),n.trackActivity&&n.trackActivityCallback&&(0,e.enableActivityTrackingCallback)({minimumVisitLength:30,heartbeatDelay:10,callback:n.trackActivityCallback}),(n.trackButtonClickAllowList||n.trackButtonClickFilter)&&(0,t.enableButtonClickTracking)({filter:n.trackButtonClickAllowList?{allowlist:n.trackButtonClickAllowList}:n.trackButtonClickFilter}),n.trackErrors&&(0,r.enableErrorTracking)()}function ne({organizationId:t,projectId:n,cvlyX:r,deployment:i,collectorUrl:a=`evnts.pckd.dev`,appId:o=`picked-analytics`,trackVitals:s=!1,trackPerformance:c=!1,trackWebPage:l=!0,trackSessions:u=!0,trackBrowser:d=!0,trackActivity:f=!1,trackErrors:p=!1,trackActivityCallback:m,trackButtonClickAllowList:h}){let g={trackVitals:s,trackErrors:p,trackActivity:f,trackPerformance:c,trackActivityCallback:m,trackButtonClickAllowList:h,deployment:i},_=(0,e.newTracker)(o,a,{appId:o,platform:`web`,keepalive:!0,contexts:{webPage:l,session:u,browser:d||!1},plugins:ee(g)});return re({organizationId:t,projectId:n,cvlyX:r,deployment:i}),te(g),_}function re({organizationId:t,projectId:n,cvlyX:r,deployment:i}){if(!t||!n)throw Error(`bindGlobalContext: Both organizationId and projectId are required`);let a=[];a.push(c(`app`,`1-0-0`,{organization_id:t,project_id:n}),c(`deployment`,`1-0-1`,{sha:i.sha,id:i.id,env:i.env,host:i.host})),r&&a.push(c(`cvly_x`,`1-0-1`,{vercel_deployment_id:r.vercelDeploymentId,vercel_env:r.vercelEnv,vercel_url:r.vercelUrl})),(0,e.addGlobalContexts)(a)}var ie=`app_close`;function ae(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(ie,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var oe=l(ie,ae),se=`app_initialize`;function ce(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(se,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var le=l(se,ce),ue=`app_load`;function de(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(ue,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var fe=l(ue,de),pe=`app_open`;function me(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(pe,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var he=l(pe,me),ge=`experience_load`;function _e(e,t){let n=p(e),r=h(e),i=x(e,!0),a=v(e);return s(ge,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`experience`,`1-0-1`,i),a?c(`step`,`1-0-0`,a):void 0],t)}var ve=l(ge,_e),ye=`feature_decide`;function be(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(ye,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var xe=l(ye,be),O=`step_complete`;function Se(e,t){let n=p(e),r=h(e),i=x(e),a=v(e,!0),o=_(e),l=g(e);return s(O,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`step`,`1-0-0`,a),l&&c(`field_list`,`1-0-0`,l),o&&c(`response_list`,`1-0-0`,o),i&&c(`experience`,`1-0-1`,i)],t)}var Ce=l(O,Se),k=`step_enter`;function we(e,t){let n=p(e),r=h(e),i=x(e),a=v(e,!0),o=g(e);return s(k,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`step`,`1-0-0`,a),o&&c(`field_list`,`1-0-0`,o),i&&c(`experience`,`1-0-1`,i)],t)}var Te=l(k,we),A=`step_submit`;function Ee(e,t){let n=p(e),r=h(e),i=x(e),a=v(e,!0),o=_(e),l=g(e);return s(A,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`step`,`1-0-0`,a),l&&c(`field_list`,`1-0-0`,l),o&&c(`response_list`,`1-0-0`,o),i&&c(`experience`,`1-0-1`,i)],t)}var De=l(A,Ee),j=`step_submit_error`;function Oe(e,t){let n=p(e),r=h(e),i=S(e,!0),a=x(e),o=v(e,!0),l=g(e),u=_(e);return s(j,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`exception`,`1-0-0`,i),c(`step`,`1-0-0`,o),l&&c(`field_list`,`1-0-0`,l),u&&c(`response_list`,`1-0-0`,u),a&&c(`experience`,`1-0-1`,a)],t)}var ke=l(j,Oe),M=`step_submit_success`;function Ae(e,t){let n=p(e),r=h(e),i=x(e),a=v(e,!0),o=g(e),l=_(e);return s(M,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`step`,`1-0-0`,a),o&&c(`field_list`,`1-0-0`,o),l&&c(`response_list`,`1-0-0`,l),i&&c(`experience`,`1-0-1`,i)],t)}var je=l(M,Ae),N=`cart_add`;function P(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(N,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}function Me(e,t){return P(e,t)}var Ne=l(N,P),Pe=`cart_remove`;function Fe(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(Pe,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}function Ie(e,t){return Fe(e,t)}var Le=l(Pe,Fe),Re=`checkout_complete`;function ze(e,t){let n=p(e),r=h(e),i=y(e,!0),a=b(e,!0),o=x(e),l=v(e);return s(Re,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),c(`order`,`1-0-0`,a),o&&c(`experience`,`1-0-1`,o),l&&c(`step`,`1-0-0`,l)],t)}function Be(e,t){return ze(e,t)}var Ve=l(Re,ze),He=`checkout_start`;function Ue(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(He,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}function We(e,t){return Ue(e,t)}var Ge=l(He,Ue),Ke=`order_create`;function qe(e,t){let n=p(e),r=h(e),i=y(e,!0),a=b(e,!0),o=x(e),l=v(e);return s(Ke,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),c(`order`,`1-0-0`,a),o&&c(`experience`,`1-0-1`,o),l&&c(`step`,`1-0-0`,l)],t)}function Je(e,t){return qe(e,t)}var Ye=l(Ke,qe),Xe=`product_list_view`;function Ze(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(Xe,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),o?c(`step`,`1-0-0`,o):void 0,a?c(`experience`,`1-0-1`,a):void 0],t)}function Qe(e,t){return Ze(e,t)}var $e=l(Xe,Ze),et=`product_select`;function tt(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(et,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var nt=l(et,tt),rt=`product_view_details`;function it(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(rt,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}function at(e,t){return it(e,t)}var ot=l(rt,it),st=`recommendation_present`;function ct(e,t){let n=p(e),r=h(e),i=x(e),a=v(e),o=y(e,!0);return s(st,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,o),i&&c(`experience`,`1-0-1`,i),a&&c(`step`,`1-0-0`,a)],t)}var lt=l(st,ct),ut=`search_results_list_view`;function dt(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(ut,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),o?c(`step`,`1-0-0`,o):void 0,a?c(`experience`,`1-0-1`,a):void 0],t)}var ft=l(ut,dt),pt=`waitlist_join`;function mt(e,t){let n=p(e),r=h(e),i=x(e),a=v(e),o=y(e);return s(pt,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,o?c(`product_list`,`2-0-1`,o):void 0],t)}var ht=l(pt,mt),gt=`wishlist_add`;function _t(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(gt,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var vt=l(gt,_t),yt=`field_validation_error`;function bt(e,t){let n=p(e),r=h(e),i=C(e),a=S(e,!0),o=x(e),l=v(e);return s(yt,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`exception`,`1-0-0`,a),c(`form`,`1-0-0`,i),o&&c(`experience`,`1-0-1`,o),l&&c(`step`,`1-0-0`,l)],t)}var xt=l(yt,bt),St=`form_submit`;function Ct(e,t){let n=p(e),r=h(e),i=C(e),a=x(e),o=v(e);return s(St,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`form`,`1-0-0`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var wt=l(St,Ct),Tt=`form_submit_error`;function Et(e,t){let n=p(e),r=h(e),i=C(e),a=S(e,!0),o=x(e),l=v(e);return s(Tt,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`form`,`1-0-0`,i),c(`exception`,`1-0-0`,a),o&&c(`experience`,`1-0-1`,o),l&&c(`step`,`1-0-0`,l)],t)}var Dt=l(Tt,Et),Ot=`form_submit_success`;function kt(e,t){let n=p(e),r=h(e),i=C(e),a=x(e),o=v(e);return s(Ot,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`form`,`1-0-0`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var At=l(Ot,kt),jt=`identify`;function Mt(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(jt,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`session`,`1-0-4`,r),c(`feature_list`,`2-0-0`,n),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}function Nt(e,t){return Mt(e,t)}var Pt=l(jt,Mt),F=`lead_capture`;function Ft(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(F,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a&&c(`step`,`1-0-0`,a),i&&c(`experience`,`1-0-1`,i)],t)}var It=l(F,Ft),Lt=`modal_close`;function Rt(e,t){let n=p(e),r=h(e),i=w(e),a=x(e),o=v(e);return s(Lt,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`modal`,`1-0-0`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var zt=l(Lt,Rt),Bt=`modal_open`;function Vt(e,t){let n=p(e),r=h(e),i=w(e),a=x(e),o=v(e);return s(Bt,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`modal`,`1-0-0`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var Ht=l(Bt,Vt),Ut=`page_view`;function Wt(e,t){let n=p(e),r=h(e),i=x(e),a=v(e),o=y(e);return s(Ut,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,o?c(`product_list`,`2-0-1`,o):void 0],t)}function Gt(e,t){return Wt(e,t)}var Kt=l(Ut,Wt);function I(e){return e instanceof Element}function qt(e){return`data-picked-${e.replaceAll(`_`,`-`)}`}function L(e){let t=[`a`,`button`,`input`,`select`,`textarea`,`details`,`summary`,`label`,`form`,`fieldset`,`legend`,`optgroup`,`option`,`output`,`datalist`,`dialog`,`menu`,`menuitem`,`iframe`,`audio`,`video`,`embed`,`object`,`canvas`].join(`, `);return I(e)?e.matches(t)?e:e.closest(t):null}function R(e){if(e instanceof HTMLSelectElement){let t=e.selectedIndex||0;return e.options[t]?.text??``}return`innerText`in e&&typeof e.innerText==`string`?e.innerText:e.textContent}function z(e){let t=e.getAttribute(`aria-label`);if(t)return t;let n=e.getAttribute(`aria-labelledby`);if(n){let e=document.getElementById(n);if(e){let t=R(e);if(t)return t}}if(`id`in e&&e.id){let t=document.querySelector(`label[for="${e.id}"]`);if(t){let e=R(t);if(e)return e}}let r=e.parentElement;for(;r;){if(r.tagName.toLowerCase()===`label`){let e=R(r);if(e)return e}r=r.parentElement}if(e instanceof HTMLInputElement&&`labels`in e&&e.labels){let t=Array.from(e.labels).map(e=>R(e)).filter(Boolean).join(` `);if(t)return t}return`placeholder`in e&&typeof e.placeholder==`string`?e.placeholder:null}function Jt(e,t){if(!I(e))return null;let n=qt(t),r=e.closest(`[${n}]`);if(!r)return null;let i=r.getAttribute(n);return i?{element:r,customEventName:i}:null}var Yt=255;function B(e){return e?e.slice(0,Yt):null}var V=`click`;function Xt(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(V,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,{node_type:`unknown`}),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(V,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,u),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var Zt=l(V,Xt);function Qt(e,t,n,r){let i=S(n.analyticsContext),a=x(n.analyticsContext),o=p(n.analyticsContext),l=g(n.analyticsContext),u=C(n.analyticsContext),d=w(n.analyticsContext),f=b(n.analyticsContext),m=y(n.analyticsContext),T=_(n.analyticsContext),E=h(n.analyticsContext),D=v(n.analyticsContext),ee={id:t.id||null,node_type:t.nodeName.toLowerCase(),label:B(z(t)),text:B(R(t))};return s(e,[c(`app`,`1-0-0`,{organization_id:n.analyticsContext.organizationId,project_id:n.analyticsContext.projectId}),c(`session`,`1-0-4`,E),c(`element`,`1-0-0`,ee),i?c(`exception`,`1-0-0`,i):void 0,a?c(`experience`,`1-0-1`,a):void 0,o?c(`feature_list`,`2-0-0`,o):void 0,l?c(`field_list`,`1-0-0`,l):void 0,u?c(`form`,`1-0-0`,u):void 0,d?c(`modal`,`1-0-0`,d):void 0,f?c(`order`,`1-0-0`,f):void 0,m?c(`product_list`,`2-0-1`,m):void 0,T?c(`response_list`,`1-0-0`,T):void 0,D?c(`step`,`1-0-0`,D):void 0],r)}function H(t,n,r){let i=Jt(n.event.target,t);if(!i)return;let{element:a,customEventName:o}=i;(0,e.trackSelfDescribingEvent)(Qt(o,a,n,r))}function $t(t,n,r){let i=S(t),a=x(t),o=p(t),l=g(t),u=t.form?C(t):void 0,d=t.modal?w(t):void 0,f=b(t),m=y(t),T=_(t),E=h(t),D=v(t);(0,e.trackSelfDescribingEvent)(s(n,[c(`app`,`1-0-0`,{organization_id:t.organizationId,project_id:t.projectId}),c(`session`,`1-0-4`,E),i?c(`exception`,`1-0-0`,i):void 0,a?c(`experience`,`1-0-1`,a):void 0,c(`feature_list`,`2-0-0`,o),l?c(`field_list`,`1-0-0`,l):void 0,u?c(`form`,`1-0-0`,u):void 0,d?c(`modal`,`1-0-0`,d):void 0,f?c(`order`,`1-0-0`,f):void 0,m?c(`product_list`,`2-0-1`,m):void 0,T?c(`response_list`,`1-0-0`,T):void 0,D?c(`step`,`1-0-0`,D):void 0],r))}var U=`rapid_scroll`;function en(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(U,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,{node_type:`unknown`})],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(U,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,u)],t)}var tn=l(U,en),nn=100,rn=100,an=300,on=0,sn=0,cn=T((e,t)=>{tn(e,t),H(`rapid_scroll`,e,t)},an);function ln(e,t){let n=e.event.target||document.documentElement;if(!(n instanceof HTMLElement))return;let r=n.scrollTop,i=Date.now()-sn;Math.abs(r-on)>nn&&i<rn&&cn(e,t),on=r,sn=Date.now()}var un=u(`scroll`,ln,!0),W=`rapid_click`;function dn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(W,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,{node_type:`unknown`}),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(W,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,u),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var fn=l(W,dn),G=0,pn=0,mn=3,hn=500;function gn(e,t){let n=new Date().getTime();n-pn<hn?G++:G=1,pn=n,G>=mn&&(fn(e,t),H(`rapid_click`,e,t),G=0)}var _n=u(`click`,gn),K=`right_click`;function vn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(K,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,{node_type:`unknown`}),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0]);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(K,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,u),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var yn=l(K,vn);function bn(e,t){yn(e,t),H(`right_click`,e,t)}var xn=u(`contextmenu`,bn),Sn=`mouse_shake`;function Cn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(Sn,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var wn=l(Sn,Cn),Tn=5,En=500,Dn=500,On={x:0,y:0},q=[],kn=0,An=T((e,t)=>{wn(e,t),H(`mouse_shake`,e,t)},En);function jn(e,t){let{event:n}=e;if(!(n instanceof MouseEvent))return;let r=Date.now(),i=n.clientX-On.x,a=Math.sign(i);r-kn>Dn&&(q=[]),a!==0&&(q.length===0||q.at(-1)!==a)&&q.push(a),On={x:n.clientX,y:n.clientY},q.length>=Tn&&(An({analyticsContext:e.analyticsContext,event:n},t),q=[]),kn=r}var Mn=u(`mousemove`,jn),Nn=`page_visible`;function Pn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(Nn,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var Fn=l(Nn,Pn),In=`page_hidden`;function Ln(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(In,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var Rn=l(In,Ln);function zn(e,t){if(document.visibilityState===`visible`){Fn(e,t);return}Rn(e,t)}var Bn=d(`visibilitychange`,zn),J=`backspace`;function Vn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(J,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,{node_type:`unknown`}),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(J,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,u),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var Hn=l(J,Vn);function Un(e,t){let{event:n}=e;n instanceof KeyboardEvent&&n.key===`Backspace`&&Hn({analyticsContext:e.analyticsContext,event:n},t)}var Wn=u(`keydown`,Un),Gn=`page_hide`;function Kn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(Gn,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var qn=l(Gn,Kn);function Jn(e,t){qn(e,t)}var Yn=f(`pagehide`,Jn),Xn=`page_show`;function Zn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(Xn,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var Qn=l(Xn,Zn);function $n(e,t){Qn(e,t)}var er=f(`pageshow`,$n),tr=`offline`;function nr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(tr,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var rr=l(tr,nr);function ir(e,t){rr(e,t)}var ar=f(`offline`,ir),Y=`scroll`;function or(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(Y,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(Y,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,u)],t)}var sr=l(Y,or),cr=u(`scroll`,T((e,t)=>{sr(e,t),H(`scroll`,e,t)},500),!0),lr=`online`;function ur(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(lr,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var dr=l(lr,ur);function fr(e,t){dr(e,t)}var pr=f(`online`,fr),mr=`resize`;function hr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(mr,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var gr=l(mr,hr),X=0,_r=f(`resize`,T((e,t)=>{let n=window.innerWidth;n===X?`ontouchstart`in window||gr(e,t):(gr(e,t),X=n),X=n},300)),vr=`unload`;function yr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(vr,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var br=l(vr,yr);function xr(e,t){br(e,t)}var Sr=f(`unload`,xr);function Cr(e,t){Zt(e,t),H(`click`,e,t)}var wr=u(`click`,Cr),Z=`paste`;function Tr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(Z,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(Z,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,u)],t)}var Er=l(Z,Tr);function Dr(e,t){Er(e,t)}var Or=u(`paste`,Dr),Q=`copy`;function kr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(Q,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(Q,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,u)],t)}var Ar=l(Q,kr);function jr(e,t){Ar(e,t)}var Mr=u(`copy`,jr),$=`drag`;function Nr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s($,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s($,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,u)],t)}var Pr=l($,Nr);function Fr(e,t){let n=e.event.currentTarget;if(!n||!(n instanceof HTMLElement))return;function r(t){Fr({event:t,analyticsContext:e.analyticsContext})}n.removeEventListener(`drag`,r),n.addEventListener(`dragend`,()=>Ir(n,()=>e.analyticsContext)),Pr(e,t),H(`drag`,e,t)}var Ir=u(`drag`,Fr);function Lr(e,t){t&&(wr(t,e),_n(t,e),xn(t,e),Mr(t,e),Or(t,e),Ir(t,e),Wn(t,e),cr(t,e),un(t,e),Mn(t,e))}function Rr(e){Bn(e),Yn(e),er(e),ar(e),pr(e),_r(e),Sr(e)}Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Lr}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return At}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Rr}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return at}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return Te}});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @file Shared mock analytics context for tests. */
|
|
1
2
|
export declare const mockAnalyticsContext: {
|
|
2
3
|
sessionId: string;
|
|
3
4
|
experience: {
|
|
@@ -6,6 +7,8 @@ export declare const mockAnalyticsContext: {
|
|
|
6
7
|
};
|
|
7
8
|
step: {
|
|
8
9
|
id: string;
|
|
10
|
+
key: string;
|
|
11
|
+
name: string;
|
|
9
12
|
label: string;
|
|
10
13
|
fieldIds: string[];
|
|
11
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics-event.d.ts","sourceRoot":"","sources":["../../../src/fixtures/analytics-event.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"analytics-event.d.ts","sourceRoot":"","sources":["../../../src/fixtures/analytics-event.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;CAehC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backspace.d.ts","sourceRoot":"","sources":["../../../src/listeners/backspace.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"backspace.d.ts","sourceRoot":"","sources":["../../../src/listeners/backspace.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAYhD,eAAO,MAAM,YAAY,+EAAyC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mouse_shake.d.ts","sourceRoot":"","sources":["../../../src/listeners/mouse_shake.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mouse_shake.d.ts","sourceRoot":"","sources":["../../../src/listeners/mouse_shake.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAkDhD,eAAO,MAAM,YAAY,+EAA2C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rapid_scroll.d.ts","sourceRoot":"","sources":["../../../src/listeners/rapid_scroll.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rapid_scroll.d.ts","sourceRoot":"","sources":["../../../src/listeners/rapid_scroll.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AA4ChD,eAAO,MAAM,YAAY,+EAAwD,CAAA"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -53,104 +53,117 @@ export interface CreateTrackerOptions {
|
|
|
53
53
|
projectId?: string;
|
|
54
54
|
/**
|
|
55
55
|
* The application ID. Defaults to the value of VITE_SNOWPLOW_APP_ID.
|
|
56
|
+
*
|
|
56
57
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/tracker-setup/initialization-options/
|
|
57
58
|
*/
|
|
58
59
|
appId?: string;
|
|
59
60
|
/**
|
|
60
61
|
* The collector URL. Defaults to the value of VITE_SNOWPLOW_COLLECTOR_URL.
|
|
62
|
+
*
|
|
61
63
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/tracker-setup/initialization-options/
|
|
62
64
|
*/
|
|
63
65
|
collectorUrl?: string;
|
|
64
66
|
/**
|
|
65
|
-
* Enable activity tracking page pings
|
|
67
|
+
* Enable activity tracking page pings.
|
|
68
|
+
*
|
|
66
69
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/previous-versions/javascript-tracker-v3/tracking-events/#activity-tracking-page-pings
|
|
67
70
|
*/
|
|
68
71
|
trackActivity?: boolean;
|
|
69
72
|
/**
|
|
70
|
-
* Callback for activity tracking
|
|
73
|
+
* Callback for activity tracking.
|
|
74
|
+
*
|
|
71
75
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/previous-versions/javascript-tracker-v3/tracking-events/#enableactivitytrackingcallback
|
|
72
76
|
*/
|
|
73
77
|
trackActivityCallback?: (data: ActivityCallbackData) => void;
|
|
74
78
|
/**
|
|
75
|
-
* Attach the page view ID to all events
|
|
79
|
+
* Attach the page view ID to all events.
|
|
80
|
+
*
|
|
76
81
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/tracking-events/page-views/#webpage-page-view-id-context-entity
|
|
77
82
|
*/
|
|
78
83
|
trackWebPage?: boolean;
|
|
79
84
|
/**
|
|
80
|
-
* Attach the session to all events
|
|
85
|
+
* Attach the session to all events.
|
|
86
|
+
*
|
|
81
87
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/tracking-events/session/
|
|
82
88
|
*/
|
|
83
89
|
trackSessions?: boolean;
|
|
84
90
|
/**
|
|
85
|
-
* Attach the browser context to all events
|
|
91
|
+
* Attach the browser context to all events.
|
|
92
|
+
*
|
|
86
93
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/browsers/
|
|
87
94
|
*/
|
|
88
95
|
trackBrowser?: boolean;
|
|
89
96
|
/**
|
|
90
|
-
* Enable the error tracking plugin
|
|
97
|
+
* Enable the error tracking plugin.
|
|
98
|
+
*
|
|
91
99
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/tracking-events/errors/
|
|
92
100
|
*/
|
|
93
101
|
trackErrors?: boolean;
|
|
94
102
|
/**
|
|
95
|
-
* Enable the core web vitals tracking plugin
|
|
103
|
+
* Enable the core web vitals tracking plugin.
|
|
104
|
+
*
|
|
96
105
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/tracking-events/web-vitals/
|
|
97
106
|
*/
|
|
98
107
|
trackVitals?: boolean;
|
|
99
108
|
/**
|
|
100
|
-
* Enable the navigation performance tracking plugin
|
|
109
|
+
* Enable the navigation performance tracking plugin.
|
|
110
|
+
*
|
|
101
111
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/tracking-events/timings/
|
|
102
112
|
*/
|
|
103
113
|
trackPerformance?: boolean;
|
|
104
114
|
/**
|
|
105
|
-
* CSS selector allowlist for button click tracking
|
|
115
|
+
* CSS selector allowlist for button click tracking.
|
|
116
|
+
*
|
|
106
117
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/tracking-events/timings/
|
|
107
118
|
*/
|
|
108
119
|
trackButtonClickAllowList?: string[];
|
|
109
120
|
/**
|
|
110
|
-
* Filter function for button click tracking
|
|
121
|
+
* Filter function for button click tracking.
|
|
122
|
+
*
|
|
111
123
|
* @see https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/tracking-events/button-click/#filter-function
|
|
112
124
|
*/
|
|
113
125
|
trackButtonClickFilter?: (element: HTMLElement) => boolean;
|
|
114
126
|
/**
|
|
115
|
-
* Parameters related to the CVLY-X environment
|
|
127
|
+
* Parameters related to the CVLY-X environment.
|
|
128
|
+
*
|
|
116
129
|
* @deprecated
|
|
117
130
|
*/
|
|
118
131
|
cvlyX?: {
|
|
119
132
|
/**
|
|
120
|
-
* The Git commit SHA of the current deployment (GIT_COMMIT_SHA)
|
|
133
|
+
* The Git commit SHA of the current deployment (GIT_COMMIT_SHA).
|
|
121
134
|
*/
|
|
122
135
|
gitCommitSha?: string;
|
|
123
136
|
/**
|
|
124
|
-
* The Vercel deployment ID (VERCEL_DEPLOYMENT_ID)
|
|
137
|
+
* The Vercel deployment ID (VERCEL_DEPLOYMENT_ID).
|
|
125
138
|
*/
|
|
126
139
|
vercelDeploymentId: string;
|
|
127
140
|
/**
|
|
128
|
-
* The Vercel environment in which the application is running (e.g., production, preview, development) (VERCEL_ENV)
|
|
141
|
+
* The Vercel environment in which the application is running (e.g., production, preview, development) (VERCEL_ENV).
|
|
129
142
|
*/
|
|
130
143
|
vercelEnv: string;
|
|
131
144
|
/**
|
|
132
|
-
* The Vercel URL of the current deployment (VERCEL_URL)
|
|
145
|
+
* The Vercel URL of the current deployment (VERCEL_URL).
|
|
133
146
|
*/
|
|
134
147
|
vercelUrl: string;
|
|
135
148
|
};
|
|
136
149
|
/**
|
|
137
|
-
* Parameters related to the application deployment environment
|
|
150
|
+
* Parameters related to the application deployment environment.
|
|
138
151
|
*/
|
|
139
152
|
deployment: {
|
|
140
153
|
/**
|
|
141
|
-
* The deployment environment
|
|
154
|
+
* The deployment environment.
|
|
142
155
|
*/
|
|
143
156
|
env: string;
|
|
144
157
|
/**
|
|
145
|
-
* The Git commit SHA of the current deployment
|
|
158
|
+
* The Git commit SHA of the current deployment.
|
|
146
159
|
*/
|
|
147
160
|
sha?: string;
|
|
148
161
|
/**
|
|
149
|
-
* The deployment ID
|
|
162
|
+
* The deployment ID.
|
|
150
163
|
*/
|
|
151
164
|
id?: string;
|
|
152
165
|
/**
|
|
153
|
-
* The host address for the deployment
|
|
166
|
+
* The host address for the deployment.
|
|
154
167
|
*/
|
|
155
168
|
host?: string;
|
|
156
169
|
};
|
|
@@ -185,6 +198,7 @@ export interface AnalyticsQuestion {
|
|
|
185
198
|
export type AnalyticsField = Field;
|
|
186
199
|
export interface AnalyticsResponse {
|
|
187
200
|
fieldId: string;
|
|
201
|
+
fieldKey: string;
|
|
188
202
|
value: FieldValue | undefined;
|
|
189
203
|
}
|
|
190
204
|
export interface AnalyticsFeature {
|
|
@@ -193,8 +207,7 @@ export interface AnalyticsFeature {
|
|
|
193
207
|
key: string;
|
|
194
208
|
bucket: boolean | string;
|
|
195
209
|
}
|
|
196
|
-
export type
|
|
197
|
-
export type AnalyticsException = FieldValidationError | FormValidationError;
|
|
210
|
+
export type AnalyticsException = FieldValidationError | string;
|
|
198
211
|
export interface AnalyticsOrder {
|
|
199
212
|
id: string;
|
|
200
213
|
checkoutToken?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,cAAc,EACd,KAAK,EACL,UAAU,EACV,eAAe,IAAI,oBAAoB,EACxC,MAAM,gBAAgB,CAAA;AACvB,O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AS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC7B,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,MAAM,CAAC,EAAE,cAAc,EAAE,CAAA;IACzB,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC/B,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,WAAW,CAAC,EAAE,oBAAoB,CAAA;IAClC,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B,cAAc,CAAC,EAAE,uBAAuB,CAAA;IACxC,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACrC"}
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,28 +1,108 @@
|
|
|
1
1
|
import { AnalyticsContext, AppContext, Context, ContextArray, ExceptionContext, ExperienceContext, FeatureListContext, FieldListContext, FormContext, ModalContext, OrderContext, ProductListContext, ResponseListContext, SchemaUrl, SessionContext, SnowplowEventWithContext, SnowplowSelfDescribingEvent, StepContext } from './types';
|
|
2
2
|
import { EventSchema } from './schemas';
|
|
3
3
|
export declare function schemaUrl<T extends string, U extends string>(schema: T, version: U): SchemaUrl<T, U>;
|
|
4
|
-
export declare function log(
|
|
5
|
-
export declare function warn(
|
|
6
|
-
export declare function error(
|
|
4
|
+
export declare function log(_message: string, ..._data: unknown[]): void;
|
|
5
|
+
export declare function warn(_message: string, ..._data: unknown[]): void;
|
|
6
|
+
export declare function error(_message: string, ..._data: unknown[]): void;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a Snowplow self-describing event with the given type, context array, and optional metadata.
|
|
9
|
+
*
|
|
10
|
+
* @param type - The event type identifier.
|
|
11
|
+
* @param context - The array of Snowplow context entities to attach to the event.
|
|
12
|
+
* @param meta - Optional metadata to include in the event payload.
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const event = createEvent('page_view', [appContext, sessionContext], { source: 'sdk' })
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
7
18
|
export declare function createEvent<E extends SnowplowEventWithContext<string, ContextArray, ContextArray>>(type: E['event']['data']['type'], context: E['context'], meta?: E['event']['data']['meta']): SnowplowSelfDescribingEvent;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a Snowplow self-describing context object from a schema name, version, and data payload.
|
|
21
|
+
*
|
|
22
|
+
* @param schema - The schema name for the context.
|
|
23
|
+
* @param version - The schema version string.
|
|
24
|
+
* @param data - The context data payload.
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const ctx = createContext('session', '1-0-0', { id: 'abc123' })
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
8
30
|
export declare function createContext<S extends string, V extends string, D extends Record<string, unknown>>(schema: S, version: V, data: D): Context<SchemaUrl<S, V>, D>;
|
|
9
31
|
export declare function createTrackEvent(eventName: string, formatter: (_: null, eventMeta?: EventSchema['meta']) => SnowplowSelfDescribingEvent): (eventMeta?: EventSchema['meta']) => void;
|
|
10
32
|
export declare function createTrackEvent<P>(eventName: string, formatter: (eventPayload: P, eventMeta?: EventSchema['meta']) => SnowplowSelfDescribingEvent): (eventPayload: P, eventMeta?: EventSchema['meta']) => void;
|
|
11
|
-
export declare function createBindListener
|
|
33
|
+
export declare function createBindListener(type: string, handler: (interaction: {
|
|
12
34
|
analyticsContext: AnalyticsContext;
|
|
13
|
-
event:
|
|
35
|
+
event: Event;
|
|
14
36
|
}) => void, options?: AddEventListenerOptions | boolean): (target: EventTarget, createAnalyticsContext: () => AnalyticsContext) => void;
|
|
15
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Creates a function that binds an event listener to the document, ensuring each event type is only bound once.
|
|
39
|
+
*
|
|
40
|
+
* @param type - The DOM event type to listen for (e.g., 'visibilitychange').
|
|
41
|
+
* @param handler - The handler that receives both the analytics context and the DOM event.
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const bindScroll = createDocumentBindListener('scroll', ({ analyticsContext, event }) => { ... })
|
|
45
|
+
* bindScroll(getAnalyticsContext)
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare function createDocumentBindListener(type: string, handler: (interaction: {
|
|
16
49
|
analyticsContext: AnalyticsContext;
|
|
17
|
-
event:
|
|
50
|
+
event: Event;
|
|
18
51
|
}) => void): (createAnalyticsContext: () => AnalyticsContext) => void;
|
|
19
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Creates a function that binds an event listener to the window, ensuring each event type is only bound once.
|
|
54
|
+
*
|
|
55
|
+
* @param type - The DOM event type to listen for (e.g., 'resize').
|
|
56
|
+
* @param handler - The handler that receives both the analytics context and the DOM event.
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const bindResize = createWindowBindListener('resize', ({ analyticsContext, event }) => { ... })
|
|
60
|
+
* bindResize(getAnalyticsContext)
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function createWindowBindListener(type: string, handler: (interaction: {
|
|
20
64
|
analyticsContext: AnalyticsContext;
|
|
21
|
-
event:
|
|
65
|
+
event: Event;
|
|
22
66
|
}) => void): (createAnalyticsContext: () => AnalyticsContext) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Formats A/B testing feature flags from the analytics context into the Snowplow feature list schema.
|
|
69
|
+
*
|
|
70
|
+
* @param event - The analytics context containing feature flag data.
|
|
71
|
+
* @example
|
|
72
|
+
* ```typescript
|
|
73
|
+
* const featureData = formatFeatureListContextData(analyticsContext)
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
23
76
|
export declare function formatFeatureListContextData(event: AnalyticsContext): FeatureListContext['data'];
|
|
77
|
+
/**
|
|
78
|
+
* Formats the organization and project identifiers from the analytics context into the Snowplow app context schema.
|
|
79
|
+
*
|
|
80
|
+
* @param event - The analytics context containing organization and project identifiers.
|
|
81
|
+
* @example
|
|
82
|
+
* ```typescript
|
|
83
|
+
* const appData = formatAppContextData(analyticsContext)
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
24
86
|
export declare function formatAppContextData(event: AnalyticsContext): AppContext['data'];
|
|
87
|
+
/**
|
|
88
|
+
* Formats session, identity, and third-party client IDs from the analytics context into the Snowplow session context schema.
|
|
89
|
+
*
|
|
90
|
+
* @param event - The analytics context containing session and identity data.
|
|
91
|
+
* @example
|
|
92
|
+
* ```typescript
|
|
93
|
+
* const sessionData = formatSessionContextData(analyticsContext)
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
25
96
|
export declare function formatSessionContextData(event: AnalyticsContext): SessionContext['data'];
|
|
97
|
+
/**
|
|
98
|
+
* Formats form field definitions from the analytics context into the Snowplow field list context schema.
|
|
99
|
+
*
|
|
100
|
+
* @param event - The analytics context containing field definitions.
|
|
101
|
+
* @example
|
|
102
|
+
* ```typescript
|
|
103
|
+
* const fieldData = formatFieldListContextData(analyticsContext)
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
26
106
|
export declare function formatFieldListContextData(event: AnalyticsContext): FieldListContext['data'] | undefined;
|
|
27
107
|
export declare function formatResponseListContextData(event: AnalyticsContext): ResponseListContext['data'] | undefined;
|
|
28
108
|
export declare function formatStepContextData(event: AnalyticsContext, required: true): StepContext['data'];
|
|
@@ -33,9 +113,38 @@ export declare function formatOrderContextData(event: AnalyticsContext, required
|
|
|
33
113
|
export declare function formatOrderContextData(event: AnalyticsContext, required?: false): OrderContext['data'] | undefined;
|
|
34
114
|
export declare function formatExperienceContextData(event: AnalyticsContext, required: true): ExperienceContext['data'];
|
|
35
115
|
export declare function formatExperienceContextData(event: AnalyticsContext, required?: false): ExperienceContext['data'] | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Formats the exception context data from an analytics event.
|
|
118
|
+
*
|
|
119
|
+
* @param event - The analytics context containing exception data.
|
|
120
|
+
* @param required - Whether exception context is required for this event.
|
|
121
|
+
* @returns The formatted exception context data, or undefined if not present and not required.
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* const data = formatExceptionContextData(event, true)
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
36
127
|
export declare function formatExceptionContextData(event: AnalyticsContext, required: true): ExceptionContext['data'];
|
|
37
128
|
export declare function formatExceptionContextData(event: AnalyticsContext, required?: false): ExceptionContext['data'] | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* Formats form data from the analytics context into the Snowplow form context schema, falling back to 'unknown' values if missing.
|
|
131
|
+
*
|
|
132
|
+
* @param event - The analytics context containing form data.
|
|
133
|
+
* @example
|
|
134
|
+
* ```typescript
|
|
135
|
+
* const formData = formatFormContextData(analyticsContext)
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
38
138
|
export declare function formatFormContextData(event: AnalyticsContext): FormContext['data'];
|
|
139
|
+
/**
|
|
140
|
+
* Formats modal data from the analytics context into the Snowplow modal context schema, falling back to 'unknown' values if missing.
|
|
141
|
+
*
|
|
142
|
+
* @param event - The analytics context containing modal data.
|
|
143
|
+
* @example
|
|
144
|
+
* ```typescript
|
|
145
|
+
* const modalData = formatModalContextData(analyticsContext)
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
39
148
|
export declare function formatModalContextData(event: AnalyticsContext): ModalContext['data'];
|
|
40
|
-
export declare function debounce(fn:
|
|
149
|
+
export declare function debounce<T extends (...args: any[]) => any>(fn: T, ms?: number): (this: unknown, ...args: Parameters<T>) => void;
|
|
41
150
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.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1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/analytics",
|
|
3
3
|
"description": "Picked Analytics",
|
|
4
|
-
"version": "0.0.1-dev.
|
|
4
|
+
"version": "0.0.1-dev.1774912386475",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@snowplow/browser-plugin-button-click-tracking": "^4.6.5",
|
|
7
7
|
"@snowplow/browser-plugin-error-tracking": "^4.6.5",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"main": "./dist/cjs/index.js",
|
|
59
59
|
"module": "./dist/esm/index.js",
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@picked/client": "0.0.1-dev.
|
|
61
|
+
"@picked/client": "0.0.1-dev.1774912386475",
|
|
62
62
|
"effector": "^23.3.0"
|
|
63
63
|
},
|
|
64
64
|
"private": false,
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"lint:report": "eslint . -o './.reports/eslint.json' -f json || true",
|
|
78
78
|
"size": "size-limit",
|
|
79
79
|
"test": "vitest run",
|
|
80
|
-
"test:coverage": "vitest
|
|
80
|
+
"test:coverage": "../../scripts/vitest-coverage.sh",
|
|
81
81
|
"test:packaged-types": "attw --pack",
|
|
82
82
|
"test:watch": "vitest",
|
|
83
83
|
"type-check": "tsgo -p . --noEmit",
|
package/dist/src-Bm5f206e.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e=require(`@snowplow/browser-tracker`),t=require(`@snowplow/browser-plugin-button-click-tracking`),n=require(`@snowplow/browser-plugin-performance-navigation-timing`),r=require(`@snowplow/browser-plugin-error-tracking`),i=require(`@snowplow/browser-plugin-web-vitals`),a=require(`@picked/client`);function o(e,t){return`iglu:dev.pckd/${e}/jsonschema/${t}`}function s(e,t,n={}){return{event:{schema:o(`event`,`1-0-0`),data:{type:e,meta:n}},context:t.filter(e=>e!==void 0)}}function c(e,t,n){return{schema:o(e,t),data:n}}function l(t,n){return(t,r)=>{(0,e.trackSelfDescribingEvent)(n(t,r))}}function u(e,t,n={passive:!0}){let r=new WeakMap;return(i,a)=>{let o=r.get(i);if(o||(o=new Set,r.set(i,o)),o.has(e))return;function s(e){t({event:e,analyticsContext:a()})}i.addEventListener(e,s,n),o.add(e)}}function d(e,t){let n=new Set;return r=>{if(n.has(e)||!(0,a.supportsDocument)())return;function i(e){t({event:e,analyticsContext:r()})}document.addEventListener(e,i,{passive:!0}),n.add(e)}}function f(e,t){let n=new Set;return r=>{if(n.has(e)||!(0,a.supportsWindow)())return;function i(e){t({event:e,analyticsContext:r()})}window.addEventListener(e,i,{passive:!0}),n.add(e)}}function p(e){return{items:e.features?.map(({feature:e,name:t,key:n,bucket:r})=>({ab_feature:e,ab_name:t,ab_key:n,ab_bucket:r}))||[]}}var m=`unknown`;function h(e){let t=D(),n={id:e.sessionId||null};return e.isUser!==void 0&&(n.is_user=e.isUser),e.identifiers&&Object.assign(n,e.identifiers),t&&(n.gaid=t),e.shopifySession?.clientId&&(n.shopify_client_id=e.shopifySession.clientId),e.shopifySession?.customerId&&(n.shopify_customer_id=e.shopifySession.customerId),e.shopifySession?.checkoutToken&&(n.shopify_checkout_token=e.shopifySession.checkoutToken),n}function g(e){if(e.fields)return{items:e.fields.map(({id:e,type:t,label:n,options:r})=>({id:e,type:t,label:n,options:Array.isArray(r)?r.map(({id:e,label:t,value:n})=>({id:e,label:t,value:n})):void 0}))}}function _(e){if(e.responses)return{items:e.responses.map(({fieldId:e,value:t})=>({field_id:e,values:Array.isArray(t)?t.map(e=>({value:e})):[{value:t}]}))}}function v(e,t=!1){let{step:n}=e;if(n)return{id:n.id,title:n.label};if(t)return{id:m,title:m}}function y(e,t=!1){let{productList:n}=e;if(n){let e={};`title`in n&&n.title&&Object.assign(e,{title:n.title});let t=`items`in n?n.items:n;return Object.assign(e,{items:t.map(e=>({item_id:e.itemId,item_name:e.itemName,affiliation:e.affiliation,coupon:e.coupon,currency:e.currency,creative_name:e.creativeName,creative_slot:e.creativeSlot,discount:E(e.discount),index:E(e.index),item_brand:e.itemBrand,item_category:e.itemCategory,item_category2:e.itemCategory2,item_category3:e.itemCategory3,item_category4:e.itemCategory4,item_category5:e.itemCategory5,item_list_id:e.itemListId,item_list_name:e.itemListName,item_variant:e.itemVariant,location_id:e.locationId,price:E(e.price),promotion_id:e.promotionId,promotion_name:e.promotionName,quantity:E(e.quantity),in_stock:e.inStock}))}),e}if(t)return{items:[]}}function b(e,t=!1){let{order:n}=e;if(n){let e={id:n.id};return n.checkoutToken&&(e.checkout_token=n.checkoutToken),n.cartToken&&(e.cart_token=n.cartToken),n.customerId&&(e.customer_id=n.customerId),e}if(t)return{id:m}}function x(e,t=!1){let{experience:n}=e;if(n)return{id:n.id,title:n.title};if(t)return{id:m,title:m}}function S(e,t=!1){let{exception:n}=e;if(n)return typeof n==`string`?{reason:n}:{reason:n.systemMessage};if(t)return{reason:m}}function C(e){let{form:t}=e;return t?{id:t.id,title:t.title}:{id:m,title:m}}function w(e){let{modal:t}=e;return t?{id:t.id,title:t.title}:{id:m,title:m}}function T(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function E(e){if(typeof e==`number`)return e;if(typeof e!=`string`)return;let t=parseFloat(e);if(!isNaN(t))return t}function D(){if(!(0,a.supportsDocument)()||!(0,a.supportsCookies)())return null;let e=document.cookie?document.cookie.split(`;`):[];for(let t of e){let e=t.trim();if(e.startsWith(`_ga=`)){let t=e.substring(4).split(`.`);if(t.length>2)return t.slice(2).join(`.`)}}}function ee(e){let a=[];return e.trackErrors&&a.push((0,r.ErrorTrackingPlugin)()),e.trackVitals&&a.push((0,i.WebVitalsPlugin)()),e.trackPerformance&&a.push((0,n.PerformanceNavigationTimingPlugin)()),(e.trackButtonClickAllowList||e.trackButtonClickFilter)&&a.push((0,t.ButtonClickTrackingPlugin)()),a}function te(n){n.trackActivity&&!n.trackActivityCallback&&(0,e.enableActivityTracking)({minimumVisitLength:30,heartbeatDelay:10}),n.trackActivity&&n.trackActivityCallback&&(0,e.enableActivityTrackingCallback)({minimumVisitLength:30,heartbeatDelay:10,callback:n.trackActivityCallback}),(n.trackButtonClickAllowList||n.trackButtonClickFilter)&&(0,t.enableButtonClickTracking)({filter:n.trackButtonClickAllowList?{allowlist:n.trackButtonClickAllowList}:n.trackButtonClickFilter}),n.trackErrors&&(0,r.enableErrorTracking)()}function ne({organizationId:t,projectId:n,cvlyX:r,deployment:i,collectorUrl:a=`evnts.pckd.dev`,appId:o=`picked-analytics`,trackVitals:s=!1,trackPerformance:c=!1,trackWebPage:l=!0,trackSessions:u=!0,trackBrowser:d=!0,trackActivity:f=!1,trackErrors:p=!1,trackActivityCallback:m,trackButtonClickAllowList:h}){let g={trackVitals:s,trackErrors:p,trackActivity:f,trackPerformance:c,trackActivityCallback:m,trackButtonClickAllowList:h,deployment:i},_=(0,e.newTracker)(o,a,{appId:o,platform:`web`,keepalive:!0,contexts:{webPage:l,session:u,browser:d||!1},plugins:ee(g)});return re({organizationId:t,projectId:n,cvlyX:r,deployment:i}),te(g),_}function re({organizationId:t,projectId:n,cvlyX:r,deployment:i}){if(!t||!n)throw Error(`bindGlobalContext: Both organizationId and projectId are required`);let a=[];a.push(c(`app`,`1-0-0`,{organization_id:t,project_id:n}),c(`deployment`,`1-0-1`,{sha:i.sha,id:i.id,env:i.env,host:i.host})),r&&a.push(c(`cvly_x`,`1-0-1`,{vercel_deployment_id:r.vercelDeploymentId,vercel_env:r.vercelEnv,vercel_url:r.vercelUrl})),(0,e.addGlobalContexts)(a)}var ie=`app_close`;function ae(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(ie,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var oe=l(ie,ae),se=`app_initialize`;function ce(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(se,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var le=l(se,ce),ue=`app_load`;function de(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(ue,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var fe=l(ue,de),pe=`app_open`;function me(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(pe,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var he=l(pe,me),ge=`experience_load`;function _e(e,t){let n=p(e),r=h(e),i=x(e,!0),a=v(e);return s(ge,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`experience`,`1-0-1`,i),a?c(`step`,`1-0-0`,a):void 0],t)}var ve=l(ge,_e),ye=`feature_decide`;function be(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(ye,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var xe=l(ye,be),O=`step_complete`;function Se(e,t){let n=p(e),r=h(e),i=x(e),a=v(e,!0),o=_(e),l=g(e);return s(O,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`step`,`1-0-0`,a),l&&c(`field_list`,`1-0-0`,l),o&&c(`response_list`,`1-0-0`,o),i&&c(`experience`,`1-0-1`,i)],t)}var Ce=l(O,Se),k=`step_enter`;function we(e,t){let n=p(e),r=h(e),i=x(e),a=v(e,!0),o=g(e);return s(k,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`step`,`1-0-0`,a),o&&c(`field_list`,`1-0-0`,o),i&&c(`experience`,`1-0-1`,i)],t)}var Te=l(k,we),A=`step_submit`;function Ee(e,t){let n=p(e),r=h(e),i=x(e),a=v(e,!0),o=_(e),l=g(e);return s(A,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`step`,`1-0-0`,a),l&&c(`field_list`,`1-0-0`,l),o&&c(`response_list`,`1-0-0`,o),i&&c(`experience`,`1-0-1`,i)],t)}var De=l(A,Ee),j=`step_submit_error`;function Oe(e,t){let n=p(e),r=h(e),i=S(e,!0),a=x(e),o=v(e,!0),l=g(e),u=_(e);return s(j,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`exception`,`1-0-0`,i),c(`step`,`1-0-0`,o),l&&c(`field_list`,`1-0-0`,l),u&&c(`response_list`,`1-0-0`,u),a&&c(`experience`,`1-0-1`,a)],t)}var ke=l(j,Oe),M=`step_submit_success`;function Ae(e,t){let n=p(e),r=h(e),i=x(e),a=v(e,!0),o=g(e),l=_(e);return s(M,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`step`,`1-0-0`,a),o&&c(`field_list`,`1-0-0`,o),l&&c(`response_list`,`1-0-0`,l),i&&c(`experience`,`1-0-1`,i)],t)}var je=l(M,Ae),N=`cart_add`;function P(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(N,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}function Me(e,t){return P(e,t)}var Ne=l(N,P),Pe=`cart_remove`;function Fe(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(Pe,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}function Ie(e,t){return Fe(e,t)}var Le=l(Pe,Fe),Re=`checkout_complete`;function ze(e,t){let n=p(e),r=h(e),i=y(e,!0),a=b(e,!0),o=x(e),l=v(e);return s(Re,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),c(`order`,`1-0-0`,a),o&&c(`experience`,`1-0-1`,o),l&&c(`step`,`1-0-0`,l)],t)}function Be(e,t){return ze(e,t)}var Ve=l(Re,ze),He=`checkout_start`;function Ue(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(He,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}function We(e,t){return Ue(e,t)}var Ge=l(He,Ue),Ke=`order_create`;function qe(e,t){let n=p(e),r=h(e),i=y(e,!0),a=b(e,!0),o=x(e),l=v(e);return s(Ke,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),c(`order`,`1-0-0`,a),o&&c(`experience`,`1-0-1`,o),l&&c(`step`,`1-0-0`,l)],t)}function Je(e,t){return qe(e,t)}var Ye=l(Ke,qe),Xe=`product_list_view`;function Ze(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(Xe,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),o?c(`step`,`1-0-0`,o):void 0,a?c(`experience`,`1-0-1`,a):void 0],t)}function Qe(e,t){return Ze(e,t)}var $e=l(Xe,Ze),et=`product_select`;function tt(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(et,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var nt=l(et,tt),rt=`product_view_details`;function it(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(rt,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}function at(e,t){return it(e,t)}var ot=l(rt,it),st=`recommendation_present`;function ct(e,t){let n=p(e),r=h(e),i=x(e),a=v(e),o=y(e,!0);return s(st,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,o),i&&c(`experience`,`1-0-1`,i),a&&c(`step`,`1-0-0`,a)],t)}var lt=l(st,ct),ut=`search_results_list_view`;function dt(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(ut,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),o?c(`step`,`1-0-0`,o):void 0,a?c(`experience`,`1-0-1`,a):void 0],t)}var ft=l(ut,dt),pt=`waitlist_join`;function mt(e,t){let n=p(e),r=h(e),i=x(e),a=v(e),o=y(e);return s(pt,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,o?c(`product_list`,`2-0-1`,o):void 0],t)}var ht=l(pt,mt),gt=`wishlist_add`;function _t(e,t){let n=p(e),r=h(e),i=y(e,!0),a=x(e),o=v(e);return s(gt,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`product_list`,`2-0-1`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var vt=l(gt,_t),yt=`field_validation_error`;function bt(e,t){let n=p(e),r=h(e),i=C(e),a=S(e,!0),o=x(e),l=v(e);return s(yt,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`exception`,`1-0-0`,a),c(`form`,`1-0-0`,i),o&&c(`experience`,`1-0-1`,o),l&&c(`step`,`1-0-0`,l)],t)}var xt=l(yt,bt),St=`form_submit`;function Ct(e,t){let n=p(e),r=h(e),i=C(e),a=x(e),o=v(e);return s(St,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`form`,`1-0-0`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var wt=l(St,Ct),Tt=`form_submit_error`;function Et(e,t){let n=p(e),r=h(e),i=C(e),a=S(e,!0),o=x(e),l=v(e);return s(Tt,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`form`,`1-0-0`,i),c(`exception`,`1-0-0`,a),o&&c(`experience`,`1-0-1`,o),l&&c(`step`,`1-0-0`,l)],t)}var Dt=l(Tt,Et),Ot=`form_submit_success`;function kt(e,t){let n=p(e),r=h(e),i=C(e),a=x(e),o=v(e);return s(Ot,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`form`,`1-0-0`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var At=l(Ot,kt),jt=`identify`;function Mt(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(jt,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`session`,`1-0-4`,r),c(`feature_list`,`2-0-0`,n),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}function Nt(e,t){return Mt(e,t)}var Pt=l(jt,Mt),F=`lead_capture`;function Ft(e,t){let n=p(e),r=h(e),i=x(e),a=v(e);return s(F,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a&&c(`step`,`1-0-0`,a),i&&c(`experience`,`1-0-1`,i)],t)}var It=l(F,Ft),Lt=`modal_close`;function Rt(e,t){let n=p(e),r=h(e),i=w(e),a=x(e),o=v(e);return s(Lt,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`modal`,`1-0-0`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var zt=l(Lt,Rt),Bt=`modal_open`;function Vt(e,t){let n=p(e),r=h(e),i=w(e),a=x(e),o=v(e);return s(Bt,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`modal`,`1-0-0`,i),a&&c(`experience`,`1-0-1`,a),o&&c(`step`,`1-0-0`,o)],t)}var Ht=l(Bt,Vt),Ut=`page_view`;function Wt(e,t){let n=p(e),r=h(e),i=x(e),a=v(e),o=y(e);return s(Ut,[c(`app`,`1-0-0`,{organization_id:e.organizationId,project_id:e.projectId}),c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,o?c(`product_list`,`2-0-1`,o):void 0],t)}function Gt(e,t){return Wt(e,t)}var Kt=l(Ut,Wt);function I(e){return e instanceof Element}function qt(e){return`data-picked-${e.replaceAll(`_`,`-`)}`}function L(e){let t=[`a`,`button`,`input`,`select`,`textarea`,`details`,`summary`,`label`,`form`,`fieldset`,`legend`,`optgroup`,`option`,`output`,`datalist`,`dialog`,`menu`,`menuitem`,`iframe`,`audio`,`video`,`embed`,`object`,`canvas`].join(`, `);return I(e)?e.matches(t)?e:e.closest(t):null}function R(e){if(e instanceof HTMLSelectElement){let t=e.selectedIndex||0;return e.options[t]?.text??``}return`innerText`in e&&typeof e.innerText==`string`?e.innerText:e.textContent}function z(e){let t=e.getAttribute(`aria-label`);if(t)return t;let n=e.getAttribute(`aria-labelledby`);if(n){let e=document.getElementById(n);if(e){let t=R(e);if(t)return t}}if(`id`in e&&e.id){let t=document.querySelector(`label[for="${e.id}"]`);if(t){let e=R(t);if(e)return e}}let r=e.parentElement;for(;r;){if(r.tagName.toLowerCase()===`label`){let e=R(r);if(e)return e}r=r.parentElement}if(e instanceof HTMLInputElement&&`labels`in e&&e.labels){let t=Array.from(e.labels).map(e=>R(e)).filter(Boolean).join(` `);if(t)return t}return`placeholder`in e&&typeof e.placeholder==`string`?e.placeholder:null}function Jt(e,t){if(!I(e))return null;let n=qt(t),r=e.closest(`[${n}]`);if(!r)return null;let i=r.getAttribute(n);return i?{element:r,customEventName:i}:null}var Yt=255;function B(e){return e?e.slice(0,Yt):null}var V=`click`;function Xt(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(V,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,{node_type:`unknown`}),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(V,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,u),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var Zt=l(V,Xt);function Qt(e,t,n,r){let i=S(n.analyticsContext),a=x(n.analyticsContext),o=p(n.analyticsContext),l=g(n.analyticsContext),u=C(n.analyticsContext),d=w(n.analyticsContext),f=b(n.analyticsContext),m=y(n.analyticsContext),T=_(n.analyticsContext),E=h(n.analyticsContext),D=v(n.analyticsContext),ee={id:t.id||null,node_type:t.nodeName.toLowerCase(),label:B(z(t)),text:B(R(t))};return s(e,[c(`app`,`1-0-0`,{organization_id:n.analyticsContext.organizationId,project_id:n.analyticsContext.projectId}),c(`session`,`1-0-4`,E),c(`element`,`1-0-0`,ee),i?c(`exception`,`1-0-0`,i):void 0,a?c(`experience`,`1-0-1`,a):void 0,o?c(`feature_list`,`2-0-0`,o):void 0,l?c(`field_list`,`1-0-0`,l):void 0,u?c(`form`,`1-0-0`,u):void 0,d?c(`modal`,`1-0-0`,d):void 0,f?c(`order`,`1-0-0`,f):void 0,m?c(`product_list`,`2-0-1`,m):void 0,T?c(`response_list`,`1-0-0`,T):void 0,D?c(`step`,`1-0-0`,D):void 0],r)}function H(t,n,r){let i=Jt(n.event.target,t);if(!i)return;let{element:a,customEventName:o}=i;(0,e.trackSelfDescribingEvent)(Qt(o,a,n,r))}function $t(t,n,r){let i=S(t),a=x(t),o=p(t),l=g(t),u=t.form?C(t):void 0,d=t.modal?w(t):void 0,f=b(t),m=y(t),T=_(t),E=h(t),D=v(t);(0,e.trackSelfDescribingEvent)(s(n,[c(`app`,`1-0-0`,{organization_id:t.organizationId,project_id:t.projectId}),c(`session`,`1-0-4`,E),i?c(`exception`,`1-0-0`,i):void 0,a?c(`experience`,`1-0-1`,a):void 0,c(`feature_list`,`2-0-0`,o),l?c(`field_list`,`1-0-0`,l):void 0,u?c(`form`,`1-0-0`,u):void 0,d?c(`modal`,`1-0-0`,d):void 0,f?c(`order`,`1-0-0`,f):void 0,m?c(`product_list`,`2-0-1`,m):void 0,T?c(`response_list`,`1-0-0`,T):void 0,D?c(`step`,`1-0-0`,D):void 0],r))}var U=`rapid_scroll`;function en(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(U,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,{node_type:`unknown`})],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(U,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,u)],t)}var tn=l(U,en),nn=100,rn=100,an=300,on=0,sn=0,cn=T((e,t)=>{tn(e,t),H(`rapid_scroll`,e,t)},an);function ln(e,t){let n=e.event.target||document.documentElement;if(!(n instanceof HTMLElement))return;let r=n.scrollTop,i=Date.now()-sn;Math.abs(r-on)>nn&&i<rn&&cn(e,t),on=r,sn=Date.now()}var un=u(`scroll`,ln,!0),W=`rapid_click`;function dn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(W,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,{node_type:`unknown`}),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(W,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,u),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var fn=l(W,dn),G=0,pn=0,mn=3,hn=500;function gn(e,t){let n=new Date().getTime();n-pn<hn?G++:G=1,pn=n,G>=mn&&(fn(e,t),H(`rapid_click`,e,t),G=0)}var _n=u(`click`,gn),K=`right_click`;function vn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(K,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,{node_type:`unknown`}),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0]);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(K,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,u),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var yn=l(K,vn);function bn(e,t){yn(e,t),H(`right_click`,e,t)}var xn=u(`contextmenu`,bn),Sn=`mouse_shake`;function Cn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(Sn,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var wn=l(Sn,Cn),Tn=5,En=500,Dn=500,On={x:0,y:0},q=[],kn=0,An=T((e,t)=>{wn(e,t),H(`mouse_shake`,e,t)},En);function jn(e,t){let n=Date.now(),r=e.event.clientX-On.x,i=Math.sign(r);n-kn>Dn&&(q=[]),i!==0&&(q.length===0||q.at(-1)!==i)&&q.push(i),On={x:e.event.clientX,y:e.event.clientY},q.length>=Tn&&(An(e,t),q=[]),kn=n}var Mn=u(`mousemove`,jn),Nn=`page_visible`;function Pn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(Nn,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var Fn=l(Nn,Pn),In=`page_hidden`;function Ln(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(In,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var Rn=l(In,Ln);function zn(e,t){if(document.visibilityState===`visible`){Fn(e,t);return}Rn(e,t)}var Bn=d(`visibilitychange`,zn),J=`backspace`;function Vn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(J,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,{node_type:`unknown`}),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(J,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),c(`element`,`1-0-0`,u),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var Hn=l(J,Vn);function Un(e,t){e.event.key===`Backspace`&&Hn(e,t)}var Wn=u(`keydown`,Un),Gn=`page_hide`;function Kn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(Gn,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var qn=l(Gn,Kn);function Jn(e,t){qn(e,t)}var Yn=f(`pagehide`,Jn),Xn=`page_show`;function Zn(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(Xn,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var Qn=l(Xn,Zn);function $n(e,t){Qn(e,t)}var er=f(`pageshow`,$n),tr=`offline`;function nr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(tr,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var rr=l(tr,nr);function ir(e,t){rr(e,t)}var ar=f(`offline`,ir),Y=`scroll`;function or(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(Y,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(Y,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,u)],t)}var sr=l(Y,or),cr=u(`scroll`,T((e,t)=>{sr(e,t),H(`scroll`,e,t)},500),!0),lr=`online`;function ur(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(lr,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var dr=l(lr,ur);function fr(e,t){dr(e,t)}var pr=f(`online`,fr),mr=`resize`;function hr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(mr,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var gr=l(mr,hr),X=0,_r=f(`resize`,T((e,t)=>{let n=window.innerWidth;n===X?`ontouchstart`in window||gr(e,t):(gr(e,t),X=n),X=n},300)),vr=`unload`;function yr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext);return s(vr,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t)}var br=l(vr,yr);function xr(e,t){br(e,t)}var Sr=f(`unload`,xr);function Cr(e,t){Zt(e,t),H(`click`,e,t)}var wr=u(`click`,Cr),Z=`paste`;function Tr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(Z,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(Z,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,u)],t)}var Er=l(Z,Tr);function Dr(e,t){Er(e,t)}var Or=u(`paste`,Dr),Q=`copy`;function kr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s(Q,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s(Q,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,u)],t)}var Ar=l(Q,kr);function jr(e,t){Ar(e,t)}var Mr=u(`copy`,jr),$=`drag`;function Nr(e,t){let n=p(e.analyticsContext),r=h(e.analyticsContext),i=x(e.analyticsContext),a=v(e.analyticsContext),o=e.event.target||document.activeElement||e.event.currentTarget;if(!I(o))return s($,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0],t);let l=L(o)||o,u={id:l.id||null,node_type:l.nodeName.toLowerCase(),label:B(z(l)),text:B(R(l))};return s($,[c(`feature_list`,`2-0-0`,n),c(`session`,`1-0-4`,r),a?c(`step`,`1-0-0`,a):void 0,i?c(`experience`,`1-0-1`,i):void 0,c(`element`,`1-0-0`,u)],t)}var Pr=l($,Nr);function Fr(e,t){let n=e.event.currentTarget;if(!n||!(n instanceof HTMLElement))return;function r(t){Fr({event:t,analyticsContext:e.analyticsContext})}n.removeEventListener(`drag`,r),n.addEventListener(`dragend`,()=>Ir(n,()=>e.analyticsContext)),Pr(e,t),H(`drag`,e,t)}var Ir=u(`drag`,Fr);function Lr(e,t){t&&(wr(t,e),_n(t,e),xn(t,e),Mr(t,e),Or(t,e),Ir(t,e),Wn(t,e),cr(t,e),un(t,e),Mn(t,e))}function Rr(e){Bn(e),Yn(e),er(e),ar(e),pr(e),_r(e),Sr(e)}Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Lr}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return At}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Rr}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return at}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return Te}});
|