text: "use strict";
  
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  
  require("core-js/modules/es.symbol");
  
  require("core-js/modules/es.symbol.description");
  
  require("core-js/modules/es.symbol.iterator");
  
  require("core-js/modules/es.array.from");
  
  require("core-js/modules/es.array.is-array");
  
  require("core-js/modules/es.array.iterator");
  
  require("core-js/modules/es.array.slice");
  
  require("core-js/modules/es.date.to-string");
  
  require("core-js/modules/es.function.bind");
  
  require("core-js/modules/es.function.name");
  
  require("core-js/modules/es.object.to-string");
  
  require("core-js/modules/es.regexp.to-string");
  
  require("core-js/modules/es.string.iterator");
  
  require("core-js/modules/web.dom-collections.iterator");
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.iFrameZoomedOut = exports.iFrameZoomedIn = exports.iFrameActualSize = exports.elementZoomedOut = exports.elementZoomedIn = exports.elementActualSize = exports["default"] = void 0;
  
  var _react = _interopRequireWildcard(require("react"));
  
  var _Zoom = require("./Zoom");
  
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
  
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
  
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
  
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
  
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  
  function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
  
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
  
  var _default = {
    component: _Zoom.Zoom,
    title: 'Basics/Zoom',
    argTypes: {
      scale: {
        control: {
          type: 'range',
          min: 0.2,
          max: 30,
          step: 0.02
        }
      }
    }
  };
  exports["default"] = _default;
  
  var EXAMPLE_ELEMENT = /*#__PURE__*/_react["default"].createElement("div", {
    style: {
      width: 2000,
      height: 2000,
      border: '10px solid orangered',
      background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAM4klEQVR4Xu2d224ktxGGayTN6LTrOO//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T+lOOGi/Z/IjAAAAABJRU5ErkJggg==')"
    }
  });
  
  var TemplateElement = function TemplateElement(args) {
    return /*#__PURE__*/_react["default"].createElement(_Zoom.Zoom.Element, args);
  };
  
  TemplateElement.displayName = "TemplateElement";
  var elementActualSize = TemplateElement.bind({});
  exports.elementActualSize = elementActualSize;
  elementActualSize.args = {
    scale: 1,
    children: EXAMPLE_ELEMENT
  };
  var elementZoomedIn = TemplateElement.bind({});
  exports.elementZoomedIn = elementZoomedIn;
  elementZoomedIn.args = {
    scale: 0.7,
    children: EXAMPLE_ELEMENT
  };
  var elementZoomedOut = TemplateElement.bind({});
  exports.elementZoomedOut = elementZoomedOut;
  elementZoomedOut.args = {
    scale: 3,
    children: EXAMPLE_ELEMENT
  };
  var style = {
    width: '500px',
    height: '500px',
    border: '2px solid hotpink',
    position: 'relative'
  };
  
  var TemplateIFrame = function TemplateIFrame(args) {
    var iFrameRef = _react["default"].useRef(null);
  
    var _useState = (0, _react.useState)(1),
        _useState2 = _slicedToArray(_useState, 2),
        scale = _useState2[0],
        setScale = _useState2[1];
  
    var _useState3 = (0, _react.useState)(false),
        _useState4 = _slicedToArray(_useState3, 2),
        loaded = _useState4[0],
        hasLoaded = _useState4[1];
  
    (0, _react.useEffect)(function () {
      if (loaded) {
        setScale(args.scale);
      }
    }, [args.scale, loaded]);
    return /*#__PURE__*/_react["default"].createElement(_Zoom.Zoom.IFrame, {
      iFrameRef: iFrameRef,
      scale: scale,
      active: args.active
    }, /*#__PURE__*/_react["default"].createElement("iframe", {
      id: "iframe",
      title: "UI Panel",
      onLoad: function onLoad() {
        return hasLoaded(true);
      },
      src: "/iframe.html?id=ui-panel--default&viewMode=story",
      style: style,
      ref: iFrameRef,
      allowFullScreen: true
    }));
  };
  
  TemplateIFrame.displayName = "TemplateIFrame";
  var iFrameActualSize = TemplateIFrame.bind({});
  exports.iFrameActualSize = iFrameActualSize;
  iFrameActualSize.args = {
    scale: 1,
    active: true
  };
  var iFrameZoomedIn = TemplateIFrame.bind({});
  exports.iFrameZoomedIn = iFrameZoomedIn;
  iFrameZoomedIn.args = {
    scale: 0.7,
    active: true
  };
  var iFrameZoomedOut = TemplateIFrame.bind({});
  exports.iFrameZoomedOut = iFrameZoomedOut;
  iFrameZoomedOut.args = {
    scale: 3,
    active: true
  };