@epigraph/epigraph-std-lib 5.0.0-alpha → 5.0.0-alpha.1

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.
@@ -1,4 +1,4 @@
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})}}/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var c=(e=>(e.UNAVAILABLE="unavailable",e.AVAILABLE="available",e.RESTRICTED="restricted",e))(c||{});const O=Symbol("data"),v=Symbol("next"),D=class L{constructor(t){this[O]=t,this[v]=null}get data(){return this[O]}set next(t){if(!(t instanceof L)&&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=D;const E=Symbol("head");class G{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"),l=Symbol("size");class w{constructor(){this[T]=new G,this[l]=0}get queue(){return this[T]}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=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 w,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 M{constructor({trackingID:t,experienceID:i,solution:n,sessionId:s,xPath:r,verboseLogging:o=!1,sendToStaging:x=!1}){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 w,this.url=x?"https://nexus.epigraph.dev/api/analytics/event":"https://api.myepigraph.com/api/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.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||{}),y=(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))(y||{}),g=(e=>(e.ZOOM="zoom",e.ROTATE="rotate",e.PAN="pan",e))(g||{}),A=(e=>(e.CONFIGURATION="configuration",e.SCENE="scene",e.PRODUCT="product",e))(A||{}),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 q extends a{constructor(t){super({eventName:"epigraph_ar_requested",interactiveEvent:!0,customParameters:{items:t}})}}class b extends a{constructor(t){super({eventName:"epigraph_module_loading",interactiveEvent:!1,customParameters:{is_pre_config:t}})}}class k extends a{constructor(t,i){super({eventName:"epigraph_module_ready",interactiveEvent:!1,customParameters:{is_pre_config:t,load_time_ms:i}})}}class V 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 $ 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=y}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 W 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 J extends a{static{this.ACTION_PERFORMED=g}constructor(t){super({eventName:"epigraph_keyboard_interaction",interactiveEvent:!0,customParameters:{action_performed:t}})}}class K extends a{static{this.INTERACTION_TYPE=g}constructor(t){super({eventName:"epigraph_touch_interaction",interactiveEvent:!0,customParameters:{interaction_type:t}})}}class X 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 Z extends a{constructor(t){super({eventName:"epigraph_item_moved",interactiveEvent:!0,customParameters:{items:t}})}}class B 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 Q 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 Y extends a{static{this.CONTENT_TYPES=A}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 tt extends a{static{this.CURRENCY=h}constructor(t,i,n){super({eventName:"epigraph_checkout",interactiveEvent:!0,customParameters:{items:n,value:t,currency:i}})}}class et extends a{static{this.CURRENCY=h}constructor(t,i,n){super({eventName:"epigraph_conversion",interactiveEvent:!0,customParameters:{items:n,value:t,currency:i}})}}class it extends a{constructor(t){super({eventName:"epigraph_changeRate",interactiveEvent:!1,customParameters:{value:t}})}}class nt extends a{constructor(t){super({eventName:"epigraph_completionRate",interactiveEvent:!1,customParameters:{value:t}})}}class st extends a{constructor(t){super({eventName:"epigraph_engagementRate",interactiveEvent:!1,customParameters:{value:t}})}}class at 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 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=_;
16
+ */var R;const p=Symbol("analyticsPluginsMap");R=p;class rt{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[p].values())this.__hasConsent()||n.setStatus(c.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()===m.OneTrust.toLowerCase()?new P(i):null}}exports.ACTION_PERFORMED=g;exports.BUTTON_TYPE=y;exports.CONTENT_TYPES=A;exports.CURRENCY=h;exports.ConsentPluginNames=m;exports.EpigraphAddToFavouritesEvent=H;exports.EpigraphAnalytics=rt;exports.EpigraphArRequestedEvent=q;exports.EpigraphButtonClickEvent=j;exports.EpigraphChangeRateEvent=it;exports.EpigraphCheckoutEvent=tt;exports.EpigraphCompletionRateEvent=nt;exports.EpigraphContentSharedEvent=Y;exports.EpigraphConversionEvent=et;exports.EpigraphCustomEvent=at;exports.EpigraphEngagementRateEvent=st;exports.EpigraphItemAddedEvent=X;exports.EpigraphItemMovedEvent=Z;exports.EpigraphItemRemovedEvent=B;exports.EpigraphKeyboardInteractionEvent=J;exports.EpigraphModuleClosedEvent=F;exports.EpigraphModuleFailedEvent=V;exports.EpigraphModuleLoadingEvent=b;exports.EpigraphModuleReadyEvent=k;exports.EpigraphPanelClosedEvent=W;exports.EpigraphPanelOpenedEvent=U;exports.EpigraphSupportDetectedEvent=$;exports.EpigraphTouchInteractionEvent=K;exports.EpigraphVariantChangedEvent=Q;exports.GA4AnalyticsPlugin=z;exports.MODULE_FAILED_ERRORS=I;exports.NexusAnalyticsPlugin=M;exports.OneTrustConsentPlugin=P;exports.PANEL_TYPE=d;exports.SHARE_DESTINATIONS=C;exports.SUPPORT_TYPE=N;exports.TRIGGER_SOURCE=_;exports.VARIANT_CHANGE_TYPES=f;
@@ -1,13 +1,13 @@
1
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 {
2
+ const E = Symbol("data"), p = Symbol("next"), z = class N {
3
3
  constructor(t) {
4
- this[m] = t, this[p] = null;
4
+ this[E] = t, this[p] = null;
5
5
  }
6
6
  get data() {
7
- return this[m];
7
+ return this[E];
8
8
  }
9
9
  set next(t) {
10
- if (!(t instanceof I) && t !== null)
10
+ if (!(t instanceof N) && t !== null)
11
11
  throw new Error(
12
12
  "This node is not an instance of the custom class 'Node'."
13
13
  );
@@ -17,9 +17,9 @@ const m = Symbol("data"), p = Symbol("next"), D = class I {
17
17
  return this[p];
18
18
  }
19
19
  };
20
- let E = D;
20
+ let f = z;
21
21
  const _ = Symbol("head");
22
- class T {
22
+ class R {
23
23
  constructor() {
24
24
  this[_] = null;
25
25
  }
@@ -34,9 +34,9 @@ class T {
34
34
  if (i) {
35
35
  for (; i.next !== null; )
36
36
  i = i?.next;
37
- return i.next = new E(t);
37
+ return i.next = new f(t);
38
38
  }
39
- return this.head = new E(t);
39
+ return this.head = new f(t);
40
40
  }
41
41
  removeHead() {
42
42
  const t = this.head;
@@ -44,13 +44,13 @@ class T {
44
44
  return this.head = t.next, t.data;
45
45
  }
46
46
  }
47
- const f = Symbol("queue"), d = Symbol("size");
47
+ const I = Symbol("queue"), d = Symbol("size");
48
48
  class y {
49
49
  constructor() {
50
- this[f] = new T(), this[d] = 0;
50
+ this[I] = new R(), this[d] = 0;
51
51
  }
52
52
  get queue() {
53
- return this[f];
53
+ return this[I];
54
54
  }
55
55
  get size() {
56
56
  return this[d];
@@ -76,8 +76,8 @@ class u {
76
76
  static {
77
77
  this.ACTION_FAILED_INITIALIZATION = "initialization-failed";
78
78
  }
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;
79
+ constructor(t, i, n, s, r, o) {
80
+ this._pluginName = t, this._trackingId = i, this._experienceId = n, this._solution = s, this._initializer = r, this._status = o;
81
81
  }
82
82
  updateStatus(t) {
83
83
  this._status = t;
@@ -87,7 +87,7 @@ class u {
87
87
  }
88
88
  notify(t, i) {
89
89
  console.log("Notifying", t, i);
90
- const s = {
90
+ const n = {
91
91
  pluginName: this._pluginName,
92
92
  trackingId: this._trackingId,
93
93
  experienceId: this._experienceId,
@@ -97,17 +97,17 @@ class u {
97
97
  action: t,
98
98
  eventDetails: i
99
99
  };
100
- window.dispatchEvent(new CustomEvent("epg-notification", { detail: s }));
100
+ window.dispatchEvent(new CustomEvent("epg-notification", { detail: n }));
101
101
  }
102
102
  }
103
- class G {
103
+ class D {
104
104
  constructor({
105
105
  trackingID: t,
106
106
  experienceID: i,
107
- solution: s,
108
- verboseLogging: n = !1
107
+ solution: n,
108
+ verboseLogging: s = !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 = i, this.solution = s, this.verboseLogging = n, this.__queue = new y(), this.__epigraphNotifier = new u(
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 = n, this.verboseLogging = s, this.__queue = new y(), this.__epigraphNotifier = new u(
111
111
  this.pluginName,
112
112
  this.pluginName,
113
113
  this.experienceID,
@@ -157,8 +157,8 @@ class G {
157
157
  }
158
158
  try {
159
159
  await this.dequeueAndSendEvents();
160
- } catch (s) {
161
- this.logger(s), await this.reportFailureToNexus("EVENT_SEND_ERROR", s?.toString() || "Unknown error");
160
+ } catch (n) {
161
+ this.logger(n), await this.reportFailureToNexus("EVENT_SEND_ERROR", n?.toString() || "Unknown error");
162
162
  }
163
163
  }
164
164
  initializePlugin() {
@@ -187,11 +187,11 @@ class G {
187
187
  };
188
188
  const i = this.findGA4Info(this.trackingID);
189
189
  if (i) {
190
- const s = i.l || "dataLayer";
191
- return this.logger(`GA4 script found, setting up with dataLayer: ${s}`), this.__epigraphNotifier.updateInitializer("GA4"), {
190
+ const n = i.l || "dataLayer";
191
+ return this.logger(`GA4 script found, setting up with dataLayer: ${n}`), this.__epigraphNotifier.updateInitializer("GA4"), {
192
192
  success: !0,
193
193
  method: "GA4",
194
- dataLayerName: s
194
+ dataLayerName: n
195
195
  };
196
196
  }
197
197
  return {
@@ -204,13 +204,13 @@ class G {
204
204
  detectGTM() {
205
205
  const t = document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');
206
206
  for (const i of Array.from(t)) {
207
- const s = i.getAttribute("src");
208
- if (s) {
209
- const n = s.match(/gtm\.js\?id=([^&]+)/);
210
- if (n && n.length > 0) {
211
- const r = s.match(/&l=([^&]+)/), o = r ? r[1] : "dataLayer";
207
+ const n = i.getAttribute("src");
208
+ if (n) {
209
+ const s = n.match(/gtm\.js\?id=([^&]+)/);
210
+ if (s && s.length > 0) {
211
+ const r = n.match(/&l=([^&]+)/), o = r ? r[1] : "dataLayer";
212
212
  return {
213
- containerId: n[1],
213
+ containerId: s[1],
214
214
  dataLayerName: o
215
215
  };
216
216
  }
@@ -227,11 +227,11 @@ class G {
227
227
  return;
228
228
  let t = this.__queue.size;
229
229
  for (let i = 0; i < t; i++) {
230
- const s = this.__queue.dequeue();
230
+ const n = this.__queue.dequeue();
231
231
  try {
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);
233
- } catch (n) {
234
- this.logger(`Error sending event ${s.eventName}: ${n}`), this.__queue.enqueue(s);
232
+ 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);
233
+ } catch (s) {
234
+ this.logger(`Error sending event ${n.eventName}: ${s}`), this.__queue.enqueue(n);
235
235
  }
236
236
  }
237
237
  }
@@ -242,8 +242,8 @@ class G {
242
242
  */
243
243
  async sendGTMEvent(t) {
244
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));
245
+ const n = 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, n));
247
247
  }
248
248
  /**
249
249
  * Send events to GA4 via Google Analytics 4.
@@ -252,8 +252,8 @@ class G {
252
252
  */
253
253
  async sendGA4Event(t) {
254
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);
255
+ const n = i;
256
+ this.isValidPayload(i) || (i = await this.convertGA4ParametersToEpgEventTag(i)), window.gtag("event", t.eventName, i), this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, n);
257
257
  }
258
258
  /**
259
259
  * Validates a payload by checking its parameter count and the constraints of parameter names and values.
@@ -266,8 +266,8 @@ class G {
266
266
  isValidPayload(t) {
267
267
  if (Object.keys(t).length >= 25)
268
268
  return !1;
269
- for (const [n, r] of Object.entries(t))
270
- if (n !== "items" && (n.length > 40 || String(r).length > 100))
269
+ for (const [s, r] of Object.entries(t))
270
+ if (s !== "items" && (s.length > 40 || String(r).length > 100))
271
271
  return !1;
272
272
  return !0;
273
273
  }
@@ -281,10 +281,10 @@ class G {
281
281
  */
282
282
  async convertGTMParametersToEpgEventTag(t, i) {
283
283
  try {
284
- let s = await this.sendGA4LongParameters(i);
284
+ let n = await this.sendGA4LongParameters(i);
285
285
  return {
286
286
  event: t,
287
- epg_event_tag: s,
287
+ epg_event_tag: n,
288
288
  send_to: this.trackingID
289
289
  };
290
290
  } catch {
@@ -315,25 +315,25 @@ class G {
315
315
  this.verboseLogging && console.warn(t);
316
316
  }
317
317
  async sendGA4LongParameters(t) {
318
- const i = "https://api.myepigraph.com/api/analytics/ga4/custom", s = { parameters: t };
318
+ const i = "https://api.myepigraph.com/api/analytics/ga4/custom", n = { parameters: t };
319
319
  try {
320
- const n = await fetch(i, {
320
+ const s = await fetch(i, {
321
321
  method: "POST",
322
322
  // Assuming it's a POST request, adjust if necessary
323
323
  headers: {
324
324
  "Content-Type": "application/json",
325
325
  Accept: "application/json"
326
326
  },
327
- body: JSON.stringify(s)
327
+ body: JSON.stringify(n)
328
328
  });
329
- return n.ok ? (await n.json())?.id ?? "" : "";
329
+ return s.ok ? (await s.json())?.id ?? "" : "";
330
330
  } catch {
331
331
  return "";
332
332
  }
333
333
  }
334
334
  async reportFailureToNexus(t, i) {
335
335
  try {
336
- const s = {
336
+ const n = {
337
337
  plugin: "GA4",
338
338
  trackingId: this.trackingID,
339
339
  solution: this.solution,
@@ -344,26 +344,26 @@ class G {
344
344
  url: window.location.href,
345
345
  userAgent: navigator.userAgent
346
346
  };
347
- this.logger(`Failure reported to Nexus: ${JSON.stringify(s)}`);
348
- } catch (s) {
349
- this.logger(`Error reporting failure to Nexus: ${s}`);
347
+ this.logger(`Failure reported to Nexus: ${JSON.stringify(n)}`);
348
+ } catch (n) {
349
+ this.logger(`Error reporting failure to Nexus: ${n}`);
350
350
  }
351
351
  }
352
352
  findGA4Info(t) {
353
353
  if (window.google_tag_manager && window.google_tag_manager[t]) {
354
- const s = window.google_tag_manager[t];
355
- if (s && s.dataLayerName)
354
+ const n = window.google_tag_manager[t];
355
+ if (n && n.dataLayerName)
356
356
  return {
357
357
  fullSrc: "",
358
358
  id: t,
359
- l: s.dataLayerName
359
+ l: n.dataLayerName
360
360
  };
361
361
  }
362
362
  const i = document.querySelectorAll("script[src]");
363
- for (const s of i) {
364
- const n = s.getAttribute("src");
365
- if (n && n.includes(t)) {
366
- const r = new URL(n, location.href), o = Object.fromEntries(r.searchParams.entries());
363
+ for (const n of i) {
364
+ const s = n.getAttribute("src");
365
+ if (s && s.includes(t)) {
366
+ const r = new URL(s, location.href), o = Object.fromEntries(r.searchParams.entries());
367
367
  return {
368
368
  fullSrc: r.href,
369
369
  id: o.id || void 0,
@@ -374,17 +374,17 @@ class G {
374
374
  return null;
375
375
  }
376
376
  }
377
- class R {
377
+ class q {
378
378
  constructor({
379
379
  trackingID: t,
380
380
  experienceID: i,
381
- solution: s,
382
- sessionId: n,
381
+ solution: n,
382
+ sessionId: s,
383
383
  xPath: r,
384
384
  verboseLogging: o = !1,
385
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 = 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(
387
+ 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 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,
@@ -422,7 +422,7 @@ class R {
422
422
  }
423
423
  async dequeueAndSendEvents() {
424
424
  for (let t = 0; t < this.__queue.size; t++) {
425
- const i = this.__queue.dequeue(), s = {
425
+ const i = this.__queue.dequeue(), n = {
426
426
  send_to: this.trackingID,
427
427
  experience_id: this.experienceID,
428
428
  solution: this.solution,
@@ -440,8 +440,8 @@ class R {
440
440
  "EPG-XPATH": this.xPath,
441
441
  Origin: typeof window < "u" ? window.location.origin : ""
442
442
  },
443
- body: JSON.stringify(s)
444
- })).ok && this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, s), "";
443
+ body: JSON.stringify(n)
444
+ })).ok && this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, n), "";
445
445
  } catch {
446
446
  return "";
447
447
  }
@@ -450,7 +450,7 @@ class R {
450
450
  return "";
451
451
  }
452
452
  }
453
- class z {
453
+ class G {
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
  }
@@ -462,8 +462,8 @@ class z {
462
462
  return this.consent;
463
463
  if (window.OnetrustActiveGroups !== void 0) {
464
464
  let t = window.OnetrustActiveGroups;
465
- t !== void 0 && t.split(",").forEach((s) => {
466
- s === this.consentIdentifier && (this.consent = !0, this.consentSet = !0);
465
+ t !== void 0 && t.split(",").forEach((n) => {
466
+ n === this.consentIdentifier && (this.consent = !0, this.consentSet = !0);
467
467
  });
468
468
  }
469
469
  return this.consent;
@@ -476,33 +476,33 @@ class z {
476
476
  });
477
477
  }
478
478
  }
479
- var N = /* @__PURE__ */ ((e) => (e.OneTrust = "onetrust", e))(N || {});
479
+ var A = /* @__PURE__ */ ((e) => (e.OneTrust = "onetrust", e))(A || {});
480
480
  class a {
481
481
  constructor({
482
482
  eventName: t,
483
483
  interactiveEvent: i,
484
- customParameters: s
484
+ customParameters: n
485
485
  }) {
486
- this.eventName = t, this.interactiveEvent = i, this.customParameters = s;
486
+ this.eventName = t, this.interactiveEvent = i, this.customParameters = n;
487
487
  }
488
- getGa4Parameters(t, i, s) {
489
- let n = {
488
+ getGa4Parameters(t, i, n) {
489
+ let s = {
490
490
  solution: t,
491
491
  experience_id: i,
492
492
  interactive_event: this.interactiveEvent,
493
- send_to: s
493
+ send_to: n
494
494
  };
495
- return n = Object.assign(n, JSON.parse(JSON.stringify(this.customParameters))), n;
495
+ return s = Object.assign(s, JSON.parse(JSON.stringify(this.customParameters))), s;
496
496
  }
497
- getGTMParameters(t, i, s) {
498
- let n = {
497
+ getGTMParameters(t, i, n) {
498
+ let s = {
499
499
  solution: t,
500
500
  experience_id: i,
501
501
  event: this.eventName,
502
502
  interactive_event: this.interactiveEvent,
503
- send_to: s
503
+ send_to: n
504
504
  };
505
- return n = Object.assign(n, JSON.parse(JSON.stringify(this.customParameters))), n;
505
+ return s = Object.assign(s, JSON.parse(JSON.stringify(this.customParameters))), s;
506
506
  }
507
507
  getNexusParameters() {
508
508
  let t = {
@@ -511,7 +511,7 @@ class a {
511
511
  return t = Object.assign(t, JSON.parse(JSON.stringify(this.customParameters))), t;
512
512
  }
513
513
  }
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 || {});
514
+ var C = /* @__PURE__ */ ((e) => (e.VARIANT = "variant", e.CATEGORY_VARIANT = "category_variant", e.GEOMETRY = "geometry", e.CATEGORY_GEOMETRY = "category_geometry", e.GLOBAL = "global", e))(C || {}), 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 || {}), O = /* @__PURE__ */ ((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))(O || {}), 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 || {}), w = /* @__PURE__ */ ((e) => (e.AR = "ar", e.QR = "qr", e.AR_WEBGL2 = "ar-webgl2", e.QR_WEBGL2 = "qr-webgl2", e))(w || {}), L = /* @__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))(L || {}), m = /* @__PURE__ */ ((e) => (e.ZOOM = "zoom", e.ROTATE = "rotate", e.PAN = "pan", e))(m || {}), S = /* @__PURE__ */ ((e) => (e.CONFIGURATION = "configuration", e.SCENE = "scene", e.PRODUCT = "product", e))(S || {}), x = /* @__PURE__ */ ((e) => (e.FACEBOOK = "facebook", e.TWITTER = "twitter", e.EMAIL = "email", e.COPY_LINK = "copy_link", e.WHATSAPP = "whatsapp", e.LINKEDIN = "linkedin", e))(x || {});
515
515
  class M extends a {
516
516
  constructor(t) {
517
517
  super({
@@ -523,7 +523,7 @@ class M extends a {
523
523
  });
524
524
  }
525
525
  }
526
- class q extends a {
526
+ class b extends a {
527
527
  constructor(t) {
528
528
  super({
529
529
  eventName: "epigraph_module_loading",
@@ -534,7 +534,7 @@ class q extends a {
534
534
  });
535
535
  }
536
536
  }
537
- class b extends a {
537
+ class k extends a {
538
538
  constructor(t, i) {
539
539
  super({
540
540
  eventName: "epigraph_module_ready",
@@ -546,15 +546,18 @@ class b extends a {
546
546
  });
547
547
  }
548
548
  }
549
- class k extends a {
550
- constructor(t, i, s) {
549
+ class $ extends a {
550
+ static {
551
+ this.MODULE_FAILED_ERRORS = O;
552
+ }
553
+ constructor(t, i, n) {
551
554
  super({
552
555
  eventName: "epigraph_module_failed",
553
556
  interactiveEvent: !1,
554
557
  customParameters: {
555
558
  is_pre_config: t,
556
559
  load_time_ms: i,
557
- error_type: s
560
+ error_type: n
558
561
  }
559
562
  });
560
563
  }
@@ -570,24 +573,23 @@ class V extends a {
570
573
  });
571
574
  }
572
575
  }
573
- class $ extends a {
576
+ class F extends a {
574
577
  static {
575
- this.SUPPORT_TYPE = A;
578
+ this.SUPPORT_TYPE = w;
576
579
  }
577
- constructor(t, i = {}) {
580
+ constructor(t) {
578
581
  super({
579
582
  eventName: "epigraph_support_detected",
580
583
  interactiveEvent: !1,
581
584
  customParameters: {
582
- support_type: t,
583
- device_capabilities: i
585
+ support_type: t
584
586
  }
585
587
  });
586
588
  }
587
589
  }
588
- class F extends a {
590
+ class j extends a {
589
591
  static {
590
- this.BUTTON_TYPE = C;
592
+ this.BUTTON_TYPE = L;
591
593
  }
592
594
  constructor(t, i) {
593
595
  super({
@@ -600,45 +602,45 @@ class F extends a {
600
602
  });
601
603
  }
602
604
  }
603
- class j extends a {
605
+ class W extends a {
604
606
  static {
605
607
  this.PANEL_TYPE = g;
606
608
  }
607
609
  static {
608
610
  this.TRIGGER_SOURCE = v;
609
611
  }
610
- constructor(t, i, s, n) {
612
+ constructor(t, i, n, s) {
611
613
  super({
612
614
  eventName: "epigraph_panel_opened",
613
615
  interactiveEvent: t,
614
616
  customParameters: {
615
- items: n,
617
+ items: s,
616
618
  panel_type: i,
617
- trigger_source: s
619
+ trigger_source: n
618
620
  }
619
621
  });
620
622
  }
621
623
  }
622
- class U extends a {
624
+ class J extends a {
623
625
  static {
624
626
  this.PANEL_TYPE = g;
625
627
  }
626
628
  static {
627
629
  this.TRIGGER_SOURCE = v;
628
630
  }
629
- constructor(t, i, s, n) {
631
+ constructor(t, i, n, s) {
630
632
  super({
631
633
  eventName: "epigraph_panel_closed",
632
634
  interactiveEvent: t,
633
635
  customParameters: {
634
- items: n,
636
+ items: s,
635
637
  panel_type: i,
636
- trigger_source: s
638
+ trigger_source: n
637
639
  }
638
640
  });
639
641
  }
640
642
  }
641
- class H extends a {
643
+ class U extends a {
642
644
  constructor(t) {
643
645
  super({
644
646
  eventName: "epigraph_add_to_favourites",
@@ -649,9 +651,9 @@ class H extends a {
649
651
  });
650
652
  }
651
653
  }
652
- class W extends a {
654
+ class H extends a {
653
655
  static {
654
- this.ACTION_PERFORMED = O;
656
+ this.ACTION_PERFORMED = m;
655
657
  }
656
658
  constructor(t) {
657
659
  super({
@@ -663,9 +665,9 @@ class W extends a {
663
665
  });
664
666
  }
665
667
  }
666
- class J extends a {
668
+ class K extends a {
667
669
  static {
668
- this.INTERACTION_TYPE = S;
670
+ this.INTERACTION_TYPE = m;
669
671
  }
670
672
  constructor(t) {
671
673
  super({
@@ -677,24 +679,24 @@ class J extends a {
677
679
  });
678
680
  }
679
681
  }
680
- class Z extends a {
682
+ class X extends a {
681
683
  static {
682
684
  this.CURRENCY = l;
683
685
  }
684
- constructor(t, i, s, n, r) {
686
+ constructor(t, i, n, s, r) {
685
687
  super({
686
688
  eventName: "epigraph_item_added",
687
689
  interactiveEvent: t,
688
690
  customParameters: {
689
691
  items: r,
690
692
  value: i,
691
- currency: s,
692
- quantity: n
693
+ currency: n,
694
+ quantity: s
693
695
  }
694
696
  });
695
697
  }
696
698
  }
697
- class K extends a {
699
+ class Z extends a {
698
700
  constructor(t) {
699
701
  super({
700
702
  eventName: "epigraph_item_moved",
@@ -705,24 +707,27 @@ class K extends a {
705
707
  });
706
708
  }
707
709
  }
708
- class X extends a {
710
+ class Q extends a {
709
711
  static {
710
712
  this.CURRENCY = l;
711
713
  }
712
- constructor(t, i, s, n) {
714
+ constructor(t, i, n, s) {
713
715
  super({
714
716
  eventName: "epigraph_item_removed",
715
717
  interactiveEvent: !0,
716
718
  customParameters: {
717
- items: n,
719
+ items: s,
718
720
  value: t,
719
721
  currency: i,
720
- quantity: s
722
+ quantity: n
721
723
  }
722
724
  });
723
725
  }
724
726
  }
725
- class Q extends a {
727
+ class B extends a {
728
+ static {
729
+ this.VARIANT_CHANGE_TYPES = C;
730
+ }
726
731
  constructor(t, i) {
727
732
  super({
728
733
  eventName: "epigraph_variant_changed",
@@ -734,58 +739,58 @@ class Q extends a {
734
739
  });
735
740
  }
736
741
  }
737
- class B extends a {
742
+ class Y extends a {
738
743
  static {
739
- this.CONTENT_TYPES = w;
744
+ this.CONTENT_TYPES = S;
740
745
  }
741
746
  static {
742
- this.SHARE_DESTINATIONS = L;
747
+ this.SHARE_DESTINATIONS = x;
743
748
  }
744
- constructor(t, i, s) {
749
+ constructor(t, i, n) {
745
750
  super({
746
751
  eventName: "epigraph_content_shared",
747
752
  interactiveEvent: !0,
748
753
  customParameters: {
749
- items: s,
754
+ items: n,
750
755
  content_type: t,
751
756
  share_destination: i
752
757
  }
753
758
  });
754
759
  }
755
760
  }
756
- class Y extends a {
761
+ class tt extends a {
757
762
  static {
758
763
  this.CURRENCY = l;
759
764
  }
760
- constructor(t, i, s) {
765
+ constructor(t, i, n) {
761
766
  super({
762
767
  eventName: "epigraph_checkout",
763
768
  interactiveEvent: !0,
764
769
  customParameters: {
765
- items: s,
770
+ items: n,
766
771
  value: t,
767
772
  currency: i
768
773
  }
769
774
  });
770
775
  }
771
776
  }
772
- class tt extends a {
777
+ class et extends a {
773
778
  static {
774
779
  this.CURRENCY = l;
775
780
  }
776
- constructor(t, i, s) {
781
+ constructor(t, i, n) {
777
782
  super({
778
783
  eventName: "epigraph_conversion",
779
784
  interactiveEvent: !0,
780
785
  customParameters: {
781
- items: s,
786
+ items: n,
782
787
  value: t,
783
788
  currency: i
784
789
  }
785
790
  });
786
791
  }
787
792
  }
788
- class et extends a {
793
+ class it extends a {
789
794
  constructor(t) {
790
795
  super({
791
796
  eventName: "epigraph_changeRate",
@@ -796,7 +801,7 @@ class et extends a {
796
801
  });
797
802
  }
798
803
  }
799
- class it extends a {
804
+ class nt extends a {
800
805
  constructor(t) {
801
806
  super({
802
807
  eventName: "epigraph_completionRate",
@@ -818,12 +823,12 @@ class st extends a {
818
823
  });
819
824
  }
820
825
  }
821
- class nt extends a {
822
- constructor(t, i, s) {
826
+ class at extends a {
827
+ constructor(t, i, n) {
823
828
  super({
824
829
  eventName: t,
825
830
  interactiveEvent: i,
826
- customParameters: s
831
+ customParameters: n
827
832
  });
828
833
  }
829
834
  }
@@ -843,18 +848,18 @@ class nt extends a {
843
848
  * See the License for the specific language governing permissions and
844
849
  * limitations under the License.
845
850
  */
846
- var x;
851
+ var T;
847
852
  const h = Symbol("analyticsPluginsMap");
848
- x = h;
849
- class at {
853
+ T = h;
854
+ class rt {
850
855
  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);
856
+ this[T] = /* @__PURE__ */ new Map(), this.__consentPlugin = null, t && i && (this.__consentPlugin = this.buildConsentPlugin(t, i)), window.addEventListener("epigraphAnalyticsConsentChange", this.__onConsentChangeFromEvent);
852
857
  }
853
858
  __onConsentChangeFromEvent(t) {
854
859
  let i = t;
855
860
  this.__overrideConsent = i.detail.hasConsent;
856
- for (const s of this[h].values())
857
- this.__hasConsent() || s.setStatus(c.RESTRICTED);
861
+ for (const n of this[h].values())
862
+ this.__hasConsent() || n.setStatus(c.RESTRICTED);
858
863
  }
859
864
  /**
860
865
  * Epigraph Analytics uses plugins to send events to multiple trackers at a time. You can create a customer tracker
@@ -896,45 +901,46 @@ class at {
896
901
  * @private
897
902
  */
898
903
  buildConsentPlugin(t, i) {
899
- return t.toLowerCase() === N.OneTrust.toLowerCase() ? new z(i) : null;
904
+ return t.toLowerCase() === A.OneTrust.toLowerCase() ? new G(i) : null;
900
905
  }
901
906
  }
902
907
  export {
903
- O as ACTION_PERFORMED,
904
- C as BUTTON_TYPE,
905
- w as CONTENT_TYPES,
908
+ m as ACTION_PERFORMED,
909
+ L as BUTTON_TYPE,
910
+ S as CONTENT_TYPES,
906
911
  l as CURRENCY,
907
- N as ConsentPluginNames,
908
- H as EpigraphAddToFavouritesEvent,
909
- at as EpigraphAnalytics,
912
+ A as ConsentPluginNames,
913
+ U as EpigraphAddToFavouritesEvent,
914
+ rt as EpigraphAnalytics,
910
915
  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,
916
+ j as EpigraphButtonClickEvent,
917
+ it as EpigraphChangeRateEvent,
918
+ tt as EpigraphCheckoutEvent,
919
+ nt as EpigraphCompletionRateEvent,
920
+ Y as EpigraphContentSharedEvent,
921
+ et as EpigraphConversionEvent,
922
+ at as EpigraphCustomEvent,
918
923
  st as EpigraphEngagementRateEvent,
919
- Z as EpigraphItemAddedEvent,
920
- K as EpigraphItemMovedEvent,
921
- X as EpigraphItemRemovedEvent,
922
- W as EpigraphKeyboardInteractionEvent,
924
+ X as EpigraphItemAddedEvent,
925
+ Z as EpigraphItemMovedEvent,
926
+ Q as EpigraphItemRemovedEvent,
927
+ H as EpigraphKeyboardInteractionEvent,
923
928
  V as EpigraphModuleClosedEvent,
924
- k as EpigraphModuleFailedEvent,
925
- q as EpigraphModuleLoadingEvent,
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
+ $ as EpigraphModuleFailedEvent,
930
+ b as EpigraphModuleLoadingEvent,
931
+ k as EpigraphModuleReadyEvent,
932
+ J as EpigraphPanelClosedEvent,
933
+ W as EpigraphPanelOpenedEvent,
934
+ F as EpigraphSupportDetectedEvent,
935
+ K as EpigraphTouchInteractionEvent,
936
+ B as EpigraphVariantChangedEvent,
937
+ D as GA4AnalyticsPlugin,
938
+ O as MODULE_FAILED_ERRORS,
939
+ q as NexusAnalyticsPlugin,
940
+ G as OneTrustConsentPlugin,
936
941
  g as PANEL_TYPE,
937
- L as SHARE_DESTINATIONS,
938
- A as SUPPORT_TYPE,
939
- v as TRIGGER_SOURCE
942
+ x as SHARE_DESTINATIONS,
943
+ w as SUPPORT_TYPE,
944
+ v as TRIGGER_SOURCE,
945
+ C as VARIANT_CHANGE_TYPES
940
946
  };
@@ -25,6 +25,13 @@ declare class BaseAnalyticsEvent implements IAnalyticsEvent {
25
25
  interactive_event: boolean;
26
26
  };
27
27
  }
28
+ export declare enum VARIANT_CHANGE_TYPES {
29
+ VARIANT = "variant",
30
+ CATEGORY_VARIANT = "category_variant",
31
+ GEOMETRY = "geometry",
32
+ CATEGORY_GEOMETRY = "category_geometry",
33
+ GLOBAL = "global"
34
+ }
28
35
  export declare enum PANEL_TYPE {
29
36
  AR = "ar",
30
37
  QR = "qr",
@@ -39,6 +46,13 @@ export declare enum PANEL_TYPE {
39
46
  MOVE_MODAL = "move_modal",
40
47
  OUT_OF_STOCK_MODAL = "out_of_stock_modal"
41
48
  }
49
+ export declare enum MODULE_FAILED_ERRORS {
50
+ NETWORK = "network",
51
+ EXPERIENCE_CONFIG_ERROR = "experience-config-error",
52
+ SCENE_LOAD_ERROR = "scene-load-error",
53
+ INITIAL_SCENE_LOAD_ERROR = "initial-scene-load-error",
54
+ AUTHENTICATION_FAILED = "authentication-failed"
55
+ }
42
56
  export declare enum TRIGGER_SOURCE {
43
57
  AUTO = "auto",
44
58
  BUTTON = "button",
@@ -54,7 +68,8 @@ export declare enum CURRENCY {
54
68
  export declare enum SUPPORT_TYPE {
55
69
  AR = "ar",
56
70
  QR = "qr",
57
- WEBGL2 = "webgl2"
71
+ AR_WEBGL2 = "ar-webgl2",
72
+ QR_WEBGL2 = "qr-webgl2"
58
73
  }
59
74
  export declare enum BUTTON_TYPE {
60
75
  AR_VIEW = "ar_view",
@@ -77,11 +92,7 @@ export declare enum BUTTON_TYPE {
77
92
  }
78
93
  export declare enum ACTION_PERFORMED {
79
94
  ZOOM = "zoom",
80
- ROTATE = "rotate"
81
- }
82
- export declare enum INTERACTION_TYPE {
83
95
  ROTATE = "rotate",
84
- ZOOM = "zoom",
85
96
  PAN = "pan"
86
97
  }
87
98
  export declare enum CONTENT_TYPES {
@@ -107,6 +118,7 @@ export declare class EpigraphModuleReadyEvent extends BaseAnalyticsEvent {
107
118
  constructor(isPreConfig: boolean, loadTimeMs: number);
108
119
  }
109
120
  export declare class EpigraphModuleFailedEvent extends BaseAnalyticsEvent {
121
+ static readonly MODULE_FAILED_ERRORS: typeof MODULE_FAILED_ERRORS;
110
122
  constructor(isPreConfig: boolean, loadTimeMs: number, errorType: string);
111
123
  }
112
124
  export declare class EpigraphModuleClosedEvent extends BaseAnalyticsEvent {
@@ -114,7 +126,7 @@ export declare class EpigraphModuleClosedEvent extends BaseAnalyticsEvent {
114
126
  }
115
127
  export declare class EpigraphSupportDetectedEvent extends BaseAnalyticsEvent {
116
128
  static readonly SUPPORT_TYPE: typeof SUPPORT_TYPE;
117
- constructor(supportType: SUPPORT_TYPE, deviceCapabilities?: Record<string, unknown>);
129
+ constructor(supportType: SUPPORT_TYPE);
118
130
  }
119
131
  export declare class EpigraphButtonClickEvent extends BaseAnalyticsEvent {
120
132
  static readonly BUTTON_TYPE: typeof BUTTON_TYPE;
@@ -138,8 +150,8 @@ export declare class EpigraphKeyboardInteractionEvent extends BaseAnalyticsEvent
138
150
  constructor(actionPerformed: ACTION_PERFORMED);
139
151
  }
140
152
  export declare class EpigraphTouchInteractionEvent extends BaseAnalyticsEvent {
141
- static readonly INTERACTION_TYPE: typeof INTERACTION_TYPE;
142
- constructor(interactionType: INTERACTION_TYPE);
153
+ static readonly INTERACTION_TYPE: typeof ACTION_PERFORMED;
154
+ constructor(interactionType: ACTION_PERFORMED);
143
155
  }
144
156
  export declare class EpigraphItemAddedEvent extends BaseAnalyticsEvent {
145
157
  static readonly CURRENCY: typeof CURRENCY;
@@ -153,6 +165,7 @@ export declare class EpigraphItemRemovedEvent extends BaseAnalyticsEvent {
153
165
  constructor(value: number, currency: CURRENCY, quantity: number, items: IAnalyticsParameterItems);
154
166
  }
155
167
  export declare class EpigraphVariantChangedEvent extends BaseAnalyticsEvent {
168
+ static readonly VARIANT_CHANGE_TYPES: typeof VARIANT_CHANGE_TYPES;
156
169
  constructor(changeType: string, items: IAnalyticsParameterItems);
157
170
  }
158
171
  export declare class EpigraphContentSharedEvent 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.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;
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.MODULE_FAILED_ERRORS=e.MODULE_FAILED_ERRORS;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.VARIANT_CHANGE_TYPES=e.VARIANT_CHANGE_TYPES;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,71 +1,72 @@
1
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, 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";
3
+ import { ACTION_PERFORMED as i, BUTTON_TYPE as g, CONTENT_TYPES as s, CURRENCY as h, ConsentPluginNames as u, EpigraphAddToFavouritesEvent as R, EpigraphAnalytics as l, EpigraphArRequestedEvent as d, EpigraphButtonClickEvent as v, EpigraphChangeRateEvent as T, EpigraphCheckoutEvent as A, EpigraphCompletionRateEvent as N, EpigraphContentSharedEvent as P, EpigraphConversionEvent as m, EpigraphCustomEvent as C, EpigraphEngagementRateEvent as I, EpigraphItemAddedEvent as _, EpigraphItemMovedEvent as c, EpigraphItemRemovedEvent as x, EpigraphKeyboardInteractionEvent as M, EpigraphModuleClosedEvent as S, EpigraphModuleFailedEvent as O, EpigraphModuleLoadingEvent as f, EpigraphModuleReadyEvent as U, EpigraphPanelClosedEvent as Y, EpigraphPanelOpenedEvent as L, EpigraphSupportDetectedEvent as y, EpigraphTouchInteractionEvent as D, EpigraphVariantChangedEvent as G, GA4AnalyticsPlugin as B, MODULE_FAILED_ERRORS as F, NexusAnalyticsPlugin as H, OneTrustConsentPlugin as V, PANEL_TYPE as Q, SHARE_DESTINATIONS as k, SUPPORT_TYPE as b, TRIGGER_SOURCE as q, VARIANT_CHANGE_TYPES as K } from "./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js";
4
+ import { EpigraphLogger as w, LogTypes as z, LoggerModeNames as J } from "./EpigraphLibs/EpigraphLogger/epigraphLogger.js";
5
+ import { EpigraphNexusAPI as X, HTTPMethod as Z, NexusAPIResourceIdentifier as $, NexusAPIRoutes as ee, NexusAPIVersions as Ee, NexusEndpoints as te } from "./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js";
6
+ import { EpigraphQrCodeGenerator as re } from "./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js";
7
+ import { Result as oe, failureResult as ae, successResult as ie } from "./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.js";
8
+ import { Distance as se, DistanceUnits as he, UnitTypes as ue } from "./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js";
9
+ import { EpigraphUrlProcessor as le, QUERY_PARAMETER_ACTION_NAMES as de, QUERY_PARAMETER_NAMES as ve } from "./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
10
10
  export {
11
11
  i as ACTION_PERFORMED,
12
12
  g as BUTTON_TYPE,
13
13
  s as CONTENT_TYPES,
14
14
  h as CURRENCY,
15
15
  u as ConsentPluginNames,
16
- ge as Distance,
17
- se as DistanceUnits,
16
+ se as Distance,
17
+ he as DistanceUnits,
18
18
  t as ENVIRONMENT_TYPE,
19
19
  p as Epigraph,
20
- l as EpigraphAddToFavouritesEvent,
21
- R as EpigraphAnalytics,
22
- T as EpigraphArRequestedEvent,
20
+ R as EpigraphAddToFavouritesEvent,
21
+ l as EpigraphAnalytics,
22
+ d as EpigraphArRequestedEvent,
23
23
  n as EpigraphBaseSolutionHtmlElement,
24
24
  o as EpigraphBaseSolutionLitElement,
25
- d as EpigraphButtonClickEvent,
26
- v as EpigraphChangeRateEvent,
27
- N as EpigraphCheckoutEvent,
28
- P as EpigraphCompletionRateEvent,
29
- A as EpigraphContentSharedEvent,
25
+ v as EpigraphButtonClickEvent,
26
+ T as EpigraphChangeRateEvent,
27
+ A as EpigraphCheckoutEvent,
28
+ N as EpigraphCompletionRateEvent,
29
+ P as EpigraphContentSharedEvent,
30
30
  m as EpigraphConversionEvent,
31
31
  C as EpigraphCustomEvent,
32
32
  I as EpigraphEngagementRateEvent,
33
- c as EpigraphItemAddedEvent,
34
- x as EpigraphItemMovedEvent,
35
- _ as EpigraphItemRemovedEvent,
33
+ _ as EpigraphItemAddedEvent,
34
+ c as EpigraphItemMovedEvent,
35
+ x as EpigraphItemRemovedEvent,
36
36
  M as EpigraphKeyboardInteractionEvent,
37
- j as EpigraphLogger,
38
- O as EpigraphModuleClosedEvent,
39
- S as EpigraphModuleFailedEvent,
37
+ w as EpigraphLogger,
38
+ S as EpigraphModuleClosedEvent,
39
+ O as EpigraphModuleFailedEvent,
40
40
  f as EpigraphModuleLoadingEvent,
41
41
  U as EpigraphModuleReadyEvent,
42
- W as EpigraphNexusAPI,
42
+ X as EpigraphNexusAPI,
43
43
  Y as EpigraphPanelClosedEvent,
44
- y as EpigraphPanelOpenedEvent,
45
- pe as EpigraphQrCodeGenerator,
46
- L as EpigraphSupportDetectedEvent,
44
+ L as EpigraphPanelOpenedEvent,
45
+ re as EpigraphQrCodeGenerator,
46
+ y as EpigraphSupportDetectedEvent,
47
47
  D as EpigraphTouchInteractionEvent,
48
48
  le as EpigraphUrlProcessor,
49
- B as EpigraphVariantChangedEvent,
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,
49
+ G as EpigraphVariantChangedEvent,
50
+ B as GA4AnalyticsPlugin,
51
+ Z as HTTPMethod,
52
+ z as LogTypes,
53
+ J as LoggerModeNames,
54
+ F as MODULE_FAILED_ERRORS,
55
+ $ as NexusAPIResourceIdentifier,
56
+ ee as NexusAPIRoutes,
57
+ Ee as NexusAPIVersions,
58
58
  H as NexusAnalyticsPlugin,
59
- Ee as NexusEndpoints,
60
- Q as OneTrustConsentPlugin,
61
- V as PANEL_TYPE,
62
- Re as QUERY_PARAMETER_ACTION_NAMES,
63
- Te as QUERY_PARAMETER_NAMES,
64
- ne as Result,
59
+ te as NexusEndpoints,
60
+ V as OneTrustConsentPlugin,
61
+ Q as PANEL_TYPE,
62
+ de as QUERY_PARAMETER_ACTION_NAMES,
63
+ ve as QUERY_PARAMETER_NAMES,
64
+ oe as Result,
65
65
  k as SHARE_DESTINATIONS,
66
66
  b as SUPPORT_TYPE,
67
67
  q as TRIGGER_SOURCE,
68
- he as UnitTypes,
69
- oe as failureResult,
70
- ae as successResult
68
+ ue as UnitTypes,
69
+ K as VARIANT_CHANGE_TYPES,
70
+ ae as failureResult,
71
+ ie as successResult
71
72
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epigraph/epigraph-std-lib",
3
- "version": "5.0.0-alpha",
3
+ "version": "5.0.0-alpha.1",
4
4
  "type": "module",
5
5
  "main": "./dist/epigraph-std-lib.cjs",
6
6
  "module": "./dist/epigraph-std-lib.js",
@@ -17,7 +17,7 @@
17
17
  }
18
18
  },
19
19
  "scripts": {
20
- "dev": "vite",
20
+ "dev": "vite --force",
21
21
  "build": "tsc -b ./tsconfig.lib.json && vite build",
22
22
  "preview": "vite preview",
23
23
  "prepublishOnly": "npm run build",