From 70a104f24f3b3e3903d363081569be9af2052758 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 16 Jun 2020 07:32:55 +0000 Subject: =?UTF-8?q?up=C3=83date=20copperjs=20to=20version=201.5.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/cropperjs/dist/cropper.esm.js | 70 +++++++++++++++++------------------ 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'library/cropperjs/dist/cropper.esm.js') diff --git a/library/cropperjs/dist/cropper.esm.js b/library/cropperjs/dist/cropper.esm.js index 55bb43ec3..90f95c95b 100644 --- a/library/cropperjs/dist/cropper.esm.js +++ b/library/cropperjs/dist/cropper.esm.js @@ -1,14 +1,16 @@ /*! - * Cropper.js v1.5.6 + * Cropper.js v1.5.7 * https://fengyuanchen.github.io/cropperjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2019-10-04T04:33:48.372Z + * Date: 2020-05-23T05:23:00.081Z */ function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; @@ -78,13 +80,13 @@ function _objectSpread2(target) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { - ownKeys(source, true).forEach(function (key) { + ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { - ownKeys(source).forEach(function (key) { + ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } @@ -94,28 +96,41 @@ function _objectSpread2(target) { } function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } + if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); +} + +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 _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined'; var WINDOW = IS_BROWSER ? window : {}; -var IS_TOUCH_DEVICE = IS_BROWSER ? 'ontouchstart' in WINDOW.document.documentElement : false; +var IS_TOUCH_DEVICE = IS_BROWSER && WINDOW.document.documentElement ? 'ontouchstart' in WINDOW.document.documentElement : false; var HAS_POINTER_EVENT = IS_BROWSER ? 'PointerEvent' in WINDOW : false; var NAMESPACE = 'cropper'; // Actions @@ -169,10 +184,6 @@ var REGEXP_ACTIONS = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/; var REGEXP_DATA_URL = /^data:/; var REGEXP_DATA_URL_JPEG = /^data:image\/jpeg;base64,/; var REGEXP_TAG_NAME = /^img|canvas$/i; // Misc -// Inspired by the default width and height of a canvas element. - -var MIN_CONTAINER_WIDTH = 200; -var MIN_CONTAINER_HEIGHT = 100; var DEFAULTS = { // Define the view mode of the cropper @@ -380,7 +391,7 @@ var assign = Object.assign || function assign(target) { var REGEXP_DECIMALS = /\.\d*(?:0|9){12}\d*$/; /** * Normalize decimal number. - * Check out {@link http://0.30000000000000004.com/} + * Check out {@link https://0.30000000000000004.com/} * @param {number} value - The value to normalize. * @param {number} [times=100000000000] - The times for normalizing. * @returns {number} Returns the normalized number. @@ -1181,8 +1192,6 @@ function parseOrientation(orientation) { case 8: rotate = -90; break; - - default: } return { @@ -1787,16 +1796,13 @@ var events = { var handlers = { resize: function resize() { - var options = this.options, - container = this.container, - containerData = this.containerData; - var minContainerWidth = Number(options.minContainerWidth) || MIN_CONTAINER_WIDTH; - var minContainerHeight = Number(options.minContainerHeight) || MIN_CONTAINER_HEIGHT; - - if (this.disabled || containerData.width <= minContainerWidth || containerData.height <= minContainerHeight) { + if (this.disabled) { return; } + var options = this.options, + container = this.container, + containerData = this.containerData; var ratio = container.offsetWidth / containerData.width; // Resize when width changed or height changed if (ratio !== 1 || container.offsetHeight !== containerData.height) { @@ -2044,8 +2050,6 @@ var change = { } break; - - default: } }; @@ -2410,8 +2414,6 @@ var change = { } break; - - default: } if (renderable) { @@ -3193,9 +3195,7 @@ var methods = { var AnotherCropper = WINDOW.Cropper; -var Cropper = -/*#__PURE__*/ -function () { +var Cropper = /*#__PURE__*/function () { /** * Create a new Cropper. * @param {Element} element - The target element for cropping. @@ -3244,7 +3244,7 @@ function () { if (!url) { return; - } // e.g.: "http://example.com/img/picture.jpg" + } // e.g.: "https://example.com/img/picture.jpg" url = element.src; -- cgit v1.2.3