@epigraph/epigraph-std-lib 4.7.1-alpha → 5.0.0-alpha
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/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs +2 -2
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js +169 -161
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalyticsEventLibrary.d.ts +19 -6
- package/dist/epigraph-std-lib.cjs +1 -1
- package/dist/epigraph-std-lib.js +58 -56
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var h=(i=>(i.UNAVAILABLE="unavailable",i.AVAILABLE="available",i.RESTRICTED="restricted",i))(h||{});const A=Symbol("data"),g=Symbol("next"),x=class S{constructor(t){this[A]=t,this[g]=null}get data(){return this[A]}set next(t){if(!(t instanceof S)&&t!==null)throw new Error("This node is not an instance of the custom class 'Node'.");this[g]=t}get next(){return this[g]}};let y=x;const v=Symbol("head");class T{constructor(){this[v]=null}set head(t){this[v]=t}get head(){return this[v]}addToTail(t){let e=this.head;if(e){for(;e.next!==null;)e=e?.next;return e.next=new y(t)}return this.head=new y(t)}removeHead(){const t=this.head;if(t)return this.head=t.next,t.data}}const C=Symbol("queue"),l=Symbol("size");class O{constructor(){this[C]=new T,this[l]=0}get queue(){return this[C]}get size(){return this[l]}enqueue(t){this.queue.addToTail(t),this[l]++}dequeue(){const t=this.queue.removeHead();return this[l]--,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,e,n,s,r,o){this._pluginName=t,this._trackingId=e,this._experienceId=n,this._solution=s,this._initializer=r,this._status=o}updateStatus(t){this._status=t}updateInitializer(t){this._initializer=t}notify(t,e){console.log("Notifying",t,e);const n={pluginName:this._pluginName,trackingId:this._trackingId,experienceId:this._experienceId,solution:this._solution,initializer:this._initializer,status:this._status,action:t,eventDetails:e};window.dispatchEvent(new CustomEvent("epg-notification",{detail:n}))}}class R{constructor({trackingID:t,experienceID:e,solution:n,verboseLogging:s=!1}){this.__status=h.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=e,this.solution=n,this.verboseLogging=s,this.__queue=new O,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,e){if(this.__queue.enqueue(t),!e){this.__status=h.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 e=this.detectAndSetupAnalytics();e.success?(this.__isInitialized=!0,this.__status=h.AVAILABLE,this.__initializationMethod=e.method,this.dataLayerName=e.dataLayerName,this.dataLayer=window[this.dataLayerName],this.logger(`Successfully initialized ${e.method} with dataLayer: ${this.dataLayerName}`),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{}),this.__queue.size>0&&this.dequeueAndSendEvents()):(this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${e.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 e=this.findGA4Info(this.trackingID);if(e){const n=e.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 e of Array.from(t)){const n=e.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 e=0;e<t;e++){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 e=t.getGTMParameters(this.solution,this.experienceID,this.trackingID);const n=e;this.isValidPayload(e)||(e=await this.convertGTMParametersToEpgEventTag(t.eventName,e)),this.dataLayer&&(this.dataLayer.push(e),this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n))}async sendGA4Event(t){let e=t.getGa4Parameters(this.solution,this.experienceID,this.trackingID);const n=e;this.isValidPayload(e)||(e=await this.convertGA4ParametersToEpgEventTag(e)),window.gtag("event",t.eventName,e),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,e){try{let n=await this.sendGA4LongParameters(e);return{event:t,epg_event_tag:n,send_to:this.trackingID}}catch{return e}}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 e="https://api.myepigraph.com/api/analytics/ga4/custom",n={parameters:t};try{const s=await fetch(e,{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,e){try{const n={plugin:"GA4",trackingId:this.trackingID,solution:this.solution,experienceId:this.experienceID,failureType:t,errorMessage:e,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 e=document.querySelectorAll("script[src]");for(const n of e){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 D{constructor({trackingID:t,experienceID:e,solution:n,sessionId:s,xPath:r,verboseLogging:o=!1,sendToStaging:L=!1}){this.__status=h.UNAVAILABLE,this.__sentEventCount=0,this.sessionId=s,this.xPath=r,this.name=this.pluginName="NEXUS-PLUGIN",this.trackingID=t,this.experienceID=e,this.solution=n,this.verboseLogging=o,this.__queue=new O,this.url=L?"https://nexus.epigraph.dev/api/analytics/event":"https://api.myepigraph.com/api/analytics/event",this.__status=h.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,e){if(this.__queue.enqueue(t),!e){this.__status=h.RESTRICTED,this.__epigraphNotifier.updateStatus(this.__status);return}await this.dequeueAndSendEvents()}async dequeueAndSendEvents(){for(let t=0;t<this.__queue.size;t++){const e=this.__queue.dequeue(),n={send_to:this.trackingID,experience_id:this.experienceID,solution:this.solution,event:e.eventName,parameters:e.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 w{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 E=(i=>(i.OneTrust="onetrust",i))(E||{});class a{constructor({eventName:t,interactiveEvent:e,customParameters:n}){this.eventName=t,this.interactiveEvent=e,this.customParameters=n}getGa4Parameters(t,e,n){let s={solution:t,experience_id:e,interactive_event:this.interactiveEvent,send_to:n};return s=Object.assign(s,JSON.parse(JSON.stringify(this.customParameters))),s}getGTMParameters(t,e,n){let s={solution:t,experience_id:e,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 d=(i=>(i.AR="ar",i.QR="qr",i.INFO="info",i.DOWNLOAD="download",i.PREVIEW_CART="preview_cart",i.HOTSPOT_PANEL="hotspot_panel",i.SHARE_MODAL="share_modal",i.RESTART_MODAL="restart_modal",i.REMOVE_MODAL="remove_modal",i.LOAD_PRECONFIG_MODAL="load_preconfig_modal",i.MOVE_MODAL="move_modal",i.OUT_OF_STOCK_MODAL="out_of_stock_modal",i))(d||{}),_=(i=>(i.AUTO="auto",i.BUTTON="button",i.HOTSPOT="hotspot",i.GESTURE="gesture",i))(_||{}),c=(i=>(i.USD="USD",i.EUR="EUR",i.GBP="GBP",i.CAD="CAD",i))(c||{}),m=(i=>(i.AR="ar",i.QR="qr",i.WEBGL2="webgl2",i))(m||{}),f=(i=>(i.AR_VIEW="ar_view",i.DIMENSION_SHOW="dimension_show",i.DIMENSION_HIDE="dimension_hide",i.HOTSPOTS_SHOW="hotspots_show",i.HOTSPOTS_HIDE="hotspots_hide",i.HELP_SHOW="help_show",i.HELP_HIDE="help_hide",i.HOTSPOT_ENTER="hotspot_enter",i.HOTSPOT_EXIT="hotspot_exit",i.SHARE="share",i.PDF_DOWNLOAD="pdf_download",i.COPY="copy",i.RESTART="restart",i.INSTRUCTIONS_SHOW="show_instructions",i.REVIEW_CART="review_cart",i.SHOP_NOW="shop_now",i.SUB_CATEGORY="sub_category",i.NEXT_STEP="next_step",i.PREVIOUS_STEP="previous_step",i))(f||{}),I=(i=>(i.ZOOM="zoom",i.ROTATE="rotate",i))(I||{}),N=(i=>(i.ROTATE="rotate",i.ZOOM="zoom",i.PAN="pan",i))(N||{});class z extends a{constructor(t){super({eventName:"epigraph_ar_requested",interactiveEvent:!0,customParameters:{items:t}})}}class M extends a{constructor(t){super({eventName:"epigraph_module_loading",interactiveEvent:!1,customParameters:{is_pre_config:t}})}}class q extends a{constructor(t,e){super({eventName:"epigraph_module_ready",interactiveEvent:!1,customParameters:{is_pre_config:t,load_time_ms:e}})}}class G extends a{constructor(t,e,n){super({eventName:"epigraph_module_failed",interactiveEvent:!1,customParameters:{is_pre_config:t,load_time_ms:e,error_type:n}})}}class b extends a{constructor(t){super({eventName:"epigraph_module_closed",interactiveEvent:!0,customParameters:{items:t}})}}class k extends a{static{this.SUPPORT_TYPE=m}constructor(t,e={}){super({eventName:"epigraph_support_detected",interactiveEvent:!1,customParameters:{support_type:t,device_capabilities:e}})}}class V extends a{static{this.BUTTON_TYPE=f}constructor(t,e){super({eventName:"epigraph_button_click",interactiveEvent:!0,customParameters:{button_type:t,button_name:e}})}}class $ extends a{static{this.PANEL_TYPE=d}static{this.TRIGGER_SOURCE=_}constructor(t,e,n,s){super({eventName:"epigraph_panel_opened",interactiveEvent:t,customParameters:{items:s,panel_type:e,trigger_source:n}})}}class F extends a{static{this.PANEL_TYPE=d}static{this.TRIGGER_SOURCE=_}constructor(t,e,n,s){super({eventName:"epigraph_panel_closed",interactiveEvent:t,customParameters:{items:s,panel_type:e,trigger_source:n}})}}class H extends a{constructor(t){super({eventName:"epigraph_add_to_favourites",interactiveEvent:!0,customParameters:{items:t}})}}class j extends a{static{this.ACTION_PERFORMED=I}constructor(t){super({eventName:"epigraph_keyboard_interaction",interactiveEvent:!0,customParameters:{action_performed:t}})}}class W extends a{static{this.INTERACTION_TYPE=N}constructor(t){super({eventName:"epigraph_touch_interaction",interactiveEvent:!0,customParameters:{interaction_type:t}})}}class U extends a{static{this.CURRENCY=c}constructor(t,e,n,s,r){super({eventName:"epigraph_item_added",interactiveEvent:t,customParameters:{items:r,value:e,currency:n,quantity:s}})}}class J extends a{constructor(t){super({eventName:"epigraph_item_moved",interactiveEvent:!0,customParameters:{items:t}})}}class Z extends a{static{this.CURRENCY=c}constructor(t,e,n,s){super({eventName:"epigraph_item_removed",interactiveEvent:!0,customParameters:{items:s,value:t,currency:e,quantity:n}})}}class X extends a{constructor(t,e){super({eventName:"epigraph_variant_changed",interactiveEvent:!0,customParameters:{items:e,change_type:t}})}}class K extends a{constructor(t,e,n){super({eventName:"epigraph_content_shared",interactiveEvent:!0,customParameters:{items:n,content_type:t,share_destination:e}})}}class Q extends a{static{this.CURRENCY=c}constructor(t,e,n){super({eventName:"epigraph_checkout",interactiveEvent:!0,customParameters:{items:n,value:t,currency:e}})}}class B extends a{static{this.CURRENCY=c}constructor(t,e,n){super({eventName:"epigraph_conversion",interactiveEvent:!0,customParameters:{items:n,value:t,currency:e}})}}class Y extends a{constructor(t){super({eventName:"epigraph_changeRate",interactiveEvent:!1,customParameters:{value:t}})}}class tt extends a{constructor(t){super({eventName:"epigraph_completionRate",interactiveEvent:!1,customParameters:{value:t}})}}class et extends a{constructor(t){super({eventName:"epigraph_engagementRate",interactiveEvent:!1,customParameters:{value:t}})}}class it extends a{constructor(t,e,n){super({eventName:t,interactiveEvent:e,customParameters:n})}}/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var h=(e=>(e.UNAVAILABLE="unavailable",e.AVAILABLE="available",e.RESTRICTED="restricted",e))(h||{});const C=Symbol("data"),g=Symbol("next"),R=class P{constructor(t){this[C]=t,this[g]=null}get data(){return this[C]}set next(t){if(!(t instanceof P)&&t!==null)throw new Error("This node is not an instance of the custom class 'Node'.");this[g]=t}get next(){return this[g]}};let O=R;const v=Symbol("head");class D{constructor(){this[v]=null}set head(t){this[v]=t}get head(){return this[v]}addToTail(t){let i=this.head;if(i){for(;i.next!==null;)i=i?.next;return i.next=new O(t)}return this.head=new O(t)}removeHead(){const t=this.head;if(t)return this.head=t.next,t.data}}const S=Symbol("queue"),l=Symbol("size");class T{constructor(){this[S]=new D,this[l]=0}get queue(){return this[S]}get size(){return this[l]}enqueue(t){this.queue.addToTail(t),this[l]++}dequeue(){const t=this.queue.removeHead();return this[l]--,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){console.log("Notifying",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 z{constructor({trackingID:t,experienceID:i,solution:n,verboseLogging:s=!1}){this.__status=h.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 T,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=h.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=h.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 G{constructor({trackingID:t,experienceID:i,solution:n,sessionId:s,xPath:r,verboseLogging:o=!1,sendToStaging:x=!1}){this.__status=h.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 T,this.url=x?"https://nexus.epigraph.dev/api/analytics/event":"https://api.myepigraph.com/api/analytics/event",this.__status=h.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=h.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 w{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 E=(e=>(e.OneTrust="onetrust",e))(E||{});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 d=(e=>(e.AR="ar",e.QR="qr",e.INFO="info",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||{}),_=(e=>(e.AUTO="auto",e.BUTTON="button",e.HOTSPOT="hotspot",e.GESTURE="gesture",e))(_||{}),c=(e=>(e.USD="USD",e.EUR="EUR",e.GBP="GBP",e.CAD="CAD",e))(c||{}),m=(e=>(e.AR="ar",e.QR="qr",e.WEBGL2="webgl2",e))(m||{}),f=(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))(f||{}),I=(e=>(e.ZOOM="zoom",e.ROTATE="rotate",e))(I||{}),N=(e=>(e.ROTATE="rotate",e.ZOOM="zoom",e.PAN="pan",e))(N||{}),y=(e=>(e.CONFIGURATION="configuration",e.SCENE="scene",e.PRODUCT="product",e))(y||{}),A=(e=>(e.FACEBOOK="facebook",e.TWITTER="twitter",e.EMAIL="email",e.COPY_LINK="copy_link",e.WHATSAPP="whatsapp",e.LINKEDIN="linkedin",e))(A||{});class M extends a{constructor(t){super({eventName:"epigraph_ar_requested",interactiveEvent:!0,customParameters:{items:t}})}}class q extends a{constructor(t){super({eventName:"epigraph_module_loading",interactiveEvent:!1,customParameters:{is_pre_config:t}})}}class b extends a{constructor(t,i){super({eventName:"epigraph_module_ready",interactiveEvent:!1,customParameters:{is_pre_config:t,load_time_ms:i}})}}class k extends a{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 V extends a{static{this.SUPPORT_TYPE=m}constructor(t,i={}){super({eventName:"epigraph_support_detected",interactiveEvent:!1,customParameters:{support_type:t,device_capabilities:i}})}}class $ extends a{static{this.BUTTON_TYPE=f}constructor(t,i){super({eventName:"epigraph_button_click",interactiveEvent:!0,customParameters:{button_type:t,button_name:i}})}}class U 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 j 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 H extends a{constructor(t){super({eventName:"epigraph_add_to_favourites",interactiveEvent:!0,customParameters:{items:t}})}}class W extends a{static{this.ACTION_PERFORMED=I}constructor(t){super({eventName:"epigraph_keyboard_interaction",interactiveEvent:!0,customParameters:{action_performed:t}})}}class J extends a{static{this.INTERACTION_TYPE=N}constructor(t){super({eventName:"epigraph_touch_interaction",interactiveEvent:!0,customParameters:{interaction_type:t}})}}class K extends a{static{this.CURRENCY=c}constructor(t,i,n,s,r){super({eventName:"epigraph_item_added",interactiveEvent:t,customParameters:{items:r,value:i,currency:n,quantity:s}})}}class Z extends a{constructor(t){super({eventName:"epigraph_item_moved",interactiveEvent:!0,customParameters:{items:t}})}}class X extends a{static{this.CURRENCY=c}constructor(t,i,n,s){super({eventName:"epigraph_item_removed",interactiveEvent:!0,customParameters:{items:s,value:t,currency:i,quantity:n}})}}class B extends a{constructor(t,i){super({eventName:"epigraph_variant_changed",interactiveEvent:!0,customParameters:{items:i,change_type:t}})}}class Q extends a{static{this.CONTENT_TYPES=y}static{this.SHARE_DESTINATIONS=A}constructor(t,i,n){super({eventName:"epigraph_content_shared",interactiveEvent:!0,customParameters:{items:n,content_type:t,share_destination:i}})}}class Y extends a{static{this.CURRENCY=c}constructor(t,i,n){super({eventName:"epigraph_checkout",interactiveEvent:!0,customParameters:{items:n,value:t,currency:i}})}}class tt extends a{static{this.CURRENCY=c}constructor(t,i,n){super({eventName:"epigraph_conversion",interactiveEvent:!0,customParameters:{items:n,value:t,currency:i}})}}class et extends a{constructor(t){super({eventName:"epigraph_changeRate",interactiveEvent:!1,customParameters:{value:t}})}}class it extends a{constructor(t){super({eventName:"epigraph_completionRate",interactiveEvent:!1,customParameters:{value:t}})}}class nt extends a{constructor(t){super({eventName:"epigraph_engagementRate",interactiveEvent:!1,customParameters:{value:t}})}}class st extends a{constructor(t,i,n){super({eventName:t,interactiveEvent:i,customParameters:n})}}/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright (c) 2023 Epigraph LLC. All Rights Reserved.
|
|
4
4
|
*
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
|
-
*/var
|
|
16
|
+
*/var L;const p=Symbol("analyticsPluginsMap");L=p;class at{constructor(t,i){this[L]=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[p].values())this.__hasConsent()||n.setStatus(h.RESTRICTED)}addEventPlugin(t){this[p].has(t.getUniquePluginIdentifier())||(this[p].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[p].forEach(i=>{i.sendEvent(t,this.__hasConsent())})}buildConsentPlugin(t,i){return t.toLowerCase()===E.OneTrust.toLowerCase()?new w(i):null}}exports.ACTION_PERFORMED=I;exports.BUTTON_TYPE=f;exports.CONTENT_TYPES=y;exports.CURRENCY=c;exports.ConsentPluginNames=E;exports.EpigraphAddToFavouritesEvent=H;exports.EpigraphAnalytics=at;exports.EpigraphArRequestedEvent=M;exports.EpigraphButtonClickEvent=$;exports.EpigraphChangeRateEvent=et;exports.EpigraphCheckoutEvent=Y;exports.EpigraphCompletionRateEvent=it;exports.EpigraphContentSharedEvent=Q;exports.EpigraphConversionEvent=tt;exports.EpigraphCustomEvent=st;exports.EpigraphEngagementRateEvent=nt;exports.EpigraphItemAddedEvent=K;exports.EpigraphItemMovedEvent=Z;exports.EpigraphItemRemovedEvent=X;exports.EpigraphKeyboardInteractionEvent=W;exports.EpigraphModuleClosedEvent=F;exports.EpigraphModuleFailedEvent=k;exports.EpigraphModuleLoadingEvent=q;exports.EpigraphModuleReadyEvent=b;exports.EpigraphPanelClosedEvent=j;exports.EpigraphPanelOpenedEvent=U;exports.EpigraphSupportDetectedEvent=V;exports.EpigraphTouchInteractionEvent=J;exports.EpigraphVariantChangedEvent=B;exports.GA4AnalyticsPlugin=z;exports.INTERACTION_TYPE=N;exports.NexusAnalyticsPlugin=G;exports.OneTrustConsentPlugin=w;exports.PANEL_TYPE=d;exports.SHARE_DESTINATIONS=A;exports.SUPPORT_TYPE=m;exports.TRIGGER_SOURCE=_;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var c = /* @__PURE__ */ ((
|
|
2
|
-
const m = Symbol("data"),
|
|
1
|
+
var c = /* @__PURE__ */ ((e) => (e.UNAVAILABLE = "unavailable", e.AVAILABLE = "available", e.RESTRICTED = "restricted", e))(c || {});
|
|
2
|
+
const m = Symbol("data"), p = Symbol("next"), D = class I {
|
|
3
3
|
constructor(t) {
|
|
4
|
-
this[m] = t, this[
|
|
4
|
+
this[m] = t, this[p] = null;
|
|
5
5
|
}
|
|
6
6
|
get data() {
|
|
7
7
|
return this[m];
|
|
@@ -11,30 +11,30 @@ const m = Symbol("data"), _ = Symbol("next"), L = class I {
|
|
|
11
11
|
throw new Error(
|
|
12
12
|
"This node is not an instance of the custom class 'Node'."
|
|
13
13
|
);
|
|
14
|
-
this[
|
|
14
|
+
this[p] = t;
|
|
15
15
|
}
|
|
16
16
|
get next() {
|
|
17
|
-
return this[
|
|
17
|
+
return this[p];
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
let E =
|
|
21
|
-
const
|
|
22
|
-
class
|
|
20
|
+
let E = D;
|
|
21
|
+
const _ = Symbol("head");
|
|
22
|
+
class T {
|
|
23
23
|
constructor() {
|
|
24
|
-
this[
|
|
24
|
+
this[_] = null;
|
|
25
25
|
}
|
|
26
26
|
set head(t) {
|
|
27
|
-
this[
|
|
27
|
+
this[_] = t;
|
|
28
28
|
}
|
|
29
29
|
get head() {
|
|
30
|
-
return this[
|
|
30
|
+
return this[_];
|
|
31
31
|
}
|
|
32
32
|
addToTail(t) {
|
|
33
|
-
let
|
|
34
|
-
if (
|
|
35
|
-
for (;
|
|
36
|
-
|
|
37
|
-
return
|
|
33
|
+
let i = this.head;
|
|
34
|
+
if (i) {
|
|
35
|
+
for (; i.next !== null; )
|
|
36
|
+
i = i?.next;
|
|
37
|
+
return i.next = new E(t);
|
|
38
38
|
}
|
|
39
39
|
return this.head = new E(t);
|
|
40
40
|
}
|
|
@@ -45,9 +45,9 @@ class D {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
const f = Symbol("queue"), d = Symbol("size");
|
|
48
|
-
class
|
|
48
|
+
class y {
|
|
49
49
|
constructor() {
|
|
50
|
-
this[f] = new
|
|
50
|
+
this[f] = new T(), this[d] = 0;
|
|
51
51
|
}
|
|
52
52
|
get queue() {
|
|
53
53
|
return this[f];
|
|
@@ -76,8 +76,8 @@ class u {
|
|
|
76
76
|
static {
|
|
77
77
|
this.ACTION_FAILED_INITIALIZATION = "initialization-failed";
|
|
78
78
|
}
|
|
79
|
-
constructor(t,
|
|
80
|
-
this._pluginName = t, this._trackingId =
|
|
79
|
+
constructor(t, i, s, n, r, o) {
|
|
80
|
+
this._pluginName = t, this._trackingId = i, this._experienceId = s, this._solution = n, this._initializer = r, this._status = o;
|
|
81
81
|
}
|
|
82
82
|
updateStatus(t) {
|
|
83
83
|
this._status = t;
|
|
@@ -85,8 +85,8 @@ class u {
|
|
|
85
85
|
updateInitializer(t) {
|
|
86
86
|
this._initializer = t;
|
|
87
87
|
}
|
|
88
|
-
notify(t,
|
|
89
|
-
console.log("Notifying", t,
|
|
88
|
+
notify(t, i) {
|
|
89
|
+
console.log("Notifying", t, i);
|
|
90
90
|
const s = {
|
|
91
91
|
pluginName: this._pluginName,
|
|
92
92
|
trackingId: this._trackingId,
|
|
@@ -95,19 +95,19 @@ class u {
|
|
|
95
95
|
initializer: this._initializer,
|
|
96
96
|
status: this._status,
|
|
97
97
|
action: t,
|
|
98
|
-
eventDetails:
|
|
98
|
+
eventDetails: i
|
|
99
99
|
};
|
|
100
100
|
window.dispatchEvent(new CustomEvent("epg-notification", { detail: s }));
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
class
|
|
103
|
+
class G {
|
|
104
104
|
constructor({
|
|
105
105
|
trackingID: t,
|
|
106
|
-
experienceID:
|
|
106
|
+
experienceID: i,
|
|
107
107
|
solution: s,
|
|
108
108
|
verboseLogging: n = !1
|
|
109
109
|
}) {
|
|
110
|
-
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 =
|
|
110
|
+
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 = s, this.verboseLogging = n, this.__queue = new y(), this.__epigraphNotifier = new u(
|
|
111
111
|
this.pluginName,
|
|
112
112
|
this.pluginName,
|
|
113
113
|
this.experienceID,
|
|
@@ -146,8 +146,8 @@ class z {
|
|
|
146
146
|
* @param analyticsEvent
|
|
147
147
|
* @param consent boolean Whether consent is granted
|
|
148
148
|
*/
|
|
149
|
-
async sendEvent(t,
|
|
150
|
-
if (this.__queue.enqueue(t), !
|
|
149
|
+
async sendEvent(t, i) {
|
|
150
|
+
if (this.__queue.enqueue(t), !i) {
|
|
151
151
|
this.__status = c.RESTRICTED;
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
@@ -172,8 +172,8 @@ class z {
|
|
|
172
172
|
if (this.__initializationAttempts > 0 && t - this.__lastInitializationAttempt < this.__initializationRetryDelay)
|
|
173
173
|
return;
|
|
174
174
|
this.__lastInitializationAttempt = t, this.__initializationAttempts++;
|
|
175
|
-
const
|
|
176
|
-
|
|
175
|
+
const i = this.detectAndSetupAnalytics();
|
|
176
|
+
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(() => {
|
|
177
177
|
this.initializePlugin();
|
|
178
178
|
}, this.__initializationRetryDelay));
|
|
179
179
|
}
|
|
@@ -185,9 +185,9 @@ class z {
|
|
|
185
185
|
method: "GTM",
|
|
186
186
|
dataLayerName: t.dataLayerName
|
|
187
187
|
};
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
190
|
-
const s =
|
|
188
|
+
const i = this.findGA4Info(this.trackingID);
|
|
189
|
+
if (i) {
|
|
190
|
+
const s = i.l || "dataLayer";
|
|
191
191
|
return this.logger(`GA4 script found, setting up with dataLayer: ${s}`), this.__epigraphNotifier.updateInitializer("GA4"), {
|
|
192
192
|
success: !0,
|
|
193
193
|
method: "GA4",
|
|
@@ -203,8 +203,8 @@ class z {
|
|
|
203
203
|
}
|
|
204
204
|
detectGTM() {
|
|
205
205
|
const t = document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');
|
|
206
|
-
for (const
|
|
207
|
-
const s =
|
|
206
|
+
for (const i of Array.from(t)) {
|
|
207
|
+
const s = i.getAttribute("src");
|
|
208
208
|
if (s) {
|
|
209
209
|
const n = s.match(/gtm\.js\?id=([^&]+)/);
|
|
210
210
|
if (n && n.length > 0) {
|
|
@@ -226,7 +226,7 @@ class z {
|
|
|
226
226
|
if (!this.__isInitialized || !this.dataLayer)
|
|
227
227
|
return;
|
|
228
228
|
let t = this.__queue.size;
|
|
229
|
-
for (let
|
|
229
|
+
for (let i = 0; i < t; i++) {
|
|
230
230
|
const s = this.__queue.dequeue();
|
|
231
231
|
try {
|
|
232
232
|
this.__initializationMethod === "GTM" ? (this.sendGTMEvent(s), this.__sentEventCount++, this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${s.eventName}`)) : this.__initializationMethod === "GA4" ? (this.sendGA4Event(s), this.__sentEventCount++, this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${s.eventName}`)) : this.__queue.enqueue(s);
|
|
@@ -241,9 +241,9 @@ class z {
|
|
|
241
241
|
* @private
|
|
242
242
|
*/
|
|
243
243
|
async sendGTMEvent(t) {
|
|
244
|
-
let
|
|
245
|
-
const s =
|
|
246
|
-
this.isValidPayload(
|
|
244
|
+
let i = t.getGTMParameters(this.solution, this.experienceID, this.trackingID);
|
|
245
|
+
const s = i;
|
|
246
|
+
this.isValidPayload(i) || (i = await this.convertGTMParametersToEpgEventTag(t.eventName, i)), this.dataLayer && (this.dataLayer.push(i), this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, s));
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
249
|
* Send events to GA4 via Google Analytics 4.
|
|
@@ -251,9 +251,9 @@ class z {
|
|
|
251
251
|
* @private
|
|
252
252
|
*/
|
|
253
253
|
async sendGA4Event(t) {
|
|
254
|
-
let
|
|
255
|
-
const s =
|
|
256
|
-
this.isValidPayload(
|
|
254
|
+
let i = t.getGa4Parameters(this.solution, this.experienceID, this.trackingID);
|
|
255
|
+
const s = i;
|
|
256
|
+
this.isValidPayload(i) || (i = await this.convertGA4ParametersToEpgEventTag(i)), window.gtag("event", t.eventName, i), this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, s);
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
259
259
|
* Validates a payload by checking its parameter count and the constraints of parameter names and values.
|
|
@@ -279,16 +279,16 @@ class z {
|
|
|
279
279
|
* @param {Record<string, unknown>} parameterPayload - A key-value pair object containing the parameters to be converted.
|
|
280
280
|
* @return {Promise<Record<string, unknown>>} A promise that resolves to an object containing the event name and the generated EPG event tag, or the original payload upon failure.
|
|
281
281
|
*/
|
|
282
|
-
async convertGTMParametersToEpgEventTag(t,
|
|
282
|
+
async convertGTMParametersToEpgEventTag(t, i) {
|
|
283
283
|
try {
|
|
284
|
-
let s = await this.sendGA4LongParameters(
|
|
284
|
+
let s = await this.sendGA4LongParameters(i);
|
|
285
285
|
return {
|
|
286
286
|
event: t,
|
|
287
287
|
epg_event_tag: s,
|
|
288
288
|
send_to: this.trackingID
|
|
289
289
|
};
|
|
290
290
|
} catch {
|
|
291
|
-
return
|
|
291
|
+
return i;
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
/**
|
|
@@ -315,9 +315,9 @@ class z {
|
|
|
315
315
|
this.verboseLogging && console.warn(t);
|
|
316
316
|
}
|
|
317
317
|
async sendGA4LongParameters(t) {
|
|
318
|
-
const
|
|
318
|
+
const i = "https://api.myepigraph.com/api/analytics/ga4/custom", s = { parameters: t };
|
|
319
319
|
try {
|
|
320
|
-
const n = await fetch(
|
|
320
|
+
const n = await fetch(i, {
|
|
321
321
|
method: "POST",
|
|
322
322
|
// Assuming it's a POST request, adjust if necessary
|
|
323
323
|
headers: {
|
|
@@ -331,7 +331,7 @@ class z {
|
|
|
331
331
|
return "";
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
async reportFailureToNexus(t,
|
|
334
|
+
async reportFailureToNexus(t, i) {
|
|
335
335
|
try {
|
|
336
336
|
const s = {
|
|
337
337
|
plugin: "GA4",
|
|
@@ -339,7 +339,7 @@ class z {
|
|
|
339
339
|
solution: this.solution,
|
|
340
340
|
experienceId: this.experienceID,
|
|
341
341
|
failureType: t,
|
|
342
|
-
errorMessage:
|
|
342
|
+
errorMessage: i,
|
|
343
343
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
344
344
|
url: window.location.href,
|
|
345
345
|
userAgent: navigator.userAgent
|
|
@@ -359,8 +359,8 @@ class z {
|
|
|
359
359
|
l: s.dataLayerName
|
|
360
360
|
};
|
|
361
361
|
}
|
|
362
|
-
const
|
|
363
|
-
for (const s of
|
|
362
|
+
const i = document.querySelectorAll("script[src]");
|
|
363
|
+
for (const s of i) {
|
|
364
364
|
const n = s.getAttribute("src");
|
|
365
365
|
if (n && n.includes(t)) {
|
|
366
366
|
const r = new URL(n, location.href), o = Object.fromEntries(r.searchParams.entries());
|
|
@@ -374,17 +374,17 @@ class z {
|
|
|
374
374
|
return null;
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
class
|
|
377
|
+
class R {
|
|
378
378
|
constructor({
|
|
379
379
|
trackingID: t,
|
|
380
|
-
experienceID:
|
|
380
|
+
experienceID: i,
|
|
381
381
|
solution: s,
|
|
382
382
|
sessionId: n,
|
|
383
383
|
xPath: r,
|
|
384
384
|
verboseLogging: o = !1,
|
|
385
|
-
sendToStaging:
|
|
385
|
+
sendToStaging: P = !1
|
|
386
386
|
}) {
|
|
387
|
-
this.__status = c.UNAVAILABLE, this.__sentEventCount = 0, this.sessionId = n, this.xPath = r, this.name = this.pluginName = "NEXUS-PLUGIN", this.trackingID = t, this.experienceID =
|
|
387
|
+
this.__status = c.UNAVAILABLE, this.__sentEventCount = 0, this.sessionId = n, this.xPath = r, this.name = this.pluginName = "NEXUS-PLUGIN", this.trackingID = t, this.experienceID = i, this.solution = s, this.verboseLogging = o, this.__queue = new y(), this.url = P ? "https://nexus.epigraph.dev/api/analytics/event" : "https://api.myepigraph.com/api/analytics/event", this.__status = c.AVAILABLE, this.__epigraphNotifier = new u(
|
|
388
388
|
this.pluginName,
|
|
389
389
|
this.trackingID,
|
|
390
390
|
this.experienceID,
|
|
@@ -413,8 +413,8 @@ class T {
|
|
|
413
413
|
}
|
|
414
414
|
setupPlugin() {
|
|
415
415
|
}
|
|
416
|
-
async sendEvent(t,
|
|
417
|
-
if (this.__queue.enqueue(t), !
|
|
416
|
+
async sendEvent(t, i) {
|
|
417
|
+
if (this.__queue.enqueue(t), !i) {
|
|
418
418
|
this.__status = c.RESTRICTED, this.__epigraphNotifier.updateStatus(this.__status);
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
@@ -422,12 +422,12 @@ class T {
|
|
|
422
422
|
}
|
|
423
423
|
async dequeueAndSendEvents() {
|
|
424
424
|
for (let t = 0; t < this.__queue.size; t++) {
|
|
425
|
-
const
|
|
425
|
+
const i = this.__queue.dequeue(), s = {
|
|
426
426
|
send_to: this.trackingID,
|
|
427
427
|
experience_id: this.experienceID,
|
|
428
428
|
solution: this.solution,
|
|
429
|
-
event:
|
|
430
|
-
parameters:
|
|
429
|
+
event: i.eventName,
|
|
430
|
+
parameters: i.getNexusParameters()
|
|
431
431
|
};
|
|
432
432
|
try {
|
|
433
433
|
return (await fetch(this.url, {
|
|
@@ -450,7 +450,7 @@ class T {
|
|
|
450
450
|
return "";
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
class
|
|
453
|
+
class z {
|
|
454
454
|
constructor(t) {
|
|
455
455
|
this.consentSet = !1, this.consent = !1, this.pluginName = "OneTrustConsentPlugin", this.consentIdentifier = t, this.consent = !1, this.addConsentChangedListener();
|
|
456
456
|
}
|
|
@@ -476,28 +476,28 @@ class P {
|
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
var
|
|
479
|
+
var N = /* @__PURE__ */ ((e) => (e.OneTrust = "onetrust", e))(N || {});
|
|
480
480
|
class a {
|
|
481
481
|
constructor({
|
|
482
482
|
eventName: t,
|
|
483
|
-
interactiveEvent:
|
|
483
|
+
interactiveEvent: i,
|
|
484
484
|
customParameters: s
|
|
485
485
|
}) {
|
|
486
|
-
this.eventName = t, this.interactiveEvent =
|
|
486
|
+
this.eventName = t, this.interactiveEvent = i, this.customParameters = s;
|
|
487
487
|
}
|
|
488
|
-
getGa4Parameters(t,
|
|
488
|
+
getGa4Parameters(t, i, s) {
|
|
489
489
|
let n = {
|
|
490
490
|
solution: t,
|
|
491
|
-
experience_id:
|
|
491
|
+
experience_id: i,
|
|
492
492
|
interactive_event: this.interactiveEvent,
|
|
493
493
|
send_to: s
|
|
494
494
|
};
|
|
495
495
|
return n = Object.assign(n, JSON.parse(JSON.stringify(this.customParameters))), n;
|
|
496
496
|
}
|
|
497
|
-
getGTMParameters(t,
|
|
497
|
+
getGTMParameters(t, i, s) {
|
|
498
498
|
let n = {
|
|
499
499
|
solution: t,
|
|
500
|
-
experience_id:
|
|
500
|
+
experience_id: i,
|
|
501
501
|
event: this.eventName,
|
|
502
502
|
interactive_event: this.interactiveEvent,
|
|
503
503
|
send_to: s
|
|
@@ -511,8 +511,8 @@ class a {
|
|
|
511
511
|
return t = Object.assign(t, JSON.parse(JSON.stringify(this.customParameters))), t;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
var g = /* @__PURE__ */ ((
|
|
515
|
-
class
|
|
514
|
+
var g = /* @__PURE__ */ ((e) => (e.AR = "ar", e.QR = "qr", e.INFO = "info", 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))(g || {}), v = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.BUTTON = "button", e.HOTSPOT = "hotspot", e.GESTURE = "gesture", e))(v || {}), l = /* @__PURE__ */ ((e) => (e.USD = "USD", e.EUR = "EUR", e.GBP = "GBP", e.CAD = "CAD", e))(l || {}), A = /* @__PURE__ */ ((e) => (e.AR = "ar", e.QR = "qr", e.WEBGL2 = "webgl2", e))(A || {}), C = /* @__PURE__ */ ((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))(C || {}), O = /* @__PURE__ */ ((e) => (e.ZOOM = "zoom", e.ROTATE = "rotate", e))(O || {}), S = /* @__PURE__ */ ((e) => (e.ROTATE = "rotate", e.ZOOM = "zoom", e.PAN = "pan", e))(S || {}), w = /* @__PURE__ */ ((e) => (e.CONFIGURATION = "configuration", e.SCENE = "scene", e.PRODUCT = "product", e))(w || {}), L = /* @__PURE__ */ ((e) => (e.FACEBOOK = "facebook", e.TWITTER = "twitter", e.EMAIL = "email", e.COPY_LINK = "copy_link", e.WHATSAPP = "whatsapp", e.LINKEDIN = "linkedin", e))(L || {});
|
|
515
|
+
class M extends a {
|
|
516
516
|
constructor(t) {
|
|
517
517
|
super({
|
|
518
518
|
eventName: "epigraph_ar_requested",
|
|
@@ -534,32 +534,32 @@ class q extends a {
|
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
class
|
|
538
|
-
constructor(t,
|
|
537
|
+
class b extends a {
|
|
538
|
+
constructor(t, i) {
|
|
539
539
|
super({
|
|
540
540
|
eventName: "epigraph_module_ready",
|
|
541
541
|
interactiveEvent: !1,
|
|
542
542
|
customParameters: {
|
|
543
543
|
is_pre_config: t,
|
|
544
|
-
load_time_ms:
|
|
544
|
+
load_time_ms: i
|
|
545
545
|
}
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
class
|
|
550
|
-
constructor(t,
|
|
549
|
+
class k extends a {
|
|
550
|
+
constructor(t, i, s) {
|
|
551
551
|
super({
|
|
552
552
|
eventName: "epigraph_module_failed",
|
|
553
553
|
interactiveEvent: !1,
|
|
554
554
|
customParameters: {
|
|
555
555
|
is_pre_config: t,
|
|
556
|
-
load_time_ms:
|
|
556
|
+
load_time_ms: i,
|
|
557
557
|
error_type: s
|
|
558
558
|
}
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
|
-
class
|
|
562
|
+
class V extends a {
|
|
563
563
|
constructor(t) {
|
|
564
564
|
super({
|
|
565
565
|
eventName: "epigraph_module_closed",
|
|
@@ -570,75 +570,75 @@ class b extends a {
|
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
class
|
|
573
|
+
class $ extends a {
|
|
574
574
|
static {
|
|
575
575
|
this.SUPPORT_TYPE = A;
|
|
576
576
|
}
|
|
577
|
-
constructor(t,
|
|
577
|
+
constructor(t, i = {}) {
|
|
578
578
|
super({
|
|
579
579
|
eventName: "epigraph_support_detected",
|
|
580
580
|
interactiveEvent: !1,
|
|
581
581
|
customParameters: {
|
|
582
582
|
support_type: t,
|
|
583
|
-
device_capabilities:
|
|
583
|
+
device_capabilities: i
|
|
584
584
|
}
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
class
|
|
588
|
+
class F extends a {
|
|
589
589
|
static {
|
|
590
|
-
this.BUTTON_TYPE =
|
|
590
|
+
this.BUTTON_TYPE = C;
|
|
591
591
|
}
|
|
592
|
-
constructor(t,
|
|
592
|
+
constructor(t, i) {
|
|
593
593
|
super({
|
|
594
594
|
eventName: "epigraph_button_click",
|
|
595
595
|
interactiveEvent: !0,
|
|
596
596
|
customParameters: {
|
|
597
597
|
button_type: t,
|
|
598
|
-
button_name:
|
|
598
|
+
button_name: i
|
|
599
599
|
}
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
-
class
|
|
603
|
+
class j extends a {
|
|
604
604
|
static {
|
|
605
605
|
this.PANEL_TYPE = g;
|
|
606
606
|
}
|
|
607
607
|
static {
|
|
608
608
|
this.TRIGGER_SOURCE = v;
|
|
609
609
|
}
|
|
610
|
-
constructor(t,
|
|
610
|
+
constructor(t, i, s, n) {
|
|
611
611
|
super({
|
|
612
612
|
eventName: "epigraph_panel_opened",
|
|
613
613
|
interactiveEvent: t,
|
|
614
614
|
customParameters: {
|
|
615
615
|
items: n,
|
|
616
|
-
panel_type:
|
|
616
|
+
panel_type: i,
|
|
617
617
|
trigger_source: s
|
|
618
618
|
}
|
|
619
619
|
});
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
class
|
|
622
|
+
class U extends a {
|
|
623
623
|
static {
|
|
624
624
|
this.PANEL_TYPE = g;
|
|
625
625
|
}
|
|
626
626
|
static {
|
|
627
627
|
this.TRIGGER_SOURCE = v;
|
|
628
628
|
}
|
|
629
|
-
constructor(t,
|
|
629
|
+
constructor(t, i, s, n) {
|
|
630
630
|
super({
|
|
631
631
|
eventName: "epigraph_panel_closed",
|
|
632
632
|
interactiveEvent: t,
|
|
633
633
|
customParameters: {
|
|
634
634
|
items: n,
|
|
635
|
-
panel_type:
|
|
635
|
+
panel_type: i,
|
|
636
636
|
trigger_source: s
|
|
637
637
|
}
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
class
|
|
641
|
+
class H extends a {
|
|
642
642
|
constructor(t) {
|
|
643
643
|
super({
|
|
644
644
|
eventName: "epigraph_add_to_favourites",
|
|
@@ -649,9 +649,9 @@ class F extends a {
|
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
class
|
|
652
|
+
class W extends a {
|
|
653
653
|
static {
|
|
654
|
-
this.ACTION_PERFORMED =
|
|
654
|
+
this.ACTION_PERFORMED = O;
|
|
655
655
|
}
|
|
656
656
|
constructor(t) {
|
|
657
657
|
super({
|
|
@@ -663,9 +663,9 @@ class j extends a {
|
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
class
|
|
666
|
+
class J extends a {
|
|
667
667
|
static {
|
|
668
|
-
this.INTERACTION_TYPE =
|
|
668
|
+
this.INTERACTION_TYPE = S;
|
|
669
669
|
}
|
|
670
670
|
constructor(t) {
|
|
671
671
|
super({
|
|
@@ -677,24 +677,24 @@ class W extends a {
|
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
|
-
class
|
|
680
|
+
class Z extends a {
|
|
681
681
|
static {
|
|
682
682
|
this.CURRENCY = l;
|
|
683
683
|
}
|
|
684
|
-
constructor(t,
|
|
684
|
+
constructor(t, i, s, n, r) {
|
|
685
685
|
super({
|
|
686
686
|
eventName: "epigraph_item_added",
|
|
687
687
|
interactiveEvent: t,
|
|
688
688
|
customParameters: {
|
|
689
689
|
items: r,
|
|
690
|
-
value:
|
|
690
|
+
value: i,
|
|
691
691
|
currency: s,
|
|
692
692
|
quantity: n
|
|
693
693
|
}
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
|
-
class
|
|
697
|
+
class K extends a {
|
|
698
698
|
constructor(t) {
|
|
699
699
|
super({
|
|
700
700
|
eventName: "epigraph_item_moved",
|
|
@@ -705,81 +705,87 @@ class Z extends a {
|
|
|
705
705
|
});
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
class
|
|
708
|
+
class X extends a {
|
|
709
709
|
static {
|
|
710
710
|
this.CURRENCY = l;
|
|
711
711
|
}
|
|
712
|
-
constructor(t,
|
|
712
|
+
constructor(t, i, s, n) {
|
|
713
713
|
super({
|
|
714
714
|
eventName: "epigraph_item_removed",
|
|
715
715
|
interactiveEvent: !0,
|
|
716
716
|
customParameters: {
|
|
717
717
|
items: n,
|
|
718
718
|
value: t,
|
|
719
|
-
currency:
|
|
719
|
+
currency: i,
|
|
720
720
|
quantity: s
|
|
721
721
|
}
|
|
722
722
|
});
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
|
-
class
|
|
726
|
-
constructor(t,
|
|
725
|
+
class Q extends a {
|
|
726
|
+
constructor(t, i) {
|
|
727
727
|
super({
|
|
728
728
|
eventName: "epigraph_variant_changed",
|
|
729
729
|
interactiveEvent: !0,
|
|
730
730
|
customParameters: {
|
|
731
|
-
items:
|
|
731
|
+
items: i,
|
|
732
732
|
change_type: t
|
|
733
733
|
}
|
|
734
734
|
});
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
-
class
|
|
738
|
-
|
|
737
|
+
class B extends a {
|
|
738
|
+
static {
|
|
739
|
+
this.CONTENT_TYPES = w;
|
|
740
|
+
}
|
|
741
|
+
static {
|
|
742
|
+
this.SHARE_DESTINATIONS = L;
|
|
743
|
+
}
|
|
744
|
+
constructor(t, i, s) {
|
|
739
745
|
super({
|
|
740
746
|
eventName: "epigraph_content_shared",
|
|
741
747
|
interactiveEvent: !0,
|
|
742
748
|
customParameters: {
|
|
743
749
|
items: s,
|
|
744
750
|
content_type: t,
|
|
745
|
-
share_destination:
|
|
751
|
+
share_destination: i
|
|
746
752
|
}
|
|
747
753
|
});
|
|
748
754
|
}
|
|
749
755
|
}
|
|
750
|
-
class
|
|
756
|
+
class Y extends a {
|
|
751
757
|
static {
|
|
752
758
|
this.CURRENCY = l;
|
|
753
759
|
}
|
|
754
|
-
constructor(t,
|
|
760
|
+
constructor(t, i, s) {
|
|
755
761
|
super({
|
|
756
762
|
eventName: "epigraph_checkout",
|
|
757
763
|
interactiveEvent: !0,
|
|
758
764
|
customParameters: {
|
|
759
765
|
items: s,
|
|
760
766
|
value: t,
|
|
761
|
-
currency:
|
|
767
|
+
currency: i
|
|
762
768
|
}
|
|
763
769
|
});
|
|
764
770
|
}
|
|
765
771
|
}
|
|
766
|
-
class
|
|
772
|
+
class tt extends a {
|
|
767
773
|
static {
|
|
768
774
|
this.CURRENCY = l;
|
|
769
775
|
}
|
|
770
|
-
constructor(t,
|
|
776
|
+
constructor(t, i, s) {
|
|
771
777
|
super({
|
|
772
778
|
eventName: "epigraph_conversion",
|
|
773
779
|
interactiveEvent: !0,
|
|
774
780
|
customParameters: {
|
|
775
781
|
items: s,
|
|
776
782
|
value: t,
|
|
777
|
-
currency:
|
|
783
|
+
currency: i
|
|
778
784
|
}
|
|
779
785
|
});
|
|
780
786
|
}
|
|
781
787
|
}
|
|
782
|
-
class
|
|
788
|
+
class et extends a {
|
|
783
789
|
constructor(t) {
|
|
784
790
|
super({
|
|
785
791
|
eventName: "epigraph_changeRate",
|
|
@@ -790,7 +796,7 @@ class Y extends a {
|
|
|
790
796
|
});
|
|
791
797
|
}
|
|
792
798
|
}
|
|
793
|
-
class
|
|
799
|
+
class it extends a {
|
|
794
800
|
constructor(t) {
|
|
795
801
|
super({
|
|
796
802
|
eventName: "epigraph_completionRate",
|
|
@@ -801,7 +807,7 @@ class tt extends a {
|
|
|
801
807
|
});
|
|
802
808
|
}
|
|
803
809
|
}
|
|
804
|
-
class
|
|
810
|
+
class st extends a {
|
|
805
811
|
constructor(t) {
|
|
806
812
|
super({
|
|
807
813
|
eventName: "epigraph_engagementRate",
|
|
@@ -812,11 +818,11 @@ class et extends a {
|
|
|
812
818
|
});
|
|
813
819
|
}
|
|
814
820
|
}
|
|
815
|
-
class
|
|
816
|
-
constructor(t,
|
|
821
|
+
class nt extends a {
|
|
822
|
+
constructor(t, i, s) {
|
|
817
823
|
super({
|
|
818
824
|
eventName: t,
|
|
819
|
-
interactiveEvent:
|
|
825
|
+
interactiveEvent: i,
|
|
820
826
|
customParameters: s
|
|
821
827
|
});
|
|
822
828
|
}
|
|
@@ -837,16 +843,16 @@ class it extends a {
|
|
|
837
843
|
* See the License for the specific language governing permissions and
|
|
838
844
|
* limitations under the License.
|
|
839
845
|
*/
|
|
840
|
-
var
|
|
846
|
+
var x;
|
|
841
847
|
const h = Symbol("analyticsPluginsMap");
|
|
842
|
-
|
|
843
|
-
class
|
|
844
|
-
constructor(t,
|
|
845
|
-
this[
|
|
848
|
+
x = h;
|
|
849
|
+
class at {
|
|
850
|
+
constructor(t, i) {
|
|
851
|
+
this[x] = /* @__PURE__ */ new Map(), this.__consentPlugin = null, t && i && (this.__consentPlugin = this.buildConsentPlugin(t, i)), window.addEventListener("epigraphAnalyticsConsentChange", this.__onConsentChangeFromEvent);
|
|
846
852
|
}
|
|
847
853
|
__onConsentChangeFromEvent(t) {
|
|
848
|
-
let
|
|
849
|
-
this.__overrideConsent =
|
|
854
|
+
let i = t;
|
|
855
|
+
this.__overrideConsent = i.detail.hasConsent;
|
|
850
856
|
for (const s of this[h].values())
|
|
851
857
|
this.__hasConsent() || s.setStatus(c.RESTRICTED);
|
|
852
858
|
}
|
|
@@ -879,8 +885,8 @@ class st {
|
|
|
879
885
|
* @param eventData
|
|
880
886
|
*/
|
|
881
887
|
sendEvent(t) {
|
|
882
|
-
this[h].forEach((
|
|
883
|
-
|
|
888
|
+
this[h].forEach((i) => {
|
|
889
|
+
i.sendEvent(t, this.__hasConsent());
|
|
884
890
|
});
|
|
885
891
|
}
|
|
886
892
|
/**
|
|
@@ -889,44 +895,46 @@ class st {
|
|
|
889
895
|
* @param consentIdentifier
|
|
890
896
|
* @private
|
|
891
897
|
*/
|
|
892
|
-
buildConsentPlugin(t,
|
|
893
|
-
return t.toLowerCase() ===
|
|
898
|
+
buildConsentPlugin(t, i) {
|
|
899
|
+
return t.toLowerCase() === N.OneTrust.toLowerCase() ? new z(i) : null;
|
|
894
900
|
}
|
|
895
901
|
}
|
|
896
902
|
export {
|
|
897
|
-
|
|
898
|
-
|
|
903
|
+
O as ACTION_PERFORMED,
|
|
904
|
+
C as BUTTON_TYPE,
|
|
905
|
+
w as CONTENT_TYPES,
|
|
899
906
|
l as CURRENCY,
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
907
|
+
N as ConsentPluginNames,
|
|
908
|
+
H as EpigraphAddToFavouritesEvent,
|
|
909
|
+
at as EpigraphAnalytics,
|
|
910
|
+
M as EpigraphArRequestedEvent,
|
|
911
|
+
F as EpigraphButtonClickEvent,
|
|
912
|
+
et as EpigraphChangeRateEvent,
|
|
913
|
+
Y as EpigraphCheckoutEvent,
|
|
914
|
+
it as EpigraphCompletionRateEvent,
|
|
915
|
+
B as EpigraphContentSharedEvent,
|
|
916
|
+
tt as EpigraphConversionEvent,
|
|
917
|
+
nt as EpigraphCustomEvent,
|
|
918
|
+
st as EpigraphEngagementRateEvent,
|
|
919
|
+
Z as EpigraphItemAddedEvent,
|
|
920
|
+
K as EpigraphItemMovedEvent,
|
|
921
|
+
X as EpigraphItemRemovedEvent,
|
|
922
|
+
W as EpigraphKeyboardInteractionEvent,
|
|
923
|
+
V as EpigraphModuleClosedEvent,
|
|
924
|
+
k as EpigraphModuleFailedEvent,
|
|
918
925
|
q as EpigraphModuleLoadingEvent,
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
926
|
+
b as EpigraphModuleReadyEvent,
|
|
927
|
+
U as EpigraphPanelClosedEvent,
|
|
928
|
+
j as EpigraphPanelOpenedEvent,
|
|
929
|
+
$ as EpigraphSupportDetectedEvent,
|
|
930
|
+
J as EpigraphTouchInteractionEvent,
|
|
931
|
+
Q as EpigraphVariantChangedEvent,
|
|
932
|
+
G as GA4AnalyticsPlugin,
|
|
933
|
+
S as INTERACTION_TYPE,
|
|
934
|
+
R as NexusAnalyticsPlugin,
|
|
935
|
+
z as OneTrustConsentPlugin,
|
|
929
936
|
g as PANEL_TYPE,
|
|
937
|
+
L as SHARE_DESTINATIONS,
|
|
930
938
|
A as SUPPORT_TYPE,
|
|
931
939
|
v as TRIGGER_SOURCE
|
|
932
940
|
};
|
|
@@ -58,12 +58,10 @@ export declare enum SUPPORT_TYPE {
|
|
|
58
58
|
}
|
|
59
59
|
export declare enum BUTTON_TYPE {
|
|
60
60
|
AR_VIEW = "ar_view",
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
HELP_SHOW = "help_show",
|
|
66
|
-
HELP_HIDE = "help_hide",
|
|
61
|
+
DIMENSION_TOGGLE = "dimension_toggle",
|
|
62
|
+
HOTSPOTS_TOGGLE = "hotspots_toggle",
|
|
63
|
+
HELP_TOGGLE = "help_toggle",
|
|
64
|
+
UTILITY_MENU_TOGGLE = "utility_menu_toggle",
|
|
67
65
|
HOTSPOT_ENTER = "hotspot_enter",
|
|
68
66
|
HOTSPOT_EXIT = "hotspot_exit",
|
|
69
67
|
SHARE = "share",
|
|
@@ -86,6 +84,19 @@ export declare enum INTERACTION_TYPE {
|
|
|
86
84
|
ZOOM = "zoom",
|
|
87
85
|
PAN = "pan"
|
|
88
86
|
}
|
|
87
|
+
export declare enum CONTENT_TYPES {
|
|
88
|
+
CONFIGURATION = "configuration",
|
|
89
|
+
SCENE = "scene",
|
|
90
|
+
PRODUCT = "product"
|
|
91
|
+
}
|
|
92
|
+
export declare enum SHARE_DESTINATIONS {
|
|
93
|
+
FACEBOOK = "facebook",
|
|
94
|
+
TWITTER = "twitter",
|
|
95
|
+
EMAIL = "email",
|
|
96
|
+
COPY_LINK = "copy_link",
|
|
97
|
+
WHATSAPP = "whatsapp",
|
|
98
|
+
LINKEDIN = "linkedin"
|
|
99
|
+
}
|
|
89
100
|
export declare class EpigraphArRequestedEvent extends BaseAnalyticsEvent {
|
|
90
101
|
constructor(items: IAnalyticsParameterItems);
|
|
91
102
|
}
|
|
@@ -145,6 +156,8 @@ export declare class EpigraphVariantChangedEvent extends BaseAnalyticsEvent {
|
|
|
145
156
|
constructor(changeType: string, items: IAnalyticsParameterItems);
|
|
146
157
|
}
|
|
147
158
|
export declare class EpigraphContentSharedEvent extends BaseAnalyticsEvent {
|
|
159
|
+
static readonly CONTENT_TYPES: typeof CONTENT_TYPES;
|
|
160
|
+
static readonly SHARE_DESTINATIONS: typeof SHARE_DESTINATIONS;
|
|
148
161
|
constructor(contentType: string, shareDestination: string, items: IAnalyticsParameterItems);
|
|
149
162
|
}
|
|
150
163
|
export declare class EpigraphCheckoutEvent extends BaseAnalyticsEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./Epigraph/epigraph.cjs"),n=require("./Epigraph/epigraphBaseSolutions.cjs"),e=require("./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs"),E=require("./EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),p=require("./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs"),g=require("./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.cjs"),r=require("./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs"),t=require("./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.cjs"),i=require("./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs");exports.ENVIRONMENT_TYPE=a.ENVIRONMENT_TYPE;exports.Epigraph=a.Epigraph;exports.EpigraphBaseSolutionHtmlElement=n.EpigraphBaseSolutionHtmlElement;exports.EpigraphBaseSolutionLitElement=n.EpigraphBaseSolutionLitElement;exports.ACTION_PERFORMED=e.ACTION_PERFORMED;exports.BUTTON_TYPE=e.BUTTON_TYPE;exports.CURRENCY=e.CURRENCY;exports.ConsentPluginNames=e.ConsentPluginNames;exports.EpigraphAddToFavouritesEvent=e.EpigraphAddToFavouritesEvent;exports.EpigraphAnalytics=e.EpigraphAnalytics;exports.EpigraphArRequestedEvent=e.EpigraphArRequestedEvent;exports.EpigraphButtonClickEvent=e.EpigraphButtonClickEvent;exports.EpigraphChangeRateEvent=e.EpigraphChangeRateEvent;exports.EpigraphCheckoutEvent=e.EpigraphCheckoutEvent;exports.EpigraphCompletionRateEvent=e.EpigraphCompletionRateEvent;exports.EpigraphContentSharedEvent=e.EpigraphContentSharedEvent;exports.EpigraphConversionEvent=e.EpigraphConversionEvent;exports.EpigraphCustomEvent=e.EpigraphCustomEvent;exports.EpigraphEngagementRateEvent=e.EpigraphEngagementRateEvent;exports.EpigraphItemAddedEvent=e.EpigraphItemAddedEvent;exports.EpigraphItemMovedEvent=e.EpigraphItemMovedEvent;exports.EpigraphItemRemovedEvent=e.EpigraphItemRemovedEvent;exports.EpigraphKeyboardInteractionEvent=e.EpigraphKeyboardInteractionEvent;exports.EpigraphModuleClosedEvent=e.EpigraphModuleClosedEvent;exports.EpigraphModuleFailedEvent=e.EpigraphModuleFailedEvent;exports.EpigraphModuleLoadingEvent=e.EpigraphModuleLoadingEvent;exports.EpigraphModuleReadyEvent=e.EpigraphModuleReadyEvent;exports.EpigraphPanelClosedEvent=e.EpigraphPanelClosedEvent;exports.EpigraphPanelOpenedEvent=e.EpigraphPanelOpenedEvent;exports.EpigraphSupportDetectedEvent=e.EpigraphSupportDetectedEvent;exports.EpigraphTouchInteractionEvent=e.EpigraphTouchInteractionEvent;exports.EpigraphVariantChangedEvent=e.EpigraphVariantChangedEvent;exports.GA4AnalyticsPlugin=e.GA4AnalyticsPlugin;exports.INTERACTION_TYPE=e.INTERACTION_TYPE;exports.NexusAnalyticsPlugin=e.NexusAnalyticsPlugin;exports.OneTrustConsentPlugin=e.OneTrustConsentPlugin;exports.PANEL_TYPE=e.PANEL_TYPE;exports.SUPPORT_TYPE=e.SUPPORT_TYPE;exports.TRIGGER_SOURCE=e.TRIGGER_SOURCE;exports.EpigraphLogger=E.EpigraphLogger;exports.LogTypes=E.LogTypes;exports.LoggerModeNames=E.LoggerModeNames;exports.EpigraphNexusAPI=p.EpigraphNexusAPI;exports.HTTPMethod=p.HTTPMethod;exports.NexusAPIResourceIdentifier=p.NexusAPIResourceIdentifier;exports.NexusAPIRoutes=p.NexusAPIRoutes;exports.NexusAPIVersions=p.NexusAPIVersions;exports.NexusEndpoints=p.NexusEndpoints;exports.EpigraphQrCodeGenerator=g.EpigraphQrCodeGenerator;exports.Result=r.Result;exports.failureResult=r.failureResult;exports.successResult=r.successResult;exports.Distance=t.Distance;exports.DistanceUnits=t.DistanceUnits;exports.UnitTypes=t.UnitTypes;exports.EpigraphUrlProcessor=i.EpigraphUrlProcessor;exports.QUERY_PARAMETER_ACTION_NAMES=i.QUERY_PARAMETER_ACTION_NAMES;exports.QUERY_PARAMETER_NAMES=i.QUERY_PARAMETER_NAMES;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./Epigraph/epigraph.cjs"),n=require("./Epigraph/epigraphBaseSolutions.cjs"),e=require("./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs"),E=require("./EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),p=require("./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs"),g=require("./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.cjs"),r=require("./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs"),t=require("./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.cjs"),i=require("./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs");exports.ENVIRONMENT_TYPE=a.ENVIRONMENT_TYPE;exports.Epigraph=a.Epigraph;exports.EpigraphBaseSolutionHtmlElement=n.EpigraphBaseSolutionHtmlElement;exports.EpigraphBaseSolutionLitElement=n.EpigraphBaseSolutionLitElement;exports.ACTION_PERFORMED=e.ACTION_PERFORMED;exports.BUTTON_TYPE=e.BUTTON_TYPE;exports.CONTENT_TYPES=e.CONTENT_TYPES;exports.CURRENCY=e.CURRENCY;exports.ConsentPluginNames=e.ConsentPluginNames;exports.EpigraphAddToFavouritesEvent=e.EpigraphAddToFavouritesEvent;exports.EpigraphAnalytics=e.EpigraphAnalytics;exports.EpigraphArRequestedEvent=e.EpigraphArRequestedEvent;exports.EpigraphButtonClickEvent=e.EpigraphButtonClickEvent;exports.EpigraphChangeRateEvent=e.EpigraphChangeRateEvent;exports.EpigraphCheckoutEvent=e.EpigraphCheckoutEvent;exports.EpigraphCompletionRateEvent=e.EpigraphCompletionRateEvent;exports.EpigraphContentSharedEvent=e.EpigraphContentSharedEvent;exports.EpigraphConversionEvent=e.EpigraphConversionEvent;exports.EpigraphCustomEvent=e.EpigraphCustomEvent;exports.EpigraphEngagementRateEvent=e.EpigraphEngagementRateEvent;exports.EpigraphItemAddedEvent=e.EpigraphItemAddedEvent;exports.EpigraphItemMovedEvent=e.EpigraphItemMovedEvent;exports.EpigraphItemRemovedEvent=e.EpigraphItemRemovedEvent;exports.EpigraphKeyboardInteractionEvent=e.EpigraphKeyboardInteractionEvent;exports.EpigraphModuleClosedEvent=e.EpigraphModuleClosedEvent;exports.EpigraphModuleFailedEvent=e.EpigraphModuleFailedEvent;exports.EpigraphModuleLoadingEvent=e.EpigraphModuleLoadingEvent;exports.EpigraphModuleReadyEvent=e.EpigraphModuleReadyEvent;exports.EpigraphPanelClosedEvent=e.EpigraphPanelClosedEvent;exports.EpigraphPanelOpenedEvent=e.EpigraphPanelOpenedEvent;exports.EpigraphSupportDetectedEvent=e.EpigraphSupportDetectedEvent;exports.EpigraphTouchInteractionEvent=e.EpigraphTouchInteractionEvent;exports.EpigraphVariantChangedEvent=e.EpigraphVariantChangedEvent;exports.GA4AnalyticsPlugin=e.GA4AnalyticsPlugin;exports.INTERACTION_TYPE=e.INTERACTION_TYPE;exports.NexusAnalyticsPlugin=e.NexusAnalyticsPlugin;exports.OneTrustConsentPlugin=e.OneTrustConsentPlugin;exports.PANEL_TYPE=e.PANEL_TYPE;exports.SHARE_DESTINATIONS=e.SHARE_DESTINATIONS;exports.SUPPORT_TYPE=e.SUPPORT_TYPE;exports.TRIGGER_SOURCE=e.TRIGGER_SOURCE;exports.EpigraphLogger=E.EpigraphLogger;exports.LogTypes=E.LogTypes;exports.LoggerModeNames=E.LoggerModeNames;exports.EpigraphNexusAPI=p.EpigraphNexusAPI;exports.HTTPMethod=p.HTTPMethod;exports.NexusAPIResourceIdentifier=p.NexusAPIResourceIdentifier;exports.NexusAPIRoutes=p.NexusAPIRoutes;exports.NexusAPIVersions=p.NexusAPIVersions;exports.NexusEndpoints=p.NexusEndpoints;exports.EpigraphQrCodeGenerator=g.EpigraphQrCodeGenerator;exports.Result=r.Result;exports.failureResult=r.failureResult;exports.successResult=r.successResult;exports.Distance=t.Distance;exports.DistanceUnits=t.DistanceUnits;exports.UnitTypes=t.UnitTypes;exports.EpigraphUrlProcessor=i.EpigraphUrlProcessor;exports.QUERY_PARAMETER_ACTION_NAMES=i.QUERY_PARAMETER_ACTION_NAMES;exports.QUERY_PARAMETER_NAMES=i.QUERY_PARAMETER_NAMES;
|
package/dist/epigraph-std-lib.js
CHANGED
|
@@ -1,69 +1,71 @@
|
|
|
1
|
-
import { ENVIRONMENT_TYPE as
|
|
1
|
+
import { ENVIRONMENT_TYPE as t, Epigraph as p } from "./Epigraph/epigraph.js";
|
|
2
2
|
import { EpigraphBaseSolutionHtmlElement as n, EpigraphBaseSolutionLitElement as o } from "./Epigraph/epigraphBaseSolutions.js";
|
|
3
|
-
import { ACTION_PERFORMED as i, BUTTON_TYPE as g,
|
|
4
|
-
import { EpigraphLogger as
|
|
5
|
-
import { EpigraphNexusAPI as
|
|
6
|
-
import { EpigraphQrCodeGenerator as
|
|
7
|
-
import { Result as
|
|
8
|
-
import { Distance as
|
|
9
|
-
import { EpigraphUrlProcessor as
|
|
3
|
+
import { ACTION_PERFORMED as i, BUTTON_TYPE as g, CONTENT_TYPES as s, CURRENCY as h, ConsentPluginNames as u, EpigraphAddToFavouritesEvent as l, EpigraphAnalytics as R, EpigraphArRequestedEvent as T, EpigraphButtonClickEvent as d, EpigraphChangeRateEvent as v, EpigraphCheckoutEvent as N, EpigraphCompletionRateEvent as P, EpigraphContentSharedEvent as A, EpigraphConversionEvent as m, EpigraphCustomEvent as C, EpigraphEngagementRateEvent as I, EpigraphItemAddedEvent as c, EpigraphItemMovedEvent as x, EpigraphItemRemovedEvent as _, EpigraphKeyboardInteractionEvent as M, EpigraphModuleClosedEvent as O, EpigraphModuleFailedEvent as S, EpigraphModuleLoadingEvent as f, EpigraphModuleReadyEvent as U, EpigraphPanelClosedEvent as Y, EpigraphPanelOpenedEvent as y, EpigraphSupportDetectedEvent as L, EpigraphTouchInteractionEvent as D, EpigraphVariantChangedEvent as B, GA4AnalyticsPlugin as G, INTERACTION_TYPE as F, NexusAnalyticsPlugin as H, OneTrustConsentPlugin as Q, PANEL_TYPE as V, SHARE_DESTINATIONS as k, SUPPORT_TYPE as b, TRIGGER_SOURCE as q } from "./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js";
|
|
4
|
+
import { EpigraphLogger as j, LogTypes as w, LoggerModeNames as z } from "./EpigraphLibs/EpigraphLogger/epigraphLogger.js";
|
|
5
|
+
import { EpigraphNexusAPI as W, HTTPMethod as X, NexusAPIResourceIdentifier as Z, NexusAPIRoutes as $, NexusAPIVersions as ee, NexusEndpoints as Ee } from "./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js";
|
|
6
|
+
import { EpigraphQrCodeGenerator as pe } from "./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js";
|
|
7
|
+
import { Result as ne, failureResult as oe, successResult as ae } from "./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.js";
|
|
8
|
+
import { Distance as ge, DistanceUnits as se, UnitTypes as he } from "./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js";
|
|
9
|
+
import { EpigraphUrlProcessor as le, QUERY_PARAMETER_ACTION_NAMES as Re, QUERY_PARAMETER_NAMES as Te } from "./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
|
|
10
10
|
export {
|
|
11
11
|
i as ACTION_PERFORMED,
|
|
12
12
|
g as BUTTON_TYPE,
|
|
13
|
-
s as
|
|
14
|
-
h as
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
s as CONTENT_TYPES,
|
|
14
|
+
h as CURRENCY,
|
|
15
|
+
u as ConsentPluginNames,
|
|
16
|
+
ge as Distance,
|
|
17
|
+
se as DistanceUnits,
|
|
18
|
+
t as ENVIRONMENT_TYPE,
|
|
18
19
|
p as Epigraph,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
l as EpigraphAddToFavouritesEvent,
|
|
21
|
+
R as EpigraphAnalytics,
|
|
22
|
+
T as EpigraphArRequestedEvent,
|
|
22
23
|
n as EpigraphBaseSolutionHtmlElement,
|
|
23
24
|
o as EpigraphBaseSolutionLitElement,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
d as EpigraphButtonClickEvent,
|
|
26
|
+
v as EpigraphChangeRateEvent,
|
|
27
|
+
N as EpigraphCheckoutEvent,
|
|
28
|
+
P as EpigraphCompletionRateEvent,
|
|
29
|
+
A as EpigraphContentSharedEvent,
|
|
30
|
+
m as EpigraphConversionEvent,
|
|
31
|
+
C as EpigraphCustomEvent,
|
|
32
|
+
I as EpigraphEngagementRateEvent,
|
|
33
|
+
c as EpigraphItemAddedEvent,
|
|
34
|
+
x as EpigraphItemMovedEvent,
|
|
35
|
+
_ as EpigraphItemRemovedEvent,
|
|
35
36
|
M as EpigraphKeyboardInteractionEvent,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
j as EpigraphLogger,
|
|
38
|
+
O as EpigraphModuleClosedEvent,
|
|
39
|
+
S as EpigraphModuleFailedEvent,
|
|
40
|
+
f as EpigraphModuleLoadingEvent,
|
|
40
41
|
U as EpigraphModuleReadyEvent,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
W as EpigraphNexusAPI,
|
|
43
|
+
Y as EpigraphPanelClosedEvent,
|
|
44
|
+
y as EpigraphPanelOpenedEvent,
|
|
45
|
+
pe as EpigraphQrCodeGenerator,
|
|
46
|
+
L as EpigraphSupportDetectedEvent,
|
|
47
|
+
D as EpigraphTouchInteractionEvent,
|
|
48
|
+
le as EpigraphUrlProcessor,
|
|
48
49
|
B as EpigraphVariantChangedEvent,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
G as GA4AnalyticsPlugin,
|
|
51
|
+
X as HTTPMethod,
|
|
52
|
+
F as INTERACTION_TYPE,
|
|
53
|
+
w as LogTypes,
|
|
54
|
+
z as LoggerModeNames,
|
|
55
|
+
Z as NexusAPIResourceIdentifier,
|
|
56
|
+
$ as NexusAPIRoutes,
|
|
57
|
+
ee as NexusAPIVersions,
|
|
58
|
+
H as NexusAnalyticsPlugin,
|
|
59
|
+
Ee as NexusEndpoints,
|
|
59
60
|
Q as OneTrustConsentPlugin,
|
|
60
61
|
V as PANEL_TYPE,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
k as
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
Re as QUERY_PARAMETER_ACTION_NAMES,
|
|
63
|
+
Te as QUERY_PARAMETER_NAMES,
|
|
64
|
+
ne as Result,
|
|
65
|
+
k as SHARE_DESTINATIONS,
|
|
66
|
+
b as SUPPORT_TYPE,
|
|
67
|
+
q as TRIGGER_SOURCE,
|
|
68
|
+
he as UnitTypes,
|
|
69
|
+
oe as failureResult,
|
|
70
|
+
ae as successResult
|
|
69
71
|
};
|