{"version":3,"sources":["webpack://_N_E/./node_modules/react-gtm-module/dist/index.js","webpack://_N_E/./node_modules/react-gtm-module/dist/utils/warn.js","webpack://_N_E/./node_modules/react-gtm-module/dist/TagManager.js","webpack://_N_E/./node_modules/react-gtm-module/dist/Snippets.js"],"names":["obj","_TagManager","_TagManager2","__esModule","default","module","exports","Object","defineProperty","value","s","console","warn","_Snippets","_Snippets2","TagManager","dataScript","dataLayer","script","document","createElement","innerHTML","gtm","args","snippets","tags","noScript","noscript","iframe","this","dataLayerVar","initialize","_ref","gtmId","_ref$events","events","undefined","_ref$dataLayerName","dataLayerName","_ref$auth","auth","_ref$preview","preview","id","head","appendChild","insertBefore","childNodes","body","_ref2","_dataLayer","_ref2$dataLayerName","window","push","_warn","_warn2","Snippets","gtm_auth","gtm_preview","JSON","stringify","slice"],"mappings":"sGAEA,IAIgCA,EAJ5BC,EAAc,EAAQ,QAEtBC,GAE4BF,EAFUC,IAEWD,EAAIG,WAAaH,EAAM,CAAEI,QAASJ,GAEvFK,EAAOC,QAAUJ,EAAaE,S,kCCN9BG,OAAOC,eAAeF,EAAS,aAAc,CAC3CG,OAAO,IAMTH,EAAQF,QAJG,SAAcM,GACvBC,QAAQC,KAAK,cAAeF,K,kCCJ9B,IAIgCV,EAJ5Ba,EAAY,EAAQ,QAEpBC,GAE4Bd,EAFQa,IAEab,EAAIG,WAAaH,EAAM,CAAEI,QAASJ,GAEvF,IAAIe,EAAa,CACfC,WAAY,SAAoBC,GAC9B,IAAIC,EAASC,SAASC,cAAc,UAEpC,OADAF,EAAOG,UAAYJ,EACZC,GAETI,IAAK,SAAaC,GAChB,IAAIC,EAAWV,EAAWV,QAAQqB,KAAKF,GAgBvC,MAAO,CACLG,SAfa,WACb,IAAIC,EAAWR,SAASC,cAAc,YAEtC,OADAO,EAASN,UAAYG,EAASI,OACvBD,GAaPT,OAVW,WACX,IAAIA,EAASC,SAASC,cAAc,UAEpC,OADAF,EAAOG,UAAYG,EAASN,OACrBA,GAQPF,W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BN,EAAKM,cACrBI,EAAUV,EAAKU,QAGfe,EAAW,aAFJzB,EAAKQ,KAGZkB,EAAc,gBAAkBhB,EAUpC,OARKC,IAAI,EAAIY,EAAOnD,SAAS,sBAQtB,CACLwB,OAPW,oEAAsEe,EAAKc,EAAWC,EAAc,sHAQ/GxC,OANW,qHAA2HyC,KAAKC,UAAUzB,GAAQ0B,MAAM,GAAI,GAAK,sLAAiMJ,EAAWC,EAAc,qGAA2GpB,EAAgB,MAAUK,EAAK,MAOhhBb,aALiBD,KAAKZ,UAAUA,EAAWqB,KAQ/CrB,UAAW,SAAmBiC,EAAYZ,GACxC,MAAO,kBAAoBA,EAAgB,aAAeA,EAAgB,yBAA2BA,EAAgB,SAAWqB,KAAKC,UAAUV,GAAc,MAIjK7C,EAAOC,QAAUkD","file":"static/chunks/57.5197c53f18238eb35fc5.js","sourcesContent":["'use strict';\n\nvar _TagManager = require('./TagManager');\n\nvar _TagManager2 = _interopRequireDefault(_TagManager);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = _TagManager2.default;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar warn = function warn(s) {\n  console.warn('[react-gtm]', s);\n};\n\nexports.default = warn;","'use strict';\n\nvar _Snippets = require('./Snippets');\n\nvar _Snippets2 = _interopRequireDefault(_Snippets);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar TagManager = {\n  dataScript: function dataScript(dataLayer) {\n    var script = document.createElement('script');\n    script.innerHTML = dataLayer;\n    return script;\n  },\n  gtm: function gtm(args) {\n    var snippets = _Snippets2.default.tags(args);\n\n    var noScript = function noScript() {\n      var noscript = document.createElement('noscript');\n      noscript.innerHTML = snippets.iframe;\n      return noscript;\n    };\n\n    var script = function script() {\n      var script = document.createElement('script');\n      script.innerHTML = snippets.script;\n      return script;\n    };\n\n    var dataScript = this.dataScript(snippets.dataLayerVar);\n\n    return {\n      noScript: noScript,\n      script: script,\n      dataScript: dataScript\n    };\n  },\n  initialize: function initialize(_ref) {\n    var gtmId = _ref.gtmId,\n        _ref$events = _ref.events,\n        events = _ref$events === undefined ? {} : _ref$events,\n        dataLayer = _ref.dataLayer,\n        _ref$dataLayerName = _ref.dataLayerName,\n        dataLayerName = _ref$dataLayerName === undefined ? 'dataLayer' : _ref$dataLayerName,\n        _ref$auth = _ref.auth,\n        auth = _ref$auth === undefined ? '' : _ref$auth,\n        _ref$preview = _ref.preview,\n        preview = _ref$preview === undefined ? '' : _ref$preview;\n\n    var gtm = this.gtm({\n      id: gtmId,\n      events: events,\n      dataLayer: dataLayer || undefined,\n      dataLayerName: dataLayerName,\n      auth: auth,\n      preview: preview\n    });\n    if (dataLayer) document.head.appendChild(gtm.dataScript);\n    document.head.insertBefore(gtm.script(), document.head.childNodes[0]);\n    document.body.insertBefore(gtm.noScript(), document.body.childNodes[0]);\n  },\n  dataLayer: function dataLayer(_ref2) {\n    var _dataLayer = _ref2.dataLayer,\n        _ref2$dataLayerName = _ref2.dataLayerName,\n        dataLayerName = _ref2$dataLayerName === undefined ? 'dataLayer' : _ref2$dataLayerName;\n\n    if (window[dataLayerName]) return window[dataLayerName].push(_dataLayer);\n    var snippets = _Snippets2.default.dataLayer(_dataLayer, dataLayerName);\n    var dataScript = this.dataScript(snippets);\n    document.head.insertBefore(dataScript, document.head.childNodes[0]);\n  }\n};\n\nmodule.exports = TagManager;","'use strict';\n\nvar _warn = require('./utils/warn');\n\nvar _warn2 = _interopRequireDefault(_warn);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// https://developers.google.com/tag-manager/quickstart\n\nvar Snippets = {\n  tags: function tags(_ref) {\n    var id = _ref.id,\n        events = _ref.events,\n        dataLayer = _ref.dataLayer,\n        dataLayerName = _ref.dataLayerName,\n        preview = _ref.preview,\n        auth = _ref.auth;\n\n    var gtm_auth = '&gtm_auth=' + auth;\n    var gtm_preview = '&gtm_preview=' + preview;\n\n    if (!id) (0, _warn2.default)('GTM Id is required');\n\n    var iframe = '\\n      <iframe src=\"https://www.googletagmanager.com/ns.html?id=' + id + gtm_auth + gtm_preview + '&gtm_cookies_win=x\"\\n        height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\" id=\"tag-manager\"></iframe>';\n\n    var script = '\\n      (function(w,d,s,l,i){w[l]=w[l]||[];\\n        w[l].push({\\'gtm.start\\': new Date().getTime(),event:\\'gtm.js\\', ' + JSON.stringify(events).slice(1, -1) + '});\\n        var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!=\\'dataLayer\\'?\\'&l=\\'+l:\\'\\';\\n        j.async=true;j.src=\\'https://www.googletagmanager.com/gtm.js?id=\\'+i+dl+\\'' + gtm_auth + gtm_preview + '&gtm_cookies_win=x\\';\\n        f.parentNode.insertBefore(j,f);\\n      })(window,document,\\'script\\',\\'' + dataLayerName + '\\',\\'' + id + '\\');';\n\n    var dataLayerVar = this.dataLayer(dataLayer, dataLayerName);\n\n    return {\n      iframe: iframe,\n      script: script,\n      dataLayerVar: dataLayerVar\n    };\n  },\n  dataLayer: function dataLayer(_dataLayer, dataLayerName) {\n    return '\\n      window.' + dataLayerName + ' = window.' + dataLayerName + ' || [];\\n      window.' + dataLayerName + '.push(' + JSON.stringify(_dataLayer) + ')';\n  }\n};\n\nmodule.exports = Snippets;"],"sourceRoot":""}