{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar updateHash = function updateHash(hash, historyUpdate) {\n  var hashVal = hash.indexOf(\"#\") === 0 ? hash.substring(1) : hash;\n  var hashToUpdate = hashVal ? \"#\" + hashVal : \"\";\n  var curLoc = window && window.location;\n  var urlToPush = hashToUpdate ? curLoc.pathname + curLoc.search + hashToUpdate : curLoc.pathname + curLoc.search;\n  historyUpdate ? history.pushState(history.state, \"\", urlToPush) : history.replaceState(history.state, \"\", urlToPush);\n};\nvar getHash = function getHash() {\n  return window.location.hash.replace(/^#/, \"\");\n};\nvar filterElementInContainer = function filterElementInContainer(container) {\n  return function (element) {\n    return container.contains ? container != element && container.contains(element) : !!(container.compareDocumentPosition(element) & 16);\n  };\n};\nvar isPositioned = function isPositioned(element) {\n  return getComputedStyle(element).position !== \"static\";\n};\nvar getElementOffsetInfoUntil = function getElementOffsetInfoUntil(element, predicate) {\n  var offsetTop = element.offsetTop;\n  var currentOffsetParent = element.offsetParent;\n  while (currentOffsetParent && !predicate(currentOffsetParent)) {\n    offsetTop += currentOffsetParent.offsetTop;\n    currentOffsetParent = currentOffsetParent.offsetParent;\n  }\n  return {\n    offsetTop: offsetTop,\n    offsetParent: currentOffsetParent\n  };\n};\nvar scrollOffset = function scrollOffset(c, t, horizontal) {\n  if (horizontal) {\n    return c === document ? t.getBoundingClientRect().left + (window.scrollX || window.pageXOffset) : getComputedStyle(c).position !== \"static\" ? t.offsetLeft : t.offsetLeft - c.offsetLeft;\n  } else {\n    if (c === document) {\n      return t.getBoundingClientRect().top + (window.scrollY || window.pageYOffset);\n    }\n\n    // The offsetParent of an element, according to MDN, is its nearest positioned\n    // (an element whose position is anything other than static) ancestor. The offsetTop\n    // of an element is taken with respect to its offsetParent which may not neccessarily\n    // be its parentElement except the parent itself is positioned.\n\n    // So if containerElement is positioned, then it must be an offsetParent somewhere\n    // If it happens that targetElement is a descendant of the containerElement, and there\n    // is not intermediate positioned element between the two of them, i.e.\n    // targetElement\"s offsetParent is the same as the containerElement, then the\n    // distance between the two will be the offsetTop of the targetElement.\n    // If, on the other hand, there are intermediate positioned elements between the\n    // two entities, the distance between the targetElement and the containerElement\n    // will be the accumulation of the offsetTop of the element and that of its\n    // subsequent offsetParent until the containerElement is reached, since it\n    // will also be an offsetParent at some point due to the fact that it is positioned.\n\n    // If the containerElement is not positioned, then it can\"t be an offsetParent,\n    // which means that the offsetTop of the targetElement would not be with respect to it.\n    // However, if the two of them happen to have the same offsetParent, then\n    // the distance between them will be the difference between their offsetTop\n    // since they are both taken with respect to the same entity.\n    // The last resort would be to accumulate their offsetTop until a common\n    // offsetParent is reached (usually the document) and taking the difference\n    // between the accumulated offsetTops\n\n    if (isPositioned(c)) {\n      if (t.offsetParent !== c) {\n        var isContainerElementOrDocument = function isContainerElementOrDocument(e) {\n          return e === c || e === document;\n        };\n        var _getElementOffsetInfo = getElementOffsetInfoUntil(t, isContainerElementOrDocument),\n          offsetTop = _getElementOffsetInfo.offsetTop,\n          offsetParent = _getElementOffsetInfo.offsetParent;\n        if (offsetParent !== c) {\n          throw new Error(\"Seems containerElement is not an ancestor of the Element\");\n        }\n        return offsetTop;\n      }\n      return t.offsetTop;\n    }\n    if (t.offsetParent === c.offsetParent) {\n      return t.offsetTop - c.offsetTop;\n    }\n    var isDocument = function isDocument(e) {\n      return e === document;\n    };\n    return getElementOffsetInfoUntil(t, isDocument).offsetTop - getElementOffsetInfoUntil(c, isDocument).offsetTop;\n  }\n};\nexports.default = {\n  updateHash: updateHash,\n  getHash: getHash,\n  filterElementInContainer: filterElementInContainer,\n  scrollOffset: scrollOffset\n};","map":{"version":3,"names":["Object","defineProperty","exports","value","updateHash","hash","historyUpdate","hashVal","indexOf","substring","hashToUpdate","curLoc","window","location","urlToPush","pathname","search","history","pushState","state","replaceState","getHash","replace","filterElementInContainer","container","element","contains","compareDocumentPosition","isPositioned","getComputedStyle","position","getElementOffsetInfoUntil","predicate","offsetTop","currentOffsetParent","offsetParent","scrollOffset","c","t","horizontal","document","getBoundingClientRect","left","scrollX","pageXOffset","offsetLeft","top","scrollY","pageYOffset","isContainerElementOrDocument","e","_getElementOffsetInfo","Error","isDocument","default"],"sources":["C:/Users/user/Desktop/04portreact/node_modules/react-scroll/modules/mixins/utils.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nvar updateHash = function updateHash(hash, historyUpdate) {\n  var hashVal = hash.indexOf(\"#\") === 0 ? hash.substring(1) : hash;\n  var hashToUpdate = hashVal ? \"#\" + hashVal : \"\";\n  var curLoc = window && window.location;\n  var urlToPush = hashToUpdate ? curLoc.pathname + curLoc.search + hashToUpdate : curLoc.pathname + curLoc.search;\n  historyUpdate ? history.pushState(history.state, \"\", urlToPush) : history.replaceState(history.state, \"\", urlToPush);\n};\n\nvar getHash = function getHash() {\n  return window.location.hash.replace(/^#/, \"\");\n};\n\nvar filterElementInContainer = function filterElementInContainer(container) {\n  return function (element) {\n    return container.contains ? container != element && container.contains(element) : !!(container.compareDocumentPosition(element) & 16);\n  };\n};\n\nvar isPositioned = function isPositioned(element) {\n  return getComputedStyle(element).position !== \"static\";\n};\n\nvar getElementOffsetInfoUntil = function getElementOffsetInfoUntil(element, predicate) {\n  var offsetTop = element.offsetTop;\n  var currentOffsetParent = element.offsetParent;\n\n  while (currentOffsetParent && !predicate(currentOffsetParent)) {\n    offsetTop += currentOffsetParent.offsetTop;\n    currentOffsetParent = currentOffsetParent.offsetParent;\n  }\n\n  return { offsetTop: offsetTop, offsetParent: currentOffsetParent };\n};\n\nvar scrollOffset = function scrollOffset(c, t, horizontal) {\n  if (horizontal) {\n    return c === document ? t.getBoundingClientRect().left + (window.scrollX || window.pageXOffset) : getComputedStyle(c).position !== \"static\" ? t.offsetLeft : t.offsetLeft - c.offsetLeft;\n  } else {\n    if (c === document) {\n      return t.getBoundingClientRect().top + (window.scrollY || window.pageYOffset);\n    }\n\n    // The offsetParent of an element, according to MDN, is its nearest positioned\n    // (an element whose position is anything other than static) ancestor. The offsetTop\n    // of an element is taken with respect to its offsetParent which may not neccessarily\n    // be its parentElement except the parent itself is positioned.\n\n    // So if containerElement is positioned, then it must be an offsetParent somewhere\n    // If it happens that targetElement is a descendant of the containerElement, and there\n    // is not intermediate positioned element between the two of them, i.e.\n    // targetElement\"s offsetParent is the same as the containerElement, then the\n    // distance between the two will be the offsetTop of the targetElement.\n    // If, on the other hand, there are intermediate positioned elements between the\n    // two entities, the distance between the targetElement and the containerElement\n    // will be the accumulation of the offsetTop of the element and that of its\n    // subsequent offsetParent until the containerElement is reached, since it\n    // will also be an offsetParent at some point due to the fact that it is positioned.\n\n    // If the containerElement is not positioned, then it can\"t be an offsetParent,\n    // which means that the offsetTop of the targetElement would not be with respect to it.\n    // However, if the two of them happen to have the same offsetParent, then\n    // the distance between them will be the difference between their offsetTop\n    // since they are both taken with respect to the same entity.\n    // The last resort would be to accumulate their offsetTop until a common\n    // offsetParent is reached (usually the document) and taking the difference\n    // between the accumulated offsetTops\n\n    if (isPositioned(c)) {\n      if (t.offsetParent !== c) {\n        var isContainerElementOrDocument = function isContainerElementOrDocument(e) {\n          return e === c || e === document;\n        };\n\n        var _getElementOffsetInfo = getElementOffsetInfoUntil(t, isContainerElementOrDocument),\n            offsetTop = _getElementOffsetInfo.offsetTop,\n            offsetParent = _getElementOffsetInfo.offsetParent;\n\n        if (offsetParent !== c) {\n          throw new Error(\"Seems containerElement is not an ancestor of the Element\");\n        }\n\n        return offsetTop;\n      }\n\n      return t.offsetTop;\n    }\n\n    if (t.offsetParent === c.offsetParent) {\n      return t.offsetTop - c.offsetTop;\n    }\n\n    var isDocument = function isDocument(e) {\n      return e === document;\n    };\n    return getElementOffsetInfoUntil(t, isDocument).offsetTop - getElementOffsetInfoUntil(c, isDocument).offsetTop;\n  }\n};\n\nexports.default = {\n  updateHash: updateHash,\n  getHash: getHash,\n  filterElementInContainer: filterElementInContainer,\n  scrollOffset: scrollOffset\n};"],"mappings":"A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