@picked/analytics 0.0.1-dev.1772073931707 → 0.0.1-dev.1772085077346
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 +2 -2
- package/dist/esm/plugins/analytics/index.js +1 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/dist/user-interaction-fdzRiqMQ.cjs +1 -0
- package/dist/{user-interaction-FuYrt5Ug.js → user-interaction-kygP7IXa.js} +194 -194
- package/package.json +2 -2
- package/dist/user-interaction-DNX_8pjO.cjs +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../user-interaction-DNX_8pjO.cjs"),p="step_complete";function O(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e,!0),o=t.formatResponseListContextData(e),i=t.formatFieldListContextData(e);return t.createEvent(p,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("step","1-0-0",a),i&&t.createContext("field_list","1-0-0",i),o&&t.createContext("response_list","1-0-0",o),n&&t.createContext("experience","1-0-1",n)],r)}const R=t.createTrackEvent(p,O),C="step_submit_error";function M(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExceptionContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e,!0),i=t.formatFieldListContextData(e),x=t.formatResponseListContextData(e);return t.createEvent(C,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("exception","1-0-0",n),t.createContext("step","1-0-0",o),i&&t.createContext("field_list","1-0-0",i),x&&t.createContext("response_list","1-0-0",x),a&&t.createContext("experience","1-0-1",a)],r)}const W=t.createTrackEvent(C,M),E="cart_add";function u(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(E,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}function G(e,r){return u(e,r)}const J=t.createTrackEvent(E,u),D="cart_remove";function f(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(D,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}function U(e,r){return f(e,r)}const q=t.createTrackEvent(D,f),d="checkout_complete";function v(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatOrderContextData(e,!0),o=t.formatExperienceContextData(e),i=t.formatStepContextData(e);return t.createEvent(d,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),t.createContext("order","1-0-0",a),o&&t.createContext("experience","1-0-1",o),i&&t.createContext("step","1-0-0",i)],r)}function B(e,r){return v(e,r)}const H=t.createTrackEvent(d,v),m="checkout_start";function k(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(m,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}function K(e,r){return k(e,r)}const Q=t.createTrackEvent(m,k),_="order_create";function L(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatOrderContextData(e,!0),o=t.formatExperienceContextData(e),i=t.formatStepContextData(e);return t.createEvent(_,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),t.createContext("order","1-0-0",a),o&&t.createContext("experience","1-0-1",o),i&&t.createContext("step","1-0-0",i)],r)}function X(e,r){return L(e,r)}const Z=t.createTrackEvent(_,L),T="product_list_view";function S(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(T,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),o?t.createContext("step","1-0-0",o):void 0,a?t.createContext("experience","1-0-1",a):void 0],r)}function l(e,r){return S(e,r)}const y=t.createTrackEvent(T,S),P="product_select";function tt(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(P,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}const et=t.createTrackEvent(P,tt),$="product_view_details";function V(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent($,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}function rt(e,r){return V(e,r)}const at=t.createTrackEvent($,V),F="recommendation_present";function ot(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e),o=t.formatProductListContextData(e,!0);return t.createEvent(F,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",o),n&&t.createContext("experience","1-0-1",n),a&&t.createContext("step","1-0-0",a)],r)}const nt=t.createTrackEvent(F,ot),g="search_results_list_view";function ct(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(g,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),o?t.createContext("step","1-0-0",o):void 0,a?t.createContext("experience","1-0-1",a):void 0],r)}const st=t.createTrackEvent(g,ct),I="waitlist_join";function it(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e),o=t.formatProductListContextData(e);return t.createEvent(I,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),a?t.createContext("step","1-0-0",a):void 0,n?t.createContext("experience","1-0-1",n):void 0,o?t.createContext("product_list","2-0-1",o):void 0],r)}const xt=t.createTrackEvent(I,it),b="wishlist_add";function pt(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(b,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}const Ct=t.createTrackEvent(b,pt),j="identify";function z(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e);return t.createEvent(j,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("session","1-0-4",s),t.createContext("feature_list","2-0-0",c),a?t.createContext("step","1-0-0",a):void 0,n?t.createContext("experience","1-0-1",n):void 0],r)}function Et(e,r){return z(e,r)}const ut=t.createTrackEvent(j,z),w="lead_capture";function Dt(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e);return t.createEvent(w,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),a&&t.createContext("step","1-0-0",a),n&&t.createContext("experience","1-0-1",n)],r)}const ft=t.createTrackEvent(w,Dt),N="modal_close";function dt(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatModalContextData(e),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(N,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("modal","1-0-0",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}const vt=t.createTrackEvent(N,dt),Y="modal_open";function mt(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatModalContextData(e),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(Y,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("modal","1-0-0",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}const kt=t.createTrackEvent(Y,mt),h="page_view";function A(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e),o=t.formatProductListContextData(e);return t.createEvent(h,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),a?t.createContext("step","1-0-0",a):void 0,n?t.createContext("experience","1-0-1",n):void 0,o?t.createContext("product_list","2-0-1",o):void 0],r)}function _t(e,r){return A(e,r)}const Lt=t.createTrackEvent(h,A);exports.bindGlobalEventListeners=t.bindGlobalEventListeners;exports.bindUserInteractionListeners=t.bindUserInteractionListeners;exports.createTracker=t.createTracker;exports.trackAppCloseEvent=t.trackAppCloseEvent;exports.trackAppInitializeEvent=t.trackAppInitializeEvent;exports.trackAppLoadEvent=t.trackAppLoadEvent;exports.trackAppOpenEvent=t.trackAppOpenEvent;exports.trackCustomEvent=t.trackCustomEvent;exports.trackEvent=t.trackEvent;exports.trackExperienceLoadEvent=t.trackExperienceLoadEvent;exports.trackFeatureDecideEvent=t.trackFeatureDecideEvent;exports.trackFieldValidationErrorEvent=t.trackFieldValidationErrorEvent;exports.trackFormSubmitErrorEvent=t.trackFormSubmitErrorEvent;exports.trackFormSubmitEvent=t.trackFormSubmitEvent;exports.trackFormSubmitSuccessEvent=t.trackFormSubmitSuccessEvent;exports.trackStepEnterEvent=t.trackStepEnterEvent;exports.trackStepSubmitEvent=t.trackStepSubmitEvent;exports.trackStepSubmitSuccessEvent=t.trackStepSubmitSuccessEvent;exports.createCartAddTrackerEvent=G;exports.createCartRemoveTrackerEvent=U;exports.createCheckoutCompleteTrackerEvent=B;exports.createCheckoutStartTrackerEvent=K;exports.createIdentifyTrackerEvent=Et;exports.createOrderCreateTrackerEvent=X;exports.createPageViewTrackerEvent=_t;exports.createProductListViewTrackerEvent=l;exports.createProductViewTrackerEvent=rt;exports.trackCartAddEvent=J;exports.trackCartRemoveEvent=q;exports.trackCheckoutCompleteEvent=H;exports.trackCheckoutStartEvent=Q;exports.trackIdentifyEvent=ut;exports.trackLeadCaptureEvent=ft;exports.trackModalCloseEvent=vt;exports.trackModalOpenEvent=kt;exports.trackOrderCreateEvent=Z;exports.trackPageViewEvent=Lt;exports.trackProductListViewEvent=y;exports.trackProductSelectEvent=et;exports.trackProductViewDetailsEvent=at;exports.trackRecommendationPresentEvent=nt;exports.trackSearchResultsListViewEvent=st;exports.trackStepComplete=R;exports.trackStepSubmitErrorEvent=W;exports.trackWaitlistJoinEvent=xt;exports.trackWishlistAddEvent=Ct;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../user-interaction-fdzRiqMQ.cjs"),p="step_complete";function O(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e,!0),o=t.formatResponseListContextData(e),i=t.formatFieldListContextData(e);return t.createEvent(p,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("step","1-0-0",a),i&&t.createContext("field_list","1-0-0",i),o&&t.createContext("response_list","1-0-0",o),n&&t.createContext("experience","1-0-1",n)],r)}const R=t.createTrackEvent(p,O),C="step_submit_error";function M(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExceptionContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e,!0),i=t.formatFieldListContextData(e),x=t.formatResponseListContextData(e);return t.createEvent(C,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("exception","1-0-0",n),t.createContext("step","1-0-0",o),i&&t.createContext("field_list","1-0-0",i),x&&t.createContext("response_list","1-0-0",x),a&&t.createContext("experience","1-0-1",a)],r)}const W=t.createTrackEvent(C,M),E="cart_add";function u(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(E,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}function G(e,r){return u(e,r)}const J=t.createTrackEvent(E,u),D="cart_remove";function f(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(D,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}function U(e,r){return f(e,r)}const q=t.createTrackEvent(D,f),d="checkout_complete";function v(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatOrderContextData(e,!0),o=t.formatExperienceContextData(e),i=t.formatStepContextData(e);return t.createEvent(d,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),t.createContext("order","1-0-0",a),o&&t.createContext("experience","1-0-1",o),i&&t.createContext("step","1-0-0",i)],r)}function B(e,r){return v(e,r)}const H=t.createTrackEvent(d,v),m="checkout_start";function k(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(m,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}function K(e,r){return k(e,r)}const Q=t.createTrackEvent(m,k),_="order_create";function L(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatOrderContextData(e,!0),o=t.formatExperienceContextData(e),i=t.formatStepContextData(e);return t.createEvent(_,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),t.createContext("order","1-0-0",a),o&&t.createContext("experience","1-0-1",o),i&&t.createContext("step","1-0-0",i)],r)}function X(e,r){return L(e,r)}const Z=t.createTrackEvent(_,L),T="product_list_view";function S(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(T,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),o?t.createContext("step","1-0-0",o):void 0,a?t.createContext("experience","1-0-1",a):void 0],r)}function l(e,r){return S(e,r)}const y=t.createTrackEvent(T,S),P="product_select";function tt(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(P,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}const et=t.createTrackEvent(P,tt),$="product_view_details";function V(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent($,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}function rt(e,r){return V(e,r)}const at=t.createTrackEvent($,V),F="recommendation_present";function ot(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e),o=t.formatProductListContextData(e,!0);return t.createEvent(F,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",o),n&&t.createContext("experience","1-0-1",n),a&&t.createContext("step","1-0-0",a)],r)}const nt=t.createTrackEvent(F,ot),g="search_results_list_view";function ct(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(g,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),o?t.createContext("step","1-0-0",o):void 0,a?t.createContext("experience","1-0-1",a):void 0],r)}const st=t.createTrackEvent(g,ct),I="waitlist_join";function it(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e),o=t.formatProductListContextData(e);return t.createEvent(I,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),a?t.createContext("step","1-0-0",a):void 0,n?t.createContext("experience","1-0-1",n):void 0,o?t.createContext("product_list","2-0-1",o):void 0],r)}const xt=t.createTrackEvent(I,it),b="wishlist_add";function pt(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatProductListContextData(e,!0),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(b,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("product_list","2-0-1",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}const Ct=t.createTrackEvent(b,pt),j="identify";function z(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e);return t.createEvent(j,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("session","1-0-4",s),t.createContext("feature_list","2-0-0",c),a?t.createContext("step","1-0-0",a):void 0,n?t.createContext("experience","1-0-1",n):void 0],r)}function Et(e,r){return z(e,r)}const ut=t.createTrackEvent(j,z),w="lead_capture";function Dt(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e);return t.createEvent(w,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),a&&t.createContext("step","1-0-0",a),n&&t.createContext("experience","1-0-1",n)],r)}const ft=t.createTrackEvent(w,Dt),N="modal_close";function dt(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatModalContextData(e),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(N,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("modal","1-0-0",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}const vt=t.createTrackEvent(N,dt),Y="modal_open";function mt(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatModalContextData(e),a=t.formatExperienceContextData(e),o=t.formatStepContextData(e);return t.createEvent(Y,[t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),t.createContext("modal","1-0-0",n),a&&t.createContext("experience","1-0-1",a),o&&t.createContext("step","1-0-0",o)],r)}const kt=t.createTrackEvent(Y,mt),h="page_view";function A(e,r){const c=t.formatFeatureListContextData(e),s=t.formatSessionContextData(e),n=t.formatExperienceContextData(e),a=t.formatStepContextData(e),o=t.formatProductListContextData(e);return t.createEvent(h,[t.createContext("app","1-0-0",{organization_id:e.organizationId,project_id:e.projectId}),t.createContext("feature_list","2-0-0",c),t.createContext("session","1-0-4",s),a?t.createContext("step","1-0-0",a):void 0,n?t.createContext("experience","1-0-1",n):void 0,o?t.createContext("product_list","2-0-1",o):void 0],r)}function _t(e,r){return A(e,r)}const Lt=t.createTrackEvent(h,A);exports.bindGlobalEventListeners=t.bindGlobalEventListeners;exports.bindUserInteractionListeners=t.bindUserInteractionListeners;exports.createTracker=t.createTracker;exports.trackAppCloseEvent=t.trackAppCloseEvent;exports.trackAppInitializeEvent=t.trackAppInitializeEvent;exports.trackAppLoadEvent=t.trackAppLoadEvent;exports.trackAppOpenEvent=t.trackAppOpenEvent;exports.trackCustomEvent=t.trackCustomEvent;exports.trackEvent=t.trackEvent;exports.trackExperienceLoadEvent=t.trackExperienceLoadEvent;exports.trackFeatureDecideEvent=t.trackFeatureDecideEvent;exports.trackFieldValidationErrorEvent=t.trackFieldValidationErrorEvent;exports.trackFormSubmitErrorEvent=t.trackFormSubmitErrorEvent;exports.trackFormSubmitEvent=t.trackFormSubmitEvent;exports.trackFormSubmitSuccessEvent=t.trackFormSubmitSuccessEvent;exports.trackStepEnterEvent=t.trackStepEnterEvent;exports.trackStepSubmitEvent=t.trackStepSubmitEvent;exports.trackStepSubmitSuccessEvent=t.trackStepSubmitSuccessEvent;exports.createCartAddTrackerEvent=G;exports.createCartRemoveTrackerEvent=U;exports.createCheckoutCompleteTrackerEvent=B;exports.createCheckoutStartTrackerEvent=K;exports.createIdentifyTrackerEvent=Et;exports.createOrderCreateTrackerEvent=X;exports.createPageViewTrackerEvent=_t;exports.createProductListViewTrackerEvent=l;exports.createProductViewTrackerEvent=rt;exports.trackCartAddEvent=J;exports.trackCartRemoveEvent=q;exports.trackCheckoutCompleteEvent=H;exports.trackCheckoutStartEvent=Q;exports.trackIdentifyEvent=ut;exports.trackLeadCaptureEvent=ft;exports.trackModalCloseEvent=vt;exports.trackModalOpenEvent=kt;exports.trackOrderCreateEvent=Z;exports.trackPageViewEvent=Lt;exports.trackProductListViewEvent=y;exports.trackProductSelectEvent=et;exports.trackProductViewDetailsEvent=at;exports.trackRecommendationPresentEvent=nt;exports.trackSearchResultsListViewEvent=st;exports.trackStepComplete=R;exports.trackStepSubmitErrorEvent=W;exports.trackWaitlistJoinEvent=xt;exports.trackWishlistAddEvent=Ct;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("@picked/client"),v=require("effector"),e=require("../../../user-interaction-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("@picked/client"),v=require("effector"),e=require("../../../user-interaction-fdzRiqMQ.cjs");require("@snowplow/browser-tracker");function l(c){return c.isResolved}const k=({trackerOptions:c,enableDocumentListeners:E=!1})=>({name:"analytics",setup:n=>{if(!S.supportsWindow())return;const{organizationId:a,projectId:u}=n,d=()=>n.features.listStore.getState().flatMap(t=>{if(!l(t))return[];const{id:o,key:i,name:p}=t,{bucket:f}=t.getBucket();return[{name:p,key:i,feature:o,bucket:f}]}),x=r=>{if("experience"in r&&r.experience){const{experience:t}=r;return{id:t.experienceId,title:t.configStore.getState().name}}};e.createTracker({organizationId:a,projectId:u,...c});const m=r=>{const{experience:t}=r||{},o=d();return function(){return{organizationId:a,projectId:u,sessionId:n.session?.id,identifiers:n.session?.identifiers,isUser:n.session?.isUser,features:o,...t&&{experience:{id:t.experienceId,title:t.configStore.getState().name}}}}};if(E){const r=m();e.bindGlobalEventListeners(r)}n.experienceInstances.listStore.watch(r=>{r.forEach(t=>{const o=t.target;if(o){const i=m({experience:t});e.bindUserInteractionListeners(i,o.shadowRoot)}})});function s(r){return v.attach({source:{fields:n.fields.listStore,responses:n.responses.listStore},effect:async({fields:t,responses:o},i)=>{const p=d(),f={organizationId:a,projectId:u,sessionId:n.session?.id,experience:x(i),step:"step"in i?i.step:void 0,form:"form"in i?i.form:void 0,exception:"exception"in i?i.exception.reason?.[0]:void 0,fields:t,responses:o,features:p,isUser:n.session?.isUser,identifiers:n.session?.identifiers};return r(f)}})}v.split({source:n.eventBus,match:r=>r.type,cases:{load:s(e.trackAppLoadEvent),initialize:s(e.trackAppInitializeEvent),experience_initialize:s(e.trackExperienceLoadEvent),experience_open:s(e.trackAppOpenEvent),experience_close:s(e.trackAppCloseEvent),field_validation_error:s(e.trackFieldValidationErrorEvent),step_enter:s(e.trackStepEnterEvent),step_submit:s(e.trackStepSubmitEvent),step_submit_success:s(e.trackStepSubmitSuccessEvent),form_submit:s(e.trackFormSubmitEvent),form_submit_success:s(e.trackFormSubmitSuccessEvent),form_submit_error:s(e.trackFormSubmitErrorEvent),feature_decide:s(e.trackFeatureDecideEvent)}})}});exports.analyticsPlugin=k;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as i, f as p, a as u, b as d, d as E, e as m, g as x, h as f, i as e, j as Q, k as D, l as k, m as T } from "../user-interaction-
|
|
2
|
-
import { n as Ft, o as Ot, p as Rt, t as Mt, q as Wt, r as qt, s as Bt, u as Gt, v as Jt, w as Ut, x as Ht, y as Kt, z as Qt, A as Xt, B as Zt, C as lt, D as yt, E as te } from "../user-interaction-
|
|
1
|
+
import { c as i, f as p, a as u, b as d, d as E, e as m, g as x, h as f, i as e, j as Q, k as D, l as k, m as T } from "../user-interaction-kygP7IXa.js";
|
|
2
|
+
import { n as Ft, o as Ot, p as Rt, t as Mt, q as Wt, r as qt, s as Bt, u as Gt, v as Jt, w as Ut, x as Ht, y as Kt, z as Qt, A as Xt, B as Zt, C as lt, D as yt, E as te } from "../user-interaction-kygP7IXa.js";
|
|
3
3
|
const L = "step_complete";
|
|
4
4
|
function X(t, o) {
|
|
5
5
|
const a = p(t), c = u(t), s = d(t), r = E(t, !0), n = m(t), _ = x(t);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { supportsWindow as x } from "@picked/client";
|
|
2
2
|
import { split as E, attach as S } from "effector";
|
|
3
|
-
import { p as k, n as b, o as _, x as l, z as g, B as F, A as I, E as A, D as C, C as L, y as h, t as z, s as U, w, q as B, r as R } from "../../../user-interaction-
|
|
3
|
+
import { p as k, n as b, o as _, x as l, z as g, B as F, A as I, E as A, D as C, C as L, y as h, t as z, s as U, w, q as B, r as R } from "../../../user-interaction-kygP7IXa.js";
|
|
4
4
|
import "@snowplow/browser-tracker";
|
|
5
5
|
function D(o) {
|
|
6
6
|
return o.isResolved;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const h=require("@snowplow/browser-tracker"),it=require("@snowplow/browser-plugin-button-click-tracking"),Ot=require("@snowplow/browser-plugin-performance-navigation-timing"),rt=require("@snowplow/browser-plugin-error-tracking"),Ht=require("@snowplow/browser-plugin-web-vitals"),O=require("@picked/client");function ct(t,e){return`iglu:dev.pckd/${t}/jsonschema/${e}`}function g(t,...e){}function $(t,...e){}function l(t,e,o={}){return{event:{schema:ct("event","1-0-0"),data:{type:t,meta:o}},context:e.filter(i=>i!==void 0)}}function n(t,e,o){return{schema:ct(t,e),data:o}}function p(t,e){return(o,i)=>{const s=e(o,i);h.trackSelfDescribingEvent(s)}}function k(t,e,o={passive:!0}){const i=new WeakMap;return(s,a)=>{let r=i.get(s);if(r||(r=new Set,i.set(s,r)),r.has(t))return;function c(m){const E=a();e({event:m,analyticsContext:E})}s.addEventListener(t,c,o),r.add(t)}}function jt(t,e){const o=new Set;return i=>{if(o.has(t)||!O.supportsDocument())return;function s(a){const r=i();e({event:a,analyticsContext:r})}document.addEventListener(t,s,{passive:!0}),o.add(t)}}function N(t,e){const o=new Set;return i=>{if(o.has(t)||!O.supportsWindow())return;function s(a){const r=i();e({event:a,analyticsContext:r})}window.addEventListener(t,s,{passive:!0}),o.add(t)}}function u(t){return{items:t.features?.map(({feature:o,name:i,key:s,bucket:a})=>({ab_feature:o,ab_name:i,ab_key:s,ab_bucket:a}))||[]}}const _="unknown";function f(t){const e=It(),o={id:t.sessionId||null};return t.isUser!==void 0&&(o.is_user=t.isUser),t.identifiers&&Object.assign(o,t.identifiers),e&&(o.gaid=e),t.shopifySession?.clientId&&(o.shopify_client_id=t.shopifySession.clientId),t.shopifySession?.customerId&&(o.shopify_customer_id=t.shopifySession.customerId),t.shopifySession?.checkoutToken&&(o.shopify_checkout_token=t.shopifySession.checkoutToken),o}function w(t){if(t.fields)return{items:t.fields.map(({id:e,type:o,label:i,options:s})=>({id:e,type:o,label:i,options:Array.isArray(s)?s:void 0}))}}function H(t){if(t.responses)return{items:t.responses.map(({fieldId:e,value:o})=>({field_id:e,values:Array.isArray(o)?o.map(i=>({value:i})):[{value:o}]}))}}function d(t,e=!1){const{step:o}=t;if(o)return{id:o.id,title:o.label};if(e)return $('"step" is required for this event',t),{id:_,title:_}}function lt(t,e=!1){const{productList:o}=t;if(o){const i={};"title"in o&&o.title&&Object.assign(i,{title:o.title});const s="items"in o?o.items:o;return Object.assign(i,{items:s.map(a=>({item_id:a.itemId,item_name:a.itemName,affiliation:a.affiliation,coupon:a.coupon,currency:a.currency,creative_name:a.creativeName,creative_slot:a.creativeSlot,discount:q(a.discount),index:q(a.index),item_brand:a.itemBrand,item_category:a.itemCategory,item_category2:a.itemCategory2,item_category3:a.itemCategory3,item_category4:a.itemCategory4,item_category5:a.itemCategory5,item_list_id:a.itemListId,item_list_name:a.itemListName,item_variant:a.itemVariant,location_id:a.locationId,price:q(a.price),promotion_id:a.promotionId,promotion_name:a.promotionName,quantity:q(a.quantity),in_stock:a.inStock}))}),i}if(e)return $('"productList" is required for this event',t),{items:[]}}function ut(t,e=!1){const{order:o}=t;if(o){const i={id:o.id};return o.checkoutToken&&(i.checkout_token=o.checkoutToken),o.cartToken&&(i.cart_token=o.cartToken),o.customerId&&(i.customer_id=o.customerId),i}if(e)return $('"order" is required for this event',t),{id:_}}function x(t,e=!1){const{experience:o}=t;if(o)return{id:o.id,title:o.title};if(e)return $('"experience" is required for this event',t),{id:_,title:_}}function j(t,e=!1){const{exception:o}=t;if(o)return typeof o=="string"?{reason:o}:{reason:o.systemMessage};if(e)return $('"exception" is required for this event',t),{reason:_}}function S(t){const{form:e}=t;return e?{id:e.id,title:e.title}:($('"form" is required for this event',t),{id:_,title:_})}function ft(t){const{modal:e}=t;return e?{id:e.id,title:e.title}:($('"modal" is required for this event',t),{id:_,title:_})}function I(t,e=300){let o;return function(...i){clearTimeout(o),o=setTimeout(()=>t.apply(this,i),e)}}function q(t){if(typeof t=="number")return t;if(typeof t!="string")return;const e=parseFloat(t);if(!isNaN(e))return e}function It(){if(!O.supportsDocument()||!O.supportsCookies())return null;const t="_ga=",e=document.cookie?document.cookie.split(";"):[];for(const o of e){const i=o.trim();if(i.startsWith(t)){const a=i.substring(t.length).split(".");if(a.length>2)return a.slice(2).join(".")}}}function Rt(t){const e=[];return t.trackErrors&&(g(),e.push(rt.ErrorTrackingPlugin())),t.trackVitals&&(g(),e.push(Ht.WebVitalsPlugin())),t.trackPerformance&&(g(),e.push(Ot.PerformanceNavigationTimingPlugin())),(t.trackButtonClickAllowList||t.trackButtonClickFilter)&&e.push(it.ButtonClickTrackingPlugin()),e}function Wt(t){t.trackActivity&&!t.trackActivityCallback&&(g(),h.enableActivityTracking({minimumVisitLength:30,heartbeatDelay:10})),t.trackActivity&&t.trackActivityCallback&&(g(),h.enableActivityTrackingCallback({minimumVisitLength:30,heartbeatDelay:10,callback:t.trackActivityCallback})),(t.trackButtonClickAllowList||t.trackButtonClickFilter)&&(g(),it.enableButtonClickTracking({filter:t.trackButtonClickAllowList?{allowlist:t.trackButtonClickAllowList}:t.trackButtonClickFilter})),t.trackErrors&&(g(),rt.enableErrorTracking())}function zt({organizationId:t,projectId:e,cvlyX:o,deployment:i,collectorUrl:s="evnts.pckd.dev",appId:a="picked-analytics",trackVitals:r=!1,trackPerformance:c=!1,trackWebPage:m=!0,trackSessions:E=!0,trackBrowser:P=!0,trackActivity:V=!1,trackErrors:Y=!1,trackActivityCallback:R,trackButtonClickAllowList:A}){g();const B={trackVitals:r,trackErrors:Y,trackActivity:V,trackPerformance:c,trackActivityCallback:R,trackButtonClickAllowList:A},qt={appId:a,platform:"web",contexts:{webPage:m,session:E,browser:P||!1},plugins:Rt(B)},Ft=h.newTracker(a,s,qt);return Ut({organizationId:t,projectId:e,cvlyX:o,deployment:i}),Wt(B),Ft}function Ut({organizationId:t,projectId:e,cvlyX:o,deployment:i}){if(!t||!e)throw new Error("bindGlobalContext: Both organizationId and projectId are required");const s=[];s.push(n("app","1-0-0",{organization_id:t,project_id:e}),n("deployment","1-0-1",{sha:i.sha,id:i.id,env:i.env,host:i.host})),o&&s.push(n("cvly_x","1-0-1",{vercel_deployment_id:o.vercelDeploymentId,vercel_env:o.vercelEnv,vercel_url:o.vercelUrl})),h.addGlobalContexts(s)}const dt="app_close";function Gt(t,e){const o=u(t),i=f(t),s=x(t),a=d(t);return l(dt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const Kt=p(dt,Gt),xt="app_initialize";function Mt(t,e){const o=u(t),i=f(t),s=x(t),a=d(t);return l(xt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const Xt=p(xt,Mt),pt="app_load";function Jt(t,e){const o=u(t),i=f(t),s=x(t),a=d(t);return l(pt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const Qt=p(pt,Jt),mt="app_open";function Zt(t,e){const o=u(t),i=f(t),s=x(t),a=d(t);return l(mt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const te=p(mt,Zt),Ct="experience_load";function ee(t,e){const o=u(t),i=f(t),s=x(t,!0),a=d(t);return l(Ct,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("experience","1-0-1",s),a?n("step","1-0-0",a):void 0],e)}const ne=p(Ct,ee),Et="feature_decide";function oe(t,e){const o=u(t),i=f(t),s=x(t),a=d(t);return l(Et,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const se=p(Et,oe),vt="step_enter";function ae(t,e){const o=u(t),i=f(t),s=x(t),a=d(t,!0),r=w(t);return l(vt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("step","1-0-0",a),r&&n("field_list","1-0-0",r),s&&n("experience","1-0-1",s)],e)}const ie=p(vt,ae),Dt="step_submit";function re(t,e){const o=u(t),i=f(t),s=x(t),a=d(t,!0),r=H(t),c=w(t);return l(Dt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("step","1-0-0",a),c&&n("field_list","1-0-0",c),r&&n("response_list","1-0-0",r),s&&n("experience","1-0-1",s)],e)}const ce=p(Dt,re),_t="step_submit_success";function le(t,e){const o=u(t),i=f(t),s=x(t),a=d(t,!0),r=w(t),c=H(t);return l(_t,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("step","1-0-0",a),r&&n("field_list","1-0-0",r),c&&n("response_list","1-0-0",c),s&&n("experience","1-0-1",s)],e)}const ue=p(_t,le),kt="field_validation_error";function fe(t,e){const o=u(t),i=f(t),s=S(t),a=j(t,!0),r=x(t),c=d(t);return l(kt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("exception","1-0-0",a),n("form","1-0-0",s),r&&n("experience","1-0-1",r),c&&n("step","1-0-0",c)],e)}const de=p(kt,fe),bt="form_submit";function xe(t,e){const o=u(t),i=f(t),s=S(t),a=x(t),r=d(t);return l(bt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("form","1-0-0",s),a&&n("experience","1-0-1",a),r&&n("step","1-0-0",r)],e)}const pe=p(bt,xe),Tt="form_submit_error";function me(t,e){const o=u(t),i=f(t),s=S(t),a=j(t,!0),r=x(t),c=d(t);return l(Tt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("form","1-0-0",s),n("exception","1-0-0",a),r&&n("experience","1-0-1",r),c&&n("step","1-0-0",c)],e)}const Ce=p(Tt,me),gt="form_submit_success";function Ee(t,e){const o=u(t),i=f(t),s=S(t),a=x(t),r=d(t);return l(gt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("form","1-0-0",s),a&&n("experience","1-0-1",a),r&&n("step","1-0-0",r)],e)}const ve=p(gt,Ee);function D(t){return t instanceof Element}function De(t){return`data-picked-${t.replaceAll("_","-")}`}function T(t){const e=["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 D(t)?t.matches(e)?t:t.closest(e):null}function v(t){if(t instanceof HTMLSelectElement){const e=t.selectedIndex||0;return t.options[e]?.text??""}return"innerText"in t&&typeof t.innerText=="string"?t.innerText:t.textContent}function b(t){const e=t.getAttribute("aria-label");if(e)return e;const o=t.getAttribute("aria-labelledby");if(o){const s=document.getElementById(o);if(s){const a=v(s);if(a)return a}}if("id"in t&&t.id){const s=document.querySelector(`label[for="${t.id}"]`);if(s){const a=v(s);if(a)return a}}let i=t.parentElement;for(;i;){if(i.tagName.toLowerCase()==="label"){const s=v(i);if(s)return s}i=i.parentElement}if(t instanceof HTMLInputElement&&"labels"in t&&t.labels){const s=Array.from(t.labels).map(a=>v(a)).filter(Boolean).join(" ");if(s)return s}return"placeholder"in t&&typeof t.placeholder=="string"?t.placeholder:null}function _e(t,e){if(!D(t))return null;const o=De(e),i=t.closest(`[${o}]`);if(!i)return null;const s=i.getAttribute(o);return s?{element:i,customEventName:s}:null}const ke=255;function C(t){return t?t.slice(0,ke):null}const z="click";function be(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r)){const E={node_type:"unknown"};return l(z,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",E),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(z,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",m),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const Lt=p(z,be);function Te(t,e,o,i){const s=j(o.analyticsContext),a=x(o.analyticsContext),r=u(o.analyticsContext),c=w(o.analyticsContext),m=S(o.analyticsContext),E=ft(o.analyticsContext),P=ut(o.analyticsContext),V=lt(o.analyticsContext),Y=H(o.analyticsContext),R=f(o.analyticsContext),A=d(o.analyticsContext),B={id:e.id||null,node_type:e.nodeName.toLowerCase(),label:C(b(e)),text:C(v(e))};return l(t,[n("app","1-0-0",{organization_id:o.analyticsContext.organizationId,project_id:o.analyticsContext.projectId}),n("session","1-0-4",R),n("element","1-0-0",B),s?n("exception","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0,r?n("feature_list","2-0-0",r):void 0,c?n("field_list","1-0-0",c):void 0,m?n("form","1-0-0",m):void 0,E?n("modal","1-0-0",E):void 0,P?n("order","1-0-0",P):void 0,V?n("product_list","2-0-1",V):void 0,Y?n("response_list","1-0-0",Y):void 0,A?n("step","1-0-0",A):void 0],i)}function L(t,e,o){const i=_e(e.event.target,t);if(!i)return;const{element:s,customEventName:a}=i,r=Te(a,s,e,o);h.trackSelfDescribingEvent(r)}const U="rapid_scroll";function ge(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r)){const E={node_type:"unknown"};return l(U,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0,n("element","1-0-0",E)],e)}const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(U,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0,n("element","1-0-0",m)],e)}const Le=p(U,ge),$e=100,ye=100,he=300;let tt=0,et=0;const Ne=I((t,e)=>{Le(t,e),L("rapid_scroll",t,e)},he);function we(t,e){const o=t.event.target||document.documentElement;if(!(o instanceof HTMLElement))return;const i=o.scrollTop,s=Date.now()-et;Math.abs(i-tt)>$e&&s<ye&&Ne(t,e),tt=i,et=Date.now()}const Se=k("scroll",we,!0),G="rapid_click";function Pe(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r)){const E={node_type:"unknown"};return l(G,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",E),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(G,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",m),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const Ve=p(G,Pe);let F=0,nt=0;const Ye=3,Ae=500;function Be(t,e){const o=new Date().getTime();o-nt<Ae?F++:F=1,nt=o,F>=Ye&&(Ve(t,e),L("rapid_click",t,e),F=0)}const qe=k("click",Be),K="right_click";function Fe(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r)){const E={node_type:"unknown"};return l(K,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",E),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0])}const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(K,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",m),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const Oe=p(K,Fe);function He(t,e){Oe(t,e),L("right_click",t,e)}const je=k("contextmenu",He),$t="mouse_shake";function Ie(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext);return l($t,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const Re=p($t,Ie),We=5,ze=500,Ue=500;let ot={x:0},y=[],st=0;const Ge=I((t,e)=>{Re(t,e),L("mouse_shake",t,e)},ze);function Ke(t,e){const o=Date.now(),i=t.event.clientX-ot.x,s=Math.sign(i);o-st>Ue&&(y=[]),s!==0&&(y.length===0||y.at(-1)!==s)&&y.push(s),ot={x:t.event.clientX,y:t.event.clientY},y.length>=We&&(Ge(t,e),y=[]),st=o}const Me=k("mousemove",Ke),yt="page_visible";function Xe(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext);return l(yt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const Je=p(yt,Xe),ht="page_hidden";function Qe(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext);return l(ht,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const Ze=p(ht,Qe);function tn(t,e){if(document.visibilityState==="visible"){Je(t,e);return}Ze(t,e)}const en=jt("visibilitychange",tn),M="backspace";function nn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r)){const E={node_type:"unknown"};return l(M,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",E),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(M,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",m),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const on=p(M,nn);function sn(t,e){t.event.key==="Backspace"&&on(t,e)}const an=k("keydown",sn),Nt="page_hide";function rn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext);return l(Nt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const cn=p(Nt,rn);function ln(t,e){cn(t,e)}const un=N("pagehide",ln),wt="page_show";function fn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext);return l(wt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const dn=p(wt,fn);function xn(t,e){dn(t,e)}const pn=N("pageshow",xn),St="offline";function mn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext);return l(St,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const Cn=p(St,mn);function En(t,e){Cn(t,e)}const vn=N("offline",En),X="scroll";function Dn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r))return l(X,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e);const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(X,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0,n("element","1-0-0",m)],e)}const _n=p(X,Dn),kn=I((t,e)=>{_n(t,e),L("scroll",t,e)},500),bn=k("scroll",kn,!0),Pt="online";function Tn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext);return l(Pt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const gn=p(Pt,Tn);function Ln(t,e){gn(t,e)}const $n=N("online",Ln),Vt="resize";function yn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext);return l(Vt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const at=p(Vt,yn);let W=0;const hn=I((t,e)=>{const o=window.innerWidth;o!==W?(at(t,e),W=o):"ontouchstart"in window||at(t,e),W=o},300),Nn=N("resize",hn),Yt="unload";function wn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext);return l(Yt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e)}const Sn=p(Yt,wn);function Pn(t,e){Sn(t,e)}const Vn=N("unload",Pn);function Yn(t,e){Lt(t,e),L("click",t,e)}const An=k("click",Yn),J="paste";function Bn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r))return l(J,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e);const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(J,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0,n("element","1-0-0",m)],e)}const qn=p(J,Bn);function Fn(t,e){qn(t,e)}const On=k("paste",Fn),Q="copy";function Hn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r))return l(Q,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e);const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(Q,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0,n("element","1-0-0",m)],e)}const jn=p(Q,Hn);function In(t,e){jn(t,e)}const Rn=k("copy",In),Z="drag";function Wn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),s=x(t.analyticsContext),a=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r))return l(Z,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0],e);const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(Z,[n("feature_list","2-0-0",o),n("session","1-0-4",i),a?n("step","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0,n("element","1-0-0",m)],e)}const zn=p(Z,Wn);function At(t,e){const o=t.event.currentTarget;if(!o||!(o instanceof HTMLElement))return;function i(s){At({event:s,analyticsContext:t.analyticsContext})}o.removeEventListener("drag",i),o.addEventListener("dragend",()=>Bt(o,()=>t.analyticsContext)),zn(t,e),L("drag",t,e)}const Bt=k("drag",At);function Un(t,e){e&&(An(e,t),qe(e,t),je(e,t),Rn(e,t),On(e,t),Bt(e,t),an(e,t),bn(e,t),Se(e,t),Me(e,t))}function Gn(t){en(t),un(t),pn(t),vn(t),$n(t),Nn(t),Vn(t)}exports.bindGlobalEventListeners=Gn;exports.bindUserInteractionListeners=Un;exports.createContext=n;exports.createEvent=l;exports.createTrackEvent=p;exports.createTracker=zt;exports.formatExceptionContextData=j;exports.formatExperienceContextData=x;exports.formatFeatureListContextData=u;exports.formatFieldListContextData=w;exports.formatModalContextData=ft;exports.formatOrderContextData=ut;exports.formatProductListContextData=lt;exports.formatResponseListContextData=H;exports.formatSessionContextData=f;exports.formatStepContextData=d;exports.trackAppCloseEvent=Kt;exports.trackAppInitializeEvent=Xt;exports.trackAppLoadEvent=Qt;exports.trackAppOpenEvent=te;exports.trackCustomEvent=L;exports.trackEvent=Lt;exports.trackExperienceLoadEvent=ne;exports.trackFeatureDecideEvent=se;exports.trackFieldValidationErrorEvent=de;exports.trackFormSubmitErrorEvent=Ce;exports.trackFormSubmitEvent=pe;exports.trackFormSubmitSuccessEvent=ve;exports.trackStepEnterEvent=ie;exports.trackStepSubmitEvent=ce;exports.trackStepSubmitSuccessEvent=ue;
|
|
@@ -33,21 +33,21 @@ function n(t, e, s) {
|
|
|
33
33
|
}
|
|
34
34
|
function p(t, e) {
|
|
35
35
|
return (s, i) => {
|
|
36
|
-
const
|
|
37
|
-
ot(
|
|
36
|
+
const o = e(s, i);
|
|
37
|
+
ot(o);
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
function k(t, e, s = { passive: !0 }) {
|
|
41
41
|
const i = /* @__PURE__ */ new WeakMap();
|
|
42
|
-
return (
|
|
43
|
-
let r = i.get(
|
|
44
|
-
if (r || (r = /* @__PURE__ */ new Set(), i.set(
|
|
42
|
+
return (o, a) => {
|
|
43
|
+
let r = i.get(o);
|
|
44
|
+
if (r || (r = /* @__PURE__ */ new Set(), i.set(o, r)), r.has(t))
|
|
45
45
|
return;
|
|
46
46
|
function c(m) {
|
|
47
|
-
const E =
|
|
47
|
+
const E = a();
|
|
48
48
|
e({ event: m, analyticsContext: E });
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
o.addEventListener(t, c, s), r.add(t);
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
function zt(t, e) {
|
|
@@ -55,11 +55,11 @@ function zt(t, e) {
|
|
|
55
55
|
return (i) => {
|
|
56
56
|
if (s.has(t) || !at())
|
|
57
57
|
return;
|
|
58
|
-
function a
|
|
58
|
+
function o(a) {
|
|
59
59
|
const r = i();
|
|
60
|
-
e({ event:
|
|
60
|
+
e({ event: a, analyticsContext: r });
|
|
61
61
|
}
|
|
62
|
-
document.addEventListener(t,
|
|
62
|
+
document.addEventListener(t, o, { passive: !0 }), s.add(t);
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
function h(t, e) {
|
|
@@ -67,19 +67,19 @@ function h(t, e) {
|
|
|
67
67
|
return (i) => {
|
|
68
68
|
if (s.has(t) || !Wt())
|
|
69
69
|
return;
|
|
70
|
-
function a
|
|
70
|
+
function o(a) {
|
|
71
71
|
const r = i();
|
|
72
|
-
e({ event:
|
|
72
|
+
e({ event: a, analyticsContext: r });
|
|
73
73
|
}
|
|
74
|
-
window.addEventListener(t,
|
|
74
|
+
window.addEventListener(t, o, { passive: !0 }), s.add(t);
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
function u(t) {
|
|
78
|
-
return { items: t.features?.map(({ feature: s, name: i, key:
|
|
78
|
+
return { items: t.features?.map(({ feature: s, name: i, key: o, bucket: a }) => ({
|
|
79
79
|
ab_feature: s,
|
|
80
80
|
ab_name: i,
|
|
81
|
-
ab_key:
|
|
82
|
-
ab_bucket:
|
|
81
|
+
ab_key: o,
|
|
82
|
+
ab_bucket: a
|
|
83
83
|
})) || [] };
|
|
84
84
|
}
|
|
85
85
|
const _ = "unknown";
|
|
@@ -92,11 +92,11 @@ function f(t) {
|
|
|
92
92
|
function H(t) {
|
|
93
93
|
if (t.fields)
|
|
94
94
|
return {
|
|
95
|
-
items: t.fields.map(({ id: e, type: s, label: i, options:
|
|
95
|
+
items: t.fields.map(({ id: e, type: s, label: i, options: o }) => ({
|
|
96
96
|
id: e,
|
|
97
97
|
type: s,
|
|
98
98
|
label: i,
|
|
99
|
-
options: Array.isArray(
|
|
99
|
+
options: Array.isArray(o) ? o : void 0
|
|
100
100
|
}))
|
|
101
101
|
};
|
|
102
102
|
}
|
|
@@ -129,33 +129,33 @@ function Ut(t, e = !1) {
|
|
|
129
129
|
if (s) {
|
|
130
130
|
const i = {};
|
|
131
131
|
"title" in s && s.title && Object.assign(i, { title: s.title });
|
|
132
|
-
const
|
|
132
|
+
const o = "items" in s ? s.items : s;
|
|
133
133
|
return Object.assign(i, {
|
|
134
|
-
items:
|
|
135
|
-
item_id:
|
|
136
|
-
item_name:
|
|
137
|
-
affiliation:
|
|
138
|
-
coupon:
|
|
139
|
-
currency:
|
|
140
|
-
creative_name:
|
|
141
|
-
creative_slot:
|
|
142
|
-
discount: B(
|
|
143
|
-
index: B(
|
|
144
|
-
item_brand:
|
|
145
|
-
item_category:
|
|
146
|
-
item_category2:
|
|
147
|
-
item_category3:
|
|
148
|
-
item_category4:
|
|
149
|
-
item_category5:
|
|
150
|
-
item_list_id:
|
|
151
|
-
item_list_name:
|
|
152
|
-
item_variant:
|
|
153
|
-
location_id:
|
|
154
|
-
price: B(
|
|
155
|
-
promotion_id:
|
|
156
|
-
promotion_name:
|
|
157
|
-
quantity: B(
|
|
158
|
-
in_stock:
|
|
134
|
+
items: o.map((a) => ({
|
|
135
|
+
item_id: a.itemId,
|
|
136
|
+
item_name: a.itemName,
|
|
137
|
+
affiliation: a.affiliation,
|
|
138
|
+
coupon: a.coupon,
|
|
139
|
+
currency: a.currency,
|
|
140
|
+
creative_name: a.creativeName,
|
|
141
|
+
creative_slot: a.creativeSlot,
|
|
142
|
+
discount: B(a.discount),
|
|
143
|
+
index: B(a.index),
|
|
144
|
+
item_brand: a.itemBrand,
|
|
145
|
+
item_category: a.itemCategory,
|
|
146
|
+
item_category2: a.itemCategory2,
|
|
147
|
+
item_category3: a.itemCategory3,
|
|
148
|
+
item_category4: a.itemCategory4,
|
|
149
|
+
item_category5: a.itemCategory5,
|
|
150
|
+
item_list_id: a.itemListId,
|
|
151
|
+
item_list_name: a.itemListName,
|
|
152
|
+
item_variant: a.itemVariant,
|
|
153
|
+
location_id: a.locationId,
|
|
154
|
+
price: B(a.price),
|
|
155
|
+
promotion_id: a.promotionId,
|
|
156
|
+
promotion_name: a.promotionName,
|
|
157
|
+
quantity: B(a.quantity),
|
|
158
|
+
in_stock: a.inStock
|
|
159
159
|
}))
|
|
160
160
|
}), i;
|
|
161
161
|
}
|
|
@@ -243,9 +243,9 @@ function Mt() {
|
|
|
243
243
|
for (const s of e) {
|
|
244
244
|
const i = s.trim();
|
|
245
245
|
if (i.startsWith(t)) {
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
248
|
-
return
|
|
246
|
+
const a = i.substring(t.length).split(".");
|
|
247
|
+
if (a.length > 2)
|
|
248
|
+
return a.slice(2).join(".");
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
}
|
|
@@ -272,8 +272,8 @@ function Un({
|
|
|
272
272
|
projectId: e,
|
|
273
273
|
cvlyX: s,
|
|
274
274
|
deployment: i,
|
|
275
|
-
collectorUrl:
|
|
276
|
-
appId:
|
|
275
|
+
collectorUrl: o = "evnts.pckd.dev",
|
|
276
|
+
appId: a = "picked-analytics",
|
|
277
277
|
trackVitals: r = !1,
|
|
278
278
|
trackPerformance: c = !1,
|
|
279
279
|
trackWebPage: m = !0,
|
|
@@ -293,7 +293,7 @@ function Un({
|
|
|
293
293
|
trackActivityCallback: j,
|
|
294
294
|
trackButtonClickAllowList: S
|
|
295
295
|
}, Pt = {
|
|
296
|
-
appId:
|
|
296
|
+
appId: a,
|
|
297
297
|
platform: "web",
|
|
298
298
|
contexts: {
|
|
299
299
|
webPage: m,
|
|
@@ -301,7 +301,7 @@ function Un({
|
|
|
301
301
|
browser: w || !1
|
|
302
302
|
},
|
|
303
303
|
plugins: Xt(Y)
|
|
304
|
-
}, Vt = St(
|
|
304
|
+
}, Vt = St(a, o, Pt);
|
|
305
305
|
return Qt({
|
|
306
306
|
organizationId: t,
|
|
307
307
|
projectId: e,
|
|
@@ -312,8 +312,8 @@ function Un({
|
|
|
312
312
|
function Qt({ organizationId: t, projectId: e, cvlyX: s, deployment: i }) {
|
|
313
313
|
if (!t || !e)
|
|
314
314
|
throw new Error("bindGlobalContext: Both organizationId and projectId are required");
|
|
315
|
-
const
|
|
316
|
-
|
|
315
|
+
const o = [];
|
|
316
|
+
o.push(
|
|
317
317
|
n("app", "1-0-0", {
|
|
318
318
|
organization_id: t,
|
|
319
319
|
project_id: e
|
|
@@ -324,155 +324,155 @@ function Qt({ organizationId: t, projectId: e, cvlyX: s, deployment: i }) {
|
|
|
324
324
|
env: i.env,
|
|
325
325
|
host: i.host
|
|
326
326
|
})
|
|
327
|
-
), s &&
|
|
327
|
+
), s && o.push(
|
|
328
328
|
n("cvly_x", "1-0-1", {
|
|
329
329
|
vercel_deployment_id: s.vercelDeploymentId,
|
|
330
330
|
vercel_env: s.vercelEnv,
|
|
331
331
|
vercel_url: s.vercelUrl
|
|
332
332
|
})
|
|
333
|
-
), Yt(
|
|
333
|
+
), Yt(o);
|
|
334
334
|
}
|
|
335
335
|
const rt = "app_close";
|
|
336
336
|
function Zt(t, e) {
|
|
337
|
-
const s = u(t), i = f(t),
|
|
337
|
+
const s = u(t), i = f(t), o = x(t), a = d(t);
|
|
338
338
|
return l(
|
|
339
339
|
rt,
|
|
340
340
|
[
|
|
341
341
|
n("feature_list", "2-0-0", s),
|
|
342
342
|
n("session", "1-0-4", i),
|
|
343
|
-
|
|
344
|
-
|
|
343
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
344
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
345
345
|
],
|
|
346
346
|
e
|
|
347
347
|
);
|
|
348
348
|
}
|
|
349
349
|
const Gn = p(rt, Zt), ct = "app_initialize";
|
|
350
350
|
function te(t, e) {
|
|
351
|
-
const s = u(t), i = f(t),
|
|
351
|
+
const s = u(t), i = f(t), o = x(t), a = d(t);
|
|
352
352
|
return l(
|
|
353
353
|
ct,
|
|
354
354
|
[
|
|
355
355
|
n("feature_list", "2-0-0", s),
|
|
356
356
|
n("session", "1-0-4", i),
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
358
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
359
359
|
],
|
|
360
360
|
e
|
|
361
361
|
);
|
|
362
362
|
}
|
|
363
363
|
const Kn = p(ct, te), lt = "app_load";
|
|
364
364
|
function ee(t, e) {
|
|
365
|
-
const s = u(t), i = f(t),
|
|
365
|
+
const s = u(t), i = f(t), o = x(t), a = d(t);
|
|
366
366
|
return l(
|
|
367
367
|
lt,
|
|
368
368
|
[
|
|
369
369
|
n("feature_list", "2-0-0", s),
|
|
370
370
|
n("session", "1-0-4", i),
|
|
371
|
-
|
|
372
|
-
|
|
371
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
372
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
373
373
|
],
|
|
374
374
|
e
|
|
375
375
|
);
|
|
376
376
|
}
|
|
377
377
|
const Mn = p(lt, ee), ut = "app_open";
|
|
378
378
|
function ne(t, e) {
|
|
379
|
-
const s = u(t), i = f(t),
|
|
379
|
+
const s = u(t), i = f(t), o = x(t), a = d(t);
|
|
380
380
|
return l(
|
|
381
381
|
ut,
|
|
382
382
|
[
|
|
383
383
|
n("feature_list", "2-0-0", s),
|
|
384
384
|
n("session", "1-0-4", i),
|
|
385
|
-
|
|
386
|
-
|
|
385
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
386
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
387
387
|
],
|
|
388
388
|
e
|
|
389
389
|
);
|
|
390
390
|
}
|
|
391
391
|
const Xn = p(ut, ne), ft = "experience_load";
|
|
392
392
|
function se(t, e) {
|
|
393
|
-
const s = u(t), i = f(t),
|
|
393
|
+
const s = u(t), i = f(t), o = x(t, !0), a = d(t);
|
|
394
394
|
return l(
|
|
395
395
|
ft,
|
|
396
396
|
[
|
|
397
397
|
n("feature_list", "2-0-0", s),
|
|
398
398
|
n("session", "1-0-4", i),
|
|
399
|
-
n("experience", "1-0-1",
|
|
400
|
-
|
|
399
|
+
n("experience", "1-0-1", o),
|
|
400
|
+
a ? n("step", "1-0-0", a) : void 0
|
|
401
401
|
],
|
|
402
402
|
e
|
|
403
403
|
);
|
|
404
404
|
}
|
|
405
405
|
const Jn = p(ft, se), dt = "feature_decide";
|
|
406
406
|
function oe(t, e) {
|
|
407
|
-
const s = u(t), i = f(t),
|
|
407
|
+
const s = u(t), i = f(t), o = x(t), a = d(t);
|
|
408
408
|
return l(
|
|
409
409
|
dt,
|
|
410
410
|
[
|
|
411
411
|
n("feature_list", "2-0-0", s),
|
|
412
412
|
n("session", "1-0-4", i),
|
|
413
|
-
|
|
414
|
-
|
|
413
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
414
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
415
415
|
],
|
|
416
416
|
e
|
|
417
417
|
);
|
|
418
418
|
}
|
|
419
419
|
const Qn = p(dt, oe), xt = "step_enter";
|
|
420
420
|
function ae(t, e) {
|
|
421
|
-
const s = u(t), i = f(t),
|
|
421
|
+
const s = u(t), i = f(t), o = x(t), a = d(t, !0), r = H(t);
|
|
422
422
|
return l(
|
|
423
423
|
xt,
|
|
424
424
|
[
|
|
425
425
|
n("feature_list", "2-0-0", s),
|
|
426
426
|
n("session", "1-0-4", i),
|
|
427
|
-
n("step", "1-0-0",
|
|
427
|
+
n("step", "1-0-0", a),
|
|
428
428
|
r && n("field_list", "1-0-0", r),
|
|
429
|
-
|
|
429
|
+
o && n("experience", "1-0-1", o)
|
|
430
430
|
],
|
|
431
431
|
e
|
|
432
432
|
);
|
|
433
433
|
}
|
|
434
434
|
const Zn = p(xt, ae), pt = "step_submit";
|
|
435
435
|
function ie(t, e) {
|
|
436
|
-
const s = u(t), i = f(t),
|
|
436
|
+
const s = u(t), i = f(t), o = x(t), a = d(t, !0), r = X(t), c = H(t);
|
|
437
437
|
return l(
|
|
438
438
|
pt,
|
|
439
439
|
[
|
|
440
440
|
n("feature_list", "2-0-0", s),
|
|
441
441
|
n("session", "1-0-4", i),
|
|
442
|
-
n("step", "1-0-0",
|
|
442
|
+
n("step", "1-0-0", a),
|
|
443
443
|
c && n("field_list", "1-0-0", c),
|
|
444
444
|
r && n("response_list", "1-0-0", r),
|
|
445
|
-
|
|
445
|
+
o && n("experience", "1-0-1", o)
|
|
446
446
|
],
|
|
447
447
|
e
|
|
448
448
|
);
|
|
449
449
|
}
|
|
450
450
|
const ts = p(pt, ie), mt = "step_submit_success";
|
|
451
451
|
function re(t, e) {
|
|
452
|
-
const s = u(t), i = f(t),
|
|
452
|
+
const s = u(t), i = f(t), o = x(t), a = d(t, !0), r = H(t), c = X(t);
|
|
453
453
|
return l(
|
|
454
454
|
mt,
|
|
455
455
|
[
|
|
456
456
|
n("feature_list", "2-0-0", s),
|
|
457
457
|
n("session", "1-0-4", i),
|
|
458
|
-
n("step", "1-0-0",
|
|
458
|
+
n("step", "1-0-0", a),
|
|
459
459
|
r && n("field_list", "1-0-0", r),
|
|
460
460
|
c && n("response_list", "1-0-0", c),
|
|
461
|
-
|
|
461
|
+
o && n("experience", "1-0-1", o)
|
|
462
462
|
],
|
|
463
463
|
e
|
|
464
464
|
);
|
|
465
465
|
}
|
|
466
466
|
const es = p(mt, re), Ct = "field_validation_error";
|
|
467
467
|
function ce(t, e) {
|
|
468
|
-
const s = u(t), i = f(t),
|
|
468
|
+
const s = u(t), i = f(t), o = N(t), a = J(t, !0), r = x(t), c = d(t);
|
|
469
469
|
return l(
|
|
470
470
|
Ct,
|
|
471
471
|
[
|
|
472
472
|
n("feature_list", "2-0-0", s),
|
|
473
473
|
n("session", "1-0-4", i),
|
|
474
|
-
n("exception", "1-0-0",
|
|
475
|
-
n("form", "1-0-0",
|
|
474
|
+
n("exception", "1-0-0", a),
|
|
475
|
+
n("form", "1-0-0", o),
|
|
476
476
|
r && n("experience", "1-0-1", r),
|
|
477
477
|
c && n("step", "1-0-0", c)
|
|
478
478
|
],
|
|
@@ -481,14 +481,14 @@ function ce(t, e) {
|
|
|
481
481
|
}
|
|
482
482
|
const ns = p(Ct, ce), Et = "form_submit";
|
|
483
483
|
function le(t, e) {
|
|
484
|
-
const s = u(t), i = f(t),
|
|
484
|
+
const s = u(t), i = f(t), o = N(t), a = x(t), r = d(t);
|
|
485
485
|
return l(
|
|
486
486
|
Et,
|
|
487
487
|
[
|
|
488
488
|
n("feature_list", "2-0-0", s),
|
|
489
489
|
n("session", "1-0-4", i),
|
|
490
|
-
n("form", "1-0-0",
|
|
491
|
-
|
|
490
|
+
n("form", "1-0-0", o),
|
|
491
|
+
a && n("experience", "1-0-1", a),
|
|
492
492
|
r && n("step", "1-0-0", r)
|
|
493
493
|
],
|
|
494
494
|
e
|
|
@@ -496,14 +496,14 @@ function le(t, e) {
|
|
|
496
496
|
}
|
|
497
497
|
const ss = p(Et, le), vt = "form_submit_error";
|
|
498
498
|
function ue(t, e) {
|
|
499
|
-
const s = u(t), i = f(t),
|
|
499
|
+
const s = u(t), i = f(t), o = N(t), a = J(t, !0), r = x(t), c = d(t);
|
|
500
500
|
return l(
|
|
501
501
|
vt,
|
|
502
502
|
[
|
|
503
503
|
n("feature_list", "2-0-0", s),
|
|
504
504
|
n("session", "1-0-4", i),
|
|
505
|
-
n("form", "1-0-0",
|
|
506
|
-
n("exception", "1-0-0",
|
|
505
|
+
n("form", "1-0-0", o),
|
|
506
|
+
n("exception", "1-0-0", a),
|
|
507
507
|
r && n("experience", "1-0-1", r),
|
|
508
508
|
c && n("step", "1-0-0", c)
|
|
509
509
|
],
|
|
@@ -512,14 +512,14 @@ function ue(t, e) {
|
|
|
512
512
|
}
|
|
513
513
|
const os = p(vt, ue), Dt = "form_submit_success";
|
|
514
514
|
function fe(t, e) {
|
|
515
|
-
const s = u(t), i = f(t),
|
|
515
|
+
const s = u(t), i = f(t), o = N(t), a = x(t), r = d(t);
|
|
516
516
|
return l(
|
|
517
517
|
Dt,
|
|
518
518
|
[
|
|
519
519
|
n("feature_list", "2-0-0", s),
|
|
520
520
|
n("session", "1-0-4", i),
|
|
521
|
-
n("form", "1-0-0",
|
|
522
|
-
|
|
521
|
+
n("form", "1-0-0", o),
|
|
522
|
+
a && n("experience", "1-0-1", a),
|
|
523
523
|
r && n("step", "1-0-0", r)
|
|
524
524
|
],
|
|
525
525
|
e
|
|
@@ -574,34 +574,34 @@ function b(t) {
|
|
|
574
574
|
return e;
|
|
575
575
|
const s = t.getAttribute("aria-labelledby");
|
|
576
576
|
if (s) {
|
|
577
|
-
const
|
|
578
|
-
if (
|
|
579
|
-
const
|
|
580
|
-
if (
|
|
581
|
-
return
|
|
577
|
+
const o = document.getElementById(s);
|
|
578
|
+
if (o) {
|
|
579
|
+
const a = v(o);
|
|
580
|
+
if (a)
|
|
581
|
+
return a;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
584
|
if ("id" in t && t.id) {
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
589
|
-
return
|
|
585
|
+
const o = document.querySelector(`label[for="${t.id}"]`);
|
|
586
|
+
if (o) {
|
|
587
|
+
const a = v(o);
|
|
588
|
+
if (a)
|
|
589
|
+
return a;
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
let i = t.parentElement;
|
|
593
593
|
for (; i; ) {
|
|
594
594
|
if (i.tagName.toLowerCase() === "label") {
|
|
595
|
-
const
|
|
596
|
-
if (
|
|
597
|
-
return
|
|
595
|
+
const o = v(i);
|
|
596
|
+
if (o)
|
|
597
|
+
return o;
|
|
598
598
|
}
|
|
599
599
|
i = i.parentElement;
|
|
600
600
|
}
|
|
601
601
|
if (t instanceof HTMLInputElement && "labels" in t && t.labels) {
|
|
602
|
-
const
|
|
603
|
-
if (
|
|
604
|
-
return
|
|
602
|
+
const o = Array.from(t.labels).map((a) => v(a)).filter(Boolean).join(" ");
|
|
603
|
+
if (o)
|
|
604
|
+
return o;
|
|
605
605
|
}
|
|
606
606
|
return "placeholder" in t && typeof t.placeholder == "string" ? t.placeholder : null;
|
|
607
607
|
}
|
|
@@ -611,8 +611,8 @@ function xe(t, e) {
|
|
|
611
611
|
const s = de(e), i = t.closest(`[${s}]`);
|
|
612
612
|
if (!i)
|
|
613
613
|
return null;
|
|
614
|
-
const
|
|
615
|
-
return
|
|
614
|
+
const o = i.getAttribute(s);
|
|
615
|
+
return o ? { element: i, customEventName: o } : null;
|
|
616
616
|
}
|
|
617
617
|
const pe = 255;
|
|
618
618
|
function C(t) {
|
|
@@ -620,7 +620,7 @@ function C(t) {
|
|
|
620
620
|
}
|
|
621
621
|
const F = "click";
|
|
622
622
|
function me(t, e) {
|
|
623
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
623
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
|
|
624
624
|
if (!D(r)) {
|
|
625
625
|
const E = {
|
|
626
626
|
node_type: "unknown"
|
|
@@ -631,8 +631,8 @@ function me(t, e) {
|
|
|
631
631
|
n("feature_list", "2-0-0", s),
|
|
632
632
|
n("session", "1-0-4", i),
|
|
633
633
|
n("element", "1-0-0", E),
|
|
634
|
-
|
|
635
|
-
|
|
634
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
635
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
636
636
|
],
|
|
637
637
|
e
|
|
638
638
|
);
|
|
@@ -649,15 +649,15 @@ function me(t, e) {
|
|
|
649
649
|
n("feature_list", "2-0-0", s),
|
|
650
650
|
n("session", "1-0-4", i),
|
|
651
651
|
n("element", "1-0-0", m),
|
|
652
|
-
|
|
653
|
-
|
|
652
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
653
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
654
654
|
],
|
|
655
655
|
e
|
|
656
656
|
);
|
|
657
657
|
}
|
|
658
658
|
const Ce = p(F, me);
|
|
659
659
|
function Ee(t, e, s, i) {
|
|
660
|
-
const
|
|
660
|
+
const o = J(s.analyticsContext), a = x(s.analyticsContext), r = u(s.analyticsContext), c = H(s.analyticsContext), m = N(s.analyticsContext), E = Kt(s.analyticsContext), w = Gt(s.analyticsContext), P = Ut(s.analyticsContext), V = X(s.analyticsContext), j = f(s.analyticsContext), S = d(s.analyticsContext), Y = {
|
|
661
661
|
id: e.id || null,
|
|
662
662
|
node_type: e.nodeName.toLowerCase(),
|
|
663
663
|
label: C(b(e)),
|
|
@@ -672,8 +672,8 @@ function Ee(t, e, s, i) {
|
|
|
672
672
|
}),
|
|
673
673
|
n("session", "1-0-4", j),
|
|
674
674
|
n("element", "1-0-0", Y),
|
|
675
|
-
|
|
676
|
-
|
|
675
|
+
o ? n("exception", "1-0-0", o) : void 0,
|
|
676
|
+
a ? n("experience", "1-0-1", a) : void 0,
|
|
677
677
|
r ? n("feature_list", "2-0-0", r) : void 0,
|
|
678
678
|
c ? n("field_list", "1-0-0", c) : void 0,
|
|
679
679
|
m ? n("form", "1-0-0", m) : void 0,
|
|
@@ -690,12 +690,12 @@ function L(t, e, s) {
|
|
|
690
690
|
const i = xe(e.event.target, t);
|
|
691
691
|
if (!i)
|
|
692
692
|
return;
|
|
693
|
-
const { element:
|
|
693
|
+
const { element: o, customEventName: a } = i, r = Ee(a, o, e, s);
|
|
694
694
|
ot(r);
|
|
695
695
|
}
|
|
696
696
|
const R = "rapid_scroll";
|
|
697
697
|
function ve(t, e) {
|
|
698
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
698
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
|
|
699
699
|
if (!D(r)) {
|
|
700
700
|
const E = {
|
|
701
701
|
node_type: "unknown"
|
|
@@ -705,8 +705,8 @@ function ve(t, e) {
|
|
|
705
705
|
[
|
|
706
706
|
n("feature_list", "2-0-0", s),
|
|
707
707
|
n("session", "1-0-4", i),
|
|
708
|
-
|
|
709
|
-
|
|
708
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
709
|
+
o ? n("experience", "1-0-1", o) : void 0,
|
|
710
710
|
n("element", "1-0-0", E)
|
|
711
711
|
],
|
|
712
712
|
e
|
|
@@ -723,8 +723,8 @@ function ve(t, e) {
|
|
|
723
723
|
[
|
|
724
724
|
n("feature_list", "2-0-0", s),
|
|
725
725
|
n("session", "1-0-4", i),
|
|
726
|
-
|
|
727
|
-
|
|
726
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
727
|
+
o ? n("experience", "1-0-1", o) : void 0,
|
|
728
728
|
n("element", "1-0-0", m)
|
|
729
729
|
],
|
|
730
730
|
e
|
|
@@ -742,12 +742,12 @@ function $e(t, e) {
|
|
|
742
742
|
const s = t.event.target || document.documentElement;
|
|
743
743
|
if (!(s instanceof HTMLElement))
|
|
744
744
|
return;
|
|
745
|
-
const i = s.scrollTop,
|
|
746
|
-
Math.abs(i - Q) > _e &&
|
|
745
|
+
const i = s.scrollTop, o = Date.now() - Z;
|
|
746
|
+
Math.abs(i - Q) > _e && o < ke && Te(t, e), Q = i, Z = Date.now();
|
|
747
747
|
}
|
|
748
748
|
const ge = k("scroll", $e, !0), W = "rapid_click";
|
|
749
749
|
function Le(t, e) {
|
|
750
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
750
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
|
|
751
751
|
if (!D(r)) {
|
|
752
752
|
const E = {
|
|
753
753
|
node_type: "unknown"
|
|
@@ -758,8 +758,8 @@ function Le(t, e) {
|
|
|
758
758
|
n("feature_list", "2-0-0", s),
|
|
759
759
|
n("session", "1-0-4", i),
|
|
760
760
|
n("element", "1-0-0", E),
|
|
761
|
-
|
|
762
|
-
|
|
761
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
762
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
763
763
|
],
|
|
764
764
|
e
|
|
765
765
|
);
|
|
@@ -776,8 +776,8 @@ function Le(t, e) {
|
|
|
776
776
|
n("feature_list", "2-0-0", s),
|
|
777
777
|
n("session", "1-0-4", i),
|
|
778
778
|
n("element", "1-0-0", m),
|
|
779
|
-
|
|
780
|
-
|
|
779
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
780
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
781
781
|
],
|
|
782
782
|
e
|
|
783
783
|
);
|
|
@@ -791,7 +791,7 @@ function we(t, e) {
|
|
|
791
791
|
}
|
|
792
792
|
const Pe = k("click", we), I = "right_click";
|
|
793
793
|
function Ve(t, e) {
|
|
794
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
794
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
|
|
795
795
|
if (!D(r)) {
|
|
796
796
|
const E = {
|
|
797
797
|
node_type: "unknown"
|
|
@@ -800,8 +800,8 @@ function Ve(t, e) {
|
|
|
800
800
|
n("feature_list", "2-0-0", s),
|
|
801
801
|
n("session", "1-0-4", i),
|
|
802
802
|
n("element", "1-0-0", E),
|
|
803
|
-
|
|
804
|
-
|
|
803
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
804
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
805
805
|
]);
|
|
806
806
|
}
|
|
807
807
|
const c = T(r) || r, m = {
|
|
@@ -816,8 +816,8 @@ function Ve(t, e) {
|
|
|
816
816
|
n("feature_list", "2-0-0", s),
|
|
817
817
|
n("session", "1-0-4", i),
|
|
818
818
|
n("element", "1-0-0", m),
|
|
819
|
-
|
|
820
|
-
|
|
819
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
820
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
821
821
|
],
|
|
822
822
|
e
|
|
823
823
|
);
|
|
@@ -828,14 +828,14 @@ function Ye(t, e) {
|
|
|
828
828
|
}
|
|
829
829
|
const Be = k("contextmenu", Ye), _t = "mouse_shake";
|
|
830
830
|
function Ae(t, e) {
|
|
831
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
831
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext);
|
|
832
832
|
return l(
|
|
833
833
|
_t,
|
|
834
834
|
[
|
|
835
835
|
n("feature_list", "2-0-0", s),
|
|
836
836
|
n("session", "1-0-4", i),
|
|
837
|
-
|
|
838
|
-
|
|
837
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
838
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
839
839
|
],
|
|
840
840
|
e
|
|
841
841
|
);
|
|
@@ -849,33 +849,33 @@ const Fe = O(
|
|
|
849
849
|
je
|
|
850
850
|
);
|
|
851
851
|
function Re(t, e) {
|
|
852
|
-
const s = Date.now(), i = t.event.clientX - et.x,
|
|
853
|
-
s - nt > qe && (y = []),
|
|
852
|
+
const s = Date.now(), i = t.event.clientX - et.x, o = Math.sign(i);
|
|
853
|
+
s - nt > qe && (y = []), o !== 0 && (y.length === 0 || y.at(-1) !== o) && y.push(o), et = { x: t.event.clientX, y: t.event.clientY }, y.length >= Oe && (Fe(t, e), y = []), nt = s;
|
|
854
854
|
}
|
|
855
855
|
const We = k("mousemove", Re), kt = "page_visible";
|
|
856
856
|
function Ie(t, e) {
|
|
857
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
857
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext);
|
|
858
858
|
return l(
|
|
859
859
|
kt,
|
|
860
860
|
[
|
|
861
861
|
n("feature_list", "2-0-0", s),
|
|
862
862
|
n("session", "1-0-4", i),
|
|
863
|
-
|
|
864
|
-
|
|
863
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
864
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
865
865
|
],
|
|
866
866
|
e
|
|
867
867
|
);
|
|
868
868
|
}
|
|
869
869
|
const ze = p(kt, Ie), bt = "page_hidden";
|
|
870
870
|
function Ue(t, e) {
|
|
871
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
871
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext);
|
|
872
872
|
return l(
|
|
873
873
|
bt,
|
|
874
874
|
[
|
|
875
875
|
n("feature_list", "2-0-0", s),
|
|
876
876
|
n("session", "1-0-4", i),
|
|
877
|
-
|
|
878
|
-
|
|
877
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
878
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
879
879
|
],
|
|
880
880
|
e
|
|
881
881
|
);
|
|
@@ -890,7 +890,7 @@ function Ke(t, e) {
|
|
|
890
890
|
}
|
|
891
891
|
const Me = zt("visibilitychange", Ke), z = "backspace";
|
|
892
892
|
function Xe(t, e) {
|
|
893
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
893
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
|
|
894
894
|
if (!D(r)) {
|
|
895
895
|
const E = {
|
|
896
896
|
node_type: "unknown"
|
|
@@ -901,8 +901,8 @@ function Xe(t, e) {
|
|
|
901
901
|
n("feature_list", "2-0-0", s),
|
|
902
902
|
n("session", "1-0-4", i),
|
|
903
903
|
n("element", "1-0-0", E),
|
|
904
|
-
|
|
905
|
-
|
|
904
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
905
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
906
906
|
],
|
|
907
907
|
e
|
|
908
908
|
);
|
|
@@ -919,8 +919,8 @@ function Xe(t, e) {
|
|
|
919
919
|
n("feature_list", "2-0-0", s),
|
|
920
920
|
n("session", "1-0-4", i),
|
|
921
921
|
n("element", "1-0-0", m),
|
|
922
|
-
|
|
923
|
-
|
|
922
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
923
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
924
924
|
],
|
|
925
925
|
e
|
|
926
926
|
);
|
|
@@ -931,14 +931,14 @@ function Qe(t, e) {
|
|
|
931
931
|
}
|
|
932
932
|
const Ze = k("keydown", Qe), Tt = "page_hide";
|
|
933
933
|
function tn(t, e) {
|
|
934
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
934
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext);
|
|
935
935
|
return l(
|
|
936
936
|
Tt,
|
|
937
937
|
[
|
|
938
938
|
n("feature_list", "2-0-0", s),
|
|
939
939
|
n("session", "1-0-4", i),
|
|
940
|
-
|
|
941
|
-
|
|
940
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
941
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
942
942
|
],
|
|
943
943
|
e
|
|
944
944
|
);
|
|
@@ -949,14 +949,14 @@ function nn(t, e) {
|
|
|
949
949
|
}
|
|
950
950
|
const sn = h("pagehide", nn), $t = "page_show";
|
|
951
951
|
function on(t, e) {
|
|
952
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
952
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext);
|
|
953
953
|
return l(
|
|
954
954
|
$t,
|
|
955
955
|
[
|
|
956
956
|
n("feature_list", "2-0-0", s),
|
|
957
957
|
n("session", "1-0-4", i),
|
|
958
|
-
|
|
959
|
-
|
|
958
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
959
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
960
960
|
],
|
|
961
961
|
e
|
|
962
962
|
);
|
|
@@ -967,14 +967,14 @@ function rn(t, e) {
|
|
|
967
967
|
}
|
|
968
968
|
const cn = h("pageshow", rn), gt = "offline";
|
|
969
969
|
function ln(t, e) {
|
|
970
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
970
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext);
|
|
971
971
|
return l(
|
|
972
972
|
gt,
|
|
973
973
|
[
|
|
974
974
|
n("feature_list", "2-0-0", s),
|
|
975
975
|
n("session", "1-0-4", i),
|
|
976
|
-
|
|
977
|
-
|
|
976
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
977
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
978
978
|
],
|
|
979
979
|
e
|
|
980
980
|
);
|
|
@@ -985,15 +985,15 @@ function fn(t, e) {
|
|
|
985
985
|
}
|
|
986
986
|
const dn = h("offline", fn), U = "scroll";
|
|
987
987
|
function xn(t, e) {
|
|
988
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
988
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
|
|
989
989
|
if (!D(r))
|
|
990
990
|
return l(
|
|
991
991
|
U,
|
|
992
992
|
[
|
|
993
993
|
n("feature_list", "2-0-0", s),
|
|
994
994
|
n("session", "1-0-4", i),
|
|
995
|
-
|
|
996
|
-
|
|
995
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
996
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
997
997
|
],
|
|
998
998
|
e
|
|
999
999
|
);
|
|
@@ -1008,8 +1008,8 @@ function xn(t, e) {
|
|
|
1008
1008
|
[
|
|
1009
1009
|
n("feature_list", "2-0-0", s),
|
|
1010
1010
|
n("session", "1-0-4", i),
|
|
1011
|
-
|
|
1012
|
-
|
|
1011
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
1012
|
+
o ? n("experience", "1-0-1", o) : void 0,
|
|
1013
1013
|
n("element", "1-0-0", m)
|
|
1014
1014
|
],
|
|
1015
1015
|
e
|
|
@@ -1022,14 +1022,14 @@ const pn = p(U, xn), mn = O(
|
|
|
1022
1022
|
500
|
|
1023
1023
|
), Cn = k("scroll", mn, !0), Lt = "online";
|
|
1024
1024
|
function En(t, e) {
|
|
1025
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
1025
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext);
|
|
1026
1026
|
return l(
|
|
1027
1027
|
Lt,
|
|
1028
1028
|
[
|
|
1029
1029
|
n("feature_list", "2-0-0", s),
|
|
1030
1030
|
n("session", "1-0-4", i),
|
|
1031
|
-
|
|
1032
|
-
|
|
1031
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
1032
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
1033
1033
|
],
|
|
1034
1034
|
e
|
|
1035
1035
|
);
|
|
@@ -1040,14 +1040,14 @@ function Dn(t, e) {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
const _n = h("online", Dn), yt = "resize";
|
|
1042
1042
|
function kn(t, e) {
|
|
1043
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
1043
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext);
|
|
1044
1044
|
return l(
|
|
1045
1045
|
yt,
|
|
1046
1046
|
[
|
|
1047
1047
|
n("feature_list", "2-0-0", s),
|
|
1048
1048
|
n("session", "1-0-4", i),
|
|
1049
|
-
|
|
1050
|
-
|
|
1049
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
1050
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
1051
1051
|
],
|
|
1052
1052
|
e
|
|
1053
1053
|
);
|
|
@@ -1062,14 +1062,14 @@ const bn = O(
|
|
|
1062
1062
|
300
|
|
1063
1063
|
), Tn = h("resize", bn), ht = "unload";
|
|
1064
1064
|
function $n(t, e) {
|
|
1065
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
1065
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext);
|
|
1066
1066
|
return l(
|
|
1067
1067
|
ht,
|
|
1068
1068
|
[
|
|
1069
1069
|
n("feature_list", "2-0-0", s),
|
|
1070
1070
|
n("session", "1-0-4", i),
|
|
1071
|
-
|
|
1072
|
-
|
|
1071
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
1072
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
1073
1073
|
],
|
|
1074
1074
|
e
|
|
1075
1075
|
);
|
|
@@ -1084,15 +1084,15 @@ function hn(t, e) {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
const Nn = k("click", hn), G = "paste";
|
|
1086
1086
|
function wn(t, e) {
|
|
1087
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
1087
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
|
|
1088
1088
|
if (!D(r))
|
|
1089
1089
|
return l(
|
|
1090
1090
|
G,
|
|
1091
1091
|
[
|
|
1092
1092
|
n("feature_list", "2-0-0", s),
|
|
1093
1093
|
n("session", "1-0-4", i),
|
|
1094
|
-
|
|
1095
|
-
|
|
1094
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
1095
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
1096
1096
|
],
|
|
1097
1097
|
e
|
|
1098
1098
|
);
|
|
@@ -1107,8 +1107,8 @@ function wn(t, e) {
|
|
|
1107
1107
|
[
|
|
1108
1108
|
n("feature_list", "2-0-0", s),
|
|
1109
1109
|
n("session", "1-0-4", i),
|
|
1110
|
-
|
|
1111
|
-
|
|
1110
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
1111
|
+
o ? n("experience", "1-0-1", o) : void 0,
|
|
1112
1112
|
n("element", "1-0-0", m)
|
|
1113
1113
|
],
|
|
1114
1114
|
e
|
|
@@ -1120,15 +1120,15 @@ function Vn(t, e) {
|
|
|
1120
1120
|
}
|
|
1121
1121
|
const Sn = k("paste", Vn), K = "copy";
|
|
1122
1122
|
function Yn(t, e) {
|
|
1123
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
1123
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
|
|
1124
1124
|
if (!D(r))
|
|
1125
1125
|
return l(
|
|
1126
1126
|
K,
|
|
1127
1127
|
[
|
|
1128
1128
|
n("feature_list", "2-0-0", s),
|
|
1129
1129
|
n("session", "1-0-4", i),
|
|
1130
|
-
|
|
1131
|
-
|
|
1130
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
1131
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
1132
1132
|
],
|
|
1133
1133
|
e
|
|
1134
1134
|
);
|
|
@@ -1143,8 +1143,8 @@ function Yn(t, e) {
|
|
|
1143
1143
|
[
|
|
1144
1144
|
n("feature_list", "2-0-0", s),
|
|
1145
1145
|
n("session", "1-0-4", i),
|
|
1146
|
-
|
|
1147
|
-
|
|
1146
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
1147
|
+
o ? n("experience", "1-0-1", o) : void 0,
|
|
1148
1148
|
n("element", "1-0-0", m)
|
|
1149
1149
|
],
|
|
1150
1150
|
e
|
|
@@ -1156,15 +1156,15 @@ function An(t, e) {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
const Hn = k("copy", An), M = "drag";
|
|
1158
1158
|
function On(t, e) {
|
|
1159
|
-
const s = u(t.analyticsContext), i = f(t.analyticsContext),
|
|
1159
|
+
const s = u(t.analyticsContext), i = f(t.analyticsContext), o = x(t.analyticsContext), a = d(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
|
|
1160
1160
|
if (!D(r))
|
|
1161
1161
|
return l(
|
|
1162
1162
|
M,
|
|
1163
1163
|
[
|
|
1164
1164
|
n("feature_list", "2-0-0", s),
|
|
1165
1165
|
n("session", "1-0-4", i),
|
|
1166
|
-
|
|
1167
|
-
|
|
1166
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
1167
|
+
o ? n("experience", "1-0-1", o) : void 0
|
|
1168
1168
|
],
|
|
1169
1169
|
e
|
|
1170
1170
|
);
|
|
@@ -1179,8 +1179,8 @@ function On(t, e) {
|
|
|
1179
1179
|
[
|
|
1180
1180
|
n("feature_list", "2-0-0", s),
|
|
1181
1181
|
n("session", "1-0-4", i),
|
|
1182
|
-
|
|
1183
|
-
|
|
1182
|
+
a ? n("step", "1-0-0", a) : void 0,
|
|
1183
|
+
o ? n("experience", "1-0-1", o) : void 0,
|
|
1184
1184
|
n("element", "1-0-0", m)
|
|
1185
1185
|
],
|
|
1186
1186
|
e
|
|
@@ -1191,8 +1191,8 @@ function Nt(t, e) {
|
|
|
1191
1191
|
const s = t.event.currentTarget;
|
|
1192
1192
|
if (!s || !(s instanceof HTMLElement))
|
|
1193
1193
|
return;
|
|
1194
|
-
function i(
|
|
1195
|
-
Nt({ event:
|
|
1194
|
+
function i(o) {
|
|
1195
|
+
Nt({ event: o, analyticsContext: t.analyticsContext });
|
|
1196
1196
|
}
|
|
1197
1197
|
s.removeEventListener("drag", i), s.addEventListener(
|
|
1198
1198
|
"dragend",
|
package/package.json
CHANGED
|
@@ -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.1772085077346",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@snowplow/browser-plugin-button-click-tracking": "^4.6.5",
|
|
7
7
|
"@snowplow/browser-plugin-error-tracking": "^4.6.5",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"main": "./dist/cjs/index.js",
|
|
57
57
|
"module": "./dist/esm/index.js",
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@picked/client": "0.0.1-dev.
|
|
59
|
+
"@picked/client": "0.0.1-dev.1772085077346",
|
|
60
60
|
"effector": "^23.3.0"
|
|
61
61
|
},
|
|
62
62
|
"private": false,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const h=require("@snowplow/browser-tracker"),it=require("@snowplow/browser-plugin-button-click-tracking"),Ot=require("@snowplow/browser-plugin-performance-navigation-timing"),rt=require("@snowplow/browser-plugin-error-tracking"),Ht=require("@snowplow/browser-plugin-web-vitals"),O=require("@picked/client");function ct(t,e){return`iglu:dev.pckd/${t}/jsonschema/${e}`}function g(t,...e){}function $(t,...e){}function l(t,e,o={}){return{event:{schema:ct("event","1-0-0"),data:{type:t,meta:o}},context:e.filter(i=>i!==void 0)}}function n(t,e,o){return{schema:ct(t,e),data:o}}function p(t,e){return(o,i)=>{const a=e(o,i);h.trackSelfDescribingEvent(a)}}function k(t,e,o={passive:!0}){const i=new WeakMap;return(a,s)=>{let r=i.get(a);if(r||(r=new Set,i.set(a,r)),r.has(t))return;function c(m){const E=s();e({event:m,analyticsContext:E})}a.addEventListener(t,c,o),r.add(t)}}function jt(t,e){const o=new Set;return i=>{if(o.has(t)||!O.supportsDocument())return;function a(s){const r=i();e({event:s,analyticsContext:r})}document.addEventListener(t,a,{passive:!0}),o.add(t)}}function N(t,e){const o=new Set;return i=>{if(o.has(t)||!O.supportsWindow())return;function a(s){const r=i();e({event:s,analyticsContext:r})}window.addEventListener(t,a,{passive:!0}),o.add(t)}}function u(t){return{items:t.features?.map(({feature:o,name:i,key:a,bucket:s})=>({ab_feature:o,ab_name:i,ab_key:a,ab_bucket:s}))||[]}}const _="unknown";function f(t){const e=It(),o={id:t.sessionId||null};return t.isUser!==void 0&&(o.is_user=t.isUser),t.identifiers&&Object.assign(o,t.identifiers),e&&(o.gaid=e),t.shopifySession?.clientId&&(o.shopify_client_id=t.shopifySession.clientId),t.shopifySession?.customerId&&(o.shopify_customer_id=t.shopifySession.customerId),t.shopifySession?.checkoutToken&&(o.shopify_checkout_token=t.shopifySession.checkoutToken),o}function w(t){if(t.fields)return{items:t.fields.map(({id:e,type:o,label:i,options:a})=>({id:e,type:o,label:i,options:Array.isArray(a)?a.map(({id:s,label:r,value:c})=>({id:s,label:r,value:c})):void 0}))}}function H(t){if(t.responses)return{items:t.responses.map(({fieldId:e,value:o})=>({field_id:e,values:Array.isArray(o)?o.map(i=>({value:i})):[{value:o}]}))}}function d(t,e=!1){const{step:o}=t;if(o)return{id:o.id,title:o.label};if(e)return $('"step" is required for this event',t),{id:_,title:_}}function lt(t,e=!1){const{productList:o}=t;if(o){const i={};"title"in o&&o.title&&Object.assign(i,{title:o.title});const a="items"in o?o.items:o;return Object.assign(i,{items:a.map(s=>({item_id:s.itemId,item_name:s.itemName,affiliation:s.affiliation,coupon:s.coupon,currency:s.currency,creative_name:s.creativeName,creative_slot:s.creativeSlot,discount:q(s.discount),index:q(s.index),item_brand:s.itemBrand,item_category:s.itemCategory,item_category2:s.itemCategory2,item_category3:s.itemCategory3,item_category4:s.itemCategory4,item_category5:s.itemCategory5,item_list_id:s.itemListId,item_list_name:s.itemListName,item_variant:s.itemVariant,location_id:s.locationId,price:q(s.price),promotion_id:s.promotionId,promotion_name:s.promotionName,quantity:q(s.quantity),in_stock:s.inStock}))}),i}if(e)return $('"productList" is required for this event',t),{items:[]}}function ut(t,e=!1){const{order:o}=t;if(o){const i={id:o.id};return o.checkoutToken&&(i.checkout_token=o.checkoutToken),o.cartToken&&(i.cart_token=o.cartToken),o.customerId&&(i.customer_id=o.customerId),i}if(e)return $('"order" is required for this event',t),{id:_}}function x(t,e=!1){const{experience:o}=t;if(o)return{id:o.id,title:o.title};if(e)return $('"experience" is required for this event',t),{id:_,title:_}}function j(t,e=!1){const{exception:o}=t;if(o)return typeof o=="string"?{reason:o}:{reason:o.systemMessage};if(e)return $('"exception" is required for this event',t),{reason:_}}function S(t){const{form:e}=t;return e?{id:e.id,title:e.title}:($('"form" is required for this event',t),{id:_,title:_})}function ft(t){const{modal:e}=t;return e?{id:e.id,title:e.title}:($('"modal" is required for this event',t),{id:_,title:_})}function I(t,e=300){let o;return function(...i){clearTimeout(o),o=setTimeout(()=>t.apply(this,i),e)}}function q(t){if(typeof t=="number")return t;if(typeof t!="string")return;const e=parseFloat(t);if(!isNaN(e))return e}function It(){if(!O.supportsDocument()||!O.supportsCookies())return null;const t="_ga=",e=document.cookie?document.cookie.split(";"):[];for(const o of e){const i=o.trim();if(i.startsWith(t)){const s=i.substring(t.length).split(".");if(s.length>2)return s.slice(2).join(".")}}}function Rt(t){const e=[];return t.trackErrors&&(g(),e.push(rt.ErrorTrackingPlugin())),t.trackVitals&&(g(),e.push(Ht.WebVitalsPlugin())),t.trackPerformance&&(g(),e.push(Ot.PerformanceNavigationTimingPlugin())),(t.trackButtonClickAllowList||t.trackButtonClickFilter)&&e.push(it.ButtonClickTrackingPlugin()),e}function Wt(t){t.trackActivity&&!t.trackActivityCallback&&(g(),h.enableActivityTracking({minimumVisitLength:30,heartbeatDelay:10})),t.trackActivity&&t.trackActivityCallback&&(g(),h.enableActivityTrackingCallback({minimumVisitLength:30,heartbeatDelay:10,callback:t.trackActivityCallback})),(t.trackButtonClickAllowList||t.trackButtonClickFilter)&&(g(),it.enableButtonClickTracking({filter:t.trackButtonClickAllowList?{allowlist:t.trackButtonClickAllowList}:t.trackButtonClickFilter})),t.trackErrors&&(g(),rt.enableErrorTracking())}function zt({organizationId:t,projectId:e,cvlyX:o,deployment:i,collectorUrl:a="evnts.pckd.dev",appId:s="picked-analytics",trackVitals:r=!1,trackPerformance:c=!1,trackWebPage:m=!0,trackSessions:E=!0,trackBrowser:P=!0,trackActivity:V=!1,trackErrors:Y=!1,trackActivityCallback:R,trackButtonClickAllowList:A}){g();const B={trackVitals:r,trackErrors:Y,trackActivity:V,trackPerformance:c,trackActivityCallback:R,trackButtonClickAllowList:A},qt={appId:s,platform:"web",contexts:{webPage:m,session:E,browser:P||!1},plugins:Rt(B)},Ft=h.newTracker(s,a,qt);return Ut({organizationId:t,projectId:e,cvlyX:o,deployment:i}),Wt(B),Ft}function Ut({organizationId:t,projectId:e,cvlyX:o,deployment:i}){if(!t||!e)throw new Error("bindGlobalContext: Both organizationId and projectId are required");const a=[];a.push(n("app","1-0-0",{organization_id:t,project_id:e}),n("deployment","1-0-1",{sha:i.sha,id:i.id,env:i.env,host:i.host})),o&&a.push(n("cvly_x","1-0-1",{vercel_deployment_id:o.vercelDeploymentId,vercel_env:o.vercelEnv,vercel_url:o.vercelUrl})),h.addGlobalContexts(a)}const dt="app_close";function Gt(t,e){const o=u(t),i=f(t),a=x(t),s=d(t);return l(dt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const Kt=p(dt,Gt),xt="app_initialize";function Mt(t,e){const o=u(t),i=f(t),a=x(t),s=d(t);return l(xt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const Xt=p(xt,Mt),pt="app_load";function Jt(t,e){const o=u(t),i=f(t),a=x(t),s=d(t);return l(pt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const Qt=p(pt,Jt),mt="app_open";function Zt(t,e){const o=u(t),i=f(t),a=x(t),s=d(t);return l(mt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const te=p(mt,Zt),Ct="experience_load";function ee(t,e){const o=u(t),i=f(t),a=x(t,!0),s=d(t);return l(Ct,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("experience","1-0-1",a),s?n("step","1-0-0",s):void 0],e)}const ne=p(Ct,ee),Et="feature_decide";function oe(t,e){const o=u(t),i=f(t),a=x(t),s=d(t);return l(Et,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const se=p(Et,oe),vt="step_enter";function ae(t,e){const o=u(t),i=f(t),a=x(t),s=d(t,!0),r=w(t);return l(vt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("step","1-0-0",s),r&&n("field_list","1-0-0",r),a&&n("experience","1-0-1",a)],e)}const ie=p(vt,ae),Dt="step_submit";function re(t,e){const o=u(t),i=f(t),a=x(t),s=d(t,!0),r=H(t),c=w(t);return l(Dt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("step","1-0-0",s),c&&n("field_list","1-0-0",c),r&&n("response_list","1-0-0",r),a&&n("experience","1-0-1",a)],e)}const ce=p(Dt,re),_t="step_submit_success";function le(t,e){const o=u(t),i=f(t),a=x(t),s=d(t,!0),r=w(t),c=H(t);return l(_t,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("step","1-0-0",s),r&&n("field_list","1-0-0",r),c&&n("response_list","1-0-0",c),a&&n("experience","1-0-1",a)],e)}const ue=p(_t,le),kt="field_validation_error";function fe(t,e){const o=u(t),i=f(t),a=S(t),s=j(t,!0),r=x(t),c=d(t);return l(kt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("exception","1-0-0",s),n("form","1-0-0",a),r&&n("experience","1-0-1",r),c&&n("step","1-0-0",c)],e)}const de=p(kt,fe),bt="form_submit";function xe(t,e){const o=u(t),i=f(t),a=S(t),s=x(t),r=d(t);return l(bt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("form","1-0-0",a),s&&n("experience","1-0-1",s),r&&n("step","1-0-0",r)],e)}const pe=p(bt,xe),Tt="form_submit_error";function me(t,e){const o=u(t),i=f(t),a=S(t),s=j(t,!0),r=x(t),c=d(t);return l(Tt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("form","1-0-0",a),n("exception","1-0-0",s),r&&n("experience","1-0-1",r),c&&n("step","1-0-0",c)],e)}const Ce=p(Tt,me),gt="form_submit_success";function Ee(t,e){const o=u(t),i=f(t),a=S(t),s=x(t),r=d(t);return l(gt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("form","1-0-0",a),s&&n("experience","1-0-1",s),r&&n("step","1-0-0",r)],e)}const ve=p(gt,Ee);function D(t){return t instanceof Element}function De(t){return`data-picked-${t.replaceAll("_","-")}`}function T(t){const e=["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 D(t)?t.matches(e)?t:t.closest(e):null}function v(t){if(t instanceof HTMLSelectElement){const e=t.selectedIndex||0;return t.options[e]?.text??""}return"innerText"in t&&typeof t.innerText=="string"?t.innerText:t.textContent}function b(t){const e=t.getAttribute("aria-label");if(e)return e;const o=t.getAttribute("aria-labelledby");if(o){const a=document.getElementById(o);if(a){const s=v(a);if(s)return s}}if("id"in t&&t.id){const a=document.querySelector(`label[for="${t.id}"]`);if(a){const s=v(a);if(s)return s}}let i=t.parentElement;for(;i;){if(i.tagName.toLowerCase()==="label"){const a=v(i);if(a)return a}i=i.parentElement}if(t instanceof HTMLInputElement&&"labels"in t&&t.labels){const a=Array.from(t.labels).map(s=>v(s)).filter(Boolean).join(" ");if(a)return a}return"placeholder"in t&&typeof t.placeholder=="string"?t.placeholder:null}function _e(t,e){if(!D(t))return null;const o=De(e),i=t.closest(`[${o}]`);if(!i)return null;const a=i.getAttribute(o);return a?{element:i,customEventName:a}:null}const ke=255;function C(t){return t?t.slice(0,ke):null}const z="click";function be(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r)){const E={node_type:"unknown"};return l(z,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",E),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(z,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",m),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const Lt=p(z,be);function Te(t,e,o,i){const a=j(o.analyticsContext),s=x(o.analyticsContext),r=u(o.analyticsContext),c=w(o.analyticsContext),m=S(o.analyticsContext),E=ft(o.analyticsContext),P=ut(o.analyticsContext),V=lt(o.analyticsContext),Y=H(o.analyticsContext),R=f(o.analyticsContext),A=d(o.analyticsContext),B={id:e.id||null,node_type:e.nodeName.toLowerCase(),label:C(b(e)),text:C(v(e))};return l(t,[n("app","1-0-0",{organization_id:o.analyticsContext.organizationId,project_id:o.analyticsContext.projectId}),n("session","1-0-4",R),n("element","1-0-0",B),a?n("exception","1-0-0",a):void 0,s?n("experience","1-0-1",s):void 0,r?n("feature_list","2-0-0",r):void 0,c?n("field_list","1-0-0",c):void 0,m?n("form","1-0-0",m):void 0,E?n("modal","1-0-0",E):void 0,P?n("order","1-0-0",P):void 0,V?n("product_list","2-0-1",V):void 0,Y?n("response_list","1-0-0",Y):void 0,A?n("step","1-0-0",A):void 0],i)}function L(t,e,o){const i=_e(e.event.target,t);if(!i)return;const{element:a,customEventName:s}=i,r=Te(s,a,e,o);h.trackSelfDescribingEvent(r)}const U="rapid_scroll";function ge(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r)){const E={node_type:"unknown"};return l(U,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0,n("element","1-0-0",E)],e)}const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(U,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0,n("element","1-0-0",m)],e)}const Le=p(U,ge),$e=100,ye=100,he=300;let tt=0,et=0;const Ne=I((t,e)=>{Le(t,e),L("rapid_scroll",t,e)},he);function we(t,e){const o=t.event.target||document.documentElement;if(!(o instanceof HTMLElement))return;const i=o.scrollTop,a=Date.now()-et;Math.abs(i-tt)>$e&&a<ye&&Ne(t,e),tt=i,et=Date.now()}const Se=k("scroll",we,!0),G="rapid_click";function Pe(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r)){const E={node_type:"unknown"};return l(G,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",E),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(G,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",m),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const Ve=p(G,Pe);let F=0,nt=0;const Ye=3,Ae=500;function Be(t,e){const o=new Date().getTime();o-nt<Ae?F++:F=1,nt=o,F>=Ye&&(Ve(t,e),L("rapid_click",t,e),F=0)}const qe=k("click",Be),K="right_click";function Fe(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r)){const E={node_type:"unknown"};return l(K,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",E),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0])}const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(K,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",m),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const Oe=p(K,Fe);function He(t,e){Oe(t,e),L("right_click",t,e)}const je=k("contextmenu",He),$t="mouse_shake";function Ie(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext);return l($t,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const Re=p($t,Ie),We=5,ze=500,Ue=500;let ot={x:0},y=[],st=0;const Ge=I((t,e)=>{Re(t,e),L("mouse_shake",t,e)},ze);function Ke(t,e){const o=Date.now(),i=t.event.clientX-ot.x,a=Math.sign(i);o-st>Ue&&(y=[]),a!==0&&(y.length===0||y.at(-1)!==a)&&y.push(a),ot={x:t.event.clientX,y:t.event.clientY},y.length>=We&&(Ge(t,e),y=[]),st=o}const Me=k("mousemove",Ke),yt="page_visible";function Xe(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext);return l(yt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const Je=p(yt,Xe),ht="page_hidden";function Qe(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext);return l(ht,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const Ze=p(ht,Qe);function tn(t,e){if(document.visibilityState==="visible"){Je(t,e);return}Ze(t,e)}const en=jt("visibilitychange",tn),M="backspace";function nn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r)){const E={node_type:"unknown"};return l(M,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",E),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(M,[n("feature_list","2-0-0",o),n("session","1-0-4",i),n("element","1-0-0",m),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const on=p(M,nn);function sn(t,e){t.event.key==="Backspace"&&on(t,e)}const an=k("keydown",sn),Nt="page_hide";function rn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext);return l(Nt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const cn=p(Nt,rn);function ln(t,e){cn(t,e)}const un=N("pagehide",ln),wt="page_show";function fn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext);return l(wt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const dn=p(wt,fn);function xn(t,e){dn(t,e)}const pn=N("pageshow",xn),St="offline";function mn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext);return l(St,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const Cn=p(St,mn);function En(t,e){Cn(t,e)}const vn=N("offline",En),X="scroll";function Dn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r))return l(X,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e);const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(X,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0,n("element","1-0-0",m)],e)}const _n=p(X,Dn),kn=I((t,e)=>{_n(t,e),L("scroll",t,e)},500),bn=k("scroll",kn,!0),Pt="online";function Tn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext);return l(Pt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const gn=p(Pt,Tn);function Ln(t,e){gn(t,e)}const $n=N("online",Ln),Vt="resize";function yn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext);return l(Vt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const at=p(Vt,yn);let W=0;const hn=I((t,e)=>{const o=window.innerWidth;o!==W?(at(t,e),W=o):"ontouchstart"in window||at(t,e),W=o},300),Nn=N("resize",hn),Yt="unload";function wn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext);return l(Yt,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e)}const Sn=p(Yt,wn);function Pn(t,e){Sn(t,e)}const Vn=N("unload",Pn);function Yn(t,e){Lt(t,e),L("click",t,e)}const An=k("click",Yn),J="paste";function Bn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r))return l(J,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e);const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(J,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0,n("element","1-0-0",m)],e)}const qn=p(J,Bn);function Fn(t,e){qn(t,e)}const On=k("paste",Fn),Q="copy";function Hn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r))return l(Q,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e);const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(Q,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0,n("element","1-0-0",m)],e)}const jn=p(Q,Hn);function In(t,e){jn(t,e)}const Rn=k("copy",In),Z="drag";function Wn(t,e){const o=u(t.analyticsContext),i=f(t.analyticsContext),a=x(t.analyticsContext),s=d(t.analyticsContext),r=t.event.target||document.activeElement||t.event.currentTarget;if(!D(r))return l(Z,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0],e);const c=T(r)||r,m={id:c.id||null,node_type:c.nodeName.toLowerCase(),label:C(b(c)),text:C(v(c))};return l(Z,[n("feature_list","2-0-0",o),n("session","1-0-4",i),s?n("step","1-0-0",s):void 0,a?n("experience","1-0-1",a):void 0,n("element","1-0-0",m)],e)}const zn=p(Z,Wn);function At(t,e){const o=t.event.currentTarget;if(!o||!(o instanceof HTMLElement))return;function i(a){At({event:a,analyticsContext:t.analyticsContext})}o.removeEventListener("drag",i),o.addEventListener("dragend",()=>Bt(o,()=>t.analyticsContext)),zn(t,e),L("drag",t,e)}const Bt=k("drag",At);function Un(t,e){e&&(An(e,t),qe(e,t),je(e,t),Rn(e,t),On(e,t),Bt(e,t),an(e,t),bn(e,t),Se(e,t),Me(e,t))}function Gn(t){en(t),un(t),pn(t),vn(t),$n(t),Nn(t),Vn(t)}exports.bindGlobalEventListeners=Gn;exports.bindUserInteractionListeners=Un;exports.createContext=n;exports.createEvent=l;exports.createTrackEvent=p;exports.createTracker=zt;exports.formatExceptionContextData=j;exports.formatExperienceContextData=x;exports.formatFeatureListContextData=u;exports.formatFieldListContextData=w;exports.formatModalContextData=ft;exports.formatOrderContextData=ut;exports.formatProductListContextData=lt;exports.formatResponseListContextData=H;exports.formatSessionContextData=f;exports.formatStepContextData=d;exports.trackAppCloseEvent=Kt;exports.trackAppInitializeEvent=Xt;exports.trackAppLoadEvent=Qt;exports.trackAppOpenEvent=te;exports.trackCustomEvent=L;exports.trackEvent=Lt;exports.trackExperienceLoadEvent=ne;exports.trackFeatureDecideEvent=se;exports.trackFieldValidationErrorEvent=de;exports.trackFormSubmitErrorEvent=Ce;exports.trackFormSubmitEvent=pe;exports.trackFormSubmitSuccessEvent=ve;exports.trackStepEnterEvent=ie;exports.trackStepSubmitEvent=ce;exports.trackStepSubmitSuccessEvent=ue;
|