{
  "version": 3,
  "sources": ["src/@omnial/_models/customer/address.model.ts", "src/@omnial/_services/external/script-load.service.ts", "src/@omnial/_models/catalog/product.model.ts", "src/@omnial/_models/external/klaviyo.model.ts", "src/@omnial/_services/external/klaviyo.service.ts", "src/@omnial/_services/customer/customer.service.ts", "src/@omnial/_services/catalog/category.service.ts", "src/@omnial/_models/tracking/ga4.item.model.ts", "src/@omnial/_models/tracking/ga4.events.model.ts", "src/@omnial/_services/external/google.ga4.service.ts", "src/@omnial/_models/tracking/facebook.events.model.ts", "src/@omnial/_services/external/facebook.service.ts", "src/@omnial/_models/external/gtm.model.ts", "src/@omnial/_services/external/tracking.service.ts"],
  "sourcesContent": ["import { State, Country } from \"../order/country.model\";\r\n\r\nexport class Address {\r\n  id: number;\r\n  firstName: string;\r\n  lastName: string;\r\n  email: string;\r\n  company: string;\r\n  city: string;\r\n  address1: string;\r\n  address2: string;\r\n  zipPostalCode: string;\r\n  phoneNumber: string;\r\n  faxNumber: string;\r\n  state: State;\r\n  stateName: string;\r\n  country: Country;\r\n}\r\n\r\nexport class GoogleAddress {\r\n  suggestedAddress: string;\r\n  formattedAddress: string;\r\n  subpremise: string;\r\n  subpremiseShort: string;\r\n  streetNumber: string;\r\n  streetNumberShort: string;\r\n  route: string;\r\n  routeShort: string;\r\n  locality: string;\r\n  localityShort: string;\r\n  administrativeAreaLevel2: string;\r\n  administrativeAreaLevel2Short: string;\r\n  administrativeAreaLevel1: string;\r\n  administrativeAreaLevel1Short: string;\r\n  country: string;\r\n  countryShort: string;\r\n  postalCode: string;\r\n  postalCodeShort: string;\r\n}\r\n", "import { Injectable } from '@angular/core';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { PayPalConfig } from 'src/@omnial/_models/external/paypal.config.model';\r\nimport { ScriptExt } from 'src/@omnial/_models/scripts.ext.model';\r\nimport { environment } from 'src/environments/environment';\r\n\r\n@Injectable()\r\nexport class ScriptLoaderService {\r\n\r\n  private $scripts: ScriptExt[] = [\r\n    { ref: 'Afterpay Sandbox', source: 'https://portal.sandbox.afterpay.com/afterpay.js', id: 'afterPayScriptTag', loaded: false , loading: false },\r\n    { ref: 'Afterpay Live', source: 'https://portal.afterpay.com/afterpay.js', id: 'afterPayScriptTag', loaded: false , loading: false },\r\n    { ref: 'SecurePay Sandbox', source: 'https://payments-stest.npe.auspost.zone/v3/ui/client/securepay-ui.min.js', id: 'securePayUIScriptTag', loaded: false , loading: false },\r\n    { ref: 'SecurePay 3DS Sandbox', source: 'https://test.api.securepay.com.au/threeds-js/securepay-threeds.js', id: 'securePay3DSScriptTag', loaded: false , loading: false },\r\n    { ref: 'SecurePay Live', source: 'https://payments.auspost.net.au/v3/ui/client/securepay-ui.min.js', id: 'securePayUIScriptTag', loaded: false , loading: false },\r\n    { ref: 'SecurePay 3DS Live', source: 'https://api.securepay.com.au/threeds-js/securepay-threeds.js', id: 'securePay3DSScriptTag', loaded: false , loading: false },\r\n    { ref: 'eWay Encrypt', source: 'https://secure.ewaypayments.com/scripts/eCrypt.min.js', id: 'eWayEncryptScriptTag', loaded: false , loading: false },\r\n    { ref: 'Klayvio', source: `https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=${environment.klaviyoApiKey}`, id: 'klayvioScriptTagScriptTag', loaded: false , loading: false },\r\n    { ref: 'PayPal', source: 'https://www.paypal.com/sdk/js', id: 'payPalScriptTag', loaded: false , loading: false },\r\n    { ref: 'Stripe', source: 'https://js.stripe.com/v3/', id: 'stripeScriptTag', loaded: false , loading: false },\r\n    { ref: 'Google Maps', source: 'https://maps.googleapis.com/maps/api/js?v=weekly&key=AIzaSyAsZFwrsLRvS-BSsGP7rTudul-OaoOEKXk&libraries=places&language=en&callback=googleMapsLoaded', id: 'mapsScriptTag', loaded: false , loading: false },\r\n    { ref: 'Google Maps Cluster', source: 'https://unpkg.com/@googlemaps/markerclustererplus/dist/index.min.js', id: 'mapsClusterScriptTag', loaded: false , loading: false },\r\n    { ref: 'Youtube', source: 'https://www.youtube.com/iframe_api', id: 'youtubeScriptTag', loaded: false , loading: false },\r\n    { ref: 'Facebook', source: 'https://connect.facebook.net/en_US/sdk.js', id: 'facebookScriptTag', loaded: false , loading: false }\r\n  ];\r\n  public scripts: BehaviorSubject<ScriptExt[]> = new BehaviorSubject<ScriptExt[]>(null);\r\n  payPalConfig: PayPalConfig;\r\n\r\n  constructor(public snackBar: MatSnackBar) { }\r\n\r\n  public load(ref: string, config?: any): void {\r\n    const script = this.$scripts.find(s => s.ref === ref);\r\n    if (!script)  {\r\n      return;\r\n    }\r\n    if (script && config && ref === 'PayPal') {\r\n      script.source = this.addPayPalParameters(script.source, config);\r\n    }\r\n    // Complete if already loaded or loading\r\n    if (script?.loading) {\r\n      this.scripts?.next(this.$scripts);\r\n      return;\r\n    }\r\n    script.loading = true;\r\n    if (script && script.loaded) {\r\n      this.scripts.next(this.$scripts);\r\n    }\r\n    else if (script) {\r\n      const scriptElement = document.createElement('script');\r\n      scriptElement.type = 'text/javascript';\r\n      scriptElement.src = script.source;\r\n      scriptElement.id = script.id;\r\n      document.getElementsByTagName('body')[0].appendChild(scriptElement);\r\n      scriptElement.onload = () => {\r\n        script.loading = false;\r\n        script.loaded = true;\r\n        this.scripts.next(this.$scripts);\r\n      };\r\n      scriptElement.onerror = (error: any) => {\r\n        // Couldn't load it\r\n        console.log(error);\r\n        script.loading = false;\r\n        script.loaded = false;\r\n        const errMessage = `Sorry there was a problem loading the ${ref} script.`;\r\n        this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 9000 });\r\n        this.scripts.next(this.$scripts);\r\n      };\r\n    } else {\r\n      // Script ref is wrong\r\n      const errMessage = `Sorry there was a problem loading the ${ref} script.`;\r\n      script.loading = false;\r\n      script.loaded = false;\r\n      this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 9000 });\r\n      this.scripts.next(this.$scripts);\r\n    }\r\n  }\r\n\r\n  public addPayPalParameters(source: string, config: PayPalConfig): string {\r\n    return source += `?client-id=${config.clientId}&intent=${config?.intent?.toLowerCase()}&currency=${config?.currency}`;\r\n  }\r\n\r\n  public addSourceParameters(source: string, config: any): string {\r\n    const hyphenize = (camel: string) => {\r\n      return camel.replace(/([A-Z])/g, $1 => {\r\n        return '-' + $1.toLowerCase();\r\n      });\r\n    };\r\n    return Object.keys(config).reduce((url, token, idx) => {\r\n      return url + (idx && '&' || '') + hyphenize(token) + '=' + config[token];\r\n    }, `${source}?`);\r\n  }\r\n}\r\n", "import { Review } from \"../customer/review.model\";\r\nimport { Discount } from \"../order/discount.model\";\r\nimport { Manufacturer } from \"./manufacturer.model\";\r\nimport { OmnialMedia } from \"./omnial-media.model\";\r\nimport { OmnialVideo } from \"./omnial-video.model\";\r\nimport { ProductAttribute } from \"./product-attribute.model\";\r\n\r\nexport class Product {\r\n  searchScore: number;\r\n\r\n  published: boolean;\r\n\r\n  oldPrice: number;\r\n  newPrice: number;\r\n  fromPrice: number;\r\n  discount: number;\r\n  valuePrice: number;\r\n  saveAmount: number;\r\n  installmentPrice: number;\r\n\r\n  oldPriceDisplay: string;\r\n  newPriceDisplay: string;\r\n  fromPriceDisplay: string;\r\n  discountDisplay: string;\r\n  valuePriceDisplay: string;\r\n  saveAmountDisplay: number;\r\n  installmentPriceDisplay: number;\r\n\r\n  listId: string;\r\n  listName: string;\r\n\r\n  savePercent: number;\r\n  id: number;\r\n  sku: string;\r\n  name: string;\r\n  seName: string;\r\n  holdingImage: OmnialMedia;\r\n  images: Array<OmnialMedia>;\r\n  videos: Array<OmnialVideo>;\r\n  defaultImages: OmnialMedia;\r\n  currency: string;\r\n  ratingsCount: number;\r\n  ratingsValue: number;\r\n  description: string;\r\n  categoryId: number;\r\n  isFeatured: boolean;\r\n  availability: string;\r\n  stockQuantity: number;\r\n  cartCount: number; // The number already in the cart\r\n  cartQuantity: number; // The number to be added to the cart\r\n  hasAttributes: boolean; // We will know if this is a Bundle\r\n  attributeInfo: string; // For display in the cart\r\n  attributeSummary: string; // For alt display in the cart\r\n  attributeXml: string; // For increment, decrement from the cart\r\n  categoryIds: number[];\r\n  canonical: string;\r\n  multiBuy: boolean;\r\n  isInStock: boolean;\r\n  lineTotal: number;\r\n  lineTotalString: string;\r\n  manufacturer: Manufacturer;\r\n  canonicalCategoryId: number;\r\n  productTemplateId: number;\r\n  position: number;\r\n  createdOn: number;\r\n  specifications: ProductSpecification[];\r\n}\r\n\r\nexport class ProductDetail {\r\n  oldPrice: number;\r\n  newPrice: number;\r\n  fromPrice: number;\r\n  discount: number; // TODO\r\n  valuePrice: number;\r\n  saveAmount: number;\r\n  installmentPrice: number;\r\n  adjustedPrice: number;\r\n  adjustedInstallmentPrice: number;\r\n  priceAdjustment: number;\r\n\r\n  oldPriceDisplay: string;\r\n  newPriceDisplay: string;\r\n  fromPriceDisplay: string;\r\n  discountDisplay: string;\r\n  valuePriceDisplay: string;\r\n  saveAmountDisplay: string;\r\n  installmentPriceDisplay: string;\r\n  adjustedPriceDisplay: string;\r\n  adjustedInstallmentPriceDisplay: string;\r\n  priceAdjustmentDisplay: string;\r\n\r\n  listId: string;\r\n  listName: string;\r\n\r\n  savePercent: number;\r\n  priceAdjustmentUsePercentage: boolean;\r\n  id: number;\r\n  sku: string;\r\n  gtin: string;\r\n  name: string;\r\n  seName: string;\r\n  images: Array<OmnialMedia>;\r\n  currency: string;\r\n  ratingsCount: number;\r\n  ratingsValue: number;\r\n  reviews: Review[];\r\n  shortDescription: string;\r\n  fullDescription: string;\r\n  disableBuyButton: boolean;\r\n  disableWishlistButton: boolean;\r\n  markAsNew: boolean;\r\n  productType: string;\r\n  stockQuantity: number;\r\n  availability: string;\r\n  weight: number;\r\n  manufacturerName: string;\r\n  canonicalCategoryId: number;\r\n  categoryTemplateId: number;\r\n  attributes: ProductAttribute[];\r\n  cartQuantity: number; // The number to be added to the cart\r\n  hasAttributes: boolean; // We will know if this is a Bundle\r\n  attributeInfo: string; // For display in the cart\r\n  attributeSummary: string; // For alt display in the cart\r\n  attributeXml: string; // For increment, decrement from the cart\r\n  categoryIds: number[];\r\n  canonical: string;\r\n  multiBuy: boolean;\r\n  tierPrices: TierPrice[];\r\n  manufacturer: Manufacturer;\r\n  allowBackInStockSubscriptions: boolean;\r\n  youTubeVideoAttributes: string[];\r\n  videos: OmnialVideo[];\r\n  tabs: ProductTab[];\r\n\r\n  selectAttributes: SelectAttribute[];\r\n  specifications: ProductSpecification[];\r\n  discounts: Discount[];\r\n  published: boolean;\r\n}\r\n\r\nexport class SelectAttribute {\r\n  attributeId: number;\r\n  optionId: number;\r\n  selected: boolean;\r\n  name: string;\r\n  content: string;\r\n  noSelected: number; // For MultiSelect customisations\r\n  productId: number; // For MultiSelect customisations\r\n}\r\n\r\nexport class ProductOption {\r\n  id: number;\r\n  productAttributeMappingId: number;\r\n  attributeValueTypeId: number;\r\n  associatedProductId: number;\r\n  name: string;\r\n  colorSquaresRgb: string;\r\n  imageSquaresPictureId: number;\r\n  afterpayPrice: number;\r\n  priceAdjustment: number;\r\n  priceAdjustmentUsePercentage: boolean;\r\n  weightAdjustment: number;\r\n  cost: number;\r\n  customerEntersQty: boolean;\r\n  quantity: number;\r\n  isPreSelected: boolean;\r\n  displayOrder: number;\r\n  pictureId: number;\r\n  attributeValueType: number;\r\n  valueType: string;\r\n  selected: boolean;\r\n}\r\n\r\nexport class TierPrice {\r\n  productId: number;\r\n  storeId: number;\r\n  customerRoleId: number;\r\n  quantity: number;\r\n  price: number;\r\n  startDate: string;\r\n  endDate: string;\r\n}\r\n\r\nexport class ProductTab {\r\n  systemName: string;\r\n  displayName: string;\r\n  description: string;\r\n  displayOrder: number;\r\n}\r\n\r\nexport class ProductSpecification {\r\n  id: number;\r\n  specificationAttributeId: number;\r\n  specificationAttributeName: string;\r\n  valueRaw: string;\r\n  colorSquaresRgb: string;\r\n  pictureId: number;\r\n  imageUrl: string;\r\n  displayOrder: number;\r\n  attributeTypeId: number;\r\n}\r\n\r\nexport class ProductSlide {\r\n  imgUrl: string;\r\n  index: number;\r\n  imageIndex: number;\r\n  youTubeRef: string;\r\n  isVideo: boolean;\r\n  alt: string;\r\n}\r\n\r\nexport class ProductExtra {\r\n  id: number;\r\n  product: Product;  // For admin display only\r\n  documents: ProductDocument[];\r\n  videos: ProductVideo[];\r\n}\r\n\r\nexport class ProductDocument {\r\n  id: number;\r\n  document: OmnialMedia;\r\n  documentId: number;\r\n  documentUrl: string;\r\n  documentName: string;\r\n  pictureId: number;\r\n  pictureUrl: string;\r\n  documentTypeId: number;\r\n  documentType: ProductDocumentType;\r\n  documentIntro: string;\r\n  displayOrder: number;\r\n}\r\n\r\nexport class ProductDocumentType {\r\n  id: number;\r\n  title: number;\r\n  displayOrder: number;\r\n}\r\n\r\nexport class ProductVideo {\r\n  id: number;\r\n  video: OmnialMedia;\r\n  videoId: number;\r\n  videoUrl: string;\r\n  videoName: string;\r\n  pictureId: number;\r\n  pictureUrl: string;\r\n  videoIntro: string;\r\n  displayOrder: number;\r\n}\r\n", "import { State, Country } from \"../order/country.model\";\r\n\r\nexport class KlaviyoAddToCartInformation {\r\n    $value: number;\r\n    AddedItemProductName: string;\r\n    AddedItemProductID: number;\r\n    AddedItemSKU: string;\r\n    AddedItemCategories: string[];\r\n    AddedItemImageURL: string;\r\n    AddedItemURL: string;\r\n    AddedItemPrice: number;\r\n    AddedItemQuantity: number;\r\n    ItemNames: string[];\r\n    CheckoutURL: string;\r\n    Items: string[];\r\n}\r\n\r\nexport class KlaviyoCustomer {\r\n    $email: string;\r\n    $first_name: string;\r\n    $last_name: string;\r\n    $phone_number: string;\r\n    $address1: string;\r\n    $address2: string;\r\n    $city: string;\r\n    $region: State;\r\n    $country: Country;\r\n    $organization: string;\r\n    $zip: string;\r\n}\r\n\r\nexport class KlaviyoStartedCheckout {\r\n    $event_id: number;\r\n    $value: number;\r\n    ItemNames: string[];\r\n    CheckoutURL: string;\r\n    Categories: string[];\r\n    Items: string[];\r\n}\r\n\r\nexport class KlaviyoTrackViewedItem {\r\n    Title: string;\r\n    ItemId: number;\r\n    Categories: string[];\r\n    ImageUrl: string;\r\n    Url: string;\r\n    Metadata: KlaviyoTrackViewedItemMeta;\r\n}\r\n\r\nexport class KlaviyoTrackViewedItemMeta {\r\n    Brand: string;\r\n    Price: number;\r\n    CompareAtPrice: number;\r\n}\r\n\r\nexport class KlaviyoProductDetails {\r\n    ProductName: string;\r\n    ProductID: number;\r\n    Categories: string[];\r\n    ImageURL: string;\r\n    URL: string;\r\n    Brand: string;\r\n    Price: number;\r\n    CompareAtPrice: number;\r\n}\r\n\r\nexport class KlaviyoCartItem {\r\n    ProductID: string;\r\n    SKU: string;\r\n    ProductName: string;\r\n    Quantity: number;\r\n    ItemPrice: number;\r\n    RowTotal: number;\r\n    ProductURL: string;\r\n    ImageURL: string;\r\n    Categories: string[];\r\n    Brand: string;\r\n}\r\n", "import { Injectable, OnDestroy } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Subscription } from 'rxjs';\r\nimport { ProductDetail, Product } from 'src/@omnial/_models/catalog/product.model';\r\nimport { Customer } from 'src/@omnial/_models/customer/customer.model';\r\nimport { KlaviyoCustomer, KlaviyoStartedCheckout, KlaviyoProductDetails, KlaviyoTrackViewedItem, KlaviyoTrackViewedItemMeta, KlaviyoAddToCartInformation, KlaviyoCartItem } from 'src/@omnial/_models/external/klaviyo.model';\r\nimport { SiteMapItem } from 'src/@omnial/_models/navigation/site-map.model';\r\nimport { Order } from 'src/@omnial/_models/order/order.model';\r\nimport { environment } from 'src/environments/environment';\r\nimport { SiteMapService } from '../navigation/sitemap.service';\r\nimport { RepositoryService } from '../repository.service';\r\nimport { ScriptLoaderService } from './script-load.service';\r\n\r\ndeclare var _learnq: any;\r\n\r\n@Injectable()\r\nexport class KlaviyoService implements OnDestroy {\r\n  private subscriptions: Subscription[] = [];\r\n\r\n  constructor(\r\n    private router: Router,\r\n    public scriptLoaderService: ScriptLoaderService,\r\n    private sitemapService: SiteMapService,\r\n    private repoService: RepositoryService) { }\r\n\r\n  ngOnDestroy(): void {\r\n    if (this.subscriptions && this.subscriptions.length > 0) {\r\n      this.subscriptions.forEach((sub) => { sub.unsubscribe(); });\r\n    }\r\n  }\r\n\r\n  public identify(result: Customer): void {\r\n    if (!result?.email) {\r\n      return;\r\n    }\r\n    const customer = result.shippingAddress;\r\n    const customerData = new KlaviyoCustomer();\r\n    customerData.$email = result.email;\r\n    customerData.$first_name = customer?.firstName;\r\n    customerData.$last_name = customer?.lastName;\r\n    customerData.$phone_number = customer?.phoneNumber;\r\n    customerData.$address1 = customer?.address1;\r\n    customerData.$address2 = customer?.address2;\r\n    customerData.$city = customer?.city;\r\n    customerData.$region = customer?.state;\r\n    customerData.$country = customer?.country;\r\n    customerData.$organization = customer?.company;\r\n    customerData.$zip = customer?.zipPostalCode;\r\n    this.pushToKlaviyo('', customerData, 'identify');\r\n  }\r\n\r\n  public startCheckout(customer: Customer): void {\r\n    if (!customer) {\r\n      return;\r\n    }\r\n    if (!customer.cartList) {\r\n      return;\r\n    }\r\n    if (customer.cartList.length === 0) {\r\n      return;\r\n    }\r\n    this.subscriptions.push(this.sitemapService.siteMap.subscribe({\r\n      next: (res) => {\r\n        const sitemap = res as SiteMapItem[];\r\n        if (sitemap && sitemap.length > 0) {\r\n          // Build a product detail for the categories of ALL the cart items\r\n          const product = new ProductDetail();\r\n          product.categoryIds = [];\r\n          for (const cartItem of customer.cartList) {\r\n            if (cartItem.categoryIds && cartItem.categoryIds.length > 0) {\r\n              for (const catId of cartItem.categoryIds) {\r\n                const existing = product.categoryIds.find(i => i === catId);\r\n                if (!existing) {\r\n                  product.categoryIds.push(catId);\r\n                }\r\n              }\r\n            }\r\n          }\r\n          const categories = this.generateCategories(product, sitemap);\r\n          const cartItems = this.getCartItems(customer, sitemap);\r\n          const trackCheckout = new KlaviyoStartedCheckout();\r\n          trackCheckout.$event_id = Date.now();\r\n          trackCheckout.$value = customer?.orderTotals?.orderTotal;\r\n          trackCheckout.ItemNames = cartItems.cartItemNames;\r\n          trackCheckout.CheckoutURL = `${environment.baseUrl}/checkout`;\r\n          trackCheckout.Categories = categories;\r\n          trackCheckout.Items = cartItems.cartItems;\r\n          this.pushToKlaviyo('Started Checkout', trackCheckout, 'track');\r\n        }\r\n      }\r\n    }));\r\n  }\r\n\r\n  public viewProduct(product: ProductDetail, url: string): void {\r\n    if (!product) {\r\n      return;\r\n    }\r\n    this.subscriptions.push(this.sitemapService.siteMap.subscribe({\r\n      next: (res) => {\r\n        const sitemap = res as SiteMapItem[];\r\n        if (sitemap && sitemap.length > 0) {\r\n          const categories = this.generateCategories(product, sitemap);\r\n          const productDetails = new KlaviyoProductDetails();\r\n          productDetails.ProductName = product.name;\r\n          productDetails.ProductID = product.id;\r\n          productDetails.Categories = categories;\r\n          productDetails.ImageURL = product.images && product.images.length > 0 ? product.images[0].medium : '';\r\n          productDetails.URL = url;\r\n          productDetails.Brand = product.manufacturer?.name;\r\n          productDetails.Price = product.newPrice;\r\n          productDetails.CompareAtPrice = product.oldPrice;\r\n          this.pushToKlaviyo('Viewed Product', productDetails, 'track');\r\n\r\n          const viewedItem = new KlaviyoTrackViewedItem();\r\n          viewedItem.Title = productDetails.ProductName;\r\n          viewedItem.ItemId = productDetails.ProductID;\r\n          viewedItem.Categories = categories;\r\n          viewedItem.ImageUrl = productDetails.ImageURL;\r\n          viewedItem.Url = productDetails.URL;\r\n          viewedItem.Metadata = new KlaviyoTrackViewedItemMeta();\r\n          viewedItem.Metadata.Brand = productDetails.Brand;\r\n          viewedItem.Metadata.Price = productDetails.Price;\r\n          viewedItem.Metadata.CompareAtPrice = productDetails.CompareAtPrice;\r\n          this.pushToKlaviyo('', viewedItem, 'trackViewedItem'); // ... TODO this throws an error, need to contact Klayvio support\r\n        }\r\n      }\r\n    }));\r\n  }\r\n\r\n  public addCartDetail(product: ProductDetail, quantity: number, customer: Customer): void {\r\n    this.addToCart(null, product, quantity, customer);\r\n  }\r\n\r\n  public addCart(product: Product, quantity: number, customer: Customer): void {\r\n    this.addToCart(product, null, quantity, customer);\r\n  }\r\n\r\n  public placedOrder(order: Order): void {\r\n    if (order && environment.klayvioActive) {\r\n      this.subscriptions.push(this.repoService.create('Account/Klaviyo/TrackOrder', order).subscribe());\r\n    }\r\n  }\r\n\r\n  private addToCart(productData: Product, productDetail: ProductDetail, quantity: number, customer: Customer): void {\r\n    if (!productData && !productDetail) {\r\n      return;\r\n    }\r\n    this.subscriptions.push(this.sitemapService.siteMap.subscribe({\r\n      next: (res) => {\r\n        const sitemap = res as SiteMapItem[];\r\n        if (sitemap && sitemap.length > 0) {\r\n          const categories = this.generateCategories(productDetail, sitemap);\r\n          let product: any;\r\n          product = productData;\r\n          if (productDetail) {\r\n            product = productDetail;\r\n          }\r\n          const items = this.getCartItems(customer, sitemap);\r\n          const cartData = new KlaviyoAddToCartInformation();\r\n          cartData.$value = product.newPrice;\r\n          cartData.AddedItemProductName = product.name;\r\n          cartData.AddedItemProductID = product.id;\r\n          cartData.AddedItemSKU = product.sku;\r\n          cartData.AddedItemCategories = categories;\r\n          cartData.AddedItemImageURL = product.images && product.images.length > 0 ? product.images[0].medium : '';\r\n          cartData.AddedItemURL = environment.baseUrl + this.router.url;\r\n          cartData.AddedItemPrice = product.newPrice;\r\n          cartData.AddedItemQuantity = quantity;\r\n          cartData.ItemNames = items.cartItemNames;\r\n          cartData.CheckoutURL = `${environment.baseUrl}/checkout`;\r\n          cartData.Items = items.cartItems;\r\n          this.pushToKlaviyo('Added to Cart', cartData, 'track');\r\n        }\r\n      }\r\n    }));\r\n  }\r\n\r\n  private getCartItems(customer: Customer, sitemap: SiteMapItem[]): any {\r\n    if (!customer) {\r\n      return;\r\n    }\r\n    const items = [];\r\n    const itemNames = [];\r\n    customer.cartList.forEach(cartItem => {\r\n      itemNames.push(cartItem.name);\r\n      const orderItem = new KlaviyoCartItem();\r\n      orderItem.ProductID = cartItem.id.toString();\r\n      orderItem.SKU = cartItem.sku;\r\n      orderItem.ProductName = cartItem.name;\r\n      orderItem.Quantity = cartItem.cartCount;\r\n      orderItem.ItemPrice = cartItem.newPrice;\r\n      orderItem.RowTotal = cartItem.valuePrice * cartItem.cartCount;\r\n      orderItem.ProductURL = `${environment.baseUrl}/products/${cartItem.seName}`;\r\n      orderItem.ImageURL = cartItem.images && cartItem.images.length > 0 ? cartItem.images[0].medium : '';\r\n      const product = new ProductDetail();\r\n      product.categoryIds = cartItem.categoryIds;\r\n      orderItem.Categories = this.generateCategories(product, sitemap);\r\n      items.push(orderItem);\r\n    });\r\n    return { cartItems: items, cartItemNames: itemNames };\r\n  }\r\n\r\n  private pushToKlaviyo(event: string, object: any, type: string): void {\r\n    if (!environment.klayvioActive) {\r\n      return;\r\n    }\r\n    this.scriptLoaderService.load('Klayvio');\r\n    this.subscriptions.push(this.scriptLoaderService.scripts.subscribe(\r\n      res => {\r\n        if (res && res.find(s => s.ref === 'Klayvio')?.loaded) {\r\n          // Set timeout as there is a chain of scripts for Klaviyo to load\r\n          setTimeout(() => {\r\n            try {\r\n              if (event) {\r\n                _learnq.push([type, event, object]);\r\n              } else {\r\n                _learnq.push([type, object]);\r\n              }\r\n            }\r\n            catch (e) {\r\n              console.log('Klayvio Error');\r\n              console.log(e);\r\n            }\r\n          }, 200);\r\n        }\r\n      }));\r\n  }\r\n\r\n  private generateCategories(product: ProductDetail, sitemap: SiteMapItem[]): string[] {\r\n    const categories: string[] = [];\r\n    if (!product) {\r\n      return categories;\r\n    }\r\n    const categoryIds = product.categoryIds;\r\n    if (categoryIds && categoryIds.length > 0) {\r\n      for (const catId of categoryIds) {\r\n        if (catId !== environment.rootCatId) {\r\n          const cat = sitemap.find(i => i.categoryId === catId);\r\n          if (cat) {\r\n            categories.push(cat.title);\r\n          }\r\n        }\r\n      }\r\n    }\r\n    return categories;\r\n  }\r\n}\r\n", "import { Injectable, OnDestroy } from '@angular/core';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport { CookieService } from 'ngx-cookie-service';\r\nimport { NgxSpinnerService } from 'ngx-spinner';\r\nimport { BehaviorSubject, Observable, Subscription } from 'rxjs';\r\nimport { Product, ProductDetail } from 'src/@omnial/_models/catalog/product.model';\r\nimport { Address } from 'src/@omnial/_models/customer/address.model';\r\nimport { Customer } from 'src/@omnial/_models/customer/customer.model';\r\nimport { Order } from 'src/@omnial/_models/order/order.model';\r\nimport { Shipment } from 'src/@omnial/_models/order/shipment.model';\r\nimport { AppSettings } from 'src/app/app.settings';\r\nimport { environment } from 'src/environments/environment';\r\nimport { KlaviyoService } from '../external/klaviyo.service';\r\nimport { RepositoryService } from '../repository.service';\r\n\r\n@Injectable()\r\nexport class CustomerService implements OnDestroy {\r\n  public customer: BehaviorSubject<Customer> = new BehaviorSubject<Customer>(null);\r\n  private $customer: Customer = null;\r\n  private subscriptions: Subscription[] = [];\r\n\r\n  constructor(\r\n    public repoService: RepositoryService,\r\n    public settings: AppSettings,\r\n    public snackBar: MatSnackBar,\r\n    private klaviyoService: KlaviyoService,\r\n    private spinner: NgxSpinnerService,\r\n    private cookieService: CookieService) { }\r\n\r\n  ngOnDestroy(): void {\r\n    if (this.subscriptions && this.subscriptions.length > 0) {\r\n      this.subscriptions.forEach((sub) => { sub.unsubscribe(); });\r\n    }\r\n  }\r\n\r\n  public load(): void {\r\n    const customerGuid = this.getCustomerGuid();\r\n    if (customerGuid) {\r\n      this.subscriptions.push(this.repoService.getData(`Customer/${customerGuid}`).subscribe({\r\n        next: (res) => {\r\n          if (res) {\r\n            this.$customer = res as Customer;\r\n            this.klaviyoService.identify(this.$customer);\r\n            this.saveCustomerCookie(this.$customer);\r\n            this.customer.next(res as Customer);\r\n          } else {\r\n            this.$customer = null;\r\n            this.customer.next(null);\r\n          }\r\n        },\r\n        error: () => {\r\n          this.$customer = null;\r\n          this.customer.next(null);\r\n        }\r\n      }));\r\n    } else {\r\n      this.$customer = null;\r\n      this.customer.next(null);\r\n    }\r\n  }\r\n\r\n  public update(customer: Customer): void {\r\n    this.$customer = customer;\r\n    this.customer.next(customer);\r\n  }\r\n\r\n  public currentCustomer(): Observable<Customer> {\r\n    return new Observable((observer) => {\r\n      if (this.$customer) {\r\n        observer.next(this.$customer);\r\n        observer.complete();\r\n        return;\r\n      }\r\n      const customerGuid = this.getCustomerGuid();\r\n      if (!customerGuid) {\r\n        return;\r\n      }\r\n      this.subscriptions.push(this.repoService.getData(`Customer/${customerGuid}`).subscribe({\r\n        next: (res) => {\r\n          this.$customer = res as Customer;\r\n          this.saveCustomerCookie(this.$customer);\r\n          this.customer.next(this.$customer);\r\n          observer.next(this.$customer);\r\n          observer.complete();\r\n        },\r\n        error: (e) => {\r\n          const message = 'Sorry we could not get your customer account, please try again later';\r\n          this.snackBar.open(message, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 3000 });\r\n          this.$customer = null;\r\n          this.customer.next(null);\r\n          observer.error(e);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public newCustomer(): Observable<Customer> {\r\n    return new Observable((observer) => {\r\n      this.subscriptions.push(this.repoService.create('Customer', null).subscribe({\r\n        next: (res) => {\r\n          this.$customer = res as Customer;\r\n          this.saveCustomerCookie(this.$customer);\r\n          this.customer.next(this.$customer);\r\n          observer.next(this.$customer);\r\n          observer.complete();\r\n        },\r\n        error: (e) => {\r\n          const message = 'Sorry we could not create you a guest customer account, please try again later';\r\n          this.snackBar.open(message, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 3000 });\r\n          this.$customer = null;\r\n          this.customer.next(null);\r\n          observer.error(e);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public saveCustomer(customer: Customer): Observable<Customer> {\r\n    return new Observable((observer) => {\r\n      this.subscriptions.push(this.repoService.update('Customer', customer).subscribe({\r\n        next: (res) => {\r\n          this.$customer = res as Customer;\r\n          this.klaviyoService.identify(this.$customer);\r\n          this.saveCustomerCookie(this.$customer);\r\n          this.customer.next(res as Customer);\r\n          observer.next(this.$customer);\r\n          observer.complete();\r\n        },\r\n        error: () => {\r\n          const message = 'Sorry we could not save your customer account, please try again later';\r\n          this.snackBar.open(message, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 3000 });\r\n          this.$customer = null;\r\n          this.customer.next(null);\r\n          observer.next(null);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public getCustomerGuid(): string {\r\n    try {\r\n      if (this.cookieService.check(environment.customerCookieKey)) {\r\n        localStorage.setItem(environment.customerCookieKey, this.cookieService.get(environment.customerCookieKey));\r\n        return this.cookieService.get(environment.customerCookieKey);\r\n      } else {\r\n        setTimeout(() => {\r\n          if (this.cookieService.check(environment.customerCookieKey)) {\r\n            localStorage.setItem(environment.customerCookieKey, this.cookieService.get(environment.customerCookieKey));\r\n          }\r\n        }, 500);\r\n        return localStorage.getItem(environment.customerCookieKey);\r\n      }\r\n    } catch (e) {\r\n      return '';\r\n    }\r\n  }\r\n\r\n  public checkCustomerCookie(): boolean {\r\n    return this.cookieService.check(environment.customerCookieKey);\r\n  }\r\n\r\n  public clearCustomerCookies(): void {\r\n    localStorage.removeItem(environment.customerCookieKey);\r\n    const allCookies: { [key: string]: string } = this.cookieService.getAll();\r\n    for (const key of Object.keys(allCookies)) {\r\n      if (key === environment.customerCookieKey) {\r\n        this.cookieService.delete(key);\r\n      }\r\n    }\r\n  }\r\n\r\n  public saveCustomerCookie(customer: Customer): void {\r\n    if (customer) {\r\n      this.$customer = customer;\r\n      this.clearCustomerCookies();\r\n      const now = new Date();\r\n      const year = now.getFullYear() + 1;\r\n      const month = now.getMonth();\r\n      const day = now.getDate();\r\n      const expires = new Date(year, month, day);\r\n      try {\r\n        this.cookieService.set(environment.customerCookieKey, customer.customerGuid, expires, null, environment.baseUrl, environment.cookieSecure, 'Strict');\r\n        localStorage.setItem(environment.customerCookieKey, customer.customerGuid);\r\n      } catch {\r\n        // If we have no cookie access we are a little stuffed - here for server rendering\r\n      }\r\n    }\r\n  }\r\n\r\n  public setGrid(view: string): void {\r\n    if (this.customer && this.$customer) {\r\n      this.$customer.gridView = view;\r\n      this.customer.next(this.$customer);\r\n    }\r\n  }\r\n\r\n  public getOrders(): Observable<Order[]> {\r\n    if (this.$customer?.customerGuid) {\r\n      this.spinner.show();\r\n      return new Observable((observer) => {\r\n        this.subscriptions.push(this.repoService.getData(`Customer/Orders/${this.$customer.customerGuid}`).subscribe({\r\n          next: (res) => {\r\n            this.spinner.hide();\r\n            observer.next(res as Order[]);\r\n            observer.complete();\r\n          },\r\n          error: (e) => {\r\n            this.spinner.hide();\r\n            const errMessage = 'Sorry we could get your orders at this time.';\r\n            this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 3000 });\r\n            observer.error(e);\r\n            observer.complete();\r\n          }\r\n        }));\r\n      });\r\n    }\r\n  }\r\n\r\n  public getRecentProducts(customerGuid: string): Observable<ProductDetail[]> {\r\n    return new Observable((observer) => {\r\n      this.subscriptions.push(this.repoService.getData(`Customer/RecentProducts/${customerGuid}`).subscribe({\r\n        next: (res) => {\r\n          observer.next(res as ProductDetail[]);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public getShipments(): Observable<Shipment[]> {\r\n    if (this.$customer?.customerGuid) {\r\n      this.spinner.show();\r\n      return new Observable((observer) => {\r\n        this.subscriptions.push(this.repoService.getData(`Customer/Shipments/${this.$customer.customerGuid}`).subscribe({\r\n          next: (res) => {\r\n            this.spinner.hide();\r\n            observer.next(res as Shipment[]);\r\n            observer.complete();\r\n          },\r\n          error: () => {\r\n            this.spinner.hide();\r\n            const errMessage = 'Sorry we could get your shipment information at this time.';\r\n            this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 3000 });\r\n            observer.next(null);\r\n            observer.complete();\r\n          }\r\n        }));\r\n      });\r\n    }\r\n  }\r\n\r\n  public createAddress(address: Address): Observable<Address> {\r\n    return new Observable((observer) => {\r\n      this.subscriptions.push(this.repoService.create(`Customer/Address/${this.$customer.customerGuid}`, address).subscribe({\r\n        next: (res) => {\r\n          observer.next(res as Address);\r\n          observer.complete();\r\n        },\r\n        error: (e) => {\r\n          const errMessage = 'Error creating address';\r\n          this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 6000 });\r\n          observer.error(e);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public updateAddress(address: Address): Observable<Address> {\r\n    return new Observable((observer) => {\r\n      this.subscriptions.push(this.repoService.update(`Customer/Address/${this.$customer.customerGuid}`, address).subscribe({\r\n        next: (res) => {\r\n          observer.next(res as Address);\r\n          observer.complete();\r\n        },\r\n        error: (e) => {\r\n          const errMessage = 'Error saving address';\r\n          this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 6000 });\r\n          observer.error(e);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public deleteAddress(address: Address): Observable<boolean> {\r\n    return new Observable((observer) => {\r\n      this.subscriptions.push(this.repoService.delete(`Customer/Address/${this.$customer.customerGuid}/${address.id}`).subscribe({\r\n        next: (res) => {\r\n          const success = res as boolean;\r\n          if (!success) {\r\n            const errMessage = 'Problem deleting address';\r\n            this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 6000 });\r\n          }\r\n          observer.next(success);\r\n          observer.complete();\r\n        },\r\n        error: () => {\r\n          const errMessage = 'Error deleting address';\r\n          this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 6000 });\r\n          observer.next(false);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public setShippingAddress(address: Address): Observable<Customer> {\r\n    return new Observable((observer) => {\r\n      this.subscriptions.push(this.repoService.update(`Customer/Address/SetShipping/${this.$customer.customerGuid}`, address).subscribe({\r\n        next: (res) => {\r\n          this.$customer = res as Customer;\r\n          this.customer.next(this.$customer);\r\n          observer.next(this.$customer);\r\n          observer.complete();\r\n        },\r\n        error: (e) => {\r\n          const errMessage = 'Error setting shipping address';\r\n          this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 6000 });\r\n          observer.error(e);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public setBillingAddress(address: Address): Observable<Customer> {\r\n    return new Observable((observer) => {\r\n      this.subscriptions.push(this.repoService.update(`Customer/Address/SetBilling/${this.$customer.customerGuid}`, address).subscribe({\r\n        next: (res) => {\r\n          this.update(res as Customer);\r\n          observer.next(this.$customer);\r\n          observer.complete();\r\n        },\r\n        error: (e) => {\r\n          const errMessage = 'Error setting shipping address';\r\n          this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 6000 });\r\n          observer.error(e);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public updateCustomerShipping(customerGuid: string, shippingAddress: Address): Observable<Address> {\r\n    return new Observable((observer) => {\r\n      this.subscriptions.push(this.repoService.update(`Customer/Shipping/${customerGuid}`, shippingAddress).subscribe({\r\n        next: (res) => {\r\n          this.load();\r\n          observer.next(res as Address);\r\n          observer.complete();\r\n        },\r\n        error: (e) => {\r\n          const errMessage = 'Error saving customer shipping address. ' + e;\r\n          this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 6000 });\r\n          observer.error(null);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public updateCustomerBilling(customerGuid: string, shippingAddress: Address): Observable<Address> {\r\n    return new Observable((observer) => {\r\n      if (!this.$customer.billingAddress) {\r\n        this.$customer.billingAddress = new Address();\r\n        this.$customer.billingAddress.country = null; // We will be resetting the billing address\r\n      }\r\n      this.subscriptions.push(this.repoService.update(`Customer/Billing/${customerGuid}`, shippingAddress).subscribe({\r\n        next: (res) => {\r\n          this.load();\r\n          observer.next(res as Address);\r\n          observer.complete();\r\n        },\r\n        error: (e) => {\r\n          const errMessage = 'Error saving customer billing address';\r\n          this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 6000 });\r\n          observer.error(e);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public resetCustomerBilling(): Observable<boolean> {\r\n    return new Observable((observer) => {\r\n      this.subscriptions.push(this.repoService.update(`Customer/BillingReset/${this.$customer.customerGuid}`, '{}').subscribe({\r\n        next: (res) => {\r\n          this.$customer = res as Customer;\r\n          this.customer.next(this.$customer);\r\n          observer.next(true);\r\n          observer.complete();\r\n        },\r\n        error: () => {\r\n          const errMessage = 'Error saving customer billing address';\r\n          this.snackBar.open(errMessage, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 6000 });\r\n          observer.next(false);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public backInStock(customerGuid: string, product: ProductDetail): Observable<boolean> {\r\n    return new Observable((observer) => {\r\n      this.subscriptions.push(this.repoService.update(`Customer/BackInStock/${customerGuid}`, product).subscribe({\r\n        next: (res) => {\r\n          const result = res as boolean;\r\n          observer.next(result);\r\n          observer.complete();\r\n        },\r\n        error: (err) => {\r\n          console.log(err);\r\n          observer.next(false);\r\n          observer.complete();\r\n        }\r\n      }));\r\n    });\r\n  }\r\n\r\n  public addProductToCart(product: any, quantity: number): void { // Type any so we can pass Product or Detail Product\r\n    if (this.customer && this.$customer) {\r\n      const cartProduct = new Product();\r\n      cartProduct.cartQuantity = quantity;\r\n      cartProduct.name = `Please wait, checking price and stock for ${product.name}`;\r\n      cartProduct.newPriceDisplay = \"Wait\";\r\n      cartProduct.oldPriceDisplay = \"Wait\";\r\n      cartProduct.images = product.images;\r\n      cartProduct.defaultImages = product.defaultImages;\r\n      this.$customer.cartList.push(cartProduct);\r\n      this.$customer.totalCartCount += quantity;\r\n      this.$customer.updatingCart = true;\r\n      this.customer.next(this.$customer);\r\n    }\r\n  }\r\n\r\n}\r\n", "import { Injectable, OnDestroy } from \"@angular/core\";\r\nimport { BehaviorSubject, Observable, Subscription } from \"rxjs\";\r\nimport { Category } from \"src/@omnial/_models/catalog/category.model\";\r\nimport { RepositoryStaticService } from \"../repository-static.service\";\r\nimport { RepositoryService } from \"../repository.service\";\r\nimport { MatSnackBar } from \"@angular/material/snack-bar\";\r\nimport { environment } from \"src/environments/environment\";\r\n\r\n@Injectable()\r\nexport class CategoryService implements OnDestroy {\r\n  public categories: BehaviorSubject<Category[]> = new BehaviorSubject<Category[]>(null);\r\n  private $categories: Category[] = null;\r\n  private subscriptions: Subscription[] = [];\r\n  private useCache = environment.useCache;\r\n\r\n  constructor(public staticService: RepositoryStaticService,\r\n    public repoService: RepositoryService,\r\n    public snackBar: MatSnackBar) { }\r\n\r\n  public load(init?: Category[]): void {\r\n    if (init) {\r\n      this.$categories = init;\r\n      this.categories.next(this.$categories);\r\n      return;\r\n    }\r\n    if (!this.$categories) {\r\n      this.subscriptions.push(this.getCategories().subscribe({\r\n        next: (res: Category[]) => {\r\n          this.$categories = res;\r\n          this.categories.next(this.$categories);\r\n        },\r\n        error: () => {\r\n          this.$categories = null;\r\n          this.categories.next(this.$categories);\r\n        }\r\n      }));\r\n    } else{\r\n      this.categories.next(this.$categories);\r\n    }\r\n  }\r\n\r\n  public getCategory(slug: string, bypassCache?: boolean): Observable<Category> {\r\n    return new Observable((observer) => {\r\n      if (this.useCache && !bypassCache) {\r\n        this.subscriptions.push(this.staticService.getBySeName('Category', slug).subscribe({\r\n          next: (staticRes) => {\r\n            if (staticRes) {\r\n              observer.next(staticRes as Category);\r\n              observer.complete();\r\n            } else {\r\n              this.subscriptions.push(this.repoService.getData(`Category/${slug}`).subscribe({\r\n                next: (apiRes) => {\r\n                  observer.next(apiRes as Category);\r\n                  observer.complete();\r\n                },\r\n                error: (e) => {\r\n                  const message = 'Sorry we could not get the products for this page, please try again later';\r\n                  this.snackBar.open(message, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 3000 });\r\n                  observer.error(e);\r\n                  observer.complete();\r\n                }\r\n              }));\r\n            }\r\n          },\r\n          error: () => {\r\n            this.subscriptions.push(this.repoService.getData(`Category/${slug}`).subscribe({\r\n              next: (apiRes) => {\r\n                observer.next(apiRes as Category);\r\n                observer.complete();\r\n              },\r\n              error: (e) => {\r\n                const message = 'Sorry we could not get the products for this page, please try again later';\r\n                this.snackBar.open(message, 'X', { panelClass: ['error'], verticalPosition: 'top', duration: 3000 });\r\n                observer.error(e);\r\n                observer.complete();\r\n              }\r\n            }));\r\n          }\r\n        }));\r\n      } else {\r\n        this.subscriptions.push(this.repoService.getData(`Category/${slug}`).subscribe({\r\n          next: (resNoCache) => {\r\n            observer.next(resNoCache as Category);\r\n            observer.complete();\r\n          },\r\n          error: (e) => {\r\n            observer.error(e);\r\n            observer.complete();\r\n          }\r\n        }));\r\n      }\r\n    });\r\n  }\r\n\r\n  public getCategories(bypassCache?: boolean): Observable<Category[]> {\r\n    return new Observable((observer) => {\r\n      if (this.useCache && !bypassCache) {\r\n        this.subscriptions.push(this.staticService.get('Category').subscribe({\r\n          next: (staticRes) => {\r\n            if (staticRes) {\r\n              observer.next(staticRes as Category[]);\r\n              observer.complete();\r\n            } else {\r\n              this.subscriptions.push(this.repoService.getData('Category').subscribe({\r\n                next: (apiRes) => {\r\n                  observer.next(apiRes as Category[]);\r\n                  observer.complete();\r\n                },\r\n                error: (e) => {\r\n                  observer.error(e);\r\n                  observer.complete();\r\n                }\r\n              }));\r\n            }\r\n          },\r\n          error: () => {\r\n            this.subscriptions.push(this.repoService.getData('Category').subscribe({\r\n              next: (apiRes) => {\r\n                observer.next(apiRes as Category[]);\r\n                observer.complete();\r\n              },\r\n              error: (e) => {\r\n                observer.error(e);\r\n                observer.complete();\r\n              }\r\n            }));\r\n          }\r\n        }));\r\n      } else {\r\n        this.subscriptions.push(this.repoService.getData('Category').subscribe({\r\n          next: (resNoCache) => {\r\n            observer.next(resNoCache as Category[]);\r\n            observer.complete();\r\n          },\r\n          error: (e) => {\r\n            observer.error(e);\r\n            observer.complete();\r\n          }\r\n        }));\r\n      }\r\n    });\r\n  }\r\n\r\n  ngOnDestroy(): void {\r\n    if (this.subscriptions && this.subscriptions.length > 0) {\r\n      this.subscriptions.forEach((sub) => { sub.unsubscribe() });\r\n    }\r\n  }\r\n}\r\n", "export class GA4Item {\r\n  item_id: string;\r\n  item_name: string;\r\n  affiliation: string;\r\n  coupon: string;\r\n  currency: string;\r\n  discount: number;\r\n  index: number;\r\n  item_brand: string;\r\n  item_category: string;\r\n  item_category2: string;\r\n  item_category3: string;\r\n  item_category4: string;\r\n  item_category5: string;\r\n  item_list_id: string;\r\n  item_list_name: string;\r\n  item_variant: string;\r\n  location_id: string;\r\n  price: number; // Without any discounts\r\n  quantity: number;\r\n}\r\n", "import { GA4Item } from \"./ga4.item.model\";\r\n\r\n\r\nexport class GA4AddPaymentInfo {\r\n  coupon: string;\r\n  currency: string;\r\n  payment_type: string;\r\n  value: number;\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4AddShippingInfo {\r\n  coupon: string;\r\n  currency: string;\r\n  shipping_tier: string;\r\n  value: number;\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4AddToCart {\r\n  currency: string;\r\n  value: number;\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4AddToWishList {\r\n  currency: string;\r\n  value: number;\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4BeginCheckout {\r\n  coupon: string;\r\n  currency: string;\r\n  value: number;\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4EarnVirtualCurrency {\r\n  virtual_currency_name: string;\r\n  value: number;\r\n}\r\n\r\nexport class GA4GenerateLead {\r\n  currency: string;\r\n  value: number;\r\n}\r\n\r\nexport class GA4JoinGroup {\r\n  group_id: string;\r\n}\r\n\r\nexport class GA4LevelEnd {\r\n  level_name: string;\r\n  success: boolean;\r\n}\r\n\r\nexport class GA4LevelStart {\r\n  level_name: string;\r\n}\r\n\r\nexport class GA4LevelUp {\r\n  level: number;\r\n  character: string;\r\n}\r\n\r\nexport class GA4Login {\r\n  method: string;\r\n}\r\n\r\nexport class GA4PostScore {\r\n  score: number;\r\n  level: number;\r\n  character: string;\r\n}\r\n\r\nexport class GA4Purchase {\r\n  affiliation: string;\r\n  coupon: string;\r\n  currency: string;\r\n  shipping: number;\r\n  tax: number;\r\n  transaction_id: string;\r\n  value: number; // Value excl tax and shipping but including discounts (e.g. SubTotal)\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4Refund {\r\n  affiliation: string;\r\n  coupon: string;\r\n  currency: string;\r\n  shipping: number;\r\n  tax: number;\r\n  transaction_id: string;\r\n  value: number; // Value excl tax and shipping but including discounts (e.g. SubTotal)\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4RemoveFromCart {\r\n  currency: string;\r\n  value: number;\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4Search {\r\n  search_term: string;\r\n}\r\n\r\nexport class GA4SelectContent {\r\n  content_type: string;\r\n  item_id: string;\r\n}\r\n\r\nexport class GA4SelectItem {\r\n  item_list_id: string;\r\n  item_list_name: string;\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4SelectPromotion {\r\n  creative_name: string; // Could be set at item level\r\n  creative_slot: string; // Could be set at item level\r\n  item_list_id: string; // Could be set at item level\r\n  location_id: string; // Could be set at item level\r\n  promotion_id: string; // Could be set at item level\r\n  promotion_name: string; // Could be set at item level\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4Share {\r\n  method: string;\r\n  content_type: string;\r\n  item_id: string;\r\n}\r\n\r\nexport class GA4SignUp {\r\n  method: string;\r\n}\r\n\r\nexport class GA4SpendVirtualCurrency {\r\n  virtual_currency_name: string;\r\n  item_name: string;\r\n  value: number;\r\n}\r\n\r\nexport class GA4UnlockAchievement {\r\n  achievement_id: string;\r\n}\r\n\r\nexport class GA4ViewCart {\r\n  currency: string;\r\n  value: number;\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4ViewItem {\r\n  currency: string;\r\n  value: number;\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4ViewItemList {\r\n  item_list_id: string;\r\n  item_list_name: string;\r\n  items: GA4Item[] = [];\r\n}\r\n\r\nexport class GA4ViewPromotion {\r\n  creative_name: string; // Could be set at item level\r\n  creative_slot: string; // Could be set at item level\r\n  location_id: string; // Could be set at item level\r\n  promotion_id: string; // Could be set at item level\r\n  promotion_name: string; // Could be set at item level\r\n  items: GA4Item[] = [];\r\n}\r\n", "import { Injectable, OnDestroy } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { Product, ProductDetail } from 'src/@omnial/_models/catalog/product.model';\r\nimport { Order, OrderItem } from 'src/@omnial/_models/order/order.model';\r\nimport { GA4Item } from 'src/@omnial/_models/tracking/ga4.item.model';\r\nimport { Customer } from 'src/@omnial/_models/customer/customer.model';\r\nimport { Category } from 'src/@omnial/_models/catalog/category.model';\r\nimport { CategoryService } from '../catalog/category.service';\r\nimport { ShippingOption } from 'src/@omnial/_models/order/shipping-option.model';\r\nimport {\r\n  GA4AddPaymentInfo,\r\n  GA4AddShippingInfo,\r\n  GA4AddToCart,\r\n  GA4AddToWishList,\r\n  GA4BeginCheckout,\r\n  GA4EarnVirtualCurrency,\r\n  GA4GenerateLead,\r\n  GA4JoinGroup,\r\n  GA4LevelEnd,\r\n  GA4LevelStart,\r\n  GA4LevelUp,\r\n  GA4Login,\r\n  GA4PostScore,\r\n  GA4Purchase,\r\n  GA4Refund,\r\n  GA4RemoveFromCart,\r\n  GA4Search,\r\n  GA4SelectContent,\r\n  GA4SelectItem,\r\n  GA4SelectPromotion,\r\n  GA4Share,\r\n  GA4SignUp,\r\n  GA4SpendVirtualCurrency,\r\n  GA4UnlockAchievement,\r\n  GA4ViewCart,\r\n  GA4ViewItem,\r\n  GA4ViewItemList,\r\n  GA4ViewPromotion\r\n} from 'src/@omnial/_models/tracking/ga4.events.model';\r\nimport { AppSettings } from 'src/app/app.settings';\r\nimport { environment } from 'src/environments/environment';\r\nimport { GtmPage } from 'src/@omnial/_models/external/gtm.model';\r\n\r\ndeclare global { interface Window { dataLayer: any; } }\r\n\r\n@Injectable()\r\nexport class GoogleGA4Service implements OnDestroy {\r\n  private subscriptions: Subscription[] = [];\r\n\r\n  constructor(public categoryService: CategoryService, public settings: AppSettings) {\r\n    window.dataLayer = window.dataLayer || {};\r\n  }\r\n\r\n  ngOnDestroy(): void {\r\n    if (this.subscriptions && this.subscriptions.length > 0) {\r\n      this.subscriptions.forEach((sub) => { sub.unsubscribe() });\r\n    }\r\n  }\r\n\r\n  public push(event: string, object: any) {\r\n    try {\r\n      if (object) {\r\n        window.dataLayer.push({ 'event': event, 'ecommerce': object });\r\n      } else {\r\n        window.dataLayer.push({ 'event': event });\r\n      }\r\n    } catch (error) {\r\n      console.log('!!! GA4 Error !!!!');\r\n      console.log(error);\r\n      console.log(object);\r\n    }\r\n  }\r\n\r\n  public pushPage(virtualPage: GtmPage) {\r\n    try {\r\n      window.dataLayer.push(virtualPage);\r\n    } catch (error) {\r\n      console.log('!!! GA4 Page Error !!!!');\r\n      console.log(error);\r\n    }\r\n  }\r\n\r\n  public pushAddPaymentInfo(customer: Customer, paymentType: string) {\r\n    const ga4Object = new GA4AddPaymentInfo();\r\n    ga4Object.coupon = customer?.discountCodes?.length > 0 ? customer.discountCodes[0] : '';\r\n    ga4Object.currency = customer?.cartList?.length > 0 ? customer.cartList[0].currency : environment.currencyCode;\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4AddPaymentInfo();\r\n        ga4Object.coupon = customer?.discountCodes?.length > 0 ? customer.discountCodes[0] : '';\r\n        ga4Object.currency = customer?.cartList?.length > 0 ? customer.cartList[0].currency : environment.currencyCode;\r\n        ga4Object.value = customer?.orderTotals?.orderTotal;\r\n        customer?.cartList?.forEach((item) => {\r\n          ga4Object.items.push(this.convertSimpleProduct(item, 1, item.cartQuantity, cats));\r\n        });\r\n        ga4Object.payment_type = paymentType;\r\n        this.push('add_payment_info', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushAddShippingInfo(customer: Customer, shippingOption: ShippingOption): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      const ga4Object = new GA4AddShippingInfo();\r\n      ga4Object.coupon = customer?.discountCodes?.length > 0 ? customer.discountCodes[0] : '';\r\n      ga4Object.currency = customer?.cartList?.length > 0 ? customer.cartList[0].currency : environment.currencyCode;\r\n      ga4Object.shipping_tier = shippingOption?.name;\r\n      ga4Object.value = customer?.orderTotals?.orderTotal;\r\n      if (cats) {\r\n        customer?.cartList?.forEach((item) => {\r\n          ga4Object.items.push(this.convertSimpleProduct(item, 1, item.cartQuantity, cats));\r\n        });\r\n        this.push('add_shipping_info', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushAddToCart(product: Product, quantity: number): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4AddToCart();\r\n        ga4Object.currency = product?.currency ?? environment.currencyCode;\r\n        ga4Object.value = product?.valuePrice;\r\n        ga4Object.items.push(this.convertSimpleProduct(product, 1, quantity, cats));\r\n        this.push('add_to_cart', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushAddToCartDetail(product: ProductDetail, quantity: number): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4AddToCart();\r\n        ga4Object.currency = product?.currency ?? environment.currencyCode;\r\n        ga4Object.value = product?.valuePrice;\r\n        ga4Object.items.push(this.convertProduct(product, 1, quantity, cats));\r\n        this.push('add_to_cart', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushAddToWishList(product: Product): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4AddToWishList();\r\n        ga4Object.currency = product?.currency ?? environment.currencyCode;\r\n        ga4Object.value = product?.valuePrice;\r\n        ga4Object.items.push(this.convertSimpleProduct(product, 1, 1, cats));\r\n        this.push('add_to_wishlist', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushBeginCheckout(customer: Customer): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4BeginCheckout();\r\n        ga4Object.coupon = customer?.discountCodes?.length > 0 ? customer.discountCodes[0] : '';\r\n        ga4Object.currency = customer?.cartList?.length > 0 ? customer.cartList[0].currency : environment.currencyCode;\r\n        ga4Object.value = customer?.orderTotals?.orderTotal;\r\n        customer?.cartList?.forEach((item) => {\r\n          ga4Object.items.push(this.convertSimpleProduct(item, 1, item.cartQuantity, cats));\r\n        });\r\n        this.push('begin_checkout', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushEarnVirtualCurrency(value: number, currencyCode: string): void {\r\n    const ga4Object = new GA4EarnVirtualCurrency();\r\n    ga4Object.value = value;\r\n    ga4Object.virtual_currency_name = currencyCode;\r\n    this.push('earn_virtual_currency', ga4Object);\r\n  }\r\n\r\n  public pushGenerateLead(value: number, currencyCode: string): void {\r\n    const ga4Object = new GA4GenerateLead();\r\n    ga4Object.currency = currencyCode;\r\n    ga4Object.value = value;\r\n    this.push('generate_lead', ga4Object);\r\n  }\r\n\r\n  public pushJoinGroup(group: string): void {\r\n    const ga4Object = new GA4JoinGroup();\r\n    ga4Object.group_id = group;\r\n    this.push('join_group', ga4Object);\r\n  }\r\n\r\n  public pushLevelEnd(levelName: string, success: boolean): void {\r\n    const ga4Object = new GA4LevelEnd();\r\n    ga4Object.level_name = levelName;\r\n    ga4Object.success = success;\r\n    this.push('level_end', ga4Object);\r\n  }\r\n\r\n  public pushLevelStart(levelName: string): void {\r\n    const ga4Object = new GA4LevelStart();\r\n    ga4Object.level_name = levelName;\r\n    this.push('level_start', ga4Object);\r\n  }\r\n\r\n  public pushLevelUp(character: string, level: number): void {\r\n    const ga4Object = new GA4LevelUp();\r\n    ga4Object.character = character;\r\n    ga4Object.level = level;\r\n    this.push('level_up', ga4Object);\r\n  }\r\n\r\n  public pushLogin(method: string): void {\r\n    const ga4Object = new GA4Login();\r\n    ga4Object.method = method;\r\n    this.push('login', ga4Object);\r\n  }\r\n\r\n  public pushPostScore(character: string, level: number, score: number): void {\r\n    const ga4Object = new GA4PostScore();\r\n    ga4Object.character = character;\r\n    ga4Object.level = level;\r\n    ga4Object.score = score;\r\n    this.push('post_score', ga4Object);\r\n  }\r\n\r\n  public pushPurchase(order: Order): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4Purchase();\r\n        ga4Object.affiliation = this.settings.companyName;\r\n        ga4Object.coupon = this.getCoupon(order);\r\n        ga4Object.currency = order.customerCurrencyCode ?? environment.currencyCode;\r\n        ga4Object.shipping = order.orderShippingExclTax;\r\n        ga4Object.tax = order.orderTax;\r\n        ga4Object.transaction_id = order.customOrderNumber;\r\n        ga4Object.value = order.orderTotal;\r\n        let itemCounter = 0;\r\n        order?.items?.forEach((item) => {\r\n          ga4Object.items.push(this.convertOrderItem(item, itemCounter, cats));\r\n          itemCounter++;\r\n        });\r\n        this.push('purchase', ga4Object);\r\n        if (order.redeemedRewardPoints) {\r\n          this.pushSpendVirtualCurrency(order.customOrderNumber, order.redeemedRewardPointsAmount, order.customerCurrencyCode);\r\n        }\r\n        // TODO - Earn Virtual Currency??\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushRefund(order: Order, companyName: string): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4Refund();\r\n        ga4Object.affiliation = companyName;\r\n        ga4Object.coupon = this.getCoupon(order);\r\n        ga4Object.currency = order.customerCurrencyCode ?? environment.currencyCode;\r\n        ga4Object.shipping = order.orderShippingExclTax;\r\n        ga4Object.tax = order.orderTax;\r\n        ga4Object.transaction_id = order.customOrderNumber;\r\n        ga4Object.value = order.orderTotal;\r\n        let itemCounter = 0;\r\n        order?.items?.forEach((item) => {\r\n          ga4Object.items.push(this.convertOrderItem(item, itemCounter, cats));\r\n          itemCounter++;\r\n        });\r\n        this.push('refund', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushRemoveFromCart(product: Product, quantity: number): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4RemoveFromCart();\r\n        ga4Object.currency = product?.currency ?? environment.currencyCode;\r\n        ga4Object.value = product?.valuePrice;\r\n        product.listName = \"Shopping Cart\";\r\n        product.listId = \"cart\"\r\n        ga4Object.items.push(this.convertSimpleProduct(product, 1, quantity, cats));\r\n        this.push('remove_from_cart', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushSearch(term: string): void {\r\n    const ga4Object = new GA4Search();\r\n    ga4Object.search_term = term;\r\n    this.push('search', ga4Object);\r\n  }\r\n\r\n  public pushSelectContent(contentType: string, itemId: string): void {\r\n    const ga4Object = new GA4SelectContent();\r\n    ga4Object.content_type = contentType;\r\n    ga4Object.item_id = itemId;\r\n    this.push('select_content', ga4Object);\r\n  }\r\n\r\n  public pushSelectItem(product: Product, listName: string, listId: string, position: number): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4SelectItem();\r\n        ga4Object.item_list_id = listId;\r\n        ga4Object.item_list_name = listName;\r\n        product.listId = null;\r\n        product.listName = null;\r\n        ga4Object.items.push(this.convertSimpleProduct(product, position, 1, cats));\r\n        this.push('select_item', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushSelectPromotion(): void {\r\n    const ga4Object = new GA4SelectPromotion();\r\n    // TODO\r\n    this.push('select_promotion', ga4Object);\r\n  }\r\n\r\n  public pushShare(method: string, contentType: string, itemId: string): void {\r\n    const ga4Object = new GA4Share();\r\n    ga4Object.content_type = contentType;\r\n    ga4Object.method = method;\r\n    ga4Object.item_id = itemId;\r\n    this.push('share', ga4Object);\r\n  }\r\n\r\n  public pushSignUp(method: string): void {\r\n    const ga4Object = new GA4SignUp();\r\n    ga4Object.method = method;\r\n    this.push('sign_up', ga4Object);\r\n  }\r\n\r\n  public pushSpendVirtualCurrency(itemName: string, value: number, currencyCode: string): void {\r\n    const ga4Object = new GA4SpendVirtualCurrency();\r\n    ga4Object.item_name = itemName;\r\n    ga4Object.value = value;\r\n    ga4Object.virtual_currency_name = currencyCode;\r\n    this.push('spend_virtual_currency', ga4Object);\r\n  }\r\n\r\n  public pushTutorialBegin(): void {\r\n    this.push('tutorial_begin', null);\r\n  }\r\n\r\n  public pushTutorialComplete(): void {\r\n    this.push('tutorial_complete', null);\r\n  }\r\n\r\n  public pushUnlockAchievement(achievementId: string): void {\r\n    const ga4Object = new GA4UnlockAchievement();\r\n    ga4Object.achievement_id = achievementId;\r\n    this.push('unlock_achievement', ga4Object);\r\n  }\r\n\r\n  public pushViewCart(customer: Customer): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4ViewCart();\r\n        ga4Object.currency = customer?.cartList?.length > 0 ? customer.cartList[0].currency : environment.currencyCode;\r\n        ga4Object.value = customer?.orderTotals?.orderTotal;\r\n        customer?.cartList?.forEach((item) => {\r\n          ga4Object.items.push(this.convertSimpleProduct(item, 1, item.cartQuantity, cats));\r\n        });\r\n        this.push('view_cart', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushViewItem(product: ProductDetail, listName: string, listId: string, position: number): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4ViewItem();\r\n        ga4Object.currency = product?.currency;\r\n        ga4Object.value = product.valuePrice;\r\n        product.listName = listName;\r\n        product.listId = listId;\r\n        ga4Object.items.push(this.convertProduct(product, position, 1, cats));\r\n        this.push('view_item', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushViewItemList(products: Product[], listName: string, listId: string, position: number): void {\r\n    this.subscriptions.push(this.categoryService.categories.subscribe(cats => {\r\n      if (cats) {\r\n        const ga4Object = new GA4ViewItemList();\r\n        ga4Object.item_list_id = listName;\r\n        ga4Object.item_list_name = listId;\r\n        products?.forEach((product) => {\r\n          product.listId = null;\r\n          product.listName = null;\r\n          ga4Object.items.push(this.convertSimpleProduct(product, position, 1, cats));\r\n        });\r\n        this.push('view_item_list', ga4Object);\r\n      }\r\n    }));\r\n  }\r\n\r\n  public pushViewPromotion(): void {\r\n    const ga4Object = new GA4ViewPromotion();\r\n    // TODO\r\n    this.push('view_promotion', ga4Object);\r\n  }\r\n\r\n  private getCoupon(order: Order): string {\r\n    let coupon = null;\r\n    order?.usedDiscounts?.forEach((discount) => {\r\n      // We are only interested in the ones with Coupon Codes ... right?\r\n      if (discount.couponCode) {\r\n        if (coupon) {\r\n          coupon = `${coupon}|${discount.couponCode}`;\r\n        } else {\r\n          coupon = discount.couponCode;\r\n        }\r\n      }\r\n    });\r\n    return coupon;\r\n  }\r\n\r\n  private convertProduct(product: ProductDetail, position: number, quantity: number, categories: Category[]): GA4Item {\r\n    const ga4Product = new GA4Item();\r\n    ga4Product.item_id = product.sku;\r\n    ga4Product.item_name = product.name;\r\n    ga4Product.affiliation = this.settings.companyName;\r\n    ga4Product.currency = product.currency ?? environment.currencyCode;\r\n    ga4Product.discount = product.discount;\r\n    ga4Product.index = position;\r\n    ga4Product.item_brand = product.manufacturer?.name ?? '';\r\n    ga4Product.item_list_id = product.listId;\r\n    ga4Product.item_list_name = product.listName;\r\n    ga4Product.item_variant = product.attributeSummary ?? 'none';\r\n    ga4Product.location_id = 'omnial';\r\n    ga4Product.price = product.newPrice;\r\n    ga4Product.quantity = quantity\r\n    this.populateCategories(ga4Product, product.canonicalCategoryId, product.categoryIds, categories);\r\n    return ga4Product;\r\n  }\r\n\r\n  private convertSimpleProduct(product: Product, position: number, quantity: number, categories: Category[]): GA4Item {\r\n    const ga4Product = new GA4Item();\r\n    ga4Product.item_id = product.sku;\r\n    ga4Product.item_name = product.name;\r\n    ga4Product.affiliation = this.settings.companyName;\r\n    ga4Product.currency = product.currency ?? environment.currencyCode;\r\n    ga4Product.discount = product.discount;\r\n    ga4Product.index = position;\r\n    ga4Product.item_brand = product.manufacturer?.name ?? '';\r\n    ga4Product.item_list_id = product.listId;\r\n    ga4Product.item_list_name = product.listName;\r\n    ga4Product.item_variant = product.attributeSummary ?? 'none';\r\n    ga4Product.location_id = 'omnial'; // TODO\r\n    ga4Product.price = product.newPrice;\r\n    ga4Product.quantity = quantity\r\n    this.populateCategories(ga4Product, product.canonicalCategoryId, product.categoryIds, categories);\r\n    return ga4Product;\r\n  }\r\n\r\n  private convertOrderItem(orderItem: OrderItem, index: number, categories: Category[]): GA4Item {\r\n    const ga4Product = new GA4Item();\r\n    ga4Product.item_id = orderItem?.product?.sku;\r\n    ga4Product.item_name = orderItem?.product?.name;\r\n    ga4Product.affiliation = this.settings.companyName;\r\n    ga4Product.currency = orderItem?.product?.currency ?? environment.currencyCode;\r\n    ga4Product.discount = orderItem.discountAmountInclTax;\r\n    ga4Product.index = index;\r\n    ga4Product.item_brand = orderItem?.product?.manufacturer?.name ?? '';\r\n    ga4Product.item_list_id = orderItem?.listId;\r\n    ga4Product.item_list_name = orderItem?.listName;\r\n    ga4Product.item_variant = orderItem.attributeSummary ?? 'none';\r\n    ga4Product.location_id = 'omnial';\r\n    ga4Product.price = orderItem.unitPriceInclTax; // Should be without discount\r\n    ga4Product.quantity = orderItem.quantity\r\n    this.populateCategories(ga4Product, orderItem?.product?.canonicalCategoryId, orderItem?.product?.categoryIds, categories);\r\n    return ga4Product;\r\n  }\r\n\r\n  private populateCategories(ga4Product: GA4Item, canonicalCategoryId: number, categoryIds: number[], categories: Category[]) {\r\n    if (canonicalCategoryId) {\r\n      const canonical = categories?.find(c => c.id === canonicalCategoryId);\r\n      if (canonical) {\r\n        ga4Product.item_category = canonical.name;\r\n      }\r\n    }\r\n    categoryIds.forEach((categoryId) => {\r\n      if (categoryId != canonicalCategoryId) {\r\n        const category = categories?.find(c => c.id === categoryId);\r\n        if (category) {\r\n          if (!ga4Product.item_category) {\r\n            ga4Product.item_category = category.name;\r\n          } else if (!ga4Product.item_category2) {\r\n            ga4Product.item_category2 = category.name;\r\n          } else if (!ga4Product.item_category3) {\r\n            ga4Product.item_category3 = category.name;\r\n          } else if (!ga4Product.item_category4) {\r\n            ga4Product.item_category4 = category.name;\r\n          } else if (!ga4Product.item_category5) {\r\n            ga4Product.item_category5 = category.name;\r\n          }\r\n        }\r\n      }\r\n    });\r\n  }\r\n}\r\n", "export class FaceBookConversion {\r\n  customerGuid: string;\r\n  userAgent: string;\r\n  url: string;\r\n  fbc: string;\r\n  fbp: string;\r\n  conversionType: string;\r\n  conversionData: any;\r\n}\r\n\r\n\r\nexport class FaceBookProduct {\r\n  content_type = 'product';\r\n  content_name: string;\r\n  content_ids: string[];\r\n  contents: FaceBookContents[];\r\n  currency: string;\r\n  value: number\r\n}\r\n\r\nexport class FaceBookProductView {\r\n  content_type = 'product';\r\n  content_name: string;\r\n  content_category: string;\r\n  contents: FaceBookContents[];\r\n  currency: string;\r\n  value: number\r\n}\r\n\r\nexport class FaceBookPayment {\r\n  content_category = 'checkout';\r\n  content_ids: string[];\r\n  contents: FaceBookContents[];\r\n  currency: string;\r\n  value: number\r\n}\r\n\r\nexport class FaceBookCheckout {\r\n  content_category = 'checkout';\r\n  content_ids: string[];\r\n  contents: FaceBookContents[];\r\n  currency: string;\r\n  num_items: number;\r\n  value: number;\r\n}\r\n\r\nexport class FaceBookPurchase {\r\n  content_name = 'checkout_complete';\r\n  content_type = 'product';\r\n  contents: FaceBookContents[];\r\n  currency: string;\r\n  num_items: number;\r\n  value: number;\r\n}\r\n\r\nexport class FaceBookContents {\r\n  id: string;\r\n  quantity: number;\r\n}\r\n\r\n", "import { Injectable } from '@angular/core';\r\nimport { Product, ProductDetail } from 'src/@omnial/_models/catalog/product.model';\r\nimport { Customer } from 'src/@omnial/_models/customer/customer.model';\r\nimport { Order } from 'src/@omnial/_models/order/order.model';\r\nimport { FaceBookCheckout, FaceBookContents, FaceBookConversion, FaceBookPayment, FaceBookProduct, FaceBookProductView, FaceBookPurchase } from 'src/@omnial/_models/tracking/facebook.events.model';\r\nimport { environment } from 'src/environments/environment';\r\nimport { CustomerService } from '../customer/customer.service';\r\nimport { CookieService } from 'ngx-cookie-service';\r\nimport { RepositoryService } from '../repository.service';\r\nimport { Subscription } from 'rxjs';\r\nimport { Router } from '@angular/router';\r\n\r\ndeclare var fbq: any;\r\n\r\n@Injectable()\r\nexport class FacebookService {\r\n\r\n  private subscriptions: Subscription[] = [];\r\n\r\n  constructor(private customerService: CustomerService,\r\n    private cookieService: CookieService,\r\n    public repoService: RepositoryService) { }\r\n\r\n  public push(event: string, object?: any) {\r\n    try {\r\n      if (object) {\r\n        if (environment.faceBookConversionApi) {\r\n          // The conversions API will give us some dup-duplication info\r\n          // We have to pass numerous things from the front end though\r\n          const conversion = new FaceBookConversion();\r\n          conversion.userAgent = window.navigator.userAgent;\r\n          conversion.url = location.href;\r\n          conversion.customerGuid = this.customerService.getCustomerGuid();\r\n          conversion.conversionType = event;\r\n          conversion.conversionData = object;\r\n          conversion.fbc = this.cookieService.get('_fbc');\r\n          conversion.fbp = this.cookieService.get('_fbp');\r\n          this.subscriptions.push(this.repoService.create('FaceBook/Convert', conversion).subscribe({\r\n            next: (res) => {\r\n              if (res) {\r\n                fbq('track', event, object, { eventID: res });\r\n              } else {\r\n                // Call fbq anyway without the Event ID\r\n                fbq('track', event, object);\r\n              }\r\n            },\r\n            error: (e) => {\r\n              console.log('!!! Facebook Conversion API Error !!!!');\r\n              console.log(e);\r\n              // Call fbq anyway without the Event ID\r\n              fbq('track', event, object);\r\n            }\r\n          }));\r\n        } else {\r\n          fbq('track', event, object);\r\n        }\r\n      } else {\r\n        fbq('track', event);\r\n      }\r\n    } catch (error) {\r\n      console.log('!!! Facebook Error !!!!');\r\n      console.log(error);\r\n      console.log(event);\r\n    }\r\n  }\r\n\r\n  public pushPage() {\r\n    this.push('PageView');\r\n  }\r\n\r\n  public pushAddPaymentInfo(customer: Customer) {\r\n    const contentIds: string[] = [];\r\n    const contents: FaceBookContents[] = [];\r\n    customer?.cartList?.forEach((item) => {\r\n      contentIds.push(item.sku);\r\n      const contentItem = new FaceBookContents();\r\n      contentItem.id = item.sku;\r\n      contentItem.quantity = item.cartQuantity;\r\n      contents.push(contentItem);\r\n    });\r\n    const paymentObject = new FaceBookPayment()\r\n    paymentObject.content_ids = contentIds;\r\n    paymentObject.contents = contents;\r\n    paymentObject.currency = customer?.cartList?.length > 0 ? customer.cartList[0].currency : environment.currencyCode;\r\n    paymentObject.value = customer?.orderTotals?.orderTotal;\r\n    this.push('AddPaymentInfo', paymentObject);\r\n  }\r\n\r\n  public pushAddToCart(product: Product, quantity: number): void {\r\n    const contentIds: string[] = [product?.sku];\r\n    const contents: FaceBookContents[] = [];\r\n    const contentItem = new FaceBookContents();\r\n    contentItem.id = product.sku;\r\n    contentItem.quantity = quantity;\r\n    contents.push(contentItem);\r\n    const cartObject = new FaceBookProduct();\r\n    cartObject.content_name = product?.listName;\r\n    cartObject.content_ids = contentIds;\r\n    cartObject.contents = contents;\r\n    cartObject.currency = product?.currency;\r\n    cartObject.value = product.valuePrice;\r\n    this.push('AddToCart', cartObject);\r\n  }\r\n\r\n  public pushAddToCartDetail(product: ProductDetail, quantity: number): void {\r\n    const contentIds: string[] = [product?.sku];\r\n    const contents: FaceBookContents[] = [];\r\n    const contentItem = new FaceBookContents();\r\n    contentItem.id = product.sku;\r\n    contentItem.quantity = quantity;\r\n    contents.push(contentItem);\r\n    const cartObject = new FaceBookProduct();\r\n    cartObject.content_name = product?.listName;\r\n    cartObject.content_ids = contentIds;\r\n    cartObject.contents = contents;\r\n    cartObject.currency = product?.currency;\r\n    cartObject.value = product?.valuePrice;\r\n    this.push('AddToCart', cartObject);\r\n  }\r\n\r\n  public pushAddToWishList(product: Product): void {\r\n    const contentIds: string[] = [product?.sku];\r\n    const contents: FaceBookContents[] = [];\r\n    const contentItem = new FaceBookContents();\r\n    contentItem.id = product.sku;\r\n    contentItem.quantity = 1;\r\n    contents.push(contentItem);\r\n    const wishListObject = new FaceBookProduct();\r\n    wishListObject.content_name = product?.listName;\r\n    wishListObject.content_ids = contentIds;\r\n    wishListObject.contents = contents;\r\n    wishListObject.currency = product?.currency;\r\n    wishListObject.value = product?.valuePrice;\r\n    this.push('AddToWishlist', wishListObject);\r\n  }\r\n\r\n  public pushBeginCheckout(customer: Customer): void {\r\n    const contentIds: string[] = [];\r\n    const contents: FaceBookContents[] = [];\r\n    let noItems = 0;\r\n    customer?.cartList?.forEach((item) => {\r\n      contentIds.push(item.sku);\r\n      const contentItem = new FaceBookContents();\r\n      contentItem.id = item.sku;\r\n      contentItem.quantity = item.cartQuantity;\r\n      contents.push(contentItem);\r\n      noItems += item.cartQuantity;\r\n    });\r\n    const checkoutObject = new FaceBookCheckout();\r\n    checkoutObject.content_ids = contentIds;\r\n    checkoutObject.contents = contents;\r\n    checkoutObject.currency = customer?.cartList?.length > 0 ? customer.cartList[0].currency : environment.currencyCode;\r\n    checkoutObject.num_items = noItems;\r\n    checkoutObject.value = customer?.orderTotals?.orderTotal;\r\n    this.push('InitiateCheckout', checkoutObject);\r\n  }\r\n\r\n  public pushGenerateLead(value: number, currencyCode: string): void {\r\n    this.push('Lead', { content_category: 'omnial_lead', content_name: 'omnial_lead', currency: currencyCode, value: value });\r\n  }\r\n\r\n  public pushPurchase(order: Order): void {\r\n    const contents: FaceBookContents[] = [];\r\n    let noItems = 0;\r\n    order?.items?.forEach((item) => {\r\n      const contentItem = new FaceBookContents();\r\n      contentItem.id = item?.product?.sku;\r\n      contentItem.quantity = item.quantity;\r\n      contents.push(contentItem);\r\n      noItems += item.quantity;\r\n    });\r\n    const purchaseObject = new FaceBookPurchase();\r\n    purchaseObject.contents = contents;\r\n    purchaseObject.currency = order.customerCurrencyCode;\r\n    purchaseObject.num_items = noItems;\r\n    purchaseObject.value = order?.orderTotal;\r\n    this.push('Purchase', purchaseObject);\r\n  }\r\n\r\n  public pushSearch(term: string): void {\r\n    this.push('Search', { search_string: term });\r\n  }\r\n\r\n  public pushSignUp(): void {\r\n    this.push('CompleteRegistration');\r\n  }\r\n\r\n  public pushViewItem(product: ProductDetail, listName: string, listId: string): void {\r\n    const contents: FaceBookContents[] = [];\r\n    const contentItem = new FaceBookContents();\r\n    contentItem.id = product.sku;\r\n    contentItem.quantity = 1;\r\n    contents.push(contentItem);\r\n    const productObject = new FaceBookProductView();\r\n    productObject.content_name = listName;\r\n    productObject.content_category = listId;\r\n    productObject.contents = contents;\r\n    productObject.currency = product?.currency;\r\n    productObject.value = product.valuePrice;\r\n    this.push('ViewContent', productObject);\r\n  }\r\n}\r\n", "/// These models are for reference\r\n\r\n\r\nexport class GtmPage {\r\n    event = 'pageViewCustomEvent';\r\n    pagePath: string;\r\n    pageTitle: string;\r\n}\r\n\r\nexport class GtmCheckoutStep {\r\n    event = 'eec.checkout';\r\n    ecommerce: {\r\n        checkout_option: {\r\n            actionField: {\r\n                step: number;\r\n            };\r\n            product: GtmProduct[];\r\n        };\r\n    };\r\n}\r\n\r\nexport class GtmCheckoutStepOption {\r\n    event = 'eec.checkout';\r\n    ecommerce: {\r\n        checkout_option: {\r\n            actionField: {\r\n                step: number;\r\n                option: string; // For Payment method, shipping, etc\r\n            };\r\n            product: GtmProduct[];\r\n        };\r\n    };\r\n}\r\n\r\nexport class GtmCommerce {\r\n    currencyCode = 'AUD';\r\n}\r\n\r\nexport class GtmProduct {\r\n    name: string;\r\n    id: string; // a.k.a sku\r\n    price: number;\r\n    brand: string;\r\n    category: string;\r\n    quantity: number;\r\n}\r\n\r\nexport class GtmAddToCart {\r\n    event = 'ecc.add';\r\n    ecommerce: {\r\n        add: {\r\n            actionField: {\r\n                list: string; // Where they were added from\r\n            };\r\n        products: GtmProduct[];\r\n        }\r\n    };\r\n}\r\n\r\nexport class GtmRemoveFromCart {\r\n    event = 'eec.remove';\r\n    ecommerce: {\r\n        remove: {\r\n            products: GtmProduct[];\r\n        }\r\n    };\r\n}\r\n\r\nexport class GtmProductView {\r\n    event: 'eec.detail';\r\n    ecommerce: {\r\n        detail: {\r\n            actionField: {\r\n                list: string; // Detail or Quickview\r\n            };\r\n        }\r\n        products: GtmProduct[];\r\n    };\r\n}\r\n\r\nexport class GtmPurchase {\r\n    event = 'eec.purchase';\r\n    ecommerce: {\r\n        currencyCode: 'AUD';\r\n        purchase: {\r\n            actionField: {\r\n                id: string; // Order Number\r\n                affiliation: string;\r\n                revenue: number; // Total\r\n                tax: number;\r\n                shipping: number;\r\n                coupon: string;\r\n            };\r\n            products: GtmProduct[];\r\n        }\r\n    };\r\n}\r\n", "import { Injectable } from '@angular/core';\r\nimport { Product, ProductDetail } from 'src/@omnial/_models/catalog/product.model';\r\nimport { GtmPage } from 'src/@omnial/_models/external/gtm.model';\r\nimport { Order } from 'src/@omnial/_models/order/order.model';\r\nimport { environment } from 'src/environments/environment';\r\nimport { GoogleGA4Service } from './google.ga4.service';\r\nimport { Customer } from 'src/@omnial/_models/customer/customer.model';\r\nimport { ShippingOption } from 'src/@omnial/_models/order/shipping-option.model';\r\nimport { FacebookService } from './facebook.service';\r\n\r\n\r\n@Injectable()\r\nexport class TrackingService {\r\n\r\n  constructor(private ga4Service: GoogleGA4Service,\r\n    public facebookService: FacebookService) { }\r\n\r\n  public pushPage(path: string, title: string): void {\r\n    if (environment.gtmActive) {\r\n      const virtualPage = new GtmPage();\r\n      virtualPage.pagePath = path;\r\n      virtualPage.pageTitle = title;\r\n      try {\r\n        this.ga4Service.pushPage(virtualPage);\r\n      } catch (error) {\r\n        console.log(error);\r\n        console.log(virtualPage);\r\n      }\r\n    }\r\n    if (environment.facebookActive) {\r\n      this.facebookService.pushPage();\r\n    }\r\n  }\r\n\r\n  public pushImpression(product: Product, listId: string, listName: string, position: number): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushViewItemList([product], listId, listName, position);\r\n    }\r\n  }\r\n\r\n  public pushProductView(product: ProductDetail, listId: string, listName: string): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushViewItem(product, listId, listName, 1);\r\n    }\r\n    if (environment.facebookActive) {\r\n      this.facebookService.pushViewItem(product, listId, listName);\r\n    }\r\n  }\r\n\r\n  public pushProductClick(product: Product, listId: string, listName: string, position: number): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushSelectItem(product, listId, listName, position);\r\n    }\r\n  }\r\n\r\n  public pushStartCheckout(customer: Customer): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushBeginCheckout(customer);\r\n    }\r\n    if (environment.facebookActive) {\r\n      this.facebookService.pushBeginCheckout(customer);\r\n    }\r\n  }\r\n\r\n  public pushAddShippingInfo(customer: Customer, shippingOption: ShippingOption): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushAddShippingInfo(customer, shippingOption);\r\n    }\r\n  }\r\n\r\n  public pushAddPaymentInfo(customer: Customer, paymentType: string): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushAddPaymentInfo(customer, paymentType);\r\n    }\r\n    if (environment.facebookActive) {\r\n      this.facebookService.pushAddPaymentInfo(customer);\r\n    }\r\n  }\r\n\r\n  public pushCheckout(step: number, products: Product[]): void {\r\n    // Hook currently not used\r\n  }\r\n\r\n  public pushCheckoutOption(step: number, option: string): void {\r\n    // Hook currently not used\r\n  }\r\n\r\n  public pushPurchase(order: Order, companyName: string): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushPurchase(order);\r\n    }\r\n    if (environment.facebookActive) {\r\n      this.facebookService.pushPurchase(order);\r\n    }\r\n  }\r\n\r\n  public pushCartView(customer: Customer): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushViewCart(customer);\r\n    }\r\n  }\r\n\r\n  public pushCartAdd(product: Product, quantity: number): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushAddToCart(product, quantity);\r\n    }\r\n    if (environment.facebookActive) {\r\n      this.facebookService.pushAddToCart(product, quantity);\r\n    }\r\n  }\r\n\r\n  public pushCartAddDetail(product: ProductDetail, quantity: number): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushAddToCartDetail(product, quantity);\r\n    }\r\n    if (environment.facebookActive) {\r\n      this.facebookService.pushAddToCartDetail(product, quantity);\r\n    }\r\n  }\r\n\r\n  public pushCartRemove(product: Product, quantity: number): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushRemoveFromCart(product, quantity);\r\n    }\r\n  }\r\n\r\n  public pushWishListAdd(product: Product): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushAddToWishList(product);\r\n    }\r\n    if (environment.facebookActive) {\r\n      this.facebookService.pushAddToWishList(product);\r\n    }\r\n  }\r\n\r\n  public pushSelectContent(contentType: string, itemId: string): void {\r\n    if (environment.gtmActive) {\r\n      this.ga4Service.pushSelectContent(contentType, itemId);\r\n    }\r\n  }\r\n}\r\n"],
  "mappings": "oOAEM,IAAOA,EAAP,KAAc,CAAA,EAiBPC,GAAP,KAAoB,CAAA,ECX1B,IAAaC,IAAmB,IAAA,CAA1B,MAAOA,CAAmB,CAqB9BC,YAAmBC,EAAqB,CAArB,KAAAA,SAAAA,EAnBX,KAAAC,SAAwB,CAC9B,CAAEC,IAAK,mBAAoBC,OAAQ,kDAAmDC,GAAI,oBAAqBC,OAAQ,GAAQC,QAAS,EAAK,EAC7I,CAAEJ,IAAK,gBAAiBC,OAAQ,0CAA2CC,GAAI,oBAAqBC,OAAQ,GAAQC,QAAS,EAAK,EAClI,CAAEJ,IAAK,oBAAqBC,OAAQ,2EAA4EC,GAAI,uBAAwBC,OAAQ,GAAQC,QAAS,EAAK,EAC1K,CAAEJ,IAAK,wBAAyBC,OAAQ,oEAAqEC,GAAI,wBAAyBC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Y1B,EAAkB2B,EAAgB,CAC/CtC,EAAYC,WACd,KAAKN,WAAW4C,cAAc5B,EAAS2B,CAAQ,EAE7CtC,EAAYS,gBACd,KAAKb,gBAAgB2C,cAAc5B,EAAS2B,CAAQ,CAExD,CAEOE,kBAAkB7B,EAAwB2B,EAAgB,CAC3DtC,EAAYC,WACd,KAAKN,WAAW8C,oBAAoB9B,EAAS2B,CAAQ,EAEnDtC,EAAYS,gBACd,KAAKb,gBAAgB6C,oBAAoB9B,EAAS2B,CAAQ,CAE9D,CAEOI,eAAe/B,EAAkB2B,EAAgB,CAClDtC,EAAYC,WACd,KAAKN,WAAWgD,mBAAmBhC,EAAS2B,CAAQ,CAExD,CAEOM,gBAAgBjC,EAAgB,CACjCX,EAAYC,WACd,KAAKN,WAAWkD,kBAAkBlC,CAAO,EAEvCX,EAAYS,gBACd,KAAKb,gBAAgBiD,kBAAkBlC,CAAO,CAElD,CAEOmC,kBAAkBC,EAAqBC,EAAc,CACtDhD,EAAYC,WACd,KAAKN,WAAWmD,kBAAkBC,EAAaC,CAAM,CAEzD,iDA/HWvD,GAAewD,EAAAC,EAAA,EAAAD,EAAAE,EAAA,CAAA,CAAA,CAAA,iCAAf1D,EAAe2D,QAAf3D,EAAe4D,SAAA,CAAA,CAAA,SAAf5D,CAAe,GAAA",
  "names": ["Address", "GoogleAddress", "ScriptLoaderService", "constructor", "snackBar", "$scripts", "ref", "source", "id", "loaded", "loading", "environment", "klaviyoApiKey", "scripts", "BehaviorSubject", "load", "config", "script", "find", "s", "addPayPalParameters", "next", "scriptElement", "document", "createElement", "type", "src", "getElementsByTagName", "appendChild", "onload", "onerror", "error", "console", "log", "errMessage", "open", "panelClass", "verticalPosition", "duration", "clientId", "intent", "toLowerCase", "currency", "addSourceParameters", "hyphenize", "camel", "replace", "$1", "Object", "keys", "reduce", "url", "token", "idx", "\u0275\u0275inject", "MatSnackBar", "factory", "\u0275fac", "Product", "ProductDetail", "SelectAttribute", "ProductSlide", "KlaviyoAddToCartInformation", "KlaviyoCustomer", "KlaviyoStartedCheckout", "KlaviyoTrackViewedItem", "KlaviyoTrackViewedItemMeta", "KlaviyoProductDetails", "KlaviyoCartItem", "KlaviyoService", "constructor", "router", "scriptLoaderService", "sitemapService", "repoService", "subscriptions", "ngOnDestroy", "length", "forEach", "sub", "unsubscribe", "identify", "result", "email", "customer", "shippingAddress", "customerData", "KlaviyoCustomer", "$email", "$first_name", "firstName", "$last_name", "lastName", "$phone_number", "phoneNumber", "$address1", "address1", "$address2", "address2", "$city", "city", "$region", "state", "$country", "country", "$organization", "company", "$zip", "zipPostalCode", "pushToKlaviyo", "startCheckout", "cartList", "push", "siteMap", "subscribe", "next", "res", "sitemap", "product", "ProductDetail", "categoryIds", "cartItem", "catId", "find", "i", "categories", "generateCategories", "cartItems", "getCartItems", "trackCheckout", "KlaviyoStartedCheckout", "$event_id", "Date", "now", "$value", "orderTotals", "orderTotal", "ItemNames", "cartItemNames", "CheckoutURL", "environment", "baseUrl", "Categories", "Items", "viewProduct", "url", "productDetails", "KlaviyoProductDetails", "ProductName", "name", "ProductID", "id", "ImageURL", "images", "medium", "URL", "Brand", "manufacturer", "Price", "newPrice", "CompareAtPrice", "oldPrice", "viewedItem", "KlaviyoTrackViewedItem", "Title", "ItemId", "ImageUrl", "Url", "Metadata", "KlaviyoTrackViewedItemMeta", "addCartDetail", "quantity", "addToCart", "addCart", "placedOrder", "order", "klayvioActive", "create", "productData", "productDetail", "items", "cartData", "KlaviyoAddToCartInformation", "AddedItemProductName", "AddedItemProductID", "AddedItemSKU", "sku", "AddedItemCategories", "AddedItemImageURL", "AddedItemURL", "AddedItemPrice", "AddedItemQuantity", "itemNames", "orderItem", "KlaviyoCartItem", "toString", "SKU", "Quantity", "cartCount", "ItemPrice", "RowTotal", "valuePrice", "ProductURL", "seName", "event", "object", "type", "load", "scripts", "s", "ref", "loaded", "setTimeout", "_learnq", "e", "console", "log", "rootCatId", "cat", "categoryId", "title", "\u0275\u0275inject", "Router", "ScriptLoaderService", "SiteMapService", "RepositoryService", "factory", "\u0275fac", "CustomerService", "constructor", "repoService", "settings", "snackBar", "klaviyoService", "spinner", "cookieService", "customer", "BehaviorSubject", "$customer", "subscriptions", "ngOnDestroy", "length", "forEach", "sub", "unsubscribe", "load", "customerGuid", "getCustomerGuid", "push", "getData", "subscribe", "next", "res", "identify", "saveCustomerCookie", "error", "update", "currentCustomer", "Observable", "observer", "complete", "e", "open", "panelClass", "verticalPosition", "duration", "newCustomer", "create", "saveCustomer", "check", "environment", "customerCookieKey", "localStorage", "setItem", "get", "setTimeout", "getItem", "checkCustomerCookie", "clearCustomerCookies", "removeItem", "allCookies", "getAll", "key", "Object", "keys", "delete", "now", "Date", "year", "getFullYear", "month", "getMonth", "day", "getDate", "expires", "set", "baseUrl", "cookieSecure", "setGrid", "view", "gridView", "getOrders", "show", "hide", "getRecentProducts", "getShipments", "createAddress", "address", "updateAddress", "deleteAddress", "id", "success", "setShippingAddress", "setBillingAddress", "updateCustomerShipping", "shippingAddress", "errMessage", "updateCustomerBilling", "billingAddress", "Address", "country", "resetCustomerBilling", "backInStock", "product", "result", "err", "console", "log", "addProductToCart", "quantity", "cartProduct", "Product", "cartQuantity", "name", "newPriceDisplay", "oldPriceDisplay", "images", "defaultImages", "cartList", "totalCartCount", "updatingCart", "\u0275\u0275inject", "RepositoryService", "AppSettings", "MatSnackBar", "KlaviyoService", "NgxSpinnerService", "CookieService", "factory", "\u0275fac", "CategoryService", "constructor", "staticService", "repoService", "snackBar", "categories", "BehaviorSubject", "$categories", "subscriptions", "useCache", "environment", "load", "init", "next", "push", "getCategories", "subscribe", "res", "error", "getCategory", "slug", "bypassCache", "Observable", "observer", "getBySeName", "staticRes", "complete", "getData", "apiRes", "e", "open", "panelClass", "verticalPosition", "duration", "resNoCache", "get", "ngOnDestroy", "length", "forEach", "sub", "unsubscribe", "\u0275\u0275inject", "RepositoryStaticService", "RepositoryService", "MatSnackBar", "factory", "\u0275fac", "GA4Item", "GA4AddPaymentInfo", "constructor", "items", "GA4AddShippingInfo", "GA4AddToCart", "GA4AddToWishList", "GA4BeginCheckout", "GA4EarnVirtualCurrency", "GA4GenerateLead", "GA4JoinGroup", "GA4LevelEnd", "GA4LevelStart", "GA4LevelUp", "GA4Login", "GA4PostScore", "GA4Purchase", "GA4Refund", "GA4RemoveFromCart", "GA4Search", "GA4SelectContent", "GA4SelectItem", "GA4SelectPromotion", "GA4Share", "GA4SignUp", "GA4SpendVirtualCurrency", "GA4UnlockAchievement", "GA4ViewCart", "GA4ViewItem", "GA4ViewItemList", "GA4ViewPromotion", "GoogleGA4Service", "constructor", "categoryService", "settings", "subscriptions", "window", "dataLayer", "ngOnDestroy", "length", "forEach", "sub", "unsubscribe", "push", "event", "object", "error", "console", "log", "pushPage", "virtualPage", "pushAddPaymentInfo", "customer", "paymentType", "ga4Object", "GA4AddPaymentInfo", "coupon", "discountCodes", "currency", "cartList", "environment", "currencyCode", "categories", "subscribe", "cats", "value", "orderTotals", "orderTotal", "item", "items", "convertSimpleProduct", "cartQuantity", "payment_type", "pushAddShippingInfo", "shippingOption", "GA4AddShippingInfo", "shipping_tier", "name", "pushAddToCart", "product", "quantity", "GA4AddToCart", "valuePrice", "pushAddToCartDetail", "convertProduct", "pushAddToWishList", "GA4AddToWishList", "pushBeginCheckout", "GA4BeginCheckout", "pushEarnVirtualCurrency", "GA4EarnVirtualCurrency", "virtual_currency_name", "pushGenerateLead", "GA4GenerateLead", "pushJoinGroup", "group", "GA4JoinGroup", "group_id", "pushLevelEnd", "levelName", "success", "GA4LevelEnd", "level_name", "pushLevelStart", "GA4LevelStart", "pushLevelUp", "character", "level", "GA4LevelUp", "pushLogin", "method", "GA4Login", "pushPostScore", "score", "GA4PostScore", "pushPurchase", "order", "GA4Purchase", "affiliation", "companyName", "getCoupon", "customerCurrencyCode", "shipping", "orderShippingExclTax", "tax", "orderTax", "transaction_id", "customOrderNumber", "itemCounter", "convertOrderItem", "redeemedRewardPoints", "pushSpendVirtualCurrency", "redeemedRewardPointsAmount", "pushRefund", "GA4Refund", "pushRemoveFromCart", "GA4RemoveFromCart", "listName", "listId", "pushSearch", "term", "GA4Search", "search_term", "pushSelectContent", "contentType", "itemId", "GA4SelectContent", "content_type", "item_id", "pushSelectItem", "position", "GA4SelectItem", "item_list_id", "item_list_name", "pushSelectPromotion", "GA4SelectPromotion", "pushShare", "GA4Share", "pushSignUp", "GA4SignUp", "itemName", "GA4SpendVirtualCurrency", "item_name", "pushTutorialBegin", "pushTutorialComplete", "pushUnlockAchievement", "achievementId", "GA4UnlockAchievement", "achievement_id", "pushViewCart", "GA4ViewCart", "pushViewItem", "GA4ViewItem", "pushViewItemList", "products", "GA4ViewItemList", "pushViewPromotion", "GA4ViewPromotion", "usedDiscounts", "discount", "couponCode", "ga4Product", "GA4Item", "sku", "index", "item_brand", "manufacturer", "item_variant", "attributeSummary", "location_id", "price", "newPrice", "populateCategories", "canonicalCategoryId", "categoryIds", "orderItem", "discountAmountInclTax", "unitPriceInclTax", "canonical", "find", "c", "id", "item_category", "categoryId", "category", "item_category2", "item_category3", "item_category4", "item_category5", "\u0275\u0275inject", "CategoryService", "AppSettings", "factory", "\u0275fac", "FaceBookConversion", "FaceBookProduct", "constructor", "content_type", "FaceBookProductView", "FaceBookPayment", "content_category", "FaceBookCheckout", "FaceBookPurchase", "content_name", "FaceBookContents", "FacebookService", "constructor", "customerService", "cookieService", "repoService", "subscriptions", "push", "event", "object", "environment", "faceBookConversionApi", "conversion", "FaceBookConversion", "userAgent", "window", "navigator", "url", "location", "href", "customerGuid", "getCustomerGuid", "conversionType", "conversionData", "fbc", "get", "fbp", "create", "subscribe", "next", "res", "fbq", "eventID", "error", "e", "console", "log", "pushPage", "pushAddPaymentInfo", "customer", "contentIds", "contents", "cartList", "forEach", "item", "sku", "contentItem", "FaceBookContents", "id", "quantity", "cartQuantity", "paymentObject", "FaceBookPayment", "content_ids", "currency", "length", "currencyCode", "value", "orderTotals", "orderTotal", "pushAddToCart", "product", "cartObject", "FaceBookProduct", "content_name", "listName", "valuePrice", "pushAddToCartDetail", "pushAddToWishList", "wishListObject", "pushBeginCheckout", "noItems", "checkoutObject", "FaceBookCheckout", "num_items", "pushGenerateLead", "content_category", "pushPurchase", "order", "items", "purchaseObject", "FaceBookPurchase", "customerCurrencyCode", "pushSearch", "term", "search_string", "pushSignUp", "pushViewItem", "listId", "productObject", "FaceBookProductView", "\u0275\u0275inject", "CustomerService", "CookieService", "RepositoryService", "factory", "\u0275fac", "GtmPage", "constructor", "event", "TrackingService", "constructor", "ga4Service", "facebookService", "pushPage", "path", "title", "environment", "gtmActive", "virtualPage", "GtmPage", "pagePath", "pageTitle", "error", "console", "log", "facebookActive", "pushImpression", "product", "listId", "listName", "position", "pushViewItemList", "pushProductView", "pushViewItem", "pushProductClick", "pushSelectItem", "pushStartCheckout", "customer", "pushBeginCheckout", "pushAddShippingInfo", "shippingOption", "pushAddPaymentInfo", "paymentType", "pushCheckout", "step", "products", "pushCheckoutOption", "option", "pushPurchase", "order", "companyName", "pushCartView", "pushViewCart", "pushCartAdd", "quantity", "pushAddToCart", "pushCartAddDetail", "pushAddToCartDetail", "pushCartRemove", "pushRemoveFromCart", "pushWishListAdd", "pushAddToWishList", "pushSelectContent", "contentType", "itemId", "\u0275\u0275inject", "GoogleGA4Service", "FacebookService", "factory", "\u0275fac"]
}