{"version":3,"sources":["../../../../node_modules/tslib/tslib.es6.js","ng://angulartics2/ibm-digital-analytics/ibm-digital-analytics.ts"],"names":["__metadata","metadataKey","metadataValue","Reflect","metadata","Angulartics2IBMDigitalAnalytics","angulartics2","this","window","console","warn","prototype","startTracking","_this","pageTrack","pipe","filterDeveloperMode","subscribe","x","path","eventTrack","action","properties","cmCreatePageviewTag","cmDisplayShops","cmCreateProductviewTag","productId","productName","categoryId","attrbute","virtualCategory","cmCreateShopAction5Tag","quantity","unitPrice","extraFields","cmCreateShopAction9Tag","registrationId","orderId","orderSubtotal","cmCreateOrderTag","orderShipping","registrantCity","registrantState","registrantPostalCode","cmCreateRegistrationTag","registrantEmail","registrantCountry","cmCreateElementTag","elementId","elementCategory","cmCreateConversionEventTag","eventId","actionType","eventCategoryId","points","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","decorate","i","defineProperty","__decorate","Injectable","providedIn","Angulartics2"],"mappings":"wZA6DO,SAASA,EAAWC,EAAaC,GACpC,GAAuB,iBAAZC,SAAoD,mBAArBA,QAAQC,SAAyB,OAAOD,QAAQC,SAASH,EAAaC,oBCzDlH,SAAAG,EAAoBC,GAAAC,KAAAD,aAAAA,EAC2B,mBAAlCE,OAA4B,qBACrCC,QAAQC,KACN,iFAKNL,EAAAM,UAAAC,cAAA,WAAA,IAAAC,EAAAN,KACEA,KAAKD,aAAaQ,UACfC,KAAKR,KAAKD,aAAaU,uBACvBC,UAAU,SAAAC,GAAK,OAAAL,EAAKC,UAAUI,EAAEC,QACnCZ,KAAKD,aAAac,WACfL,KAAKR,KAAKD,aAAaU,uBACvBC,UAAU,SAAAC,GAAK,OAAAL,EAAKO,WAAWF,EAAEG,OAAQH,EAAEI,eAUhDjB,EAAAM,UAAAG,UAAA,SAAUK,IAERI,EAD4Bf,OAA4B,qBACpCW,EAAM,KAAM,KAAM,OASxCd,EAAAM,UAAAS,WAAA,SAAWC,EAAgBC,QAAA,IAAAA,IAAAA,EAAA,IACz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,EAAgBA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,EACrH,GAAuB,iBAAZvD,SAAoD,mBAArBA,QAAQ+D,SAAyBH,EAAI5D,QAAQ+D,SAASX,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIS,EAAIZ,EAAWO,OAAS,EAAGK,GAAK,EAAGA,KAASR,EAAIJ,EAAWY,MAAIJ,GAAKH,EAAI,EAAID,EAAEI,GAAKH,EAAI,EAAID,EAAEH,EAAQC,EAAKM,GAAKJ,EAAEH,EAAQC,KAASM,GAChJ,OAAOH,EAAI,GAAKG,GAAKC,OAAOI,eAAeZ,EAAQC,EAAKM,GAAIA,EClDpBM,CAAA,CAD3CC,EAAAA,WAAW,CAAEC,WAAY,gCAEUC,EAAAA,gBADvBnE","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Angulartics2 } from 'angulartics2';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class Angulartics2IBMDigitalAnalytics {\r\n constructor(private angulartics2: Angulartics2) {\r\n if (typeof window['cmCreatePageviewTag'] !== 'function') {\r\n console.warn(\r\n 'Angulartics 2 IBM Digital Analytics Plugin: eluminate.js is not loaded',\r\n );\r\n }\r\n }\r\n\r\n startTracking(): void {\r\n this.angulartics2.pageTrack\r\n .pipe(this.angulartics2.filterDeveloperMode())\r\n .subscribe(x => this.pageTrack(x.path));\r\n this.angulartics2.eventTrack\r\n .pipe(this.angulartics2.filterDeveloperMode())\r\n .subscribe(x => this.eventTrack(x.action, x.properties));\r\n }\r\n\r\n /**\r\n * Track Page in IBM Digital Analytics\r\n *\r\n * @param path location\r\n *\r\n * @link https://www.ibm.com/support/knowledgecenter/SSPG9M/Implementation/impl_pageviewtag.html\r\n */\r\n pageTrack(path: string) {\r\n const cmCreatePageviewTag = window['cmCreatePageviewTag'];\r\n cmCreatePageviewTag(path, null, null, null);\r\n }\r\n\r\n /**\r\n * Track an event in IBM Digital Analytics\r\n *\r\n * @param action A string corresponding to the type of event that needs to be tracked.\r\n * @param properties The properties that need to be logged with the event.\r\n */\r\n eventTrack(action: string, properties: any = {}) {\r\n const cmDisplayShops = window['cmDisplayShops'];\r\n switch (action) {\r\n /**\r\n * @description The Product View tag captures information about vdigitalDataiews of product detail pages.\r\n * The Product View tag should be called on the lowest level detail page for products, which is typically\r\n * the Product Details page. You can view example Product View tags below.\r\n *\r\n * @link https://www.ibm.com/support/knowledgecenter/SSPG9M/Implementation/impl_prodviewtag.html\r\n */\r\n case 'cmCreateProductviewTag':\r\n const cmCreateProductviewTag = window['cmCreateProductviewTag'];\r\n cmCreateProductviewTag(\r\n properties.productId,\r\n properties.productName,\r\n properties.categoryId,\r\n properties.attrbute,\r\n properties.virtualCategory,\r\n );\r\n\r\n break;\r\n\r\n /**\r\n * @description The Shop Action 5 tag captures data about selected products and which products are present in a shopping cart,\r\n * if any, when the cart is viewed.\r\n *\r\n * @link https://www.ibm.com/support/knowledgecenter/SSPG9M/Implementation/impl_shopact5tag.html\r\n */\r\n case 'cmCreateShopAction5Tag':\r\n const cmCreateShopAction5Tag = window['cmCreateShopAction5Tag'];\r\n cmCreateShopAction5Tag(\r\n properties.productId,\r\n properties.productName,\r\n properties.quantity,\r\n properties.unitPrice,\r\n properties.categoryId,\r\n properties.attrbute,\r\n properties.extraFields,\r\n properties.virtualCategory,\r\n );\r\n\r\n cmDisplayShops();\r\n\r\n break;\r\n\r\n /**\r\n * @description The Shop Action 9 tag captures data about what products were purchased by a customer.\r\n * Like the Shop Action 5 tag, one tag should be sent for each product line item purchased. These tags should be sent\r\n * on the receipt or other completion page confirming a successful order.\r\n *\r\n * @link https://www.ibm.com/support/knowledgecenter/SSPG9M/Implementation/impl_shopact9tag.html\r\n */\r\n case 'cmCreateShopAction9Tag':\r\n const cmCreateShopAction9Tag = window['cmCreateShopAction9Tag'];\r\n cmCreateShopAction9Tag(\r\n properties.productId,\r\n properties.productName,\r\n properties.quantity,\r\n properties.unitPrice,\r\n properties.registrationId,\r\n properties.orderId,\r\n properties.orderSubtotal,\r\n properties.categoryId,\r\n properties.attrbute,\r\n properties.extraFields,\r\n );\r\n\r\n cmDisplayShops();\r\n\r\n break;\r\n\r\n /**\r\n * @description The Order tag captures order header information such as Registration ID, order ID, order subtotal,\r\n * and shipping and handling. The Order tag should be sent on the receipt page confirming order completion.\r\n *\r\n * @link https://www.ibm.com/support/knowledgecenter/SSPG9M/Implementation/impl_ordertag.html\r\n */\r\n case 'cmCreateOrderTag':\r\n const cmCreateOrderTag = window['cmCreateOrderTag'];\r\n cmCreateOrderTag(\r\n properties.orderId,\r\n properties.orderSubtotal,\r\n properties.orderShipping,\r\n properties.registrationId,\r\n properties.registrantCity,\r\n properties.registrantState,\r\n properties.registrantPostalCode,\r\n properties.attrbute,\r\n properties.extraFields,\r\n );\r\n\r\n break;\r\n\r\n /**\r\n * @description The Registration tag creates a Lifetime Visitor Experience Profile (LIVE Profile) by associating a single\r\n * common Registration ID with the IBM® Digital Analytics permanent cookie set in every browser visiting the tagged site.\r\n *\r\n * @link https://www.ibm.com/support/knowledgecenter/SSPG9M/Implementation/impl_registrationtag.html\r\n */\r\n case 'cmCreateRegistrationTag':\r\n const cmCreateRegistrationTag = window['cmCreateRegistrationTag'];\r\n cmCreateRegistrationTag(\r\n properties.registrationId,\r\n properties.registrantEmail,\r\n properties.registrantCity,\r\n properties.registrantState,\r\n properties.registrantPostalCode,\r\n properties.registrantCountry,\r\n properties.attrbute,\r\n );\r\n\r\n break;\r\n\r\n /**\r\n * @description The Element tag is used to track intra-page content in IBM® Digital Analytics. Data collected by\r\n * the Element tag is used to populate values in the Element Categories and Top Viewed Elements reports.\r\n *\r\n * @link https://www.ibm.com/support/knowledgecenter/SSPG9M/Implementation/impl_elementtag.html\r\n */\r\n case 'cmCreateElementTag':\r\n const cmCreateElementTag = window['cmCreateElementTag'];\r\n cmCreateElementTag(\r\n properties.elementId,\r\n properties.elementCategory,\r\n properties.attrbute,\r\n );\r\n\r\n break;\r\n\r\n /**\r\n * @description The Conversion Event tag is employed for tracking of general non-commerce conversion events.\r\n * The Conversion Event tag is used to populate values in the Conversion Events Reports and to create Key Segments.\r\n * This tag and the reports it populates enable analysis of a wide variety of site activities.\r\n *\r\n * @link https://www.ibm.com/support/knowledgecenter/SSPG9M/Implementation/impl_conversioneventtag.html\r\n */\r\n case 'cmCreateConversionEventTag':\r\n const cmCreateConversionEventTag = window['cmCreateConversionEventTag'];\r\n cmCreateConversionEventTag(\r\n properties.eventId,\r\n properties.actionType,\r\n properties.eventCategoryId,\r\n properties.points,\r\n properties.attrbute,\r\n properties.extraFields,\r\n );\r\n\r\n break;\r\n\r\n default:\r\n console.warn('Unsupported Event Action');\r\n }\r\n }\r\n}\r\n"]}