System.register(['../graphics.js'], function (_export, _context) {
  "use strict";

  var pt, rect;
  return {
    setters: [function (_graphicsJs) {
      pt = _graphicsJs.pt;
      rect = _graphicsJs.rect;
    }],
    execute: function () {
      const __SystemJSRewritingHack = {};
      _recorder_._src_client_morphic_node_helpers_js = _recorder_._src_client_morphic_node_helpers_js || {};
      Object.defineProperty(_recorder_._src_client_morphic_node_helpers_js, 'globalPosition', {
        get() {
          return globalPosition;
        },

        set(thisIsVererySecretVariableName) {
          _export('globalPosition', globalPosition = thisIsVererySecretVariableName);

          return true;
        },

        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._src_client_morphic_node_helpers_js, 'getBounds', {
        get() {
          return getBounds;
        },

        set(thisIsVererySecretVariableName) {
          _export('getBounds', getBounds = thisIsVererySecretVariableName);

          return true;
        },

        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._src_client_morphic_node_helpers_js, 'setExtent', {
        get() {
          return setExtent;
        },

        set(thisIsVererySecretVariableName) {
          _export('setExtent', setExtent = thisIsVererySecretVariableName);

          return true;
        },

        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._src_client_morphic_node_helpers_js, 'getExtent', {
        get() {
          return getExtent;
        },

        set(thisIsVererySecretVariableName) {
          _export('getExtent', getExtent = thisIsVererySecretVariableName);

          return true;
        },

        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._src_client_morphic_node_helpers_js, 'getPosition', {
        get() {
          return getPosition;
        },

        set(thisIsVererySecretVariableName) {
          _export('getPosition', getPosition = thisIsVererySecretVariableName);

          return true;
        },

        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._src_client_morphic_node_helpers_js, 'setPosition', {
        get() {
          return setPosition;
        },

        set(thisIsVererySecretVariableName) {
          _export('setPosition', setPosition = thisIsVererySecretVariableName);

          return true;
        },

        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._src_client_morphic_node_helpers_js, 'rect', {
        get() {
          return rect;
        },

        set(thisIsVererySecretVariableName) {
          rect = thisIsVererySecretVariableName;
          return true;
        },

        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._src_client_morphic_node_helpers_js, 'pt', {
        get() {
          return pt;
        },

        set(thisIsVererySecretVariableName) {
          pt = thisIsVererySecretVariableName;
          return true;
        },

        enumerable: true,
        configurable: true
      });
      function setPosition(node, pos) {
        return lively.setPosition(node, pos);
      }

      _export('setPosition', setPosition);

      function getPosition(node) {
        return lively.getPosition(node);
      }

      _export('getPosition', getPosition);

      function getExtent(node) {
        var bounds = node.getBoundingClientRect();
        return pt(bounds.width, bounds.height);
      }

      _export('getExtent', getExtent);

      function setExtent(node, extent) {
        node.style.width = '' + extent.x + 'px';
        node.style.height = '' + extent.y + 'px';
      }

      _export('setExtent', setExtent);

      function getBounds(node) {
        var pos = getPosition(node);
        return rect(pos, pos.addPt(getExtent(node)));
      }

      _export('getBounds', getBounds);

      function globalPosition(node) {
        var left = 0;
        var top = 0;
        while (node && node !== document.body) {
          left += node.offsetLeft;
          top += node.offsetTop;
          node = node.offsetParent;
        }
        return pt(left, top);
      }

      _export('globalPosition', globalPosition);
    }
  };
});