@epigraph/epigraph-std-lib 5.0.0-alpha.11 → 5.0.0-alpha.13

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.
Files changed (36) hide show
  1. package/dist/Epigraph/epigraph.cjs +1 -1
  2. package/dist/Epigraph/epigraph.js +94 -126
  3. package/dist/Epigraph/epigraphBaseSolutions.cjs +1 -1
  4. package/dist/Epigraph/epigraphBaseSolutions.js +60 -68
  5. package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs +1 -16
  6. package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js +2 -946
  7. package/dist/EpigraphLibs/EpigraphLogger/epigraphLogger.cjs +1 -1
  8. package/dist/EpigraphLibs/EpigraphLogger/epigraphLogger.js +74 -198
  9. package/dist/EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs +1 -1
  10. package/dist/EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js +197 -425
  11. package/dist/EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.cjs +1 -7
  12. package/dist/EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js +2 -78
  13. package/dist/EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs +1 -1
  14. package/dist/EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.js +24 -26
  15. package/dist/EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.cjs +1 -1
  16. package/dist/EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js +2 -88
  17. package/dist/EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs +1 -1
  18. package/dist/EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js +44 -75
  19. package/dist/enums-BSSe4NAs.js +8 -0
  20. package/dist/enums-PfFMiIoe.cjs +1 -0
  21. package/dist/epigraph-std-lib.cjs +1 -1
  22. package/dist/epigraph-std-lib.d.ts +1 -0
  23. package/dist/epigraph-std-lib.js +11 -72
  24. package/dist/epigraphAnalytics-CF9Czp8C.js +722 -0
  25. package/dist/epigraphAnalytics-H3EZRDUh.cjs +1 -0
  26. package/dist/epigraphQrCodeGenerator-BXUNL2XK.js +54 -0
  27. package/dist/epigraphQrCodeGenerator-F2eLrPC_.cjs +7 -0
  28. package/dist/epigraphUnitsConverter-CwpmWl7p.cjs +1 -0
  29. package/dist/epigraphUnitsConverter-DsX4Rmsp.js +66 -0
  30. package/dist/lit--5TUYSGn.js +508 -0
  31. package/dist/lit-DZtv4Pds.cjs +2 -0
  32. package/package.json +6 -7
  33. package/dist/enums-1vqWxJ0i.cjs +0 -1
  34. package/dist/enums-CvOTKyNu.js +0 -5
  35. package/dist/lit-element-C3moVMGu.js +0 -524
  36. package/dist/lit-element-CYaaFRfk.cjs +0 -19
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),s=require("../enums-1vqWxJ0i.cjs"),g=require("../EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs");class o{constructor(e){if(this._loggerContext="EPIGRAPH",this._isReady=!1,this._logger=new r.EpigraphLogger("EPIGRAPH LOGGER"),this._environment=s.ENVIRONMENT_TYPE.DEVELOPMENT,this._activeComponentsInSession=new Map,this._staleComponentsInSession=new Map,this._isSessionWebGL2Compatible=!1,window.epigraph)return window.epigraph.registerActiveComponent(e),window.epigraph;this._isSessionWebGL2Compatible=this._checkIfWebGL2IsAvailable(),window.epigraph=this,window.epigraph.registerActiveComponent(e),this.logBranding(),this._initializer=e,this._environment=this._initializer.environment;const t=this.getLoggerModeNameFromEnvironment();this._logger.setCurrentMode(t),this._urlProcessor=new g.EpigraphUrlProcessor,this.id=o.safeGenerateUuid();const i=this._urlProcessor.getParameterInUrl(g.QUERY_PARAMETER_NAMES.epigraphSessionId);this._epigraphSessionId=i??o.safeGenerateUuid(),this._logger.info({title:"Epigraph Object Ready!!",details:this,contextOverride:this._loggerContext}),this._isReady=!0}get isReady(){return this._isReady}get logger(){return this._logger}get urlProcessor(){return this._urlProcessor}get epigraphSessionId(){return this._epigraphSessionId}get environment(){return this._environment}get initializer(){return this._initializer}get activeComponentsInSession(){return this._activeComponentsInSession}get staleComponentsInSession(){return this._staleComponentsInSession}isSessionWebGL2Compatible(){return this._isSessionWebGL2Compatible}logBranding(){console.group("Powered by: "),console.log("%cEPIGRAPH","font-weight: bold; font-size: 50px; text-shadow: 3px 3px 0 rgb(100,100,100)"),console.log("Visit for more details: www.epigraph.us"),console.groupEnd()}_checkIfWebGL2IsAvailable(){try{const e=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&e.getContext("webgl2"))}catch{return!1}}registerActiveComponent(e){this._activeComponentsInSession.set(e.uuid,e),this._logger.info({title:"Registered a new Active Component",details:e,contextOverride:this._loggerContext})}deregisterActiveComponent(e){const t=this._activeComponentsInSession.get(e.uuid);t&&(this._staleComponentsInSession.set(t.uuid,t),this._activeComponentsInSession.delete(t.uuid),this._logger.info({title:"Deregistered a new Active Component",details:e,contextOverride:this._loggerContext}))}getLoggerModeNameFromEnvironment(){let e=r.LoggerModeNames.Dev;return this._environment===s.ENVIRONMENT_TYPE.STAGING?e=r.LoggerModeNames.Staging:this._environment===s.ENVIRONMENT_TYPE.PRODUCTION&&(e=r.LoggerModeNames.Release),e}static safeGenerateUuid(){let e="";try{e=crypto.randomUUID()}catch{console.error("crypto not available. Not generating a UUID")}return e}static generateXPath(e){let t="",i=e;for(;i;){let a=1,n=i.previousSibling;for(;n;)n.nodeName===i.nodeName&&a++,n=n.previousSibling;t=`/${i.nodeName.toLowerCase()+(a>1?`[${a}]`:"")}${t}`,i=i.parentNode}return t}}exports.ENVIRONMENT_TYPE=s.ENVIRONMENT_TYPE;exports.Epigraph=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),t=require("../enums-PfFMiIoe.cjs"),n=require("../EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs");var r=class r{constructor(i){if(this._loggerContext=`EPIGRAPH`,this._isReady=!1,this._logger=new e.EpigraphLogger(`EPIGRAPH LOGGER`),this._environment=t.t.DEVELOPMENT,this._activeComponentsInSession=new Map,this._staleComponentsInSession=new Map,this._isSessionWebGL2Compatible=!1,window.epigraph)return window.epigraph.registerActiveComponent(i),window.epigraph;this._isSessionWebGL2Compatible=this._checkIfWebGL2IsAvailable(),window.epigraph=this,window.epigraph.registerActiveComponent(i),this.logBranding(),this._initializer=i,this._environment=this._initializer.environment;let a=this.getLoggerModeNameFromEnvironment();this._logger.setCurrentMode(a),this._urlProcessor=new n.EpigraphUrlProcessor,this.id=r.safeGenerateUuid();let o=this._urlProcessor.getParameterInUrl(n.QUERY_PARAMETER_NAMES.epigraphSessionId);this._epigraphSessionId=o??r.safeGenerateUuid(),this._logger.info({title:`Epigraph Object Ready!!`,details:this,contextOverride:this._loggerContext}),this._isReady=!0}get isReady(){return this._isReady}get logger(){return this._logger}get urlProcessor(){return this._urlProcessor}get epigraphSessionId(){return this._epigraphSessionId}get environment(){return this._environment}get initializer(){return this._initializer}get activeComponentsInSession(){return this._activeComponentsInSession}get staleComponentsInSession(){return this._staleComponentsInSession}isSessionWebGL2Compatible(){return this._isSessionWebGL2Compatible}logBranding(){console.group(`Powered by: `),console.log(`%cEPIGRAPH`,`font-weight: bold; font-size: 50px; text-shadow: 3px 3px 0 rgb(100,100,100)`),console.log(`Visit for more details: www.epigraph.us`),console.groupEnd()}_checkIfWebGL2IsAvailable(){try{let e=document.createElement(`canvas`);return!!(window.WebGL2RenderingContext&&e.getContext(`webgl2`))}catch{return!1}}registerActiveComponent(e){this._activeComponentsInSession.set(e.uuid,e),this._logger.info({title:`Registered a new Active Component`,details:e,contextOverride:this._loggerContext})}deregisterActiveComponent(e){let t=this._activeComponentsInSession.get(e.uuid);t&&(this._staleComponentsInSession.set(t.uuid,t),this._activeComponentsInSession.delete(t.uuid),this._logger.info({title:`Deregistered a new Active Component`,details:e,contextOverride:this._loggerContext}))}getLoggerModeNameFromEnvironment(){let n=e.LoggerModeNames.Dev;return this._environment===t.t.STAGING?n=e.LoggerModeNames.Staging:this._environment===t.t.PRODUCTION&&(n=e.LoggerModeNames.Release),n}static safeGenerateUuid(){let e=``;try{e=crypto.randomUUID()}catch{console.error(`crypto not available. Not generating a UUID`)}return e}static generateXPath(e){let t=``,n=e;for(;n;){let e=1,r=n.previousSibling;for(;r;)r.nodeName===n.nodeName&&e++,r=r.previousSibling;t=`/${n.nodeName.toLowerCase()+(e>1?`[${e}]`:``)}${t}`,n=n.parentNode}return t}};exports.ENVIRONMENT_TYPE=t.t,exports.Epigraph=r;
@@ -1,127 +1,95 @@
1
- import { EpigraphLogger as g, LoggerModeNames as s } from "../EpigraphLibs/EpigraphLogger/epigraphLogger.js";
2
- import { E as r } from "../enums-CvOTKyNu.js";
3
- import { EpigraphUrlProcessor as l, QUERY_PARAMETER_NAMES as h } from "../EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
4
- class a {
5
- constructor(e) {
6
- if (this._loggerContext = "EPIGRAPH", this._isReady = !1, this._logger = new g("EPIGRAPH LOGGER"), this._environment = r.DEVELOPMENT, this._activeComponentsInSession = /* @__PURE__ */ new Map(), this._staleComponentsInSession = /* @__PURE__ */ new Map(), this._isSessionWebGL2Compatible = !1, window.epigraph)
7
- return window.epigraph.registerActiveComponent(e), window.epigraph;
8
- this._isSessionWebGL2Compatible = this._checkIfWebGL2IsAvailable(), window.epigraph = this, window.epigraph.registerActiveComponent(e), this.logBranding(), this._initializer = e, this._environment = this._initializer.environment;
9
- const t = this.getLoggerModeNameFromEnvironment();
10
- this._logger.setCurrentMode(t), this._urlProcessor = new l(), this.id = a.safeGenerateUuid();
11
- const i = this._urlProcessor.getParameterInUrl(h.epigraphSessionId);
12
- this._epigraphSessionId = i ?? a.safeGenerateUuid(), this._logger.info({ title: "Epigraph Object Ready!!", details: this, contextOverride: this._loggerContext }), this._isReady = !0;
13
- }
14
- get isReady() {
15
- return this._isReady;
16
- }
17
- get logger() {
18
- return this._logger;
19
- }
20
- get urlProcessor() {
21
- return this._urlProcessor;
22
- }
23
- get epigraphSessionId() {
24
- return this._epigraphSessionId;
25
- }
26
- get environment() {
27
- return this._environment;
28
- }
29
- get initializer() {
30
- return this._initializer;
31
- }
32
- get activeComponentsInSession() {
33
- return this._activeComponentsInSession;
34
- }
35
- get staleComponentsInSession() {
36
- return this._staleComponentsInSession;
37
- }
38
- isSessionWebGL2Compatible() {
39
- return this._isSessionWebGL2Compatible;
40
- }
41
- /**
42
- * Logs Epigraph Branding in the console to help redirect potential interests in the right direction.
43
- */
44
- logBranding() {
45
- console.group("Powered by: "), console.log("%cEPIGRAPH", "font-weight: bold; font-size: 50px; text-shadow: 3px 3px 0 rgb(100,100,100)"), console.log("Visit for more details: www.epigraph.us"), console.groupEnd();
46
- }
47
- /**
48
- * Used to check if the current session can support WebGL2 or not.
49
- *
50
- * @returns {boolean}
51
- */
52
- _checkIfWebGL2IsAvailable() {
53
- try {
54
- const e = document.createElement("canvas");
55
- return !!(window.WebGL2RenderingContext && e.getContext("webgl2"));
56
- } catch {
57
- return !1;
58
- }
59
- }
60
- /**
61
- * Registers a new component that was initialized on this page.
62
- * This is optional from the perspective of the initialization flow but highly recommend
63
- * registering any component that gets initialized in this session.
64
- * Any component that inherits from EpigraphBaseSolution should automatically register itself on initialization.
65
- *
66
- * @param {EpigraphBaseSolutionTypes} solutionRef A type of Epigraph base component that is initialized in the session.
67
- */
68
- registerActiveComponent(e) {
69
- this._activeComponentsInSession.set(e.uuid, e), this._logger.info({ title: "Registered a new Active Component", details: e, contextOverride: this._loggerContext });
70
- }
71
- /**
72
- * De-Registers a component that was initialized on this page.
73
- * This is optional from the perspective of the unmount flow but highly recommend
74
- * de-registering any component that gets removed in this session.
75
- * Any component that inherits from EpigraphBaseSolution should automatically de-register itself on unmount.
76
- *
77
- * @param {EpigraphBaseSolutionTypes} solutionRef A type of Epigraph base component that is initialized in the session.
78
- */
79
- deregisterActiveComponent(e) {
80
- const t = this._activeComponentsInSession.get(e.uuid);
81
- t && (this._staleComponentsInSession.set(t.uuid, t), this._activeComponentsInSession.delete(t.uuid), this._logger.info({ title: "Deregistered a new Active Component", details: e, contextOverride: this._loggerContext }));
82
- }
83
- /**
84
- * Gets the mode that the logger should be executed in, based on the runtime environment.
85
- *
86
- * @returns {LoggerModeNames} A valid logger mode name.
87
- */
88
- getLoggerModeNameFromEnvironment() {
89
- let e = s.Dev;
90
- return this._environment === r.STAGING ? e = s.Staging : this._environment === r.PRODUCTION && (e = s.Release), e;
91
- }
92
- /**
93
- * Generates a random UUID using crypto.randomUUID with a fallback on custom generator,
94
- * if the first option fails for any reason in an environment.1
95
- *
96
- * @returns {string} A random generated ID.
97
- */
98
- static safeGenerateUuid() {
99
- let e = "";
100
- try {
101
- e = crypto.randomUUID();
102
- } catch {
103
- console.error("crypto not available. Not generating a UUID");
104
- }
105
- return e;
106
- }
107
- /**
108
- * Generates an XPath based on a DOM nodes location on the page.
109
- *
110
- * @param {HTMLElement} element The element that we need the XPath for.
111
- * @returns {string} The generated XPath.
112
- */
113
- static generateXPath(e) {
114
- let t = "", i = e;
115
- for (; i; ) {
116
- let o = 1, n = i.previousSibling;
117
- for (; n; )
118
- n.nodeName === i.nodeName && o++, n = n.previousSibling;
119
- t = `/${i.nodeName.toLowerCase() + (o > 1 ? `[${o}]` : "")}${t}`, i = i.parentNode;
120
- }
121
- return t;
122
- }
123
- }
124
- export {
125
- r as ENVIRONMENT_TYPE,
126
- a as Epigraph
1
+ import { EpigraphLogger as e, LoggerModeNames as t } from "../EpigraphLibs/EpigraphLogger/epigraphLogger.js";
2
+ import { t as n } from "../enums-BSSe4NAs.js";
3
+ import { EpigraphUrlProcessor as r, QUERY_PARAMETER_NAMES as i } from "../EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
4
+ //#region lib/Epigraph/epigraph.ts
5
+ var a = class a {
6
+ constructor(t) {
7
+ if (this._loggerContext = "EPIGRAPH", this._isReady = !1, this._logger = new e("EPIGRAPH LOGGER"), this._environment = n.DEVELOPMENT, this._activeComponentsInSession = /* @__PURE__ */ new Map(), this._staleComponentsInSession = /* @__PURE__ */ new Map(), this._isSessionWebGL2Compatible = !1, window.epigraph) return window.epigraph.registerActiveComponent(t), window.epigraph;
8
+ this._isSessionWebGL2Compatible = this._checkIfWebGL2IsAvailable(), window.epigraph = this, window.epigraph.registerActiveComponent(t), this.logBranding(), this._initializer = t, this._environment = this._initializer.environment;
9
+ let o = this.getLoggerModeNameFromEnvironment();
10
+ this._logger.setCurrentMode(o), this._urlProcessor = new r(), this.id = a.safeGenerateUuid();
11
+ let s = this._urlProcessor.getParameterInUrl(i.epigraphSessionId);
12
+ this._epigraphSessionId = s ?? a.safeGenerateUuid(), this._logger.info({
13
+ title: "Epigraph Object Ready!!",
14
+ details: this,
15
+ contextOverride: this._loggerContext
16
+ }), this._isReady = !0;
17
+ }
18
+ get isReady() {
19
+ return this._isReady;
20
+ }
21
+ get logger() {
22
+ return this._logger;
23
+ }
24
+ get urlProcessor() {
25
+ return this._urlProcessor;
26
+ }
27
+ get epigraphSessionId() {
28
+ return this._epigraphSessionId;
29
+ }
30
+ get environment() {
31
+ return this._environment;
32
+ }
33
+ get initializer() {
34
+ return this._initializer;
35
+ }
36
+ get activeComponentsInSession() {
37
+ return this._activeComponentsInSession;
38
+ }
39
+ get staleComponentsInSession() {
40
+ return this._staleComponentsInSession;
41
+ }
42
+ isSessionWebGL2Compatible() {
43
+ return this._isSessionWebGL2Compatible;
44
+ }
45
+ logBranding() {
46
+ console.group("Powered by: "), console.log("%cEPIGRAPH", "font-weight: bold; font-size: 50px; text-shadow: 3px 3px 0 rgb(100,100,100)"), console.log("Visit for more details: www.epigraph.us"), console.groupEnd();
47
+ }
48
+ _checkIfWebGL2IsAvailable() {
49
+ try {
50
+ let e = document.createElement("canvas");
51
+ return !!(window.WebGL2RenderingContext && e.getContext("webgl2"));
52
+ } catch {
53
+ return !1;
54
+ }
55
+ }
56
+ registerActiveComponent(e) {
57
+ this._activeComponentsInSession.set(e.uuid, e), this._logger.info({
58
+ title: "Registered a new Active Component",
59
+ details: e,
60
+ contextOverride: this._loggerContext
61
+ });
62
+ }
63
+ deregisterActiveComponent(e) {
64
+ let t = this._activeComponentsInSession.get(e.uuid);
65
+ t && (this._staleComponentsInSession.set(t.uuid, t), this._activeComponentsInSession.delete(t.uuid), this._logger.info({
66
+ title: "Deregistered a new Active Component",
67
+ details: e,
68
+ contextOverride: this._loggerContext
69
+ }));
70
+ }
71
+ getLoggerModeNameFromEnvironment() {
72
+ let e = t.Dev;
73
+ return this._environment === n.STAGING ? e = t.Staging : this._environment === n.PRODUCTION && (e = t.Release), e;
74
+ }
75
+ static safeGenerateUuid() {
76
+ let e = "";
77
+ try {
78
+ e = crypto.randomUUID();
79
+ } catch {
80
+ console.error("crypto not available. Not generating a UUID");
81
+ }
82
+ return e;
83
+ }
84
+ static generateXPath(e) {
85
+ let t = "", n = e;
86
+ for (; n;) {
87
+ let e = 1, r = n.previousSibling;
88
+ for (; r;) r.nodeName === n.nodeName && e++, r = r.previousSibling;
89
+ t = `/${n.nodeName.toLowerCase() + (e > 1 ? `[${e}]` : "")}${t}`, n = n.parentNode;
90
+ }
91
+ return t;
92
+ }
127
93
  };
94
+ //#endregion
95
+ export { n as ENVIRONMENT_TYPE, a as Epigraph };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../lit-element-CYaaFRfk.cjs"),e=require("./epigraph.cjs");class s extends HTMLElement{constructor(t,i){super(),this._isReady=!1,this._elementName="epigraph-base-solution-html",this._solutionVersion="",this._loggerContextOverride="[EPIGRAPH BASE SOLUTION]",this.attachShadow({mode:"open"}),this.__environment=i,this._solutionVersion=t,this.__xPath=e.Epigraph.generateXPath(this),this.__uuid=e.Epigraph.safeGenerateUuid()??this.__xPath,new e.Epigraph(this),window.epigraph.logger.info({title:"Epigraph Base Solution Ready",contextOverride:this._loggerContextOverride})}get isReady(){return this._isReady}get environment(){return this.__environment}get elementName(){return this._elementName}get solutionVersion(){return this._solutionVersion}get uuid(){return this.__uuid}get xPath(){return this.__xPath}disconnectedCallback(){window.epigraph.deregisterActiveComponent(this)}}class o extends r.i{constructor(t,i){super(),this._isReady=!1,this._elementName="epigraph-base-solution-lit",this._solutionVersion="",this._loggerContextOverride="[EPIGRAPH BASE SOLUTION]",this._environment=i,this._solutionVersion=t,this._xPath=e.Epigraph.generateXPath(this),this._uuid=e.Epigraph.safeGenerateUuid()??this._xPath,new e.Epigraph(this),this._isReady=!0,window.epigraph.logger.info({title:"Epigraph Base Solution Ready",contextOverride:this._loggerContextOverride})}get isReady(){return this._isReady}get environment(){return this._environment}get elementName(){return this._elementName}get solutionVersion(){return this._solutionVersion}get uuid(){return this._uuid}get xPath(){return this._xPath}disconnectedCallback(){window.epigraph.deregisterActiveComponent(this)}}exports.EpigraphBaseSolutionHtmlElement=s;exports.EpigraphBaseSolutionLitElement=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./epigraph.cjs"),t=require("../lit-DZtv4Pds.cjs");var n=class extends HTMLElement{constructor(t,n){super(),this._isReady=!1,this._elementName=`epigraph-base-solution-html`,this._solutionVersion=``,this._loggerContextOverride=`[EPIGRAPH BASE SOLUTION]`,this.attachShadow({mode:`open`}),this.__environment=n,this._solutionVersion=t,this.__xPath=e.Epigraph.generateXPath(this),this.__uuid=e.Epigraph.safeGenerateUuid()??this.__xPath,new e.Epigraph(this),window.epigraph.logger.info({title:`Epigraph Base Solution Ready`,contextOverride:this._loggerContextOverride})}get isReady(){return this._isReady}get environment(){return this.__environment}get elementName(){return this._elementName}get solutionVersion(){return this._solutionVersion}get uuid(){return this.__uuid}get xPath(){return this.__xPath}disconnectedCallback(){window.epigraph.deregisterActiveComponent(this)}},r=class extends t.t{constructor(t,n){super(),this._isReady=!1,this._elementName=`epigraph-base-solution-lit`,this._solutionVersion=``,this._loggerContextOverride=`[EPIGRAPH BASE SOLUTION]`,this._environment=n,this._solutionVersion=t,this._xPath=e.Epigraph.generateXPath(this),this._uuid=e.Epigraph.safeGenerateUuid()??this._xPath,new e.Epigraph(this),this._isReady=!0,window.epigraph.logger.info({title:`Epigraph Base Solution Ready`,contextOverride:this._loggerContextOverride})}get isReady(){return this._isReady}get environment(){return this._environment}get elementName(){return this._elementName}get solutionVersion(){return this._solutionVersion}get uuid(){return this._uuid}get xPath(){return this._xPath}disconnectedCallback(){window.epigraph.deregisterActiveComponent(this)}};exports.EpigraphBaseSolutionHtmlElement=n,exports.EpigraphBaseSolutionLitElement=r;
@@ -1,70 +1,62 @@
1
- import { i as s } from "../lit-element-C3moVMGu.js";
2
1
  import { Epigraph as e } from "./epigraph.js";
3
- class h extends HTMLElement {
4
- constructor(t, i) {
5
- super(), this._isReady = !1, this._elementName = "epigraph-base-solution-html", this._solutionVersion = "", this._loggerContextOverride = "[EPIGRAPH BASE SOLUTION]", this.attachShadow({ mode: "open" }), this.__environment = i, this._solutionVersion = t, this.__xPath = e.generateXPath(this), this.__uuid = e.safeGenerateUuid() ?? this.__xPath, new e(this), window.epigraph.logger.info({
6
- title: "Epigraph Base Solution Ready",
7
- contextOverride: this._loggerContextOverride
8
- });
9
- }
10
- get isReady() {
11
- return this._isReady;
12
- }
13
- get environment() {
14
- return this.__environment;
15
- }
16
- get elementName() {
17
- return this._elementName;
18
- }
19
- /**
20
- * This is the npm package version of this solution.
21
- */
22
- get solutionVersion() {
23
- return this._solutionVersion;
24
- }
25
- get uuid() {
26
- return this.__uuid;
27
- }
28
- get xPath() {
29
- return this.__xPath;
30
- }
31
- disconnectedCallback() {
32
- window.epigraph.deregisterActiveComponent(this);
33
- }
34
- }
35
- class a extends s {
36
- constructor(t, i) {
37
- super(), this._isReady = !1, this._elementName = "epigraph-base-solution-lit", this._solutionVersion = "", this._loggerContextOverride = "[EPIGRAPH BASE SOLUTION]", this._environment = i, this._solutionVersion = t, this._xPath = e.generateXPath(this), this._uuid = e.safeGenerateUuid() ?? this._xPath, new e(this), this._isReady = !0, window.epigraph.logger.info({
38
- title: "Epigraph Base Solution Ready",
39
- contextOverride: this._loggerContextOverride
40
- });
41
- }
42
- get isReady() {
43
- return this._isReady;
44
- }
45
- get environment() {
46
- return this._environment;
47
- }
48
- get elementName() {
49
- return this._elementName;
50
- }
51
- /**
52
- * This is the npm package version of this solution.
53
- */
54
- get solutionVersion() {
55
- return this._solutionVersion;
56
- }
57
- get uuid() {
58
- return this._uuid;
59
- }
60
- get xPath() {
61
- return this._xPath;
62
- }
63
- disconnectedCallback() {
64
- window.epigraph.deregisterActiveComponent(this);
65
- }
66
- }
67
- export {
68
- h as EpigraphBaseSolutionHtmlElement,
69
- a as EpigraphBaseSolutionLitElement
2
+ import { t } from "../lit--5TUYSGn.js";
3
+ //#region lib/Epigraph/epigraphBaseSolutions.ts
4
+ var n = class extends HTMLElement {
5
+ constructor(t, n) {
6
+ super(), this._isReady = !1, this._elementName = "epigraph-base-solution-html", this._solutionVersion = "", this._loggerContextOverride = "[EPIGRAPH BASE SOLUTION]", this.attachShadow({ mode: "open" }), this.__environment = n, this._solutionVersion = t, this.__xPath = e.generateXPath(this), this.__uuid = e.safeGenerateUuid() ?? this.__xPath, new e(this), window.epigraph.logger.info({
7
+ title: "Epigraph Base Solution Ready",
8
+ contextOverride: this._loggerContextOverride
9
+ });
10
+ }
11
+ get isReady() {
12
+ return this._isReady;
13
+ }
14
+ get environment() {
15
+ return this.__environment;
16
+ }
17
+ get elementName() {
18
+ return this._elementName;
19
+ }
20
+ get solutionVersion() {
21
+ return this._solutionVersion;
22
+ }
23
+ get uuid() {
24
+ return this.__uuid;
25
+ }
26
+ get xPath() {
27
+ return this.__xPath;
28
+ }
29
+ disconnectedCallback() {
30
+ window.epigraph.deregisterActiveComponent(this);
31
+ }
32
+ }, r = class extends t {
33
+ constructor(t, n) {
34
+ super(), this._isReady = !1, this._elementName = "epigraph-base-solution-lit", this._solutionVersion = "", this._loggerContextOverride = "[EPIGRAPH BASE SOLUTION]", this._environment = n, this._solutionVersion = t, this._xPath = e.generateXPath(this), this._uuid = e.safeGenerateUuid() ?? this._xPath, new e(this), this._isReady = !0, window.epigraph.logger.info({
35
+ title: "Epigraph Base Solution Ready",
36
+ contextOverride: this._loggerContextOverride
37
+ });
38
+ }
39
+ get isReady() {
40
+ return this._isReady;
41
+ }
42
+ get environment() {
43
+ return this._environment;
44
+ }
45
+ get elementName() {
46
+ return this._elementName;
47
+ }
48
+ get solutionVersion() {
49
+ return this._solutionVersion;
50
+ }
51
+ get uuid() {
52
+ return this._uuid;
53
+ }
54
+ get xPath() {
55
+ return this._xPath;
56
+ }
57
+ disconnectedCallback() {
58
+ window.epigraph.deregisterActiveComponent(this);
59
+ }
70
60
  };
61
+ //#endregion
62
+ export { n as EpigraphBaseSolutionHtmlElement, r as EpigraphBaseSolutionLitElement };
@@ -1,16 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("../../enums-1vqWxJ0i.cjs");var c=(e=>(e.UNAVAILABLE="unavailable",e.AVAILABLE="available",e.RESTRICTED="restricted",e))(c||{});const O=Symbol("data"),v=Symbol("next"),G=class w{constructor(t){this[O]=t,this[v]=null}get data(){return this[O]}set next(t){if(!(t instanceof w)&&t!==null)throw new Error("This node is not an instance of the custom class 'Node'.");this[v]=t}get next(){return this[v]}};let S=G;const E=Symbol("head");class z{constructor(){this[E]=null}set head(t){this[E]=t}get head(){return this[E]}addToTail(t){let i=this.head;if(i){for(;i.next!==null;)i=i?.next;return i.next=new S(t)}return this.head=new S(t)}removeHead(){const t=this.head;if(t)return this.head=t.next,t.data}}const T=Symbol("queue"),p=Symbol("size");class L{constructor(){this[T]=new z,this[p]=0}get queue(){return this[T]}get size(){return this[p]}enqueue(t){this.queue.addToTail(t),this[p]++}dequeue(){const t=this.queue.removeHead();return this[p]--,t}}class u{static{this.NOTIFICATION_NAME="epg-notification"}static{this.ACTION_SEND_EVENT="send-event"}static{this.ACTION_INITIALIZED="initialized"}static{this.ACTION_FAILED_INITIALIZATION="initialization-failed"}constructor(t,i,n,s,r,o){this._pluginName=t,this._trackingId=i,this._experienceId=n,this._solution=s,this._initializer=r,this._status=o}updateStatus(t){this._status=t}updateInitializer(t){this._initializer=t}notify(t,i){const n={pluginName:this._pluginName,trackingId:this._trackingId,experienceId:this._experienceId,solution:this._solution,initializer:this._initializer,status:this._status,action:t,eventDetails:i};window.dispatchEvent(new CustomEvent("epg-notification",{detail:n}))}}class M{constructor({trackingID:t,experienceID:i,solution:n,verboseLogging:s=!1}){this.__status=c.UNAVAILABLE,this.__sentEventCount=0,this.__initializationAttempts=0,this.__lastInitializationAttempt=performance.now(),this.__maxInitializationAttempts=10,this.__initializationRetryDelay=2e3,this.__isInitialized=!1,this.__initializationMethod="NONE",this.__nexusFailureReported=!1,this.name=this.pluginName="GA4-PLUGIN",this.trackingID=t,this.experienceID=i,this.solution=n,this.verboseLogging=s,this.__queue=new L,this.__epigraphNotifier=new u(this.pluginName,this.pluginName,this.experienceID,this.solution,this.__initializationMethod,this.__status),this.initializePlugin()}getStatus(){return this.__status}setStatus(t){this.__status=t,this.__epigraphNotifier.updateStatus(t)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return`${this.name}-${this.trackingID}`}setupPlugin(){this.__isInitialized&&this.dataLayer!==void 0&&this.dequeueAndSendEvents()}async sendEvent(t,i){if(this.__queue.enqueue(t),!i){this.__status=c.RESTRICTED;return}if(!this.__isInitialized){this.logger("Cannot send analytics event: dataLayer not defined or plugin not initialized.");return}try{await this.dequeueAndSendEvents()}catch(n){this.logger(n),await this.reportFailureToNexus("EVENT_SEND_ERROR",n?.toString()||"Unknown error")}}initializePlugin(){if(this.__isInitialized)return;if(this.__initializationAttempts>=this.__maxInitializationAttempts){this.__nexusFailureReported||(this.reportFailureToNexus("MAX_INITIALIZATION_ATTEMPTS","Maximum initialization attempts reached"),this.__nexusFailureReported=!0,this.__epigraphNotifier.notify(u.ACTION_FAILED_INITIALIZATION,{}));return}const t=performance.now();if(this.__initializationAttempts>0&&t-this.__lastInitializationAttempt<this.__initializationRetryDelay)return;this.__lastInitializationAttempt=t,this.__initializationAttempts++;const i=this.detectAndSetupAnalytics();i.success?(this.__isInitialized=!0,this.__status=c.AVAILABLE,this.__initializationMethod=i.method,this.dataLayerName=i.dataLayerName,this.dataLayer=window[this.dataLayerName],this.logger(`Successfully initialized ${i.method} with dataLayer: ${this.dataLayerName}`),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{}),this.__queue.size>0&&this.dequeueAndSendEvents()):(this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${i.error}`),this.__initializationAttempts<this.__maxInitializationAttempts&&setTimeout(()=>{this.initializePlugin()},this.__initializationRetryDelay))}detectAndSetupAnalytics(){const t=this.detectGTM();if(t)return this.logger(`GTM detected with container ID: ${t.containerId}`),this.__epigraphNotifier.updateInitializer("GTM"),{success:!0,method:"GTM",dataLayerName:t.dataLayerName};const i=this.findGA4Info(this.trackingID);if(i){const n=i.l||"dataLayer";return this.logger(`GA4 script found, setting up with dataLayer: ${n}`),this.__epigraphNotifier.updateInitializer("GA4"),{success:!0,method:"GA4",dataLayerName:n}}return{success:!1,method:"NONE",dataLayerName:"dataLayer",error:"No analytics setup found and unable to create one"}}detectGTM(){const t=document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');for(const i of Array.from(t)){const n=i.getAttribute("src");if(n){const s=n.match(/gtm\.js\?id=([^&]+)/);if(s&&s.length>0){const r=n.match(/&l=([^&]+)/),o=r?r[1]:"dataLayer";return{containerId:s[1],dataLayerName:o}}}}return null}async dequeueAndSendEvents(){if(!this.__isInitialized||!this.dataLayer)return;let t=this.__queue.size;for(let i=0;i<t;i++){const n=this.__queue.dequeue();try{this.__initializationMethod==="GTM"?(this.sendGTMEvent(n),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)):this.__initializationMethod==="GA4"?(this.sendGA4Event(n),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)):this.__queue.enqueue(n)}catch(s){this.logger(`Error sending event ${n.eventName}: ${s}`),this.__queue.enqueue(n)}}}async sendGTMEvent(t){let i=t.getGTMParameters(this.solution,this.experienceID,this.trackingID);const n=i;this.isValidPayload(i)||(i=await this.convertGTMParametersToEpgEventTag(t.eventName,i)),this.dataLayer&&(this.dataLayer.push(i),this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n))}async sendGA4Event(t){let i=t.getGa4Parameters(this.solution,this.experienceID,this.trackingID);const n=i;this.isValidPayload(i)||(i=await this.convertGA4ParametersToEpgEventTag(i)),window.gtag("event",t.eventName,i),this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n)}isValidPayload(t){if(Object.keys(t).length>=25)return!1;for(const[s,r]of Object.entries(t))if(s!=="items"&&(s.length>40||String(r).length>100))return!1;return!0}async convertGTMParametersToEpgEventTag(t,i){try{let n=await this.sendGA4LongParameters(i);return{event:t,epg_event_tag:n,send_to:this.trackingID}}catch{return i}}async convertGA4ParametersToEpgEventTag(t){try{return{epg_event_tag:await this.sendGA4LongParameters(t),send_to:this.trackingID}}catch{return t}}logger(t){this.verboseLogging&&console.warn(t)}async sendGA4LongParameters(t){const i="https://api.myepigraph.com/api/analytics/ga4/custom",n={parameters:t};try{const s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});return s.ok?(await s.json())?.id??"":""}catch{return""}}async reportFailureToNexus(t,i){try{const n={plugin:"GA4",trackingId:this.trackingID,solution:this.solution,experienceId:this.experienceID,failureType:t,errorMessage:i,timestamp:new Date().toISOString(),url:window.location.href,userAgent:navigator.userAgent};this.logger(`Failure reported to Nexus: ${JSON.stringify(n)}`)}catch(n){this.logger(`Error reporting failure to Nexus: ${n}`)}}findGA4Info(t){if(window.google_tag_manager&&window.google_tag_manager[t]){const n=window.google_tag_manager[t];if(n&&n.dataLayerName)return{fullSrc:"",id:t,l:n.dataLayerName}}const i=document.querySelectorAll("script[src]");for(const n of i){const s=n.getAttribute("src");if(s&&s.includes(t)){const r=new URL(s,location.href),o=Object.fromEntries(r.searchParams.entries());return{fullSrc:r.href,id:o.id||void 0,l:o.l||void 0}}}return null}}class q{constructor({trackingID:t,experienceID:i,solution:n,sessionId:s,xPath:r,verboseLogging:o=!1,baseUrl:x=D.NexusEndpoints.PRODUCTION}){this.__status=c.UNAVAILABLE,this.__sentEventCount=0,this.sessionId=s,this.xPath=r,this.name=this.pluginName="NEXUS-PLUGIN",this.trackingID=t,this.experienceID=i,this.solution=n,this.verboseLogging=o,this.__queue=new L,this.url=`${x}/analytics/event`,this.__status=c.AVAILABLE,this.__epigraphNotifier=new u(this.pluginName,this.trackingID,this.experienceID,this.solution,"NEXUS",this.__status),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{})}getStatus(){return this.__status}setStatus(t){this.__status=t,this.__epigraphNotifier.updateStatus(t)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return this.name+"-"+this.trackingID}setupPlugin(){}async sendEvent(t,i){if(this.__queue.enqueue(t),!i){this.__status=c.RESTRICTED,this.__epigraphNotifier.updateStatus(this.__status);return}await this.dequeueAndSendEvents()}async dequeueAndSendEvents(){for(let t=0;t<this.__queue.size;t++){const i=this.__queue.dequeue(),n={send_to:this.trackingID,experience_id:this.experienceID,solution:this.solution,event:i.eventName,parameters:i.getNexusParameters()};try{return(await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","EPG-SESSION-ID":this.sessionId,"EPG-XPATH":this.xPath,Origin:typeof window<"u"?window.location.origin:""},body:JSON.stringify(n)})).ok&&this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n),""}catch{return""}this.__sentEventCount++}return""}}class P{constructor(t){this.consentSet=!1,this.consent=!1,this.pluginName="OneTrustConsentPlugin",this.consentIdentifier=t,this.consent=!1,this.addConsentChangedListener()}hasConsent(){if(this.consentSet)return this.consent;if(window.OnetrustActiveGroups!==void 0){let t=window.OnetrustActiveGroups;t!==void 0&&t.split(",").forEach(n=>{n===this.consentIdentifier&&(this.consent=!0,this.consentSet=!0)})}return this.consent}addConsentChangedListener(){window.addEventListener("load",()=>{this.hasConsent(),window.OneTrust!==void 0&&typeof window.OneTrust=="object"&&window.OneTrust.OnConsentChanged(()=>{this.consentSet=!1,this.hasConsent()})})}}var m=(e=>(e.OneTrust="onetrust",e))(m||{});class a{constructor({eventName:t,interactiveEvent:i,customParameters:n}){this.eventName=t,this.interactiveEvent=i,this.customParameters=n}getGa4Parameters(t,i,n){let s={solution:t,experience_id:i,interactive_event:this.interactiveEvent,send_to:n};return s=Object.assign(s,JSON.parse(JSON.stringify(this.customParameters))),s}getGTMParameters(t,i,n){let s={solution:t,experience_id:i,event:this.eventName,interactive_event:this.interactiveEvent,send_to:n};return s=Object.assign(s,JSON.parse(JSON.stringify(this.customParameters))),s}getNexusParameters(){let t={interactive_event:this.interactiveEvent};return t=Object.assign(t,JSON.parse(JSON.stringify(this.customParameters))),t}}var f=(e=>(e.VARIANT="variant",e.CATEGORY_VARIANT="category_variant",e.GEOMETRY="geometry",e.CATEGORY_GEOMETRY="category_geometry",e.GLOBAL="global",e))(f||{}),d=(e=>(e.AR="ar",e.QR="qr",e.INFO="info",e.INSTRUCTIONS="instructions",e.DOWNLOAD="download",e.PREVIEW_CART="preview_cart",e.HOTSPOT_PANEL="hotspot_panel",e.SHARE_MODAL="share_modal",e.RESTART_MODAL="restart_modal",e.REMOVE_MODAL="remove_modal",e.LOAD_PRECONFIG_MODAL="load_preconfig_modal",e.MOVE_MODAL="move_modal",e.OUT_OF_STOCK_MODAL="out_of_stock_modal",e))(d||{}),I=(e=>(e.NETWORK="network",e.EXPERIENCE_CONFIG_ERROR="experience-config-error",e.SCENE_LOAD_ERROR="scene-load-error",e.INITIAL_SCENE_LOAD_ERROR="initial-scene-load-error",e.AUTHENTICATION_FAILED="authentication-failed",e))(I||{}),_=(e=>(e.AUTO="auto",e.BUTTON="button",e.HOTSPOT="hotspot",e.GESTURE="gesture",e))(_||{}),h=(e=>(e.USD="USD",e.EUR="EUR",e.GBP="GBP",e.CAD="CAD",e))(h||{}),N=(e=>(e.AR="ar",e.QR="qr",e.AR_WEBGL2="ar-webgl2",e.QR_WEBGL2="qr-webgl2",e))(N||{}),A=(e=>(e.AR_VIEW="ar_view",e.DIMENSION_TOGGLE="dimension_toggle",e.HOTSPOTS_TOGGLE="hotspots_toggle",e.HELP_TOGGLE="help_toggle",e.UTILITY_MENU_TOGGLE="utility_menu_toggle",e.HOTSPOT_ENTER="hotspot_enter",e.HOTSPOT_EXIT="hotspot_exit",e.SHARE="share",e.PDF_DOWNLOAD="pdf_download",e.COPY="copy",e.RESTART="restart",e.INSTRUCTIONS_SHOW="show_instructions",e.REVIEW_CART="review_cart",e.SHOP_NOW="shop_now",e.SUB_CATEGORY="sub_category",e.NEXT_STEP="next_step",e.PREVIOUS_STEP="previous_step",e))(A||{}),g=(e=>(e.ZOOM="zoom",e.ROTATE="rotate",e.PAN="pan",e))(g||{}),y=(e=>(e.CONFIGURATION="configuration",e.SCENE="scene",e.PRODUCT="product",e))(y||{}),C=(e=>(e.FACEBOOK="facebook",e.TWITTER="twitter",e.EMAIL="email",e.COPY_LINK="copy_link",e.WHATSAPP="whatsapp",e.LINKEDIN="linkedin",e))(C||{});class b extends a{constructor(t){super({eventName:"epigraph_ar_requested",interactiveEvent:!0,customParameters:{items:t}})}}class k extends a{constructor(t){super({eventName:"epigraph_module_loading",interactiveEvent:!1,customParameters:{is_pre_config:t}})}}class V extends a{constructor(t,i){super({eventName:"epigraph_module_ready",interactiveEvent:!1,customParameters:{is_pre_config:t,load_time_ms:i}})}}class $ extends a{static{this.MODULE_FAILED_ERRORS=I}constructor(t,i,n){super({eventName:"epigraph_module_failed",interactiveEvent:!1,customParameters:{is_pre_config:t,load_time_ms:i,error_type:n}})}}class F extends a{constructor(t){super({eventName:"epigraph_module_closed",interactiveEvent:!0,customParameters:{items:t}})}}class U extends a{static{this.SUPPORT_TYPE=N}constructor(t){super({eventName:"epigraph_support_detected",interactiveEvent:!1,customParameters:{support_type:t}})}}class j extends a{static{this.BUTTON_TYPE=A}constructor(t,i){super({eventName:"epigraph_button_click",interactiveEvent:!0,customParameters:{button_type:t,button_name:i}})}}class W extends a{static{this.PANEL_TYPE=d}static{this.TRIGGER_SOURCE=_}constructor(t,i,n,s){super({eventName:"epigraph_panel_opened",interactiveEvent:t,customParameters:{items:s,panel_type:i,trigger_source:n}})}}class H extends a{static{this.PANEL_TYPE=d}static{this.TRIGGER_SOURCE=_}constructor(t,i,n,s){super({eventName:"epigraph_panel_closed",interactiveEvent:t,customParameters:{items:s,panel_type:i,trigger_source:n}})}}class J extends a{constructor(t){super({eventName:"epigraph_add_to_favourites",interactiveEvent:!0,customParameters:{items:t}})}}class K extends a{static{this.ACTION_PERFORMED=g}constructor(t){super({eventName:"epigraph_keyboard_interaction",interactiveEvent:!0,customParameters:{action_performed:t}})}}class X extends a{static{this.INTERACTION_TYPE=g}constructor(t){super({eventName:"epigraph_touch_interaction",interactiveEvent:!0,customParameters:{interaction_type:t}})}}class Z extends a{static{this.CURRENCY=h}constructor(t,i,n,s,r){super({eventName:"epigraph_item_added",interactiveEvent:t,customParameters:{items:r,value:i,currency:n,quantity:s}})}}class B extends a{constructor(t){super({eventName:"epigraph_item_moved",interactiveEvent:!0,customParameters:{items:t}})}}class Q extends a{static{this.CURRENCY=h}constructor(t,i,n,s){super({eventName:"epigraph_item_removed",interactiveEvent:!0,customParameters:{items:s,value:t,currency:i,quantity:n}})}}class Y extends a{static{this.VARIANT_CHANGE_TYPES=f}constructor(t,i){super({eventName:"epigraph_variant_changed",interactiveEvent:!0,customParameters:{items:i,change_type:t}})}}class tt extends a{static{this.CONTENT_TYPES=y}static{this.SHARE_DESTINATIONS=C}constructor(t,i,n){super({eventName:"epigraph_content_shared",interactiveEvent:!0,customParameters:{items:n,content_type:t,share_destination:i}})}}class et extends a{static{this.CURRENCY=h}constructor(t,i,n){super({eventName:"epigraph_checkout",interactiveEvent:!0,customParameters:{items:n,value:t,currency:i}})}}class it extends a{static{this.CURRENCY=h}constructor(t,i,n){super({eventName:"epigraph_conversion",interactiveEvent:!0,customParameters:{items:n,value:t,currency:i}})}}class nt extends a{constructor(t){super({eventName:"epigraph_changeRate",interactiveEvent:!1,customParameters:{value:t}})}}class st extends a{constructor(t){super({eventName:"epigraph_completionRate",interactiveEvent:!1,customParameters:{value:t}})}}class at extends a{constructor(t){super({eventName:"epigraph_engagementRate",interactiveEvent:!1,customParameters:{value:t}})}}class rt extends a{constructor(t,i,n){super({eventName:t,interactiveEvent:i,customParameters:n})}}/**
2
- * @license
3
- * Copyright (c) 2023 Epigraph LLC. All Rights Reserved.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the 'License');
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an 'AS IS' BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */var R;const l=Symbol("analyticsPluginsMap");R=l;class ot{constructor(t,i){this[R]=new Map,this.__consentPlugin=null,t&&i&&(this.__consentPlugin=this.buildConsentPlugin(t,i)),window.addEventListener("epigraphAnalyticsConsentChange",this.__onConsentChangeFromEvent)}__onConsentChangeFromEvent(t){let i=t;this.__overrideConsent=i.detail.hasConsent;for(const n of this[l].values())this.__hasConsent()||n.setStatus(c.RESTRICTED)}addEventPlugin(t){this[l].has(t.getUniquePluginIdentifier())||(this[l].set(t.getUniquePluginIdentifier(),t),t.setupPlugin())}__hasConsent(){let t=!0;return this.__overrideConsent!==void 0?(t=this.__overrideConsent,t):(this.__consentPlugin&&(t=this.__consentPlugin.hasConsent()),t)}sendEvent(t){this[l].forEach(i=>{i.sendEvent(t,this.__hasConsent())})}buildConsentPlugin(t,i){return t.toLowerCase()===m.OneTrust.toLowerCase()?new P(i):null}}exports.ACTION_PERFORMED=g;exports.BUTTON_TYPE=A;exports.CONTENT_TYPES=y;exports.CURRENCY=h;exports.ConsentPluginNames=m;exports.EpigraphAddToFavouritesEvent=J;exports.EpigraphAnalytics=ot;exports.EpigraphArRequestedEvent=b;exports.EpigraphButtonClickEvent=j;exports.EpigraphChangeRateEvent=nt;exports.EpigraphCheckoutEvent=et;exports.EpigraphCompletionRateEvent=st;exports.EpigraphContentSharedEvent=tt;exports.EpigraphConversionEvent=it;exports.EpigraphCustomEvent=rt;exports.EpigraphEngagementRateEvent=at;exports.EpigraphItemAddedEvent=Z;exports.EpigraphItemMovedEvent=B;exports.EpigraphItemRemovedEvent=Q;exports.EpigraphKeyboardInteractionEvent=K;exports.EpigraphModuleClosedEvent=F;exports.EpigraphModuleFailedEvent=$;exports.EpigraphModuleLoadingEvent=k;exports.EpigraphModuleReadyEvent=V;exports.EpigraphPanelClosedEvent=H;exports.EpigraphPanelOpenedEvent=W;exports.EpigraphSupportDetectedEvent=U;exports.EpigraphTouchInteractionEvent=X;exports.EpigraphVariantChangedEvent=Y;exports.GA4AnalyticsPlugin=M;exports.MODULE_FAILED_ERRORS=I;exports.NexusAnalyticsPlugin=q;exports.OneTrustConsentPlugin=P;exports.PANEL_TYPE=d;exports.SHARE_DESTINATIONS=C;exports.SUPPORT_TYPE=N;exports.TRIGGER_SOURCE=_;exports.VARIANT_CHANGE_TYPES=f;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../epigraphAnalytics-H3EZRDUh.cjs");exports.ACTION_PERFORMED=e.n,exports.BUTTON_TYPE=e.r,exports.CONTENT_TYPES=e.i,exports.CURRENCY=e.a,exports.ConsentPluginNames=e.F,exports.EpigraphAddToFavouritesEvent=e.o,exports.EpigraphAnalytics=e.t,exports.EpigraphArRequestedEvent=e.s,exports.EpigraphButtonClickEvent=e.c,exports.EpigraphChangeRateEvent=e.l,exports.EpigraphCheckoutEvent=e.u,exports.EpigraphCompletionRateEvent=e.d,exports.EpigraphContentSharedEvent=e.f,exports.EpigraphConversionEvent=e.p,exports.EpigraphCustomEvent=e.m,exports.EpigraphEngagementRateEvent=e.h,exports.EpigraphItemAddedEvent=e.g,exports.EpigraphItemMovedEvent=e._,exports.EpigraphItemRemovedEvent=e.v,exports.EpigraphKeyboardInteractionEvent=e.y,exports.EpigraphModuleClosedEvent=e.b,exports.EpigraphModuleFailedEvent=e.x,exports.EpigraphModuleLoadingEvent=e.S,exports.EpigraphModuleReadyEvent=e.C,exports.EpigraphPanelClosedEvent=e.w,exports.EpigraphPanelOpenedEvent=e.T,exports.EpigraphSupportDetectedEvent=e.E,exports.EpigraphTouchInteractionEvent=e.D,exports.EpigraphVariantChangedEvent=e.O,exports.GA4AnalyticsPlugin=e.R,exports.MODULE_FAILED_ERRORS=e.k,exports.NexusAnalyticsPlugin=e.L,exports.OneTrustConsentPlugin=e.I,exports.PANEL_TYPE=e.A,exports.SHARE_DESTINATIONS=e.j,exports.SUPPORT_TYPE=e.M,exports.TRIGGER_SOURCE=e.N,exports.VARIANT_CHANGE_TYPES=e.P;