function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }

function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }

function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }

function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }

function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }

function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }

function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }

function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }

function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }

function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }

function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }

function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }

function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }

function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }

function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["default~home-sessions-home-sessions-module~pages-home-home-sessions-path-analytics-path-analytics-module"], {
  /***/
  "./node_modules/d3-sankey/index.js":
  /*!*****************************************!*\
    !*** ./node_modules/d3-sankey/index.js ***!
    \*****************************************/

  /*! exports provided: sankey, sankeyCenter, sankeyLeft, sankeyRight, sankeyJustify, sankeyLinkHorizontal */

  /***/
  function _node_modules_d3Sankey_indexJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony import */


    var _src_sankey__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ./src/sankey */
    "./node_modules/d3-sankey/src/sankey.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "sankey", function () {
      return _src_sankey__WEBPACK_IMPORTED_MODULE_0__["default"];
    });
    /* harmony import */


    var _src_align__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./src/align */
    "./node_modules/d3-sankey/src/align.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "sankeyCenter", function () {
      return _src_align__WEBPACK_IMPORTED_MODULE_1__["center"];
    });
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "sankeyLeft", function () {
      return _src_align__WEBPACK_IMPORTED_MODULE_1__["left"];
    });
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "sankeyRight", function () {
      return _src_align__WEBPACK_IMPORTED_MODULE_1__["right"];
    });
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "sankeyJustify", function () {
      return _src_align__WEBPACK_IMPORTED_MODULE_1__["justify"];
    });
    /* harmony import */


    var _src_sankeyLinkHorizontal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./src/sankeyLinkHorizontal */
    "./node_modules/d3-sankey/src/sankeyLinkHorizontal.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "sankeyLinkHorizontal", function () {
      return _src_sankeyLinkHorizontal__WEBPACK_IMPORTED_MODULE_2__["default"];
    });
    /***/

  },

  /***/
  "./node_modules/d3-sankey/src/align.js":
  /*!*********************************************!*\
    !*** ./node_modules/d3-sankey/src/align.js ***!
    \*********************************************/

  /*! exports provided: left, right, justify, center */

  /***/
  function _node_modules_d3Sankey_src_alignJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "left", function () {
      return left;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "right", function () {
      return right;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "justify", function () {
      return justify;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "center", function () {
      return center;
    });
    /* harmony import */


    var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! d3-array */
    "./node_modules/d3-array/src/index.js");

    function targetDepth(d) {
      return d.target.depth;
    }

    function left(node) {
      return node.depth;
    }

    function right(node, n) {
      return n - 1 - node.height;
    }

    function justify(node, n) {
      return node.sourceLinks.length ? node.depth : n - 1;
    }

    function center(node) {
      return node.targetLinks.length ? node.depth : node.sourceLinks.length ? Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["min"])(node.sourceLinks, targetDepth) - 1 : 0;
    }
    /***/

  },

  /***/
  "./node_modules/d3-sankey/src/constant.js":
  /*!************************************************!*\
    !*** ./node_modules/d3-sankey/src/constant.js ***!
    \************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_d3Sankey_src_constantJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "default", function () {
      return constant;
    });

    function constant(x) {
      return function () {
        return x;
      };
    }
    /***/

  },

  /***/
  "./node_modules/d3-sankey/src/sankey.js":
  /*!**********************************************!*\
    !*** ./node_modules/d3-sankey/src/sankey.js ***!
    \**********************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_d3Sankey_src_sankeyJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony import */


    var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! d3-array */
    "./node_modules/d3-array/src/index.js");
    /* harmony import */


    var d3_collection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! d3-collection */
    "./node_modules/d3-collection/src/index.js");
    /* harmony import */


    var _align__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./align */
    "./node_modules/d3-sankey/src/align.js");
    /* harmony import */


    var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./constant */
    "./node_modules/d3-sankey/src/constant.js");

    function ascendingSourceBreadth(a, b) {
      return ascendingBreadth(a.source, b.source) || a.index - b.index;
    }

    function ascendingTargetBreadth(a, b) {
      return ascendingBreadth(a.target, b.target) || a.index - b.index;
    }

    function ascendingBreadth(a, b) {
      return a.y0 - b.y0;
    }

    function value(d) {
      return d.value;
    }

    function nodeCenter(node) {
      return (node.y0 + node.y1) / 2;
    }

    function weightedSource(link) {
      return nodeCenter(link.source) * link.value;
    }

    function weightedTarget(link) {
      return nodeCenter(link.target) * link.value;
    }

    function defaultId(d) {
      return d.index;
    }

    function defaultNodes(graph) {
      return graph.nodes;
    }

    function defaultLinks(graph) {
      return graph.links;
    }

    function find(nodeById, id) {
      var node = nodeById.get(id);
      if (!node) throw new Error("missing: " + id);
      return node;
    }
    /* harmony default export */


    __webpack_exports__["default"] = function () {
      var x0 = 0,
          y0 = 0,
          x1 = 1,
          y1 = 1,
          // extent
      dx = 24,
          // nodeWidth
      py = 8,
          // nodePadding
      id = defaultId,
          align = _align__WEBPACK_IMPORTED_MODULE_2__["justify"],
          nodes = defaultNodes,
          links = defaultLinks,
          iterations = 32;

      function sankey() {
        var graph = {
          nodes: nodes.apply(null, arguments),
          links: links.apply(null, arguments)
        };
        computeNodeLinks(graph);
        computeNodeValues(graph);
        computeNodeDepths(graph);
        computeNodeBreadths(graph, iterations);
        computeLinkBreadths(graph);
        return graph;
      }

      sankey.update = function (graph) {
        computeLinkBreadths(graph);
        return graph;
      };

      sankey.nodeId = function (_) {
        return arguments.length ? (id = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(_), sankey) : id;
      };

      sankey.nodeAlign = function (_) {
        return arguments.length ? (align = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(_), sankey) : align;
      };

      sankey.nodeWidth = function (_) {
        return arguments.length ? (dx = +_, sankey) : dx;
      };

      sankey.nodePadding = function (_) {
        return arguments.length ? (py = +_, sankey) : py;
      };

      sankey.nodes = function (_) {
        return arguments.length ? (nodes = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(_), sankey) : nodes;
      };

      sankey.links = function (_) {
        return arguments.length ? (links = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(_), sankey) : links;
      };

      sankey.size = function (_) {
        return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];
      };

      sankey.extent = function (_) {
        return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];
      };

      sankey.iterations = function (_) {
        return arguments.length ? (iterations = +_, sankey) : iterations;
      }; // Populate the sourceLinks and targetLinks for each node.
      // Also, if the source and target are not objects, assume they are indices.


      function computeNodeLinks(graph) {
        graph.nodes.forEach(function (node, i) {
          node.index = i;
          node.sourceLinks = [];
          node.targetLinks = [];
        });
        var nodeById = Object(d3_collection__WEBPACK_IMPORTED_MODULE_1__["map"])(graph.nodes, id);
        graph.links.forEach(function (link, i) {
          link.index = i;
          var source = link.source,
              target = link.target;
          if (typeof source !== "object") source = link.source = find(nodeById, source);
          if (typeof target !== "object") target = link.target = find(nodeById, target);
          source.sourceLinks.push(link);
          target.targetLinks.push(link);
        });
      } // Compute the value (size) of each node by summing the associated links.


      function computeNodeValues(graph) {
        graph.nodes.forEach(function (node) {
          node.value = Math.max(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["sum"])(node.sourceLinks, value), Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["sum"])(node.targetLinks, value));
        });
      } // Iteratively assign the depth (x-position) for each node.
      // Nodes are assigned the maximum depth of incoming neighbors plus one;
      // nodes with no incoming links are assigned depth zero, while
      // nodes with no outgoing links are assigned the maximum depth.


      function computeNodeDepths(graph) {
        var nodes, next, x;

        for (nodes = graph.nodes, next = [], x = 0; nodes.length; ++x, nodes = next, next = []) {
          nodes.forEach(function (node) {
            node.depth = x;
            node.sourceLinks.forEach(function (link) {
              if (next.indexOf(link.target) < 0) {
                next.push(link.target);
              }
            });
          });
        }

        for (nodes = graph.nodes, next = [], x = 0; nodes.length; ++x, nodes = next, next = []) {
          nodes.forEach(function (node) {
            node.height = x;
            node.targetLinks.forEach(function (link) {
              if (next.indexOf(link.source) < 0) {
                next.push(link.source);
              }
            });
          });
        }

        var kx = (x1 - x0 - dx) / (x - 1);
        graph.nodes.forEach(function (node) {
          node.x1 = (node.x0 = x0 + Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x)))) * kx) + dx;
        });
      }

      function computeNodeBreadths(graph) {
        var columns = Object(d3_collection__WEBPACK_IMPORTED_MODULE_1__["nest"])().key(function (d) {
          return d.x0;
        }).sortKeys(d3_array__WEBPACK_IMPORTED_MODULE_0__["ascending"]).entries(graph.nodes).map(function (d) {
          return d.values;
        }); //

        initializeNodeBreadth();
        resolveCollisions();

        for (var alpha = 1, n = iterations; n > 0; --n) {
          relaxRightToLeft(alpha *= 0.99);
          resolveCollisions();
          relaxLeftToRight(alpha);
          resolveCollisions();
        }

        function initializeNodeBreadth() {
          var ky = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["min"])(columns, function (nodes) {
            return (y1 - y0 - (nodes.length - 1) * py) / Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["sum"])(nodes, value);
          });
          columns.forEach(function (nodes) {
            nodes.forEach(function (node, i) {
              node.y1 = (node.y0 = i) + node.value * ky;
            });
          });
          graph.links.forEach(function (link) {
            link.width = link.value * ky;
          });
        }

        function relaxLeftToRight(alpha) {
          columns.forEach(function (nodes) {
            nodes.forEach(function (node) {
              if (node.targetLinks.length) {
                var dy = (Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["sum"])(node.targetLinks, weightedSource) / Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["sum"])(node.targetLinks, value) - nodeCenter(node)) * alpha;
                node.y0 += dy, node.y1 += dy;
              }
            });
          });
        }

        function relaxRightToLeft(alpha) {
          columns.slice().reverse().forEach(function (nodes) {
            nodes.forEach(function (node) {
              if (node.sourceLinks.length) {
                var dy = (Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["sum"])(node.sourceLinks, weightedTarget) / Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["sum"])(node.sourceLinks, value) - nodeCenter(node)) * alpha;
                node.y0 += dy, node.y1 += dy;
              }
            });
          });
        }

        function resolveCollisions() {
          columns.forEach(function (nodes) {
            var node,
                dy,
                y = y0,
                n = nodes.length,
                i; // Push any overlapping nodes down.

            nodes.sort(ascendingBreadth);

            for (i = 0; i < n; ++i) {
              node = nodes[i];
              dy = y - node.y0;
              if (dy > 0) node.y0 += dy, node.y1 += dy;
              y = node.y1 + py;
            } // If the bottommost node goes outside the bounds, push it back up.


            dy = y - py - y1;

            if (dy > 0) {
              y = node.y0 -= dy, node.y1 -= dy; // Push any overlapping nodes back up.

              for (i = n - 2; i >= 0; --i) {
                node = nodes[i];
                dy = node.y1 + py - y;
                if (dy > 0) node.y0 -= dy, node.y1 -= dy;
                y = node.y0;
              }
            }
          });
        }
      }

      function computeLinkBreadths(graph) {
        graph.nodes.forEach(function (node) {
          node.sourceLinks.sort(ascendingTargetBreadth);
          node.targetLinks.sort(ascendingSourceBreadth);
        });
        graph.nodes.forEach(function (node) {
          var y0 = node.y0,
              y1 = y0;
          node.sourceLinks.forEach(function (link) {
            link.y0 = y0 + link.width / 2, y0 += link.width;
          });
          node.targetLinks.forEach(function (link) {
            link.y1 = y1 + link.width / 2, y1 += link.width;
          });
        });
      }

      return sankey;
    };
    /***/

  },

  /***/
  "./node_modules/d3-sankey/src/sankeyLinkHorizontal.js":
  /*!************************************************************!*\
    !*** ./node_modules/d3-sankey/src/sankeyLinkHorizontal.js ***!
    \************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_d3Sankey_src_sankeyLinkHorizontalJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony import */


    var d3_shape__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! d3-shape */
    "./node_modules/d3-shape/src/index.js");

    function horizontalSource(d) {
      return [d.source.x1, d.y0];
    }

    function horizontalTarget(d) {
      return [d.target.x0, d.y1];
    }
    /* harmony default export */


    __webpack_exports__["default"] = function () {
      return Object(d3_shape__WEBPACK_IMPORTED_MODULE_0__["linkHorizontal"])().source(horizontalSource).target(horizontalTarget);
    };
    /***/

  },

  /***/
  "./node_modules/d3-tip/index.js":
  /*!**************************************!*\
    !*** ./node_modules/d3-tip/index.js ***!
    \**************************************/

  /*! no static exports found */

  /***/
  function _node_modules_d3Tip_indexJs(module, exports, __webpack_require__) {
    var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // d3.tip
    // Copyright (c) 2013 Justin Palmer
    //
    // Tooltips for d3.js SVG visualizations


    (function (root, factory) {
      if (true) {
        // AMD. Register as an anonymous module with d3 as a dependency.
        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(
        /*! d3 */
        "./node_modules/d3/index.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
      } else {
        var d3;
      }
    })(this, function (d3) {
      // Public - contructs a new tooltip
      //
      // Returns a tip
      return function () {
        var direction = d3_tip_direction,
            offset = d3_tip_offset,
            html = d3_tip_html,
            node = initNode(),
            svg = null,
            point = null,
            target = null;

        function tip(vis) {
          svg = getSVGNode(vis);
          point = svg.createSVGPoint();
          document.body.appendChild(node);
        } // Public - show the tooltip on the screen
        //
        // Returns a tip


        tip.show = function () {
          var args = Array.prototype.slice.call(arguments);
          if (args[args.length - 1] instanceof SVGElement) target = args.pop();
          var content = html.apply(this, args),
              poffset = offset.apply(this, args),
              dir = direction.apply(this, args),
              nodel = getNodeEl(),
              i = directions.length,
              coords,
              scrollTop = document.documentElement.scrollTop || document.body.scrollTop,
              scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
          nodel.html(content).style('opacity', 1).style('pointer-events', 'all');

          while (i--) nodel.classed(directions[i], false);

          coords = direction_callbacks.get(dir).apply(this);
          nodel.classed(dir, true).style('top', coords.top + poffset[0] + scrollTop + 'px').style('left', coords.left + poffset[1] + scrollLeft + 'px');
          return tip;
        }; // Public - hide the tooltip
        //
        // Returns a tip


        tip.hide = function () {
          var nodel = getNodeEl();
          nodel.style('opacity', 0).style('pointer-events', 'none');
          return tip;
        }; // Public: Proxy attr calls to the d3 tip container.  Sets or gets attribute value.
        //
        // n - name of the attribute
        // v - value of the attribute
        //
        // Returns tip or attribute value


        tip.attr = function (n, v) {
          if (arguments.length < 2 && typeof n === 'string') {
            return getNodeEl().attr(n);
          } else {
            var args = Array.prototype.slice.call(arguments);
            d3.selection.prototype.attr.apply(getNodeEl(), args);
          }

          return tip;
        }; // Public: Proxy style calls to the d3 tip container.  Sets or gets a style value.
        //
        // n - name of the property
        // v - value of the property
        //
        // Returns tip or style property value


        tip.style = function (n, v) {
          if (arguments.length < 2 && typeof n === 'string') {
            return getNodeEl().style(n);
          } else {
            var args = Array.prototype.slice.call(arguments);
            d3.selection.prototype.style.apply(getNodeEl(), args);
          }

          return tip;
        }; // Public: Set or get the direction of the tooltip
        //
        // v - One of n(north), s(south), e(east), or w(west), nw(northwest),
        //     sw(southwest), ne(northeast) or se(southeast)
        //
        // Returns tip or direction


        tip.direction = function (v) {
          if (!arguments.length) return direction;
          direction = v == null ? v : functor(v);
          return tip;
        }; // Public: Sets or gets the offset of the tip
        //
        // v - Array of [x, y] offset
        //
        // Returns offset or


        tip.offset = function (v) {
          if (!arguments.length) return offset;
          offset = v == null ? v : functor(v);
          return tip;
        }; // Public: sets or gets the html value of the tooltip
        //
        // v - String value of the tip
        //
        // Returns html value or tip


        tip.html = function (v) {
          if (!arguments.length) return html;
          html = v == null ? v : functor(v);
          return tip;
        }; // Public: destroys the tooltip and removes it from the DOM
        //
        // Returns a tip


        tip.destroy = function () {
          if (node) {
            getNodeEl().remove();
            node = null;
          }

          return tip;
        };

        function d3_tip_direction() {
          return 'n';
        }

        function d3_tip_offset() {
          return [0, 0];
        }

        function d3_tip_html() {
          return ' ';
        }

        var direction_callbacks = d3.map({
          n: direction_n,
          s: direction_s,
          e: direction_e,
          w: direction_w,
          nw: direction_nw,
          ne: direction_ne,
          sw: direction_sw,
          se: direction_se
        }),
            directions = direction_callbacks.keys();

        function direction_n() {
          var bbox = getScreenBBox();
          return {
            top: bbox.n.y - node.offsetHeight,
            left: bbox.n.x - node.offsetWidth / 2
          };
        }

        function direction_s() {
          var bbox = getScreenBBox();
          return {
            top: bbox.s.y,
            left: bbox.s.x - node.offsetWidth / 2
          };
        }

        function direction_e() {
          var bbox = getScreenBBox();
          return {
            top: bbox.e.y - node.offsetHeight / 2,
            left: bbox.e.x
          };
        }

        function direction_w() {
          var bbox = getScreenBBox();
          return {
            top: bbox.w.y - node.offsetHeight / 2,
            left: bbox.w.x - node.offsetWidth
          };
        }

        function direction_nw() {
          var bbox = getScreenBBox();
          return {
            top: bbox.nw.y - node.offsetHeight,
            left: bbox.nw.x - node.offsetWidth
          };
        }

        function direction_ne() {
          var bbox = getScreenBBox();
          return {
            top: bbox.ne.y - node.offsetHeight,
            left: bbox.ne.x
          };
        }

        function direction_sw() {
          var bbox = getScreenBBox();
          return {
            top: bbox.sw.y,
            left: bbox.sw.x - node.offsetWidth
          };
        }

        function direction_se() {
          var bbox = getScreenBBox();
          return {
            top: bbox.se.y,
            left: bbox.e.x
          };
        }

        function initNode() {
          var node = d3.select(document.createElement('div'));
          node.style('position', 'absolute').style('top', 0).style('opacity', 0).style('pointer-events', 'none').style('box-sizing', 'border-box');
          return node.node();
        }

        function getSVGNode(el) {
          el = el.node();
          if (el.tagName.toLowerCase() === 'svg') return el;
          return el.ownerSVGElement;
        }

        function getNodeEl() {
          if (node === null) {
            node = initNode(); // re-add node to DOM

            document.body.appendChild(node);
          }

          ;
          return d3.select(node);
        } // Private - gets the screen coordinates of a shape
        //
        // Given a shape on the screen, will return an SVGPoint for the directions
        // n(north), s(south), e(east), w(west), ne(northeast), se(southeast), nw(northwest),
        // sw(southwest).
        //
        //    +-+-+
        //    |   |
        //    +   +
        //    |   |
        //    +-+-+
        //
        // Returns an Object {n, s, e, w, nw, sw, ne, se}


        function getScreenBBox() {
          var targetel = target || d3.event.target;

          while ('undefined' === typeof targetel.getScreenCTM && 'undefined' === targetel.parentNode) {
            targetel = targetel.parentNode;
          }

          var bbox = {},
              matrix = targetel.getScreenCTM(),
              tbbox = targetel.getBBox(),
              width = tbbox.width,
              height = tbbox.height,
              x = tbbox.x,
              y = tbbox.y;
          point.x = x;
          point.y = y;
          bbox.nw = point.matrixTransform(matrix);
          point.x += width;
          bbox.ne = point.matrixTransform(matrix);
          point.y += height;
          bbox.se = point.matrixTransform(matrix);
          point.x -= width;
          bbox.sw = point.matrixTransform(matrix);
          point.y -= height / 2;
          bbox.w = point.matrixTransform(matrix);
          point.x += width;
          bbox.e = point.matrixTransform(matrix);
          point.x -= width / 2;
          point.y -= height / 2;
          bbox.n = point.matrixTransform(matrix);
          point.y += height;
          bbox.s = point.matrixTransform(matrix);
          return bbox;
        } // Private - replace D3JS 3.X d3.functor() function


        function functor(v) {
          return typeof v === "function" ? v : function () {
            return v;
          };
        }

        return tip;
      };
    });
    /***/

  },

  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-sessions/path-analytics/navigationpathanalysis/navigationpathanalysis.component.html":
  /*!************************************************************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-sessions/path-analytics/navigationpathanalysis/navigationpathanalysis.component.html ***!
    \************************************************************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_rawLoader_dist_cjsJs_src_app_pages_home_homeSessions_pathAnalytics_navigationpathanalysis_navigationpathanalysisComponentHtml(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "<!-- sankey chart section -->\n<div class=\"panel panel-info\" style='border-radius:0px !important;margin-top: -1%;margin-left: 32px;'>\n   <div class=\"panel-heading pheader\" role=\"tab\" id=\"headingOne\">\n     <h4 class=\"panel-title header\">\n        <a class=\"collapsed\" role=\"button\"  aria-expanded=\"false\" aria-controls=\"collapseTwo\"></a>\n     </h4>\n   </div> \n   <div class=\"panel-body scrollarea\" >\n    <!--<svg id=\"sankey\" width=\"100%\" attr.height.px=\"{{height}}\"  ></svg> -->\n    <svg id=\"sankey\" [style.width.px]=\"width\" [style.height.px]=\"height\"></svg>\n   </div>\n</div>\n\n";
    /***/
  },

  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/path-analytics-filter.component.html":
  /*!**********************************************************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/path-analytics-filter.component.html ***!
    \**********************************************************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_rawLoader_dist_cjsJs_src_app_pages_home_homeSessions_pathAnalytics_pathAnalyticsFilter_pathAnalyticsFilterComponentHtml(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "<p-sidebar #sidebar [styleClass]=\"classes\" [(visible)]=\"visible\" [showCloseIcon]=\"false\" baseZIndex=\"10000\"\n  blockScroll=\"true\" appendTo=\"body\" styleClass=\"time-filter\" [baseZIndex]=\"100\">\n  <div class=\"sidebar-header\">\n    <div class=\"sidebar-title p-grid p-justify-between\">\n      <div>\n        <i class=\"icons8 icons8-clock\"></i>\n        <span *ngIf=\"this.mode == 'NavigationSummary'\">Navigation Summary Filter</span>\n        <span *ngIf=\"this.mode == 'UserFlowReport'\">User Flow Filter</span>\n      </div>\n      <i class=\"icons8-delete icons8 clickable\" (click)=\"closeClick()\"></i>\n    </div>\n  </div>\n  <div class=\"sidebar-content\">\n\n    <form [formGroup]=\"analysisForm\" *ngIf=\"!reloading\">\n      <div class=\"p-grid p-col-12 p-justify-between p-align-center ui-fluid\">\n        <!--<p-multiSelect class=\"w-100-p\" [style]=\"{'width':'300px'}\" dropdownIcon=\"icons8 icons8-expand-arrow\"\n          [options]=\"npage\" defaultLabel='Select Page' formControlName=\"entryPage\"></p-multiSelect> -->\n        <p-multiSelect [options]=\"nchannel\" defaultLabel='Select Channel' class=\"w-100-p\"\n          dropdownIcon=\"icons8 icons8-expand-arrow\" formControlName=\"channel\">\n        </p-multiSelect>\n      </div>\n\n      <div class=\"p-grid p-col-12 p-justify-between p-align-center ui-fluid\">\n        <!-- <p-multiSelect [options]=\"nchannel\" [style]=\"{'width':'300px'}\" class=\"w-100-p\"\n          dropdownIcon=\"icons8 icons8-expand-arrow\" defaultLabel='Select Channel' formControlName=\"channels\"\n          (onChange)='onSelectChannel($event)'></p-multiSelect> -->\n        <p-multiSelect [options]=\"usersegmentoption\" defaultLabel='Select User Segment' class=\"w-100-p\"\n          dropdownIcon=\"icons8 icons8-expand-arrow\" formControlName=\"userSegment\">\n        </p-multiSelect>\n\n      </div>\n\n      <div class=\"p-grid p-col-12 p-justify-between p-align-center\">\n        <!--<p-dropdown [options]=\"metricOptions\" class=\"w-100-p\" formControlName=\"metric\"\n          dropdownIcon=\"icons8 icons8-expand-arrow\" tooltip=\"Select Metric Name\"></p-dropdown> -->\n\n        <p-dropdown [options]=\"dimensions\" formControlName=\"dimType\" (onChange)=\"selectDimension($event)\"\n          class=\"w-100-p\" dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\n        <span id=\"dim1\" style=\"padding-top: 10px;width: 100%;display:none\">\n          <p-dropdown [options]=\"newbs\" formControlName=\"browser\" dropdownIcon=\"icons8 icons8-expand-arrow\">\n          </p-dropdown>\n        </span>\n        <span id=\"dim2\" style=\"padding-top: 10px;width: 100%;display:none\">\n          <p-dropdown [options]=\"newos\" formControlName=\"platform\" dropdownIcon=\"icons8 icons8-expand-arrow\">\n          </p-dropdown>\n        </span>\n        <span id=\"dim3\" style=\"padding-top: 10px;width: 100%;display:none\">\n          <p-dropdown [options]=\"nlocation\" formControlName=\"location\" dropdownIcon=\"icons8 icons8-expand-arrow\">\n          </p-dropdown>\n        </span>\n        <span id=\"dim4\" style=\"padding-top: 10px;width: 100%;display:none\">\n          <p-dropdown [options]=\"device\" formControlName=\"device\" dropdownIcon=\"icons8 icons8-expand-arrow\">\n          </p-dropdown>\n        </span>\n\n      </div>\n\n      <div class=\"p-grid p-col-12 p-justify-between p-align-center\">\n        <!--<p-dropdown [options]=\"rollingWindowOptions\" class=\"w-100-p\" formControlName=\"rollingwindow\"\n          dropdownIcon=\"icons8 icons8-expand-arrow\" tooltip=\"Select Rolling Window\"></p-dropdown> -->\n\n        <p-dropdown [options]=\"npage\" class=\"w-100-p\" dropdownIcon=\"icons8 icons8-expand-arrow\" formControlName=\"page\">\n        </p-dropdown>\n      </div>\n\n\n\n      <div class=\"action-buttons\">\n        <button pButton type=\"reset\" label=\"RESET\" class=\"ui-outline-button ui-button-secondary\"\n          (click)='resetForm()'></button>\n        <button pButton type=\"submit\" label=\"APPLY\" (click)=\"onSubmit()\"\n          class=\"ui-button-rounded ui-button-right\"></button>\n\n        <!-- <button class=\"ui-button ui-widget ui-state-default ui-corner-all\" style=\"padding: 2px 5px;\"\n          [disabled]=\"!analysisForm.valid\">Done</button> \n       <button type=\"button\" pButton (click)='setForm()' label=\"Reset\"></button> -->\n\n      </div>\n\n    </form>\n  </div>\n\n</p-sidebar>";
    /***/
  },

  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-sessions/path-analytics/viewflowpathanalysis/viewflowpathanalysis.component.html":
  /*!********************************************************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-sessions/path-analytics/viewflowpathanalysis/viewflowpathanalysis.component.html ***!
    \********************************************************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_rawLoader_dist_cjsJs_src_app_pages_home_homeSessions_pathAnalytics_viewflowpathanalysis_viewflowpathanalysisComponentHtml(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "<!-- sankey chart section -->\n\n<div class=\"panel panel-info\" style='border-radius:0px !important;'>\n   <div class=\"panel-heading pheader\" role=\"tab\" id=\"headingOne\">\n      <h4 class=\"panel-title header\">\n         <a class=\"collapsed\" role=\"button\" aria-expanded=\"false\" aria-controls=\"collapseTwo\"></a>\n      </h4>\n   </div>\n   <div class=\"dropdown-wrapper\">\n         <p-dropdown [options]=\"dimensions\" [(ngModel)]=\"dimType\" [style]=\"{'width':'200px','margin-left':'20px'}\">\n         </p-dropdown>\n         <button (click)='setValue()' pButton icon=\"las-check-square\" class=\"icon-button no-shadow\"></button>\n         <!-- <button pButton label=\"Back\" *ngIf='changemode == true' class=\"ui-outline-button ui-button-secondary \"\n         (click)='setBackNavigation()'></button> -->\n   </div>\n   <div class=\"panel-body scrollarea\">\n      <svg class=\"viewflowpathanalysis\" id=\"sankey\" [ngStyle]=\"{'height.px': height, 'width.px': maxSankeyChartDepth}\"></svg>\n   </div>\n</div>";
    /***/
  },

  /***/
  "./src/app/pages/home/home-sessions/path-analytics/navigationpathanalysis/navigationpathanalysis.component.scss":
  /*!**********************************************************************************************************************!*\
    !*** ./src/app/pages/home/home-sessions/path-analytics/navigationpathanalysis/navigationpathanalysis.component.scss ***!
    \**********************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _src_app_pages_home_homeSessions_pathAnalytics_navigationpathanalysis_navigationpathanalysisComponentScss(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "@charset \"UTF-8\";\napp-navigationpathanalysis {\n  /* Creates a small triangle extender for the tooltip */\n  /* Northward tooltips */\n  /* Eastward tooltips */\n  /* Southward tooltips */\n  /* Westward tooltips */\n}\napp-navigationpathanalysis .header {\n  font-size: 14px !important;\n  color: rebeccapurple;\n  font-weight: 600;\n}\napp-navigationpathanalysis .d3-tip {\n  line-height: 1;\n  font-weight: bold;\n  padding: 12px;\n  background: rgba(0, 0, 0, 0.8);\n  color: #fff;\n  border-radius: 2px;\n  pointer-events: none;\n}\napp-navigationpathanalysis .d3-tip:after {\n  box-sizing: border-box;\n  display: inline;\n  font-size: 10px;\n  width: 100%;\n  line-height: 1;\n  color: rgba(0, 0, 0, 0.8);\n  position: absolute;\n  pointer-events: none;\n}\napp-navigationpathanalysis .d3-tip.n:after {\n  content: \"▼\";\n  margin: -1px 0 0 0;\n  top: 100%;\n  left: 0;\n  text-align: center;\n}\napp-navigationpathanalysis .d3-tip.e:after {\n  content: \"◀\";\n  margin: -4px 0 0 0;\n  top: 50%;\n  left: -8px;\n}\napp-navigationpathanalysis .d3-tip.s:after {\n  content: \"▲\";\n  margin: 0 0 1px 0;\n  top: -8px;\n  left: 0;\n  text-align: center;\n}\napp-navigationpathanalysis .d3-tip.w:after {\n  content: \"▶\";\n  margin: -4px 0 0 -1px;\n  top: 50%;\n  left: 100%;\n}\napp-navigationpathanalysis .scrollarea {\n  display: block;\n  width: 100%;\n  height: calc(100vh - 160px);\n  overflow: scroll;\n}";
    /***/
  },

  /***/
  "./src/app/pages/home/home-sessions/path-analytics/navigationpathanalysis/navigationpathanalysis.component.ts":
  /*!********************************************************************************************************************!*\
    !*** ./src/app/pages/home/home-sessions/path-analytics/navigationpathanalysis/navigationpathanalysis.component.ts ***!
    \********************************************************************************************************************/

  /*! exports provided: NavigationpathanalysisComponent */

  /***/
  function _src_app_pages_home_homeSessions_pathAnalytics_navigationpathanalysis_navigationpathanalysisComponentTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "NavigationpathanalysisComponent", function () {
      return NavigationpathanalysisComponent;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var d3_ng2_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! d3-ng2-service */
    "./node_modules/d3-ng2-service/esm/index.js");
    /* harmony import */


    var d3_sankey__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! d3-sankey */
    "./node_modules/d3-sankey/index.js");
    /* harmony import */


    var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! @angular/router */
    "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
    /* harmony import */


    var d3_tip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! d3-tip */
    "./node_modules/d3-tip/index.js");
    /* harmony import */


    var d3_tip__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(d3_tip__WEBPACK_IMPORTED_MODULE_5__);
    /* harmony import */


    var _common_service_nvhttp_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! ../../common/service/nvhttp.service */
    "./src/app/pages/home/home-sessions/common/service/nvhttp.service.ts");
    /* harmony import */


    var src_app_shared_pipes_pipe_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! src/app/shared/pipes/pipe.service */
    "./src/app/shared/pipes/pipe.service.ts");

    var NavigationpathanalysisComponent = /*#__PURE__*/function () {
      function NavigationpathanalysisComponent(pipeservice, element, ngZone, d3Service, httpService, route, router) {
        _classCallCheck(this, NavigationpathanalysisComponent);

        this.pipeservice = pipeservice;
        this.ngZone = ngZone;
        this.httpService = httpService;
        this.route = route;
        this.router = router;
        this.dimensions = ["Browser", "Location", "OS", "Device", "User Segment"];
        this.metadata = null;
        this.d3 = d3Service.getD3();
        this.parentNativeElement = element.nativeElement;
      }

      return _createClass(NavigationpathanalysisComponent, [{
        key: "ngOnInit",
        value: function ngOnInit() {
          //Check if it is coming from breadcrumb then set the previous breadcrumb else set a new one.
          //Note: no need to check this.breadInfo == null.
          if (this.maxnodelength < 300) this.height = this.maxnodelength + 250;else this.height = this.maxnodelength;
          this.pathDataService = this.refinedData;
          this.drawSankeyChart(this.pathDataService.refinedData);
        }
        /* Data formatter for network map*/

      }, {
        key: "convertDataFormat",
        value: function convertDataFormat(val1) {
          try {
            var numFormat = this.pipeservice.getFormatter('num_en_us');
            var result = numFormat.transform(parseInt(val1));
            return result;
          } catch (e) {
            console.error("Error in convertDataFormat:", e);
            return val1; // fallback to original string
          }
        }
      }, {
        key: "drawSankeyChart",
        value: function drawSankeyChart(refineSankeyData) {
          var _this = this;

          var NODE_WIDTH = 200;
          var NODE_PADDING = 40;
          var DEPTH_WIDTH = 350;
          var thisrefrence = this;
          var margin = {
            top: 70,
            right: 0,
            bottom: 0,
            left: 0
          };
          var width = 550 + (this.pathDataService.sankeyStep - 1) * DEPTH_WIDTH + 150;
          var sankeyWidth = width - 150; //for next/previous button

          var height = this.pathDataService.getMaxNodeLength() * 100 + margin.top + 150;
          this.height = height + 50;
          this.width = width + 50;
          /** sankeyChart-area size */

          var formatNumber = this.d3.format(",.0f"),
              format = function format(d) {
            return formatNumber(d) + " Sessions";
          },
              color = this.d3.scaleOrdinal(this.d3.schemeCategory10);

          var svg = this.d3.select("#sankey").append("svg").attr("width", width + margin.left + margin.right).attr("height", height + margin.top + margin.bottom).append("g").attr("transform", "translate(" + margin.left + "," + margin.top + ")");
          var sankey = d3_sankey__WEBPACK_IMPORTED_MODULE_3__["sankey"]().nodeWidth(NODE_WIDTH).nodePadding(NODE_PADDING).size([sankeyWidth, height - 150]); //rkm-height-150

          /** init sankeyDataSet */

          var sankeyDataSet = refineSankeyData;

          if (sankeyDataSet) {
            var link = svg.append("g").attr("class", "links").attr("fill", "none").attr("stroke", "#000").attr("stroke-opacity", 0.2) //.attr("transform", "translate(" + margin.left + "," + margin.top + ")")
            .selectAll("path");
            var node = svg.append("g").attr("class", "nodes").attr("font-family", "sans-serif").attr("font-size", 14).attr("font-weight", 600).attr('margin-top', "10") //.attr("transform", "translate(" + margin.left + "," + margin.top + ")")
            .selectAll("g");
            var gradX = svg.append("defs").append("linearGradient").attr("id", "linear").attr("x1", "0%").attr("x2", "0%").attr("y1", "0%").attr("y2", "100%");
            gradX.append("stop").attr("offset", "0%").attr("stop-color", "#186ba0");
            gradX.append("stop").attr("offset", "40%").attr("stop-color", "#186ba0");
            gradX.append("stop").attr("offset", "41%").attr("stop-color", "white");
            gradX.append("stop").attr("offset", "100%").attr("stop-color", "white");
            var depthInfo = svg.append("g").selectAll(".depthInfo").data(this.pathDataService.globalDepthInOutStatus).enter().append("g").attr("class", "depthInfo");
            depthInfo.append("rect") //.attr("height", 50)
            .attr("height", function (d) {
              //if(d["depth"] == 0) return "";
              //if(d["depth"] == 1) return 60;
              return 75;
            }).attr("width", NODE_WIDTH).attr("x", function (d) {
              //if(d["depth"] == 0) return "";
              return d["depth"] * DEPTH_WIDTH;
            }).attr("y", -80).style("stroke", "#186ba0").style("fill", "url(#linear)").attr('dx', 100).append("title").text(function (d) {
              if (d["depth"] == 0) return "PREVIOUS ";
              if (d["depth"] == 1) return " CURRENT ";
              return ' NEXT ';
            });
            depthInfo.append("text").attr("y", -60).append('svg:tspan').attr("x", function (d) {
              return d["depth"] * DEPTH_WIDTH + 60; //plus padding
            }).attr('dy', 5).attr("fill", "white").style("font-size", "16px").style("font-family", "calibri").text(function (d) {
              if (d["depth"] == 0) return "PREVIOUS ";
              if (d["depth"] == 1) return " CURRENT ";
              return ' NEXT ';
            }).append('svg:tspan').attr("x", function (d) {
              return d["depth"] * DEPTH_WIDTH + 5; //plus padding
            }).attr('dy', 15).style("font-size", "12px").text(function (d) {
              if (d["depth"] == 0) return "";
              return thisrefrence.convertDataFormat(d["in"]) + ' Sessions';
            }).attr("fill", "black").append('svg:tspan').attr("x", function (d) {
              return d["depth"] * DEPTH_WIDTH + 5; //plus padding
            }).attr('dy', 15).text(function (d) {
              if (d["depth"] == 0) return thisrefrence.convertDataFormat(d["out"]) + ' Sessions ';
              if (d["depth"] == 1) return thisrefrence.convertDataFormat(d["out"]) + ' Through';
              if (d["depth"] == 2) return '';
            }).attr("fill", "black").append('svg:tspan').attr("x", function (d) {
              return d["depth"] * DEPTH_WIDTH + 5; //plus padding
            }).attr('dy', 15).text(function (d) {
              if (d["depth"] == 1) return thisrefrence.convertDataFormat("" + (d["in"] - d["out"])) + ' Drop-Offs';else return "";
            }).attr("fill", "black");
            sankey(sankeyDataSet);
            link = link.data(sankeyDataSet.links).enter().append("path").attr("d", d3_sankey__WEBPACK_IMPORTED_MODULE_3__["sankeyLinkHorizontal"]()).attr("stroke-width", function (d) {
              return Math.max(1, d.width);
            }).attr("id", function (d, i) {
              d.id = i;
              return "link-" + i;
            }).style("stroke", function (d) {
              if (d["target"].name == 'OUT') {
                return "red";
              }

              return '#000'; //google link color
            }).sort(function (a, b) {
              return a["width"] - b["width"];
            });
            var tip = d3_tip__WEBPACK_IMPORTED_MODULE_5__().attr('class', 'd3-tip').offset([-10, 0]).html(function (d) {
              if (d.depth == 0 || d.name == 'OUT') {
                return "<strong>Page :</strong> <span style='color:red'>" + d.name + "</span>";
              }

              var inVal = _this.pathDataService.globalNodeInOutStatus[d.node]["in"];
              var outVal = _this.pathDataService.globalNodeInOutStatus[d.node].out;
              var outPage = inVal - outVal;
              return "<strong>* Page :</strong> <span style='color:#FF4533'>" + d.name + "</span>" + "<br/><br/><strong>* Through traffic :</strong> <span style='color:#3733FF'>" + thisrefrence.convertDataFormat(outVal) + " (" + Math.round(outVal / inVal * 100 * 100) / 100 + "%)" + "</span>" + "<br/><br/><strong>* Drop-offs :</strong> <span style='color:#F933FF'>" + thisrefrence.convertDataFormat("" + outPage) + " (" + Math.round(outPage / inVal * 100 * 100) / 100 + "%)" + "</span>" + "<br/><br/><strong>* Visits : </strong><span style='color:#FF3361'>" + thisrefrence.convertDataFormat(d.value) + "</span>";
            });
            node = node.data(sankeyDataSet.nodes).enter().append("g");
            node.call(tip);
            node.append("rect").attr("x", function (d) {
              return d.x0;
            }).attr("y", function (d) {
              return d.y0;
            }) //.attr("height", function (d: any) {  return ((d.y1 - d.y0 < 40 ) ? 50 : d.y1 - d.y0)   })
            .attr("height", function (d) {
              return d.y1 - d.y0;
            }).attr("width", function (d) {
              return d.x1 - d.x0;
            }).attr("fill", "#D7DBDD") //function (d: any) { return color(d.name.replace(/ .*/, "")); })
            .attr("stroke", "#D7DBDD").attr("opacity", 0.5).style("cursor", "pointer").on("mouseover", function (d) {
              tip.style('background', 'white');
              tip.style('padding', '10px');
              tip.style('border', '2px solid  #000');
              tip.style('border - radius', '6px');
              tip.show(d, this);
            }).on("mouseout", tip.hide).attr("text-anchor", "start").on("click", function (event) {
              _this.highlight_node_links(event, 0);
            });
            node.append("text").append('svg:tspan').attr("x", function (d) {
              return d.x0 + 50;
            }).attr("y", function (d) {
              return (d.y1 + d.y0) / 2;
            }).style("font-size", "14px").style("font-family", "calibri").text(function (d) {
              return d["name"];
            }).append('svg:tspan').attr("x", function (d) {
              return d.x0 + 50;
            }).attr("y", function (d) {
              return (d.y1 + d.y0 + 20) / 2;
            }).style("font-size", "13px").style("font-family", "calibri").text(function (d) {
              return thisrefrence.convertDataFormat(d["value"]);
            }).append('svg:tspan').attr("x", function (d) {
              return d.x0 + 50;
            }).attr("y", function (d) {
              return (d.y1 + d.y0) / 2;
            }).style("font-size", "13px").style("font-family", "calibri").text(function (d) {
              if (d["depth"] == 1) return "";
            }).filter(function (d) {
              return d.x0 < width / 2;
            }).attr("text-anchor", "start").on("click", function (event) {
              _this.highlight_node_links(event, 0);
            });
          }
        }
      }, {
        key: "highlight_node_links",
        value: function highlight_node_links(node, i) {
          var _this2 = this;

          var remainingNodes = [];
          var nextNodes = [];
          var stroke_opacity = 0;

          if (node["data-clicked"] == 1) {
            node["data-clicked"] = 0;
            stroke_opacity = 0.4;
          } else {
            node["data-clicked"] = 1;
            stroke_opacity = 1.0;
          }

          var traverse = [{
            linkType: "sourceLinks",
            nodeType: "target"
          }, {
            linkType: "targetLinks",
            nodeType: "source"
          }];
          traverse.forEach(function (step) {
            node[step.linkType].forEach(function (link) {
              remainingNodes.push(link[step.nodeType]);

              _this2.d3.select("#link-" + link.index).style("stroke-opacity", stroke_opacity);

              ;
            });

            while (remainingNodes.length) {
              nextNodes = [];
              remainingNodes.forEach(function (node) {
                node[step.linkType].forEach(function (link) {
                  nextNodes.push(link[step.nodeType]);

                  _this2.d3.select("#link-" + link.index).style("stroke-opacity", stroke_opacity);

                  ;
                });
              });
              remainingNodes = nextNodes;
            }
          });
        }
      }]);
    }();

    NavigationpathanalysisComponent.ctorParameters = function () {
      return [{
        type: src_app_shared_pipes_pipe_service__WEBPACK_IMPORTED_MODULE_7__["PipeService"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
      }, {
        type: d3_ng2_service__WEBPACK_IMPORTED_MODULE_2__["D3Service"]
      }, {
        type: _common_service_nvhttp_service__WEBPACK_IMPORTED_MODULE_6__["NvhttpService"]
      }, {
        type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["ActivatedRoute"]
      }, {
        type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]
      }];
    };

    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], NavigationpathanalysisComponent.prototype, "dimensions", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], NavigationpathanalysisComponent.prototype, "maxnodelength", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], NavigationpathanalysisComponent.prototype, "refinedData", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], NavigationpathanalysisComponent.prototype, "response", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], NavigationpathanalysisComponent.prototype, "filter", void 0);
    NavigationpathanalysisComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'app-navigationpathanalysis',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./navigationpathanalysis.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-sessions/path-analytics/navigationpathanalysis/navigationpathanalysis.component.html"))["default"],
      encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./navigationpathanalysis.component.scss */
      "./src/app/pages/home/home-sessions/path-analytics/navigationpathanalysis/navigationpathanalysis.component.scss"))["default"]]
    })], NavigationpathanalysisComponent);
    /***/
  },

  /***/
  "./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/path-analytics-filter.component.scss":
  /*!********************************************************************************************************************!*\
    !*** ./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/path-analytics-filter.component.scss ***!
    \********************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _src_app_pages_home_homeSessions_pathAnalytics_pathAnalyticsFilter_pathAnalyticsFilterComponentScss(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = ".path-analytics-filter-sidebar .sidebar-content {\n  height: 94vh;\n  overflow-y: scroll;\n}\n.path-analytics-filter-sidebar .sidebar-content .search-div-css {\n  position: relative;\n}\n.path-analytics-filter-sidebar .sidebar-content .search-div-css i.icons8-calendar {\n  font-size: 1.5em;\n  position: absolute;\n  color: #1d5290;\n  left: 0px;\n  line-height: 35px;\n  z-index: 99;\n}\n.path-analytics-filter-sidebar .sidebar-content .customInput {\n  border: none;\n  width: 13vw;\n  padding-left: 23px;\n  margin-top: 2px;\n  border-bottom: 1px solid #1d5290;\n  border-radius: 0;\n  background: #fafafa;\n}\n.path-analytics-filter-sidebar .sidebar-content .action-buttons {\n  text-align: center;\n}\n.path-analytics-filter-sidebar .sidebar-content .action-buttons .ui-button.ui-button-secondary {\n  margin-right: 5px;\n}\n.path-analytics-filter-sidebar .sidebar-content .ui-selectbutton .ui-button {\n  background-color: #fff;\n  border: 2px solid #1d5290;\n  color: #1d5290;\n  margin-right: 5px;\n  border-radius: 3px;\n}\n.path-analytics-filter-sidebar .sidebar-content .ui-button.ui-button-text-only .ui-button-text {\n  padding: 0.529em 1.5em;\n}\n.path-analytics-filter-sidebar .sidebar-content .ui-selectbutton .ui-button.ui-state-active {\n  background-color: #1d5290;\n  border-radius: 3px;\n  border-color: #1d5290;\n}\n.path-analytics-filter-sidebar .sidebar-content .ui-selectbutton .ui-button:not(.ui-state-disabled):not(.ui-state-active):hover {\n  background-color: #1d5290;\n  border-color: #1d5290;\n  color: #fff;\n}\n.path-analytics-filter-sidebar .sidebar-content .ui-selectbutton .ui-button.ui-state-active:not(.ui-state-disabled):hover {\n  background-color: #1d5290;\n  border-color: #1d5290;\n  color: #fff;\n}\n.path-analytics-filter-sidebar .sidebar-content .small-dropdown .ui-dropdown {\n  width: 65px;\n  min-width: 50px;\n}\n.path-analytics-filter-sidebar .sidebar-content .small-dropdown .ui-inputtext {\n  width: 76.7%;\n}\n.path-analytics-filter-sidebar .sidebar-content .second-class .ui-accordion .ui-accordion-header {\n  display: flex;\n  flex-direction: column;\n}\n.path-analytics-filter-sidebar .sidebar-content .second-class .ui-accordion .ui-accordion-header a {\n  background-color: #fff;\n}\n.path-analytics-filter-sidebar .sidebar-content .second-class .ui-accordion .ui-accordion-header .ui-button.ui-button-text-only .ui-button-text {\n  padding: 5px 10px;\n}\n.path-analytics-filter-sidebar .sidebar-content .second-class .ui-accordion .ui-accordion-toggle-icon {\n  line-height: 30px;\n}";
    /***/
  },

  /***/
  "./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/path-analytics-filter.component.ts":
  /*!******************************************************************************************************************!*\
    !*** ./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/path-analytics-filter.component.ts ***!
    \******************************************************************************************************************/

  /*! exports provided: PathAnalyticsFilterComponent */

  /***/
  function _src_app_pages_home_homeSessions_pathAnalytics_pathAnalyticsFilter_pathAnalyticsFilterComponentTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "PathAnalyticsFilterComponent", function () {
      return PathAnalyticsFilterComponent;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
    /* harmony import */


    var moment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! moment */
    "./node_modules/moment/moment.js");
    /* harmony import */


    var moment__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_3__);
    /* harmony import */


    var src_app_shared_page_sidebar_page_sidebar_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! src/app/shared/page-sidebar/page-sidebar.component */
    "./src/app/shared/page-sidebar/page-sidebar.component.ts");
    /* harmony import */


    var _common_service_metadata_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ../../common/service/metadata.service */
    "./src/app/pages/home/home-sessions/common/service/metadata.service.ts");
    /* harmony import */


    var _pathanalysisfilter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! ./pathanalysisfilter */
    "./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/pathanalysisfilter.ts");
    /* harmony import */


    var src_app_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! src/app/shared/cav-toast/service/cav-message.service */
    "./src/app/shared/cav-toast/service/cav-message.service.ts");

    var PathAnalyticsFilterComponent_1;

    var PathAnalyticsFilterComponent = PathAnalyticsFilterComponent_1 = /*#__PURE__*/function (_src_app_shared_page_) {
      function PathAnalyticsFilterComponent(messageService, metadataService) {
        var _this3;

        _classCallCheck(this, PathAnalyticsFilterComponent);

        _this3 = _callSuper(this, PathAnalyticsFilterComponent);
        _this3.messageService = messageService;
        _this3.metadataService = metadataService;
        _this3.showFilter = null;
        _this3.filter = null;
        _this3.classes = 'path-analytics-filter-sidebar';
        _this3.maxDate = new Date(moment__WEBPACK_IMPORTED_MODULE_3__["tz"](new Date(), sessionStorage.getItem('_nvtimezone')).format('MM/DD/YYYY HH:mm:ss'));
        _this3.nchannel = [];
        _this3.nlocation = [];
        _this3.npage = [];
        _this3.newbs = [];
        _this3.newos = [];
        _this3.metadata = null;
        _this3.device = [];
        _this3.reloading = false;
        _this3.filterChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        _this3.lasttime = ['1 Day', '2 Day', '4 Day', '1 Week', '1 Month', '1 Year'];
        _this3.types = [];
        _this3.newos = [];
        _this3.ln = [];
        _this3.pathfilter = new _pathanalysisfilter__WEBPACK_IMPORTED_MODULE_6__["PathAnalysisFilters"](); // this.nlocation.push({label:'Select Location' ,value:null});

        _this3.device = [{
          label: 'PC',
          value: 'PC'
        }, {
          label: 'Mobile',
          value: 'Mobile'
        }, {
          label: 'Tablet',
          value: 'Tablet'
        }];
        _this3.dimensions = [{
          label: 'Select Dimension',
          value: null
        }, {
          label: 'Browser',
          value: 'Browser'
        }, {
          label: 'Location',
          value: 'Location'
        }, {
          label: 'OS',
          value: 'OS'
        }, {
          label: 'Device',
          value: 'Device'
        }, {
          label: 'Referrer',
          value: 'Referrer'
        }];
        _this3.device = [{
          label: 'Select Device',
          value: null
        }, {
          label: 'PC',
          value: 'PC'
        }, {
          label: 'Mobile',
          value: 'Mobile'
        }, {
          label: 'Tablet',
          value: 'Tablet'
        }];
        _this3.analysisForm = new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormGroup"]({
          channel: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](null),
          browser: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](null),
          platform: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](null),
          location: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](null),
          device: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](null),
          page: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](null),
          dimType: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](null),
          userSegment: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](null),
          threshold: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](null)
        });

        _this3.metadataService.getMetadata().subscribe(function (metadata) {
          _this3.metadata = metadata;

          if (_this3.showFilter === null) {
            _this3.setForm();
          } else {
            _this3.setAfterChangedForm(_this3.showFilter);
          }
        });

        return _this3;
      }

      _inherits(PathAnalyticsFilterComponent, _src_app_shared_page_);

      return _createClass(PathAnalyticsFilterComponent, [{
        key: "ngOnInit",
        value: function ngOnInit() {
          var _this4 = this;

          this.metadataService.getMetadata().subscribe(function (metadata) {
            _this4.metadata = metadata;

            if (_this4.showFilter === null) {
              _this4.setForm();
            } else {
              _this4.setAfterChangedForm(_this4.showFilter);
            }

            var channelm = Array.from(_this4.metadata.channelMap.keys());
            _this4.nchannel = channelm.map(function (key) {
              return {
                label: _this4.metadata.channelMap.get(key).name,
                value: _this4.metadata.channelMap.get(key).id
              };
            });
            _this4.nchannel = channelm.map(function (key) {
              return {
                label: _this4.metadata.channelMap.get(key).name,
                value: _this4.metadata.channelMap.get(key).id
              };
            });
            var pagem = Array.from(_this4.metadata.pageNameMap.keys());
            console.log('pagem ==========' + JSON.stringify(pagem));
            _this4.npage = pagem.map(function (key) {
              return {
                label: _this4.metadata.pageNameMap.get(key).name,
                value: _this4.metadata.pageNameMap.get(key).id
              };
            });
            var p = [];
            p.push({
              label: 'Select Location',
              value: null
            });

            _this4.ln.push({
              label: 'Select Location',
              value: null
            });

            _this4.metadata.locationMap.forEach(function (item, _key, _mapObj) {
              var loc = item.state ? item.state + ',' : '';
              return p.push({
                label: loc + item.country,
                value: item.id
              });
            });

            _this4.nlocation = p;
            var platform = Array.from(_this4.metadata.osMap.keys());
            var osn = [];

            for (var _i = 0, _platform = platform; _i < _platform.length; _i++) {
              var i = _platform[_i];
              osn.push(_this4.metadata.osMap.get(i).name);
            }

            osn = osn.filter(function (x, i, a) {
              return a.indexOf(x) == i;
            });

            _this4.newos.push({
              label: 'Select OS',
              value: null
            });

            var _iterator = _createForOfIteratorHelper(osn),
                _step;

            try {
              for (_iterator.s(); !(_step = _iterator.n()).done;) {
                var _i2 = _step.value;

                _this4.newos.push({
                  label: _i2,
                  value: _i2
                });
              }
            } catch (err) {
              _iterator.e(err);
            } finally {
              _iterator.f();
            }

            var usersegment = Array.from(_this4.metadata.userSegmentMap.keys());

            try {
              _this4.usersegmentoption = usersegment.map(function (key) {
                return {
                  label: _this4.metadata.userSegmentMap.get(key).name,
                  value: _this4.metadata.userSegmentMap.get(key).id
                };
              });
            } catch (e) {
              console.log(e);
            }

            _this4.getBrowserM();

            _this4.nthreshold = [{
              label: 'Select Threshold',
              value: 'null'
            }, {
              label: 10,
              value: 10
            }, {
              label: 15,
              value: 15
            }, {
              label: 25,
              value: 25
            }, {
              label: 50,
              value: 50
            }, {
              label: 100,
              value: 100
            }, {
              label: 125,
              value: 125
            }, {
              label: 150,
              value: 150
            }, {
              label: 1024,
              value: 1024
            }];
          });
        }
      }, {
        key: "onSelectMethodLast",
        value: function onSelectMethodLast(_event) {// const nestedGroup: FormGroup = this.analysisForm.controls['timeFilter'] as FormGroup;
          // const lastvalue = this.analysisForm.controls['lastval'].value;
          // nestedGroup.patchValue({ last: lastvalue });
        }
      }, {
        key: "setForm",
        value: function setForm() {
          var pagem = Array.from(this.metadata.pageNameMap.keys());
          console.log('pagem set' + pagem);
          var pagesm = 0;

          try {
            if (pagem.length > 0) {
              pagem.sort(function (a, b) {
                return a - b;
              });
              var id = 0;

              if (pagem[0] !== -1) {
                id = pagem[0];
              } else {
                id = pagem[1];
              }

              if (pagem.length == 1 && pagem[0] == -1) {
                id = -1;
              }

              pagesm = this.metadata.pageNameMap.get(id).id;
            }
          } catch (e) {
            console.log(e);
          }

          this.analysisForm.reset(); // const nestedGroup: FormGroup = this.analysisForm.controls['timeFilter'] as FormGroup;
          // nestedGroup.patchValue({ last: '4 Hours' });
          // this.timefilter = 'last';
          // this.lastval = '4 Hours';

          this.analysisForm.controls['page'].patchValue(pagesm);
        }
      }, {
        key: "setAfterChangedForm",
        value: function setAfterChangedForm(filter) {
          var f = filter;
          console.log('f', f);
          this.analysisForm = new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormGroup"]({
            channel: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](f.channel),
            userSegment: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](f.userSegment),
            browser: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](f.browser),
            platform: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](f.platform),
            location: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](f.location),
            device: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](f.device),
            page: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](f.page),
            dimType: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](f.dimType),
            stime: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](new Date(f.stime)),
            etime: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](new Date(f.etime)),
            threshold: new _angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormControl"](f.threshold)
          });
          this.setFilterCriteria(this.filter, 'ddr');
        }
      }, {
        key: "setFilterCriteria",
        value: function setFilterCriteria(filterc, val) {
          var filterp = filterc;
          PathAnalyticsFilterComponent_1.filterhtml = '';
          var filterCriteria = filterp.filterCriteriaList;
          var last = '';
          var lasttime = '';
          console.log('last', last, lasttime);

          if (val === 'ddr') {
            filterCriteria = JSON.parse(filterp).filterCriteriaList;
            console.log('filter', JSON.parse(filterp));
          }

          if (lasttime == 'true') {
            PathAnalyticsFilterComponent_1.filterhtml += 'Last ' + last;
          } else {//PathAnalyticsFilterComponent.filterhtml += tfilter.startTime + ' - ' + tfilter.endTime;
          }

          for (var i = 0; i < filterCriteria.length; i++) {
            if (i < filterCriteria.length - 1) {
              PathAnalyticsFilterComponent_1.filterhtml += ' , ';
            }

            if (filterCriteria[i].name === 'Page' && this.mode === 'ViewPath') {} else {
              PathAnalyticsFilterComponent_1.filterhtml += ' ' + filterCriteria[i].name + ' : ' + filterCriteria[i].value;
            }
          }

          this.closeClick();
        }
      }, {
        key: "getFilterHtml",
        value: function getFilterHtml(type) {
          if (type === 1) {
            return PathAnalyticsFilterComponent_1.filterhtml;
          }

          if (PathAnalyticsFilterComponent_1.filterhtml.length > 160) {
            return PathAnalyticsFilterComponent_1.filterhtml.substring(0, 160) + '...';
          }

          return PathAnalyticsFilterComponent_1.filterhtml;
        }
      }, {
        key: "warn",
        value: function warn(msg) {
          this.messageService.add({
            severity: 'warn',
            summary: 'Warning',
            detail: msg
          });
        }
      }, {
        key: "onSubmit",
        value: function onSubmit() {
          var f = this.analysisForm.value;
          console.log('on submit call !', f); // console.log("global filters",AppComponent.filters,f);

          var gchannel = [];
          /*if(AppComponent.filters !== undefined && AppComponent.filters.channel !== undefined && AppComponent.filters.channel !== null)
          {
               gchannel = [AppComponent.filters.channel.id];
          }*/

          if (f.channel !== null && f.channel !== '' && f.channel !== 'null' && f.channel.length > 0) {
            gchannel = f.channel;
          }

          f.channel = gchannel;
          console.log('check for f', f); //f.stime = f.timeFilter.startTime;
          //f.etime = f.timeFilter.endTime;

          this.pathfilter.getPathFilter(f, this.metadata);
          console.log('check for data', this.pathfilter);
          this.filterChange.emit(this.pathfilter);
          this.setFilterCriteria(this.pathfilter, 'noddr');
        }
      }, {
        key: "getBrowserM",
        value: function getBrowserM() {
          var bsm = [];
          bsm.push({
            label: 'Select Browser',
            value: null
          });
          this.metadata.browserMap.forEach(function (item, _key, _mapObj) {
            return bsm.push({
              label: item.name,
              value: item.id
            });
          });
          this.newbs = bsm;
        }
      }, {
        key: "selectDimension",
        value: function selectDimension(event) {
          console.log(event);

          for (var i = 1; i <= 4; i++) {
            document.getElementById('dim' + i).style.display = 'none';
          }

          this.analysisForm.controls['browser'].patchValue(null);
          this.analysisForm.controls['platform'].patchValue(null);
          this.analysisForm.controls['location'].patchValue(null);
          this.analysisForm.controls['device'].patchValue(null);

          if (event.value === 'Browser') {
            document.getElementById('dim1').style.display = 'block';
          } else if (event.value === 'OS') {
            document.getElementById('dim2').style.display = 'block';
          } else if (event.value === 'Location') {
            document.getElementById('dim3').style.display = 'block';
          } else if (event.value === 'Device') {
            document.getElementById('dim4').style.display = 'block';
          }
        }
      }, {
        key: "showCalendar",
        value: function showCalendar() {
          this.maxDate = new Date(moment__WEBPACK_IMPORTED_MODULE_3__["tz"](new Date(), sessionStorage.getItem('_nvtimezone')).format('MM/DD/YYYY HH:mm:ss'));
        }
      }, {
        key: "closeClick",
        value: function closeClick() {
          var me = this;
          me.hide();
        }
      }, {
        key: "open",
        value: function open() {
          var me = this;
          me.show();
        }
      }, {
        key: "resetForm",
        value: function resetForm() {
          var _this5 = this;

          this.reloading = true; // this.customTimeFrame = [];

          setTimeout(function () {
            _this5.setForm();

            _this5.reloading = false;
          }, 0);
        }
      }]);
    }(src_app_shared_page_sidebar_page_sidebar_component__WEBPACK_IMPORTED_MODULE_4__["PageSidebarComponent"]);

    PathAnalyticsFilterComponent.ctorParameters = function () {
      return [{
        type: src_app_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_7__["CavMessageService"]
      }, {
        type: _common_service_metadata_service__WEBPACK_IMPORTED_MODULE_5__["MetadataService"]
      }];
    };

    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], PathAnalyticsFilterComponent.prototype, "filterChange", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], PathAnalyticsFilterComponent.prototype, "random", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], PathAnalyticsFilterComponent.prototype, "mode", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], PathAnalyticsFilterComponent.prototype, "showFilter", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], PathAnalyticsFilterComponent.prototype, "filter", void 0);
    PathAnalyticsFilterComponent = PathAnalyticsFilterComponent_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'app-path-analytics-filter',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./path-analytics-filter.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/path-analytics-filter.component.html"))["default"],
      encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./path-analytics-filter.component.scss */
      "./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/path-analytics-filter.component.scss"))["default"]]
    })], PathAnalyticsFilterComponent);
    /***/
  },

  /***/
  "./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/pathanalysisfilter.ts":
  /*!*****************************************************************************************************!*\
    !*** ./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/pathanalysisfilter.ts ***!
    \*****************************************************************************************************/

  /*! exports provided: PathAnalysisFilters */

  /***/
  function _src_app_pages_home_homeSessions_pathAnalytics_pathAnalyticsFilter_pathanalysisfilterTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "PathAnalysisFilters", function () {
      return PathAnalysisFilters;
    });
    /* harmony import */


    var _common_interfaces_pageperformancefilter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ./../../common/interfaces/pageperformancefilter */
    "./src/app/pages/home/home-sessions/common/interfaces/pageperformancefilter.ts");
    /* harmony import */


    var _common_interfaces_viewfilter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./../../common/interfaces/viewfilter */
    "./src/app/pages/home/home-sessions/common/interfaces/viewfilter.ts");
    /* harmony import */


    var _common_util_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../../common/util/util */
    "./src/app/pages/home/home-sessions/common/util/util.ts"); //import { Util } from './../../common/utils/util';
    //import { MsgService } from './../../common/services/msg.service';


    var PathAnalysisFilters = /*#__PURE__*/function () {
      function PathAnalysisFilters() {
        _classCallCheck(this, PathAnalysisFilters);

        this.filterCriteriaList = [];
        var _timefilter = {
          "startTime": "",
          "endTime": "",
          "last": ""
        };
        this.showFilter = {
          "lastval": "15 Minutes",
          "_timefilter": "false",
          "timeFilter": _timefilter,
          "channel": null,
          "userSegment": null,
          "device": null,
          "entryPage": null,
          "browser": null,
          "platform": null,
          "IncludeLocation": null,
          "IncludeBrowser": null,
          "IncludeOS": null,
          "stime": new Date(),
          "etime": new Date()
        };
      }

      return _createClass(PathAnalysisFilters, [{
        key: "getPathFilter",
        value: function getPathFilter(pagepFilter, metadata) {
          this.filter = new _common_interfaces_pageperformancefilter__WEBPACK_IMPORTED_MODULE_0__["PagePerformanceFilter"]();
          this.filterCriteriaList = []; // page performance filters

          this.setPagePerformanceFilter(pagepFilter, metadata); // set all the filters on the static session filter object.

          this.showFilter = pagepFilter;
        }
      }, {
        key: "setPagePerformanceFilter",
        value: function setPagePerformanceFilter(pagepFilter, metadata) {
          var filter = this.filter;

          if (pagepFilter.channel !== null && pagepFilter.channel !== "" && pagepFilter.channel.length > 0) {
            this.filter.channels = pagepFilter.channel.join(",");
            this.filterCriteriaList.push(new _common_interfaces_viewfilter__WEBPACK_IMPORTED_MODULE_1__["ViewFilter"]('Channel', _common_util_util__WEBPACK_IMPORTED_MODULE_2__["Util"].getChannelNames(pagepFilter.channel, metadata), null));
          }

          if (pagepFilter.browser !== null && pagepFilter.browser !== "" && pagepFilter.browser !== "null") {
            filter.browsers = pagepFilter.browser;
            this.filterCriteriaList.push(new _common_interfaces_viewfilter__WEBPACK_IMPORTED_MODULE_1__["ViewFilter"]('Browser', metadata.browserMap.get(pagepFilter.browser).name, null));
          }

          if (pagepFilter.device !== null && pagepFilter.device.length > 0 && pagepFilter.device !== "null") {
            filter.devices = "'" + pagepFilter.device + "'";
            this.filterCriteriaList.push(new _common_interfaces_viewfilter__WEBPACK_IMPORTED_MODULE_1__["ViewFilter"]('Include Device', pagepFilter.device, null));
          }

          if (pagepFilter.location !== null && pagepFilter.location !== "null") {
            filter.locations = pagepFilter.location;
            var state = metadata.locationMap.get(pagepFilter.location).state ? metadata.locationMap.get(pagepFilter.location).state + ',' : '';
            var nameList = state + metadata.locationMap.get(pagepFilter.location).country;
            this.filterCriteriaList.push(new _common_interfaces_viewfilter__WEBPACK_IMPORTED_MODULE_1__["ViewFilter"]('Location', nameList, null));
          }

          if (pagepFilter.platform !== null && pagepFilter.platform !== "null") {
            filter.platform = "'" + pagepFilter.platform + "'";
            this.filterCriteriaList.push(new _common_interfaces_viewfilter__WEBPACK_IMPORTED_MODULE_1__["ViewFilter"]('OS', pagepFilter.platform, null));
          }

          if (pagepFilter.userSegment !== null && pagepFilter.userSegment !== '' && pagepFilter.userSegment.length > 0) {
            filter.userSegments = pagepFilter.userSegment.join(",");
            this.filterCriteriaList.push(new _common_interfaces_viewfilter__WEBPACK_IMPORTED_MODULE_1__["ViewFilter"]('User Segment ', _common_util_util__WEBPACK_IMPORTED_MODULE_2__["Util"].getUserSegmentNames(pagepFilter.userSegment, metadata), null));
          }

          if (pagepFilter.page !== null && pagepFilter.page !== "" && pagepFilter.page !== "null") {
            filter.pages = pagepFilter.page;
            filter.pageName = metadata.pageNameMap.get(pagepFilter.page).name;
            this.filterCriteriaList.push(new _common_interfaces_viewfilter__WEBPACK_IMPORTED_MODULE_1__["ViewFilter"]('Page', filter.pageName, null));
          }

          if (pagepFilter.dimType !== null && pagepFilter.dimType !== '') {
            console.log('filter.dimType', pagepFilter.dimType);
            filter.dimType = this.getDimType(pagepFilter.dimType);
            filter.dimName = pagepFilter.dimType;
            this.filterCriteriaList.push(new _common_interfaces_viewfilter__WEBPACK_IMPORTED_MODULE_1__["ViewFilter"]('Dimension Type', pagepFilter.dimType, null));
          } else filter.dimType = 0;

          if (pagepFilter.threshold !== undefined && pagepFilter.threshold !== null && pagepFilter.threshold !== '') {
            filter.threshold = pagepFilter.threshold;
          } else {
            filter.threshold = 25;
          }

          console.log('filter', filter);
        }
      }, {
        key: "getDimType",
        value: function getDimType(dimval) {
          if (dimval === 'Browser') return 0;else if (dimval === 'OS') return 3;else if (dimval === 'Location') return 1;else if (dimval === 'Device') return 2;else if (dimval === 'Referrer') return 4;
        }
      }, {
        key: "getLocation",
        value: function getLocation(name, metadata) {
          var nameList = '';

          if (name.length > 0) {
            for (var a = 0; a < name.length; a++) {
              if (a > 0) {
                nameList += ',';
              }

              var state = metadata.locationMap.get(parseInt(name[a])).state ? metadata.locationMap.get(parseInt(name[a])).state + ',' : '';
              nameList += state + metadata.locationMap.get(parseInt(name[a])).country;
            }
          }

          return nameList;
        }
      }, {
        key: "getNamesFromId",
        value: function getNamesFromId(name, metadata) {
          var nameList = '';

          if (name.length > 0) {
            for (var a = 0; a < name.length; a++) {
              if (a > 0) {
                nameList += ',';
              }

              nameList += metadata.get(parseInt(name[a])).name;
            }
          }

          return nameList;
        }
      }]);
    }();
    /***/

  },

  /***/
  "./src/app/pages/home/home-sessions/path-analytics/path-analytics.module.ts":
  /*!**********************************************************************************!*\
    !*** ./src/app/pages/home/home-sessions/path-analytics/path-analytics.module.ts ***!
    \**********************************************************************************/

  /*! exports provided: PathAnalyticsModule */

  /***/
  function _src_app_pages_home_homeSessions_pathAnalytics_pathAnalyticsModuleTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "PathAnalyticsModule", function () {
      return PathAnalyticsModule;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/common */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
    /* harmony import */


    var _path_analytics_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./path-analytics.component */
    "./src/app/pages/home/home-sessions/path-analytics/path-analytics.component.ts");
    /* harmony import */


    var src_app_shared_chart_chart_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! src/app/shared/chart/chart.module */
    "./src/app/shared/chart/chart.module.ts");
    /* harmony import */


    var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! @angular/router */
    "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
    /* harmony import */


    var _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
    /* harmony import */


    var src_app_pages_home_home_sessions_path_analytics_path_analytics_filter_path_analytics_filter_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/path-analytics-filter.component */
    "./src/app/pages/home/home-sessions/path-analytics/path-analytics-filter/path-analytics-filter.component.ts");
    /* harmony import */


    var primeng__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! primeng */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
    /* harmony import */


    var src_app_shared_date_time_picker_moment_moment_date_time_module__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! src/app/shared/date-time-picker-moment/moment-date-time.module */
    "./src/app/shared/date-time-picker-moment/moment-date-time.module.ts");
    /* harmony import */


    var src_app_pages_home_home_sessions_path_analytics_viewflowpathanalysis_viewflowpathanalysis_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
    /*! src/app/pages/home/home-sessions/path-analytics/viewflowpathanalysis/viewflowpathanalysis.component */
    "./src/app/pages/home/home-sessions/path-analytics/viewflowpathanalysis/viewflowpathanalysis.component.ts");
    /* harmony import */


    var ng_pick_datetime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
    /*! ng-pick-datetime */
    "./node_modules/ng-pick-datetime/__ivy_ngcc__/picker.js");
    /* harmony import */


    var src_app_shared_time_filter_time_filter_time_filter_module__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
    /*! src/app/shared/time-filter/time-filter/time-filter.module */
    "./src/app/shared/time-filter/time-filter/time-filter.module.ts");
    /* harmony import */


    var src_app_pages_home_home_sessions_path_analytics_navigationpathanalysis_navigationpathanalysis_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
    /*! src/app/pages/home/home-sessions/path-analytics/navigationpathanalysis/navigationpathanalysis.component */
    "./src/app/pages/home/home-sessions/path-analytics/navigationpathanalysis/navigationpathanalysis.component.ts");
    /* harmony import */


    var src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
    /*! src/app/shared/help/help.module */
    "./src/app/shared/help/help.module.ts");

    var imports = [ng_pick_datetime__WEBPACK_IMPORTED_MODULE_11__["OwlDateTimeModule"], src_app_shared_time_filter_time_filter_time_filter_module__WEBPACK_IMPORTED_MODULE_12__["TimeFilterModule"], _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], src_app_shared_chart_chart_module__WEBPACK_IMPORTED_MODULE_4__["ChartModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["CarouselModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["CardModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["AccordionModule"], _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["ToolbarModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["ButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["CheckboxModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["MultiSelectModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["InputTextModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["RadioButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["DropdownModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["PanelModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["InputTextareaModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["BreadcrumbModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["MenuModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["InputSwitchModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_6__["FormsModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["MessageModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["DialogModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["TableModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["TooltipModule"], primeng__WEBPACK_IMPORTED_MODULE_8__["SidebarModule"], //OwlDateTimeModule,
    src_app_shared_date_time_picker_moment_moment_date_time_module__WEBPACK_IMPORTED_MODULE_9__["OwlMomentDateTimeModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_6__["ReactiveFormsModule"], //TimeFilterModule,
    primeng__WEBPACK_IMPORTED_MODULE_8__["ProgressBarModule"], src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_14__["HelpModule"]];
    var components = [_path_analytics_component__WEBPACK_IMPORTED_MODULE_3__["PathAnalyticsComponent"], src_app_pages_home_home_sessions_path_analytics_viewflowpathanalysis_viewflowpathanalysis_component__WEBPACK_IMPORTED_MODULE_10__["ViewflowpathanalysisComponent"], src_app_pages_home_home_sessions_path_analytics_navigationpathanalysis_navigationpathanalysis_component__WEBPACK_IMPORTED_MODULE_13__["NavigationpathanalysisComponent"], src_app_pages_home_home_sessions_path_analytics_path_analytics_filter_path_analytics_filter_component__WEBPACK_IMPORTED_MODULE_7__["PathAnalyticsFilterComponent"]];
    var routes = [{
      path: 'path-analytics',
      //path :'/home/home-sessions/path-analytics',
      component: _path_analytics_component__WEBPACK_IMPORTED_MODULE_3__["PathAnalyticsComponent"]
    }];

    var PathAnalyticsModule = /*#__PURE__*/_createClass(function PathAnalyticsModule() {
      _classCallCheck(this, PathAnalyticsModule);
    });

    PathAnalyticsModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
      declarations: [components],
      imports: [imports, _angular_router__WEBPACK_IMPORTED_MODULE_5__["RouterModule"].forChild(routes)],
      exports: [_angular_router__WEBPACK_IMPORTED_MODULE_5__["RouterModule"], components]
    })], PathAnalyticsModule);
    /***/
  },

  /***/
  "./src/app/pages/home/home-sessions/path-analytics/viewflowpathanalysis/viewflowpathanalysis.component.scss":
  /*!******************************************************************************************************************!*\
    !*** ./src/app/pages/home/home-sessions/path-analytics/viewflowpathanalysis/viewflowpathanalysis.component.scss ***!
    \******************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _src_app_pages_home_homeSessions_pathAnalytics_viewflowpathanalysis_viewflowpathanalysisComponentScss(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "@charset \"UTF-8\";\napp-viewflowpathanalysis {\n  /* Creates a small triangle extender for the tooltip */\n  /* Northward tooltips */\n  /* Eastward tooltips */\n  /* Southward tooltips */\n  /* Westward tooltips */\n}\napp-viewflowpathanalysis .d3-tip {\n  line-height: 1;\n  font-weight: bold;\n  padding: 12px;\n  background: rgba(0, 0, 0, 0.8);\n  color: #fff;\n  border-radius: 2px;\n  pointer-events: none;\n}\napp-viewflowpathanalysis .d3-tip:after {\n  box-sizing: border-box;\n  display: inline;\n  font-size: 10px;\n  width: 100%;\n  line-height: 1;\n  color: rgba(0, 0, 0, 0.8);\n  position: absolute;\n  pointer-events: none;\n}\napp-viewflowpathanalysis .d3-tip.n:after {\n  content: \"▼\";\n  margin: -1px 0 0 0;\n  top: 100%;\n  left: 0;\n  text-align: center;\n}\napp-viewflowpathanalysis .d3-tip.e:after {\n  content: \"◀\";\n  margin: -4px 0 0 0;\n  top: 50%;\n  left: -8px;\n}\napp-viewflowpathanalysis .d3-tip.s:after {\n  content: \"▲\";\n  margin: 0 0 1px 0;\n  top: -8px;\n  left: 0;\n  text-align: center;\n}\napp-viewflowpathanalysis .d3-tip.w:after {\n  content: \"▶\";\n  margin: -4px 0 0 -1px;\n  top: 50%;\n  left: 100%;\n}\napp-viewflowpathanalysis .show {\n  display: block;\n}\napp-viewflowpathanalysis .hidden {\n  display: none;\n}\napp-viewflowpathanalysis .header {\n  font-size: 14px !important;\n  color: rebeccapurple;\n  font-weight: 600;\n}\napp-viewflowpathanalysis .panel-body {\n  overflow-y: auto;\n  overflow-x: auto;\n  width: 100%;\n  max-height: calc(95vh - 140px);\n  margin-top: -22px;\n}\napp-viewflowpathanalysis .dropdown-wrapper {\n  position: relative;\n  top: -50px;\n  left: 20px;\n}\napp-viewflowpathanalysis .scrollarea {\n  display: block;\n  width: 100%;\n  height: 99vh;\n  overflow: scroll;\n}";
    /***/
  },

  /***/
  "./src/app/pages/home/home-sessions/path-analytics/viewflowpathanalysis/viewflowpathanalysis.component.ts":
  /*!****************************************************************************************************************!*\
    !*** ./src/app/pages/home/home-sessions/path-analytics/viewflowpathanalysis/viewflowpathanalysis.component.ts ***!
    \****************************************************************************************************************/

  /*! exports provided: ViewflowpathanalysisComponent */

  /***/
  function _src_app_pages_home_homeSessions_pathAnalytics_viewflowpathanalysis_viewflowpathanalysisComponentTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ViewflowpathanalysisComponent", function () {
      return ViewflowpathanalysisComponent;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var d3_ng2_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! d3-ng2-service */
    "./node_modules/d3-ng2-service/esm/index.js");
    /* harmony import */


    var d3_sankey__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! d3-sankey */
    "./node_modules/d3-sankey/index.js");
    /* harmony import */


    var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! @angular/router */
    "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
    /* harmony import */


    var d3_tip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! d3-tip */
    "./node_modules/d3-tip/index.js");
    /* harmony import */


    var d3_tip__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(d3_tip__WEBPACK_IMPORTED_MODULE_5__);
    /* harmony import */


    var moment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! moment */
    "./node_modules/moment/moment.js");
    /* harmony import */


    var moment__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_6__);
    /* harmony import */


    var moment_timezone__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! moment-timezone */
    "./node_modules/moment-timezone/index.js");
    /* harmony import */


    var moment_timezone__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(moment_timezone__WEBPACK_IMPORTED_MODULE_7__);
    /* harmony import */


    var _common_service_nvhttp_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! ../../common/service/nvhttp.service */
    "./src/app/pages/home/home-sessions/common/service/nvhttp.service.ts");
    /* harmony import */


    var src_app_shared_pipes_pipe_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! src/app/shared/pipes/pipe.service */
    "./src/app/shared/pipes/pipe.service.ts"); //import { NVBreadCrumbService } from './../../../services/nvbreadcrumb.service';


    var ViewflowpathanalysisComponent = /*#__PURE__*/function () {
      function ViewflowpathanalysisComponent(element, ngZone, d3Service, httpService, route, router, pipeservice) {
        _classCallCheck(this, ViewflowpathanalysisComponent);

        this.ngZone = ngZone;
        this.httpService = httpService;
        this.route = route;
        this.router = router;
        this.pipeservice = pipeservice;
        this.changemode = false;
        this.d3 = d3Service.getD3();
        this.parentNativeElement = element.nativeElement;
        this.dimensions = [{
          label: 'Select Dimension',
          value: null
        }, {
          label: 'Browser',
          value: 'Browser'
        }, {
          label: 'Location',
          value: 'Location'
        }, {
          label: 'OS',
          value: 'OS'
        }, {
          label: 'Device',
          value: 'Device'
        }, {
          label: 'Referrer',
          value: 'Referrer'
        }];
        this.onChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.maxSankeyChartDepth = this.maxSankeyChartDepth < 1000 ? 2000 : this.maxSankeyChartDepth;
        this.onFilterData = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
      }

      return _createClass(ViewflowpathanalysisComponent, [{
        key: "ngOnInit",
        value: function ngOnInit() {}
      }, {
        key: "convertDataFormat",
        value:
        /* Data formatter for network map*/
        function convertDataFormat(val1) {
          try {
            var numFormat = this.pipeservice.getFormatter('num_en_us');
            var result = numFormat.transform(parseInt(val1));
            return result;
          } catch (e) {
            console.error("Error in convertDataFormat:", e);
            return val1; // fallback to original string
          }
        }
      }, {
        key: "ngOnChanges",
        value: function ngOnChanges() {
          //Check if it is coming from breadcrumb then set the previous breadcrumb else set a new one.
          //Note: no need to check this.breadInfo == null.
          if (this.filter !== undefined && this.filter !== null) this.dimType = this.filter.filter.dimName;

          if (this.refinedData !== null) {
            if (this.maxnodelength > 200) this.height = this.maxnodelength + 200;else this.height = this.maxnodelength + 300;
            this.maxSankeyChartDepth = this.maxSankeyChartDepth < 1000 ? 2000 : this.maxSankeyChartDepth;
            this.pathDataService = this.refinedData;
            this.clearSankeyChart();
            this.drawSankeyChart(this.pathDataService.refinedData);
          }
        }
      }, {
        key: "drawSankeyChart",
        value: function drawSankeyChart(refineSankeyData) {
          var _this6 = this;

          var NODE_WIDTH = 200;
          var NODE_PADDING = 40;
          var DEPTH_WIDTH = 350;
          var DEPTH_INTERACTION = 310;
          var margin = {
            top: 70,
            right: 20,
            bottom: 0,
            left: 20
          };
          var width = 550 + (this.pathDataService.sankeyStep - 1) * DEPTH_WIDTH + 150;
          var sankeyWidth = width - 150; //for next/previous button

          var height = this.pathDataService.getMaxNodeLength() * 100 + margin.top + 100;
          var count = this.totalCount;

          var formatNumber = this.d3.format(",.0f"),
              format = function format(d) {
            return formatNumber(d) + " Sessions";
          },
              color = this.d3.scaleOrdinal(this.d3.schemeCategory10);

          var svg = this.d3.select("#sankey").append("svg").attr("width", width + margin.left + margin.right).attr("height", height + margin.top + margin.bottom).append("g").attr("transform", "translate(" + margin.left + "," + 100 + ")");
          var ht = height - 150 < 100 ? height + 250 : height - 150;
          var sankey = d3_sankey__WEBPACK_IMPORTED_MODULE_3__["sankey"]().nodeWidth(NODE_WIDTH).nodePadding(NODE_PADDING).size([sankeyWidth, ht]);
          /** init sankeyDataSet */

          var sankeyDataSet = refineSankeyData;
          var thisrefrence = this;

          if (sankeyDataSet) {
            var link = svg.append("g").attr("class", "links").attr("fill", "none").attr("stroke", "#000").attr("stroke-opacity", 0.2).attr("transform", "translate(" + margin.left + "," + margin.top + ")").selectAll("path");
            var node = svg.append("g").attr("class", "nodes").attr("font-family", "sans-serif").attr("font-size", 14).attr("font-weight", 600).attr("transform", "translate(" + margin.left + "," + margin.top + ")").selectAll("g");
            var gradX = svg.append("defs").append("linearGradient").attr("id", "linear").attr("x1", "0%").attr("x2", "0%").attr("y1", "0%").attr("y2", "100%");
            gradX.append("stop").attr("offset", "0%").attr("stop-color", "#186ba0");
            gradX.append("stop").attr("offset", "41%").attr("stop-color", "#186ba0");
            gradX.append("stop").attr("offset", "42%").attr("stop-color", "white");
            gradX.append("stop").attr("offset", "100%").attr("stop-color", "white");
            var depthInfo = svg.append("g").attr("transform", "translate(" + margin.left + "," + 20 + ")").selectAll(".depthInfo").data(this.pathDataService.globalDepthViewStatus).enter().append("g").attr("class", "depthInfo");
            depthInfo.append("rect") //.attr("height", 50)
            .attr("height", function (d) {
              //if(d["depth"] == 0) return 0;
              //if(d["depth"] == 1) return 60;
              return 128;
            }).attr("width", NODE_WIDTH).attr("x", function (d) {
              if (d["depth"] == 0) return 0;
              return d["depth"] * DEPTH_WIDTH;
            }).attr("y", -95).style("stroke", "#186ba0").style("fill", "url(#linear)").attr('dx', 100).append("title").text(function (d) {
              if (d["depth"] == 0) return "Total Sessions";
              if (d["depth"] == 1) return "Entry Page";
              return d["depth"] - 1 + ' Interaction';
            });
            depthInfo.append("text").attr("y", -55).append('svg:tspan').attr("x", function (d) {
              return d["depth"] * DEPTH_WIDTH + 40; //plus padding
            }).attr('dy', 4).attr("fill", "white").style("font-size", "16px").text(function (d) {
              if (d["depth"] == 0) return "TOTAL SESSIONS";
              if (d["depth"] == 1) return "ENTRY PAGE";
              return d["depth"] - 1;
            }).attr("fill", "white").append('svg:tspan').attr('baseline-shift', 'super').style("font-size", "12px").text(function (d) {
              if (d["depth"] == 0 || d["depth"] == 1) return "";
              if (d["depth"] == 2) return "st";
              if (d["depth"] == 3) return "nd";
              if (d["depth"] == 4) return "rd";
              if (d["depth"] > 3) return "th";
            }).append('svg:tspan').style("font-size", "14px").attr("fill", "white").text(function (d) {
              if (d["depth"] !== 0 && d["depth"] !== 1) return ' INTERACTION';
              return '';
            }).append('svg:tspan').attr("x", function (d) {
              return d["depth"] * DEPTH_WIDTH + 5; //plus padding
            }).attr('dy', 31).style("font-size", "13px").style("font-family", "calibri").text(function (d) {
              if (d["depth"] == 0) return "";
              return thisrefrence.convertDataFormat(d["in"]) + ' Sessions' + " (" + (d["in"] / count * 100).toFixed(2) + "%)";
            }).attr("fill", "black").append('svg:tspan').attr("x", function (d) {
              return d["depth"] * DEPTH_WIDTH + 5; //plus padding
            }).attr('dy', 31).style("font-family", "calibri").text(function (d) {
              if (d["depth"] == 0) return "";
              var dcount = d["out"] === 0 ? '' : " (" + (d["out"] / d["in"] * 100).toFixed(2) + "%)";
              return thisrefrence.convertDataFormat(d["out"]) + ' Through' + dcount;
            }).attr("fill", "black").append('svg:tspan').attr("x", function (d) {
              return d["depth"] * DEPTH_WIDTH + 5; //plus padding
            }).attr('dy', function (d) {
              if (d["depth"] == 0) return 30;
              return 15;
            }).style("font-family", "calibri").text(function (d) {
              if (d["depth"] == 0) {
                return thisrefrence.convertDataFormat(d["out"]) + " Sessions";
              }

              ;
              var dcount = d["in"] - d["out"] === 0 ? '' : " (" + ((d["in"] - d["out"]) / d["in"] * 100).toFixed(2) + "%)";
              return thisrefrence.convertDataFormat("" + (d["in"] - d["out"])) + ' Drop-Offs' + dcount;
            }).attr("fill", "black");
            var countval = 0;
            depthInfo.append("rect").attr("y", -17).attr("x", function (d) {
              return d["depth"] * DEPTH_WIDTH + 5; //plus padding
            }).attr("fill", function (d) {
              var dcount = d["out"] === 0 ? 0.00 : d["out"] / d["in"] * 100;
              var thcount = Math.ceil(dcount);
              var drcount = Math.ceil(dcount) + 1;
              var gradX1 = svg.append("defs").append("linearGradient").attr("id", function (d) {
                countval++;
                return "gradX1" + countval;
              }).attr("x1", "0%").attr("x2", "100%").attr("y1", "0%").attr("y2", "0%");
              gradX1.append("stop").attr("offset", "0%").attr("stop-color", "lightgreen");
              gradX1.append("stop").attr("offset", function (d) {
                return thcount + "%";
              }).attr("stop-color", "lightgreen");
              gradX1.append("stop").attr("offset", function (d) {
                return drcount + "%";
              }).attr("stop-color", "red");
              gradX1.append("stop").attr("offset", "100%").attr("stop-color", "red");
              return "url(#gradX1" + countval + ")";
            }).attr("height", function (d) {
              if (d["depth"] == 0) return 0;
              return 10;
            }).attr("width", 110);
            sankey(sankeyDataSet);
            link = link.data(sankeyDataSet.links).enter().append("path").attr("d", d3_sankey__WEBPACK_IMPORTED_MODULE_3__["sankeyLinkHorizontal"]()).attr("stroke-width", function (d) {
              return Math.max(4, d.width);
            }).style("stroke", function (d) {
              if (d["target"].name == 'OUT') {
                return "none";
              }

              return '#000'; //google link color
            }).attr("id", function (d, i) {
              d.id = i;
              return "link-" + i;
            });
            link.append("title").text(function (d) {
              return d.source.name + " ? " + d.target.name + "\n" + format(d.value);
            });
            var linktext = svg.append("g").selectAll(".links").data(sankeyDataSet.links).enter().append("text").attr('class', 'linkText').attr("x", function (d) {
              return d["source"].x0 + (d["target"].x1 - d["source"].x1) / 2 + 35;
            }).attr("y", function (d) {
              return (d["source"].y1 + d["target"].y1) / 2 - 80;
            }).attr("dy", ".35em").attr("font-size", "15px").attr("text-anchor", "end").attr("id", function (d, i) {
              d.id = i;
              return "linkt-" + i;
            }).attr("style", "display:none").text(function (d) {
              return d["source"].name + " -> " + d["target"].name;
            }).attr("text-anchor", "start").style('fill', 'white').append('svg:tspan').attr('x', function (d) {
              return d["source"].x0 + (d["target"].x1 - d["source"].x1) / 2 + 35;
            }).attr('dy', ".35em").attr("y", function (d) {
              return (d["source"].y1 + d["target"].y1) / 2 - 65;
            }).text(function (d) {
              return format(d["value"]);
            });
            var tip = d3_tip__WEBPACK_IMPORTED_MODULE_5__().attr('class', 'd3-tip').offset([-10, 0]).html(function (d) {
              if (d.depth == 0 || d.name == 'OUT') {
                if (_this6.dimType) {
                  return "<strong>" + _this6.dimType + " :</strong> <span style='color:red'>" + d.name + "</span>";
                } else {
                  return "<strong> Browser :</strong> <span style='color:red'>" + d.name + "</span>";
                }
              }

              if (d.name === 'EXIT') return 'EXIT';
              var inVal = _this6.pathDataService.globalNodeViewInOutStatus[d.node]["in"];
              var outVal = _this6.pathDataService.globalNodeViewInOutStatus[d.node].out;
              var outPage = inVal - outVal;
              return "<strong>* Page :</strong> <span style='color:#FF4533'>" + d.name + "</span>" + "<br/><br/><strong>* Through traffic :</strong> <span style='color:#3733FF'>" + thisrefrence.convertDataFormat(outVal) + " (" + Math.round(outVal / inVal * 100 * 100) / 100 + "%)" + "</span>" + "<br/><br/><strong>* Drop-offs :</strong> <span style='color:#F933FF'>" + thisrefrence.convertDataFormat("" + outPage) + " (" + Math.round(outPage / inVal * 100 * 100) / 100 + "%)" + "</span>" + "<br/><br/><strong>* Visits : </strong><span style='color:#FF3361'>" + thisrefrence.convertDataFormat(d.value) + "</span>";
            });
            node = node.data(sankeyDataSet.nodes).enter().append("g");
            node.call(tip);
            node.append("rect").attr("x", function (d) {
              return d.x0;
            }).attr("y", function (d) {
              return d.y0;
            }).attr("height", function (d) {
              if (d["name"] === "OUT" || isNaN(d.y1)) return 0;
              return Math.max(5, d.y1 - d.y0);
            }).attr("width", function (d) {
              return d.x1 - d.x0;
            }).attr("fill", function (d) {
              if (d["name"] === "EXIT") return "red";
              return "#D7DBDD";
            }).attr("stroke", "#D7DBDD").attr("opacity", 0.5).style("cursor", "pointer").on("mouseover", function (d) {
              tip.style('background', 'white');
              tip.style('padding', '10px');
              tip.style('border', '2px solid  #000');
              tip.style('border - radius', '6px');
              tip.show(d, this);
            }).on("mouseout", tip.hide).attr("text-anchor", "start").on("click", function (event) {
              _this6.highlight_node_links(event, 0);
            });
            node.append("text").append('svg:tspan').attr("x", function (d) {
              if (d["name"] === "OUT") return 0;
              return d.x0 + 50;
            }).attr("y", function (d) {
              var ycounts = isNaN(d.y1) ? 0 : (d.y1 + d.y0) / 2;
              return ycounts;
            }).style("font-size", "14px").style("font-family", "calibri").text(function (d) {
              if (d["name"] === "OUT" || isNaN(d["y1"])) return "";
              return d["name"];
            }).append('svg:tspan').attr("x", function (d) {
              return d.x0 + 50;
            }).attr("y", function (d) {
              return (d.y1 + d.y0 + 20) / 2;
            }).style("font-size", "12px").style("font-family", "calibri").text(function (d) {
              if (d["name"] === "OUT") return "";
              if (d["depth"] === 0) return thisrefrence.convertDataFormat(d["value"]) + " ( " + (d["value"] / count * 100).toFixed(2) + " % ) ";
              if (isNaN(d["y1"])) return '';
              if (d["name"] === "EXIT") return thisrefrence.convertDataFormat(d["value"]) + " ( " + (d["value"] / count * 100).toFixed(2) + " % ) ";
              return thisrefrence.convertDataFormat(d["value"]);
            }).attr("fill", function (d) {
              if (d["name"] === "EXIT") return "black";
              return "#34495E";
            }).filter(function (d) {
              return d.x0 < width / 2;
            }).attr("text-anchor", "start").on("click", function (event) {
              _this6.highlight_node_links(event, 0);
            });
          }
        }
      }, {
        key: "setBackNavigation",
        value: function setBackNavigation() {
          this.changemode = false;
          var f = JSON.parse(this.filter).filter;
          var eventdata = {};
          eventdata["name"] = null;
          if (f.dimName != 'EntryPage') eventdata["startPage"] = false;else eventdata["startPage"] = true;
          this.onFilterData.emit(eventdata);
        }
      }, {
        key: "highlight_node_links",
        value: function highlight_node_links(node, i) {
          var _this7 = this;

          if (node.depth == 0) {} //this.showFilterAppliedData(node); 
          else {
            var remainingNodes = [];
            var nextNodes = [];
            var stroke_opacity = 0;
            var bl = 'none';

            if (node["data-clicked"] == 1) {
              node["data-clicked"] = 0;
              stroke_opacity = 0.4;
              bl = 'none';
            } else {
              node["data-clicked"] = 1;
              stroke_opacity = 1.0;
              bl = 'block';
            }

            var traverse = [{
              linkType: "sourceLinks",
              nodeType: "target"
            }, {
              linkType: "targetLinks",
              nodeType: "source"
            }];
            traverse.forEach(function (step) {
              node[step.linkType].forEach(function (link) {
                remainingNodes.push(link[step.nodeType]);

                _this7.d3.select("#link-" + link.index).style("stroke-opacity", stroke_opacity);

                _this7.d3.select("#linkt-" + link.index).attr("style", "display:none;fill:yellow;font-size:13px");
              });
              /*
              Optimizations made:
                Reduced Selections: Minimized the number of this.d3.select calls by performing
              the selections once and storing them in variables.
                Set for Visited Links: Introduced a Set (visitedLinks) to keep track of visited links,
              preventing duplicate processing.
                  Using Set for Unique Nodes: Used a Set (nextNodes) to ensure unique nodes and avoid adding duplicates.
                */

              var visitedLinks = new Set();

              var _loop = function _loop() {
                var nextNodes = new Set();
                remainingNodes.forEach(function (node) {
                  node[step.linkType].forEach(function (link) {
                    var nextNode = link[step.nodeType]; // Check if link has not been visited

                    if (!visitedLinks.has(link.index)) {
                      visitedLinks.add(link.index); // Perform actions on the link

                      _this7.d3.select("#link-".concat(link.index)).style("stroke-opacity", stroke_opacity);

                      _this7.d3.select("#linkt-".concat(link.index)).style("display", "none"); // Add the next node to the set


                      nextNodes.add(nextNode);
                    }
                  });
                }); // Convert Set to Array for the next iteration

                remainingNodes = Array.from(nextNodes);
              };

              while (remainingNodes.length) {
                _loop();
              }
            });
          }
        }
      }, {
        key: "setValue",
        value: function setValue() {
          if (this.filter != undefined) {
            var f = this.filter;
            var val = this.getDimType(this.dimType);
            f.filter.dimType = val;
            f.filter.dimName = this.dimType;
            if (this.dimType === 'EntryPage') f.filter.startpage = true;else f.filter.startpage = false;
            if (f.filter.browsers !== undefined && f.filter.browsers !== null) f.filter.browsers = null;
            if (f.filter.os !== undefined && f.filter.os !== null) f.filter.os = null;
            if (f.filter.locations !== undefined && f.filter.location !== null) f.filter.location = null;
            if (f.filter.devices !== undefined && f.filter.devices !== null) f.filter.devices = null;
            this.onFilterData.emit(f);
          } else {
            var filter = {};
            var time = new Date().getTime() - 24 * 60 * 60 * 1000;
            var date = moment__WEBPACK_IMPORTED_MODULE_6__["tz"](time, sessionStorage.getItem("_nvtimezone")).format('MM/DD/YYYY HH:mm:ss');
            var d = new Date(moment__WEBPACK_IMPORTED_MODULE_6__["tz"](time, sessionStorage.getItem("_nvtimezone")).format('MM/DD/YYYY HH:mm:ss'));
            var date1 = window["toDateString"](d);

            if (navigator.userAgent.indexOf("MSIE") > -1 || navigator.userAgent.indexOf("rv:11.0") > -1 || navigator.userAgent.indexOf("Edge") > -1) {
              var tmpDate = d.getMonth() + 1 + "/" + d.getDate() + "/" + d.getFullYear();
              date1 = tmpDate;
            }

            var startT = date1 + " 00:00:00";
            var endT = date1 + " 23:59:00";
            filter["timeFilter"].startTime = startT;
            filter["timeFilter"].endTime = endT;
            filter["dimType"] = this.getDimType(this.dimType);
            this.onFilterData.emit(filter);
          }
        }
      }, {
        key: "getDimType",
        value: function getDimType(dimval) {
          if (dimval === 'Browser') return 0;else if (dimval === 'OS') return 3;else if (dimval === 'Location') return 1;else if (dimval === 'Device') return 2;else if (dimval === 'Referrer') return 4;else if (dimval === 'EntryPage') return 1;
        }
      }, {
        key: "setFilterCriteria",
        value: function setFilterCriteria(filterc, timefilter) {
          var filterp = filterc; //PathanalysisfilterComponent.filterhtml = "";

          var filterCriteria = filterp.filterCriteriaList;
          var tfilter = timefilter;

          if (tfilter.last !== null && tfilter.last !== '') // defined
            {// PathanalysisfilterComponent.filterhtml += "Last " + tfilter.last;
            } else {
            var d = new Date(tfilter.startTime);
            var e = new Date(tfilter.endTime);
          }

          for (var i = 0; i < filterCriteria.length; i++) {
            if (i < filterCriteria.length - 1) {// PathanalysisfilterComponent.filterhtml += " , ";
            }

            if (filterCriteria[i].name === 'Page') {} else ""; //PathanalysisfilterComponent.filterhtml += " " + filterCriteria[i].name + " : " + filterCriteria[i].value;

          }
        }
      }, {
        key: "showFilterAppliedData",
        value: function showFilterAppliedData(event) {
          this.changemode = true;
          var f = JSON.parse(this.filter).filter;
          var eventdata = {};
          eventdata["name"] = event.name;
          if (f.dimName != 'EntryPage') eventdata["startPage"] = false;else eventdata["startPage"] = true;
          this.onFilterData.emit(eventdata);
        }
      }, {
        key: "clearSankeyChart",
        value: function clearSankeyChart() {
          if (this.d3.select('#sankey').selectAll('svg')) {
            this.d3.select('#sankey').selectAll('svg').remove();
            this.d3.selectAll(".d3-tip").remove();
          }
        }
      }]);
    }();

    ViewflowpathanalysisComponent.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
      }, {
        type: d3_ng2_service__WEBPACK_IMPORTED_MODULE_2__["D3Service"]
      }, {
        type: _common_service_nvhttp_service__WEBPACK_IMPORTED_MODULE_8__["NvhttpService"]
      }, {
        type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["ActivatedRoute"]
      }, {
        type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]
      }, {
        type: src_app_shared_pipes_pipe_service__WEBPACK_IMPORTED_MODULE_9__["PipeService"]
      }];
    };

    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], ViewflowpathanalysisComponent.prototype, "dimensions", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], ViewflowpathanalysisComponent.prototype, "filter", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], ViewflowpathanalysisComponent.prototype, "maxnodelength", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], ViewflowpathanalysisComponent.prototype, "refinedData", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], ViewflowpathanalysisComponent.prototype, "maxSankeyChartDepth", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], ViewflowpathanalysisComponent.prototype, "onChange", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], ViewflowpathanalysisComponent.prototype, "response", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])()], ViewflowpathanalysisComponent.prototype, "onFilterData", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], ViewflowpathanalysisComponent.prototype, "totalCount", void 0);
    ViewflowpathanalysisComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'app-viewflowpathanalysis',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./viewflowpathanalysis.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-sessions/path-analytics/viewflowpathanalysis/viewflowpathanalysis.component.html"))["default"],
      encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./viewflowpathanalysis.component.scss */
      "./src/app/pages/home/home-sessions/path-analytics/viewflowpathanalysis/viewflowpathanalysis.component.scss"))["default"]]
    })], ViewflowpathanalysisComponent);
    /***/
  }
}]);